c++.dos.32-bits - Clear screen
- "qwertier9023" <psonetwol hotmail.com> Aug 26 2001
- "Walter" <walter digitalmars.com> Aug 26 2001
- "Kenneth Roger" <kennethroger prodigy.net> Oct 29 2001
- Jan Knepper <jan smartsoft.cc> Oct 29 2001
- Roland <rv ronetech.com> Oct 30 2001
- "Walter" <walter digitalmars.com> Oct 30 2001
- "Kenneth Roger" <kennethroger prodigy.net> Oct 29 2001
hi I've noticed that other dos and win compilers have conio.h that contains code for clear screen. _clrscr What is the equivalent for Digital Mars? Thanks in advance
Aug 26 2001
#include <disp.h> disp_move(0,0); disp_eeop(); qwertier9023 wrote in message <9ma8nu$oc7$1 digitaldaemon.com>...hi I've noticed that other dos and win compilers have conio.h that contains code for clear screen. _clrscr What is the equivalent for Digital Mars? Thanks in advance
Aug 26 2001
--code for clear screen. _clrscr What is the equivalent for Digital Mars?
#include <dos.h> void clrscr() { union REGS reg; reg.x.ax=0x0600; reg.h.bh=7; reg.x.cx=0; reg.x.dx=0x184F; int86(0x10,®,®); reg.h.ah=0x2; reg.x.dx=0; reg.h.bh=0; int86(0x10,®,®); }
Oct 29 2001
You could rewrite this with int86x/int86x_real and using REGS, REGS and SREGS... Check bios.h and dos.h Jan Kenneth Roger wrote:--code for clear screen. _clrscr What is the equivalent for Digital Mars?
#include <dos.h> void clrscr() { union REGS reg; reg.x.ax=0x0600; reg.h.bh=7; reg.x.cx=0; reg.x.dx=0x184F; int86(0x10,®,®); reg.h.ah=0x2; reg.x.dx=0; reg.h.bh=0; int86(0x10,®,®); }
Oct 29 2001
Kenneth Roger a écrit :--code for clear screen. _clrscr What is the equivalent for Digital Mars?
#include <dos.h> void clrscr() { union REGS reg; reg.x.ax=0x0600; reg.h.bh=7; reg.x.cx=0; reg.x.dx=0x184F; int86(0x10,®,®); reg.h.ah=0x2; reg.x.dx=0; reg.h.bh=0; int86(0x10,®,®); }
doesn't it work like that ? may be you just have to replace int86 by int86_real Roland
Oct 30 2001
www.digitalmars.com/faq.html#clrscr "Kenneth Roger" <kennethroger prodigy.net> wrote in message news:9rk756$r8h$1 digitaldaemon.com...--code for clear screen. _clrscr What is the equivalent for Digital
#include <dos.h> void clrscr() { union REGS reg; reg.x.ax=0x0600; reg.h.bh=7; reg.x.cx=0; reg.x.dx=0x184F; int86(0x10,®,®); reg.h.ah=0x2; reg.x.dx=0; reg.h.bh=0; int86(0x10,®,®); }
Oct 30 2001
--clear screen. _clrscr What is the equivalent for Digital Mars?
The console window peepers can do it this way. #include <windows.h> void clrscr() { HANDLE hout; DWORD nc, ncw; CONSOLE_SCREEN_BUFFER_INFO sbi; COORD home; home.X=home.Y=0; hout=GetStdHandle(STD_OUTPUT_HANDLE); if(hout==INVALID_HANDLE_VALUE) return; GetConsoleScreenBufferInfo(hout,&sbi); nc=sbi.dwSize.X*sbi.dwSize.Y; FillConsoleOutputAttribute(hout,sbi.wAttributes,nc,home,&ncw); FillConsoleOutputCharacter(hout,' ',nc,home,&ncw); SetConsoleCursorPosition(hout,home); }
Oct 29 2001









"Walter" <walter digitalmars.com> 