mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-03-07 17:46:58 +08:00
test: very simple test for MASM displacement syntax
Very trivial test of MASM package. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
parent
8981724f17
commit
fe90f152d1
36
test/masmdisp.asm
Normal file
36
test/masmdisp.asm
Normal file
@ -0,0 +1,36 @@
|
||||
%use masm
|
||||
|
||||
global fproc, nproc
|
||||
|
||||
bits 64
|
||||
|
||||
_TEXT segment
|
||||
|
||||
fproc proc far
|
||||
mov eax,dword ptr foo
|
||||
mov rdx,offset foo
|
||||
mov ecx,bar[rbx]
|
||||
lea rsi,foo
|
||||
lea rsi,dword ptr foo
|
||||
lea rsi,[foo]
|
||||
lea rsi,dword [foo]
|
||||
ret
|
||||
fproc endp
|
||||
|
||||
nproc proc near
|
||||
mov eax,dword ptr foo
|
||||
mov rdx,offset foo
|
||||
mov ecx,bar[rbx]
|
||||
ret
|
||||
nproc endp
|
||||
|
||||
_TEXT ends
|
||||
|
||||
_DATA segment
|
||||
nxx dd 80
|
||||
foo dd 100
|
||||
_DATA ends
|
||||
|
||||
_BSS segment nobits
|
||||
bar resd 100
|
||||
_BSS ends
|
Loading…
Reference in New Issue
Block a user