Skip to navigation

Elite on the BBC Micro

Version analysis of cmn

This code appears in the following versions (click to see it in the source code):

Code variations between these versions are shown below.

Name: cmn Type: Subroutine Category: Text Summary: Print the commander's name
Print control code 4 (the commander's name). Other entry points: cmn-1 Contains an RTS
.cmn

Code variation 1 of 2Specific to an individual platform

This variation is blank in the Cassette, Disc (flight), 6502 Second Processor, Master and Electron versions.

Docked

JSR MT19 \ Call MT19 to capitalise the next letter (i.e. set \ Sentence Case for this word only)
 LDY #0                 \ Set up a counter in Y, starting from 0

.QUL4

Code variation 2 of 2Specific to an individual platform

Tap on a version to expand it, and tap it again to show to all variations.

Cassette, Docked, Electron

Flight, 6502SP, Master

LDA NA%,Y \ The commander's name is stored at NA%, so load the \ Y-th character from NA%
LDA NAME,Y \ The commander's name is stored at NAME, so load the \ Y-th character from NAME
 CMP #13                \ If we have reached the end of the name, return from
 BEQ ypl-1              \ the subroutine (ypl-1 points to the RTS below)

 JSR TT26               \ Print the character we just loaded

 INY                    \ Increment the loop counter

 BNE QUL4               \ Loop back for the next character

 RTS                    \ Return from the subroutine

RSS Feed