Skip to content

Latest commit

 

History

History
67 lines (44 loc) · 917 Bytes

operands.md

File metadata and controls

67 lines (44 loc) · 917 Bytes

Operands

Registers

Use strings as register names

_('mov', ['rax', 'rbx']);
_('mov', ['eax', 0xBABE]);

Use command method to resolve a register

_('mov', [_('rax'), 0xBABE]);

Import register directly:

import {rax} from 'ass-js/lib/plugins/x86/operand';

_('mov', [rax, 0xBABE]);

Memory

Use register value as memory address

_('mov', [rbx, rax.ref()]);
_('mov', [rbx, _('rax').ref()]);

Use displacement

_('mov', [rax, rax.ref().disp(10)]);
_('mov', [rax, rax.disp(10)]);

Use absolute address value

_('mov', [rax, _('mem', 0xBABE)]);

Immediate

Put a 32-bit signed and unsigned integers into register

_('mov', [rax, 0xBABE]);
_('mov', [rax, -0xBABE]);

Put a 64-bit unsigned integer into register:

_('mov', [rax, [0xC001, 0xBABE]]);