Skip to navigation


List of all subroutines

[BBC Micro disc version]

This index contains every subroutine and entry point that appears in the source code for the BBC Micro disc version of Elite, grouped by category. An entry points is a label within a subroutine that is called from outside the subroutine, which typically implements a subset or variation of the functionality of the parent subroutine.

Charts
------

hm (Docked)Select the closest system and redraw the chart crosshairs
hm (Flight)Select the closest system and redraw the chart crosshairs
HME2 (Docked)Search the galaxy for a system
TT103 (Docked)Draw a small set of crosshairs on a chart
TT103 (Flight)Draw a small set of crosshairs on a chart
TT105 (Docked)Draw crosshairs on the Short-range Chart, with clipping
TT105 (Flight)Draw crosshairs on the Short-range Chart, with clipping
TT114 (Flight)Display either the Long-range or Short-range Chart
TT123 (Docked)Move galactic coordinates by a signed delta
TT123 (Flight)Move galactic coordinates by a signed delta
TT16 (Docked)Move the crosshairs on a chart
TT16 (Flight)Move the crosshairs on a chart
TT180 (Docked)Contains an RTS
TT180 (Flight)Contains an RTS
TT22 (Docked)Show the Long-range Chart (red key f4)
TT22 (Flight)Show the Long-range Chart (red key f4)
TT23 (Docked)Show the Short-range Chart (red key f5)
TT23 (Flight)Show the Short-range Chart (red key f5)

Copy protection
---------------

BEGIN (Loader 1)Decrypt the loader code using a rolling EOR that uses the decryption routine itself to seed the decryption
CHECK (Loader 3)Calculate a checksum from two 256-byte portions of the loader code
LOAD (Loader 1)Load a hidden file from disc (not used in this version as disc protection is disabled)
LOAD (Loader 2)This code accesses the disc directly (not used in this version as disc protection is disabled)
LOADcode (Loader 2)LOAD routine, bundled up in the loader so it can be moved to &0400 to be run
OSBmod (Loader 3)Calculate a checksum on &0F00 to &0FFF (the test is disabled in this version)
PROT1 (Loader 3)Part of the CHKSM copy protection checksum calculation
PROT2 (Loader 3)Part of the CHKSM copy protection checksum calculation
PROT3 (Loader 3)Part of the CHKSM copy protection checksum calculation
Unused copy protection routine (Loader 2)This code doesn't appear to be run in this version

Dashboard
---------

ABORT (Docked)Disarm missiles and update the dashboard indicators
ABORT (Flight)Disarm missiles and update the dashboard indicators
ABORT2 (Docked)Set/unset the lock target for a missile and update the dashboard
ABORT2 (Flight)Set/unset the lock target for a missile and update the dashboard
BULB (Docked)Draw an indicator bulb on the dashboard
BULB (Flight)Draw an indicator bulb on the dashboard
BULB-2 (Docked)Set the Y screen address
BULB-2 (Flight)Set the Y screen address
BUMP2 (Docked)Bump up the value of the pitch or roll dashboard indicator
BUMP2 (Flight)Bump up the value of the pitch or roll dashboard indicator
cntr (Docked)Apply damping to the pitch or roll dashboard indicator
cntr (Flight)Apply damping to the pitch or roll dashboard indicator
COMPAS (Flight)Update the compass
DIALS (Part 1 of 4) (Docked)Update the dashboard: speed indicator
DIALS (Part 1 of 4) (Flight)Update the dashboard: speed indicator
DIALS (Part 2 of 4) (Docked)Update the dashboard: pitch and roll indicators
DIALS (Part 2 of 4) (Flight)Update the dashboard: pitch and roll indicators
DIALS (Part 3 of 4) (Docked)Update the dashboard: four energy banks
DIALS (Part 3 of 4) (Flight)Update the dashboard: four energy banks
DIALS (Part 4 of 4) (Docked)Update the dashboard: shields, fuel, laser & cabin temp, altitude
DIALS (Part 4 of 4) (Flight)Update the dashboard: shields, fuel, laser & cabin temp, altitude
DIL (Docked)The range of the indicator is 0-16 (for the energy banks)
DIL (Flight)The range of the indicator is 0-16 (for the energy banks)
DIL-1 (Docked)The range of the indicator is 0-32 (for the speed indicator)
DIL-1 (Flight)The range of the indicator is 0-32 (for the speed indicator)
DIL2 (Docked)Update the roll or pitch indicator on the dashboard
DIL2 (Flight)Update the roll or pitch indicator on the dashboard
DILX (Docked)Update a bar-based indicator on the dashboard
DILX (Flight)Update a bar-based indicator on the dashboard
DILX+2 (Docked)The range of the indicator is 0-64 (for the fuel indicator)
DILX+2 (Flight)The range of the indicator is 0-64 (for the fuel indicator)
DOT (Flight)Draw a dash on the compass
ECBLB (Flight)Light up the E.C.M. indicator bulb ("E") on the dashboard
ECBLB2 (Flight)Start up the E.C.M. (light up the indicator, start the countdown and make the E.C.M. sound)
MSBAR (Docked)Draw a specific indicator in the dashboard's missile bar
MSBAR (Flight)Draw a specific indicator in the dashboard's missile bar
msblob (Docked)Display the dashboard's missile indicators in green
msblob (Flight)Display the dashboard's missile indicators in green
PZW (Docked)Fetch the current dashboard colours, to support flashing
PZW (Flight)Fetch the current dashboard colours, to support flashing
RE2+2 (Docked)Restore A from T and return from the subroutine
RE2+2 (Flight)Restore A from T and return from the subroutine
RE3+2 (Docked)Auto-recentre the value in X, if keyboard auto-recentre is configured
RE3+2 (Flight)Auto-recentre the value in X, if keyboard auto-recentre is configured
REDU2 (Docked)Reduce the value of the pitch or roll dashboard indicator
REDU2 (Flight)Reduce the value of the pitch or roll dashboard indicator
SCAN (Flight)Display the current ship on the scanner
SCANCOL (Flight)Set the correct colour on the scanner for the current ship type
SP1 (Flight)Draw the space station on the compass
SP2 (Flight)Draw a dot on the compass, given the planet/station vector
SPBLB (Docked)Light up the space station indicator ("S") on the dashboard
SPBLB (Flight)Light up the space station indicator ("S") on the dashboard
WPSHPS (Docked)Clear the scanner, reset the ball line and sun line heaps
WPSHPS (Flight)Clear the scanner, reset the ball line and sun line heaps

Drawing circles
---------------

BLINE (Docked)Draw a circle segment and add it to the ball line heap
BLINE (Flight)Draw a circle segment and add it to the ball line heap
CHKON (Docked)Check whether any part of a circle appears on the extended screen
CHKON (Flight)Check whether any part of a circle appears on the extended screen
CIRCLE (Docked)Draw a circle for the planet
CIRCLE (Flight)Draw a circle for the planet
CIRCLE2 (Docked)Draw a circle (for the planet or chart)
CIRCLE2 (Flight)Draw a circle (for the planet or chart)
HFS1 (Docked)Don't clear the screen, and draw 8 concentric rings with the step size in STP
HFS1 (Flight)Don't clear the screen, and draw 8 concentric rings with the step size in STP
HFS2 (Docked)Draw the launch or hyperspace tunnel
HFS2 (Flight)Draw the launch or hyperspace tunnel
LAUN (Docked)Make the launch sound and draw the launch tunnel
LAUN (Flight)Make the launch sound and draw the launch tunnel
LL164 (Docked)Make the hyperspace sound and draw the hyperspace tunnel
LL164 (Flight)Make the hyperspace sound and draw the hyperspace tunnel
TT128 (Docked)Draw a circle on a chart
TT128 (Flight)Draw a circle on a chart
TT14 (Docked)Draw a circle with crosshairs on a chart
TT14 (Flight)Draw a circle with crosshairs on a chart

Drawing lines
-------------

EDGES (Docked)Draw a horizontal line given a centre and a half-width
EDGES (Flight)Draw a horizontal line given a centre and a half-width
HL6 (Docked)Contains an RTS
HL6 (Flight)Contains an RTS
HLOIN (Docked)Draw a horizontal line from (X1, Y1) to (X2, Y1)
HLOIN (Flight)Draw a horizontal line from (X1, Y1) to (X2, Y1)
HLOIN2 (Docked)Remove a line from the sun line heap and draw it on-screen
HLOIN2 (Flight)Remove a line from the sun line heap and draw it on-screen
LASLI (Flight)Draw the laser lines for when we fire our lasers
LASLI-1 (Flight)Contains an RTS
LASLI2 (Flight)Just 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
LL118 (Docked)Move a point along a line until it is on-screen
LL118 (Flight)Move a point along a line until it is on-screen
LL118-1 (Docked)Contains an RTS
LL118-1 (Flight)Contains an RTS
LL145 (Part 1 of 4) (Docked)Clip line: Work out which end-points are on-screen, if any
LL145 (Part 1 of 4) (Flight)Clip line: Work out which end-points are on-screen, if any
LL145 (Part 2 of 4) (Docked)Clip line: Work out if any part of the line is on-screen
LL145 (Part 2 of 4) (Flight)Clip line: Work out if any part of the line is on-screen
LL145 (Part 3 of 4) (Docked)Clip line: Calculate the line's gradient
LL145 (Part 3 of 4) (Flight)Clip line: Calculate the line's gradient
LL145 (Part 4 of 4) (Docked)Clip line: Call the routine in LL188 to do the actual clipping
LL145 (Part 4 of 4) (Flight)Clip line: Call the routine in LL188 to do the actual clipping
LL147 (Docked)Don't initialise the values in SWAP or A
LL147 (Flight)Don't initialise the values in SWAP or A
LL30 (Docked)LL30 is a synonym for LOIN and draws a line from (X1, Y1) to (X2, Y2)
LL30 (Flight)LL30 is a synonym for LOIN and draws a line from (X1, Y1) to (X2, Y2)
LOIN (Part 1 of 7) (Docked)Draw a line: Calculate the line gradient in the form of deltas
LOIN (Part 1 of 7) (Flight)Draw a line: Calculate the line gradient in the form of deltas
LOIN (Part 2 of 7) (Docked)Draw a line: Line has a shallow gradient, step right along x-axis
LOIN (Part 2 of 7) (Flight)Draw a line: Line has a shallow gradient, step right along x-axis
LOIN (Part 3 of 7) (Docked)Draw a shallow line going right and up or left and down
LOIN (Part 3 of 7) (Flight)Draw a shallow line going right and up or left and down
LOIN (Part 4 of 7) (Docked)Draw a shallow line going right and down or left and up
LOIN (Part 4 of 7) (Flight)Draw a shallow line going right and down or left and up
LOIN (Part 5 of 7) (Docked)Draw a line: Line has a steep gradient, step up along y-axis
LOIN (Part 5 of 7) (Flight)Draw a line: Line has a steep gradient, step up along y-axis
LOIN (Part 6 of 7) (Docked)Draw a steep line going up and left or down and right
LOIN (Part 6 of 7) (Flight)Draw a steep line going up and left or down and right
LOIN (Part 7 of 7) (Docked)Draw a steep line going up and right or down and left
LOIN (Part 7 of 7) (Flight)Draw a steep line going up and right or down and left
NLIN (Docked)Draw a horizontal line at pixel row 23 to box in a title
NLIN (Flight)Draw a horizontal line at pixel row 23 to box in a title
NLIN2 (Docked)Draw a screen-wide horizontal line at the pixel row in A
NLIN2 (Flight)Draw a screen-wide horizontal line at the pixel row in A
NLIN3 (Docked)Print a title and draw a horizontal line at row 19 to box it in
NLIN3 (Flight)Print a title and draw a horizontal line at row 19 to box it in
NLIN4 (Docked)Draw a horizontal line at pixel row 19 to box in a title
NLIN4 (Flight)Draw a horizontal line at pixel row 19 to box in a title
PL44 (Docked)Clear the C flag and return from the subroutine
TT15 (Docked)Draw a set of crosshairs
TT15 (Flight)Draw a set of crosshairs

Drawing pixels
--------------

CPIX2 (Docked)Draw a single-height dash on the dashboard
CPIX2 (Flight)Draw a single-height dash on the dashboard
CPIX4 (Docked)Draw a double-height dot on the dashboard
CPIX4 (Flight)Draw a double-height dot on the dashboard
out (Loader 3)Contains an RTS
PIX (Loader 3)Draw a single pixel at a specific coordinate
PIXEL (Docked)Draw a 1-pixel dot, 2-pixel dash or 4-pixel square
PIXEL (Flight)Draw a 1-pixel dot, 2-pixel dash or 4-pixel square
PIXEL2 (Docked)Draw a stardust particle relative to the screen centre
PIXEL2 (Flight)Draw a stardust particle relative to the screen centre
PX3 (Docked)Plot a single pixel at (X, Y) within a character block
PX3 (Flight)Plot a single pixel at (X, Y) within a character block
PX4 (Docked)Contains an RTS
PX4 (Flight)Contains an RTS

Drawing planets
---------------

PL2 (Flight)Remove the planet or sun from the screen
PL2-1 (Flight)Contains an RTS
PL21 (Docked)Return from a planet/sun-drawing routine with a failure flag
PL21 (Flight)Return from a planet/sun-drawing routine with a failure flag
PL44 (Flight)Clear the C flag and return from the subroutine
PL9 (Part 1 of 3) (Flight)Draw the planet, with either an equator and meridian, or a crater
PL9 (Part 2 of 3) (Flight)Draw the planet's equator and meridian
PL9 (Part 3 of 3) (Flight)Draw the planet's crater
PLANET (Flight)Draw the planet or sun
PLL1 (Part 1 of 3) (Loader 3)Draw Saturn on the loading screen (draw the planet)
PLL1 (Part 2 of 3) (Loader 3)Draw Saturn on the loading screen (draw the stars)
PLL1 (Part 3 of 3) (Loader 3)Draw Saturn on the loading screen (draw the rings)
PLS1 (Flight)Calculate (Y A) = nosev_x / z
PLS2 (Flight)Draw a half-ellipse
PLS22 (Flight)Draw an ellipse or half-ellipse
PLS3 (Flight)Calculate (Y A P) = 222 * roofv_x / z
PLS4 (Flight)Calculate CNT2 = arctan(P / A) / 4
PLS5 (Flight)Calculate roofv_x / z and roofv_y / z
PLS6 (Flight)Calculate (X K) = (A P+1 P) / (z_sign z_hi z_lo)
WP1 (Docked)Reset the ball line heap
WP1 (Flight)Reset the ball line heap
WPLS2 (Flight)Remove the planet from the screen

Drawing ships
-------------

DOEXP (Docked)Draw an exploding ship
DOEXP (Flight)Draw an exploding ship
EE51 (Docked)Remove the current ship from the screen, called from SHPPT before drawing the ship as a point
EE51 (Flight)Remove the current ship from the screen, called from SHPPT before drawing the ship as a point
LL10-1 (Docked)Contains an RTS
LL10-1 (Flight)Contains an RTS
LL66 (Docked)A re-entry point into the ship-drawing routine, used by the LL62 routine to store 128 - (U R) on the XX3 heap
LL66 (Flight)A re-entry point into the ship-drawing routine, used by the LL62 routine to store 128 - (U R) on the XX3 heap
LL70+1 (Docked)Contains an RTS (as the first byte of an LDA instruction)
LL70+1 (Flight)Contains an RTS (as the first byte of an LDA instruction)
LL81+2 (Docked)Draw the contents of the ship line heap, used to draw the ship as a dot from SHPPT
LL81+2 (Flight)Draw the contents of the ship line heap, used to draw the ship as a dot from SHPPT
LL9 (Part 1 of 12) (Docked)Draw ship: Check if ship is exploding, check if ship is in front
LL9 (Part 1 of 12) (Flight)Draw ship: Check if ship is exploding, check if ship is in front
LL9 (Part 2 of 12) (Docked)Draw ship: Check if ship is in field of view, close enough to draw
LL9 (Part 2 of 12) (Flight)Draw ship: Check if ship is in field of view, close enough to draw
LL9 (Part 3 of 12) (Docked)Draw ship: Set up orientation vector, ship coordinate variables
LL9 (Part 3 of 12) (Flight)Draw ship: Set up orientation vector, ship coordinate variables
LL9 (Part 4 of 12) (Docked)Draw ship: Set visibility for exploding ship (all faces visible)
LL9 (Part 4 of 12) (Flight)Draw ship: Set visibility for exploding ship (all faces visible)
LL9 (Part 5 of 12) (Docked)Draw ship: Calculate the visibility of each of the ship's faces
LL9 (Part 5 of 12) (Flight)Draw ship: Calculate the visibility of each of the ship's faces
LL9 (Part 6 of 12) (Docked)Draw ship: Calculate the visibility of each of the ship's vertices
LL9 (Part 6 of 12) (Flight)Draw ship: Calculate the visibility of each of the ship's vertices
LL9 (Part 7 of 12) (Docked)Draw ship: Calculate the visibility of each of the ship's vertices
LL9 (Part 7 of 12) (Flight)Draw ship: Calculate the visibility of each of the ship's vertices
LL9 (Part 8 of 12) (Docked)Draw ship: Calculate the screen coordinates of visible vertices
LL9 (Part 8 of 12) (Flight)Draw ship: Calculate the screen coordinates of visible vertices
LL9 (Part 9 of 12) (Docked)Draw ship: Draw laser beams if the ship is firing its laser at us
LL9 (Part 9 of 12) (Flight)Draw ship: Draw laser beams if the ship is firing its laser at us
LL9 (Part 10 of 12) (Docked)Draw ship: Calculate the visibility of each of the ship's edges
LL9 (Part 10 of 12) (Flight)Draw ship: Calculate the visibility of each of the ship's edges
LL9 (Part 11 of 12) (Docked)Draw ship: Add all visible edges to the ship line heap
LL9 (Part 11 of 12) (Flight)Draw ship: Add all visible edges to the ship line heap
LL9 (Part 12 of 12) (Docked)Draw ship: Draw all the visible edges from the ship line heap
LL9 (Part 12 of 12) (Flight)Draw ship: Draw all the visible edges from the ship line heap
SHPPT (Docked)Draw a distant ship as a point in the middle of the screen
SHPPT (Flight)Draw a distant ship as a point rather than a full wireframe

Drawing suns
------------

FLFLLS (Docked)Reset the sun line heap
FLFLLS (Flight)Reset the sun line heap
RTS2 (Docked)Contains an RTS
RTS2 (Flight)Contains an RTS
SUN (Part 1 of 4) (Docked)Draw the sun: Set up all the variables needed to draw the sun
SUN (Part 1 of 4) (Flight)Draw the sun: Set up all the variables needed to draw the sun
SUN (Part 2 of 4) (Docked)Draw the sun: Start from the bottom of the screen and erase the old sun line by line
SUN (Part 2 of 4) (Flight)Draw the sun: Start from the bottom of the screen and erase the old sun line by line
SUN (Part 3 of 4) (Docked)Draw the sun: Continue to move up the screen, drawing the new sun line by line
SUN (Part 3 of 4) (Flight)Draw the sun: Continue to move up the screen, drawing the new sun line by line
SUN (Part 4 of 4) (Docked)Draw the sun: Continue to the top of the screen, erasing the old sun line by line
SUN (Part 4 of 4) (Flight)Draw the sun: Continue to the top of the screen, erasing the old sun line by line
WPLS (Docked)Remove the sun from the screen
WPLS (Flight)Remove the sun from the screen
WPLS-1 (Flight)Contains an RTS

Drawing the screen
------------------

BOL1-1 (Docked)Contains an RTS
BOX (Flight)Just 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
CLYNS (Docked)Clear the bottom three text rows of the mode 4 screen
CLYNS (Flight)Clear the bottom three text rows of the mode 4 screen
DET1 (Docked)Show or hide the dashboard (for when we die)
DET1 (Flight)Show or hide the dashboard (for when we die)
IRQ1 (Loader 3)The main screen-mode interrupt handler (IRQ1V points here)
LYN (Docked)Clear most of a row of pixels
LYN (Flight)Clear most of a row of pixels
SC5 (Docked)Contains an RTS
SC5 (Flight)Contains an RTS
TT66 (Docked)Clear the screen and set the current view type
TT66 (Flight)Clear the screen and set the current view type
TTX66 (Docked)Clear the top part of the screen and draw a white border
TTX66 (Flight)Clear the top part of the screen and draw a white border
WSCAN (Docked)Wait for the vertical sync
WSCAN (Flight)Wait for the vertical sync

Equipment
---------

c (Docked)Contains an RTS
eq (Docked)Subtract the price of equipment from the cash pot
EQSHP (Docked)Show the Equip Ship screen (red key f3)
err (Docked)Beep, pause and go to the docking bay (i.e. show the Status Mode screen)
pres (Docked)Given an item number A with the item name in recursive token Y, show an error to say that the item is already present, refund the cost of the item, and then beep and exit to the docking bay (i.e. show the Status Mode screen)
prx (Docked)Return the price of a piece of equipment
prx-3 (Docked)Return the price of the item with number A - 1 c Contains an RTS
qv (Docked)Print a menu of the four space views, for buying lasers
refund (Docked)Install a new laser, processing a refund if applicable

Flight
------

DCS1 (Flight)Calculate the vector from the ideal docking position to the ship
DENGY (Docked)Drain some energy from the energy banks
DENGY (Flight)Drain some energy from the energy banks
DOCKIT (Flight)Apply docking manoeuvres to the ship in INWK
DOENTRY (Docked)Dock at the space station, show the ship hangar and work out any mission progression
ee3 (Docked)Print the hyperspace countdown in the top-left of the screen
ee3 (Flight)Print the hyperspace countdown in the top-left of the screen
ESCAPE (Flight)Launch our escape pod
Ghy (Docked)Perform a galactic hyperspace jump
Ghy (Flight)Perform a galactic hyperspace jump
hyp (Docked)Start the hyperspace process
hyp (Flight)Start the hyperspace process
LO2 (Flight)Contains an RTS
LOOK1 (Flight)Initialise the space view
me1 (Docked)Erase an old in-flight message and display a new one
me1 (Flight)Erase an old in-flight message and display a new one
me2 (Docked)Remove an in-flight message from the space view
me2 (Flight)Remove an in-flight message from the space view
mes9 (Docked)Print a text token, possibly followed by " DESTROYED"
mes9 (Flight)Print a text token, possibly followed by " DESTROYED"
MESS (Docked)Display an in-flight message
MESS (Flight)Display an in-flight message
MJP (Flight)Process a mis-jump into witchspace
OOPS (Flight)Take some damage
ou2 (Flight)Display "E.C.M.SYSTEM DESTROYED" as an in-flight message
ou3 (Flight)Display "FUEL SCOOPS DESTROYED" as an in-flight message
OUCH (Flight)Potentially lose cargo or equipment following damage
ptg (Flight)Called when the user manually forces a mis-jump
PU1 (Flight)Flip the coordinate axes for the four different views
SESCP (Flight)Spawn an escape pod from the current (parent) ship
SHD (Docked)Charge a shield and drain some energy from the energy banks
SHD (Flight)Charge a shield and drain some energy from the energy banks
SIGHT (Docked)Draw the laser crosshairs
SIGHT (Flight)Draw the laser crosshairs
TT110 (Docked)Launch from a station or show the front space view
TT110 (Flight)Launch from a station or show the front space view
TT147 (Docked)Print an error when a system is out of hyperspace range
TT147 (Flight)Print an error when a system is out of hyperspace range
TT18 (Flight)Try to initiate a jump into hyperspace
TTX110 (Docked)Set the current system to the nearest system and return to hyp
TTX110 (Flight)Set the current system to the nearest system and return to hyp
TTX111 (Docked)Used to rejoin this routine from the call to TTX110
TTX111 (Flight)Used to rejoin this routine from the call to TTX110
WARP (Flight)Perform an in-system jump
wW (Docked)Start a hyperspace countdown
wW (Flight)Start a hyperspace countdown
zZ+1 (Docked)Contains an RTS
zZ+1 (Flight)Contains an RTS

Keyboard
--------

auton (Flight)Get the docking computer to "press" the flight keys to dock the ship
CTRL (Docked)Scan the keyboard to see if CTRL is currently pressed
CTRL (Flight)Scan the keyboard to see if CTRL is currently pressed
DK4 (Docked)Scan for pause, configuration and secondary flight keys
DK4 (Flight)Scan for pause, configuration and secondary flight keys
DK5 (Flight)Contains an RTS
DK9 (Docked)Set the Bitstik configuration option to the value in A
DKJ1 (Docked)Read joystick and flight controls
DKJ1 (Flight)Read joystick and flight controls
DKS1 (Flight)Scan the keyboard for a flight key
DKS2 (Docked)Read the joystick position
DKS2 (Flight)Read the joystick position
DKS2-1 (Docked)Contains an RTS
DKS2-1 (Flight)Contains an RTS
DKS3 (Docked)Toggle a configuration setting and emit a beep
DKS3 (Flight)Toggle a configuration setting and emit a beep
DKS4 (Docked)Scan the keyboard to see if a specific key is being pressed
DKS4 (Flight)Scan the keyboard to see if a specific key is being pressed
DOKEY (Docked)Scan for the joystick
DOKEY (Flight)Scan for the seven primary flight controls and apply the docking computer manoeuvring code
FLKB (Docked)Flush the keyboard buffer
FLKB (Flight)Flush the keyboard buffer
KYTB (Flight)Contains an RTS
out (Docked)Contains an RTS
PAUSE2 (Docked)Wait until a key is pressed, ignoring any existing key press
RDKEY (Docked)Scan the keyboard for key presses
RDKEY (Flight)Scan the keyboard for key presses
T95 (Docked)Print the distance to the selected system
T95 (Flight)Print the distance to the selected system
TT102 (Docked)Process function key, save key, hyperspace and chart key presses
TT102 (Flight)Process function key, save key, hyperspace and chart key presses and update the hyperspace counter
TT17 (Docked)Scan the keyboard for cursor key or joystick movement
TT17 (Flight)Scan the keyboard for cursor key or joystick movement
TT214 (Docked)Ask a question with a "Y/N?" prompt and return the response
TT217 (Docked)Scan the keyboard until a key is pressed
U% (Flight)Clear the key logger

Loader
------

BEGIN (Docked)Initialise the configuration variables and start the game
BRBR1 (Loader 3)Loader break handler: print a newline and the error message, and then hang the computer
DEEOR (Docked)Decrypt the main docked code between &1300 and &5FFF and the main game loop
DEEOR (Flight)Decrypt the main flight code between &1300 and &55FF and jump into the main game loop
DOBEGIN (Docked)Decrypt the main docked code, initialise the configuration variables and start the game
DOENTRY (Flight)Load and run the docked code
Elite loader (Loader 1)Reset vectors, change to mode 7, and load and run the ELITE3 loader
Elite loader (Part 1 of 2) (Loader 2)Various copy protection checks, and make sure there is no Tube
Elite loader (Part 1 of 3) (Loader 3)Set up the split screen mode, move code around, set up the sound envelopes and configure the system
Elite loader (Part 2 of 2) (Loader 2)Load and run the ELITE4 loader
Elite loader (Part 2 of 3) (Loader 3)Include binaries for recursive tokens, Missile blueprint and images
Elite loader (Part 3 of 3) (Loader 3)Include binaries for the loading screen images
ENTRY2 (Loader 2)Re-entry point to continue the loading process from the MPL routine
FileHandler (Sideways RAM Loader)The custom file handler that checks whether OSFILE is loading a ship blueprint file and if so, redirects the load to sideways RAM
INBAY (Docked)An unused routine that is never run
INBAY (Flight)Load and run the main docked code in T.CODE
LOAD (Loader 3)Load the main docked code, set up various vectors, run a checksum and start the game
load3 (Loader 1)Load and run the next part of the loader in the ELITE3 binary
LOADcode (Loader 3)Encrypted LOAD routine, bundled up in the loader so it can be moved to &0B00 to be run
LoadRom (Sideways RAM Loader)Copy a pre-generated ship blueprints ROM image from address &3400 into sideways RAM
loadrom% (Sideways RAM Loader)Entry point for the ROM-loading routine
LOADSCR (Loader 2)Show the mode 7 Acornsoft loading screen
LoadShipFiles (Sideways RAM Loader)Load all the ship blueprint files into sideways RAM
LOGOS (Loader 2)Print a large Acornsoft logo as part of the loading screen
LOMOD (Flight)Load a new ship blueprints file
MakeRom (Sideways RAM Loader)Create a ROM image in sideways RAM that contains all the ship blueprint files
makerom% (Sideways RAM Loader)Entry point for the routine to create the Elite ROM image in sideways RAM
ProcessBlueprint (Sideways RAM Loader)Process a blueprint entry from the loaded blueprint file, copying the blueprint into sideways RAM if it hasn't already been copied
PROT1 (Loader 2)Various copy protection shenanigans in preparation for showing the Acornsoft loading screen
PROT4 (Loader 3)Fetch the address of the keyboard translation table before carrying on with the copy protection
prstr (Loader 2)Print the NOP-terminated string immediately following the JSR instruction that called the routine
RSHIPS (Flight)Launch from the station, load a new set of ship blueprints and jump into the main game loop
SCRAM (Docked)Decrypt the main docked code, reset the flight variables and start the game
SetEdgesOffset (Sideways RAM Loader)Calculate the edges offset within sideways RAM for the blueprint we are processing and set it in bytes #3 and #16 of the blueprint
SHIPinA (Flight)Load the ship blueprints file specified in A
TestBBC (Sideways RAM Loader)Fetch details on all the ROMs in the BBC Micro (i.e. the host) and populate the sram%, used%, dupl% and eliterom% variables
testbbc% (Sideways RAM Loader)Entry point for the ROM-testing routine
TestPro (Sideways RAM Loader)Test whether we are running this on a co-processor
testpro% (Sideways RAM Loader)Entry point for the co-processor detection routine
TVT1code (Loader 3)Code block at &1100-&11E2 that remains resident in both docked and flight mode (palettes, screen mode routine and commander data)

Main loop
---------

FRCE (Docked)The 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"
FRCE (Flight)The 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"
GOIN (Flight)We jump here from part 3 of the main flight loop if the docking computer is activated by pressing "C"
M% (Flight)The entry point for the main flight loop
Main flight loop (Part 1 of 16) (Flight)Seed the random number generator
Main flight loop (Part 2 of 16) (Flight)Calculate the alpha and beta angles from the current pitch and roll of our ship
Main flight loop (Part 3 of 16) (Flight)Scan for flight keys and process the results
Main flight loop (Part 4 of 16) (Flight)For 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) (Flight)For each nearby ship: If an energy bomb has been set off, potentially kill this ship
Main flight loop (Part 6 of 16) (Flight)For 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) (Flight)For each nearby ship: Check whether we are docking, scooping or colliding with it
Main flight loop (Part 8 of 16) (Flight)For each nearby ship: Process us potentially scooping this item
Main flight loop (Part 9 of 16) (Flight)For each nearby ship: If it is a space station, check whether we are successfully docking with it
Main flight loop (Part 10 of 16) (Flight)For each nearby ship: Remove if scooped, or process collisions
Main flight loop (Part 11 of 16) (Flight)For each nearby ship: Process missile lock and firing our laser
Main flight loop (Part 12 of 16) (Flight)For each nearby ship: Draw the ship, remove if killed, loop back
Main flight loop (Part 13 of 16) (Flight)Show energy bomb effect, charge shields and energy banks
Main flight loop (Part 14 of 16) (Flight)Spawn a space station if we are close enough to the planet
Main flight loop (Part 15 of 16) (Flight)Perform altitude checks with the planet and sun and process fuel scooping if appropriate
Main flight loop (Part 16 of 16) (Flight)Process laser pulsing, E.C.M. energy drain, call stardust routine
Main game loop (Part 1 of 6) (Flight)Spawn a trader (a Cobra Mk III, Python, Boa or Anaconda)
Main game loop (Part 2 of 6) (Docked)Potentially spawn a trader, an asteroid, or a cargo canister (though this has no effect when docked)
Main game loop (Part 2 of 6) (Flight)Call the main flight loop, and potentially spawn a trader, an asteroid, or a cargo canister
Main game loop (Part 3 of 6) (Flight)Potentially spawn a cop, particularly if we've been bad
Main game loop (Part 4 of 6) (Flight)Potentially spawn a lone bounty hunter or up to four pirates
Main game loop (Part 5 of 6) (Docked)Cool down lasers, make calls to update the dashboard
Main game loop (Part 5 of 6) (Flight)Cool down lasers, make calls to update the dashboard
Main game loop (Part 6 of 6) (Docked)Process non-flight key presses (red function keys, docked keys)
Main game loop (Part 6 of 6) (Flight)Process non-flight key presses (red function keys, docked keys)
MAL1 (Flight)Marks 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
me3 (Docked)Used by me2 to jump back into the main game loop after printing an in-flight message
me3 (Flight)Used by me2 to jump back into the main game loop after printing an in-flight message
MLOOP (Docked)The 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)
MLOOP (Flight)The 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)
TT100 (Docked)The entry point for the start of the main game loop, which calls the main flight loop and the moves into the spawning routine
TT100 (Flight)The entry point for the start of the main game loop, which calls the main flight loop and the moves into the spawning routine

Market
------

BAY2 (Docked)Jump into the main loop at FRCE, setting the key "pressed" to red key f9 (so we show the Inventory screen)
dn (Docked)Print the amount of money we have left in the cash pot, then make a short, high beep and delay for 1 second
gnum (Docked)Get a number from the keyboard
NWDAV4 (Docked)Print an "ITEM?" error, make a beep and rejoin the TT210 routine
NWDAVxx (Docked)Used to rejoin this routine from the call to NWDAV4
tnpr (Docked)Work out if we have space for a specific amount of cargo
tnpr (Flight)Work out if we have space for a specific amount of cargo
tnpr1 (Flight)Work out if we have space for one tonne of cargo
TT151 (Docked)Print the name, price and availability of a market item
TT151 (Flight)Print the name, price and availability of a market item
TT152 (Docked)Print the unit ("t", "kg" or "g") for a market item
TT152 (Flight)Print the unit ("t", "kg" or "g") for a market item
TT160 (Docked)Print "t" (for tonne) and a space
TT160 (Flight)Print "t" (for tonne) and a space
TT161 (Docked)Print "kg" (for kilograms)
TT161 (Flight)Print "kg" (for kilograms)
TT163 (Docked)Print the headers for the table of market prices
TT163 (Flight)Print the headers for the table of market prices
TT167 (Docked)Show the Market Price screen (red key f7)
TT167 (Flight)Show the Market Price screen (red key f7)
TT16a (Docked)Print "g" (for grams)
TT16a (Flight)Print "g" (for grams)
TT208 (Docked)Show the Sell Cargo screen (red key f2)
TT210 (Docked)Show a list of current cargo in our hold, optionally to sell
TT210 (Flight)Show a list of current cargo in our hold, optionally to sell
TT213 (Docked)Show the Inventory screen (red key f9)
TT213 (Flight)Show the Inventory screen (red key f9)
TT219 (Docked)Show the Buy Cargo screen (red key f1)
var (Docked)Calculate QQ19+3 = economy * |economic_factor|
var (Flight)Calculate QQ19+3 = economy * |economic_factor|

Maths (Arithmetic)
------------------

ADD (Docked)Calculate (A X) = (A P) + (S R)
ADD (Flight)Calculate (A X) = (A P) + (S R)
DORND (Docked)Generate random numbers
DORND (Flight)Generate random numbers
DORND (Loader 3)Generate random numbers
DORND2 (Docked)Make sure the C flag doesn't affect the outcome
DORND2 (Flight)Make sure the C flag doesn't affect the outcome
DV41 (Docked)Calculate (P R) = 256 * DELTA / A
DV41 (Flight)Calculate (P R) = 256 * DELTA / A
DV42 (Docked)Calculate (P R) = 256 * DELTA / z_hi
DV42 (Flight)Calculate (P R) = 256 * DELTA / z_hi
DVID3B2 (Docked)Calculate K(3 2 1 0) = (A P+1 P) / (z_sign z_hi z_lo)
DVID3B2 (Flight)Calculate K(3 2 1 0) = (A P+1 P) / (z_sign z_hi z_lo)
DVID4 (Docked)Calculate (P R) = 256 * A / Q
DVID4 (Flight)Calculate (P R) = 256 * A / Q
DVIDT (Docked)Calculate (P+1 A) = (A P) / Q
DVIDT (Flight)Calculate (P+1 A) = (A P) / Q
FMLTU (Docked)Calculate A = A * Q / 256
FMLTU (Flight)Calculate A = A * Q / 256
FMLTU2 (Docked)Calculate A = K * sin(A)
FMLTU2 (Flight)Calculate A = K * sin(A)
GC2 (Docked)Calculate (Y X) = (A P) * 4
GC2 (Flight)Calculate (Y X) = (A P) * 4
GCASH (Docked)Calculate (Y X) = P * Q * 4
GCASH (Flight)Calculate (Y X) = P * Q * 4
LCASH (Docked)Subtract an amount of cash from the cash pot
LL120 (Docked)Calculate (Y X) = (S x1_lo) * XX12+2 or (S x1_lo) / XX12+2
LL120 (Flight)Calculate (Y X) = (S x1_lo) * XX12+2 or (S x1_lo) / XX12+2
LL121 (Docked)Calculate (Y X) = (S R) / Q and set the sign to the opposite of the top byte on the stack
LL121 (Flight)Calculate (Y X) = (S R) / Q and set the sign to the opposite of the top byte on the stack
LL122 (Docked)Calculate (Y X) = (S R) * Q and set the sign to the opposite of the top byte on the stack
LL122 (Flight)Calculate (Y X) = (S R) * Q and set the sign to the opposite of the top byte on the stack
LL123 (Docked)Calculate (Y X) = (S R) / XX12+2 or (S R) * XX12+2
LL123 (Flight)Calculate (Y X) = (S R) / XX12+2 or (S R) * XX12+2
LL128 (Docked)Contains an RTS
LL128 (Flight)Contains an RTS
LL129 (Docked)Calculate Q = XX12+2, A = S EOR XX12+3 and (S R) = |S R|
LL129 (Flight)Calculate Q = XX12+2, A = S EOR XX12+3 and (S R) = |S R|
LL133 (Docked)Negate (Y X) and return from the subroutine LL128 Contains an RTS
LL133 (Flight)Negate (Y X) and return from the subroutine LL128 Contains an RTS
LL28 (Docked)Calculate R = 256 * A / Q
LL28 (Flight)Calculate R = 256 * A / Q
LL28+4 (Docked)Skips the A >= Q check and always returns with C flag cleared, so this can be called if we know the division will work
LL28+4 (Flight)Skips the A >= Q check and always returns with C flag cleared, so this can be called if we know the division will work
LL31 (Docked)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
LL31 (Flight)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
LL38 (Docked)Calculate (S A) = (S R) + (A Q)
LL38 (Flight)Calculate (S A) = (S R) + (A Q)
LL5 (Docked)Calculate Q = SQRT(R Q)
LL5 (Flight)Calculate Q = SQRT(R Q)
LL61 (Docked)Calculate (U R) = 256 * A / Q
LL61 (Flight)Calculate (U R) = 256 * A / Q
LL62 (Docked)Calculate 128 - (U R)
LL62 (Flight)Calculate 128 - (U R)
MAD (Docked)Calculate (A X) = Q * A + (S R)
MAD (Flight)Calculate (A X) = Q * A + (S R)
MAS3 (Flight)Calculate A = x_hi^2 + y_hi^2 + z_hi^2 in the K% block
MCASH (Docked)Add an amount of cash to the cash pot
MCASH (Flight)Add an amount of cash to the cash pot
MLS1 (Flight)Calculate (A P) = ALP1 * A
MLS2 (Docked)Calculate (S R) = XX(1 0) and (A P) = A * ALP1
MLS2 (Flight)Calculate (S R) = XX(1 0) and (A P) = A * ALP1
MLTU2 (Docked)Calculate (A P+1 P) = (A ~P) * Q
MLTU2 (Flight)Calculate (A P+1 P) = (A ~P) * Q
MLTU2-2 (Docked)Set Q to X, so this calculates (A P+1 P) = (A ~P) * X
MLTU2-2 (Flight)Set Q to X, so this calculates (A P+1 P) = (A ~P) * X
MLU1 (Docked)Calculate Y1 = y_hi and (A P) = |y_hi| * Q for Y-th stardust
MLU1 (Flight)Calculate Y1 = y_hi and (A P) = |y_hi| * Q for Y-th stardust
MLU2 (Docked)Calculate (A P) = |A| * Q
MLU2 (Flight)Calculate (A P) = |A| * Q
MU1 (Docked)Copy X into P and A, and clear the C flag
MU1 (Flight)Copy X into P and A, and clear the C flag
MU11 (Docked)Calculate (A P) = P * X
MU11 (Flight)Calculate (A P) = P * X
MU5 (Docked)Set K(3 2 1 0) = (A A A A) and clear the C flag
MU5 (Flight)Set K(3 2 1 0) = (A A A A) and clear the C flag
MU6 (Docked)Set P(1 0) = (A A)
MU6 (Flight)Set P(1 0) = (A A)
MULT1 (Docked)Calculate (A P) = Q * A
MULT1 (Flight)Calculate (A P) = Q * A
MULT12 (Docked)Calculate (S R) = Q * A
MULT12 (Flight)Calculate (S R) = Q * A
MULT3 (Flight)Calculate K(3 2 1 0) = (A P+1 P) * Q
MULTS-2 (Flight)Calculate (A P) = X * A
MULTU (Docked)Calculate (A P) = P * Q
MULTU (Flight)Calculate (A P) = P * Q
MUT1 (Docked)Calculate R = XX and (A P) = Q * A
MUT1 (Flight)Calculate R = XX and (A P) = Q * A
MUT2 (Docked)Calculate (S R) = XX(1 0) and (A P) = Q * A
MUT2 (Flight)Calculate (S R) = XX(1 0) and (A P) = Q * A
MUT3 (Docked)An unused routine that does the same as MUT2
MUT3 (Flight)An unused routine that does the same as MUT2
PIX1 (Docked)Calculate (YY+1 SYL+Y) = (A P) + (S R) and draw stardust particle
PIX1 (Flight)Calculate (YY+1 SYL+Y) = (A P) + (S R) and draw stardust particle
ROOT (Loader 3)Calculate ZP = SQRT(ZP(1 0))
SPS2 (Flight)Calculate (Y X) = A / 10
SQUA (Docked)Clear bit 7 of A and calculate (A P) = A * A
SQUA (Flight)Clear bit 7 of A and calculate (A P) = A * A
SQUA2 (Docked)Calculate (A P) = A * A
SQUA2 (Flight)Calculate (A P) = A * A
SQUA2 (Loader 3)Calculate (A P) = A * A
TAS1 (Flight)Calculate K3 = (x_sign x_hi x_lo) - V(1 0)
TIS1 (Docked)Calculate (A ?) = (-X * A + (S R)) / 96
TIS1 (Flight)Calculate (A ?) = (-X * A + (S R)) / 96
TIS2 (Docked)Calculate A = A / Q
TIS2 (Flight)Calculate A = A / Q
TIS3 (Docked)Calculate -(nosev_1 * roofv_1 + nosev_2 * roofv_2) / nosev_3
TIS3 (Flight)Calculate -(nosev_1 * roofv_1 + nosev_2 * roofv_2) / nosev_3
TT113 (Docked)Contains an RTS
TT113 (Flight)Contains an RTS
Unused duplicate of MULTU (Docked)An unused duplicate of the MULTU routine
Unused duplicate of MULTU (Flight)An unused duplicate of the MULTU routine
VCSU1 (Flight)Calculate vector K3(8 0) = [x y z] - coordinates of the sun or space station
VCSUB (Flight)Calculate vector K3(8 0) = [x y z] - coordinates in (A V)

Maths (Geometry)
----------------

ARCTAN (Flight)Calculate A = arctan(P / Q)
FAROF (Flight)Compare x_hi, y_hi and z_hi with 224
FAROF2 (Flight)Compare x_hi, y_hi and z_hi with A
LL51 (Docked)Calculate the dot product of XX15 and XX16
LL51 (Flight)Calculate the dot product of XX15 and XX16
m (Flight)Do not include A in the calculation
MA9 (Flight)Contains an RTS
MAS1 (Flight)Add an orientation vector coordinate to an INWK coordinate
MAS2 (Flight)Calculate a cap on the maximum distance to the planet or sun
MAS4 (Flight)Calculate a cap on the maximum distance to a ship
NO1 (Docked)Contains an RTS
NO1 (Flight)Contains an RTS
NORM (Docked)Normalise the three-coordinate vector in XX15
NORM (Flight)Normalise the three-coordinate vector in XX15
PROJ (Flight)Project the current ship or planet onto the screen
SPS1 (Docked)Calculate the vector to the planet and store it in XX15
SPS1 (Flight)Calculate the vector to the planet and store it in XX15
SPS1+1 (Docked)A BRK instruction
SPS1+1 (Flight)A BRK instruction
SPS3 (Docked)Copy a space coordinate from the K% block into K3
SPS3 (Flight)Copy a space coordinate from the K% block into K3
SPS4 (Flight)Calculate the vector to the space station
TA2 (Docked)Calculate the length of the vector in XX15 (ignoring the low coordinates), returning it in Q
TA2 (Flight)Calculate the length of the vector in XX15 (ignoring the low coordinates), returning it in Q
TAS2 (Docked)Normalise the three-coordinate vector in K3
TAS2 (Flight)Normalise the three-coordinate vector in K3
TAS3 (Docked)Calculate the dot product of XX15 and an orientation vector
TAS3 (Flight)Calculate the dot product of XX15 and an orientation vector
TAS3-2 (Flight)Calculate nosev . XX15
TAS4 (Flight)Calculate the dot product of XX15 and one of the space station's orientation vectors
TAS6 (Flight)Negate the vector in XX15 so it points in the opposite direction
TIDY (Docked)Orthonormalise the orientation vectors for a ship
TIDY (Flight)Orthonormalise the orientation vectors for a ship

Missions
--------

BRIEF (Docked)Start mission 1 and show the mission briefing
BRIEF2 (Docked)Start mission 2
BRIEF3 (Docked)Receive the briefing and plans for mission 2
BRIS (Docked)Clear the screen, display "INCOMING MESSAGE" and wait for 2 seconds
BRP (Docked)Print an extended token and show the Status Mode screen
BRPS (Docked)Print the extended token in A, show the Status Mode screen and return from the subroutine
DEBRIEF (Docked)Finish mission 1
DEBRIEF2 (Docked)Finish mission 2
PAS1 (Docked)Display a rotating ship at space coordinates (0, 112, 256) and scan the keyboard
PAUSE (Docked)Display a rotating ship, waiting until a key is pressed, then remove the ship from the screen
THERE (Flight)Check whether we are in the Constrictor's system in mission 1

Moving
------

MV40 (Flight)Rotate the planet or sun's location in space by the amount of pitch and roll of our ship
MV45 (Flight)Rejoin the MVEIT routine after the rotation, tactics and scanner code
MVEIT (Part 1 of 9) (Docked)Move current ship: Tidy the orientation vectors
MVEIT (Part 1 of 9) (Flight)Move current ship: Tidy the orientation vectors
MVEIT (Part 2 of 9) (Flight)Move current ship: Call tactics routine, remove ship from scanner
MVEIT (Part 3 of 9) (Flight)Move current ship: Move ship forward according to its speed
MVEIT (Part 4 of 9) (Flight)Move current ship: Apply acceleration to ship's speed as a one-off
MVEIT (Part 5 of 9) (Flight)Move current ship: Rotate ship's location by our pitch and roll
MVEIT (Part 6 of 9) (Flight)Move current ship: Move the ship in space according to our speed
MVEIT (Part 7 of 9) (Docked)Move current ship: Rotate ship's orientation vectors by pitch/roll
MVEIT (Part 7 of 9) (Flight)Move current ship: Rotate ship's orientation vectors by pitch/roll
MVEIT (Part 8 of 9) (Docked)Move current ship: Rotate ship about itself by its own pitch/roll
MVEIT (Part 8 of 9) (Flight)Move current ship: Rotate ship about itself by its own pitch/roll
MVEIT (Part 9 of 9) (Docked)Move current ship: Redraw on scanner, if it hasn't been destroyed
MVEIT (Part 9 of 9) (Flight)Move current ship: Redraw on scanner, if it hasn't been destroyed
MVS4 (Docked)Apply pitch and roll to an orientation vector
MVS4 (Flight)Apply pitch and roll to an orientation vector
MVS5 (Docked)Apply a 3.6 degree pitch or roll to an orientation vector
MVS5 (Flight)Apply a 3.6 degree pitch or roll to an orientation vector
MVT1 (Docked)Calculate (x_sign x_hi x_lo) = (x_sign x_hi x_lo) + (A R)
MVT1 (Flight)Calculate (x_sign x_hi x_lo) = (x_sign x_hi x_lo) + (A R)
MVT1-2 (Docked)Clear bits 0-6 of A before entering MVT1
MVT1-2 (Flight)Clear bits 0-6 of A before entering MVT1
MVT3 (Docked)Calculate K(3 2 1) = (x_sign x_hi x_lo) + K(3 2 1)
MVT3 (Flight)Calculate K(3 2 1) = (x_sign x_hi x_lo) + K(3 2 1)
MVT6 (Docked)Calculate (A P+2 P+1) = (x_sign x_hi x_lo) + (A P+2 P+1)
MVT6 (Flight)Calculate (A P+2 P+1) = (x_sign x_hi x_lo) + (A P+2 P+1)
SFS2 (Flight)Move a ship in space along one of the coordinate axes

Save and load
-------------

BRKBK (Docked)Set the standard BRKV handler for the game
CAT (Docked)Catalogue a disc, wait for a key press and display the disc access menu
CATD (Loader 3)Load disc sectors 0 and 1 to &0E00 and &0F00 respectively
CATDcode (Loader 3)The CATD routine, bundled up in the loader so it can be moved to &0D7A to be run
CATS (Docked)Ask for a disc drive number and print a catalogue of that drive
CHECK (Docked)Calculate the checksum for the last saved commander data block
DELT (Docked)Catalogue a disc, ask for a filename to delete, and delete the file
DELT-1 (Docked)Contains an RTS
GTDRV (Docked)Get an ASCII disc drive number from the keyboard
GTNME (Docked)Skip the delay at the start of the routine
GTNMEW (Docked)Fetch the name of a commander file to save or load
LOD (Docked)Load a commander file
LOR (Docked)Set the C flag and return from the subroutine
MEBRK (Docked)The BRKV handler for disc access operations
QUS1 (Docked)Save or load the commander file
retry (Docked)Scan the keyboard until a key is pressed and display the disc access menu
SVE (Docked)Save the commander file
TR1 (Docked)Copy the last saved commander's name from NA% to INWK
TRNME (Docked)Copy the last saved commander's name from INWK to NA%

Ship hangar
-----------

HA1 (Docked)Contains an RTS
HA3 (Docked)Contains an RTS
HALL (Docked)Draw the ships in the ship hangar, then draw the hangar
HANGER (Docked)Display the ship hangar
HAS1 (Docked)Draw a ship in the ship hangar
HAS2 (Docked)Draw a hangar background line from left to right
HAS3 (Docked)Draw a hangar background line from right to left
UNWISE (Docked)Switch the main line-drawing routine between EOR and OR logic

Sound
-----

BEEP (Docked)Make a short, high beep
BEEP (Flight)Make a short, high beep
BELL (Docked)Make a standard system beep
BELL (Flight)Make a standard system beep
ECMOF (Docked)Switch off the E.C.M.
ECMOF (Flight)Switch off the E.C.M.
EXNO (Docked)Make the sound of a laser strike or ship explosion
EXNO (Flight)Make the sound of a laser strike or ship explosion
EXNO-2 (Docked)Set X = 7 and fall through into EXNO to make the sound of a ship exploding
EXNO-2 (Flight)Set X = 7 and fall through into EXNO to make the sound of a ship exploding
EXNO3 (Docked)Make an explosion sound
EXNO3 (Flight)Make an explosion sound
NO3 (Docked)Make a sound from a prepared sound block
NO3 (Flight)Make a sound from a prepared sound block
NOISE (Docked)Make the sound whose number is in A
NOISE (Flight)Make the sound whose number is in A
NOS1 (Docked)Prepare a sound block
NOS1 (Flight)Prepare a sound block

Stardust
--------

FLIP (Docked)Reflect the stardust particles in the screen diagonal and redraw the stardust field
FLIP (Flight)Reflect the stardust particles in the screen diagonal and redraw the stardust field
nWq (Flight)Create a random cloud of stardust
NWSTARS (Flight)Initialise the stardust field
STARS (Flight)The main routine for processing the stardust
STARS1 (Flight)Process the stardust for the front view
STARS2 (Flight)Process the stardust for the left or right view
STARS6 (Flight)Process the stardust for the rear view

Start and end
-------------

BR1 (Part 1 of 2) (Docked)Show the "Load New Commander (Y/N)?" screen and start the game
BR1 (Part 2 of 2) (Docked)Show the "Press Fire or Space, Commander" screen and start the game
DEATH (Flight)Display the death screen
DEATH2 (Docked)Reset most of the game and restart from the title screen
DEATH2 (Flight)Reset most of the game and restart from the title screen
DFAULT (Docked)Reset the current commander data block to the last saved commander
QU5 (Docked)Restart the game using the last saved commander without asking whether to load a new commander file
RES2 (Docked)Reset a number of flight variables and workspaces
RES2 (Flight)Reset a number of flight variables and workspaces
RESET (Docked)Reset most variables
RESET (Flight)Reset most variables
TITLE (Docked)Display a title screen with a rotating ship and prompt
TT170 (Docked)Main entry point for the Elite game code

Status
------

BAD (Docked)Calculate how bad we have been
BAD (Flight)Calculate how bad we have been
BAY (Docked)Go to the docking bay (i.e. show the Status Mode screen)
cmn (Docked)Print the commander's name
cmn (Flight)Print the commander's name
cmn-1 (Docked)Contains an RTS
cmn-1 (Flight)Contains an RTS
csh (Docked)Print the current amount of cash
csh (Flight)Print the current amount of cash
EXNO2 (Docked)Process us making a kill
EXNO2 (Flight)Process us making a kill
fwl (Docked)Print fuel and cash levels
fwl (Flight)Print fuel and cash levels
STATUS (Docked)Show the Status Mode screen (red key f8)
STATUS (Flight)Show the Status Mode screen (red key f8)

Tactics
-------

ANGRY (Flight)Make a ship hostile
fq1 (Flight)Used to add a cargo canister to the universe
FR1 (Flight)Display the "missile jammed" message
FR1-2 (Flight)Clear the C flag and return from the subroutine
FRMIS (Flight)Fire a missile from our ship
FRS1 (Flight)Launch a ship straight ahead of us, below the laser sights
GOPL (Flight)Make the ship head towards the planet
HI1 (Flight)Contains an RTS
HITCH (Flight)Work out if the ship in INWK is in our crosshairs
SFRMIS (Flight)Add an enemy missile to our local bubble of universe
TA151 (Flight)Make the ship head towards the planet TA9-1 Contains an RTS
TA9-1 (Flight)Contains an RTS
TACTICS (Part 1 of 7) (Flight)Apply tactics: Process missiles, both enemy missiles and our own
TACTICS (Part 2 of 7) (Flight)Apply tactics: Escape pod, station, lone Thargon, safe-zone pirate
TACTICS (Part 3 of 7) (Flight)Apply tactics: Calculate dot product to determine ship's aim
TACTICS (Part 4 of 7) (Flight)Apply tactics: Check energy levels, maybe launch escape pod if low
TACTICS (Part 5 of 7) (Flight)Apply tactics: Consider whether to launch a missile at us
TACTICS (Part 6 of 7) (Flight)Apply tactics: Consider firing a laser at us, if aim is true
TACTICS (Part 7 of 7) (Flight)Apply tactics: Set pitch, roll, and acceleration

Text
----

BPRNT (Docked)Print a 32-bit number, left-padded to a specific number of digits, with an optional decimal point
BPRNT (Flight)Print a 32-bit number, left-padded to a specific number of digits, with an optional decimal point
CHPR (Docked)Print a character at the text cursor by poking into screen memory
crlf (Docked)Tab to column 21 and print a colon
crlf (Flight)Tab to column 21 and print a colon
DASC (Docked)DASC does exactly the same as TT26 and prints a character at the text cursor, with support for verified text in extended tokens
DETOK (Docked)Print an extended recursive token from the TKN1 token table
DETOK2 (Docked)Print an extended text token (1-255)
DETOK3 (Docked)Print an extended recursive token from the RUTOK token table
dn2 (Docked)Make a short, high beep and delay for 1 second
DTEN (Docked)Print recursive token number X from the token table pointed to by (A V), used to print tokens from the RUTOK table via calls to DETOK3
DTS (Docked)Print a single letter in the correct case
ex (Docked)Print a recursive token
ex (Flight)Print a recursive token
FEED (Docked)Print a newline
MT1 (Docked)Switch to ALL CAPS when printing extended tokens
MT13 (Docked)Switch to lower case when printing extended tokens
MT14 (Docked)Switch to justified text when printing extended tokens
MT15 (Docked)Switch to left-aligned text when printing extended tokens
MT16 (Docked)Print the character in variable DTW7
MT17 (Docked)Print the selected system's adjective, e.g. Lavian for Lave
MT18 (Docked)Print a random 1-8 letter word in Sentence Case
MT19 (Docked)Capitalise the next letter
MT2 (Docked)Switch to Sentence Case when printing extended tokens
MT23 (Docked)Move to row 10, switch to white text, and switch to lower case when printing extended tokens
MT26 (Docked)Fetch a line of text from the keyboard
MT27 (Docked)Print the captain's name during mission briefings
MT28 (Docked)Print the location hint during the mission 1 briefing
MT29 (Docked)Move to row 6, switch to white text, and switch to lower case when printing extended tokens
MT5 (Docked)Switch to extended tokens
MT6 (Docked)Switch to standard tokens in Sentence Case
MT8 (Docked)Tab to column 6 and start a new word when printing extended tokens
MT9 (Docked)Clear the screen and set the current view type to 1
plf (Docked)Print a text token followed by a newline
plf (Flight)Print a text token followed by a newline
plf2 (Docked)Print text followed by a newline and indent of 6 characters
plf2 (Flight)Print text followed by a newline and indent of 6 characters
pr2 (Docked)Print an 8-bit number, left-padded to 3 digits, and optional point
pr2 (Flight)Print an 8-bit number, left-padded to 3 digits, and optional point
pr2+2 (Docked)Print the 8-bit number in X to the number of digits in A
pr2+2 (Flight)Print the 8-bit number in X to the number of digits in A
pr5 (Docked)Print a 16-bit number, left-padded to 5 digits, and optional point
pr5 (Flight)Print a 16-bit number, left-padded to 5 digits, and optional point
pr6 (Docked)Print 16-bit number, left-padded to 5 digits, no point
pr6 (Flight)Print 16-bit number, left-padded to 5 digits, no point
prq (Docked)Print a text token followed by a question mark
prq (Flight)Print a text token followed by a question mark
prq+3 (Docked)Print a question mark
prq+3 (Flight)Print a question mark
qw (Docked)Print a recursive token in the range 128-145
qw (Flight)Print a recursive token in the range 128-145
R5-1 (Docked)Contains an RTS
RREN (Docked)Prints the character definition pointed to by P(2 1) at the screen address pointed to by (A SC). Used by the BULB routine
RREN (Flight)Prints the character definition pointed to by P(2 1) at the screen address pointed to by (A SC). Used by the BULB routine
rT9 (Docked)Contains an RTS
rT9 (Flight)Contains an RTS
spc (Docked)Print a text token followed by a space
spc (Flight)Print a text token followed by a space
TT11 (Docked)Print a 16-bit number, left-padded to n digits, and optional point
TT11 (Flight)Print a 16-bit number, left-padded to n digits, and optional point
TT162 (Docked)Print a space
TT162 (Flight)Print a space
TT162+2 (Docked)Jump to TT27 to print the text token in A
TT162+2 (Flight)Jump to TT27 to print the text token in A
TT26 (Docked)Print a character at the text cursor, with support for verified text in extended tokens
TT26 (Flight)Print a character at the text cursor by poking into screen memory
TT27 (Docked)Print a text token
TT27 (Flight)Print a text token
TT41 (Docked)Print a letter according to Sentence Case
TT41 (Flight)Print a letter according to Sentence Case
TT42 (Docked)Print a letter in lower case
TT42 (Flight)Print a letter in lower case
TT43 (Docked)Print a two-letter token or recursive token 0-95
TT43 (Flight)Print a two-letter token or recursive token 0-95
TT44 (Docked)Jumps to TT26 to print the character in A (used to enable us to use a branch instruction to jump to TT26)
TT44 (Flight)Jumps to TT26 to print the character in A (used to enable us to use a branch instruction to jump to TT26)
TT45 (Docked)Print a letter in lower case
TT45 (Flight)Print a letter in lower case
TT46 (Docked)Print a character and switch to capitals
TT46 (Flight)Print a character and switch to capitals
TT48 (Docked)Contains an RTS
TT48 (Flight)Contains an RTS
TT60 (Docked)Print a text token and a paragraph break
TT60 (Flight)Print a text token and a paragraph break
TT67 (Docked)Print a newline
TT67 (Flight)Print a newline
TT68 (Docked)Print a text token followed by a colon
TT68 (Flight)Print a text token followed by a colon
TT69 (Docked)Set Sentence Case and print a newline
TT69 (Flight)Set Sentence Case and print a newline
TT73 (Docked)Print a colon
TT73 (Flight)Print a colon
TT74 (Docked)Print a character
TT74 (Flight)Print a character
TTX69 (Docked)Print a paragraph break
TTX69 (Flight)Print a paragraph break
VOWEL (Docked)Test whether a character is a vowel

Universe
--------

cpl (Docked)Print the selected system name
cpl (Flight)Print the selected system name
GINF (Docked)Fetch the address of a ship's data block into INF
GINF (Flight)Fetch the address of a ship's data block into INF
GTHG (Flight)Spawn a Thargoid ship and a Thargon companion
GVL (Flight)Calculate the availability of market items
hy5 (Docked)Contains an RTS
hy5 (Flight)Contains an RTS
hyp1 (Docked)Process a jump to the system closest to (QQ9, QQ10)
hyp1 (Flight)Process a jump to the system closest to (QQ9, QQ10)
hyp1+3 (Docked)Jump 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
hyp1+3 (Flight)Jump 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
hyR (Flight)Contains an RTS
jmp (Docked)Set the current system to the selected system
jmp (Flight)Set the current system to the selected system
KILLSHP (Flight)Remove a ship from our local bubble of universe
KS1 (Flight)Remove the current ship from our local bubble of universe
KS2 (Flight)Check the local bubble for missiles with target lock
KS3 (Flight)Set the SLSP ship line heap pointer after shuffling ship slots
KS4 (Flight)Remove the space station and replace it with the sun
NwS1 (Docked)Flip the sign and double an INWK byte
NwS1 (Flight)Flip the sign and double an INWK byte
NWSHP (Docked)Add a new ship to our local bubble of universe
NWSHP (Flight)Add a new ship to our local bubble of universe
NWSPS (Flight)Add a new space station to our local bubble of universe
oh (Flight)Contains an RTS SPIN2 Remove any randomness: spawn cargo of a specific type (given in X), and always spawn the number given in A
PDESC (Docked)Print the system's extended description or a mission 1 directive
ping (Docked)Set the selected system to the current system
ping (Flight)Set the selected system to the current system
SFS1 (Flight)Spawn a child ship from the current (parent) ship
SFS1-2 (Flight)Add a missile to the local bubble that has AI enabled, is hostile, but has no E.C.M.
SOLAR (Flight)Set up various aspects of arriving in a new system
SOS1 (Flight)Update the missile indicators, set up the planet data block
SPIN (Flight)Randomly spawn cargo from a destroyed ship
SPIN2 (Flight)Remove any randomness: spawn cargo of a specific type (given in X), and always spawn the number given in A
tal (Docked)Print the current galaxy number
tal (Flight)Print the current galaxy number
TT111 (Docked)Set the current system to the nearest system to a point
TT111 (Flight)Set the current system to the nearest system to a point
TT111-1 (Docked)Contains an RTS
TT111-1 (Flight)Contains an RTS
TT146 (Docked)Print the distance to the selected system in light years
TT146 (Flight)Print the distance to the selected system in light years
TT20 (Docked)Twist the selected system's seeds four times
TT20 (Flight)Twist the selected system's seeds four times
TT24 (Docked)Calculate system data from the system seeds
TT24 (Flight)Calculate system data from the system seeds
TT25 (Docked)Show the Data on System screen (red key f6)
TT25 (Flight)Show the Data on System screen (red key f6)
TT54 (Docked)Twist the selected system's seeds
TT54 (Flight)Twist the selected system's seeds
TT70 (Docked)Display "MAINLY " and jump to TT72
TT70 (Flight)Display "MAINLY " and jump to TT72
TT72 (Docked)Used by TT70 to re-enter the routine after displaying "MAINLY" for the economy type
TT72 (Flight)Used by TT70 to re-enter the routine after displaying "MAINLY" for the economy type
TT81 (Docked)Set the selected system's seeds to those of system 0
TT81 (Flight)Set the selected system's seeds to those of system 0
ypl (Docked)Print the current system name
ypl (Flight)Print the current system name
ypl-1 (Docked)Contains an RTS
ypl-1 (Flight)Contains an RTS
Ze (Docked)Initialise the INWK workspace to a hostile ship
Ze (Flight)Initialise the INWK workspace to a hostile ship
ZINF (Docked)Reset the INWK workspace and orientation vectors
ZINF (Flight)Reset the INWK workspace and orientation vectors

Utility routines
----------------

BRBR (Docked)The standard BRKV handler for the game
DELAY (Docked)Wait for a specified time, in 1/50s of a second
DELAY (Flight)Wait for a specified time, in 1/50s of a second
FX200 (Docked)Set the behaviour of the ESCAPE and BREAK keys
GTNMES (Docked)An unused routine that fetches the name of a commander file
MPL (Loader 2)Move two pages of memory from LOADcode to LOAD and jump to ENTRY2
MVBL (Loader 3)Decrypt and move a multi-page block of memory
MVPG (Loader 3)Decrypt and move a page of memory
OSB (Loader 3)A convenience routine for calling OSBYTE with Y = 0
ZEBC (Docked)Zero-fill pages &B and &C
ZERO (Docked)Reset the local bubble of universe and ship status
ZERO (Flight)Reset the local bubble of universe and ship status
ZES1 (Docked)Zero-fill the page whose number is in X
ZES1 (Flight)Zero-fill the page whose number is in X
ZES2 (Docked)Zero-fill a specific page
ZES2 (Flight)Zero-fill a specific page