~kris/9p

9hist

ref: 25d4fd9342a48e45eedeb0858f7996661bafca8d 9hist/pc/vga.c -rw-r--r-- 399 bytes
25d4fd93 — David du Colombier Plan 9 from Bell Labs 1991-07-23 35 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include	"u.h"
#include	"lib.h"
#include	"mem.h"
#include	"dat.h"
#include	"fns.h"
#include	"io.h"

enum
{
	GRX=		0x3CE,		/* index to graphics registers */
	GR=		0x3CF,		/* graphics registers 0-8 */
};

/*
 *  look at VGA registers
 */
void
vgainit(void)
{
	int i;
	uchar x;

	for(i = 0; i < 9; i++){
		outb(GRX, i);
		x = inb(GR);
		print("GR%d == %ux\n", i, x);
	}
	panic("for the hell of it");
}