Up: Map
37632: Initialise interrupt code then display and handle input device selection menu
Input
IY 23610
37632 LD SP,23808 Set stack pointer to 23808
37635 XOR A Load A with zero
37636 LD (23364),A Store zero at 23364 (see trivia)
37639 LD (IY+65),A Reset all interrupt routine flags
37642 LD (IY+87),3 Set P FLAG system variable bits 0 and 1 (OVER 1)
37646 LD (IY+48),8 Set CAPS-LOCK flag (i.e. set CAPS LOCK to ON)
37650 LD A,24 Put JR instruction at 65535 for jumping to interrupt routine
37652 LD (65535),A
37655 LD A,195 Load first byte of interrupt routine with 195 representing JP
37657 LD (65524),A
37660 LD HL,62178 Load following two bytes of interrupt routine with 62178 to make JP 62178
37663 LD (65525),HL
37666 LD A,59 Load A with 59
37668 DI Disable interrupts
37669 LD I,A Load I register with 59 (for interrupt routine)
37671 EI Enable interrupts
37672 HALT Wait for interrupt
37673 XOR A Reset all interrupt routine flags
37674 LD (IY+65),A
37677 IM 2 Set interrupt mode 2
37679 LD A,1 Set player-attribute-update flag (player attribute update mode)
37681 LD (23706),A
37684 CALL 38003 Set border to black and clear temporary storage area of memory
37687 JR 37702 Display and handle input device selection menu
Up: Map