Here's a statistical breakdown of the source code for the disc version of Elite. Click on the table headers to sort by that statistic. Some notes:
- The instruction count does not include EQUB, EQUW, EQUD, EQUS or SKIP operatives used in declaring variables, but it does include them when they are buried in code (so EQUB &2C "BIT skip" instructions are counted)
- Instructions inside macros aren't counted
- Each part of a multi-part subroutine counts as an individual subroutine
Category | Instructions | Subroutines | Variables |
---|---|---|---|
Charts | 427 (2.6%) | 16 (2.1%) | 0 (0.0%) |
Copy protection | 357 (2.2%) | 10 (1.3%) | 4 (0.4%) |
Dashboard | 679 (4.2%) | 41 (5.5%) | 3 (0.3%) |
Drawing circles | 500 (3.1%) | 18 (2.4%) | 0 (0.0%) |
Drawing lines | 1227 (7.5%) | 41 (5.5%) | 4 (0.4%) |
Drawing pixels | 199 (1.2%) | 11 (1.5%) | 7 (0.7%) |
Drawing planets | 415 (2.5%) | 18 (2.4%) | 4 (0.4%) |
Drawing ships | 1751 (10.7%) | 29 (3.9%) | 222 (23.2%) |
Drawing suns | 346 (2.1%) | 12 (1.6%) | 0 (0.0%) |
Equipment | 242 (1.5%) | 5 (0.7%) | 1 (0.1%) |
Flight | 625 (3.8%) | 28 (3.8%) | 0 (0.0%) |
Inventory | 131 (0.8%) | 5 (0.7%) | 0 (0.0%) |
Keyboard | 563 (3.4%) | 28 (3.8%) | 1 (0.1%) |
Loader | 627 (3.8%) | 26 (3.5%) | 9 (0.9%) |
Main loop | 704 (4.3%) | 25 (3.4%) | 0 (0.0%) |
Market | 363 (2.2%) | 23 (3.1%) | 2 (0.2%) |
Maths (Arithmetic) | 1311 (8.0%) | 92 (12.3%) | 0 (0.0%) |
Maths (Geometry) | 530 (3.2%) | 23 (3.1%) | 2 (0.2%) |
Missions | 81 (0.5%) | 8 (1.1%) | 0 (0.0%) |
Moving | 850 (5.2%) | 25 (3.4%) | 0 (0.0%) |
Save and load | 209 (1.3%) | 17 (2.3%) | 6 (0.6%) |
Screen mode | 67 (0.4%) | 5 (0.7%) | 4 (0.4%) |
Ship hanger | 195 (1.2%) | 6 (0.8%) | 1 (0.1%) |
Sound | 97 (0.6%) | 18 (2.4%) | 3 (0.3%) |
Stardust | 389 (2.4%) | 8 (1.1%) | 0 (0.0%) |
Start and end | 253 (1.5%) | 12 (1.6%) | 0 (0.0%) |
Status | 211 (1.3%) | 5 (0.7%) | 0 (0.0%) |
Tactics | 387 (2.4%) | 13 (1.7%) | 0 (0.0%) |
Text | 1204 (7.4%) | 111 (14.9%) | 19 (2.0%) |
Universe | 1134 (6.9%) | 38 (5.1%) | 2 (0.2%) |
Utility routines | 263 (1.6%) | 29 (3.9%) | 2 (0.2%) |
Workspaces | 0 (0.0%) | 0 (0.0%) | 660 (69.0%) |
Totals | 16337 | 746 | 956 |