Missing addressing mode supports
Brought to you by:
japheth
http://www.codegurus.be/codegurus/programming/riprelativeaddressing_en.htm claims that the following codes are legal.
.x64 .model flat
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.code
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
start:
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
mov al, [rip];Error A2102: Symbol not defined : rip
inc byte ptr [1000h];Error A2049: Invalid instruction operands
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
end start
The RIP register is not accessible directly in 64-bit. There are assemblers that accept this name, but in such cases RIP is just an internally defined symbol and the assembler will create a memory reference using RIP-relative addressing with a displacement of 00000000.
This is indeed accepted by ML64. JWasm expects this syntax instead:
inc byte ptr FLAT:[1000h]