MASM declare loacl variable array and access it like this :
local aa[10]: byte
mov byte ptr aa[0], 16
i want to know how to do it by nasm ?
it seems like need to use %local .
the example in nasm nasm_man:
silly_swap:
%push mycontext ; save the current context
%stacksize small ; tell NASM to use bp
%assign %$localsize 0 ; see text for explanation
%local old_ax:word, old_dx:word
enter %$localsize,0 ; see text for explanation
mov [old_ax],ax ; swap ax & bx
mov [old_dx],dx ; and swap dx & cx
mov ax,bx
mov dx,cx
mov bx,[old_ax]
mov cx,[old_dx]
leave ; restore old bp
ret ;
%pop ; restore original context
i want to know how to declare local variable array ?