fwb@siemens.UUCP (10/16/86)
A month or two ago I wrote: >How do you program the sound on an IBM AT or XT? The technical reference >manual does not help much. The PLAY and SOUND instructions of BASIC are not >useful in a C program. (No, I don't want to fork BASICA to make a beep :-) Several replies were posted as responses to the original article, and several more people sent me mail. Most people recommended books. Some included a short description of the process, and some sent code. The most useful code was from Matt Landau of BBN Laboratories. This was C source code which worked right away! I will summarize the responses here. The only source I tried was Matt's. Since his worked, there was no reason to modify the others to be callable from C. In the interest of brevity, I am not including the code or the extended explanations here. If you did not get the sound routine posted by Matt, send me mail and I will send you the shar file. You may wonder why putch('\007') is not enough. Well, here in the Factory Automation Department we make bunch of ATs pretend that they are machines in a factory. Now we can make them sound like a factory too! Some really ugly factory-like sounds can come from those little speakers. They aren't too good at simulating the sound from a 100-ton press, though. Thanks to all of you who took the time to respond. Special thanks to those who included code. Fred ----------------------------------------------------- Frederic W. Brehm (ihnp4!princeton!siemens!fwb) Siemens Research and Technology Laboratories 105 College Road East Princeton, NJ 08540 (609) 734-3336 -------------------------------------------------------------------------- ------------------------- posted in net.micro.pc ------------------------- Appendix H of "C Primer Plus"; Waite, Prata & Martin; Sams Books. [ text deleted ] Bill Mayhew Division of Basic Medical Sciences Northeastern Ohio Universities College of Medicine Rootstown, OH 44272 USA (216) 325-2511 (wtm@neoucom.UUCP) -------------------------------------------------------------------------- ------------------------- posted in net.micro.pc ------------------------- 'Programmers Guide to the IBM PC' by Peter Norton Tom Hjellming Colorado Networks Division Hewlett-Packard ihnp4!hpfcla!thj -------------------------------------------------------------------------- ------------------------- posted in net.micro.pc ------------------------- ... sources for a routine called "sound" which will drive the speaker at a given frequency for a given time. ... [ C source code deleted ] Matt Landau BBN Laboratories, Inc. mlandau@diamond.bbn.com 10 Moulton Street, Cambridge MA 02238 ...harvard!diamond.bbn.com!mlandau (617) 497-2429 -------------------------------------------------------------------------- ------------------------- posted in net.micro.pc ------------------------- 'Bluebook of Assembly Routines for the IBM PC and XT' by Christopher L. Morgan. bright@dataio -------------------------------------------------------------------------- ---------------------------------- mail ---------------------------------- From: princeton!seismo!rochester!ur-tut!jsim (John Simonson) "Assembly Language Primer for the IBM PC/XT" by Robert LaFore (LaFlore? -someone borrowed my copy and never returned it...). -------------------------------------------------------------------------- ---------------------------------- mail ---------------------------------- From: princeton!topaz!caip!lll-crg!csustan!smdev _IBM PC Assembly Language_, Leo J. Scanlon, (c) 1983 by Robert J. Brady company [ assembly language code deleted ] Scott Hazen Mueller lll-crg.arpa!csustan!smdev City of Turlock work: (209) 668-5590 -or- 5628 901 South Walnut Avenue home: (209) 527-1203 Turlock, CA 95380 <Insert pithy saying here...> -------------------------------------------------------------------------- ---------------------------------- mail ---------------------------------- From: princeton!topaz!caip!lll-crg!well!few (Frank Whaley) A fancy version I wrote a while back, using my special macro package. [ assembly language code deleted ] few ----- Frank Whaley Senior Engineer, Beyond Words UUCP: hplabs! ihnp4!ptsfa! seismo!lll-crg!well!few ARPA: well!few@lll-crg.ARPA Tell your boss what you really think; the truth will set you free. --------------------------------------------------------------------------