Microsoft DOS Fortran 5.1 graphics

Martin.Hepperle at MH-AeroTools.de Martin.Hepperle at MH-AeroTools.de
Thu Aug 30 02:11:58 CDT 2018


> I am looking for a sort of 'hello world' example and/or samples to use the
> graphics library in this compiler, some sample code.  My target is DOS and
> the Compaq luggable mono display.
> 
> 
> It looks like its all there, the library and include files for display
adapters and
> modes, but I cant find an example on the netwebs to get me started.
> 
> 
> Anybody have a set of demo files or application source to study and  to
use
> this?
> 
> 
> I have TurboC running on this machine, and the graphics are great.  Did
> Microsoft have a similar set of examples for Fortran?
> 
> 
> Randy
> 
Randy,

this compiler can generate executables for DOS, Windows and OS/2.
It also came with the QuickWin libraries to create FORTRAN programs which
output text and graphics in Windows.
I am not 100% sure, but it is possible that the first release did not have
the QuickWin libraries and it came with an update.

When you install Microsoft FORTRAN 5.1 you have the option to install the
SAMPLES.


The README says:
<cite>
[...]
\SOURCE\SAMPLES

  This directory also contains the source code for the graphics programs
  from chapters 11, 12, and 13 of the Microsoft FORTRAN Advanced Topics
  manual. Note that these examples require the graphics include files 
  FGRAPH.FI and FGRAPH.FD. These files are copied to an INCLUDE directory 
  by the SETUP program. In real mode (DOS), the programs must be linked with
  the graphics library GRAPHICS.LIB. In protected mode (OS/2), graphics is
  not supported, but you can compile text-only programs by linking
  with the text library GRTEXTP.LIB. The appropriate libraries are
  copied to your disk by the SETUP program. For example, use the
  following command line for DOS:

    FL COLTEXT.FOR GRAPHICS.LIB

  Or use the following command line for OS/2:

    FL COLTEXT.FOR GRTEXTP.LIB

  The programs are listed below:

                        DOS only                DOS or OS/2
                        --------                -----------

     Chapter 11         CGA.FOR                 COLTEXT.FOR
                        COLOR.FOR
                        EGA.FOR
                        GRAPHIC.FOR
                        HORIZON.FOR
                        REALG.FOR
                        SINE.FOR

     Chapter 12         SAMPLER.FOR

     Chapter 13         ANIMATE.FOR             CURSOR.FOR
                        ARC.FOR                 MODES.FOR
                        CGAPAL.FOR              SCRTXWIN.FOR
                        FIGURE.FOR              SETROWS.FOR
                        FILL.FOR                TEXT.FOR
                        FONTS.FOR               WRAP.FOR
                        MAGNIFY.FOR
                        PAGE.FOR
                        PALETTE.FOR
                        STAR.FOR
                        WINDOW.FOR
[...]
</cite>
Those examples cover many aspects of the system. I only used the Windows
part and I believe that under OS/2 there is no graphics, only cursor
addressing.
The graphics system offers similar capabilities to e.g. Borland's or Quick
C's capabilities.

regards,
Martin



More information about the cctalk mailing list