home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / BCRT.ZIP / BIOSCRT.PAS next >
Encoding:
Pascal/Delphi Source File  |  1988-08-30  |  21.8 KB  |  556 lines

  1.  
  2. { -********************************************************************** -}
  3. {  BIOSCRT - A unit to allow text output through the standard BIOS calls   }
  4. {  This unit will work in both text and graphics modes. It was primarily   }
  5. {  written to allow use of the MS-DOS system font in graphics mode to      }
  6. {  compensate for the current lack of a BGI system font. Note: This method }
  7. {  will *NOT* work with most Hercules boards because they don't properly   }
  8. {  support the BIOS calls in graphics mode.                                }
  9. {                                                                          }
  10. {  Notes: If you are using this unit on a CGA in the graphics mode, you    }
  11. {  should run the GRAFTABL program from your DOS supplimental program disk }
  12. {  (this loads the extended CGA charater set into memory).                 }
  13. {                                                                          }
  14. {  To make this into a fully operational CRT type unit you will need to    }
  15. {  obtain a copy of Carley Phillips' "CRTI" unit which can be found on     }
  16. {  CompuServe in the Borland BPROGA Turbo library (DL2). Carley's CRTI     }
  17. {  unit will provide you with the sound, delay, and keyboard procedures.   }
  18. {                                                                          }
  19. {     Written by Michael Day 23 August 1988  CIS:[73577,2225]              }
  20. {     Updated to Version 2.0 and renamed to BiosCrt 29 August 1988         }
  21. {     This unit is released to the public domain by the author             }
  22. {     Mike Day    UUCP:...!tektronix!reed!qiclab!bakwatr!mikeday           }
  23. {     Chief Bit Washer, Day Research, P.O. Box 22902, Milwaukie, OR 97222  }
  24. {     Plans?...We don't need no stinkin' plans!                            }
  25. { -********************************************************************** -}
  26.  
  27. Unit  BiosCrt;
  28.  
  29. interface
  30. uses Dos;
  31.  
  32. var BiosWriteMode   : byte;      {Bios write mode to use for TFDD}
  33.     BiosTextAttr    : byte;      {Bios text attribute byte}
  34.     BiosStartAttr   : byte;      {Original startup attr}
  35.     LastBiosMode    : byte;      {last Bios screen mode in use}
  36.     LastBiosWidth   : byte;      {last Bios screen width used}
  37.     LastBiosPage    : byte;      {last Bios screen page used}
  38.  
  39. {--------------------------------------------------------------------------}
  40. {-- Below are listed the important Bios variables for the video display. --}
  41. {-- These are set by the Bios and are provided for reading only.  Do not --}
  42. {-- change any of these values or irratic display operation will result. --}
  43.  
  44.     BiosMode      : byte absolute $0040:$0049; {Current bios video mode}
  45.     BiosMaxX      : word absolute $0040:$004A; {Text cols on display}
  46.     BiosCrtLength : word absolute $0040:$004C; {Crt buffer size in bytes}
  47.     BiosCursorPos : array [0..7] of word absolute $0040:0050; {Cursor pos}
  48.     BiosCursorMode: word absolute $0040:$0060; {Current cursor mode}
  49.     BiosActivePage: byte absolute $0040:$0062; {Current active video page}
  50.     BiosAddr6845  : word absolute $0040:$0063; {I/O address of controller}
  51.     Bios6845Mode  : byte absolute $0040:$0065; {Current 6845 mode value}
  52.     BiosPalette   : byte absolute $0040:$0066; {Current palette selected}
  53.     BiosMaxY      : byte absolute $0040:$0084; {Text rows on display -1}
  54.     BiosCharSize  : word absolute $0040:$0085; {Height of character cell}
  55.     BiosInfo      : byte absolute $0040:$0087; {Misc video control info}
  56.     BiosInfo3     : byte absolute $0040:$0087; {Display card switch info}
  57.     BiosFlags     : byte absolute $0040:$0087; {Misc video control flags}
  58.     BiosDCC       : byte absolute $0040:$008A; {Display Combination Code}
  59.     BiosSavePtr   : pointer absolute $0040:$00A8; {Pointer to Bios save area}
  60.     BiosFontTable : byte absolute $F000:$FA6E; {CGA (8x8) Bios font table}
  61.  
  62. {++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
  63. {-- The following are the inline macros used to access the BIOS routines --}
  64.  
  65. function BiosWhereX:integer;                      {get current cursor X pos}
  66. inline(
  67.    $B7/$00     { mov BH,0}
  68.   /$B4/$03     { mov AH,3}
  69.   /$55         { push BP}
  70.   /$CD/$10     { int $10}
  71.   /$5D         { pop BP}
  72.   /$30/$E4     { xor AH,AH}
  73.   /$88/$D0);   { mov AL,DL}
  74.  
  75. function BiosWhereY:integer;                      {get current cursor Y pos}
  76. inline(
  77.    $B7/$00     { mov BH,0}
  78.   /$B4/$03     { mov AH,3}
  79.   /$55         { push BP}
  80.   /$CD/$10     { int $10}
  81.   /$5D         { pop BP}
  82.   /$30/$E4     { xor AH,AH}
  83.   /$88/$F0);   { mov AL,DH}
  84.  
  85. procedure BiosWhereXY(var X,Y:integer);         {get current cursor X,Y pos}
  86. inline(
  87.    $B7/$00       { mov BH,0}
  88.   /$B4/$03       { mov AH,3}
  89.   /$55           { push BP}
  90.   /$CD/$10       { int $10}
  91.   /$5D           { pop BP}
  92.   /$07           { pop ES}
  93.   /$5B           { pop BX}
  94.   /$26/$88/$37   { mov ES:[BX],DH}
  95.   /$07           { pop ES}
  96.   /$5B           { pop BX}
  97.   /$26/$88/$17); { mov ES:[BX],DL}
  98.  
  99.  
  100. procedure BiosGotoXY(X,Y:integer);            {move cursor to indicated X,Y}
  101. inline(
  102.    $58         { pop AX}
  103.   /$5A         { pop DX}
  104.   /$88/$C6     { mov DH,AL}
  105.   /$B7/$00     { mov BH,0}
  106.   /$B4/$02     { mov AH,2}
  107.   /$55         { push BP}
  108.   /$CD/$10     { int $10}
  109.   /$5D);       { pop BP}
  110.  
  111. procedure BiosTextColor(FColor:integer);         {Set text foreground color}
  112. inline(
  113.    $58                   { pop AX}
  114.   /$24/$0f               { and AL,$0F}
  115.   /$8A/$26/>BiosTextAttr { mov AH,[>BiosTextAttr]}
  116.   /$80/$E4/$F0           { and AH,$F0}
  117.   /$08/$E0               { or AL,AH}
  118.   /$A2/>BiosTextAttr);   { mov [>BiosTextAttr],AL}
  119.  
  120. procedure BiosTextBackGround(BColor:integer);    {Set text background color}
  121. inline(
  122.    $58                   { pop AX}
  123.   /$B1/$04               { mov CL,4}
  124.   /$D2/$E0               { shl AL,CL}
  125.   /$8A/$26/>BiosTextAttr { mov AH,[>BiosTextAttr]}
  126.   /$80/$E4/$0F           { and AH,$0F}
  127.   /$08/$E0               { or AL,AH}
  128.   /$A2/>BiosTextAttr);   { mov [>BiosTextAttr],AL}
  129.  
  130. function GetBiosTextAttr:integer;      {Get the current Bios text Attribute}
  131. Inline(
  132.    $B7/$00     { mov BH,0}
  133.   /$B4/$08     { mov AH,8}
  134.   /$55         { push BP}
  135.   /$CD/$10     { int $10}
  136.   /$5D         { pop BP}
  137.   /$88/$E0     { mov AL,AH}
  138.   /$30/$E4);   { xor AH,AH}
  139.  
  140. procedure SetBiosWriteMode(Mode:integer);       {Set Bios write mode to use}
  141. inline(                                         {0=Reg, 1=Xor, 2=Bk}
  142.    $58                   { pop AX}
  143.   /$A2/>BiosWriteMode);  { mov [>BiosWriteMode],AL}
  144.  
  145. procedure SetBiosPage(Page:integer);            {set active bios video page}
  146. inline(
  147.    $58         { pop AX}
  148.   /$B4/$05     { mov AH,5}
  149.   /$55         { push BP}
  150.   /$CD/$10     { int $10}
  151.   /$5D);       { pop BP}
  152.  
  153. procedure BiosCursorOFF;                            {turn the cursor off}
  154. inline(
  155.    $B4/$03     { mov AH,3}
  156.   /$55         { push BP}
  157.   /$CD/$10     { int $10}
  158.   /$5D         { pop BP}
  159.   /$80/$CD/$20 { or ch,$20}
  160.   /$B4/$01     { mov AH,1}
  161.   /$55         { push BP}
  162.   /$CD/$10     { int $10}
  163.   /$5D);       { pop BP}
  164.  
  165. procedure BiosCursorON;                              {turn the cursor on}
  166. inline(
  167.    $B4/$03     { mov AH,3}
  168.   /$55         { push BP}
  169.   /$CD/$10     { int $10}
  170.   /$5D         { pop BP}
  171.   /$80/$E5/$1F { and CH,$1F}
  172.   /$B4/$01     { mov AH,1}
  173.   /$55         { push BP}
  174.   /$CD/$10     { int $10}
  175.   /$5D);       { pop BP}
  176.  
  177. {++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
  178. {-- The following are the string procedures to access the BIOS routines ---}
  179.  
  180. procedure BiosWrite(S:String);                       {Bios based text write}
  181. procedure BiosWriteLn(S:String);                   {Bios based text writeln}
  182.  
  183. procedure BiosClrEol;                                 {clear to end of line}
  184. procedure BiosClrScr;                                     {clear the screen}
  185. procedure BiosLowVideo;                  {turns off high intensity attr bit}
  186. procedure BiosHighVideo;                  {turns on high intensity attr bit}
  187. procedure BiosNormalVideo;           {restores video attr to start up value}
  188. procedure AssignBiosText(var F:Text);      {assigns text output to BiosText}
  189. procedure BiosTextMode(Mode:byte);        {sets new Bios video display mode}
  190. procedure BiosPixGoto(X,Y:integer);       {goto character at pixel location}
  191.  
  192. { -********************************************************************** -}
  193. implementation
  194.  
  195.  
  196. {++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
  197. {-- The following are the inline macros used to access the BIOS routines --}
  198.  
  199. {-- Write Bios character via TTY write --}
  200. procedure TtyWrite(Ch:Char; Color:integer);
  201. Inline(
  202.    $5B          { pop BX}
  203.   /$58          { pop AX}
  204.   /$B4/$0E      { mov AH,14}
  205.   /$55          { push BP}
  206.   /$CD/$10      { int $10}
  207.   /$5D);        { pop BP}
  208.  
  209. {-- Write Bios character via Char/Attribute write --}
  210. procedure OutChar(Ch:Char; Color:integer);
  211. Inline(
  212.    $5B          { pop BX}
  213.   /$58          { pop AX}
  214.   /$B9/$01/$00  { mov CX,1}
  215.   /$B4/$09      { mov AH,9}
  216.   /$55          { push BP}
  217.   /$CD/$10      { int $10}
  218.   /$5D);        { pop BP}
  219.  
  220. {-- This does a Bios based screen scroll --}
  221. procedure BiosScrollUp(StartXY,EndXY,Lines:word);
  222. inline(
  223.    $58                   { pop AX}
  224.   /$5A                   { pop DX}
  225.   /$59                   { pop CX}
  226.   /$8A/$3E/>BiosTextAttr { mov BH,[>BiosTextAttr]}
  227.   /$B4/$06               { mov AH,6}
  228.   /$55                   { push BP}
  229.   /$CD/$10               { int $10}
  230.   /$5D);                 { pop BP}
  231.  
  232. {-- This does a Bios based screen scroll --}
  233. procedure BiosScrollDown(StartXY,EndXY,Lines:word);
  234. inline(
  235.    $58                   { pop AX}
  236.   /$5A                   { pop DX}
  237.   /$59                   { pop CX}
  238.   /$8A/$3E/>BiosTextAttr { mov BH,[>BiosTextAttr]}
  239.   /$B4/$07               { mov AH,7}
  240.   /$55                   { push BP}
  241.   /$CD/$10               { int $10}
  242.   /$5D);                 { pop BP}
  243.  
  244. {This updates the LastBios registers prior to a call that changes them}
  245. procedure SaveLastBiosMode;
  246. inline(
  247.    $B4/$0F                 { mov AH,15}
  248.   /$55                     { push BP}
  249.   /$CD/$10                 { int $10}
  250.   /$5D                     { pop BP}
  251.   /$A2/>LastBiosMode       { mov [>LastBiosMode],AL}
  252.   /$88/$26/>LastBiosWidth  { mov [>LastBiosWidth],AH}
  253.   /$88/$3E/>LastBiosPage); { mov [>LastBiosPage],BH}
  254.  
  255. {Sets the display mode to the values given}
  256. procedure ForceBiosMode(Mode:byte);
  257. inline(
  258.    $58         { pop AX}
  259.   /$B4/$00     { mov AH,0}
  260.   /$55         { push BP}
  261.   /$CD/$10     { int $10}
  262.   /$5D);       { pop BP}
  263.  
  264. {++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
  265. {This saves the current Bios display mode in the LastMode registers}
  266. {Then updates the display to the new mode value given}
  267. procedure BiosTextMode(Mode:byte);
  268. begin
  269.   SaveLastBiosMode;
  270.   ForceBiosMode(Mode);
  271. end;
  272.  
  273. {--------------------------------------------------------------------------}
  274. procedure BiosLowVideo;                  {turns off high intensity attr bit}
  275. begin
  276.    BiosTextAttr := BiosTextAttr and $08;
  277. end;
  278.  
  279. {--------------------------------------------------------------------------}
  280. procedure BiosHighVideo;                  {turns on high intensity attr bit}
  281. begin
  282.    BiosTextAttr := BiosTextAttr or $08;
  283. end;
  284.  
  285. {--------------------------------------------------------------------------}
  286. procedure BiosNormalVideo;           {restores video attr to start up value}
  287. begin
  288.    BiosTextAttr := BiosStartAttr;
  289. end;
  290.  
  291. {--------------------------------------------------------------------------}
  292. {Clear to the end of the text line starting from the current X position}
  293. procedure BiosClrEol;
  294. var i,x,y : integer;
  295. begin
  296.    BiosWhereXY(x,y);
  297.    for i := BiosWhereX to pred(BiosMaxX) do
  298.    begin
  299.      TtyWrite(#$20,BiosTextAttr);
  300.    end;
  301.    BiosGotoXY(x,y);
  302. end;
  303.  
  304. {--------------------------------------------------------------------------}
  305. {Clear the entire screen}
  306. {Warning: in Graphics mode you must set both foreground and background}
  307. {to the desired color to be used or strange things will happen}
  308. procedure BiosClrScr;
  309. begin
  310.    if BiosMaxY = 0 then
  311.      BiosScrollUp(0,(24 shl 8) or pred(BiosMaxX),0)
  312.    else
  313.      BiosScrollUp(0,(BiosMaxY shl 8) or pred(BiosMaxX),0);
  314. end;
  315.  
  316. {--------------------------------------------------------------------------}
  317. {Delete a line from the screen}
  318. {Warning: in Graphics mode you must set both foreground and background}
  319. {to the desired color to be used or strange things will happen}
  320. procedure BiosDelLine;
  321. begin
  322.    if BiosMaxY = 0 then
  323.      BiosScrollUp(BiosWhereY shl 8,(24 shl 8) or pred(BiosMaxX),0)
  324.    else
  325.      BiosScrollUp(BiosWhereY shl 8,(BiosMaxY shl 8) or pred(BiosMaxX),0);
  326. end;
  327.  
  328. {--------------------------------------------------------------------------}
  329. {Insert a line on the screen}
  330. {Warning: in Graphics mode you must set both foreground and background}
  331. {to the desired color to be used or strange things will happen}
  332. procedure BiosInsLine;
  333. begin
  334.    if BiosMaxY = 0 then
  335.      BiosScrollDown(BiosWhereY shl 8,(24 shl 8) or pred(BiosMaxX),0)
  336.    else
  337.      BiosScrollDown(BiosWhereY shl 8,(BiosMaxY shl 8) or pred(BiosMaxX),0);
  338. end;
  339.  
  340. {--------------------------------------------------------------------------}
  341. {goto to the closest character X,Y point based on the Pixel X,Y coordinate }
  342. procedure BiosPixGoto(X,Y:integer);
  343. var CxSize,CySize : integer;
  344. begin
  345.    CySize := BiosCharSize;
  346.    if CySize = 0 then CySize := 8;
  347.    CxSize := 8;
  348.    BiosGotoXY(X div CxSize,Y div CySize);
  349. end;
  350.  
  351. {++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
  352. procedure BWrite(Attr,Count:integer; Buf:Pointer);
  353. type BufArray = array[0..65521] of char;
  354.      BufPtr = ^BufArray;
  355. var  P : BufPtr;
  356.      i : integer;
  357. begin
  358.    P := Buf;
  359.    i := 0;
  360.    While i < Count do
  361.    begin
  362.      TtyWrite(P^[i],Attr);
  363.      inc(i);
  364.    end;
  365. end;
  366.  
  367. {--------------------------------------------------------------------------}
  368. procedure BkWrite(FColor,BColor,Count:integer; Buf:Pointer);
  369. type BufArray = array[0..65521] of char;
  370.      BufPtr = ^BufArray;
  371. var  P : BufPtr;
  372.      i : integer;
  373. begin
  374.    P := Buf;
  375.    i := 0;
  376.    While i < Count do
  377.    begin
  378.      OutChar(#10,BColor);                          {Output a block character}
  379.      OutChar(#9,BColor or $80);                            {Fill in the hole}
  380.      TtyWrite(P^[i],(BColor xor FColor) or $80);            {Then write char}
  381.      inc(i);
  382.    end;
  383. end;
  384.  
  385. {--------------------------------------------------------------------------}
  386. procedure FastBkWrite(FColor,BColor,Count:integer; Buf:Pointer);
  387. type BufArray = array[0..65521] of char;
  388.      BufPtr = ^BufArray;
  389. var  P : BufPtr;
  390.      i : integer;
  391. begin
  392.    P := Buf;                 {this works just like BkWrite, but assumes that}
  393.    i := 0;                    {the #219 character is available in the system}
  394.    While i < Count do          {for CGA systems this means that you must run}
  395.    begin                      {the GRAFTABL program from your DOS disk first}
  396.      OutChar(#219,BColor);                         {Output a block character}
  397.      TtyWrite(P^[i],(BColor xor FColor) or $80);            {Then write char}
  398.      inc(i);
  399.    end;
  400. end;
  401.  
  402. {++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
  403. {-- Write a string via the Bios TTY write function --}
  404. procedure BiosWrite(S:String);
  405. begin
  406.  
  407.    case BiosWriteMode of
  408.      1 : BWrite((BiosTextAttr and $0f) or $80,Length(S),Addr(S[1]));
  409.      2 : BkWrite(BiosTextAttr and $0f,(BiosTextAttr shr 4) and $0f,
  410.                  Length(S),Addr(S[1]));
  411.      3 : FastBkWrite(BiosTextAttr and $0f,(BiosTextAttr shr 4) and $0f,
  412.                  Length(S),Addr(S[1]));
  413.    else
  414.      BWrite(BiosTextAttr and $0f,Length(S),Addr(S[1]));
  415.    end;
  416. end;
  417.  
  418. {--------------------------------------------------------------------------}
  419. {-- Same thing as BiosWrite, but with CRLF added --}
  420. procedure BiosWriteLn(S:String);
  421. begin
  422.    BiosWrite(S);
  423.    TtyWrite(#10,BiosTextAttr);
  424.    TtyWrite(#13,BiosTextAttr);
  425. end;
  426.  
  427.  
  428. { -********************************************************************** -}
  429. {                                                                          }
  430. {- The following are the procedures which allows BiosWrite to use a TFDD  -}
  431. {                                                                          }
  432. { -********************************************************************** -}
  433.  
  434. {$F+}   { force fall calls for TFDD }
  435.  
  436. {++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
  437. {-- Ignore this function call --}
  438. function TfddBiosIgnore(var F:TextRec):integer;
  439. begin
  440.    TfddBiosIgnore := 0;
  441. end;
  442.  
  443. {--------------------------------------------------------------------------}
  444. {-- Write a string via the Bios TTY write function --}
  445. {-- background is palette(0) - (usually black) --}
  446. function TfddBiosWrite(var F:TextRec):integer;
  447. begin
  448.    with F do
  449.    begin
  450.      case BiosWriteMode of
  451.        1 : BWrite((BiosTextAttr and $0f) or $80,BufPos,BufPtr);
  452.        2 : BkWrite(BiosTextAttr and $0f,(BiosTextAttr shr 4) and $0f,
  453.                    BufPos,BufPtr);
  454.        3 : FastBkWrite(BiosTextAttr and $0f,(BiosTextAttr shr 4) and $0f,
  455.                    BufPos,BufPtr);
  456.      else
  457.        BWrite(BiosTextAttr and $0f,BufPos,BufPtr);
  458.      end;
  459.      BufPos := 0;
  460.    end;
  461.    TfddBiosWrite := 0;
  462. end;
  463.  
  464. {$F-}  { done with local TFDD so return world to normal }
  465.  
  466. procedure AssignBiosText(var F:Text);
  467. begin
  468.    with TextRec(F) do
  469.    begin
  470.      Handle := $FFFF;
  471.      Mode := fmClosed;
  472.      BufSize := SizeOf(Buffer);
  473.      BufPtr := @Buffer;
  474.      OpenFunc := @TfddBiosIgnore;
  475.      CloseFunc := @TfddBiosIgnore;
  476.      FlushFunc := @TfddBiosWrite;
  477.      InOutFunc := @TfddBiosWrite;
  478.      Name[0] := #0;
  479.    end;
  480. end;
  481.  
  482. { -********************************************************************** -}
  483. {init with current known attribute by reading the screen}
  484. begin
  485.    BiosStartAttr := GetBiosTextAttr;
  486.    BiosTextAttr := BiosStartAttr;
  487.    BiosWriteMode := 0;
  488.    SaveLastBiosMode;
  489. end.
  490.  
  491. (* *************************************************************************
  492.                             -- BiosCrt --
  493.                       What it is and what it does
  494.  
  495. The variables, functions, and procedures available to the outside are shown
  496. below. Note that mixing the use of BiosCrt and other CRT type routines may
  497. cause confusion as to which background/foreground color is to be used.  The
  498. BiosCrt will always use it's own foreground (from BiosTextAttr), and uses
  499. the existing Bios background. In Xor write the background is unchanged, and
  500. the characters are Xored into the foreground. The special BiosBkWrite
  501. procedure allows you to write your own background in graphics mode attribute
  502. in alpha mode). In graphics mode the background is generated by writing a
  503. solid block in the foreground and then writting the desired character on
  504. top with a preXored color. For this to work properly the Bios Background
  505. should be black (Palette(0) = black). This is because the #219 Block
  506. character is not normally available in CGA, so two characters that are
  507. available are used to simulate a block character. BiosWriteMode(3) is the
  508. same as mode 2, but assumes that the #219 character is available. This
  509. can be done by running the GRAFTABL program first for CGA displays.
  510.  
  511. A Text File Device Driver has been added to the unit so that you can use the
  512. standard write procedures to perform the output. The simple string based
  513. procedure has also been retained for those who would prefer not to use the
  514. TFDD (Though I don't know why you wouldn't).
  515.  
  516.  
  517. There are many structures provided in this unit that may not be used by all
  518. programs. If you find that you are curious about what the code is doing I
  519. strongly recommend the book "Programmer's Guide to PC & PS/2 Video Systems."
  520. by Richard Wilton from MicroSoft Press. If you are doing any programming for
  521. video systems on the PC this book is a must have.
  522.  
  523. --> Note: this unit will NOT work with most Hercules cards since they don't
  524. --> properly support the Bios in graphics mode.
  525.  
  526. function BiosWhereX:integer;                      {get current cursor X pos}
  527. function BiosWhereY:integer;                      {get current cursor Y pos}
  528. function GetBiosTextAttr:integer;      {Get the current Bios text Attribute}
  529. function GetBiosMode:integer;            {Get the current Bios display mode}
  530. function GetBiosPage:integer;            {Get the current Bios display page}
  531. function GetBiosWidth:integer;          {Get the current Bios display width}
  532.  
  533. procedure AssignBiosText(var F:Text);      {assigns text output to BiosText}
  534. procedure BiosWhereXY(var X,Y:integer);         {get current cursor X,Y pos}
  535. procedure BiosGotoXY(X,Y:integer);            {move cursor to indicated X,Y}
  536. procedure BiosPixGoto(X,Y:integer);       {goto character at pixel location}
  537. procedure BiosTextColor(FColor:integer);         {Set text foreground color}
  538. procedure BiosTextBackGround(BColor:integer);    {Set text background color}
  539. procedure BiosTextMode(Mode:byte);        {sets new Bios video display mode}
  540. procedure BiosLowVideo;                  {turns off high intensity attr bit}
  541. procedure BiosHighVideo;                  {turns on high intensity attr bit}
  542. procedure BiosNormalVideo;           {restores video attr to start up value}
  543. procedure BiosClrEol;                                 {clear to end of line}
  544. procedure BiosClrScr;                                     {clear the screen}
  545. procedure BiosCursorON;                                 {turn the cursor on}
  546. procedure BiosCursorOFF;                               {turn the cursor off}
  547. procedure SetBiosPage(Page:integer);            {set active bios video page}
  548. procedure SetBiosWriteMode(Mode:integer);       {Set Bios write mode to use}
  549.  
  550. procedure BiosWrite(S:String);                       {Bios based text write}
  551. procedure BiosWriteLn(S:String);                   {Bios based text writeln}
  552.  
  553. ************************************************************************* *)
  554.  
  555.  
  556.