| 154 | } |
| 155 | |
| 156 | void |
| 157 | txt_clear_screen(void) |
| 158 | /* djgpp provides ScreenClear(), but in version 1.09 it is broken |
| 159 | * so for now we just use the BIOS Routines |
| 160 | */ |
| 161 | { |
| 162 | union REGS regs; |
| 163 | #ifdef PC9800 |
| 164 | regs.h.dl = attr98[attrib_text_normal]; |
| 165 | regs.h.ah = SETATT; |
| 166 | regs.h.cl = DIRECT_CON_IO; |
| 167 | |
| 168 | (void) int86(DOS_EXT_FUNC, ®s, ®s); |
| 169 | |
| 170 | regs.h.dl = 0x02; /* clear whole screen */ |
| 171 | regs.h.ah = SCREEN_CLEAR; |
| 172 | regs.h.cl = DIRECT_CON_IO; |
| 173 | |
| 174 | (void) int86(DOS_EXT_FUNC, ®s, ®s); |
| 175 | #else |
| 176 | regs.h.dl = (char) (CO - 1); /* columns */ |
| 177 | regs.h.dh = (char) (LI - 1); /* rows */ |
| 178 | regs.x.cx = 0; /* CL,CH = x,y of upper left */ |
| 179 | regs.x.ax = 0; |
| 180 | regs.x.bx = 0; |
| 181 | regs.h.bh = (char) attrib_text_normal; |
| 182 | regs.h.ah = (char) SCROLL; |
| 183 | /* DL,DH = x,y of lower rt */ |
| 184 | (void) int86(VIDEO_BIOS, ®s, ®s); /* Scroll or init window */ |
| 185 | txt_gotoxy(0, 0); |
| 186 | #endif |
| 187 | } |
| 188 | |
| 189 | /* clear to end of line */ |
| 190 | void txt_cl_end(int col, int row) |
no test coverage detected