hamlow@sntekwv4.WV.TEK.COM (Paul Hamlow;685-2336;60-850;;sntekwv4) (03/22/90)
I'm new to this group, so my apologies if this has been covered previously. First, when writing to a text window, is there any way to write to the lower right corner of the screen without causing the window to scroll? I've tried putch, cprintf and cputs, all with the same result. (I'm trying to put a simple line border around the window.) Second, does anyone have any suggestions on how to make a Microsoft mouse work with the BGI? The mouse seems to work properly in text mode, but as soon as I enter graphics mode, the pointer disappears. I'm using the Microsoft Mouse Driver V. 6.25.21 if that matters. Thanks for any suggestions. Paul Hamlow Tektronix, Inc. Visual Systems Group Interactive Technologies Division
dkim@wam.umd.edu (Daeshik Kim) (03/22/90)
For the first ques.,
/* check your video controller satus */
char *sptr;
sptr = (char*) 0x410L;
/* let's assume CGA */
char *charbase;
charbase = (char*) 0xb8000000L;
charin(c, attr, x, y)
int c,attr,x,y;
{
charbase[x*2+y*160] = c; /* map char to video-mem */
charbase[x*2+y*160+1] = attr; /* map color attr. */
return;
}
This is just an example on CGA.
You have to check the *sptr to find the right video-type.
If it's either ega or vga, it's easier to use asm. than c.
due to the color attr. mapping.
--
Daeshik Kim H: (301) 445-0475/2147 O: (703) 689-5878
SCHOOL: dkim@wam.umd.edu, dskim@eng.umd.edu, mz518@umd5.umd.edu
WORK: dkim@daffy.uu.net (uunet!daffy!dkim)