Prev: 84ED Up: Map Next: 853C
8501: Interrupt routine
Calls sound player and handles screen saver Used by the routine at L8021.
interrupt_routine 8501 PUSH IX
8503 PUSH IY
8505 PUSH HL
8506 PUSH DE
8507 PUSH BC
8508 PUSH AF
8509 LD HL,(screensaver_countdown) Counter
850C LD A,H Check if zero
850D OR L ...
850E JR Z,interrupt_routine_1 If counter is 0 then skip ahead
8510 DEC HL Otherwise decrement
8511 LD (screensaver_countdown),HL and save.
8514 LD A,H Check again if zero
8515 OR L ...
8516 JR NZ,interrupt_routine_1 If not then skip ahead, otherwise blank screen
8518 LD BC,$0180 Display off, interrupt off
851B RST $18 WRITE_REGISTER
851C LD BC,$0701 Black border
851F RST $18 WRITE_REGISTER
interrupt_routine_0 8520 JR interrupt_routine_0 Loop
interrupt_routine_1 8522 CALL sound_player Sound player
8525 LD A,(status_flags) Check bit for main loop
8528 BIT 6,A If not set the read VDP status
852A CALL Z,$1FDC READ_REGISTER
852D LD HL,interrupt_flag Set interrupt flag
8530 SET 0,(HL) ...
8532 POP AF
8533 POP BC
8534 POP DE
8535 POP HL
8536 POP IY
8538 POP IX
853A RETN
Prev: 84ED Up: Map Next: 853C