Skip to navigation

Elite on the BBC Micro and NES

Source code statistics

[BBC Micro cassette version]

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

CategoryInstructionsSubroutinesVariablesData (bytes)
Charts199  (2.1%)8   (2.0%)0    (0.0%)0     (0.0%)
Copy protection78   (0.8%)7   (1.7%)11   (4.3%)96    (1.5%)
Dashboard403  (4.3%)24  (5.9%)2    (0.8%)12    (0.2%)
Drawing circles252  (2.7%)9   (2.2%)0    (0.0%)0     (0.0%)
Drawing lines631  (6.7%)21  (5.2%)2    (0.8%)15    (0.2%)
Drawing pixels110  (1.2%)6   (1.5%)4    (1.6%)29    (0.4%)
Drawing planets400  (4.3%)18  (4.4%)3    (1.2%)6     (0.1%)
Drawing ships927  (9.9%)14  (3.4%)13   (5.1%)2964 (45.7%)
Drawing suns174  (1.9%)6   (1.5%)0    (0.0%)0     (0.0%)
Drawing the screen176  (1.9%)8   (2.0%)5    (1.9%)121   (1.9%)
Equipment201  (2.1%)4   (1.0%)1    (0.4%)24    (0.4%)
Flight387  (4.1%)25  (6.1%)0    (0.0%)2     (0.0%)
Keyboard279  (3.0%)14  (3.4%)1    (0.4%)15    (0.2%)
Loader314  (3.3%)6   (1.5%)0    (0.0%)14    (0.2%)
Main loop604  (6.4%)22  (5.4%)0    (0.0%)0     (0.0%)
Market297  (3.2%)15  (3.7%)1    (0.4%)68    (1.0%)
Maths (Arithmetic)772  (8.2%)51 (12.5%)0    (0.0%)0     (0.0%)
Maths (Geometry)321  (3.4%)15  (3.7%)2    (0.8%)64    (1.0%)
Moving544  (5.8%)16  (3.9%)0    (0.0%)0     (0.0%)
Save and load100  (1.1%)7   (1.7%)4    (1.6%)89    (1.4%)
Sound43   (0.5%)8   (2.0%)2    (0.8%)97    (1.5%)
Stardust375  (4.0%)7   (1.7%)0    (0.0%)0     (0.0%)
Start and end193  (2.1%)9   (2.2%)0    (0.0%)0     (0.0%)
Status139  (1.5%)7   (1.7%)0    (0.0%)0     (0.0%)
Tactics329  (3.5%)13  (3.2%)0    (0.0%)0     (0.0%)
Text380  (4.0%)29  (7.1%)6    (2.3%)1287 (19.8%)
Universe747  (7.9%)30  (7.4%)1    (0.4%)26    (0.4%)
Utility routines27   (0.3%)8   (2.0%)3    (1.2%)35    (0.5%)
Workspaces0    (0.0%)0   (0.0%)196 (76.3%)1527 (23.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.