beautypg.com

Measurement Computing Personal488 rev.3.0 For DOS & Windows 3.Xi User Manual

Page 163

background image

9D. Getting Started

II. SOFTWARE GUIDES - 9. Driver488/SUB

II-148

Personal488 User’s Manual, Rev. 3.0

or

cl/c/AC hello.c
link hello.obj,,,iotmc60c.lib;

Similarly, the following commands create a compact model executable file, using Quick C:

qcl/c/AC hello.c
qlink hello.obj,,,iotmc60c.lib;

To run this program, Driver488/SUB must be installed and resident. Successful operation of this
program proves that the driver is installed and the Driver488/SUB subroutines were properly
linked to the application program. Errors in setting up board parameters like DMA channel and
interrupts will not be detected by this program.

For Turbo C Users

Driver488/SUB supports four memory models: “small,” “medium,” “compact” and “large.” (See
the Sub-Chapter “Other Languages” in Chapter 8, for more information on memory models.)
Include the

iottc20.h

and

iot_main.h

header files in your program and link in the proper

Driver488/SUB library files, as shown below:

iottc20s.lib

for small memory model programs.

iottc20m.lib

for medium memory model programs.

iottc20c.lib

for compact memory model programs.

iottc20l.lib

for large memory model programs.

Use the following command-line commands to compile and link your program. For example, the
following commands create a compact model executable file:

tcc -mc hello.c iottc20c.lib

or

tcc -c -mc hello.c
tlink hello.obj + c0c.obj,,,cc.lib iottc20c.lib

Use the example test program to query Driver488/SUB for its

Hello

message:

#include “iottc20.h”
#include “iot_main.h”
main ( ) {

DevHandleT ieee;
char response [100];

Hello (ieee, response);
printf (“--%s\n”,response);

}

Upon execution, the following response is printed on the screen:

-- Driver488 ver 4.0........

Use the example test program to query Driver488/SUB for its

Hello

message:

#include “iotmc60.h”
#include “iot_main.h”
main ( ) {

DevHandleT ieee;
char response [100] ;

Hello (ieee,response) ;
printf (“--%s\n,response) ;

}

Upon execution, the following response is printed on the screen:

-- Driver488 ver 4.0........