pokecrystal-board/engine/menus/empty_sram.asm
2024-01-04 21:55:57 +01:00

16 lines
191 B
NASM

EmptyAllSRAMBanks:
for x, NUM_SRAM_BANKS
ld a, x
call .EmptyBank
endr
ret
.EmptyBank:
call OpenSRAM
ld hl, STARTOF(SRAM)
ld bc, SIZEOF(SRAM)
xor a
call ByteFill
call CloseSRAM
ret