The first 48 bytes of a commander file are text. They start the file with words a person can read, give the title of the status screen, and hold the credits the way the status screen shows them.
Fields
0x00Signature “Commander file”140x0EEnd-of-file mark1A10x0FScreen colour and frame colour1 + 10x11Title COMMANDER or ARCHANGEL, a space and a zero9 + 1 + 10x1CCredits as text and a zero20
| Offset | Size | Name | Description |
|---|---|---|---|
0x00 | 14 | Signature | The words Commander file. |
0x0E | 1 | End-of-file mark | 1A, the DOS end-of-file character. TYPE stops here, so typing the file shows only the words. |
0x0F | 1 | Screen colour | The colour byte of the status screen’s title. The program sends its high four bits to the CGA colour register and draws the title text in it. 0F in every file. |
0x10 | 1 | Frame colour | The colour attribute of the double line drawn round the status screen. 0D in every file. |
0x11 | 9 | Title | The word shown before the commander’s name: COMMANDER, or ARCHANGEL after the Thargoid base mission. |
0x1A | 1 | Space | 20. |
0x1B | 1 | Terminator | Zero, the end of the title. |
0x1C | 20 | Credits as text | The credits right-aligned in 11 characters with one decimal place, then Credits and a zero, for example 100.0 Credits. |
The title
Bytes 0x0F to 0x1B have the same shape as the program’s other screen titles: two
colour bytes, then the text. The status screen shows this title followed by the
commander’s name from 0x8E, so a new
commander is “COMMANDER JAMESON”. When the Thargoid base mission ends, the program copies
ARCHANGEL over COMMANDER, and the commander keeps that title.
The credits as text
The credits themselves are the four-byte number at 0x88, in tenths of a credit. Whenever the number changes the program writes this text again, and the status screen shows the text with its leading spaces removed. In a file that has not been edited the two always agree. Changing the text alone changes nothing that matters: the next sale or purchase writes it again from the number.