2 years ago

#12238

test-img

SRobertJames

Force NASM to use quadwords

In gas, I can do movabs rcx, 0x402041, which assembles to 48b941204000. NASM doesn't support movabs. I've tried doing mov rcx, 0x402041, and mov rcx, QWORD 0x402041, but, in either case, NASM assembles it to b941204000 which disassembles to mov ecx, 0x402041.

Even though the result is the same, for my application, I need the assembler to do the full movabs equivalent, with identical bytes. How can I tell NASM to do this?

assembly

x86-64

nasm

instructions

instruction-encoding

0 Answers

Your Answer

Accepted video resources