Skip to navigation

Elite on the BBC Micro and NES

Version analysis of ECMOF

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

Code variations between these versions are shown below.

Name: ECMOF Type: Subroutine Category: Sound Summary: Switch off the E.C.M.
Switch the E.C.M. off, turn off the dashboard bulb and make the sound of the E.C.M. switching off).

Code variation 1 of 4A variation in the comments only

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

Other entry points: ECMOF-1 Contains an RTS
.ECMOF

Code variation 2 of 4Specific to an individual platform

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

LDA #0 \ Set ECMA and ECMP to 0 to indicate that no E.C.M. is STA ECMA \ currently running STA ECMP
IF _SNG47 LDA #0 \ Set ECMA and ECMP to 0 to indicate that no E.C.M. is STA ECMA \ currently running STA ECMP ELIF _COMPACT STZ ECMA \ Set ECMA and ECMP to 0 to indicate that no E.C.M. is STZ ECMP \ currently running ENDIF

Code variation 3 of 4Specific to an individual platform

This variation is blank in the Disc (docked) version.

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

JSR ECBLB \ Update the E.C.M. indicator bulb on the dashboard
JMP ECBLB \ Update the E.C.M. indicator bulb on the dashboard and \ return from the subroutine using a tail call

Code variation 4 of 4Specific to an individual platform

This variation is blank in the Master version.

LDA #72 \ Call the NOISE routine with A = 72 to make the sound BNE NOISE \ of the E.C.M. being turned off and return from the \ subroutine using a tail call (this BNE is effectively \ a JMP as A will never be zero)