Skip to navigation

Elite on the BBC Micro and NES

Version analysis of BEEP

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

Code variations between these versions are shown below.

Name: BEEP Type: Subroutine Category: Sound Summary: Make a short, high beep
.BEEP

Code variation 1 of 1Minor and very low-impact

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

LDA #32 \ Set A = 32 to denote a short, high beep, and fall \ through into the NOISE routine to make the sound
LDA #32 \ Call the NOISE routine with A = 32 to make a short, BNE NOISE \ high beep, returning from the subroutine using a tail \ call (this BNE is effectively a JMP as A will never be \ zero)
LDY #sobeep \ Call the NOISE routine with Y = 1 to make a short, BRA NOISE \ high beep, returning from the subroutine using a tail \ call