home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
mbug
/
mbug077.arc
/
SCRNHND.FDC
< prev
next >
Wrap
Text File
|
1979-12-31
|
3KB
|
108 lines
const
Red = 1;
Green = 2;
Blue = 4;
Yellow = 3;
Cyan = 6;
Black = 0;
White = 7;
Mag = 5;
BackG = Black;
COLPORT = $08;
ColSt = $F800;
ColEnd = $FFFF;
SelectPort = $C;
DataPort = $D;
SCNMinMemReqd = 1024; {1k}
Type
SCNNextWindowPtr = ^SCNNextWindowRec;
SCNNextWindowRec = Record
NextWindow : SCNNextWindowPtr;
XStart,
YStart,
XEnd,
YEnd,
XCursPos,
YCursPos : Byte;
Data : ^Char;
End;
Var SCNInverse,
SCNBorderMode,
SCNRangeCheck,
SCNColour,
SCNFlashing : Boolean;
SCNXPos , SCNYPos ,
SCNXStart , SCNXEnd , SCNYStart , SCNYEnd : byte;
SCNStartLine,
SCNEndLine : byte;
ScnScreen : Array[ 1..25 , 1..80 ] of Char Absolute $F000;
SCNColRam : Array[ 1..25 , 1..80 ] of char absolute ColSt;
SCNFirstWindow : SCNNextWindowPtr;
Procedure SetWindowColours( BCol , FCol : byte );Forward;
Procedure SetUpCols(BCol , FCol , X1 , y1 , X2 , y2: integer);Forward;
Function SCNReadPort( PortNo : byte ) : byte;Forward;
Procedure SCNSetPort( PortNo , Value : Byte );Forward;
Procedure SCNInitSizes;Forward;
Procedure TurnOnCurs;Forward;
Procedure TurnOffCurs;Forward;
Function ActXStart : byte;Forward;
Function ActXEnd : byte;Forward;
Function ActYStart : byte;Forward;
Function ActYEnd : byte;Forward;
Function RXPos : byte ;
Begin
RXPos := Pred( SCNXPos + SCNXStart );
End;
Function RYPos : Byte;
Begin
RYPos := Pred( SCNYPos + SCNYStart );
End;
Procedure PutCurs( X , Y : byte );Forward;
Procedure ScreenInit;Forward;
Procedure LowVideo;
Begin
SCNInverse := True;
End;
Procedure NormVideo;
Begin
SCNInverse := False;
End;
Procedure SetBorderMode;
Begin
SCNBorderMode := True;
End;
Procedure ResetBorderMode;
Begin
SCNBorderMode := False;
End;
Procedure ClearScreen;Forward;
Procedure ClearEOL;Forward;
Procedure InsertLine;Forward;
Procedure DeleteLine;Forward;
Procedure InsertChar;Forward;
Procedure DeleteChar;Forward;
Procedure DoWrite( Str : String80 );Forward;
Procedure DoWriteln( Str : String80 );Forward;
Procedure NMDoWrite( X,Y : byte ; Str : String80 );Forward;
Procedure RNMDoWrite( X,Y : byte ; Str : String80 );Forward;
Procedure CentreText( Str : String80 ; Y : Byte );Forward;
Procedure SetFlash;Forward;
Procedure SetBlock;Forward;
Procedure SetSize( TopLine , BotLine : byte );Forward;
Function CreateWindow( x1 , y1 , x2 , y2 : byte ): byte;Forward;
Function RestoreWindow : byte;Forward;
Procedure RestoreAll;
Begin
While RestoreWindow <> 0 do;
End;
Procedure DrawBorder;Forward;