well, i reposted my question here. i've attached this question on my 26-post-thread in the os-construciton-forum and i don't believe that i'll get an answer (soon), so:

i had not much time in the last days (and actually i don't feel like programming... - hating myself for that )
but i've created a macro for my c-like-calling-convention. you know, i want to push (reverse) all arguments, put the funciton-number into al, call my sys-int and correct the stack. this is what i have, but theres one problem (following):



macro syscall funcNo, [arg]
{ common local argsize
argsize=0
reverse pushd arg
argsize=argsize+4
common mov al,funcNo
common int 0x30
if argsize>0
add esp,argsize
end if
}

calling like that:

syscall PrintDword,0xba5ec0de


the problem: this piece doesn't work for functions like



syscall BootLog


any solutions?
Posted on 2003-08-07 14:36:14 by hartyl


macro syscall funcNo,[arg]
{ common
local argsize
argsize=0
if ~<arg> eq <>
reverse
pushd arg
argsize=argsize+4
common
end if
mov al,funcNo
int 0x30
if argsize>0
add esp,argsize
end if
}


PS: There is a macro related section at the fasm message board:
http://board.flatassembler.net/viewforum.php?f=14
Posted on 2003-08-07 15:02:23 by Joshua
ah, oh; thanks!
i'll take a look there next time
Posted on 2003-08-08 13:08:40 by hartyl