From: Anders =?iso-8859-1?Q?L=F6vgren?= Newsgroups: comp.os.msdos.djgpp Subject: Re: writing directly to video card Date: Mon, 27 Dec 1999 14:16:34 +0100 Organization: Telenordia Lines: 38 Message-ID: <386766B2.5BF9F964@algonet.se> References: <8424q2$ocr$1 AT planja DOT arnes DOT si> NNTP-Posting-Host: aristotle.algonet.se Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: cubacola.tninet.se 946300469 4319 194.213.74.200 (27 Dec 1999 13:14:29 GMT) X-Complaints-To: abuse AT algo DOT net NNTP-Posting-Date: 27 Dec 1999 13:14:29 GMT X-Mailer: Mozilla 4.7 [en] (WinNT; I) X-Accept-Language: en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Matej wrote: > > hello, > can someone point me to any tutorial (or just tell me here what to do) if I > want to do something similar to functions in conio.h? e.g. I'd like to fill > the last character on the screen (80*25) so that it wouldn't jump into next > line? > Thanks, > Matej Hi This isn't writing directly to the video memory, but it address your last question: // outputs a character at the current cursor position using the // video BIOS to avoid the scrolling of the screen when writing // to location (80,25). void writechar(char ch, unsigned int attr) { asm { mov ah, 9h // interrupt 0x10 sub-function 9 mov al, ch // character to be output mov bh, 0 // video page mov bl, attr // video attribute mov cx, 1h // repetition factor int 10h // output the char } } This hasn't been tested and uses intel assembler syntax (DJGPP uses AT&T), but should give an impression of how it can be done. More on BIOS calls is avlible in Ralph Browns Interrupt list, along with some sample codes on how to move cusor, access video-memory and that stuff. Anders L