Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!ames!ucbcad!ucbvax!jade!violet.berkeley.edu!ephram From: ephram@violet.berkeley.edu.UUCP Newsgroups: comp.sys.ibm.pc Subject: Re: Turning on sound and keyboard info. Message-ID: <2617@jade.BERKELEY.EDU> Date: Thu, 26-Feb-87 02:00:08 EST Article-I.D.: jade.2617 Posted: Thu Feb 26 02:00:08 1987 Date-Received: Sat, 28-Feb-87 03:17:31 EST References: <262@crys.WISC.EDU> Sender: usenet@jade.BERKELEY.EDU Reply-To: ephram@violet.berkeley.edu () Distribution: comp Organization: University of California, Berkeley Lines: 31 Keywords: sound, keyboard In article <262@crys.WISC.EDU> jojo@crys.WISC.EDU (Jon Wesener) writes: > > I'm currently writing a game in C and want to add sound. The problem >is that the all the sound routines I have will play a frequency for some >duration. (usually by busy waiting) What I'm looking for is something >similar to Turbo Pascal's soundon and soundoff routines. These routines >turn the speaker on and have it play a frequency without supervision of >the cpu. Does anyone know how to do this? > I think the turbo routines do it by attatching to the time of day interupt but I am just stabbing in the dark on this one. >Secondly, I know how int 9 and int 16 work for getting keyboard input, >when you press a key, the chip in the keyboard signals a hardware int. through >int 9. Int 9 then reads in the scan code, etc from port 60(?) From what I >hear, there's another port (61?) which can tell you if a key is being pressed. The keyboard sends out 2 codes for each key. When the key is pressed it sends out the scan code we all know about. In addition, however, the scan code + 80 (hex) is sent when the key is released. I don't think there is another port that tells you about weather (sp?) a key is down or not. > >thanx in advance, >--j > your welcome :-) I hope this is of service. ephram@violet.berkeley.edu