Here's a statistical breakdown of the source code for the Acorn Electron version of Elite. 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 | 188Â Â (2.2%) | 8Â Â Â (2.1%) | 0Â Â Â Â (0.0%) | 0Â Â Â Â Â (0.0%) |
Copy protection | 33Â Â Â (0.4%) | 5Â Â Â (1.3%) | 6Â Â Â Â (2.5%) | 59Â Â Â Â (1.0%) |
Dashboard | 374Â Â (4.3%) | 23Â Â (6.1%) | 3Â Â Â Â (1.3%) | 29Â Â Â Â (0.5%) |
Drawing circles | 249Â Â (2.9%) | 9Â Â Â (2.4%) | 0Â Â Â Â (0.0%) | 0Â Â Â Â Â (0.0%) |
Drawing lines | 572Â Â (6.6%) | 19Â Â (5.0%) | 0Â Â Â Â (0.0%) | 0Â Â Â Â Â (0.0%) |
Drawing pixels | 141Â Â (1.6%) | 5Â Â Â (1.3%) | 4Â Â Â Â (1.7%) | 30Â Â Â Â (0.5%) |
Drawing planets | 173Â Â (2.0%) | 9Â Â Â (2.4%) | 3Â Â Â Â (1.3%) | 6Â Â Â Â Â (0.1%) |
Drawing ships | 928Â (10.7%) | 14Â Â (3.7%) | 11Â Â Â (4.6%) | 2534Â (43.8%) |
Drawing the screen | 69Â Â Â (0.8%) | 5Â Â Â (1.3%) | 1Â Â Â Â (0.4%) | 22Â Â Â Â (0.4%) |
Equipment | 201Â Â (2.3%) | 4Â Â Â (1.1%) | 1Â Â Â Â (0.4%) | 24Â Â Â Â (0.4%) |
Flight | 353Â Â (4.1%) | 24Â Â (6.4%) | 0Â Â Â Â (0.0%) | 2Â Â Â Â Â (0.0%) |
Keyboard | 280Â Â (3.2%) | 13Â Â (3.4%) | 1Â Â Â Â (0.4%) | 18Â Â Â Â (0.3%) |
Loader | 368Â Â (4.2%) | 5Â Â Â (1.3%) | 0Â Â Â Â (0.0%) | 22Â Â Â Â (0.4%) |
Main loop | 569Â Â (6.6%) | 22Â Â (5.8%) | 0Â Â Â Â (0.0%) | 8Â Â Â Â Â (0.1%) |
Market | 297Â Â (3.4%) | 15Â Â (4.0%) | 1Â Â Â Â (0.4%) | 68Â Â Â Â (1.2%) |
Maths (Arithmetic) | 772Â Â (8.9%) | 51Â (13.5%) | 0Â Â Â Â (0.0%) | 0Â Â Â Â Â (0.0%) |
Maths (Geometry) | 321Â Â (3.7%) | 15Â Â (4.0%) | 2Â Â Â Â (0.8%) | 96Â Â Â Â (1.7%) |
Moving | 542Â Â (6.3%) | 16Â Â (4.2%) | 0Â Â Â Â (0.0%) | 0Â Â Â Â Â (0.0%) |
Save and load | 99Â Â Â (1.1%) | 7Â Â Â (1.9%) | 3Â Â Â Â (1.3%) | 88Â Â Â Â (1.5%) |
Sound | 51Â Â Â (0.6%) | 8Â Â Â (2.1%) | 2Â Â Â Â (0.8%) | 107Â Â Â (1.9%) |
Stardust | 375Â Â (4.3%) | 7Â Â Â (1.9%) | 0Â Â Â Â (0.0%) | 0Â Â Â Â Â (0.0%) |
Start and end | 181Â Â (2.1%) | 9Â Â Â (2.4%) | 0Â Â Â Â (0.0%) | 0Â Â Â Â Â (0.0%) |
Status | 138Â Â (1.6%) | 7Â Â Â (1.9%) | 0Â Â Â Â (0.0%) | 0Â Â Â Â Â (0.0%) |
Tactics | 313Â Â (3.6%) | 13Â Â (3.4%) | 0Â Â Â Â (0.0%) | 0Â Â Â Â Â (0.0%) |
Text | 315Â Â (3.6%) | 28Â Â (7.4%) | 4Â Â Â Â (1.7%) | 1288Â (22.3%) |
Universe | 725Â Â (8.4%) | 29Â Â (7.7%) | 1Â Â Â Â (0.4%) | 26Â Â Â Â (0.4%) |
Utility routines | 42Â Â Â (0.5%) | 7Â Â Â (1.9%) | 2Â Â Â Â (0.8%) | 51Â Â Â Â (0.9%) |
Workspaces | 0Â Â Â Â (0.0%) | 0Â Â Â (0.0%) | 193Â (81.1%) | 1301Â (22.5%) |
Totals | 8669 | 377 | 238 | 5779 |
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.