March 04, 2013 iasm, call and dolar sign | ||||
---|---|---|---|---|
| ||||
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! |
March 04, 2013 Re: iasm, call and dolar sign | ||||
---|---|---|---|---|
| ||||
Posted in reply to nazriel | On Monday, 4 March 2013 at 03:30:30 UTC, nazriel wrote:
> 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!
Will answer myself :p
s/call $/call near ptr $
fixed the thing.
Sorry for distributions
|
Copyright © 1999-2021 by the D Language Foundation