Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Example Program
NI Supported: Yes
Publish Date: Nov 6, 2006


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Language Interface: 16-bit Turbo C/C++ for DOS

9 ratings | 2.33 out of 5
Print

Downloads

Filename: example900225.zip
Requirements: View

This is the GPIB language interface for Turbo C/C++ (version 2.x and higher -- for all memory models except HUGE), a DOS programming environment for creating 16-bit applications. Download the Turboc.zip file (in the example.zip file, below). This file contains the declaration file DECL.H, the language interface file TCIB.OBJ, and some sample programs. (See also the Related Link below: Note to Turbo C/C++ Users)


How to Use the 16-bit Turbo C/C++ for DOS Language Interface:

I. Overview

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

DECL.H: C/C++ include file
TCIB.OBJ: C/C++ language interface module


II. Items to Include in Your GPIB Application

You must include the following line at the beginning of your application:

#include "decl.h" Next you need to include the TCIB.OBJ file in your application's project file along with your application.

[ Note: The required key strokes and menu bar selections needed in order to add a file to a project can vary with different versions of that particular compiler. For information about how to add files, please refer to the manuals and online help that came with your version of the compiler. ]


III.A. Compiling, Linking, and Running from the Turbo C/C++ Environment

From within the Turbo environment, you can compile, link, and run your application.

[ Note: The required key strokes and menu bar selections needed in order to create, compile, and link a project can vary with different versions of that particular compiler. For information about how to compile, link, and run a project, please refer to the manuals and online help that came with your version of the compiler. ]


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

From the DOS command line, for a tiny, small, medium, compact, or large memory model application, type in the following in order to compile and link an application, called yourprog, to the Turbo C/C++ language interface, TCIB.OBJ:

tcc -mx yourprog.c tcib.obj

where x refers to the memory model as listed below:

t for tiny memory mode
s for small memory model
m for medium memory model
c for compact memory model
I for large memory model

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

yourprog

Requirements


Filename: example900225.zip

Software Requirements


Language(s): C

Hardware Requirements


Hardware Group: GPIB
Driver: NI-488.2

 
9 ratings | 2.33 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).