enterw
Create 16-bit stack frame
Creates a frame with 16-bit frame pointers and reserves local storage.
186 and later
CFPFAFZFSFDFOF –––––––
- Changes no flag
Forms
enterw ,enterw
Operands
imm16- A 16-bit immediate,
-32768to65535. imm8- An 8-bit immediate,
-128to255. Instructions that sign-extend it to a wider operand interpret the byte as-128to127; shift counts do not use this sign extension.
The second operand supplies a nesting level modulo 32; omitting it selects zero. Saved frame-pointer slots are two bytes. In 64-bit mode the stack is still addressed through rsp; this is not the normal rbp frame used by 64-bit functions.
global _start
section .text
_start:
mov rax, 12
mov rbx, 5
mov rcx, 3
mov rsi, 9
enterw 5, 5
mov rax, 60 ; syscall 60: exit
xor rdi, rdi
syscall