Example Code

Archived: Language Interface: 16-bit Microsoft FORTRAN

Code and Documents

Attachment

Overview


This document has been archived and is no longer updated by National Instruments.

This is the GPIB language interface for Microsoft FORTRAN (version 4.x or 5.0), a DOS programming environment for creating 16-bit applications. Download the Msfor.zip file (in the example.zip file, below). This file contains the declaration file DECL.FOR, the language interface file MFIB.OBJ, and some sample programs.


How to Use the 16-bit IBM Microsoft FORTRAN Language Interface:

I. Overview

The 16-bit GPIB language interface for Microsoft FORTRAN contains the following files:

DECL.FOR: program declarations
MFIB.OBJ: language interface object module


II. Items to Include in Your GPIB Application

You must include the following line at the beginning of your application:
'decl.for'

Next you need to link the MFIB.OBJ language interface module to your application.


III. Compiling, Linking, and Running from the DOS Command Line

From the DOS command line, to produce a medium, large, or huge memory model application, type in the following to compile an application, called yourprog:

fl /c /AX yourprog.for where X refers to the memory model, specified by M, L, or H.

To link the application, called yourprog, with the FORTRAN language interface, MFIB.OBJ, type in:

link yourprog mfib;

To run the newly created executable, type in the name of your application on the DOS command line, like so:

yourprog

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors