summaryrefslogtreecommitdiff
path: root/test/while.asm
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2019-10-08 03:26:39 -0700
committerH. Peter Anvin <hpa@zytor.com>2019-10-08 03:26:39 -0700
commitc5717a8204b5fcd383cf9e0a237c4727feccb5bd (patch)
treed75e21bfc3c187da4e1e7b1c63cbb4a7c74c235a /test/while.asm
parent1f82dffba7c35056b500051999076fdd1ee53ab0 (diff)
downloadnasm-c5717a8204b5fcd383cf9e0a237c4727feccb5bd.tar.gz
preproc: %while ... %endwhile looploops
First user of the new loop infrastructure: a %while[n][cond] loop; supports anything that the %if/%elif directives support, too. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'test/while.asm')
-rw-r--r--test/while.asm5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/while.asm b/test/while.asm
new file mode 100644
index 00000000..9b835066
--- /dev/null
+++ b/test/while.asm
@@ -0,0 +1,5 @@
+%assign i 1
+%while i
+ dq i
+ %assign i i << 1
+%endwhile