aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2019-08-14 15:46:01 -0700
committerH. Peter Anvin (Intel) <hpa@zytor.com>2019-08-14 15:46:01 -0700
commitfe90f152d10e75ffd9d7449e942ee054b5a7bb76 (patch)
treea069d1bb55ee5d23db1f5dc8f4d20e3fc6a62703
parent8981724f176ad18aaeac570faa5a26cc28bfef08 (diff)
downloadnasm-fe90f152d10e75ffd9d7449e942ee054b5a7bb76.tar.gz
nasm-fe90f152d10e75ffd9d7449e942ee054b5a7bb76.tar.xz
nasm-fe90f152d10e75ffd9d7449e942ee054b5a7bb76.zip
test: very simple test for MASM displacement syntax
Very trivial test of MASM package. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
-rw-r--r--test/masmdisp.asm36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/masmdisp.asm b/test/masmdisp.asm
new file mode 100644
index 00000000..295d88d7
--- /dev/null
+++ b/test/masmdisp.asm
@@ -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