Prev: 5E00 Up: Map Next: 5E4E
5E12: Clear memory and set up data to load the second block
Used by the routine at 5E77.
5E12 LD HL,$5FB4 Clear memory from 5FB4 - E86B
5E15 LD DE,$5FB5
5E18 LD BC,$88B8
5E1B LDIR
5E1D POP HL Get the next value off the stack - EA61
5E1E LD D,H Put it in DE and add 1
5E1F LD E,L
5E20 INC E
5E21 POP BC Get length to clear off the stack - 159F
5E22 LDIR Clear memory
5E24 LD B,$1E Get length to decrypt
5E26 POP HL Get start of memory to decrypt off the stack - 5E2E
5E27 LD A,(HL) Get next byte
5E28 XOR $A3 Flip some bits
5E2A LD (HL),A Store it
5E2B INC HL Point to next byte
5E2C DJNZ $5E27 Loop round if more to do
5E2E POP HL Get next value off the stack - 9C40
5E2F LD ($5E02),HL Change the start address of the loader at 5E00 to this
5E32 POP HL Get next value off the stack - 0190
5E33 LD ($5E05),HL Change the length of the loader at 5E00 to this
5E36 SCF Set carry flag to mark a load
5E37 LD A,$07 Set the flag byte
5E39 CALL $5E00 Load the block
5E3C JP NC,$0001 Reset the machine if loading failed
5E3F LD HL,$9C40 Point to start of the block
5E42 LD B,$FF Decrypt first part
5E44 CALL $5E77
5E47 LD B,$FF Decrypt second part
5E49 CALL $5E77
5E4C DI Disable interrupts
5E4D RET Return to the next value on the stack - 9C40
Prev: 5E00 Up: Map Next: 5E4E