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

Function vga_FontPtrs

sys/msdos/vidvga.c:903–916  ·  view source on GitHub ↗

* * Returns a far pointer (or flat 32 bit pointer under djgpp) to the * location of the appropriate ROM font for the _current_ video mode * (so you must place the card into the desired video mode before * calling this function). * * This function takes advantage of the video BIOS loading the * address of the appropriate character definition table for * the current graphics mode into interr

Source from the content-addressed store, hash-verified

901 * the current graphics mode into interrupt vector 0x43 (0000:010C).
902 */
903char __far *
904vga_FontPtrs(void)
905{
906 USHORT __far *tmp;
907 char __far *retval;
908 USHORT fseg, foff;
909 tmp = (USHORT __far *) MK_PTR(((USHORT) FONT_PTR_SEGMENT),
910 ((USHORT) FONT_PTR_OFFSET));
911 foff = READ_ABSOLUTE_WORD(tmp);
912 ++tmp;
913 fseg = READ_ABSOLUTE_WORD(tmp);
914 retval = (char __far *) MK_PTR(fseg, foff);
915 return retval;
916}
917
918/*
919 * This will verify the existence of a VGA adapter on the machine.

Callers 1

vga_InitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected