May 14, 2024, 08:48:26 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


FASM Macro - is it possible?

Started by Guilect, June 03, 2010, 10:04:51 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Guilect

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

Ficko

Yes if you translate it to NASM. ;D

Guilect

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.)