Skip to navigation

BBC Micro Elite

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 BBC Micro Elite, sorted alphabetically.

  • ABORT - Disarm missiles and update the dashboard indicators
  • ABORT2 - Set/unset the lock target for a missile and update the dashboard
  • acorn - The text for the demo's first scroll text
  • ACT - Arctan table
  • ADD - Calculate (A X) = (A P) + (S R)
  • ADD (I/O processor) - Calculate (A X) = (A P) + (S R)
  • ADDBYT (I/O processor) - Implement the OSWRCH 130 command (add a byte to a line and draw it when all bytes are received)
  • ADPARAMS (I/O processor) - Implement the OSWRCH 137 command (add a dashboard parameter and update the dashboard when all are received)
  • ALP1 - Magnitude of the roll angle alpha, i.e. |alpha|, which is a positive value between 0 and 31
  • ALP1 (I/O processor) - Magnitude of the roll angle alpha, i.e. |alpha|, which is a positive value between 0 and 31
  • ALP2 - Bit 7 of ALP2 = sign of the roll angle in ALPHA
  • ALP2 (I/O processor) - Bit 7 of ALP2 = sign of the roll angle in ALPHA
  • ALPHA - The current roll angle alpha, which is reduced from JSTX to a sign-magnitude value between -31 and +31
  • ALTIT - Our altitude above the surface of the planet or sun
  • ALTIT (I/O processor) - Our altitude above the surface of the planet or sun
  • ANGRY - Make a ship hostile
  • antilog - Binary antilogarithm table
  • antilog (I/O processor) - Binary antilogarithm table
  • antilogODD - Binary antilogarithm table
  • antilogODD (I/O processor) - Binary antilogarithm table
  • ARCTAN - Calculate A = arctan(P / Q)
  • ASH - Aft shield status
  • ASH (I/O processor) - Aft shield status
  • auto - Docking computer activation status
  • auton - Get the docking computer to "press" the flight keys to dock the ship
  • AVL - Market availability in the current system
  • B% (Loader 1) - VDU commands for setting the square mode 1 screen
  • backtonormal - Disable the keyboard, set the SVN flag to 0, and return with A = 0
  • BAD - Calculate how bad we have been
  • BALI - 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
  • BAY - Go to the docking bay (i.e. show the Status Mode screen)
  • BAY2 - Jump into the main loop at FRCE, setting the key "pressed" to red key f9 (so we show the Inventory screen)
  • BEEP - Make a short, high beep
  • BEGIN - Initialise the configuration variables and start the game
  • BEGINLIN (I/O processor) - Implement the OSWRCH 129 command (start receiving a new line to draw)
  • BELL - Make a standard system beep
  • BET1 - The magnitude of the pitch angle beta, i.e. |beta|, which is a positive value between 0 and 8
  • BET1 (I/O processor) - The magnitude of the pitch angle beta, i.e. |beta|, which is a positive value between 0 and 8
  • BET2 - Bit 7 of BET2 = sign of the pitch angle in BETA
  • BETA - The current pitch angle beta, which is reduced from JSTY to a sign-magnitude value between -8 and +8
  • BETA (I/O processor) - The current pitch angle beta, which is reduced from JSTY to a sign-magnitude value between -8 and +8
  • BLINE - Draw a circle segment and add it to the ball line heap
  • BOMB - Energy bomb
  • BOX - Just draw the border and (if this is a space view) the view name. This can be used to remove the border and view name, as it is drawn using EOR logic
  • BPRNT - Print a 32-bit number, left-padded to a specific number of digits, with an optional decimal point
  • BR1 - Restart the game
  • BRBR - The standard BRKV handler for the game
  • BRIEF - Start mission 1 and show the mission briefing
  • BRIEF2 - Start mission 2
  • BRIEF3 - Receive the briefing and plans for mission 2
  • BRIS - Clear the screen, display "INCOMING MESSAGE" and wait for 2 seconds
  • BRKBK - Set the standard BRKV handler for the game
  • brkd - The brkd counter for error handling
  • BRP - Print an extended token and show the Status Mode screen
  • BRPS - Print the extended token in A, show the Status Mode screen and return from the subroutine
  • BST - Fuel scoops (BST stands for "barrel status")
  • buf - The two OSWORD size bytes for transmitting the key logger from the I/O processor to the parasite
  • BUF - The line buffer used by DASC to print justified text
  • BUMP2 - Bump up the value of the pitch or roll dashboard indicator
  • byian - The text for the demo's second scroll text
  • c - Contains an RTS
  • CABTMP - Cabin temperature
  • CABTMP (I/O processor) - Cabin temperature
  • CASH - Our current cash pot
  • CAT - Catalogue a disc, wait for a key press and display the disc access menu
  • CATF (I/O processor) - The disc catalogue flag
  • CATS - Ask for a disc drive number and print a catalogue of that drive
  • CHAR - Macro definition for characters in the recursive token table
  • CHECK - Calculate the checksum for the last saved commander data block
  • Checksum - Checksum the code from &1000 to &9FFF and check against S%-1
  • CHK - First checksum byte for the saved commander data file
  • CHK2 - Second checksum byte for the saved commander data file
  • CHKON - Check whether any part of a circle appears on the extended screen
  • CHPR - Send a character to the I/O processor for printing or processing
  • CIRCLE - Draw a circle for the planet
  • CIRCLE2 - Draw a circle (for the planet or chart)
  • CLDELAY - Delay by iterating through 5 * 256 (1280) empty loops
  • cls (I/O processor) - Clear the top part of the screen and draw a white border
  • CLYNS - Clear the bottom three text rows of the mode 1 screen by sending a #clyns command to the I/O processor
  • CLYNS (I/O processor) - Implement the #clyns command (clear the bottom of the screen)
  • cmn - Print the commander's name
  • cmn-1 - Contains an RTS
  • CNT - Temporary storage, typically used for storing the number of iterations required when looping
  • CNT (Loader 1) - A counter for use in drawing Saturn's planetary body
  • CNT2 - 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) - A counter for use in drawing Saturn's background stars
  • CNT3 (Loader 1) - A counter for use in drawing Saturn's rings
  • cntr - Apply damping to the pitch or roll dashboard indicator
  • COK - Flags used to generate the competition code
  • COL - Temporary storage, used to store colour information when drawing pixels in the dashboard
  • COL (I/O processor) - Temporary storage, used to store colour information when drawing pixels in the dashboard
  • COLD - Copy the recursive tokens and ship blueprints to their correct locations
  • COMPAS - Update the compass
  • COMX - The x-coordinate of the compass dot
  • COMY - The y-coordinate of the compass dot
  • CPIX2 (I/O processor) - Draw a single-height dot on the dashboard
  • CPIX4 (I/O processor) - Draw a double-height dot on the dashboard
  • cpl - Print the selected system name
  • CRGO - Our ship's cargo capacity
  • crlf - Tab to column 21 and print a colon
  • csh - Print the current amount of cash
  • CTLI - The OS command string for cataloguing a disc
  • CTRL - Scan the keyboard to see if CTRL is currently pressed
  • CTRL - Macro definition for control codes in the recursive token table
  • CTWOS - Ready-made single-pixel character row bytes for mode 5
  • CTWOS (I/O processor) - Ready-made single-pixel character row bytes for mode 2
  • DASC - DASC does exactly the same as TT26 and prints a character at the text cursor, with support for verified text in extended tokens
  • DCS1 - Calculate the vector from the ideal docking position to the ship
  • de - Equipment destruction flag
  • DEATH - Display the death screen
  • DEATH2 - Reset most of the game and restart from the title screen
  • DEBRIEF - Finish mission 1
  • DEBRIEF2 - Finish mission 2
  • DEEOR - Decrypt bytes between &1300 and &9FFF by EOR'ing them with their page offset
  • DELAY - Wait for a specified time, in 1/50s of a second
  • DELI - The OS command string for deleting a file
  • DELT - Catalogue a disc, ask for a filename to delete, and delete the file
  • DELT4 - Our current speed * 64 as a 16-bit value
  • DELTA - Our current speed, in the range 1-40
  • DELTA (I/O processor) - Our current speed, in the range 1-40
  • DEMON - Show the demo
  • DENGY - Drain some energy from the energy banks
  • DET1 - Show or hide the dashboard (for when we die) by sending a #DODIALS command to the I/O processor
  • DETOK - Print an extended recursive token from the TKN1 token table
  • DETOK2 - Print an extended text token (1-255)
  • DETOK3 - Print an extended recursive token from the RUTOK token table
  • DFAULT - Reset the current commander data block to the last saved commander
  • DIALS - Update the dashboard indicators and flight variables by sending a #RDPARAMS command to the I/O processor
  • DIALS (Part 1 of 4) (I/O processor) - Update the dashboard: speed indicator
  • DIALS (Part 2 of 4) (I/O processor) - Update the dashboard: pitch and roll indicators
  • DIALS (Part 3 of 4) (I/O processor) - Update the dashboard: four energy banks
  • DIALS (Part 4 of 4) (I/O processor) - Update the dashboard: shields, fuel, laser & cabin temp, altitude
  • DIL (I/O processor) - The range of the indicator is 0-16 (for the energy banks)
  • DIL-1 (I/O processor) - The range of the indicator is 0-32 (for the speed indicator)
  • DIL2 (I/O processor) - Update the roll or pitch indicator on the dashboard
  • DILX (I/O processor) - Update a bar-based indicator on the dashboard
  • DILX+2 (I/O processor) - The range of the indicator is 0-64 (for the fuel indicator)
  • djd1 - Auto-recentre the value in X, if keyboard auto-recentre is configured
  • DK4 - Scan for pause, configuration and secondary flight keys
  • DKCMP - Docking computer
  • DKJ1 - Read joystick and flight controls
  • DKS2 - Read the joystick position
  • DKS3 - Toggle a configuration setting and emit a beep
  • DKS4 - Scan for a particular key press by sending a #DODKS4 command to the I/O processor
  • DKS4 (I/O processor) - Scan the keyboard to see if a specific key is being pressed
  • DL - Vertical sync flag
  • DL (I/O processor) - Vertical sync flag
  • DLY - In-flight message delay
  • dn - Print the amount of cash and beep
  • dn2 - Make a short, high beep and delay for 1 second
  • do65C02 (I/O processor) - Reverse the order of all bytes between the addresses in (1 0) and (3 2) and start the game
  • DOBRK (I/O processor) - Implement the OSWRCH 145 command (execute a BRK instruction)
  • DOBULB (I/O processor) - Implement the #DOBULB 0 command (draw the space station indicator bulb)
  • DOCATF (I/O processor) - Implement the #DOCATF command (update the disc catalogue flag)
  • dockEd - Print a message to say no hyperspacing inside the station
  • DOCKIT - Apply docking manoeuvres to the ship in INWK
  • DOCOL - Set the text colour by sending a #SETCOL command to the I/O processor
  • DOCOL (I/O processor) - Implement the #SETCOL command (set the current colour)
  • DODIALS (I/O processor) - Implement the #DODIALS command (show or hide the dashboard)
  • DODKS4 (I/O processor) - Implement the #DODKS4 command (scan the keyboard to see if a specific key is being pressed)
  • DODOSVN - Set the SVN ("save in progress") flag by sending a #DOsvn command to the I/O processor
  • DOENTRY - Dock at the space station, show the ship hanger and work out any mission progression
  • DOEXP - Draw an exploding ship
  • DOFE21 (I/O processor) - Implement the #DOFE21 command (show the energy bomb effect)
  • DOHFX (I/O processor) - Implement the #DOHFX command (update the hyperspace effect flag)
  • DOKEY - Scan for the seven primary flight controls
  • DORND - Generate random numbers
  • DORND (Loader 1) - Generate random numbers
  • DORND2 - Restricts the value of RAND+2 so that bit 0 is always 0
  • DOSVN (I/O processor) - Implement the #DOSVN command (update the "save in progress" flag)
  • DOT - Draw a dot on the compass by sending a #DOdot command to the I/O processor
  • DOT (I/O processor) - Implement the #DOdot command (draw a dot on the compass)
  • DOVDU19 - Change the mode 1 palette by sending a #SETVDU19 command to the I/O processor
  • DOVIAE (I/O processor) - Implement the #VIAE command (enable/disable interrupts)
  • DOXC - Move the text cursor to a specified column by sending a #SETXC command to the I/O processor
  • DOYC - Move the text cursor to a specified row by sending a #SETYC command to the I/O processor
  • DTEN - Print recursive token number X from the token table pointed to by (A V), used to print tokens from the RUTOK table via calls to DETOK3
  • DTS - Print the single letter pointed to by A, where A is an address within the extended two-letter token tables of TKN2 and QQ16
  • DTW1 - A mask for applying the lower case part of Sentence Case to extended text tokens
  • DTW2 - A flag that indicates whether we are currently printing a word
  • DTW3 - A flag for switching between standard and extended text tokens
  • DTW4 - Flags that govern how justified extended text tokens are printed
  • DTW5 - The size of the justified text buffer at BUF
  • DTW6 - A flag to denote whether printing in lower case is enabled for extended text tokens
  • DTW8 - A mask for capitalising the next letter in an extended text token
  • DV41 - Calculate (P R) = 256 * DELTA / A
  • DV42 - Calculate (P R) = 256 * DELTA / z_hi
  • DVID3B2 - Calculate K(3 2 1 0) = (A P+1 P) / (z_sign z_hi z_lo)
  • DVID4 - Calculate (P R) = 256 * A / Q
  • DVID4 (I/O processor) - Calculate (P R) = 256 * A / Q
  • DVIDT - Calculate (P+1 A) = (A P) / Q
  • E% - Ship blueprints default NEWB flags
  • E% (Loader 1) - Sound envelope definitions
  • ECBLB - Light 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) - Implement the #DOBULB 255 command (draw the E.C.M. indicator bulb)
  • ECBLB2 - Start up the E.C.M. (indicator, start countdown and make sound)
  • ECBT (I/O processor) - The character bitmap for the E.C.M. indicator bulb
  • ECHR - Macro definition for characters in the extended token table
  • ECM - E.C.M. system
  • ECMA - The E.C.M. countdown timer, which determines whether an E.C.M. system is currently operating:
  • ECMOF - Switch off the E.C.M.
  • ECMP - Our E.C.M. status
  • EDGE - Macro definition for adding edges to ship blueprints
  • EDGES - Draw a horizontal line given a centre and a half-width
  • ee3 - Print the hyperspace countdown in the top-left of the screen
  • EE51 - Remove the current ship from the screen, called from SHPPT before drawing the ship as a point
  • EJMP - Macro definition for jump tokens in the extended token table
  • Elite loader (Loader 1) - Check 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) - Move loading screen binaries into screen memory and load and run the main game code
  • Elite loader (Part 2 of 2) (Loader 2) - Include binaries for loading screen and dashboard images
  • ENERGY - Energy bank status
  • ENERGY (I/O processor) - Energy bank status
  • ENGY - Energy unit
  • eq - Subtract the price of equipment from the cash pot
  • EQSHP - Show the Equip Ship screen (red key f3)
  • ERND - Macro definition for random tokens in the extended token table
  • err - Beep, pause and go to the docking bay (i.e. show the Status Mode screen)
  • ESCAPE - Launch our escape pod
  • ESCP - Escape pod
  • ESCP (I/O processor) - Escape pod
  • ETOK - Macro definition for recursive tokens in the extended token table
  • ETWO - Macro definition for two-letter tokens in the extended token table
  • EV - The "extra vessels" spawning counter
  • ex - Print a recursive token
  • EXNO - Make the sound of a laser strike or ship explosion
  • EXNO-2 - Set X = 7 and fall through into EXNO to make the sound of a ship exploding
  • EXNO2 - Process us making a kill
  • EXNO3 - Make an explosion sound
  • F% - Denotes the end of the main game code, from Elite A to Elite J
  • FACE - Macro definition for adding faces to ship blueprints
  • FAROF - Compare x_hi, y_hi and z_hi with 224
  • FAROF2 - Compare x_hi, y_hi and z_hi with A
  • FEED - Print a newline
  • FIST - Our legal status (FIST stands for "fugitive/innocent status"):
  • FLAG - 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
  • FLFLLS - Reset the sun line heap
  • FLH (I/O processor) - Flashing console bars configuration setting
  • FLIP - Reflect the stardust particles in the screen diagonal
  • FLKB - Flush the keyboard buffer
  • FMLTU - Calculate A = A * Q / 256
  • FMLTU2 - Calculate A = K * sin(A)
  • FNE (Loader 1) - Macro definition for defining a sound envelope
  • FONT% (I/O processor) - A copy of the character definition bitmap table from the MOS ROM
  • fq1 - Used to add a cargo canister to the universe
  • FR1 - Display the "missile jammed" message
  • FR1-2 - Clear the C flag and return from the subroutine
  • FRCE - The entry point for the main game loop if we want to jump straight to a specific screen, by pretending to "press" a key, in which case A contains the internal key number of the key we want to "press"
  • FREEZE - Rejoin the pause routine after processing a screen save
  • FRIN - Slots for the ships in the local bubble of universe
  • FRMIS - Fire a missile from our ship
  • FRS1 - Launch a ship straight ahead of us, below the laser sights
  • FSH - Forward shield status
  • FSH (I/O processor) - Forward shield status
  • fwl - Print fuel and cash levels
  • FX200 - Set the behaviour of the ESCAPE and BREAK keys
  • GC2 - Calculate (Y X) = (A P) * 4
  • GCASH - Calculate (Y X) = P * Q * 4
  • GCNT - The number of the current galaxy (0-7)
  • Ghy - Perform a galactic hyperspace jump
  • GHYP - Galactic hyperdrive
  • GINF - Fetch the address of a ship's data block into INF
  • GNTMP - Laser temperature (or "gun temperature")
  • GNTMP (I/O processor) - Laser temperature (or "gun temperature")
  • gnum - Get a number from the keyboard
  • GOIN - We jump here from part 3 of the main flight loop if the docking computer is activated by pressing "C"
  • GOPL - Make the ship head towards the planet
  • gov - The current system's government type (0-7)
  • GRIDSET - Populate the line coordinate tables with the lines for the scroll text
  • GRS1 - Populate the line coordinate tables with the lines for a single scroll text character
  • GTDRV - Get an ASCII disc drive drive number from the keyboard
  • GTHG - Spawn a Thargoid ship and a Thargon companion
  • GTNMEW - Fetch the name of a commander file to save or load
  • GVL - Calculate the availability of a market item
  • HALL - Draw 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) - Implement the OSWORD 248 command (display the ship hanger)
  • HAS1 - Draw a ship in the ship hanger
  • HATB - Ship hanger group table
  • HBFL - Draw the sun lines in the horizontal line buffer in orange by sending an OSWORD 247 command to the I/O processor
  • HBUF - The horizontal line buffer to send with the OSWORD 247 command
  • HBUP - The size of the horizontal line buffer at HBUF (including the two OSWORD size bytes)
  • HBZE - Reset the horizontal line buffer
  • HFS1 - Don't clear the screen, and draw 8 concentric rings with the step size in STP
  • HFS2 - Draw the launch or hyperspace tunnel
  • HFX - A flag that toggles the hyperspace colour effect
  • HFX (I/O processor) - A flag that toggles the hyperspace colour effect
  • HI1 - Contains an RTS
  • HIMCNT - Used as a loop counter for the Cobra's slow approach in the demo
  • HITCH - Work out if the ship in INWK is in our crosshairs
  • HLOIN - Add a sun line to the horizontal line buffer
  • HLOIN (I/O processor) - Implement the OSWORD 247 command (draw the sun lines in the horizontal line buffer in orange)
  • HLOIN2 - Remove a line from the sun line heap and draw it on-screen
  • HLOIN2 (I/O processor) - Draw a horizontal line in a specific colour
  • HLOIN3 (I/O processor) - Draw a line from (X, Y1) to (X2, Y1) in the colour given in A (we need to set Q = Y2 + 1 before calling HLOIN3 so only one line is drawn)
  • hm - Select the closest system and redraw the chart crosshairs
  • HME2 - Search the galaxy for a system
  • hy5 - Contains an RTS
  • hyp - Start the hyperspace process
  • hyp1 - Process a jump to the system closest to (QQ9, QQ10)
  • hyp1+3 - Jump straight to the system at (QQ9, QQ10) without first calculating which system is closest. We do this if we already know that (QQ9, QQ10) points to a system
  • hyR - Contains an RTS
  • I/O Variables (I/O processor) - Various variables used by the I/O processor
  • INCYC - Move the text cursor to the next row
  • INF - 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
  • INWK - The zero-page internal workspace for the current ship data block
  • IRQ1 (I/O processor) - The main screen-mode interrupt handler (IRQ1V points here)
  • ITEM - Macro definition for the market prices table
  • jmp - Set the current system to the selected system
  • JMPTAB (I/O processor) - The lookup table for OSWRCH jump commands (128-147)
  • JMTB - The extended token table for jump tokens 1-32 (DETOK)
  • JSTX - Our current roll rate
  • JSTY - Our current pitch rate
  • JUNK - The amount of junk in the local bubble
  • K - Temporary storage, used in a number of places
  • K (I/O processor) - Temporary storage, used in a number of places
  • K% - Ship data blocks
  • K2 - Temporary storage, used in a number of places
  • K3 - Temporary storage, used in a number of places
  • K3 (I/O processor) - Temporary storage, used in a number of places
  • K4 - Temporary storage, used in a number of places
  • K5 - Temporary storage used to store segment coordinates across successive calls to BLINE, the ball line routine
  • K6 - Temporary storage, typically used for storing coordinates during vector calculations
  • KEYBOARD (I/O processor) - Implement the OSWORD 240 command (scan the keyboard and joystick and log the results)
  • KILLSHP - Remove a ship from our local bubble of universe
  • KL - 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
  • KS1 - Remove the current ship from our local bubble of universe
  • KS2 - Check the local bubble for missiles with target lock
  • KS3 - Set the SLSP ship heap pointer after shuffling ship slots
  • KS4 - Remove the space station and replace it with the sun
  • KTRAN - The key logger buffer that gets updated by the OSWORD 240 command
  • KY1 - "?" is being pressed
  • KY12 - TAB is being pressed
  • KY13 - ESCAPE is being pressed
  • KY14 - "T" is being pressed
  • KY15 - "U" is being pressed
  • KY16 - "M" is being pressed
  • KY17 - "E" is being pressed
  • KY18 - "J" is being pressed
  • KY19 - "C" is being pressed
  • KY2 - Space is being pressed
  • KY20 - "P" is being pressed
  • KY3 - "<" is being pressed
  • KY4 - ">" is being pressed
  • KY5 - "X" is being pressed
  • KY6 - "S" is being pressed
  • KY7 - "A" is being pressed
  • KYTB - Contains an RTS
  • KYTB - Lookup table for in-flight keyboard controls
  • KYTB (I/O processor) - Lookup table for in-flight keyboard controls
  • label - Send a two-byte OSWRCH command to the I/O processor
  • LAS - 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)
  • LAS2 - Laser power for the current laser
  • LASCT - The laser pulse count for the current laser
  • LASER - The specifications of the lasers fitted to each of the four space views:
  • LASLI - Draw the laser lines for when we fire our lasers
  • LASLI2 - Just draw the current laser lines without moving the centre point, draining energy or heating up. This has the effect of removing the lines from the screen
  • LASX - The x-coordinate of the tip of the laser line
  • LASY - The y-coordinate of the tip of the laser line
  • LAUN - Make the launch sound and draw the launch tunnel
  • LBFL - Draw the lines in the multi-segment line buffer by sending an OSWRCH 129 command to the I/O processor
  • LBUF - The multi-segment line buffer used by LOIN
  • LBUP - The size of the multi-segment line buffer at LBUF
  • LCASH - Subtract an amount of cash from the cash pot
  • LINMAX (I/O processor) - The number of points in the line currently being transmitted from the parasite using the OSWRCH 129 and 130 commands
  • LINTAB (I/O processor) - 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-1 - Contains an RTS
  • LL118 - Move a point along a line until it is on-screen
  • LL118-1 - Contains an RTS
  • LL120 - Calculate (Y X) = (S x1_lo) * XX12+2 or (S x1_lo) / XX12+2
  • LL121 - Calculate (Y X) = (S R) / Q and set the sign to the opposite of the top byte on the stack
  • LL122 - Calculate (Y X) = (S R) * Q and set the sign to the opposite of the top byte on the stack
  • LL123 - Calculate (Y X) = (S R) / XX12+2 or (S R) * XX12+2
  • LL128 - Contains an RTS
  • LL129 - Calculate Q = XX12+2, A = S EOR XX12+3 and (S R) = |S R|
  • LL133 - Negate (Y X) and return from the subroutine LL128 Contains an RTS
  • LL145 (Part 1 of 4) - Clip line: Work out which end-points are on-screen, if any
  • LL145 (Part 2 of 4) - Clip line: Work out if any part of the line is on-screen
  • LL145 (Part 3 of 4) - Clip line: Calculate the line's gradient
  • LL145 (Part 4 of 4) - Clip line: Call the routine in LL188 to do the actual clipping
  • LL147 - Don't initialise the values in SWAP or A
  • LL164 - Make the hyperspace sound and draw the hyperspace tunnel
  • LL28 - Calculate R = 256 * A / Q
  • LL28+4 - Skips the A >= Q check and always returns with C flag cleared, so this can be called if we know the division will work
  • LL30 - Draw a one-segment line by sending an OSWRCH 129 command to the I/O processor
  • LL31 - Skips the A >= Q check and does not set the R counter, so this can be used for jumping straight into the division loop if R is already set to 254 and we know the division will work
  • LL38 - Calculate (S A) = (S R) + (A Q)
  • LL5 - Calculate Q = SQRT(R Q)
  • LL51 - Calculate the dot product of XX15 and XX16
  • LL61 - Calculate (U R) = 256 * A / Q
  • LL62 - Calculate 128 - (U R)
  • LL70+1 - Contains an RTS (as the first byte of an LDA instruction)
  • LL81+2 - Draw the contents of the ship lone heap, used to draw the ship as a dot from SHPPT
  • LL9 (Part 1 of 12) - Draw ship: Check if ship is exploding, check if ship is in front
  • LL9 (Part 2 of 12) - Draw ship: Check if ship is in field of view, close enough to draw
  • LL9 (Part 3 of 12) - Draw ship: Set up orientation vector, ship coordinate variables
  • LL9 (Part 4 of 12) - Draw ship: Set visibility for exploding ship (all faces visible)
  • LL9 (Part 5 of 12) - Draw ship: Calculate the visibility of each of the ship's faces
  • LL9 (Part 6 of 12) - Draw ship: Calculate the visibility of each of the ship's vertices
  • LL9 (Part 7 of 12) - Draw ship: Calculate the visibility of each of the ship's vertices
  • LL9 (Part 8 of 12) - Draw ship: Calculate the screen coordinates of visible vertices
  • LL9 (Part 9 of 12) - Draw ship: Draw laser beams if the ship is firing its laser at us
  • LL9 (Part 10 of 12) - Draw ship: Calculate the visibility of each of the ship's edges
  • LL9 (Part 11 of 12) - Draw ship: Add all visible edges to the ship line heap
  • LL9 (Part 12 of 12) - Draw ship: Draw all the visible edges from the ship line heap
  • LO2 - Contains an RTS PU1-1 Contains an RTS
  • LOD - Load a commander file
  • log - Binary logarithm table (high byte)
  • log (I/O processor) - Binary logarithm table (high byte)
  • logL - Binary logarithm table (low byte)
  • logL (I/O processor) - Binary logarithm table (low byte)
  • LOIN - Add a line segment to the multi-segment line buffer
  • LOIN (Part 1 of 7) (I/O processor) - Draw a line: Calculate the line gradient in the form of deltas
  • LOIN (Part 2 of 7) (I/O processor) - Draw a line: Line has a shallow gradient, step right along x-axis
  • LOIN (Part 3 of 7) (I/O processor) - Draw a shallow line going right and up or left and down
  • LOIN (Part 4 of 7) (I/O processor) - Draw a shallow line going right and down or left and up
  • LOIN (Part 5 of 7) (I/O processor) - Draw a line: Line has a steep gradient, step up along y-axis
  • LOIN (Part 6 of 7) (I/O processor) - Draw a steep line going up and left or down and right
  • LOIN (Part 7 of 7) (I/O processor) - Draw a steep line going up and right or down and left
  • LOOK1 - Initialise the space view
  • LOR - Set the C flag and return from the subroutine
  • LP - Variables used for displaying the scrolling text in the demo
  • LS2FL - Draw the contents of the ball line heap by sending an OSWRCH 129 command to the I/O processor
  • LSO - This space has two uses:
  • LSP - 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)
  • LSX - LSX is an alias that points to the first byte of the sun line heap at LSO
  • LSX2 - The ball line heap for storing x-coordinates
  • LSY2 - The ball line heap for storing y-coordinates
  • LTDEF - Line definitions for characters in the Star Wars scroll text
  • m - Do not include A in the calculation
  • M% - The entry point for the main flight loop
  • MA9 - Contains an RTS
  • MAD - Calculate (A X) = Q * A + (S R)
  • Main flight loop (Part 1 of 16) - Seed the random number generator
  • Main flight loop (Part 2 of 16) - Calculate the alpha and beta angles from the current pitch and roll of our ship
  • Main flight loop (Part 3 of 16) - Scan for flight keys and process the results
  • Main flight loop (Part 4 of 16) - For each nearby ship: Copy the ship's data block from K% to the zero-page workspace at INWK
  • Main flight loop (Part 5 of 16) - For each nearby ship: If an energy bomb has been set off, potentially kill this ship
  • Main flight loop (Part 6 of 16) - For each nearby ship: Move the ship in space and copy the updated INWK data block back to K%
  • Main flight loop (Part 7 of 16) - For each nearby ship: Check whether we are docking, scooping or colliding with it
  • Main flight loop (Part 8 of 16) - For each nearby ship: Process us potentially scooping this item
  • Main flight loop (Part 9 of 16) - For each nearby ship: If it is a space station, check whether we are successfully docking with it
  • Main flight loop (Part 10 of 16) - For each nearby ship: Remove if scooped, or process collisions
  • Main flight loop (Part 11 of 16) - For each nearby ship: Process missile lock and firing our laser
  • Main flight loop (Part 12 of 16) - For each nearby ship: Draw the ship, remove if killed, loop back
  • Main flight loop (Part 13 of 16) - Show energy bomb effect, charge shields and energy banks
  • Main flight loop (Part 14 of 16) - Spawn a space station if we are close enough to the planet
  • Main flight loop (Part 15 of 16) - Perform altitude checks with planet and sun, process fuel scooping
  • Main flight loop (Part 16 of 16) - Process laser pulsing, E.C.M. energy drain, call stardust routine
  • Main game loop (Part 1 of 6) - Spawn a trader (a peaceful Cobra Mk III)
  • Main game loop (Part 2 of 6) - Call main flight loop, potentially spawn trader, asteroid, cargo
  • Main game loop (Part 3 of 6) - Potentially spawn a cop, particularly if we've been bad
  • Main game loop (Part 4 of 6) - Potentially spawn lone bounty hunter, Thargoid, or up to 4 pirates
  • Main game loop (Part 5 of 6) - Cool down lasers, make calls to update the dashboard
  • Main game loop (Part 6 of 6) - Process non-flight key presses (red function keys, docked keys)
  • MAL1 - Marks the beginning of the ship analysis loop, so we can jump back here from part 12 of the main flight loop to work our way through each ship in the local bubble. We also jump back here when a ship is removed from the bubble, so we can continue processing from the next ship
  • MANY - The number of ships of each type in the local bubble of universe
  • MAS1 - Add an orientation vector coordinate to an INWK coordinate
  • MAS2 - Calculate a cap on the maximum distance to the planet or sun
  • MAS3 - Calculate A = x_hi^2 + y_hi^2 + z_hi^2 in the K% block
  • MAS4 - Calculate a cap on the maximum distance to a ship
  • MCASH - Add an amount of cash to the cash pot
  • MCH - 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
  • MCNT - The main loop counter
  • MCNT (I/O processor) - The main loop counter
  • me1 - Erase an old in-flight message and display a new one
  • me2 - Remove an in-flight message from the space view
  • me3 - Used by me2 to jump back into the main game loop after printing an in-flight message
  • MEBRK - The BRKV handler for disc access operations
  • mes9 - Print a text token, possibly followed by " DESTROYED"
  • MESS - Display an in-flight message
  • MESS1 (Loader 1) - The OS command string for changing the disc directory to E
  • MESS2 (Loader 1) - The OS command string for loading and running the second part of the loader
  • MESS2 (Loader 2) - The OS command string for loading and running the I/O processor's main game code
  • MESS3 (Loader 2) - The OS command string for loading and running the parasite's main game code
  • messXC - 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
  • MJ - Are we in witchspace (i.e. have we mis-jumped)?
  • MJP - Process a mis-jump into witchspace
  • MLOOP - The entry point for the main game loop. This entry point comes after the call to the main flight loop and spawning routines, so it marks the start of the main game loop for when we are docked (as we don't need to call the main flight loop or spawning routines if we aren't in space)
  • MLS1 - Calculate (A P) = ALP1 * A
  • MLS2 - Calculate (S R) = XX(1 0) and (A P) = A * ALP1
  • MLTU2 - Calculate (A P+1 P) = (A ~P) * Q
  • MLTU2-2 - Set Q to X, so this calculates (A P+1 P) = (A ~P) * X
  • MLU1 - Calculate Y1 = y_hi and (A P) = |y_hi| * Q for Y-th stardust
  • MLU2 - Calculate (A P) = |A| * Q
  • MSAR - The targeting state of our leftmost missile
  • MSBAR - Draw a specific indicator in the dashboard's missile bar by sending a #DOmsbar command to the I/O processor
  • MSBAR (I/O processor) - Implement the #DOmsbar command (draw a specific indicator in the dashboard's missile bar)
  • msblob - Display the dashboard's missile indicators in green
  • MSTG - The current missile lock target
  • MT1 - Switch to ALL CAPS when printing extended tokens
  • MT13 - Switch to lower case when printing extended tokens
  • MT14 - Switch to justified text when printing extended tokens
  • MT15 - Switch to left-aligned text when printing extended tokens
  • MT16 - Print the character in variable DTW7
  • MT17 - Print the selected system's adjective, e.g. Lavian for Lave
  • MT18 - Print a random 1-8 letter word in Sentence Case
  • MT19 - Capitalise the next letter
  • MT2 - Switch to Sentence Case when printing extended tokens
  • MT23 - Move to row 10, switch to white text, and switch to lower case when printing extended tokens
  • MT26 - Fetch a line of text from the keyboard
  • MT27 - Print the captain's name during mission briefings
  • MT28 - Print the location hint during the mission 1 briefing
  • MT29 - Move to row 6, switch to white text, and switch to lower case when printing extended tokens
  • MT5 - Switch to extended tokens
  • MT6 - Switch to standard tokens in Sentence Case
  • MT8 - Tab to column 6 and start a new word when printing extended tokens
  • MT9 - Clear the screen and set the current view type to 1
  • MTIN - Lookup table for random tokens in the extended token table (0-37)
  • MU1 - Copy X into P and A, and clear the C flag
  • MU11 - Calculate (A P) = P * X
  • MU5 - Set K(3 2 1 0) = (A A A A) and clear the C flGag
  • MU6 - Set P(1 0) = (A A)
  • MULT1 - Calculate (A P) = Q * A
  • MULT12 - Calculate (S R) = Q * A
  • MULT3 - Calculate K(3 2 1 0) = (A P+1 P) * Q
  • MULTS-2 - Calculate (A P) = X * A
  • MULTU - Calculate (A P) = P * Q
  • MUT1 - Calculate R = XX and (A P) = Q * A
  • MUT2 - Calculate (S R) = XX(1 0) and (A P) = Q * A
  • MUT3 - Unused routine that does the same as MUT2
  • MV40 - Rotate the planet or sun by our ship's pitch and roll
  • MV45 - Rejoin the MVEIT routine after the rotation, tactics and scanner code
  • MVBL (Loader 2) - Move a multi-page block of memory from one location to another
  • MVE (Loader 2) - Move a one-page block of memory from one location to another
  • MVEIT (Part 1 of 9) - Move current ship: Tidy the orientation vectors
  • MVEIT (Part 2 of 9) - Move current ship: Call tactics routine, remove ship from scanner
  • MVEIT (Part 3 of 9) - Move current ship: Move ship forward according to its speed
  • MVEIT (Part 4 of 9) - Move current ship: Apply acceleration to ship's speed as a one-off
  • MVEIT (Part 5 of 9) - Move current ship: Rotate ship's location by our pitch and roll
  • MVEIT (Part 6 of 9) - Move current ship: Move the ship in space according to our speed
  • MVEIT (Part 7 of 9) - Move current ship: Rotate ship's orientation vectors by pitch/roll
  • MVEIT (Part 8 of 9) - Move current ship: Rotate ship about itself by its own pitch/roll
  • MVEIT (Part 9 of 9) - Move current ship: Redraw on scanner, if it hasn't been destroyed
  • MVS4 - Apply pitch and roll to an orientation vector
  • MVS5 - Apply a 3.6 degree pitch or roll to an orientation vector
  • MVT1 - Calculate (x_sign x_hi x_lo) = (x_sign x_hi x_lo) + (A R)
  • MVT1-2 - Clear bits 0-6 of A before entering MVT1
  • MVT3 - Calculate K(3 2 1) = (x_sign x_hi x_lo) + K(3 2 1)
  • MVT6 - Calculate (A P+2 P+1) = (x_sign x_hi x_lo) + (A P+2 P+1)
  • NA% - The data block for the last saved commander
  • NAME - The current commander name
  • NEEDKEY - Flag to ask the I/O processor to update the key logger buffer at KTRAN
  • newosrdch (I/O processor) - The custom OSRDCH routine for reading characters
  • NLIN - Draw a horizontal line at pixel row 23 to box in a title
  • NLIN2 - Draw a screen-wide horizontal line at the pixel row in A
  • NLIN3 - Print a title and a horizontal line at row 19 to box it in
  • NLIN4 - Draw a horizontal line at pixel row 19 to box in a title
  • NO1 - Contains an RTS
  • NO3 - Make a sound from a prepared sound block
  • NOFX - The x-coordinates of the scroll text letter grid
  • NOFY - The y-coordinates of the scroll text letter grid
  • NOISE - Make the sound whose number is in A
  • NOMSL - The number of missiles we have fitted (0-4)
  • NORM - Normalise the three-coordinate vector in XX15
  • NOS1 - Prepare a sound block
  • NOSTM - The number of stardust particles shown on screen, which is 18 (#NOST) for normal space, and 3 for witchspace
  • NWDAV4 - Print an "ITEM?" error, make a beep and rejoin the TT210 routine
  • NWDAVxx - Used to rejoin this routine from the call to NWDAV4
  • NWOSWD (I/O processor) - The custom OSWORD routine
  • nWq - Create a random cloud of stardust
  • NwS1 - Flip the sign and double an INWK byte
  • NWSHP - Add a new ship to our local bubble of universe
  • NWSPS - Add a new space station to our local bubble of universe
  • NWSTARS - Initialise the stardust field
  • oh - Contains an RTS SPIN2 Remove any randomness: spawn cargo of a specific type (given in X), and always spawn the number given in A
  • OOPS - Take some damage
  • orange (I/O processor) - Lookup table for 2-pixel mode 1 orange pixels for the sun
  • OSB (Loader 1) - A convenience routine for calling OSBYTE with Y = 0
  • oscobl - OSFILE configuration block for saving a screenshot
  • oscobl2 - Master OSFILE configuration block for saving a screenshot
  • OSSC (I/O processor) - 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) - The lookup table for OSWORD jump commands (240-255)
  • ou2 - Display "E.C.M.SYSTEM DESTROYED" as an in-flight message
  • ou3 - Display "FUEL SCOOPS DESTROYED" as an in-flight message
  • OUCH - Potentially lose cargo or equipment following damage
  • out - Contains an RTS t As TT217 but don't preserve Y, set it to YSAV instead
  • P - Temporary storage, used in a number of places
  • P (I/O processor) - Temporary storage, used in a number of places
  • PARAMS (I/O processor) - 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) - 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
  • PAS1 - Display a rotating ship at space coordinates (0, 112, 256) and scan the keyboard
  • PAUSE - Display a rotating ship, waiting until a key is pressed, then remove the ship from the screen
  • PAUSE2 - Wait until a key is pressed, ignoring any existing key press
  • PBFL - Draw the pixel in the pixel buffer by sending an OSWORD 241 command to the I/O processor
  • PBUF - The pixel buffer to send with the OSWORD 241 command
  • PBUP - The size of the pixel buffer at PBUF (including the two OSWORD size bytes)
  • PBZE - Reset the pixel buffer
  • PDESC - Print the system's extended description or a mission 1 directive
  • ping - Set the selected system to the current system
  • PIX (Loader 1) - Draw a single pixel at a specific coordinate
  • PIX1 - Calculate (YY+1 SYL+Y) = (A P) + (S R) and draw stardust particle
  • pixbl - Points to the first byte of the PBUF block, which is where the OSWORD transmission size goes
  • PIXEL - Add a white dot at a specific distance to the pixel buffer (2-pixel dash or 4-pixel square)
  • PIXEL (I/O processor) - Implement the OSWORD 241 command (draw space view pixels)
  • PIXEL2 - Draw a stardust particle relative to the screen centre
  • PIXEL3 - Add a coloured dot at a specific distance to the pixel buffer (1-pixel dot, 2-pixel dash or 4-pixel square)
  • PL2 - Remove the planet or sun from the screen
  • PL2-1 - Contains an RTS
  • PL21 - Return from a planet/sun-drawing routine with a failure flag
  • PL44 - Clear the C flag and return from the subroutine
  • PL9 (Part 1 of 3) - Draw the planet, with either an equator and meridian, or a crater
  • PL9 (Part 2 of 3) - Draw the planet's equator and meridian
  • PL9 (Part 3 of 3) - Draw the planet's crater
  • PLANET - Draw the planet or sun
  • plf - Print a text token followed by a newline
  • plf2 - Print text followed by a newline and indent of 6 characters
  • PLL1 (Loader 1) - Draw Saturn on the loading screen
  • PLS1 - Calculate (Y A) = nosev_x / z
  • PLS2 - Draw a half-circle
  • PLS22 - Draw a circle or half-circle
  • PLS3 - Calculate (Y A P) = 222 * roofv_x / z
  • PLS4 - Calculate CNT2 = arctan(P / A) / 4
  • PLS5 - Calculate roofv_x / z and roofv_y / z
  • PLS6 - Calculate (X K) = (A P) / (z_sign z_hi z_lo)
  • PLUT - Flip the coordinate axes for the four different views
  • POSWRCH (I/O processor) - Print a character on the printer only
  • pr2 - Print an 8-bit number, left-padded to 3 digits, and optional point
  • pr2+2 - Print the 8-bit number in X to the number of digits in A
  • pr5 - Print a 16-bit number, left-padded to 5 digits, and optional point
  • pr6 - Print 16-bit number, left-padded to 5 digits, no point
  • prilf (I/O processor) - Implement the #prilf command (print a blank line on the printer)
  • printer (I/O processor) - Implement the #printcode command (print a character on the printer and screen)
  • printflag - A flag that determines whether to send text output to the printer as well as the screen
  • PROJ - Project the current ship onto the screen
  • prq - Print a text token followed by a question mark
  • prx - Return the price of a piece of equipment
  • prx-3 - Return the price of the item with number A - 1 c Contains an RTS
  • PRXS - Equipment prices
  • ptg - Called when the user manually forces a mis-jump RTS111 Contains an RTS
  • PU1-1 - Contains an RTS
  • PUTBACK (I/O processor) - Reset the OSWRCH vector in WRCHV to point to USOSWRCH
  • PX4 - Contains an RTS
  • PXCL (I/O processor) - A four-colour mode 1 pixel byte that represents a dot's distance
  • PZW (I/O processor) - Fetch the current dashboard colours, to support flashing
  • PZW2 (I/O processor) - Fetch the current dashboard colours for non-striped indicators, to support flashing
  • Q - Temporary storage, used in a number of places
  • Q (I/O processor) - Temporary storage, used in a number of places
  • QQ0 - The current system's galactic x-coordinate (0-256)
  • QQ1 - The current system's galactic y-coordinate (0-256)
  • QQ10 - The galactic y-coordinate of the crosshairs in the galaxy chart (and, most of the time, the selected system's galactic y-coordinate)
  • QQ11 - The number of the current view:
  • QQ12 - Our "docked" status
  • QQ14 - Our current fuel level (0-70)
  • QQ14 (I/O processor) - Our current fuel level (0-70)
  • QQ15 - The three 16-bit seeds for the selected system, i.e. the one in the crosshairs in the Short-range Chart
  • QQ16 - The two-letter token lookup table
  • QQ17 - Contains a number of flags that affect how text tokens are printed, particularly capitalisation:
  • QQ18 - The recursive token table for tokens 0-148
  • QQ19 - Temporary storage, used in a number of places
  • QQ2 - The three 16-bit seeds for the current system, i.e. the one we are currently in
  • QQ20 - The contents of our cargo hold
  • QQ21 - The three 16-bit seeds for the current galaxy
  • QQ22 - The two hyperspace countdown counters
  • QQ23 - Market prices table
  • QQ24 - Temporary storage, used to store the current market item's price in routine TT151
  • QQ25 - Temporary storage, used to store the current market item's availability in routine TT151
  • QQ26 - A random value used to randomise market data
  • QQ28 - Temporary storage, used to store the economy byte of the current system in routine var
  • QQ29 - Temporary storage, used in a number of places
  • QQ3 - The selected system's economy (0-7)
  • QQ4 - The selected system's government (0-7)
  • QQ5 - The selected system's tech level (0-14)
  • QQ6 - The selected system's population in billions * 10 (1-71), so the maximum population is 7.1 billion
  • QQ7 - The selected system's productivity in M CR (96-62480)
  • QQ8 - The distance from the current system to the selected system in light years * 10, stored as a 16-bit number
  • QQ9 - The galactic x-coordinate of the crosshairs in the galaxy chart (and, most of the time, the selected system's galactic x-coordinate)
  • QU5 - Restart the game using the last saved commander without asking whether to load a new commander file
  • QUS1 - Save or load the commander file
  • qv - Print a menu of the four space views, for buying lasers
  • qw - Print a recursive token in the range 128-145
  • R - Temporary storage, used in a number of places
  • R (I/O processor) - Temporary storage, used in a number of places
  • RAND - Four 8-bit seeds for the random number generation system implemented in the DORND routine
  • RAND (Loader 1) - The random number seed used for drawing Saturn
  • RAT - Used to store different signs depending on the current space view, for use in calculating stardust movement
  • RAT2 - Temporary storage, used to store the pitch and roll signs when moving objects and stardust
  • RDKEY - Scan the keyboard for key presses by sending an OSWORD 240 command to the I/O processor
  • RDLI - The OS command string for loading the docked code in the disc version of Elite
  • RDPARAMS (I/O processor) - Implement the #RDPARAMS command (start receiving a new set of parameters for updating the dashboard)
  • RE2+2 - Restore A from T and return from the subroutine
  • REDU2 - Reduce the value of the pitch or roll dashboard indicator
  • refund - Install a new laser, processing a refund if applicable
  • RES2 - Reset a number of flight variables and workspaces
  • RESET - Reset most variables
  • retry - Scan the keyboard until a key is pressed and display the disc access menu
  • RLINE - The OSWORD configuration block used to fetch a line of text from the keyboard
  • ROOT (Loader 1) - Calculate ZP = SQRT(ZP(1 0))
  • RR4 (I/O processor) - Restore the registers and return from the subroutine
  • rT9 - Contains an RTS
  • RTOK - Macro definition for recursive tokens in the recursive token table
  • RTS111 - Contains an RTS
  • RTS2 - Contains an RTS
  • RUGAL - The criteria for systems with special extended descriptions
  • RUPLA - System numbers that have special extended decriptions
  • RUTOK - The second extended token table for recursive tokens 0-26 (DETOK3)
  • S - Temporary storage, used in a number of places
  • S (I/O processor) - Temporary storage, used in a number of places
  • S% - Checksum, decrypt and unscramble the main game code, and start the game
  • SAFE (I/O processor) - Contains an RTS
  • safehouse - Backup storage for the seeds for the selected system
  • savscr - Save a screenshot if CTRL-D is pressed when the game is paused
  • SC - Screen address (low byte)
  • SC (I/O processor) - Screen address (low byte)
  • SC48 (I/O processor) - Implement the #onescan command (draw a ship on the 3D scanner)
  • SC5 - Contains an RTS
  • scacol - Ship colours on the scanner
  • SCAN - Display the current ship on the scanner
  • SCANcol - The colour of the ship on the scanner SCANx1 The screen x-coordinate of the dot on the scanner
  • SCANflg - The sign of the stick height (in bit 7) SCANlen The stick height for the ship on the scanner
  • SCANlen - The stick height for the ship on the scanner SCANcol The colour of the ship on the scanner
  • SCANpars - The scanner buffer to send with the #onescan command
  • SCANx1 - The screen x-coordinate of the dot on the scanner SCANy1 The screen y-coordinate of the dot on the scanner
  • SCANy1 - The screen y-coordinate of the dot on the scanner
  • SCH - Screen address (high byte)
  • SCH (I/O processor) - Screen address (high byte)
  • SCLI2 - Execute an OS command, setting the SVN flag while it's running
  • scname - Filename to be used when saving a screenshot
  • sent (I/O processor) - Turn the printer off and restore the USOSWRCH handler, returning from the subroutine using a tail call
  • SESCP - Spawn an escape pod from the current (parent) ship
  • SETVDU19 (I/O processor) - Implement the #SETVDU19 command (change mode 1 palette)
  • SETXC (I/O processor) - Implement the #SETXC command (move the text cursor to a specific column)
  • SETYC (I/O processor) - Implement the #SETYC command (move the text cursor to a specific row)
  • SFRMIS - Add an enemy missile to our local bubble of universe
  • SFS1 - Spawn a child ship from the current (parent) ship
  • SFS1-2 - Add a missile to the local bubble that has AI enabled, is hostile, but has no E.C.M.
  • SFS2 - Move a ship in space along one of the coordinate axes
  • SFX - Sound data
  • SHD - Charge a shield and drain some energy from the energy banks
  • SHIP_ADDER - Ship blueprint for an Adder
  • SHIP_ANACONDA - Ship blueprint for an Anaconda
  • SHIP_ASP_MK_2 - Ship blueprint for an Asp Mk II
  • SHIP_ASTEROID - Ship blueprint for an asteroid
  • SHIP_BOA - Ship blueprint for a Boa
  • SHIP_BOULDER - Ship blueprint for a boulder
  • SHIP_CANISTER - Ship blueprint for a cargo canister
  • SHIP_COBRA_MK1 - Ship blueprint for a Cobra Mk I
  • SHIP_COBRA_MK_3 - Ship blueprint for a Cobra Mk III
  • SHIP_COBRA_MK_3_P - Ship blueprint for a Cobra Mk III (pirate)
  • SHIP_CONSTRICTOR - Ship blueprint for a Constrictor
  • SHIP_CORIOLIS - Ship blueprint for a Coriolis space station
  • SHIP_COUGAR - Ship blueprint for a Cougar
  • SHIP_DODO - Ship blueprint for a Dodecahedron ("Dodo")space station
  • SHIP_ESCAPE_POD - Ship blueprint for an escape pod
  • SHIP_FER_DE_LANCE - Ship blueprint for a Fer-de-Lance
  • SHIP_GECKO - Ship blueprint for a Gecko
  • SHIP_KRAIT - Ship blueprint for a Krait
  • SHIP_LOGO - Ship blueprint for the Elite logo
  • SHIP_MAMBA - Ship blueprint for a Mamba
  • SHIP_MISSILE - Ship blueprint for a missile
  • SHIP_MORAY - Ship blueprint for a Moray
  • SHIP_PLATE - Ship blueprint for an alloy plate
  • SHIP_PYTHON - Ship blueprint for a Python
  • SHIP_PYTHON_P - Ship blueprint for a Python (pirate)
  • SHIP_ROCK_HERMIT - Ship blueprint for a rock hermit (asteroid)
  • SHIP_SHUTTLE - Ship blueprint for a shuttle
  • SHIP_SIDEWINDER - Ship blueprint for a Sidewinder
  • SHIP_SPLINTER - Ship blueprint for a splinter
  • SHIP_THARGOID - Ship blueprint for a Thargoid mothership
  • SHIP_THARGON - Ship blueprint for a Thargon
  • SHIP_TRANSPORTER - Ship blueprint for a transporter
  • SHIP_VIPER - Ship blueprint for a Viper
  • SHIP_WORM - Ship blueprint for a Worm
  • shpcol - Ship colours
  • SHPPT - Draw a distant ship as a point rather than a full wireframe
  • SLIDE - Display a Star Wars scroll text
  • SLSP - The address of the bottom of the ship line heap
  • SNE - Sine/cosine table
  • SOLAR - Set up various aspects of arriving in a new system
  • SOMEPROT (I/O processor) - Implement the OSWORD 249 command (some copy protection)
  • SOS1 - Update the missile indicators, set up the planet data block
  • SP1 - Draw the space station on the compass
  • SP2 - Draw a dot on the compass, given the planet/station vector
  • spasto - Contains the address Coriolis space station's ship blueprint
  • SPBLB - Light up the space station indicator ("S") on the dashboard by sending a #DOBULB 0 command to the I/O processor
  • SPBT (I/O processor) - The bitmap definition for the space station indicator bulb
  • spc - Print a text token followed by a space
  • SPIN - Randomly spawn cargo from a destroyed ship
  • SPIN2 - Remove any randomness: spawn cargo of a specific type (given in X), and always spawn the number given in A
  • SPS1 - Calculate the vector to the planet and store it in XX15
  • SPS1+1 - A BRK instruction
  • SPS2 - Calculate (Y X) = A / 10
  • SPS3 - Copy a space coordinate from the K% block into K3
  • SPS4 - Calculate the vector to the space station
  • SQUA - Clear bit 7 of A and calculate (A P) = A * A
  • SQUA2 - Calculate (A P) = A * A
  • SQUA2 (Loader 1) - Calculate (A P) = A * A
  • SSPR - "Space station present" flag
  • stack - Temporary storage for the stack pointer when switching the BRKV handler between BRBR and MEBRK
  • STARS - The main routine for processing the stardust
  • STARS1 - Process the stardust for the front view
  • STARS2 - Process the stardust for the left or right view
  • STARS6 - Process the stardust for the rear view
  • STARTUP (I/O processor) - Set the various vectors, interrupts and timers, and terminate the loading process so the vector handlers can take over
  • STATUS - Show the Status Mode screen (red key f8)
  • STORE - Copy the ship data block at INWK back to the K% workspace
  • STP - The step size for drawing circles
  • SUN (Part 1 of 4) - Draw the sun: Set up all the variables needed
  • SUN (Part 2 of 4) - Draw the sun: Start from bottom of screen and erase the old sun
  • SUN (Part 3 of 4) - Draw the sun: Continue to move up the screen, drawing the new sun
  • SUN (Part 4 of 4) - Draw the sun: Continue to the top of the screen, erasing old sun
  • SUNX - The 16-bit x-coordinate of the vertical centre axis of the sun (which might be off-screen)
  • SVC - The save count
  • SVE - Display the disc access menu and process saving of commander files
  • svn (I/O processor) - "Saving in progress" flag
  • SWAP - 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) - 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)
  • SX - This is where we store the x_hi coordinates for all the stardust particles
  • SXL - This is where we store the x_lo coordinates for all the stardust particles
  • SY - This is where we store the y_hi coordinates for all the stardust particles
  • SYL - This is where we store the y_lo coordinates for all the stardust particles
  • SZ - This is where we store the z_hi coordinates for all the stardust particles
  • SZL - This is where we store the z_lo coordinates for all the stardust particles
  • t - As TT217 but don't preserve Y, set it to YSAV instead
  • T - Temporary storage, used in a number of places
  • T (I/O processor) - Temporary storage, used in a number of places
  • T1 - Temporary storage, used in a number of places
  • T1 (I/O processor) - Temporary storage, used in a number of places
  • T95 - Print the distance to the selected system
  • TA151 - Make the ship head towards the planet
  • TA2 - Calculate the length of the vector in XX15 (ignoring the low coordinates), returning it in Q
  • TABLE (I/O processor) - The line buffer for line data transmited from the parasite
  • TACTICS (Part 1 of 7) - Apply tactics: Process missiles, both enemy missiles and our own
  • TACTICS (Part 2 of 7) - Apply tactics: Escape pod, station, lone Thargon, safe-zone pirate
  • TACTICS (Part 3 of 7) - Apply tactics: Calculate dot product to determine ship's aim
  • TACTICS (Part 4 of 7) - Apply tactics: Check energy levels, maybe launch escape pod if low
  • TACTICS (Part 5 of 7) - Apply tactics: Consider whether to launch a missile at us
  • TACTICS (Part 6 of 7) - Apply tactics: Consider firing a laser at us, if aim is true
  • TACTICS (Part 7 of 7) - Apply tactics: Set pitch, roll, and acceleration
  • tal - Print the current galaxy numbe
  • TALLY - Our combat rank
  • TAS1 - Calculate K3 = (x_sign x_hi x_lo) - V(1 0)
  • TAS2 - Normalise the three-coordinate vector in K3
  • TAS3 - Calculate the dot product of XX15 and an orientation vector
  • TAS4 - Calculate the dot product of XX15 and one of the space station's orientation vectors
  • TAS6 - Negate the vector in XX15 so it points in the opposite direction
  • tek - The current system's tech level (0-14)
  • TENS - A constant used when printing large numbers in BPRNT
  • TGT - Temporary storage, typically used as a target value for counters when drawing explosion clouds and partial circles
  • THERE - Check whether we are in the Constrictor's system in mission 1
  • TIDY - Orthonormalise the orientation vectors for a ship
  • TIS1 - Calculate (A ?) = (-X * A + (S R)) / 96
  • TIS2 - Calculate A = A / Q
  • TIS3 - Calculate -(nosev_1 * roofv_1 + nosev_2 * roofv_2) / nosev_3
  • TITLE - Display a title screen with a rotating ship and prompt
  • TKN1 - The first extended token table for recursive tokens 0-255 (DETOK)
  • TKN2 - The extended two-letter token lookup table
  • tnpr - Work out if we have space for a specific amount of cargo
  • tnpr1 - Work out if we have space for one tonne of cargo
  • TOKN - Macro definition for standard tokens in the extended token table
  • tosend (I/O processor) - Print a printable character and return to the printer routine
  • TP - The current mission status:
  • TR1 - Copy the last saved commander's name from NA% to INWK
  • TRADEMODE - Clear the screen and set up a printable trading screen
  • TRANTABLE - Translation table from internal key number to ASCII
  • TRNME - Copy the last saved commander's name from INWK to NA%
  • true3 - The text for the demo's third scroll text
  • TT100 - The entry point for the start of the main game loop, which calls the main flight loop and the moves into the spawning routine
  • TT102 - Process function key, save, hyperspace and chart key presses
  • TT103 - Draw a small set of crosshairs on a chart
  • TT105 - Draw crosshairs on the Short-range Chart, with clipping
  • TT11 - Print a 16-bit number, left-padded to n digits, and optional point
  • TT110 - Launch from a station or show the front space view
  • TT111 - Set the current system to the nearest system to a point
  • TT111-1 - Contains an RTS
  • TT113 - Contains an RTS
  • TT114 - Display either the Long-range or Short-range Chart
  • TT123 - Move galactic coordinates by a signed delta
  • TT128 - Draw a circle on a chart
  • TT14 - Draw a circle with crosshairs on a chart
  • TT146 - Print the distance to the selected system in light years
  • TT147 - Print an error when a system is out of hyperspace range
  • TT15 - Draw a set of crosshairs
  • TT151 - Print the name, price and availability of a market item
  • TT152 - Print the unit ("t", "kg" or "g") for a market item
  • TT15b - Draw the crosshairs in the current colour
  • TT16 - Move the crosshairs on a chart
  • TT160 - Print "t" (for tonne) and a space
  • TT161 - Print "kg" (for kilograms)
  • TT162 - Print a space
  • TT162+2 - Jump to TT27 to print the text token in A
  • TT163 - Print the headers for the table of market prices
  • TT167 - Show the Market Price screen (red key f7)
  • TT16a - Print "g" (for grams)
  • TT17 - Scan the keyboard for cursor key or joystick movement
  • TT170 - Main entry point for the Elite game code
  • TT18 - Try to initiate a jump into hyperspace
  • TT180 - Contains an RTS
  • TT20 - Twist the selected system's seeds four times
  • TT208 - Show the Sell Cargo screen (red key f2)
  • TT210 - Show a list of current cargo in our hold, optionally to sell
  • TT213 - Show the Inventory screen (red key f9)
  • TT214 - Ask a question with a "Y/N?" prompt and return the response
  • TT217 - Scan the keyboard until a key is pressed
  • TT219 - Show the Buy Cargo screen (red key f1)
  • TT22 - Show the Long-range Chart (red key f4)
  • TT23 - Show the Short-range Chart (red key f5)
  • TT24 - Calculate system data from the system seeds
  • TT25 - Show the Data on System screen (red key f6)
  • TT26 - Print a character at the text cursor, with support for verified text in extended tokens
  • TT26 (I/O processor) - Print a character at the text cursor by poking into screen memory
  • TT27 - Print a text token
  • TT41 - Print a letter according to Sentence Case
  • TT42 - Print a letter in lower case
  • TT43 - Print a two-letter token or recursive token 0-95
  • TT44 - Jumps to TT26 to print the character in A (used to enable us to use a branch instruction to jump to TT26)
  • TT45 - Print a letter in lower case
  • TT46 - Print a character and switch to capitals
  • TT48 - Contains an RTS
  • TT54 - Twist the selected system's seeds
  • TT60 - Print a text token and a paragraph break
  • TT66 - Clear the screen and set the current view type
  • TT67 - Print a newline
  • TT67 (I/O processor) - Print a newline
  • TT68 - Print a text token followed by a colon
  • TT69 - Set Sentence Case and print a newline
  • TT70 - Display "MAINLY " and jump to TT72
  • TT72 - Used by TT70 to re-enter the routine after displaying "MAINLY" for the economy type
  • TT73 - Print a colon
  • TT74 - Print a character
  • TT81 - Set the selected system's seeds to those of system 0
  • TTX110 - Set the current system to the nearest system and return to hyp
  • TTX111 - Used to rejoin this routine from the call to TTX110
  • TTX66 - Send 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) - Clear the top part of the screen and draw a white border
  • TTX69 - Print a paragraph break
  • TVT1 (I/O processor) - Palette data for the mode 2 part of the screen (the dashboard)
  • TVT3 (I/O processor) - Palette data for the mode 1 part of the screen (the top part)
  • TWFL - Ready-made character rows for the left end of a horizontal line in mode 4
  • TWFL (I/O processor) - Ready-made character rows for the left end of a horizontal line
  • TWFR - Ready-made character rows for the right end of a horizontal line in mode 4
  • TWFR (I/O processor) - Ready-made character rows for the right end of a horizontal line
  • TWIST - Pitch the current ship by a small angle in a positive direction
  • TWIST2 - Pitch in the direction given in A
  • TWOK - Macro definition for two-letter tokens in the token table
  • TWOS - Ready-made single-pixel character row bytes for mode 4
  • TWOS (I/O processor) - Ready-made single-pixel character row bytes for mode 1
  • TWOS (Loader 1) - Ready-made single-pixel character row bytes for mode 1
  • TWOS2 - Ready-made double-pixel character row bytes for mode 4
  • TWOS2 (I/O processor) - Ready-made double-pixel character row bytes for mode 1
  • TYPE - The current ship type
  • U - Temporary storage, used in a number of places
  • U (I/O processor) - Temporary storage, used in a number of places
  • U% - Clear the key logger (from KY1 through KY19)
  • UNIV - Table of pointers to the local universe's ship data blocks
  • UNWISE - Contains an RTS
  • UP - Ship slots, variables
  • UPO - 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) - The custom OSWRCH routine for writing characters and implementing jump table commands
  • V - Temporary storage, typically used for storing an address pointer
  • var - Calculate QQ19+3 = economy * |economic_factor|
  • VCSU1 - Calculate vector K3(8 0) = [x y z] - coordinates of the sun or space station
  • VCSUB - Calculate vector K3(8 0) = [x y z] - coordinates in (A V)
  • VEC (I/O processor) - VEC = &7FFE
  • VERTEX - Macro definition for adding vertices to ship blueprints
  • VIEW - The number of the current space view
  • VNT3+1 (I/O processor) - Changing this byte modifies the palette-loading instruction at VNT3, to support the #SETVDU19 command for changing the mode 1 palette
  • VOWEL - Test whether a character is a vowel
  • WARP - Perform an in-system jump
  • WHITETEXT - Switch to white text
  • widget - Temporary storage, used to store the original argument in A in the logarithmic FMLTU and LL28 routines
  • WP - Variables
  • WP1 - Contains an RTS
  • WPLS - Remove the sun from the screen
  • WPSHPS - Clear the scanner, reset the ball line and sun line heaps
  • WSCAN - Ask the I/O processor to wait for the vertical sync by sending a #wscn command to the I/O processor
  • WSCAN (I/O processor) - Implement the #wscn command (wait for the vertical sync)
  • wW - Start a hyperspace countdown
  • wW2 - Start the hyperspace countdown, starting the countdown from the value in A
  • X1 - Temporary storage, typically used for x-coordinates in line-drawing routines
  • X1 (I/O processor) - Temporary storage, typically used for x-coordinates in line-drawing routines
  • X1TB - The x-coordinates of the start points for character lines in the scroll text (as space coordinates)
  • X1UB - The x-coordinates of the start points for character lines in the scroll text (as projected screen coordinates)
  • X1VB - 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
  • X2 - Temporary storage, typically used for x-coordinates in line-drawing routines
  • X2 (I/O processor) - Temporary storage, typically used for x-coordinates in line-drawing routines
  • X2TB - The x-coordinates of the end points for character lines in the scroll text
  • X2UB - The x-coordinates of the end points for character lines in the scroll text (as projected screen coordinates)
  • X2VB - 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
  • XC - The x-coordinate of the text cursor (i.e. the text column), which can be from 0 to 32
  • XC (I/O processor) - The x-coordinate of the text cursor (i.e. the text column), set to an initial value of 1
  • XP - The x-coordinate of the current character as we construct the lines for the Star Wars scroll text
  • XSAV - Temporary storage for saving the value of the X register, used in a number of places
  • XSAV2 - This byte is unused in this version of Elite
  • XX - Temporary storage, typically used for storing a 16-bit x-coordinate
  • XX0 - 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
  • XX1 - This is an alias for INWK that is used in the main ship-drawing routine at LL9
  • XX12 - Temporary storage for a block of values, used in a number of places
  • XX13 - Temporary storage, typically used in the line-drawing routines
  • XX14 - This byte is unused
  • XX15 - Temporary storage, typically used for storing screen coordinates in line-drawing routines
  • XX15 (I/O processor) - Temporary storage, typically used for storing screen coordinates in line-drawing routines
  • XX16 - Temporary storage for a block of values, used in a number of places
  • XX17 - Temporary storage, used in BPRNT to store the number of characters to print, and as the edge counter in the main ship-drawing routine
  • XX18 - Temporary storage used to store coordinates in the LL9 ship-drawing routine
  • XX19 - XX19(1 0) shares its location with INWK(34 33), which contains the address of the ship line heap
  • XX2 - Temporary storage, used to store the visibility of the ship's faces during the ship-drawing routine at LL9
  • XX20 - Temporary storage, used in a number of places
  • XX21 - Ship blueprints lookup table
  • XX24 - This byte is unused
  • XX3 - Temporary storage space for complex calculations
  • XX4 - Temporary storage, used in a number of places
  • Y1 - Temporary storage, typically used for y-coordinates in line-drawing routines
  • Y1 (I/O processor) - Temporary storage, typically used for y-coordinates in line-drawing routines
  • Y1TB - The y-coordinates of the start points for character lines in the scroll text
  • Y1UB - The y-coordinates of the start points for character lines in the scroll text (as projected screen coordinates)
  • Y1VB - 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
  • Y2 - Temporary storage, typically used for y-coordinates in line-drawing routines
  • Y2 (I/O processor) - Temporary storage, typically used for y-coordinates in line-drawing routines
  • Y2TB - The y-coordinates of the end points for character lines in the scroll text
  • Y2UB - The y-coordinates of the end points for character lines in the scroll text (as projected screen coordinates)
  • Y2VB - 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
  • YC - The y-coordinate of the text cursor (i.e. the text row), which can be from 0 to 23
  • YC (I/O processor) - The y-coordinate of the text cursor (i.e. the text row), set to an initial value of 1
  • ylookup (I/O processor) - Lookup table for converting pixel y-coordinate to page number of screen address
  • YP - The y-coordinate of the current character as we construct the lines for the Star Wars scroll text
  • ypl - Print the current system name
  • ypl-1 - Contains an RTS
  • YS - Temporary storage for saving the index into the TB tables in the SLIDE routine
  • YSAV - Temporary storage for saving the value of the Y register, used in a number of places
  • YSAV (I/O processor) - Temporary storage for saving the value of the Y register, used in a number of places
  • YSAV2 - This byte is unused in this version of Elite
  • YY - Temporary storage, typically used for storing a 16-bit y-coordinate
  • Ze - Initialise the INWK workspace to a hostile ship
  • ZEBC - Zero-fill pages &B and &C
  • ZEKTRAN - Reset the key logger buffer at KTRAN
  • ZERO - Reset the local bubble of universe and ship status
  • ZES1 - Zero-fill the page whose number is in X
  • ZES1 (I/O processor) - Zero-fill the page whose number is in X
  • ZES2 - Zero-fill a specific page
  • ZES2 (I/O processor) - Zero-fill a specific page
  • ZEVB - Zero-fill the Y1VB variable
  • ZINF - Reset the INWK workspace and orientation vectors
  • ZINF2 - Reset the INWK workspace and orientation vectors
  • ZP - Lots 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) - Important variables used by the I/O processor
  • ZZ - Temporary storage, typically used for distance values
  • zZ+1 - Contains an RTS
  • ZZAAP - Draw a vertical red laser line from (128, 67) to (128, 160)