Skip to navigation

Elite on the BBC Micro and NES

Text: CTOK

[Elite-A, Encyclopedia]

Name: CTOK [Show more] Type: Macro Category: Text Summary: Macro definition for ship data in the encyclopedia's ship cards Deep dive: Extended text tokens
Context: See this macro in context in the source code References: This macro is used as follows: * adder uses CTOK * anaconda uses CTOK * asp_2 uses CTOK * boa uses CTOK * bushmaster uses CTOK * chameleon uses CTOK * cobra_1 uses CTOK * cobra_3 uses CTOK * coriolis uses CTOK * dodecagon uses CTOK * escape_pod uses CTOK * fer_de_lance uses CTOK * gecko uses CTOK * ghavial uses CTOK * iguana uses CTOK * krait uses CTOK * mamba uses CTOK * monitor uses CTOK * moray uses CTOK * ophidian uses CTOK * python uses CTOK * shuttle uses CTOK * sidewinder uses CTOK * thargoid uses CTOK * thargon uses CTOK * transporter uses CTOK * viper uses CTOK * worm uses CTOK

The following macro is used when building the ship data: CTOK n Insert recursive token [n] * Tokens 0-127 get stored as n + 128 The ship data tables work differently to the recursive token tables. Data is stored in the table as follows: Value Contents Macro ----- -------- ----- 0-31 Jump tokens EJMP 32-127 ASCII characters with no obfuscation EQUS 128-214 Recursive msg_3 text tokens (subtract 128 to get 0-86) CTOK 215-255 Extended two-letter tokens (subtract 215 to get 0-40) ETWO Printing of ship data is handled by the write_card routine.
Arguments: n The number of the recursive token to insert into the table, in the range 0 to 127
MACRO CTOK n EQUB n + 128 ENDMACRO