Skip to navigation


Tactics: SFRMIS

[NES version, Bank 0]

Name: SFRMIS [Show more] Type: Subroutine Category: Tactics Summary: Add an enemy missile to our local bubble of universe
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * TACTICS (Part 5 of 7) calls SFRMIS

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.) BCC sfrm1 ; The C flag will be set if the call to SFS1-2 was a ; success, so if it's clear, jump to sfrm1 to return ; from the subroutine LDA #120 ; Print recursive token 120 ("INCOMING MISSILE") as an JSR MESS ; in-flight message LDY #9 ; Call the NOISE routine with Y = 9 to make the sound JMP NOISE ; of the missile being launched and return from the ; subroutine using a tail call .sfrm1 RTS ; Return from the subroutine