Routines |
Prev: F32B | Up: Map | Next: F350 |
This wipes the area of the screen where the game window is plotted.
Used by the routine at choose_keys.
|
||||
wipe_game_window | F335 | DI | Disable interrupts | |
This uses the optimisation trick of popping addresses from the stack.
|
||||
F336 | LD ($EDD1),SP | Save the stack pointer | ||
F33A | LD SP,$EDD3 | Point the stack pointer at game_window_start_addresses | ||
F33D | LD A,$80 | Set A for 128 iterations (128 rows) | ||
Start loop
|
||||
wipe_game_window_0 | F33F | POP HL | Pull a start address from the stack | |
F340 | LD B,$17 | Set B for 23 iterations (23 bytes) | ||
Start loop
|
||||
wipe_game_window_1 | F342 | LD (HL),$00 | Write an empty byte | |
F344 | INC L | Advance (note cheap increment) | ||
F345 | DJNZ wipe_game_window_1 | ...loop | ||
F347 | DEC A | ...loop | ||
F348 | JP NZ,wipe_game_window_0 | |||
F34B | LD SP,($EDD1) | Restore the stack pointer | ||
F34F | RET | Return |
Prev: F32B | Up: Map | Next: F350 |