| 222 | } |
| 223 | |
| 224 | void txt_cl_eos(void) /* clear to end of screen */ |
| 225 | { |
| 226 | union REGS regs; |
| 227 | #ifndef PC9800 |
| 228 | int col, row; |
| 229 | #endif |
| 230 | |
| 231 | #ifdef PC9800 |
| 232 | regs.h.dl = attr98[attrib_text_normal]; |
| 233 | regs.h.ah = SETATT; |
| 234 | regs.h.cl = DIRECT_CON_IO; |
| 235 | |
| 236 | (void) int86(DOS_EXT_FUNC, ®s, ®s); |
| 237 | |
| 238 | regs.h.dl = 0x00; /* clear to end of screen */ |
| 239 | regs.h.ah = SCREEN_CLEAR; |
| 240 | regs.h.cl = DIRECT_CON_IO; |
| 241 | |
| 242 | (void) int86(DOS_EXT_FUNC, ®s, ®s); |
| 243 | #else |
| 244 | txt_get_cursor(&col, &row); |
| 245 | txt_cl_end(col, row); /* clear to end of line */ |
| 246 | if (row < LI - 1) { |
| 247 | txt_gotoxy(0, (row < (LI - 1) ? row + 1 : (LI - 1))); |
| 248 | regs.h.dl = (char) (CO - 1); /* X of lower right */ |
| 249 | regs.h.dh = (char) (LI - 1); /* Y of lower right */ |
| 250 | regs.h.cl = 0; /* X of upper left */ |
| 251 | /* Y (row) of upper left */ |
| 252 | regs.h.ch = (char) (row < (LI - 1) ? row + 1 : (LI - 1)); |
| 253 | regs.x.ax = 0; |
| 254 | regs.x.bx = 0; |
| 255 | regs.h.bh = (char) attrib_text_normal; |
| 256 | regs.h.ah = SCROLL; |
| 257 | (void) int86(VIDEO_BIOS, ®s, ®s); /* Scroll or initialize window */ |
| 258 | } |
| 259 | #endif |
| 260 | } |
| 261 | |
| 262 | void |
| 263 | txt_startup(int *wid, int *hgt) |
no test coverage detected