home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-04-14 | 43.5 KB | 2,097 lines |
- {
- ════════════════════════════════════════════════════════════════════════════
-
- Visionix CRT API to VOut/VIn Unit (VCRT)
- Copyright 1991,92,93 Visionix
- ALL RIGHTS RESERVED
-
- ────────────────────────────────────────────────────────────────────────────
-
- Revision history in reverse chronological order:
-
- Initials Date Comment
- ──────── ──────── ────────────────────────────────────────────────────────
-
- mep 03/26/93 Added usage of VBios.
-
- lpg 03/15/93 Added Source Documentation
-
- mep 02/11/93 Cleaned up code for beta release
-
- jrt 02/08/93 Sync with beta 0.12 release
-
- jrt 02/08/93 Added support to automatically determine the
- screen size by supporting the new VOutGetScreenSize
- function.
-
- jrt 12/07/92 Sync with beta 0.11 release
-
- jrt 12/07/92 Fixed bug in TextBackGround that would allow
- "high-intensity" background colors to be set,
- which in fact would just set the blink attribute on.
- Only bits 0-1-2 of background color are valid now.
-
- jrt 12/01/92 Yanked VGACharWidthSet, moved it into VFont.
-
- jrt 12/01/92 Yanked console info functions, moved them to
- Vequip. Was this a good decision? Who knows.
-
- jrt 11/21/92 Sync with beta 0.08
-
- jrt 10/26/92 Fixed two bugs: one fixed "mangling" of the attr
- setting be making textattr := knowntextattr in the
- syncattr routine. The other fixed the improper
- scrolling of windows when a writeln occured at the
- bottom of the window.
-
- jrt 09/01/92 First logged revision.
-
- --------------------------------------------------------------------------
-
- Notes:
-
- yank VGAcharwidthset, it is now in VFont.
-
- yank console info obtaining functions, they are now in VEquip.
- As a result, figure out what to do with VCRTGetCaps.
-
- ════════════════════════════════════════════════════════════════════════════
- }
-
- Unit VCRT;
-
-
- Uses
-
- VTypes,
- VIn,
- VOut,
- VBios,
- DOS;
-
- {────────────────────────────────────────────────────────────────────────────}
-
- Const
-
- {-------------}
- { Video Modes }
- {-------------}
-
- BW40 = 0;
- CO40 = 1;
- C40 = CO40;
- BW80 = 2;
- CO80 = 3;
- C80 = CO80;
- Mono = 7;
- Font8x8 = 256;
-
- {--------}
- { Colors }
- {--------}
-
- Black = 0;
- Blue = 1;
- Green = 2;
- Cyan = 3;
- Red = 4;
- Magenta = 5;
- Brown = 6;
- LightGray = 7;
- DarkGray = 8;
- LightBlue = 9;
- LightGreen = 10;
- LightCyan = 11;
- LightRed = 12;
- LightMagenta = 13;
- Yellow = 14;
- White = 15;
- Blink = 128;
-
- cCardNone = $00;
- cCardVGA = $01;
- cCardEGA = $02;
- cCardMDA = $03;
- cCardHGC = $04;
- cCardCGA = $05;
-
- cMonitorNone = $00;
- cMonitorMono = $01;
- cMonitorColor = $02;
- cMonitorEGAHiRes = $03;
- cMonitorAnaMono = $04;
- cMonitorAnaColor = $05;
-
- MonoMap : Array[0..255] of BYTE= (
-
- {00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F}
- {00} $00, $01, $07, $07, $07, $07, $07, $07, $07, $07, $07, $07, $07, $07, $0F, $0F,
- {10} $70, $01, $07, $07, $07, $07, $07, $07, $07, $07, $07, $07, $07, $07, $0F, $0F,
- {20} $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70,
- {30} $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70,
- {40} $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70,
- {50} $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70,
- {60} $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70,
- {70} $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70, $70,
- {80} $80, $81, $87, $87, $87, $87, $87, $87, $87, $87, $87, $87, $87, $87, $8F, $8F,
- {90} $F0, $81, $87, $87, $87, $87, $87, $87, $87, $87, $87, $87, $87, $87, $8F, $8F,
- {A0} $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0,
- {B0} $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0,
- {C0} $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0,
- {D0} $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0,
- {E0} $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0,
- {F0} $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0
- );
-
- Type
-
- TCRTSystem = RECORD
-
- Card : BYTE;
- Monitor : BYTE;
-
- END;
-
- PCRTSystem = ^TCRTSystem;
-
- {----}
-
- TCRTCaps = RECORD
-
- actdisplay : byte;
- altdisplay : byte;
-
- CRTSystem : Array[1..2] of TCRTSystem;
-
- CurMode : BYTE;
-
- END;
-
- PCRTCaps = ^TCRTCaps;
-
- {────────────────────────────────────────────────────────────────────────────}
-
- Procedure CRTGetCaps( Caps : PCRTCaps );
-
- Function CRTIsVGA : BOOLEAN;
-
- Function CRTIsMono : BOOLEAN;
-
- Procedure CRTVGASetCharWidth( CWid : BYTE );
-
- Procedure CRTOutDriverProc( ODP : POutDriverPacket );
-
- Procedure CRTInDriverProc( IDP : PInDriverPacket );
-
- Procedure AssignCRT( Var F : TEXT );
-
- Procedure ClrEOL;
-
- Procedure ClrScr;
-
- Procedure Delay( MS : WORD );
-
- Procedure DelLine;
-
- Procedure GotoXY( X : BYTE;
- Y : BYTE );
-
- Procedure HighVideo;
-
- Procedure InsLine;
-
- Function KeyPressed : BOOLEAN;
-
- Procedure LowVideo;
-
- Procedure NormVideo;
-
- Procedure NoSound;
-
- Function ReadKey : CHAR;
-
- Procedure Sound( HZ : WORD );
-
- Procedure TextBackGround( Color : BYTE );
-
- Procedure TextColor( Color : BYTE );
-
- Procedure TextMode( Mode : INTEGER );
-
- Function WhereX : BYTE;
-
- Function WhereY : BYTE;
-
- Procedure Window( X1 : BYTE;
- Y1 : BYTE;
- X2 : BYTE;
- Y2 : BYTE );
-
-
- {---------------------}
- { VCRT Sync Functions }
- {---------------------}
-
- Procedure SyncAttr;
-
- Procedure SyncWind;
-
-
- {-------------------------}
- { VCRT Enhanced functions }
- {-------------------------}
-
- Procedure WindowScreen;
-
-
- { Change text attribute }
-
- Function TextColorGet : BYTE;
-
- Function TextBackgroundGet : BYTE;
-
- Procedure TextAttrSet( Attr : BYTE );
-
-
- { cursor movement commands }
-
- Procedure CursorUp( Count : BYTE );
-
- Procedure CursorDown( Count : BYTE );
-
- Procedure CursorLeft( Count : BYTE );
-
- Procedure CursorRight( Count : BYTE );
-
-
- { screen store read functions }
-
- Function CharRead( X1 : BYTE;
- Y1 : BYTE ) : CHAR;
-
- Function AttrRead( X1 : BYTE;
- Y1 : BYTE ) : BYTE;
-
- Procedure AttrWrite( X1 : BYTE;
- Y1 : BYTE;
- Attr : BYTE );
-
-
- { Region Functions }
-
- Function RegionMemQuery( X1 : BYTE;
- Y1 : BYTE;
- X2 : BYTE;
- Y2 : BYTE ) : WORD;
-
- Procedure RegionScrollUp( X1 : BYTE;
- Y1 : BYTE;
- X2 : BYTE;
- Y2 : BYTE;
- Count : BYTE );
-
- Procedure RegionScrollDown( X1 : BYTE;
- Y1 : BYTE;
- X2 : BYTE;
- Y2 : BYTE;
- Count : BYTE );
-
- Procedure RegionRead( X1 : BYTE;
- Y1 : BYTE;
- X2 : BYTE;
- Y2 : BYTE;
- Region : Pointer );
-
- Procedure RegionWrite( X1 : BYTE;
- Y1 : BYTE;
- X2 : BYTE;
- Y2 : BYTE;
- Region : Pointer );
-
- Procedure RegionCopy( X1 : BYTE;
- Y1 : BYTE;
- X2 : BYTE;
- Y2 : BYTE;
- ToX1 : BYTE;
- ToY1 : BYTE );
-
- Procedure RegionFill( X1 : BYTE;
- Y1 : BYTE;
- X2 : BYTE;
- Y2 : BYTE;
- Ch : CHAR;
- F : BYTE;
- B : BYTE );
-
- Procedure RegionFillAttr( X1 : BYTE;
- Y1 : BYTE;
- X2 : BYTE;
- Y2 : BYTE;
- F : BYTE;
- B : BYTE );
-
- Procedure RegionFillChar( X1 : BYTE;
- Y1 : BYTE;
- X2 : BYTE;
- Y2 : BYTE;
- Ch : CHAR );
-
-
- { RegionFillString??? }
-
- Procedure RepeatChar( Ch : CHAR;
- Num : WORD );
-
- Procedure RepeatCharAt( X1 : BYTE;
- Y1 : BYTE;
- F : BYTE;
- B : BYTE;
- Ch : CHAR;
- Num : WORD );
-
- Procedure WriteCharAt( X1 : BYTE;
- Y1 : BYTE;
- F : BYTE;
- B : BYTE;
- Ch : CHAR );
-
- Procedure WriteStringAt( X1 : BYTE;
- Y1 : BYTE;
- F : BYTE;
- B : BYTE;
- S : STRING );
-
-
- Var
-
- CheckBreak : BOOLEAN; { standard CRT variables ... }
- CheckEOF : BOOLEAN;
- DirectVideo : BOOLEAN;
- CheckSnow : BOOLEAN;
- LastMode : WORD;
- TextAttr : BYTE;
-
- Font8x8Selected : BOOLEAN;
-
- WindMin : WORD;
- WindMax : WORD;
-
- WindCenterCol : BYTE; { center column on the primary display }
- WindCenterRow : BYTE; { center row on the primary display }
-
- ScreenRows : BYTE; { number of rows on the primary display }
- ScreenCols : BYTE; { number of cols on the primary display }
-
- KnownTextAttr : BYTE; { used to do SYNC operations }
- KnownWindMin : WORD; { used to do SYNC operations }
- KnownWindMax : WORD; { used to do SYNC oeprations }
-
- CrtODNErr : WORD; { used by vin/vout }
-
- CrtColorMap : Array[0..255] of BYTE; { active TEXTATTR color map }
-
- {────────────────────────────────────────────────────────────────────────────}
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure CRTGetCardAndMonInfo( C : PCRTCaps );
-
- [PARAMETERS]
-
- C Pointer to Video Capacity Structure
-
- [RETURNS]
-
- (Function : None)
- (Ptr : [C] Pointer to Video Capacity Structure)
-
- [DESCRIPTION]
-
- Determines the Video Capacity and load the data into the structure
- pointed to.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure CRTGetCaps( Caps : PCRTCaps );
-
- [PARAMETERS]
-
- Caps Pointer to Video Capacity Structure
-
- [RETURNS]
-
- (Function : None)
- (Ptr : [Caps] Pointer to Video Capacity Structure)
-
- [DESCRIPTION]
-
- Determines the Video Capacity and load the data into the structure
- pointed to.
-
- Gets the CRT units capabilities in the current environment.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Function CRTIsVGA : BOOLEAN;
-
- [PARAMETERS]
-
- (None)
-
- [RETURNS]
-
- Whether the Video is VGA
-
- [DESCRIPTION]
-
- Tests the Current Video Card and determines whether the Video is
- VGA.
-
- Returns TRUE if the primary display console is a VGA display.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Function CRTIsMono : BOOLEAN;
-
- [PARAMETERS]
-
- (None)
-
- [RETURNS]
-
- Whether the Video is MonoChrome or not.
-
- [DESCRIPTION]
-
- Tests the Current Video Card and determines whether the Video is
- MonoChrome or Color.
-
- Returns TRUE if the primary display console is a MONOCHROM display.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure CRTOutDriverProc( ODP : POutDriverPacket );
-
- [PARAMETERS]
-
- ODP Pointer to Output Driver Packet
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- This is THE CRT Output-Driver Procedure. It handles all the Output
- CRT Related Functions.
-
- This is the out driver procedure which is placed on the CRT out-channel.
- It takes VOUT driver requests and performs them on the active primary
- display.
-
- See VOUT for more information
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure RegionRead( X1,Y1,X2,Y2 : WORD;
- Region : PScreenStore );
-
- [PARAMETERS]
-
- X1 Source Left Screen Region Coordinate
- Y1 Source Top Screen Region Coordinate
- X2 Source Right Region Screen Region Coordinate
- Y2 Source Bottom Screen Region Coordinate
- Region Pointer to Region Read Data
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Reads a region from the display console to a region store buffer.
- "Region" should be a pointer to a buffer which is big enough to hold
- the region data. Use RegionMemQuery to determine how many bytes must
- be allocated.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure RegionWrite( X1,Y1,X2,Y2 : WORD;
- Region : PScreenStore );
-
- [PARAMETERS]
-
- X1 Left Screen Region Coordinate
- Y1 Top Screen Region Coordinate
- X2 Right Region Screen Region Coordinate
- Y2 Bottom Screen Region Coordinate
- Region Pointer to Region Write Data
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure CRTVGASetCharWidth( CWid : BYTE );
-
- [PARAMETERS]
-
- CWid Desired New Character Width
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Sets the VGA Character Width to a given pixel Width.
-
- Sets the text mode character width of a vga display. normally,
- a character in vga mode is 9 pixels wide. However, the font
- tables only have 8 chars per pixel. This is a problem when
- characters need to "touch" each other.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure CRTInDriverProc( IDP : PInDriverPacket );
-
- [PARAMETERS]
-
- IDP Pointer To In-Data Driver Packet
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- This is THE Input CRT Driver Procedure. It handles all the Input
- CRT Related Functions.
-
- This is the in driver procedure which is placed on the
- CRT in-channel
- it takes VIN driver requests and performs them on the
- keyboard
-
- See VIN for more information
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure SyncAttr;
-
- [PARAMETERS]
-
- (None)
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Syncs the CRT out-channel with the current TextAttr setting should only
- need to be done when it is beleived that a driver on the CRT out-channel
- is "lost", and this should only happen when serial-port out-channel
- drivers are put on the crt out-channel
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure SyncWind;
-
- [PARAMETERS]
-
- (None)
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Syncs the CRT out-channel with the current window setting should only
- need to be done when it is beleived that a driver on the CRT out-channel
- is "lost", and this should only happen when serial-port out-channel
- drivers are put on the crt out-channel
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Function CRTTextNullProc( Var F : TextRec ) : INTEGER; Far;
-
- [PARAMETERS]
-
- F VAR Text File Record (?)
-
- [RETURNS]
-
- [DESCRIPTION]
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Function CRTTextOutProc( Var F : TextRec ) : INTEGER; Far;
-
- [PARAMETERS]
-
- F VAR ?
-
- [RETURNS]
-
- [DESCRIPTION]
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Function CRTTextInProc( Var F : TextRec ) : INTEGER; Far;
-
- [PARAMETERS]
-
- F VAR Handle to File Text Record
-
- [RETURNS]
-
- [DESCRIPTION]
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Function CRTTextOpenProc( Var F : TextRec ) : INTEGER; Far;
-
- [PARAMETERS]
-
- F VAR ?
-
- [RETURNS]
-
- [DESCRIPTION]
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure AssignCRT( Var F : Text );
-
- [PARAMETERS]
-
- F VAR Output File Handle (The Screen)
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Assigns a text-file to the CRT.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure ClrEOL;
-
- [PARAMETERS]
-
- (None)
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Clears a Line using the Current Color Attributes from the current
- Cursor Position to the End of the Screen. If we are within a Window,
- then the action is restricted to within this Window.
-
- Clears to the end of the line from the current cursor position.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure ClrScr;
-
- [PARAMETERS]
-
- (None)
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Clears the Screen by filling it with Spaces using the current color
- attributes. If we are within a Window then the Clear Screen is
- restricted to just within this Window.
-
- Clears the screen or the active window.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure DelayOneMS;
-
- [PARAMETERS]
-
- (None)
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Delays activity for a Single Millisecond, then resumes.
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure Delay( MS : WORD );
-
- [PARAMETERS]
-
- MS Number of Milliseconds Delay
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Delays activity for a given number of Milliseconds, then Resumes.
-
- Delays for the specified number of milliseconds.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure FindDelay;
-
- [PARAMETERS]
-
- (None)
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Determines the proper Time Delay Rate for this computer based upon how
- long it takes to execute a given delay.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure DelLine;
-
- [PARAMETERS]
-
- (None)
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Deletes a Line at the Current Cursor Position. If we are in a Window,
- then the Deleted Line is just within this window.
-
- Deletes the line that the cursor is currently on. All lines
- in the active window below the cursor will scroll up.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure GotoXY( X : BYTE;
- Y : BYTE );
-
- [PARAMETERS]
-
- X X Screen Coordinate
- Y Y Screen Coordinate
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Moves the Cursor to the provided Screen Coordinates (Relative to any
- active Window.
-
- Hey, look. Check out the normal CRT unit info for the rest
- of these. We'll fill them in soon.
- We'll continue the comments with the other functions below
- that are extensions to the normal CRT API.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure HighVideo;
-
- [PARAMETERS]
-
- (None)
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Sets the Vidio Intensity output to it's Highest Level.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure InsLine;
-
- [PARAMETERS]
-
- (None)
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Inserts a Blank Line of the current Color Attributes at the Current
- Cursor Position. It we are in a Window, then the inserted Line is
- just within this Window.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Function KeyPressed : BOOLEAN;
-
- [PARAMETERS]
-
- (None)
-
- [RETURNS]
-
- Whether the Keyboard has been press since the last it was Read
-
- [DESCRIPTION]
-
- Determines if a Character is in the Keyboard Buffer and if so,
- reports that ther is (TRUE). If there isn't then the report
- isn't (FALSE).
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure LowVideo;
-
- [PARAMETERS]
-
- (None)
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Sets the Vidio Intensity output to it's Lowest Level.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure NormVideo;
-
- [PARAMETERS]
-
- (None)
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Resets the Video Intensity output to the Normal Level.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure NoSound;
-
- [PARAMETERS]
-
- (None)
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Turns off any audio output from the Speaker.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Function ReadKey : CHAR;
-
- [PARAMETERS]
-
- (None)
-
- [RETURNS]
-
- 1st available Character Read from the Keyboard
-
- [DESCRIPTION]
-
- Reads a Key from the keyboard and returns the 1st Character Read.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure Sound( Hz : WORD );
-
- [PARAMETERS]
-
- Hz Desired Audio Frequency in Hertz
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Outputs a sound thru the speaker at the provided Frequency.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure TextBackGround( Color : BYTE );
-
- [PARAMETERS]
-
- Color New Text Background Color
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Sets the New Active Text Background Color
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure TextColor( Color : BYTE );
-
- [PARAMETERS]
-
- Color New Text Foreground Color
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Sets the New Active Text Foreground Color
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure TextMode( Mode : INTEGER );
-
- [PARAMETERS]
-
- Mode Desired CRT Vidio Mode
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Function WhereX : BYTE;
-
- [PARAMETERS]
-
- (None)
-
- [RETURNS]
-
- The Current X Cursor Position
-
- [DESCRIPTION]
-
- Determines and returns the Current X Cursor Screen Coordinates.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Function WhereY : BYTE;
-
- [PARAMETERS]
-
- (None)
-
- [RETURNS]
-
- The Current Y Cursor Position
-
- [DESCRIPTION]
-
- Determines and returns the Current Y Cursor Screen Coordinates.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure Window( X1 : BYTE;
- Y1 : BYTE;
- X2 : BYTE;
- Y2 : BYTE );
-
- [PARAMETERS]
-
- X1 Left Window Coordinate
- Y1 Top Window Coordinate
- X2 Right Window Coordinate
- Y2 Bottom Window Coordinate
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Establishes a Window with the provided Coordinates.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure WindowScreen;
-
- [PARAMETERS]
-
- (None)
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Restores the Window Size as that of the Entire Screen.
-
- Sets the active window size to be the entire screen.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Function TextColorGet : BYTE;
-
- [PARAMETERS]
-
- (None)
-
- [RETURNS]
-
- The Current Foreground Attribute Color
-
- [DESCRIPTION]
-
- Returns the Current Foreground Color from the CRT Attribute Value.
-
- Gets the current text color. IT IS PREFERED TO USE THIS
- INSTEAD OF JUST LOOKING AT THE TEXTATTR VARIABLE.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Function TextBackgroundGet : BYTE;
-
- [PARAMETERS]
-
- (None)
-
- [RETURNS]
-
- The Current Background Attribute Color
-
- [DESCRIPTION]
-
- Returns the Current Background Color from the CRT Attribute
- Value.
-
- Gets the current text background. see note on TextColorGet.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure TextAttrSet( Attr : BYTE );
-
- [PARAMETERS]
-
- Attr New Attribute
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Sets the Current CRT Attribute to the Attribute Provided.
-
- Sets the current TextAttr. IT IS PREFERED THAT ONE USE THIS
- INSTEAD OF DIRECTLY CHANGING THE TEXTATTR VARIABLE.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure CursorUp( Count : BYTE );
-
- [PARAMETERS]
-
- Count Number of Lines to Move Up
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Moves the Cursor Up by a given number of Lines.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure CursorDown( Count : BYTE );
-
- [PARAMETERS]
-
- Count Number of Lines to Move Down
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Moves the Cursor Down by a given number of Lines.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure CursorLeft( Count : BYTE );
-
- [PARAMETERS]
-
- Count Number of Places to Space Left
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Moves the Cursor Left by a given number of Places.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure CursorRight( Count : BYTE );
-
- [PARAMETERS]
-
- Count Number of Places to Spaces Right
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Moves the Cursor Right by a given number of Places.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Function CharRead( X1 : BYTE;
- Y1 : BYTE ) : CHAR;
-
- [PARAMETERS]
-
- X1 X Screen Coordinate
- Y1 Y Screen Coordinate
-
- [RETURNS]
-
- Character Read from the Screen Coordinates
-
- [DESCRIPTION]
-
- Reads a Character from the Screen at the provided Coordinates.
-
- Reads a character from the display console. returns whatever
- character is on the screen at the specified location.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Function AttrRead( X1 : BYTE;
- Y1 : BYTE ) : BYTE;
-
- [PARAMETERS]
-
- X1 X Screen Coordinate
- Y1 Y Screen Coordinate
-
- [RETURNS]
-
- Attribute Read from the Screen Coordinates
-
- [DESCRIPTION]
-
- Reads an Attribute from the Screen at the provided Coordinates.
-
- Reads a attribute from the display console. returns whatever
- attribute is on the screen at the specified location.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure AttrWrite( X1 : BYTE;
- Y1 : BYTE;
- Attr : BYTE );
-
- [PARAMETERS]
-
- X1 X Screen Coordinate
- Y1 Y Screen Coordinate
- Attr Attribute to Write
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Writes a given Attribute at a provided Screen Coordinate.
-
- Writes an attribute to the display console.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Function RegionMemQuery( X1 : BYTE;
- Y1 : BYTE;
- X2 : BYTE;
- Y2 : BYTE ) : WORD;
-
- [PARAMETERS]
-
- X1 Left Region Coordinate
- Y1 Top Region Coordinate
- X2 Right Region Coordinate
- Y2 Bottom Region Coordinate
-
- [RETURNS]
-
- Number of Bytes of Memory required to Store Region
-
- [DESCRIPTION]
-
- Calculates and returns the number of bytes required to store a
- given Region.
-
- Returns how many bytes of memory need to be allocated to store
- the specified region of the display console.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure RegionScrollUp( X1 : BYTE;
- Y1 : BYTE;
- X2 : BYTE;
- Y2 : BYTE;
- Count : BYTE );
-
- [PARAMETERS]
-
- X1 Left Screen Region Coordinate
- Y1 Top Screen Region Coordinate
- X2 Right Screen Region Coordinate
- Y2 Bottom Screen Region Coordinate
- Count Number of Lines to Scroll
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Scrolls the Designated Screen Region Up by a given number of Lines.
-
- Returns how many bytes of memory need to be allocated to store
- the specified region of the display console.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure RegionScrollDown( X1 : BYTE;
- Y1 : BYTE;
- X2 : BYTE;
- Y2 : BYTE;
- Count : BYTE );
-
- [PARAMETERS]
-
- X1 Left Screen Region Coordinate
- Y1 Top Screen Region Coordinate
- X2 Right Screen Region Coordinate
- Y2 Bottom Screen Region Coordinate
- Count Number of Lines to Scroll
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Scrolls the Designated Screen Region Down by a given number of Lines.
-
- Scrolls the specified region down by "count" number of lines.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure RegionRead( X1 : BYTE;
- Y1 : BYTE;
- X2 : BYTE;
- Y2 : BYTE;
- Region : Pointer );
-
- [PARAMETERS]
-
- X1 Source Left Screen Region Coordinate
- Y1 Source Top Screen Region Coordinate
- X2 Source Right Region Screen Region Coordinate
- Y2 Source Bottom Screen Region Coordinate
- Region Pointer to Region Data Storage Area
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure RegionWrite( X1 : BYTE;
- Y1 : BYTE;
- X2 : BYTE;
- Y2 : BYTE;
- Region : Pointer );
-
- [PARAMETERS]
-
- X1 Destination Left Screen Region Coordinate
- Y1 Destination Top Screen Region Coordinate
- X2 Destination Right Region Screen Region Coordinate
- Y2 Destination Bottom Screen Region Coordinate
- Region Pointer to Region Data
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure RegionCopy( X1 : BYTE;
- Y1 : BYTE
- X2 : BYTE;
- Y2 : BYTE;
- ToX1 : BYTE;
- ToY1 : BYTE );
-
- [PARAMETERS]
-
- X1 Source Left Screen Region Coordinate
- Y1 Source Top Screen Region Coordinate
- X2 Source Right Region Screen Region Coordinate
- Y2 Source Bottom Screen Region Coordinate
- ToX1 Destination Left Screen Region Coordinate
- ToY1 Destination Top Screen Region Coordinate
-
- [RETURNS]
-
- [DESCRIPTION]
-
- Writes a region store buffer to the specified screen locations.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure RegionFill( X1 : BYTE;
- Y1 : BYTE;
- X2 : BYTE;
- Y2 : BYTE;
- Ch : CHAR;
- F : BYTE;
- B : BYTE );
-
- [PARAMETERS]
-
- X1 Left Screen Region Coordinate
- Y1 Top Screen Region Coordinate
- X2 Right Region Screen Region Coordinate
- Y2 Bottom Screen Region Coordinate
- Ch Character Pattern to Fill Region With
- F Foreground Color to Fill Region With
- B Background Color to Fill Region With
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Fills the specified region with the specified "Ch" aracter,
- "F"oreground, and "B"ackground.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure RegionFillAttr( X1 : BYTE;
- Y1 : BYTE;
- X2 : BYTE;
- Y2 : BYTE;
- F : BYTE;
- B : BYTE );
-
- [PARAMETERS]
-
- X1 Left Screen Region Coordinate
- Y1 Top Screen Region Coordinate
- X2 Right Region Screen Region Coordinate
- Y2 Bottom Screen Region Coordinate
- F Foreground Color to Fill Region With
- B Background Color to Fill Region With
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Fills the specified region with the specified "F"oregound
- and "B"ackground colors.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure RegionFillChar( X1 : BYTE;
- Y1 : BYTE;
- X2 : BYTE;
- Y2 : BYTE;
- Ch : CHAR );
-
- [PARAMETERS]
-
- X1 Left Screen Region Coordinate
- Y1 Top Screen Region Coordinate
- X2 Right Region Screen Region Coordinate
- Y2 Bottom Screen Region Coordinate
- Ch Character Pattern to Fill Region with
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Fills the specified region with the specified character.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure RepeatChar( Ch : CHAR;
- Num : WORD );
-
- [PARAMETERS]
-
- Ch Character to Write
- Num Number of times to Write Character
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Writes a Character a repeated number of times starting at the current
- cursor position using the current colors.
-
- Repeats a "Ch"aracter a "Num"ber of times at the current Cursor
- location in the current colors.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure RepeatCharAt( X1 : BYTE;
- Y1 : BYTE;
- F : BYTE;
- B : BYTE;
- Ch : CHAR;
- Num : WORD );
-
- [PARAMETERS]
-
- X1 X Screen Coordinate
- Y1 Y Screen Coordinate
- F Foreground Color
- B Background Color
- Ch Character to Write
- Num Number of Times to Write Character
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Writes a Character a repeated number of times starting at a given Coordinate
- with the provided Colors.
-
- Repeats a character the specified number of times at the specified
- X/Y locations and with the specified colors.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure WriteCharAt( X1 : BYTE;
- Y1 : BYTE;
- F : BYTE;
- B : BYTE;
- Ch : CHAR );
-
- [PARAMETERS]
-
- X1 X Screen Coordinate
- Y1 Y Screen Coordinate
- F Foreground Color
- B Background Color
- Ch Character to Write
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Writes a single Character at the given screen coordinates using a
- provided colors.
-
- Writes a specified "ch"aracter at a specified X/Y location in the
- specified colors.
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure WriteStringAt( X1 : BYTE;
- Y1 : BYTE;
- F : BYTE;
- B : BYTE;
- S : STRING );
-
- [PARAMETERS]
-
- X1 X Screen Coordinate
- Y1 Y Screen Coordinate
- F Foreground Color
- B Background Color
- S String to Write
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- Writes a String at the given coordinates using the provided colors.
-
- Writes a specified "S"tring at a specified X/Y location in the
- specified colors. Same as a "FastWrite".
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-
- ──────────────────────────────────────────────────────────────────────────────
-
-
- [FUNCTION]
-
- Procedure CRTLoadDefColorMap;
-
- [PARAMETERS]
-
- (None)
-
- [RETURNS]
-
- (None)
-
- [DESCRIPTION]
-
- [SEE-ALSO]
-
- [EXAMPLE]
-
-