mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-28 22:07:49 +00:00
18
test/asm/anon-label-bad.asm
Normal file
18
test/asm/anon-label-bad.asm
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
: ; Outside of section
|
||||
|
||||
SECTION "Anonymous label errors test", ROM0
|
||||
|
||||
db :-- ; Reference goes too far back
|
||||
|
||||
; Uncomment this if you're a badass with a *lot* of RAM
|
||||
; REPT 2147483647
|
||||
; :
|
||||
; ENDR
|
||||
; REPT 2147483647
|
||||
; :
|
||||
; ENDR
|
||||
; db :+ ; OK
|
||||
; db :++ ; Reference goes too far
|
||||
|
||||
:: ; Syntax error, can't export this
|
||||
7
test/asm/anon-label-bad.err
Normal file
7
test/asm/anon-label-bad.err
Normal file
@@ -0,0 +1,7 @@
|
||||
ERROR: anon-label-bad.asm(2):
|
||||
Label "!0" created outside of a SECTION
|
||||
ERROR: anon-label-bad.asm(6):
|
||||
Reference to anonymous label 2 before, when only 1 has been created so far
|
||||
ERROR: anon-label-bad.asm(18):
|
||||
syntax error
|
||||
error: Assembly aborted (3 errors)!
|
||||
0
test/asm/anon-label-bad.out
Normal file
0
test/asm/anon-label-bad.out
Normal file
12
test/asm/anon-label.asm
Normal file
12
test/asm/anon-label.asm
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
SECTION "Anonymous label test", ROM0[0]
|
||||
|
||||
ld hl, :++
|
||||
: ld a, [hli]
|
||||
ldh [c], a
|
||||
dec c
|
||||
jr nz, :-
|
||||
ret
|
||||
|
||||
:
|
||||
dw $7FFF, $1061, $03E0, $58A5
|
||||
0
test/asm/anon-label.err
Normal file
0
test/asm/anon-label.err
Normal file
0
test/asm/anon-label.out
Normal file
0
test/asm/anon-label.out
Normal file
BIN
test/asm/anon-label.out.bin
Normal file
BIN
test/asm/anon-label.out.bin
Normal file
Binary file not shown.
Reference in New Issue
Block a user