Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!ncar!tank!uxc!uxc.cso.uiuc.edu!uxg.cso.uiuc.edu!uxe.cso.uiuc.edu!mcdonald From: mcdonald@uxe.cso.uiuc.edu Newsgroups: comp.sys.ibm.pc Subject: Re: VGA routines (wanted) Message-ID: <45900167@uxe.cso.uiuc.edu> Date: 10 Oct 88 14:40:00 GMT References: <490@fabscal.UUCP> Lines: 40 Nf-ID: #R:fabscal.UUCP:490:uxe.cso.uiuc.edu:45900167:000:1034 Nf-From: uxe.cso.uiuc.edu!mcdonald Oct 10 09:40:00 1988 >I am looking for routines useable under DOS and/or XENIX on a 80386 >based system to do the following: > 1) switch my VGA from text to 320x200x256color mode > 2) write information to the graphics screen either pixel at a time > or in blocks. > 3) switch the screen back to 80x24 text mode. For DOS this is truly trivial. The display is bitmapped, one unsigned char per pixel, starting at 0xa0000000 (that is a000:0000). The following program fills the screen with the first 200 default colors. #include #include #include main(){ union REGS rg; unsigned char far *screenptr; int i,j; rg.x.ax = 19; int86(16,&rg,&rg); screenptr = (unsigned char far *)(0xa0000000l); for (i = 0; i < 200; i++) for(j = 0; j < 320; j++)*screenptr++ = i; while(!kbhit); (void)getchar(); rg.x.ax = 3; int86(16,&rg,&rg); } The translation to assembly is obvious. Xenix is of course another thing ENTIRELY. I'll bet it isn't so easy. Doug McDonald (mcdonald@uiucuxe)