home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / GRFTXT.ZIP / GRAFTEXT.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1989-01-27  |  1.5 KB  |  63 lines

  1. unit graftext;
  2.  
  3. interface
  4.  
  5.  
  6. Procedure Gtxttran(gdx,gdy,color,lines:word;fnt:pointer;st:string);
  7. Procedure Gtxtsol(gdx,gdy,backgnd,color,lines:word;fnt:pointer;st:string);
  8. Procedure Font8;
  9. Procedure Font14;
  10. Procedure SetYofset(yofs:word);  {number of scan lines to scroll up the screen}
  11.  
  12.  
  13.  
  14. { To Write on areas off the visible screen, consider the graphics page to be a
  15.   virtual space of 640 wide and 819 tall. (64K  addresses / (80 bytes/line)
  16.   = 819.2. At EGA resolution, you can have two separate virtual screens of 350
  17.   lines, with space left over. At 480 lines, you can have only 1 independent
  18.   screen (assuming 256K of video memory) }
  19.  
  20.  
  21.  
  22.  
  23.  
  24. implementation
  25.  
  26. {$L Graftex1}     { a transparent text writing routine}
  27. Procedure Gtxttran(gdx,gdy,color,lines:word;fnt:pointer;st:string);
  28. external;
  29.  
  30.  
  31. {$L Graftex2}     { a text writing routine with solid background}
  32. Procedure Gtxtsol(gdx,gdy,backgnd,color,lines:word;fnt:pointer;st:string);
  33. external;
  34.  
  35. { Note: other fonts can be linked by converting them to .OBJ files
  36.         to do this use BINOBJ. The supplied 8x8 font was converted as follows:
  37.  
  38.         BINOBJ 8x8.fnt 8x8 Font8
  39.  
  40. }
  41.  
  42.  
  43.  
  44.  
  45. {$L 8x8.obj}
  46. Procedure Font8;
  47. external;
  48.  
  49. {$L 8x14.obj}
  50. Procedure Font14;
  51. external;
  52.  
  53. Procedure SetYofset(yofs:word);
  54. begin                           {set CRT controller Start Address hi/low}
  55.    yofs := yofs * 80;         {assuming 640 pixels, across screen is 80 bytes}
  56.    port[$3d4] := $C;
  57.    port[$3d5] := hi(yofs);
  58.    port[$3d4] := $D;
  59.    port[$3d5] := lo(yofs);
  60. end;
  61.  
  62.  
  63. end.