Skip to navigation

Elite on the BBC Micro and NES

Workspaces and configuration

[Acorn Electron version]

ELECTRON ELITE GAME SOURCE Electron Elite was written by Ian Bell and David Braben and is copyright Acornsoft 1984 The code on this site has been reconstructed from a disassembly of the version released on Ian Bell's personal website at http://www.elitehomepage.org/ The commentary is copyright Mark Moxon, and any misunderstandings or mistakes in the documentation are entirely my fault The terminology and notations used in this commentary are explained at https://www.bbcelite.com/terminology The deep dive articles referred to in this commentary can be found at https://www.bbcelite.com/deep_dives
This source file produces the following binary files: * ELTA.bin * ELTB.bin * ELTC.bin * ELTD.bin * ELTE.bin * ELTF.bin * ELTG.bin * SHIPS.bin * WORDS9.bin
INCLUDE "1-source-files/main-sources/elite-build-options.asm" GUARD &5800 \ Guard against assembling over screen memory
Configuration variables
CODE% = &0D00 \ The address where the code will be run LOAD% = &2000 \ The address where the code will be loaded CODE_WORDS% = &0400 \ The address where the text data will be run LOAD_WORDS% = &4400 \ The address where the text data will be loaded Q% = _MAX_COMMANDER \ Set Q% to TRUE to max out the default commander, FALSE \ for the standard default commander \ \ [Show more]
\ \ This variable is used by the following: \ \ * NA% \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
NOST = 10 \ The number of stardust particles in normal space \ \ [Show more]
\ \ This variable is used by the following: \ \ * FLIP \ * nWq \ * STARS1 \ * STARS2 \ * STARS6 \ * T% \ * WP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
NOSH = 12 \ The maximum number of ships in our local bubble of \ universe \ \ [Show more]
\ \ This variable is used by the following: \ \ * K% \ * NWSHP \ * WP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
NTY = 11 \ The number of different ship types \ \ [Show more]
\ \ This variable is used by the following: \ \ * WP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
COPS = 2 \ Ship type for a Viper \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 12 of 16) \ * Main game loop (Part 3 of 6) \ * TACTICS (Part 2 of 7) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
CYL = 6 \ Ship type for a Cobra Mk III (trader) \ \ [Show more]
\ \ This variable is used by the following: \ \ * ANGRY \ * BR1 (Part 1 of 2) \ * Main game loop (Part 1 of 6) \ * TACTICS (Part 2 of 7) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
SST = 7 \ Ship type for the space station \ \ [Show more]
\ \ This variable is used by the following: \ \ * ANGRY \ * KILLSHP \ * Main flight loop (Part 5 of 16) \ * Main flight loop (Part 7 of 16) \ * Main flight loop (Part 11 of 16) \ * NWSHP \ * NWSPS \ * SFS1 \ * TACTICS (Part 2 of 7) \ * WP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
MSL = 8 \ Ship type for a missile \ \ [Show more]
\ \ This variable is used by the following: \ \ * FRMIS \ * KS2 \ * Main flight loop (Part 7 of 16) \ * MVEIT (Part 2 of 9) \ * SFRMIS \ * TACTICS (Part 2 of 7) \ * TACTICS (Part 4 of 7) \ * TACTICS (Part 7 of 7) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
AST = 9 \ Ship type for an asteroid \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main game loop (Part 2 of 6) \ * STATUS \ * WARP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
OIL = 10 \ Ship type for a cargo canister \ \ [Show more]
\ \ This variable is used by the following: \ \ * DEATH \ * Main flight loop (Part 7 of 16) \ * Main flight loop (Part 11 of 16) \ * Main game loop (Part 2 of 6) \ * SFS1 \ * WARP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
ESC = 11 \ Ship type for an escape pod \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 8 of 16) \ * SESCP \ * TACTICS (Part 2 of 7) \ * WARP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
POW = 15 \ Pulse laser power \ \ [Show more]
\ \ This variable is used by the following: \ \ * EQSHP \ * NA% \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
NI% = 36 \ The number of bytes in each ship's data block (as \ stored in INWK and K%) \ \ [Show more]
\ \ This variable is used by the following: \ \ * ANGRY \ * K% \ * Main flight loop (Part 3 of 16) \ * Main flight loop (Part 4 of 16) \ * Main flight loop (Part 6 of 16) \ * Main flight loop (Part 9 of 16) \ * NWSHP \ * SFS1 \ * SPS4 \ * UNIV \ * WARP \ * ZINF \ * ZP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
X = 128 \ The centre x-coordinate of the 256 x 192 space view \ \ [Show more]
\ \ This variable is used by the following: \ \ * LASLI \ * PROJ \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
Y = 96 \ The centre y-coordinate of the 256 x 192 space view \ \ [Show more]
\ \ This variable is used by the following: \ \ * CHKON \ * DOEXP \ * HFS2 \ * LASLI \ * LL118 \ * LL145 (Part 1 of 4) \ * LL145 (Part 2 of 4) \ * LL145 (Part 4 of 4) \ * LL9 (Part 8 of 12) \ * PROJ \ * SHPPT \ * SIGHT \ * TTX66 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
func1 = &B0 \ Internal key number for FUNC-1 (Launch, Front) \ \ [Show more]
\ \ This variable is used by the following: \ \ * TT102 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
func2 = &B1 \ Internal key number for FUNC-2 (Buy Cargo, Rear) \ \ [Show more]
\ \ This variable is used by the following: \ \ * TT102 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
func3 = &91 \ Internal key number for FUNC-3 (Sell Cargo, Left) \ \ [Show more]
\ \ This variable is used by the following: \ \ * TT102 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
func4 = &92 \ Internal key number for FUNC-4 (Equip Ship, Right) \ \ [Show more]
\ \ This variable is used by the following: \ \ * TT102 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
func5 = &93 \ Internal key number for FUNC-5 (Long-range Chart) \ \ [Show more]
\ \ This variable is used by the following: \ \ * TT102 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
func6 = &B4 \ Internal key number for FUNC-6 (Short-range Chart) \ \ [Show more]
\ \ This variable is used by the following: \ \ * TT102 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
func7 = &A4 \ Internal key number for FUNC-7 (Data on System) \ \ [Show more]
\ \ This variable is used by the following: \ \ * TT102 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
func8 = &95 \ Internal key number for FUNC-8 (Market Price) \ \ [Show more]
\ \ This variable is used by the following: \ \ * TT102 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
func9 = &A6 \ Internal key number for FUNC-9 (Status Mode) \ \ [Show more]
\ \ This variable is used by the following: \ \ * BAY \ * TT102 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
func0 = &A7 \ Internal key number for FUNC-0 (Inventory) \ \ [Show more]
\ \ This variable is used by the following: \ \ * TT102 \ * TT219 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
RE = &23 \ The obfuscation byte used to hide the recursive tokens \ table from crackers viewing the binary code \ \ [Show more]
\ \ This variable is used by the following: \ \ * CHAR \ * CONT \ * ex \ * QQ18 \ * RTOK \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
VIA = &FE00 \ Memory-mapped space for accessing internal hardware, \ such as the video ULA, 6845 CRTC and 6522 VIAs (also \ known as SHEILA) \ \ [Show more]
\ \ This variable is used by the following: \ \ * IRQ1 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
OSFILE = &FFDD \ The address for the OSFILE routine \ \ [Show more]
\ \ This variable is used by the following: \ \ * QUS1 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
OSRDCH = &FFE0 \ The address for the OSRDCH routine \ \ [Show more]
\ \ This variable is used by the following: \ \ * TT217 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
OSWORD = &FFF1 \ The address for the OSWORD routine \ \ [Show more]
\ \ This variable is used by the following: \ \ * GTNME \ * NO3 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
OSBYTE = &FFF4 \ The address for the OSBYTE routine \ \ [Show more]
\ \ This variable is used by the following: \ \ * DKS2 \ * FLKB \ * FX200 \ * GTNME \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
Name: ZP [Show more] Type: Workspace Address: &0000 to &00B0 Category: Workspaces Summary: Lots of important variables are stored in the zero page workspace as it is quicker and more space-efficient to access memory here
Context: See this workspace on its own page Variations: See code variations for this workspace in the different versions References: No direct references to this workspace in this source file
ORG &0000 .ZP SKIP 0 \ The start of the zero page workspace .RAND SKIP 4 \ Four 8-bit seeds for the random number generation \ system implemented in the DORND routine \ \ [Show more]
\ \ This variable is used by the following: \ \ * DOEXP \ * DORND \ * Main flight loop (Part 1 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.TRTB% SKIP 2 \ Contains the address of the keyboard translation \ table, which is used to translate internal key \ numbers to ASCII .T1 SKIP 1 \ Temporary storage, used in a number of places \ \ [Show more]
\ \ This variable is used by the following: \ \ * ADD \ * ARCTAN \ * DIALS (Part 4 of 4) \ * EQSHP \ * gnum \ * LCASH \ * LL9 (Part 10 of 12) \ * LL9 (Part 11 of 12) \ * MLS1 \ * MULT1 \ * NWSHP \ * PIXEL \ * SFS1 \ * TIS1 \ * TT102 \ * TT219 \ * Ze \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.SC SKIP 1 \ Screen address (low byte) \ \ Elite draws on-screen by poking bytes directly into \ screen memory, and SC(1 0) is typically set to the \ address of the character block containing the pixel \ we want to draw (see the deep dives on "Drawing \ monochrome pixels in mode 4" and "Drawing pixels \ in the Electron version" for more details) \ \ [Show more]
\ \ This variable is used by the following: \ \ * BULB \ * CPIX2 \ * DIALS (Part 1 of 4) \ * DIALS (Part 4 of 4) \ * DIL2 \ * DILX \ * KILLSHP \ * KS2 \ * LOIN (Part 1 of 7) \ * LOIN (Part 2 of 7) \ * LOIN (Part 3 of 7) \ * LOIN (Part 4 of 7) \ * LOIN (Part 5 of 7) \ * LOIN (Part 6 of 7) \ * LOIN (Part 7 of 7) \ * MSBAR \ * NEXTR \ * PIXEL \ * SCAN \ * TT26 \ * ZES1 \ * ZES2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.SCH SKIP 1 \ Screen address (high byte) \ \ [Show more]
\ \ This variable is used by the following: \ \ * MSBAR \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.XX16 SKIP 18 \ Temporary storage for a block of values, used in a \ number of places \ \ [Show more]
\ \ This variable is used by the following: \ \ * EXNO \ * LL51 \ * LL9 (Part 3 of 12) \ * LL9 (Part 6 of 12) \ * NO3 \ * NOS1 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.P SKIP 3 \ Temporary storage, used in a number of places \ \ [Show more]
\ \ This variable is used by the following: \ \ * ADD \ * ARCTAN \ * BULB \ * CHKON \ * DIALS (Part 2 of 4) \ * DIALS (Part 3 of 4) \ * DOEXP \ * DVID3B2 \ * DVID4 \ * DVIDT \ * FMLTU \ * GC2 \ * HITCH \ * KILLSHP \ * KS3 \ * LL9 (Part 6 of 12) \ * LL9 (Part 10 of 12) \ * LOIN (Part 1 of 7) \ * LOIN (Part 2 of 7) \ * LOIN (Part 5 of 7) \ * LOIN (Part 6 of 7) \ * LOIN (Part 7 of 7) \ * MLS1 \ * MLTU2 \ * MLU2 \ * MU1 \ * MU11 \ * MU6 \ * MULT1 \ * MULT12 \ * MULT3 \ * MUT3 \ * MV40 \ * MVEIT (Part 5 of 9) \ * MVS4 \ * MVS5 \ * MVT6 \ * NORM \ * PLANET \ * PROJ \ * SPS2 \ * SQUA2 \ * STARS1 \ * STARS2 \ * STARS6 \ * TIS3 \ * TT111 \ * TT151 \ * TT210 \ * TT219 \ * TT24 \ * TT26 \ * Unused duplicate of MULTU \ * WARP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.XX0 SKIP 2 \ 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 \ \ [Show more]
\ \ This variable is used by the following: \ \ * HITCH \ * KILLSHP \ * LL9 (Part 1 of 12) \ * LL9 (Part 2 of 12) \ * LL9 (Part 4 of 12) \ * LL9 (Part 5 of 12) \ * LL9 (Part 6 of 12) \ * LL9 (Part 9 of 12) \ * LL9 (Part 10 of 12) \ * Main flight loop (Part 4 of 16) \ * Main flight loop (Part 11 of 16) \ * Main flight loop (Part 12 of 16) \ * MVEIT (Part 4 of 9) \ * NWSHP \ * SFS1 \ * TACTICS (Part 2 of 7) \ * TACTICS (Part 4 of 7) \ * TACTICS (Part 6 of 7) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.INF SKIP 2 \ 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 \ \ [Show more]
\ \ This variable is used by the following: \ \ * ANGRY \ * DEATH \ * GINF \ * KILLSHP \ * LL9 (Part 1 of 12) \ * Main flight loop (Part 4 of 16) \ * Main flight loop (Part 6 of 16) \ * Main flight loop (Part 12 of 16) \ * NWSHP \ * OOPS \ * SFS1 \ * WPSHPS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.V SKIP 2 \ Temporary storage, typically used for storing an \ address pointer \ \ [Show more]
\ \ This variable is used by the following: \ \ * ex \ * LL9 (Part 5 of 12) \ * LL9 (Part 6 of 12) \ * LL9 (Part 10 of 12) \ * LL9 (Part 11 of 12) \ * TACTICS (Part 1 of 7) \ * TAS1 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.XX SKIP 2 \ Temporary storage, typically used for storing a 16-bit \ x-coordinate \ \ [Show more]
\ \ This variable is used by the following: \ \ * MLS2 \ * MUT1 \ * MUT2 \ * STARS1 \ * STARS2 \ * STARS6 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.YY SKIP 2 \ Temporary storage, typically used for storing a 16-bit \ y-coordinate \ \ [Show more]
\ \ This variable is used by the following: \ \ * PIX1 \ * STARS1 \ * STARS2 \ * STARS6 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
SKIP 2 \ These bytes are unused in this version of Elite (they \ are used to store the centre axis of the sun in the \ other versions) .BETA SKIP 1 \ The current pitch angle beta, which is reduced from \ JSTY to a sign-magnitude value between -8 and +8 \ \ This describes how fast we are pitching our ship, and \ determines how fast the universe pitches around us \ \ The sign bit is also stored in BET2, while the \ opposite sign is stored in BET2+1 \ \ [Show more]
\ \ This variable is used by the following: \ \ * DIALS (Part 2 of 4) \ * Main flight loop (Part 2 of 16) \ * MV40 \ * MVS4 \ * RESET \ * STARS1 \ * STARS6 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.BET1 SKIP 1 \ The magnitude of the pitch angle beta, i.e. |beta|, \ which is a positive value between 0 and 8 \ \ [Show more]
\ \ This variable is used by the following: \ \ * DIALS (Part 2 of 4) \ * Main flight loop (Part 2 of 16) \ * MVEIT (Part 5 of 9) \ * STARS1 \ * STARS2 \ * STARS6 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.XC SKIP 1 \ The x-coordinate of the text cursor (i.e. the text \ column), which can be from 0 to 32 \ \ A value of 0 denotes the leftmost column and 32 the \ rightmost column, but because the top part of the \ screen (the space view) has a white border that \ clashes with columns 0 and 32, text is only shown \ in columns 1-31 \ \ [Show more]
\ \ This variable is used by the following: \ \ * BR1 (Part 1 of 2) \ * CLYNS \ * crlf \ * DEATH \ * ee3 \ * EQSHP \ * hy6 \ * hyp \ * MESS \ * plf2 \ * qv \ * STATUS \ * TITLE \ * TT102 \ * TT151 \ * TT163 \ * TT167 \ * TT208 \ * TT210 \ * TT213 \ * TT219 \ * TT22 \ * TT23 \ * TT25 \ * TT26 \ * TTX66 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.YC SKIP 1 \ The y-coordinate of the text cursor (i.e. the text \ row), which can be from 0 to 23 \ \ The screen actually has 31 character rows if you \ include the dashboard, but the text printing routines \ only work on the top part (the space view), so the \ text cursor only goes up to a maximum of 23, the row \ just before the screen splits \ \ A value of 0 denotes the top row, but because the \ top part of the screen has a white border that clashes \ with row 0, text is always shown at row 1 or greater \ \ [Show more]
\ \ This variable is used by the following: \ \ * CLYNS \ * DEATH \ * ee3 \ * EQSHP \ * hyp \ * MESS \ * NLIN \ * qv \ * TITLE \ * TT102 \ * TT146 \ * TT167 \ * TT208 \ * TT219 \ * TT23 \ * TT25 \ * TT26 \ * TTX66 \ * TTX69 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ22 SKIP 2 \ The two hyperspace countdown counters \ \ Before a hyperspace jump, both QQ22 and QQ22+1 are \ set to 15 \ \ QQ22 is an internal counter that counts down by 1 \ each time TT102 is called, which happens every \ iteration of the main game loop. When it reaches \ zero, the on-screen counter in QQ22+1 gets \ decremented, and QQ22 gets set to 5 and the countdown \ continues (so the first tick of the hyperspace counter \ takes 15 iterations to happen, but subsequent ticks \ take 5 iterations each) \ \ QQ22+1 contains the number that's shown on-screen \ during the countdown. It counts down from 15 to 1, and \ when it hits 0, the hyperspace engines kick in \ \ [Show more]
\ \ This variable is used by the following: \ \ * hyp \ * Main flight loop (Part 9 of 16) \ * TT102 \ * TTX66 \ * wW \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.ECMA SKIP 1 \ The E.C.M. countdown timer, which determines whether \ an E.C.M. system is currently operating: \ \ * 0 = E.C.M. is off \ \ * Non-zero = E.C.M. is on and is counting down \ \ The counter starts at 32 when an E.C.M. is activated, \ either by us or by an opponent, and it decreases by 1 \ in each iteration of the main flight loop until it \ reaches zero, at which point the E.C.M. switches off. \ Only one E.C.M. can be active at any one time, so \ there is only one counter \ \ [Show more]
\ \ This variable is used by the following: \ \ * ECBLB2 \ * ECMOF \ * Main flight loop (Part 3 of 16) \ * Main flight loop (Part 16 of 16) \ * RES2 \ * TACTICS (Part 1 of 7) \ * TACTICS (Part 5 of 7) \ * TACTICS (Part 6 of 7) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.XX15 SKIP 0 \ Temporary storage, typically used for storing screen \ coordinates in line-drawing routines \ \ There are six bytes of storage, from XX15 TO XX15+5. \ The first four bytes have the following aliases: \ \ X1 = XX15 \ Y1 = XX15+1 \ X2 = XX15+2 \ Y2 = XX15+3 \ \ These are typically used for describing lines in terms \ of screen coordinates, i.e. (X1, Y1) to (X2, Y2) \ \ The last two bytes of XX15 do not have aliases \ \ [Show more]
\ \ This variable is used by the following: \ \ * BLINE \ * BPRNT \ * LL118 \ * LL120 \ * LL145 (Part 1 of 4) \ * LL145 (Part 2 of 4) \ * LL145 (Part 3 of 4) \ * LL145 (Part 4 of 4) \ * LL51 \ * LL9 (Part 5 of 12) \ * LL9 (Part 6 of 12) \ * LL9 (Part 7 of 12) \ * LL9 (Part 8 of 12) \ * LL9 (Part 9 of 12) \ * LL9 (Part 10 of 12) \ * LL9 (Part 11 of 12) \ * LL9 (Part 12 of 12) \ * Main flight loop (Part 9 of 16) \ * NORM \ * SP2 \ * TACTICS (Part 7 of 7) \ * TAS2 \ * TAS3 \ * TIDY \ * TT15 \ * TT22 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.X1 SKIP 1 \ Temporary storage, typically used for x-coordinates in \ line-drawing routines \ \ [Show more]
\ \ This variable is used by the following: \ \ * BLINE \ * CPIX2 \ * DOT \ * FLIP \ * LASLI \ * LOIN (Part 1 of 7) \ * LOIN (Part 2 of 7) \ * LOIN (Part 5 of 7) \ * NLIN2 \ * nWq \ * PIXEL2 \ * SCAN \ * STARS1 \ * STARS2 \ * STARS6 \ * TT23 \ * TTX66 \ * WPLS2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.Y1 SKIP 1 \ Temporary storage, typically used for y-coordinates in \ line-drawing routines \ \ [Show more]
\ \ This variable is used by the following: \ \ * BLINE \ * CPIX2 \ * CPIX4 \ * DOEXP \ * DOT \ * FLIP \ * HLOIN \ * LASLI \ * LOIN (Part 1 of 7) \ * LOIN (Part 2 of 7) \ * LOIN (Part 5 of 7) \ * MLU1 \ * NLIN2 \ * nWq \ * PIXEL2 \ * SCAN \ * STARS1 \ * STARS2 \ * STARS6 \ * TT23 \ * TTX66 \ * WPLS2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.X2 SKIP 1 \ Temporary storage, typically used for x-coordinates in \ line-drawing routines \ \ [Show more]
\ \ This variable is used by the following: \ \ * BLINE \ * LASLI \ * LOIN (Part 1 of 7) \ * LOIN (Part 2 of 7) \ * LOIN (Part 5 of 7) \ * NLIN2 \ * TTX66 \ * WPLS2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.Y2 SKIP 1 \ Temporary storage, typically used for y-coordinates in \ line-drawing routines \ \ [Show more]
\ \ This variable is used by the following: \ \ * BLINE \ * HLOIN \ * LASLI \ * LOIN (Part 1 of 7) \ * LOIN (Part 2 of 7) \ * LOIN (Part 5 of 7) \ * TTX66 \ * WPLS2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
SKIP 2 \ The last two bytes of the XX15 block .XX12 SKIP 6 \ Temporary storage for a block of values, used in a \ number of places \ \ [Show more]
\ \ This variable is used by the following: \ \ * BLINE \ * DIALS (Part 3 of 4) \ * LL129 \ * LL145 (Part 1 of 4) \ * LL145 (Part 2 of 4) \ * LL145 (Part 3 of 4) \ * LL145 (Part 4 of 4) \ * LL51 \ * LL9 (Part 5 of 12) \ * LL9 (Part 6 of 12) \ * LL9 (Part 7 of 12) \ * LL9 (Part 9 of 12) \ * LL9 (Part 10 of 12) \ * TT23 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.K SKIP 4 \ Temporary storage, used in a number of places \ \ [Show more]
\ \ This variable is used by the following: \ \ * BPRNT \ * CHKON \ * CIRCLE \ * csh \ * DIALS (Part 4 of 4) \ * DVID3B2 \ * EQSHP \ * FMLTU2 \ * HFS2 \ * KILLSHP \ * MAS1 \ * MU5 \ * MULT3 \ * MV40 \ * MVS5 \ * MVT3 \ * PLANET \ * PLS6 \ * PROJ \ * SVE \ * TAS1 \ * TT11 \ * TT111 \ * TT14 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KL SKIP 1 \ 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 \ \ See the deep dive on "The key logger" for more details \ \ 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) \ \ [Show more]
\ \ This variable is used by the following: \ \ * DK4 \ * DOKEY \ * TT17 \ * U% \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KY1 SKIP 1 \ "?" is being pressed \ \ * 0 = no \ \ * Non-zero = yes \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KY2 SKIP 1 \ Space is being pressed \ \ * 0 = no \ \ * Non-zero = yes \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KY3 SKIP 1 \ "<" is being pressed \ \ * 0 = no \ \ * Non-zero = yes .KY4 SKIP 1 \ ">" is being pressed \ \ * 0 = no \ \ * Non-zero = yes .KY5 SKIP 1 \ "X" is being pressed \ \ * 0 = no \ \ * Non-zero = yes .KY6 SKIP 1 \ "S" is being pressed \ \ * 0 = no \ \ * Non-zero = yes .KY7 SKIP 1 \ "A" is being pressed \ \ * 0 = no \ \ * Non-zero = yes \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KY12 SKIP 1 \ "-" is being pressed \ \ * 0 = no \ \ * Non-zero = yes \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KY13 SKIP 1 \ ESCAPE is being pressed \ \ * 0 = no \ \ * Non-zero = yes \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KY14 SKIP 1 \ "T" is being pressed \ \ * 0 = no \ \ * Non-zero = yes \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KY15 SKIP 1 \ "U" is being pressed \ \ * 0 = no \ \ * Non-zero = yes \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KY16 SKIP 1 \ "M" is being pressed \ \ * 0 = no \ \ * Non-zero = yes \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KY17 SKIP 1 \ "E" is being pressed \ \ * 0 = no \ \ * Non-zero = yes \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KY18 SKIP 1 \ "J" is being pressed \ \ * 0 = no \ \ * Non-zero = yes \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KY19 SKIP 1 \ "C" is being pressed \ \ * 0 = no \ \ * Non-zero = yes \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.LAS SKIP 1 \ 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) \ \ This gets set to bits 0-6 of the laser power byte from \ the commander data block, which contains the laser's \ power (bit 7 doesn't denote laser power, just whether \ or not the laser pulses, so that is not stored here) \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ * Main flight loop (Part 11 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.MSTG SKIP 1 \ The current missile lock target \ \ * &FF = no target \ \ * 1-12 = the slot number of the ship that our \ missile is locked onto \ \ [Show more]
\ \ This variable is used by the following: \ \ * ABORT2 \ * FRMIS \ * FRS1 \ * KILLSHP \ * Main flight loop (Part 3 of 16) \ * RES2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.XX1 SKIP 0 \ This is an alias for INWK that is used in the main \ ship-drawing routine at LL9 \ \ [Show more]
\ \ This variable is used by the following: \ \ * LL9 (Part 1 of 12) \ * LL9 (Part 2 of 12) \ * LL9 (Part 3 of 12) \ * LL9 (Part 6 of 12) \ * LL9 (Part 7 of 12) \ * LL9 (Part 9 of 12) \ * SHPPT \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.INWK SKIP 33 \ The zero-page internal workspace for the current ship \ data block \ \ As operations on zero page locations are faster and \ have smaller opcodes than operations on the rest of \ the addressable memory, Elite tends to store oft-used \ data here. A lot of the routines in Elite need to \ access and manipulate ship data, so to make this an \ efficient exercise, the ship data is first copied from \ the ship data blocks at K% into INWK (or, when new \ ships are spawned, from the blueprints at XX21). See \ the deep dive on "Ship data blocks" for details of \ what each of the bytes in the INWK data block \ represents \ \ [Show more]
\ \ This variable is used by the following: \ \ * DEATH \ * DOEXP \ * DVID3B2 \ * EXNO \ * FAROF2 \ * FRS1 \ * HITCH \ * KS4 \ * Main flight loop (Part 4 of 16) \ * Main flight loop (Part 5 of 16) \ * Main flight loop (Part 6 of 16) \ * Main flight loop (Part 7 of 16) \ * Main flight loop (Part 9 of 16) \ * Main flight loop (Part 10 of 16) \ * Main flight loop (Part 11 of 16) \ * Main flight loop (Part 12 of 16) \ * Main flight loop (Part 14 of 16) \ * Main game loop (Part 1 of 6) \ * Main game loop (Part 2 of 6) \ * Main game loop (Part 4 of 6) \ * MAS1 \ * MAS4 \ * MV40 \ * MVEIT (Part 1 of 9) \ * MVEIT (Part 2 of 9) \ * MVEIT (Part 3 of 9) \ * MVEIT (Part 4 of 9) \ * MVEIT (Part 5 of 9) \ * MVEIT (Part 8 of 9) \ * MVEIT (Part 9 of 9) \ * MVS4 \ * MVS5 \ * MVT1 \ * MVT3 \ * MVT6 \ * NwS1 \ * NWSHP \ * NWSPS \ * PLANET \ * PLUT \ * PROJ \ * QUS1 \ * RLINE \ * SCAN \ * SFS1 \ * SOLAR \ * SOS1 \ * TACTICS (Part 1 of 7) \ * TACTICS (Part 2 of 7) \ * TACTICS (Part 3 of 7) \ * TACTICS (Part 4 of 7) \ * TACTICS (Part 5 of 7) \ * TACTICS (Part 6 of 7) \ * TACTICS (Part 7 of 7) \ * TAS3 \ * TIDY \ * TIS3 \ * TITLE \ * TR1 \ * TRNME \ * TT110 \ * TT23 \ * WPSHPS \ * Ze \ * ZINF \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.XX19 SKIP NI% - 33 \ XX19(1 0) shares its location with INWK(34 33), which \ contains the address of the ship line heap \ \ [Show more]
\ \ This variable is used by the following: \ \ * DOEXP \ * LL9 (Part 1 of 12) \ * LL9 (Part 9 of 12) \ * LL9 (Part 11 of 12) \ * LL9 (Part 12 of 12) \ * SHPPT \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.LSP SKIP 1 \ 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) \ \ [Show more]
\ \ This variable is used by the following: \ \ * BLINE \ * HFS2 \ * TT128 \ * WP1 \ * WPLS2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ15 SKIP 6 \ The three 16-bit seeds for the selected system, i.e. \ the one in the crosshairs in the Short-range Chart \ \ See the deep dives on "Galaxy and system seeds" and \ "Twisting the system seeds" for more details \ \ [Show more]
\ \ This variable is used by the following: \ \ * cpl \ * hyp1 \ * SOLAR \ * TT111 \ * TT22 \ * TT23 \ * TT24 \ * TT25 \ * TT54 \ * TT81 \ * ypl \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.K5 SKIP 0 \ Temporary storage used to store segment coordinates \ across successive calls to BLINE, the ball line \ routine \ \ [Show more]
\ \ This variable is used by the following: \ \ * BLINE \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.XX18 SKIP 0 \ Temporary storage used to store coordinates in the \ LL9 ship-drawing routine \ \ [Show more]
\ \ This variable is used by the following: \ \ * LL9 (Part 3 of 12) \ * LL9 (Part 5 of 12) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ17 SKIP 1 \ Contains a number of flags that affect how text tokens \ are printed, particularly capitalisation: \ \ * If all bits are set (255) then text printing is \ disabled \ \ * Bit 7: 0 = ALL CAPS \ 1 = Sentence Case, bit 6 determines the \ case of the next letter to print \ \ * Bit 6: 0 = print the next letter in upper case \ 1 = print the next letter in lower case \ \ * Bits 0-5: If any of bits 0-5 are set, print in \ lower case \ \ So: \ \ * QQ17 = 0 means case is set to ALL CAPS \ \ * QQ17 = %10000000 means Sentence Case, currently \ printing upper case \ \ * QQ17 = %11000000 means Sentence Case, currently \ printing lower case \ \ * QQ17 = %11111111 means printing is disabled \ \ [Show more]
\ \ This variable is used by the following: \ \ * EQSHP \ * hyp \ * MESS \ * TITLE \ * TT102 \ * TT167 \ * TT210 \ * TT219 \ * TT23 \ * TT25 \ * TT26 \ * TT27 \ * TT41 \ * TT46 \ * TT69 \ * TTX66 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ19 SKIP 3 \ Temporary storage, used in a number of places \ \ [Show more]
\ \ This variable is used by the following: \ \ * cpl \ * GVL \ * SIGHT \ * TT103 \ * TT105 \ * TT111 \ * TT123 \ * TT128 \ * TT14 \ * TT15 \ * TT151 \ * TT152 \ * TT16 \ * TT210 \ * TT22 \ * TT25 \ * var \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.K6 SKIP 5 \ Temporary storage, typically used for storing \ coordinates during vector calculations \ \ [Show more]
\ \ This variable is used by the following: \ \ * BLINE \ * CIRCLE2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.ALP1 SKIP 1 \ Magnitude of the roll angle alpha, i.e. |alpha|, \ which is a positive value between 0 and 31 \ \ [Show more]
\ \ This variable is used by the following: \ \ * DIALS (Part 2 of 4) \ * Main flight loop (Part 2 of 16) \ * MLS1 \ * MUT3 \ * MVEIT (Part 5 of 9) \ * RES2 \ * STARS2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.ALP2 SKIP 2 \ Bit 7 of ALP2 = sign of the roll angle in ALPHA \ \ Bit 7 of ALP2+1 = opposite sign to ALP2 and ALPHA \ \ [Show more]
\ \ This variable is used by the following: \ \ * DIALS (Part 2 of 4) \ * Main flight loop (Part 2 of 16) \ * MVEIT (Part 5 of 9) \ * RES2 \ * STARS1 \ * STARS2 \ * STARS6 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.BET2 SKIP 2 \ Bit 7 of BET2 = sign of the pitch angle in BETA \ \ Bit 7 of BET2+1 = opposite sign to BET2 and BETA \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 2 of 16) \ * MVEIT (Part 5 of 9) \ * RES2 \ * STARS1 \ * STARS2 \ * STARS6 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.DELTA SKIP 1 \ Our current speed, in the range 1-40 \ \ [Show more]
\ \ This variable is used by the following: \ \ * DEATH \ * DIALS (Part 1 of 4) \ * DV41 \ * FRS1 \ * Main flight loop (Part 3 of 16) \ * Main flight loop (Part 9 of 16) \ * Main flight loop (Part 10 of 16) \ * MVEIT (Part 6 of 9) \ * RES2 \ * TITLE \ * TT110 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.DELT4 SKIP 2 \ Our current speed * 64 as a 16-bit value \ \ This is stored as DELT4(1 0), so the high byte in \ DELT4+1 therefore contains our current speed / 4 \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ * STARS1 \ * STARS6 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.U SKIP 1 \ Temporary storage, used in a number of places \ \ [Show more]
\ \ This variable is used by the following: \ \ * ADD \ * BPRNT \ * csh \ * DOEXP \ * LL61 \ * LL62 \ * LL9 (Part 6 of 12) \ * LL9 (Part 7 of 12) \ * LL9 (Part 8 of 12) \ * LL9 (Part 9 of 12) \ * LL9 (Part 11 of 12) \ * TAS1 \ * TT11 \ * TT111 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
SKIP 16 \ These bytes appear to be unused .Q SKIP 1 \ Temporary storage, used in a number of places \ \ [Show more]
\ \ This variable is used by the following: \ \ * ARCTAN \ * DIALS (Part 3 of 4) \ * DIL2 \ * DILX \ * DOEXP \ * DV41 \ * DVID3B2 \ * DVID4 \ * DVIDT \ * EQSHP \ * FMLTU \ * FMLTU2 \ * gnum \ * LL120 \ * LL123 \ * LL129 \ * LL145 (Part 3 of 4) \ * LL28 \ * LL38 \ * LL5 \ * LL51 \ * LL61 \ * LL9 (Part 3 of 12) \ * LL9 (Part 5 of 12) \ * LL9 (Part 8 of 12) \ * LL9 (Part 10 of 12) \ * LOIN (Part 1 of 7) \ * LOIN (Part 2 of 7) \ * LOIN (Part 3 of 7) \ * LOIN (Part 4 of 7) \ * LOIN (Part 5 of 7) \ * Main flight loop (Part 15 of 16) \ * MLTU2 \ * MULT1 \ * MULT3 \ * MULTU \ * MV40 \ * MVEIT (Part 3 of 9) \ * MVS4 \ * MVS5 \ * NORM \ * SPS2 \ * STARS1 \ * STARS2 \ * STARS6 \ * TAS3 \ * TIDY \ * TIS1 \ * TIS2 \ * TIS3 \ * TT111 \ * TT210 \ * TT219 \ * TT24 \ * Unused duplicate of MULTU \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.R SKIP 1 \ Temporary storage, used in a number of places \ \ [Show more]
\ \ This variable is used by the following: \ \ * ADD \ * ARCTAN \ * DIALS (Part 2 of 4) \ * DILX \ * DOEXP \ * DVID3B2 \ * gnum \ * HITCH \ * LL118 \ * LL120 \ * LL123 \ * LL129 \ * LL145 (Part 4 of 4) \ * LL28 \ * LL38 \ * LL5 \ * LL51 \ * LL61 \ * LL62 \ * LL9 (Part 3 of 12) \ * LL9 (Part 5 of 12) \ * LL9 (Part 8 of 12) \ * LOIN (Part 2 of 7) \ * LOIN (Part 3 of 7) \ * LOIN (Part 4 of 7) \ * LOIN (Part 5 of 7) \ * LOIN (Part 6 of 7) \ * LOIN (Part 7 of 7) \ * Main flight loop (Part 15 of 16) \ * MAS3 \ * MLS2 \ * MULT12 \ * MULT3 \ * MUT1 \ * MVEIT (Part 3 of 9) \ * MVEIT (Part 6 of 9) \ * MVS4 \ * MVS5 \ * MVT1 \ * NORM \ * SFS2 \ * STARS1 \ * STARS2 \ * STARS6 \ * TAS3 \ * TT111 \ * TT219 \ * WARP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.S SKIP 1 \ Temporary storage, used in a number of places \ \ [Show more]
\ \ This variable is used by the following: \ \ * ADD \ * BPRNT \ * DIALS (Part 2 of 4) \ * DOEXP \ * DVID3B2 \ * gnum \ * HITCH \ * LL118 \ * LL120 \ * LL123 \ * LL129 \ * LL145 (Part 3 of 4) \ * LL145 (Part 4 of 4) \ * LL38 \ * LL5 \ * LL51 \ * LL61 \ * LL9 (Part 5 of 12) \ * LOIN (Part 1 of 7) \ * LOIN (Part 3 of 7) \ * LOIN (Part 4 of 7) \ * LOIN (Part 6 of 7) \ * LOIN (Part 7 of 7) \ * MLS2 \ * MULT12 \ * MUT2 \ * MVS4 \ * MVS5 \ * MVT1 \ * MVT3 \ * STARS1 \ * STARS2 \ * STARS6 \ * TAS3 \ * TT111 \ * WARP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.XSAV SKIP 1 \ Temporary storage for saving the value of the X \ register, used in a number of places \ \ [Show more]
\ \ This variable is used by the following: \ \ * KS1 \ * Main flight loop (Part 4 of 16) \ * Main flight loop (Part 11 of 16) \ * Main flight loop (Part 12 of 16) \ * MVEIT (Part 1 of 9) \ * MVEIT (Part 2 of 9) \ * TT22 \ * WPSHPS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.YSAV SKIP 1 \ Temporary storage for saving the value of the Y \ register, used in a number of places \ \ [Show more]
\ \ This variable is used by the following: \ \ * LOIN (Part 1 of 7) \ * LOIN (Part 3 of 7) \ * LOIN (Part 4 of 7) \ * LOIN (Part 6 of 7) \ * LOIN (Part 7 of 7) \ * TT217 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.XX17 SKIP 1 \ Temporary storage, used in BPRNT to store the number \ of characters to print, and as the edge counter in the \ main ship-drawing routine \ \ [Show more]
\ \ This variable is used by the following: \ \ * BPRNT \ * LL9 (Part 5 of 12) \ * LL9 (Part 6 of 12) \ * LL9 (Part 8 of 12) \ * LL9 (Part 9 of 12) \ * LL9 (Part 10 of 12) \ * LL9 (Part 11 of 12) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ11 SKIP 1 \ The type of the current view: \ \ 0 = Space view \ 1 = Title screen \ Get commander name ("@", save/load commander) \ In-system jump just arrived ("J") \ Data on System screen (FUNC-7) \ Buy Cargo screen (FUNC-2) \ 4 = Sell Cargo screen (FUNC-3) \ 6 = Death screen \ 8 = Status Mode screen (FUNC-9) \ Inventory screen (FUNC-0) \ 16 = Market Price screen (FUNC-8) \ 32 = Equip Ship screen (FUNC-4) \ 64 = Long-range Chart (FUNC-5) \ 128 = Short-range Chart (FUNC-6) \ \ This value is typically set by calling routine TT66 \ \ [Show more]
\ \ This variable is used by the following: \ \ * DEATH \ * DK4 \ * hm \ * LASLI \ * LOOK1 \ * Main flight loop (Part 11 of 16) \ * Main flight loop (Part 16 of 16) \ * Main game loop (Part 5 of 6) \ * NWSTARS \ * QU5 \ * TITLE \ * TT102 \ * TT103 \ * TT14 \ * TT15 \ * TT18 \ * TT210 \ * TT66 \ * TTX66 \ * WARP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.ZZ SKIP 1 \ Temporary storage, typically used for distance values \ \ [Show more]
\ \ This variable is used by the following: \ \ * DOEXP \ * FLIP \ * nWq \ * PIXEL \ * STARS1 \ * STARS2 \ * STARS6 \ * TT22 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.XX13 SKIP 1 \ Temporary storage, typically used in the line-drawing \ routines \ \ [Show more]
\ \ This variable is used by the following: \ \ * BLINE \ * EQSHP \ * LL145 (Part 1 of 4) \ * LL145 (Part 2 of 4) \ * LL145 (Part 4 of 4) \ * Main game loop (Part 4 of 6) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.MCNT SKIP 1 \ The main loop counter \ \ This counter determines how often certain actions are \ performed within the main loop. See the deep dive on \ "Scheduling tasks with the main loop counter" for more \ details \ \ [Show more]
\ \ This variable is used by the following: \ \ * DEATH \ * DIALS (Part 3 of 4) \ * EQSHP \ * Main flight loop (Part 13 of 16) \ * Main flight loop (Part 14 of 16) \ * Main flight loop (Part 15 of 16) \ * Main game loop (Part 2 of 6) \ * MVEIT (Part 1 of 9) \ * MVEIT (Part 2 of 9) \ * RES2 \ * TITLE \ * WARP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
SKIP 1 \ This byte is unused in this version of Elite (it \ is used to store the delay counter in the other \ versions) .TYPE SKIP 1 \ The current ship type \ \ This is where we store the current ship type for when \ we are iterating through the ships in the local bubble \ as part of the main flight loop. See the table at XX21 \ for information about ship types \ \ [Show more]
\ \ This variable is used by the following: \ \ * HITCH \ * LL9 (Part 1 of 12) \ * Main flight loop (Part 4 of 16) \ * Main flight loop (Part 7 of 16) \ * Main flight loop (Part 11 of 16) \ * Main flight loop (Part 12 of 16) \ * MVEIT (Part 2 of 9) \ * PLANET \ * SCAN \ * SFS1 \ * TACTICS (Part 4 of 7) \ * TACTICS (Part 5 of 7) \ * TACTICS (Part 7 of 7) \ * TITLE \ * WPSHPS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.JSTX SKIP 1 \ Our current roll rate \ \ This value is shown in the dashboard's RL indicator, \ and determines the rate at which we are rolling \ \ The value ranges from 1 to 255 with 128 as the centre \ point, so 1 means roll is decreasing at the maximum \ rate, 128 means roll is not changing, and 255 means \ roll is increasing at the maximum rate \ \ This value is updated by "<" and ">" key presses. If \ keyboard damping is enabled (which it is by default), \ the value is slowly moved towards the centre value of \ 128 (no roll) if there are no key presses \ \ [Show more]
\ \ This variable is used by the following: \ \ * DOKEY \ * Main flight loop (Part 2 of 16) \ * TT17 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.JSTY SKIP 1 \ Our current pitch rate \ \ This value is shown in the dashboard's DC indicator, \ and determines the rate at which we are pitching \ \ The value ranges from 1 to 255 with 128 as the centre \ point, so 1 means pitch is decreasing at the maximum \ rate, 128 means pitch is not changing, and 255 means \ pitch is increasing at the maximum rate \ \ This value is updated by "S" and "X" key presses. If \ keyboard damping is enabled (which it is by default), \ the value is slowly moved towards the centre value of \ 128 (no pitch) if there are no key presses \ \ [Show more]
\ \ This variable is used by the following: \ \ * DOKEY \ * Main flight loop (Part 2 of 16) \ * RES2 \ * TT17 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.ALPHA SKIP 1 \ The current roll angle alpha, which is reduced from \ JSTX to a sign-magnitude value between -31 and +31 \ \ This describes how fast we are rolling our ship, and \ determines how fast the universe rolls around us \ \ The sign bit is also stored in ALP2, while the \ opposite sign is stored in ALP2+1 \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 2 of 16) \ * MV40 \ * MVS4 \ * RES2 \ * STARS2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ12 SKIP 1 \ Our "docked" status \ \ * 0 = we are not docked \ \ * &FF = we are docked \ \ [Show more]
\ \ This variable is used by the following: \ \ * BAY \ * hyp \ * Main game loop (Part 6 of 6) \ * RESET \ * STATUS \ * TT102 \ * TT110 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.TGT SKIP 1 \ Temporary storage, typically used as a target value \ for counters when drawing explosion clouds and partial \ circles \ \ [Show more]
\ \ This variable is used by the following: \ \ * DOEXP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.SWAP SKIP 1 \ 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) \ \ [Show more]
\ \ This variable is used by the following: \ \ * BLINE \ * LL145 (Part 1 of 4) \ * LL145 (Part 4 of 4) \ * LOIN (Part 1 of 7) \ * LOIN (Part 2 of 7) \ * LOIN (Part 3 of 7) \ * LOIN (Part 4 of 7) \ * LOIN (Part 5 of 7) \ * LOIN (Part 6 of 7) \ * LOIN (Part 7 of 7) \ * WPLS2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
SKIP 1 \ This byte is unused in this version of Elite (it \ is used to store colour information when drawing \ pixels in the dashboard, and the Electron's dashboard \ is monochrome) .FLAG SKIP 1 \ 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 \ \ [Show more]
\ \ This variable is used by the following: \ \ * BLINE \ * CIRCLE2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.CNT SKIP 1 \ Temporary storage, typically used for storing the \ number of iterations required when looping \ \ [Show more]
\ \ This variable is used by the following: \ \ * BLINE \ * CIRCLE2 \ * DOEXP \ * LL9 (Part 6 of 12) \ * LL9 (Part 8 of 12) \ * Main flight loop (Part 11 of 16) \ * STATUS \ * TACTICS (Part 3 of 7) \ * TACTICS (Part 6 of 7) \ * TACTICS (Part 7 of 7) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.CNT2 SKIP 1 \ Temporary storage, used in the planet-drawing routine \ to store the segment number where the arc of a partial \ circle should start .STP SKIP 1 \ The step size for drawing circles \ \ Circles in Elite are split up into 64 points, and the \ step size determines how many points to skip with each \ straight-line segment, so the smaller the step size, \ the smoother the circle. The values used are: \ \ * 2 for big planets and the circles on the charts \ * 4 for medium planets and the launch tunnel \ * 8 for small planets and the hyperspace tunnel \ \ As the step size increases we move from smoother \ circles at the top to more polygonal at the bottom. \ See the CIRCLE2 routine for more details \ \ [Show more]
\ \ This variable is used by the following: \ \ * BLINE \ * CIRCLE \ * HFS2 \ * TT128 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.XX4 SKIP 1 \ Temporary storage, used in a number of places \ \ [Show more]
\ \ This variable is used by the following: \ \ * GVL \ * HFS2 \ * KILLSHP \ * KS2 \ * LL9 (Part 1 of 12) \ * LL9 (Part 2 of 12) \ * LL9 (Part 4 of 12) \ * LL9 (Part 5 of 12) \ * LL9 (Part 6 of 12) \ * LL9 (Part 10 of 12) \ * STATUS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.XX20 SKIP 1 \ Temporary storage, used in a number of places \ \ [Show more]
\ \ This variable is used by the following: \ \ * LL9 (Part 5 of 12) \ * LL9 (Part 6 of 12) \ * LL9 (Part 8 of 12) \ * LL9 (Part 9 of 12) \ * LL9 (Part 11 of 12) \ * LL9 (Part 12 of 12) \ * TT23 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.XX14 SKIP 1 \ This byte appears to be unused .RAT SKIP 1 \ Used to store different signs depending on the current \ space view, for use in calculating stardust movement \ \ [Show more]
\ \ This variable is used by the following: \ \ * PLUT \ * STARS2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.RAT2 SKIP 1 \ Temporary storage, used to store the pitch and roll \ signs when moving objects and stardust \ \ [Show more]
\ \ This variable is used by the following: \ \ * MVEIT (Part 8 of 9) \ * MVS5 \ * PLUT \ * STARS2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.K2 SKIP 4 \ Temporary storage, used in a number of places \ \ [Show more]
\ \ This variable is used by the following: \ \ * MV40 \ * MVEIT (Part 5 of 9) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
ORG &00D1 .T SKIP 1 \ Temporary storage, used in a number of places \ \ [Show more]
\ \ This variable is used by the following: \ \ * ADD \ * ARCTAN \ * BLINE \ * BPRNT \ * BUMP2 \ * CIRCLE2 \ * cpl \ * DKS3 \ * DOEXP \ * DVID3B2 \ * DVIDT \ * EXNO \ * gnum \ * KILLSHP \ * LL120 \ * LL123 \ * LL145 (Part 3 of 4) \ * LL5 \ * LL51 \ * LL9 (Part 2 of 12) \ * LL9 (Part 5 of 12) \ * LL9 (Part 6 of 12) \ * LL9 (Part 7 of 12) \ * LL9 (Part 8 of 12) \ * Main game loop (Part 3 of 6) \ * MLS1 \ * MSBAR \ * MU11 \ * MULT1 \ * MULT3 \ * MV40 \ * MVS5 \ * MVT1 \ * MVT3 \ * NORM \ * NWSHP \ * OOPS \ * PIXEL2 \ * REDU2 \ * SP2 \ * STARS1 \ * STARS6 \ * TACTICS (Part 5 of 7) \ * TIS1 \ * TIS2 \ * TT102 \ * TT111 \ * Unused duplicate of MULTU \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.K3 SKIP 0 \ Temporary storage, used in a number of places \ \ [Show more]
\ \ This variable is used by the following: \ \ * CHKON \ * CIRCLE2 \ * DOEXP \ * HFS2 \ * PROJ \ * SHPPT \ * SPS3 \ * SPS4 \ * TACTICS (Part 1 of 7) \ * TACTICS (Part 3 of 7) \ * TAS1 \ * TAS2 \ * TT128 \ * TT26 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.XX2 SKIP 14 \ Temporary storage, used to store the visibility of the \ ship's faces during the ship-drawing routine at LL9 \ \ [Show more]
\ \ This variable is used by the following: \ \ * LL9 (Part 3 of 12) \ * LL9 (Part 4 of 12) \ * LL9 (Part 5 of 12) \ * LL9 (Part 6 of 12) \ * LL9 (Part 10 of 12) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.K4 SKIP 2 \ Temporary storage, used in a number of places \ \ [Show more]
\ \ This variable is used by the following: \ \ * BLINE \ * CHKON \ * HFS2 \ * PROJ \ * SHPPT \ * TT128 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
PRINT "Zero page variables from ", ~ZP, " to ", ~P%
Name: XX3 [Show more] Type: Workspace Address: &0100 to the top of the descending stack Category: Workspaces Summary: Temporary storage space for complex calculations
Context: See this workspace on its own page References: This workspace is used as follows: * DOEXP uses XX3 * LL62 uses XX3 * LL9 (Part 2 of 12) uses XX3 * LL9 (Part 8 of 12) uses XX3 * LL9 (Part 9 of 12) uses XX3 * LL9 (Part 10 of 12) uses XX3 * SFS1 uses XX3

Used as heap space for storing temporary data during calculations. Shared with the descending 6502 stack, which works down from &01FF.
ORG &0100 .XX3 SKIP 256 \ Temporary storage, typically used for storing tables \ of values such as screen coordinates or ship data \ \ [Show more]
\ \ This variable is used by the following: \ \ * DOEXP \ * LL62 \ * LL9 (Part 2 of 12) \ * LL9 (Part 8 of 12) \ * LL9 (Part 9 of 12) \ * LL9 (Part 10 of 12) \ * SFS1 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
Name: T% [Show more] Type: Workspace Address: &0300 to &036C Category: Workspaces Summary: Current commander data and stardust data blocks
Context: See this workspace on its own page Variations: See code variations for this workspace in the different versions References: No direct references to this workspace in this source file

Contains the current commander data (NT% bytes at location TP), and the stardust data blocks (NOST bytes at location SX)
ORG &0300 .T% SKIP 0 \ The start of the T% workspace .TP SKIP 1 \ The current mission status, which is always 0 for the \ cassette version of Elite as there are no missions \ \ [Show more]
\ \ This variable is used by the following: \ \ * QU5 \ * SVE \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ0 SKIP 1 \ The current system's galactic x-coordinate (0-256) \ \ [Show more]
\ \ This variable is used by the following: \ \ * jmp \ * ping \ * TT105 \ * TT111 \ * TT14 \ * TT23 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ1 SKIP 1 \ The current system's galactic y-coordinate (0-256) \ \ [Show more]
\ \ This variable is used by the following: \ \ * jmp \ * TT105 \ * TT111 \ * TT14 \ * TT23 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ21 SKIP 6 \ The three 16-bit seeds for the current galaxy \ \ These seeds define system 0 in the current galaxy, so \ they can be used as a starting point to generate all \ 256 systems in the galaxy \ \ Using a galactic hyperdrive rotates each byte to the \ left (rolling each byte within itself) to get the \ seeds for the next galaxy, so after eight galactic \ jumps, the seeds roll around to the first galaxy again \ \ See the deep dives on "Galaxy and system seeds" and \ "Twisting the system seeds" for more details \ \ [Show more]
\ \ This variable is used by the following: \ \ * Ghy \ * TT81 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.CASH SKIP 4 \ Our current cash pot \ \ The cash stash is stored as a 32-bit unsigned integer, \ with the most significant byte in CASH and the least \ significant in CASH+3. This is big-endian, which is \ the opposite way round to most of the numbers used in \ Elite - to use our notation for multi-byte numbers, \ the amount of cash is CASH(0 1 2 3) \ \ [Show more]
\ \ This variable is used by the following: \ \ * csh \ * LCASH \ * MCASH \ * SVE \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ14 SKIP 1 \ Our current fuel level (0-70) \ \ The fuel level is stored as the number of light years \ multiplied by 10, so QQ14 = 1 represents 0.1 light \ years, and the maximum possible value is 70, for 7.0 \ light years \ \ [Show more]
\ \ This variable is used by the following: \ \ * DIALS (Part 4 of 4) \ * EQSHP \ * ESCAPE \ * fwl \ * hyp \ * TT14 \ * TT18 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.COK SKIP 1 \ Flags used to generate the competition code \ \ See the deep dive on "The competition code" for \ details of these flags and how they are used in \ generating and decoding the competition code \ \ [Show more]
\ \ This variable is used by the following: \ \ * QU5 \ * SVE \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.GCNT SKIP 1 \ The number of the current galaxy (0-7) \ \ When this is displayed in-game, 1 is added to the \ number, so we start in galaxy 1 in-game, but it's \ stored as galaxy 0 internally \ \ The galaxy number increases by one every time a \ galactic hyperdrive is used, and wraps back around to \ the start after eight galaxies \ \ [Show more]
\ \ This variable is used by the following: \ \ * Ghy \ * tal \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.LASER SKIP 4 \ The specifications of the lasers fitted to each of the \ four space views: \ \ * Byte #0 = front view \ * Byte #1 = rear view \ * Byte #2 = left view \ * Byte #3 = right view \ \ For each of the views: \ \ * 0 = no laser is fitted to this view \ \ * Non-zero = a laser is fitted to this view, with \ the following specification: \ \ * Bits 0-6 contain the laser's power \ \ * Bit 7 determines whether or not the laser pulses \ (0 = pulse laser) or is always on (1 = beam \ laser) \ \ [Show more]
\ \ This variable is used by the following: \ \ * EQSHP \ * Main flight loop (Part 3 of 16) \ * SIGHT \ * STATUS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
SKIP 2 \ These bytes appear to be unused (they were originally \ used for up/down lasers, but they were dropped) .CRGO SKIP 1 \ Our ship's cargo capacity \ \ * 22 = standard cargo bay of 20 tonnes \ \ * 37 = large cargo bay of 35 tonnes \ \ The value is two greater than the actual capacity to \ make the maths in tnpr slightly more efficient \ \ [Show more]
\ \ This variable is used by the following: \ \ * EQSHP \ * tnpr \ * TT213 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ20 SKIP 17 \ The contents of our cargo hold \ \ The amount of market item X that we have in our hold \ can be found in the X-th byte of QQ20. For example: \ \ * QQ20 contains the amount of food (item 0) \ \ * QQ20+7 contains the amount of computers (item 7) \ \ See QQ23 for a list of market item numbers and their \ storage units \ \ [Show more]
\ \ This variable is used by the following: \ \ * BAD \ * ESCAPE \ * Main flight loop (Part 8 of 16) \ * OUCH \ * tnpr \ * TT210 \ * TT219 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.ECM SKIP 1 \ E.C.M. system \ \ * 0 = not fitted \ \ * &FF = fitted \ \ [Show more]
\ \ This variable is used by the following: \ \ * EQSHP \ * Main flight loop (Part 3 of 16) \ * STATUS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.BST SKIP 1 \ Fuel scoops (BST stands for "barrel status") \ \ * 0 = not fitted \ \ * &FF = fitted \ \ [Show more]
\ \ This variable is used by the following: \ \ * EQSHP \ * Main flight loop (Part 7 of 16) \ * STATUS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.BOMB SKIP 1 \ Energy bomb \ \ * 0 = not fitted \ \ * &7F = fitted \ \ [Show more]
\ \ This variable is used by the following: \ \ * EQSHP \ * Main flight loop (Part 3 of 16) \ * Main flight loop (Part 5 of 16) \ * Main flight loop (Part 13 of 16) \ * STATUS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.ENGY SKIP 1 \ Energy unit \ \ * 0 = not fitted \ \ * Non-zero = fitted \ \ The actual value determines the refresh rate of our \ energy banks, as they refresh by ENGY+1 each time (so \ our ship's energy level goes up by 2 each time if we \ have an energy unit fitted, otherwise it goes up by 1) \ \ The enhanced versions of Elite set ENGY to 2 as the \ reward for completing mission 2, where we receive a \ special naval energy unit that recharges at a fast \ rate than a standard energy unit, i.e. by 3 each time \ \ [Show more]
\ \ This variable is used by the following: \ \ * EQSHP \ * Main flight loop (Part 13 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.DKCMP SKIP 1 \ Docking computer \ \ * 0 = not fitted \ \ * &FF = fitted \ \ [Show more]
\ \ This variable is used by the following: \ \ * EQSHP \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.GHYP SKIP 1 \ Galactic hyperdrive \ \ * 0 = not fitted \ \ * &FF = fitted \ \ [Show more]
\ \ This variable is used by the following: \ \ * EQSHP \ * Ghy \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.ESCP SKIP 1 \ Escape pod \ \ * 0 = not fitted \ \ * &FF = fitted \ \ [Show more]
\ \ This variable is used by the following: \ \ * EQSHP \ * ESCAPE \ * Main flight loop (Part 3 of 16) \ * STATUS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
SKIP 4 \ These bytes appear to be unused .NOMSL SKIP 1 \ The number of missiles we have fitted (0-4) \ \ [Show more]
\ \ This variable is used by the following: \ \ * ABORT2 \ * EQSHP \ * FRMIS \ * Main flight loop (Part 3 of 16) \ * msblob \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.FIST SKIP 1 \ Our legal status (FIST stands for "fugitive/innocent \ status"): \ \ * 0 = Clean \ \ * 1-49 = Offender \ \ * 50+ = Fugitive \ \ You get 64 points if you kill a cop, so that's a fast \ ticket to fugitive status \ \ [Show more]
\ \ This variable is used by the following: \ \ * ESCAPE \ * Ghy \ * Main flight loop (Part 12 of 16) \ * Main game loop (Part 3 of 6) \ * SOLAR \ * STATUS \ * TT110 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.AVL SKIP 17 \ Market availability in the current system \ \ The available amount of market item X is stored in \ the X-th byte of AVL, so for example: \ \ * AVL contains the amount of food (item 0) \ \ * AVL+7 contains the amount of computers (item 7) \ \ See QQ23 for a list of market item numbers and their \ storage units, and the deep dive on "Market item \ prices and availability" for details of the algorithm \ used for calculating each item's availability \ \ [Show more]
\ \ This variable is used by the following: \ \ * GVL \ * TT151 \ * TT219 \ * var \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ26 SKIP 1 \ A random value used to randomise market data \ \ This value is set to a new random number for each \ change of system, so we can add a random factor into \ the calculations for market prices (for details of how \ this is used, see the deep dive on "Market prices") \ \ [Show more]
\ \ This variable is used by the following: \ \ * GVL \ * TT151 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.TALLY SKIP 2 \ Our combat rank \ \ The combat rank is stored as the number of kills, in a \ 16-bit number TALLY(1 0) - so the high byte is in \ TALLY+1 and the low byte in TALLY \ \ If the high byte in TALLY+1 is 0 then we have between \ 0 and 255 kills, so our rank is Harmless, Mostly \ Harmless, Poor, Average or Above Average, according to \ the value of the low byte in TALLY: \ \ Harmless = %00000000 to %00000011 = 0 to 3 \ Mostly Harmless = %00000100 to %00000111 = 4 to 7 \ Poor = %00001000 to %00001111 = 8 to 15 \ Average = %00010000 to %00011111 = 16 to 31 \ Above Average = %00100000 to %11111111 = 32 to 255 \ \ If the high byte in TALLY+1 is non-zero then we are \ Competent, Dangerous, Deadly or Elite, according to \ the high byte in TALLY+1: \ \ Competent = 1 = 256 to 511 kills \ Dangerous = 2 to 9 = 512 to 2559 kills \ Deadly = 10 to 24 = 2560 to 6399 kills \ Elite = 25 and up = 6400 kills and up \ \ You can see the rating calculation in the STATUS \ subroutine \ \ [Show more]
\ \ This variable is used by the following: \ \ * EXNO2 \ * STATUS \ * SVE \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.SVC SKIP 1 \ The save count \ \ When a new commander is created, the save count gets \ set to 128. This value gets halved each time the \ commander file is saved, but it is otherwise unused. \ It is presumably part of the security system for the \ competition, possibly another flag to catch out \ entries with manually altered commander files \ \ [Show more]
\ \ This variable is used by the following: \ \ * SVE \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
SKIP 2 \ The commander file checksum \ \ These two bytes are reserved for the commander file \ checksum, so when the current commander block is \ copied from here to the last saved commander block at \ NA%, CHK and CHK2 get overwritten NT% = SVC + 2 - TP \ This sets the variable NT% to the size of the current \ commander data block, which starts at TP and ends at \ SVC+2 (inclusive) .SX SKIP NOST + 1 \ This is where we store the x_hi coordinates for all \ the stardust particles \ \ [Show more]
\ \ This variable is used by the following: \ \ * FLIP \ * nWq \ * STARS1 \ * STARS2 \ * STARS6 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.SXL SKIP NOST + 1 \ This is where we store the x_lo coordinates for all \ the stardust particles \ \ [Show more]
\ \ This variable is used by the following: \ \ * STARS1 \ * STARS2 \ * STARS6 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.SY SKIP NOST + 1 \ This is where we store the y_hi coordinates for all \ the stardust particles \ \ [Show more]
\ \ This variable is used by the following: \ \ * FLIP \ * MLU1 \ * nWq \ * STARS1 \ * STARS2 \ * STARS6 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
PRINT "T% workspace from ", ~T%, " to ", ~P%
Name: K% [Show more] Type: Workspace Address: &0900 to &0D3F Category: Workspaces Summary: Ship data blocks and ship line heaps Deep dive: Ship data blocks The local bubble of universe
Context: See this workspace on its own page Variations: See code variations for this workspace in the different versions References: This workspace is used as follows: * ANGRY uses K% * DOEXP uses K% * Main flight loop (Part 1 of 16) uses K% * Main flight loop (Part 3 of 16) uses K% * Main flight loop (Part 9 of 16) uses K% * Main flight loop (Part 14 of 16) uses K% * MAS2 uses K% * MAS3 uses K% * SPS3 uses K% * SPS4 uses K% * UNIV uses K% * WARP uses K%

Contains ship data for all the ships, planets and space stations in our local bubble of universe, along with their corresponding ship line heaps. The blocks are pointed to by the lookup table at location UNIV. The first 432 bytes of the K% workspace hold ship data on up to 12 ships, with 36 (NI%) bytes per ship, and the ship line heap grows downwards from WP at the end of the K% workspace. See the deep dive on "Ship data blocks" for details on ship data blocks, and the deep dive on "The local bubble of universe" for details of how Elite stores the local universe in K%, FRIN and UNIV.
ORG &0900 .K% SKIP NOSH * NI% \ Ship data blocks and ship line heap \ \ [Show more]
\ \ This variable is used by the following: \ \ * ANGRY \ * DOEXP \ * Main flight loop (Part 1 of 16) \ * Main flight loop (Part 3 of 16) \ * Main flight loop (Part 9 of 16) \ * Main flight loop (Part 14 of 16) \ * MAS2 \ * MAS3 \ * SPS3 \ * SPS4 \ * UNIV \ * WARP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
Name: WP [Show more] Type: Workspace Address: &0BE0 to &0CF3 Category: Workspaces Summary: Ship slots, variables
Context: See this workspace on its own page Variations: See code variations for this workspace in the different versions References: This workspace is used as follows: * RES2 uses WP
ORG &0BE0 .WP SKIP 0 \ The start of the WP workspace \ \ [Show more]
\ \ This variable is used by the following: \ \ * RES2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.FRIN SKIP NOSH + 1 \ Slots for the ships in the local bubble of universe \ \ There are #NOSH + 1 slots, but the ship-spawning \ routine at NWSHP only populates #NOSH of them, so \ there are 13 slots but only 12 are used for ships \ (the last slot is effectively used as a null \ terminator when shuffling the slots down in the \ KILLSHP routine) \ \ See the deep dive on "The local bubble of universe" \ for details of how Elite stores the local universe in \ FRIN, UNIV and K% \ \ [Show more]
\ \ This variable is used by the following: \ \ * DEATH \ * FRMIS \ * KILLSHP \ * KS2 \ * KS4 \ * Main flight loop (Part 4 of 16) \ * NWSHP \ * NWSPS \ * STATUS \ * WARP \ * WPSHPS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.LAS2 SKIP 0 \ Laser power for the current laser \ \ * Bits 0-6 contain the laser power of the current \ space view \ \ * Bit 7 denotes whether or not the laser pulses: \ \ * 0 = pulsing laser \ \ * 1 = beam laser (i.e. always on) \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ * Main flight loop (Part 16 of 16) \ * TTX66 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.MANY SKIP SST \ The number of ships of each type in the local bubble \ of universe \ \ The number of ships of type X in the local bubble is \ stored at MANY+X \ \ See the deep dive on "Ship blueprints" for a list of \ ship types \ \ [Show more]
\ \ This variable is used by the following: \ \ * KILLSHP \ * Main game loop (Part 2 of 6) \ * Main game loop (Part 3 of 6) \ * NWSHP \ * STATUS \ * TACTICS (Part 2 of 7) \ * WARP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.SSPR SKIP NTY + 1 - SST \ "Space station present" flag \ \ * Non-zero if we are inside the space station's safe \ zone \ \ * 0 if we aren't \ \ This flag is at MANY+SST, which is no coincidence, as \ MANY+SST is a count of how many space stations there \ are in our local bubble, which is the same as saying \ "space station present" \ \ [Show more]
\ \ This variable is used by the following: \ \ * COMPAS \ * KS4 \ * Main flight loop (Part 3 of 16) \ * Main flight loop (Part 14 of 16) \ * Main game loop (Part 2 of 6) \ * Main game loop (Part 3 of 6) \ * RES2 \ * TACTICS (Part 2 of 7) \ * WARP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
SKIP 2 \ These bytes appear to be unused .SFXPR SKIP 1 \ The priority of the current sound on channel 0 \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 1 of 16) \ * NO3 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
SKIP 1 \ The priority of the current sound on channel 1 .SFXDU SKIP 1 \ The duration counter of the current sound on channel 0 \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 1 of 16) \ * NO3 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
SKIP 1 \ The duration counter of the current sound on channel 1 .ECMP SKIP 1 \ Our E.C.M. status \ \ * 0 = E.C.M. is off \ \ * Non-zero = E.C.M. is on \ \ [Show more]
\ \ This variable is used by the following: \ \ * ECMOF \ * Main flight loop (Part 3 of 16) \ * Main flight loop (Part 16 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.MSAR SKIP 1 \ The targeting state of our leftmost missile \ \ * 0 = missile is not looking for a target, or it \ already has a target lock (indicator is either a \ white square, or a white square containing a "T") \ \ * Non-zero = missile is currently looking for a \ target (indicator is a black box in a white \ square) \ \ [Show more]
\ \ This variable is used by the following: \ \ * ABORT2 \ * Main flight loop (Part 3 of 16) \ * Main flight loop (Part 11 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.VIEW SKIP 1 \ The number of the current space view \ \ * 0 = front \ * 1 = rear \ * 2 = left \ * 3 = right \ \ [Show more]
\ \ This variable is used by the following: \ \ * LOOK1 \ * Main flight loop (Part 3 of 16) \ * PLUT \ * SIGHT \ * STARS \ * TTX66 \ * WARP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.LASCT SKIP 1 \ The laser pulse count for the current laser \ \ This is a counter that defines the gap between the \ pulses of a pulse laser. It is set as follows: \ \ * 0 for a beam laser \ \ * 10 for a pulse laser \ \ It gets decremented by 4 on each iteration round the \ main game loop and is set to a non-zero value for \ pulse lasers only \ \ The laser only fires when the value of LASCT hits \ zero, so for pulse lasers with a value of 10, that \ means the laser fires once every four iterations \ round the main game loop (LASCT = 10, 6, 2, 0) \ \ In comparison, beam lasers fire continuously as the \ value of LASCT is always 0 \ \ [Show more]
\ \ This variable is used by the following: \ \ * DEATH \ * Main flight loop (Part 3 of 16) \ * Main flight loop (Part 16 of 16) \ * Main game loop (Part 5 of 6) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.GNTMP SKIP 1 \ Laser temperature (or "gun temperature") \ \ If the laser temperature exceeds 242 then the laser \ overheats and cannot be fired again until it has \ cooled down \ \ [Show more]
\ \ This variable is used by the following: \ \ * DIALS (Part 4 of 4) \ * LASLI \ * Main flight loop (Part 3 of 16) \ * Main game loop (Part 5 of 6) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.HFX SKIP 1 \ 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 the Electron \ version is monochrome, so this has no effect \ \ [Show more]
\ \ This variable is used by the following: \ \ * LL164 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.EV SKIP 1 \ The "extra vessels" spawning counter \ \ This counter is set to 0 on arrival in a system and \ following an in-system jump, and is bumped up when we \ spawn bounty hunters or pirates (i.e. "extra vessels") \ \ It decreases by 1 each time we consider spawning more \ "extra vessels" in part 4 of the main game loop, so \ increasing the value of EV has the effect of delaying \ the spawning of more vessels \ \ In other words, this counter stops bounty hunters and \ pirates from continually appearing, and ensures that \ there's a delay between spawnings \ \ [Show more]
\ \ This variable is used by the following: \ \ * hyp1 \ * Main game loop (Part 4 of 6) \ * WARP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.DLY SKIP 1 \ In-flight message delay \ \ This counter is used to keep an in-flight message up \ for a specified time before it gets removed. The value \ in DLY is decremented each time we start another \ iteration of the main game loop at TT100 \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 12 of 16) \ * Main game loop (Part 2 of 6) \ * me1 \ * me2 \ * MESS \ * OUCH \ * TTX66 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.de SKIP 1 \ Equipment destruction flag \ \ * Bit 1 denotes whether or not the in-flight message \ about to be shown by the MESS routine is about \ destroyed equipment: \ \ * 0 = the message is shown normally \ \ * 1 = the string " DESTROYED" gets added to the \ end of the message \ \ [Show more]
\ \ This variable is used by the following: \ \ * mes9 \ * OUCH \ * TTX66 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.LSO SKIP 86 \ This is the ship line heap for the space station \ (see NWSPS for details) \ \ [Show more]
\ \ This variable is used by the following: \ \ * NWSPS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.LSX2 SKIP 40 \ The ball line heap for storing x-coordinates (see the \ deep dive on "The ball line heap" for details) \ \ [Show more]
\ \ This variable is used by the following: \ \ * BLINE \ * CIRCLE \ * RES2 \ * WP1 \ * WPLS2 \ * WPSHPS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.LSY2 SKIP 40 \ The ball line heap for storing y-coordinates (see the \ deep dive on "The ball line heap" for details) \ \ [Show more]
\ \ This variable is used by the following: \ \ * BLINE \ * RES2 \ * WPLS2 \ * WPSHPS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.SYL SKIP NOST + 1 \ This is where we store the y_lo coordinates for all \ the stardust particles \ \ [Show more]
\ \ This variable is used by the following: \ \ * PIX1 \ * STARS1 \ * STARS2 \ * STARS6 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.SZ SKIP NOST + 1 \ This is where we store the z_hi coordinates for all \ the stardust particles \ \ [Show more]
\ \ This variable is used by the following: \ \ * DV42 \ * FLIP \ * nWq \ * STARS1 \ * STARS2 \ * STARS6 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.SZL SKIP NOST + 1 \ This is where we store the z_lo coordinates for all \ the stardust particles \ \ [Show more]
\ \ This variable is used by the following: \ \ * STARS1 \ * STARS6 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.XSAV2 SKIP 1 \ Temporary storage, used for storing the value of the X \ register in the TT26 routine \ \ [Show more]
\ \ This variable is used by the following: \ \ * TT26 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.YSAV2 SKIP 1 \ Temporary storage, used for storing the value of the Y \ register in the TT26 routine \ \ [Show more]
\ \ This variable is used by the following: \ \ * TT26 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.MCH SKIP 1 \ 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 \ \ [Show more]
\ \ This variable is used by the following: \ \ * me1 \ * me2 \ * MESS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.FSH SKIP 1 \ Forward shield status \ \ * 0 = empty \ \ * &FF = full \ \ [Show more]
\ \ This variable is used by the following: \ \ * DIALS (Part 4 of 4) \ * Main flight loop (Part 13 of 16) \ * OOPS \ * RESET \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.ASH SKIP 1 \ Aft shield status \ \ * 0 = empty \ \ * &FF = full \ \ [Show more]
\ \ This variable is used by the following: \ \ * DIALS (Part 4 of 4) \ * Main flight loop (Part 13 of 16) \ * OOPS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.ENERGY SKIP 1 \ Energy bank status \ \ * 0 = empty \ \ * &FF = full \ \ [Show more]
\ \ This variable is used by the following: \ \ * DENGY \ * DIALS (Part 3 of 4) \ * Main flight loop (Part 13 of 16) \ * Main flight loop (Part 15 of 16) \ * OOPS \ * STATUS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.LASX SKIP 1 \ The x-coordinate of the tip of the laser line \ \ [Show more]
\ \ This variable is used by the following: \ \ * LASLI \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.LASY SKIP 1 \ The y-coordinate of the tip of the laser line \ \ [Show more]
\ \ This variable is used by the following: \ \ * LASLI \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.COMX SKIP 1 \ The x-coordinate of the compass dot \ \ [Show more]
\ \ This variable is used by the following: \ \ * DOT \ * SP2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.COMY SKIP 1 \ The y-coordinate of the compass dot \ \ [Show more]
\ \ This variable is used by the following: \ \ * DOT \ * SP2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ24 SKIP 1 \ Temporary storage, used to store the current market \ item's price in routine TT151 \ \ [Show more]
\ \ This variable is used by the following: \ \ * TT151 \ * TT210 \ * TT219 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ25 SKIP 1 \ Temporary storage, used to store the current market \ item's availability in routine TT151 \ \ [Show more]
\ \ This variable is used by the following: \ \ * EQSHP \ * gnum \ * TT151 \ * TT219 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ28 SKIP 1 \ The current system's economy (0-7) \ \ * 0 = Rich Industrial \ * 1 = Average Industrial \ * 2 = Poor Industrial \ * 3 = Mainly Industrial \ * 4 = Mainly Agricultural \ * 5 = Rich Agricultural \ * 6 = Average Agricultural \ * 7 = Poor Agricultural \ \ See the deep dive on "Generating system data" for more \ information on economies \ \ [Show more]
\ \ This variable is used by the following: \ \ * hyp1 \ * var \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ29 SKIP 1 \ Temporary storage, used in a number of places \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 8 of 16) \ * tnpr \ * TT167 \ * TT210 \ * TT219 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.gov SKIP 1 \ The current system's government type (0-7) \ \ See the deep dive on "Generating system data" for \ details of the various government types \ \ [Show more]
\ \ This variable is used by the following: \ \ * hyp1 \ * Main game loop (Part 4 of 6) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.tek SKIP 1 \ The current system's tech level (0-14) \ \ See the deep dive on "Generating system data" for more \ information on tech levels \ \ [Show more]
\ \ This variable is used by the following: \ \ * EQSHP \ * hyp1 \ * SOS1 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.SLSP SKIP 2 \ The address of the bottom of the ship line heap \ \ The ship line heap is a descending block of memory \ that starts at WP and descends down to SLSP. It can be \ extended downwards by the NWSHP routine when adding \ new ships (and their associated ship line heaps), in \ which case SLSP is lowered to provide more heap space, \ assuming there is enough free memory to do so \ \ [Show more]
\ \ This variable is used by the following: \ \ * KS3 \ * NWSHP \ * RES2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.XX24 SKIP 1 \ This byte appears to be unused .ALTIT SKIP 1 \ Our altitude above the surface of the planet \ \ * 255 = we are a long way above the surface \ \ * 1-254 = our altitude as the square root of: \ \ x_hi^2 + y_hi^2 + z_hi^2 - 6^2 \ \ where our ship is at the origin, the centre of the \ planet is at (x_hi, y_hi, z_hi), and the radius \ of the planet is 6 \ \ * 0 = we have crashed into the surface \ \ [Show more]
\ \ This variable is used by the following: \ \ * DIALS (Part 4 of 4) \ * Main flight loop (Part 15 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ2 SKIP 6 \ The three 16-bit seeds for the current system, i.e. \ the one we are currently in \ \ See the deep dives on "Galaxy and system seeds" and \ "Twisting the system seeds" for more details \ \ [Show more]
\ \ This variable is used by the following: \ \ * hyp1 \ * ypl \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ3 SKIP 1 \ The selected system's economy (0-7) \ \ * 0 = Rich Industrial \ * 1 = Average Industrial \ * 2 = Poor Industrial \ * 3 = Mainly Industrial \ * 4 = Mainly Agricultural \ * 5 = Rich Agricultural \ * 6 = Average Agricultural \ * 7 = Poor Agricultural \ \ See the deep dive on "Generating system data" for more \ information on economies \ \ [Show more]
\ \ This variable is used by the following: \ \ * hyp1 \ * TT24 \ * TT25 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ4 SKIP 1 \ The selected system's government (0-7) \ \ See the deep dive on "Generating system data" for more \ details of the various government types \ \ [Show more]
\ \ This variable is used by the following: \ \ * hyp1 \ * TT24 \ * TT25 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ5 SKIP 1 \ The selected system's tech level (0-14) \ \ See the deep dive on "Generating system data" for more \ information on tech levels \ \ [Show more]
\ \ This variable is used by the following: \ \ * hyp1 \ * TT24 \ * TT25 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ6 SKIP 2 \ The selected system's population in billions * 10 \ (1-71), so the maximum population is 7.1 billion \ \ See the deep dive on "Generating system data" for more \ details on population levels \ \ [Show more]
\ \ This variable is used by the following: \ \ * TT24 \ * TT25 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ7 SKIP 2 \ The selected system's productivity in M CR (96-62480) \ \ See the deep dive on "Generating system data" for more \ details about productivity levels \ \ [Show more]
\ \ This variable is used by the following: \ \ * TT24 \ * TT25 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ8 SKIP 2 \ The distance from the current system to the selected \ system in light years * 10, stored as a 16-bit number \ \ The distance will be 0 if the selected system is the \ current system \ \ The galaxy chart is 102.4 light years wide and 51.2 \ light years tall (see the intra-system distance \ calculations in routine TT111 for details), which \ equates to 1024 x 512 in terms of QQ8 \ \ [Show more]
\ \ This variable is used by the following: \ \ * Ghy \ * hyp \ * TT111 \ * TT146 \ * TT18 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ9 SKIP 1 \ The galactic x-coordinate of the crosshairs in the \ galaxy chart (and, most of the time, the selected \ system's galactic x-coordinate) \ \ [Show more]
\ \ This variable is used by the following: \ \ * Ghy \ * jmp \ * ping \ * TT103 \ * TT105 \ * TT111 \ * TT16 \ * TT22 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ10 SKIP 1 \ The galactic y-coordinate of the crosshairs in the \ galaxy chart (and, most of the time, the selected \ system's galactic y-coordinate) \ \ [Show more]
\ \ This variable is used by the following: \ \ * Ghy \ * jmp \ * TT103 \ * TT105 \ * TT111 \ * TT16 \ * TT22 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
PRINT "WP workspace from ", ~WP," to ", ~P%