[nasm:nasm-2.15.xx] ppindirect.asm: make it possible to assemble to a binary

nasm-bot for H. Peter Anvin (Intel) hpa at zytor.com
Fri Jul 10 17:27:06 PDT 2020


Commit-ID:  bb3156533b9baf836b746c638111fca82c65f98a
Gitweb:     http://repo.or.cz/w/nasm.git?a=commitdiff;h=bb3156533b9baf836b746c638111fca82c65f98a
Author:     H. Peter Anvin (Intel) <hpa at zytor.com>
AuthorDate: Fri, 10 Jul 2020 17:24:43 -0700
Committer:  H. Peter Anvin (Intel) <hpa at zytor.com>
CommitDate: Fri, 10 Jul 2020 17:24:43 -0700

ppindirect.asm: make it possible to assemble to a binary

Add a couple of dd/db directives to ppindirect.asm to make it possible
to actually run it through the assembler.

Signed-off-by: H. Peter Anvin (Intel) <hpa at zytor.com>


---
 test/ppindirect.asm | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/test/ppindirect.asm b/test/ppindirect.asm
index 0a30d075..2785378a 100644
--- a/test/ppindirect.asm
+++ b/test/ppindirect.asm
@@ -2,6 +2,8 @@
 
 ; Fun tests of the preprocessor indirection mode...
 
+	bits 64
+	
 %assign foo1		11
 %assign foo11		1111
 %assign foo2		22
@@ -9,34 +11,34 @@
 %assign foo3		33
 %assign foo33		3333
 %assign n		2
-foo%[foo%[n]]*100
-foo%[n]*100
+	dd	foo%[foo%[n]]*100
+	dd	foo%[n]*100
 %assign foo%[foo%[n]]	foo%[foo%[n]]*100
 ;%assign foo%[n]		foo%[n]*100
 
-	foo1
-	foo2
-	foo3
-	foo11
-	foo22
-	foo33
+	dd	foo1
+	dd	foo2
+	dd	foo3
+	dd	foo11
+	dd	foo22
+	dd	foo33
 
 %define foo33bar	999999
-	%[foo%[foo3]bar]
+	dd	%[foo%[foo3]bar]
 	
 %assign bctr 0
 %macro bluttan 0
 %assign bctr bctr+1
 %assign bluttan%[bctr]	bctr
 %defstr bstr bluttan%[bctr]
-	bluttan%[bctr]
-	bstr
+	db bluttan%[bctr]
+	db bstr
 %endmacro
 
 %rep 20
 	bluttan
 %endrep
 %rep 20
-	bluttan%[bctr]
+	db bluttan%[bctr]
 %assign bctr bctr-1
 %endrep


More information about the Nasm-commits mailing list