MCPcopy Create free account
hub / github.com/NetHack/NetHack / txt_cl_eos

Function txt_cl_eos

sys/msdos/vidtxt.c:224–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222}
223
224void 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, &regs, &regs);
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, &regs, &regs);
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, &regs, &regs); /* Scroll or initialize window */
258 }
259#endif
260}
261
262void
263txt_startup(int *wid, int *hgt)

Callers 1

cl_eosFunction · 0.85

Calls 3

txt_get_cursorFunction · 0.85
txt_cl_endFunction · 0.85
txt_gotoxyFunction · 0.85

Tested by

no test coverage detected