last modified: 08-MAR-1994 | catalog | categories | new | search |

PSR-0311 VIDEO-PC

VIDEO-PC, SVGA Routines for FORTRAN on PC

top ]
1. NAME OR DESIGNATION OF PROGRAM:  VIDEO-PC
top ]
2. COMPUTERS
To submit a request, click below on the link of the version you wish to order. Only liaison officers are authorised to submit online requests. Rules for requesters are available here.
Program name Package id Status Status date
VIDEO-PC PSR-0311/01 Tested 08-MAR-1994

Machines used:

Package ID Orig. computer Test computer
PSR-0311/01 IBM PC PC-80486
top ]
3. DESCRIPTION OF PROGRAM OR FUNCTION

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.
top ]
4. 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.
top ]
5. RESTRICTIONS ON THE COMPLEXITY OF THE PROBLEM

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.
top ]
6. 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).
PSR-0311/01
Run time for the complete test on a 66-MHz PC/80486 was 2 minutes 15 seconds.
top ]
7. UNUSUAL FEATURES OF THE PROGRAM:
top ]
8. RELATED AND AUXILIARY PROGRAMS:
top ]
9. STATUS
Package ID Status date Status
PSR-0311/01 08-MAR-1994 Tested at NEADB
top ]
10. REFERENCES

- 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).
PSR-0311/01, included references:
- Tom Jordan:
  Graphics Primitives for PC VGA Graphics
  (December 17, 1991).
top ]
11. MACHINE 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.
PSR-0311/01
NEA-DB ran the test cases on a 80486-based 66-MHz DELL 466/L PC with 8 MBytes of RAM.
top ]
12. PROGRAMMING LANGUAGE(S) USED
Package ID Computer language
PSR-0311/01 FORTRAN+ASSEMBLER
top ]
13. OPERATING SYSTEM UNDER WHICH PROGRAM IS EXECUTED

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.
PSR-0311/01
NEA-DB ran the test cases under MS-DOS 6.0 with the Lahey F77L-EM/32 FORTRAN-77 compiler version 5.11.
top ]
14. OTHER PROGRAMMING OR OPERATING INFORMATION OR RESTRICTIONS

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.
top ]
15. NAME AND ESTABLISHMENT OF AUTHORS

Contributed by: Radiation Safety Information Computational Center
                Oak Ridge National Laboratory
                Oak Ridge, Tennessee, U. S. A.

Developed by:   Experimental and Mathematical Physics Consultants
                Gaithersburg, Maryland, USA
top ]
16. MATERIAL AVAILABLE
PSR-0311/01
File name File description Records
PSR0311_01.001 Information file 86
PSR0311_01.002 Author's notes about Video-PC 61
PSR0311_01.003 Sets video mode and resolution 269
PSR0311_01.004 Input data, e.g. testms 4
PSR0311_01.005 Demo program for all versions 87
PSR0311_01.006 To compile, link and go for Microsoft 10
PSR0311_01.007 Source file Microsoft (calls asm routines) 79
PSR0311_01.008 Link directives for Microsoft 5
PSR0311_01.009 Assembler for mode set (Microsoft) 25
PSR0311_01.010 Assembler for vdac set (Microsoft) 33
PSR0311_01.011 Assembler for pixel write (Microsoft) 33
PSR0311_01.012 Assembler for pixel read (Microsoft) 35
PSR0311_01.013 Object for mode set (Microsoft) 0
PSR0311_01.014 Object for vdac set (Microsoft) 0
PSR0311_01.015 Object for pixel write (Microsoft) 0
PSR0311_01.016 Object for pixel read (Microsoft) 0
PSR0311_01.017 Executable for Microsoft 0
PSR0311_01.018 Compile, link and go for Lahey V4.01 14
PSR0311_01.019 Source file Lahay V4.01 (calls intrup rtne) 113
PSR0311_01.020 Link directives for Lahay V4.01 4
PSR0311_01.021 Executable for Lahay V4.01 0
PSR0311_01.022 Run time error message file 0
PSR0311_01.023 Setups executable for executation 0
PSR0311_01.024 Finishes setup of executable 0
PSR0311_01.025 Compile, link and go for Lahey V5.11 10
PSR0311_01.026 Executable for Lahey V5.11 0
PSR0311_01.027 Link directives for Lahey V5.11 2
PSR0311_01.028 DOS file-names 27
top ]
17. CATEGORIES
  • P. General Mathematical and Computing System Routines

Keywords: FORTRAN, computer graphics, personal computers.