home *** CD-ROM | disk | FTP | other *** search
- {------------------------------------------------------------------------}
- { Areas for internal use Begin Here }
- {------------------------------------------------------------------------}
- { These Constants and Variables are reserved for the use of the }
- { screen routines. ONLY REFERENCE THESE ITEMS if you know what you }
- { are doing. }
- {------------------------------------------------------------------------}
-
-
- Const
- Color_Screen_Address = $B800; { Address of color screen }
- Mono_Screen_Address = $B000; { Address of mono screen }
- Screen_Length = 2000; { 80 x 25 = screen area length }
- Screen_Line_Min = 1; { screen line lower limit }
- Screen_Line_Max = 25; { screen line upper limit }
- Screen_Pos_Min = 1; { screen position lower limit }
- Screen_Pos_Max = 80; { screen position upper limit }
- Open_Min = 0; { lower bound for the window array }
- {------------------------------------------------------------------------}
-
- {------------------------------------------------------------------------}
- { Begin Screen Definition }
- {------------------------------------------------------------------------}
-
- Type
- Screen_Char = record
- Character : Char;
- Attribute : Byte;
- end;
- Screen_Type = Array [ Screen_Line_Min..Screen_Line_Max,
- Screen_Pos_Min..Screen_Pos_Max ]
- Of Screen_Char;
- Screen_Ptr = ^Screen_Image_Type;
- Screen_Image_Type = record
- Screen_Image: Screen_Type;
- end;
- {------------------------------------------------------------------------}
-
-
- {------------------------------------------------------------------------}
- { Variable Pointer to Screen Display RAM }
- {------------------------------------------------------------------------}
- Var
- Actual_Screen : Screen_Ptr;
- {------------------------------------------------------------------------}
-
-
- {------------------------------------------------------------------------}
- { this procedure disables the screen during direct screen update }
- { and will work for both Mono and C/G monitors. }
- {------------------------------------------------------------------------}
- procedure Disable_Display;
- begin { Disable_Display }
- inline
- ($55/
- $8B/$EC/
- $06/$BB/$B0/$00/
- $2B/$C9/
- $FC/
- $8E/$C1/
- $26/$8B/$3E/$4E/$04/
- $B4/$19/
- $26/$8A/$16/$49/$04/
- $80/$EA/$07/
- $74/$1B/
- $B7/$B8/
- $80/$C2/$03/
- $78/$02/
- $B4/$C8/
- $B9/$DA/$03/
- $EC/
- $A8/$08/
- $74/$FB/
- $BA/$D8/$03/
- $26/$A0/$65/$04/
- $24/$F7/
- $EE/
- $07/
- $5D);
- end; { Disable_Display }
-
-
- {------------------------------------------------------------------------}
- { this procedure reenables the screen during direct screen update }
- { and will work for both Mono and C/G monitors. }
- {------------------------------------------------------------------------}
- procedure Enable_Display;
- begin { Enable_Display }
- inline
- ($55/
- $8B/$EC/
- $06/
- $BB/$B0/$00/
- $2B/$C9/
- $FC/
- $8E/$C1/
- $26/$8B/$3E/$4E/$04/
- $B4/$19/
- $26/$8A/$16/$49/$04/
- $80/$EA/$07/
- $74/$1B/
- $B7/$B8/
- $80/$C2/$03/
- $78/$02/
- $B4/$C8/
- $B9/$DA/$03/
- $EC/
- $A8/$08/
- $74/$FB/
- $BA/$D8/$03/
- $26/$A0/$65/$04/
- $0C/$08/
- $EE/
- $07/
- $5D);
- end; { Enable_Display }
-
-
- {.page}
- { if the Color Screen is in use, this returns true else false. }
- function Color_Screen_Active : Boolean;
- Type
- IntrRegs = record
- ax, bx, cx, dx, bp, si, di, ds, es, flags : integer
- end;
- Var
- Regs : IntrRegs;
- begin { Color_Screen_Active }
- Regs.Ax := 15 Shl 8;
- Intr( $10 , Regs );
- Color_Screen_Active := ( Regs.Ax And $FF ) <> 7;
- end; { Color_Screen_Active }
-
-
- procedure Set_Screen_Address( Var Actual_Screen : Screen_Ptr );
- begin { Set_Screen_Address }
- if Color_Screen_Active then
- Actual_Screen := Ptr( Color_Screen_Address , 0 )
- else
- Actual_Screen := Ptr( Mono_Screen_Address , 0 );
- end; { Set_Screen_Address }
-
-
-
-
-
-
-
-
-
-