Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!husc6!ddl From: ddl@husc6.UUCP Newsgroups: comp.os.minix Subject: Re: use of bios routines in the minix kernal, why not? Message-ID: <1216@husc6.UUCP> Date: Thu, 12-Feb-87 18:25:51 EST Article-I.D.: husc6.1216 Posted: Thu Feb 12 18:25:51 1987 Date-Received: Fri, 13-Feb-87 21:15:50 EST References: <172@axis.UUCP> <1192@husc6.UUCP> <431@percival.UUCP> Distribution: world Organization: Harvard University, Cambridge MA Lines: 39 Keywords: interupt poll In article <431@percival.UUCP>, nerd@percival.UUCP (Michael Galassi) writes: > Nope, sorry, the combination gives you a polled keyboard. As things stand > now, if you call the bios to do a read it will sit there and *poll* the FIFO > status until it finds that a key has been hit, then it returns with the > key's value. Alternately your code could check the FIFO status and loop until > something showed up (duplicating the bios' code), you would still be polling > the keyboard's queue. While it may be different in words the result is stil > that the cpu is doing nothing usefull while waiting for the slowest link in > the computing machine (the live-ware). Let me try again, real slow. First intercept INT 9. When it occurs, call the BIOS INT 9 handler. The BIOS will do all the messy key mapping, tell the keyboard that it read the key, send an eoi to the interrupt controller, etc. Now, while STILL AT INTERRUPT TIME, use the BIOS poll function to read a key. If there was something there, hand it to the tty driver and do a destructive read to remove it from the BIOS fifo. Sometimes there will be nothing to read (key-up event). The idea is to use the INT 9 event as a cue to read the keyboard. This is not a polled keyboard. This is an interrupt-driven keyboard. This works. This is how I read the IBM PC keyboard on my multi-tasking operating system. If you want a demonstration then you can either come visit me or buy a copy. Not using the BIOS because you think it is ugly is a matter of taste. This is presumably why MINIX does not use it. Not using the BIOS because you think it can't work is a matter of misunderstanding. Could we please end this silly discussion? > power the machine up, it is inherently in an unstable (unusable) state, > that is designed in to ms/pc-dos Joke? > two people have seen the light, we're on a roll now. Dark destroys the light... Dan Lanciani ddl@harvard.*