Prev: 36982 Up: Map Next: 37099
37074: "You are dead" controller.
YouAreDead 37074 SUB A
37075 LD (46826),A
37078 LD HL,45041 HL="You are dead".
37081 CALL PrintMsg Call PrintMsg.
37084 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 37087 XOR A Read from the keyboard port.
37088 IN A,(254)
37090 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.
37092 CP 31 Loop back to YouAreDead_WaitForKey until any key has been pressed.
37094 JR Z,YouAreDead_WaitForKey
37096 JP ReStart Jump to ReStart.
Prev: 36982 Up: Map Next: 37099