Skip to navigation


Flight: TT110

[BBC Micro disc version, Docked]

Name: TT110 [Show more] Type: Subroutine Category: Flight Summary: Launch from a station or show the front space view
Context: See this subroutine in context in the source code Variations: See code variations for this subroutine in the different versions References: This subroutine is called as follows: * Ghy calls TT110 * TT102 calls TT110

Launch the ship (if we are docked), or show the front space view (if we are already in space). Called when red key f0 is pressed while docked (launch), after we arrive in a new galaxy, or after a hyperspace if the current view is a space view.
.TT110 LDX #63 \ Before loading the flight code, we need to copy the \ two-letter token table from QQ16 to QQ16_FLIGHT, so \ we set a counter in X for the 64 bytes in the table .eny1 LDA QQ16,X \ Copy the X-th byte of QQ16 to the X-th byte of STA QQ16_FLIGHT,X \ QQ16_FLIGHT DEX \ Decrement the loop counter BPL eny1 \ Loop back to copy the next byte until we have copied \ the whole table JSR CATD \ Call CATD to reload the disc catalogue LDX #LO(RDLI) \ Set (Y X) to point to RDLI ("R.D.CODE") LDY #HI(RDLI) JMP OSCLI \ Call OSCLI to run the OS command in RDLI, which *RUNs \ the main flight code in D.CODE, returning from the \ subroutine using a tail call