home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-386-Vol-2of3.iso / b / bgi256-3.zip / MAKEFONT.PAS < prev    next >
Pascal/Delphi Source File  |  1992-12-27  |  1KB  |  33 lines

  1.  
  2. {Program to create a font file from the existing system 8x8 font}
  3. {Note: this program assumes that the interrupt vector at $1f contains}
  4. {a pointer to a valid upper font definition table as would be obtained}
  5. {after running the MSDOS GRAFTBL program.}
  6. {Writen by Michael Day as of 12/02/92 - public domain}
  7.  
  8. program MakeFont;
  9.  
  10. uses Dos;
  11.  
  12. type  FontChar  = array[0..7] of byte;
  13.       FontArray = array[0..127] of FontChar;
  14.  
  15. const FontFilename = 'FNTIMG.DAT';
  16. const FontID : FontChar = ($4D,$49,$4B,$45,$20,$44,$41,$59);
  17.  
  18. var LoFont : FontArray absolute $F000:$FA6E;
  19.     SysFont : ^FontArray;
  20.     UpFont : FontArray;
  21.     f : file of FontArray;
  22.  
  23. begin
  24.   assign(f,FontFilename);           {Create font file}
  25.   rewrite(f);
  26.   GetIntVec($1F,pointer(SysFont));  {Get upper font table address}
  27.   UpFont := SysFont^;               {Copy to local array}
  28.   UpFont[127] := FontID;            {Insert our font ID mark}
  29.   write(f,LoFont);                  {Write sys font to the file}
  30.   write(f,UpFont);                  {followed by the upper font}
  31.   close(f);                         {Close the file}
  32. end.
  33.