mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
22
test/asm/break.asm
Normal file
22
test/asm/break.asm
Normal file
@@ -0,0 +1,22 @@
|
||||
FOR V, 1, 100
|
||||
PRINTLN "- {d:V}"
|
||||
IF V == 5
|
||||
PRINTLN "stop"
|
||||
BREAK
|
||||
ENDC
|
||||
PRINTLN "cont"
|
||||
ENDR
|
||||
WARN "done {d:V}"
|
||||
rept 1
|
||||
break
|
||||
; skips invalid code
|
||||
!@#$%
|
||||
elif: macro
|
||||
invalid
|
||||
endr
|
||||
warn "OK"
|
||||
rept 1
|
||||
if 1
|
||||
break
|
||||
no endc
|
||||
endr
|
||||
5
test/asm/break.err
Normal file
5
test/asm/break.err
Normal file
@@ -0,0 +1,5 @@
|
||||
warning: break.asm(9): [-Wuser]
|
||||
done 5
|
||||
warning: break.asm(17): [-Wuser]
|
||||
OK
|
||||
error: Unterminated IF construct (1 levels)!
|
||||
10
test/asm/break.out
Normal file
10
test/asm/break.out
Normal file
@@ -0,0 +1,10 @@
|
||||
- 1
|
||||
cont
|
||||
- 2
|
||||
cont
|
||||
- 3
|
||||
cont
|
||||
- 4
|
||||
cont
|
||||
- 5
|
||||
stop
|
||||
@@ -1,6 +1,6 @@
|
||||
ERROR: for.asm(16):
|
||||
FOR cannot have a step value of 0
|
||||
ERROR: for.asm(41) -> for.asm::REPT~5(47):
|
||||
ERROR: for.asm(41) -> for.asm::REPT~4(47):
|
||||
'v' already defined as constant at for.asm(41) -> for.asm::REPT~4(45)
|
||||
FATAL: for.asm(41) -> for.asm::REPT~5(47):
|
||||
FATAL: for.asm(41) -> for.asm::REPT~4(47):
|
||||
Failed to update FOR symbol value
|
||||
|
||||
17
test/asm/nested-break.asm
Normal file
17
test/asm/nested-break.asm
Normal file
@@ -0,0 +1,17 @@
|
||||
n=1
|
||||
rept 10
|
||||
print "A"
|
||||
for x, 10
|
||||
print "a"
|
||||
if x==n
|
||||
break
|
||||
endc
|
||||
print "z"
|
||||
endr
|
||||
if n==6
|
||||
break
|
||||
endc
|
||||
println "Z"
|
||||
n=n+1
|
||||
endr
|
||||
println "\nn={d:n} x={d:x}"
|
||||
0
test/asm/nested-break.err
Normal file
0
test/asm/nested-break.err
Normal file
7
test/asm/nested-break.out
Normal file
7
test/asm/nested-break.out
Normal file
@@ -0,0 +1,7 @@
|
||||
AazaZ
|
||||
AazazaZ
|
||||
AazazazaZ
|
||||
AazazazazaZ
|
||||
AazazazazazaZ
|
||||
Aazazazazazaza
|
||||
n=6 x=6
|
||||
Reference in New Issue
Block a user