Classic Computer Magazine Archive ANTIC VOL. 3, NO. 10 / FEBRUARY 1985


Turning off keyboard sound

If you’re one of those people who gets irritated by the keyclick on the Atari 400 and 800, this BASIC program turns off the sound without hardware modification

“I would like to know if there is a command to shut off the clicking of the 800 keyboard?” wrote Travis Appleman of Georgetown, Kentucky.

“Is there a way to disable the Atari keyboard speaker with a POKE statement instead of disconnecting the wires?” Chris Cataldo of Chesapeake, Virginia wrote to Antic.

The I/O Board gets asked about that fairly often, which is why we're especially happy to publish this program for silencing the keyboard.
  Of course, if you own an XL model, you don't need the program.  Simply lower the volume on your TV However, if you prefer to turn off the sound at its source, POKE 731,255 to turn the sound off, and POKE 731,0 to turn it on again.
  Beat the Beeps is a BASIC program that creates a binary file to turn off the clicks.  Type in the listing, check it with TYPO II, SAVE a copy, and RUN it. (Note that RESET deactivates the program, but X=USR(1536) reactivates it.)


The Atari is largely controlled by small subprograms called handlers.  Five “resident" handlers are always present.  They control the printer (P:), the cassette (C:), the display or screen editor (E:), the screen (S:) and the keyboard (K:).  When you turn on your computer with the disk drive turned on and a disk in, you load in the disk handler (D:).  This is why you must specify the D: when you save or load a file from the disk
  Existing handlers can be modified or replaced by your own handlers.
  Part of the keyboard handler tells the computer to produce a click sound with the built-in speaker in the 400 or 800.  Beat The Beeps replaces the existing keyboard handler with a clickless handler.
  A 38-byte handler table is in memory from locations 794 to 831.  It's called HATABS (Handler Address TABleS).  Up to 12 different handler addresses can be placed in HATABS.  Each entry takes up 3 bytes.  The first byte holds the character code by which the handler is called.  This is 68 "D" for the disk, 75 "K" for the keyboard, etc.  Try this:

POKE 809,81

  This changes the "D: " device name for the disk to a "Q:".  You can save and load programs from the disk using the device name "Q:"
  Bytes 2 and 3 of each entry hold the address of another table telling the computer where to go to carry out each function a handler can perform.  These functions include OPEN, CLOSE, GET BYTE, PUT BYTE, GET STATUS and a SPECIAL function.  The SPECIAL function is used for such things as formatting a disk (with the D: handler) or drawing a line (with the S: handler.) Each function entry contains the 2-byte address of the program to execute the desired function.
  Beat the Beeps changes the keyboard HATABS entry so that it points to its own function table, which in turn points to the modified keyboard handler itself.  Voila!  The click is gone!

Ian Lovejoy is a machine language programmer from San Francisco, California.

Listing: BEATBEEP.BAS Download