Skip to navigation


Source code statistics

[Apple II version]

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

CategoryInstructionsSubroutinesVariablesData (bytes)
Charts268   (2.3%)9   (1.7%)0    (0.0%)0     (0.0%)
Dashboard311   (2.6%)24  (4.5%)7    (1.7%)72    (0.4%)
Drawing circles268   (2.3%)9   (1.7%)0    (0.0%)0     (0.0%)
Drawing lines868   (7.4%)28  (5.2%)8    (2.0%)80    (0.4%)
Drawing pixels118   (1.0%)3   (0.6%)3    (0.7%)42    (0.2%)
Drawing planets80    (0.7%)7   (1.3%)0    (0.0%)0     (0.0%)
Drawing ships932   (7.9%)14  (2.6%)36   (9.0%)7847 (41.3%)
Drawing suns176   (1.5%)6   (1.1%)0    (0.0%)0     (0.0%)
Drawing the screen181   (1.5%)12  (2.2%)6    (1.5%)616   (3.2%)
Equipment236   (2.0%)5   (0.9%)1    (0.2%)28    (0.1%)
Flight650   (5.5%)29  (5.4%)0    (0.0%)1     (0.0%)
Keyboard415   (3.5%)16  (3.0%)3    (0.7%)46    (0.2%)
Loader199   (1.7%)14  (2.6%)4    (1.0%)5     (0.0%)
Main loop674   (5.7%)22  (4.1%)0    (0.0%)1     (0.0%)
Market360   (3.1%)17  (3.2%)1    (0.2%)68    (0.4%)
Maths (Arithmetic)835   (7.1%)49  (9.2%)3    (0.7%)768   (4.0%)
Maths (Geometry)318   (2.7%)19  (3.6%)1    (0.2%)64    (0.3%)
Missions87    (0.7%)11  (2.1%)5    (1.2%)12    (0.1%)
Moving545   (4.6%)16  (3.0%)0    (0.0%)0     (0.0%)
Save and load1163  (9.9%)62 (11.6%)26   (6.5%)755   (4.0%)
Sound105   (0.9%)13  (2.4%)0    (0.0%)0     (0.0%)
Stardust378   (3.2%)7   (1.3%)0    (0.0%)0     (0.0%)
Start and end256   (2.2%)9   (1.7%)0    (0.0%)0     (0.0%)
Status157   (1.3%)7   (1.3%)2    (0.5%)64    (0.3%)
Tactics430   (3.7%)14  (2.6%)0    (0.0%)0     (0.0%)
Text734   (6.2%)64 (12.0%)18   (4.5%)5453 (28.7%)
Tube14    (0.1%)1   (0.2%)0    (0.0%)0     (0.0%)
Universe862   (7.3%)32  (6.0%)2    (0.5%)23    (0.1%)
Utility routines144   (1.2%)16  (3.0%)3    (0.7%)14    (0.1%)
Workspaces0     (0.0%)0   (0.0%)273 (67.9%)3041 (16.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 and ship data files.