4

On the Apple II, system beeps were typically just the 'Control-G' beep noise. However, many ProDOS-based applications from Apple Computer abandoned the firmware-based beep routine and instead used a softer alert sound instead.

Was this softer alert sound built into the ProDOS kernel accessible through a MLI call, or was it just a widely copied piece of code that these applications used?

For the answer, it would be helpful if there was also a link to the source, proper name, or how to use it if it was in-fact accessed via the MLI.

4
  • There is no "beep" MLI call in ProDOS-8 (or ProDOS-16, or GS/OS). The interesting question would be whether it was part of a text UI toolkit.
    – fadden
    Nov 21 '20 at 0:35
  • 1
    There's no beep code in ProDOS at all, other than the one at startup. Basic uses the ROM version. If you mean the one like in Dazzle Draw, that routine was used widely. It might have been common library code. Nov 21 '20 at 1:34
  • Assuming ProDOS did the beep in a sub-routine, would it not just be a matter of knowing the address on a per ProDOS version release basis?
    – Brian H
    Nov 21 '20 at 15:08
  • @BrianH: there were many versions of ProDOS. The code to make the beep is likely shorter than the code required to call a version-specific address would be. In any event, the question can be answered pretty quickly by setting a memory access breakpoint on $C030 in an emulator, then causing the beep in a few different programs. (Having a list of programs and circumstances would help.)
    – fadden
    Nov 21 '20 at 15:39
9

It is a programming convention (i.e. copied code), not part of ProDOS.

ProDOS 8 Technical Reference Manual 5.4 Programming Conventions

The standard Apple II "Air-raid" bell has been replaced with a gentler tone. Use it to give users some aural feedback that they are using a ProDOS program. The code for it follows.

And the code indeed follows.

http://www.easy68k.com/paulrsm/6502/PDOS8TRM.HTM#5.4

https://prodos8.com/docs/techref/writing-a-prodos-system-program/

SPKR      EQU   $C030         ;this clicks the speaker
*
LENGTH    DS    1             ;duration of tone
*
* This is the wait routine from the Monitor ROM.
*
WAIT      SEC
WAIT2     PHA
WAIT3     SBC   #1
          BNE   WAIT3
          PLA
          SBC   #1
          BNE   WAIT2
          RTS
*
* Generate a nice little tone
* Exits with Z-flag set (BEQ) for branching
* Destroys the contents of the accumulator
*
BELL      LDA   #$20          ;duration of tone
          STA   LENGTH
BELL1     LDA   #$2           ;short delay...click
          JSR   WAIT
          STA   SPKR
          LDA   #$20          ;long delay...click
          JSR   WAIT
          STA   SPKR
          DEC   LENGTH
          BNE   BELL1         ;repeat LENGTH times
          RTS
0

Interesting question. I do not remember anything like it.

The Prodos MLI was rather frugal and offered, beside file system related access, only five funtions:

  • GET_TIME,
  • ALLOC/DEALLOC_TNTERRUPTand
  • READ/WRITE_BLOCK.

But then again, I really used only ProDOS 8, so there might be more in ProDOS 16.

2
  • ProDOS 16 does have a beep function. Nov 28 '20 at 21:22
  • The IIgs Toolbox has two beep functions; SysBeep is included in the ROM and just calls the BELL1/FBDD firmware. So there is a beep function but it exists outside the OS/kernel. System 6 added a second Beep, SysBeep2. The code is loaded from disk so GS/OS is required, indirectly, to use it. Furthermore, in most cases the actual SysBeep2 beeping is handled by the sound control panel playing an 8-bit PCM audio file from disk, which of course, requires GS/OS. Feb 26 at 1:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.