Skip to navigation

BBC Micro Elite

A-Z index of the source code (Cassette version)

This index contains every subroutine, entry point, variable, workspace and macro that appears in the source code for the cassette version of BBC Micro Elite, sorted alphabetically.

NameCategoryDescription
ABORTDashboardDisarm missiles and update the dashboard indicators
ABORT2DashboardSet/unset the lock target for a missile and update the dashboard
ACTMaths (Geometry)Arctan table
ADDMaths (Arithmetic)Calculate (A X) = (A P) + (S R)
ALP1Workspace variable Magnitude of the roll angle alpha, i.e. |alpha|, which is a positive value between 0 and 31
ALP2Workspace variable Bit 7 of ALP2 = sign of the roll angle in ALPHA
ALPHAWorkspace variable The current roll angle alpha, which is reduced from JSTX to a sign-magnitude value between -31 and +31
ALTITWorkspace variable Our altitude above the surface of the planet or sun
ANGRYTacticsMake a ship hostile
ARCTANMaths (Geometry)Calculate A = arctan(P / Q)
ASHWorkspace variable Aft shield status
Authors' namesCopy protectionThe authors' names and a copyright notice, buried in the code
Authors' names (Loader)Copy protectionThe authors' names, buried in the code
AVLWorkspace variable Market availability in the current system
B% (Loader)Screen modeVDU commands for setting the square mode 4 screen
BADStatusCalculate how bad we have been
BAYStatusGo to the docking bay (i.e. show the Status Mode screen)
BAY2MarketJump into the main loop at FRCE, setting the key "pressed" to red key f9 (so we show the Inventory screen)
BEEPSoundMake a short, high beep
BEGIN% (Loader)Copy protectionSingle-byte decryption and copying routine, run on the stack
BELLSoundMake a standard system beep
BET1Workspace variable The magnitude of the pitch angle beta, i.e. |beta|, which is a positive value between 0 and 8
BET2Workspace variable Bit 7 of BET2 = sign of the pitch angle in BETA
BETAWorkspace variable The current pitch angle beta, which is reduced from JSTY to a sign-magnitude value between -8 and +8
BLCNT (Loader)Workspace variable Stores the tape loader block count as part of the copy protection code in IRQ1
BLINEDrawing circlesDraw a circle segment and add it to the ball line heap
BLN (Loader)Workspace variable Gets set to &03C6 as part of the obfuscation code
BLOCK (Loader)Copy protectionAddresses for the obfuscated jumps that use RTS not JMP
block1 (Loader)Screen modePalette data for the two dashboard colour scheme
block2 (Loader)Screen modePalette data for the space part of the screen
BLPTR (Loader)Workspace variable Gets set to &03CA as part of the obfuscation code
BOMBWorkspace variable Energy bomb
BOXUtility routinesJust draw the border and (if this is a space view) the view name. This can be used to remove the border and view name, as it is drawn using EOR logic
BPRNTTextPrint a 32-bit number, left-padded to a specific number of digits, with an optional decimal point
BR1 (Part 1 of 2)Start and endStart or restart the game
BR1 (Part 2 of 2)Start and endShow the "Load New Commander (Y/N)?" screen and start the game
BSTWorkspace variable Fuel scoops (BST stands for "barrel status")
BULBDashboardDraw an indicator bulb on the dashboard
BULB-2DashboardSet the Y screen address
BUMP2DashboardBump up the value of the pitch or roll dashboard indicator
cEquipmentContains an RTS
CABTMPWorkspace variable Cabin temperature
CASHWorkspace variable Our current cash pot
CHARTextMacro definition for characters in the recursive token table
CHECKSave and loadCalculate the checksum for the last saved commander data block
CHECKbyt (Loader)Copy protectionChecksum for the validity of the UU% workspace
CHECKER (Loader)Copy protectionRun checksum checks on tokens, loader and tape block count
checksum0Copy protectionChecksum for the entire main game code
CHECKV (Loader)Copy protectionThe address of the LBL routine in the decryption header
CHKSave and loadFirst checksum byte for the saved commander data file
CHK2Save and loadSecond checksum byte for the saved commander data file
CHKONDrawing circlesCheck whether any part of a circle appears on the extended screen
CIRCLEDrawing circlesDraw a circle for the planet
CIRCLE2Drawing circlesDraw a circle (for the planet or chart)
CLYNSUtility routinesClear the bottom three text rows of the mode 4 screen
cmnTextPrint the commander's name
cmn-1TextContains an RTS
CNTWorkspace variable Temporary storage, typically used for storing the number of iterations required when looping
CNT (Loader)Drawing planetsA counter for use in drawing Saturn's planetary body
CNT2Workspace variable Temporary storage, used in the planet-drawing routine to store the segment number where the arc of a partial circle should start
CNT2 (Loader)Drawing planetsA counter for use in drawing Saturn's background stars
CNT3 (Loader)Drawing planetsA counter for use in drawing Saturn's rings
cntrDashboardApply damping to the pitch or roll dashboard indicator
COKWorkspace variable Flags used to generate the competition code
COLWorkspace variable Temporary storage, used to store colour information when drawing pixels in the dashboard
COMCWorkspace variable The colour of the dot on the compass
command (Loader)Utility routinesExecute an OS command
COMPASDashboardUpdate the compass
COMXWorkspace variable The x-coordinate of the compass dot
COMYWorkspace variable The y-coordinate of the compass dot
CPIX2Drawing pixelsDraw a single-height dot on the dashboard
CPIX4Drawing pixelsDraw a double-height dot on the dashboard
cplTextPrint the selected system name
CRGOWorkspace variable Our ship's cargo capacity
crlfTextTab to column 21 and print a colon
cshTextPrint the current amount of cash
CTRLKeyboardScan the keyboard to see if CTRL is currently pressed
CTRLTextMacro definition for control codes in the recursive token table
CTWOSDrawing pixelsReady-made single-pixel character row bytes for mode 5
DAMPWorkspace variable Keyboard damping configuration setting
David23 (Loader)Copy protectionAddress pointer to the start of the 6502 stack
David7 (Loader)Copy protectionPart of the multi-jump obfuscation code in PROT1
David9 (Loader)Copy protectionAddress used as part of the stack-based decryption loop
deWorkspace variable Equipment destruction flag
DEATHStart and endDisplay the death screen
DEATH2Start and endReset most of the game and restart from the title screen
DEL8Utility routinesWait for 8/50 of a second (0.16 seconds) DELAY-5 Wait for 2/50 of a second (0.04 seconds).
DELAYUtility routinesWait for a specified time, in 1/50s of a second
DELAY-5Utility routinesWait for 2/50 of a second (0.04 seconds).
DELT4Workspace variable Our current speed * 64 as a 16-bit value
DELTAWorkspace variable Our current speed, in the range 1-40
DENGYFlightDrain some energy from the energy banks
DET1Screen modeShow or hide the dashboard (for when we die)
DIALS (Part 1 of 4)DashboardUpdate the dashboard: speed indicator
DIALS (Part 2 of 4)DashboardUpdate the dashboard: pitch and roll indicators
DIALS (Part 3 of 4)DashboardUpdate the dashboard: four energy banks
DIALS (Part 4 of 4)DashboardUpdate the dashboard: shields, fuel, laser & cabin temp, altitude
DILDashboardThe range of the indicator is 0-16 (for the energy banks)
DIL-1DashboardThe range of the indicator is 0-32 (for the speed indicator)
DIL2DashboardUpdate the roll or pitch indicator on the dashboard
DILXDashboardUpdate a bar-based indicator on the dashboard
DILX+2DashboardThe range of the indicator is 0-64 (for the fuel indicator)
DJDWorkspace variable Keyboard auto-recentre configuration setting
DK4KeyboardScan for pause, configuration and secondary flight keys
DKCMPWorkspace variable Docking computer
DKJ1KeyboardRead joystick and flight controls
DKS1KeyboardScan the keyboard for a flight key
DKS2KeyboardRead the joystick position
DKS2-1KeyboardContains an RTS
DKS3KeyboardToggle a configuration setting and emit a beep
DKS4KeyboardScan the keyboard to see if a specific key is being pressed
DLWorkspace variable Vertical sync flag
DLYWorkspace variable In-flight message delay
dnTextPrint the amount of cash and beep
dn2TextMake a short, high beep and delay for 1 second
DNOIZWorkspace variable Sound on/off configuration setting
DOEXPDrawing shipsDraw an exploding ship
DOKEYKeyboardScan for the seven primary flight controls
DOMOVE (Loader)Copy protectionMulti-byte decryption and copying routine, run on the stack
doPROT1 (Loader)Copy protectionRoutine to self-modify the loader code
DORNDUtility routinesGenerate random numbers
DORND (Loader)Utility routinesGenerate random numbers
DORND2Utility routinesRestricts the value of RAND+2 so that bit 0 is always 0
DOTDashboardDraw a dot on the compass
DV41Maths (Arithmetic)Calculate (P R) = 256 * DELTA / A
DV42Maths (Arithmetic)Calculate (P R) = 256 * DELTA / z_hi
DVID3B2Maths (Arithmetic)Calculate K(3 2 1 0) = (A P+1 P) / (z_sign z_hi z_lo)
DVID4Maths (Arithmetic)Calculate (P R) = 256 * A / Q
DVIDTMaths (Arithmetic)Calculate (P+1 A) = (A P) / Q
E% (Loader)SoundSound envelope definitions
ECBLBDashboardLight up the E.C.M. indicator bulb ("E") on the dashboard
ECBLB2DashboardStart up the E.C.M. (indicator, start countdown and make sound)
ECBTDashboardThe character bitmap for the E.C.M. indicator bulb
ECMWorkspace variable E.C.M. system
ECMAWorkspace variable The E.C.M. countdown timer, which determines whether an E.C.M. system is currently operating:
ECMOFSoundSwitch off the E.C.M.
ECMPWorkspace variable Our E.C.M. status
EDGEDrawing shipsMacro definition for adding edges to ship blueprints
EDGESDrawing linesDraw a horizontal line given a centre and a half-width
ee3TextPrint the hyperspace countdown in the top-left of the screen
EE51Drawing shipsRemove the current ship from the screen, called from SHPPT before drawing the ship as a point
Elite loader (Part 1 of 6) (Loader)LoaderInclude binaries for recursive tokens, Python blueprint and images
Elite loader (Part 2 of 6) (Loader)LoaderPerform a number of OS calls, set up sound, push routines on stack
Elite loader (Part 3 of 6) (Loader)LoaderMove and decrypt recursive tokens, Python blueprint and images
Elite loader (Part 4 of 6) (Loader)LoaderCopy more code onto stack, decrypt TUT block, set up IRQ1 handler
Elite loader (Part 5 of 6) (Loader)LoaderLoad main game code, decrypt it, move it to the correct location
Elite loader (Part 6 of 6) (Loader)LoaderSet up interrupt vectors, calculate checksums, run main game code
ENERGYWorkspace variable Energy bank status
ENGYWorkspace variable Energy unit
eqEquipmentSubtract the price of equipment from the cash pot
EQSHPEquipmentShow the Equip Ship screen (red key f3)
errEquipmentBeep, pause and go to the docking bay (i.e. show the Status Mode screen)
ESCAPEFlightLaunch our escape pod
ESCPWorkspace variable Escape pod
EVWorkspace variable The "extra vessels" spawning counter
exTextPrint a recursive token
EXCN (Loader)Workspace variable Gets set to &03C2 as part of the obfuscation code
EXNOSoundMake the sound of a laser strike or ship explosion
EXNO-2SoundSet X = 7 and fall through into EXNO to make the sound of a ship exploding
EXNO2SoundProcess us making a kill
EXNO3SoundMake an explosion sound
FACEDrawing shipsMacro definition for adding faces to ship blueprints
FAROFMaths (Geometry)Compare x_hi, y_hi and z_hi with 224
FAROF2Maths (Geometry)Compare x_hi, y_hi and z_hi with A
FISTWorkspace variable Our legal status (FIST stands for "fugitive/innocent status"):
FLAGWorkspace variable A flag that's used to define whether this is the first call to the ball line routine in BLINE, so it knows whether to wait for the second call before storing segment data in the ball line heap
FLFLLSDrawing sunsReset the sun line heap
FLHWorkspace variable Flashing console bars configuration setting
FLIPStardustReflect the stardust particles in the screen diagonal
FMLTUMaths (Arithmetic)Calculate A = A * Q / 256
FMLTU2Maths (Arithmetic)Calculate A = K * sin(A)
FNE (Loader)SoundMacro definition for defining a sound envelope
FOOLV (Loader)Copy protectionPart of the AFOOL roundabout obfuscation routine
fq1TacticsUsed to add a cargo canister to the universe
FR1TacticsDisplay the "missile jammed" message
FR1-2TacticsClear the C flag and return from the subroutine
FRCEMain loopThe entry point for the main game loop if we want to jump straight to a specific screen, by pretending to "press" a key, in which case A contains the internal key number of the key we want to "press"
FRINWorkspace variable Slots for the ships in the local bubble of universe
FRMISTacticsFire a missile from our ship
FRS1TacticsLaunch a ship straight ahead of us, below the laser sights
FSHWorkspace variable Forward shield status
fwlTextPrint fuel and cash levels
FX200Utility routinesSet the behaviour of the ESCAPE and BREAK keys
GC2Maths (Arithmetic)Calculate (Y X) = (A P) * 4
GCASHMaths (Arithmetic)Calculate (Y X) = P * Q * 4
GCNTWorkspace variable The number of the current galaxy (0-7)
GhyFlightPerform a galactic hyperspace jump
GHYPWorkspace variable Galactic hyperdrive
GINFUniverseFetch the address of a ship's data block into INF
GNTMPWorkspace variable Laser temperature (or "gun temperature")
gnumMarketGet a number from the keyboard
GOINMain loopWe jump here from part 3 of the main flight loop if the docking computer is activated by pressing "C"
govWorkspace variable The current system's government type (0-7)
GTHGUniverseSpawn a Thargoid ship and a Thargon companion
GTNMESave and loadFetch the name of a commander file to save or load
GVLUniverseCalculate the availability of a market item
HFS2Drawing circlesDraw the launch or hyperspace tunnel
HFXWorkspace variable A flag that toggles the hyperspace colour effect
HI1TacticsContains an RTS
HITCHTacticsWork out if the ship in INWK is in our crosshairs
HL6Drawing linesContains an RTS
HLOINDrawing linesDraw a horizontal line from (X1, Y1) to (X2, Y1)
HLOIN2Drawing linesRemove a line from the sun line heap and draw it on-screen
hmChartsSelect the closest system and redraw the chart crosshairs
hy5UniverseContains an RTS
hy6FlightPrint a message to say no hyperspacing inside the station
hypFlightStart the hyperspace process
hyp1UniverseProcess a jump to the system closest to (QQ9, QQ10)
hyp1+3UniverseJump straight to the system at (QQ9, QQ10) without first calculating which system is closest. We do this if we already know that (QQ9, QQ10) points to a system
hyRUniverseContains an RTS
INFWorkspace variable Temporary storage, typically used for storing the address of a ship's data block, so it can be copied to and from the internal workspace at INWK
INWKWorkspace variable The zero-page internal workspace for the current ship data block
IRQ1Screen modeThe main screen-mode interrupt handler (IRQ1V points here)
IRQ1 (Loader)Screen modeThe loader's screen-mode interrupt handler (IRQ1V points here)
ITEMMarketMacro definition for the market prices table
jmpUniverseSet the current system to the selected system
JSTEWorkspace variable Reverse both joystick channels configuration setting
JSTGYWorkspace variable Reverse joystick Y-channel configuration setting
JSTKWorkspace variable Keyboard or joystick configuration setting
JSTXWorkspace variable Our current roll rate
JSTYWorkspace variable Our current pitch rate
KWorkspace variable Temporary storage, used in a number of places
K%WorkspacesShip data blocks and ship line heaps
K2Workspace variable Temporary storage, used in a number of places
K3Workspace variable Temporary storage, used in a number of places
K3 (Loader)Workspace variable Temporary storage, used in a number of places
K4Workspace variable Temporary storage, used in a number of places
K5Workspace variable Temporary storage used to store segment coordinates across successive calls to BLINE, the ball line routine
K6Workspace variable Temporary storage, typically used for storing coordinates during vector calculations
KILLSHPUniverseRemove a ship from our local bubble of universe
KLWorkspace variable The following bytes implement a key logger that enables Elite to scan for concurrent key presses of the primary flight keys, plus a secondary flight key
KS1UniverseRemove the current ship from our local bubble of universe
KS2UniverseCheck the local bubble for missiles with target lock
KS3UniverseSet the SLSP ship heap pointer after shuffling ship slots
KS4UniverseRemove the space station and replace it with the sun
KY1Workspace variable "?" is being pressed
KY12Workspace variable TAB is being pressed
KY13Workspace variable ESCAPE is being pressed
KY14Workspace variable "T" is being pressed
KY15Workspace variable "U" is being pressed
KY16Workspace variable "M" is being pressed
KY17Workspace variable "E" is being pressed
KY18Workspace variable "J" is being pressed
KY19Workspace variable "C" is being pressed
KY2Workspace variable Space is being pressed
KY3Workspace variable "<" is being pressed
KY4Workspace variable ">" is being pressed
KY5Workspace variable "X" is being pressed
KY6Workspace variable "S" is being pressed
KY7Workspace variable "A" is being pressed
KYTBKeyboardLookup table for in-flight keyboard controls
LASWorkspace variable Contains the laser power of the laser fitted to the current space view (or 0 if there is no laser fitted to the current view)
LAS2Workspace variable Laser power for the current laser
LASCTWorkspace variable The laser pulse count for the current laser
LASERWorkspace variable The specifications of the lasers fitted to each of the four space views:
LASLIDrawing linesDraw the laser lines for when we fire our lasers
LASLI2Drawing linesJust draw the current laser lines without moving the centre point, draining energy or heating up. This has the effect of removing the lines from the screen
LASXWorkspace variable The x-coordinate of the tip of the laser line
LASYWorkspace variable The y-coordinate of the tip of the laser line
LAUNDrawing circlesMake the launch sound and draw the launch tunnel
LBL (Big Code file)Copy protectionChecksum the two pages of code that were copied from UU% to LE%
LBL+2 (Big Code file)Copy protectionContains an RTS
LCASHMaths (Arithmetic)Subtract an amount of cash from the cash pot
LL10-1Drawing shipsContains an RTS
LL118Drawing linesMove a point along a line until it is on-screen
LL118-1Drawing linesContains an RTS
LL120Maths (Arithmetic)Calculate (Y X) = (S x1_lo) * XX12+2 or (S x1_lo) / XX12+2
LL121Maths (Arithmetic)Calculate (Y X) = (S R) / Q and set the sign to the opposite of the top byte on the stack
LL122Maths (Arithmetic)Calculate (Y X) = (S R) * Q and set the sign to the opposite of the top byte on the stack
LL123Maths (Arithmetic)Calculate (Y X) = (S R) / XX12+2 or (S R) * XX12+2
LL128Maths (Arithmetic)Contains an RTS
LL129Maths (Arithmetic)Calculate Q = XX12+2, A = S EOR XX12+3 and (S R) = |S R|
LL133Maths (Arithmetic)Negate (Y X) and return from the subroutine LL128 Contains an RTS
LL145 (Part 1 of 4)Drawing linesClip line: Work out which end-points are on-screen, if any
LL145 (Part 2 of 4)Drawing linesClip line: Work out if any part of the line is on-screen
LL145 (Part 3 of 4)Drawing linesClip line: Calculate the line's gradient
LL145 (Part 4 of 4)Drawing linesClip line: Call the routine in LL188 to do the actual clipping
LL147Drawing linesDon't initialise the values in SWAP or A
LL164Drawing circlesMake the hyperspace sound and draw the hyperspace tunnel
LL28Maths (Arithmetic)Calculate R = 256 * A / Q
LL28+4Maths (Arithmetic)Skips the A >= Q check and always returns with C flag cleared, so this can be called if we know the division will work
LL30Drawing linesLL30 is a synonym for LOIN and draws a line from (X1, Y1) to (X2, Y2)
LL31Maths (Arithmetic)Skips the A >= Q check and does not set the R counter, so this can be used for jumping straight into the division loop if R is already set to 254 and we know the division will work
LL38Maths (Arithmetic)Calculate (S A) = (S R) + (A Q)
LL5Maths (Arithmetic)Calculate Q = SQRT(R Q)
LL51Maths (Geometry)Calculate the dot product of XX15 and XX16
LL61Maths (Arithmetic)Calculate (U R) = 256 * A / Q
LL62Maths (Arithmetic)Calculate 128 - (U R)
LL70+1Drawing shipsContains an RTS (as the first byte of an LDA instruction)
LL81+2Drawing shipsDraw the contents of the ship lone heap, used to draw the ship as a dot from SHPPT
LL9 (Part 1 of 12)Drawing shipsDraw ship: Check if ship is exploding, check if ship is in front
LL9 (Part 2 of 12)Drawing shipsDraw ship: Check if ship is in field of view, close enough to draw
LL9 (Part 3 of 12)Drawing shipsDraw ship: Set up orientation vector, ship coordinate variables
LL9 (Part 4 of 12)Drawing shipsDraw ship: Set visibility for exploding ship (all faces visible)
LL9 (Part 5 of 12)Drawing shipsDraw ship: Calculate the visibility of each of the ship's faces
LL9 (Part 6 of 12)Drawing shipsDraw ship: Calculate the visibility of each of the ship's vertices
LL9 (Part 7 of 12)Drawing shipsDraw ship: Calculate the visibility of each of the ship's vertices
LL9 (Part 8 of 12)Drawing shipsDraw ship: Calculate the screen coordinates of visible vertices
LL9 (Part 9 of 12)Drawing shipsDraw ship: Draw laser beams if the ship is firing its laser at us
LL9 (Part 10 of 12)Drawing shipsDraw ship: Calculate the visibility of each of the ship's edges
LL9 (Part 11 of 12)Drawing shipsDraw ship: Add all visible edges to the ship line heap
LL9 (Part 12 of 12)Drawing shipsDraw ship: Draw all the visible edges from the ship line heap
LO2FlightContains an RTS PU1-1 Contains an RTS
LODSave and loadLoad a commander file
LOIN (Part 1 of 7)Drawing linesDraw a line: Calculate the line gradient in the form of deltas
LOIN (Part 2 of 7)Drawing linesDraw a line: Line has a shallow gradient, step right along x-axis
LOIN (Part 3 of 7)Drawing linesDraw a shallow line going right and up or left and down
LOIN (Part 4 of 7)Drawing linesDraw a shallow line going right and down or left and up
LOIN (Part 5 of 7)Drawing linesDraw a line: Line has a steep gradient, step up along y-axis
LOIN (Part 6 of 7)Drawing linesDraw a steep line going up and left or down and right
LOIN (Part 7 of 7)Drawing linesDraw a steep line going up and right or down and left
LOOK1FlightInitialise the space view
LSOWorkspace variable This space has two uses:
LSPWorkspace variable The ball line heap pointer, which contains the number of the first free byte after the end of the LSX2 and LSY2 heaps (see the deep dive on "The ball line heap" for details)
LSXWorkspace variable LSX is an alias that points to the first byte of the sun line heap at LSO
LSX2Workspace variable The ball line heap for storing x-coordinates (see the deep dive on "The ball line heap" for details)
LSY2Workspace variable The ball line heap for storing y-coordinates (see the deep dive on "The ball line heap" for details)
LYNUtility routinesClear most of a row of pixels
mMaths (Geometry)Do not include A in the calculation
M%Main loopThe entry point for the main flight loop
M2 (Loader)Utility routinesUsed for testing the 6522 System VIA status byte in IRQ1
MA9Maths (Geometry)Contains an RTS
MADMaths (Arithmetic)Calculate (A X) = Q * A + (S R)
Main flight loop (Part 1 of 16)Main loopSeed the random number generator
Main flight loop (Part 2 of 16)Main loopCalculate the alpha and beta angles from the current pitch and roll of our ship
Main flight loop (Part 3 of 16)Main loopScan for flight keys and process the results
Main flight loop (Part 4 of 16)Main loopFor each nearby ship: Copy the ship's data block from K% to the zero-page workspace at INWK
Main flight loop (Part 5 of 16)Main loopFor each nearby ship: If an energy bomb has been set off, potentially kill this ship
Main flight loop (Part 6 of 16)Main loopFor each nearby ship: Move the ship in space and copy the updated INWK data block back to K%
Main flight loop (Part 7 of 16)Main loopFor each nearby ship: Check whether we are docking, scooping or colliding with it
Main flight loop (Part 8 of 16)Main loopFor each nearby ship: Process us potentially scooping this item
Main flight loop (Part 9 of 16)Main loopFor each nearby ship: If it is a space station, check whether we are successfully docking with it
Main flight loop (Part 10 of 16)Main loopFor each nearby ship: Remove if scooped, or process collisions
Main flight loop (Part 11 of 16)Main loopFor each nearby ship: Process missile lock and firing our laser
Main flight loop (Part 12 of 16)Main loopFor each nearby ship: Draw the ship, remove if killed, loop back
Main flight loop (Part 13 of 16)Main loopShow energy bomb effect, charge shields and energy banks
Main flight loop (Part 14 of 16)Main loopSpawn a space station if we are close enough to the planet
Main flight loop (Part 15 of 16)Main loopPerform altitude checks with planet and sun, process fuel scooping
Main flight loop (Part 16 of 16)Main loopProcess laser pulsing, E.C.M. energy drain, call stardust routine
Main game loop (Part 1 of 6)Main loopSpawn a trader (a peaceful Cobra Mk III)
Main game loop (Part 2 of 6)Main loopCall the main flight loop, and potentially spawn a trader, an asteroid, or a cargo canister
Main game loop (Part 3 of 6)Main loopPotentially spawn a cop, particularly if we've been bad
Main game loop (Part 4 of 6)Main loopPotentially spawn lone bounty hunter, Thargoid, or up to 4 pirates
Main game loop (Part 5 of 6)Main loopCool down lasers, make calls to update the dashboard
Main game loop (Part 6 of 6)Main loopProcess non-flight key presses (red function keys, docked keys)
MAINSUM (Loader)Copy protectionTwo checksums for the decryption header and text token table
MAL1Main loopMarks the beginning of the ship analysis loop, so we can jump back here from part 12 of the main flight loop to work our way through each ship in the local bubble. We also jump back here when a ship is removed from the bubble, so we can continue processing from the next ship
MANYWorkspace variable The number of ships of each type in the local bubble of universe
MAS1Maths (Geometry)Add an orientation vector coordinate to an INWK coordinate
MAS2Maths (Geometry)Calculate a cap on the maximum distance to the planet or sun
MAS3Maths (Arithmetic)Calculate A = x_hi^2 + y_hi^2 + z_hi^2 in the K% block
MAS4Maths (Geometry)Calculate a cap on the maximum distance to a ship
MCASHMaths (Arithmetic)Add an amount of cash to the cash pot
MCHWorkspace variable The text token number of the in-flight message that is currently being shown, and which will be removed by the me2 routine when the counter in DLY reaches zero
MCNTWorkspace variable The main loop counter
me1TextErase an old in-flight message and display a new one
me2TextRemove an in-flight message from the space view
me3Main loopUsed by me2 to jump back into the main game loop after printing an in-flight message
mes9TextPrint a text token, possibly followed by " DESTROYED"
MESSTextDisplay an in-flight message
MESS1 (Loader)Utility routinesContains an OS command string for loading the main game code
MHCA (Loader)Copy protectionUsed to set one of the vectors in the copy protection code
MJWorkspace variable Are we in witchspace (i.e. have we mis-jumped)?
MJPFlightProcess a mis-jump into witchspace
MLOOPMain loopThe entry point for the main game loop. This entry point comes after the call to the main flight loop and spawning routines, so it marks the start of the main game loop for when we are docked (as we don't need to call the main flight loop or spawning routines if we aren't in space)
MLS1Maths (Arithmetic)Calculate (A P) = ALP1 * A
MLS2Maths (Arithmetic)Calculate (S R) = XX(1 0) and (A P) = A * ALP1
MLTU2Maths (Arithmetic)Calculate (A P+1 P) = (A ~P) * Q
MLTU2-2Maths (Arithmetic)Set Q to X, so this calculates (A P+1 P) = (A ~P) * X
MLU1Maths (Arithmetic)Calculate Y1 = y_hi and (A P) = |y_hi| * Q for Y-th stardust
MLU2Maths (Arithmetic)Calculate (A P) = |A| * Q
MSARWorkspace variable The targeting state of our leftmost missile
MSBARDashboardDraw a specific indicator in the dashboard's missile bar
msblobDashboardDisplay the dashboard's missile indicators in green
MSTGWorkspace variable The current missile lock target
MU1Maths (Arithmetic)Copy X into P and A, and clear the C flag
MU11Maths (Arithmetic)Calculate (A P) = P * X
MU5Maths (Arithmetic)Set K(3 2 1 0) = (A A A A) and clear the C flGag
MU6Maths (Arithmetic)Set P(1 0) = (A A)
MULT1Maths (Arithmetic)Calculate (A P) = Q * A
MULT12Maths (Arithmetic)Calculate (S R) = Q * A
MULT3Maths (Arithmetic)Calculate K(3 2 1 0) = (A P+1 P) * Q
MULTS-2Maths (Arithmetic)Calculate (A P) = X * A
MULTUMaths (Arithmetic)Calculate (A P) = P * Q
MUT1Maths (Arithmetic)Calculate R = XX and (A P) = Q * A
MUT2Maths (Arithmetic)Calculate (S R) = XX(1 0) and (A P) = Q * A
MUT3Maths (Arithmetic)Unused routine that does the same as MUT2
MV40MovingRotate the planet or sun by our ship's pitch and roll
MV45MovingRejoin the MVEIT routine after the rotation, tactics and scanner code
MVEIT (Part 1 of 9)MovingMove current ship: Tidy the orientation vectors
MVEIT (Part 2 of 9)MovingMove current ship: Call tactics routine, remove ship from scanner
MVEIT (Part 3 of 9)MovingMove current ship: Move ship forward according to its speed
MVEIT (Part 4 of 9)MovingMove current ship: Apply acceleration to ship's speed as a one-off
MVEIT (Part 5 of 9)MovingMove current ship: Rotate ship's location by our pitch and roll
MVEIT (Part 6 of 9)MovingMove current ship: Move the ship in space according to our speed
MVEIT (Part 7 of 9)MovingMove current ship: Rotate ship's orientation vectors by pitch/roll
MVEIT (Part 8 of 9)MovingMove current ship: Rotate ship about itself by its own pitch/roll
MVEIT (Part 9 of 9)MovingMove current ship: Redraw on scanner, if it hasn't been destroyed
MVS4MovingApply pitch and roll to an orientation vector
MVS5MovingApply a 3.6 degree pitch or roll to an orientation vector
MVT1MovingCalculate (x_sign x_hi x_lo) = (x_sign x_hi x_lo) + (A R)
MVT1-2MovingClear bits 0-6 of A before entering MVT1
MVT3MovingCalculate K(3 2 1) = (x_sign x_hi x_lo) + K(3 2 1)
MVT6MovingCalculate (A P+2 P+1) = (x_sign x_hi x_lo) + (A P+2 P+1)
NA%Save and loadThe data block for the last saved commander
NLINDrawing linesDraw a horizontal line at pixel row 23 to box in a title
NLIN2Drawing linesDraw a screen-wide horizontal line at the pixel row in A
NLIN3Drawing linesPrint a title and a horizontal line at row 19 to box it in
NLIN4Drawing linesDraw a horizontal line at pixel row 19 to box in a title
NO1Maths (Geometry)Contains an RTS
NO3SoundMake a sound from a prepared sound block
NOISESoundMake the sound whose number is in A
NOMSLWorkspace variable The number of missiles we have fitted (0-4)
NORMMaths (Geometry)Normalise the three-coordinate vector in XX15
NOS1SoundPrepare a sound block
NOSTMWorkspace variable The number of stardust particles shown on screen, which is 18 (#NOST) for normal space, and 3 for witchspace
nWqStardustCreate a random cloud of stardust
NwS1UniverseFlip the sign and double an INWK byte
NWSHPUniverseAdd a new ship to our local bubble of universe
NWSPSUniverseAdd a new space station to our local bubble of universe
NWSTARSStardustInitialise the stardust field
OOPSFlightTake some damage
OSB (Loader)Utility routinesA convenience routine for calling OSBYTE with Y = 0
oscliv (Loader)Utility routinesContains the address of OSCLIV, for executing OS commands
osprint (Loader)Utility routinesPrint a character
ou2TextDisplay "E.C.M.SYSTEM DESTROYED" as an in-flight message
ou3TextDisplay "FUEL SCOOPS DESTROYED" as an in-flight message
OUCHFlightPotentially lose cargo or equipment following damage
outKeyboardContains an RTS
PWorkspace variable Temporary storage, used in a number of places
P (Loader)Workspace variable Temporary storage, used in a number of places
PATGWorkspace variable Configuration setting to show the author names on the start-up screen and enable manual hyperspace mis-jumps
pingUniverseSet the selected system to the current system
PIX (Loader)Drawing pixelsDraw a single pixel at a specific coordinate
PIX1Maths (Arithmetic)Calculate (YY+1 SYL+Y) = (A P) + (S R) and draw stardust particle
PIXELDrawing pixelsDraw a 1-pixel dot, 2-pixel dash or 4-pixel square
PIXEL2Drawing pixelsDraw a stardust particle relative to the screen centre
PL2Drawing planetsRemove the planet or sun from the screen
PL2-1Drawing planetsContains an RTS
PL21Drawing planetsReturn from a planet/sun-drawing routine with a failure flag
PL44Drawing planetsClear the C flag and return from the subroutine
PL9 (Part 1 of 3)Drawing planetsDraw the planet, with either an equator and meridian, or a crater
PL9 (Part 2 of 3)Drawing planetsDraw the planet's equator and meridian
PL9 (Part 3 of 3)Drawing planetsDraw the planet's crater
PLANETDrawing planetsDraw the planet or sun
plfTextPrint a text token followed by a newline
plf2TextPrint text followed by a newline and indent of 6 characters
PLL1 (Loader)Drawing planetsDraw Saturn on the loading screen
PLS1Drawing planetsCalculate (Y A) = nosev_x / z
PLS2Drawing planetsDraw a half-circle
PLS22Drawing planetsDraw a circle or half-circle
PLS3Drawing planetsCalculate (Y A P) = 222 * roofv_x / z
PLS4Drawing planetsCalculate CNT2 = arctan(P / A) / 4
PLS5Drawing planetsCalculate roofv_x / z and roofv_y / z
PLS6Drawing planetsCalculate (X K) = (A P) / (z_sign z_hi z_lo)
PLUTFlightFlip the coordinate axes for the four different views
pr2TextPrint an 8-bit number, left-padded to 3 digits, and optional point
pr2+2TextPrint the 8-bit number in X to the number of digits in A
pr5TextPrint a 16-bit number, left-padded to 5 digits, and optional point
pr6TextPrint 16-bit number, left-padded to 5 digits, no point
PROJDrawing shipsProject the current ship onto the screen
prqTextPrint a text token followed by a question mark
prxEquipmentReturn the price of a piece of equipment
prx-3EquipmentReturn the price of the item with number A - 1 c Contains an RTS
PRXSEquipmentEquipment prices
ptgFlightCalled when the user manually forces a mis-jump
PU1-1FlightContains an RTS
PX3Drawing pixelsPlot a single pixel at (X, Y) within a character block
PX4Drawing pixelsContains an RTS
PZWDashboardFetch the current dashboard colours, to support flashing
QWorkspace variable Temporary storage, used in a number of places
Q (Loader)Workspace variable Temporary storage, used in a number of places
QQ0Workspace variable The current system's galactic x-coordinate (0-256)
QQ1Workspace variable The current system's galactic y-coordinate (0-256)
QQ10Workspace variable The galactic y-coordinate of the crosshairs in the galaxy chart (and, most of the time, the selected system's galactic y-coordinate)
QQ11Workspace variable The number of the current view:
QQ12Workspace variable Our "docked" status
QQ14Workspace variable Our current fuel level (0-70)
QQ15Workspace variable The three 16-bit seeds for the selected system, i.e. the one in the crosshairs in the Short-range Chart
QQ16TextThe two-letter token lookup table
QQ17Workspace variable Contains a number of flags that affect how text tokens are printed, particularly capitalisation:
QQ18TextThe recursive token table for tokens 0-148
QQ19Workspace variable Temporary storage, used in a number of places
QQ2Workspace variable The three 16-bit seeds for the current system, i.e. the one we are currently in
QQ20Workspace variable The contents of our cargo hold
QQ21Workspace variable The three 16-bit seeds for the current galaxy
QQ22Workspace variable The two hyperspace countdown counters
QQ23MarketMarket prices table
QQ24Workspace variable Temporary storage, used to store the current market item's price in routine TT151
QQ25Workspace variable Temporary storage, used to store the current market item's availability in routine TT151
QQ26Workspace variable A random value used to randomise market data
QQ28Workspace variable Temporary storage, used to store the economy byte of the current system in routine var
QQ29Workspace variable Temporary storage, used in a number of places
QQ3Workspace variable The selected system's economy (0-7)
QQ4Workspace variable The selected system's government (0-7)
QQ5Workspace variable The selected system's tech level (0-14)
QQ6Workspace variable The selected system's population in billions * 10 (1-71), so the maximum population is 7.1 billion
QQ7Workspace variable The selected system's productivity in M CR (96-62480)
QQ8Workspace variable The distance from the current system to the selected system in light years * 10, stored as a 16-bit number
QQ9Workspace variable The galactic x-coordinate of the crosshairs in the galaxy chart (and, most of the time, the selected system's galactic x-coordinate)
QU5Start and endReset the current commander data block to the last saved commander
QUS1Save and loadSave or load the commander file
qvEquipmentPrint a menu of the four space views, for buying lasers
qwTextPrint a recursive token in the range 128-145
RWorkspace variable Temporary storage, used in a number of places
RANDWorkspace variable Four 8-bit seeds for the random number generation system implemented in the DORND routine
RATWorkspace variable Used to store different signs depending on the current space view, for use in calculating stardust movement
RAT2Workspace variable Temporary storage, used to store the pitch and roll signs when moving objects and stardust
RDKEYKeyboardScan the keyboard for key presses
RE2+2DashboardRestore A from T and return from the subroutine
RE3+2DashboardAuto-recentre the value in X, if keyboard auto-recentre is configured
REDU2DashboardReduce the value of the pitch or roll dashboard indicator
RES2Start and endReset a number of flight variables and workspaces
RES4Start and endReset the shields and energy banks, then fall through into RES2 to reset the stardust and the ship workspace at INWK
RESETStart and endReset most variables
RLINETextThe OSWORD configuration block used to fetch a line of text from the keyboard
ROOT (Loader)Maths (Arithmetic)Calculate ZP = SQRT(ZP(1 0))
RR3+1TextContains an RTS RREN Prints the character definition pointed to by P(2 1) at the screen address pointed to by (A SC). Used by the BULB routine
RRENTextPrints the character definition pointed to by P(2 1) at the screen address pointed to by (A SC). Used by the BULB routine
rT9TextContains an RTS
RTOKTextMacro definition for recursive tokens in the recursive token table
RTS2Drawing sunsContains an RTS
SWorkspace variable Temporary storage, used in a number of places
S%WorkspacesVector addresses, compass colour and configuration settings
SCWorkspace variable Screen address (low byte)
SC (Loader)Workspace variable Screen address (low byte)
SC5Utility routinesContains an RTS
SCANDashboardDisplay the current ship on the scanner
SCHWorkspace variable Screen address (high byte)
SCH (Loader)Workspace variable Screen address (high byte)
SESCPFlightSpawn an escape pod from the current (parent) ship
SFRMISTacticsAdd an enemy missile to our local bubble of universe
SFS1UniverseSpawn a child ship from the current (parent) ship
SFS1-2FlightAdd a missile to the local bubble that has AI enabled, is hostile, but has no E.C.M.
SFS2MovingMove a ship in space along one of the coordinate axes
SFXSoundSound data
SHDFlightCharge a shield and drain some energy from the energy banks
SHIP_ASTEROIDDrawing shipsShip blueprint for an asteroid
SHIP_CANISTERDrawing shipsShip blueprint for a cargo canister
SHIP_COBRA_MK_3Drawing shipsShip blueprint for a Cobra Mk III
SHIP_CORIOLISDrawing shipsShip blueprint for a Coriolis space station
SHIP_ESCAPE_PODDrawing shipsShip blueprint for an escape pod
SHIP_MAMBADrawing shipsShip blueprint for a Mamba
SHIP_MISSILEDrawing shipsShip blueprint for a missile
SHIP_PYTHONDrawing shipsShip blueprint for a Python
SHIP_SIDEWINDERDrawing shipsShip blueprint for a Sidewinder
SHIP_THARGOIDDrawing shipsShip blueprint for a Thargoid mothership
SHIP_THARGONDrawing shipsShip blueprint for a Thargon
SHIP_VIPERDrawing shipsShip blueprint for a Viper
SHPPTDrawing shipsDraw a distant ship as a point rather than a full wireframe
SIGHTFlightDraw the laser crosshairs
SLSPWorkspace variable The address of the bottom of the ship line heap
SNEMaths (Geometry)Sine/cosine table
SOLARUniverseSet up various aspects of arriving in a new system
SOS1UniverseUpdate the missile indicators, set up the planet data block
SP1DashboardDraw the space station on the compass
SP2DashboardDraw a dot on the compass, given the planet/station vector
SPBLBDashboardDraw (or erase) the space station indicator ("S") on the dashboard
SPBTDashboardThe bitmap definition for the space station indicator bulb
spcTextPrint a text token followed by a space
SPS1Maths (Geometry)Calculate the vector to the planet and store it in XX15
SPS1+1Maths (Geometry)A BRK instruction
SPS2Maths (Arithmetic)Calculate (Y X) = A / 10
SPS3Maths (Geometry)Copy a space coordinate from the K% block into K3
SPS4Maths (Geometry)Calculate the vector to the space station
SQUAMaths (Arithmetic)Clear bit 7 of A and calculate (A P) = A * A
SQUA2Maths (Arithmetic)Calculate (A P) = A * A
SQUA2 (Loader)Maths (Arithmetic)Calculate (A P) = A * A
SSPRWorkspace variable "Space station present" flag
STARSStardustThe main routine for processing the stardust
STARS1StardustProcess the stardust for the front view
STARS2StardustProcess the stardust for the left or right view
STARS6StardustProcess the stardust for the rear view
STATUSStatusShow the Status Mode screen (red key f8)
STPWorkspace variable The step size for drawing circles
SUN (Part 1 of 4)Drawing sunsDraw the sun: Set up all the variables needed
SUN (Part 2 of 4)Drawing sunsDraw the sun: Start from bottom of screen and erase the old sun
SUN (Part 3 of 4)Drawing sunsDraw the sun: Continue to move up the screen, drawing the new sun
SUN (Part 4 of 4)Drawing sunsDraw the sun: Continue to the top of the screen, erasing old sun
SUNXWorkspace variable The 16-bit x-coordinate of the vertical centre axis of the sun (which might be off-screen)
SVCWorkspace variable The save count
SVESave and loadSave the commander file
SVNSave and loadThe "saving in progress" flag
SWAPWorkspace variable Temporary storage, used to store a flag that records whether or not we had to swap a line's start and end coordinates around when clipping the line in routine LL145 (the flag is used in places like BLINE to swap them back)
swine (Loader)Copy protectionResets the machine if the copy protection detects a problem
SXWorkspace variable This is where we store the x_hi coordinates for all the stardust particles
SXLWorkspace variable This is where we store the x_lo coordinates for all the stardust particles
SYWorkspace variable This is where we store the y_hi coordinates for all the stardust particles
SYLWorkspace variable This is where we store the y_lo coordinates for all the stardust particles
SZWorkspace variable This is where we store the z_hi coordinates for all the stardust particles
SZLWorkspace variable This is where we store the z_lo coordinates for all the stardust particles
TWorkspace variable Temporary storage, used in a number of places
T (Loader)Workspace variable Temporary storage, used in a number of places
T%WorkspacesCurrent commander data and stardust data blocks
T1Workspace variable Temporary storage, used in a number of places
TACTICS (Part 1 of 7)TacticsApply tactics: Process missiles, both enemy missiles and our own
TACTICS (Part 2 of 7)TacticsApply tactics: Escape pod, station, lone Thargon, safe-zone pirate
TACTICS (Part 3 of 7)TacticsApply tactics: Calculate dot product to determine ship's aim
TACTICS (Part 4 of 7)TacticsApply tactics: Check energy levels, maybe launch escape pod if low
TACTICS (Part 5 of 7)TacticsApply tactics: Consider whether to launch a missile at us
TACTICS (Part 6 of 7)TacticsApply tactics: Consider firing a laser at us, if aim is true
TACTICS (Part 7 of 7)TacticsApply tactics: Set pitch, roll, and acceleration
talTextPrint the current galaxy numbe
TALLYWorkspace variable Our combat rank
TAS1Maths (Arithmetic)Calculate K3 = (x_sign x_hi x_lo) - V(1 0)
TAS2Maths (Geometry)Normalise the three-coordinate vector in K3
TAS3Maths (Geometry)Calculate the dot product of XX15 and an orientation vector
tekWorkspace variable The current system's tech level (0-14)
TENSTextA constant used when printing large numbers in BPRNT
TGTWorkspace variable Temporary storage, typically used as a target value for counters when drawing explosion clouds and partial circles
thaMain loopConsider spawning a Thargoid (22% chance)
TIDYMaths (Geometry)Orthonormalise the orientation vectors for a ship
TIS1Maths (Arithmetic)Calculate (A ?) = (-X * A + (S R)) / 96
TIS2Maths (Arithmetic)Calculate A = A / Q
TIS3Maths (Arithmetic)Calculate -(nosev_1 * roofv_1 + nosev_2 * roofv_2) / nosev_3
TITLEStart and endDisplay a title screen with a rotating ship and prompt
tnprMarketWork out if we have space for a specific amount of cargo
TPWorkspace variable The current mission status, which is always 0 for the cassette version of Elite as there are no missions
TR1Save and loadCopy the last saved commander's name from NA% to INWK
TRNMESave and loadCopy the last saved commander's name from INWK to NA%
TRTB%Workspace variable This is set by elite-loader.asm to point to the MOS keyboard translation table, which is used by the TT217 routine to translate internal key values to ASCII
TRTB% (Loader)Workspace variable TRTB%(1 0) points to the keyboard translation table
TT100Main loopThe entry point for the start of the main game loop, which calls the main flight loop and the moves into the spawning routine
TT102KeyboardProcess function key, save, hyperspace and chart key presses
TT103ChartsDraw a small set of crosshairs on a chart
TT105ChartsDraw crosshairs on the Short-range Chart, with clipping
TT11TextPrint a 16-bit number, left-padded to n digits, and optional point
TT110FlightLaunch from a station or show the front space view
TT111UniverseSet the current system to the nearest system to a point
TT111-1UniverseContains an RTS
TT113Maths (Arithmetic)Contains an RTS
TT114ChartsDisplay either the Long-range or Short-range Chart
TT123ChartsMove galactic coordinates by a signed delta
TT128Drawing circlesDraw a circle on a chart
TT14Drawing circlesDraw a circle with crosshairs on a chart
TT146TextPrint the distance to the selected system in light years
TT147TextPrint an error when a system is out of hyperspace range
TT15Drawing linesDraw a set of crosshairs
TT151MarketPrint the name, price and availability of a market item
TT152MarketPrint the unit ("t", "kg" or "g") for a market item
TT16ChartsMove the crosshairs on a chart
TT160MarketPrint "t" (for tonne) and a space
TT161MarketPrint "kg" (for kilograms)
TT162TextPrint a space
TT162+2TextJump to TT27 to print the text token in A
TT163MarketPrint the headers for the table of market prices
TT167MarketShow the Market Price screen (red key f7)
TT16aMarketPrint "g" (for grams)
TT17KeyboardScan the keyboard for cursor key or joystick movement
TT170Start and endMain entry point for the Elite game code
TT18FlightTry to initiate a jump into hyperspace
TT180ChartsContains an RTS
TT20UniverseTwist the selected system's seeds four times
TT208MarketShow the Sell Cargo screen (red key f2)
TT210InventoryShow a list of current cargo in our hold, optionally to sell
TT213InventoryShow the Inventory screen (red key f9)
TT214InventoryAsk a question with a "Y/N?" prompt and return the response
TT217KeyboardScan the keyboard until a key is pressed
TT219MarketShow the Buy Cargo screen (red key f1)
TT22ChartsShow the Long-range Chart (red key f4)
TT23ChartsShow the Short-range Chart (red key f5)
TT24UniverseCalculate system data from the system seeds
TT25UniverseShow the Data on System screen (red key f6)
TT26TextPrint a character at the text cursor by poking into screen memory
TT26 (Loader)TextPrint a character at the text cursor (WRCHV points here)
TT27TextPrint a text token
TT41TextPrint a letter according to Sentence Case
TT42TextPrint a letter in lower case
TT43TextPrint a two-letter token or recursive token 0-95
TT44TextJumps to TT26 to print the character in A (used to enable us to use a branch instruction to jump to TT26)
TT45TextPrint a letter in lower case
TT46TextPrint a character and switch to capitals
TT48TextContains an RTS
TT54UniverseTwist the selected system's seeds
TT60TextPrint a text token and a paragraph break
TT66Utility routinesClear the screen and set the current view type
TT66-2Utility routinesCall TT66 with A = 1
TT67TextPrint a newline
TT68TextPrint a text token followed by a colon
TT69TextSet Sentence Case and print a newline
TT70TextDisplay "MAINLY " and jump to TT72
TT72UniverseUsed by TT70 to re-enter the routine after displaying "MAINLY" for the economy type
TT73TextPrint a colon
TT74TextPrint a character
TT81UniverseSet the selected system's seeds to those of system 0
TTX66Utility routinesClear the top part of the screen and draw a white border
TTX69TextPrint a paragraph break
TVT1Screen modePalette data for space and the two dashboard colour schemes
TWFLDrawing linesReady-made character rows for the left end of a horizontal line in mode 4
TWFRDrawing linesReady-made character rows for the right end of a horizontal line in mode 4
TWOKTextMacro definition for two-letter tokens in the token table
TWOSDrawing pixelsReady-made single-pixel character row bytes for mode 4
TWOS (Loader)Drawing pixelsReady-made single-pixel character row bytes for mode 4
TWOS2Drawing pixelsReady-made double-pixel character row bytes for mode 4
TYPEWorkspace variable The current ship type
UWorkspace variable Temporary storage, used in a number of places
U%KeyboardClear the key logger (from KY1 through KY19)
UNIVUniverseTable of pointers to the local universe's ship data blocks
Unused duplicate of MULTUMaths (Arithmetic)Unused duplicate of the MULTU routine
UU% (Loader)WorkspacesMarker for a block that is moved as part of the obfuscation
VWorkspace variable Temporary storage, typically used for storing an address pointer
V219 (Loader)Workspace variable Gets set to &0218 as part of the obfuscation code
varMarketCalculate QQ19+3 = economy * |economic_factor|
VECScreen modeThe original value of the IRQ1 vector
VERTEXDrawing shipsMacro definition for adding vertices to ship blueprints
VIEWWorkspace variable The number of the current space view
WARPFlightPerform an in-system jump
WPWorkspacesShip slots, variables
WP1Drawing planetsReset the ball line heap
WPLSDrawing sunsRemove the sun from the screen
WPLS-1Drawing planetsContains an RTS
WPLS2Drawing planetsRemove the planet from the screen
WPSHPSDashboardClear the scanner, reset the ball line and sun line heaps
WSCANScreen modeWait for the vertical sync
wWFlightStart a hyperspace countdown
X1Workspace variable Temporary storage, typically used for x-coordinates in line-drawing routines
X2Workspace variable Temporary storage, typically used for x-coordinates in line-drawing routines
XCWorkspace variable The x-coordinate of the text cursor (i.e. the text column), which can be from 0 to 32
XC (Loader)TextThe x-coordinate of the text cursor
XSAVWorkspace variable Temporary storage for saving the value of the X register, used in a number of places
XSAV2Workspace variable Temporary storage, used for storing the value of the X register in the TT26 routine
XXWorkspace variable Temporary storage, typically used for storing a 16-bit x-coordinate
XX0Workspace variable Temporary storage, used to store the address of a ship blueprint. For example, it is used when we add a new ship to the local bubble in routine NWSHP, and it contains the address of the current ship's blueprint as we loop through all the nearby ships in the main flight loop
XX1Workspace variable This is an alias for INWK that is used in the main ship-drawing routine at LL9
XX12Workspace variable Temporary storage for a block of values, used in a number of places
XX13Workspace variable Temporary storage, typically used in the line-drawing routines
XX14Workspace variable This byte is unused
XX15Workspace variable Temporary storage, typically used for storing screen coordinates in line-drawing routines
XX16Workspace variable Temporary storage for a block of values, used in a number of places
XX17Workspace variable Temporary storage, used in BPRNT to store the number of characters to print, and as the edge counter in the main ship-drawing routine
XX18Workspace variable Temporary storage used to store coordinates in the LL9 ship-drawing routine
XX19Workspace variable XX19(1 0) shares its location with INWK(34 33), which contains the address of the ship line heap
XX2Workspace variable Temporary storage, used to store the visibility of the ship's faces during the ship-drawing routine at LL9
XX20Workspace variable Temporary storage, used in a number of places
XX21Drawing shipsShip blueprints lookup table
XX24Workspace variable This byte is unused
XX3WorkspacesTemporary storage space for complex calculations
XX4Workspace variable Temporary storage, used in a number of places
Y1Workspace variable Temporary storage, typically used for y-coordinates in line-drawing routines
Y2Workspace variable Temporary storage, typically used for y-coordinates in line-drawing routines
YCWorkspace variable The y-coordinate of the text cursor (i.e. the text row), which can be from 0 to 23
YC (Loader)TextThe y-coordinate of the text cursor
yplTextPrint the current system name
ypl-1TextContains an RTS
YSAVWorkspace variable Temporary storage for saving the value of the Y register, used in a number of places
YSAV2Workspace variable Temporary storage, used for storing the value of the Y register in the TT26 routine
YYWorkspace variable Temporary storage, typically used for storing a 16-bit y-coordinate
YY (Loader)Workspace variable Temporary storage, used in a number of places
ZeUniverseInitialise the INWK workspace to a hostile ship
ZEROUtility routinesZero-fill pages &9, &A, &B, &C and &D
ZES1Utility routinesZero-fill the page whose number is in X
ZES2Utility routinesZero-fill a specific page
ZINFUtility routinesReset the INWK workspace and orientation vectors
ZPWorkspacesLots of important variables are stored in the zero page workspace as it is quicker and more space-efficient to access memory here
ZP (Big Code file)WorkspacesImportant variables used by the loader
ZP (Loader)WorkspacesImportant variables used by the loader
ZZWorkspace variable Temporary storage, typically used for distance values
zZ+1FlightContains an RTS