This code appears in the following versions (click to see it in the source code):
Code variations between these versions are shown below.
.TALLY SKIP 2 \ Our combat rank \ \ The combat rank is stored as the number of kills, in a \ 16-bit number TALLY(1 0) - so the high byte is in \ TALLY+1 and the low byte in TALLY
This variation is blank in the Cassette, Disc (flight), Disc (docked), 6502 Second Processor and Electron versions.
\ \ There is also a fractional part of the kill count, \ which is stored in TALLYL
\
\ If the high byte in TALLY+1 is 0 then we have between
\ 0 and 255 kills, so our rank is Harmless, Mostly
\ Harmless, Poor, Average Above Average or Competent,
\ according to the value of the low byte in TALLY:
\
\ Harmless %00000000 to %00000111 = 0 to 7
\ Mostly Harmless %00001000 to %00001111 = 8 to 15
\ Poor %00010000 to %00011111 = 16 to 31
\ Average %00100000 to %00111111 = 32 to 63
\ Above Average %01000000 to %01111111 = 64 to 127
\ Competent %10000000 to %11111111 = 128 to 255
\
\ Note that the Competent range also covers kill counts
\ from 256 to 511, as follows
\
\ If the high byte in TALLY+1 is non-zero then we are
\ Competent, Dangerous, Deadly or Elite, according to
\ the value of TALLY(1 0):
\
\ Competent (1 0) to (1 255) = 256 to 511 kills
\ Dangerous (2 0) to (9 255) = 512 to 2559 kills
\ Deadly (10 0) to (24 255) = 2560 to 6399 kills
\ Elite (25 0) and up = 6400 kills and up
\
\ You can see the rating calculation in the STATUS
\ subroutine