Skip to navigation

Elite on the BBC Micro and NES

Workspaces and configuration

[6502 Second Processor version]

6502 SECOND PROCESSOR ELITE GAME SOURCE (PARASITE) 6502 Second Processor Elite was written by Ian Bell and David Braben and is copyright Acornsoft 1985 The code on this site is identical to the source discs released on Ian Bell's personal website at http://www.elitehomepage.org/ (it's just been reformatted to be more readable) 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 * ELTH.bin * ELTI.bin * ELTJ.bin * SHIPS.bin * WORDS.bin
INCLUDE "1-source-files/main-sources/elite-build-options.asm" CPU 1 \ Switch to 65C02 assembly, as this code runs on the \ 6502 Second Processor _SOURCE_DISC = (_VARIANT = 1) _SNG45 = (_VARIANT = 2) _EXECUTIVE = (_VARIANT = 3) GUARD &F800 \ Guard against assembling over MOS memory
Configuration variables
CODE% = &1000 \ The address where the code will be run LOAD% = &1000 \ The address where the code will be loaded CODE_WORDS% = &0400 \ The address where the text data will be run LOAD_WORDS% = &81B0 \ The address where the text data will be loaded IF _SNG45 OR _SOURCE_DISC 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
ELIF _EXECUTIVE Q% = TRUE \ The Executive version starts with a maxed-out 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
ENDIF D% = &D000 \ The address where the ship blueprints get moved to \ after loading, so they go from &D000 to &F200 \ \ [Show more]
\ \ This variable is used by the following: \ \ * COLD \ \ 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
LS% = D%-1 \ The start of the descending ship line heap \ \ [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
NOST = 18 \ The number of stardust particles in normal space (this \ goes down to 3 in witchspace) \ \ [Show more]
\ \ This variable is used by the following: \ \ * RES2 \ * 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 = 20 \ The maximum number of ships in our local bubble of \ universe \ \ [Show more]
\ \ This variable is used by the following: \ \ * K% \ * NWSHP \ * UP \ \ 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 = 34 \ The number of different ship types \ \ [Show more]
\ \ This variable is used by the following: \ \ * UP \ \ 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 = 1 \ 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
SST = 2 \ Ship type for a Coriolis space station \ \ [Show more]
\ \ This variable is used by the following: \ \ * ANGRY \ * BEGIN \ * 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) \ * UP \ \ 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 = 3 \ Ship type for an escape pod \ \ [Show more]
\ \ This variable is used by the following: \ \ * SESCP \ \ 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
PLT = 4 \ Ship type for an alloy plate \ \ [Show more]
\ \ This variable is used by the following: \ \ * DEATH \ * Main flight loop (Part 11 of 16) \ * 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
OIL = 5 \ Ship type for a cargo canister \ \ [Show more]
\ \ This variable is used by the following: \ \ * DEATH \ * HATB \ * Main flight loop (Part 8 of 16) \ * Main flight loop (Part 11 of 16) \ * Main game loop (Part 2 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
AST = 7 \ Ship type for an asteroid \ \ [Show more]
\ \ This variable is used by the following: \ \ * 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
SPL = 8 \ Ship type for a splinter \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 11 of 16) \ * 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
SHU = 9 \ Ship type for a Shuttle \ \ [Show more]
\ \ This variable is used by the following: \ \ * 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 = 11 \ Ship type for a Cobra Mk III \ \ [Show more]
\ \ This variable is used by the following: \ \ * ANGRY \ * BR1 (Part 1 of 2) \ * DEMON \ * ESCAPE \ * Main game loop (Part 1 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
ANA = 14 \ Ship type for an Anaconda \ \ [Show more]
\ \ This variable is used by the following: \ \ * TACTICS (Part 4 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
HER = 15 \ Ship type for a rock hermit (asteroid) \ \ [Show more]
\ \ This variable is used by the following: \ \ * KILLSHP \ * Main game loop (Part 1 of 6) \ * Main game loop (Part 2 of 6) \ * NWSHP \ * 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
COPS = 16 \ Ship type for a Viper \ \ [Show more]
\ \ This variable is used by the following: \ \ * HATB \ * 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
SH3 = 17 \ Ship type for a Sidewinder \ \ [Show more]
\ \ This variable is used by the following: \ \ * HALL \ * TACTICS (Part 2 of 7) \ * TACTICS (Part 4 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
KRA = 19 \ Ship type for a Krait \ \ [Show more]
\ \ This variable is used by the following: \ \ * HATB \ \ 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
ADA = 20 \ Ship type for an Adder \ \ [Show more]
\ \ This variable is used by the following: \ \ * DEMON \ \ 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
WRM = 23 \ Ship type for a Worm \ \ [Show more]
\ \ This variable is used by the following: \ \ * TACTICS (Part 4 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
CYL2 = 24 \ Ship type for a Cobra Mk III (pirate) \ \ [Show more]
\ \ This variable is used by the following: \ \ * ESCAPE \ * 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
ASP = 25 \ Ship type for an Asp Mk II \ \ [Show more]
\ \ This variable is used by the following: \ \ * BR1 (Part 2 of 2) \ \ 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
THG = 29 \ Ship type for a Thargoid \ \ [Show more]
\ \ This variable is used by the following: \ \ * GTHG \ * MJP \ * TACTICS (Part 3 of 7) \ * TACTICS (Part 5 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
TGL = 30 \ Ship type for a Thargon \ \ [Show more]
\ \ This variable is used by the following: \ \ * GTHG \ * TACTICS (Part 3 of 7) \ * TACTICS (Part 5 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
CON = 31 \ Ship type for a Constrictor \ \ [Show more]
\ \ This variable is used by the following: \ \ * BRIEF \ * KILLSHP \ * Main flight loop (Part 5 of 16) \ * Main flight loop (Part 11 of 16) \ * 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
LGO = 32 \ Ship type for the Elite logo \ \ [Show more]
\ \ This variable is used by the following: \ \ * DEMON \ \ 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
COU = 33 \ Ship type for a Cougar \ \ [Show more]
\ \ This variable is used by the following: \ \ * 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
DOD = 34 \ Ship type for a Dodecahedron ("Dodo") space station \ \ [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
JL = ESC \ Junk is defined as starting from the escape pod \ \ [Show more]
\ \ This variable is used by the following: \ \ * KILLSHP \ * NWSHP \ \ 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
JH = SHU+2 \ Junk is defined as ending before the Cobra Mk III \ \ So junk is defined as the following: escape pod, \ alloy plate, cargo canister, asteroid, splinter, \ Shuttle or Transporter \ \ [Show more]
\ \ This variable is used by the following: \ \ * KILLSHP \ * NWSHP \ \ 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
PACK = SH3 \ The first of the eight pack-hunter ships, which tend \ to spawn in groups. With the default value of PACK the \ pack-hunters are the Sidewinder, Mamba, Krait, Adder, \ Gecko, Cobra Mk I, Worm and Cobra Mk III (pirate) \ \ [Show more]
\ \ This variable is used by the following: \ \ * 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
POW = 15 \ Pulse laser power \ \ [Show more]
\ \ This variable is used by the following: \ \ * EQSHP \ * NA% \ * refund \ * 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
Mlas = 50 \ Mining laser power \ \ [Show more]
\ \ This variable is used by the following: \ \ * EQSHP \ * Main flight loop (Part 11 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
Armlas = INT(128.5 + 1.5*POW) \ Military laser power \ \ [Show more]
\ \ This variable is used by the following: \ \ * EQSHP \ * Main flight loop (Part 11 of 16) \ * refund \ * 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
NI% = 37 \ 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 \ * DCS1 \ * DEMON \ * K% \ * Main flight loop (Part 4 of 16) \ * Main flight loop (Part 6 of 16) \ * Main flight loop (Part 9 of 16) \ * Main flight loop (Part 15 of 16) \ * NWSHP \ * SFS1 \ * SPS4 \ * STORE \ * TAS4 \ * UNIV \ * VCSU1 \ * WARP \ * ZINF \ * ZINF2 \ * 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
BRKV = &0202 \ The break vector that we intercept to enable us to \ handle and display system errors \ \ [Show more]
\ \ This variable is used by the following: \ \ * BRKBK \ * 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
OSWRCH = &FFEE \ The address for the OSWRCH routine \ \ [Show more]
\ \ This variable is used by the following: \ \ * backtonormal \ * BRBR \ * CATS \ * CHPR \ * CLYNS \ * DET1 \ * DIALS \ * DODOSVN \ * DOXC \ * ECBLB \ * label \ * LBFL \ * LL164 \ * LL30 \ * LL9 (Part 12 of 12) \ * LS2FL \ * Main flight loop (Part 13 of 16) \ * Main game loop (Part 5 of 6) \ * MEBRK \ * MT26 \ * SPBLB \ * TITLE \ * 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
OSBYTE = &FFF4 \ The address for the OSBYTE routine \ \ [Show more]
\ \ This variable is used by the following: \ \ * FLKB \ * FX200 \ \ 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: \ \ * DKS4 \ * DOT \ * HALL \ * HBFL \ * MSBAR \ * MT26 \ * NO3 \ * PBFL \ * RDKEY \ * S% \ * SCAN \ * WSCAN \ \ 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 \ * savscr \ \ 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
OSCLI = &FFF7 \ The address for the OSCLI routine \ \ [Show more]
\ \ This variable is used by the following: \ \ * SCLI2 \ * TALK \ \ 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
DOFE21 = 131 \ The OSWRCH number for the #DOFE21 command \ \ [Show more]
\ \ This variable is used by the following: \ \ * 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
DOhfx = 132 \ The OSWRCH number for the #DOhfx command \ \ [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
SETXC = 133 \ The OSWRCH number for the #SETXC command \ \ [Show more]
\ \ This variable is used by the following: \ \ * DOXC \ \ 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
SETYC = 134 \ The OSWRCH number for the #SETYC command \ \ [Show more]
\ \ This variable is used by the following: \ \ * DOYC \ \ 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
clyns = 135 \ The OSWRCH number for the #clyns command \ \ [Show more]
\ \ This variable is used by the following: \ \ * CLYNS \ \ 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
RDPARAMS = 136 \ The OSWRCH number for the #RDPARAMS command \ \ [Show more]
\ \ This variable is used by the following: \ \ * DIALS \ \ 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
DODIALS = 138 \ The OSWRCH number for the #DODIALS command \ \ [Show more]
\ \ This variable is used by the following: \ \ * DET1 \ \ 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
VIAE = 139 \ The OSWRCH number for the #VIAE command \ \ [Show more]
\ \ This variable is used by the following: \ \ * backtonormal \ * MT26 \ \ 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
DOBULB = 140 \ The OSWRCH number for the #DOBULB command \ \ [Show more]
\ \ This variable is used by the following: \ \ * ECBLB \ * SPBLB \ \ 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
DOCATF = 141 \ The OSWRCH number for the #DOCATF command \ \ [Show more]
\ \ This variable is used by the following: \ \ * CATS \ \ 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
SETCOL = 142 \ The OSWRCH number for the #SETCOL command \ \ [Show more]
\ \ This variable is used by the following: \ \ * DOCOL \ \ 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
SETVDU19 = 143 \ The OSWRCH number for the #SETVDU19 command \ \ [Show more]
\ \ This variable is used by the following: \ \ * DOVDU19 \ \ 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
DOsvn = 144 \ The OSWRCH number for the #DOsvn command \ \ [Show more]
\ \ This variable is used by the following: \ \ * DODOSVN \ \ 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
printcode = 146 \ The OSWRCH number for the #printcode command \ \ [Show more]
\ \ This variable is used by the following: \ \ * CHPR \ \ 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
prilf = 147 \ The OSWRCH number for the #prilf command \ \ [Show more]
\ \ This variable is used by the following: \ \ * 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
DOmsbar = 242 \ The OSWORD number for the #DOmsbar command \ \ [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
wscn = 243 \ The OSWORD number for the #wscn command \ \ [Show more]
\ \ This variable is used by the following: \ \ * WSCAN \ \ 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
onescan = 244 \ The OSWORD number for the #onescan command \ \ [Show more]
\ \ This variable is used by the following: \ \ * SCAN \ \ 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
DOdot = 245 \ The OSWORD number for the #DOdot command \ \ [Show more]
\ \ This variable is used by the following: \ \ * DOT \ \ 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
DODKS4 = 246 \ The OSWORD number for the #DODKS4 command \ \ [Show more]
\ \ This variable is used by the following: \ \ * DKS4 \ \ 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: \ \ * HFS2 \ * 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 \ * FLFLLS \ * 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 \ * SUN (Part 1 of 4) \ * SUN (Part 2 of 4) \ * TTX66 \ * WPLS \ \ 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
f0 = &20 \ Internal key number for red key f0 (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
f1 = &71 \ Internal key number for red key f1 (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
f2 = &72 \ Internal key number for red key f2 (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
f3 = &73 \ Internal key number for red key f3 (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
f4 = &14 \ Internal key number for red key f4 (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
f5 = &74 \ Internal key number for red key f5 (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
f6 = &75 \ Internal key number for red key f6 (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
f7 = &16 \ Internal key number for red key f7 (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
f8 = &76 \ Internal key number for red key f8 (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
f9 = &77 \ Internal key number for red key f9 (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
YELLOW = %00001111 \ Four mode 1 pixels of colour 1 (yellow) \ \ [Show more]
\ \ This variable is used by the following: \ \ * DEATH \ * MESS \ * NLIN2 \ * shpcol \ * SIGHT \ * SLIDE \ * 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
RED = %11110000 \ Four mode 1 pixels of colour 2 (red, magenta or white) \ \ [Show more]
\ \ This variable is used by the following: \ \ * dockEd \ * ee3 \ * LASLI \ * shpcol \ * TITLE \ * TT128 \ * WHITETEXT \ * ZZAAP \ \ 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
CYAN = %11111111 \ Four mode 1 pixels of colour 3 (cyan or white) \ \ [Show more]
\ \ This variable is used by the following: \ \ * gnum \ * HME2 \ * hyp \ * NLIN2 \ * shpcol \ * TRADEMODE \ * TT102 \ * TT14 \ * TT15 \ * TT22 \ * TT23 \ * 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
GREEN = %10101111 \ Four mode 1 pixels of colour 3, 1, 3, 1 (cyan/yellow) \ \ [Show more]
\ \ This variable is used by the following: \ \ * PLANET \ \ 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
WHITE = %11111010 \ Four mode 1 pixels of colour 3, 2, 3, 2 (cyan/red) \ \ [Show more]
\ \ This variable is used by the following: \ \ * shpcol \ \ 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
MAGENTA = RED \ Four mode 1 pixels of colour 2 (red, magenta or white) \ \ [Show more]
\ \ This variable is used by the following: \ \ * gnum \ \ 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
DUST = WHITE \ Four mode 1 pixels of colour 3, 2, 3, 2 (cyan/red) \ \ [Show more]
\ \ This variable is used by the following: \ \ * PBFL \ \ 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
RED2 = %00000011 \ Two mode 2 pixels of colour 1 (red) \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 11 of 16) \ * scacol \ \ 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
GREEN2 = %00001100 \ Two mode 2 pixels of colour 2 (green) \ \ [Show more]
\ \ This variable is used by the following: \ \ * KILLSHP \ * Main flight loop (Part 3 of 16) \ * msblob \ * scacol \ * 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
YELLOW2 = %00001111 \ Two mode 2 pixels of colour 3 (yellow) \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ * scacol \ \ 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
BLUE2 = %00110000 \ Two mode 2 pixels of colour 4 (blue) \ \ [Show more]
\ \ This variable is used by the following: \ \ * scacol \ \ 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
MAG2 = %00110011 \ Two mode 2 pixels of colour 5 (magenta) \ \ [Show more]
\ \ This variable is used by the following: \ \ * scacol \ \ 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
CYAN2 = %00111100 \ Two mode 2 pixels of colour 6 (cyan) \ \ [Show more]
\ \ This variable is used by the following: \ \ * DEMON \ * scacol \ \ 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
WHITE2 = %00111111 \ Two mode 2 pixels of colour 7 (white) \ \ [Show more]
\ \ This variable is used by the following: \ \ * scacol \ * 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
STRIPE = %00100011 \ Two mode 2 pixels of colour 5, 1 (magenta/red) NRU% = 0 \ The number of planetary systems with extended system \ description overrides in the RUTOK table \ \ NRU% is set to 0 in the original source, but this is a \ bug, as it should match the number of entries in the \ RUGAL table \ \ This bug causes the Data on System screen to crash the \ game for a small number of systems - for example, the \ game will freeze if you bring up the Data on System \ screen after docking at Biarge in the first galaxy \ during the Constrictor mission \ \ [Show more]
\ \ This variable is used by the following: \ \ * PDESC \ \ 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 \ * 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
VE = &57 \ The obfuscation byte used to hide the extended tokens \ table from crackers viewing the binary code \ \ [Show more]
\ \ This variable is used by the following: \ \ * DETOK \ * ECHR \ * EJMP \ * ERND \ * ETOK \ * RUTOK \ * TKN1 \ * TOKN \ \ 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
LL = 30 \ The length of lines (in characters) of justified text \ in the extended tokens system \ \ [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
W2 = 16 \ The horizontal character spacing in the scroll text \ (i.e. the difference in x-coordinate between the \ left edges of adjacent characters in words) \ \ [Show more]
\ \ This variable is used by the following: \ \ * GRIDSET \ \ 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
WY = 12 \ The vertical spacing between points in the scroll text \ grid for each character \ \ [Show more]
\ \ This variable is used by the following: \ \ * NOFY \ \ 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
W2Y = 2.5*WY \ The vertical line spacing in the scroll text (i.e. the \ difference in y-coordinate between the tops of the \ characters in adjacent lines) \ \ [Show more]
\ \ This variable is used by the following: \ \ * GRIDSET \ \ 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
D = 80 \ The distance from the camera (z-coordinate) of the \ bottom of the visible part of the Star Wars scroll \ text \ \ [Show more]
\ \ This variable is used by the following: \ \ * SLIDE \ \ 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) \ * PDESC \ \ 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
.T1 SKIP 1 \ Temporary storage, used in a number of places \ \ [Show more]
\ \ This variable is used by the following: \ \ * ADD \ * ARCTAN \ * gnum \ * HBFL \ * HLOIN \ * LBFL \ * LCASH \ * LL9 (Part 10 of 12) \ * LL9 (Part 11 of 12) \ * LOIN \ * MLS1 \ * MULT1 \ * NWSHP \ * PBFL \ * PIXEL \ * PIXEL3 \ * refund \ * 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 \ \ [Show more]
\ \ This variable is used by the following: \ \ * Checksum \ * COLD \ * DEEOR \ * DETOK2 \ * KILLSHP \ * KS2 \ * S% \ * SCAN \ * TALK \ * 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) .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 \ * PL9 (Part 2 of 3) \ * PL9 (Part 3 of 3) \ * PLS22 \ * PLS5 \ \ 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 \ * CHKON \ * DOEXP \ * DVID3B2 \ * DVID4 \ * DVIDT \ * FMLTU \ * GC2 \ * GRS1 \ * HITCH \ * KILLSHP \ * KS3 \ * LL9 (Part 6 of 12) \ * LL9 (Part 10 of 12) \ * MLS1 \ * MLTU2 \ * MLU2 \ * MU1 \ * MU11 \ * MU6 \ * MULT1 \ * MULT12 \ * MULT3 \ * MUT3 \ * MV40 \ * MVEIT (Part 5 of 9) \ * MVS4 \ * MVS5 \ * MVT6 \ * NORM \ * PL9 (Part 2 of 3) \ * PL9 (Part 3 of 3) \ * PLANET \ * PLS1 \ * PLS22 \ * PLS3 \ * PROJ \ * SLIDE \ * SPS2 \ * SQUA2 \ * STARS1 \ * STARS2 \ * STARS6 \ * SUN (Part 1 of 4) \ * SUN (Part 3 of 4) \ * TIS3 \ * TT111 \ * TT151 \ * TT210 \ * TT219 \ * TT24 \ * 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
.NEEDKEY SKIP 1 \ Flag to ask the I/O processor to update the key logger \ buffer at KTRAN \ \ * 0 = do not update KTRAN \ \ * Non-zero = Ask the I/O processor to update KTRAN \ in the next call to LL9 or DOKEY \ \ A non-zero value has the following effect: \ \ * When DOKEY is called to scan for primary flight \ keys, the key logger buffer is updated before the \ key logger is updated \ \ * When drawing ships in LL9, the keyboard is scanned \ for key presses, which is used in the title screen \ and mission briefings \ \ [Show more]
\ \ This variable is used by the following: \ \ * DOKEY \ * LL9 (Part 12 of 12) \ * TITLE \ \ 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: \ \ * DEMON \ * HAS1 \ * 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 8 of 16) \ * Main flight loop (Part 12 of 16) \ * MVEIT (Part 4 of 9) \ * NWSHP \ * SFS1 \ * SPIN \ * 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 \ * STORE \ * 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: \ \ * Checksum \ * COLD \ * DETOK \ * DETOK2 \ * DETOK3 \ * ex \ * LL9 (Part 5 of 12) \ * LL9 (Part 6 of 12) \ * LL9 (Part 10 of 12) \ * LL9 (Part 11 of 12) \ * SUN (Part 1 of 4) \ * SUN (Part 3 of 4) \ * TACTICS (Part 1 of 7) \ * TAS1 \ * VCSU1 \ * VCSUB \ \ 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 \ * SUN (Part 3 of 4) \ \ 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: \ \ * EDGES \ * PIX1 \ * STARS1 \ * STARS2 \ * STARS6 \ * SUN (Part 2 of 4) \ * SUN (Part 3 of 4) \ * SUN (Part 4 of 4) \ * WPLS \ \ 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
.SUNX SKIP 2 \ The 16-bit x-coordinate of the vertical centre axis \ of the sun (which might be off-screen) \ \ [Show more]
\ \ This variable is used by the following: \ \ * SUN (Part 2 of 4) \ * SUN (Part 3 of 4) \ * SUN (Part 4 of 4) \ * WPLS \ \ 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
.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 \ * Main flight loop (Part 2 of 16) \ * MV40 \ * MVS4 \ * RES2 \ * 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 \ * 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
.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: \ \ * CATS \ * CHPR \ * CLYNS \ * DOXC \ \ 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 \ * DOYC \ * INCYC \ * qv \ * TT67 \ \ 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: \ \ * DOENTRY \ * hyp \ * 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
.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: \ \ * DEMON \ * DIALS \ * 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 \ * 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
.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 \ * DOCKIT \ * HALL \ * HAS1 \ * 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) \ * Main flight loop (Part 9 of 16) \ * NORM \ * SLIDE \ * SP2 \ * TAS2 \ * TAS3 \ * TAS4 \ * TAS6 \ * 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 \ * EDGES \ * FLIP \ * HLOIN \ * LASLI \ * LL145 (Part 1 of 4) \ * LL30 \ * LOIN \ * NLIN2 \ * nWq \ * PIXEL2 \ * SLIDE \ * STARS1 \ * STARS2 \ * STARS6 \ * SUN (Part 3 of 4) \ * TTX66 \ * ZZAAP \ \ 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 \ * DOEXP \ * FLIP \ * HLOIN \ * HLOIN2 \ * LASLI \ * LL145 (Part 1 of 4) \ * LL30 \ * LOIN \ * MLU1 \ * NLIN2 \ * nWq \ * PIXEL2 \ * SLIDE \ * STARS1 \ * STARS2 \ * STARS6 \ * SUN (Part 3 of 4) \ * TTX66 \ * ZZAAP \ \ 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 \ * EDGES \ * HLOIN \ * LASLI \ * LL145 (Part 1 of 4) \ * LL30 \ * LOIN \ * NLIN2 \ * SLIDE \ * SUN (Part 3 of 4) \ * TTX66 \ * ZZAAP \ \ 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 \ * LASLI \ * LL145 (Part 1 of 4) \ * LL30 \ * LOIN \ * NLIN2 \ * SLIDE \ * TTX66 \ * ZZAAP \ \ 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 \ * 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) \ * SLIDE \ * 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 \ * DOCKIT \ * DVID3B2 \ * EQSHP \ * FMLTU2 \ * HFS2 \ * KILLSHP \ * MAS1 \ * MU5 \ * MULT3 \ * MV40 \ * MVS5 \ * MVT3 \ * PL9 (Part 1 of 3) \ * PL9 (Part 2 of 3) \ * PLANET \ * PLS1 \ * PLS22 \ * PLS3 \ * PLS6 \ * PROJ \ * SUN (Part 1 of 4) \ * SUN (Part 3 of 4) \ * SVE \ * TAS1 \ * TT11 \ * 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
.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-20 = 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: \ \ * BRIEF \ * DEATH \ * DELT \ * DEMON \ * DOCKIT \ * DOEXP \ * DOKEY \ * DVID3B2 \ * ESCAPE \ * EXNO \ * FAROF2 \ * FRS1 \ * GTHG \ * GTNMEW \ * HAS1 \ * HITCH \ * HME2 \ * 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 \ * PAS1 \ * PAUSE \ * PL9 (Part 2 of 3) \ * PL9 (Part 3 of 3) \ * PLANET \ * PLS1 \ * PLS4 \ * PLUT \ * PROJ \ * QUS1 \ * RLINE \ * SCAN \ * SFS1 \ * SLIDE \ * SOLAR \ * SOS1 \ * STORE \ * 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 \ * ZINF2 \ \ 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% - 34 \ 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
.NEWB SKIP 1 \ The ship's "new byte flags" (or NEWB flags) \ \ Contains details about the ship's type and associated \ behaviour, such as whether they are a trader, a bounty \ hunter, a pirate, currently hostile, in the process of \ docking, inside the hold having been scooped, and so \ on. The default values for each ship type are taken \ from the table at E%, and you can find out more detail \ in the deep dive on "Advanced tactics with the NEWB \ flags" \ \ [Show more]
\ \ This variable is used by the following: \ \ * DOCKIT \ * LL9 (Part 1 of 12) \ * Main flight loop (Part 8 of 16) \ * Main flight loop (Part 11 of 16) \ * Main flight loop (Part 12 of 16) \ * Main game loop (Part 1 of 6) \ * Main game loop (Part 4 of 6) \ * NWSHP \ * NWSPS \ * TACTICS (Part 2 of 7) \ * TACTICS (Part 3 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
.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 \ * CIRCLE2 \ * HFS2 \ * LS2FL \ * PL2 \ * PL9 (Part 1 of 3) \ * TT128 \ * TTX66 \ * 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
.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: \ \ * BR1 (Part 2 of 2) \ * cpl \ * Ghy \ * HME2 \ * hyp \ * PDESC \ * 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: \ \ * CHPR \ * CLYNS \ * EQSHP \ * hyp \ * MESS \ * MT17 \ * MT6 \ * TITLE \ * TT102 \ * TT167 \ * TT210 \ * TT219 \ * TT23 \ * TT25 \ * 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 \ * PLS22 \ \ 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 \ * DEMON \ * DIALS \ * DOENTRY \ * DOKEY \ * DV41 \ * FRS1 \ * Main flight loop (Part 2 of 16) \ * 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: \ \ * DEMON \ * Main flight loop (Part 3 of 16) \ * Main flight loop (Part 15 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) \ * PLS3 \ * 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
.Q SKIP 1 \ Temporary storage, used in a number of places \ \ [Show more]
\ \ This variable is used by the following: \ \ * ARCTAN \ * DOCKIT \ * DOEXP \ * DV41 \ * DVID3B2 \ * DVID4 \ * DVIDT \ * EQSHP \ * FMLTU \ * FMLTU2 \ * gnum \ * HAS1 \ * 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) \ * Main flight loop (Part 15 of 16) \ * MLTU2 \ * MULT1 \ * MULT3 \ * MULTU \ * MV40 \ * MVEIT (Part 3 of 9) \ * MVS4 \ * MVS5 \ * NORM \ * PLS22 \ * PLS3 \ * PLS4 \ * SPS2 \ * STARS1 \ * STARS2 \ * STARS6 \ * SUN (Part 3 of 4) \ * TAS3 \ * TAS4 \ * TIDY \ * TIS1 \ * TIS2 \ * TIS3 \ * TT111 \ * TT210 \ * TT219 \ * TT24 \ \ 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 \ * DCS1 \ * DOEXP \ * DVID3B2 \ * gnum \ * GRS1 \ * HAS1 \ * 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) \ * 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 \ * PLS22 \ * SFS2 \ * SLIDE \ * STARS1 \ * STARS2 \ * STARS6 \ * SUN (Part 3 of 4) \ * TAS3 \ * TAS4 \ * TT111 \ * TT210 \ * 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 \ * DOEXP \ * DVID3B2 \ * gnum \ * GRIDSET \ * HITCH \ * LL118 \ * LL120 \ * LL123 \ * LL129 \ * LL145 (Part 3 of 4) \ * LL145 (Part 4 of 4) \ * LL38 \ * LL5 \ * LL51 \ * LL61 \ * LL9 (Part 5 of 12) \ * MLS2 \ * MULT12 \ * MUT2 \ * MVS4 \ * MVS5 \ * MVT1 \ * MVT3 \ * PLS22 \ * SLIDE \ * STARS1 \ * STARS2 \ * STARS6 \ * TAS3 \ * TAS4 \ * 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: \ \ * HAS1 \ * 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: \ \ * 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 (red key f6) \ 2 = Buy Cargo screen (red key f1) \ 3 = Mis-jump just arrived (witchspace) \ 4 = Sell Cargo screen (red key f2) \ 6 = Death screen \ 8 = Status Mode screen (red key f8) \ Inventory screen (red key f9) \ 16 = Market Price screen (red key f7) \ 32 = Equip Ship screen (red key f3) \ 64 = Long-range Chart (red key f4) \ 128 = Short-range Chart (red key f5) \ 255 = Launch view \ \ This value is typically set by calling routine TT66 \ \ [Show more]
\ \ This variable is used by the following: \ \ * DEATH \ * DFAULT \ * DK4 \ * hyp \ * LASLI \ * LOOK1 \ * Main flight loop (Part 11 of 16) \ * Main flight loop (Part 16 of 16) \ * Main game loop (Part 5 of 6) \ * NWSTARS \ * TITLE \ * TT102 \ * TT103 \ * TT110 \ * 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 \ * PDESC \ * PIXEL \ * PIXEL3 \ * refund \ * STARS1 \ * STARS2 \ * STARS6 \ * TT111 \ * TT22 \ * 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
.XX13 SKIP 1 \ Temporary storage, typically used in the line-drawing \ routines \ \ [Show more]
\ \ This variable is used by the following: \ \ * 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: \ \ * BRIEF \ * DEATH \ * DEMON \ * DIALS \ * 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
.DL SKIP 1 \ Vertical sync flag \ \ DL gets set to 30 every time we reach vertical sync on \ the video system, which happens 50 times a second \ (50Hz). The WSCAN routine uses this to pause until the \ vertical sync, by setting DL to 0 and then monitoring \ its value until it changes to 30 .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: \ \ * ANGRY \ * BRIEF \ * DEMON \ * DOCKIT \ * DOKEY \ * ESCAPE \ * 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) \ * MVEIT (Part 6 of 9) \ * PL2 \ * PL9 (Part 1 of 3) \ * 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
.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: \ \ * DEMON \ * 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
.PBUP SKIP 1 \ The size of the pixel buffer at PBUF (including the \ two OSWORD size bytes) \ \ [Show more]
\ \ This variable is used by the following: \ \ * PBFL \ * PBZE \ * PIXEL \ * PIXEL3 \ \ 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
.HBUP SKIP 1 \ The size of the horizontal line buffer at HBUF \ (including the two OSWORD size bytes) \ \ [Show more]
\ \ This variable is used by the following: \ \ * HBFL \ * HBZE \ * HLOIN \ \ 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
.LBUP SKIP 1 \ The size of the multi-segment line buffer at LBUF \ \ [Show more]
\ \ This variable is used by the following: \ \ * LBFL \ * LOIN \ * 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
.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) \ * PDESC \ * 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 \ * PL9 (Part 3 of 3) \ * PLS2 \ * PLS22 \ * SUN (Part 1 of 4) \ * SUN (Part 2 of 4) \ \ 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
.COL SKIP 1 \ Temporary storage, used to store colour information \ when drawing pixels in the dashboard .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 \ * PLS22 \ \ 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) \ * PLS22 \ * SPIN \ * STATUS \ * SUN (Part 1 of 4) \ * SUN (Part 3 of 4) \ * 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 \ \ [Show more]
\ \ This variable is used by the following: \ \ * DOCKIT \ * HALL \ * PL9 (Part 3 of 3) \ * PLS22 \ * PLS4 \ * TACTICS (Part 2 of 7) \ * TACTICS (Part 7 of 7) \ * TITLE \ \ 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
.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 \ * PLS22 \ * 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: \ \ * HME2 \ * 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: \ \ * DOCKIT \ * PLUT \ * STARS2 \ * TACTICS (Part 2 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
.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: \ \ * DOCKIT \ * HAS1 \ * MVEIT (Part 8 of 9) \ * MVS5 \ * PLUT \ * STARS2 \ * TACTICS (Part 2 of 7) \ * TACTICS (Part 7 of 7) \ * TWIST \ \ 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) \ * PL9 (Part 2 of 3) \ * PL9 (Part 3 of 3) \ * PLS22 \ * PLS5 \ * SUN (Part 1 of 4) \ * SUN (Part 3 of 4) \ \ 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
.widget SKIP 1 \ Temporary storage, used to store the original argument \ in A in the logarithmic FMLTU and LL28 routines \ \ [Show more]
\ \ This variable is used by the following: \ \ * FMLTU \ * LL28 \ \ 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
.safehouse SKIP 6 \ Backup storage for the seeds for the selected system \ \ The seeds for the current system get stored here as \ soon as a hyperspace is initiated, so we can fetch \ them in the hyp1 routine. This fixes a bug in an \ earlier version where you could hyperspace while \ docking and magically appear in your destination \ station \ \ [Show more]
\ \ This variable is used by the following: \ \ * Ghy \ * hyp \ * hyp1 \ \ 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
.messXC SKIP 1 \ Temporary storage, used to store the text column \ of the in-flight message in MESS, so it can be erased \ from the screen at the correct time \ \ [Show more]
\ \ This variable is used by the following: \ \ * 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
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 \ * Checksum \ * CIRCLE2 \ * cpl \ * DKS3 \ * DOEXP \ * DVID3B2 \ * DVIDT \ * EDGES \ * EXNO \ * gnum \ * GRIDSET \ * HALL \ * 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) \ * LS2FL \ * Main game loop (Part 3 of 6) \ * Main game loop (Part 4 of 6) \ * MLS1 \ * MU11 \ * MULT1 \ * MULT3 \ * MV40 \ * MVS5 \ * MVT1 \ * MVT3 \ * NORM \ * NWSHP \ * OOPS \ * PIXEL2 \ * PLS22 \ * REDU2 \ * SP2 \ * STARS1 \ * STARS6 \ * SUN (Part 3 of 4) \ * TACTICS (Part 5 of 7) \ * TIS1 \ * TIS2 \ * 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
.K3 SKIP 0 \ Temporary storage, used in a number of places \ \ [Show more]
\ \ This variable is used by the following: \ \ * CHKON \ * CHPR \ * CIRCLE2 \ * DCS1 \ * DOCKIT \ * DOEXP \ * HFS2 \ * PL9 (Part 3 of 3) \ * PLS22 \ * PROJ \ * SHPPT \ * SLIDE \ * SPS3 \ * SPS4 \ * SUN (Part 3 of 4) \ * SUN (Part 4 of 4) \ * TACTICS (Part 1 of 7) \ * TACTICS (Part 3 of 7) \ * TAS1 \ * TAS2 \ * TT128 \ * 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
.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 \ * PL9 (Part 3 of 3) \ * PROJ \ * SHPPT \ * SLIDE \ * SUN (Part 1 of 4) \ * TT128 \ * 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
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: K% [Show more] Type: Workspace Address: &8200 to &85FF (&8500 to &88FF in the Executive version) Category: Workspaces Summary: Ship data blocks 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% * DCS1 uses K% * DEMON uses K% * DOEXP uses K% * Main flight loop (Part 1 of 16) uses K% * Main flight loop (Part 9 of 16) uses K% * Main flight loop (Part 14 of 16) uses K% * Main game loop (Part 4 of 6) uses K% * MAS2 uses K% * MAS3 uses K% * SPS3 uses K% * SPS4 uses K% * TAS4 uses K% * UNIV uses K% * VCSU1 uses K% * WARP uses K%

Contains ship data for all the ships, planets, suns and space stations in our local bubble of universe. The blocks are pointed to by the lookup table at location UNIV. The first 720 bytes of the K% workspace hold ship data on up to 20 ships, with 37 (NI%) bytes per ship. 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.
IF _SNG45 OR _SOURCE_DISC ORG &8200 ELIF _EXECUTIVE ORG &8500 ENDIF .K% SKIP NOSH * NI% \ Ship data blocks and ship line heap \ \ [Show more]
\ \ This variable is used by the following: \ \ * ANGRY \ * DCS1 \ * DEMON \ * DOEXP \ * Main flight loop (Part 1 of 16) \ * Main flight loop (Part 9 of 16) \ * Main flight loop (Part 14 of 16) \ * Main game loop (Part 4 of 6) \ * MAS2 \ * MAS3 \ * SPS3 \ * SPS4 \ * TAS4 \ * UNIV \ * VCSU1 \ * 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: LP [Show more] Type: Workspace Address: &8600 to &91FF (&8900 to &94FF in the Executive version) Category: Workspaces Summary: Variables used for displaying the scrolling text in the demo
Context: See this workspace on its own page References: No direct references to this workspace in this source file
IF _SNG45 OR _SOURCE_DISC ORG &8600 ELIF _EXECUTIVE ORG &8900 ENDIF .LP SKIP 0 \ The start of the LP workspace .X1TB SKIP 256 \ The x-coordinates of the start points for character \ lines in the scroll text \ \ [Show more]
\ \ This variable is used by the following: \ \ * GRS1 \ * SLIDE \ \ 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
.Y1TB SKIP 256 \ The y-coordinates of the start points for character \ lines in the scroll text \ \ [Show more]
\ \ This variable is used by the following: \ \ * GRIDSET \ * GRS1 \ * SLIDE \ \ 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
.X2TB SKIP 256 \ The x-coordinates of the end points for character \ lines in the scroll text \ \ [Show more]
\ \ This variable is used by the following: \ \ * GRS1 \ * SLIDE \ \ 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
.Y2TB SKIP 256 \ The y-coordinates of the end points for character \ lines in the scroll text \ \ [Show more]
\ \ This variable is used by the following: \ \ * GRS1 \ * SLIDE \ \ 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
.X1UB SKIP 256 \ The x-coordinates of the start points for character \ lines in the scroll text (as projected screen \ coordinates) \ \ [Show more]
\ \ This variable is used by the following: \ \ * SLIDE \ \ 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
.Y1UB SKIP 256 \ The y-coordinates of the start points for character \ lines in the scroll text (as projected screen \ coordinates) \ \ [Show more]
\ \ This variable is used by the following: \ \ * SLIDE \ \ 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
.X2UB SKIP 256 \ The x-coordinates of the end points for character \ lines in the scroll text (as projected screen \ coordinates) \ \ [Show more]
\ \ This variable is used by the following: \ \ * SLIDE \ \ 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
.Y2UB SKIP 256 \ The y-coordinates of the end points for character \ lines in the scroll text (as projected screen \ coordinates) \ \ [Show more]
\ \ This variable is used by the following: \ \ * SLIDE \ \ 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
.X1VB SKIP 256 \ The x-coordinates of the start points for the previous \ set of character lines in the scroll text (as \ projected screen coordinates) so they can be erased \ \ [Show more]
\ \ This variable is used by the following: \ \ * SLIDE \ \ 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
.Y1VB SKIP 256 \ The y-coordinates of the start points for the previous \ set of character lines in the scroll text (as \ projected screen coordinates) so they can be erased \ \ [Show more]
\ \ This variable is used by the following: \ \ * SLIDE \ * ZEVB \ \ 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
.X2VB SKIP 256 \ The x-coordinates of the end points for the previous \ set of character lines in the scroll text (as \ projected screen coordinates) so they can be erased \ \ [Show more]
\ \ This variable is used by the following: \ \ * SLIDE \ \ 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
.Y2VB SKIP 256 \ The y-coordinates of the end points for the previous \ set of character lines in the scroll text (as \ projected screen coordinates) so they can be erased \ \ [Show more]
\ \ This variable is used by the following: \ \ * SLIDE \ \ 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