80-Bus News

  

September–October 1984 · Volume 3 · Issue 5

Page 23 of 47

Parameter block contents.

PBAddress of control array
PB+2Address of input parameter array
PB+4Address of input point coordinate array
PB+6Address of output parameter array.
PB+8Address of output point coordinate array

Control Array

This area is used by the GDOS and GIOS for control of the selected function. For example control(1) will contain the number of the required graphics routine (Remember open workstation – opcode 1). The remaining fields are used to contain values representing the amount of valid data contained in the other arrays on both entry to, and return from, the GIOS. These are usually extracted by the GIOS and used as loop counters.

INTIN Array

Contains information to be used by the GIOS in a called function. These are not usually point coordinates but colour change values, text strings, input device modes and the suchlike.

PTSIN Array

Contains point coordinates passed to the GIOS from the calling program. Used to contain line coordinates for example. This array is scaled to device coordinates by the GDOS before control is passed to the GIOS.

INTOUT Array

Similar to intin but used by the GIOS to return data to the calling program. Typical entries are text rotation achieved as opposed to rotation asked for, input samples flagged as successful or not, linestyle selected etc.

PTSOUT Array

Similar to ptsin but used by the GIOS to pass coordinates back to the calling program. This array is also scaled by the GDOS before control is passed back to the caller, but this time to the 32k X 32k virtual frame size.

The GSX standard dictates that all array elements are 16 bit values, even ASCII text strings. All array references in the documentation are 1 based, which can be a source of bugs if you forget that array(1) is really array(0).

Memory arrangement.

Those of you au fait with the CP/M map may care to take a look at fig 2, which shows where the GDOS and GIOS live when at home. All calls to BDOS are rerouted through the GDOS first (via a modified 0005h) and passed on to the BDOS if it is not a graphics request.

Page 23 of 47