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

Function txt_gotoxy

sys/msdos/vidtxt.c:473–501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471#endif /* SCREEN_BIOS && !PC9800 */
472
473void
474txt_gotoxy(int x, int y)
475{
476#ifdef SCREEN_BIOS
477 union REGS regs;
478
479#ifdef PC9800
480 regs.h.dh = (char) y; /* row */
481 regs.h.dl = (char) x; /* column */
482 regs.h.ah = SETCURPOS;
483 regs.h.cl = DIRECT_CON_IO;
484 (void) int86(DOS_EXT_FUNC, &regs, &regs); /* Set Cursor Position */
485#else
486 regs.h.ah = SETCURPOS;
487 regs.h.bh = 0; /* display page */
488 regs.h.dh = (char) y; /* row */
489 regs.h.dl = (char) x; /* column */
490 (void) int86(VIDEO_BIOS, &regs, &regs); /* Set Cursor Position */
491#endif
492#endif
493#if defined(SCREEN_DJGPPFAST)
494 ScreenSetCursor(y, x);
495#endif
496 /* The above, too, goes back all the way to the original PC. If
497 * we ever get so fancy as to swap display pages (i doubt it),
498 * then we'll need to set BH appropriately. This function
499 * returns nothing. -3.
500 */
501}
502
503/*
504 * This marks the end of the cursor manipulation/information routines.

Callers 9

txt_backspFunction · 0.85
txt_clear_screenFunction · 0.85
txt_cl_endFunction · 0.85
txt_cl_eosFunction · 0.85
txt_xputsFunction · 0.85
txt_xputcFunction · 0.85
cmovFunction · 0.85
homeFunction · 0.85
nocmovFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected