~kris/9p

9hist

117afc6bf352ecb28910b0defd0fae482295b67d — David du Colombier 30 years ago a44b517
Plan 9 from Bell Labs 1995-12-27
2 files changed, 19 insertions(+), 6 deletions(-)

M pc/devvga.c
M port/devssl.c
M pc/devvga.c => pc/devvga.c +18 -5
@@ 547,7 547,6 @@ screeninit(void)
	 *  start in CGA mode
	 */
	cga = 1;
	vgaxo(Crtx, 0x0A, 0xFF);		/* turn off cursor */
	memset(CGASCREEN, 0, CGAWIDTH*CGAHEIGHT);
}



@@ 1021,15 1020,28 @@ nopage(int page)
	USED(page);
}

/*
 *  character mode console
 */
static int pos;

static void
cgaregw(uchar index, uchar data)
{
	outb(0x03D4, index);
	outb(0x03D4+1, data);
}

static void
movecursor(void)
{
	cgaregw(0x0E, (pos/2>>8) & 0xFF);
	cgaregw(0x0F, pos/2 & 0xFF);
	CGASCREEN[pos+1] = 2;
}

static void
cgascreenputc(int c)
{
	int i;
	static int color;
	static int pos;

	if(c == '\n'){
		pos = pos/CGAWIDTH;


@@ 1052,6 1064,7 @@ cgascreenputc(int c)
		memset(&CGASCREEN[CGAWIDTH*(CGAHEIGHT-1)], 0, CGAWIDTH);
		pos = CGAWIDTH*(CGAHEIGHT-1);
	}
	movecursor();
}

static void

M port/devssl.c => port/devssl.c +1 -1
@@ 456,7 456,7 @@ sslbwrite(Chan *c, Block *b, ulong offset)
		if(pad){
			nb = padblock(nb, -pad);
			memset(nb->wp, 0, pad);
			b->wp += pad;
			nb->wp += pad;
			m += pad;

			p = nb->rp;