Routines |
Prev: 7F25 | Up: Map | Next: 80A1 |
Used by the routine at 7C00.
|
||||
Prints the first of two menus on screen - this one is for the player to select their controls. The text is stored at 8BC2.
|
||||
8039 | LD A,$00 | Reset menu option to 'none selected' | ||
803B | LD ($8BAA),A | |||
Clear the screen
|
||||
803E | CALL $815B | Clear the screen (pixels) | ||
8041 | LD A,$0F | Set INK 7 (white), PAPER 1 (blue) | ||
8043 | CALL $816A | Set screen colours | ||
Print the menu
|
||||
8046 | LD HL,$4021 | Set menu starting PRINT position at row 1, column 1 | ||
8049 | LD DE,$8BC2 | Store the address of the start of the menu text | ||
804C | LD ($8BC0),DE | |||
8050 | CALL $8179 | Print first line of menu text "PRESS 1-4 TO CHANGE OPTION" | ||
8053 | LD HL,$4043 | Set PRINT position at 2,3 (row/column) | ||
8056 | CALL $8179 | Print next line of menu text "ENTER TO START PROGRAM" | ||
8059 | LD HL,$40A1 | Set PRINT position at 5,1 | ||
805C | CALL $8179 | Print "1 KEMPSTON JOYSTICK (PORT 31)" | ||
805F | LD HL,$40E1 | Set PRINT position at 7,1 | ||
8062 | CALL $8179 | Print "2 AGF JOYSTICK (CURSOR KEYS)" | ||
8065 | LD HL,$4821 | Set PRINT position at 9,1 | ||
8068 | CALL $8179 | Print "3 SINCLAIR JOYSTICK" | ||
806B | LD HL,$4861 | Set PRINT position AT 11,1 | ||
806E | CALL $8179 | Print "4 KEYBOARD SET UP AS FOLLOWS" | ||
8071 | LD HL,$48A3 | Set PRINT position AT 13,3 | ||
8074 | CALL $8179 | Print "UP DOWN LEFT RIGHT FIRE" | ||
The next part prints the key options for the 5 directions (up, down, left, right, fire). Instead of printing one line these are printed in 5 strings.
|
||||
8077 | LD DE,$8C82 | Store the address of the text for the controls | ||
807A | LD ($8BC0),DE | |||
807E | LD HL,$48E1 | Set PRINT position at 15,1 (row/column) | ||
8081 | LD A,$05 | Store count of 5 sets of keys to PRINT (up, down, left, right & fire) | ||
8083 | LD ($8BAC),A | |||
8086 | LD ($8BBB),HL | Store screen print position | ||
8089 | CALL $8179 | PRINT text on screen | ||
808C | LD HL,($8BBB) | Retrieve screen print position | ||
808F | INC HL | Move forward 6 character spaces | ||
8090 | INC HL | |||
8091 | INC HL | |||
8092 | INC HL | |||
8093 | INC HL | |||
8094 | INC HL | |||
8095 | LD ($8BBB),HL | ...and store the updated screen address position | ||
8098 | LD A,($8BAC) | Retrieve, decrement and re-store counter (x 5 sets) | ||
809B | DEC A | |||
809C | LD ($8BAC),A | |||
809F | JR NZ,$8089 | Continue to print until all 5 sets of keys are done |
Prev: 7F25 | Up: Map | Next: 80A1 |