home *** CD-ROM | disk | FTP | other *** search
- Unit ScreenIO;
-
- {***********************************************}
- {**** Unit Screenio ****}
- {**** Extra Goodies For Unit CRT ****}
- {**** (C) 1989 Tone Zone Computing ****}
- {***********************************************}
-
- Interface
- Uses Dos,Crt;
-
- Const T:Byte = 7;
- C=1;
-
- NoBorder = 0; {Passed to Swindow to determine the border}
- Bars = 1;
- DoubleBars = 2;
- Solid = 3;
- ThinSolid = 4;
- Dots = 5;
- Dense = 6;
- Pack = 7;
-
- Normal:Byte = 7;
- CursorOffFlag:Boolean = False;
-
- Var ScanCode:Byte;
-
-
-
-
-
-
- {*****************************************************************}
- {****** Replacement procedures for CRT *****}
- {*****************************************************************}
-
- Function KeyPressed:Boolean; {Determines if a key is waiting.}
- Function Inkey:Char; {Reads a key without display}
- Function KeyScan:Char; {Reads a key, only if a key is waiting}
-
- {If Inkey returns a 0 - then the character is an Extended character,
- The scancode is stored in the byte variable ScanCode;}
-
- {KeyScan reads a key only if a key is waiting. If there is no key in
- the buffer, it returns a #255}
-
- {*****************************************************************}
- {****************** Extra Goodies ********************************}
- {*****************************************************************}
-
- Function Sread(LocX,LocY,Colo:Byte):Byte;
- {Returns the contents of screen Location LocX,LocY. If you want the
- text contents, use Colo=0, for the attribute, use Colo:=1;}
-
- Procedure Swrite(LocX,LocY,Colo,What:Byte);
- {Writes a character directly to the screen. Uses The attribute Colo.
- Writes the character chr(What)}
-
- Procedure SWindow(X1,Y1,X2,Y2,Border:Byte);
- {Places a window on the with coordinates X1,Y1,X2,Y2 and border definition
- as determined with above constants. If border <>Noborder then the actual
- text window will be X1+1,Y1+1,X2-1,Y2-1}
-
- Function Calculate_Offset(Lox,Loy,Clo:Byte):Integer;
-
- Procedure CursorOn; {Turn the Cursor on}
- {Turns the Bios cursor off}
-
- Procedure CursorOff; {Turn the Cursor off}
- {Turns the Bios cursor on.}
-
- implementation
-
-
-
-