Skip to navigation


A-Z index of the source code

[Commodore 64 version]

This index contains every subroutine, entry point, variable, workspace and macro that appears in the source code for the Commodore 64 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
abraxasDrawing the screenThe value for VIC register $18 to set the screen RAM address for a raster count of 1 in the interrupt routine (i.e. the dashboard)
ACT (Game data)Maths (Geometry)Arctan table
ADDMaths (Arithmetic)Calculate (A X) = (A P) + (S R)
ALP1Workspace variable Magnitude of the roll angle alpha, i.e. |alpha|, which is a positive value between 0 and 31
ALP2Workspace variable Bit 7 of ALP2 = sign of the roll angle in ALPHA
ALPHAWorkspace variable The current roll angle alpha, which is reduced from JSTX to a sign-magnitude value between -31 and +31
ALTITWorkspace variable Our altitude above the surface of the planet or sun
ANGRYTacticsMake a ship hostile
antilogMaths (Arithmetic)Binary antilogarithm table
antilogODDMaths (Arithmetic)Binary antilogarithm table
april16SoundStart playing the docking music, irrespective of the current configuration settings
ARCTANMaths (Geometry)Calculate A = arctan(P / Q)
ASHWorkspace variable Aft shield status
autoWorkspace variable Docking computer activation status
AVLWorkspace variable Market availability in the current system
backtonormalUtility routinesDisable the keyboard, set the SVN flag to 0, and return with A = 0
BADStatusCalculate how bad we have been
BALIWorkspace variable This byte appears to be unused
basicBootstrap (Disk Loader 1)LoaderCall the RelocateLoader routine even if the firebird file is loaded as a BASIC program
basicVectors (Disk Loader 1)LoaderAddresses that override the BASIC vectors for when the loader file is loaded at the address in its PRG header, $02A7
BAYStatusGo to the docking bay (i.e. show the Status Mode screen)
BAY2MarketJump into the main loop at FRCE, setting the key "pressed" to the Inventory key
BAYSTEPMissionsGo to the docking bay (i.e. show the Status Mode screen)
BDBUFFWorkspace variable The music data byte that is currently being processed, with the low nibble being processed first, and then the high nibble
BDdataptr1Workspace variable The low byte of the address of the music data pointer in BDdataptr1(1 0), which points to the end of the music data currently being processed
BDdataptr2Workspace variable The high byte of the address of the music data pointer in BDdataptr1(1 0), which points to the end of the music data currently being processed
BDdataptr3Workspace variable The low byte of the address of the music data pointer in BDdataptr3(1 0), which is a backup of the initial value of the BDdataptr1(1 0) pointer, so music can be repeated
BDdataptr4Workspace variable The high byte of the address of the music data pointer in BDdataptr3(1 0), which is a backup of the initial value of the BDdataptr1(1 0) pointer, so music can be repeated
BDENTRYSoundStart playing a new tune as background music
BDirqhereSoundThe interrupt routine for playing background music
BDJMPTBHSoundA jump table containing addresses for processing music commands 1 through 15 (high bytes)
BDJMPTBLSoundA jump table containing addresses for processing music commands 1 through 15 (low bytes)
BDlab1SoundApply vibrato before cleaning up and returning from the interrupt routine
BDlab19SoundIncrement the music data pointer in BDdataptr1(1 0) and fetch the next data byte into A
BDlab21SoundClean up and return from the interrupt routine
BDlab23SoundApply a vibrato frequency change to voice 3
BDlab24SoundApply a vibrato frequency change to voice 2
BDlab3SoundFetch the next two music data bytes and set the frequency of voice 1 (high byte then low byte)
BDlab4SoundSet the voice control register for voice 1 to value1
BDlab5SoundFetch the next two music data bytes and set the frequency of voice 2 (high byte then low byte) and the vibrato variables
BDlab6SoundSet the voice control register for voice 2 to value2
BDlab7SoundFetch the next two music data bytes and set the frequency of voice 3 (high byte then low byte) and the vibrato variables
BDlab8SoundSet the voice control register for voice 3 to value3
BDRO1SoundProcess music command <#1 fh1 fl1> to set the frequency for voice 1 to (fh1 fl1) and the control register for voice 1 to value1
BDRO10SoundProcess music command <#10 h1 l1 h2 l2 h3 l3> to set the pulse width to all three voices
BDRO11SoundProcess music command <#11>, which does the same as command <#9> and restarts the current tune
BDRO12SoundProcess music command <#12 n> to set value4 = n, which sets the rest length for commands #8 and #15
BDRO13SoundProcess music command <#13 v1 v2 v3> to set value1, value2, value3 to the voice control register values for commands <#1> to <#3>
BDRO14SoundProcess music command <#14 vf fc cf> to set the volume and filter modes, filter control and filter cut-off frequency
BDRO15SoundProcess music command <#15> to rest for 2 * value4 interrupts
BDRO2SoundProcess music command <#2 fh1 fl1> to set the frequency for voice 2 to (fh2 fl2) and the control register for voice 2 to value2
BDRO3SoundProcess music command <#3 fh1 fl1> to set the frequency for voice 3 to (fh3 fl3) and the control register for voice 3 to value3
BDRO4SoundProcess music command <#4 fh1 fl1 fh2 fl2> to set the frequencies and voice control registers for voices 1 and 2
BDRO5SoundProcess music command <#5 fh1 fl1 fh2 fl2 fh3 fl3> to set the frequencies and voice control registers for voices 1, 2 and 3
BDRO6SoundProcess music command <#6> to increment value0 and move on to the next nibble of music data
BDRO7SoundProcess music command <#7 ad1 ad2 ad3 sr1 sr2 sr3> to set three voices' attack and decay length, sustain volume and release length
BDRO8SoundProcess music command <#8> to rest for value4 interrupts
BDRO9SoundProcess music command <#9> to restart the current tune
BDskip1SoundProcess the next nibble of music data in BDBUFF
BEEPSoundMake a short, high beep
BEGINLoaderInitialise the configuration variables and start the game
BELLSoundMake a standard system beep
BET1Workspace variable The magnitude of the pitch angle beta, i.e. |beta|, which is a positive value between 0 and 8
BET2Workspace variable Bit 7 of BET2 = sign of the pitch angle in BETA
BETAWorkspace variable The current pitch angle beta, which is reduced from JSTY to a sign-magnitude value between -8 and +8
BLINEDrawing circlesDraw a circle segment and add it to the ball line heap
BLUEBANDDrawing the screenClear two four-character borders along each side of the space view
BLUEBANDSDrawing the screenClear a four-character border along one side of the space view
BOMBWorkspace variable Energy bomb
BOMBOFFDrawing the screenSwitch off the energy bomb effect
BOXDrawing the screenJust draw the border box along the top and sides
BOX2Drawing the screenDraw the left and right edges of the border box for the space view
BOXSDrawing the screenDraw a horizontal line across the screen at pixel y-coordinate X
BOXS2Drawing the screenDraw a vertical line for the left or right border box edge
boxsizeWorkspace variable This byte appears to be unused
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 endShow the "Load New Commander (Y/N)?" screen and start the game
BR1 (Part 2 of 2)Start and endShow the "Press Fire or Space, Commander" 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")
BUFWorkspace variable The line buffer used by DASC to print justified text
BUMP2DashboardBump up the value of the pitch or roll dashboard indicator
cEquipmentContains an RTS
CABTMPWorkspace variable Cabin temperature
caravanseraiDrawing the screenControls whether multicolour or standard bitmap mode is used for the lower part of the screen (i.e. the dashboard)
CASHWorkspace variable Our current cash pot
cdump (Game Loader)Drawing the screenColour RAM colour data for the dashboard
celllookhDrawing pixelsLookup table for converting a text y-coordinate to the high byte of the address of the start of the character row in screen RAM
celllooklDrawing pixelsLookup table for converting a text y-coordinate to the low byte of the address of the start of the character row
CHAR (Game data)TextMacro definition for characters in the recursive token table
CHECKSave and loadCalculate the checksum for the last saved commander data block
CHECK2Save and loadCalculate the third checksum for the last saved commander data block (Commodore 64 and Apple II versions only)
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
CHK3Save and loadThird checksum byte for the saved commander data file
CHKONDrawing circlesCheck whether any part of a circle appears on the extended screen
CHPRTextPrint a character at the text cursor by poking into screen memory
CHPR2TextCharacter print vector handler
CIRCLEDrawing circlesDraw a circle for the planet
CIRCLE2Drawing circlesDraw a circle (for the planet or chart)
CLDELAYUtility routinesDelay by iterating through 5 * 256 (1280) empty loops
clssDrawing the screenClear the screen, move the text cursor to the top-left corner and jump back into the CHPR routine to print the next character
CLYNSDrawing the screenClear the bottom three text rows of the space view
cmnStatusPrint the commander's name
cmn-1StatusContains an RTS
CNTWorkspace variable Temporary storage, typically used for storing the number of iterations required when looping
CNT2Workspace variable Temporary storage, used in the planet-drawing routine to store the segment number where the arc of a partial circle should start
cntrDashboardApply damping to the pitch or roll dashboard indicator
coffeeSoundReturn from the interrupt routine, for when we are making sound effects
coffeeexSoundRestore the memory configuration and return from the subroutine
COKWorkspace variable Flags used to generate the competition code
COLWorkspace variable Temporary storage, used to store colour information when drawing pixels in the dashboard
COL2Workspace variable The text colour of the next character to draw in CHPR
COLDLoaderConfigure memory, set up interrupt handlers and configure the VIC-II, SID and CIA chips
COMCWorkspace variable The colour of the dot on the compass
COMIRQ1Drawing the screenThe split screen and sound interrupt handler (the IRQ interrupt service hardware vector at $FFFE points here)
COMPASDashboardUpdate the compass
COMUDATSoundMusic data from the C.COMUDAT file
COMXWorkspace variable The x-coordinate of the compass dot
COMYWorkspace variable The y-coordinate of the compass dot
CONT (Game data)TextMacro definition for control codes in the recursive token table
CopyZeroPage (Disk Loader 2)LoaderCopy a page of data in a specified direction between zero page and the page at $CE00, omitting the first two bytes
counterWorkspace variable The rest counter when playing music, for implementing music commands #8 and #15
CPIX2Drawing pixelsDraw a single-height dash on the dashboard
CPIX4Drawing pixelsDraw a double-height dot on the dashboard
cplUniversePrint the selected system name
CRGOWorkspace variable Our ship's cargo capacity
crlfTextTab to column 21 and print a colon
cshStatusPrint the current amount of cash
CTRLKeyboardScan the keyboard to see if CTRL is currently pressed
CTWOSDrawing pixelsReady-made double-pixel character row bytes for the dashboard
CTWOS2Drawing pixelsReady-made single-pixel character row bytes for multicolour bitmap mode
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
date (Game Loader)LoaderA date image that is included into the source disk binaries (this is just random noise in the released game)
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
dec27TextContains an RTS
DEEORUtility routinesUnscramble the main code
DEEORSUtility routinesDecrypt a multi-page block of memory
DEEORS (Game Loader)LoaderDecrypt a multi-page block of memory
DELAYUtility routinesWait for a specified time, in either 1/50s of a second (on PAL systems) or 1/60s of a second (on NTSC systems)
DELT4Workspace variable Our current speed * 64 as a 16-bit value
DELTAWorkspace variable Our current speed, in the range 1-40
DENGYFlightDrain some energy from the energy banks
DET1Drawing the screenShow or hide the dashboard (for when we die)
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
DFLAGWorkspace variable A flag that indicates whether the dashboard is currently being shown on-screen
DIALS (Game Loader)Drawing the screenThe dashboard bitmap and colour data for screen RAM
DIALS (Part 1 of 4)DashboardUpdate the dashboard: speed indicator
DIALS (Part 2 of 4)DashboardUpdate the dashboard: pitch and roll indicators
DIALS (Part 3 of 4)DashboardUpdate the dashboard: four energy banks
DIALS (Part 4 of 4)DashboardUpdate the dashboard: shields, fuel, laser & cabin temp, altitude
DILDashboardThe range of the indicator is 0-16 (for the energy banks)
DIL-1DashboardThe range of the indicator is 0-32 (for the speed indicator)
DIL2DashboardUpdate the roll or pitch indicator on the dashboard
DILXDashboardUpdate a bar-based indicator on the dashboard
DILX+2DashboardThe range of the indicator is 0-64 (for the fuel indicator)
DISKWorkspace variable Current media configuration setting
distawayWorkspace variable Used to store the nearest distance of the rotating ship on the title screen
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 the keyboard to see if a specific key is being pressed
DKSANYKEYKeyboardScan a specific column in the keyboard matrix for a key press
DLWorkspace variable Vertical sync flag
DLYWorkspace variable In-flight message delay
dnMarketPrint the amount of money we have left in the cash pot, then make a short, high beep and delay for 1 second
dn2TextMake a short, high beep and delay for 1 second
DNOIZWorkspace variable Sound on/off configuration setting
dockEdFlightPrint a message to say there is no hyperspacing allowed inside the station
DOCKITFlightApply docking manoeuvres to the ship in INWK
DOCOLTextImplement the #SETCOL command (set the current colour)
DOENTRYFlightDock at the space station, show the ship hangar and work out any mission progression
DOEXPDrawing shipsDraw an exploding ship
DOHFXDrawing circlesImplement the #DOHFX command (update the hyperspace effect flag)
DOKEYKeyboardScan for the seven primary flight controls and apply the docking computer manoeuvring code
dontclipWorkspace variable A flag that controls whether the LL145 routine clips lines to the dimensions of the space view (which we want to disable in the Short-range Chart, as there is no dashboard and the chart needs to use the whole screen)
DORNDMaths (Arithmetic)Generate random numbers
DORND2Maths (Arithmetic)Make sure the C flag doesn't affect the outcome
DOSVNSave and loadImplement the #DOSVN command (update the "save in progress" flag)
DOTDashboardDraw a dash on the compass
DOVDU19Drawing the screenImplement the #SETVDU19 command (change mode 1 palette)
DOXCTextMove the text cursor to a specific column
DOYCTextMove the text cursor to a specific row
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
DTWOSDrawing pixelsAn unused table of ready-made double-pixel character row bytes for the dashboard
DV41Maths (Arithmetic)Calculate (P R) = 256 * DELTA / A
DV42Maths (Arithmetic)Calculate (P R) = 256 * DELTA / z_hi
DVID3B2Maths (Arithmetic)Calculate K(3 2 1 0) = (A P+1 P) / (z_sign z_hi z_lo)
DVID4Maths (Arithmetic)Calculate (P R) = 256 * A / Q
DVIDTMaths (Arithmetic)Calculate (P+1 A) = (A P) / Q
E% (Game data)Drawing shipsShip blueprints default NEWB flags
ECBLBDashboardLight up the E.C.M. indicator bulb ("E") on the dashboard
ECBLB2DashboardStart up the E.C.M. (light up the indicator, start the countdown and make the E.C.M. sound)
ECHR (Game data)TextMacro 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
EDGE (Game data)Drawing shipsMacro definition for adding edges to ship blueprints
EDGESDrawing linesDraw a horizontal line given a centre and a half-width
ee3FlightPrint 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
EJMP (Game data)TextMacro definition for jump tokens in the extended token table
Elite GMA loader (Part 1 of 4) (Disk Loader 2)LoaderSkip past the table of track and sector numbers if present
Elite GMA loader (Part 2 of 4) (Disk Loader 2)LoaderOffer the option of a fast loader and run the disk protection code in the GMA3 file
Elite GMA loader (Part 3 of 4) (Disk Loader 2)LoaderRun the Elite loader in the GMA4 file
Elite GMA loader (Part 4 of 4) (Disk Loader 2)LoaderLoad the GMA5 and GMA6 binaries and start the game
Elite loader (Part 1 of 7) (Game Loader)LoaderUnscramble the loader code and game data
Elite loader (Part 2 of 7) (Game Loader)LoaderCopy the game data to their correct locations
Elite loader (Part 3 of 7) (Game Loader)LoaderConfigure the memory layout and the CIA chips
Elite loader (Part 4 of 7) (Game Loader)LoaderConfigure the VIC-II for screen memory and sprites
Elite loader (Part 5 of 7) (Game Loader)LoaderConfigure the screen bitmap and copy colour data into screen RAM
Elite loader (Part 6 of 7) (Game Loader)LoaderCopy colour data into colour RAM and configure more screen RAM
Elite loader (Part 7 of 7) (Game Loader)LoaderSet up the sprite pointers, make a copy of the dashboard bitmap in DSTORE% and copy the sprite definitions to SPRITELOC%
ENERGYWorkspace variable Energy bank status
ENGYWorkspace variable Energy unit
eqEquipmentSubtract the price of equipment from the cash pot
EQSHPEquipmentShow the Equip Ship screen
ERND (Game data)TextMacro 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
ETOK (Game data)TextMacro definition for recursive tokens in the extended token table
ETWO (Game data)TextMacro definition for two-letter tokens in the extended token table
EVWorkspace variable The "extra vessels" spawning counter
exTextPrint a recursive token
exlookDrawing shipsA table to shift X left by one place when X is 0 or 1
EXNOSoundMake the sound of a laser strike or ship explosion
EXNO2StatusProcess us making a kill
EXNO3SoundMake an explosion sound
EXS1Drawing shipsSet (A X) = (A R) +/- random * cloud size
F%Utility routinesDenotes the end of the main game code, from ELITE A to ELITE K
FACE (Game data)Drawing 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
fastLoaderOffered (Disk Loader 2)LoaderA flag to record whether we have already asked whether to use the fast loader, so we don't ask twice
fastTrackSector (Disk Loader 2)LoaderA track and sector table for use by the fast loader
FEEDTextPrint a newline
filename (Disk Loader 1)LoaderA wildcarded filename that matches the first GMA file on disk
filename (Disk Loader 2)LoaderThe GMA filename used to load the game files, buried in a message from GMA, the author of the loader
FILEPRSave and loadDisplay the currently selected media (disk or tape)
filesysSave and loadA lookup table containing the device numbers for tape and disk
FISTWorkspace variable Our legal status (FIST stands for "fugitive/innocent status"):
FLAGWorkspace variable A flag that's used to define whether this is the first call to the ball line routine in BLINE, so it knows whether to wait for the second call before storing segment data in the ball line heap
FLFLLSDrawing sunsReset the sun line heap
FLHWorkspace variable Flashing console bars configuration setting
FLIPStardustReflect the stardust particles in the screen diagonal and redraw the stardust field
FLKBKeyboardFlush the keyboard buffer
FMLTUMaths (Arithmetic)Calculate A = A * Q / 256
FMLTU2Maths (Arithmetic)Calculate A = K * sin(A)
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
FRIN (Game Loader)LoaderA temporary variable that's used for storing addresses
FRMISTacticsFire a missile from our ship
FRS1TacticsLaunch a ship straight ahead of us, below the laser sights
frumpWorkspace variable Used to store the number of particles in the explosion cloud
FSHWorkspace variable Forward shield status
fwlStatusPrint fuel and cash levels
G%Utility routinesDenotes the start of the main game code, from ELITE A to ELITE K
GC2Maths (Arithmetic)Calculate (Y X) = (A P) * 4
GCASHMaths (Arithmetic)Calculate (Y X) = P * Q * 4
GCNTWorkspace variable The number of the current galaxy (0-7)
GhyFlightPerform a galactic hyperspace jump
GHYPWorkspace variable Galactic hyperdrive
GINFUniverseFetch the address of a ship's data block into INF
GNTMPWorkspace variable Laser temperature (or "gun temperature")
gnumMarketGet a number from the keyboard
GOINMain loopWe jump here from part 3 of the main flight loop if the docking computer is activated by pressing "C"
GOPLTacticsMake the ship head towards the planet
govWorkspace variable The current system's government type (0-7)
GTDRVSave and loadGet an ASCII disk 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
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 This flag is unused in this version of Elite. In the other versions, setting HFX to a non-zero value makes the hyperspace rings multi-coloured, but that effect is not used in this version
HI1TacticsContains an RTS
HITCHTacticsWork out if the ship in INWK is in our crosshairs
HL6Drawing linesContains an RTS
HLOINDrawing linesDraw a horizontal line from (X1, Y1) to (X2, Y1)
HLOIN2Drawing linesRemove a line from the sun line heap and draw it on-screen
hmChartsSelect the closest system and redraw the chart crosshairs
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
HYPNOISESoundMake the sound of the hyperspace drive being engaged
hyRUniverseContains an RTS
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
innersecDrawing the screenA table for converting the value of X from 0 to 1 or from 1 to 0, for use when flipping RASCT between 0 and 1 on each interrupt
INWKWorkspace variable The zero-page internal workspace for the current ship data block
ITEMMarketMacro definition for the market prices table
itsoffMaths (Arithmetic)Contains an RTS
JAMESONSave and loadRestore the default JAMESON commander
jmpUniverseSet the current system to the selected system
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
JUNKWorkspace variable The amount of junk in the local bubble
KWorkspace variable Temporary storage, used in a number of places
K%WorkspacesShip data blocks and ship line heaps
K2Workspace variable Temporary storage, used in a number of places
K3Workspace variable Temporary storage, used in a number of places
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
KERNALSETUPSave and loadSet up memory and interrupts so we can use the Kernal functions and configure the file system device number and filename
KEYLOOKKeyboardThe key logger
KILLSHPUniverseRemove a ship from our local bubble of universe
KLWorkspace variable If a key is being pressed that is not in the keyboard table at KYTB, it can be stored here (as seen in routine DK4, for example)
KLOWorkspace variable The key logger in the BBC Micro version has a spare byte at the start for storing the last key press, so we also include a spare byte here so the KLO logger in the Commodore 64 version behaves in a similar way to the KL key logger in the BBC Micro
KS1UniverseRemove the current ship from our local bubble of universe
KS2UniverseCheck the local bubble for missiles with target lock
KS3UniverseSet the SLSP ship line heap pointer after shuffling ship slots
KS4UniverseRemove the space station and replace it with the sun
KTRANKeyboardAn unused key logger buffer that's left over from the 6502 Second Processor version of Elite
KWH% (Game data)StatusInteger number of kills awarded for destroying each type of ship
KWL% (Game data)StatusFractional number of kills awarded for destroying each type of ship
KY1Workspace variable "?" is being pressed (slow down, KLO+$9)
KY12Workspace variable "C=" is being pressed (energy bomb, KLO+$3)
KY13Workspace variable Left arrow is being pressed (launch escape pod, KLO+$7)
KY14Workspace variable "T" is being pressed (target missile, KLO+$2A)
KY15Workspace variable "U" is being pressed (unarm missile, KLO+$22)
KY16Workspace variable "M" is being pressed (fire missile, KLO+$1C)
KY17Workspace variable "E" is being pressed (activate E.C.M., KLO+$32)
KY18Workspace variable "J" is being pressed (in-system jump, KLO+$1E)
KY19Workspace variable "C" is being pressed (activate docking computer, KLO+$2C)
KY2Workspace variable Space is being pressed (speed up, KLO+$4)
KY20Workspace variable "P" is being pressed (deactivate docking computer, KLO+$17)
KY3Workspace variable "<" is being pressed (roll left, KYO+$11)
KY4Workspace variable ">" is being pressed (roll right, KLO+$14)
KY5Workspace variable "X" is being pressed (pull up, KLO+$29)
KY6Workspace variable "S" is being pressed (pitch down, KLO+$33)
KY7Workspace variable "A" is being pressed (fire lasers, KLO+$36)
KYTBKeyboardLookup table for in-flight keyboard controls
L1MUtility routinesTemporary storage for the new value of the 6510 input/output port register
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
LCASHMaths (Arithmetic)Subtract an amount of cash from the cash pot
LIJT1Drawing linesAddresses for modifying the low byte of the JMP instruction at LI71 to support the unrolled algorithm in part 3 of LOIN
LIJT2Drawing linesAddresses for modifying the high byte of the JMP instruction at LI71 to support the unrolled algorithm in part 3 of LOIN
LIJT3Drawing linesAddresses for modifying the low byte of the JMP instruction at LI72 to support the unrolled algorithm in part 3 of LOIN
LIJT4Drawing linesAddresses for modifying the high byte of the JMP instruction at LI72 to support the unrolled algorithm in part 3 of LOIN
LIJT5Drawing linesAddresses for modifying the low byte of the JMP instruction at LI91 to support the unrolled algorithm in part 4 of LOIN
LIJT6Drawing linesAddresses for modifying the high byte of the JMP instruction at LI91 to support the unrolled algorithm in part 4 of LOIN
LIJT7Drawing linesAddresses for modifying the low byte of the JMP instruction at LI92 to support the unrolled algorithm in part 4 of LOIN
LIJT8Drawing linesAddresses for modifying the high byte of the JMP instruction at LI92 to support the unrolled algorithm in part 4 of LOIN
LL10-1Drawing shipsContains an RTS
LL118Drawing linesMove a point along a line until it is on-screen
LL118-1Drawing linesContains an RTS
LL120Maths (Arithmetic)Calculate (Y X) = (S x1_lo) * XX12+2 or (S x1_lo) / XX12+2
LL121Maths (Arithmetic)Calculate (Y X) = (S R) / Q and set the sign to the opposite of the top byte on the stack
LL122Maths (Arithmetic)Calculate (Y X) = (S R) * Q and set the sign to the opposite of the top byte on the stack
LL123Maths (Arithmetic)Calculate (Y X) = (S R) / XX12+2 or (S R) * XX12+2
LL128Maths (Arithmetic)Contains an RTS
LL129Maths (Arithmetic)Calculate Q = XX12+2, A = S EOR XX12+3 and (S R) = |S R|
LL133Maths (Arithmetic)Negate (Y X) and return from the subroutine LL128 Contains an RTS
LL145 (Part 1 of 4)Drawing linesClip line: Work out which end-points are on-screen, if any
LL145 (Part 2 of 4)Drawing linesClip line: Work out if any part of the line is on-screen
LL145 (Part 3 of 4)Drawing linesClip line: Calculate the line's gradient
LL145 (Part 4 of 4)Drawing linesClip line: Call the routine in LL188 to do the actual clipping
LL147Drawing linesDon't initialise the values in SWAP or A
LL164Drawing circlesMake the hyperspace sound and draw the hyperspace tunnel
LL28Maths (Arithmetic)Calculate R = 256 * A / Q
LL28+4Maths (Arithmetic)Skips the A >= Q check and always returns with C flag cleared, so this can be called if we know the division will work
LL30Drawing linesLL30 is a synonym for LOIN and draws a line from (X1, Y1) to (X2, Y2)
LL31Maths (Arithmetic)Skips the A >= Q check and does not set the R counter, so this can be used for jumping straight into the division loop if R is already set to 254 and we know the division will work
LL38Maths (Arithmetic)Calculate (S A) = (S R) + (A Q)
LL5Maths (Arithmetic)Calculate Q = SQRT(R Q)
LL51Maths (Geometry)Calculate the dot product of XX15 and XX16
LL61Maths (Arithmetic)Calculate (U R) = 256 * A / Q
LL62Maths (Arithmetic)Calculate 128 - (U R)
LL66Drawing shipsA re-entry point into the ship-drawing routine, used by the LL62 routine to store 128 - (U R) on the XX3 heap
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
load3 (Disk Loader 2)LoaderJump to the entry point in elite-loader
loaderScreens (Disk Loader 2)LoaderPETSCII codes for clearing the screen and displaying the fast loader prompt and loading screens
LoadGMAFile (Disk Loader 2)LoaderLoad a specific GMA file
LODSave and loadLoad a commander file
LODATA (Game Loader)LoaderThe binaries for recursive tokens and the game font
logMaths (Arithmetic)Binary logarithm table (high byte)
logLMaths (Arithmetic)Binary logarithm table (low byte)
LOIN (Part 1 of 7)Drawing linesDraw a line: Calculate the line gradient in the form of deltas
LOIN (Part 2 of 7)Drawing linesDraw a line: Line has a shallow gradient, step right along x-axis
LOIN (Part 3 of 7)Drawing linesDraw a shallow line going right and up or left and down
LOIN (Part 4 of 7)Drawing linesDraw a shallow line going right and down or left and up
LOIN (Part 5 of 7)Drawing linesDraw a line: Line has a steep gradient, step up along y-axis
LOIN (Part 6 of 7)Drawing linesDraw a steep line going up and left or down and right
LOIN (Part 7 of 7)Drawing linesDraw a steep line going up and right or down and left
LOOK1FlightInitialise the space view
LORSave and loadSet the C flag and return from the subroutine
lotusDrawing the screenThe colour of the explosion sprite in the upper and lower parts of the screen
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
mMaths (Geometry)Do not include A in the calculation
M%Main loopThe entry point for the main flight loop NOMVETR The re-entry point in the main game loop for when there are no sprites to move
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 (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
me1FlightErase an old in-flight message and display a new one
me2FlightRemove 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
mes9FlightPrint a text token, possibly followed by " DESTROYED"
MESSFlightDisplay an in-flight message
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
moonflowerDrawing the screenControls the energy bomb effect by switching between multicolour and standard mode
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
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 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 flag
MU6Maths (Arithmetic)Set P(1 0) = (A A)
MUDOCKWorkspace variable Docking music tune configuration setting
MUFORWorkspace variable Configuration setting that controls whether the docking music can be enabled or disabled
MULIEWorkspace variable A flag to record whether the RESET routine is currently being run, in which case the music configuration variables may be in a state of flux
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
MUPLAWorkspace variable A flag to record whether any music is currently playing
Music variablesSoundVariables that are used by the music player
MUSILLYWorkspace variable Sounds during music configuration setting
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)An unused routine that does the same as MUT2
MUTOKWorkspace variable Docking music configuration setting
MUTOKCHSoundProcess a change in the docking music configuration setting
MUTOKOLDWorkspace variable Used to store the previous value of MUTOK, so we can track whether the docking music configuration changes
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
mvbllopUtility routinesOnly copy Y bytes, rather than a whole page
mvblock (Game Loader)LoaderCopy a number of pages in memory
mvblockKUtility routinesCopy a specific number of pages in memory
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
mvsm (Game Loader)LoaderCopy 280 bytes in memory
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)
MVTRIBSMissionsMove the Trumble sprites around on-screen
NA%Save and loadThe data block for the last saved commander
NA2%Save and loadThe data block for the default commander
NAMEWorkspace variable The current commander name
NEWBWorkspace variable The ship's "new byte flags" (or NEWB flags)
newosrdchTubeThe custom OSRDCH routine for reading characters
newzpWorkspace variable This is used by the STARS2 routine for storing the stardust particle's delta_x value
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 draw a horizontal line at row 19 to box it in
NLIN4Drawing linesDraw a horizontal line at pixel row 19 to box in a title
NMIpissoffLoaderAcknowledge NMI interrupts and ignore them
NO1Maths (Geometry)Contains an RTS
NOISESoundMake the sound whose number is in Y
NOISE2SoundMake a sound effect with a specific volume and release length
NOISEOFFSoundTurn off a specific sound effect in whichever voice it is currently playing in
NOMSLWorkspace variable The number of missiles we have fitted (0-4)
NOMVETRMain loopThe re-entry point in the main game loop for when there are no sprites to move
NORMMaths (Geometry)Normalise the three-coordinate vector in XX15
NOSPRITESMissionsDisable all sprites and remove them from the screen
NOSTMWorkspace variable The number of stardust particles shown on screen, which is 12 (#NOST) for normal space, and 3 for witchspace
NWDAV4MarketPrint an "ITEM?" error, make a beep and rejoin the TT210 routine
NWDAVxxMarketUsed to rejoin this routine from the call to NWDAV4
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
OfferFastLoader (Disk Loader 2)LoaderOffer the option of using the fast loader, if we haven't already, and set up the fast loader if it is chosen
ohUniverseContains an RTS SPIN2 Remove any randomness: spawn cargo of a specific type (given in X), and always spawn the number given in A
oldlongSave and loadContains the length of the last saved commander name
OOPSFlightTake some damage
Option variablesWorkspacesVariables that are predominantly used to store the game options
OTHERFILEPRSave and loadDisplay the non-selected media (disk or tape)
ou2FlightDisplay "E.C.M.SYSTEM DESTROYED" as an in-flight message
ou3FlightDisplay "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
P2Workspace variable Temporary storage, used in place of variable P in the line-drawing routines
PAS1MissionsDisplay a rotating ship at space coordinates (0, conhieght, 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
PAUSEMissionsDisplay 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
PDESCUniversePrint the system's extended description or a mission 1 directive
pingUniverseSet the selected system to the current system
PIX1Maths (Arithmetic)Calculate (YY+1 SYL+Y) = (A P) + (S R) and draw stardust particle
PIXELDrawing pixelsDraw a 1-pixel dot, 2-pixel dash or 4-pixel square
PIXEL2Drawing pixelsDraw a stardust particle relative to the screen centre
PL2Drawing planetsRemove the planet or sun from the screen
PL2-1Drawing planetsContains an RTS
PL21Drawing planetsReturn from a planet/sun-drawing routine with a failure flag
PL44Drawing planetsClear the C flag and return from the subroutine PL6 Contains an RTS
PL6Drawing planetsContains an RTS
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
PLS1Drawing planetsCalculate (Y A) = nosev_x / z
PLS2Drawing planetsDraw a half-ellipse
PLS22Drawing planetsDraw an ellipse or half-ellipse
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+1 P) / (z_sign z_hi z_lo)
PLTOGWorkspace variable Planetary details configuration setting
PLUTFlightFlip the coordinate axes for the four different views
pr2TextPrint an 8-bit number, left-padded to 3 digits, and optional point
pr2+2TextPrint the 8-bit number in X to the number of digits in A
pr5TextPrint a 16-bit number, left-padded to 5 digits, and optional point
pr6TextPrint 16-bit number, left-padded to 5 digits, no point
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)
PrintString (Disk Loader 2)LoaderPrint the null-terminated string at offset X in loaderScreens
PROJMaths (Geometry)Project the current ship or planet onto the screen
prqTextPrint a text token followed by a question mark
prq+3TextPrint 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
PTCLS2Drawing shipsDraw the explosion along with an explosion sprite
ptgFlightCalled when the user manually forces a mis-jump RTS111 Contains an RTS
PULSEWWorkspace variable The current pulse width for sound effects
PUTBACKTubeReset the OSWRCH vector in WRCHV to point to USOSWRCH
PX4Drawing pixelsContains an RTS
PZWDashboardFetch the current dashboard colours, to support flashing
QWorkspace variable Temporary storage, used in a number of places
Q2Workspace variable Temporary storage, used in place of variable Q in the line-drawing routines
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 type of the current view:
QQ12Workspace variable Our "docked" status
QQ14Workspace variable Our current fuel level (0-70)
QQ15Workspace variable The three 16-bit seeds for the selected system, i.e. the one in the crosshairs in the Short-range Chart
QQ16TextThe two-letter token lookup table
QQ17Workspace variable Contains a number of flags that affect how text tokens are printed, particularly capitalisation:
QQ18 (Game data)TextThe 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
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%Utility routinesDenotes the end of the first part of the main game code (CODE1), from ELITE A to ELITE C
R2Workspace variable Temporary storage, used in place of variable R in the line-drawing routines
R5TextMake a beep and jump back into the character-printing routine at CHPR
RANDWorkspace variable Four 8-bit seeds for the random number generation system implemented in the DORND routine
RASTCTDrawing the screenThe current raster count, which flips between 0 and 1 on each call to the COMIRQ1 interrupt handler (0 = space view, 1 = dashboard)
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
RDLILoaderThe OS command string for running the flight code in file D.CODE in the disc version of Elite
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
RelocateLoader (Disk Loader 1)LoaderLoad and run the GMA1 loader file
RES2Start and endReset a number of flight variables and workspaces
RESETStart and endReset most variables
RLINETextThe OSWORD configuration block used to fetch a line of text from the keyboard
RR4TextRestore the registers and return from the subroutine RRafter A re-entry point from the clss routine to print the character in A
RR4STextA jump point that restores the registers and returns from the CHPR subroutine (so we can use a branch instruction to jump to RR4)
RRafterTextA re-entry point from the clss routine to print the character in A
RTOK (Game data)TextMacro definition for recursive tokens in the recursive token table
RTS111FlightContains an RTS
RTS2Drawing sunsContains an RTS
RUGAL (Game data)TextThe criteria for systems with extended description overrides
RunGMA (Disk Loader 1)LoaderLoad and run the GMA1 loader file
RUPLA (Game data)TextSystem numbers that have extended description overrides
RUTOK (Game data)TextThe second extended token table for recursive tokens 0-26 (DETOK3)
SWorkspace 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
S2Workspace variable Temporary storage, used in place of variable S in the line-drawing routines
safehouseWorkspace variable Backup storage for the seeds for the selected system
santanaDrawing the screenControls whether sprite 1 (the explosion sprite) is drawn in single colour or multicolour mode
SCWorkspace variable Screen address (low byte)
scacolDrawing shipsShip colours on the scanner
SCANDashboardDisplay the current ship on the scanner
SCHWorkspace variable Screen address (high byte)
sdump (Game Loader)Drawing the screenScreen RAM colour data for the dashboard
SESCPFlightSpawn an escape pod from the current (parent) ship
SETL1Utility routinesSet the 6510 input/output port register to control the memory map
SetUpFastLoader (Disk Loader 2)LoaderSet up the fast loader so that calls to the Kernal's file functions use the fast loader routines instead
SetUpGMAFile (Disk Loader 2)LoaderConfigure the filename parameters to load a specific GMA file
SETXCTextAn unused routine to move the text cursor to a specific column
SETYCTextAn unused routine to move the text cursor to a specific row
SEVENSSoundA table for converting the value of Y to 7 * Y
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
SFXATKSoundThe attack and decay length (SID+$5) for each sound effect
SFXCNTSoundThe counter for each sound effect, which defines the duration of the effect in frames
SFXCRSoundThe voice control register (SID+$4) for each sound effect
SFXFQSoundThe frequency (SID+$5) for each sound effect
SFXFRCHSoundThe frequency change to be applied to each sound effect in each frame (as a signed number)
SFXPRSoundThe priority level for each sound effect
SFXSUSSoundThe release length and sustain volume (SID+$6) for each sound effect
SFXVCHSoundThe volume change rate for each sound effect, i.e. how many frames need to pass before the sound effect's volume is reduced by one
shangoDrawing the screenThe raster lines that fire the raster interrupt, so it fires at the top of the screen (51) and the top of the dashboard (51 + 143)
SHDFlightCharge a shield and drain some energy from the energy banks
SHIP_ADDER (Game data)Drawing shipsShip blueprint for an Adder
SHIP_ANACONDA (Game data)Drawing shipsShip blueprint for an Anaconda
SHIP_ASP_MK_2 (Game data)Drawing shipsShip blueprint for an Asp Mk II
SHIP_ASTEROID (Game data)Drawing shipsShip blueprint for an asteroid
SHIP_BOA (Game data)Drawing shipsShip blueprint for a Boa
SHIP_BOULDER (Game data)Drawing shipsShip blueprint for a boulder
SHIP_CANISTER (Game data)Drawing shipsShip blueprint for a cargo canister
SHIP_COBRA_MK_1 (Game data)Drawing shipsShip blueprint for a Cobra Mk I
SHIP_COBRA_MK_3 (Game data)Drawing shipsShip blueprint for a Cobra Mk III
SHIP_COBRA_MK_3_P (Game data)Drawing shipsShip blueprint for a Cobra Mk III (pirate)
SHIP_CONSTRICTOR (Game data)Drawing shipsShip blueprint for a Constrictor
SHIP_CORIOLIS (Game data)Drawing shipsShip blueprint for a Coriolis space station
SHIP_COUGAR (Game data)Drawing shipsShip blueprint for a Cougar
SHIP_DODO (Game data)Drawing shipsShip blueprint for a Dodecahedron ("Dodo") space station
SHIP_ESCAPE_POD (Game data)Drawing shipsShip blueprint for an escape pod
SHIP_FER_DE_LANCE (Game data)Drawing shipsShip blueprint for a Fer-de-Lance
SHIP_GECKO (Game data)Drawing shipsShip blueprint for a Gecko
SHIP_KRAIT (Game data)Drawing shipsShip blueprint for a Krait
SHIP_MAMBA (Game data)Drawing shipsShip blueprint for a Mamba
SHIP_MISSILE (Game data)Drawing shipsShip blueprint for a missile
SHIP_MORAY (Game data)Drawing shipsShip blueprint for a Moray
SHIP_PLATE (Game data)Drawing shipsShip blueprint for an alloy plate
SHIP_PYTHON (Game data)Drawing shipsShip blueprint for a Python
SHIP_PYTHON_P (Game data)Drawing shipsShip blueprint for a Python (pirate)
SHIP_ROCK_HERMIT (Game data)Drawing shipsShip blueprint for a rock hermit (asteroid)
SHIP_SHUTTLE (Game data)Drawing shipsShip blueprint for a Shuttle
SHIP_SIDEWINDER (Game data)Drawing shipsShip blueprint for a Sidewinder
SHIP_SPLINTER (Game data)Drawing shipsShip blueprint for a splinter
SHIP_THARGOID (Game data)Drawing shipsShip blueprint for a Thargoid mothership
SHIP_THARGON (Game data)Drawing shipsShip blueprint for a Thargon
SHIP_TRANSPORTER (Game data)Drawing shipsShip blueprint for a Transporter
SHIP_VIPER (Game data)Drawing shipsShip blueprint for a Viper
SHIP_WORM (Game data)Drawing shipsShip blueprint for a Worm
SHIPS (Game Loader)LoaderThe binaries for the ship blueprints
SHPPTDrawing shipsDraw a distant ship as a point rather than a full wireframe
SIGHTFlightDraw the laser crosshairs
sightcolDrawing linesColours for the crosshair sights on the different laser types
SLSPWorkspace variable The address of the bottom of the ship line heap
SNE (Game data)Maths (Geometry)Sine/cosine table
SOATKWorkspace variable Sound buffer for attack and decay lengths
SOCNTWorkspace variable Sound buffer for sound effect counters
SOCRWorkspace variable Sound buffer for voice control register values
SOFLGWorkspace variable Sound buffer for sound effect flags
SOFLUSHSoundReset the sound buffers and turn off all sound channels
SOFRCHWorkspace variable Sound buffer for frequency change values
SOFRQWorkspace variable Sound buffer for SFXFQ values
SOINTSoundProcess the contents of the sound buffer and send it to the sound chip, to make sound effects as part of the interrupt routine
SOLARUniverseSet up various aspects of arriving in a new system
SOPRWorkspace variable Sound buffer for SOPR values
SOS1UniverseUpdate the missile indicators, set up the planet data block
SOSUSWorkspace variable Sound buffer for release length and sustain volume
SOUL3bSoundCheck whether this is the last voice when making sound effects in the interrupt routine, and return from the interrupt if it is
SOUL8SoundProcess the sound buffer from voice Y to 0
Sound variablesSoundThe sound buffer where the data to be sent to the sound chip is processed
SOUR1SoundContains an RTS
SOVCHWorkspace variable Sound buffer for the volume change rate
SP1DashboardDraw the space station on the compass
SP2DashboardDraw a dot on the compass, given the planet/station vector
spastoUniverseContains the address of the Coriolis space station's ship blueprint
SPBLBDashboardLight up the space station indicator ("S") on the dashboard
spcTextPrint a text token followed by a space
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
SPMASKMissionsMasks for updating sprite bits in VIC+$10 for the top bit of the 9-bit x-coordinates of the Trumble sprites
SPRITE2 (Sprites)SpritesMacro definition for a two-colour sprite pixel row
SPRITE2_BYTE (Sprites)SpritesMacro definition for a two-colour sprite pixel byte
SPRITE4 (Sprites)SpritesMacro definition for a four-colour sprite pixel row
SPRITE4_BYTE (Sprites)SpritesMacro definition for a four-colour sprite pixel byte
spritp (Game Loader)Drawing the screenSprite definitions
spritp (Sprites)SpritesSprite definitions for four laser sights, the explosion sprite and two Trumbles
sprxWorkspace variable Contains the x-coordinate offset for the explosion sprite, i.e. the relative position of the sprite compared to the centre of the explosion, which needs to be set according to the size of the sprite
spryWorkspace variable Contains the y-coordinate offset for the explosion sprite, i.e. the relative position of the sprite compared to the centre of the explosion, which needs to be set according to the size of the sprite
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
SSPRWorkspace variable "Space station present" flag
STARSStardustThe main routine for processing the stardust
STARS1StardustProcess the stardust for the front view
STARS2StardustProcess the stardust for the left or right view
STARS6StardustProcess the stardust for the rear view
startatSoundStart playing the title music, if configured
startat2SoundStart playing the music at address (A X) + 1
startbdSoundStart playing the docking music, if configured
STARTUPLoaderSet the various vectors, interrupts and timers
STATUSStatusShow the Status Mode screen
stopatSoundStop playing the current music coffeeex Restore the memory configuration and return from the subroutine
stopbdSoundStop playing the docking music
STPWorkspace variable The step size for drawing circles
SUN (Part 1 of 4)Drawing sunsDraw the sun: Set up all the variables needed to draw the sun
SUN (Part 2 of 4)Drawing sunsDraw the sun: Start from the bottom of the screen and erase the old sun line by line
SUN (Part 3 of 4)Drawing sunsDraw the sun: Continue to move up the screen, drawing the new sun line by line
SUN (Part 4 of 4)Drawing sunsDraw the sun: Continue to the top of the screen, erasing the old sun line by line
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 disk access menu and process saving of commander files
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)
SWAPPZEROUtility routinesA routine that swaps zero page with the page at $CE00, so that zero page changes made by Kernal functions can be reversed
SWAPPZERO (source disk variant)Utility routinesA routine that swaps zero page with the page at $CE00, so that zero page changes made by Kernal functions can be reversed
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
T1Workspace variable Temporary storage, used in a number of places
T2Workspace variable Temporary storage, used in place of variable T in the line-drawing routines
T95KeyboardPrint the distance to the selected system
TA151TacticsMake the ship head towards the planet TA9-1 Contains an RTS
TA2Maths (Geometry)Calculate the length of the vector in XX15 (ignoring the low coordinates), returning it in Q
TA9-1TacticsContains an RTS
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
talUniversePrint the current galaxy number
TALLYWorkspace variable Our combat rank
TALLYLWorkspace variable Combat rank fraction
tapeerrorSave and loadPrint either "TAPE ERROR" or "DISK ERROR"
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
TBRIEFMissionsStart mission 3
tekWorkspace variable The current system's tech level (0-14)
TENSTextA constant used when printing large numbers in BPRNT
TGINTKeyboardThe keys used to toggle configuration settings when the game is paused
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
thiskeyWorkspace variable If a key is being pressed that is not in the keyboard table at KYTB, it can be stored in KL and thiskey (as seen in routine DK4, for example)
thislongSave and loadContains the length of the most recently entered commander name
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
TKN1 (Game data)TextThe 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
TOKN (Game data)TextMacro definition for standard tokens in the extended token table
TPWorkspace variable The current mission status
TR1Save and loadCopy the last saved commander's name from NA% to INWK
trackSector (Disk Loader 2)LoaderTrack and sector numbers for all the files on the disk, for use in the fast loader
TRADEMODEDrawing the screenClear the screen and set up a trading screen
TRANTABLEKeyboardTranslation table from internal key number to ASCII
TRIBBLEWorkspace variable The number of Trumbles in the cargo hold
TRIBCTWorkspace variable Contains the number of Trumble sprites that we are showing on-screen, in the range 0 to 6
TRIBDIRMissionsThe low byte of the four 16-bit directions in which Trumble sprites can move
TRIBDIRHMissionsThe high byte of the four 16-bit directions in which Trumble sprites can move
TRIBMAMissionsA table for converting the number of Trumbles in the hold into a sprite-enable flag to use with VIC register $15
TRIBTAMissionsA table for converting the number of Trumbles in the hold into a number of sprites in the range 0 to 6
TRIBVXWorkspace variable Contains the low byte of the 16-bit x-axis velocity of each of the Trumbles
TRIBVXHWorkspace variable Contains the high byte of the 16-bit x-axis velocity of each of the Trumbles
TRIBXHWorkspace variable Contains bit 8 of the x-coordinate for each of the Trumble sprites (as x-coordinates are 9-bit values)
TRNMESave and loadCopy the last saved commander's name from INWK to NA%
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
TT146UniversePrint the distance to the selected system in light years
TT147FlightPrint an error when a system is out of hyperspace range
TT15Drawing linesDraw a set of crosshairs
TT151MarketPrint the name, price and availability of a market item
TT152MarketPrint the unit ("t", "kg" or "g") for a market item
TT16ChartsMove the crosshairs on a chart
TT160MarketPrint "t" (for tonne) and a space
TT161MarketPrint "kg" (for kilograms)
TT162TextPrint a space
TT162+2TextJump to TT27 to print the text token in A
TT163MarketPrint the headers for the table of market prices
TT167MarketShow the Market Price screen
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
TT210MarketShow a list of current cargo in our hold, optionally to sell
TT213MarketShow the Inventory screen
TT214KeyboardAsk a question with a "Y/N?" prompt and return the response
TT217KeyboardScan the keyboard until a key is pressed
TT219MarketShow the Buy Cargo screen
TT22ChartsShow the Long-range Chart
TT23ChartsShow the Short-range Chart
TT24UniverseCalculate system data from the system seeds
TT25UniverseShow the Data on System screen
TT26TextPrint a character at the text cursor, with support for verified text in extended tokens
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
TT66Drawing the screenClear the screen and set the current view type
TT66simpDrawing the screenClear the whole screen inside the border box, and move the text cursor to the top-left corner
TT67TextPrint a newline
TT67XTextPrint a newline
TT68TextPrint a text token followed by a colon
TT69TextSet Sentence Case and print a newline
TT70UniverseDisplay "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
TTX66Drawing the screenClear the top part of the screen and draw a border box
TTX66KDrawing the screenClear the whole screen or just the space view (as appropriate), draw a border box, and if required, show the dashboard
TTX69TextPrint a paragraph break
TWFLDrawing linesReady-made character rows for the left end of a horizontal line in the space view
TWFRDrawing linesReady-made character rows for the right end of a horizontal line in mode 4
TWOK (Game data)TextMacro definition for two-letter tokens in the token table
TWOSDrawing pixelsReady-made single-pixel character row bytes for mode 4
TWOS2Drawing pixelsReady-made double-pixel character row bytes for mode 4
TYPEWorkspace variable The current ship type
UWorkspace variable Temporary storage, used in a number of places
U%KeyboardClear the key logger and reset a number of flight variables
UNIVUniverseTable of pointers to the local universe's ship data blocks
UPWorkspacesConfiguration variables
UPOWorkspace variable This byte appears to be unused
VWorkspace variable Temporary storage, typically used for storing an address pointer
V% (Game Loader)Utility routinesDenotes the end of the second block of loader code, as used in the encryption/decryption process
value0Workspace variable An unused counter that increments every time we process music command <#6>
value1Workspace variable Stores the voice control register for voice 1
value2Workspace variable Stores the voice control register for voice 2
value3Workspace variable Stores the voice control register for voice 3
value4Workspace variable Stores the rest length for commands #8 and #15
value5Workspace variable The address before the start of the music data for the tune that is configured to play for docking, so this can be changed to alter the docking music
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)
VERTEX (Game data)Drawing shipsMacro definition for adding vertices to ship blueprints
vibrato2Workspace variable The vibrato counter for voice 2
vibrato3Workspace variable The vibrato counter for voice 3
VIEWWorkspace variable The number of the current space view
voice2hi1Workspace variable The low byte of the first vibrato frequency for voice 2, which contains the lower frequency
voice2hi2Workspace variable The low byte of the second vibrato frequency for voice 2, which contains the higher frequency
voice2lo1Workspace variable The high byte of the first vibrato frequency for voice 2, which contains the lower frequency
voice2lo2Workspace variable The high byte of the second vibrato frequency for voice 2, which contains the higher frequency
voice3hi1Workspace variable The low byte of the first vibrato frequency for voice 3, which contains the lower frequency
voice3hi2Workspace variable The low byte of the second vibrato frequency for voice 3, which contains the higher frequency
voice3lo1Workspace variable The high byte of the first vibrato frequency for voice 3, which contains the lower frequency
voice3lo2Workspace variable The high byte of the second vibrato frequency for voice 3, which contains the higher frequency
VOWELTextTest whether a character is a vowel
W% (Game Loader)Utility routinesDenotes the start of the first block of loader code, as used in the encryption/decryption process
wantdialsDrawing the screenShow the dashboard on-screen
WARPFlightPerform an in-system jump
welcomeDrawing the screenThe background colour for the upper and lower parts of the screen, used by the energy bomb to flash the screen's background colour
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 planetsReset the ball line heap
WPLSDrawing sunsRemove the sun from the screen
WPLS-1Drawing sunsContains an RTS
WPLS2Drawing planetsRemove the planet from the screen
WPSHPSDashboardClear the scanner, reset the ball line and sun line heaps
WSCANDrawing the screenWait for the vertical sync
wWFlightStart a hyperspace countdown
wW2FlightStart the hyperspace countdown, starting the countdown from the value in A
X% (Game Loader)Utility routinesDenotes the end of the first block of loader code, as used in the encryption/decryption process
X1Workspace variable Temporary storage, typically used for x-coordinates in line-drawing routines
X2Workspace variable Temporary storage, typically used for x-coordinates in line-drawing routines
XCWorkspace variable The x-coordinate of the text cursor (i.e. the text column), which can be from 0 to 32
XPWorkspace variable This byte appears to be unused
XSAVWorkspace variable Temporary storage for saving the value of the X register, used in a number of places
XSAV2Workspace variable Temporary storage, used for storing the value of the X register in the CHPR routine
XXWorkspace variable Temporary storage, typically used for storing a 16-bit x-coordinate
XX0Workspace variable Temporary storage, used to store the address of a ship blueprint. For example, it is used when we add a new ship to the local bubble in routine NWSHP, and it contains the address of the current ship's blueprint as we loop through all the nearby ships in the main flight loop
XX1Workspace variable This is an alias for INWK that is used in the main ship-drawing routine at LL9
XX12Workspace variable Temporary storage for a block of values, used in a number of places
XX13Workspace variable Temporary storage, typically used in the line-drawing routines
XX14Workspace variable This byte appears to be unused
XX15Workspace variable Temporary storage, typically used for storing screen coordinates in line-drawing routines
XX16Workspace variable Temporary storage for a block of values, used in a number of places
XX17Workspace variable Temporary storage, used in BPRNT to store the number of characters to print, and as the edge counter in the main ship-drawing routine
XX18Workspace variable Temporary storage used to store coordinates in the LL9 ship-drawing routine
XX19Workspace variable XX19(1 0) shares its location with INWK(34 33), which contains the address of the ship line heap
XX2Workspace variable Temporary storage, used to store the visibility of the ship's faces during the ship-drawing routine at LL9
XX20Workspace variable Temporary storage, used in a number of places
XX21 (Game data)Drawing 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
Y2Workspace variable Temporary storage, typically used for y-coordinates in line-drawing routines
YCWorkspace variable The y-coordinate of the text cursor (i.e. the text row), which can be from 0 to 23
YESNOKeyboardWait until either "Y" or "N" is pressed
yetanotherrtsTacticsContains an RTS
ylookuphDrawing pixelsLookup table for converting a pixel y-coordinate to the high byte of a screen address (within the 256-pixel-wide game screen)
ylookuplDrawing pixelsLookup table for converting a pixel y-coordinate to the low byte of a screen address (within the 256-pixel-wide game screen)
YPWorkspace variable This byte appears to be unused
yplUniversePrint the current system name
ypl-1UniverseContains an RTS
YSWorkspace variable This byte appears to be unused
YSAVWorkspace variable Temporary storage for saving the value of the Y register, used in a number of places
YSAV2Workspace variable Temporary storage, used for storing the value of the Y register in the CHPR routine
Yx2M1Workspace variable This is used to store the number of pixel rows in the space view minus 1, which is also the y-coordinate of the bottom pixel row of the space view (it is set to 191 in the RES2 routine)
YYWorkspace variable Temporary storage, typically used for storing a 16-bit y-coordinate
ZeUniverseInitialise the INWK workspace to a hostile ship
ZEBCUtility routinesZero-fill pages $B and $C
zebopDrawing the screenThe value for VIC register $18 to set the screen RAM address for a raster count of 0 in the interrupt routine (i.e. the space view)
ZEKTRANKeyboardClear the key logger
ZEROUtility routinesReset the local bubble of universe and ship status
ZES1Utility routinesZero-fill the page whose number is in X
ZES1kUtility routinesZero-fill the page whose number is in X
ZES2Utility routinesZero-fill a specific page
ZES2kUtility routinesZero-fill a specific page
ZESNEWUtility routinesZero-fill memory from SC(1 0) to the end of the page
ZINFUniverseReset the INWK workspace and orientation vectors
zonkscannersDrawing the screenHide all ships on the scanner
ZPWorkspacesLots of important variables are stored in the zero page workspace as it is quicker and more space-efficient to access memory here
ZP (Game Loader)WorkspacesImportant variables used by the loader
ZP2 (Game Loader)Workspace variable Stores addresses used for moving content around
ZZWorkspace variable Temporary storage, typically used for distance values
zZ+1FlightContains an RTS