Up Next
Go up to *DATA
Go forward to Gates

Sortwords

Sortwords are variables used within the commands section to pass values between commands. They may be of type word, long or float. Long and float types must be explicitly declared in this section. Any undeclared variables in the commands section are assumed to be of type word. Sortwords are global, ie. they are recognised in the main commands section and all routines.  


WORD <name> [=<integer value>] [<name> [=<integer value>]]r

LONG <name> [=<integer value>] [<name> [=<integer value> ]]r

FLOAT <name> [=<floating point value>] [<name> [=<floating point value>]]r


WORD declares a 16-bit integer, LONG a 32-bit integer and FLOAT a 32-bit real. An optional initialisation value may be specified; if omitted it will default to zero.

eg.

WORD COUNTER1=1 COUNTER2=1
FLOAT PI=3.14159
declares two 16-bit integer variables COUNTER1 and COUNTER2 both initialised to 1 and one 32-bit floating point variable PI initialised to 3.14159.

Initialisation occurs once at the start of each sort program run.

If a WORD variable is to be output from the commands section using the OUTPUT command then it must be defined with an associated address:


WORD <name> [=<integer value>] [AT <14-bit-address>]


The address is neccessary for word variables to be output in Eurogam format, ie. a data word with a 14-bit address, so that they can be resorted later as pseudo-adc words. The address must lie in the range 0 to 16383 (214-1) and not coincide with any addresses assigned in the *FORMATS section. eg.

WORD GAMA AT @A
would define the word GAMA with hexidecimal address A.
  • Pre-defined Sortwords

  • support@ns.ph.liv.ac.uk

    Up Next