Skip to navigation

Elite on the BBC Micro and NES

Source code statistics

[NES version]

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

CategoryInstructionsSubroutinesVariablesData (bytes)
Charts384   (1.7%)11  (1.3%)1    (0.1%)4      (0.0%)
Combat demo892   (4.0%)21  (2.5%)28   (2.8%)2704   (3.1%)
Controllers465   (2.1%)17  (2.1%)0    (0.0%)0      (0.0%)
Dashboard626   (2.8%)28  (3.4%)6    (0.6%)2424   (2.7%)
Drawing circles227   (1.0%)7   (0.8%)0    (0.0%)0      (0.0%)
Drawing lines1431  (6.4%)27  (3.3%)3    (0.3%)247    (0.3%)
Drawing pixels127   (0.6%)3   (0.4%)4    (0.4%)466    (0.5%)
Drawing planets273   (1.2%)13  (1.6%)0    (0.0%)0      (0.0%)
Drawing ships1049  (4.7%)20  (2.4%)37   (3.7%)8753   (9.9%)
Drawing sprites99    (0.4%)8   (1.0%)0    (0.0%)3      (0.0%)
Drawing suns462   (2.1%)7   (0.8%)0    (0.0%)0      (0.0%)
Drawing the screen1627  (7.3%)65  (7.9%)38   (3.8%)1314   (1.5%)
Equipment608   (2.7%)18  (2.2%)7    (0.7%)1545   (1.8%)
Flight1090  (4.9%)41  (5.0%)2    (0.2%)70     (0.1%)
Icon bar854   (3.8%)33  (4.0%)11   (1.1%)5504   (6.2%)
Main loop894   (4.0%)23  (2.8%)0    (0.0%)2      (0.0%)
Market367   (1.7%)18  (2.2%)4    (0.4%)80     (0.1%)
Maths (Arithmetic)845   (3.8%)47  (5.7%)4    (0.4%)1024   (1.2%)
Maths (Geometry)427   (1.9%)18  (2.2%)2    (0.2%)64     (0.1%)
Missions153   (0.7%)13  (1.6%)0    (0.0%)0      (0.0%)
Moving565   (2.5%)17  (2.1%)0    (0.0%)0      (0.0%)
PPU1014  (4.6%)37  (4.5%)0    (0.0%)0      (0.0%)
Save and load700   (3.1%)39  (4.7%)15   (1.5%)1397   (1.6%)
Ship hangar311   (1.4%)7   (0.8%)2    (0.2%)40     (0.0%)
Sound1496  (6.7%)51  (6.2%)10   (1.0%)4926   (5.6%)
Stardust449   (2.0%)10  (1.2%)0    (0.0%)0      (0.0%)
Start and end896   (4.0%)39  (4.7%)10   (1.0%)3290   (3.7%)
Status549   (2.5%)23  (2.8%)39   (3.9%)11133 (12.6%)
Tactics504   (2.3%)13  (1.6%)0    (0.0%)0      (0.0%)
Text1287  (5.8%)80  (9.7%)47   (4.7%)16325 (18.5%)
Universe1136  (5.1%)46  (5.6%)21   (2.1%)16064 (18.2%)
Utility routines430   (1.9%)25  (3.0%)8    (0.8%)172    (0.2%)
Workspaces0     (0.0%)0   (0.0%)699 (70.0%)10701 (12.1%)

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.