Skip to navigation

Elite on the BBC Micro and NES

Source code statistics

[BBC Micro disc version]

Here's a statistical breakdown of the source code for the BBC Micro disc version of Elite. Click on the table headers to sort by that statistic. For more information, see the notes after the table.

CategoryInstructionsSubroutinesVariablesData (bytes)
Charts427   (2.6%)16  (2.1%)0    (0.0%)0      (0.0%)
Copy protection304   (1.8%)10  (1.3%)5    (0.7%)613    (1.1%)
Dashboard697   (4.2%)42  (5.5%)3    (0.4%)21     (0.0%)
Drawing circles500   (3.0%)18  (2.4%)0    (0.0%)0      (0.0%)
Drawing lines1225  (7.4%)41  (5.4%)4    (0.6%)30     (0.1%)
Drawing pixels199   (1.2%)11  (1.4%)7    (1.0%)49     (0.1%)
Drawing planets415   (2.5%)20  (2.6%)4    (0.6%)10     (0.0%)
Drawing ships1722 (10.4%)28  (3.7%)222 (30.8%)46315 (81.0%)
Drawing suns346   (2.1%)12  (1.6%)0    (0.0%)0      (0.0%)
Drawing the screen196   (1.2%)13  (1.7%)4    (0.6%)111    (0.2%)
Equipment242   (1.5%)5   (0.7%)1    (0.1%)28     (0.0%)
Flight687   (4.1%)42  (5.5%)0    (0.0%)2      (0.0%)
Keyboard556   (3.3%)27  (3.6%)1    (0.1%)16     (0.0%)
Loader950   (5.7%)37  (4.9%)22   (3.1%)855    (1.5%)
Main loop703   (4.2%)25  (3.3%)0    (0.0%)1      (0.0%)
Market485   (2.9%)28  (3.7%)2    (0.3%)136    (0.2%)
Maths (Arithmetic)1348  (8.1%)95 (12.5%)0    (0.0%)0      (0.0%)
Maths (Geometry)559   (3.4%)24  (3.2%)2    (0.3%)64     (0.1%)
Missions100   (0.6%)10  (1.3%)0    (0.0%)0      (0.0%)
Moving850   (5.1%)25  (3.3%)0    (0.0%)0      (0.0%)
Save and load198   (1.2%)16  (2.1%)7    (1.0%)146    (0.3%)
Ship hangar195   (1.2%)6   (0.8%)1    (0.1%)36     (0.1%)
Sound85    (0.5%)16  (2.1%)3    (0.4%)136    (0.2%)
Stardust389   (2.3%)8   (1.1%)0    (0.0%)0      (0.0%)
Start and end253   (1.5%)12  (1.6%)0    (0.0%)0      (0.0%)
Status278   (1.7%)13  (1.7%)0    (0.0%)0      (0.0%)
Tactics387   (2.3%)13  (1.7%)0    (0.0%)0      (0.0%)
Text935   (5.6%)79 (10.4%)19   (2.6%)5414   (9.5%)
Universe1295  (7.8%)51  (6.7%)2    (0.3%)53     (0.1%)
Utility routines72    (0.4%)16  (2.1%)3    (0.4%)47     (0.1%)
Workspaces0     (0.0%)0   (0.0%)408 (56.7%)3124   (5.5%)

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.