The MASM Forum

Projects => Poasm => Topic started by: Vortex on May 23, 2012, 03:17:31 AM

Title: Poasm supported by Pelles C run-time library
Post by: Vortex on May 23, 2012, 03:17:31 AM
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
Title: Re: Poasm supported by Pelles C run-time library
Post by: Adamanteus on May 24, 2012, 04:03:02 AM
Annoying but actual - somebody could say to Pellec, that need support MASM in Pelles C IDE somehow  :icon_exclaim:
Title: Re: Poasm supported by Pelles C run-time library
Post by: 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.
Title: Re: Poasm supported by Pelles C run-time library
Post by: Vortex on May 24, 2012, 04:19:06 AM
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
Title: Re: Poasm supported by Pelles C run-time library
Post by: Greenhorn on May 24, 2012, 04:48:38 AM
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
Title: Re: Poasm supported by Pelles C run-time library
Post by: Vortex on August 04, 2012, 03:27:51 AM
Hi pavshinAN,

Welcome to the forum.

You are right and the differences in the macro syntax should not be a problem.
Title: Re: Poasm supported by Pelles C run-time library
Post by: Vortex on August 23, 2012, 03:31:51 PM
Hi RGyaznoff,

Welcome to the forum.
Title: Re: Poasm supported by Pelles C run-time library
Post by: Adamanteus on August 24, 2012, 01:08:35 AM
I'm not glad of polink - it's not understand release msc library debug record 0 - and not linking  ::)
Vortex - much thanks.
Title: Re: Poasm supported by Pelles C run-time library
Post by: Vortex on August 24, 2012, 01:17:42 AM
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
Title: Re: Poasm supported by Pelles C run-time library
Post by: Vortex on November 01, 2012, 05:03:21 AM
Hi NKjulanoff,

Welcome to the forum.

Yes, Poasm's macro notation is different but it can process simple Masm macros without problem.
Title: Re: Poasm supported by Pelles C run-time library
Post by: Vortex on December 16, 2012, 10:08:03 PM
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
Title: Re: Poasm supported by Pelles C run-time library
Post by: japheth on January 04, 2013, 05:13:25 PM
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?
Title: Re: Poasm supported by Pelles C run-time library
Post by: shantanu_gadgil on January 04, 2013, 06:10:50 PM
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
Title: Re: Poasm supported by Pelles C run-time library
Post by: japheth on January 09, 2013, 06:56:26 PM
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?


Title: Re: Poasm supported by Pelles C run-time library
Post by: Gunther on January 10, 2013, 04:56:34 AM
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
Title: Re: Poasm supported by Pelles C run-time library
Post by: Vortex on January 10, 2013, 05:10:33 AM
Hi OLzenizin,

Welcome to the forum.
Title: Re: Poasm supported by Pelles C run-time library
Post by: jj2007 on April 16, 2013, 10:55:39 PM
Добро пожаловать, mulaninMX :icon14:
Title: Re: Poasm supported by Pelles C run-time library
Post by: Gunther on April 16, 2013, 11:36:15 PM
Hi mulaninMX,

Quote from: mulaninMX on April 16, 2013, 10:53:55 PM
Trust me here, there is nothing wrong with POASM, its a very good tool.

right and welcome to the forum.

Gunther
Title: Re: Poasm supported by Pelles C run-time library
Post by: Jibz on April 17, 2013, 12:59:13 AM
All those posts contain only a random sentence from a previous post. I would guess bots like japheth said.
Title: Re: Poasm supported by Pelles C run-time library
Post by: hutch-- on April 17, 2013, 10:51:51 AM
Fascinating, I wonder what genius cobbled the script together to ape bits from previous posts ?
Title: Re: Poasm supported by Pelles C run-time library
Post by: Gunther on April 18, 2013, 04:13:31 AM
Hi ISaminov,

welcome to the forum.

Gunther
Title: Re: Poasm supported by Pelles C run-time library
Post by: habran on April 18, 2013, 06:19:54 AM
don't be so naive Gunther :biggrin:
look at this, they are all the same bot:
ISaminov   Gender: Male Age:28 Location:Россия Москва
mulaninMX  Gender: Male Age:30 Location:Россия Москва
OLzenizin  Gender: Male Age:33 Location:Россия Москва
NZavaloff  Gender: Male Age:32 Location:Астраханская область, Камызякский р-н, п. Станья
NKjulanoff Gender: Male Age:33 Location:Россия Москва
AKabanchuk Gender: Male Age:32 Location:Россия Москва
RGyaznoff  Gender: Male Age:37 Location:Россия Москва
pavshinAN  Gender: Male Age:33 Location:Россия Москва


Japhet is a genius, he figured it out first :idea:
I think we have an issue here :exclaim:
if the Location contains a letter я it is the bot
I think that it will be necessary to delete this project and start the new one for Poasm
because the bug is somehow planted here
Title: Re: Poasm supported by Pelles C run-time library
Post by: Gunther on April 18, 2013, 06:36:04 AM
Hi habran,

spam bot, could be or not. But Moscow. (https://en.wikipedia.org/wiki/Moscow) has over 11 million inhabitants. That's a lot. Furthermore, the Astrakhan Oblast (https://en.wikipedia.org/wiki/Astrakhan_Oblast) is hundreds of miles away from Moscow in south Russia.

Quote from: habran on April 18, 2013, 06:19:54 AM
Japhet is a genius, he figured it out first :idea:
I think we have an issue here :exclaim:
if the Location contains a letter я it is the bot

I don't know if Andreas likes your statement. But is that right? We shouldn't discriminate without exact knowledge. If you're sure and you've a definitive proof, then it's a problem.

Gunther
Title: Re: Poasm supported by Pelles C run-time library
Post by: jj2007 on April 18, 2013, 08:35:24 AM
Quote from: habran on April 18, 2013, 06:19:54 AM
if the Location contains a letter я it is the bot

Россия Москва simply means Russia, Moscow. And there is a huge assembler community over there, so I wouldn't be surprised if they visited our little site. On the other hand, the posts really look a bit bot-tish ;-)

Back to contents: What is the meaning of this warning?

polib /def:mshtml.def /extract:ShowHTMLDialog /out:test.lib /machine:x86
POLIB: warning: Unable to find member 'ShowHTMLDialog'.


mshtml.def:
LIBRARY "MSHTML.dll"
EXPORTS
ShowHTMLDialog


As a matter of fact, the created library (1412 bytes) works like a charm...
(I posted this also at Pelles C forum)
Title: Re: Poasm supported by Pelles C run-time library
Post by: habran on April 18, 2013, 02:16:51 PM
Hey Gunther, I don't discriminate people, I hate equally everyone  :badgrin:
One of my lifetime friend is a Russian from Moskva, doctor of chemistry
He is an excellent chess player, his great disappointment in me is only
that I newer let him win even 1 game against me :eusa_naughty:

If someone write one post for the first time without introducing themselves and
than never ever respond to any comment, something must be then rotten there :icon_confused:

QuoteI don't know if Andreas likes your statement.
He certainly doesn't like it, if someone said that to me I would hunt him down for sure 8)
Hi Andreas, I apologize, I actually only wanted to say that you are very clever :t
If you succeed in my proposal for freing RBP register I will return to you back the former title :eusa_clap:

BTW Cyrillic was compulsory in my primary school, so I can read and write it :P

BTW (second time) we all enjoy JWasm but I can not find JWASM page in this forum
what happened to the equal opportunity? sleeping :icon_exclaim: 
Title: Re: Poasm supported by Pelles C run-time library
Post by: habran on April 18, 2013, 02:45:47 PM
Hi JJ
QuoteOn the other hand, the posts really look a bit bot-tish ;-)

be more decisive, one hand or the other :biggrin:
if something looks like an apple, smells like an apple and taste like an apple than it must be an aple ;) 
Title: Re: Poasm supported by Pelles C run-time library
Post by: jj2007 on April 18, 2013, 03:44:40 PM
Quote from: habran on April 18, 2013, 02:45:47 PM
if something looks like an apple, smells like an apple and taste like an apple than it must be an apple ;)

Reminds me of an old joke they used to make about Eastern German communists... the end product would be chocolate 8)
Title: Re: Poasm supported by Pelles C run-time library
Post by: habran on April 18, 2013, 04:07:40 PM
Quotethe end product would be chocolate
Certainly, they had some imagination :P
these days people only have damn internet (and spam bots) ;)
Title: Re: Poasm supported by Pelles C run-time library
Post by: MichaelW on April 18, 2013, 04:51:19 PM
Here, it's known as the duck test.
Title: Re: Poasm supported by Pelles C run-time library
Post by: jj2007 on April 18, 2013, 05:23:16 PM
Which is actually attributed to Alan Turing, see the Turing Duck Test (http://uncyclopedia.wikia.com/wiki/Turing_Duck_Test)
Title: Re: Poasm supported by Pelles C run-time library
Post by: habran on April 18, 2013, 07:10:01 PM
Thanks MichaelW & jj2007
You have enriched me with the knowledge :t
this world is full of sh*t, I meant surprises :biggrin:
Title: Re: Poasm supported by Pelles C run-time library
Post by: Vortex on May 17, 2013, 03:29:08 AM
The dependencies are extracted automatically by the linker.
Title: Re: Poasm supported by Pelles C run-time library
Post by: Antariy on December 03, 2013, 05:55:44 AM
Two users above are spammers ::) They promote the site in their custom-website link near the avatar. Just look to their sentences: it's dumb repeat of the sentences of the other, true members. For example, look to the content of the post above, and then to the content of the Erol's post two posts above - the spammer copied Erol's sentence.
Title: Re: Poasm supported by Pelles C run-time library
Post by: Antariy on December 03, 2013, 06:05:23 AM
The post #31 is also spammer's post ::) That are all russian websites with services.
Title: Re: Poasm supported by Pelles C run-time library
Post by: jj2007 on December 03, 2013, 06:24:15 AM
Yeah, astonishing that they can teach parrots reading and writing nowadays :P
Title: Re: Poasm supported by Pelles C run-time library
Post by: Vortex on December 03, 2013, 06:32:03 AM
I will delete those postings.
Title: Re: Poasm supported by Pelles C run-time library
Post by: Gunther on December 04, 2013, 06:16:02 AM
Erol,

Quote from: Vortex on December 03, 2013, 06:32:03 AM
I will delete those postings.

:t

Gunther
Title: Re: Poasm supported by Pelles C run-time library
Post by: Gunther on May 30, 2014, 03:32:14 AM
Fine. Do we have another spam bot from Россия Москва?

Gunther
Title: Re: Poasm supported by Pelles C run-time library
Post by: jj2007 on April 15, 2015, 05:08:53 PM
Just for curiosity: How much does Hyund mot stud mosco (shortened to distract google) pay you to post this crap?
Title: Re: Poasm supported by Pelles C run-time library
Post by: Gunther on April 15, 2015, 06:54:39 PM
Quote from: jj2007 on April 15, 2015, 05:08:53 PM
Just for curiosity: How much does Hyund mot stud mosco (shortened to distract google) pay you to post this crap?

Not very much, I think. The question is: Must we live with the fact that this thread is occupied by spammers?

Gunther
Title: Re: Poasm supported by Pelles C run-time library
Post by: rrr314159 on April 15, 2015, 07:40:04 PM
No question motorinVK looks like a bot, but here's another thought. When I read this thread earlier, posts described exactly what the spambots were doing: grabbing a quote from an earlier post; registering as Male, around age thirty, from Moscow or thereabouts, with a Cyrillic backward R, etc. It occurred to me, a good joke would be to post something exactly like motorinVK: a human pretending to be a robot! I didn't do it because I'm too socialized, but maybe someone else did?

Just a thought ...
Title: Re: Poasm supported by Pelles C run-time library
Post by: Gunther on April 15, 2015, 08:29:26 PM
Quote from: rrr314159 on April 15, 2015, 07:40:04 PM
No question motorinVK looks like a bot, ...

Yes. We know the used avatar very well.

Gunther
Title: Re: Poasm supported by Pelles C run-time library
Post by: Vortex on April 16, 2015, 03:25:47 AM
Interestingly, those bots are interested in C run-time libraries.  :biggrin:

By the way, I removed that posting.
Title: Re: Poasm supported by Pelles C run-time library
Post by: Gunther on April 16, 2015, 06:42:10 AM
Quote from: Vortex on April 16, 2015, 03:25:47 AM
By the way, I removed that posting.

Godd decision, Erol.  :t But the question from post #39 remains.

Gunther

Title: Re: Poasm supported by Pelles C run-time library
Post by: jj2007 on May 16, 2015, 01:51:37 AM
Hi Khidalov,
Nice to see you here. Who programmed you?
Title: Re: Poasm supported by Pelles C run-time library
Post by: Vortex on May 16, 2015, 03:59:16 AM
I removed that message. Ironically, those bots are "interested" in C run-time libraries.  :biggrin:
Title: Re: Poasm supported by Pelles C run-time library
Post by: jj2007 on August 18, 2015, 09:25:47 PM
Hey, that phrase almost made sense - you are improving your bot :t
Title: Re: Poasm supported by Pelles C run-time library
Post by: Gunther on August 19, 2015, 06:00:47 AM
Quote from: Vteobitov on August 18, 2015, 06:41:22 PM
For example, look to the content of the post above, and then to the content of the Erol's post two posts above - the spammer copied Erol's sentence.

One question remains: What's your programming language?

Gunther
Title: Re: Poasm supported by Pelles C run-time library
Post by: Vortex on September 26, 2019, 04:19:18 AM
QSort sample built with the modules extracted from Pelles crt0.lib :

include Sample.inc

CompareProc PROTO C :DWORD,:DWORD

NUMB_OF_ELEMENTS equ 10

.data

numbers     dd 29,12,32,65,58,7,12,11,11,97
format1     db '%d',13,10,0

.code

start:

    invoke  qsort,ADDR numbers,\
            NUMB_OF_ELEMENTS,\
            SIZEOF DWORD,ADDR CompareProc

    call    PrintArray

    invoke  ExitProcess,0
   

CompareProc PROC C arg1:DWORD,arg2:DWORD

    mov     ecx,arg1
    mov     edx,arg2
    mov     eax,DWORD PTR [ecx]
    sub     eax,DWORD PTR [edx]
    ret

CompareProc ENDP


PrintArray  PROC uses esi ebx

    mov     ebx,NUMB_OF_ELEMENTS
    mov     esi,OFFSET numbers
@@:
    invoke  printf,ADDR format1,\
            DWORD PTR [esi]

    add     esi,4
    dec     ebx
    jnz     @b
    ret

PrintArray ENDP


END start


\PellesC\bin\poasm _crt_constraint.asm
\PellesC\bin\poasm printf.asm
\PellesC\bin\poasm Sample.asm
\PellesC\bin\polink /SUBSYSTEM:CONSOLE /LIBPATH:\PellesC\lib\Win Sample.obj printf.obj qsort_s.obj memmove.obj memcpy.obj _crt_constraint.obj