Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!swrinde!ucsd!hub.ucsb.edu!mcm From: mcm@maple.ucsb.edu (Marcelo Mourier) Newsgroups: comp.os.minix Subject: PC Minix 1.5 Kernel Message-ID: <6288@hub.ucsb.edu> Date: 16 Sep 90 01:15:23 GMT Sender: news@hub.ucsb.edu Reply-To: mcm@maple.ucsb.edu (Marcelo Mourier) Organization: University of California, Santa Barbara Lines: 49 Hi everybody! The kernel in PC Minix 1.5 uses a global variable 'snow' to identify video cards that produce snowy displays; i.e, that require their video memory to be written during the vertical retrace period. This variable is declared in line 44 of kernel/glo.h as EXTERN int snow. Space is assigned to it in table.c, along with the default value of zero (FALSE). However, I couldn't find any piece of code where its value could be changed to TRUE. Moreover, the only reference to 'snow' is in klib.x, line 885: cmpb _snow,#0 , where it is treated as a byte (char), instead of as a word (int)...???!!!! The second question is regarding the keyboard hardware in the PC-AT. In these machines it doesn't seem to be necessary to acknowledge the char to the keyboard controller (i8042); at least not in the way it's done now by scan_keyboard() in kernel/keyboard.c. In that function the char read from the keyboard is acknowledged by toggling bit 7 in the I/O port 0x061 (PORT_B). In the PC and XT this I/O port corresponds to parallel port B of the 8255 PPI. But in the AT (at least in the schematics I have) this I/O port addrerss is assigned to a 4-bit latch connected to the lowest four bits of the data bus; e.g., DB0 - DB3. So, trying to toggle bit 7 is just a waist of CPU clocks... I've modified the code in scan_keyboard() to look like this: . . . out_byte(0x66, val & ~0x10); } else { code = in_byte(KEYBD); /* If machine is PC or XT, ack the char */ if (!pc_at) { val = in_byte(PORT_B); out_byte(PORT_B, val | KBIT); out_byte(PORT_B, val); } } . . . I've tested the modified kernel successfully on two different AT's, but I'd like to hear that the patch is 100% reliable. Could you, AT Minixers, try it please..? Thanks, -- Marcelo Mourier (mcm@cs.ucsb.edu)