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

1992/1106/pc/vga.c (diff list | history)

1992/1106/sys/src/9/pc/vga.c:250,2571992/1107/sys/src/9/pc/vga.c:250,257 (short | long | prev | next)
1992/0603    
	gscreen.r.max = Pt(maxx, maxy); 
1992/0604    
	gscreen.clipr.max = gscreen.r.max; 
1992/1106    
	len = gscreen.width * 4 * maxy; 
	gscreen.base = malloc(len); 
	memset((void*)gscreen.base, 0xff, len); 
1992/1107    
	gscreen.base = ((ulong*)malloc(len+2*1024))+256; 
	memset((char*)gscreen.base, 0xff, len); 
1992/1106    
 
	/* 
	 *  set string pointer to upper left 
1992/1106/sys/src/9/pc/vga.c:325,3311992/1107/sys/src/9/pc/vga.c:325,330
1992/1106    
		mbb.max.x = p.x+1; 
	if (p.y >= mbb.max.y) 
		mbb.max.y = p.y+1; 
	screenupdate(); 
} 
 
void 
1992/1106/sys/src/9/pc/vga.c:403,4131992/1107/sys/src/9/pc/vga.c:402,424
1992/1106    
{ 
	uchar *sp, *hp, *se; 
	int y, len, inc; 
	Rectangle r=mbb; 
1992/1107    
	Rectangle r; 
1992/1106    
 
1992/1107    
	r = mbb; 
	mbb = NULLMBB; 
 
1992/1106    
	if(Dy(r) < 0) 
		return; 
 
1992/1107    
	if(r.min.x < 0) 
		r.min.x = 0; 
	if(r.min.y < 0) 
		r.min.y = 0; 
	if(r.max.x > gscreen.r.max.x) 
		r.max.x = gscreen.r.max.x; 
	if(r.max.y > gscreen.r.max.y) 
		r.max.y = gscreen.r.max.y; 
 
1992/1106    
	sp = (uchar*)gaddr(&gscreen, r.min); 
	hp = (uchar*)gaddr(&vgascreen, r.min); 
 
1992/1106/sys/src/9/pc/vga.c:414,4291992/1107/sys/src/9/pc/vga.c:425,440
1992/1106    
	len = (r.max.x * (1<<gscreen.ldepth) + 31)/32 
		- (r.min.x * (1<<gscreen.ldepth))/32; 
	len *= BY2WD; 
1992/1107    
	if(len <= 0) 
		return; 
1992/1106    
 
	inc = gscreen.width * BY2WD - len; 
 
	for (y = r.min.y; y < r.max.y; y++){ 
		for(se = sp + len; sp < se;) 
			*hp++ = cswizzle[*sp++]; 
		sp += inc; 
		hp += inc; 
1992/1107    
		l0update(sp, hp, len); 
		sp += inc+len; 
		hp += inc+len; 
1992/1106    
	} 
	mbb = NULLMBB; 
} 
 
void 


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