IonicWind Software

IWBasic => General Questions => Topic started by: Guilect on June 03, 2010, 10:04:51 AM

Title: FASM Macro - is it possible?
Post by: Guilect on June 03, 2010, 10:04:51 AM
Hi,

I am trying to add a FASM macro via the inline assembly feature of IWB.
But the parser complains.
Is it possible to do something like this?

_asm

macro CALL arg
{
clabel = $
CALL arg
plabel = clabel-3
callsize = $-clabel
load ops dword from plabel
load opc byte from plabel+4
If ops=$FF008B50 & (opc=$10 | opc=$50 | opc=$90)
   If opc=$10
     db $10
   Else If (opc=$50 | opc=$90)
     db $00
     Repeat callsize
       load op byte from clabel+callsize-%
       store byte op at clabel+callsize-%+1
     End Repeat
   End If
   store dword $008BC189 at plabel
End If
}

_endasm
Title: Re: FASM Macro - is it possible?
Post by: Ficko on June 04, 2010, 12:05:39 AM
Yes if you translate it to NASM. ;D
Title: Re: FASM Macro - is it possible?
Post by: Guilect on June 04, 2010, 05:32:54 AM
doh  :P

NASM FASM    SHMASM

Forgot this language uses NASM.
That's what happens when you use too many different programaming languages.

Thanks Ficko.

Maybe I can make up for this next week,
when I plan to post the IWB port of the Freebasic Irrlicht Wrapper (well, a big portion of it anyway.)