Skip to navigation

Elite on the BBC Micro and NES

Source code statistics

[BBC Master version]

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

CategoryInstructionsSubroutinesVariablesData (bytes)
Charts284   (2.3%)9   (1.8%)0    (0.0%)0     (0.0%)
Dashboard468   (3.8%)24  (4.8%)2    (0.6%)38    (0.2%)
Drawing circles263   (2.1%)9   (1.8%)0    (0.0%)0     (0.0%)
Drawing lines1349 (10.9%)27  (5.4%)4    (1.1%)38    (0.2%)
Drawing pixels120   (1.0%)4   (0.8%)9    (2.5%)298   (1.7%)
Drawing planets394   (3.2%)18  (3.6%)4    (1.1%)10    (0.1%)
Drawing ships937   (7.6%)14  (2.8%)39  (11.0%)8154 (45.2%)
Drawing suns176   (1.4%)6   (1.2%)0    (0.0%)0     (0.0%)
Drawing the screen187   (1.5%)10  (2.0%)5    (1.4%)151   (0.8%)
Equipment229   (1.9%)5   (1.0%)1    (0.3%)28    (0.2%)
Flight658   (5.3%)29  (5.8%)0    (0.0%)12    (0.1%)
Keyboard526   (4.3%)23  (4.6%)4    (1.1%)178   (1.0%)
Loader143   (1.2%)4   (0.8%)4    (1.1%)87    (0.5%)
Main loop689   (5.6%)22  (4.4%)0    (0.0%)1     (0.0%)
Market361   (2.9%)17  (3.4%)1    (0.3%)68    (0.4%)
Maths (Arithmetic)946   (7.7%)54 (10.9%)3    (0.8%)768   (4.3%)
Maths (Geometry)348   (2.8%)20  (4.0%)2    (0.6%)64    (0.4%)
Missions104   (0.8%)11  (2.2%)0    (0.0%)0     (0.0%)
Moving545   (4.4%)16  (3.2%)0    (0.0%)0     (0.0%)
Save and load294   (2.4%)16  (3.2%)13   (3.7%)357   (2.0%)
Ship hangar219   (1.8%)6   (1.2%)2    (0.6%)37    (0.2%)
Sound129   (1.0%)12  (2.4%)7    (2.0%)78    (0.4%)
Stardust384   (3.1%)7   (1.4%)0    (0.0%)0     (0.0%)
Start and end248   (2.0%)9   (1.8%)0    (0.0%)0     (0.0%)
Status154   (1.2%)7   (1.4%)2    (0.6%)66    (0.4%)
Tactics431   (3.5%)14  (2.8%)0    (0.0%)0     (0.0%)
Text765   (6.2%)58 (11.7%)19   (5.4%)5499 (30.5%)
Universe860   (7.0%)32  (6.5%)2    (0.6%)29    (0.2%)
Utility routines113   (0.9%)13  (2.6%)1    (0.3%)23    (0.1%)
Workspaces0     (0.0%)0   (0.0%)229 (64.9%)2069 (11.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.