Skip to navigation


Source code statistics

[Commodore 64 version]

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

CategoryInstructionsSubroutinesVariablesData (bytes)
Charts247   (1.9%)9   (1.6%)0    (0.0%)0     (0.0%)
Copy protection19    (0.1%)1   (0.2%)0    (0.0%)0     (0.0%)
Dashboard434   (3.3%)23  (4.2%)0    (0.0%)6     (0.0%)
Drawing circles251   (1.9%)10  (1.8%)0    (0.0%)0     (0.0%)
Drawing lines1014  (7.8%)21  (3.8%)13   (3.1%)610   (2.9%)
Drawing pixels85    (0.7%)4   (0.7%)9    (2.2%)607   (2.9%)
Drawing planets305   (2.3%)15  (2.7%)0    (0.0%)0     (0.0%)
Drawing ships1081  (8.3%)15  (2.7%)37   (8.9%)8699 (41.7%)
Drawing suns174   (1.3%)6   (1.1%)0    (0.0%)0     (0.0%)
Drawing the screen328   (2.5%)19  (3.5%)14   (3.4%)843   (4.0%)
Equipment229   (1.8%)5   (0.9%)1    (0.2%)28    (0.1%)
Flight666   (5.1%)29  (5.3%)0    (0.0%)1     (0.0%)
Keyboard474   (3.6%)18  (3.3%)4    (1.0%)197   (0.9%)
Loader988   (7.6%)30  (5.5%)10   (2.4%)800   (3.8%)
Main loop745   (5.7%)22  (4.0%)0    (0.0%)2     (0.0%)
Market363   (2.8%)17  (3.1%)1    (0.2%)68    (0.3%)
Maths (Arithmetic)864   (6.6%)49  (8.9%)4    (1.0%)1024  (4.9%)
Maths (Geometry)345   (2.6%)17  (3.1%)2    (0.5%)96    (0.5%)
Missions182   (1.4%)13  (2.4%)5    (1.2%)36    (0.2%)
Moving545   (4.2%)16  (2.9%)0    (0.0%)0     (0.0%)
Save and load241   (1.8%)15  (2.7%)9    (2.2%)189   (0.9%)
Sound507   (3.9%)45  (8.2%)12   (2.9%)200   (1.0%)
Sprites0     (0.0%)0   (0.0%)1    (0.2%)7     (0.0%)
Stardust378   (2.9%)7   (1.3%)0    (0.0%)0     (0.0%)
Start and end276   (2.1%)9   (1.6%)0    (0.0%)0     (0.0%)
Status177   (1.4%)7   (1.3%)2    (0.5%)66    (0.3%)
Tactics433   (3.3%)14  (2.5%)0    (0.0%)0     (0.0%)
Text706   (5.4%)63 (11.5%)18   (4.3%)5851 (28.1%)
Tube15    (0.1%)2   (0.4%)0    (0.0%)0     (0.0%)
Universe861   (6.6%)32  (5.8%)2    (0.5%)39    (0.2%)
Utility routines119   (0.9%)17  (3.1%)8    (1.9%)6     (0.0%)
Workspaces0     (0.0%)0   (0.0%)263 (63.4%)1467  (7.0%)

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.