//------------------------------------------------------------------- // romfonts.cpp // // This utility executes a standard BIOS routine that gives the // real-mode address of each character-glyph table in firmware. // // compile using: $ g++ romfonts.cpp int86.cpp -o romfonts // // programmer: ALLAN CRUSE // written on: 09 SEP 2003 // revised on: 04 SEP 2005 -- replacing svgalib with 'int86()' //------------------------------------------------------------------- #include // for printf() #include "int86.h" // for init8086(), int86() char *legend[ 8 ] = { "", "", "8x14 font (0x00-0xFF)", "8x8 font (0x00-0x7F)", "8x8 font (0x80-0xFF)", "9x14 font (alternates)", "8x16 font (0x00-0xFF)", "9x16 font (alternates)" }; int main( void ) { init8086(); // maps memory for access to firmware services printf( "\n\tReal-mode addresses for the " ); printf( "built-in character-glyph tables\n" ); for (int i = 2; i < 8; i++) { struct vm86plus_struct vm = {0}; vm.regs.eax = 0x1130; // Get Font Info vm.regs.ebx = (i << 8); // which font ID int86( 0x10, vm ); // invokes BIOS printf( "\n\t\t%04X:%04X ", vm.regs.es, vm.regs.ebp ); printf( " %s ", legend[ i ] ); } printf( "\n\n" ); }