ORG &5E00 .Entry LDA #129 \ Call OSBYTE with A = 129, X = 0 and Y = &FF to detect LDX #0 \ the machine type. This call is undocumented and is not LDY #&FF \ the recommended way to determine the machine type JSR OSBYTE \ (OSBYTE 0 is the correct way), but this call returns \ the following: \ \ * X = Y = 0 if this is a BBC Micro with MOS 0.1 \ * X = Y = &FF if this is a BBC Micro with MOS 1.20 CPX #0 \ This checks the MOS version, but presumably this NOP \ contained some kind of copy protection or decryption NOP \ code that has been replaced by NOPs in this \ unprotected version of the game LDA #200 \ Call OSBYTE with A = 200, X = 3 and Y = 0 to disable LDX #3 \ the ESCAPE key and clear memory if the BREAK key is LDY #0 \ pressed JSR OSBYTE LDY #0 \ We now copy the following blocks in memory: \ \ * &5800-&5BFF is copied to &0400-&07FF \ * &5C00-&5DFF is copied to &0B00-&0CFF \ \ so we set up a byte counter in Y \ \ Note that the &5800-&5BFF block gets copied again in \ the DrawCanopy routine, so it ends up at &0D00-&10FF .entr1 LDA &5800,Y \ Copy the Y-th byte of &5800 to the Y-th byte of &0400 STA &0400,Y LDA &5900,Y \ Copy the Y-th byte of &5900 to the Y-th byte of &0500 STA &0500,Y LDA &5A00,Y \ Copy the Y-th byte of &5A00 to the Y-th byte of &0600 STA &0600,Y LDA &5B00,Y \ Copy the Y-th byte of &5B00 to the Y-th byte of &0700 STA &0700,Y LDA &5C00,Y \ Copy the Y-th byte of &5C00 to the Y-th byte of &0B00 STA &0B00,Y LDA &5D00,Y \ Copy the Y-th byte of &5D00 to the Y-th byte of &0C00 STA &0C00,Y DEY \ Decrement the loop counter BNE entr1 \ Loop back until we have copied a whole page of bytes NOP \ Presumably this contained some kind of copy protection NOP \ or decryption code that has been replaced by NOPs in NOP \ this unprotected version of the game NOP NOP NOP NOP JMP SetupScreen \ Jump to the routine that we just moved to &0B00 to \ set up the screen and continue the setup processName: Entry [Show more] Type: Subroutine Category: Setup Summary: The main entry point for the game: move code into lower memory and call itContext: See this subroutine in context in the source code References: No direct references to this subroutine in this source file
[X]
Configuration variable OSBYTE = &FFF4
The address for the OSBYTE routine
[X]
Subroutine SetupScreen (category: Setup)
Set up the screen mode and load the dashboard image
[X]
Label entr1 is local to this routine