QWIK SCREEN UTILITIES USER'S GUIDE Version 7.1 May 27, 1993 Copyright (C) 1988,1993 Eagle Performance Software All Rights Reserved. _______ ____| _ | (tm) --| | |------------------- | ____|__ | Association of | | |_| Shareware |__| o | Professionals -----| | |--------------------- |___|___| MEMBER QWIK Screen Utilities User's Guide, Version 7.1 T A B L E O F C O N T E N T S 1. INTRODUCTION . . . . . . . . . . . . . . . . . . . . . 3 Features . . . . . . . . . . . . . . . . . . . . . . 3 Using the Manuals . . . . . . . . . . . . . . . . . . 3 Licensing . . . . . . . . . . . . . . . . . . . . . . 4 Customer Service . . . . . . . . . . . . . . . . . . 4 ASP . . . . . . . . . . . . . . . . . . . . . . . . . 5 2. GETTING STARTED . . . . . . . . . . . . . . . . . . . . 6 Distribution Files . . . . . . . . . . . . . . . . . 6 Demonstration . . . . . . . . . . . . . . . . . . . . 6 Simple Programming . . . . . . . . . . . . . . . . . 6 Procedures and Functions . . . . . . . . . . . . . . 8 3. BASIC TECHNIQUES . . . . . . . . . . . . . . . . . . . 12 Number to String Conversion . . . . . . . . . . . . . 12 Cursor Mode Routines . . . . . . . . . . . . . . . . 12 Cursor Location Routines . . . . . . . . . . . . . . 14 EOS Marker . . . . . . . . . . . . . . . . . . . . . 14 Scrolling . . . . . . . . . . . . . . . . . . . . . . 15 Pop-Up Windows . . . . . . . . . . . . . . . . . . . 16 4. ADVANCED TECHNIQUES . . . . . . . . . . . . . . . . . . 18 Virtual Screens . . . . . . . . . . . . . . . . . . . 18 Video Pages . . . . . . . . . . . . . . . . . . . . . 19 Video Modes . . . . . . . . . . . . . . . . . . . . . 20 Multi-tasking Environments . . . . . . . . . . . . . 21 Interrupts . . . . . . . . . . . . . . . . . . . . . 21 5. HARDWARE DETECTION . . . . . . . . . . . . . . . . . . 22 Display Combination Code . . . . . . . . . . . . . . 22 Snow Checking . . . . . . . . . . . . . . . . . . . . 23 System Hardware . . . . . . . . . . . . . . . . . . . 24 Tips . . . . . . . . . . . . . . . . . . . . . . . . 25 APPENDIX A: Video Mode Table . . . . . . . . . . . . . . . 26 APPENDIX B: Cursor Mode Data . . . . . . . . . . . . . . . 28 Cursor Mode Tables . . . . . . . . . . . . . . . . . 28 Cursor Emulation . . . . . . . . . . . . . . . . . . 28 APPENDIX C: Performance . . . . . . . . . . . . . . . . . 31 Code Size . . . . . . . . . . . . . . . . . . . . . . 31 Speed . . . . . . . . . . . . . . . . . . . . . . . . 31 TP Compilers . . . . . . . . . . . . . . . . . . . . 31 APPENDIX D: Application Products . . . . . . . . . . . . . 32 APPENDIX E: Revision History . . . . . . . . . . . . . . . 43 APPENDIX F: References and Credits . . . . . . . . . . . . 46 2 QWIK Screen Utilities User's Guide, Version 7.1 1. I N T R O D U C T I O N FEATURES Welcome to QWIK Screen Utilities! You have just obtained a copy of the highest performance screen writing tools available today for Borland Pascal 7.0 (TP7) for DOS and DPMI. Both novice and professional programmers will appreciate these simple and very powerful utilities that gives you absolute control over your CRT displays in all text modes. Here are some of the features you will discover: . Writes on all IBM compatible computers, displays and adapters including the new PS/2 systems and Hercules. . Works in DOS and DPMI. . Superior video detection routine. . Eliminates snow and flicker. . Writes directly to the screen in absolute coordinates. . Writes in all text modes and column modes. . Writes on all video pages. . Writes on virtual screens in RAM. . Writes text and attribute, text only, or attribute only. . Reads strings, characters and attributes. . Uses End-Of-String (EOS) marker for quick string chaining. . Provides standardized cursor control for all adapters. . Enhanced cursor movement. . 650+% faster than TP7 direct screen writing. . Works in multi-tasking environments. . Only 2.9k bytes of code if all 43 routines are used. . Optimized by the compiler and drops unused code. . Used in all other Eagle products. QWIK is an enhancement unit providing capabilities not offered in the CRT unit that came with TP7. In contrast to the CRT unit which does window- relative writing, QWIK knows how to write directly to the screen in abso- lute screen coordinates for any video configuration. USING THE MANUALS Disk Based Guides - The manuals for QWIK are on disk so that you can conveniently scan for the topic you are seeking. You can do this with any list or search utility with a search function. You can also make a printed copy. If you have not already printed this manual, refer to the READ.ME file for instructions. At the present time, no bound manuals are being offered with registration. User's Guide - This manual, the one your are reading now, assumes that as a programmer you are already familiar with Borland Pascal 7.0 and that you have a working knowledge of your disk operating system (DOS). It will provide you the basic principles of direct screen writing and powerful tips on some previously unavailable techniques. Chapter 1, Introduction Page 3 QWIK Screen Utilities User's Guide, Version 7.1 Reference Guide - This manual describes in detail all procedures, functions and variables used in QWIK. It is alphabetically arranged for easy access in a format similar to the TP7 manual. Use this manual when you have become familiar with the basic principles in the User's guide. LICENSING Registration - These utilities and the documentation have been released for distribution as Shareware. You have been given the chance to sample the full capability of QWIK without risk! If you find that QWIK is a valuable tool, then you are expected to register. You will find a reasonable li- censing schedule found in LICENSE.ZIP to meet private or commercial needs. When registering, be sure to specify the version for Turbo Pascal you wish to receive. Source Code - All registered users will receive source code when the signed license agreement is returned with the registration. CUSTOMER SERVICE If you have questions, comments, or suggestions, the Eagle can be contacted by four means - (1) CompuServe, (2) telephone, (3) The Eagle BBS, or (4) mail. CompuServe - The most dependable way to contact the Eagle is through Compu- Serve. James (Jim) H. LeMay has written the TP7 version of QWIK and can be contacted using CIS mail with the CIS ID of 76011,217. Telephone - Jim can also be reached by phone at (817) 735-4833 on weekdays from 9:00 a.m. to 5:00 p.m CST. The Eagle BBS - You can also contact us on our 24-hour BBS at (214) 539- 9878, Intel 1200/2400/9600/14400 N81 V.42 MNP5. Mail - For registration or problems, please write: Eagle Performance Software 6341 Klamath Road Ft. Worth, TX 76116-1617 In your written request for resolving problems, be sure to include: . A diskette with compilable source code of the problem. . The Eagle product and version number. . The computer make and model. . The type of video card, video monitor and keyboard. Chapter 1, Introduction Page 4 QWIK Screen Utilities User's Guide, Version 7.1 ASP QWIK is a shareware program conforming to the standards of the Association of Shareware Professionals (ASP). You can get more information about ASP by writing to: Association of Shareware Professionals P.O. Box 5786 Bellevue,WA 98006 This program is produced by a member of the Association of Shareware Professionals (ASP). ASP wants to make sure that the shareware principle works for you. If you are unable to resolve a shareware-related problem with an ASP member by contacting the member directly, ASP may be able to help. The ASP Ombudsman can help you resolve a dispute or problem with an ASP member, but does not provide technical support for member's products. Please write to: ASP Ombudsman P.O. Box 5786 Bellevue,WA 98006 or send a CompuServe message via EasyPlex to ASP Ombudsman 7007,3536. Chapter 1, Introduction Page 5 QWIK Screen Utilities User's Guide, Version 7.1 2. G E T T I N G S T A R T E D This section will acquaint you with the files on disk and show you a brief demonstration. You will also run your first program with QWIK and then become familiar with all of the utilities. DISTRIBUTION FILES In this version, QWIK71.ZIP contains: Qwik71 .tpp: Compiled unit of assembly for TP7 DPMI. Qwik71 .tpu: Compiled unit of assembly for TP7 DOS. Qwik71 .pas: Source code for QWIK71.TPU. (ASM source code and object files are not included.) Qwik71 .doc: This document - a user's guide to QWIK. QwikDemo.pas: A demonstration program showing the features and speed of all procedures and is written primarily for color cards, but also works on mono cards. QwikRef .doc: QWIK Reference Guide document covering each procedure and variable in detail. Qinitest.pas: A program that verifies the equipment detected by the Qinit procedure. Qbench .pas: A timing program that shows "screens/second" for typical QWIK procedures. Strs .pas: Supplementary unit for number to string conversions. Timer24 .pas: High precision unit to measure elapsed time. License .zip: ZIP file containing license agreements. DEMONSTRATION To get an overview of the speed and features of QWIK, let's run a demonstration program that came with the utilities. Do the following steps. 1. Copy QWIK71.TPU to QWIK.TPU for TP7. 2. If you are running programs in a multi-tasking environment, instruct the environment that you are NOT writing direct to the screen. Also set text pages to 2. 3. Make, compile and run QWIKDEMO.PAS to get a feel for features and speed. 4. Press return when the screen prompts you to continue with "... press any key". 5. Before running QINITEST.PAS, read the source code header to see if you want to test for a computer submodel ID. SIMPLE PROGRAMMING First Program - Let's write a short program to see how simple it is to write with QWIK. While in the TP editor, enter the following code: uses Crt,Qwik; Chapter 2, Getting Started Page 6 QWIK Screen Utilities User's Guide, Version 7.1 begin TextAttr := Yellow+BlackBG; ClrScr; Qwrite (5, 1,Yellow+BlueBG,'QWIK writing'); Qwrite (5,13,Yellow+BlueBG,' is easy!'); end. Assuming you have already copied QWIK71.TPU to QWIK.TPU, compile and run the code. You can then see the text "QWIK writing is easy!" starting on row 5, column 1. On color monitors, the text is a yellow foreground with a blue background while monochrome monitors show high intensity on black. Row/Col vs. X/Y - You probably noticed that the row parameter is first and the column parameter is second. Since QWIK is entirely for text modes, it is more intuitive to specify the row first and the column second just like any word processor. The X/Y scheme is better suited for graphics. Attributes - Notice that our example uses the constant "BlueBG". QWIK provides eight convenient background color constants to use along with Turbo's 16 foreground colors. The same names are used, but the "BG" suffix is added: BlackBG RedBG BlueBG MagentaBG GreenBG BrownBG CyanBG LightGrayBG These allow QWIK to make the most of Turbo's constant folding. By simply adding the foreground and background constants together, the compiler saves the result as a single word. And, by simply reading the Qwrite statement, what you see is what you get (WYSIWYG). Readable Code - As an added benefit, QWIK was designed with human factors in mind and was made so that it is very easy to read the code you create. With the row, column, and attribute parameters first and the string last, you can see that the two Qwrite statements were easily aligned. WYSIWYG to the rescue again! Chaining - Notice that we had to calculate the string length of "QWIK writing" before we could locate the string " is easy". Let's modify the last statement to indeed make it easier to locate the last string: uses Crt,Qwik; begin TextAttr := Yellow+BlackBG; ClrScr; Qwrite (5, 1,Yellow+BlueBG,'QWIK writing'); QwriteEos (Yellow+BlueBG,' is easy!'); end. Now that was really easy! How did QwriteEos know where to write? QWIK internally keeps track of an End-Of-String (EOS) marker so that any subsequent "Eos" procedure like QwriteEos will chain the next string right there - no rows or columns to calculate! And you can chain as many as you want on to any other QWIK procedure. Chapter 2, Getting Started Page 7 QWIK Screen Utilities User's Guide, Version 7.1 Same Attribute - But suppose we did not want to change the attribute that was already on the screen and don't even know what it is. How is that done? Just modify the attributes to the following: uses Crt,Qwik; begin TextAttr := LightGray+BlackBG; ClrScr; Qwrite (5, 1,SameAttr,'QWIK writing'); QwriteEos (SameAttr,' is easy!'); end. The special constant SameAttr (which is negative) tells QWIK to simply enter the text on the screen without changing the attribute. The result of the program would show the text with LightGray on Black attributes. This special constant works on all QWIK utilities. When assigned to a variable, the attribute can even be switched at run time. Centering - Rather than having the text left justified, let's center the text on the screen by modifying a portion of the code: ... ClrScr; QwriteC (5, 1,80,SameAttr,'QWIK writing is easy!'); end. This will place the text on row 5 centered between columns 1 and 80 which is perfect for an 80 column text mode. But what if other text or column modes are used? How can we ensure that it is always centered? Only one simple change is needed: ... ClrScr; QwriteC (5, 1,CRTcols,SameAttr,'QWIK writing is easy!'); end. The variable CRTcols always has the value of the column width that is currently being used. How does it know? QWIK is initialized at startup by executing a procedure called Qinit. It detects a host of information about your video configuration, everything from the type of video card you are using to the shape of the cursor being used. You can see a list of all these variables available for your use in QWIKREF.DOC. PROCEDURES AND FUNCTIONS Now that you have a basic idea of what QWIK can do, let's make a brief survey of all the utilities in QWIK.TPU to just know what is available: One initializing procedure: Qinit - Initializing procedure executed by QWIK.TPU which sets the global variables for the QWIK procedures. It should be executed again after a change from one Chapter 2, Getting Started Page 8 QWIK Screen Utilities User's Guide, Version 7.1 text mode to another. Six quick direct screen writing procedures, all work with or without attribute change: Qwrite - For any type string or character (char). QwriteC - For any type string or char; self-centering. QwriteV - Like Qwrite but vertical writing. QwriteVC - Like QwriteC but vertical writing. QwriteSub - For any type variable, arrays or substrings. QwriteSubC - For any type variable; self-centering. Four quick direct screen filling procedures in Rows-by-Cols block parameters: Qfill - Repetitive filling with the same character; with or without attribute change. QfillC - Same as Qfill, but self-centering. Qattr - Repetitive filling with an attribute only. QattrC - Same as Qattr, but self-centering. Two quick screen storing procedures: QstoreToMem - Saves a Rows-by-Cols block to memory. QstoreToScr - Restores a Rows-by-Cols block to any screen page. Two quick screen storing procedures for copying blocks between a screen (Scr) and a virtual screen (Vscr - a screen in memory): QScrToVscr - Copies a Rows-by-Cols block from QWIK screen to virtual screen. QVscrToScr - Restores a Rows-by-Cols block from a virtual screen to the QWIK screen. Three quick screen reading functions for reading data from any screen: QreadStr - Reads a string of text. QreadChar - Reads a single character. QreadAttr - Reads an attribute. Two quick scrolling procedures work on any video page and also virtual screens without flicker or snow: QscrollUp - Scroll affected rows-by-cols block up. QscrollDown - Scroll affected rows-by-cols block down. Two quick video page changing procedures: QviewPage - Changes the page to be displayed - up to 8! QwritePage - Sets the page on which the QWIK procedures are writing. You don't have to write just on the displayed page! Three quick cursor procedures and functions which work on any video Chapter 2, Getting Started Page 9 QWIK Screen Utilities User's Guide, Version 7.1 page. They now work on the page being written rather than viewed: GotoRC - Move cursor to absolute row and column coordinates rather than relative to a window. WhereR - Returns absolute cursor row. WhereC - Returns absolute cursor column. Eight quick EOS (End-Of-String) marker procedures and functions that alter its position and/or the cursor. The marker can be moved on the CRT and virtual screens, while the cursor movement is only on the page being written: GotoEos - Moves cursor to EOS marker (like TP write). EosR - Returns absolute row of EOS marker. EosC - Returns absolute col of EOS marker. EosToRC - Sets EOS to a given row and column. EosToRCrel - Relatively shifts EOS by a number of rows and columns, and can be negative or positive. EosToCursor - Matches EOS to the cursor position. EosLn - Moves EOS to column 1 of the next row. QEosLn - Like EosLn, but scrolls up if past last row. Three cursor routines alter the cursor mode: GetCursor - Get current cursor mode from low memory. SetCursor - Sets new cursor mode. ModCursor - Modifies cursor mode to on, off or erratic blink saving current scan lines. Five quick EOS writing procedures that chain write at the EOS marker: QwriteEos - like Qwrite. QwriteEosV - like QwriteV. QwriteEosSub - like QwriteSub. QfillEos - like Qfill. QattrEos - like Qattr. A Submodel identification routine: GetSubModelID - Optional procedure to find IBM submodel ID. A routine to set screen pointers to Multi-tasking video buffers: SetMultiTask - Alters QWIK to write to the multi-tasking buffer. Five string functions that convert integers and reals to strings by using the supplementary STRS unit: StrL - converts LongInt to string StrLF - converts LongInt to string in a fixed Field StrR - converts Real to string StrRF - converts Real to string in a fixed Field StrRFD - converts Real to string in a fixed Field with a specified number of Decimals Chapter 2, Getting Started Page 10 QWIK Screen Utilities User's Guide, Version 7.1 For a full description of each utility with its parameters, please refer to QWIKREF.DOC for a summary of details and examples. Chapter 2, Getting Started Page 11 QWIK Screen Utilities User's Guide, Version 7.1 3. B A S I C T E C H N I Q U E S NUMBER TO STRING CONVERSION Str Procedure - TP7 handily converts numbers into strings with the Str procedure. For example: var MyNumber: integer; MyString: string; begin Str (MyNumber:7,MyString); Qwrite ( 1, 1,SameAttr,MyString); end. But this means that a data area must be reserved and the code isn't as readable as it could be. Str Functions - Instead, QWIK and the supplementary STRS unit let you use a function form of Str: uses Qwik, Strs; var MyNumber: integer; begin Qwrite ( 1, 1,SameAttr,StrLF(MyNumber,7)); end. Just like WriteLn, this lets the number remain in the Qwrite statement. There are five functions in the STRS unit and they can be used just like any other function: StrL - converts LongInt to string StrLF - converts LongInt to string in a fixed Field StrR - converts Real to string StrRF - converts Real to string in a fixed Field StrRFD - converts Real to string in a fixed Field with a specified number of Decimals The suffixes mean: L - LongInt, but any scalar will work R - Real F - Field width that is right justified format D - Number of decimals in the format The Str* functions actually use the Str procedure from TP7 to do the conversion. But with an InLine code trick, functions were created that don't recopy the string for the greatest speed. The code useage is also reduced. CURSOR MODE ROUTINES Three Routines - If you have ever struggled with controlling the shape of the cursor, your life is about to be made easier. With just three Chapter 3, Basic Techniques Page 12 QWIK Screen Utilities User's Guide, Version 7.1 routines, SetCursor, GetCursor, and ModCursor, you can consistently and reliably control the cursor mode (shape and visibility) on any video card! Four Standard Modes - To make it even easier, four standard cursor mode variables are initialized at startup to fit the exact requirements of the detected video card. They are: CursorUnderline - The standard underline cursor. CursorHalfBlock - The half block shape usually used for insert editing. CursorBlock - An easy to find full cell cursor. CursorInitial - The mode detected at start up. So, if we wanted a full block cursor, only one line of code is needed: SetCursor (CursorBlock); And that's it! There's nothing else to figure out - even if you are using something like 43-row mode on an EGA card. When ending your programs, you can get back to the original cursor mode by using: SetCursor (CursorInitial); Hidden Cursor - Many programs need to hide the cursor altogether. This can be done with ModCursor: ModCursor (CursorOff); Why use ModCursor instead of SetCursor? ModCursor leaves the shape of the cursor alone, and only alters bits 13 and 14 of the cursor mode to turn it on or off. In fact there are three constants that are useful with ModCursor: CursorOff ($2000) - To turn the cursor off. CursorOn ($0000) - To turn the cursor back on with the same shape. CursorBlink ($6000) - To create erratic blinking on MDA/CGA. (On EGA/VGA, it turns the cursor off.) Using your imagination, you can also mix and match the constants and variables by logically summing them. Let's say we want to change the shape of the cursor to a block while it is still turned off: SetCursor (CursorBlock or CursorOff); So, the next time ModCursor(CursorOn) is used, the cursor will be a full block. As a suggestion for terminating your program, be sure to restore the cursor in your exit procedure with: SetCursor (CursorInitial); GetCursor - This function simply returns the current cursor mode value stored in low memory allowing you to save it for later use. Chapter 3, Basic Techniques Page 13 QWIK Screen Utilities User's Guide, Version 7.1 CURSOR LOCATION ROUTINES QWIK has three routines that complement the CRT unit - GotoRC, WhereR, and WhereC. They correspond with the familiar GotoXY, WhereX, and WhereY. However, there are some important differences: . The QWIK routines are absolute to the screen and are not restricted by the Turbo window. . The suffixes "R" and "C" mean row and column, so the parameters of GotoRC are reversed from GotoXY. . The QWIK routines will also work on any video page. This is explained in the Advanced Techniques section later. This is not the only way to move the cursor. The EOS marker is also a very powerful aid as you will see in the next topic. EOS MARKER Invisible Alternate Cursor - From the examples in the Simple Programming topic, we found that we could easily chain two strings together using the EOS marker. In fact, this marker is so versatile, the EOS marker utilities can be made interchangeable with the cursor, but much faster. You could think of it as an alternate cursor that is invisible. Keeping Track - Any time a QWIK writing procedure is used, the EOS marker is updated. It is actually saved as the global variable QEosOfs. Technically, the value is the offset from the screen base and is a 0-based byte count. For example, if the following procedure was executed: Qwrite (6,5,Yellow,'Important Data'); the EOS would be at row 6, column 19, right after the word "Data". The value of QEosOfs on an 80 column screen would be: QEosOfs = ((Row-1)*CRTcols + (Col-1)) * 2 = 836 QWIK does not need to calculate this value, but simply saves it after writing, so it is very efficient. From the overview, you are already aware of the four routines that will start writing at this marker - QwriteEos, QwriteEosA, QfillEos, and QattrEos. But what about changing the location of the marker itself? Keep reading. Moving the Marker - QWIK has four routines that will manually move the EOS marker: EosToRC - Sets EOS to a given row and column. EosToRCrel - Relatively shifts EOS by a number of rows and columns, and can be negative or positive. EosLn - Moves EOS to column 1 of the next row. QEosLn - Like EosLn, but scrolls up if past last row. The basic procedure EosToRC moves the EOS marker exactly like GotoRC does for the cursor. But there are also several ways to move the marker relatively. Let's test a short program: Chapter 3, Basic Techniques Page 14 QWIK Screen Utilities User's Guide, Version 7.1 uses Crt,Qwik; begin TextAttr := Yellow; ClrScr; Qwrite ( 1, 1,Yellow+BlueBG,'First Row '); EosLn; { Jump to (2,1) } QwriteEos (Yellow+BlueBG,'Second Row '); EosToRC ( 3, 1); { Jump to (3,1) } QwriteEos (Yellow+BlueBG,'Third Row '); EosToRCrel ( 1,-4); { Jump to (4,8) } QwriteEos (Yellow+BlueBG, 'etc.'); EosToRC (succ(EosR),8); { Jump to (5,8) } QwriteEos (Yellow+BlueBG, 'etc.'); end. Compile and run the program. You should see "Row" and "etc." all aligned in one column. So, you can see that there are several simple ways to move the marker! EOS and the Cursor - You can also interface the EOS marker and the cursor with two procedures: GotoEos - Moves cursor to match the EOS marker. EosToCursor - Sets the EOS marker to match the cursor position. It can't get any simpler than that! Now you can see that: Qwrite (1,1,Yellow,'Test Line'); GotoEos; and, TextAttr := Yellow; GotoXY (1,1); Write ('Test Line'); produce identical results. But QWIK is much faster! SCROLLING Improved Control - With the CRT unit, you can only control the full screen size with WriteLn. But with the two QWIK routines, QscrollUp and QscrollDown, you can define any area to be scrolled: QscrollUp ( 2, 2,CRTrows-2,CRTcols-2,MyAttr); This example scrolls a portion of the screen starting at (2,2) leaving a one character border. In a 25x80 text mode, it clears row 24 from column 2 to 79. In addition, the cleared row attribute is MyAttr. Improved Performance - With QscrollDown and QscrollUp (called Qscroll* for brevity), your programs can overcome the BIOS problems on many machines. Transparent to you, these procedures work on all cards and machines without Chapter 3, Basic Techniques Page 15 QWIK Screen Utilities User's Guide, Version 7.1 flicker or snow and operate at three speeds: Maximum - for video cards without snow Fast CGA - for CGA cards on 80286 machines or better Slow CGA - for CGA cards on 8086/8088 machines Qinit detects the CPU ID and video card to select the fastest algorithm. All speeds use 16-bit transfers rather than 8-bit. So, you can be assured of the highest performance. Cursor Location - These routines do not move the cursor. However, EOS is pointing to the first column of the blank line and GotoEos will move the cursor there if needed. QEosLn - This procedure is another alternative to full screen scrolling. It has the same function as EosLn, but will additionally scroll the screen up if the EOS marker is past the last row. Then it simply calls QscrollUp. The attribute of the cleared row is the global variable ScrollAttr. You must set this prior to using QEosLn. POP-UP WINDOWS QWIK has the basic tools to create and remove pop-up windows. Let's try to create one. While in the TP editor, enter the following code: uses Crt,Qwik; var MyWindow,MyUnderlay: array[1..250] of word; begin { -- Fill the screen with a hatch character. -- } Qfill ( 1, 1,CRTrows,CRTcols,LightGray+BlackBG,#176); { -- Create a pop-up window.-- } QstoreToMem ( 5,12,10,25,MyUnderlay); { Save area to be covered } Qfill ( 5,12,10,25,Black+LightGray,' '); { Clear the area } QwriteC (9,12,36,SameAttr,'Pop-Up Window'); { Label window } delay (1000); { Wait a sec } QstoreToMem ( 5,12,10,25,MyWindow); { Save a copy } QstoreToScr ( 5,12,10,25,MyUnderlay); { Restore screen } { -- Move window some where else. -- } QstoreToMem ( 8,25,10,25,MyUnderlay); { Save area to be covered } QstoreToScr ( 8,25,10,25,MyWindow); { Move window } delay (1000); { Wait a sec } { -- Remove window. -- } QstoreToScr ( 8,25,10,25,MyUnderlay); { Restore screen } end. Compile and run the code. You will see a 10 row by 25 column window located at (5,12) which is row 5, column 12 . After one second, it will be moved to (8,25). Then after another second, it is removed from the screen. We did a lot of work with very little code! Rows-by-Cols - QstoreToScr and QstoreToMem are screen saving and restoring procedures that conveniently work in row-by-column blocks. They accommodate any column mode, so there is no need to be concerned about Chapter 3, Basic Techniques Page 16 QWIK Screen Utilities User's Guide, Version 7.1 screen width. Memory Requirements - Notice that QstoreToMem wrote the data direct to memory in MyWindow. It is important that the memory allocated to that variable is correct to prevent it from overwriting any other variables. The array size chosen was a 250 word array which is a perfect fit since one word is needed for each character and attribute on the screen. If you prefer, the heap can also be used such as: var MyUnderlay: pointer; begin GetMem (MyUnderlay,500); QstoreToMem ( 5,12,10,25,MyUnderlay^); { ... } FreeMem (MyUnderlay,500); end. Chapter 3, Basic Techniques Page 17 QWIK Screen Utilities User's Guide, Version 7.1 4. A D V A N C E D T E C H N I Q U E S This section will acquaint you with the powerful virtual screen writing features already built into QWIK. You will also find out easy it is to work on multiple video pages and how to accommodate video mode changes. VIRTUAL SCREENS This topic will show you how to create and use powerful virtual screens. Virtual Screen - Just what is a virtual screen? It is a screen maintained in RAM of any dimensions that can be reproduced on the CRT in full or in part. The advantages are: . Variable row-by-column screen . Large video buffer up to 64k . High speed in RAM . Unlimited number of screens Screen Record - QWIK uses seven variables to define any screen. At start up, QWIK initializes them to the video system detected: CRTrows - Number of rows CRTcols - Number of columns CRTsize - Byte allocation for screen Qsnow - True if snow checking needed QEosOfs - EOS offset QScrOfs - Screen offset QScrSeg - Screen segment / selector To make data access even easier, all these variables are contained in the record QScrRec of VScrRecType. In addition, QScrPtr is absolute to QScrOfs and QScrSeg. This gives QWIK a true far pointer, so screens can be anywhere in memory and not just paragraph aligned! Creating Virtual Screens - In three easy steps, you can easily create a virtual screen: 1. Allocate memory for the screen. 2. Save the current screen record. 3. Modify the screen record for the virtual screen. Let's write some code that does just that: uses Qwik; var CRTrec,VScrRec: VScrRecType; begin with VScrRec do { create specs for virtual screen } begin Vrows := 80; { Let's choose 80 rows } Vcols := 100; { Let's choose 100 columns } Vsize := Vrows * Vcols shl 1; Vsnow := false; { Can always be false } VEosOfs := 0; { Be safe and start at the base } Chapter 4, Advanced Techniques Page 18 QWIK Screen Utilities User's Guide, Version 7.1 GetMem (VScrPtr,Vsize); { Allocate heap space } end; CRTrec := QScrRec; { Save CRT specs } QScrRec := VScrRec; { Set virtual specs } { ... } { Write to the virtual screen } QScrRec := CRTrec; { Restore CRT specs when done! } end. Now, when you use any QWIK routine, they can be directed to the virtual screen - writing, reading, scrolling, wrapping, and everything you would expect. Qsnow can always be false when writing to virtual screens since RAM is used and not video card memory. Cursor Control - One thing not available to virtual screens is cursor movement, because the cursor location is reserved by DOS for just video pages. That means there is no cursor available for virtual screens. So, how can we get around this? The EOS marker comes to the rescue as an indispensable cursor! All EOS routines can still be used as before. Taking a Peek - At some time, we will need to take a look at all or a portion of the virtual screen by copying it to the CRT. Two inter-screen procedures do this by blocks at high speed - QScrToVscr and QVscrToScr. Here are the parameters of QVscrToScr: QVscrToScr (Row,Col,Rows,Cols,Vrow,Vcol,Vwidth,VScrPtr); Just like QstoreToScr, Row, Col, Rows, and Cols describe the position and size on the screen (Scr). This screen is specified by QScrRec which is usually the CRT. VScrPtr points to the virtual screen (Vscr). Now, where is the same size block on Vscr? It's at Vrow and Vcol. But the Vscr may have a different column width than CRTcols. So you specify that with Vwidth. Only the Scr side checks for possible snow. These procedures are extremely fast making virtual screens very practical. See QScrToVscr and QVscrToScr in QWIKREF.DOC for more examples. Multiple Virtual Screens - By changing QScrRec, you can even copy blocks from one virtual screen to another! These routines do not affect QEosOfs. VIDEO PAGES Multi-page Cards - TP7 procedures such as Write, Window, and GotoXY are dedicated to just page 0, but many video cards have more than one page. If you have a CGA or better, you already have memory on your card for 4 to 8 pages. Since the BIOS recognizes them as well, QWIK gives you access to these extra pages. Page Control - QwritePage and QviewPage give you the power to use QWIK on all video pages and display which ever you choose. On a multiple-video page card like CGA, you can simply code: QwritePage (MyPage); to make all QWIK routines be directed to your selected video page even though you could be viewing another page. To view a page, you can in turn Chapter 4, Advanced Techniques Page 19 QWIK Screen Utilities User's Guide, Version 7.1 simply code: QviewPage (MyPage); Tips About Pages - Here are some tips to keep in mind when using several video pages: . The highest valid video page is detected by Qinit and saved in the variable MaxPage. . Invalid page parameters are just ignored. . The BIOS reserves a separate cursor location for each of up to 8 video pages. . There is only one possible cursor mode which is always displayed on the CRT. . The cursor location routines operate on the page being written rather than viewed. . The current video page viewed is found with VideoPage. . The current video page set by QwritePage is saved in QvideoPage. . Be sure to end your programs with "QviewPage (0);". VIDEO MODES CRT Unit - If you intend to use the CRT unit with QWIK, it is best to place the CRT unit first in the "USES" list. When the CRT runs its initialization code, it checks for the video mode to see if it is a valid text mode (0..3,7). If so, it remains in that mode. If not, it is in a graphics or extended column mode and is forced back into the computer's default text mode as set by the equipment flag at $40:$10. By having the CRT unit first, you can be assured of a valid text mode when Qinit is run. Changing Text Modes - Your application may require a change in video modes for different row or column modes. If so, after the mode is changed, run Qinit again so the video variables will be correct. TextAttr - Be advised that a change of text modes with the CRT unit will also change TextAttr. It is set to what ever attribute is at the cursor. Graphic Modes - If you need to alternate with a graphics mode, Qinit does not need to be run provided you return back to the same text mode. Of course you may want to save the screen with QstoreToMem before switching to graphics. Changing Monitors - The technique to change monitors is to simply change the text mode. This means Qinit should be run again. Be sure to toggle the video mode bits in the equipment list byte at $40:$10 so other applications can behave properly. CursorInitial - When QWIK is initialized, CursorInitial saves what it detects for the current video mode. Whenever Qinit is run again, CursorInitial is also changed. This may affect how you restore the cursor when terminating. If needed, the value should be saved before using Qinit. Chapter 4, Advanced Techniques Page 20 QWIK Screen Utilities User's Guide, Version 7.1 MULTI-TASKING ENVIRONMENTS Multi-Tasking - QWIK works very well with multi-tasking environments such as DESQview. For examples on how to let QWIK work in DESQview specifical ly, see a file called DESQ70.ZIP or a later version. SetMultiTask - A simple procedure has been included that generically detects the presence of DESQview, TopView, TaskView, OmniView, MS Windows or IBM 3270 PC multi-tasking video buffers (MTVB). If they are being used, SetMultiTask will alter QScrPtr, Page0seg, and Qsnow correctly. This is a very simple task. All of the *.PAS files included with the code show where the SetMultiTask declaration is to be placed early in the program. If you are unsuccessful in getting it to work as you would expect, give us a call. InMultiTask - If SetMultiTask did indeed alter QScrPtr for the MTVB, then InMultiTask is set to true. Multiple Video Pages - Be sure to instruct the multi-tasking environment of the number of video pages that are being used for your program. Since some environments cannot correctly use multiple pages with the MTVB such as DESQview 2.01, it has been disabled in the demos with the use of InMultiTask. Cursor Routines and the BIOS - All cursor routines that change the mode and location use the BIOS. This way multi-tasking environments can handle redirection properly. INTERRUPTS Within QWIK - QWIK only uses video interrupt $10 for Qinit and the cursor routines so there no problem with DOS re-entry. Please read about "System Hardware" on page 22 for more information on procedure GetSubModelID which uses INT $15. Creating Handlers - If you use interrupt calls (like a clock display) within your program that use QWIK routines, be sure to save and restore the value of QScrRec in the call so it won't return to the main program with unexpected results. You should also be aware that main program may be writing to a virtual screen during the interrupt, so it is best that you initialize a copy of a QScrRec solely for the interrupt. Chapter 4, Advanced Techniques Page 21 QWIK Screen Utilities User's Guide, Version 7.1 5. H A R D W A R E D E T E C T I O N DISPLAY COMBINATION CODE Qinit Procedure - Qinit initializes all the variables needed for the QWIK procedures. And specifically checks for ALL IBM video equipment including dual monitors. Qinit is initialized by the unit at start up. Display Combination Code (DCC) - The PS/2 video BIOS has a new function that simplifies equipment detection called the Read/Write Display Combination Code. Using interrupt $10 with AH = $1A00, the call will return the Active Display Device in BL and the Alternate Display Device in BH. If the function is supported, it also returns $1A to AL. For the possible Display Device codes which have been assigned by IBM, see QWIKREF.DOC. Conforming to DCC - No results are obtained for the DCC on anything other than PS/2 equipment. However, to be consistent, Qinit was reprogrammed to conform to the DCC for ALL equipment. To see if a CGA is in use, simply check to see if ActiveDispDev=CgaColor. Qinit only sets the parameters for the active display. Dual Monitors - Qinit detects dual monitors and saves both the active and alternate display device codes. The alternate display device code is for testing purposes only. If you change monitors in a running program, Qinit should be executed again. Qinit check for Hercules cards only if you are in monochrome mode. Testing for Dual Monitors - Qinit makes an attempt to detect for a second monitor by several means. If no alternate cards like EGA or VGA are found, an alternate 6845 video chip (CGA, MDA, or Hercules) is checked. If the chip is found, then further tests are made to find which card it could be. The chip existence test is highly reliable. If no alternate display device is found, then AltDispDev=NoDisplay. Switching Monitors - When switching between Mono and some other color mode, some PC hardware requires the INT $11 equipment flags to be altered prior to using Crt.TextMode. For sample code, see the PreTextMode procedure in the QINITEST.PAS test program. HavePS2 - 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 in 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. Have3270 - If Qinit detects 3270 PC equipment/software, this variable is set to true. In addition, the ActiveDispDev is either MdaMono or CgaColor. Note: There may or may not be graphics capability in either case; Qinit is not meant to detect graphics. If Have3270 is true, then ActiveDispDev3270 will be set to the proper code. On the 3270 PC, dual monitors are not possible as they use the same physical buffer space. In addition, even though a color monitor maybe used, there is only one video page unless there is a special adapter. However, Qinit will determine if more than Chapter 5, Hardware Detection Page 22 QWIK Screen Utilities User's Guide, Version 7.1 just one page is available. The 3270 PC also does not support 40 column modes. EGA Switches - 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 now directly tests for the alternate device rather than assuming it. EGA Information - The byte located at $0040:$0087 has hardware status information when the EGA (or VGA) is present. PC Convertible (PCC) - Since the PCC also does not support the DCC, a separate code is used. If the 5140 LCD is used in mode 7, the Active Display Device is set to MdaMono which is close enough. This set up can be verified by testing if MaxPage=3. The alternate display is found by using interrupt $10 with AH=$15. The result is saved in AltDispDevPCC. Of course the variable is undefined if a PCC is not used. Hercules - Hercules cards are also detected. If either the active or alternate DCC is MdaMono, which is found by verifying a responsive 6845 video chip at the mono register port, then an attempt is made to find if any Hercules card is attached. If no Hercules card is found, then HercModel=NoHerc; it is then assumed that just an MDA card is attached. Because the test can take up to 1/3 of a second on slower computers, this test is only run once, even if Qinit is executed again. The tests for the Hercules cards are the ones recommended by Hercules Computer Technology, which also admits that sometimes the tests will fail during multi-tasking activity. Hercules clones may not be detected by these tests, but the DCC will be correct. SNOW CHECKING CGA Snow - QWIK is conservative with CGA cards and uses snow checking when the card is detected. However, it is not needed in 40 column modes 0 and 1. Qinit was programmed to accommodate this. For other hardware, you can change Qsnow to suit your needs, but CardSnow should be left unchanged to save what Qinit detected. Zenith CGA - Zenith CGAs do not need wait-for-retrace. If you would like to accommodate this, you can execute the following procedure early in your programs and to be run after each Qinit: Chapter 5, Hardware Detection Page 23 QWIK Screen Utilities User's Guide, Version 7.1 procedure CheckZenith; type CharArray8 = array[1..8] of char; var ZdsRom: ^CharArray8; begin ZdsRom := Ptr(SegF000,$800C); if Qsnow and (ZdsRom^='ZDS CORP') then begin Qsnow := false; CardSnow := false; end; end; CheckSnow - If you plan on using the standard CRT unit, place the following line early in your programs and after each Qinit. CheckSnow := Qsnow; Qinit appears to be more extensive in it's testing for wait-for-retrace. Then, Write and WriteLn will work faster if DirectVideo is true. Critical Timing - The timing on the IBM PC (Intel 8088 at 4.77MHz) with a CGA is critical for storing characters and attributes with 16-bit transfers because of the CPU architecture and slow speed. Although previous versions kept the timing as tight as possible, there still remained a hint of snow in column 1. This is due to the problem that RAM runs a little slower than BIOS ROM. This problem has now been solved with a minor code change. So the routines still run at the same speed, but there is absolutely no snow! I am not aware of any other routines that have done this as closely. (Computers with slower access RAM chips may still show up some variations from time to time. Feedback is requested.) SYSTEM HARDWARE System ID - The basic computer system identification (or model) for IBM computers can be found by directly accessing the byte in memory at $F000:$FFFE. To be compatible with DPMI, you should use the SegF000 value for the segment instead of $F000. It will work for both DOS and DPMI. SubModel ID - After production of the AT, models were also given Submodel IDs. To get both the model and submodel ID, you must use interrupt $15 with AH=$C0 which only works on some computers. A few PC and XT clones like the AT&T 6300 will actually crash when this interrupt is executed due to BIOS bugs. The manufacturers do have new BIOS chips to fix this. However, to prevent this from happening, the procedure only lets SystemIDs of $FC or less get the SubModelID. In addition, it was made into a sepa rate procedure called GetSubModelID and is no longer apart of Qinit. So you will have to execute it yourself to get a result. The routine is entirely optional and is not required by QWIK. CPU Identification - A CPU detection routine has been included for Intel processors. It is useful for clones that do not recognize IBM's system ID scheme. The idea came from Juan Jimenez as it appeared in Jan/Feb '88 Chapter 5, Hardware Detection Page 24 QWIK Screen Utilities User's Guide, Version 7.1 Turbo Technix magazine. The routine has been simplified for reduced code and enables use of simple constant identifiers. This routine is required for Qscroll*. TIPS EgaMono - You should be aware that another constant also named EGAMono is used by the DetectGraph procedure in the Graph unit, but fortunately, they have the same value! Longer names - If you wish to be more explicit with procedure, function, and variable names, you can always add the unit name as a prefix: Qwik.GotoRC (1,1); MyCols := Qwik.CRTcols; Chapter 5, Hardware Detection Page 25 QWIK Screen Utilities User's Guide, Version 7.1 A P P E N D I X A : V I D E O M O D E T A B L E Video Modes - To help you figure out how the all IBM video systems are configured, it is helpful to have a table of all the possible Alphanumeric (A/N or text) modes. QWIK was not designed for the All Points Addressable (APA or graphics) modes. TABLE 1: Hardware Specific Video Mode Characteristics ------------------------------------------------------------------------------- Mode Format Segment Display Box MDA CGA EGA MCGA VGA PCjr PCC 3270 HGC MaxPage ---- ------ ------- ------- ---- --- --- --- ---- --- ---- --- ---- --- ------- 0,1 40x25 B800:0 320x200 8x8 x x x x x x 7 320x350 8x14 x x 7 320x400 8x16 x 7 360x400 9x16 x 7 2,3 80x25 B800:0 640x200 8x8 x x x 3 640x200 8x8 x x 7 * 640x350 8x14 x x 7 * 640x400 8x16 x 7 720x350 9x14 x 0+ 720x400 9x16 x 7 7 80x25 B000:0 720x350 9x14 x x x x 0 720x350 9x14 x x 7 * 720x400 9x16 x 7 640x200 8x8 x 3 ------------------------------------------------------------------------------- Legend: Format - Characters per row by the number of rows in the data area. Segment - Address of the first character on page 0 of the display buffer. Display - The pixel resolution for the data area excluding the border, horizontal by vertical. Box - The pixel resolution for each character, horizontal by vertical. MDA - Monochrome Display and Printer Adapter CGA - Color Graphics Adapter EGA - Enhanced Graphics Adapter PGC - Professional Graphics Controller MCGA - Multi-Color Graphics Array VGA - Video Graphics Array PCjr - PC Junior PCC - PC Convertible HGC - Hercules Graphics Cards - HGC, HGC Plus, and InColor Card 3270 - All IBM 3270 PC adapters MaxPage - 0-based highest page number; e.g. 7 means there are 8 pages. MD - 5151 Monochrome Display CD - 5153 Color Display ECD - 5154 Enhanced Color Display Notes: 1. The 0 and 2 modes suppress color burst only on composite displays (not RGB) only for CGA and EGA. Appendix A: Video Mode Table Page 26 QWIK Screen Utilities User's Guide, Version 7.1 2. The PS/2 model 25 and 30 have an integrated MCGA. The model 30/286, model 50 and above have an integrated VGA. 3. The 8514 High Content Color Display along with the 8514/A adapter produces a superset of the VGA for APA, but there are no differences in the A/N modes to the VGA when the adapter is in "VGA" mode. See IBM documentation for Advanced Function Mode. 4. MaxPage is reduced to 3 if EGA only has 64K graphics memory installed for modes marked "*". MaxPage of 7 is for 128K or more. 5. The PCC can have either an alternate MDA or CGA. The LCD (model 5140) can emulate either the MDA or CGA modes, but the MDA mode is 640x200. 6. No information is provided on the PGC. Appendix A: Video Mode Table Page 27 QWIK Screen Utilities User's Guide, Version 7.1 A P P E N D I X B : C U R S O R M O D E D A T A Each video card differs in character cell size and cursor emulation in different video modes. The following data will show you the specific differences between modes and cards, and how QWIK handles them. CURSOR MODE TABLES Cursor Mode Word - The cursor mode is saved in low memory at $40:$60 after each mode change. Using hex is the easiest way to analyze the word. The shape of the cursor is defined by horizontal scan lines in the character cell where the top row is of any cell is 0. TABLE 2: Cursor Mode Word ------------------------------------------------- Hi byte Lo byte ----------------------- ----------------------- Bit #: 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 Bit #: 07 06 05 04 03 02 01 00 07 06 05 04 03 02 01 00 Symbol: $ $ * * * * * @ @ + + + + + Key: $ - controls cursor on/off and erratic blinking * - controls top scan line (0-based) @ - controls skew to the right + - controls bottom scan line (0-based) Skew - Bits 5 and 6 control the skew or shift to the right of the cursor on EGA/VGA cards. Consistent results between video cards is not possible so it is best to leave these bits at zero. Cell Sizes - Because of different cells sized with different video cards, the top and bottom scan lines are also different for each card. See TABLE 1 in Appendix A for specific cell sizes. TABLE 2: Cursor Mode Defaults ---------------------------------------------------------- Adapter Default Comments -------- ------- --------------------------------------- MDA $0B0C CGA,MCGA $0607 EGA $0B0C MD, ECD (640x350 25-line) Emulation off EGA $0607 CD, ECD (640x200) VGA $0D0E Emulation off 3270 PC $0D0D And converts MDA and CGA CURSOR EMULATION Cursor Emulation - Qinit sets the four standard cursor mode variables at startup to be either MDA or CGA defaults. Almost all emulation modes can be handled by either of these two cell sizes. Qinit handles certain exceptions. If you want to handle your own exceptions, the following notes will help you. Appendix B: Cursor Mode Data Page 28 QWIK Screen Utilities User's Guide, Version 7.1 CursorBlink - This mode is hardware specific. It works on MDA and CGA while it turns the cursor off on EGA and VGA. MCGA/VGA Cursor Mode - On these two cards, you can both read and write the cursor mode direct from the CRTC. To be compatible with all video cards, QWIK does not attempt to do this, but instead depends on the Video Display Data Area at $40:$60. Qinit turns on the cursor emulation mode if PS/2 video equipment is detected. EGA Cursor Emulation - In 25-line mode on the EGA, cursor emulation works fairly well. In other line modes, the emulation falters. So just like CRT unit, Qinit forces emulation to be turned on in 25-line mode and off in other modes. On the EGA, emulation is turned off by setting bit 0 of EgaInfo to 1. The standard QWIK cursor modes are still set appropriately. MCGA Cursor Emulation - Use the CGA cursor cell size even though the character cell is 8x16. The BIOS multiplies the start and end rows by 2 and then adds one to the end row before writing to the hardware video port to emulate the CGA. VGA Cursor Emulation - Qinit turns the cursor emulation mode on so you don't have to worry about special fonts and cells sizes as it emulates the MDA and CGA. The video BIOS will adjust your cursor shape to fit in the current cell size. For the algorithms specific to the VGA, refer to the "IBM BIOS Interface Technical Reference Manual". 3270 PC Peculiarities - The 3270 PC cursor types are limited to only three. In addition, the underline cursor is not visible on a white background on the 5272 color display and it is advisable to use a block cursor together with that attribute. Notice that half-block cursors are converted to full block: TABLE 3: 3270 PC Cursor Modes -------------------------------------------------------------- Cursor Type Comments ------------ ------------------------------------------------ Underline $0D0D only. CGA and MDA are emulated. Hidden (off) cursor start > cursor end. $2000 is preferred. Block anything other than the above Start Up Cursor Modes - Once QWIK determines the cell size and the cursor emulation mode, the four standard cursor modes, CursorInitial, CursorUnderline, CursorHalfBlock and CursorBlock are calculated: CursorInitial - This is the cursor mode detected at startup. An improper default for MDA is automatically overridden to an underline. Some early PCs have a BIOS bug that sets the MDA default incorrectly. CursorUnderline - The lower scan line is set to: (BottomOfCell-1). The upper scan line is set to: (LowerScan-1). Appendix B: Cursor Mode Data Page 29 QWIK Screen Utilities User's Guide, Version 7.1 CursorHalfBlock - The top scan line is set to: (BottomOfCell+1)/2. This may appear a little fat for EGAs in 25-line mode, but is just right for all other cards and modes. CursorBlock - Produces a block cursor by setting the top scan line to zero of CursorUnderline. Appendix B: Cursor Mode Data Page 30 QWIK Screen Utilities User's Guide, Version 7.1 A P P E N D I X C : P E R F O R M A N C E CODE SIZE If you use a QWIK procedure, only the corresponding object file containing that procedure will be linked and thereby optimizing the code. Even if all procedures are used, QWIK is still quite small at a total of 2831 bytes while the STRS unit is 240 bytes. Starting with version 7.0, each individ ual routine has been given a separate object file to keep the code as small as possible. SPEED How fast is fast? To have a basis for comparision, a unit of "screens/second" is used to get a feeling for speed. To make one screen, a procedure is repeated with a FOR loop to fill several 80x25 pages and timed. Qwrite- uses 80 character strings, and Qattr and Qfill use Rows:=25 and Cols:=80. Here are some samples from the systems that have been tested. 16-bit video cards such as the one in the Compaq 386/20 will be much faster than 8-bit cards. ------------------ S C R E E N S / S E C O N D ----------------- Chng XT(4.77 MHz) M30 M50 M70 ATT+ Compaq Procedure Attr EGA CGA MCGA VGA VGA CGA 386/20 --------- ---- ------------ ----- ----- ----- ---- ------ Qwrite- Yes 32.8 9.5 75.4 88.4 113.3 16.8 418.4 No 42.4 9.5 90.0 138.1 191.9 16.8 450.4 Qfill- Yes 81.2 11.8 164.1 147.3 151.0 21.5 579.6 No 73.7 7.4 141.3 174.4 251.0 13.9 574.9 Qattr- Yes 72.6 7.4 141.3 174.4 254.9 14.0 570.3 Qstore- n/a 59.1 7.2 111.6 127.4 139.4 13.8 351.8 Qscroll- n/a 32.9 5.6 62.2 71.1 77.7 16.8 317.9 Be sure to test QBENCH.PAS for virtual screens and find another significant increase in speed. All routines will be at least 100 Scr/Sec, and 500 Scr/Sec is typical. For those interested in comparisons, QWIK is much faster than the TP7 direct video routines by the following percentage: Procedure CGA cards All Other cards --------- --------- --------------- Writeln 125% 650% TP COMPILERS The source code will compile only under all TP compilers from 7.0 upward. If you have the source code and want to recompile QWIK, be sure to use the correct directives at the top of the file by locating the "$" on the appropriate line. This a simple but important task. The important directive in TP7 is the alignment directive $A-. It must be turned off or QScrRec will not be addressed correctly. Appendix C: Performance Page 31 QWIK Screen Utilities User's Guide, Version 7.1 A P P E N D I X D : A P P L I C A T I O N P R O D U C T S SPEEDPACK II SpeedPack II is a commercial product specifically for Borland/Turbo Pascal 7.0. Here are excerpts from our press release: Product Name: SpeedPack II version 7.01 (32-bit specific version) Product Type: Programming Tools Environments: Turbo / Borland Pascal 7.0 (DOS, DPMI, and Windows) Package Contents: One high-density disk Files on disk: 40 files plus 190 compressed files. Includes fully disk- based manuals and Windows 3.1 help files Disk space: About 1.2Mb total for all environments Price: $99.00 (call for discounts!) Guarantee: 30-day money back guarantee Availability: February 15, 1993 PRODUCT OVERVIEW: SpeedPack II provides the Borland Pascal programmer with easy tools to significantly increase the performance of applications by advancing to 32- bit specific platforms in DOS, DPMI, or Windows with minimal effort. The package includes 32-bit System units and an extensive string-handling unit. PRODUCT DESCRIPTION: To increase performance, SpeedPack II allows the programmer to dedicate applications for 16-bit or 32-bit platforms. The System unit in the Run- Time Library (RTL) has been completely rewritten to take advantage of 32- bit CPUs. A one-step RTL management utility allows the programmer to choose platforms using only one button while using the Borland IDE. The programmer simply recompiles his program to incorporate 32-bit performance without changing the source code in any way. The resulting applications are 100% compatible. Additional System units have been included to increase 6- byte real floating point performance and precision that surpasses the Borland units. Units incorporate Borland's 7.01 maintenance version changes. The System units speed up math, reals, strings, number/string conversions, text file I/O, file access, sets, heap allocation, and memory transfer. Performance improvement depends on the programmer's software design. Specific increases for each routine are shown below. On the "average," applications may improve from 40 to 100% in speed. Utilities have been included for the programmer to test the difference in performance between 16- and 32-bit platforms. One-step management utilities are provided for both DOS and Windows. SpeedPack II also comes with a high-speed string unit with 130 string processing routines all written in assembler with 1,400,000 strings/minute average speed. The unit can be used in either 16-bit or 32-bit platforms. Identifiers use C-like mnemonics and are well organized. The Windows Appendix D: Application Products Page 32 QWIK Screen Utilities User's Guide, Version 7.1 version includes a 350-page help file with cut-and-paste examples for each routine. Categories include case, classification, comparison, conversion, find/replace, insert/delete, justification, membership, operations, parsing, patterns, placement, position, quantity, sort, tabs, and ASCIIZ. Many routines have match/ignore case alternates. Code usage is only 7.2kb for all routines. Complete source code is included. ** OUR NON-OBJECTIVE INFORMATION ** Did you see our ad in the Borland Et Cetera catalog? It's there. Missed it? OK, Borland and Turbo Pascal programmer's, moving up to full 32-bit power is just a compile away. We're serious about how easy this is. Push ONE button and presto! 32-bit performance. Borland only added 32-bit power to their longint operations. We added it everywhere! We spent almost three years in the development in this project and wanted to make sure it was magic and effortless. Absolutely no code changes. Doesn't matter who's code you've used. It will work the first time. NO DEBUGGING NECESSARY. And check out the string unit. This one is extensive and WELL organized. We spent quite a bit of time laying out an excellent naming scheme so all the routines were easy to remember. They'll just fall right out of your memory and you'll be asking yourself "why didn't I think of something as simple as this?" And the parameters ... TOTALLY consisent and common with all the other routines. You just can't forget them. And while you're new to the string unit, we went overboard with the Windows help. The cross-references are right where you want them in a well mapped out help system so you'll know right where you are. There are demos for every routines. Lots of tips on programming strings are included -- things you always wanted to know about Pascal vs. ASCIIZ, alignment affects, and procedures vs. functions. With 130 routines, it covers every possibility you can think of and the complete 7500 lines of assembly source code is included. How well did we do on the Windows help? It's so well done we said, "forget the manuals!" Everything is disk-based help. We put every possible keyword into the SEARCH buttons so that they are better than any index could possibly be. And it's always at your fingertips. But remember, there's only one button to switch between our 32-bit units and Borland's units. So, how much more can we write about ONE button? Just think! You can provide your clients with 16-bit and 32-bit versions of your product. You'll be on the edge -- state of the art. FREE! FREE! FREE! You gotta give this a try. You'll never know how much faster your programs can be until you try. Call us. We will send you a disk. If any time within 30 days it didn't do the job you thought, send the disk back and no bill. Seriously. Appendix D: Application Products Page 33 QWIK Screen Utilities User's Guide, Version 7.1 ** ACTUAL PERFORMANCE STATISTICS ** --------------------------------------------------------------------------- SPEEDPACK II: System Unit Performance Table 1. Performance: Decimal / String Conversions Operation Increase Typical ------------------------------- --------------- ------- Str (scalar) 50-205% 125% Str (real) 170-250% 180% Str (float) 5- 35% 20% Val (scalar) 20-40% 20% Val (real) 90-340% 300% Val (float) 20- 55% 30% Table 2. Performance: LongInt Arithmetic Operation Increase ------------------------------- -------- Div / Mod 5% * (Multiply) 7% Shl / Shr 11% Table 3. Performance: Real Math (6-byte reals) Operation Increase Typical ------------------------------- --------------- ------- * (Multiply) -5- 70% 25% / (Divide) 170-480% 250% Sqr 90-150% 95% + (Add) -5- 70% 25% - (Subtract) 11-160% 50% Real Compare 5- 10% 5% LongInt to Real 5- 35% 15% SqRt 480-2600% 600% Trunc / Round 40-140% 80% Frac 60-430% 170% Int 20-135% 50% Ln 60- 95% 80% Exp 110-130% 125% Sin 45- 55% 50% Cos 50- 55% 53% ArcTan 65- 95% 80% Table 4. Performance: String Handling Operation Increase Comments ------------------------------- --------------- ---------------------- Loading, storing, moving up to 110% (such as ":=" ) Comparing up to 75% (such as Str11) 240% FileSize (record size >1) 15% Read/ReadLn (text files) up to 30% Write/WriteLn (text files) up to 25% The increases listed above are compared with Borland's Turbo Pascal or Borland Pascal 7.0 using Eagle's 32-bit Enhanced System unit. Gains are highly dependent on software design, value variations, data alignment, CPU level and CPU / Disk caching combinations. Turbo Pascal is a trademark of Borland International. Appendix D: Application Products Page 35 QWIK Screen Utilities User's Guide, Version 7.1 SPEEDPACK II: String Unit Routines Table 1. Routines: Strg Unit Group Description Routines --------------- --------------------------------------- ------------------- Classification Classifies characters similar to C. IsAlNum, IsAlpha, Special routines also classify valid IsASCII, IsCntrl, DOS, path, and file name characters. IsDigit, IsDos, IsFile, IsGraph, IsLower, IsPath, IsPrint, IsPunct, IsReal, IsSigned, IsSpace, IsUpper, IsXDigit Comparison Compares two substrings at a given StrCmp, StrCmpI index combined with match/ignore case. Conversion Converts Pascal strings to or from StrBin, StrHex, binary/hex numbers, ASCII text, ASCIIZ, ValBin, ValHex, and embedded tabs. In-situ routines AscStr, StrAsc, allows Pascal and ASCIIZ to be used ChrAppZ, ChrLenZ, interchangeably. LnStr, StrLn, StrReTab,StrDeTab Find / Replace Finds a given character or substring ChrRepl, ChrReplI, and replaces it with another one, StrRepl, StrReplI combined with match/ignore case and overflow recovery. Insert / Delete Includes leading, trailing, padding, ChrDel, ChrDelL, centering, and truncation routines. ChrDelR, ChrIns, ChrInsL, ChrInsR, ChrPadC, ChrPadL, ChrPadR, StrCut, StrIns Justification Pads strings for left-, right-, or StrJL, StrJR, StrJC center-justification. Membership Searches for membership or ChrSpnL, ChrSpnLI, non-membership. Reduces a string to ChrSpnR, ChrSpnRI, its members. StrBrk, StrSpn, StrMemb Operations Operates directly on the existing StrCap, StrLwr, characters in the string for case, StrUpr, StrRev, reverse, roll, and sort. StrRoll, StrSort, LoCase, UpCase Parsing Counts, finds, and parses words WrdQty, WrdPosL, separated by spaces or a custom group WrdPosR, WrdPosLX, of delimiters. WrdPosRX, WrdL, WrdR, WrdLX, WrdRX, Appendix D: Application Products Page 36 QWIK Screen Utilities User's Guide, Version 7.1 WrdParse, WrdToken Pattern Creates strings with repetitive ChrFill, StrFill, patterns of concatenation or StrEnum enumeration. Placement Copies, moves, and concatenates ChrCat, ChrCatZ, quickly. Includes overwrite routines ChrOvr, StrCat, with left-, right- and center- StrCatV, StrCatX, justification. StrCpy, StrEnd, StrMov, StrOvrC, StrOvrL, StrOvrR, StrPeek, StrPoke Position Locates the position of multiple ChrPosL, ChrPosLI, occurrences of a substring searching ChrPosR, ChrPosRI, from left or right, or from an index, ChrPosRX, ChrPosRXI, combined with match/ignore case. ChrPosX, ChrPosXI, StrPosL, StrPosLI, StrPosR, StrPosRI, StrPosX, StrPosXI Quantity Counts the occurrences of a single ChrQty, ChrQtyI, character or substring combined with StrQty, StrQtyI match/ignore case. Standard Substitutes faster standard routines Copy, Delete, Pos if the Sys unit is not used. Str Functions Provides function forms of the StrC, StrCF, StrCFD, standard Str procedure for all numbers StrD, StrDF, StrDFD, including scalars, Turbo reals and StrE, StrEF, StrEFD, IEEE reals. StrL, StrLF, StrR, StrRF, StrRFD, StrS, StrSF, StrSFD * 7500 lines of assembly source code included. * Alternative routines offer different strategies for faster processing. * Fully optimized object files permit smart linking. * Compiles in DOS, DPMI, and Windows (protected modes). Appendix D: Application Products Page 37 QWIK Screen Utilities User's Guide, Version 7.1 ACTUAL PERFORMANCE TESTS FOR THE FOLLOWING CONDITIONS ON A 486/25MHZ MACHINE: (386 tests will be faster) ============================================================================ BP7 PERFORMANCE GAIN OF SPEEDPACK II IN DOS (w/o IEEE) ============================================================================ Please note that these gains are ARBITRARY. They do not reflect the full range or even an average gain of what can be expected in your own programs. Gains are highly dependent on software design, the values used, as well as the CPU level and CPU caching combination used. For example, file management routines will reveal greater gains when SmartDrive is not used, because this program does not put it to task. The value of 0% means 0 gain while 100% means twice as fast. --- TIME (ms) --- TEST DESCRIPTION Borland Eagle GAIN ---- ------------------------------------------- -------- -------- ------- 1: Str for LongInt 0.124 0.085 45% 2: Str for 6-byte/IEEE reals with no exponent 0.280 0.115 144% 3: Str for 6-byte/IEEE reals with exponent 0.298 0.105 184% 4: Val for LongInt 0.090 0.070 29% 5: Val for 6-byte/IEEE reals with no exponent 0.520 0.108 381% 6: Val for 6-byte/IEEE reals with exponent 0.494 0.130 280% 7: Div/Mod for LongInt 0.039 0.038 4% 8: * for LongInt 0.027 0.025 7% 9: Sqr for LongInt 0.041 0.041 0% 10: Shl/Shr for LongInt 0.839 0.755 11% 11: / for 6-byte reals only 0.268 0.094 186% 12: * for 6-byte reals only 0.074 0.056 31% 13: Sqr for 6-byte reals only 0.047 0.024 93% 14: + for 6-byte reals only 0.042 0.030 39% 15: - for 6-byte reals only 0.067 0.043 57% 16: Typecast LongInt into 6-byte reals only 0.816 0.693 18% 17: Trunc/Round only 6-byte reals to LongInt 0.023 0.013 80% 18: Frac for 6-byte reals only 0.062 0.022 185% 19: Int for 6-byte reals only 0.019 0.014 35% 20: SqRt for 6-byte reals only 1.293 0.203 538% 21: Ln for 6-byte reals only 1.147 0.623 84% 22: Exp for 6-byte reals only 2.458 1.192 106% 23: Sin for 6-byte reals only 0.898 0.582 54% 24: Cos for 6-byte reals only 0.949 0.589 61% 25: ArcTan for 6-byte reals only 2.137 1.183 81% 26: ":=" for strings 0.043 0.022 96% 27: String comparison 0.080 0.046 75% 28: "+" for strings 0.085 0.040 113% 29: Convert char to string 0.120 0.091 31% 30: Copy for strings 0.060 0.037 64% 31: Insert for strings 0.127 0.018 591% 32: Delete for strings 0.118 0.014 729% 33: Pos for strings 0.097 0.096 2% 34: + for sets (single component) 1.496 0.888 68% 35: [a..b] for sets (variable range) 0.246 0.052 373% 36: - for sets 1.555 0.887 75% 37: * for sets 1.492 0.857 74% Appendix D: Application Products Page 38 QWIK Screen Utilities User's Guide, Version 7.1 38: + for sets 1.488 0.862 73% 39: = for sets 0.387 0.272 42% 40: <= for sets 0.808 0.399 103% 41: In for sets 0.126 0.123 2% 42: := for sets 0.644 0.520 24% 43: Random integers 0.893 0.637 40% 44: Random 6-byte/IEEE reals 0.247 0.198 25% 45: ":=" array assignment 9.474 3.178 198% 46: Move array 9.474 3.181 198% 47: Fill array 10.584 2.653 299% 48: MaxAvail 0.852 0.009 9145% 49: MemAvail 0.943 0.815 16% 50: GetMem, New, Constructor (random) 1.270 1.122 13% 51: GetMem, New, Constructor (sequential) 2.341 1.907 23% 52: FreeMem, Dispose, Destructor (random) 5.344 4.368 22% 53: FreeMem, Dispose, Destructor (sequential) 3.307 2.596 27% 54: Assign (text files) 1.760 0.525 235% 55: Assign (non-text files) 1.728 1.049 65% 56: FilePos (record size >1) 9.294 3.166 194% 57: FileSize (record size >1) 9.066 8.559 6% 58: Write/WriteLn (text files) 66.454 51.563 29% 59: Read/ReadLn (text files) 22.087 17.694 25% ---- ------------------------------------------- -------- -------- ------- 60: Total gain for this program: 177.141 115.279 54% Unweighted average gain (59 tests) 269% Appendix D: Application Products Page 39 QWIK Screen Utilities User's Guide, Version 7.1 Eagle Performance Software has developed identical Shareware products for both Turbo C and Borland Pascal. Our pledge is to provide you quality products with unparalleled performance and ease of use. All registered users receive the complete source code when a signed license agreement is returned. QWIK QWIK - Here are the product versions and release dates for QWIK utilities: File name CIS Name Compiler Release date ----------- ---------- -------- ------------ QWIK71.ZIP QWIK71.ZIP TP7 05-27-93 QWIKC21.ARC QWKC21.ARC TC2 07-06-89 WNDW WNDW - For multi-level virtual windows, WNDW is the highest performance window utilities available today. It offers very powerful utilities for full window control and management you probably never thought possible. They are simple and yet very powerful with high speed and tight code. With WNDW, you can choose the absolute writing routines of QWIK, the window- relative writing routines of WNDW, and even customize your own. Here are some of the features you will discover: - Uses the powerful direct screen writing routines of QWIK. - Up to 254 fixed or virtual windows can be on the screen at one time. - Extremely high-speed virtual screens in RAM (up to 40 times faster). - Virtual windows are fully updated on screen, even if covered. Screens can scroll underneath one another right on the screen at very high speeds! - Virtual windows have virtual titles. - Fully supported hidden windows saved in RAM. - Fully supports all video pages. - Adjustable-rate moving, resizing, and scrolling. - All windows can be randomly accessed, not just stacked or tiled. - 28 window-relative writing routines. - 15 different border styles with shadow and zoom effects. - Full line drawing procedures. - Full cursor mode control for each window. - Writes in all text modes and column modes. - Only 13k bytes of code if all 69 utilities are used. - Used in all other Eagle products. - Excellent documentation like this document. Here are the product versions: File name CIS Name Compiler Release date ----------- ---------- -------- ------------ WNDW70.ZIP WNDW70.ZIP TP7 05-27-93 WNDWC21.ARC WNDC21.ARC TC2 08-01-89 Appendix D: Application Products Page 40 QWIK Screen Utilities User's Guide, Version 7.1 PULL PULL - For multi-level pull-down menus, PULL is fully featured and fully configurable. Includes execute, single, and multiple choice menus, unlimited nested submenus, data entry windows, help windows, directory windows, message system, and fully completed interfaces. Some of the features are: - Uses QWIK and WNDW. - Work window(s) and complete interface for menus - Pull-down menus with 3 menu modes and 7 line modes - Pull-down file directory - Highlighted command letters - Unlimited levels of submenus - Unlimited data entry windows for 9 types of data - Data entry for the work window(s) Free field entry with either fixed column or flexible column length. Full editing capability including insert cursor mode Full field selection with cursor keys Automatic NumLock for numerical data entry Right or left justification for data entry output Error messages for invalid data entries Error messages for data entries out of range - Automatic sizes and locations for menus. - Operation by cursor keys or command keys - Pull/Pop between work window and nested submenu(s) - Programmable control of pull and pop sequences - Context-sensitive help - Message lines for prompts and processing - Full working shell for user development - Excellent documentation like this document. Here are the product versions: File name CIS Name Compiler Release date ----------- ---------- -------- ------------ PULL70.ARC PULL70.ARC TP7 05-27-93 PULLC21.ARC PULC21.ARC TC2 08-01-89 ON-LINE SERVICES CompuServe - All updated files and later versions can be found on the CompuServe Borland Forums (GO BPASCAL for TP and GO BCPPDOS for TC) or the IBM Programming Forum (GO IBMPRO). The Eagle BBS - You can also get the latest files on our 24-hour BBS at (214) 539-9878, Intel 1200/2400/9600/14400 N81 V.42 MNP5. Appendix D: Application Products Page 41 QWIK Screen Utilities User's Guide, Version 7.1 A P P E N D I X E : R E V I S I O N H I S T O R Y Pre-QWIK40 Versions - Here's a list of steps to help you upgrade to QWIK42 from versions prior to QWIK40 on your programs: 1. Add "Uses Qwik;" 2. Delete the first Qinit. 3. Do a search and replace for the following names. Search Replace with --------- --------------------- CardWait CardSnow Qwait Qsnow QwriteLV QwriteA QwriteCV QwriteC QwriteV Qwrite ActiveDD ActiveDispDev AltDD AltDispDev PCCAltDD AltDispDevPCC Vmode VideoMode 4. Add "CheckSnow:=Qsnow" early in the program and after each Qinit if you use the CRT unit. 5. See REVISIONS for changes of type. Version 4.0 (12-01-87): Converted QWIK30 to QWIK40 to work on Turbo Pascal 4.0. Deleted QwriteV and QwriteCV. Added WhereR and WhereC. Added Hercules and IBM 3270 PC detection. Renamed the following variables: From To ---------- ------------ CardWait CardSnow Qwait Qsnow QwriteLV QwriteA QwriteCV QwriteC QwriteV Qwrite ActiveDD ActiveDispDev AltDD AltDispDev PCCAltDD AltDispDevPCC Vmode VideoMode Added the following variables: VideoPage, CRTcols, CRTrows, CardSeg, Have3270, ActiveDispDev3270 Added the following constants: NoHerc, HgcMono, HgcPlus, HercInColor Types were changed on the following items: - Strings passed to Qwrite* are of type String rather than Str80. (Should not be of any consequence.) - The CursorChange parameters are now word. - EgaFontSize, CRTcolumns, CardSeg, Page0seg, Qseg, AltDispDevPCC and ArrayLength are now word. Appendix E: Revision History Page 42 QWIK Screen Utilities User's Guide, Version 7.1 Version 4.1a (05-01-88): Added QwriteMore, QwriteMoreA, QfillMore, and QattrMore procedures. Added QnextOfs for the Q*More procedures. Improved video detection in Qinit for dual monitors, Hercules cards, and system hardware detection. Included background color constants to use instead of an attribute function. Reduced code size about 10%. Solved critical timing problem on IBM PC with CGA - at last! QWIK now uses the global variable CRTcols and not the absolute variable CRTcolumns for offset calculations. Version 4.1b (06-18-88): Separated GetSubModelID out of Qinit as an optional procedure due to BIOS bugs in PC/XT clones which would cause a lock up at initialization. New GetSubModelID now avoids those machines and QWIK should now work on them. Version 4.2 (10-1-88): For clarity, the Q*More procedures were renamed to Q*Eos. Added the type VScrRecType. Added the following constants: CursorOff, CursorOn, CursorBlink Added the following variables: QvideoPage, QvideoMode, QScrPtr, QScrRec, CursorInitial, CursorUnderline, CursorHalfBlock, CursorBlock Renamed the following variables for clarity: Qseg -> QScrSeg Qofs -> QScrOfs QnextOfs -> QEosOfs Added the following procedures and functions: QScrToVscr, QVscrToScr, QscrollUp, QscrollDown, QreadStr, QreadChar, QreadAttr, GotoEos, EosR, EosC, EosToRC, EosToRCrel, EosToCursor, EosLn, QEosLn Revamped the cursor procedures by deleting: CursorChange, CursorOn, CursorOff and replacing them with: SetCursor, GetCursor, ModCursor The screen base is now a FAR pointer using QScrOfs and QScrSeg pieced together to make QScrPtr to do virtual screens in RAM. GotoRC and WhereR/C now work on the "write" page instead of the viewed page. Made FirstQinit a variable instead of constant so that it would be initialized at each startup when executing in TP environment. Hercules cards are then tested at each startup. Completely revised documentation. Added supplementary STRS unit for string functions: StrL, StrLF, StrR, StrRF, StrRFD Version 4.2a (10-5-88): QattrC fixed. (Did not exit properly when SameAttr used.) Appendix E: Revision History Page 43 QWIK Screen Utilities User's Guide, Version 7.1 Version 4.2b (10-15-88): Identifiers StrLF, StrRF, and StrRFD incorrectly labled in STRS unit as StrLW, StrRW, and StrRWD. Document examples also corrected. Added instructions for TP5 usage (registered users only). Version 5.X (12-20-88): Compiled QWIK42B under TP5. No other changes. Version 5.Xa (03-04-89): Add SetMultiTask procedure to set variables for Multi-tasking video buffers (MTVB). Forced null strings written to virtual buffers to leave QEosOfs unchanged. Version 5.5 (08-24-89): Compiled QWIK5XA under TP 5.5. No other changes. Version 7.0 (05-05-93): Separated each routine into an individual object file for full optimization. Made revisions for DPMI in BP7. Incorporated FastComm for fast communications on CGAs. Added QwriteSubC routine. Added vertical writing routines QwriteV, QwriteVC and QwriteEosV. Added detection for i486 cpu in GetCpuID. Added QscrollBlank flag set to true to clear the last line of a scroll. Set false to leave it unaltered. Made QreadStr a procedure instead of a function for speed. Moved Qsnow in the varaiable list to allow QEosOfs, QScrSeg, and QScrOfs to be word aligned. Renamed QwriteA and QwriteEosA to QwriteSub and QwriteEosSub respectively. Made GetCursor into an inline directive to increase speed. Version 7.1 (05-27-93): Evenly aligned all code for speed. Added detection for Pentium cpu. Added check for Hercules card prior to use for one time only. Fixed QwriteEosV to call correct subroutine. Appendix E: Revision History Page 44 QWIK Screen Utilities User's Guide, Version 7.1 A P P E N D I X F : R E F E R E N C E S A N D C R E D I T S REFERENCES PS/2 Systems - For more information on the new IBM PS/2 system, you can get the "Personal System/2 and Personal Computer BIOS Interface Technical Reference" manual. Other references include: IBM Personal System/2 Seminar Proceedings: Volume 5, Number 2, Displays and Adapters, publication # G360-2678. Volume 5, Number 4, Models 50, 60, 80, VGA, BIOS and Programming Considerations, publication # G360-2747. 3270 PC - For more information on the IBM 3270 PC, you can get the following publications: "3270 PC Application Development Considerations" "IBM 3270 Personal Computer Programming Guide", Pub # SA23-0221 "IBM 3270 Personal Computer Control Program Reference", Pub # GA23-0232 As always, the above information is subject to change without notice per IBM. Video Guide - An excellent guide for IBM and Hercules video card programming in text and graphics is: "Programmer's Guide to PC & PS/2 Video Systems" by Richard Wilton and published by Microsoft Press Trademarks - IBM is the trademark for International Business Machines Corp. Turbo Pascal is a trademark of Borland International. CREDITS Without the assistance and original ideas from Brian Foley, these routines would not have been written. And the helpful feedback from users has inspired more powerful routines. Appendix F: References and Credits Page 45