HP 3000 Manuals

Differences Relative to BASIC/V [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation


HP Business BASIC/XL Reference Manual

Differences Relative to BASIC/V 

For those users familiar with BASIC/V's external procedure call feature,
this section describes the differences between that feature and HP
Business BASIC/XL's ANYPARM feature, and explains some of the reasons for
the differences.  Although the ANYPARM feature is designed to provide the
same functionality as the BASIC/V feature, it is also designed to be
consistent with other aspects of HP Business BASIC/XL. It is not meant to
be identical with BASIC/V. An MPE/V machine word in this section refers
to the 2 byte machine word of the HP 3000 running with the MPE V
operating system.

An MPE XL machine word is a 4 byte machine word of the HP 3000 running
under the MPE XL operating system.

The View from the External Procedure 

In the BASIC/V feature, the field containing the number of parameters is
located at Q+1 of the calling procedure, and the addresses and flag words
immediately follow it on the stack.  The HP Business BASIC/XL ANYPARM
external procedure must declare two formal parameters:  one for the
number of parameters, and one for the address of the actual parameter
table.  This was done both to enable the external procedures to be
written in Pascal, and to make it easier to migrate the external
procedures to future HP computers.

Each flag word on MPE XL takes up an entire word and immediately follows
the address of the parameter, instead of being packed three to a word and
residing together in a block.  The change makes it easier to obtain the
required information and to port the feature to future computers.

The Flag Words 

Data Types.  The values in the flag words that indicate the data types
are not the same as those used by BASIC/V. The change was necessary to
allow the use of the Business BASIC XL data types that don't exist in
BASIC/V. The values are now consistent with the values returned by the HP
Business BASIC XL TYP and BUFTYP built-in functions.

Sizes.  The size field (dimensionality) for a scalar string contains a
zero, rather than a one as it did in the BASIC/V feature; the size field
for a one-dimensional string array contains a one, rather than a two.
The change is required to ensure that strings are handled consistently
with the method used in HP Business BASIC/XL. Remember that HP Business
BASIC/XL allows string arrays of up to six dimensions, whereas in BASIC/V
strings arrays are limited to one dimension.

The Addresses 

For arrays and strings, the address passed to the ANYPARM external
references the first byte of the dope vector, rather than the beginning
of the data area.  All addresses are now byte addresses.



MPE/iX 5.0 Documentation