Skip to navigation

Elite on the BBC Micro and NES

Text tokens

[6502 Second Processor version]

ELITE RECURSIVE TEXT TOKEN FILE Produces the binary file WORDS.bin that gets loaded by elite-bcfs.asm. The recursive token table is loaded at &81B0 and is moved down to &0400 as part of elite-source.asm. The table binary also includes the sine and arctan tables, so the three parts end up as follows: * Recursive token table: QQ18 = &0400 to &07C0 * Sine lookup table: SNE = &07C0 to &07DF * Arctan lookup table: ACT = &07E0 to &07FF
ORG CODE_WORDS%
Name: CHAR [Show more] Type: Macro Category: Text Summary: Macro definition for characters in the recursive token table Deep dive: Printing text tokens
Context: See this macro on its own page References: This macro is used as follows: * QQ18 uses CHAR

The following macro is used when building the recursive token table: CHAR 'x' Insert ASCII character "x" To include an apostrophe, use a backtick character, as in CHAR '`'. See the deep dive on "Printing text tokens" for details on how characters are stored in the recursive token table.
Arguments: 'x' The character to insert into the table
MACRO CHAR x IF x = '`' EQUB 39 EOR RE ELSE EQUB x EOR RE ENDIF ENDMACRO
Name: TWOK [Show more] Type: Macro Category: Text Summary: Macro definition for two-letter tokens in the token table Deep dive: Printing text tokens
Context: See this macro on its own page References: This macro is used as follows: * QQ18 uses TWOK

The following macro is used when building the recursive token table: TWOK 'x', 'y' Insert two-letter token "xy" See the deep dive on "Printing text tokens" for details on how two-letter tokens are stored in the recursive token table.
Arguments: 'x' The first letter of the two-letter token to insert into the table 'y' The second letter of the two-letter token to insert into the table
MACRO TWOK t, k IF t = 'A' AND k = 'L' : EQUB 128 EOR RE : ENDIF IF t = 'L' AND k = 'E' : EQUB 129 EOR RE : ENDIF IF t = 'X' AND k = 'E' : EQUB 130 EOR RE : ENDIF IF t = 'G' AND k = 'E' : EQUB 131 EOR RE : ENDIF IF t = 'Z' AND k = 'A' : EQUB 132 EOR RE : ENDIF IF t = 'C' AND k = 'E' : EQUB 133 EOR RE : ENDIF IF t = 'B' AND k = 'I' : EQUB 134 EOR RE : ENDIF IF t = 'S' AND k = 'O' : EQUB 135 EOR RE : ENDIF IF t = 'U' AND k = 'S' : EQUB 136 EOR RE : ENDIF IF t = 'E' AND k = 'S' : EQUB 137 EOR RE : ENDIF IF t = 'A' AND k = 'R' : EQUB 138 EOR RE : ENDIF IF t = 'M' AND k = 'A' : EQUB 139 EOR RE : ENDIF IF t = 'I' AND k = 'N' : EQUB 140 EOR RE : ENDIF IF t = 'D' AND k = 'I' : EQUB 141 EOR RE : ENDIF IF t = 'R' AND k = 'E' : EQUB 142 EOR RE : ENDIF IF t = 'A' AND k = '?' : EQUB 143 EOR RE : ENDIF IF t = 'E' AND k = 'R' : EQUB 144 EOR RE : ENDIF IF t = 'A' AND k = 'T' : EQUB 145 EOR RE : ENDIF IF t = 'E' AND k = 'N' : EQUB 146 EOR RE : ENDIF IF t = 'B' AND k = 'E' : EQUB 147 EOR RE : ENDIF IF t = 'R' AND k = 'A' : EQUB 148 EOR RE : ENDIF IF t = 'L' AND k = 'A' : EQUB 149 EOR RE : ENDIF IF t = 'V' AND k = 'E' : EQUB 150 EOR RE : ENDIF IF t = 'T' AND k = 'I' : EQUB 151 EOR RE : ENDIF IF t = 'E' AND k = 'D' : EQUB 152 EOR RE : ENDIF IF t = 'O' AND k = 'R' : EQUB 153 EOR RE : ENDIF IF t = 'Q' AND k = 'U' : EQUB 154 EOR RE : ENDIF IF t = 'A' AND k = 'N' : EQUB 155 EOR RE : ENDIF IF t = 'T' AND k = 'E' : EQUB 156 EOR RE : ENDIF IF t = 'I' AND k = 'S' : EQUB 157 EOR RE : ENDIF IF t = 'R' AND k = 'I' : EQUB 158 EOR RE : ENDIF IF t = 'O' AND k = 'N' : EQUB 159 EOR RE : ENDIF ENDMACRO
Name: CONT [Show more] Type: Macro Category: Text Summary: Macro definition for control codes in the recursive token table Deep dive: Printing text tokens
Context: See this macro on its own page References: This macro is used as follows: * QQ18 uses CONT

The following macro is used when building the recursive token table: CONT n Insert control code token {n} See the deep dive on "Printing text tokens" for details on how characters are stored in the recursive token table.
Arguments: n The control code to insert into the table
MACRO CONT n EQUB n EOR RE ENDMACRO
Name: RTOK [Show more] Type: Macro Category: Text Summary: Macro definition for recursive tokens in the recursive token table Deep dive: Printing text tokens
Context: See this macro on its own page References: This macro is used as follows: * QQ18 uses RTOK

The following macro is used when building the recursive token table: RTOK n Insert recursive token [n] * Tokens 0-95 get stored as n + 160 * Tokens 128-145 get stored as n - 114 * Tokens 96-127 get stored as n See the deep dive on "Printing text tokens" for details on how recursive tokens are stored in the recursive token table.
Arguments: n The number of the recursive token to insert into the table, in the range 0 to 145
MACRO RTOK n IF n >= 0 AND n <= 95 t = n + 160 ELIF n >= 128 t = n - 114 ELSE t = n ENDIF EQUB t EOR RE ENDMACRO
Name: QQ18 [Show more] Type: Variable Category: Text Summary: The recursive token table for tokens 0-148 Deep dive: Printing text tokens
Context: See this variable on its own page Variations: See code variations for this variable in the different versions References: This variable is used as follows: * COLD uses QQ18 * ex uses QQ18
.QQ18 RTOK 111 \ Token 0: "FUEL SCOOPS ON {beep}" RTOK 131 \ CONT 7 \ Encoded as: "[111][131]{7}" EQUB 0 CHAR ' ' \ Token 1: " CHART" CHAR 'C' \ CHAR 'H' \ Encoded as: " CH<138>T" TWOK 'A', 'R' CHAR 'T' EQUB 0 CHAR 'G' \ Token 2: "GOVERNMENT" CHAR 'O' \ TWOK 'V', 'E' \ Encoded as: "GO<150>RNM<146>T" CHAR 'R' CHAR 'N' CHAR 'M' TWOK 'E', 'N' CHAR 'T' EQUB 0 CHAR 'D' \ Token 3: "DATA ON {selected system name}" TWOK 'A', 'T' \ CHAR 'A' \ Encoded as: "D<145>A[131]{3}" RTOK 131 CONT 3 EQUB 0 TWOK 'I', 'N' \ Token 4: "INVENTORY{cr} TWOK 'V', 'E' \ " CHAR 'N' \ CHAR 'T' \ Encoded as: "<140><150>NT<153>Y{12}" TWOK 'O', 'R' CHAR 'Y' CONT 12 EQUB 0 CHAR 'S' \ Token 5: "SYSTEM" CHAR 'Y' \ CHAR 'S' \ Encoded as: "SYS<156>M" TWOK 'T', 'E' CHAR 'M' EQUB 0 CHAR 'P' \ Token 6: "PRICE" TWOK 'R', 'I' \ TWOK 'C', 'E' \ Encoded as: "P<158><133>" EQUB 0 CONT 2 \ Token 7: "{current system name} MARKET PRICES" CHAR ' ' \ TWOK 'M', 'A' \ Encoded as: "{2} <139>RKET [6]S" CHAR 'R' CHAR 'K' CHAR 'E' CHAR 'T' CHAR ' ' RTOK 6 CHAR 'S' EQUB 0 TWOK 'I', 'N' \ Token 8: "INDUSTRIAL" CHAR 'D' \ TWOK 'U', 'S' \ Encoded as: "<140>D<136>T<158><128>" CHAR 'T' TWOK 'R', 'I' TWOK 'A', 'L' EQUB 0 CHAR 'A' \ Token 9: "AGRICULTURAL" CHAR 'G' \ TWOK 'R', 'I' \ Encoded as: "AG<158>CULTU<148>L" CHAR 'C' CHAR 'U' CHAR 'L' CHAR 'T' CHAR 'U' TWOK 'R', 'A' CHAR 'L' EQUB 0 TWOK 'R', 'I' \ Token 10: "RICH " CHAR 'C' \ CHAR 'H' \ Encoded as: "<158>CH " CHAR ' ' EQUB 0 CHAR 'A' \ Token 11: "AVERAGE " TWOK 'V', 'E' \ TWOK 'R', 'A' \ Encoded as: "A<150><148><131> " TWOK 'G', 'E' CHAR ' ' EQUB 0 CHAR 'P' \ Token 12: "POOR " CHAR 'O' \ TWOK 'O', 'R' \ Encoded as: "PO<153> " CHAR ' ' EQUB 0 TWOK 'M', 'A' \ Token 13: "MAINLY " TWOK 'I', 'N' \ CHAR 'L' \ Encoded as: "<139><140>LY " CHAR 'Y' CHAR ' ' EQUB 0 CHAR 'U' \ Token 14: "UNIT" CHAR 'N' \ CHAR 'I' \ Encoded as: "UNIT" CHAR 'T' EQUB 0 CHAR 'V' \ Token 15: "VIEW " CHAR 'I' \ CHAR 'E' \ Encoded as: "VIEW " CHAR 'W' CHAR ' ' EQUB 0 TWOK 'Q', 'U' \ Token 16: "QUANTITY" TWOK 'A', 'N' \ TWOK 'T', 'I' \ Encoded as: "<154><155><151>TY" CHAR 'T' CHAR 'Y' EQUB 0 TWOK 'A', 'N' \ Token 17: "ANARCHY" TWOK 'A', 'R' \ CHAR 'C' \ Encoded as: "<155><138>CHY" CHAR 'H' CHAR 'Y' EQUB 0 CHAR 'F' \ Token 18: "FEUDAL" CHAR 'E' \ CHAR 'U' \ Encoded as: "FEUD<128>" CHAR 'D' TWOK 'A', 'L' EQUB 0 CHAR 'M' \ Token 19: "MULTI-GOVERNMENT" CHAR 'U' \ CHAR 'L' \ Encoded as: "MUL<151>-[2]" TWOK 'T', 'I' CHAR '-' RTOK 2 EQUB 0 TWOK 'D', 'I' \ Token 20: "DICTATORSHIP" CHAR 'C' \ CHAR 'T' \ Encoded as: "<141>CT<145><153>[25]" TWOK 'A', 'T' TWOK 'O', 'R' RTOK 25 EQUB 0 RTOK 91 \ Token 21: "COMMUNIST" CHAR 'M' \ CHAR 'U' \ Encoded as: "[91]MUN<157>T" CHAR 'N' TWOK 'I', 'S' CHAR 'T' EQUB 0 CHAR 'C' \ Token 22: "CONFEDERACY" TWOK 'O', 'N' \ CHAR 'F' \ Encoded as: "C<159>F<152><144>ACY" TWOK 'E', 'D' TWOK 'E', 'R' CHAR 'A' CHAR 'C' CHAR 'Y' EQUB 0 CHAR 'D' \ Token 23: "DEMOCRACY" CHAR 'E' \ CHAR 'M' \ Encoded as: "DEMOC<148>CY" CHAR 'O' CHAR 'C' TWOK 'R', 'A' CHAR 'C' CHAR 'Y' EQUB 0 CHAR 'C' \ Token 24: "CORPORATE STATE" TWOK 'O', 'R' \ CHAR 'P' \ Encoded as: "C<153>P<153><145>E [43]<145>E" TWOK 'O', 'R' TWOK 'A', 'T' CHAR 'E' CHAR ' ' RTOK 43 TWOK 'A', 'T' CHAR 'E' EQUB 0 CHAR 'S' \ Token 25: "SHIP" CHAR 'H' \ CHAR 'I' \ Encoded as: "SHIP" CHAR 'P' EQUB 0 CHAR 'P' \ Token 26: "PRODUCT" RTOK 94 \ CHAR 'D' \ Encoded as: "P[94]]DUCT" CHAR 'U' CHAR 'C' CHAR 'T' EQUB 0 CHAR ' ' \ Token 27: " LASER" TWOK 'L', 'A' \ CHAR 'S' \ Encoded as: " <149>S<144>" TWOK 'E', 'R' EQUB 0 CHAR 'H' \ Token 28: "HUMAN COLONIAL" CHAR 'U' \ CHAR 'M' \ Encoded as: "HUM<155> COL<159>I<128>" TWOK 'A', 'N' CHAR ' ' CHAR 'C' CHAR 'O' CHAR 'L' TWOK 'O', 'N' CHAR 'I' TWOK 'A', 'L' EQUB 0 CHAR 'H' \ Token 29: "HYPERSPACE " CHAR 'Y' \ CHAR 'P' \ Encoded as: "HYP<144>SPA<133> " TWOK 'E', 'R' CHAR 'S' CHAR 'P' CHAR 'A' TWOK 'C', 'E' CHAR ' ' EQUB 0 CHAR 'S' \ Token 30: "SHORT RANGE CHART" CHAR 'H' \ TWOK 'O', 'R' \ Encoded as: "SH<153>T [42][1]" CHAR 'T' CHAR ' ' RTOK 42 RTOK 1 EQUB 0 TWOK 'D', 'I' \ Token 31: "DISTANCE" RTOK 43 \ TWOK 'A', 'N' \ Encoded as: "<141>[43]<155><133>" TWOK 'C', 'E' EQUB 0 CHAR 'P' \ Token 32: "POPULATION" CHAR 'O' \ CHAR 'P' \ Encoded as: "POPUL<145>I<159>" CHAR 'U' CHAR 'L' TWOK 'A', 'T' CHAR 'I' TWOK 'O', 'N' EQUB 0 CHAR 'G' \ Token 33: "GROSS PRODUCTIVITY" RTOK 94 \ CHAR 'S' \ Encoded as: "G[94]SS [26]IVITY" CHAR 'S' CHAR ' ' RTOK 26 CHAR 'I' CHAR 'V' CHAR 'I' CHAR 'T' CHAR 'Y' EQUB 0 CHAR 'E' \ Token 34: "ECONOMY" CHAR 'C' \ TWOK 'O', 'N' \ Encoded as: "EC<159>OMY" CHAR 'O' CHAR 'M' CHAR 'Y' EQUB 0 IF _SNG45 OR _SOURCE_DISC CHAR ' ' \ Token 35: " LIGHT YEARS" CHAR 'L' \ CHAR 'I' \ Encoded as: " LIGHT YE<138>S" CHAR 'G' CHAR 'H' CHAR 'T' CHAR ' ' CHAR 'Y' CHAR 'E' TWOK 'A', 'R' CHAR 'S' EQUB 0 ELIF _EXECUTIVE CHAR ' ' \ Token 35: " L.Y." CHAR 'L' \ CHAR '.' \ Encoded as: " L.Y." CHAR 'Y' CHAR '.' EQUB 0 ENDIF TWOK 'T', 'E' \ Token 36: "TECH.LEVEL" CHAR 'C' \ CHAR 'H' \ Encoded as: "<156>CH.<129><150>L" CHAR '.' TWOK 'L', 'E' TWOK 'V', 'E' CHAR 'L' EQUB 0 CHAR 'C' \ Token 37: "CASH" CHAR 'A' \ CHAR 'S' \ Encoded as: "CASH" CHAR 'H' EQUB 0 CHAR ' ' \ Token 38: " BILLION" TWOK 'B', 'I' \ RTOK 129 \ Encoded as: " <134>[129]I<159>" CHAR 'I' TWOK 'O', 'N' EQUB 0 RTOK 122 \ Token 39: "GALACTIC CHART{galaxy number}" RTOK 1 \ CONT 1 \ Encoded as: "[122][1]{1}" EQUB 0 CHAR 'T' \ Token 40: "TARGET LOST" TWOK 'A', 'R' \ TWOK 'G', 'E' \ Encoded as: "T<138><131>T LO[43]" CHAR 'T' CHAR ' ' CHAR 'L' CHAR 'O' RTOK 43 EQUB 0 RTOK 106 \ Token 41: "MISSILE JAMMED" CHAR ' ' \ CHAR 'J' \ Encoded as: "[106] JAMM<152>" CHAR 'A' CHAR 'M' CHAR 'M' TWOK 'E', 'D' EQUB 0 CHAR 'R' \ Token 42: "RANGE" TWOK 'A', 'N' \ TWOK 'G', 'E' \ Encoded as: "R<155><131>" EQUB 0 CHAR 'S' \ Token 43: "ST" CHAR 'T' \ EQUB 0 \ Encoded as: "ST" RTOK 16 \ Token 44: "QUANTITY OF " CHAR ' ' \ CHAR 'O' \ Encoded as: "[16] OF " CHAR 'F' CHAR ' ' EQUB 0 CHAR 'S' \ Token 45: "SELL" CHAR 'E' \ RTOK 129 \ Encoded as: "SE[129]" EQUB 0 CHAR ' ' \ Token 46: " CARGO{sentence case}" CHAR 'C' \ TWOK 'A', 'R' \ Encoded as: " C<138>GO{6}" CHAR 'G' CHAR 'O' CONT 6 EQUB 0 CHAR 'E' \ Token 47: "EQUIP" TWOK 'Q', 'U' \ CHAR 'I' \ Encoded as: "E<154>IP" CHAR 'P' EQUB 0 CHAR 'F' \ Token 48: "FOOD" CHAR 'O' \ CHAR 'O' \ Encoded as: "FOOD" CHAR 'D' EQUB 0 TWOK 'T', 'E' \ Token 49: "TEXTILES" CHAR 'X' \ TWOK 'T', 'I' \ Encoded as: "<156>X<151>L<137>" CHAR 'L' TWOK 'E', 'S' EQUB 0 TWOK 'R', 'A' \ Token 50: "RADIOACTIVES" TWOK 'D', 'I' \ CHAR 'O' \ Encoded as: "<148><141>OAC<151><150>S" CHAR 'A' CHAR 'C' TWOK 'T', 'I' TWOK 'V', 'E' CHAR 'S' EQUB 0 CHAR 'S' \ Token 51: "SLAVES" TWOK 'L', 'A' \ TWOK 'V', 'E' \ Encoded as: "S<149><150>S" CHAR 'S' EQUB 0 CHAR 'L' \ Token 52: "LIQUOR/WINES" CHAR 'I' \ TWOK 'Q', 'U' \ Encoded as: "LI<154><153>/W<140><137>" TWOK 'O', 'R' CHAR '/' CHAR 'W' TWOK 'I', 'N' TWOK 'E', 'S' EQUB 0 CHAR 'L' \ Token 53: "LUXURIES" CHAR 'U' \ CHAR 'X' \ Encoded as: "LUXU<158><137>" CHAR 'U' TWOK 'R', 'I' TWOK 'E', 'S' EQUB 0 CHAR 'N' \ Token 54: "NARCOTICS" TWOK 'A', 'R' \ CHAR 'C' \ Encoded as: "N<138>CO<151>CS" CHAR 'O' TWOK 'T', 'I' CHAR 'C' CHAR 'S' EQUB 0 RTOK 91 \ Token 55: "COMPUTERS" CHAR 'P' \ CHAR 'U' \ Encoded as: "[91]PUT<144>S" CHAR 'T' TWOK 'E', 'R' CHAR 'S' EQUB 0 TWOK 'M', 'A' \ Token 56: "MACHINERY" CHAR 'C' \ CHAR 'H' \ Encoded as: "<139>CH<140><144>Y" TWOK 'I', 'N' TWOK 'E', 'R' CHAR 'Y' EQUB 0 CHAR 'A' \ Token 57: "ALLOYS" CHAR 'L' \ CHAR 'L' \ Encoded as: "ALLOYS" CHAR 'O' CHAR 'Y' CHAR 'S' EQUB 0 CHAR 'F' \ Token 58: "FIREARMS" CHAR 'I' \ TWOK 'R', 'E' \ Encoded as: "FI<142><138>MS" TWOK 'A', 'R' CHAR 'M' CHAR 'S' EQUB 0 CHAR 'F' \ Token 59: "FURS" CHAR 'U' \ CHAR 'R' \ Encoded as: "FURS" CHAR 'S' EQUB 0 CHAR 'M' \ Token 60: "MINERALS" TWOK 'I', 'N' \ TWOK 'E', 'R' \ Encoded as: "M<140><144><128>S" TWOK 'A', 'L' CHAR 'S' EQUB 0 CHAR 'G' \ Token 61: "GOLD" CHAR 'O' \ CHAR 'L' \ Encoded as: "GOLD" CHAR 'D' EQUB 0 CHAR 'P' \ Token 62: "PLATINUM" CHAR 'L' \ TWOK 'A', 'T' \ Encoded as: "PL<145><140>UM" TWOK 'I', 'N' CHAR 'U' CHAR 'M' EQUB 0 TWOK 'G', 'E' \ Token 63: "GEM-STONES" CHAR 'M' \ CHAR '-' \ Encoded as: "<131>M-[43]<159><137>" RTOK 43 TWOK 'O', 'N' TWOK 'E', 'S' EQUB 0 TWOK 'A', 'L' \ Token 64: "ALIEN ITEMS" CHAR 'I' \ TWOK 'E', 'N' \ Encoded as: "<128>I<146> [127]S" CHAR ' ' RTOK 127 CHAR 'S' EQUB 0 CONT 12 \ Token 65: "{cr} CHAR '1' \ 10{cash} CR{cr} CHAR '0' \ 5{cash} CR{cr} CONT 0 \ " CHAR '5' \ CONT 0 \ Encoded as: "{12}10{0}5{0}" EQUB 0 CHAR ' ' \ Token 66: " CR" CHAR 'C' \ CHAR 'R' \ Encoded as: " CR" EQUB 0 CHAR 'L' \ Token 67: "LARGE" TWOK 'A', 'R' \ TWOK 'G', 'E' \ Encoded as: "L<138><131>" EQUB 0 CHAR 'F' \ Token 68: "FIERCE" CHAR 'I' \ TWOK 'E', 'R' \ Encoded as: "FI<144><133>" TWOK 'C', 'E' EQUB 0 CHAR 'S' \ Token 69: "SMALL" TWOK 'M', 'A' \ RTOK 129 \ Encoded as: "S<139>[129]" EQUB 0 CHAR 'G' \ Token 70: "GREEN" TWOK 'R', 'E' \ TWOK 'E', 'N' \ Encoded as: "G<142><146>" EQUB 0 CHAR 'R' \ Token 71: "RED" TWOK 'E', 'D' \ EQUB 0 \ Encoded as: "R<152>" CHAR 'Y' \ Token 72: "YELLOW" CHAR 'E' \ RTOK 129 \ Encoded as: "YE[129]OW" CHAR 'O' CHAR 'W' EQUB 0 CHAR 'B' \ Token 73: "BLUE" CHAR 'L' \ CHAR 'U' \ Encoded as: "BLUE" CHAR 'E' EQUB 0 CHAR 'B' \ Token 74: "BLACK" TWOK 'L', 'A' \ CHAR 'C' \ Encoded as: "B<149>CK" CHAR 'K' EQUB 0 RTOK 136 \ Token 75: "HARMLESS" EQUB 0 \ \ Encoded as: "[136]" CHAR 'S' \ Token 76: "SLIMY" CHAR 'L' \ CHAR 'I' \ Encoded as: "SLIMY" CHAR 'M' CHAR 'Y' EQUB 0 CHAR 'B' \ Token 77: "BUG-EYED" CHAR 'U' \ CHAR 'G' \ Encoded as: "BUG-EY<152>" CHAR '-' CHAR 'E' CHAR 'Y' TWOK 'E', 'D' EQUB 0 CHAR 'H' \ Token 78: "HORNED" TWOK 'O', 'R' \ CHAR 'N' \ Encoded as: "H<153>N<152>" TWOK 'E', 'D' EQUB 0 CHAR 'B' \ Token 79: "BONY" TWOK 'O', 'N' \ CHAR 'Y' \ Encoded as: "B<159>Y" EQUB 0 CHAR 'F' \ Token 80: "FAT" TWOK 'A', 'T' \ EQUB 0 \ Encoded as: "F<145>" CHAR 'F' \ Token 81: "FURRY" CHAR 'U' \ CHAR 'R' \ Encoded as: "FURRY" CHAR 'R' CHAR 'Y' EQUB 0 RTOK 94 \ Token 82: "RODENT" CHAR 'D' \ TWOK 'E', 'N' \ Encoded as: "[94]D<146>T" CHAR 'T' EQUB 0 CHAR 'F' \ Token 83: "FROG" RTOK 94 \ CHAR 'G' \ Encoded as: "F[94]G" EQUB 0 CHAR 'L' \ Token 84: "LIZARD" CHAR 'I' \ TWOK 'Z', 'A' \ Encoded as: "LI<132>RD" CHAR 'R' CHAR 'D' EQUB 0 CHAR 'L' \ Token 85: "LOBSTER" CHAR 'O' \ CHAR 'B' \ Encoded as: "LOB[43]<144>" RTOK 43 TWOK 'E', 'R' EQUB 0 TWOK 'B', 'I' \ Token 86: "BIRD" CHAR 'R' \ CHAR 'D' \ Encoded as: "<134>RD" EQUB 0 CHAR 'H' \ Token 87: "HUMANOID" CHAR 'U' \ CHAR 'M' \ Encoded as: "HUM<155>OID" TWOK 'A', 'N' CHAR 'O' CHAR 'I' CHAR 'D' EQUB 0 CHAR 'F' \ Token 88: "FELINE" CHAR 'E' \ CHAR 'L' \ Encoded as: "FEL<140>E" TWOK 'I', 'N' CHAR 'E' EQUB 0 TWOK 'I', 'N' \ Token 89: "INSECT" CHAR 'S' \ CHAR 'E' \ Encoded as: "<140>SECT" CHAR 'C' CHAR 'T' EQUB 0 RTOK 11 \ Token 90: "AVERAGE RADIUS" TWOK 'R', 'A' \ TWOK 'D', 'I' \ Encoded as: "[11]<148><141><136>" TWOK 'U', 'S' EQUB 0 CHAR 'C' \ Token 91: "COM" CHAR 'O' \ CHAR 'M' \ Encoded as: "COM" EQUB 0 RTOK 91 \ Token 92: "COMMANDER" CHAR 'M' \ TWOK 'A', 'N' \ Encoded as: "[91]M<155>D<144>" CHAR 'D' TWOK 'E', 'R' EQUB 0 CHAR ' ' \ Token 93: " DESTROYED" CHAR 'D' \ TWOK 'E', 'S' \ Encoded as: " D<137>T[94]Y<152>" CHAR 'T' RTOK 94 CHAR 'Y' TWOK 'E', 'D' EQUB 0 CHAR 'R' \ Token 94: "RO" CHAR 'O' \ EQUB 0 \ Encoded as: "RO" RTOK 14 \ Token 95: "UNIT QUANTITY{cr} CHAR ' ' \ PRODUCT UNIT PRICE FOR SALE{cr}{lf} CHAR ' ' \ " RTOK 16 \ CONT 12 \ Encoded as: "[14] [16]{13} [26] [14] [6] F<153> CHAR ' ' \ SA<129>{12}{10}" RTOK 26 CHAR ' ' CHAR ' ' CHAR ' ' RTOK 14 CHAR ' ' RTOK 6 CHAR ' ' CHAR 'F' TWOK 'O', 'R' CHAR ' ' CHAR 'S' CHAR 'A' TWOK 'L', 'E' CONT 12 CONT 10 EQUB 0 CHAR 'F' \ Token 96: "FRONT" CHAR 'R' \ TWOK 'O', 'N' \ Encoded as: "FR<159>T" CHAR 'T' EQUB 0 TWOK 'R', 'E' \ Token 97: "REAR" TWOK 'A', 'R' \ EQUB 0 \ Encoded as: "<142><138>" TWOK 'L', 'E' \ Token 98: "LEFT" CHAR 'F' \ CHAR 'T' \ Encoded as: "<129>FT" EQUB 0 TWOK 'R', 'I' \ Token 99: "RIGHT" CHAR 'G' \ CHAR 'H' \ Encoded as: "<158>GHT" CHAR 'T' EQUB 0 IF _SNG45 OR _SOURCE_DISC RTOK 121 \ Token 100: "ENERGY LOW{beep}" CHAR 'L' \ CHAR 'O' \ Encoded as: "[121]LOW{7}" CHAR 'W' CONT 7 EQUB 0 ELIF _EXECUTIVE RTOK 121 \ Token 100: "ENERGY LOW,SIR{beep}" CHAR 'L' \ CHAR 'O' \ Encoded as: "[121]LOW,SIR{7}" CHAR 'W' CHAR ',' CHAR 'S' CHAR 'I' CHAR 'R' CONT 7 EQUB 0 ENDIF RTOK 99 \ Token 101: "RIGHT ON COMMANDER!" RTOK 131 \ RTOK 92 \ Encoded as: "[99][131][92]!" CHAR '!' EQUB 0 CHAR 'E' \ Token 102: "EXTRA " CHAR 'X' \ CHAR 'T' \ Encoded as: "EXT<148> " TWOK 'R', 'A' CHAR ' ' EQUB 0 CHAR 'P' \ Token 103: "PULSE LASER" CHAR 'U' \ CHAR 'L' \ Encoded as: "PULSE[27]" CHAR 'S' CHAR 'E' RTOK 27 EQUB 0 TWOK 'B', 'E' \ Token 104: "BEAM LASER" CHAR 'A' \ CHAR 'M' \ Encoded as: "<147>AM[27]" RTOK 27 EQUB 0 CHAR 'F' \ Token 105: "FUEL" CHAR 'U' \ CHAR 'E' \ Encoded as: "FUEL" CHAR 'L' EQUB 0 CHAR 'M' \ Token 106: "MISSILE" TWOK 'I', 'S' \ CHAR 'S' \ Encoded as: "M<157>SI<129>" CHAR 'I' TWOK 'L', 'E' EQUB 0 RTOK 67 \ Token 107: "LARGE CARGO{sentence case} BAY" RTOK 46 \ CHAR ' ' \ Encoded as: "[67][46] BAY" CHAR 'B' CHAR 'A' CHAR 'Y' EQUB 0 CHAR 'E' \ Token 108: "E.C.M.SYSTEM" CHAR '.' \ CHAR 'C' \ Encoded as: "E.C.M.[5]" CHAR '.' CHAR 'M' CHAR '.' RTOK 5 EQUB 0 RTOK 102 \ Token 109: "EXTRA PULSE LASERS" RTOK 103 \ CHAR 'S' \ Encoded as: "[102][103]S" EQUB 0 RTOK 102 \ Token 110: "EXTRA BEAM LASERS" RTOK 104 \ CHAR 'S' \ Encoded as: "[102][104]S" EQUB 0 RTOK 105 \ Token 111: "FUEL SCOOPS" CHAR ' ' \ CHAR 'S' \ Encoded as: "[105] SCOOPS" CHAR 'C' CHAR 'O' CHAR 'O' CHAR 'P' CHAR 'S' EQUB 0 TWOK 'E', 'S' \ Token 112: "ESCAPE POD" CHAR 'C' \ CHAR 'A' \ Encoded as: "<137>CAPE POD" CHAR 'P' CHAR 'E' CHAR ' ' CHAR 'P' CHAR 'O' CHAR 'D' EQUB 0 RTOK 121 \ Token 113: "ENERGY BOMB" CHAR 'B' \ CHAR 'O' \ Encoded as: "[121]BOMB" CHAR 'M' CHAR 'B' EQUB 0 IF _SNG45 OR _EXECUTIVE RTOK 121 \ Token 114: "ENERGY UNIT" RTOK 14 \ EQUB 0 \ Encoded as: "[121][14]" ELIF _SOURCE_DISC RTOK 102 \ Token 114: "EXTRA ENERGY UNIT" RTOK 121 \ RTOK 14 \ Encoded as: "[102][121][14]" EQUB 0 ENDIF CHAR 'D' \ Token 115: "DOCKING COMPUTERS" CHAR 'O' \ CHAR 'C' \ Encoded as: "DOCK<140>G [55]" CHAR 'K' TWOK 'I', 'N' CHAR 'G' CHAR ' ' RTOK 55 EQUB 0 RTOK 122 \ Token 116: "GALACTIC HYPERSPACE " CHAR ' ' \ RTOK 29 \ Encoded as: "[122] [29]" EQUB 0 CHAR 'M' \ Token 117: "MILITARY LASER" CHAR 'I' \ CHAR 'L' \ Encoded as: "MILIT<138>Y [27]" CHAR 'I' CHAR 'T' TWOK 'A', 'R' CHAR 'Y' CHAR ' ' RTOK 27 EQUB 0 CHAR 'M' \ Token 118: "MINING LASER" TWOK 'I', 'N' \ TWOK 'I', 'N' \ Encoded as: "M<140><140>G [27]" CHAR 'G' CHAR ' ' RTOK 27 EQUB 0 RTOK 37 \ Token 119: "CASH:{cash} CR{cr} CHAR ':' \ " CONT 0 \ EQUB 0 \ Encoded as: "[37]:{0}" IF _SNG45 OR _SOURCE_DISC TWOK 'I', 'N' \ Token 120: "INCOMING MISSILE" RTOK 91 \ TWOK 'I', 'N' \ Encoded as: "<140>[91]<140>G [106]" CHAR 'G' CHAR ' ' RTOK 106 EQUB 0 ELIF _EXECUTIVE TWOK 'I', 'N' \ Token 120: "INCOMING MISSILE,SIR" RTOK 91 \ TWOK 'I', 'N' \ Encoded as: "<140>[91]<140>G [106],SIR" CHAR 'G' CHAR ' ' RTOK 106 CHAR ',' CHAR 'S' CHAR 'I' CHAR 'R' EQUB 0 ENDIF TWOK 'E', 'N' \ Token 121: "ENERGY " TWOK 'E', 'R' \ CHAR 'G' \ Encoded as: "<146><144>GY " CHAR 'Y' CHAR ' ' EQUB 0 CHAR 'G' \ Token 122: "GALACTIC" CHAR 'A' \ TWOK 'L', 'A' \ Encoded as: "GA<149>C<151>C" CHAR 'C' TWOK 'T', 'I' CHAR 'C' EQUB 0 RTOK 115 \ Token 123: "DOCKING COMPUTERS ON" CHAR ' ' \ CHAR 'O' \ Encoded as: "[115] ON" CHAR 'N' EQUB 0 CHAR 'A' \ Token 124: "ALL" RTOK 129 \ EQUB 0 \ Encoded as: "A[129]" CONT 5 \ Token 125: "FUEL: {fuel level} LIGHT YEARS{cr} TWOK 'L', 'E' \ CASH:{cash} CR{cr} CHAR 'G' \ LEGAL STATUS:" TWOK 'A', 'L' \ CHAR ' ' \ Encoded as: "{5}<129>G<128> [43]<145><136>:" RTOK 43 TWOK 'A', 'T' TWOK 'U', 'S' CHAR ':' EQUB 0 RTOK 92 \ Token 126: "COMMANDER {commander name}{cr} CHAR ' ' \ {cr} CONT 4 \ {cr} CONT 12 \ {sentence case}PRESENT SYSTEM{tab to CONT 12 \ column 21}:{current system name}{cr} CONT 12 \ HYPERSPACE SYSTEM{tab to column 21}: CONT 6 \ {selected system name}{cr} RTOK 145 \ CONDITION{tab to column 21}:" CHAR ' ' \ RTOK 5 \ Encoded as: "[92] {4}{12}{12}{12}{6}[145] [5]{9}{2} CONT 9 \ {12}[29][5]{9}{3}{13}C<159><141><151> CONT 2 \ <159>{9}" CONT 12 RTOK 29 RTOK 5 CONT 9 CONT 3 CONT 12 CHAR 'C' TWOK 'O', 'N' TWOK 'D', 'I' TWOK 'T', 'I' TWOK 'O', 'N' CONT 9 EQUB 0 CHAR 'I' \ Token 127: "ITEM" TWOK 'T', 'E' \ CHAR 'M' \ Encoded as: "I<156>M" EQUB 0 EQUB 0 \ Token 128: "" \ \ Encoded as: "" CHAR 'L' \ Token 129: "LL" CHAR 'L' \ EQUB 0 \ Encoded as: "LL" TWOK 'R', 'A' \ Token 130: "RATING:" TWOK 'T', 'I' \ CHAR 'N' \ Encoded as: "<148><151>NG:" CHAR 'G' CHAR ':' EQUB 0 CHAR ' ' \ Token 131: " ON " TWOK 'O', 'N' \ CHAR ' ' \ Encoded as: " <159> " EQUB 0 CONT 12 \ Token 132: "{cr} CONT 8 \ {all caps}EQUIPMENT: {sentence case}" RTOK 47 \ CHAR 'M' \ Encoded as: "{12}{8}[47]M<146>T:{6}" TWOK 'E', 'N' CHAR 'T' CHAR ':' CONT 6 EQUB 0 CHAR 'C' \ Token 133: "CLEAN" TWOK 'L', 'E' \ TWOK 'A', 'N' \ Encoded as: "C<129><155>" EQUB 0 CHAR 'O' \ Token 134: "OFFENDER" CHAR 'F' \ CHAR 'F' \ Encoded as: "OFF<146>D<144>" TWOK 'E', 'N' CHAR 'D' TWOK 'E', 'R' EQUB 0 CHAR 'F' \ Token 135: "FUGITIVE" CHAR 'U' \ CHAR 'G' \ Encoded as: "FUGI<151><150>" CHAR 'I' TWOK 'T', 'I' TWOK 'V', 'E' EQUB 0 CHAR 'H' \ Token 136: "HARMLESS" TWOK 'A', 'R' \ CHAR 'M' \ Encoded as: "H<138>M<129>SS" TWOK 'L', 'E' CHAR 'S' CHAR 'S' EQUB 0 CHAR 'M' \ Token 137: "MOSTLY HARMLESS" CHAR 'O' \ RTOK 43 \ Encoded as: "MO[43]LY [136]" CHAR 'L' CHAR 'Y' CHAR ' ' RTOK 136 EQUB 0 RTOK 12 \ Token 138: "POOR " EQUB 0 \ \ Encoded as: "[12]" RTOK 11 \ Token 139: "AVERAGE " EQUB 0 \ \ Encoded as: "[11]" CHAR 'A' \ Token 140: "ABOVE AVERAGE " CHAR 'B' \ CHAR 'O' \ Encoded as: "ABO<150> [11]" TWOK 'V', 'E' CHAR ' ' RTOK 11 EQUB 0 RTOK 91 \ Token 141: "COMPETENT" CHAR 'P' \ CHAR 'E' \ Encoded as: "[91]PET<146>T" CHAR 'T' TWOK 'E', 'N' CHAR 'T' EQUB 0 CHAR 'D' \ Token 142: "DANGEROUS" TWOK 'A', 'N' \ TWOK 'G', 'E' \ Encoded as: "D<155><131>[94]<136>" RTOK 94 TWOK 'U', 'S' EQUB 0 CHAR 'D' \ Token 143: "DEADLY" CHAR 'E' \ CHAR 'A' \ Encoded as: "DEADLY" CHAR 'D' CHAR 'L' CHAR 'Y' EQUB 0 CHAR '-' \ Token 144: "---- E L I T E ----" CHAR '-' \ CHAR '-' \ Encoded as: "---- E L I T E ----" CHAR '-' CHAR ' ' CHAR 'E' CHAR ' ' CHAR 'L' CHAR ' ' CHAR 'I' CHAR ' ' CHAR 'T' CHAR ' ' CHAR 'E' CHAR ' ' CHAR '-' CHAR '-' CHAR '-' CHAR '-' EQUB 0 CHAR 'P' \ Token 145: "PRESENT" TWOK 'R', 'E' \ CHAR 'S' \ Encoded as: "P<142>S<146>T" TWOK 'E', 'N' CHAR 'T' EQUB 0 CONT 8 \ Token 146: "{all caps}GAME OVER" CHAR 'G' \ CHAR 'A' \ Encoded as: "{8}GAME O<150>R" CHAR 'M' CHAR 'E' CHAR ' ' CHAR 'O' TWOK 'V', 'E' CHAR 'R' EQUB 0 IF _SNG45 EQUB &00, &00 \ These bytes appear to be unused and just contain EQUB &E4, &63 \ random workspace noise left over from the BBC Micro EQUB &A5 \ assembly process ELIF _EXECUTIVE EQUB &00, &00 \ These bytes appear to be unused and just contain EQUB &A5 \ random workspace noise left over from the BBC Micro \ assembly process ELIF _SOURCE_DISC SKIP 4 \ These bytes appear to be unused ENDIF
Name: SNE [Show more] Type: Variable Category: Maths (Geometry) Summary: Sine/cosine table Deep dive: The sine, cosine and arctan tables Drawing circles Drawing ellipses
Context: See this variable on its own page References: This variable is used as follows: * FMLTU2 uses SNE * PLS22 uses SNE

This lookup table contains sine values for the first half of a circle, from 0 to 180 degrees (0 to PI radians). In terms of circle or ellipse line segments, there are 64 segments in a circle, so this contains sine values for segments 0 to 31. In terms of segments, to calculate the sine of the angle at segment x, we look up the value in SNE + x, and to calculate the cosine of the angle we look up the value in SNE + ((x + 16) mod 32). In terms of radians, to calculate the following: sin(theta) * 256 where theta is in radians, we look up the value in: SNE + (theta * 10) To calculate the following: cos(theta) * 256 where theta is in radians, look up the value in: SNE + ((theta * 10) + 16) mod 32 Theta must be between 0 and 3.1 radians, so theta * 10 is between 0 and 31.
.SNE FOR I%, 0, 31 N = ABS(SIN((I% / 64) * 2 * PI)) IF N >= 1 B% = 255 ELSE B% = INT(256 * N + 0.5) ENDIF EQUB B% NEXT
Name: ACT [Show more] Type: Variable Category: Maths (Geometry) Summary: Arctan table Deep dive: The sine, cosine and arctan tables
Context: See this variable on its own page References: This variable is used as follows: * ARCTAN uses ACT

This table contains lookup values for arctangent calculations involving angles in the range 0 to 45 degrees (or 0 to PI / 4 radians). To calculate the value of theta in the following: theta = arctan(t) where 0 <= t < 1, we look up the value in: ACT + (t * 32) The result will be an integer representing the angle in radians, where 256 represents a full circle of 360 degrees (2 * PI radians). The result of the lookup will therefore be an integer in the range 0 to 31, as this represents 0 to 45 degrees (0 to PI / 4 radians). The table does not support values of t >= 1 or t < 0 directly, so if we need to calculate the arctangent for an angle greater than 45 degrees, we can apply the following calculation to the result from the table: * For t > 1, arctan(t) = 64 - arctan(1 / t) For negative values of t where -1 < t < 0, we can apply the following calculation to the result from the table: * For t < 0, arctan(-t) = 128 - arctan(t) Finally, if t < -1, we can do the first calculation to get arctan(|t|), and the second to get arctan(-|t|).
.ACT FOR I%, 0, 31 EQUB INT((128 / PI) * ATN(I% / 32) + 0.5) NEXT
Save WORDS.bin
PRINT "WORDS" PRINT "Assembled at ", ~CODE_WORDS% PRINT "Ends at ", ~P% PRINT "Code size is ", ~(P% - CODE_WORDS%) PRINT "Execute at ", ~LOAD_WORDS% PRINT "Reload at ", ~LOAD_WORDS% PRINT "S.WORDS ",~CODE_WORDS%," ",~P%," ",~LOAD_WORDS%," ",~LOAD_WORDS% SAVE "3-assembled-output/WORDS.bin", CODE_WORDS%, P%, LOAD_WORDS%
Name: UP [Show more] Type: Workspace Address: &0800 to &0974 Category: Workspaces Summary: Ship slots, variables
Context: See this workspace on its own page Variations: See code variations for this workspace in the different versions References: No direct references to this workspace in this source file
ORG &0800 .UP SKIP 0 \ The start of the UP workspace \.QQ16 SKIP 65 \ This QQ16 label is present in the original source, but \ it is overridden by the QQ16 label in the Elite A \ section, so this declaration has no effect. BeebAsm \ does not allow labels to be defined twice, so this one \ is commented out .KL SKIP 1 \ The following bytes implement a key logger that \ enables Elite to scan for concurrent key presses of \ the primary flight keys, plus a secondary flight key \ \ See the deep dive on "The key logger" for more details \ \ If a key is being pressed that is not in the keyboard \ table at KYTB, it can be stored here (as seen in \ routine DK4, for example) \ \ [Show more]
\ \ This variable is used by the following: \ \ * DK4 \ * DKJ1 \ * DOKEY \ * TT17 \ * U% \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KY1 SKIP 1 \ "?" is being pressed \ \ * 0 = no \ \ * Non-zero = yes \ \ [Show more]
\ \ This variable is used by the following: \ \ * DOKEY \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KY2 SKIP 1 \ Space is being pressed \ \ * 0 = no \ \ * Non-zero = yes \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KY3 SKIP 1 \ "<" is being pressed \ \ * 0 = no \ \ * Non-zero = yes \ \ [Show more]
\ \ This variable is used by the following: \ \ * DOKEY \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KY4 SKIP 1 \ ">" is being pressed \ \ * 0 = no \ \ * Non-zero = yes .KY5 SKIP 1 \ "X" is being pressed \ \ * 0 = no \ \ * Non-zero = yes \ \ [Show more]
\ \ This variable is used by the following: \ \ * DOKEY \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KY6 SKIP 1 \ "S" is being pressed \ \ * 0 = no \ \ * Non-zero = yes .KY7 SKIP 1 \ "A" is being pressed \ \ * 0 = no \ \ * Non-zero = yes \ \ This is also set when the joystick fire button has \ been pressed \ \ [Show more]
\ \ This variable is used by the following: \ \ * DKJ1 \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KY12 SKIP 1 \ TAB is being pressed \ \ * 0 = no \ \ * Non-zero = yes \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KY13 SKIP 1 \ ESCAPE is being pressed \ \ * 0 = no \ \ * Non-zero = yes \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KY14 SKIP 1 \ "T" is being pressed \ \ * 0 = no \ \ * Non-zero = yes \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KY15 SKIP 1 \ "U" is being pressed \ \ * 0 = no \ \ * Non-zero = yes \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KY16 SKIP 1 \ "M" is being pressed \ \ * 0 = no \ \ * Non-zero = yes \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KY17 SKIP 1 \ "E" is being pressed \ \ * 0 = no \ \ * Non-zero = yes \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KY18 SKIP 1 \ "J" is being pressed \ \ * 0 = no \ \ * Non-zero = yes \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KY19 SKIP 1 \ "C" is being pressed \ \ * 0 = no \ \ * Non-zero = yes \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.KY20 SKIP 1 \ "P" is being pressed \ \ * 0 = no \ \ * Non-zero = yes \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.FRIN SKIP NOSH + 1 \ Slots for the ships in the local bubble of universe \ \ There are #NOSH + 1 slots, but the ship-spawning \ routine at NWSHP only populates #NOSH of them, so \ there are 21 slots but only 20 are used for ships \ (the last slot is effectively used as a null \ terminator when shuffling the slots down in the \ KILLSHP routine) \ \ See the deep dive on "The local bubble of universe" \ for details of how Elite stores the local universe in \ FRIN, UNIV and K% \ \ [Show more]
\ \ This variable is used by the following: \ \ * DEATH \ * FRMIS \ * KILLSHP \ * KS2 \ * KS4 \ * Main flight loop (Part 4 of 16) \ * NWSHP \ * NWSPS \ * STATUS \ * WARP \ * WPSHPS \ * ZERO \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.MANY SKIP SST \ The number of ships of each type in the local bubble \ of universe \ \ The number of ships of type X in the local bubble is \ stored at MANY+X \ \ See the deep dive on "Ship blueprints" for a list of \ ship types \ \ [Show more]
\ \ This variable is used by the following: \ \ * KILLSHP \ * Main game loop (Part 3 of 6) \ * Main game loop (Part 4 of 6) \ * MJP \ * NWSHP \ * 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
.SSPR SKIP NTY + 1 - SST \ "Space station present" flag \ \ * Non-zero if we are inside the space station's safe \ zone \ \ * 0 if we aren't (in which case we can show the sun) \ \ This flag is at MANY+SST, which is no coincidence, as \ MANY+SST is a count of how many space stations there \ are in our local bubble, which is the same as saying \ "space station present" \ \ [Show more]
\ \ This variable is used by the following: \ \ * COMPAS \ * DOCKIT \ * KS4 \ * Main flight loop (Part 14 of 16) \ * Main flight loop (Part 15 of 16) \ * Main game loop (Part 2 of 6) \ * Main game loop (Part 3 of 6) \ * RES2 \ * TACTICS (Part 3 of 7) \ * WARP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.JUNK SKIP 1 \ The amount of junk in the local bubble \ \ "Junk" is defined as being one of these: \ \ * Escape pod \ * Alloy plate \ * Cargo canister \ * Asteroid \ * Splinter \ * Shuttle \ * Transporter \ * Rock hermit \ \ Apart from the rock hermit, junk is the range of ship \ types from #JL to #JH - 1 \ \ [Show more]
\ \ This variable is used by the following: \ \ * KILLSHP \ * Main game loop (Part 2 of 6) \ * NWSHP \ * STATUS \ * WARP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.auto SKIP 1 \ Docking computer activation status \ \ * 0 = Docking computer is off \ \ * Non-zero = Docking computer is running \ \ [Show more]
\ \ This variable is used by the following: \ \ * cntr \ * DKJ1 \ * DOKEY \ * Main flight loop (Part 3 of 16) \ * Main flight loop (Part 15 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.ECMP SKIP 1 \ Our E.C.M. status \ \ * 0 = E.C.M. is off \ \ * Non-zero = E.C.M. is on \ \ [Show more]
\ \ This variable is used by the following: \ \ * ECMOF \ * Main flight loop (Part 3 of 16) \ * Main flight loop (Part 16 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.MJ SKIP 1 \ Are we in witchspace (i.e. have we mis-jumped)? \ \ * 0 = no, we are in normal space \ \ * &FF = yes, we are in witchspace \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ * Main flight loop (Part 12 of 16) \ * Main flight loop (Part 14 of 16) \ * Main flight loop (Part 15 of 16) \ * Main game loop (Part 2 of 6) \ * MJP \ * TT151 \ * WARP \ * 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
.CABTMP SKIP 1 \ Cabin temperature \ \ The ambient cabin temperature in deep space is 30, \ which is displayed as one notch on the dashboard bar \ \ We get higher temperatures closer to the sun \ \ CABTMP shares a location with MANY, but that's OK as \ MANY+0 would contain the number of ships of type 0, \ and as there is no ship type 0 (they start at 1), the \ byte at MANY+0 is not used for storing a ship type \ and can be used for the cabin temperature instead \ \ [Show more]
\ \ This variable is used by the following: \ \ * DIALS \ * Main flight loop (Part 15 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.LAS2 SKIP 1 \ Laser power for the current laser \ \ * Bits 0-6 contain the laser power of the current \ space view \ \ * Bit 7 denotes whether or not the laser pulses: \ \ * 0 = pulsing laser \ \ * 1 = beam laser (i.e. always on) \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ * Main flight loop (Part 16 of 16) \ * TTX66 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.MSAR SKIP 1 \ The targeting state of our leftmost missile \ \ * 0 = missile is not looking for a target, or it \ already has a target lock (indicator is not \ yellow/white) \ \ * Non-zero = missile is currently looking for a \ target (indicator is yellow/white) \ \ [Show more]
\ \ This variable is used by the following: \ \ * ABORT2 \ * Main flight loop (Part 3 of 16) \ * Main flight loop (Part 11 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.VIEW SKIP 1 \ The number of the current space view \ \ * 0 = front \ * 1 = rear \ * 2 = left \ * 3 = right \ \ [Show more]
\ \ This variable is used by the following: \ \ * LOOK1 \ * Main flight loop (Part 3 of 16) \ * PLUT \ * SIGHT \ * STARS \ * TTX66 \ * WARP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.LASCT SKIP 1 \ The laser pulse count for the current laser \ \ This is a counter that defines the gap between the \ pulses of a pulse laser. It is set as follows: \ \ * 0 for a beam laser \ \ * 10 for a pulse laser \ \ It gets decremented by 2 on each iteration round the \ main game loop and is set to a non-zero value for \ pulse lasers only \ \ The laser only fires when the value of LASCT hits \ zero, so for pulse lasers with a value of 10, that \ means the laser fires once every four iterations \ round the main game loop (LASCT = 10, 6, 2, 0) \ \ In comparison, beam lasers fire continuously as the \ value of LASCT is always 0 \ \ [Show more]
\ \ This variable is used by the following: \ \ * DEATH \ * Main flight loop (Part 3 of 16) \ * Main flight loop (Part 16 of 16) \ * Main game loop (Part 5 of 6) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.GNTMP SKIP 1 \ Laser temperature (or "gun temperature") \ \ If the laser temperature exceeds 242 then the laser \ overheats and cannot be fired again until it has \ cooled down \ \ [Show more]
\ \ This variable is used by the following: \ \ * DIALS \ * DOENTRY \ * LASLI \ * Main flight loop (Part 3 of 16) \ * Main game loop (Part 5 of 6) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.HFX SKIP 1 \ A flag that toggles the hyperspace colour effect \ \ * 0 = no colour effect \ \ * Non-zero = hyperspace colour effect enabled \ \ When HFX is set to 1, the mode 1 screen that makes \ up the top part of the display is temporarily switched \ to mode 2 (the same screen mode as the dashboard), \ which has the effect of blurring and colouring the \ hyperspace rings in the top part of the screen. The \ code to do this is in the LINSCN routine, which is \ called as part of the screen mode routine at IRQ1. \ It's in LINSCN that HFX is checked, and if it is \ non-zero, the top part of the screen is not switched \ to mode 1, thus leaving the top part of the screen in \ the more colourful mode 2 .EV SKIP 1 \ The "extra vessels" spawning counter \ \ This counter is set to 0 on arrival in a system and \ following an in-system jump, and is bumped up when we \ spawn bounty hunters or pirates (i.e. "extra vessels") \ \ It decreases by 1 each time we consider spawning more \ "extra vessels" in part 4 of the main game loop, so \ increasing the value of EV has the effect of delaying \ the spawning of more vessels \ \ In other words, this counter stops bounty hunters and \ pirates from continually appearing, and ensures that \ there's a delay between spawnings \ \ [Show more]
\ \ This variable is used by the following: \ \ * BR1 (Part 2 of 2) \ * hyp1 \ * Main game loop (Part 4 of 6) \ * WARP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.DLY SKIP 1 \ In-flight message delay \ \ This counter is used to keep an in-flight message up \ for a specified time before it gets removed. The value \ in DLY is decremented each time we start another \ iteration of the main game loop at TT100 \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 12 of 16) \ * Main game loop (Part 2 of 6) \ * me1 \ * me2 \ * MESS \ * OUCH \ * TTX66 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.de SKIP 1 \ Equipment destruction flag \ \ * Bit 1 denotes whether or not the in-flight message \ about to be shown by the MESS routine is about \ destroyed equipment: \ \ * 0 = the message is shown normally \ \ * 1 = the string " DESTROYED" gets added to the \ end of the message \ \ [Show more]
\ \ This variable is used by the following: \ \ * mes9 \ * MESS \ * OUCH \ * TTX66 \ * ZERO \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.JSTX SKIP 1 \ Our current roll rate \ \ This value is shown in the dashboard's RL indicator, \ and determines the rate at which we are rolling \ \ The value ranges from 1 to 255 with 128 as the centre \ point, so 1 means roll is decreasing at the maximum \ rate, 128 means roll is not changing, and 255 means \ roll is increasing at the maximum rate \ \ This value is updated by "<" and ">" key presses, or \ if joysticks are enabled, from the joystick. If \ keyboard damping is enabled (which it is by default), \ the value is slowly moved towards the centre value of \ 128 (no roll) if there are no key presses or joystick \ movement \ \ [Show more]
\ \ This variable is used by the following: \ \ * DKJ1 \ * DOKEY \ * Main flight loop (Part 2 of 16) \ * TT17 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.JSTY SKIP 1 \ Our current pitch rate \ \ This value is shown in the dashboard's DC indicator, \ and determines the rate at which we are pitching \ \ The value ranges from 1 to 255 with 128 as the centre \ point, so 1 means pitch is decreasing at the maximum \ rate, 128 means pitch is not changing, and 255 means \ pitch is increasing at the maximum rate \ \ This value is updated by "S" and "X" key presses, or \ if joysticks are enabled, from the joystick. If \ keyboard damping is enabled (which it is by default), \ the value is slowly moved towards the centre value of \ 128 (no pitch) if there are no key presses or joystick \ movement \ \ [Show more]
\ \ This variable is used by the following: \ \ * DKJ1 \ * DOKEY \ * Main flight loop (Part 2 of 16) \ * RES2 \ * TT17 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.XSAV2 SKIP 1 \ This byte appears to be unused .YSAV2 SKIP 1 \ This byte appears to be unused .NAME SKIP 8 \ The current commander name \ \ The commander name can be up to 7 characters (the DFS \ limit for filenames), and is terminated by a carriage \ return \ \ [Show more]
\ \ This variable is used by the following: \ \ * cmn \ * DFAULT \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.TP SKIP 1 \ The current mission status \ \ * Bits 0-1 = Mission 1 status \ \ * %00 = Mission not started \ * %01 = Mission in progress, hunting for ship \ * %11 = Constrictor killed, not debriefed yet \ * %10 = Mission and debrief complete \ \ * Bits 2-3 = Mission 2 status \ \ * %00 = Mission not started \ * %01 = Mission in progress, plans not picked up \ * %10 = Mission in progress, plans picked up \ * %11 = Mission complete \ \ [Show more]
\ \ This variable is used by the following: \ \ * BRIEF \ * BRIEF2 \ * BRIEF3 \ * DEBRIEF \ * DEBRIEF2 \ * DOENTRY \ * KILLSHP \ * Main game loop (Part 4 of 6) \ * PDESC \ * SVE \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ0 SKIP 1 \ The current system's galactic x-coordinate (0-256) \ \ [Show more]
\ \ This variable is used by the following: \ \ * DOENTRY \ * jmp \ * ping \ * THERE \ * TT105 \ * TT111 \ * TT14 \ * TT23 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ1 SKIP 1 \ The current system's galactic y-coordinate (0-256) \ \ [Show more]
\ \ This variable is used by the following: \ \ * DOENTRY \ * jmp \ * MJP \ * THERE \ * TT105 \ * TT111 \ * TT14 \ * TT23 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ21 SKIP 6 \ The three 16-bit seeds for the current galaxy \ \ These seeds define system 0 in the current galaxy, so \ they can be used as a starting point to generate all \ 256 systems in the galaxy \ \ Using a galactic hyperdrive rotates each byte to the \ left (rolling each byte within itself) to get the \ seeds for the next galaxy, so after eight galactic \ jumps, the seeds roll around to the first galaxy again \ \ See the deep dives on "Galaxy and system seeds" and \ "Twisting the system seeds" for more details \ \ [Show more]
\ \ This variable is used by the following: \ \ * Ghy \ * TT81 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.CASH SKIP 4 \ Our current cash pot \ \ The cash stash is stored as a 32-bit unsigned integer, \ with the most significant byte in CASH and the least \ significant in CASH+3. This is big-endian, which is \ the opposite way round to most of the numbers used in \ Elite - to use our notation for multi-byte numbers, \ the amount of cash is CASH(0 1 2 3) \ \ [Show more]
\ \ This variable is used by the following: \ \ * csh \ * LCASH \ * MCASH \ * SVE \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ14 SKIP 1 \ Our current fuel level (0-70) \ \ The fuel level is stored as the number of light years \ multiplied by 10, so QQ14 = 1 represents 0.1 light \ years, and the maximum possible value is 70, for 7.0 \ light years \ \ [Show more]
\ \ This variable is used by the following: \ \ * DIALS \ * EQSHP \ * ESCAPE \ * fwl \ * hyp \ * Main flight loop (Part 15 of 16) \ * TT14 \ * TT18 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.COK SKIP 1 \ Flags used to generate the competition code \ \ See the deep dive on "The competition code" for \ details of these flags and how they are used in \ generating and decoding the competition code \ \ [Show more]
\ \ This variable is used by the following: \ \ * DFAULT \ * MJP \ * SVE \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.GCNT SKIP 1 \ The number of the current galaxy (0-7) \ \ When this is displayed in-game, 1 is added to the \ number, so we start in galaxy 1 in-game, but it's \ stored as galaxy 0 internally \ \ The galaxy number increases by one every time a \ galactic hyperdrive is used, and wraps back around to \ the start after eight galaxies \ \ [Show more]
\ \ This variable is used by the following: \ \ * DOENTRY \ * Ghy \ * MT28 \ * PDESC \ * tal \ * THERE \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.LASER SKIP 4 \ The specifications of the lasers fitted to each of the \ four space views: \ \ * Byte #0 = front view \ * Byte #1 = rear view \ * Byte #2 = left view \ * Byte #3 = right view \ \ For each of the views: \ \ * 0 = no laser is fitted to this view \ \ * Non-zero = a laser is fitted to this view, with \ the following specification: \ \ * Bits 0-6 contain the laser's power \ \ * Bit 7 determines whether or not the laser pulses \ (0 = pulse or mining laser) or is always on \ (1 = beam or military laser) \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ * refund \ * SIGHT \ * STATUS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
SKIP 2 \ These bytes appear to be unused (they were originally \ used for up/down lasers, but they were dropped) .CRGO SKIP 1 \ Our ship's cargo capacity \ \ * 22 = standard cargo bay of 20 tonnes \ \ * 37 = large cargo bay of 35 tonnes \ \ The value is two greater than the actual capacity to \ make the maths in tnpr slightly more efficient \ \ [Show more]
\ \ This variable is used by the following: \ \ * EQSHP \ * STATUS \ * tnpr \ * TT213 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ20 SKIP 17 \ The contents of our cargo hold \ \ The amount of market item X that we have in our hold \ can be found in the X-th byte of QQ20. For example: \ \ * QQ20 contains the amount of food (item 0) \ \ * QQ20+7 contains the amount of computers (item 7) \ \ See QQ23 for a list of market item numbers and their \ storage units \ \ [Show more]
\ \ This variable is used by the following: \ \ * BAD \ * ESCAPE \ * Main flight loop (Part 8 of 16) \ * OUCH \ * tnpr \ * TT210 \ * TT219 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.ECM SKIP 1 \ E.C.M. system \ \ * 0 = not fitted \ \ * &FF = fitted \ \ [Show more]
\ \ This variable is used by the following: \ \ * EQSHP \ * Main flight loop (Part 3 of 16) \ * STATUS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.BST SKIP 1 \ Fuel scoops (BST stands for "barrel status") \ \ * 0 = not fitted \ \ * &FF = fitted \ \ [Show more]
\ \ This variable is used by the following: \ \ * EQSHP \ * Main flight loop (Part 7 of 16) \ * Main flight loop (Part 15 of 16) \ * STATUS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.BOMB SKIP 1 \ Energy bomb \ \ * 0 = not fitted \ \ * &7F = fitted \ \ [Show more]
\ \ This variable is used by the following: \ \ * EQSHP \ * Main flight loop (Part 3 of 16) \ * Main flight loop (Part 5 of 16) \ * Main flight loop (Part 13 of 16) \ * STATUS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.ENGY SKIP 1 \ Energy unit \ \ * 0 = not fitted \ \ * Non-zero = fitted \ \ The actual value determines the refresh rate of our \ energy banks, as they refresh by ENGY+1 each time (so \ our ship's energy level goes up by 2 each time if we \ have an energy unit fitted, otherwise it goes up by 1) \ \ The enhanced versions of Elite set ENGY to 2 as the \ reward for completing mission 2, where we receive a \ special naval energy unit that recharges at a fast \ rate than a standard energy unit, i.e. by 3 each time \ \ [Show more]
\ \ This variable is used by the following: \ \ * DEBRIEF2 \ * EQSHP \ * Main flight loop (Part 13 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.DKCMP SKIP 1 \ Docking computer \ \ * 0 = not fitted \ \ * &FF = fitted \ \ [Show more]
\ \ This variable is used by the following: \ \ * EQSHP \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.GHYP SKIP 1 \ Galactic hyperdrive \ \ * 0 = not fitted \ \ * &FF = fitted \ \ [Show more]
\ \ This variable is used by the following: \ \ * EQSHP \ * Ghy \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.ESCP SKIP 1 \ Escape pod \ \ * 0 = not fitted \ \ * &FF = fitted \ \ [Show more]
\ \ This variable is used by the following: \ \ * DIALS \ * EQSHP \ * ESCAPE \ * Main flight loop (Part 3 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
SKIP 4 \ These bytes appear to be unused .NOMSL SKIP 1 \ The number of missiles we have fitted (0-4) \ \ [Show more]
\ \ This variable is used by the following: \ \ * ABORT2 \ * EQSHP \ * FRMIS \ * Main flight loop (Part 3 of 16) \ * msblob \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.FIST SKIP 1 \ Our legal status (FIST stands for "fugitive/innocent \ status"): \ \ * 0 = Clean \ \ * 1-49 = Offender \ \ * 50+ = Fugitive \ \ You get 64 points if you kill a cop, so that's a fast \ ticket to fugitive status \ \ [Show more]
\ \ This variable is used by the following: \ \ * ESCAPE \ * Ghy \ * Main flight loop (Part 12 of 16) \ * Main game loop (Part 3 of 6) \ * SOLAR \ * STATUS \ * TACTICS (Part 3 of 7) \ * TT110 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.AVL SKIP 17 \ Market availability in the current system \ \ The available amount of market item X is stored in \ the X-th byte of AVL, so for example: \ \ * AVL contains the amount of food (item 0) \ \ * AVL+7 contains the amount of computers (item 7) \ \ See QQ23 for a list of market item numbers and their \ storage units, and the deep dive on "Market item \ prices and availability" for details of the algorithm \ used for calculating each item's availability \ \ [Show more]
\ \ This variable is used by the following: \ \ * GVL \ * TT151 \ * TT219 \ * var \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ26 SKIP 1 \ A random value used to randomise market data \ \ This value is set to a new random number for each \ change of system, so we can add a random factor into \ the calculations for market prices (for details of how \ this is used, see the deep dive on "Market prices") \ \ [Show more]
\ \ This variable is used by the following: \ \ * GVL \ * TT151 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.TALLY SKIP 2 \ Our combat rank \ \ The combat rank is stored as the number of kills, in a \ 16-bit number TALLY(1 0) - so the high byte is in \ TALLY+1 and the low byte in TALLY \ \ If the high byte in TALLY+1 is 0 then we have between \ 0 and 255 kills, so our rank is Harmless, Mostly \ Harmless, Poor, Average or Above Average, according to \ the value of the low byte in TALLY: \ \ Harmless = %00000000 to %00000011 = 0 to 3 \ Mostly Harmless = %00000100 to %00000111 = 4 to 7 \ Poor = %00001000 to %00001111 = 8 to 15 \ Average = %00010000 to %00011111 = 16 to 31 \ Above Average = %00100000 to %11111111 = 32 to 255 \ \ If the high byte in TALLY+1 is non-zero then we are \ Competent, Dangerous, Deadly or Elite, according to \ the high byte in TALLY+1: \ \ Competent = 1 = 256 to 511 kills \ Dangerous = 2 to 9 = 512 to 2559 kills \ Deadly = 10 to 24 = 2560 to 6399 kills \ Elite = 25 and up = 6400 kills and up \ \ You can see the rating calculation in the STATUS \ subroutine \ \ [Show more]
\ \ This variable is used by the following: \ \ * DEBRIEF \ * DEBRIEF2 \ * DOENTRY \ * EXNO2 \ * STATUS \ * SVE \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.SVC SKIP 1 \ The save count \ \ When a new commander is created, the save count gets \ set to 128. This value gets halved each time the \ commander file is saved, but it is otherwise unused. \ It is presumably part of the security system for the \ competition, possibly another flag to catch out \ entries with manually altered commander files \ \ [Show more]
\ \ This variable is used by the following: \ \ * SVE \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
SKIP 2 \ The commander file checksum \ \ These two bytes are reserved for the commander file \ checksum, so when the current commander block is \ copied from here to the last saved commander block at \ NA%, CHK and CHK2 get overwritten NT% = SVC + 2 - TP \ This sets the variable NT% to the size of the current \ commander data block, which starts at TP and ends at \ SVC+2 (inclusive) .MCH SKIP 1 \ The text token number of the in-flight message that is \ currently being shown, and which will be removed by \ the me2 routine when the counter in DLY reaches zero \ \ [Show more]
\ \ This variable is used by the following: \ \ * me1 \ * me2 \ * MESS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.FSH SKIP 1 \ Forward shield status \ \ * 0 = empty \ \ * &FF = full \ \ [Show more]
\ \ This variable is used by the following: \ \ * DIALS \ * DOENTRY \ * Main flight loop (Part 13 of 16) \ * OOPS \ * RESET \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.ASH SKIP 1 \ Aft shield status \ \ * 0 = empty \ \ * &FF = full \ \ [Show more]
\ \ This variable is used by the following: \ \ * DIALS \ * DOENTRY \ * Main flight loop (Part 13 of 16) \ * OOPS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.ENERGY SKIP 1 \ Energy bank status \ \ * 0 = empty \ \ * &FF = full \ \ [Show more]
\ \ This variable is used by the following: \ \ * DENGY \ * DIALS \ * DOENTRY \ * Main flight loop (Part 13 of 16) \ * Main flight loop (Part 15 of 16) \ * OOPS \ * STATUS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.COMX SKIP 1 \ The x-coordinate of the compass dot \ \ [Show more]
\ \ This variable is used by the following: \ \ * DOT \ * SP2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.COMY SKIP 1 \ The y-coordinate of the compass dot \ \ [Show more]
\ \ This variable is used by the following: \ \ * DOT \ * SP2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ24 SKIP 1 \ Temporary storage, used to store the current market \ item's price in routine TT151 \ \ [Show more]
\ \ This variable is used by the following: \ \ * TT151 \ * TT210 \ * TT219 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ25 SKIP 1 \ Temporary storage, used to store the current market \ item's availability in routine TT151 \ \ [Show more]
\ \ This variable is used by the following: \ \ * EQSHP \ * gnum \ * TT151 \ * TT210 \ * TT219 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ28 SKIP 1 \ The current system's economy (0-7) \ \ * 0 = Rich Industrial \ * 1 = Average Industrial \ * 2 = Poor Industrial \ * 3 = Mainly Industrial \ * 4 = Mainly Agricultural \ * 5 = Rich Agricultural \ * 6 = Average Agricultural \ * 7 = Poor Agricultural \ \ See the deep dive on "Generating system data" for more \ information on economies \ \ [Show more]
\ \ This variable is used by the following: \ \ * BR1 (Part 2 of 2) \ * hyp1 \ * var \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ29 SKIP 1 \ Temporary storage, used in a number of places \ \ [Show more]
\ \ This variable is used by the following: \ \ * Main flight loop (Part 8 of 16) \ * NWDAV4 \ * tnpr \ * tnpr1 \ * TT167 \ * TT210 \ * TT219 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.gov SKIP 1 \ The current system's government type (0-7) \ \ See the deep dive on "Generating system data" for \ details of the various government types \ \ [Show more]
\ \ This variable is used by the following: \ \ * BR1 (Part 2 of 2) \ * hyp1 \ * Main game loop (Part 4 of 6) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.tek SKIP 1 \ The current system's tech level (0-14) \ \ See the deep dive on "Generating system data" for more \ information on tech levels \ \ [Show more]
\ \ This variable is used by the following: \ \ * BR1 (Part 2 of 2) \ * EQSHP \ * hyp1 \ * NWSPS \ * qv \ * SOS1 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.SLSP SKIP 2 \ The address of the bottom of the ship line heap \ \ The ship line heap is a descending block of memory \ that starts at D% and descends down to SLSP. It can be \ extended downwards by the NWSHP routine when adding \ new ships (and their associated ship line heaps), in \ which case SLSP is lowered to provide more heap space, \ assuming there is enough free memory to do so \ \ [Show more]
\ \ This variable is used by the following: \ \ * KS3 \ * NWSHP \ * RES2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ2 SKIP 6 \ The three 16-bit seeds for the current system, i.e. \ the one we are currently in \ \ See the deep dives on "Galaxy and system seeds" and \ "Twisting the system seeds" for more details \ \ [Show more]
\ \ This variable is used by the following: \ \ * BR1 (Part 2 of 2) \ * hyp1 \ * ypl \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ3 SKIP 1 \ The selected system's economy (0-7) \ \ * 0 = Rich Industrial \ * 1 = Average Industrial \ * 2 = Poor Industrial \ * 3 = Mainly Industrial \ * 4 = Mainly Agricultural \ * 5 = Rich Agricultural \ * 6 = Average Agricultural \ * 7 = Poor Agricultural \ \ See the deep dive on "Generating system data" for more \ information on economies \ \ [Show more]
\ \ This variable is used by the following: \ \ * BR1 (Part 2 of 2) \ * hyp1 \ * TT24 \ * TT25 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ4 SKIP 1 \ The selected system's government (0-7) \ \ See the deep dive on "Generating system data" for more \ details of the various government types \ \ [Show more]
\ \ This variable is used by the following: \ \ * BR1 (Part 2 of 2) \ * hyp1 \ * TT24 \ * TT25 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ5 SKIP 1 \ The selected system's tech level (0-14) \ \ See the deep dive on "Generating system data" for more \ information on tech levels \ \ [Show more]
\ \ This variable is used by the following: \ \ * BR1 (Part 2 of 2) \ * hyp1 \ * TT24 \ * TT25 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ6 SKIP 2 \ The selected system's population in billions * 10 \ (1-71), so the maximum population is 7.1 billion \ \ See the deep dive on "Generating system data" for more \ details on population levels \ \ [Show more]
\ \ This variable is used by the following: \ \ * TT24 \ * TT25 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ7 SKIP 2 \ The selected system's productivity in M CR (96-62480) \ \ See the deep dive on "Generating system data" for more \ details about productivity levels \ \ [Show more]
\ \ This variable is used by the following: \ \ * TT24 \ * TT25 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ8 SKIP 2 \ The distance from the current system to the selected \ system in light years * 10, stored as a 16-bit number \ \ The distance will be 0 if the selected system is the \ current system \ \ The galaxy chart is 102.4 light years wide and 51.2 \ light years tall (see the intra-system distance \ calculations in routine TT111 for details), which \ equates to 1024 x 512 in terms of QQ8 \ \ [Show more]
\ \ This variable is used by the following: \ \ * Ghy \ * hyp \ * PDESC \ * TT111 \ * TT146 \ * TT18 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ9 SKIP 1 \ The galactic x-coordinate of the crosshairs in the \ galaxy chart (and, most of the time, the selected \ system's galactic x-coordinate) \ \ [Show more]
\ \ This variable is used by the following: \ \ * Ghy \ * HME2 \ * jmp \ * ping \ * TT103 \ * TT105 \ * TT111 \ * TT16 \ * TT22 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.QQ10 SKIP 1 \ The galactic y-coordinate of the crosshairs in the \ galaxy chart (and, most of the time, the selected \ system's galactic y-coordinate) \ \ [Show more]
\ \ This variable is used by the following: \ \ * Ghy \ * HME2 \ * jmp \ * TT103 \ * TT105 \ * TT111 \ * TT16 \ * TT22 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.NOSTM SKIP 1 \ The number of stardust particles shown on screen, \ which is 18 (#NOST) for normal space, and 3 for \ witchspace \ \ [Show more]
\ \ This variable is used by the following: \ \ * FLIP \ * MJP \ * nWq \ * 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
.BUF SKIP 100 \ The line buffer used by DASC to print justified text \ \ [Show more]
\ \ This variable is used by the following: \ \ * HME2 \ * MT17 \ * 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
Name: WP [Show more] Type: Workspace Address: &0D00 to &0E3B Category: Workspaces Summary: Variables
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 &0D00 .WP SKIP 0 \ The start of the WP workspace .LSX SKIP 0 \ LSX is an alias that points to the first byte of the \ sun line heap at LSO \ \ * &FF indicates the sun line heap is empty \ \ * Otherwise the LSO heap contains the line data for \ the sun \ \ [Show more]
\ \ This variable is used by the following: \ \ * FLFLLS \ * SUN (Part 1 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
.LSO SKIP 192 \ The ship line heap for the space station (see NWSPS) \ and the sun line heap (see SUN) \ \ The spaces can be shared as our local bubble of \ universe can support either the sun or a space \ station, but not both \ \ [Show more]
\ \ This variable is used by the following: \ \ * EDGES \ * FLFLLS \ * HLOIN2 \ * NWSPS \ * 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
.SX SKIP NOST + 1 \ This is where we store the x_hi coordinates for all \ the stardust particles \ \ [Show more]
\ \ This variable is used by the following: \ \ * FLIP \ * nWq \ * STARS1 \ * STARS2 \ * STARS6 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.SXL SKIP NOST + 1 \ This is where we store the x_lo coordinates for all \ the stardust particles \ \ [Show more]
\ \ This variable is used by the following: \ \ * STARS1 \ * STARS2 \ * STARS6 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.SY SKIP NOST + 1 \ This is where we store the y_hi coordinates for all \ the stardust particles \ \ [Show more]
\ \ This variable is used by the following: \ \ * FLIP \ * MLU1 \ * nWq \ * STARS1 \ * STARS2 \ * STARS6 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.SYL SKIP NOST + 1 \ This is where we store the y_lo coordinates for all \ the stardust particles \ \ [Show more]
\ \ This variable is used by the following: \ \ * PIX1 \ * STARS1 \ * STARS2 \ * STARS6 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.SZ SKIP NOST + 1 \ This is where we store the z_hi coordinates for all \ the stardust particles \ \ [Show more]
\ \ This variable is used by the following: \ \ * DV42 \ * FLIP \ * nWq \ * STARS1 \ * STARS2 \ * STARS6 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.SZL SKIP NOST + 1 \ This is where we store the z_lo coordinates for all \ the stardust particles \ \ [Show more]
\ \ This variable is used by the following: \ \ * STARS1 \ * STARS6 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.LASX SKIP 1 \ The x-coordinate of the tip of the laser line \ \ [Show more]
\ \ This variable is used by the following: \ \ * LASLI \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.LASY SKIP 1 \ The y-coordinate of the tip of the laser line \ \ [Show more]
\ \ This variable is used by the following: \ \ * LASLI \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.XX24 SKIP 1 \ This byte appears to be unused .ALTIT SKIP 1 \ Our altitude above the surface of the planet or sun \ \ * 255 = we are a long way above the surface \ \ * 1-254 = our altitude as the square root of: \ \ x_hi^2 + y_hi^2 + z_hi^2 - 6^2 \ \ where our ship is at the origin, the centre of the \ planet/sun is at (x_hi, y_hi, z_hi), and the \ radius of the planet/sun is 6 \ \ * 0 = we have crashed into the surface \ \ [Show more]
\ \ This variable is used by the following: \ \ * DIALS \ * Main flight loop (Part 15 of 16) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.SWAP SKIP 1 \ Temporary storage, used to store a flag that records \ whether or not we had to swap a line's start and end \ coordinates around when clipping the line in routine \ LL145 (the flag is used in places like BLINE to swap \ them back) \ \ [Show more]
\ \ This variable is used by the following: \ \ * LL145 (Part 1 of 4) \ * LL145 (Part 4 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
.XP SKIP 1 \ The x-coordinate of the current character as we \ construct the lines for the Star Wars scroll text \ \ [Show more]
\ \ This variable is used by the following: \ \ * GRIDSET \ * GRS1 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.YP SKIP 1 \ The y-coordinate of the current character as we \ construct the lines for the Star Wars scroll text \ \ [Show more]
\ \ This variable is used by the following: \ \ * GRIDSET \ * GRS1 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above
.YS SKIP 1 \ Temporary storage for saving the index into the TB \ tables in the SLIDE routine \ \ [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
.BALI SKIP 1 \ The progress of the Star Wars scroll text as it \ scrolls, from 254 (off the bottom of the screen) to 2 \ (fully scrolled). Can also be thought of as a measure \ of how much of the scroll text has yet to appear \ on-screen \ \ [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
.UPO SKIP 1 \ Used as an index into the UB tables when projecting \ the scroll text lines onto the Star Wars perspective \ view and then onto the screen \ \ [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
PRINT "WP workspace from ", ~WP," to ", ~P%