Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mailrus!ames!haven!wam!dkim From: dkim@wam.umd.edu (Daeshik Kim) Newsgroups: comp.lang.c Subject: Re: 2 Turbo C questions Keywords: C, Turbo C Message-ID: <1990Mar22.064223.8638@wam.umd.edu> Date: 22 Mar 90 06:42:23 GMT References: <6548@orca.wv.tek.com> Sender: usenet@wam.umd.edu (USENET Posting) Reply-To: dkim@wam.umd.edu (Daeshik Kim) Organization: Univ. of Md, College Park Lines: 30 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)