System Variable Definitions

This chapter describes the function of the Xtal system variables. These variables are stored in the labelled commons SYSF, SYSI, SYSC and QXDATA in the XMACRO file.With rare exception, the values of these variables should only be altered by the nucleus routines.

Each variable is described as follows. The variable name is followed by a letter which indicates the type-definition. r is real, i is integer, and c is character. If a variable is an array the letter a is appended. Variables marked with an asterisk (*) are used by the nucleus routines for internal purposes and will not usually be used in other programs.

BLANK ca Word containing mxchwd: blank characters. Used as a source of blanks.
BUFIN ra Buffer containing mxfdim: field data loaded from the inputcharacter buffer CHRIN. Each word corresponds to an input field. If the fieldis a number, the buffer contains the number. If the field is void, the bufferword contains a voidflg:. If the field is a character string, the buffer wordcontains packed pointers to the array CHRIN. BUFIN is cleared to voidflg:before each input line is read.
BUFORD ia* Buffer containing mxfdim: sequence numbers indicating the order inwhich the field data in BUFIN is to be interpreted. These values can be setwith the order input line.
BUFOT ra Buffer of mxfdln: floating-point numbers, usually used with ncodefld:for translating into characters for output. May be used for a general purposereal array.
BUFPNT ia* Buffer containing mxfdim: fixed-format field positions in the CHRINline as defined by a field line or by a program. Used in translating a fixedformat input line. Only used if FIELDF=1.
CHRCOL i Pointer to the first blank character in the input line image.Characters 1 through CHRCOL-1 in CHRIN contain the line identifier. If a setidline has been entered, CHRCOL will always be set equal to 1. CHRCOL may be usedin conjunction with CHRMAX to define the span of an input line that containsuseful information. When syntax checking is on (see SYNTXF), it is not usuallynecessary for other programs to use CHRCOL and CHRMAX.
CHREOF i* Signal for end of file on line input device. It is set by linein: to1 if an EOF is encountered; otherwise zero.
CHRIN ca Buffer containing a copy of buffer CHRIP except all characters are inupper case. CHRIN is translated into the floating-point buffer BUFIN.
CHRIP ca Buffer containing mxchim: characters of the input line image read by linein:.
CHRMAX i Number of characters in the input line image. It is set by linein:.This count includes embedded blanks. It is used as a signal for the lastcharacter to be scanned if an input line is being interpreted with the syntaxchecking flag, SYNTXF, turned off. In machine specific implementations oflinein: there may be trash in CHRIN beyond character CHRMAX.
CHROT ca Buffer containing mxcout: characters of the standardoutput line.Characters may be inserted into CHROT using the movechar:, movertoc:, andncodefld: macros. After CHROT has been output, it is reset to blanks.
COMPID c* String containing the six letter compound identification code.
ELAPST r* Most recent value of the CPU clock time from getcpus:. It is used tocalculate the elapsed CPU time for each calculation.
FIELDF i* Flag indicates if input line images are to be decoded as fixed fieldsaccording to the contents of BUFPNT() (FIELDF=1) or free format (FIELDF=0).Normally zero but reset as one if a field line is encountered. Change istransparent to programs since BUFIN and CHRIN are used in the same way whetherFIELDF is 0 or 1.
FILENM ca Character array (10 characters per element) dimensioned to 99containing the filenames indexed by device number. Device numbers less than 1or greater than 99 are not permitted. The filenames are stored using theconstruction based on the definition of the macro filename:.
FILEXT ca Character array (3 characters per element) dimensioned to 99containing the filename extensions indexed by device number. Device numbersless than 1 or greater than 99 are not permitted. The filename extensions arestored by a nucleus routine (default) and by each program. These are applied infilename construction.
HEADOT c Character buffer of length mxcout: used to hold a header line whichhas been set up for use in printing repetitive lists. Important for printingatom lists.
INPBDF i* Contains the device number of the current archive bdf. Used at theend of a calculation to test if the archive bdf's have been interchanged.
IOIN2 i This integer contains the device number of the standard line input fileif this has been changed using the macro linestream:. When a physical end offile is detected by readline: the value of IOIN2 automatically replaces ioinp:.This is how line input 're-entrant streaming' is handled in a variety ofprograms.
IOLRHD ia* Pointer to header word of logical record. The value of the pointershows the relative location of the first word of the current logical record asit resides in the binary input/output buffer in the QX array.
IOMARK ia Contains the index of the first word-1 of input/output buffer in theQX array. IOMARK must be set to the position one behind that of the firstuseable word in the buffer for each bdf used in a program.
IOPKPT ia* Pointer set to the first word-1 of the next packet to be read orwritten from the input/output buffers in the QX array. Each call to the nucleusbdf read/write routines increments the value of IOPKPT for the file being useduntil the end of the buffer for that file is reached. At that point, the bufferis refilled from disk or flushed to disk and IOPKPT is set to a value whichpoints to the front of the buffer.
IOPRCT i* Count of physical records from the beginning of a file. Starts at 0.
IORWFL ia* Flag indicates whether the nucleus is only reading, or both reading into and writing from the same buffer.
IOSPEC ia* Contains the five printer specifications, in the order prtstat:,prtcmax:, prtlmax:, prtcpin:, prtlpin:. The default values are initialised as3, mxchln:, mxlnpg:, nchin:, nliin:. These may be changed with reset.
IOUNIT ia* Contains the device numbers and control signals of input/outputunits. The first eight elements contain the device numbers of the bdf's. Thenext elements are the other files in the order ioinp:, ioprt:, iopch:, ioerr:,iofm0:, iofm1:, iofm2:, ioda1: and ioda2:.
LABLEN ia* Array containing the lengths (number of characters) of eachatom label component (1 to 7), after a label has been processed with thelabel: macro.
LABMAX i Maximum number of characters in any atom label processedby the label: macro. The number is used for formatting the output of atomname strings.
LABPOS ia Array containing the first character position in an atom label of each component (1 to 7), after a label has been processed with the label: macro.
LCHROT i The right-most character position of the last number placed in theCHROT buffer using the macro ncodefld:. This value is not changed by characterdata placed in CHROT using movechar: etc.
LINCT i Number of lines remaining for current page of line output deviceioot1:. Pagination occurs when LINCT becomes zero and is then reset to themacro value mxlnpg:.
LINFLG i Flag used by the nucleus during a search for line identifyingcharacters. A LINFLG greater than zero causes a new line to be read; otherwisethe existing CHRIN buffer is reprocessed looking for a match with a new set ofline identifiers.
LINID i Number of line identification code found in character string passed by readline:. LINID is zero if no match is found with the input line.
LINMAS i Line count of input ASCII master archive file.
LINRM i Number of lines which must remain on the current page before the nextline is output. This ensures that a minimum number of lines is available on thesame page for a set of output lines. LINRM is reset to zero after a new page orafter a line is written with KEY = 1.
MASTER i* Master file support (0 = no or 1 = yes).
MASTIN c* Three character extension code of the input master file filename.
MASTOT c* Three character extension code of the output master file filename.
NIMAG i* Number of lines read from the input device since the start of the run.
NPAGE i* Count of total pages written on line output device during current run.
PNTPRG i* Number of characters in the program name list.
PPRIOR i Maximum printer priority allowed at current time. Lines will be output only if the writeline: priority is <= to this value.
PRGLST ca* Array containing the program names used in the system.
PRHIST i* Flag (0 = no or 1 = yes) to used to control the printing of thearchive history every time a archive binary file is read.
PROGID c* String containing name of previous program.
PRVOID i Flag used to signal ncodefld: on how voidflg: numbers shouldbe printed.If -1 voidflg: is output as its defined number;if 0 voidflg: is output as blanks andif 1 voidflg: is output as the string @@@@. The default value is 1.
QUITF c* String containing the six character error code passed to the error routine.
QX ra Main data-storage array used in all programs.
QXCUR i Current maximum usable index to the QX data array.
QXMAX i Maximum usable index possible of QX. Set from memmax:
QXSTR i Base index of QX data array set by nucleus for each program.
SETIDF i* Flag indicates if a setid image has been encountered and input linesare being processed as matching the entered line identification code. Flag is 0if no; 1 if yes.
SYNTXF i Flag indicates if syntax checking is applied when readline: ordcodefld: are used. When SYNTXF=0, normal Xtal line input syntax rules areapplied. Certain types of special input lines, such as symtry, violate theserules. Setting SYNTXF to 1 before such reads will prevent diagnostics frombeing printed.
TITLE ca* Buffer containing paging and title information, including currentprogram name, compound ID, page numbers, and date. Additional text may be addedto the TITLE buffer using a title line.