News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Poasm supported by Pelles C run-time library

Started by Vortex, May 23, 2012, 03:17:31 AM

Previous topic - Next topic

Vortex

Here is a quick demo using the function _splitpath from Pelles C run-time static library crt.lib

_splitpath depends on the function strncpy which is extracted automatically from crt.lib



include     splitpathDemo.inc

.data

path1       db 'D:\PellesC\project\splitpath.asm',0
f1          db 'drive = %s',13,10
            db 'dir   = %s',13,10
            db 'name  = %s',13,10
            db 'ext   = %s',13,10,0

.data?

buffer      db 128 dup(?)
drive1      db 4 dup(?)
dir1        db 32 dup(?)
name1       db 16 dup(?)
ext1        db 4 dup(?)

.code

start:

    invoke  _splitpath,ADDR path1,ADDR drive1,ADDR dir1,\
            ADDR name1,ADDR ext1

    invoke  wsprintf,ADDR buffer,ADDR f1,ADDR drive1,ADDR dir1,ADDR name1,\
            ADDR ext1

    invoke  StdOut,ADDR buffer
    invoke  ExitProcess,0

END start

Adamanteus

Annoying but actual - somebody could say to Pellec, that need support MASM in Pelles C IDE somehow  :icon_exclaim:

hutch--

Trust me here, there is nothing wrong with POASM, its a very good tool. It has different macro notation to MASM but it does Intel spec assembler notation fine.

Vortex

Hi Adamanteus,

No need to contact Pelle for this task. Follow the path :

Project -> Project Options -> Macros

Modify AS to reflect the path of ml.exe : \masm32\bin\ml.exe
Modify ASFLAGS to : /c /coff

Greenhorn

Quote from: hutch-- on May 24, 2012, 04:15:37 AM
Trust me here, there is nothing wrong with POASM, its a very good tool. It has different macro notation to MASM but it does Intel spec assembler notation fine.
I totally agree. POASM has a lot of nice features I wished MASM/JWASM would support.  ;)
But I think we get a little bit offtopic here.

Thanks for the example, Vortex.


Regards
Greenhorn
Kole Feut un Nordenwind gift en krusen Büdel un en lütten Pint.

Vortex

Hi pavshinAN,

Welcome to the forum.

You are right and the differences in the macro syntax should not be a problem.

Vortex


Adamanteus

I'm not glad of polink - it's not understand release msc library debug record 0 - and not linking  ::)
Vortex - much thanks.

Vortex

Hi Adamanteus,

Thanks for your report.

If you found a bug, you can post Pelle's forum :

http://forum.pellesc.de/index.php

Pelle declares all the changes on every release :

http://www.smorgasbordet.com/pellesc/changes_650_700.htm

Vortex

Hi NKjulanoff,

Welcome to the forum.

Yes, Poasm's macro notation is different but it can process simple Masm macros without problem.

Vortex

Another example :

.386
.model flat,stdcall
option casemap:none

printf      PROTO C :VARARG
__bheapinit PROTO C :VARARG
__ioinit    PROTO C :VARARG
ExitProcess PROTO :DWORD

includelib  \PellesC\lib\Win\kernel32.lib
includelib  \Pellesc\lib\crt.lib

.data

str1        db 'Testing Pelles C static run-time library crt.lib',0

.code

start:

    invoke  __bheapinit
    test    eax,eax
    jz      finish
    invoke  __ioinit

    invoke  printf,ADDR str1

finish:

    invoke  ExitProcess,0

END start

japheth

Quote from: NZavaloff on January 04, 2013, 03:28:51 AM
I totally agree. POASM has a lot of nice features I wished MASM/JWASM would support.

Ok. However, "a lot" is not a absolutely rock-solid scientific term - I guess nowadays it's primarily used in the context "so many that you can't count them at a first, brief glance. So for some people "a lot" may be everything beyond 1. As for me, I'd say "a lot" starts with 17 ( for Dustin Hoffman in "Rain Man", "a lot" was clearly beyond 246 ).

Now, after this clarification, would you please tell us the "lot of" nice features that POASM has but other assemblers are missing?

shantanu_gadgil

I really like the CINCLUDE of POASM. This allowed me to use the ".h" file emitted by the resource editor in ASM code.

This was until I "pestered"/"requested"  :greensml:  KetilO (ResEd) to add the necessary features in ResEd.
(This was before RadASM could edit the .rc like ResEd)

Regards,
Shantanu

japheth

RGyaznoff ...
AKabanchuk ...
NKjulanoff ...
NZavaloff ...
OLzenizin ...

Hm, I guess I talked to a bot  :icon_redface:. It sounds somewhat Russian...

Wasn't this forum supposed to have a smart bot-detection mechanism?



Gunther

Hi japheth,

Quote from: japheth on January 09, 2013, 06:56:26 PM
It sounds somewhat Russian...

oh yes, he's from Moscow, Russia.

But never mind, welcome to the forum, OLzenizin. I think you're a real person, not a spam bot.

Gunther
You have to know the facts before you can distort them.