Here's a statistical breakdown of the source code for Elite Demonstration Disc. Click on the table headers to sort by that statistic. For more information, see the notes after the table.
| Category | Instructions | Subroutines | Variables | Data (bytes) |
|---|---|---|---|---|
| Charts | 199 (2.2%) | 8 (1.9%) | 0 (0.0%) | 0 (0.0%) |
| Copy protection | 78 (0.9%) | 7 (1.7%) | 11 (4.2%) | 97 (1.4%) |
| Dashboard | 405 (4.4%) | 25 (5.9%) | 2 (0.8%) | 12 (0.2%) |
| Demo | 221 (2.4%) | 11 (2.6%) | 0 (0.0%) | 0 (0.0%) |
| Drawing circles | 252 (2.8%) | 9 (2.1%) | 0 (0.0%) | 0 (0.0%) |
| Drawing lines | 631 (6.9%) | 21 (5.0%) | 2 (0.8%) | 15 (0.2%) |
| Drawing pixels | 110 (1.2%) | 6 (1.4%) | 4 (1.5%) | 29 (0.4%) |
| Drawing planets | 400 (4.4%) | 18 (4.3%) | 3 (1.1%) | 6 (0.1%) |
| Drawing ships | 927 (10.2%) | 14 (3.3%) | 13 (4.9%) | 2964 (44.0%) |
| Drawing suns | 174 (1.9%) | 6 (1.4%) | 0 (0.0%) | 0 (0.0%) |
| Drawing the screen | 175 (1.9%) | 8 (1.9%) | 5 (1.9%) | 121 (1.8%) |
| Equipment | 214 (2.3%) | 4 (1.0%) | 1 (0.4%) | 24 (0.4%) |
| Flight | 221 (2.4%) | 25 (5.9%) | 0 (0.0%) | 2 (0.0%) |
| Keyboard | 274 (3.0%) | 15 (3.6%) | 1 (0.4%) | 15 (0.2%) |
| Loader | 314 (3.4%) | 6 (1.4%) | 0 (0.0%) | 14 (0.2%) |
| Main loop | 563 (6.2%) | 22 (5.2%) | 0 (0.0%) | 0 (0.0%) |
| Market | 303 (3.3%) | 15 (3.6%) | 1 (0.4%) | 68 (1.0%) |
| Maths (Arithmetic) | 772 (8.5%) | 51 (12.1%) | 0 (0.0%) | 0 (0.0%) |
| Maths (Geometry) | 321 (3.5%) | 15 (3.6%) | 2 (0.8%) | 96 (1.4%) |
| Moving | 544 (6.0%) | 16 (3.8%) | 0 (0.0%) | 0 (0.0%) |
| Save and load | 6 (0.1%) | 8 (1.9%) | 4 (1.5%) | 85 (1.3%) |
| Sound | 36 (0.4%) | 7 (1.7%) | 2 (0.8%) | 97 (1.4%) |
| Stardust | 122 (1.3%) | 7 (1.7%) | 0 (0.0%) | 0 (0.0%) |
| Start and end | 171 (1.9%) | 9 (2.1%) | 0 (0.0%) | 0 (0.0%) |
| Status | 151 (1.7%) | 7 (1.7%) | 0 (0.0%) | 0 (0.0%) |
| Tactics | 362 (4.0%) | 13 (3.1%) | 0 (0.0%) | 0 (0.0%) |
| Text | 380 (4.2%) | 29 (6.9%) | 6 (2.3%) | 1492 (22.2%) |
| Universe | 758 (8.3%) | 30 (7.1%) | 1 (0.4%) | 26 (0.4%) |
| Utility routines | 37 (0.4%) | 9 (2.1%) | 3 (1.1%) | 35 (0.5%) |
| Workspaces | 0 (0.0%) | 0 (0.0%) | 202 (76.8%) | 1532 (22.8%) |
| Totals | 9121 | 421 | 263 | 6730 |
Some notes on the above:
- The instruction count does not include EQUB, EQUW, EQUD, EQUS or SKIP operatives; these are counted as data even when they are buried in code (so EQUB &2C "BIT skip" instructions are counted as data, for example).
- INCBIN files are not included in the counts, so the data count doesn't include bytes from binary source files.
- Each part of a multi-part subroutine counts as an individual subroutine.
- The statistics are produced by a relatively simple static analysis of the source code. They are not 100% accurate, though they are pretty close.
- The totals cover all code in the project, including loaders, docked and flight code, Tube code and ship data files.