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

Function vesa_FontPtrs

sys/msdos/vidvesa.c:1325–1338  ·  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

1323 * the current graphics mode into interrupt vector 0x43 (0000:010C).
1324 */
1325static unsigned char __far *
1326vesa_FontPtrs(void)
1327{
1328 USHORT __far *tmp;
1329 unsigned char __far *retval;
1330 USHORT fseg, foff;
1331 tmp = (USHORT __far *) MK_PTR(((USHORT) FONT_PTR_SEGMENT),
1332 ((USHORT) FONT_PTR_OFFSET));
1333 foff = READ_ABSOLUTE_WORD(tmp);
1334 ++tmp;
1335 fseg = READ_ABSOLUTE_WORD(tmp);
1336 retval = (unsigned char __far *) MK_PTR(fseg, foff);
1337 return retval;
1338}
1339
1340/*
1341 * This will verify the existence of a VGA adapter on the machine.

Callers 1

vesa_InitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected