*BSD News Article 12748


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!uunet!not-for-mail
From: sef@Kithrup.COM (Sean Eric Fagan)
Newsgroups: comp.os.386bsd.development
Subject: changes to sos-syscons
Date: 13 Mar 1993 18:24:09 -0800
Organization: Kithrup Enterprises, Ltd.
Lines: 454
Sender: sef@ftp.UU.NET
Message-ID: <1nu509INN5e2@ftp.UU.NET>
NNTP-Posting-Host: ftp.uu.net

I *really* like having multiple screens available... but I also like
a few other things.  Here are some changes to:

a) allow alt to be used as a meta key,
b) fix the hung-keyboard-on-boot problem (stolen from pccons.c :)), and
c) don't beep the bell if we're not the current screen (really annoying,
that, you know).

I'll be mailing them off to the author, as well, of course.  But for
anyone who wants these, here they are.  Share and enjoy.


*** sys/console.h.~1~	Sat Mar 13 16:09:58 1993
--- sys/console.h	Sat Mar 13 17:04:29 1993
***************
*** 115,123 ****
  #define L_FN		122	/* last function key */
  #define FKEY		0x200	/* funtion key marker */
  
! #define	KBSTAT		0x64	/* kbd status port */
  #define	KBREADY		0x02	/* kbd char ready */
  #define	KBDATA		0x60	/* kbd data port */
! #define	KBSTATP		0x61	/* kbd status */
  
  #endif
--- 115,123 ----
  #define L_FN		122	/* last function key */
  #define FKEY		0x200	/* funtion key marker */
  
! #define	KBSTATP		0x64	/* kbd status port */
  #define	KBREADY		0x02	/* kbd char ready */
  #define	KBDATA		0x60	/* kbd data port */
! /*#define	KBSTATP		0x61	/* kbd status */
  
  #endif
*** i386/isa/kbdtables.h.~1~	Sat Mar 13 16:10:24 1993
--- i386/isa/kbdtables.h	Sat Mar 13 17:55:02 1993
***************
*** 137,199 ****
   * ---------------------------------------------------------------------------
   */
  /* sc=00 */  NOP,   NOP,   NOP,   NOP,   NOP,   NOP,   NOP,   NOP,  0xFF, 0x00,
! /* sc=01 */ 0x1B,  0x1B,   NOP,   NOP,  0x1B,  0x1B,   NOP,   NOP,  0x33, 0x00,
! /* sc=02 */  '1',   '!',   NOP,   NOP,   '1',   '!',   NOP,   NOP,  0x33, 0x00,
! /* sc=03 */  '2',   '@',  0x00,  0x00,   '2',   '@',  0x00,  0x00,  0x00, 0x00,
! /* sc=04 */  '3',   '#',   NOP,   NOP,   '3',   '#',   NOP,   NOP,  0x33, 0x00,
! /* sc=05 */  '4',   '$',   NOP,   NOP,   '4',   '$',   NOP,   NOP,  0x33, 0x00,
! /* sc=06 */  '5',   '%',   NOP,   NOP,   '5',   '%',   NOP,   NOP,  0x33, 0x00,
! /* sc=07 */  '6',   '^',  0x1E,  0x1E,   '6',   '^',  0x1E,  0x1E,  0x00, 0x00,
! /* sc=08 */  '7',   '&',   NOP,   NOP,   '7',   '&',   NOP,   NOP,  0x33, 0x00,
! /* sc=09 */  '8',   '*',   NOP,   NOP,   '8',   '*',   NOP,   NOP,  0x33, 0x00,
! /* sc=0a */  '9',   '(',   NOP,   NOP,   '9',   '(',   NOP,   NOP,  0x33, 0x00,
! /* sc=0b */  '0',   ')',   NOP,   NOP,   '0',   ')',   NOP,   NOP,  0x33, 0x00,
! /* sc=0c */  '-',   '_',  0x1F,  0x1F,   '-',   '_',  0x1F,  0x1F,  0x00, 0x00,
! /* sc=0d */  '=',   '+',   NOP,   NOP,   '=',   '+',   NOP,   NOP,  0x33, 0x00,
! /* sc=0e */ 0x7F,  0x7F,  0x08,  0x08,  0x7F,  0x7F,  0x08,  0x08,  0x00, 0x00,
! /* sc=0f */ 0x09,  0x08,   NOP,   NOP,  0x09,  0x08,   NOP,   NOP,  0x33, 0x00,
! /* sc=10 */  'q',   'Q',  0x11,  0x11,   'q',   'Q',  0x11,  0x11,  0x00, 0x01,
! /* sc=11 */  'w',   'W',  0x17,  0x17,   'w',   'W',  0x17,  0x17,  0x00, 0x01,
! /* sc=12 */  'e',   'E',  0x05,  0x05,   'e',   'E',  0x05,  0x05,  0x00, 0x01,
! /* sc=13 */  'r',   'R',  0x12,  0x12,   'r',   'R',  0x12,  0x12,  0x00, 0x01,
! /* sc=14 */  't',   'T',  0x14,  0x14,   't',   'T',  0x14,  0x14,  0x00, 0x01,
! /* sc=15 */  'y',   'Y',  0x19,  0x19,   'y',   'Y',  0x19,  0x19,  0x00, 0x01,
! /* sc=16 */  'u',   'U',  0x15,  0x15,   'u',   'U',  0x15,  0x15,  0x00, 0x01,
! /* sc=17 */  'i',   'I',  0x09,  0x09,   'i',   'I',  0x09,  0x09,  0x00, 0x01,
! /* sc=18 */  'o',   'O',  0x0F,  0x0F,   'o',   'O',  0x0F,  0x0F,  0x00, 0x01,
! /* sc=19 */  'p',   'P',  0x10,  0x10,   'p',   'P',  0x10,  0x10,  0x00, 0x01,
! /* sc=1a */  '[',   '{',  0x1B,  0x1B,   '[',   '{',  0x1B,  0x1B,  0x00, 0x00,
! /* sc=1b */  ']',   '}',  0x1D,  0x1D,   ']',   '}',  0x1D,  0x1D,  0x00, 0x00,
! /* sc=1c */ 0x0D,  0x0D,  0x0A,  0x0A,  0x0D,  0x0D,  0x0A,  0x0A,  0x00, 0x00,
  /* sc=1d */ LCTR,  LCTR,  LCTR,  LCTR,  LCTR,  LCTR,  LCTR,  LCTR,  0xFF, 0x00,
! /* sc=1e */  'a',   'A',  0x01,  0x01,   'a',   'A',  0x01,  0x01,  0x00, 0x01,
! /* sc=1f */  's',   'S',  0x13,  0x13,   's',   'S',  0x13,  0x13,  0x00, 0x01,
! /* sc=20 */  'd',   'D',  0x04,  0x04,   'd',   'D',  0x04,  0x04,  0x00, 0x01,
! /* sc=21 */  'f',   'F',  0x06,  0x06,   'f',   'F',  0x06,  0x06,  0x00, 0x01,
! /* sc=22 */  'g',   'G',  0x07,  0x07,   'g',   'G',  0x07,  0x07,  0x00, 0x01,
! /* sc=23 */  'h',   'H',  0x08,  0x08,   'h',   'H',  0x08,  0x08,  0x00, 0x01,
! /* sc=24 */  'j',   'J',  0x0A,  0x0A,   'j',   'J',  0x0A,  0x0A,  0x00, 0x01,
! /* sc=25 */  'k',   'K',  0x0B,  0x0B,   'k',   'K',  0x0B,  0x0B,  0x00, 0x01,
! /* sc=26 */  'l',   'L',  0x0C,  0x0C,   'l',   'L',  0x0C,  0x0C,  0x00, 0x01,
! /* sc=27 */  ';',   ':',   NOP,   NOP,   ';',   ':',   NOP,   NOP,  0x33, 0x00,
! /* sc=28 */  '\'',  '"',   NOP,   NOP,   '\'',  '"',   NOP,   NOP,  0x33, 0x00,
! /* sc=29 */  '`',   '~',   NOP,   NOP,   '`',   '~',   NOP,   NOP,  0x33, 0x00,
  /* sc=2a */  LSH,   LSH,   LSH,   LSH,   LSH,   LSH,   LSH,   LSH,  0xFF, 0x00,
! /* sc=2b */  '\\',  '|',  0x1C,  0x1C,   '\\',  '|',  0x1C,  0x1C,  0x00, 0x00,
! /* sc=2c */  'z',   'Z',  0x1A,  0x1A,   'z',   'Z',  0x1A,  0x1A,  0x00, 0x01,
! /* sc=2d */  'x',   'X',  0x18,  0x18,   'x',   'X',  0x18,  0x18,  0x00, 0x01,
! /* sc=2e */  'c',   'C',  0x03,  0x03,   'c',   'C',  0x03,  0x03,  0x00, 0x01,
! /* sc=2f */  'v',   'V',  0x16,  0x16,   'v',   'V',  0x16,  0x16,  0x00, 0x01,
! /* sc=30 */  'b',   'B',  0x02,  0x02,   'b',   'B',  0x02,  0x02,  0x00, 0x01,
! /* sc=31 */  'n',   'N',  0x0E,  0x0E,   'n',   'N',  0x0E,  0x0E,  0x00, 0x01,
! /* sc=32 */  'm',   'M',  0x0D,  0x0D,   'm',   'M',  0x0D,  0x0D,  0x00, 0x01,
! /* sc=33 */  ',',   '<',   NOP,   NOP,   ',',   '<',   NOP,   NOP,  0x33, 0x00,
! /* sc=34 */  '.',   '>',   NOP,   NOP,   '.',   '>',   NOP,   NOP,  0x33, 0x00,
! /* sc=35 */  '/',   '?',   NOP,   NOP,   '/',   '?',   NOP,   NOP,  0x33, 0x00,
  /* sc=36 */  RSH,   RSH,   RSH,   RSH,   RSH,   RSH,   RSH,   RSH,  0xFF, 0x00,
! /* sc=37 */  '*',   '*',  0x0A,  0x0A,   '*',   '*',  0x0A,  0x0A,  0x33, 0x00,
  /* sc=38 */ LALT,  LALT,  LALT,  LALT,  LALT,  LALT,  LALT,  LALT,  0xFF, 0x00,
! /* sc=39 */  ' ',   ' ',   ' ',   ' ',   ' ',   ' ',   ' ',   ' ',  0x00, 0x00,
  /* sc=3a */  CLK,   CLK,   CLK,   CLK,   CLK,   CLK,   CLK,   CLK,  0xFF, 0x00,
  /* sc=3b */ F( 1), F(13), F(25), F(37), S( 1), S(11), S( 1), S(11), 0xFF, 0x00,
  /* sc=3c */ F( 2), F(14), F(26), F(38), S( 2), S(12), S( 2), S(12), 0xFF, 0x00,
--- 137,199 ----
   * ---------------------------------------------------------------------------
   */
  /* sc=00 */  NOP,   NOP,   NOP,   NOP,   NOP,   NOP,   NOP,   NOP,  0xFF, 0x00,
! /* sc=01 */ 0x1B,  0x1B,   NOP,   NOP,  0x9B,  0x9B,   NOP,   NOP,  0x33, 0x00,
! /* sc=02 */  '1',   '!',   NOP,   NOP,  0xb1,  0xa1,   NOP,   NOP,  0x33, 0x00,
! /* sc=03 */  '2',   '@',  0x00,  0x00,  0xb2,  0x80,  0x80,  0x80,  0x00, 0x00,
! /* sc=04 */  '3',   '#',   NOP,   NOP,  0xb3,  0xa3,   NOP,   NOP,  0x33, 0x00,
! /* sc=05 */  '4',   '$',   NOP,   NOP,  0xb4,  0xa4,   NOP,   NOP,  0x33, 0x00,
! /* sc=06 */  '5',   '%',   NOP,   NOP,  0xb5,  0xa5,   NOP,   NOP,  0x33, 0x00,
! /* sc=07 */  '6',   '^',  0x1E,  0x1E,  0xb6,  0xde,  0x9e,  0x9e,  0x00, 0x00,
! /* sc=08 */  '7',   '&',   NOP,   NOP,  0xb7,  0xa7,   NOP,   NOP,  0x33, 0x00,
! /* sc=09 */  '8',   '*',   NOP,   NOP,  0xb8,  0xa8,   NOP,   NOP,  0x33, 0x00,
! /* sc=0a */  '9',   '(',   NOP,   NOP,  0xb9,  0xa9,   NOP,   NOP,  0x33, 0x00,
! /* sc=0b */  '0',   ')',   NOP,   NOP,  0xb0,  0xa0,   NOP,   NOP,  0x33, 0x00,
! /* sc=0c */  '-',   '_',  0x1F,  0x1F,  0xad,  0xdf,  0x9F,  0x9F,  0x00, 0x00,
! /* sc=0d */  '=',   '+',   NOP,   NOP,  0xbd,  0xab,  0xab,   NOP,  0x33, 0x00,
! /* sc=0e */ 0x7F,  0x7F,  0x08,  0x08,  0xff,  0xff,  0x88,  0x88,  0x00, 0x00,
! /* sc=0f */ 0x09,  0x08,   NOP,   NOP,  0x89,  0x88,   NOP,   NOP,  0x33, 0x00,
! /* sc=10 */  'q',   'Q',  0x11,  0x11,  0xf1,  0xd1,  0x91,  0x91,  0x00, 0x01,
! /* sc=11 */  'w',   'W',  0x17,  0x17,  0xf7,  0xd7,  0x97,  0x97,  0x00, 0x01,
! /* sc=12 */  'e',   'E',  0x05,  0x05,  0xe5,  0xc5,  0x85,  0x85,  0x00, 0x01,
! /* sc=13 */  'r',   'R',  0x12,  0x12,  0xf2,  0xd2,  0x92,  0x92,  0x00, 0x01,
! /* sc=14 */  't',   'T',  0x14,  0x14,  0xf4,  0xd4,  0x94,  0x94,  0x00, 0x01,
! /* sc=15 */  'y',   'Y',  0x19,  0x19,  0xf9,  0xd9,  0x99,  0x99,  0x00, 0x01,
! /* sc=16 */  'u',   'U',  0x15,  0x15,  0xf5,  0xd5,  0x95,  0x95,  0x00, 0x01,
! /* sc=17 */  'i',   'I',  0x09,  0x09,  0xe9,  0xc9,  0x89,  0x89,  0x00, 0x01,
! /* sc=18 */  'o',   'O',  0x0F,  0x0F,  0xef,  0xcf,  0x8F,  0x8F,  0x00, 0x01,
! /* sc=19 */  'p',   'P',  0x10,  0x10,  0xd0,  0xf0,  0x90,  0x90,  0x00, 0x01,
! /* sc=1a */  '[',   '{',  0x1B,  0x1B,  0xdb,  0xfb,  0x9B,  0x9B,  0x00, 0x00,
! /* sc=1b */  ']',   '}',  0x1D,  0x1D,  0xdd,  0xfd,  0x9D,  0x9D,  0x00, 0x00,
! /* sc=1c */ 0x0D,  0x0D,  0x0A,  0x0A,  0x8D,  0x8D,  0x8A,  0x8A,  0x00, 0x00,
  /* sc=1d */ LCTR,  LCTR,  LCTR,  LCTR,  LCTR,  LCTR,  LCTR,  LCTR,  0xFF, 0x00,
! /* sc=1e */  'a',   'A',  0x01,  0x01,  0xe1,  0xc1,  0x81,  0x81,  0x00, 0x01,
! /* sc=1f */  's',   'S',  0x13,  0x13,  0xf3,  0xd3,  0x93,  0x93,  0x00, 0x01,
! /* sc=20 */  'd',   'D',  0x04,  0x04,  0xe4,  0xc4,  0x84,  0x84,  0x00, 0x01,
! /* sc=21 */  'f',   'F',  0x06,  0x06,  0xe6,  0xc6,  0x86,  0x86,  0x00, 0x01,
! /* sc=22 */  'g',   'G',  0x07,  0x07,  0xe7,  0xc7,  0x87,  0x87,  0x00, 0x01,
! /* sc=23 */  'h',   'H',  0x08,  0x08,  0xe8,  0xc8,  0x88,  0x88,  0x00, 0x01,
! /* sc=24 */  'j',   'J',  0x0A,  0x0A,  0xea,  0xca,  0x8A,  0x8A,  0x00, 0x01,
! /* sc=25 */  'k',   'K',  0x0B,  0x0B,  0xeb,  0xcb,  0x8B,  0x8B,  0x00, 0x01,
! /* sc=26 */  'l',   'L',  0x0C,  0x0C,  0xec,  0xcc,  0x8C,  0x8C,  0x00, 0x01,
! /* sc=27 */  ';',   ':',   NOP,   NOP,  0xbb,  0xba,   NOP,   NOP,  0x33, 0x00,
! /* sc=28 */  '\'',  '"',   NOP,   NOP,  0xa7,  0xa2,   NOP,   NOP,  0x33, 0x00,
! /* sc=29 */  '`',   '~',   NOP,   NOP,  0xe0,  0xfe,   NOP,   NOP,  0x33, 0x00,
  /* sc=2a */  LSH,   LSH,   LSH,   LSH,   LSH,   LSH,   LSH,   LSH,  0xFF, 0x00,
! /* sc=2b */  '\\',  '|',  0x1C,  0x1C,  0xdc,  0xfc,  0x9C,  0x9C,  0x00, 0x00,
! /* sc=2c */  'z',   'Z',  0x1A,  0x1A,  0xfa,  0xda,  0x9A,  0x9A,  0x00, 0x01,
! /* sc=2d */  'x',   'X',  0x18,  0x18,  0xf8,  0xd8,  0x98,  0x98,  0x00, 0x01,
! /* sc=2e */  'c',   'C',  0x03,  0x03,  0xe3,  0xc3,  0x83,  0x83,  0x00, 0x01,
! /* sc=2f */  'v',   'V',  0x16,  0x16,  0xf6,  0xd6,  0x96,  0x96,  0x00, 0x01,
! /* sc=30 */  'b',   'B',  0x02,  0x02,  0xe2,  0xc2,  0x82,  0x82,  0x00, 0x01,
! /* sc=31 */  'n',   'N',  0x0E,  0x0E,  0xee,  0xce,  0x8E,  0x8E,  0x00, 0x01,
! /* sc=32 */  'm',   'M',  0x0D,  0x0D,  0xed,  0xcd,  0x8D,  0x8D,  0x00, 0x01,
! /* sc=33 */  ',',   '<',   NOP,   NOP,  0xac,  0xbc,   NOP,   NOP,  0x33, 0x00,
! /* sc=34 */  '.',   '>',   NOP,   NOP,  0xae,  0xbe,   NOP,   NOP,  0x33, 0x00,
! /* sc=35 */  '/',   '?',   NOP,   NOP,  0xaf,  0xbf,   NOP,   NOP,  0x33, 0x00,
  /* sc=36 */  RSH,   RSH,   RSH,   RSH,   RSH,   RSH,   RSH,   RSH,  0xFF, 0x00,
! /* sc=37 */  '*',   '*',  0x0A,  0x0A,  0xaa,  0xaa,  0xaA,  0xaA,  0x33, 0x00,
  /* sc=38 */ LALT,  LALT,  LALT,  LALT,  LALT,  LALT,  LALT,  LALT,  0xFF, 0x00,
! /* sc=39 */  ' ',   ' ',   ' ',   ' ',  0xa0,  0xa0,  0xa0,  0xa0,  0x00, 0x00,
  /* sc=3a */  CLK,   CLK,   CLK,   CLK,   CLK,   CLK,   CLK,   CLK,  0xFF, 0x00,
  /* sc=3b */ F( 1), F(13), F(25), F(37), S( 1), S(11), S( 1), S(11), 0xFF, 0x00,
  /* sc=3c */ F( 2), F(14), F(26), F(38), S( 2), S(12), S( 2), S(12), 0xFF, 0x00,
***************
*** 207,224 ****
  /* sc=44 */ F(10), F(22), F(34), F(46), S(10), S(10), S(10), S(10), 0xFF, 0x00,
  /* sc=45 */  NLK,   NLK,   NLK,   NLK,   NLK,   NLK,   NLK,   NLK,  0xFF, 0x00,
  /* sc=46 */  SLK,   SLK,   SLK,   SLK,   SLK,   SLK,   SLK,   SLK,  0xFF, 0x00,
! /* sc=47 */ F(49),  '7',   '7',   '7',   '7',   '7',   '7',   '7',  0x80, 0x02,
! /* sc=48 */ F(50),  '8',   '8',   '8',   '8',   '8',   '8',   '8',  0x80, 0x02,
! /* sc=49 */ F(51),  '9',   '9',   '9',   '9',   '9',   '9',   '9',  0x80, 0x02,
! /* sc=4a */ F(52),  '-',   '-',   '-',   '-',   '-',   '-',   '-',  0x80, 0x02,
! /* sc=4b */ F(53),  '4',   '4',   '4',   '4',   '4',   '4',   '4',  0x80, 0x02,
! /* sc=4c */ F(54),  '5',   '5',   '5',   '5',   '5',   '5',   '5',  0x80, 0x02,
! /* sc=4d */ F(55),  '6',   '6',   '6',   '6',   '6',   '6',   '6',  0x80, 0x02,
! /* sc=4e */ F(56),  '+',   '+',   '+',   '+',   '+',   '+',   '+',  0x80, 0x02,
! /* sc=4f */ F(57),  '1',   '1',   '1',   '1',   '1',   '1',   '1',  0x80, 0x02,
! /* sc=50 */ F(58),  '2',   '2',   '2',   '2',   '2',   '2',   '2',  0x80, 0x02,
! /* sc=51 */ F(59),  '3',   '3',   '3',   '3',   '3',   '3',   '3',  0x80, 0x02,
! /* sc=52 */ F(60),  '0',   '0',   '0',   '0',   '0',   '0',   '0',  0x80, 0x02,
  /* sc=53 */ 0x7F,   '.',  0x7F,  0x7F,  0x7F,  0x7F,  0x7F,  0x7F,  0x00, 0x02,
  /* sc=54 */ 0x1F,  0x1F,  0x1F,  0x1F,  0x1F,  0x1F,  0x1F,  0x1F,  0x00, 0x00,
  /* sc=55 */  NOP,   NOP,   NOP,   NOP,   NOP,   NOP,   NOP,   NOP,  0xFF, 0x00,
--- 207,224 ----
  /* sc=44 */ F(10), F(22), F(34), F(46), S(10), S(10), S(10), S(10), 0xFF, 0x00,
  /* sc=45 */  NLK,   NLK,   NLK,   NLK,   NLK,   NLK,   NLK,   NLK,  0xFF, 0x00,
  /* sc=46 */  SLK,   SLK,   SLK,   SLK,   SLK,   SLK,   SLK,   SLK,  0xFF, 0x00,
! /* sc=47 */ F(49),  '7',   '7',   '7',  0xb7,  0xb7,  0xb7,  0xb7,  0x80, 0x02,
! /* sc=48 */ F(50),  '8',   '8',   '8',  0xb8,  0xb8,  0xb8,  0xb8,  0x80, 0x02,
! /* sc=49 */ F(51),  '9',   '9',   '9',  0xb9,  0xb9,  0xb9,  0xb9,  0x80, 0x02,
! /* sc=4a */ F(52),  '-',   '-',   '-',  0xad,  0xad,  0xad,  0xad,  0x80, 0x02,
! /* sc=4b */ F(53),  '4',   '4',   '4',  0xb4,  0xb4,  0xb4,  0xb4,  0x80, 0x02,
! /* sc=4c */ F(54),  '5',   '5',   '5',  0xb5,  0xb5,  0xb5,  0xb5,  0x80, 0x02,
! /* sc=4d */ F(55),  '6',   '6',   '6',  0xb6,  0xb6,  0xb6,  0xb6,  0x80, 0x02,
! /* sc=4e */ F(56),  '+',   '+',   '+',  0xab,  0xab,  0xab,  0xab,  0x80, 0x02,
! /* sc=4f */ F(57),  '1',   '1',   '1',  0xb1,  0xb1,  0xb1,  0xb1,  0x80, 0x02,
! /* sc=50 */ F(58),  '2',   '2',   '2',  0xb2,  0xb2,  0xb2,  0xb2,  0x80, 0x02,
! /* sc=51 */ F(59),  '3',   '3',   '3',  0xb3,  0xb3,  0xb3,  0xb3,  0x80, 0x02,
! /* sc=52 */ F(60),  '0',   '0',   '0',  0xb0,  0xb0,  0xb0,  0xb0,  0x80, 0x02,
  /* sc=53 */ 0x7F,   '.',  0x7F,  0x7F,  0x7F,  0x7F,  0x7F,  0x7F,  0x00, 0x02,
  /* sc=54 */ 0x1F,  0x1F,  0x1F,  0x1F,  0x1F,  0x1F,  0x1F,  0x1F,  0x00, 0x00,
  /* sc=55 */  NOP,   NOP,   NOP,   NOP,   NOP,   NOP,   NOP,   NOP,  0xFF, 0x00,
*** i386/isa/syscons.c.~1~	Sat Mar 13 16:10:25 1993
--- i386/isa/syscons.c	Sat Mar 13 18:11:30 1993
***************
*** 69,74 ****
--- 69,76 ----
  #include "i386/isa/isa_device.h"
  #include "i386/include/pc/display.h"
  #include "i386/i386/cons.h"
+ #include "i386/isa/ic/i8042.h"
+ #include "i386/isa/kbd.h"
  #include "machine/psl.h"
  #include "machine/frame.h"
  #include "sc.h"
***************
*** 191,197 ****
  void reset_cpu(void);
  u_int sgetc(int noblock);
  int pg(char *p, int q, int r, int s, int t, int u, int v, int w, int x, int y, int z);
! static int getchar(void);
  int pcmmap(dev_t dev, int offset, int nprot);
  static void set_mode(int mode);
  static void set_border(int color);
--- 193,199 ----
  void reset_cpu(void);
  u_int sgetc(int noblock);
  int pg(char *p, int q, int r, int s, int t, int u, int v, int w, int x, int y, int z);
! int getchar(void);
  int pcmmap(dev_t dev, int offset, int nprot);
  static void set_mode(int mode);
  static void set_border(int color);
***************
*** 203,208 ****
--- 205,257 ----
  };
  
  
+ #if 1
+ /*
+  * Pass command to keyboard itself
+  */
+ unsigned kbd_cmd(val) {
+ 	
+ 	while (inb(KBSTATP)&KBS_IBF);
+ 	if (val) outb(KBOUTP, val);
+ 	while (inb(KBSTATP)&KBS_IBF);
+ 	return (inb(KBDATAP));
+ }
+ 
+ /*
+  * these are both bad jokes
+  */
+ pcprobe(dev)
+ struct isa_device *dev;
+ {
+ 	u_char c;
+ 	int again = 0;
+ 
+ 	/* Enable interrupts and keyboard controller */
+       while (inb(KBSTATP)&KBS_IBF); outb(KBSTATP,K_LDCMDBYTE);
+       while (inb(KBSTATP)&KBS_IBF); outb(KBDATAP,CMDBYTE);
+ 
+ 	/* Start keyboard stuff RESET */
+ #ifdef KB_HACK
+ 	DELAY(1000);				/* 11 Sep 92 : !!CROCK!!*/
+ #endif /* KB_HACK */
+       while((c = kbd_cmd(KBC_RESET)) != KBR_ACK) {
+ 		if ((c == KBR_RESEND) ||  (c == KBR_OVERRUN)) {
+ 			if(!again)printf("KEYBOARD disconnected: RECONNECT \n");
+ #ifdef KB_HACK
+ 			DELAY(1000);		/* 11 Sep 92 : !!CROCK!!*/
+ #endif /* KB_HACK */
+ 			again = 1;
+ 		}
+ 	}
+ 
+ 	/* pick up keyboard reset return code */
+       while (inb(KBSTATP)&KBS_IBF);
+       (void) inb(KBDATAP);
+ 
+ 	return 1;
+ }
+ 
+ #else
  int pcprobe(struct isa_device *dev)
  {
  	u_char c;
***************
*** 229,235 ****
  	sc0mask = dev->id_irq;
  	return 1;
  }
! 
  
  int pcattach(struct isa_device *dev)
  {
--- 278,284 ----
  	sc0mask = dev->id_irq;
  	return 1;
  }
! #endif
  
  int pcattach(struct isa_device *dev)
  {
***************
*** 456,464 ****
  		return 0;
  
  	case KDSETRAD:		/* set keyboard repeat & delay rates */
! 		while (inb(KBSTAT) & KBREADY) ;
  		outb(KBDATA, 0xF3);		/* set delay & rate command */
! 		while (inb(KBSTAT) & KBREADY) ;
  		outb(KBDATA, ( *data & 0x7f) );	/* set delay & rate */
  		return 0;
  
--- 505,513 ----
  		return 0;
  
  	case KDSETRAD:		/* set keyboard repeat & delay rates */
! 		while (inb(KBSTATP) & KBS_IBF) ;
  		outb(KBDATA, 0xF3);		/* set delay & rate command */
! 		while (inb(KBSTATP) & KBS_IBF) ;
  		outb(KBDATA, ( *data & 0x7f) );	/* set delay & rate */
  		return 0;
  
***************
*** 479,484 ****
--- 528,534 ----
  		return 0;
  
  	case KDMKTONE:		/* sound the bell */
+ 		if (cur_scr_stat == scp)
  			sysbeep (0x31b, hz/4);
  		return 0;
  
***************
*** 1117,1126 ****
  		break;
  
  	default:
! 		if (c == 7)
  			sysbeep (0x31b, hz/4);
  		/* Print only printables */
! 		else /*if (c >= ' ') */ {
  			wrtchar (scp, scp->attr | c);
  			if (scp->posx >= scp->max_posx) {
  				scp->posx = 0;
--- 1167,1177 ----
  		break;
  
  	default:
! 		if (c == 7) {
! 			if (cur_scr_stat == scp)
  				sysbeep (0x31b, hz/4);
  		/* Print only printables */
! 		} else /*if (c >= ' ') */ {
  			wrtchar (scp, scp->attr | c);
  			if (scp->posx >= scp->max_posx) {
  				scp->posx = 0;
***************
*** 1219,1224 ****
--- 1270,1283 ----
  }
  
  
+ #if 1
+ update_led()
+ {
+ 	kbd_cmd(KBC_STSIND);	/* LED Command */
+ 	outb(KBOUTP,scroll | 2*num | 4*caps);
+ 	/*kbd_cmd(scroll | 2*num | 4*caps);*/
+ }
+ #else
  static update_led()
  {
  	while (inb(KBSTAT)&KBREADY);		/* wait input ready */
***************
*** 1226,1233 ****
  	while (inb(KBSTAT)&KBREADY);		/* wait input ready */
  	outb (KBDATA, scroll | 2*num | 4*caps);
  }
! 
  
  volatile void reset_cpu (void)
  {
  	for (;;) {
--- 1285,1293 ----
  	while (inb(KBSTAT)&KBREADY);		/* wait input ready */
  	outb (KBDATA, scroll | 2*num | 4*caps);
  }
! #endif
  
+ #if 0
  volatile void reset_cpu (void)
  {
  	for (;;) {
***************
*** 1238,1244 ****
  		outb(KBSTAT,0xFF);		/* Keyboard Reset Command */
  	}
  }
! 
  
  /*
   * sgetc(noblock) : get a character from the keyboard. 
--- 1298,1304 ----
  		outb(KBSTAT,0xFF);		/* Keyboard Reset Command */
  	}
  }
! #endif
  
  /*
   * sgetc(noblock) : get a character from the keyboard. 
***************
*** 1255,1262 ****
  	esc_flag = 0;
  next_code:
  	/* First see if there is something in the keyboard port */
! 	if (inb (KBSTAT) & 1)
! 		dt = inb (KBDATA);
  	else if (noblock)
  		return (0x100);
  	else
--- 1315,1322 ----
  	esc_flag = 0;
  next_code:
  	/* First see if there is something in the keyboard port */
! 	if (inb (KBSTATP) & KBS_DIB)
! 		dt = inb (KBDATAP);
  	else if (noblock)
  		return (0x100);
  	else
***************
*** 1375,1381 ****
  }
  
  
! static int getchar()
  {
  	register char thechar;
  	register delay;
--- 1435,1442 ----
  }
  
  
! int
! getchar()
  {
  	register char thechar;
  	register delay;