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

Function txt_cl_end

sys/msdos/vidtxt.c:190–222  ·  view source on GitHub ↗

clear to end of line */

Source from the content-addressed store, hash-verified

188
189/* clear to end of line */
190void txt_cl_end(int col, int row)
191{
192 union REGS regs;
193#ifndef PC9800
194 int count;
195#endif
196
197#ifdef PC9800
198 regs.h.dl = attr98[attrib_text_normal];
199 regs.h.ah = SETATT;
200 regs.h.cl = DIRECT_CON_IO;
201
202 (void) int86(DOS_EXT_FUNC, &regs, &regs);
203
204 regs.h.dl = 0x00; /* clear to end of line */
205 regs.h.ah = LINE_CLEAR;
206 regs.h.cl = DIRECT_CON_IO;
207
208 (void) int86(DOS_EXT_FUNC, &regs, &regs);
209#else
210 count = CO - col;
211 txt_gotoxy(col, row);
212 regs.h.ah = PUTCHARATT; /* write attribute & character */
213 regs.h.al = ' '; /* character */
214 regs.h.bh = 0; /* display page */
215 /* BL = attribute */
216 regs.h.bl = (char) attrib_text_normal;
217 regs.x.cx = count;
218 if (count != 0)
219 (void) int86(VIDEO_BIOS, &regs, &regs); /* write attribute
220 & character */
221#endif
222}
223
224void txt_cl_eos(void) /* clear to end of screen */
225{

Callers 2

txt_cl_eosFunction · 0.85
cl_endFunction · 0.85

Calls 1

txt_gotoxyFunction · 0.85

Tested by

no test coverage detected