Use HIGH() and LOW()

This commit is contained in:
Rangi 2020-07-07 11:10:29 -04:00
parent bbc257476f
commit 45ed05decf
22 changed files with 89 additions and 87 deletions

View file

@ -1,7 +1,7 @@
WriteDMACodeToHRAM::
; Since no other memory is available during OAM DMA,
; DMARoutine is copied to HRAM and executed there.
ld c, hDMARoutine % $100
ld c, LOW(hDMARoutine)
ld b, DMARoutineEnd - DMARoutine
ld hl, DMARoutine
.copy
@ -14,7 +14,7 @@ WriteDMACodeToHRAM::
DMARoutine:
; initiate DMA
ld a, wOAMBuffer / $100
ld a, HIGH(wOAMBuffer)
ldh [rDMA], a
; wait for DMA to finish