Overview of Array Functions
Array definition & Initialization
Array Access by Disk/User, Row/Column, and Row/Bit-number
Functions to manipulate bits & bytes
Miscellaneous functions
:Overview of Array Functions
ARRAYS is a collection of routines for manipulating a two dimensional
array of byte size elements. Routines are provided for manipulation of the
array in terms of row/column, row/bit, and Disk/User specification of the
array indices. Three kinds of routines are included in ARRAYS:
1) Definition and Initialization
2) Access to array elements for readout or modification
3) Functions that may be performed on array elements
This collection of routines was developed for maintenance of a
Disk/User bit-map for use in programs like FINDF and SDIR in order to
provide the ability to specify in a completely arbitrary fashion the
DU areas to which access is allowed. The Access routines implement
programatic modification of array elements (either bit-or byte-wise).
The routines are quite general in application, and provision is made
to perform arbitrary operations on array elements. The following screens
give an introduction to the three types of routines.
(continued on next screen)
1) Definition and Initialization
Before an array can be used, memory space (a buffer) must have been
allocated to contain the array. That buffer could already contain array
data as, for example, a list of the available disk and user assignments.
DEFINITION consists of calling one of the routines with the starting
address and size of the array passed in the HL and BC registers. This
information is stored internally for use by other library routines and
is also available to user written routines. DEFINITION does not alter or
establish the value of any array elements.
INITIALIZATION establishes values for the elements of the array.
Several routines are included for initialization to all 1's (or 0's) or
to one of several patterns corresponding to Disk/User bitmapping. One
routine simply reverses the bit order in each byte of the array. This
function is useful in converting a manually prepared bit map (bytes listed
in binary notation) from the left-to-right order that people recognize to
the right-to-left order that assemblers use.
(continued on next screen)
2) Access to array elements for readout or modification
Routines are provided to return the value of a bit or byte at any
array location, or to enter a value at any location. A routine is included
which visits all elements of a rectangular subset of the array, performing
a user-defined function (subroutine) at each element location in the block.
Translation functions provide conversion from row/bit to row/column/bit
addressing, and from row/column to absolute addressing.
3) Functions that may be performed on array elements
A small collection of logic functions which operate at the bit and
byte level is included. Most of these functions, which are fairly simple,
are used by other routines in the library. They are candidates for user-
defined functions for the routine that 'visits' a block of array elements.
::ARRAY0
::ARRAY1
::ARRAY2
::ARRAY3