I'm trying to move the value in rax to the label I created. Essentially I'm trying to figure out what I should add to mov label, rax
to make it work. Currently my label is declared as a quadword, but that can change. So far I've tried:
mov [label], rax
- This compiles, but when I go to link it gives me a "Relocation truncated to fit error"
movq [label], rax
- this will not compile
movq label, rax
- this will also not compile
mov [label], [rax]
- will not compile.
The ones that won't compile give me "invalid combination of opcode and operands". What am I supposed to do?
EDIT: fuz answered it in the comments. 'mov [rel label], rax' works. Thank you!