| Routines

33792: The game has just loaded

After the game has loaded, this is where it all starts.
33792 | DI | Disable interrupts
33793 | LD HL,23551 | Place the address of the routine at 34463 on the stack
33796 | LD (HL),134
33798 | DEC HL
33799 | LD (HL),159
33801 | LD SP,23550
33804 | SUB A | Set HL=34048 in a roundabout way
33805 | LD L,A
33806 | XOR 10
33808 | LD B,A
33809 | INC B
33810 | LD H,B
33811 | RRC H
33813 | LD C,(HL) | Read through addresses 34048-65535, without changing their contents; perhaps this code was once used to descramble the contents of pages 133-255, but now all it does is introduce a pause of about 0.47s before displaying the code entry screen
33814 | LD A,L
33815 | XOR C
33816 | XOR H
33817 | LD (HL),C
33818 | INC HL
33819 | BIT 7,H
33821 | JR NZ,33813
33823 | RET | Make an indirect jump to 34463