Prev: 5CCB Up: Map Next: 5CFC
5CD0: Load Stage Two
Stage-1 loader kept inside the line-1 REM. It reads a 17-byte custom header into Stage2Header, pulls the stage-2 length and address from that header, loads 0258 bytes to MicromegaLoader, then jumps there.
Load the 17-byte stage-2 header.
Load_Stage_Two 5CD0 LD IX,$5D96 Point IX at Stage2Header.
5CD4 LD DE,$0011 Set the block length in DE to 0011.
5CD7 XOR A Clear A and set the carry flag (load a header block).
5CD8 SCF
5CD9 CALL Load_Tape_Block Call Load_Tape_Block.
5CDC JP NC,Load_Tape_Block_PrintError Jump to Load_Tape_Block_PrintError if the carry flag is reset.
Refuse to continue unless *SUBPPC is 06.
5CDF LD A,($5C47) Jump to START if *SUBPPC is not 06.
5CE2 CP $06
5CE4 JP NZ,$0000
Load the stage-2 Micromega block named by that header.
5CE7 LD DE,($5D96) Fetch the stage-2 length from *Stage2Header into DE.
5CEB LD IX,($5D98) Fetch the stage-2 destination from *Stage_Two_Destination into IX.
5CEF LD A,$FF Set A to FF and set the carry flag (load a data block).
5CF1 SCF
5CF2 CALL Load_Tape_Block Call Load_Tape_Block.
5CF5 JP NC,Load_Tape_Block_PrintError Jump to Load_Tape_Block_PrintError if the carry flag is reset.
5CF8 EI Enable interrupts.
5CF9 JP MicromegaLoader Jump to MicromegaLoader.
Prev: 5CCB Up: Map Next: 5CFC