Startup routines |
Prev: 80CC | Up: Map | Next: D700 |
We jump here from the load routine at 802F. Before the game starts, the 512 bytes of data in the top and bottom rows of the display file must be copied to addresses 5D60-5F5F, the 512 bytes of data in addresses 7E00-7FFF must be copied to 8000-81FF, and the bottom 4 lines of the screen must be prepared.
|
||||
81C8 | LD SP,$5D5A | Put the stack somewhere safe | ||
81CB | LD HL,$4000 | Copy the data in the top row of the display file to addresses 5D60-5E5F | ||
81CE | LD DE,$5D60 | |||
81D1 | CALL $80CC | |||
81D4 | LD HL,$50E0 | Copy the data in the bottom row of the display file to addresses 5E60-5F5F | ||
81D7 | CALL $80CC | |||
81DA | LD HL,$F0E4 | We will eventually jump to F0E4 to enter demo mode; push this address onto the stack | ||
81DD | PUSH HL | |||
81DE | LD HL,$7E00 | Prepare HL, DE and BC to copy 7E00-7FFF into 8000-81FF (overwriting this routine) | ||
81E1 | LD DE,$8000 | |||
81E4 | LD B,$02 | |||
81E6 | EI | Enable interrupts | ||
81E7 | JP $F0A0 | Jump to perform the LDIR |
Prev: 80CC | Up: Map | Next: D700 |