On Fri, 6 Aug 2004 11:18:01 +0200 (CEST), Marco van de Voort wrote > > Ok, then this can be this way: > > > > procedure increment(var x: dword); assembler; > > asm > > mov eax, x > > inc [eax] > > end; > > > > Is this correct? If the compiler uses registers, the first line is > > translated to a 'mov eax, eax', otherwise it is something like 'mov eax, > > [esp-4]'. > > Afaik, it is correct, unless there is something with inc [eax] (e.g. > not working on older ones)
Almost OK - you need to specify the operand size explicitely ("inc dword ptr [eax]" in Intel syntax, or "incl (%eax)" in AT&T syntax). Tomas _______________________________________________ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal