nasm/test/local.asm
H. Peter Anvin 8781cb0d00 BR 1828103: Fix %arg and %local
Correct the implementation of %arg and %local.

It's questionable how much they make sense for 64-bit mode; even in
32-bit mode one normally make references off the stack pointer instead
of the base pointer (frame pointer), but that requires keeping track
of the stack pointer offset.
2007-11-08 20:01:11 -08:00

19 lines
267 B
NASM

bits 32
%push bluttan
%define %$localsize 0
%stacksize flat
%local l1:qword, l2:dword, l3:dword, l4:qword
%arg a1:qword, a2:dword, a3:dword, a4:qword
mov eax,[a1]
mov ebx,[a2]
mov ecx,[a3]
mov edx,[a4]
mov [l1],eax
mov [l2],ebx
mov [l3],ecx
mov [l4],edx