Skip to navigation

Elite on the BBC Micro and NES

Loader: DOENTRY

[BBC Micro disc version, Flight]

Name: DOENTRY [Show more] Type: Subroutine Category: Loader Summary: Load and run the docked code
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * Main flight loop (Part 9 of 16) calls DOENTRY
.DOENTRY LDA #'R' \ Modify the command in LTLI from "L.T.CODE" to STA LTLI \ "R.T.CODE" so it *RUNs the code rather than loading it \ \ This ensures that when we load the docked code, then \ instead of continuing execution following a *LOAD, \ which would restart the game by falling through into \ the DOBEGIN routine in the docked code, we instead \ jump to the start of the docked code at S%, which \ jumps to the docked DOENTRY routine to dock with the \ space station \ Fall into DEATH2 to reset most variables and *RUN the \ docked code