Here's a statistical breakdown of the source code for the 6502 Second Processor 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 | 248 (1.9%) | 9 (1.7%) | 0 (0.0%) |
Copy protection | 65 (0.5%) | 4 (0.8%) | 0 (0.0%) |
Dashboard | 523 (4.1%) | 30 (5.6%) | 3 (0.6%) |
Demo | 418 (3.2%) | 6 (1.1%) | 7 (1.5%) |
Drawing circles | 269 (2.1%) | 11 (2.1%) | 0 (0.0%) |
Drawing lines | 1423 (11.0%) | 30 (5.6%) | 7 (1.5%) |
Drawing pixels | 247 (1.9%) | 10 (1.9%) | 13 (2.7%) |
Drawing planets | 368 (2.9%) | 14 (2.6%) | 4 (0.8%) |
Drawing ships | 957 (7.4%) | 15 (2.8%) | 38 (8.0%) |
Drawing suns | 175 (1.4%) | 6 (1.1%) | 0 (0.0%) |
Equipment | 229 (1.8%) | 5 (0.9%) | 1 (0.2%) |
Flight | 564 (4.4%) | 21 (3.9%) | 0 (0.0%) |
Inventory | 88 (0.7%) | 3 (0.6%) | 0 (0.0%) |
Keyboard | 441 (3.4%) | 20 (3.8%) | 4 (0.8%) |
Loader | 259 (2.0%) | 7 (1.3%) | 4 (0.8%) |
Main loop | 690 (5.4%) | 22 (4.1%) | 0 (0.0%) |
Market | 259 (2.0%) | 14 (2.6%) | 1 (0.2%) |
Maths (Arithmetic) | 908 (7.0%) | 52 (9.8%) | 8 (1.7%) |
Maths (Geometry) | 316 (2.5%) | 16 (3.0%) | 2 (0.4%) |
Missions | 81 (0.6%) | 8 (1.5%) | 0 (0.0%) |
Moving | 545 (4.2%) | 16 (3.0%) | 0 (0.0%) |
Save and load | 233 (1.8%) | 19 (3.6%) | 8 (1.7%) |
Screen mode | 68 (0.5%) | 6 (1.1%) | 3 (0.6%) |
Ship hanger | 223 (1.7%) | 3 (0.6%) | 1 (0.2%) |
Sound | 54 (0.4%) | 9 (1.7%) | 2 (0.4%) |
Stardust | 376 (2.9%) | 7 (1.3%) | 0 (0.0%) |
Start and end | 251 (1.9%) | 8 (1.5%) | 0 (0.0%) |
Status | 117 (0.9%) | 3 (0.6%) | 0 (0.0%) |
Tactics | 412 (3.2%) | 13 (2.4%) | 0 (0.0%) |
Text | 1003 (7.8%) | 86 (16.2%) | 20 (4.2%) |
Tube | 52 (0.4%) | 4 (0.8%) | 2 (0.4%) |
Universe | 752 (5.8%) | 27 (5.1%) | 1 (0.2%) |
Utility routines | 270 (2.1%) | 28 (5.3%) | 2 (0.4%) |
Workspaces | 0 (0.0%) | 0 (0.0%) | 344 (72.4%) |
Totals | 12884 | 532 | 475 |