Skip to navigation

Elite on the BBC Micro and NES

Source code statistics

[6502 Second Processor version]

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

CategoryInstructionsSubroutinesVariablesData (bytes)
Charts248   (1.9%)9   (1.7%)0    (0.0%)0     (0.0%)
Copy protection63    (0.5%)4   (0.7%)2    (0.5%)45    (0.2%)
Dashboard528   (4.1%)31  (5.8%)3    (0.7%)45    (0.2%)
Demo420   (3.2%)6   (1.1%)8    (1.9%)588   (2.3%)
Drawing circles269   (2.1%)11  (2.0%)0    (0.0%)0     (0.0%)
Drawing lines1423 (11.0%)30  (5.6%)7    (1.7%)1297  (5.0%)
Drawing pixels247   (1.9%)10  (1.9%)13   (3.1%)582   (2.3%)
Drawing planets368   (2.8%)16  (3.0%)4    (1.0%)10    (0.0%)
Drawing ships928   (7.2%)14  (2.6%)38   (9.0%)9190 (35.7%)
Drawing suns175   (1.4%)6   (1.1%)0    (0.0%)0     (0.0%)
Drawing the screen212   (1.6%)14  (2.6%)3    (0.7%)161   (0.6%)
Equipment229   (1.8%)5   (0.9%)1    (0.2%)28    (0.1%)
Flight634   (4.9%)30  (5.6%)0    (0.0%)0     (0.0%)
Keyboard455   (3.5%)19  (3.5%)4    (1.0%)184   (0.7%)
Loader282   (2.2%)7   (1.3%)5    (1.2%)183   (0.7%)
Main loop696   (5.4%)22  (4.1%)0    (0.0%)1     (0.0%)
Market338   (2.6%)17  (3.2%)1    (0.2%)68    (0.3%)
Maths (Arithmetic)932   (7.2%)54 (10.0%)8    (1.9%)2048  (8.0%)
Maths (Geometry)345   (2.7%)17  (3.2%)2    (0.5%)64    (0.2%)
Missions100   (0.8%)10  (1.9%)0    (0.0%)0     (0.0%)
Moving545   (4.2%)16  (3.0%)0    (0.0%)0     (0.0%)
Save and load230   (1.8%)18  (3.3%)10   (2.4%)198   (0.8%)
Ship hangar220   (1.7%)7   (1.3%)1    (0.2%)39    (0.2%)
Sound76    (0.6%)9   (1.7%)3    (0.7%)254   (1.0%)
Stardust376   (2.9%)7   (1.3%)0    (0.0%)0     (0.0%)
Start and end257   (2.0%)9   (1.7%)0    (0.0%)0     (0.0%)
Status150   (1.2%)7   (1.3%)0    (0.0%)0     (0.0%)
Tactics414   (3.2%)13  (2.4%)0    (0.0%)0     (0.0%)
Text799   (6.2%)67 (12.4%)20   (4.8%)5598 (21.8%)
Tube52    (0.4%)4   (0.7%)2    (0.5%)78    (0.3%)
Universe861   (6.6%)34  (6.3%)2    (0.5%)45    (0.2%)
Utility routines88    (0.7%)16  (3.0%)2    (0.5%)7     (0.0%)
Workspaces0     (0.0%)0   (0.0%)282 (67.0%)5008 (19.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.