Skip to navigation

Elite on the BBC Micro and NES

Source code statistics

[Elite-A]

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

CategoryInstructionsSubroutinesVariablesData (bytes)
Buying ships237   (0.8%)7    (0.5%)8    (0.5%)1328   (1.2%)
Charts880   (2.8%)33   (2.2%)0    (0.0%)0      (0.0%)
Copy protection6     (0.0%)1    (0.1%)1    (0.1%)15     (0.0%)
Dashboard1170  (3.7%)77   (5.1%)9    (0.6%)42     (0.0%)
Drawing circles921   (2.9%)33   (2.2%)0    (0.0%)0      (0.0%)
Drawing lines2470  (7.9%)84   (5.6%)8    (0.5%)60     (0.1%)
Drawing pixels299   (1.0%)21   (1.4%)13   (0.9%)90     (0.1%)
Drawing planets712   (2.3%)37   (2.5%)4    (0.3%)10     (0.0%)
Drawing ships3435 (11.0%)56   (3.7%)359 (24.5%)75523 (67.9%)
Drawing suns661   (2.1%)23   (1.5%)0    (0.0%)0      (0.0%)
Drawing the screen350   (1.1%)28   (1.9%)3    (0.2%)97     (0.1%)
Encyclopedia456   (1.5%)14   (0.9%)78   (5.3%)4412   (4.0%)
Equipment492   (1.6%)11   (0.7%)2    (0.1%)264    (0.2%)
Flight1200  (3.8%)72   (4.8%)0    (0.0%)2      (0.0%)
Keyboard1280  (4.1%)68   (4.5%)5    (0.3%)74     (0.1%)
Loader429   (1.4%)35   (2.3%)6    (0.4%)51     (0.0%)
Main loop1345  (4.3%)52   (3.5%)0    (0.0%)2      (0.0%)
Market872   (2.8%)48   (3.2%)3    (0.2%)204    (0.2%)
Maths (Arithmetic)2298  (7.3%)170 (11.3%)0    (0.0%)0      (0.0%)
Maths (Geometry)998   (3.2%)43   (2.9%)4    (0.3%)128    (0.1%)
Missions605   (1.9%)26   (1.7%)0    (0.0%)0      (0.0%)
Moving1452  (4.6%)48   (3.2%)0    (0.0%)0      (0.0%)
Save and load399   (1.3%)31   (2.1%)13   (0.9%)266    (0.2%)
Ship hangar398   (1.3%)15   (1.0%)2    (0.1%)72     (0.1%)
Sound136   (0.4%)30   (2.0%)5    (0.3%)216    (0.2%)
Stardust748   (2.4%)15   (1.0%)0    (0.0%)0      (0.0%)
Start and end491   (1.6%)24   (1.6%)0    (0.0%)0      (0.0%)
Status440   (1.4%)23   (1.5%)0    (0.0%)0      (0.0%)
Tactics791   (2.5%)28   (1.9%)0    (0.0%)0      (0.0%)
Text2445  (7.8%)199 (13.2%)54   (3.7%)21967 (19.7%)
Tube58    (0.2%)10   (0.7%)2    (0.1%)64     (0.1%)
Universe2705  (8.6%)105  (7.0%)4    (0.3%)106    (0.1%)
Utility routines168   (0.5%)35   (2.3%)6    (0.4%)6      (0.0%)
Workspaces0     (0.0%)0    (0.0%)876 (59.8%)6292   (5.7%)

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.