Re: [fpc-pascal] Intel x86 inline assembler problem

2008-11-19 Thread leledumbo
Jonas Maebe-2 wrote: > > I don't think there is any. Use a label instead. Or do you want to > jump into the middle of an instruction? > OK, changed to: procedure DumpRegs; label GetEIP; ... call GetEIP GetEIP: pop dword ptr EIP ... It runs OK, but I'm not sure whether this is the corr

Re: [fpc-pascal] Intel x86 inline assembler problem

2008-11-19 Thread Jonas Maebe
On 19 Nov 2008, at 04:08, leledumbo wrote: What's Free Pascal's substitution for $ (used as Hex in FPC, current line address in normal assembler)? I don't think there is any. Use a label instead. Or do you want to jump into the middle of an instruction? EIP is recognized by the assemble

[fpc-pascal] Intel x86 inline assembler problem

2008-11-18 Thread leledumbo
procedure DumpRegs; var Reg: array [0..7] of LongWord; SReg: array [0..5] of Word; EIP: LongWord; EFLAGS : LongWord; begin asm // save registers while they are not modified by another procedure call. note that depending // on your compiler settings, ebp may already be trashed (s