![]() |
Routines |
Prev: 6B4F | Up: Map | Next: 6C0D |
|
|||||||||||||||||||||
Print_InstructionsMenu | 6B99 | CALL ClearScreen | Call ClearScreen. | ||||||||||||||||||
6B9C | LD A,($66F6) | Jump to Input_SelectLevel if *ControlMethod is a joystick method. | |||||||||||||||||||
6B9F | OR A | ||||||||||||||||||||
6BA0 | JR NZ,Input_SelectLevel | ||||||||||||||||||||
The player has selected to use the keyboard, so remind them what the keys are.
Print "Instructions".
|
|||||||||||||||||||||
6BA2 | LD HL,$6476 | Call Configurable_PrintString using Messaging_Instructions; printing 0C characters in YELLOW. | |||||||||||||||||||
6BA5 | LD DE,$40A9 | ||||||||||||||||||||
6BA8 | LD BC,$0C06 | ||||||||||||||||||||
6BAB | CALL Configurable_PrintString | ||||||||||||||||||||
Print "Left".
|
|||||||||||||||||||||
6BAE | LD DE,$4807 | Call Configurable_PrintString using Messaging_Left; printing 14 characters in INK:MAGENTA, PAPER:BLACK(BRIGHT). | |||||||||||||||||||
6BB1 | LD BC,$1443 | ||||||||||||||||||||
6BB4 | CALL Configurable_PrintString | ||||||||||||||||||||
Print "Right".
|
|||||||||||||||||||||
6BB7 | LD E,$47 | Call Configurable_PrintString using Messaging_Right; printing 0B characters. | |||||||||||||||||||
6BB9 | LD B,$0B | ||||||||||||||||||||
6BBB | CALL Configurable_PrintString | ||||||||||||||||||||
Print "Fire".
|
|||||||||||||||||||||
6BBE | LD E,$87 | Call Configurable_PrintString using Messaging_Fire; printing 0F characters. | |||||||||||||||||||
6BC0 | LD B,$0F | ||||||||||||||||||||
6BC2 | CALL Configurable_PrintString | ||||||||||||||||||||
Print "Barrier".
|
|||||||||||||||||||||
6BC5 | LD E,$C7 | Call Configurable_PrintString using Messaging_Barrier; printing 0F characters. | |||||||||||||||||||
6BC7 | LD B,$0F | ||||||||||||||||||||
6BC9 | CALL Configurable_PrintString | ||||||||||||||||||||
Print "Select Level".
|
|||||||||||||||||||||
Input_SelectLevel | 6BCC | LD HL,$64BF | Call Configurable_PrintString using Messaging_Level; printing 12 characters in WHITE. | ||||||||||||||||||
6BCF | LD DE,$5087 | ||||||||||||||||||||
6BD2 | LD BC,$1207 | ||||||||||||||||||||
6BD5 | CALL Configurable_PrintString | ||||||||||||||||||||
Read keyboard input to select level 1-5.
|
|||||||||||||||||||||
Input_SelectLevel_Loop | 6BD8 | DI | Disable interrupts. | ||||||||||||||||||
6BD9 | LD A,$F7 | Read from the keyboard;
|
|||||||||||||||||||
6BDB | IN A,($FE) | ||||||||||||||||||||
6BDD | XOR %11111111 | Flip the bits. | |||||||||||||||||||
6BDF | AND %00011111 | Keep only bits 0-4 (the key states). | |||||||||||||||||||
6BE1 | JR Z,Input_SelectLevel_Loop | Jump to Input_SelectLevel_Loop if no keys were pressed. | |||||||||||||||||||
6BE3 | LD C,$31 | Start a count in C starting at 31 (ASCII "1"). | |||||||||||||||||||
6BE5 | BIT 0,A | Jump to Input_SelectLevel_Store if bit 0 of A was set (key "1" pressed). | |||||||||||||||||||
6BE7 | JR NZ,Input_SelectLevel_Store | ||||||||||||||||||||
6BE9 | INC C | Increment C by one (ASCII "2"). | |||||||||||||||||||
6BEA | BIT 1,A | Jump to Input_SelectLevel_Store if bit 1 of A was set (key "2" pressed). | |||||||||||||||||||
6BEC | JR NZ,Input_SelectLevel_Store | ||||||||||||||||||||
6BEE | INC C | Increment C by one (ASCII "3"). | |||||||||||||||||||
6BEF | BIT 2,A | Jump to Input_SelectLevel_Store if bit 2 of A was set (key "3" pressed). | |||||||||||||||||||
6BF1 | JR NZ,Input_SelectLevel_Store | ||||||||||||||||||||
6BF3 | INC C | Increment C by one (ASCII "4"). | |||||||||||||||||||
6BF4 | BIT 3,A | Jump to Input_SelectLevel_Store if bit 3 of A was set (key "4" pressed). | |||||||||||||||||||
6BF6 | JR NZ,Input_SelectLevel_Store | ||||||||||||||||||||
6BF8 | INC C | Increment C by one (ASCII "5"). | |||||||||||||||||||
6BF9 | BIT 4,A | Jump to Input_SelectLevel_Loop if bit 4 of A was set (key "5" pressed). | |||||||||||||||||||
6BFB | JR Z,Input_SelectLevel_Loop | ||||||||||||||||||||
Input_SelectLevel_Store | 6BFD | LD HL,$6527 | Write C to *Messaging_Header_LevelNumber. | ||||||||||||||||||
6C00 | LD (HL),C | ||||||||||||||||||||
6C01 | LD A,C | Convert the ASCII digit to a numeric value by, subtracting 30 multiply by 02 and subtracting the result from 0A e.g.
|
|||||||||||||||||||
6C02 | SUB $30 | ||||||||||||||||||||
6C04 | ADD A,A | ||||||||||||||||||||
6C05 | LD C,A | ||||||||||||||||||||
6C06 | LD A,$0A | ||||||||||||||||||||
6C08 | SUB C | ||||||||||||||||||||
6C09 | LD ($6898),A | ||||||||||||||||||||
6C0C | RET | Return. |
Prev: 6B4F | Up: Map | Next: 6C0D |