home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-08-24 | 75.1 KB | 1,687 lines |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- QWIK SCREEN UTILITIES
- REFERENCE GUIDE
-
- Version 5.5
- March 4, 1989
-
-
- Copyright (C) 1988-1989 Eagle Performance Software
- All Rights Reserved.
-
-
-
- _______
- ____|__ | (tm)
- --| | |-------------------
- | ____|__ | Association of
- | | |_| Shareware
- |__| o | Professionals
- -----| | |---------------------
- |___|___| MEMBER
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
-
- T A B L E O F C O N T E N T S
-
- 1. INTRODUCTION . . . . . . . . . . . . . . . . . . . . . 4
- Purpose . . . . . . . . . . . . . . . . . . . . . . . 4
- Common Parameters . . . . . . . . . . . . . . . . . . 4
- Attributes . . . . . . . . . . . . . . . . . . . . . 5
-
- 2. PROCEDURES AND FUNCTIONS . . . . . . . . . . . . . . . 7
- EosC . . . . . . . . . . . . . . . . . . . . . . . . 7
- EosLn . . . . . . . . . . . . . . . . . . . . . . . . 7
- EosR . . . . . . . . . . . . . . . . . . . . . . . . 7
- EosToCursor . . . . . . . . . . . . . . . . . . . . . 7
- EosToRC . . . . . . . . . . . . . . . . . . . . . . . 7
- EosToRCrel . . . . . . . . . . . . . . . . . . . . . 8
- GetCursor . . . . . . . . . . . . . . . . . . . . . . 8
- GetSubModelID . . . . . . . . . . . . . . . . . . . . 8
- GotoEos . . . . . . . . . . . . . . . . . . . . . . . 8
- GotoRC. . . . . . . . . . . . . . . . . . . . . . . . 9
- ModCursor . . . . . . . . . . . . . . . . . . . . . . 9
- Qattr . . . . . . . . . . . . . . . . . . . . . . . . 9
- QattrC . . . . . . . . . . . . . . . . . . . . . . . 10
- QattrEos . . . . . . . . . . . . . . . . . . . . . . 10
- QEosLn . . . . . . . . . . . . . . . . . . . . . . . 10
- Qfill . . . . . . . . . . . . . . . . . . . . . . . . 11
- QfillC . . . . . . . . . . . . . . . . . . . . . . . 11
- QfillEos . . . . . . . . . . . . . . . . . . . . . . 11
- Qinit . . . . . . . . . . . . . . . . . . . . . . . . 12
- QreadAttr . . . . . . . . . . . . . . . . . . . . . . 12
- QreadChar . . . . . . . . . . . . . . . . . . . . . . 12
- QreadStr . . . . . . . . . . . . . . . . . . . . . . 12
- QscrollDown . . . . . . . . . . . . . . . . . . . . . 13
- QscrollUp . . . . . . . . . . . . . . . . . . . . . . 13
- QScrToVscr . . . . . . . . . . . . . . . . . . . . . 13
- QstoreToMem . . . . . . . . . . . . . . . . . . . . . 14
- QstoreToScr . . . . . . . . . . . . . . . . . . . . . 15
- QviewPage . . . . . . . . . . . . . . . . . . . . . . 16
- QVscrToScr . . . . . . . . . . . . . . . . . . . . . 16
- Qwrite . . . . . . . . . . . . . . . . . . . . . . . 17
- QwriteA . . . . . . . . . . . . . . . . . . . . . . . 17
- QwriteC . . . . . . . . . . . . . . . . . . . . . . . 18
- QwriteEos . . . . . . . . . . . . . . . . . . . . . . 18
- QwriteEosA . . . . . . . . . . . . . . . . . . . . . 19
- QwritePage . . . . . . . . . . . . . . . . . . . . . 19
- SetCursor . . . . . . . . . . . . . . . . . . . . . . 19
- SetMultiTask . . . . . . . . . . . . . . . . . . . . 20
- StrL . . . . . . . . . . . . . . . . . . . . . . . . 21
- StrLF . . . . . . . . . . . . . . . . . . . . . . . . 21
- StrR . . . . . . . . . . . . . . . . . . . . . . . . 21
- StrRF . . . . . . . . . . . . . . . . . . . . . . . . 21
- StrRFD . . . . . . . . . . . . . . . . . . . . . . . 22
- WhereC . . . . . . . . . . . . . . . . . . . . . . . 22
- WhereR . . . . . . . . . . . . . . . . . . . . . . . 22
-
-
-
-
- 2
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
- 3. VARIABLES . . . . . . . . . . . . . . . . . . . . . . . 23
- System Hardware . . . . . . . . . . . . . . . . . . . 23
- Video Hardware . . . . . . . . . . . . . . . . . . . 24
- Video Software . . . . . . . . . . . . . . . . . . . 26
- Video Cursor . . . . . . . . . . . . . . . . . . . . 28
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
- 1. I N T R O D U C T I O N
-
-
- PURPOSE
-
- This document is a QWIK technical reference manual describing each routine
- and variable in detail in a format similar to the TP manual. The routines
- are described in alphabetical order. Since this manual is on disk, you can
- find your interest easily with a search utility.
-
- Application - All QWIK procedures will perform in the following
- applications:
-
- . All video text modes - 0, 1, 2, 3 and 7.
- . Any column mode - 40, 80, or variable.
- . For IBM PC, XT, AT, PCjr, PC convertible, all PS/2 models, 3270 PC, and
- compatibles.
- . With MDA, CGA, EGA, MCGA, VGA, 8214/A, all Hercules video cards.
- . Perform routines in absolute coordinates rather than window-relative
- coordinates.
- . Capitalizes on the use of faster multi-tasking video buffers (MTVB).
-
- For window-relative writing routines, see WNDW55.ARC.
-
-
- COMMON PARAMETERS
-
- Common Parameters - Most procedures use the same parameters. Rather than
- repeating them for each routine, detailed descriptions for those parameters
- are listed below.
-
- Screen Coordinates - QWIK routines work in absolute coordinates to give you
- full control of the screen. The routines do not check for bounds on the
- screen, so be sure to stay in range. The upper left column on the screen
- is row 1, column 1, which is also called 1-based. The routines also wrap
- to the next line; they do not truncate at EOL. For example, Row:=1 and
- Col:=255 is equivalent to Row:=3 and Col:=15 on a screen with 80 columns.
- But this is not a recommended practice for variable screen widths.
-
- Row/Col - Row and Col were chosen in lieu of the X/Y scheme used in TP.
- Since QWIK is for only text modes, the screen is treated like a word
- processor with rows and columns. It is more intuitive to use the X/Y
- scheme in graphics and the Row/Col scheme for text.
-
- ColL/ColR - In the self-centering routines, the left and right columns are
- simply averaged. To center on the full width of an 80 column display, set
- ColL:=1 and ColR:=80. To center on a certain column number, set both
- values equal to that column number. Or, to center on any screen, set
- ColL:=1 and ColR:=CRTcols.
-
- Rows/Cols - Using Rows/Cols is much easier than Row2/Col2 to describe the
- height and width of a block such as:
-
- QstoreToMem (Row,Col,Rows,Cols,MyPtr^);
-
-
-
- Chapter 1, Introduction Page 4
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
- Should you decide to move a block, only Row and Col need to be changed, and
- therefore Rows and Cols don't need to be mentally recalculated and altered.
- Please keep Cols limited to one row. Zero values will simply exit the
- routine.
-
- aStr - One of the nice improvements since TP 4.0 is that the address of the
- string, aStr, is always passed onto to the stack no matter if it's a string
- value or a variable. So, internally, QWIK does not need to copy strings to
- the stack and thereby increasing speed. The Qwrite* procedures use this
- address even if hard-coded strings are passed as a parameter.
-
-
- ATTRIBUTES
-
- Attr - Use the convenient attribute constants for the foreground and
- background colors supplied in the unit rather than having to use TP
- functions or procedures to get a desired color, for example:
-
- Qwrite ( 1, 1,White+BlueBG,'My String');
-
- will write the text with white on blue attributes. Of course, you can
- still use Turbo's TextColor and TextBackground procedures, and then use
- TextAttr as a parameter. The foreground constants are duplicates of those
- in TP4:
-
- Black = $00; DarkGray = $08;
- Blue = $01; LightBlue = $09;
- Green = $02; LightGreen = $0A;
- Cyan = $03; LightCyan = $0B;
- Red = $04; LightRed = $0C;
- Magenta = $05; LightMagenta = $0D;
- Brown = $06; Yellow = $0E;
- LightGray = $07; White = $0F;
- Blink = $80;
-
- For convenience, background color constants were included to take advantage
- of constant folding.
-
- BlackBG = $00;
- BlueBG = $10;
- GreenBG = $20;
- CyanBG = $30;
- RedBG = $40;
- MagentaBG = $50;
- BrownBG = $60;
- LightGrayBG = $70;
- SameAttr = -1;
-
- SameAttr - A powerful and unique feature of all QWIK routines is the use of
- the constant SameAttr. If SameAttr, or a negative value, is used as an
- attribute, the routine will suppress any changes to the attributes and use
- what is currently on the screen.
-
- 3270 PC Attributes - Be aware that the 3270 PC ignores the foreground
- intensity bit, so there are only 8 colors. In addition, 4 colors have
-
-
- Chapter 1, Introduction Page 5
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
- different tints:
-
- PC Color 3270 PC Color
- ------------ -------------
- Cyan Turquoise
- Magenta Pink
- Brown Yellow
- Light Gray White
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Chapter 1, Introduction Page 6
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
- 2. P R O C E D U R E S A N D F U N C T I O N S
-
- In this section, a detailed description is provided for each procedure and
- function.
-
-
- ---------------------------------------------------------------------------
- EosC function Qwik
- ---------------------------------------------------------------------------
- Function Returns the absolute column of the EOS marker.
- Declaration EosC
- Result type byte
- Screens All video pages and virtual screens.
- Remarks Operates on the currently written screen. The upper left
- corner of the screen (1,1).
- See also EosR, EosToRC, EosToRCrel, EosToCursor, EosLn, GotoEos
-
- ---------------------------------------------------------------------------
- EosLn procedure Qwik
- ---------------------------------------------------------------------------
- Function Moves the EOS marker to column 1 of the next row.
- Declaration EosLn
- Screens All video pages and virtual screens.
- Remarks Operates on the currently written screen.
- EOS Updated.
- Restrictions EosLn can increment past the last row of a screen, but does
- not scroll up the screen.
- See also EosR, EosC, EosToRC, EosToRCrel, EosToCursor, GotoEos,
- QEosLn
-
- ---------------------------------------------------------------------------
- EosR function Qwik
- ---------------------------------------------------------------------------
- Function Returns the absolute row of the EOS marker.
- Declaration EosR
- Result type byte
- Screens All video pages and virtual screens.
- Remarks Operates on the currently written screen.
- See also EosC, EosToRC, EosToRCrel, EosToCursor, EosLn, GotoEos
-
- ---------------------------------------------------------------------------
- EosToCursor procedure Qwik
- ---------------------------------------------------------------------------
- Function Positions the EOS marker to where the cursor is.
- Declaration EosToCursor
- Screens All video pages only.
- Remarks The EOS marker is simply moved to match the position of the
- cursor of the currently written video page.
- EOS Updated.
- See also EosR, EosC, EosToRC, EosToRCrel, EosLn, GotoEos
-
- ---------------------------------------------------------------------------
- EosToRC procedure Qwik
- ---------------------------------------------------------------------------
- Function Positions the EOS marker.
-
-
- Chapter 2, Procedures and Functions Page 7
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
- Declaration EosToRC (Row, Col: byte)
- Screens All video pages and virtual screens.
- Remarks Use this procedure to manually locate the EOS marker. The
- Q*Eos procedures will write where this marker is located on
- the currently written screen.
- EOS Updated.
- Restrictions Stay within the screen limits.
- See also EosR, EosC, EosToRCrel, EosToCursor, EosLn, GotoEos
-
- ---------------------------------------------------------------------------
- EosToRCrel procedure Qwik
- ---------------------------------------------------------------------------
- Function Positions the EOS marker relative to its current position.
- Declaration EosToRCrel (Row, Col: integer)
- Screens All video pages and virtual screens.
- Remarks The relative values can be positive or negative. The Q*Eos
- procedures will write where the EOS marker is located on the
- currently written screen.
- EOS Updated.
- Restrictions Stay within the screen limits.
- See also EosR, EosC, EosToRC, EosToCursor, EosLn, GotoEos
-
- ---------------------------------------------------------------------------
- GetCursor function Qwik
- ---------------------------------------------------------------------------
- Function Returns the cursor mode for the CRT.
- Declaration GetCursor
- Result type word
- Screens All video pages only.
- Remarks There is only one cursor mode variable that applies to what
- is currently viewed on the CRT and it is retrieved from low
- memory at $0040:$0060.
- See also SetCursor, ModCursor
-
- ---------------------------------------------------------------------------
- GetSubModelID procedure Qwik
- ---------------------------------------------------------------------------
- Function Gets the SubModelID on IBM computers.
- Declaration GetSubModelID
- Remarks The SystemID and SubModelID variables are updated if a
- SubModelID exists. It will only execute on recent models of
- XT, AT, and PS/2 models which have this ID. Otherwise the
- variables will remain unaltered as set by Qinit.
- Restrictions PC or XT clones must recognize IBM's SystemID.
- See also QWIK55.DOC
-
- ---------------------------------------------------------------------------
- GotoEos procedure Qwik
- ---------------------------------------------------------------------------
- Function Positions the cursor where the EOS marker is.
- Declaration GotoEos
- Screens All video pages only.
- Remarks The cursor is simply moved to match the position of the EOS
- marker of the currently written video page.
- EOS Unaltered.
-
-
- Chapter 2, Procedures and Functions Page 8
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
- See also EosR, EosC, EosToRC, EosToRCrel, EosToCursor, EosLn, GotoRC
- Example Center a string on the screen and place the cursor at the
- end of the string:
-
- QwriteC (1,1,CRTcols,SameAttr,'My message ');
- GotoEos;
-
- ---------------------------------------------------------------------------
- GotoRC procedure Qwik
- ---------------------------------------------------------------------------
- Function Positions the cursor.
- Declaration GotoRC (Row, Col: byte)
- Screens All video pages only.
- Remarks The cursor is moved to the position absolute to the
- currently written video page.
- EOS Unaltered.
- Restrictions Stay within the screen limits.
- See also GotoEos, WhereR, WhereC
-
- ---------------------------------------------------------------------------
- ModCursor procedure Qwik
- ---------------------------------------------------------------------------
- Function Modifies the current cursor mode to turn on, off, or blink
- erratically.
- Declaration ModCursor (Bits13_14: word)
- Screens Any video page as viewed.
- Remarks Using the modification constants CursorOn, CursorOff, or
- CursorBlink for Bits13_14, the currently viewed cursor mode
- on the CRT will be modified accordingly. The procedure only
- looks at bits 13 and 14 of Bits13_14 for the modification.
- The scan lines remain unaltered.
- See also GetCursor, SetCursor
- Example To turn the current cursor mode off:
-
- ModCursor (CursorOff);
-
- ---------------------------------------------------------------------------
- Qattr procedure Qwik
- ---------------------------------------------------------------------------
- Function Changes just the attribute in a rows-by-columns block on the
- screen.
- Declaration Qattr (Row,Col,Rows,Cols: byte; Attr: integer)
- Screens All video pages and virtual screens.
- Remarks The upper left corner of the block starts at (Row,Col) and
- the block size is Rows by Cols. Note that you can even
- change 1 row and/or 1 column. If SameAttr is used for Attr
- or if Rows or Cols is zero, then nothing is written.
- EOS Updated.
- Restrictions Stay within the screen limits.
- See also QattrC, QattrEos
- Example To create inverse video on any screen:
-
- Qattr (1,1,CRTrows,CRTcols,Black+LightGrayBG);
-
-
-
-
- Chapter 2, Procedures and Functions Page 9
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
- ---------------------------------------------------------------------------
- QattrC procedure Qwik
- ---------------------------------------------------------------------------
- Function Changes just the attribute in a rows-by-columns block on the
- screen and centers it between two columns.
- Declaration QattrC (Row,ColL,ColR,Rows,Cols: byte; Attr: integer)
- Screens All video pages and virtual screens.
- Remarks The upper left corner of the block starts at
- (Row,(ColL+ColR-Cols+1) shr 1) with a block size of Rows by
- Cols and centering it between the two columns ColL and ColR.
- Odd counts are shifted left. If SameAttr is used for Attr
- or if Rows or Cols is zero, then nothing is written.
- EOS Updated.
- Restrictions Stay within the screen limits.
- See also Qattr, QattrEos
- Example A 30 character message centered on the screen in row 15,
- needs to be white on green:
-
- QattrC (15,1,CRTcols,1,30,White+GreenBG);
-
- The attribute will start to be changed in column 26 on an 80
- column screen.
-
- ---------------------------------------------------------------------------
- QattrEos procedure Qwik
- ---------------------------------------------------------------------------
- Function Changes just the attribute in a rows-by-columns block on the
- current screen starting at the EOS marker.
- Declaration QattrEos (Rows,Cols: byte; Attr: integer)
- Screens All video pages and virtual screens.
- Remarks The upper left corner of the block starts at the previously
- set EOS marker and the block size is Rows by Cols. If
- SameAttr is used for Attr or if Rows or Cols is zero, then
- nothing is written.
- Restrictions Stay within the screen limits.
- EOS Updated.
- See also Qattr, QattrC
- Example To highlight a 20 column data entry field at the EOS marker
- with yellow on magenta:
-
- QattrEos (1,20,Yellow+MagentaBG);
-
- ---------------------------------------------------------------------------
- QEosLn procedure Qwik
- ---------------------------------------------------------------------------
- Function Moves the EOS marker to column 1 of the next row with a
- possible scroll up.
- Declaration QEosLn
- Screens All video pages and virtual screens.
- Remarks Operates on the currently written screen. If EosR becomes
- greater than CRTrows, then the screen will scroll up. The
- new blank row will have the attribute set by ScrollAttr
- which must be manually set before hand.
- EOS Updated to first cleared column of the cleared row.
- See also EosR, EosC, EosToRC, EosToRCrel, EosToCursor, GotoEos, EosLn
-
-
- Chapter 2, Procedures and Functions Page 10
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
-
- ---------------------------------------------------------------------------
- Qfill procedure Qwik
- ---------------------------------------------------------------------------
- Function Fills the screen with a character with an optional attribute
- change in a rows-by-columns block on the current screen.
- Declaration Qfill (Row,Col,Rows,Cols: byte; Attr: integer; Ch: char)
- Screens All video pages and virtual screens.
- Remarks The upper left corner of the block starts at (Row,Col) and
- the block size is Rows by Cols. If SameAttr is used for
- Attr, then the attribute will remain the same on the screen.
- If Rows or Cols is zero, then nothing is written.
- EOS Updated.
- Restrictions Stay within the screen limits.
- See also QfillC, QfillEos
- Example To clear the screen with black on brown attribute:
-
- Qfill (1,1,CRTrows,CRTcols,Black+BrownBG,' ');
-
- ---------------------------------------------------------------------------
- QfillC procedure Qwik
- ---------------------------------------------------------------------------
- Function Fills the screen with a character and an optional attribute
- change in a rows-by-columns block on the current screen and
- centers it between two columns.
- Declaration QfillC (Row,ColL,ColR,Rows,Cols: byte;
- Attr: integer; Ch: char)
- Screens All video pages and virtual screens.
- Remarks The upper left corner of the block starts at
- (Row,(ColL+ColR-Cols+1) shr 1) with a block size of Rows by
- Cols and centered between the two columns ColL and ColR.
- Odd counts are shifted left. If SameAttr is used for Attr,
- then the attribute will remain the same on the screen. If
- Rows or Cols is zero, then nothing is written.
- EOS Updated.
- Restrictions Stay within the screen limits.
- See also Qfill, QfillEos
- Example Center 20 dashes on the screen in rows 1 to 5 with black on
- brown attributes:
-
- QfillC (1,1,CRTcols,5,20,Black+BrownBG,'-');
-
- ---------------------------------------------------------------------------
- QfillEos procedure Qwik
- ---------------------------------------------------------------------------
- Function Fills the screen with a character with an optional attribute
- change in a rows-by-columns block on the current screen
- starting at the Eos marker.
- Declaration QfillEos (Rows,Cols: byte; Attr: integer; Ch: char)
- Screens All video pages and virtual screens.
- Remarks The upper left corner of the block starts at the previously
- set EOS marker and the block size is Rows by Cols. If
- SameAttr is used for Attr, then the attribute will remain
- the same on the screen. If Rows or Cols is zero, then
- nothing is written.
-
-
- Chapter 2, Procedures and Functions Page 11
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
- EOS Updated.
- Restrictions Stay within the screen limits.
- See also Qfill, QfillC
- Example To clear a 20 column data entry field at the EOS marker with
- yellow on magenta:
-
- QfillEos (1,20,Yellow+MagentaBG,' ');
-
- ---------------------------------------------------------------------------
- Qinit procedure Qwik
- ---------------------------------------------------------------------------
- Function Detects system, display, and video card(s). Initializes
- global data for QWIK routines.
- Declaration Qinit
- Remarks Qinit is executed at startup. Qinit only needs to be run
- again if there is a text mode change.
- EOS Set to (1,1).
- See also QWIK55.DOC, QINITEST.PAS, VARIABLES section below.
-
- ---------------------------------------------------------------------------
- QreadAttr function Qwik
- ---------------------------------------------------------------------------
- Function Reads an attribute from the current screen.
- Declaration QreadAttr (Row, Col: byte)
- Result type byte
- Screens All video pages and virtual screens.
- Remarks Reads an attribute from the screen at just one location.
- EOS Unaltered.
- See also QreadChar, QreadStr
-
- ---------------------------------------------------------------------------
- QreadChar function Qwik
- ---------------------------------------------------------------------------
- Function Reads a character from the current screen.
- Declaration QreadChar (Row, Col: byte)
- Result type byte
- Screens All video pages and virtual screens.
- Remarks Reads a character from the screen at just one location.
- EOS Unaltered.
- See also QreadAttr, QreadStr
-
- ---------------------------------------------------------------------------
- QreadStr function Qwik
- ---------------------------------------------------------------------------
- Function Reads a text string from the current screen.
- Declaration QreadStr (Row,Col,Cols: byte)
- Result type string
- Screens All video pages and virtual screens.
- Remarks Reads a string of characters from the screen.
- EOS Unaltered.
- See also QreadAttr, QreadChar
-
-
-
-
-
-
- Chapter 2, Procedures and Functions Page 12
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
- ---------------------------------------------------------------------------
- QscrollDown procedure Qwik
- ---------------------------------------------------------------------------
- Function Scrolls a rows-by-columns block down on the current screen
- and clears the top row of the block.
- Declaration QscrollDown (Row,Col,Rows,Cols: byte; BlankAttr: integer)
- Screens All video pages and virtual screens.
- Remarks To keep it simple, the block encompasses all affected rows
- including the row to be cleared. The upper left corner of
- the block starts at (Row,Col) and the block size is Rows by
- Cols. The bottom row will be scrolled out and lost while
- the top row will be cleared with the attribute of BlankAttr
- (SameAttr is permitted). Note that you can even change 1
- row and/or 1 column. The cursor is not moved, but is ready
- to be moved with GotoEos. The CpuID lets the routine choose
- the best speed.
- EOS Updated to first cleared column of the cleared row.
- Restrictions Stay within the screen limits.
- See also QscrollUp, GotoEos
- Example To scroll down the entire screen and clear the top row with
- light cyan on blue:
-
- QscrollDown (1,1,CRTrows,CRTcols,LightCyan+BlueBG);
-
-
- ---------------------------------------------------------------------------
- QscrollUp procedure Qwik
- ---------------------------------------------------------------------------
- Function Scrolls a rows-by-columns block up on the current screen and
- clears the bottom row of the block.
- Declaration QscrollUp (Row,Col,Rows,Cols: byte; BlankAttr: integer)
- Screens All video pages and virtual screens.
- Remarks To keep it simple, the block encompasses all affected rows
- including the row to be cleared. The upper left corner of
- the block starts at (Row,Col) and the block size is Rows by
- Cols. The first row will be scrolled out and lost while the
- last row will be cleared with the attribute of BlankAttr
- (SameAttr is permitted). Note that you can even change 1
- row and/or 1 column. The cursor is not moved, but is ready
- to be moved with GotoEos. The CpuID lets the routine choose
- the best speed.
- EOS Updated to first cleared column of the cleared row.
- Restrictions Stay within the screen limits.
- See also QscrollDown, GotoEos
- Example To scroll up the entire screen and clear the last row with
- light cyan on blue:
-
- QscrollUp (1,1,CRTrows,CRTcols,LightCyan+BlueBG);
-
- ---------------------------------------------------------------------------
- QScrToVscr procedure Qwik
- ---------------------------------------------------------------------------
- Function Copies a rows-by-columns block on the current screen to
- another location on a virtual screen.
- Declaration QScrToVscr (Row,Col,Rows,Cols,
-
-
- Chapter 2, Procedures and Functions Page 13
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
- Vrow,Vcol,Vwidth: byte; VAR VScrPtr);
- Screens All video pages and virtual screens.
- Remarks Row, Col, Rows, and Cols locates the block on the current
- screen (Scr) as specified by QScrRec. This block will be
- copied to the virtual screen (Vscr) at the location of Vrow
- and Vcol. But since Vscr may have a different column width
- than Scr, Vwidth sets the width. VScrPtr is the base
- address of the virtual screen. By changing QScrRec, you can
- even copy blocks from one virtual screen to another! Only
- the Scr side checks for possible snow.
- EOS Unaltered.
- Restrictions Stay within the screen limits. Not intended for copying
- between video pages (esp. CGA).
- See also QVscrToScr
- Example Copy a 12x40 block from the CRT screen at (5,10) to a
- virtual screen at (3,2) and look at the result on the CRT:
-
- uses Qwik;
- const
- VScrRows = 20;
- VScrCols = 60;
- var
- { Storage size required is: Rows * Cols shl 1 }
- VScr: array[1..VScrRows] of
- array[1..VScrCols] of word; { 20 x 60 virtual screen }
- CRTrec,VScrRec: VScrRecType;
- begin
- with VScrRec do { create specs for virtual screen }
- begin
- Vrows := VScrRows;
- Vcols := VScrCols;
- Vsize := sizeof (VScr);
- Vsnow := false; { Qwikest when false }
- VEosOfs := 0;
- VScrPtr := @VScr;
- end;
- Qfill (1,1,CRTrows,CRTcols,White+BlueBG,'*'); { Fill CRT }
- CRTrec := QScrRec; { Save CRT specs }
- QScrRec := VScrRec; { Set virtual specs }
- Qfill (1,1,VScrRows,VScrCols,Black+BrownBG,'?'); { Fill VScr }
- QScrRec := CRTrec; { Restore CRT specs }
- QScrToVscr (5,10,12,40,3,2,VScrCols,VScr); { Copy Block }
- QstoreToScr (1,1,VScrRows,VScrCols,VScr); { Take a look }
- end.
-
- ---------------------------------------------------------------------------
- QstoreToMem procedure Qwik
- ---------------------------------------------------------------------------
- Function Saves a rows-by-columns block from the current screen to
- memory.
- Declaration QstoreToMem (Row,Col,Rows,Cols: byte; VAR Dest);
- Screens All video pages and virtual screens.
- Remarks Row, Col, Rows, and Cols locates the block on the current
- screen as specified by QScrRec. This block will be copied
- to Dest, the destination, as one long array. By changing
-
-
- Chapter 2, Procedures and Functions Page 14
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
- QScrRec, you can even save blocks from virtual screens! Be
- sure to set Qsnow to false for the fastest speed on virtual
- screens.
- EOS Unaltered.
- Restrictions Stay within the screen limits. Not intended for copying
- between video pages (esp. CGA).
- See also QstoreToScr
- Example Save a 12x40 block from the CRT screen at (5,10), clear the
- screen, and restore the block:
-
- uses qwik;
- const
- MemRows = 12;
- MemCols = 40;
- var
- { Storage size required is: Rows * Cols shl 1 }
- SavedBlock: array[1..MemRows] of
- array[1..MemCols] of word; { 12 x 40 block }
- begin
- Qfill (1,1,CRTrows,CRTcols,White+BlueBG,'*'); { Fill CRT }
- QstoreToMem (5,10,MemRows,MemCols,SavedBlock); { Save Block }
- Qfill (1,1,CRTrows,CRTcols,Yellow+BlackBG,' '); { Clear CRT }
- QstoreToScr (5,10,MemRows,MemCols,SavedBlock); { Take a look }
- end.
-
- ---------------------------------------------------------------------------
- QstoreToScr procedure Qwik
- ---------------------------------------------------------------------------
- Function Writes a rows-by-columns block to the current screen from
- memory.
- Declaration QstoreToScr (Row,Col,Rows,Cols: byte; VAR Source);
- Screens All video pages and virtual screens.
- Remarks Row and Col locates the upper left corner of the block on
- the current screen as specified by QScrRec. A block will be
- written from Source, which is one long array, and placed on
- the screen as a Rows-by-Cols block. By changing QScrRec,
- you can even place blocks to virtual screens! Be sure to
- set Qsnow to false for the fastest speed on virtual screens.
- EOS Unaltered.
- Restrictions Stay within the screen limits. Not intended for copying
- between video pages (esp. CGA).
- See also QstoreToMem
- Example Save a 12x40 block from the CRT screen at (5,10) in the
- heap, clear the screen, and restore the block:
-
- uses qwik;
- const
- MemRows = 12;
- MemCols = 40;
- type
- { Storage size required is: Rows * Cols shl 1 }
- BlockArray = array[1..MemRows] of
- array[1..MemCols] of word; { 12 x 40 block }
- var
- BlockPtr: ^BlockArray;
-
-
- Chapter 2, Procedures and Functions Page 15
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
- begin
- Qfill (1,1,CRTrows,CRTcols,White+BlueBG,'*'); { Fill CRT }
- GetMem (BlockPtr,sizeof(BlockArray)); { Reserve heap }
- QstoreToMem (5,10,MemRows,MemCols,BlockPtr^); { Save Block }
- Qfill (1,1,CRTrows,CRTcols,Yellow+BlackBG,' '); { Clear CRT }
- QstoreToScr (5,10,MemRows,MemCols,BlockPtr^); { Take a look }
- FreeMem (BlockPtr,sizeof(BlockArray)); { Free heap }
- end.
-
- ---------------------------------------------------------------------------
- QviewPage procedure Qwik
- ---------------------------------------------------------------------------
- Function Changes the video page to be viewed on the CRT.
- Declaration QviewPage (PageNum: byte)
- Screens All video pages.
- Remarks Standard TP routines are dedicated only to video page 0.
- However, most video cards, except MDA and some 3270 PC, have
- more than one video page. This procedure enables you to
- view those pages. The number of video pages available is
- detected by Qinit and saved in MaxPage. PageNum is 0-based
- and the routine will only view other pages when
- PageNum<=MaxPage. VideoPage is the currently viewed page.
- EOS Unaltered.
- See also QwritePage, QWIK55.DOC, QINITEST.PAS
-
- ---------------------------------------------------------------------------
- QVscrToScr procedure Qwik
- ---------------------------------------------------------------------------
- Function Copies a rows-by-columns block from a virtual screen to
- another location on the current screen.
- Declaration QVscrToScr (Row,Col,Rows,Cols,
- Vrow,Vcol,Vwidth: byte; VAR VScrPtr);
- Screens All video pages and virtual screens.
- Remarks Row, Col, Rows, and Cols locates the destination on the
- current screen (Scr) as specified by QScrRec. A block will
- be copied from the virtual screen (Vscr) at the location of
- Vrow and Vcol. But since Vscr may have a different column
- width than Scr, Vwidth sets the width. VScrPtr is the base
- address of the virtual screen. By changing QScrRec, you can
- even copy blocks from one virtual screen to another! Only
- the Scr side checks for possible snow.
- EOS Unaltered.
- Restrictions Stay within the screen limits. Not intended for copying
- between video pages (esp. CGA).
- See also QScrToVscr
- Example Copy a 12x40 block from the CRT screen at (5,10) to a
- virtual screen at (3,2) and look at the result on the CRT:
-
-
- uses Qwik;
- const
- VScrRows = 20;
- VScrCols = 60;
- var
- { Storage size required is: Rows * Cols shl 1 }
-
-
- Chapter 2, Procedures and Functions Page 16
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
- VScr: array[1..VScrRows] of
- array[1..VScrCols] of word; { 20 x 60 virtual screen }
- CRTrec,VScrRec: VScrRecType;
- begin
- with VScrRec do { create specs for virtual screen }
- begin
- Vrows := VScrRows;
- Vcols := VScrCols;
- Vsize := sizeof (Vscr);
- Vsnow := false; { Qwikest when false }
- VEosOfs := 0;
- VScrPtr := @VScr;
- end;
- Qfill (1,1,CRTrows,CRTcols,White+BlueBG,'*'); { Fill CRT }
- CRTrec := QScrRec; { Save CRT specs }
- QScrRec := VScrRec; { Set virtual specs }
- Qfill (1,1,VScrRows,VScrCols,Black+BrownBG,'?'); { Fill VScr }
- QScrRec := CRTrec; { Restore CRT specs }
- QScrToVscr (5,10,12,40,3,2,VScrCols,VScr); { Copy Block }
- QstoreToScr (1,1,VScrRows,VScrCols,VScr); { Take a look }
- end.
-
- ---------------------------------------------------------------------------
- Qwrite procedure Qwik
- ---------------------------------------------------------------------------
- Function Writes a string to the current screen with an optional
- attribute change.
- Declaration Qwrite (Row,Col: byte; Attr: integer; aStr: string)
- Screens All video pages and virtual screens.
- Remarks This routine writes the string aStr at (Row,Col) with the
- attribute Attr. If SameAttr is used for Attr, then the
- attribute will remain the same on the screen.
- EOS Updated.
- Restrictions Stay within the screen limits.
- See also QwriteC, QwriteA, QwriteEos, QwriteEosA
- Example Write the string "Important" at (2,1) with the attribute of
- flashing white on red:
-
- Qwrite (2,1,Blink+White+RedBG,'Important');
-
-
- ---------------------------------------------------------------------------
- QwriteA procedure Qwik
- ---------------------------------------------------------------------------
- Function Writes an array (or string) with a specified length to the
- current screen with an optional attribute change.
- Declaration QwriteA (Row,Col: byte; Attr: integer;
- ArrayLength: word; VAR aStr)
- Screens All video pages and virtual screens.
- Remarks This routine writes the array aStr at (Row,Col) with the
- attribute Attr for the number of columns specified by
- ArrayLength. This enables you to write substrings when
- specifying a starting index (aStr[i]). (Other routines like
- Qwrite assume the length is the value at aStr[0] and the
- starting index is aStr[1].) Of course, aStr doesn't have to
-
-
- Chapter 2, Procedures and Functions Page 17
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
- be a string - it can be any type variable or address in
- memory. If SameAttr is used for Attr, then the attribute
- will remain the same on the screen.
- EOS Updated.
- Restrictions Stay within the screen limits.
- See also Qwrite, QwriteC, QwriteEos, QwriteEosA
- Example The following will write "Testing out this line." with the
- existing screen attributes:
-
- MyString:='Step B: Testing out this line.';
- QwriteA (1,1,SameAttr,22,MyString[9]);
-
- ---------------------------------------------------------------------------
- QwriteC procedure Qwik
- ---------------------------------------------------------------------------
- Function Writes a string to the current screen with an optional
- attribute change and centered between two columns.
- Declaration QwriteC (Row,ColL,ColR: byte; Attr: integer;
- aStr: string)
- Screens All video pages and virtual screens.
- Remarks This routine writes the string aStr at (Row,(ColL+ColR-
- aStr[0]+1) shr 1) which centers it between the two columns
- ColL and ColR and has the attribute Attr. If SameAttr is
- used for Attr, then the attribute will remain the same on
- the screen.
- EOS Updated.
- Restrictions Stay within the screen limits.
- See also Qwrite, QwriteA, QwriteEos, QwriteEosA
- Example Write a message centered on the screen in row 15 with black
- on green attributes:
-
- QwriteC (15,1,CRTcols,White+GreenBG,'My message');
-
- The message will be written in column 36 on an 80 column
- screen.
-
- ---------------------------------------------------------------------------
- QwriteEos procedure Qwik
- ---------------------------------------------------------------------------
- Function Writes a string to the current screen with an optional
- attribute change starting at the EOS marker.
- Declaration QwriteEos (Attr: integer; aStr: string)
- Screens All video pages and virtual screens.
- Remarks This routine writes the string aStr at the EOS marker with
- the attribute Attr. If SameAttr is used for Attr, then the
- attribute will remain the same on the screen.
- EOS Updated.
- Restrictions Stay within the screen limits.
- See also Qwrite, QwriteA, QwriteC, QwriteEosA
- Example Highlight the number in the following message:
-
- Qwrite ( 1, 1,White+BlueBG ,'There are');
- QwriteEos ( Yellow+BlueBG,' 5 ');
- QwriteEos ( White+BlueBG ,'minutes left.');
-
-
-
- Chapter 2, Procedures and Functions Page 18
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
- which will write "There are 5 minutes left." as white on
- blue except "5" will be yellow on blue.
-
- ---------------------------------------------------------------------------
- QwriteEosA procedure Qwik
- ---------------------------------------------------------------------------
- Function Writes an array (or string) with a specified length to the
- current screen with an optional attribute change starting at
- the EOS marker.
- Declaration QwriteEosA (Attr: integer; ArrayLength: word; VAR aStr)
- Screens All video pages and virtual screens.
- Remarks This routine writes the array aStr at the previously set EOS
- marker with the attribute Attr for the number of columns
- specified by ArrayLength. This enables you to write
- substrings when specifying a starting index (aStr[i]).
- (Other routines like QwriteEos assume the length is the
- value at aStr[0] and the starting index is aStr[1].) Of
- course, aStr doesn't have to be a string - it can be any
- type variable or address in memory. If SameAttr is used for
- Attr, then the attribute will remain the same on the screen.
- EOS Updated.
- Restrictions Stay within the screen limits.
- See also QwriteA, QwriteC, QwriteEos, QwriteEos
- Example The following will write "Testing Step B" with the existing
- screen attributes:
-
- MyString:='Step B: Testing out this line.';
- QwriteA (1,5,SameAttr, 8,MyString[9]);
- QwriteEosA ( SameAttr, 6,MyString[1]);
-
- ---------------------------------------------------------------------------
- QwritePage procedure Qwik
- ---------------------------------------------------------------------------
- Function Changes the video page on which the QWIK routines write.
- Declaration QwritePage (PageNum: byte)
- Screens All video pages.
- Remarks Standard TP routines are dedicated to only video page 0.
- However, most video cards, except MDA and some 3270 PC, have
- more than one video page. This procedure enables QWIK
- routines to write to those pages by altering QScrOfs and
- QvideoPage which is the current page on which QWIK is
- writing. The number of video pages available is detected by
- Qinit and saved in MaxPage. The routine will only change
- pages when PageNum<=MaxPage.
- EOS Unaltered.
- See also QviewPage, QWIK55.DOC, QINITEST.PAS
-
- ---------------------------------------------------------------------------
- SetCursor procedure Qwik
- ---------------------------------------------------------------------------
- Function Sets a new cursor mode for the CRT.
- Declaration SetCursor (Cursor: word)
- Screens Any video page as viewed.
- Remarks Using the default cursor variables set by Qinit and/or the
- cursor constants, a new cursor mode can be set by with any
-
-
- Chapter 2, Procedures and Functions Page 19
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
- combination of:
-
- CursorInitial - detected by Qinit at startup
- CursorUnderline - set by Qinit
- CursorHalfBlock - set by Qinit
- CursorBlock - set by Qinit
- CursorOff ($2000) - turns cursor off
- CursorBlink ($6000) - erratic blinking (MDA/CGA)
-
- You can simply add them together (logically is best to
- prevent carry errors, but arithmetic is fine). Although a
- separate cursor location is kept for each video page, there
- is only one cursor mode for the CRT screen.
- See also GetCursor, ModCursor
- Example 1 Set a half-block cursor with erratic blink:
-
- SetCursor (CursorHalfBlock+CursorBlink);
-
- Example 2 Set the scan lines for a block cursor, but leave it turned
- off:
-
- SetCursor (CursorBlock+CursorOff);
-
- Example 3 Restore the cursor mode at start up and be sure it's turned
- on:
-
- SetCursor (CursorInitial);
- ModCursor (CursorOn);
-
- or, for those comfortable with bit operations:
-
- SetCursor (CursorInitial and not CursorBlink);
-
-
- ---------------------------------------------------------------------------
- SetMultiTask procedure Qwik
- ---------------------------------------------------------------------------
- Function Set QWIK variables to write direct to multi-tasking video
- buffers (MTVB).
- Declaration SetMultiTask
- Remarks This procedure alters the following variables if the program
- is running under a multi-tasking environment and the user
- has chosen to use the faster MTVB. If there is no multi-
- tasking environment or the MTVB is not used (normal direct
- screen video), then these variables are unaltered. If you
- use the CRT unit, be sure to set DirectVideo to false when
- using the MTVB.
-
- QScrPtr - the segment is altered, but the offset is
- usually 0.
- Page0Seg - set to match QSegPtr to indicate page 0.
- Qsnow - set to false.
- InMultiTask - True if using MTVB, else false.
-
- See also InMultiTask in VARIABLES section below.
-
-
- Chapter 2, Procedures and Functions Page 20
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
- Example Search for locations in the *.PAS demonstration files.
-
- ---------------------------------------------------------------------------
- StrL function Strs
- ---------------------------------------------------------------------------
- Function Returns a LongInt converted into a string.
- Declaration StrL (L: LongInt)
- Result type string
- Remarks Uses the standard Str procedure to get result.
- See also StrLF, StrR, StrRF, StrRFD
- Example The following writes "-12345" on the screen:
-
- { var MyNum: integer; }
- MyNum := -12345;
- Qwrite ( 1, 1,SameAttr,StrL(MyNum));
-
- ---------------------------------------------------------------------------
- StrLF function Strs
- ---------------------------------------------------------------------------
- Function Returns a LongInt converted into a string and formatted to
- be right justified in a fixed field.
- Declaration StrLF (L: LongInt; Field: integer)
- Result type string
- Remarks Uses the standard Str procedure to get result.
- See also StrL, StrR, StrRF, StrRFD
- Example The following writes " -12345" on the screen:
-
- { var MyNum: integer; }
- MyNum := -12345;
- Qwrite ( 1, 1,SameAttr,StrLF(MyNum,8));
-
- ---------------------------------------------------------------------------
- StrR function Strs
- ---------------------------------------------------------------------------
- Function Returns a Real converted into a string.
- Declaration StrR (R: Real)
- Result type string
- Remarks Uses the standard Str procedure to get result.
- See also StrL, StrLF, StrRF, StrRFD
- Example The following writes "-1.2345560000E+04" on the screen:
-
- { var MyNum: real; }
- MyNum := -12345.56
- Qwrite ( 1, 1,SameAttr,StrR(MyNum));
-
- ---------------------------------------------------------------------------
- StrRF function Strs
- ---------------------------------------------------------------------------
- Function Returns a Real converted into a string and formatted to
- be right justified in a fixed field.
- Declaration StrRF (R: Real; Field: integer)
- Result type string
- Remarks Uses the standard Str procedure to get result.
- See also StrL, StrLF, StrR, StrRFD
- Example The following writes "-1.2346E+04" on the screen:
-
-
- Chapter 2, Procedures and Functions Page 21
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
-
- { var MyNum: real; }
- MyNum := -12345.56
- Qwrite ( 1, 1,SameAttr,StrRF(MyNum,11));
-
- ---------------------------------------------------------------------------
- StrRFD function Strs
- ---------------------------------------------------------------------------
- Function Returns a Real converted into a string and formatted to
- be right justified in a fixed field with a fixed number of
- numbers to the right of the decimal.
- Declaration StrRFD (R: Real; Field,Decimal: integer)
- Result type string
- Remarks Uses the standard Str procedure to get result.
- See also StrL, StrLF, StrR, StrRF
- Example The following writes " -12345.6" on the screen:
-
- { var MyNum: real; }
- MyNum := -12345.56
- Qwrite ( 1, 1,SameAttr,StrRFD(MyNum,10,1));
-
- ---------------------------------------------------------------------------
- WhereC function Qwik
- ---------------------------------------------------------------------------
- Function Returns the absolute column of the cursor on the currently
- written video page.
- Declaration WhereC
- Result type byte
- Screens All video pages only.
- Remarks Operates on the currently written video page. The upper
- left corner of the screen (1,1).
- See also GotoRC, WhereR
-
- ---------------------------------------------------------------------------
- WhereR function Qwik
- ---------------------------------------------------------------------------
- Function Returns the absolute row of the cursor on the currently
- written video page.
- Declaration WhereR
- Result type byte
- Screens All video pages only.
- Remarks Operates on the currently written video page. The upper
- left corner of the screen (1,1).
- See also GotoRC, WhereC
- ---------------------------------------------------------------------------
-
-
-
-
-
-
-
-
-
-
-
-
- Chapter 2, Procedures and Functions Page 22
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
- 3. V A R I A B L E S
-
- The variables in QWIK.TPU are initialized according to the the kind of
- system, display(s), and video adapter(s) that Qinit detects. QWIK uses
- them for reference and they may also be used in your own programming to
- help make decisions.
-
-
- SYSTEM HARDWARE
-
- System Hardware Variables - These variables indicate the kind of computer
- that Qinit detected:
-
- Variable Description
- ------------ -----------------------------------------------------------
- CpuID (Type: Byte) Intel CPU identification code. CpuID can be
- any one of the following four constants:
-
- Cpu8086 - Intel 8086/8088
- Cpu80186 - Intel 80186/80188
- Cpu80286 - Intel 80286
- Cpu80386 - Intel 80386
-
- SystemID (Type: Byte) Code for the IBM computer in use and is set by
- Qinit. See SubModelID for values.
-
- SubModelID (Type: Byte) Code for the sub-model of the IBM computer in
- use. This value defaults to 0 the first time Qinit is run.
- To get a value, execute GetSubModelID.
-
- SysID Sub-Model SYSTEM
- ----- --------- ------------------------------
- $FF n/a IBM PC
- $FE n/a IBM PC XT
- $FD n/a IBM PCjr
- $FC n/a IBM PC AT (6 MHz, 01/10/84)
- $00 IBM PC AT (6 MHz, 06/10/85)
- $01 IBM PC AT (8 MHz, 11/15/85)
- $02 IBM PC XT (286)
- $04 IBM PS/2 model 50
- $05 IBM PS/2 model 60
- $FB $00 IBM PC XT (256/640)
- $FA $00 IBM PS/2 model 30
- $01 IBM PS/2 model 25
- $F9 $00 IBM PC Convertible
- $F8 $00 IBM PS/2 model 80 (16 MHz)
- $04 IBM PS/2 model 80 (20 MHz)
- $09 IBM PS/2 model 70 (16 MHz)
-
-
-
-
-
-
-
-
-
- Chapter 3, Variables Page 23
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
- VIDEO HARDWARE
-
- Video Hardware Variables - These variables indicate the kind of video
- card(s) and display(s) that Qinit detected:
-
- Variable Description
- ------------- ----------------------------------------------------------
- ActiveDispDev (Type: Byte) Code for the Active Display Device. Using
- IBM's Display Combination Code (DCC), Qinit detects the
- video adapter combined with the video display. The codes
- have been set to the following constants. Note that
- monochrome is odd and color is even:
-
- Constant Code Description
- ----------- ----- --------------------------------
- NoDisplay $00 No display
- MdaMono $01 MDA with 5151 monochrome display
- CgaColor $02 CGA with 5153/4 color display
- DCC3 $03 reserved
- EgaColor $04 EGA with 5153/4 color
- EgaMono $05 EGA with 5151 monochrome
- PgcColor $06 PGC with 5175 color
- VgaMono $07 VGA with analog monochrome
- VgaColor $08 VGA with analog color
- DCC9 $09 reserved
- DCC10 $0A reserved
- McgaMono $0B MCGA with analog monochrome
- McgaColor $0C MCGA with analog color
- n/a $0D to $FE - reserved
- Unknown $FF unknown device
-
- ActiveDispDev3270 (Type: Byte) Code for the Active Display Device on the
- 3270 PC. Only the $FF code corresponds to the constant
- "Unknown".
-
- Code Monitor Adapter
- ---- ------------ ---------------------
- $00 5151 or 5272 for 5151 or 5272
- $01 3295 for 3295
- $02 5151 or 5272 for 5151 or 5272 plus
- XGA graphics
- $03 5279 3270 PC G
- $04 5379 C01 3270 PC GX
- $05 5379 M01 3270 PC GX
- $06 reserved
- $07 reserved
- $FF Unknown, not a 3270 PC
-
- AltDispDev (Type: Byte) Code for the Alternate Display Device. This
- code is detected by Qinit for a second, but inactive
- adapter and display, just in case there are dual monitors.
- It uses the same constants as ActiveDispDev listed above.
-
- AltDispDevPCC (Type: Word) Code for the Alternate Display adapter on the
- PC Convertible. In hex, it corresponds to the model number
-
-
- Chapter 3, Variables Page 24
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
- of the attached device:
-
- Model Description
- ----- --------------------
- $ 0 No alternate adapter
- $5140 LCD
- $5153 CGA type
- $5151 Monochrome type
-
- CardSeg (Type: Word) Video segment address of the video "card" as
- detected by Qinit.
-
- CardSnow (Type: Boolean) Set to true for wait-for-retrace for the
- video "card" as detected by Qinit.
-
- EgaInfo (Type: Byte) Absolute variable at $0040:$0087 has the
- following information when the EGA (or VGA) is present:
-
- Bits Description
- ---- -------------------------------------------
- 7 (0) Clear, (1) Keep video data after
- video mode set
- 6,5 (00) 64k, (01), 128k, (10) 192k, (11) 256k,
- memory on the card.
- 4 Reserved
- 3 (0) EGA active, (1) EGA not active
- 2 (0) Disable, (1) Enable wait-for-display
- 1 (0) CD/ECD (1) MD attached
- 0 (0) Active, (1) Inactive CD emulation
-
- EgaSwitches (Type: Byte) By checking the value of this byte, you can
- determine the monitor connected to the EGA, the alternate
- video system, and the start up default. The byte is a copy
- of how the dip switches are set on the card where on=0 and
- off=1. The primary is the default. When the ECD is set
- for 640x200, it is emulating the CD including the cursor
- mode. Qinit directly tests for the alternate device rather
- than assuming it.
-
- Switch Primary Secondary
- -------- ------------------- -------------------
- 0000 = 0 MDA + MD EGA + CD - 40x25
- 0001 = 1 MDA + MD EGA + CD - 80x25
- 0010 = 2 MDA + MD EGA + ECD (640x200)
- 0011 = 3 MDA + MD EGA + ECD (640x350)
- 0100 = 4 CGA + CD - 40x25 EGA + MD
- 0101 = 5 CGA + CD - 80x25 EGA + MD
- 0110 = 6 EGA + CD - 40x25 MDA + MD
- 0111 = 7 EGA + CD - 80x25 MDA + MD
- 1000 = 8 EGA + ECD (640x200) MDA + MD
- 1001 = 9 EGA + ECD (640x350) MDA + MD
- 1010 =10 EGA + MD CGA + CD - 40x25
- 1011 =11 EGA + MD CGA + CD - 80x25
-
- Have3270 (Type: Boolean) If Qinit detects 3270 PC equipment or
-
-
- Chapter 3, Variables Page 25
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
- software, this variable is set to true. In addition, the
- ActiveDispDev is either MdaMono or CgaColor. Note that
- there may or may not be graphics capability in either case;
- Qinit is not meant to detect graphics. See
- ActiveDispDev3270 for codes.
-
- HavePS2 (Type: Boolean) Qinit sets HavePS2 to true if the DCC is
- supported. This means that the program has detected a PS/2
- video card whether it is integrated on a model 30, a PS/2
- Display Adapter installed on an IBM XT, or the like. It
- also means that either MCGA or VGA is present, but not
- necessarily active. To know which, just check the DCC.
-
- HercModel (Type: Byte) Model of the attached Hercules video card. If
- no card is detected, then HercModel=NoHerc.
-
- Constant Code Description
- ---------- ---- ---------------------
- NoHerc 0 No Hercules card
- HgcMono 1 HGC
- HgcPlus 2 HGC Plus
- HercInColor 3 Hercules InColor Card
-
- MaxPage (Type: Byte) Maximum possible 0-based video page number.
- See TABLE 1 in QWIK55.DOC for ranges.
-
-
- VIDEO SOFTWARE
-
- Video Software Variables - These variables indicate the current video mode
- and screen characteristics to which QWIK is writing and what is being
- viewed on the CRT. There are several absolute variables listed that
- duplicate some of the global variables like CRTcolumns and CRTcols. It is
- preferable to use the global ones, where the absolute ones are only needed
- for handling exceptions.
-
- Variable Description
- ------------ -----------------------------------------------------------
- CRTcols (Type: Byte) Global variable equal to CRTcolumns.
-
- CRTcolumns (Type: Word) Absolute variable directly accesses the 1-
- based currently viewed number of CRT columns for any card
- or video mode.
-
- CRTrows (Type: Byte) 1-based number of CRT rows for any card or
- video mode.
-
- EgaFontSize (Type: Word) Absolute variable directly accesses the 1-
- based number of horizontal scan lines per character for
- EGA/MCGA/VGA.
-
- EgaRows (Type: Byte) Absolute variable directly accesses the 0-
- based number of rows on the current screen for EGA, MCGA,
- and VGA. This number is used to make CRTrows which is
- handled by Qinit.
-
-
- Chapter 3, Variables Page 26
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
-
- InMultiTask (Type: Boolean) This flag indicates if MTVB is being used
- for the screen in lieu of the normal screen. It defaults
- to false and is possibly altered with SetMultiTask if the
- multitasking software has be instructed to expect writing
- direct to the MTVB (not direct screen).
-
- Page0seg (Type: Word) Segment for the base page, page 0. In multi-
- tasking environments, change this value to its video
- display buffer. QScrSeg and QScrOfs should also be set.
-
- QEosOfs (Type: Word) 0-base offset where a Q*Eos procedure will
- write.
-
- QScrSeg (Type: Word) Segment for QWIK writing which is altered when
- changing pages. QScrSeg=Page0seg on page 0.
-
- QScrOfs (Type: Word) Offset for QWIK writing needed for virtual
- screens. The usual value is 0 for the video pages.
-
- QScrPtr (Type: Pointer) Combines QScrSeg and QScrOfs
-
- QScrRec (Type: VScrRecType) Record of essential variables for QWIK
- screen writing. This variable occupies the same space and
- in the same order of:
-
- Global QScrRec
- ------- -------
- CRTrows Vrows
- CRTcols Vcols
- CRTsize Vsize
- Qsnow Vsnow
- QEosOfs VEosOfs
- QScrPtr VScrPtr
-
- These variables are also described in this section. As a
- record, the variables can be swapped easily when writing to
- virtual screens. See the example in QVscrToScr procedure.
-
- Qsnow (Type: Boolean) Set to true for wait-for-retrace (snow)
- while QWIK is writing.
-
- QvideoPage (Type: Byte) Video page to which QWIK is writing which is
- set by QwritePage. It is initially 0.
-
- QvideoMode (Type: Byte) Video mode detected by Qinit.
-
- ScrollAttr (Type: Integer) The attribute used to clear the blank row
- when QEosLn is used.
-
- VideoMode (Type: Byte) Absolute variable directly accesses the
- current video mode in low memory.
-
- VideoPage (Type: Byte) Absolute variable directly accesses the
- currently viewed video page in low memory.
-
-
- Chapter 3, Variables Page 27
- QWIK Screen Utilities Reference Guide, Version 5.5
-
-
-
- VScrRecType The type for the record of essential variables for QWIK
- screen writing to virtual screens. This enables an easy
- exchange of data between the CRT and virtual screens.
-
-
- VIDEO CURSOR
-
- Video Cursor Variables and Constants - These variables and constants give
- you easy tools to combine with bit operations to display your choice of
- cursor modes. The variables default with the cursor on and no skew which
- are detected and set by Qinit at startup:
-
- Variable Description
- ----------------- --------------------------------------------------------
- CursorBlock (Type: Word) Cursor mode value for the full cell.
-
- CursorHalfblock (Type: Word) Cursor mode value for a half block usually
- used for insert editing.
-
- CursorInitial (Type: Word) Cursor mode value detected at startup.
-
- CursorUnderline (Type: Word) Cursor mode value for the normal
- underline.
-
-
- Constant Value Description
- ----------- ----- -----------------------------------------------------
- CursorBlink $6000 Used to alter bits 13/14 to create erratic blinking
- on MDA/CGA cards. (EGA/VGA cards turn the cursor
- off.)
-
- CursorOff $2000 Used to alter bits 13/14 or can be used by itself to
- turn the cursor off.
-
- CursorOn $0000 Used to alter bits 13/14 in ModeCursor to turn the
- cursor back on.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Chapter 3, Variables Page 28