Prev: FA00 Up: Map Next: FC0C
FC00: The loader's copy routine
Used by the routine at loader_entry.
Put here by the PIC block (its first LDIR copies 16 bytes into place) and called by the loader's entry at loader_entry once the game block has loaded, 512 bytes higher than it runs: it moves the block down 512 bytes to game_entry. The entry then decodes it with RRD and jumps to game_entry. Overwritten at the start by the shift tables (build_shift_tables), so it ran only during loading.
loader_copy FC00 LD HL,$5E80 From where the block loaded
FC03 LD DE,game_entry To where it runs (game_entry)
FC06 LD BC,$9D80 The whole block, all of it moved
FC09 LDIR
FC0B RET Back to the loader
Prev: FA00 Up: Map Next: FC0C