summaryrefslogtreecommitdiff
path: root/test/ppindirect.asm
diff options
context:
space:
mode:
authorJinkun Jang <jinkun.jang@samsung.com>2013-03-12 15:14:36 +0900
committerJinkun Jang <jinkun.jang@samsung.com>2013-03-12 15:14:36 +0900
commit993d65531741fccf26fc10fc5789a5c9fca8c5ae (patch)
tree996be9095a97ff2aac0d98963b6044d47a0ec60c /test/ppindirect.asm
parent65c26d26fb72cec0d43d199c72ed27513d17f4c9 (diff)
downloadnasm-tizen_2.1.tar.gz
nasm-tizen_2.1.tar.bz2
nasm-tizen_2.1.zip
Diffstat (limited to 'test/ppindirect.asm')
-rw-r--r--test/ppindirect.asm42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/ppindirect.asm b/test/ppindirect.asm
new file mode 100644
index 0000000..0a30d07
--- /dev/null
+++ b/test/ppindirect.asm
@@ -0,0 +1,42 @@
+;Testname=test; Arguments=-E -o ppindirect.out; Files=ppindirect.out
+
+; Fun tests of the preprocessor indirection mode...
+
+%assign foo1 11
+%assign foo11 1111
+%assign foo2 22
+%assign foo22 2222
+%assign foo3 33
+%assign foo33 3333
+%assign n 2
+foo%[foo%[n]]*100
+foo%[n]*100
+%assign foo%[foo%[n]] foo%[foo%[n]]*100
+;%assign foo%[n] foo%[n]*100
+
+ foo1
+ foo2
+ foo3
+ foo11
+ foo22
+ foo33
+
+%define foo33bar 999999
+ %[foo%[foo3]bar]
+
+%assign bctr 0
+%macro bluttan 0
+%assign bctr bctr+1
+%assign bluttan%[bctr] bctr
+%defstr bstr bluttan%[bctr]
+ bluttan%[bctr]
+ bstr
+%endmacro
+
+%rep 20
+ bluttan
+%endrep
+%rep 20
+ bluttan%[bctr]
+%assign bctr bctr-1
+%endrep