1. NAME AND TITLE
VIDEO PC: Super VGA Primitives Graphics System
Experimental and Mathematical Physics Consultants, Gaithersburg, Maryland.
3. CODING LANGUAGE AND COMPUTER
The primitives were developed to implement super VGA graphics in FORTRAN on personal computers under DOS.
The Lahey F77L-EM/32 primitives are written in FORTRAN and use the INTRUP routine for accessing the PC BIOS. This compiler requires an 80486 or an 80386/387 personal computer.
The Microsoft primitives are written in FORTRAN and assembler (Microsoft macro Assembler 5.1 used). Object code is included for the assembly language routines.
4. NATURE OF PROBLEM SOLVED
These primitives are the lowest level routines needed to perform super VGA graphics on a PC. A sample main program is included that exercises the primitives.
Both Lahey and Microsoft FORTRAN's have graphics libraries. However, the libraries do not support 256 color graphics at resolutions greater than 320x200. The primitives bypass these libraries while still conforming to standard usage of BIOS. The supported graphics modes depend upon the PC graphics card and its memory. Super VGA resolutions of 640x480 and 800x600 have been tested on an ATI VGA Wonder card with 512K memory and on several 80486 PC's (unknown manufacturers) at retail stores.
5. METHOD OF SOLUTION
Both Lahey and Microsoft primitives depend upon sending the correct parameters to the PC BIOS (basic input output system) as discussed in the references.
6. RESTRICTIONS OR LIMITATIONS
The primitives were developed for 256 color VGA applications. It is known, for instance, that some CGA and 16 color VGA video modes will not operate correctly using these primitives. Potential users should try the test program on their PC/video card combination to determine applicability.
7. TYPICAL RUNNING TIME
Running times depend upon the high level application using the primitives. The test program distributed with the primitives generates 18 full screens to show color maps. This test problem requires about a minute on a 20 MhZ 80386 in the Microsoft version and about 5 minutes in the Lahey version (one of the rare times when the Lahey version is slower than the Microsoft version).
8. COMPUTER HARDWARE REQUIREMENTS
Use of the Microsoft primitives requires the following hardware: any PC (including 8086 and 80286), a VGA graphics card, and a monitor.
The Lahey primitives require: an 80386/387 or 80486 PC, a VGA graphics card, and a monitor.
9. COMPUTER SOFTWARE REQUIREMENTS
Utilization of the primitives in a high level application requires a Microsoft or Lahey FORTRAN compiler. The Microsoft primitives have been used with compilers from 3.30 through 5.1 The Lahey primitives have been used with the F77L-EM/32 compilers 4.0 through 4.01 (3.0 had some problems).
Note: the assembly language routines for the Microsoft primitives were compiled using the Microsoft Macro Assembler 5.1. Compatibility between other FORTRAN/assembler combinations requires careful examination of their interface requirements. For instance, Lahey and Microsoft pass FORTRAN arguments in opposite order, and Lahey FORTRAN pops arguments off the stack after a call while Microsoft requires that the assembly language routine remove the arguments from the stack.
a: included in documentation:
Tom Jordan, "Graphics Primitives for PC VGA Graphics," Informal Notes (December 17, 1991), (1 page).
b: background information:
"The Peter Norton Programmer's Guide to the IBM PC," Microsoft Press, 1985 (Information on BIOS calls).
Richard Wilton, "Programmer's Guide to PC and PS/2 Video Systems," Microsoft Press, 1987. (Setting colors).
"Microsoft FORTRAN Advanced Topics," Version 5.1, Microsoft Corporation, 1991. (Assembly examples and interfaces).
F77L-EM/32 Programmer's Reference," Revision B, Lahey Computer Systems Incorporated, 1990. (Use of INTRUP subroutine to pass BIOS calls).
11. CONTENTS OF CODE PACKAGE
The code is distributed on one DS/HD 5.25" diskette (1.2 MB). FORTRAN and Assembler sources are included.
12. DATE OF ABSTRACT
KEYWORDS: MICRO COMPUTER; PC; PLOTTING