Hi Pelle,
To create an asm listing, we use the /Tx86-asm option. My question is that have you a complete reference / manual explaining the asm syntax used by Pocc? Some statements appearing in the listing are unclear for me.
Example code:
#include <stdio.h>
void main(int argc,char *argv[])
{
char *s="Pelles C";
printf("%s",s);
}
pocc /Ze /Zx /Tx86-asm Sample.c
[cpu 486]
[global _main]
[section .text]
[function _main]
_main:
push ebp
mov ebp,esp
sub esp,4
lea eax,[(@2)]
mov dword [ebp+(-4)],eax
mov eax,dword [ebp+(-4)]
push dword eax
push dword (@3)
call _printf
add esp,(8+3)&(~3) ;This syntax?
@1:
mov esp,ebp
pop ebp
ret
..?X_main: ; What does mean the symbols ..?X ?
[extern _printf]
[section .rdata]
@3:
db '%s',0
@2:
db 'Pelles C',0
[section .drectve]
db " -defaultlib:crt"
Many thanks,
Vortex