Moves a full 64 bit immediate into a register. mov takes immediates up to 32 bits and sign extends them, which silently turns a large address into the wrong number, so NASM accepts movabs as the spelling that means "the whole 64 bits are here". It assembles to a 10 byte instruction, against 5 to 7 for the mov forms.
movabs
8086 and latermovabs
movabs al, moffs | movabs ax, moffs | movabs eax, moffs | movabs rax, moffs | movabs moffs, al | movabs moffs, ax | movabs moffs, eax | movabs moffs, rax | movabs reg8, imm8 | movabs reg16, imm16 | movabs reg32, imm32 | movabs reg64, imm64Loading...
Forms
Every form of movabs the assembler accepts, from NASM's own instruction table.
The second column is the processor that introduced the form; a badge marks a form that needs
an extension, that is lockable, or that long mode dropped.
| Form | Since | Notes |
|---|---|---|
| movabs al, moffs | 8086 | |
| movabs ax, moffs | 8086 | |
| movabs eax, moffs | 386 | |
| movabs rax, moffs | x86-64 | long |
| movabs moffs, al | 8086 | |
| movabs moffs, ax | 8086 | |
| movabs moffs, eax | 386 | |
| movabs moffs, rax | x86-64 | long |
| movabs reg8, imm8 | 8086 | |
| movabs reg16, imm16 | 8086 | |
| movabs reg32, imm32 | 386 | |
| movabs reg64, imm64 | x86-64 | long |