Article View: comp.os.msdos.programmer
Article #7848Re: Writing to screen, no cursor movement
From: Antonio Perez Ayala
Date: Wed, 11 Oct 1995 00:05
Date: Wed, 11 Oct 1995 00:05
37 lines
2203 bytes
2203 bytes
wcw@wolfenet.com (William White) wrote: > I'm programming in text mode, and would like to know how to write characters >to the screen without moving the cursor. Just backing up the cursor one >column after a character is written is not good enough. > Here is what I need this for: > > I'm trying to write a program that does all screen I/O without the screen >borders scrolling. I need to be able to write in column 80 on line 25 >without the cursor going to the next line, thus making line 1 disappear off >the screen. > I would be eternally gratefull for any help anyone could give me. > ---Will >+----------------------------------------------------------------------+ >| William White ®¯ Yakima, WA. ®¯ Hi-Country Foods Corporation | >| Quality Assurance Lab Technician ®¯ Computer Analyst/Programmer | >| ** We make it, you drink it, you love it ** | >|Check out our new web page at http://www.wolfe.net/~hcfoods/index.html| >| For my Public PGP key, please finger me at wcw@wolfe.net | >+----------------------------------------------------------------------+ Here is how to do it in Turbo-C; if you are using anoter compiler, must be an equivalent. Output the last char in the line throught BIOS INT 10H function 10 using the Turbo-C function int86: #include <dos.h> #define VIDEO 0x10 /* BIOS interrupt number = Video */ union REGS cpu_reg; cpu_reg.h.ah = 10; /* function = Write Character at Cursor */ cpu_reg.h.bh = 0; /* video page number, usually zero */ cpu_reg.x.cx = 1; /* num of SAME char. to output, usually 1 */ cpu_reg.h.al = 'X'; /* char. to output */ int86(VIDEO,&cpu_reg,&cpu_reg);
Technical Details
Message-ID:
<45f80j$o5d@news.internet.com.mx>Path:
arc1-ca.pugleaf.net!news.internet.com.mx!usenetReferences:
<44rvl0$3pq@news1.wolfe.net>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.internet.com.mx!usenet From: apa@mail.internet.com.mx (Antonio Perez Ayala) Newsgroups: comp.os.msdos.programmer,comp.lang.c,comp.lang.c++ Subject: Re: Writing to screen, no cursor movement Date: Wed, 11 Oct 1995 00:05:46 GMT Organization: Internet de Mexico S.A. de C.V. Message-ID: <45f80j$o5d@news.internet.com.mx> References: <44rvl0$3pq@news1.wolfe.net> NNTP-Posting-Host: inter003.internet.com.mx X-Newsreader: Forte Free Agent 1.0.82