Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!gatech!gitpyr!thomps From: thomps@gitpyr.UUCP Newsgroups: comp.os.minix Subject: Re: Which clones *don't* run MINIX Message-ID: <3071@gitpyr.gatech.EDU> Date: Mon, 9-Feb-87 21:30:27 EST Article-I.D.: gitpyr.3071 Posted: Mon Feb 9 21:30:27 1987 Date-Received: Tue, 10-Feb-87 18:39:29 EST References: <275@ihnp3.UUCP> <459@moncol.UUCP> <2529@well.UUCP> <172@axis.UUCP> <1192@husc6.UUCP> Organization: Georgia Institute of Technology Lines: 41 Keywords: MINIX BIOS COMPATIBILITY Summary: Device drivers In article <1192@husc6.UUCP>, ddl@husc6.UUCP (Dan Lanciani) writes: > In article <172@axis.UUCP>, philip@axis.UUCP writes: > > > But, the most important reason (as given in the book) is that the BIOS > > calls do not use interrupts. So, when your shell does a read(), BIOS > > loops on the status bit of the serial line UART (for example), and the > > machine effectively stops for all other processes. > > This is plain wrong. The IBM PC keyboard is interrupt-driven. > Int 9 is used, if you are interested. Characters are stored in a FIFO > buffer. The get-a-character call does, indeed, loop waiting for a > character to appear in the FIFO buffer; however, there is a get-status > call which will not hang. Furthermore, it is trivial to catch int 9 > and use it as a cue to ckeck for keyboard activity. The combination > gives you an interrupting keyboard. > I believe Dan, Phil and Andy T. are talking about the same thing here. The keyboard interrupt is supplied by the hardware and has nothing to do with BIOS. What BIOS supplies is a keyboard driver or interrupt handler which catches the interrupt and places the code for the depressed key in the keyboard buffer. BIOS provides calls to get information out of the buffer, find out if anything is in it etc. However, if I catch the int 9 directly from the hardware (as Dan suggests) and use my own interrupt handling routine or driver and am no longer using BIOS. I am sure that this is what MINIX's keyboard driver does. Dan's argument really says that the BIOS is does not do the kind of interrupt I/O that a multitasking operating system needs because if we let the BIOS keyboard driver handle the keyboard interrupt, the process waiting for the character will never know its there unless it checks explicitly. Therefore, the BIOS driver must be replaced with another one that will signal the OS when a character arrives. By the way, if hardware documentation is available it may not be that difficult to add device drivers to MINIX to support clones that are not 100% hardware compatible with the IBM PC. -- Ken Thompson (No not that Ken Thompson) Georgia Tech Research Institute Georgia Insitute of Technology, Atlanta Georgia, 30332 ...!{akgua,allegra,amd,hplabs,ihnp4,seismo,ut-ngp}!gatech!gitpyr!thomps