CHAPTER 20


BUZZER

This chapter describes the system services which drive the buzzer. The buzzer is driven by software, so programs calling these routines are paused for the duration of the sound. The buzzer volume is not controllable via the operating system services. Note that all of the following services run with interrupts DISABLED in order to prevent the keyboard scanning interrupts from introducing gaps into the middle of the note.


20.0.1 BZ$ALRM

VECTOR NUMBER : 013
INPUT PARAMETERS : None.
OUTPUT VALUES : None.

DESCRIPTION

Gives the noise used by ALARM.

NOTE : BZ$ALRM disables interrupts with an SEI.

EXAMPLE

        OS      BZ$ALRM

ERRORS: None


20.0.1.1 BZ$BELL

VECTOR NUMBER : 014
INPUT PARAMETERS : None
OUTPUT VALUES : None

DESCRIPTION

Makes a standard beep, of fixed frequency and duration.
This is the sound produced by PRINT CHR$(16) in OPL, or by a call to DP$EMIT with A=16.

NOTE : BZ$BELL disables interrupts with an SEI.

EXAMPLE

        OS      BZ$BELL

ERRORS: None


20.0.1.1.1 BZ$TONE

VECTOR NUMBER : 015
INPUT PARAMETERS :
     X = duration
     D = 1 _/ pitch
OUTPUT VALUES : None

DESCRIPTION

Makes a beep of duration X milliseconds, and frequency given by the formula : frequency in Hz = 921600 / ( 78 + 2 * D register ), X can range from 0 to $7FFF.

X=0 produces the shortest possible note.

NOTE : BZ$TONE disables interrupts with an SEI.

EXAMPLE

;       THIS IS THE CODE FOR BZ$BELL
        LDD     #56             ; FREQENCY = 4850 Hz 
        LDX     #50             ; 50 ms 
        OS      BZ$TONE

ERRORS: None