True basic, Turbo basic – Measurement Computing Personal488 rev.3.0 For DOS & Windows 3.Xi User Manual
Page 123

8L. Language-Specific Information
II. SOFTWARE GUIDES - 8. Driver488/DRV
II-108
Personal488 User’s Manual, Rev. 3.0
True Basic
Use of Character Command Language
In order to simplify programming Driver488/DRV with True Basic, the following files are provided on
the Driver488/DRV program disk in the TRUEBAS directory:
•
IEEEIO.TRU
: Communications routines for Driver488/DRV.
•
IEEEIO.TRC
: Compiled version of
IEEEIO.TRU
.
•
TOOLKIT.LIB
: Utility routines from the True Basic Developer’s Toolkit.
•
KYBDCTRL.TRU
: True Basic version of the Keyboard Controller Program.
IEEEIO.TRU
The
IEEEIO.TRU
file contains several useful declarations and functions, many of which have been
used in the
195DEMO
example program. It is divided into two modules:
DosIO
and
IeeeIO
.
•
DosIO
includes interfaces to several MS-DOS (or PC-DOS) function requests. It requires the
functions from the True Basic Developer’s Toolkit that are included in ToolKit.Lib. They are:
Def Read(handle,bufseg,buflen)
Def Write(handle,bufseg,buflen)
Def IoctlRead(handle,bufseg,buflen)
Def IoctlWrite(handle,bufseg,buflen)
These routines read and write to a character device such as Driver488/DRV. They each take the
following file handle returned by
OPEN
, as the arguments handle:
bufseg
, the segment address of
the data buffer to read or write, and
buflen
, the length of the data buffer.
•
IeeeIO
includes routines for the convenient control of Driver488/DRV.
TOOLKIT.LIB
TOOLKIT.LIB
contains four routines from the True Basic Developer’s Toolkit:
Convert
,
Interrupt
,
Signal_e_
, and
String_ptr
.
•
Convert
(from
HEXLIB.TRC
) is used to convert hexadecimal string constants such as
H3D02
into
numeric form.
•
Interrupt
(from
DOSLIB.TRC
) is used to call low-level DOS and BIOS functions.
•
Signal_e_
(from
DOSLIB.TRC
) interprets any error codes returned by
Interrupt
.
•
String_ptr
(from
DOSLIB.TRC
) returns the segment address of a string variable. The text of the
string is located at an offset of 8 from the segment address.
More information about these routines, as well as other useful routines are included in the True Basic
Developer’s Toolkit, available from True Basic.
If you already have the Developer’s Toolkit, you can substitute
HEXLIB.TRC
or
DOSLIB.TRC
library
statements for the
TOOLKIT.LIB
library statements in these routines.
Turbo Basic
Use of Character Command Language
In order to simplify programming Driver488/DRV with Turbo Basic, the following files are provided
on the Driver488/DRV program disk in the
\TURBOBAS
directory: