Skip to navigation


Setup: SetupScreen

Name: SetupScreen [Show more] Type: Subroutine Category: Setup Summary: Set up the screen mode and load the dashboard image
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * Entry calls SetupScreen
.SetupScreen LDA #22 \ Switch to screen mode 5 with the following VDU JSR OSWRCH \ command: LDA #5 \ JSR OSWRCH \ VDU 22, 5 LDY #0 \ We now want to write the VDU command to disable the \ cursor, whose bytes are in the variable at \ disableCursor, so set up a counter in Y .sscr1 LDA disableCursor,Y \ Write the Y-th value from disableCursor JSR OSWRCH INY \ Increment the loop counter CPY #10 \ Loop back to write the next character until we have BNE sscr1 \ written all 10, in other words: \ \ VDU 23, 0, 10, 23, 0, 0, 0, 0, 0, 0 LDA #31 \ Move the text cursor to column 4, row 10 with the JSR OSWRCH \ following VDU command: LDA #4 \ JSR OSWRCH \ VDU 31, 4, 10 LDA #10 JSR OSWRCH LDY #0 \ We now want to print the "Please wait" message in \ variable pleaseWaitText, so set up a counter in Y .sscr2 LDA pleaseWaitText,Y \ Print the Y-th character from pleaseWaitText JSR OSWRCH INY \ Increment the loop counter CPY #11 \ Loop back to print the next character until we have BNE sscr2 \ printed all 11 ("Please wait") LDX #LO(loadDashboard) \ Set (Y X) to point to loadDashboard ("L.DASHBD 7100") LDY #HI(loadDashboard) JSR OSCLI \ Call OSCLI to run the OS command in loadDashboard, \ which loads the dashboard image into the screen LDA #129 \ Call OSBYTE with A = 129, X = &FF and Y = 0 to scan LDX #&FF \ the keyboard for &FF centiseconds (2.56 seconds) LDY #0 JSR OSBYTE JMP DrawCanopy \ Jump down to DrawCanopy to continue the setup process