Download Print this page

Advantech PCL-848A/B User Manual page 18

Multifunction ieee-488 interface card

Advertisement

Every called routine must define its entry address with an offset from the current
segment. For ease of reference all IEEE-488 routine offsets are at three byte incre-
ments and start at the top of the segment. For example, the INIT routine is at an
offset of 0 (zero), the OUTPUT routine is at an offset of 3, the ENTER routine is at
an offset of 6, and so on.
Please note that the program offsets must be entered exactly as shown for each
interpreter routine. The offsets determine where the program will branch and an
improper location can cause the PC to ignore all inputs except the power switch. This
is true of all BASIC CALL subroutines and is not a limitation of the interface board.
When you assign the offset, you are explicitly telling the CPU of the PC where to
look for its next instruction. Because it is running an assembly language routine, it
cannot check the validity, purpose, or use of each instruction the way it does as with
BASIC instructions. For that reason, it depends on receiving the proper offset address
and then assumes that the instructions are correct. The DEF SEG statement and all
offset address may be assigned with a single BASIC statement and never require
reassignment within your program. That means you can "set it and forget it" and get
on with the job of solving your program rather than being concerned about addressing
details.
Each routine also access the parameters those are received from or passed back to the
BASIC program. These parameters are shown in parentheses following the program
offset variable for each statement.
There are some limitations in BASICA that have, unfortunately, placed restrictions on
the called routines.
* The order, number, and type of variables passed to the routines must be exactly as
shown for each routine. This is because BASIC only passes pointers of variables
and does not provide a variable type identifier.
* The BASIC interpreter and compiler (such as Compiled BASIC and QuickBASIC)
have different string variable requirements. -t The default is for the BASIC
interpreter. For the BASIC compiler, you must call the INIT routine to set the
SETTING% bit 8 to be "1" to tell the firmware routines to handle the 3 parameters
in a different way.
* Passed parameters must be variables and cannot be constants.
* BASIC may change its source code if a statement changes the contents of the passed
string. This situation can be avoided by assigning a value to the string argument
before calling the firmware routines. The statement to define a blank string to
receive data is recommended is as:
D$ = SPACE$(255).
1 2
PCL-848AB
User's Manual

Advertisement

loading