Prev: 9076 Up: Map Next: 90EB
90D2: "You are dead" controller.
YouAreDead 90D2 SUB A
90D3 LD ($B6EA),A
90D6 LD HL,$AFF1 HL="You are dead".
90D9 CALL PrintMsg Call PrintMsg.
90DC CALL GameOver_Start Call GameOver_Start.
This is almost a carbon copy of WaitForKey only differing in that it ends with a jump to ReStart and doesn't set a border colour.
YouAreDead_WaitForKey 90DF XOR A Read from the keyboard port.
90E0 IN A,($FE)
90E2 AND %00011111 A pressed key from any line will set its respective bit; bit 0 (outer key) to bit 4 (inner key). Hence keep only bits 0-4 for the check.
90E4 CP $1F Loop back to YouAreDead_WaitForKey until any key has been pressed.
90E6 JR Z,YouAreDead_WaitForKey
90E8 JP ReStart Jump to ReStart.
Prev: 9076 Up: Map Next: 90EB