flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > fasmg examples: error in x64.inc about RIP-addressing |
Author |
|
Tomasz Grysztar 07 May 2017, 18:56
Have you tried it with fasm 1? It signals the same error here and the macros aim at fasm compatibility. You can only choose the absolute (not RIP-relative) addressing with address size specifier:
Code: mov eax, [qword 0] |
|||
07 May 2017, 18:56 |
|
zhak 07 May 2017, 20:14
Thanks, Tomasz. However, I started getting another error
Code: add eax, [qword 0] macro add [21] macro store_instruction [24]: if (reg or rm_operand.rm) and x86.REX_REQUIRED Processed: if (@dest.rm or @src.rm) and x86.REX_REQUIRED Error: symbol 'rm' is undefined or out of scope. |
|||
07 May 2017, 20:14 |
|
Tomasz Grysztar 07 May 2017, 21:30
In this case it should work with:
Code: add eax,[dword 0] |
|||
07 May 2017, 21:30 |
|
Tomasz Grysztar 07 May 2017, 21:49
I have corrected it, now this works the same as in fasm 1:
Code: use64 add eax, [dword -1] ; 67 03 04 25 FF FF FF FF add eax, [qword -1] ; 03 04 25 FF FF FF FF |
|||
07 May 2017, 21:49 |
|
zhak 08 May 2017, 14:32
I tried the above instructions with fasm 1, and there's some inconsistency in the output:
Code: use64 add eax, [dword -1] ; 67 03 04 25 FF FF FF FF add eax, [qword -1] ; 03 04 25 FF FF FF FF add [dword 0], eax ; 01 04 25 00 00 00 00 add dword [dword 0], 1 ; 83 04 25 00 00 00 00 01 add [dword 1], eax ; 01 04 25 01 00 00 00 add dword [dword 1], 1 ; 83 04 25 01 00 00 00 01 address-size prefix is not added for positive moffs |
|||
08 May 2017, 14:32 |
|
Tomasz Grysztar 08 May 2017, 14:37
zhak wrote: address-size prefix is not added for positive moffs |
|||
08 May 2017, 14:37 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.