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

Function txt_get_cursor

sys/msdos/vidtxt.c:404–420  ·  view source on GitHub ↗

* get cursor position * * This is implemented as a macro under DJGPPFAST. */

Source from the content-addressed store, hash-verified

402 * This is implemented as a macro under DJGPPFAST.
403 */
404void txt_get_cursor(int *x, int *y)
405{
406 union REGS regs;
407
408 regs.x.dx = 0;
409 regs.h.ah = GETCURPOS; /* get cursor position */
410 regs.x.cx = 0;
411 regs.x.bx = 0;
412 (void) int86(VIDEO_BIOS, &regs, &regs); /* Get Cursor Position */
413 *x = regs.h.dl;
414 *y = regs.h.dh;
415 if (!cursor_info) {
416 cursor_start_scanline = regs.h.ch;
417 cursor_end_scanline = regs.h.cl;
418 cursor_info = 1;
419 }
420}
421
422void txt_hide_cursor(void)
423{

Callers 3

txt_backspFunction · 0.85
txt_cl_eosFunction · 0.85
txt_xputcFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected