Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!ptsfa!lll-tis!lll-lcc!rutgers!cmcl2!brl-adm!umd5!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!ea.ecn.purdue.edu!housel From: housel@ea.ecn.purdue.edu (Peter S. Housel) Newsgroups: comp.os.minix Subject: Re: Problems with Jim Paradis' tty driver Message-ID: <1509@ea.ecn.purdue.edu> Date: 17 Jan 88 03:05:46 GMT References: <1828@botter.cs.vu.nl> Reply-To: housel@ea.ecn.purdue.edu.UUCP (Peter S. Housel) Organization: Purdue University Engineering Computer Network Lines: 57 Here's a patch for Jim Paradis' new tty driver to allow it to work on HGC cards (mine anyway). Apply this diff to console.c: -----------------------------cut---------------------------------------- 530,531c530,531 < oque[oque_last].address = cur_start + < ( ((crow * NCOLS) + ccol) << 1); --- > oque[oque_last].address = (cur_start + > ( ((crow * NCOLS) + ccol) << 1)) & SEG_MASK; 542,545c542,545 < (int)(cur_start + (((crow * NCOLS) + ccol) << 1)), < (int)ch); < put_byte(VIDEO_SEG, < (int)(cur_start + (((crow * NCOLS) + ccol) << 1)) + 1, --- > (int)(cur_start + (((crow * NCOLS) + ccol) << 1)) & SEG_MASK, > (int)ch); > put_byte(VIDEO_SEG, > (int)((cur_start + (((crow * NCOLS) + ccol) << 1)) + 1) & SEG_MASK, -----------------------------cut---------------------------------------- Also, if you're going to run without CHEAP_CGA defined, you need to add the following (fairly obvious) routine to klib88.s: -----------------------------cut---------------------------------------- .globl _put_byte |*===========================================================================* |* put_byte * |*===========================================================================* | This routine is used to stuff a byte anywhere in memory. | The call is: | c = put_byte(seg, off, byte) | where | 'seg' is the value to put in es | 'off' is the offset from the es value | 'byte' is the byte to be placed _put_byte: push bp | save bp mov bp,sp | we need to access parameters push es | save es mov es,4(bp) | load es with segment value mov bx,6(bp) | load bx with offset from segment mov ax,8(bp) seg es | go get the byte movb (bx),al | al = byte pop es | restore es pop bp | restore bp ret | return to caller -----------------------------cut---------------------------------------- I haven't had such good luck with the driver itself. Running the "t.c" program, and configuring rs232.c to work at 1200 baud, it misses about three of every five characters. -Peter S. Housel- housel@ei.ecn.purdue.edu ...!pur-ee!housel