plan 9 kernel history: overview | file list | diff list

1990/05313/gnot/screen.c (diff list | history)

1990/0330/sys/src/9/gnot/screen.c:11,161990/05313/sys/src/9/gnot/screen.c:11,18 (short | long | prev | next)
1990/03091    
#define	MINX	8 
 
extern	Font	defont0; 
1990/05313    
extern	Font	defont1; 
Font		*defont; 
1990/03091    
 
struct{ 
	Point	pos; 
1990/0330/sys/src/9/gnot/screen.c:33,381990/05313/sys/src/9/gnot/screen.c:35,48
1990/03091    
screeninit(void) 
{ 
1990/0329    
	duartinit(); 
1990/05313    
	/* 
	 * Read HEX switch to set ldepth 
	 */ 
	if(*(uchar*)MOUSE & (1<<4)){ 
		screen.ldepth = 1; 
		defont = &defont1; 
	}else 
		defont = &defont0; 
1990/0329    
	bitblt(&screen, Pt(0, 0), &screen, screen.r, 0); 
1990/03091    
	out.pos.x = MINX; 
	out.pos.y = 0; 
1990/0330/sys/src/9/gnot/screen.c:68,741990/05313/sys/src/9/gnot/screen.c:78,84
1990/03091    
			screenputc('\n'); 
		buf[0] = c&0x7F; 
		buf[1] = 0; 
		out.pos = string(&screen, out.pos, &defont0, buf, S); 
1990/05313    
		out.pos = string(&screen, out.pos, defont, buf, S); 
1990/03091    
	} 
} 
 
1990/0330/sys/src/9/gnot/screen.c:186,1921990/05313/sys/src/9/gnot/screen.c:196,202
1990/0329    
	/* 
	 * Output port 
	 */ 
	duart[0].ipc_acr = 0xBF;	/* allow change	of state interrupt */ 
1990/05313    
	duart[0].ipc_acr = 0xB7;	/* allow change	of state interrupt */ 
1990/0329    
	duart[1].ip_opcr = 0x00; 
	duart[1].scc_ropbc = 0xFF;	/* make sure the port is reset first */ 
	duart[1].scc_sopbc = 0x04;	/* dtr = 1, pp = 01 */ 
1990/0330/sys/src/9/gnot/screen.c:275,2861990/05313/sys/src/9/gnot/screen.c:285,302
1990/03091    
	if(cause & IM_RRDYB)		/* pen input */ 
		c = duart[1].data; 
1990/0329    
	/* 
	 * Is it 4? 
1990/05313    
	 * Is it 3? 
1990/0329    
	 */ 
	if(cause & IM_XRDYB) 
1990/05313    
	if(cause & IM_XRDYB){ 
1990/0329    
		duart[1].cmnd = DIS_TX; 
1990/05313    
	} 
1990/0329    
	/* 
	 * Is it 3? 
1990/05313    
	 * Is it 4? 
	 */ 
	if(cause & IM_XRDYA) 
		duart[0].cmnd = DIS_TX; 
	/* 
	 * Is it 5? 
1990/0329    
	 */ 
	if(cause & IM_IPC) 
		mousebuttons((~duart[0].ipc_acr) & 7); 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)