how to write inline-assembly in gpc?
Since there is not offical reference,I got only one tutorial <a href="http://www.gnupascal.de/contrib/misc/gpcasm.zip"> gpcasm.zip </a>.But when I try to follow the tut and try the inline assembly example on my debian.The gpc was not happy with it. <pre> gnu_asm.pas : In procedure 'MyStupidDelay': gnu_asm.pas:3: error : can't find a register in class AREG while reloading asm </pre> Here is the code program gnu_asm; Procedure MyStupidDelay(time : integer); Begin Asm("0 : pushl $0xfffff 1 : decl(%%esp) jnz 1b addl $0x4, %%esp decl %%eax jnz 0b" : : "a" (time) : "eax" ); end; begin write("only for test"); end. Another question,are there any other refernece, tutorials, examples on inline assembly in gnu pascal. thanks.
participants (2)
-
jcyang -
Maurice Lombardi