Prev: 46710 Up: Map Next: 46946
46830: Display and handle main menu
Used by the routine at 34438.
46830 LD A,1 Load A with 1 (blue)
46832 LD (34217),A Store at 34217 and...
46835 OUT (254),A ...set border to this value (blue)
46837 LD A,9 Fill top 22 rows of attribute file with blue INK, blue PAPER...
46839 CALL 53649 ...
46842 CALL 47140 Print "THROUGH the TRAPDOOR" string
46845 CALL 47628 Print SCORE / TOTAL / HI-SC string in current character's colours
46848 LD IX,46690 Point IX at table of attribute file addresses for main menu strings
46852 LD IY,46710 Point IY at start of table of main menu strings
46856 LD A,112 Load A with 112 (black INK, yellow PAPER, BRIGHT)
46858 LD (34269),A Store at 34269
46861 LD B,10 Load B with 10 as there are 10 strings to print (loop counter)
46863 PUSH BC Store BC (B = remaining number of strings to print)
46864 LD L,(IX+0) Load attribute file address at which to print text into HL...
46867 LD H,(IX+1) ...
46870 LD B,12 Load B with 12 as there are 12 characters to print (loop counter)
46872 PUSH BC Store BC (B = number of remaining characters to print)
46873 LD E,(IY+0) Load E with text character to print
46876 CALL 47682 Print double-height text character in E
46879 INC IY Advance IY to next character in text to print
46881 INC HL Advance to next attribute file location
46882 POP BC Restore BC (B = number of remaining characters to print)
46883 DJNZ 46872 Loop back for next character
46885 INC IX Advance IX to next entry in list of attribute file addresses to print to...
46887 INC IX ...
46889 POP BC Restore BC (B = remaining number of strings to print)
46890 DJNZ 46863 Loop back for next string
46892 CALL 46946 Draw joystick "J" (main menu) in colour depending upon joystick mode
46895 LD A,114 Load A with the attribute value for red INK, yellow PAPER, BRIGHT
46897 CALL 47084 Print keyboard controls on main menu
This entry point is used by the routine at 46968.
46900 CALL 47955 Wait for key-press, store pressed key code in A and play main menu sound
46903 CP 83 If pressed key was not 83 (S)...
46905 JR NZ,46915 ...then skip ahead to 46915
46907 LD A,2 Set current border colour to red...
46909 LD (34217),A ...
46912 OUT (254),A ...
46914 RET Return
46915 CP 74 If pressed key was not 74 (J)...
46917 JR NZ,46968 ...then jump to 46968 (if "K" pressed then redefine controls)
46919 LD A,(34298) If we are in joystick mode...
46922 OR A ...
46923 JR NZ,46937 ...then skip ahead to 46937
46925 CALL 47043 If Kempston interface not present, or Kempston joystick moved / fire pressed...
46928 JR C,46900 ...then jump to 46900
46930 LD A,1 Set joystick mode to on...
46932 LD (34298),A ...(see trivia)
46935 JR 46938 Skip ahead to 46938
46937 DEC A Set joystick mode to off...
46938 LD (34298),A ...
46941 CALL 46946 Draw joystick "J" (main menu) in colour depending upon joystick mode
46944 JR 46900 Loop back to 46900
Prev: 46710 Up: Map Next: 46946