Skip to navigation


Version analysis of SFRMIS

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

Code variations between these versions are shown below.

Name: SFRMIS Type: Subroutine Category: Tactics Summary: Add an enemy missile to our local bubble of universe
An enemy has fired a missile, so add the missile to our universe if there is room, and if there is, make the appropriate warnings and noises.
.SFRMIS LDX #MSL \ Set X to the ship type of a missile, and call SFS1-2 JSR SFS1-2 \ to add the missile to our universe with an AI flag \ of %11111110 (AI enabled, hostile, no E.C.M.)

Code variation 1 of 3A variation in the labels only

This variation is blank in the Master version.

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

BCC NO1 \ The C flag will be set if the call to SFS1-2 was a \ success, so if it's clear, jump to NO1 to return from \ the subroutine (as NO1 contains an RTS)
BCC KYTB \ The C flag will be set if the call to SFS1-2 was a \ success, so if it's clear, jump to KYTB to return from \ the subroutine (as KYTB contains an RTS)
BCC ECMOF-1 \ The C flag will be set if the call to SFS1-2 was a \ success, so if it's clear, jump to ECMOF-1 to return \ from the subroutine (as ECMOF-1 contains an RTS)

Code variation 2 of 3Related to the 6502SP version

If speech is enabled on the Executive version, it will say "Incoming missile" every time the "INCOMING MISSILE,SIR" message flashes on-screen.

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

IF _EXECUTIVE LDX #1 \ Call TALK with X = 1 to say "Incoming missile" using JSR TALK \ the Watford Electronics Beeb Speech Synthesiser (if \ one is fitted and speech has been enabled) ENDIF
 LDA #120               \ Print recursive token 120 ("INCOMING MISSILE") as an
 JSR MESS               \ in-flight message

Code variation 3 of 3Related to the Master version

The Master version has a unique missile launch sound.

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

LDA #48 \ Call the NOISE routine with A = 48 to make the sound BNE NOISE \ of the missile being launched and return from the \ subroutine using a tail call (this BNE is effectively \ a JMP as A will never be zero)
LDY #solaun \ Call the NOISE routine with Y = 8 to make the sound JMP NOISE \ of the missile being launched and return from the \ subroutine using a tail call