Ric wrote: ↑Mon 09 Mar 2026, 23:06
does the word "rel" need to be replaced with something or do i put exactly what you have quoted?
REL stands for RELATIVE. It is telling the assembler to encode the memory operand as a relative (32-bit) address rather than an absolute (64-bit) address, as I previously explained:
Code: Select all
0000026FE4471C27 D9 05 EB FF FF FF fld dword [rel memory]
You might wonder why it's needed, given that a relative address is the
only permitted encoding for this particular instruction, but that's not true of all instructions. For example if you are loading
eax indirectly you have a choice of using an absolute address or a relative address:
Code: Select all
0000026FE4471C18 A1 18 1C 47 E4 6F 02 mov eax,[memory]
0000026FE4471C1F 00 00
0000026FE4471C21 8B 05 F1 FF FF FF mov eax,[rel memory]
These instructions will have the same effect, but the lengths are different: 9 bytes for the absolute version and 6 bytes for the relative version.
I would say, though, that this isn't an x86-64 assembly language support forum, and I'm not any kind of expert in it, so to spare me (and the rest of the forum members) from getting too overwhelmed with queries not directly related to BBC BASIC I would suggest you seek advice from a site specialising in assembly language.