iasm, call and dolar sign

nazriel spam at dzfl.pl
Sun Mar 3 19:30:26 PST 2013


Greetings.

While using D iasm I noticed something interesting.

I was trying to get instruction pointer by using call trick and 
noticed that in opposite to nasm (and probably others assemblers) 
D iasm uses $ as next instruction pointer.

Documentation mentions that dolar sign is usable in Jcc (or jmp 
only? not sure) and call instructions.

It doesn't work.
http://dpaste.dzfl.pl/5c9c3d6b

call $ ; this should jump to next instruction and store RIP on 
stack
        ; if I understand correctly?
pop RAX;

Compiler slaps me with information that $ is bad operand for call 
instruction.

Am I doing something wrong or it is a bug?
Thanks!


More information about the Digitalmars-d-learn mailing list