Porting jonesforth to 64 bit macos catalina, I have this x86 instruction
mov $cold_start,%esi // Initialise interpreter.
I want to translate. I'd like to use
mov $cold_start,%rsi // Initialise interpreter.
but of course, I get an error
jonesforth.S:1404:2: error: 32-bit absolute addressing is not supported in 64-bit mode
(this is using the apple assembler, comes with xcode).
My first attempt was
mov $cold_start(%rip),%rsi // Initialise interpreter.
but the assembler also does not recognize it either
jonesforth.S:572:17: error: unexpected token in argument list
In sheer desparation, I tried
mov cold_start(%rip),%rsi // Initialise interpreter.
which assembles but of course derefences the address.
So my question is
1) how to load an absolute address in x64 with the apple assembler (all addresses are a <10kiB apart). Any pointers to x64 programming on the Mac would be great. I have had small pickings looking around.
2) if it's impossible, how to run the gnu assembler on x64 on Catalina? I have not been able to invoke it, either.
Please don't recommend to switch to running in a docker image - yes I can do that but I want to use the out of the box MacBook software.