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 protection302   (1.9%)10  (1.3%)5    (0.7%)613    (1.1%)
Dashboard677   (4.2%)41  (5.5%)3    (0.4%)21     (0.0%)
Drawing circles500   (3.1%)18  (2.4%)0    (0.0%)0      (0.0%)
Drawing lines1225  (7.6%)41  (5.5%)4    (0.6%)30     (0.1%)
Drawing pixels199   (1.2%)11  (1.5%)7    (1.0%)49     (0.1%)
Drawing planets415   (2.6%)20  (2.7%)4    (0.6%)10     (0.0%)
Drawing ships1722 (10.6%)28  (3.8%)222 (31.8%)46303 (81.2%)
Drawing suns346   (2.1%)12  (1.6%)0    (0.0%)0      (0.0%)
Drawing the screen196   (1.2%)13  (1.7%)4    (0.6%)109    (0.2%)
Equipment242   (1.5%)5   (0.7%)1    (0.1%)28     (0.0%)
Flight687   (4.2%)42  (5.6%)0    (0.0%)2      (0.0%)
Keyboard556   (3.4%)27  (3.6%)1    (0.1%)16     (0.0%)
Loader550   (3.4%)24  (3.2%)9    (1.3%)732    (1.3%)
Main loop703   (4.3%)25  (3.4%)0    (0.0%)1      (0.0%)
Market485   (3.0%)28  (3.8%)2    (0.3%)136    (0.2%)
Maths (Arithmetic)1348  (8.3%)95 (12.8%)0    (0.0%)0      (0.0%)
Maths (Geometry)559   (3.5%)24  (3.2%)2    (0.3%)64     (0.1%)
Missions100   (0.6%)10  (1.3%)0    (0.0%)0      (0.0%)
Moving850   (5.3%)25  (3.4%)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.4%)8   (1.1%)0    (0.0%)0      (0.0%)
Start and end253   (1.6%)12  (1.6%)0    (0.0%)0      (0.0%)
Status278   (1.7%)13  (1.7%)0    (0.0%)0      (0.0%)
Tactics387   (2.4%)13  (1.7%)0    (0.0%)0      (0.0%)
Text935   (5.8%)79 (10.6%)19   (2.7%)5414   (9.5%)
Universe1295  (8.0%)51  (6.8%)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%)399 (57.2%)3112   (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.