mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
ENDL restores the label scope from before LOAD (#1180)
This commit is contained in:
25
test/asm/endl-local-scope.asm
Normal file
25
test/asm/endl-local-scope.asm
Normal file
@@ -0,0 +1,25 @@
|
||||
SECTION "DMA ROM", ROM0[0]
|
||||
SetUpDMA::
|
||||
ld c, LOW(DMARoutine)
|
||||
ld b, DMARoutineCode.end - DMARoutineCode
|
||||
ld hl, DMARoutineCode
|
||||
.loop
|
||||
ld a, [hl+]
|
||||
ldh [c], a
|
||||
inc c
|
||||
dec b
|
||||
jr nz, .loop
|
||||
ret
|
||||
|
||||
DMARoutineCode::
|
||||
LOAD "DMA RAM", HRAM[$FF80]
|
||||
DMARoutine::
|
||||
ld a, $C0
|
||||
ldh [rDMA], a
|
||||
ld a, $28
|
||||
.loop
|
||||
dec a
|
||||
jr nz, .loop
|
||||
ret
|
||||
ENDL
|
||||
.end ; This label should be in the DMARoutineCode scope after ENDL
|
||||
Reference in New Issue
Block a user