Here's a statistical breakdown of the source code for Elite-A. 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) |
---|---|---|---|---|
Buying ships | 237 (0.8%) | 7 (0.5%) | 8 (0.5%) | 1328 (1.2%) |
Charts | 880 (2.8%) | 33 (2.2%) | 0 (0.0%) | 0 (0.0%) |
Copy protection | 6 (0.0%) | 1 (0.1%) | 1 (0.1%) | 15 (0.0%) |
Dashboard | 1192 (3.8%) | 81 (5.4%) | 9 (0.6%) | 42 (0.0%) |
Drawing circles | 921 (2.9%) | 33 (2.2%) | 0 (0.0%) | 0 (0.0%) |
Drawing lines | 2470 (7.9%) | 84 (5.6%) | 8 (0.5%) | 60 (0.1%) |
Drawing pixels | 299 (1.0%) | 21 (1.4%) | 13 (0.9%) | 90 (0.1%) |
Drawing planets | 712 (2.3%) | 37 (2.5%) | 4 (0.3%) | 10 (0.0%) |
Drawing ships | 3435 (11.0%) | 56 (3.7%) | 359 (24.5%) | 75523 (67.8%) |
Drawing suns | 661 (2.1%) | 23 (1.5%) | 0 (0.0%) | 0 (0.0%) |
Drawing the screen | 350 (1.1%) | 28 (1.9%) | 3 (0.2%) | 97 (0.1%) |
Encyclopedia | 456 (1.5%) | 14 (0.9%) | 78 (5.3%) | 4412 (4.0%) |
Equipment | 492 (1.6%) | 11 (0.7%) | 2 (0.1%) | 264 (0.2%) |
Flight | 1200 (3.8%) | 72 (4.8%) | 0 (0.0%) | 2 (0.0%) |
Keyboard | 1280 (4.1%) | 68 (4.5%) | 5 (0.3%) | 74 (0.1%) |
Loader | 428 (1.4%) | 35 (2.3%) | 6 (0.4%) | 52 (0.0%) |
Main loop | 1345 (4.3%) | 52 (3.5%) | 0 (0.0%) | 2 (0.0%) |
Market | 872 (2.8%) | 48 (3.2%) | 3 (0.2%) | 204 (0.2%) |
Maths (Arithmetic) | 2298 (7.3%) | 170 (11.3%) | 0 (0.0%) | 0 (0.0%) |
Maths (Geometry) | 998 (3.2%) | 43 (2.9%) | 4 (0.3%) | 192 (0.2%) |
Missions | 605 (1.9%) | 26 (1.7%) | 0 (0.0%) | 0 (0.0%) |
Moving | 1452 (4.6%) | 48 (3.2%) | 0 (0.0%) | 0 (0.0%) |
Save and load | 399 (1.3%) | 31 (2.1%) | 13 (0.9%) | 266 (0.2%) |
Ship hangar | 398 (1.3%) | 15 (1.0%) | 2 (0.1%) | 72 (0.1%) |
Sound | 114 (0.4%) | 26 (1.7%) | 5 (0.3%) | 216 (0.2%) |
Stardust | 748 (2.4%) | 15 (1.0%) | 0 (0.0%) | 0 (0.0%) |
Start and end | 491 (1.6%) | 24 (1.6%) | 0 (0.0%) | 0 (0.0%) |
Status | 440 (1.4%) | 23 (1.5%) | 0 (0.0%) | 0 (0.0%) |
Tactics | 791 (2.5%) | 28 (1.9%) | 0 (0.0%) | 0 (0.0%) |
Text | 2445 (7.8%) | 199 (13.2%) | 54 (3.7%) | 21967 (19.7%) |
Tube | 58 (0.2%) | 10 (0.7%) | 2 (0.1%) | 64 (0.1%) |
Universe | 2705 (8.6%) | 105 (7.0%) | 4 (0.3%) | 106 (0.1%) |
Utility routines | 168 (0.5%) | 35 (2.3%) | 6 (0.4%) | 6 (0.0%) |
Workspaces | 0 (0.0%) | 0 (0.0%) | 876 (59.8%) | 6292 (5.7%) |
Totals | 31346 | 1502 | 1465 | 111356 |
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.