Skip to navigation

Elite on the BBC Micro

A-Z index of the source code [6502SP version]

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

NameCategoryDescription
ABORTDashboardDisarm missiles and update the dashboard indicators
ABORT2DashboardSet/unset the lock target for a missile and update the dashboard
acornDemoThe text for the demo's opening scroll text
ACTMaths (Geometry)Arctan table
ADDMaths (Arithmetic)Calculate (A X) = (A P) + (S R)
ADD (I/O processor)Maths (Arithmetic)Calculate (A X) = (A P) + (S R)
ADDBYT (I/O processor)Drawing linesImplement the OSWRCH 130 command (add a byte to a line and draw it when all bytes are received)
ADPARAMS (I/O processor)DashboardImplement the OSWRCH 137 command (add a dashboard parameter and update the dashboard when all are received)
ALP1Workspace variable Magnitude of the roll angle alpha, i.e. |alpha|, which is a positive value between 0 and 31
ALP1 (I/O processor)Workspace 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
ALP2 (I/O processor)Workspace 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
ALTIT (I/O processor)Workspace variable Our altitude above the surface of the planet or sun
ANGRYTacticsMake a ship hostile
antilogMaths (Arithmetic)Binary antilogarithm table
antilog (I/O processor)Maths (Arithmetic)Binary antilogarithm table
antilogODDMaths (Arithmetic)Binary antilogarithm table
antilogODD (I/O processor)Maths (Arithmetic)Binary antilogarithm table
ARCTANMaths (Geometry)Calculate A = arctan(P / Q)
ASHWorkspace variable Aft shield status
ASH (I/O processor)Workspace variable Aft shield status
autoWorkspace variable Docking computer activation status
autonKeyboardGet the docking computer to "press" the flight keys to dock the ship
AVLWorkspace variable Market availability in the current system
B% (Loader 1)Screen modeVDU commands for setting the square mode 1 screen
backtonormalUtility routinesDisable the keyboard, set the SVN flag to 0, and return with A = 0
BADStatusCalculate how bad we have been
BALIWorkspace variable The progress of the Star Wars scroll text as it scrolls, from 254 (off the bottom of the screen) to 2 (fully scrolled). Can also be thought of as a measure of how much of the scroll text has yet to appear on-screen
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
BEGINLoaderInitialise the configuration variables and start the game
BEGINLIN (I/O processor)Drawing linesImplement the OSWRCH 129 command (start receiving a new line to draw)
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
BET1 (I/O processor)Workspace 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
BETA (I/O processor)Workspace variable The current pitch angle beta, which is reduced from JSTY to a sign-magnitude value between -8 and +8
BLINEDrawing circlesDraw a circle segment and add it to the ball line heap
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
BRBRUtility routinesThe standard BRKV handler for the game
BRIEFMissionsStart mission 1 and show the mission briefing
BRIEF2MissionsStart mission 2
BRIEF3MissionsReceive the briefing and plans for mission 2
BRISMissionsClear the screen, display "INCOMING MESSAGE" and wait for 2 seconds
BRKBKSave and loadSet the standard BRKV handler for the game
brkdUtility routinesThe brkd counter for error handling
BRPMissionsPrint an extended token and show the Status Mode screen
BRPSMissionsPrint the extended token in A, show the Status Mode screen and return from the subroutine
BSTWorkspace variable Fuel scoops (BST stands for "barrel status")
BSTKWorkspace variable Bitstik configuration setting
bufKeyboardThe two OSWORD size bytes for transmitting the key logger from the I/O processor to the parasite
BUFWorkspace variable The line buffer used by DASC to print justified text
BUMP2DashboardBump up the value of the pitch or roll dashboard indicator
byianDemoThe text for the demo's middle scroll text
cEquipmentContains an RTS
CABTMPWorkspace variable Cabin temperature
CABTMP (I/O processor)Workspace variable Cabin temperature
CASHWorkspace variable Our current cash pot
CATSave and loadCatalogue a disc, wait for a key press and display the disc access menu
CATFWorkspace variable This byte appears to be unused (the CATF variable in the I/O processor code is used to store the CATF flag, not this one)
CATF (I/O processor)Workspace variable The disc catalogue flag
CATSSave and loadAsk for a disc drive number and print a catalogue of that drive
CHARTextMacro definition for characters in the recursive token table
CHECKSave and loadCalculate the checksum for the last saved commander data block
ChecksumCopy protectionChecksum the code from &1000 to &9FFF and check against S%-1
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
CHPRTextSend a character to the I/O processor for printing or processing
CIRCLEDrawing circlesDraw a circle for the planet
CIRCLE2Drawing circlesDraw a circle (for the planet or chart)
CIRCLE3Drawing circlesJust add the circle segments to the existing ball line heap - do not send the send the ball line heap to the I/O processor for drawing on-screen
CLDELAYUtility routinesDelay by iterating through 5 * 256 (1280) empty loops
cls (I/O processor)Utility routinesClear the top part of the screen and draw a white border
CLYNSUtility routinesClear the bottom three text rows of the mode 1 screen by sending a #clyns command to the I/O processor
CLYNS (I/O processor)Utility routinesImplement the #clyns command (clear the bottom of the 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 1)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 1)Drawing planetsA counter for use in drawing Saturn's background stars
CNT3 (Loader 1)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
COL (I/O processor)Workspace variable Temporary storage, used to store colour information when drawing pixels in the dashboard
COLDLoaderCopy the recursive tokens and ship blueprints to their correct locations
COMCWorkspace variable The colour of the dot on the compass
COMPASDashboardUpdate the compass
COMXWorkspace variable The x-coordinate of the compass dot
COMYWorkspace variable The y-coordinate of the compass dot
CONTTextMacro definition for control codes in the recursive token table
copyright (Loader 1)Copy protectionA copyright notice, buried in the code
CPIX2 (I/O processor)Drawing pixelsDraw a single-height dash on the dashboard
CPIX4 (I/O processor)Drawing 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
CTLISave and loadThe OS command string for cataloguing a disc
CTRLKeyboardScan the keyboard to see if CTRL is currently pressed
CTWOSDrawing pixelsReady-made single-pixel character row bytes for mode 5
CTWOS (I/O processor)Drawing pixelsReady-made single-pixel character row bytes for mode 2
DAMPWorkspace variable Keyboard damping configuration setting
DASCTextDASC does exactly the same as TT26 and prints a character at the text cursor, with support for verified text in extended tokens
DCS1FlightCalculate the vector from the ideal docking position to the ship
deWorkspace variable Equipment destruction flag
DEATHStart and endDisplay the death screen
DEATH2Start and endReset most of the game and restart from the title screen
DEBRIEFMissionsFinish mission 1
DEBRIEF2MissionsFinish mission 2
DEEORCopy protectionDecrypt bytes between &1300 and &9FFF by EOR'ing them with their page offset
DELAYUtility routinesWait for a specified time, in 1/50s of a second
DELISave and loadThe OS command string for deleting a file
DELTSave and loadCatalogue a disc, ask for a filename to delete, and delete the file
DELT-1Save and loadContains an RTS
DELT4Workspace variable Our current speed * 64 as a 16-bit value
DELTAWorkspace variable Our current speed, in the range 1-40
DELTA (I/O processor)Workspace variable Our current speed, in the range 1-40
DEMONDemoShow the demo
DENGYFlightDrain some energy from the energy banks
DET1Screen modeShow or hide the dashboard (for when we die) by sending a #DODIALS command to the I/O processor
DETOKTextPrint an extended recursive token from the TKN1 token table
DETOK2TextPrint an extended text token (1-255)
DETOK3TextPrint an extended recursive token from the RUTOK token table
DFAULTStart and endReset the current commander data block to the last saved commander
DIALSDashboardUpdate the dashboard indicators and flight variables by sending a #RDPARAMS command to the I/O processor
DIALS (Part 1 of 4) (I/O processor)DashboardUpdate the dashboard: speed indicator
DIALS (Part 2 of 4) (I/O processor)DashboardUpdate the dashboard: pitch and roll indicators
DIALS (Part 3 of 4) (I/O processor)DashboardUpdate the dashboard: four energy banks
DIALS (Part 4 of 4) (I/O processor)DashboardUpdate the dashboard: shields, fuel, laser & cabin temp, altitude
DIL (I/O processor)DashboardThe range of the indicator is 0-16 (for the energy banks)
DIL-1 (I/O processor)DashboardThe range of the indicator is 0-32 (for the speed indicator)
DIL2 (I/O processor)DashboardUpdate the roll or pitch indicator on the dashboard
DILX (I/O processor)DashboardUpdate a bar-based indicator on the dashboard
DILX+2 (I/O processor)DashboardThe range of the indicator is 0-64 (for the fuel indicator)
DJDWorkspace variable Keyboard auto-recentre configuration setting
djd1DashboardAuto-recentre the value in X, if keyboard auto-recentre is configured
DK4KeyboardScan for pause, configuration and secondary flight keys
DKCMPWorkspace variable Docking computer
DKJ1KeyboardRead joystick and flight controls
DKS2KeyboardRead the joystick position
DKS3KeyboardToggle a configuration setting and emit a beep
DKS4KeyboardScan for a particular key press by sending a #DODKS4 command to the I/O processor
DKS4 (I/O processor)KeyboardScan the keyboard to see if a specific key is being pressed
DLWorkspace variable Vertical sync flag
DL (I/O processor)Workspace 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
do65C02 (I/O processor)Copy protectionReverse the order of all bytes between the addresses in (1 0) and (3 2) and start the game
DOBRK (I/O processor)Utility routinesImplement the OSWRCH 145 command (execute a BRK instruction)
DOBULB (I/O processor)DashboardImplement the #DOBULB 0 command (draw the space station indicator bulb)
DOCATF (I/O processor)Save and loadImplement the #DOCATF command (update the disc catalogue flag)
dockEdFlightPrint a message to say no hyperspacing inside the station
DOCKITFlightApply docking manoeuvres to the ship in INWK
DOCOLTextSet the text colour by sending a #SETCOL command to the I/O processor
DOCOL (I/O processor)Utility routinesImplement the #SETCOL command (set the current colour)
DODIALS (I/O processor)Screen modeImplement the #DODIALS command (show or hide the dashboard)
DODKS4 (I/O processor)KeyboardImplement the #DODKS4 command (scan the keyboard to see if a specific key is being pressed)
DODOSVNSave and loadSet the SVN ("save in progress") flag by sending a #DOsvn command to the I/O processor
DOENTRYFlightDock at the space station, show the ship hanger and work out any mission progression
DOEXPDrawing shipsDraw an exploding ship
DOFE21 (I/O processor)FlightImplement the #DOFE21 command (show the energy bomb effect)
DOHFX (I/O processor)Drawing circlesImplement the #DOHFX command (update the hyperspace effect flag)
DOKEYKeyboardScan for the seven primary flight controls
DORNDUtility routinesGenerate random numbers
DORND (Loader 1)Utility routinesGenerate random numbers
DORND2Utility routinesMake sure the C flag doesn't affect the outcome
DOSVN (I/O processor)Save and loadImplement the #DOSVN command (update the "save in progress" flag)
DOTTextDraw a dash on the compass by sending a #DOdot command to the I/O processor
DOT (I/O processor)DashboardImplement the #DOdot command (draw a dash on the compass)
DOVDU19TextChange the mode 1 palette by sending a #SETVDU19 command to the I/O processor
DOVIAE (I/O processor)KeyboardImplement the #VIAE command (enable/disable interrupts)
DOXCTextMove the text cursor to a specified column by sending a #SETXC command to the I/O processor
DOYCTextMove the text cursor to a specified row by sending a #SETYC command to the I/O processor
DTENTextPrint 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
DTSTextPrint a single letter in the correct case
DTW1TextA mask for applying the lower case part of Sentence Case to extended text tokens
DTW2TextA flag that indicates whether we are currently printing a word
DTW3TextA flag for switching between standard and extended text tokens
DTW4TextFlags that govern how justified extended text tokens are printed
DTW5TextThe size of the justified text buffer at BUF
DTW6TextA flag to denote whether printing in lower case is enabled for extended text tokens
DTW8TextA mask for capitalising the next letter in an extended text token
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
DVID4 (I/O processor)Maths (Arithmetic)Calculate (P R) = 256 * A / Q
DVIDTMaths (Arithmetic)Calculate (P+1 A) = (A P) / Q
E%Drawing shipsShip blueprints default NEWB flags
E% (Loader 1)SoundSound envelope definitions
ECBLBDashboardLight up the E.C.M. indicator bulb ("E") on the dashboard by sending a #DOBULB 255 command to the I/O processor
ECBLB (I/O processor)DashboardImplement the #DOBULB 255 command (draw the E.C.M. indicator bulb)
ECBLB2DashboardStart up the E.C.M. (indicator, start countdown and make sound)
ECBT (I/O processor)DashboardThe character bitmap for the E.C.M. indicator bulb
ECHRTextMacro definition for characters in the extended token table
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
EJMPTextMacro definition for jump tokens in the extended token table
Elite loader (Loader 1)LoaderCheck for a 6502 Second Processor, perform a number of OS calls, set up sound and run the second loader
Elite loader (Part 1 of 2) (Loader 2)LoaderMove loading screen binaries into screen memory and load and run the main game code
Elite loader (Part 2 of 2) (Loader 2)LoaderInclude binaries for loading screen and dashboard images
ENERGYWorkspace variable Energy bank status
ENERGY (I/O processor)Workspace 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)
ERNDTextMacro definition for random tokens in the extended token table
errEquipmentBeep, pause and go to the docking bay (i.e. show the Status Mode screen)
ESCAPEFlightLaunch our escape pod
ESCPWorkspace variable Escape pod
ESCP (I/O processor)Workspace variable Escape pod
ETOKTextMacro definition for recursive tokens in the extended token table
ETWOTextMacro definition for two-letter tokens in the extended token table
EVWorkspace variable The "extra vessels" spawning counter
exTextPrint a recursive token
executiveDemoExtra text for the demo in the Executive version
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
F%Utility routinesDenotes the end of the main game code, from Elite A to Elite J
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
FEEDTextPrint a newline
FirebirdCopy protectionThe name "Firebird", buried in the code of the Executive version
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
FLH (I/O processor)Workspace variable Flashing console bars configuration setting
FLIPStardustReflect the stardust particles in the screen diagonal
FLKBKeyboardFlush the keyboard buffer
FMLTUMaths (Arithmetic)Calculate A = A * Q / 256
FMLTU2Maths (Arithmetic)Calculate A = K * sin(A)
FNE (Loader 1)SoundMacro definition for defining a sound envelope
FONT% (I/O processor)TextA copy of the character definition bitmap table from the MOS ROM
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"
FREEZEKeyboardRejoin the pause routine after processing a screen save
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
FSH (I/O processor)Workspace 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")
GNTMP (I/O processor)Workspace 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"
GOPLTacticsMake the ship head towards the planet
govWorkspace variable The current system's government type (0-7)
GRIDSETDemoPopulate the line coordinate tables with the lines for the scroll text
GRS1DemoPopulate the line coordinate tables with the lines for a single scroll text character
GTDRVSave and loadGet an ASCII disc drive drive number from the keyboard
GTHGUniverseSpawn a Thargoid ship and a Thargon companion
GTNMEWSave and loadFetch the name of a commander file to save or load
GVLUniverseCalculate the availability of market items
HA1Ship hangerContains an RTS
HA3 (I/O processor)Ship hangerContains an RTS
HALLShip hangerDraw the ships in the ship hanger, then draw the hanger by sending an OSWORD 248 command to the I/O processor
HANGER (I/O processor)Ship hangerImplement the OSWORD 248 command (display the ship hanger)
HAS1Ship hangerDraw a ship in the ship hanger
HAS2 (I/O processor)Ship hangerDraw a hanger background line from left to right
HAS3 (I/O processor)Ship hangerDraw a hanger background line from right to left
HATBShip hangerShip hanger group table
HBFLDrawing linesDraw the sun lines in the horizontal line buffer in orange by sending an OSWORD 247 command to the I/O processor
HBUFDrawing linesThe horizontal line buffer to send with the OSWORD 247 command
HBUPWorkspace variable The size of the horizontal line buffer at HBUF (including the two OSWORD size bytes)
HBZEDrawing linesReset the horizontal line buffer
HFS1Drawing circlesDon't clear the screen, and draw 8 concentric rings with the step size in STP
HFS2Drawing circlesDraw the launch or hyperspace tunnel
HFXWorkspace variable A flag that toggles the hyperspace colour effect
HFX (I/O processor)Workspace variable A flag that toggles the hyperspace colour effect
HI1TacticsContains an RTS
HIMCNTDemoUsed as a loop counter for the Cobra's slow approach in the demo
HITCHTacticsWork out if the ship in INWK is in our crosshairs
HLOINDrawing linesAdd a sun line to the horizontal line buffer
HLOIN (I/O processor)Drawing linesImplement the OSWORD 247 command (draw the sun lines in the horizontal line buffer in orange)
HLOIN2Drawing linesRemove a line from the sun line heap and draw it on-screen
HLOIN2 (I/O processor)Drawing linesDraw a horizontal line in a specific colour
HLOIN3 (I/O processor)Drawing linesDraw a line from (X1, Y1) to (X2, Y1) in the current colour (we need to set Q = Y2 + 1 before calling HLOIN3 so only one line is drawn)
hmChartsSelect the closest system and redraw the chart crosshairs
HME2ChartsSearch the galaxy for a system
hy5UniverseContains an RTS
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
I/O variables (I/O processor)WorkspacesVarious variables used by the I/O processor
INCYCTextMove the text cursor to the next row
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
IRQ1 (I/O processor)Screen modeThe main screen-mode interrupt handler (IRQ1V points here)
ITEMMarketMacro definition for the market prices table
jmpUniverseSet the current system to the selected system
JMPTAB (I/O processor)TubeThe lookup table for OSWRCH jump commands (128-147)
JMTBTextThe extended token table for jump tokens 1-32 (DETOK)
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
JUMPWorkspace variable Infinite jump range configuration setting
JUNKWorkspace variable The amount of junk in the local bubble
KWorkspace variable Temporary storage, used in a number of places
K (I/O processor)Workspace variable Temporary storage, used in a number of places
K%WorkspacesShip data blocks
K2Workspace variable Temporary storage, used in a number of places
K3Workspace variable Temporary storage, used in a number of places
K3 (I/O processor)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
KEYBOARD (I/O processor)KeyboardImplement the OSWORD 240 command (scan the keyboard and joystick and log the results)
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
KTRANKeyboardThe key logger buffer that gets updated by the OSWORD 240 command
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
KY20Workspace variable "P" 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
KYTBKeyboardContains an RTS
KYTBKeyboardLookup table for in-flight keyboard controls
KYTB (I/O processor)KeyboardLookup table for in-flight keyboard controls
labelTextSend a two-byte OSWRCH command to the I/O processor
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
LASLI-1Drawing linesContains an RTS
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
LBFLDrawing linesDraw the lines in the multi-segment line buffer by sending an OSWRCH 129 command to the I/O processor
LBUFDrawing linesThe multi-segment line buffer used by LOIN
LBUPWorkspace variable The size of the multi-segment line buffer at LBUF
LCASHMaths (Arithmetic)Subtract an amount of cash from the cash pot
LINMAX (I/O processor)Workspace variable The number of points in the line currently being transmitted from the parasite using the OSWRCH 129 and 130 commands
LINTAB (I/O processor)Workspace variable The offset of the first free byte in the TABLE buffer, which stores bytes in the current line as they are transmitted from the parasite using the OSWRCH 129 and 130 commands
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 linesDraw a one-segment line by sending an OSWRCH 129 command to the I/O processor
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 line 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
LODSave and loadLoad a commander file
logMaths (Arithmetic)Binary logarithm table (high byte)
log (I/O processor)Maths (Arithmetic)Binary logarithm table (high byte)
logLMaths (Arithmetic)Binary logarithm table (low byte)
logL (I/O processor)Maths (Arithmetic)Binary logarithm table (low byte)
LOINDrawing linesAdd a line segment to the multi-segment line buffer
LOIN (Part 1 of 7) (I/O processor)Drawing linesDraw a line: Calculate the line gradient in the form of deltas
LOIN (Part 2 of 7) (I/O processor)Drawing linesDraw a line: Line has a shallow gradient, step right along x-axis
LOIN (Part 3 of 7) (I/O processor)Drawing linesDraw a shallow line going right and up or left and down
LOIN (Part 4 of 7) (I/O processor)Drawing linesDraw a shallow line going right and down or left and up
LOIN (Part 5 of 7) (I/O processor)Drawing linesDraw a line: Line has a steep gradient, step up along y-axis
LOIN (Part 6 of 7) (I/O processor)Drawing linesDraw a steep line going up and left or down and right
LOIN (Part 7 of 7) (I/O processor)Drawing linesDraw a steep line going up and right or down and left
LOOK1FlightInitialise the space view
LORSave and loadSet the C flag and return from the subroutine
LPWorkspacesVariables used for displaying the scrolling text in the demo
LS2FLDrawing circlesDraw the contents of the ball line heap by sending an OSWRCH 129 command to the I/O processor
LSOWorkspace variable The ship line heap for the space station (see NWSPS) and the sun line heap (see SUN)
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
LSX2Drawing linesThe ball line heap for storing x-coordinates
LSY2Drawing linesThe ball line heap for storing y-coordinates
LTDEFDemoLine definitions for characters in the Star Wars scroll text
mMaths (Geometry)Do not include A in the calculation
M%Main loopThe entry point for the main flight loop
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 the planet and sun and process fuel scooping if appropriate
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 Cobra Mk III, Python, Boa or Anaconda)
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 a lone bounty hunter, a Thargoid, or up to four 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)
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
MCNT (I/O processor)Workspace 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
MEBRKSave and loadThe BRKV handler for disc access operations
mes9TextPrint a text token, possibly followed by " DESTROYED"
MESSTextDisplay an in-flight message
MESS1 (Loader 1)LoaderThe OS command string for changing the disc directory to E
MESS2 (Loader 1)LoaderThe OS command string for running the second part of the loader in file ELITEa
MESS2 (Loader 2)LoaderThe OS command string for running the I/O processor's main game code in file I.CODE
MESS3 (Loader 2)LoaderThe OS command string for running the parasite's main game code in file P.CODE
messXCWorkspace variable Temporary storage, used to store the text column of the in-flight message in MESS, so it can be erased from the screen at the correct time
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
MOSWorkspace variable This variable appears to be unused
MSARWorkspace variable The targeting state of our leftmost missile
MSBARDashboardDraw a specific indicator in the dashboard's missile bar by sending a #DOmsbar command to the I/O processor
MSBAR (I/O processor)DashboardImplement the #DOmsbar command (draw a specific indicator in the dashboard's missile bar)
msblobDashboardDisplay the dashboard's missile indicators in green
MSTGWorkspace variable The current missile lock target
MT1TextSwitch to ALL CAPS when printing extended tokens
MT13TextSwitch to lower case when printing extended tokens
MT14TextSwitch to justified text when printing extended tokens
MT15TextSwitch to left-aligned text when printing extended tokens
MT16TextPrint the character in variable DTW7
MT17TextPrint the selected system's adjective, e.g. Lavian for Lave
MT18TextPrint a random 1-8 letter word in Sentence Case
MT19TextCapitalise the next letter
MT2TextSwitch to Sentence Case when printing extended tokens
MT23TextMove to row 10, switch to white text, and switch to lower case when printing extended tokens
MT26TextFetch a line of text from the keyboard
MT27TextPrint the captain's name during mission briefings
MT28TextPrint the location hint during the mission 1 briefing
MT29TextMove to row 6, switch to white text, and switch to lower case when printing extended tokens
MT5TextSwitch to extended tokens
MT6TextSwitch to standard tokens in Sentence Case
MT8TextTab to column 6 and start a new word when printing extended tokens
MT9TextClear the screen and set the current view type to 1
MTINTextLookup table for random tokens in the extended token table (0-37)
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's location in space by the amount of pitch and roll of our ship
MV45MovingRejoin the MVEIT routine after the rotation, tactics and scanner code
MVBL (Loader 2)Utility routinesMove a multi-page block of memory from one location to another
MVE (Loader 2)Utility routinesMove a one-page block of memory from one location to another
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
NAMEWorkspace variable The current commander name
NEEDKEYWorkspace variable Flag to ask the I/O processor to update the key logger buffer at KTRAN
NEWBWorkspace variable The ship's "new byte flags" (or NEWB flags)
newosrdch (I/O processor)TubeThe custom OSRDCH routine for reading characters
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
NOFXDemoThe x-coordinates of the scroll text letter grid
NOFYDemoThe y-coordinates of the scroll text letter grid
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
NWDAV4MarketPrint an "ITEM?" error, make a beep and rejoin the TT210 routine
NWDAVxxInventoryUsed to rejoin this routine from the call to NWDAV4
NWOSWD (I/O processor)TubeThe custom OSWORD routine
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
ohUniverseContains an RTS SPIN2 Remove any randomness: spawn cargo of a specific type (given in X), and always spawn the number given in A
OOPSFlightTake some damage
orange (I/O processor)Drawing pixelsLookup table for 2-pixel mode 1 orange pixels for the sun
OSB (Loader 1)Utility routinesA convenience routine for calling OSBYTE with Y = 0
oscoblSave and loadOSFILE configuration block for saving a screenshot
oscobl2Save and loadMaster OSFILE configuration block for saving a screenshot
OSSC (I/O processor)Workspace variable When the parasite sends an OSWORD command to the I/O processor (i.e. an OSWORD with A = 240 to 255), then the relevant handler routine in the I/O processor is called with OSSC(1 0) pointing to the OSWORD parameter block (i.e. OSSC(1 0) = (Y X) from the original call in the I/O processor)
OSWVECS (I/O processor)TubeThe lookup table for OSWORD jump commands (240-255)
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 t As TT217 but don't preserve Y, set it to YSAV instead
PWorkspace variable Temporary storage, used in a number of places
P (I/O processor)Workspace variable Temporary storage, used in a number of places
P (Loader 1)Workspace variable Temporary storage, used in a number of places
PARAMS (I/O processor)Workspace variable PARAMS points to the start of the dashboard parameter block that is populated by the parasite when it sends the #RDPARAMS and OSWRCH 137 commands
PARANO (I/O processor)Workspace variable PARANO points to the last free byte in PARAMS, which is used as a buffer for bytes sent from the parasite by the #RDPARAMS and OSWRCH 137 commands when updating the dashboard
Parasite variablesWorkspacesVarious variables used by the parasite
PAS1KeyboardDisplay a rotating ship at space coordinates (0, 112, 256) and scan the keyboard
PATGWorkspace variable Configuration setting to show the author names on the start-up screen and enable manual hyperspace mis-jumps
PAUSEKeyboardDisplay a rotating ship, waiting until a key is pressed, then remove the ship from the screen
PAUSE2KeyboardWait until a key is pressed, ignoring any existing key press
PBFLDrawing pixelsDraw the pixel in the pixel buffer by sending an OSWORD 241 command to the I/O processor
PBUFDrawing pixelsThe pixel buffer to send with the OSWORD 241 command
PBUPWorkspace variable The size of the pixel buffer at PBUF (including the two OSWORD size bytes)
PBZEDrawing pixelsReset the pixel buffer
PDESCTextPrint the system's extended description or a mission 1 directive
pingUniverseSet the selected system to the current system
PIX (Loader 1)Drawing pixelsDraw a single pixel at a specific coordinate
PIX1Maths (Arithmetic)Calculate (YY+1 SYL+Y) = (A P) + (S R) and draw stardust particle
pixblDrawing pixelsPoints to the first byte of the PBUF block, which is where the OSWORD transmission size goes
PIXELDrawing pixelsAdd a white dot at a specific distance to the pixel buffer (2-pixel dash or 4-pixel square)
PIXEL (I/O processor)Drawing pixelsImplement the OSWORD 241 command (draw space view pixels)
PIXEL2Drawing pixelsDraw a stardust particle relative to the screen centre
PIXEL3Drawing pixelsAdd a coloured dot at a specific distance to the pixel buffer (1-pixel dot, 2-pixel dash or 4-pixel square)
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 1)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
POSWRCH (I/O processor)TextPrint a character on the printer only
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
presEquipmentGiven 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)
prilf (I/O processor)TextImplement the #prilf command (print a blank line on the printer)
printer (I/O processor)TextImplement the #printcode command (print a character on the printer and screen)
printflagTextA flag that determines whether to send text output to the printer as well as the screen
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 RTS111 Contains an RTS
PU1-1FlightContains an RTS
PUTBACK (I/O processor)TubeReset the OSWRCH vector in WRCHV to point to USOSWRCH
PX4Drawing pixelsContains an RTS
PXCL (I/O processor)Drawing pixelsA four-colour mode 1 pixel byte that represents a dot's distance
PZW (I/O processor)DashboardFetch the current dashboard colours, to support flashing
PZW2 (I/O processor)DashboardFetch the current dashboard colours for non-striped indicators, to support flashing
QWorkspace variable Temporary storage, used in a number of places
Q (I/O processor)Workspace variable Temporary storage, used in a number of places
Q (Loader 1)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)
QQ14 (I/O processor)Workspace 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 The current system's economy (0-7)
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 endRestart the game using the last saved commander without asking whether to load a new commander file
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
R (I/O processor)Workspace 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
RAND (Loader 1)Drawing planetsThe random number seed used for drawing Saturn
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 by sending an OSWORD 240 command to the I/O processor
RDLILoaderThe OS command string for running the flight code in file D.CODE in the disc version of Elite
RDPARAMS (I/O processor)DashboardImplement the #RDPARAMS command (start receiving a new set of parameters for updating the dashboard)
RE2+2DashboardRestore A from T and return from the subroutine
REDU2DashboardReduce the value of the pitch or roll dashboard indicator
refundEquipmentInstall a new laser, processing a refund if applicable
RES2Start and endReset a number of flight variables and workspaces
RESETStart and endReset most variables
retrySave and loadScan the keyboard until a key is pressed and display the disc access menu
RLINETextThe OSWORD configuration block used to fetch a line of text from the keyboard
ROOT (Loader 1)Maths (Arithmetic)Calculate ZP = SQRT(ZP(1 0))
RR4 (I/O processor)TextRestore the registers and return from the subroutine
rT9TextContains an RTS
RTOKTextMacro definition for recursive tokens in the recursive token table
RTS111FlightContains an RTS
RTS2Drawing sunsContains an RTS
RUGALTextThe criteria for systems with extended decription overrides
RUPLATextSystem numbers that have extended decription overrides
RUTOKTextThe second extended token table for recursive tokens 0-26 (DETOK3)
SWorkspace variable Temporary storage, used in a number of places
S (I/O processor)Workspace variable Temporary storage, used in a number of places
S%LoaderChecksum, decrypt and unscramble the main game code, and start the game
S1%Save and loadThe drive and directory number used when saving or loading a commander file
SAFE (I/O processor)TubeContains an RTS
safehouseWorkspace variable Backup storage for the seeds for the selected system
savscrSave and loadSave a screenshot if CTRL-D is pressed when the game is paused
SCWorkspace variable Screen address (low byte)
SC (I/O processor)Workspace variable Screen address (low byte)
SC48 (I/O processor)DashboardImplement the #onescan command (draw a ship on the 3D scanner)
SC5Utility routinesContains an RTS
scacolDrawing shipsShip colours on the scanner
SCANDashboardDisplay the current ship on the scanner
SCANcolDashboardThe colour of the ship on the scanner SCANx1 The screen x-coordinate of the dot on the scanner
SCANflgDashboardThe sign of the stick height (in bit 7) SCANlen The stick height for the ship on the scanner
SCANlenDashboardThe stick height for the ship on the scanner SCANcol The colour of the ship on the scanner
SCANparsDashboardThe scanner buffer to send with the #onescan command
SCANx1DashboardThe screen x-coordinate of the dot on the scanner SCANy1 The screen y-coordinate of the dot on the scanner
SCANy1DashboardThe screen y-coordinate of the dot on the scanner
SCHWorkspace variable Screen address (high byte)
SCH (I/O processor)Workspace variable Screen address (high byte)
SCLI2Utility routinesExecute an OS command, setting the SVN flag while it's running
scnameSave and loadFilename to be used when saving a screenshot
sent (I/O processor)TextTurn the printer off and restore the USOSWRCH handler, returning from the subroutine using a tail call
SESCPFlightSpawn an escape pod from the current (parent) ship
SETVDU19 (I/O processor)Screen modeImplement the #SETVDU19 command (change mode 1 palette)
SETXC (I/O processor)TextImplement the #SETXC command (move the text cursor to a specific column)
SETYC (I/O processor)TextImplement the #SETYC command (move the text cursor to a specific row)
SFRMISTacticsAdd an enemy missile to our local bubble of universe
SFS1UniverseSpawn a child ship from the current (parent) ship
SFS1-2UniverseAdd 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_ADDERDrawing shipsShip blueprint for an Adder
SHIP_ANACONDADrawing shipsShip blueprint for an Anaconda
SHIP_ASP_MK_2Drawing shipsShip blueprint for an Asp Mk II
SHIP_ASTEROIDDrawing shipsShip blueprint for an asteroid
SHIP_BOADrawing shipsShip blueprint for a Boa
SHIP_BOULDERDrawing shipsShip blueprint for a boulder
SHIP_CANISTERDrawing shipsShip blueprint for a cargo canister
SHIP_COBRA_MK_1Drawing shipsShip blueprint for a Cobra Mk I
SHIP_COBRA_MK_3Drawing shipsShip blueprint for a Cobra Mk III
SHIP_COBRA_MK_3_PDrawing shipsShip blueprint for a Cobra Mk III (pirate)
SHIP_CONSTRICTORDrawing shipsShip blueprint for a Constrictor
SHIP_CORIOLISDrawing shipsShip blueprint for a Coriolis space station
SHIP_COUGARDrawing shipsShip blueprint for a Cougar
SHIP_DODODrawing shipsShip blueprint for a Dodecahedron ("Dodo") space station
SHIP_ESCAPE_PODDrawing shipsShip blueprint for an escape pod
SHIP_FER_DE_LANCEDrawing shipsShip blueprint for a Fer-de-Lance
SHIP_GECKODrawing shipsShip blueprint for a Gecko
SHIP_KRAITDrawing shipsShip blueprint for a Krait
SHIP_LOGODrawing shipsShip blueprint for the Elite logo
SHIP_MAMBADrawing shipsShip blueprint for a Mamba
SHIP_MISSILEDrawing shipsShip blueprint for a missile
SHIP_MORAYDrawing shipsShip blueprint for a Moray
SHIP_PLATEDrawing shipsShip blueprint for an alloy plate
SHIP_PYTHONDrawing shipsShip blueprint for a Python
SHIP_PYTHON_PDrawing shipsShip blueprint for a Python (pirate)
SHIP_ROCK_HERMITDrawing shipsShip blueprint for a rock hermit (asteroid)
SHIP_SHUTTLEDrawing shipsShip blueprint for a Shuttle
SHIP_SIDEWINDERDrawing shipsShip blueprint for a Sidewinder
SHIP_SPLINTERDrawing shipsShip blueprint for a splinter
SHIP_THARGOIDDrawing shipsShip blueprint for a Thargoid mothership
SHIP_THARGONDrawing shipsShip blueprint for a Thargon
SHIP_TRANSPORTERDrawing shipsShip blueprint for a Transporter
SHIP_VIPERDrawing shipsShip blueprint for a Viper
SHIP_WORMDrawing shipsShip blueprint for a Worm
shpcolDrawing shipsShip colours
SHPPTDrawing shipsDraw a distant ship as a point rather than a full wireframe
SIGHTFlightDraw the laser crosshairs
SLIDEDemoDisplay a Star Wars scroll text
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
SOMEPROT (I/O processor)Copy protectionImplement the OSWORD 249 command (some copy protection)
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
spastoUniverseContains the address Coriolis space station's ship blueprint
SPBLBDashboardLight up the space station indicator ("S") on the dashboard by sending a #DOBULB 0 command to the I/O processor
SPBT (I/O processor)DashboardThe bitmap definition for the space station indicator bulb
spcTextPrint a text token followed by a space
SPEAKWorkspace variable Speech configuration setting
SPEECHSoundPhrases for the Watford Electronics Beeb Speech Synthesiser
SPINUniverseRandomly spawn cargo from a destroyed ship
SPIN2UniverseRemove any randomness: spawn cargo of a specific type (given in X), and always spawn the number given in A
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 1)Maths (Arithmetic)Calculate (A P) = A * A
SSPRWorkspace variable "Space station present" flag
stackSave and loadTemporary storage for the stack pointer when switching the BRKV handler between BRBR and MEBRK
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
STARTUP (I/O processor)LoaderSet the various vectors, interrupts and timers, and terminate the loading process so the vector handlers can take over
STATUSStatusShow the Status Mode screen (red key f8)
STOREUniverseCopy the ship data block at INWK back to the K% workspace
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 loadDisplay the disc access menu and process saving of commander files
svn (I/O processor)Workspace variable "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)
SWAP (I/O processor)Workspace 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)
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
tKeyboardAs TT217 but don't preserve Y, set it to YSAV instead
TWorkspace variable Temporary storage, used in a number of places
T (I/O processor)Workspace variable Temporary storage, used in a number of places
T (Loader 1)Workspace variable Temporary storage, used in a number of places
T1Workspace variable Temporary storage, used in a number of places
T1 (I/O processor)Workspace variable Temporary storage, used in a number of places
T95KeyboardPrint the distance to the selected system
TA151TacticsMake the ship head towards the planet
TA2Maths (Geometry)Calculate the length of the vector in XX15 (ignoring the low coordinates), returning it in Q
TABLE (I/O processor)Drawing linesThe line buffer for line data transmited from the parasite
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 number
TALKSoundSpeak using the Watford Electronics Beeb Speech Synthesiser
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
TAS4Maths (Geometry)Calculate the dot product of XX15 and one of the space station's orientation vectors
TAS6Maths (Geometry)Negate the vector in XX15 so it points in the opposite direction
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
THEREMissionsCheck whether we are in the Constrictor's system in mission 1
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
TKN1TextThe first extended token table for recursive tokens 0-255 (DETOK)
TKN2TextThe extended two-letter token lookup table
tnprMarketWork out if we have space for a specific amount of cargo
tnpr1MarketWork out if we have space for one tonne of cargo
TOKNTextMacro definition for standard tokens in the extended token table
tosend (I/O processor)TextPrint a printable character and return to the printer routine
TPWorkspace variable The current mission status
TR1Save and loadCopy the last saved commander's name from NA% to INWK
TRADEMODEUtility routinesClear the screen and set up a printable trading screen
TRANTABLEKeyboardTranslation table from internal key number to ASCII
TRNMESave and loadCopy the last saved commander's name from INWK to NA%
true3DemoThe text for the demo's final scroll text
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 key, hyperspace and chart key presses and update the hyperspace counter
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
TT15bDrawing linesDraw the crosshairs in the current colour
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, with support for verified text in extended tokens
TT26 (I/O processor)TextPrint a character at the text cursor by poking into screen memory
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
TT67TextPrint a newline
TT67 (I/O processor)TextPrint 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
TTX110FlightSet the current system to the nearest system and return to hyp
TTX111FlightUsed to rejoin this routine from the call to TTX110
TTX66Utility routinesSend control code 11 to the I/O processor to clear the top part of the screen and draw a white border
TTX66 (I/O processor)Utility routinesClear the top part of the screen and draw a white border
TTX69TextPrint a paragraph break
TVT1 (I/O processor)Screen modePalette data for the mode 2 part of the screen (the dashboard)
TVT3 (I/O processor)Screen modePalette data for the mode 1 part of the screen (the top part)
TWFLDrawing linesReady-made character rows for the left end of a horizontal line in mode 4
TWFL (I/O processor)Drawing pixelsReady-made character rows for the left end of a horizontal line
TWFRDrawing linesReady-made character rows for the right end of a horizontal line in mode 4
TWFR (I/O processor)Drawing pixelsReady-made character rows for the right end of a horizontal line
TWISTDemoPitch the current ship by a small angle in a positive direction
TWIST2DemoPitch in the direction given in A
TWOKTextMacro definition for two-letter tokens in the token table
TWOSDrawing pixelsReady-made single-pixel character row bytes for mode 4
TWOS (I/O processor)Drawing pixelsReady-made single-pixel character row bytes for mode 1
TWOS (Loader 1)Drawing pixelsReady-made single-pixel character row bytes for mode 1
TWOS2Drawing pixelsReady-made double-pixel character row bytes for mode 4
TWOS2 (I/O processor)Drawing pixelsReady-made double-pixel character row bytes for mode 1
TYPEWorkspace variable The current ship type
UWorkspace variable Temporary storage, used in a number of places
U (I/O processor)Workspace variable Temporary storage, used in a number of places
U%KeyboardClear the key logger
UNIVUniverseTable of pointers to the local universe's ship data blocks
UNWISEShip hangerSwitch the main line-drawing routine between EOR and OR logic
UPWorkspacesShip slots, variables
UPOWorkspace variable Used as an index into the UB tables when projecting the scroll text lines onto the Star Wars perspective view and then onto the screen
USOSWRCH (I/O processor)TubeThe custom OSWRCH routine for writing characters and implementing jump table commands
VWorkspace variable Temporary storage, typically used for storing an address pointer
varMarketCalculate QQ19+3 = economy * |economic_factor|
VCSU1Maths (Arithmetic)Calculate vector K3(8 0) = [x y z] - coordinates of the sun or space station
VCSUBMaths (Arithmetic)Calculate vector K3(8 0) = [x y z] - coordinates in (A V)
VEC (I/O processor)Workspace variable VEC = &7FFE
VERTEXDrawing shipsMacro definition for adding vertices to ship blueprints
VIEWWorkspace variable The number of the current space view
VNT3+1 (I/O processor)Screen modeChanging this byte modifies the palette-loading instruction at VNT3, to support the #SETVDU19 command for changing the mode 1 palette
VOWELTextTest whether a character is a vowel
WARPFlightPerform an in-system jump
WHITETEXTTextSwitch to white text
widgetWorkspace variable Temporary storage, used to store the original argument in A in the logarithmic FMLTU and LL28 routines
WPWorkspacesVariables
WP1Drawing circlesContains an RTS
WPLSDrawing sunsRemove the sun from the screen
WPSHPSDashboardClear the scanner, reset the ball line and sun line heaps
WSCANScreen modeAsk the I/O processor to wait for the vertical sync by sending a #wscn command to the I/O processor
WSCAN (I/O processor)Screen modeImplement the #wscn command (wait for the vertical sync)
wWFlightStart a hyperspace countdown
wW2FlightStart the hyperspace countdown, starting the countdown from the value in A
X1Workspace variable Temporary storage, typically used for x-coordinates in line-drawing routines
X1 (I/O processor)Workspace variable Temporary storage, typically used for x-coordinates in line-drawing routines
X1TBWorkspace variable The x-coordinates of the start points for character lines in the scroll text (as space coordinates)
X1UBWorkspace variable The x-coordinates of the start points for character lines in the scroll text (as projected screen coordinates)
X1VBWorkspace variable The x-coordinates of the start points for the previous set of character lines in the scroll text (as projected screen coordinates) so they can be erased
X2Workspace variable Temporary storage, typically used for x-coordinates in line-drawing routines
X2 (I/O processor)Workspace variable Temporary storage, typically used for x-coordinates in line-drawing routines
X2TBWorkspace variable The x-coordinates of the end points for character lines in the scroll text
X2UBWorkspace variable The x-coordinates of the end points for character lines in the scroll text (as projected screen coordinates)
X2VBWorkspace variable The x-coordinates of the end points for the previous set of character lines in the scroll text (as projected screen coordinates) so they can be erased
XCWorkspace variable The x-coordinate of the text cursor (i.e. the text column), which can be from 0 to 32
XC (I/O processor)Workspace variable The x-coordinate of the text cursor (i.e. the text column), set to an initial value of 1
XPWorkspace variable The x-coordinate of the current character as we construct the lines for the Star Wars scroll text
XSAVWorkspace variable Temporary storage for saving the value of the X register, used in a number of places
XSAV2Workspace variable This byte appears to be unused
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 appears to be unused
XX15Workspace variable Temporary storage, typically used for storing screen coordinates in line-drawing routines
XX15 (I/O processor)Workspace 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 appears to be 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
Y1 (I/O processor)Workspace variable Temporary storage, typically used for y-coordinates in line-drawing routines
Y1TBWorkspace variable The y-coordinates of the start points for character lines in the scroll text
Y1UBWorkspace variable The y-coordinates of the start points for character lines in the scroll text (as projected screen coordinates)
Y1VBWorkspace variable The y-coordinates of the start points for the previous set of character lines in the scroll text (as projected screen coordinates) so they can be erased
Y2Workspace variable Temporary storage, typically used for y-coordinates in line-drawing routines
Y2 (I/O processor)Workspace variable Temporary storage, typically used for y-coordinates in line-drawing routines
Y2TBWorkspace variable The y-coordinates of the end points for character lines in the scroll text
Y2UBWorkspace variable The y-coordinates of the end points for character lines in the scroll text (as projected screen coordinates)
Y2VBWorkspace variable The y-coordinates of the end points for the previous set of character lines in the scroll text (as projected screen coordinates) so they can be erased
YCWorkspace variable The y-coordinate of the text cursor (i.e. the text row), which can be from 0 to 23
YC (I/O processor)Workspace variable The y-coordinate of the text cursor (i.e. the text row), set to an initial value of 1
ylookup (I/O processor)Drawing pixelsLookup table for converting pixel y-coordinate to page number of screen address
YPWorkspace variable The y-coordinate of the current character as we construct the lines for the Star Wars scroll text
yplTextPrint the current system name
ypl-1TextContains an RTS
YSWorkspace variable Temporary storage for saving the index into the TB tables in the SLIDE routine
YSAVWorkspace variable Temporary storage for saving the value of the Y register, used in a number of places
YSAV (I/O processor)Workspace variable Temporary storage for saving the value of the Y register, used in a number of places
YSAV2Workspace variable This byte appears to be unused
YYWorkspace variable Temporary storage, typically used for storing a 16-bit y-coordinate
YY (Loader 1)Workspace variable Temporary storage, used in a number of places
Z1 (Loader 2)Workspace variable Temporary storage, used when moving code
Z2 (Loader 2)Workspace variable Temporary storage, used when moving code
ZeUniverseInitialise the INWK workspace to a hostile ship
ZEBCUtility routinesZero-fill pages &B and &C
ZEKTRANKeyboardReset the key logger buffer at KTRAN
ZEROUtility routinesReset the local bubble of universe and ship status
ZES1Utility routinesZero-fill the page whose number is in X
ZES1 (I/O processor)Utility routinesZero-fill the page whose number is in X
ZES2Utility routinesZero-fill a specific page
ZES2 (I/O processor)Utility routinesZero-fill a specific page
ZEVBUtility routinesZero-fill the Y1VB variable
ZINFUtility routinesReset the INWK workspace and orientation vectors
ZINF2Utility routinesReset the INWK workspace and orientation vectors
ZIPWorkspace variable This label is not used but is in the original source
ZPWorkspacesLots of important variables are stored in the zero page workspace as it is quicker and more space-efficient to access memory here
ZP (I/O processor)WorkspacesImportant variables used by the I/O processor
ZP (Loader 1)WorkspacesImportant variables used by the loader
ZP (Loader 2)WorkspacesImportant variables used by the loader
ZZWorkspace variable Temporary storage, typically used for distance values
zZ+1FlightContains an RTS
ZZAAPDemoDraw a vertical red laser line from (128, 67) to (128, 160)