Manual Number: 00650-014-4
Page 4-8
AD12-8 Manual
If you are using a version of Microsoft C prior to version 6.0 use the following code:
_asm
_emit 0x1E
_asm
_emit 0x8E
_asm
_emit 0xD8
/* call driver as normal */
a12drv(FP_OFF(&task),FP_OFF(params),FP_OFF(status));
_asm
_emit 0x1F
These changes work around a peculiarity of Microsoft C, enabling our drivers to locate the vari-
ables used in the program.
Using the Driver with Turbo Pascal
The following procedure will show you how to use the driver with Borland Turbo Pascal. You may
refer to any of the Pascal example programs for further illustration.
A. Include the following compiler directive at the beginning of your program.
{$L a12drv}
B. Declare the three variables for the driver globally, at the beginning of the program.
type param_array = array[1..5] of integer;
var params : param_array;
task,status
: integer;
C. Declare the driver function as external in using a prototype declaration
procedure a12drv(task:word; param:word; status:word);external;
D. Make your assignment to these variables as desired for the function you wish to perform. See
CHAPTER 5: DRIVER REFERENCE
for details on each task.
E. Make the call to the driver.
a12drv(ofs(task),ofs(params),ofs(status));
F. Compile and link the program.
Using the Driver with QuickBASIC
The following procedure will show you how to use the driver with Microsoft QuickBASIC. You
may refer to any of the QuickBASIC sample programs for further illustration. The following
procedure will allow you to use the driver both in the QuickBASIC environment and from the
command line compiler.
A. Declare the three variables for the driver as global.
DIM TASK%, STAT%, PARAMS%(5)