Skip to navigation


Version analysis of mes9

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

Code variations between these versions are shown below.

Name: mes9 Type: Subroutine Category: Flight Summary: Print a text token, possibly followed by " DESTROYED"
Print a text token, followed by " DESTROYED" if the destruction flag is set (for when a piece of equipment is destroyed).
.mes9 JSR TT27 \ Call TT27 to print the text token in A

Code variation 1 of 1Minor and very low-impact

Tap on a block to expand it, and tap it again to revert.

LSR de \ If bit 0 of variable de is clear, return from the BCC out \ subroutine (as out contains an RTS)
LSR de \ If bits 1-7 of variable de are clear, return from the BEQ out \ subroutine (as out contains an RTS). This means that \ " DESTROYED" is never shown, even if bit 0 of de is \ set, which makes sense as we are docked
LSR de \ If bit 0 of variable de is clear, return from the BCC DK5 \ subroutine (as DK5 contains an RTS)
 LDA #253               \ Print recursive token 93 (" DESTROYED") and return
 JMP TT27               \ from the subroutine using a tail call