EasyManua.ls Logo

Strasbaugh nTellect 7AF - Using the Pamux Driver with Interpreted BASIC or Qbasic

Default Icon
2493 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Pamux User’s Guide 61
USING THE PAMUX DRIVER WITH INTERPRETED BASIC OR
QBASIC
To call the Pamux driver subroutine from a program written in Interpreted BASIC or QBasic, the program
must load the driver, name it, declare and initialize variables, and call the driver. These steps are
described below.
Load the Pamux Driver
To use the driver in your application program, you must first load the subroutine into memory. This is
done with two commands: DEF SEG and BLOAD.
DEF SEG is used to tell BASIC where to put the driver. The driver should be loaded above BASIC.
This location depends on the size of DOS and the BASIC interpreter. A typical value for a system with
640 KB of memory is 3600 hex. The following statement can be used in most cases without
modifications:
DEF SEG = &H3600
BLOAD is used to tell the BASIC interpreter to load the driver subroutine from disk to memory. This
statement must follow the DEF SEG statement, since BASIC must know where to put the driver
before it can load it. The following BLOAD statement instructs BASIC to load the driver at the
currently defined segment:
BLOAD “PDRIVER.COM”, 0
The 0 in the statement above tells BASIC to start loading at an offset of 0 from the currently defined
segment.
The file containing the version of the driver to be loaded under Interpreted BASIC or QBasic is
PDRIVER.COM.
Name the Pamux Driver
The CALL statement calls the driver subroutine from a BASIC program. The CALL statement must
include the name of a variable whose value indicates where the subroutine is located in relation to
the currently defined segment. If you have loaded the driver as described previously, the variable
must be equal to 0. The name Pamux must be used when using the BASIC compiler. Hence, the
following simple assignment statement should appear in your program before the driver is called:
Pamux = 0
Declare and Initialize the Parameters
All variables passed to the driver subroutine must be declared and initialized before the driver can be
called. The VALUE% array parameter must be declared using the DIM statement. Each element
should then be set to a default value. The following program segment is an example:
20 0 DIM VALUE%(7)
‘ Dimension the array
2 1 0 FOR I% = 0 TO 7
‘ Fill all array elements with 0
220 VALUE%(I%) = 0
230 NEXT
240 ERRCOD% = 0
‘ Initialize all parameters
250 ADDRESS% = 0
260 COMMAND% = 0
27 0 POSITION% = 0
PROGRAMING WITH THE PAMUX DRIVER

Table of Contents

Related product manuals