Trailing-Edge
-
PDP-10 Archives
-
decuslib10-06
-
43,50362/iolib5.apx
There are no other files named iolib5.apx in the archive.
APPENDIX A
LIST OF ALL IOLIB ROUTINES
This appendix lists all the IOLIB routines in several categories. If a category contains some critical routines, these
are listed before the rest separated from them by a line. Otherwise, within a category, the routines are listed in
alphabetical order.
The columns in the table are mostly self-explanatory. The 'DI' column indicates whether the routine requires that ac(D)
points to the current file and/or ac(I) points to the IDB. If the 'size' column contains a name instead of a number of words,
then the routine is an entry point to the named routine. Many routines are in IOMOD, the basic IO module. The current size
of IOMOD is 360 words long. Note that all sizes are given in decimal. If the 'section' column is empty, then this appendix
is the defining and only mention of that routine.
Acs Size
Routine Macro DI Description destroyed (words) Section
======= ===== == =========== ========= ======= =======
A.1 Basic IO Routines
--- ----- -- --------
$APDWT APDWT$ D open the current file for appending. If the file is being modified T1 5 6.21
wait for a given period before giving up.
Inputs: T1 : sleep seconds,,number of sleeps
Returns: error : non-skip
o.k. : skip
Outputs: T1 : bytes free in block (o.k. only)
T1 : IO error code (error only)
$APEND APEND$ D open the current file for appending, including setting the buffer T1 21 6.22
pointer for buffered modes. $APEND will not work correctly for files
with more liberal protections.
Returns: error : non-skip
o.k. : skip
Outputs: T1 : bytes free in block (o.k. only)
T1 : IO error code (error only)
$CLOSE CLOSE$ D execute a CLOSE UUO for the current file. All CLOSE bits are zeroed. T1 IOMOD 6.7
Inputs: taken from FDB
$CLOS0 CLOSE$ D as $CLOSE but allow caller to set CLOSE bits T1 IOMOD 6.7
Inputs: T1 : CLOSE bits
$DELET DELET$ DI delete the current file none IOMOD 6.10
LIST OF ALL IOLIB ROUTINES Page A-2
Returns: error : non-skip (LOOKUP or RENAME failure)
o.k. : skip
Outputs: T1 : IO error code (error only)
$DLBUF DLBUF$ DI return a buffer ring to the memory manager T1 IOMOD 6.18
Inputs: T1 : point to buffer header
$ENTER ENTER$ DI execute an ENTER UUO on the current file T1 IOMOD 6.5
Inputs: taken from FDB
Returns: error : non-skip
o.k. : skip
Outputs: T1 : IO error code (error only)
$ENTE0 ENTER$ DI as $ENTER, but allow the caller to set the protection and create T1 IOMOD 6.5
date/time.
$FRCHN FRCHN$ find the first free channel starting with a given channel T1 IOMOD
Inputs: T1 : starting channel
Returns: none free : non-skip
o.k. : skip
Outputs: T1 : channel number
$GETST GETST$ D get the IO status halfword for the current file T1 IOMOD 6.12
Outputs: T1 : status halfword (rh)
$LUKUP LUKUP$ DI execute a LOOKUP on the current file T1 IOMOD 6.4
Inputs: taken from FDB
Returns: error : non-skip
o.k. : skip
Outputs: T1 : IO error code (error only)
$INPUT INPUT$ DI read a physical record from the current file. T1 IOMOD 6.2
Inputs: taken from FDB
Returns: error : non-skip
endfile : skip
o.k. : double-skip
$MKBUF MKBUF$ DI create a ring of buffers for the current file. The size and number T1 IOMOD 6.17
of the buffers is taken from $FDBUF.
Inputs: T1 : point to buffer header
$FDBUF(D)
Returns: no core : non-skip
o.k. : skip
Outputs: T1 : 0,,ERNEC% (error only)
$MTxxx MTxxx$ D execute an MTAPE UUO for the current file. 'xxx' can be any of the T1 35 6.23
codes for MTAPE functions: e.g. MTREW$, MTBSF$. All functions wait
for completion using MTWAT$. MTBSF$ skips over EOF unless at BOT.
$OPEN OPEN$ DI execute an OPEN UUO for the current file. If the caller does not T1 IOMOD 6.6
specify a channel number, $OPEN chooses the 1st free channel.
Inputs: taken from FDB
Returns: error : non-skip
o.k. : skip
Outputs: T1 : IO error code (error only)
LIST OF ALL IOLIB ROUTINES Page A-3
$OUTIN OUTIN$ DI write the last physical record read back to the current file. T1 IOMOD 6.3
as $OUTPU, but subtracts 1 from the block number before writing.
$OUTPU OUTPU$ DI write a physical record to the current file T1 IOMOD 6.3
Inputs: taken from FDB
Returns: error : non-skip
o.k. : skip
Outputs: T1 : IO error code (error only)
$RLEAS RLEAS$ DI execute a RELEAS UUO for the current file. Return all buffers to T1 IOMOD 6.8
the heap.
Inputs: taken from FDB
$RLEA0 RLEAS$ DI as $RLEAS, but don't return rings to memory manager T1 IOMOD 6.8
$RENAM RENAM$ DI change the name and/or other details of the current file T1 IOMOD 6.9
The file must have been opened.
Inputs: taken from FDB
Returns: error : non-skip
o.k. : skip
Outputs: IO error code (error only)
$SETST SETST$ D set the status halfword for the current file T1 IOMOD 6.13
Inputs: T1 : 0,,status halfword
$UPDAT UPDAT$ DI open the current file for updating T1 7 6.19
Returns: error : non-skip (LOOKUP or ENTER failure)
o.k. : skip
Outputs: T1 : IO error code (error only)
$UPDWT UPDWT$ DI open the current file in update mode. If the file is being modified T1 17 6.20
wait for a given period before giving up.
Inputs: T1 : sleep seconds,,number of sleeps
Returns: error : non-skip
o.k. : skip
Outputs: T1 : IO error code (error only)
$USETI USETI$ DI position the current file to a given physical record for input T1 IOMOD 6.11
This routine is only effective for disk.
Inputs: T1 : last record number,,this record number
$USETO USETO$ D position the current file to a given physical record for output T1 IOMOD 6.11
This routine is only effective for disk.
Inputs: T1 : last record number,,this record number
$XTCAL XTCAL$ D execute a CALLI UUO for the current file, setting physical-only T1 IOMOD 6.15
if required
Inputs: T1 : UUO
T2 : argument
Returns: non-skip : non-skip
skip : skip
$XTDCL XTDCL$ D execute a device dependent CALLI UUO for the current file. T1 IOMOD 6.16
As $XTCLI, but set DSK if no device given.
$XTUUO XTUUO$ D execute a UUO for the current file none IOMOD 6.14
LIST OF ALL IOLIB ROUTINES Page A-4
Inputs: T1 : UUO (without channel number)
Returns: non-skip : non-skip
skip : skip
LIST OF ALL IOLIB ROUTINES Page A-5
Acs Size
Routine Macro DI Description destroyed (words) Section
======= ===== == =========== ========= ======= =======
A.2 Formatted Read Routines
--- --------- ---- --------
$READ READ$ DI read one byte from the current file T1 16 7.5
Returns: error : non-skip
endfile : skip
o.k. : double-skip
Outputs: T1 : byte, right-justified (o.k. only)
: IO-error-code (error and endfile only)
$$RBYT RBYTE$ DI read one byte from the current file. Fatal errors go to $FTLIO. T1 4 7.6
Returns: endfile : non-skip
o.k. : skip
Outputs: T1 : byte, right-justified (o.k. only)
: IO-error-code (endfile only)
$$RCH0 DI read a character from the current file. Fatal errors goto $FTLIO. T1 1 7.7
Returns: endfile : non-skip
o.k. : skip
Outputs: T1 : character, right justified (o.k. only)
: IO error code (endfile only)
$$RCHR RCHAR$ DI read a character from the current file and interpret it as T1 1 7.8
command character.
Outputs: T1 : character, right justified or endline indicator
(0 : ALT, -1 : EOL, -2 : EOF)
-------------------------------------------------------------------------------------------------------------------------
$RANCH RANCH$ DI read one character from the current file and test whether it is T1-T4 8
alphanumeric.
Returns: not alphanumeric : non-skip
alphanumeric : skip
Outputs: T1 : character
$RANC0 RANCH$ DI as $RANCH, but the character has already been read T1 $RANCH
Note: this routine can be used to check whether a character is
alphanumeric.
Inputs: T1 : character
$RCASH RCASH$ DI read a cash value in dollars and cents from the current file. T1-T4 29
The string may appear as '$dddd.cc' with or without the '$'.
If there is no '.' or '$', the number is assumed to be cents.
Returns: error : non-skip
o.k. : skip
Outputs: T1 : delimiting character (o.k. only)
: syntax error code (error only)
T2 : value in cents
$RCAS0 RCASH$ DI as $RCASH but leading character already read T1-T4 $RCASH
Inputs: T1 : character
LIST OF ALL IOLIB ROUTINES Page A-6
$RCALT DI as $RCCHR, but check first if last character was altmode, and if so, T1 $RCCHR 7.10
return $CHALX without reading another character
Outputs: T1 : character
$RCCHR DI read a character from the current file as a command character which T1 70 7.10
means that a certain amount of editing is done, to wit:
the editing done by $REDCH
leading spaces on a line are deleted
multiple spaces are compressed
trailing spaces are deleted
comments are ignored
'-' followed by <lf> is ignored (continuation line)
Outputs: T1 : character
$RDATE RDATE$ DI read the date from the current file in the format 'dd-mmm-yy' T1-T4 37
Returns: error : non-skip
o.k. : skip
Outputs: T1 : delimiting character (o.k. only)
: syntax error code (error only)
T2 : date in internal format
$RDAT0 RDATE$ DI as $RDATE but leading character already read T1-T4 $RDATE
Inputs: T1 : character
$RDECL RDECL$ DI read a signed decimal number from the current file. If the 1st T1-T4 17
character is '#' read the rest as an octal number. The '#' may also
follow the sign.
Outputs: T1 : delimiting character
T2 : number
$RDEC0 RDECL$ DI as $RDECL but leading character already read T1-T4 $RDECL
Inputs: T1 : character
$RDECM RDECM$ DI read a decimal number (+ possible multiplier) from the current T1-T4 3
file. The number is as $RDECL, but may have a multiplier, 'K' kilo,
'M' mega or 'G' giga. Note that 1K = 1000, not 1024.
Outputs: T1 : delimiting character
T2 : number
$RDCM0 RDECM$ DI as $RDECM but leading character already read T1-T4 $RDECM
Inputs: T1 : character
$RDVIC RDVIC$ DI read a device name from the current device. $RDVIC insists on a T1-T3 14
terminating ':'. Null names are forbidden.
Returns: error : nonskip
o.k. : skip
Outputs: T1 : delimiting character (o.k. only)
: syntax error code (error only)
T2 : device name in SIXBIT
$RDVI0 RDVIC$ DI as for $RDVIC but enter with the leading character already read T1-T4 $RDVIC
Inputs: T1 : ASCII character
$REDCH REDCH$ DI read a character from the current file and perform some basic T1 24 7.9
editing:
endfile is converted to ^Z
LIST OF ALL IOLIB ROUTINES Page A-7
<CR>, <DEL>, & <NUL> are ignored
<TAB> is converted to <SP>
<VT> & <FF> are converted to <LF>
<LF> is converted to -1
<ESC> is converted to 0
^C and ^Z are converted to -2
Outputs: T1 : character
$REDC0 REDCH$ DI as $REDCH but the character has already been read T1 $REDCH 7.9
Inputs: T1 : character
$RFILE RFILE$ DI read a filename from the current file. The filename may T1-T4 170 7.11
contain wild characters, and may include standard switches and
switches defined by the caller. $RFILE remembers and applies
sticky parts of filenames.
Returns: error : nonskip
o.k. : skip
Outputs: T1 : delimiting character (o.k. return)
: syntax error code (error return)
T2 : flags,,point to FDB containing file details
$RFIL0 RFILE$ DI as for $RFILE, but the FDB and the user switches may be given T1-T4 $RFILE 7.11
Inputs: T1 : point to switch tables
T2 : length,,point to FDB
$RKWRD RKWRD$ DI read a Kword value from the current file in the format 'nnnx', where T1-T4 11
x maybe 'K' or 'P' or blank. e.g. 20P, 13K, 128.
Default is K.
Returns: error : non-skip
o.k. : skip
Outputs: T1 : delimiting character (o.k. only)
: syntax error code (error only)
T2 : value in words
$RKWR0 RKWRD$ DI as $RKWRD but leading character already read T1-T4 $RKWRD
Inputs: T1 : character
$RNAME RNAME$ DI read an alphanumeric word from the current file. Only the 1st T1-T4 11
6 characters are remembered.
Outputs: T1 : delimiting character
T2 : word of SIXBIT characters
$RNAM0 RNAME$ DI as $RNAME but leading character already read T1-T4 $RNAME
Inputs: T1 : charatcer
$ROCTL ROCTL$ DI read a signed octal number from the current file. If the number T1-T4 17
terminates with a period, treat the number as if it had been decimal.
Outputs: T1 : delimiting character
T2 : number
$ROCT0 ROCTL$ DI as $ROCTL but leading character already read T1-T4 $ROCTL
Inputs: T1 : character
$ROCTM ROCTM$ DI read an octal number (+ possible multiplier) from the current T1-T4 3
file. The number is as $ROCTL, but may have a multiplier, 'K' kilo,
'M' mega or 'G' giga. Note that 1K = 1000 octal or 512 decimal.
LIST OF ALL IOLIB ROUTINES Page A-8
Outputs: T1 : delimiting character
T2 : number
$ROCM0 ROCTM$ DI as $ROCTM but leading character already read T1-T4 $ROCTM
Inputs: T1 : character
$RPATH RPATH$ DI read a path specification from the current file. The spec. may T1-T4 49 7.12
contain wild numbers and SFDs.
Returns: error : nonskip
o.k. : skip
Outputs: T1 : delimiting character (o.k. only)
syntax error code (error only)
T2 : PPN or point to path spec. block
T3 : PPN mask or point to path mask block
T4 : flags
$RPAT0 RPATH$ DI as $RPATH but enter with leading '[' already read T1-T4 $RPATH 7.12
Inputs: T1 : ASCII character
$RPJPG RPJPG$ DI read a project-programmer pair from the current file (no []). T1-T4 43 7.12
Both project and programmer may be wild.
Returns: error : non-skip
o.k. : skip
Outputs: T1 : delimiting character (o.k. only)
: syntax error code (error only)
T2 : PPN
T3 : wildcard mask
T4 : flags
$RPJP0 RPJPG$ DI as $RPJPG but leading character already read. T1-T4 $RPJPG 7.12
Inputs: T1 : character
$RPPN RPPN$ DI read a PPN in the form [PPN] from the current device. The PPN T1-T4 12 7.12
may be wild.
Returns: error : non-skip
o.k. : skip
Outputs: T1 : delimiting character (o.k. only)
syntax error code (error only)
T2 : PPN
T3 : wildcard mask
T4 : flags
$RPPN0 RPPN$ DI as $RPPN but leading '[' already read T1-T4 $RPPN 7.12
Inputs: T1 : character
$RREAL RREAL$ DI read a signed floating point number from the current file. T1-T4 39
The number may have a signed exponent as Esnn.
Outputs: T1 : delimiting character
T2 : number
$RREA0 RREAL$ DI as $RREAL but leading character already read T1-T4 $RREAL
Inputs: T1 : character
$RSWIT RSWIT$ DI read a switch spec. from the current file in the form T1-T4 122 7.13
'/name:value', where the name is a switch name either defined by the
caller, or a standard name, and the value is optional and may be in
LIST OF ALL IOLIB ROUTINES Page A-9
one of a number of predefined forms.
Returns: error : non-skip
o.k. : skip
Outputs: T1 : delimiting character (o.k. only)
: syntax error code (error only)
$RSWI0 RSWIT$ DI as $RSWIT but leading '/' already read T1-T4 $RSWIT 7.13
Inputs: character
$RTDAY RTDAY$ DI read a date and time from the current file in the format T1-T4 16
'dd-mmm-yy hh:mm:ss'. Either date or time may be omitted.
Assumptions are today, and midnight.
Returns: error : non-skip
o.k. : skip
Outputs: T1 : delimiting character
: syntax error code (error only)
T2 : time in milliseconds
T3 : date in internal format
$RTDA0 RTDAY$ DI as $RTDAY but leading character already read T1-T4 $RTDAY
Inputs: T1 : character
$RTIME RTIME$ DI read the time from the current file in the format 'hh:mm:ss' T1-T4 22
Trailing fields may be omitted.
Returns: error : non-skip
o.k. : skip
Outputs: T1 : delimiting character (o.k. only)
: syntax error code (error only)
T2 : time in milliseconds
$RTIM0 RTIME$ DI as $RTIME but leading character already read T1-T4 $RTIME
Inputs: T1 : character
$RUCCH RUCCH$ DI read a character from the current file and convert lower case T1 6
alphabetics to upper case.
Note: this routine may be called to convert a character to upper case.
Outputs: T1 : character
$RUCC0 RUCCH$ DI as $RUCCH but character already read T1 $RUCCH
Inputs: T1 : character
$RWNAM RWNAM$ DI read a name from the current file, where the name can include T1-T4 65
wildcards. The name is treated as alphanumeric and converted to
SIXBIT unless the leading character is '#' when it is octal with a
possible multiplier, and is converted to binary.
Outputs: T1 : delimiting character
T2 : word (SIXBIT or binary)
T3 : wildcard mask
T4 : flags
$RWNA0 RWNAM$ DI as $RWNAM but leading character already read T1-T4 $RWNAM
Inputs: T1 : character
$RWNUM RWNUM$ DI as $RWNAM, but octal is assumed unless the 1st character is alpha. T1-T4 $RWNAM
$RWNU0 RWNUM$ DI as $RWNUM but leading character already read T1-T4 $RWNAM
LIST OF ALL IOLIB ROUTINES Page A-10
Inputs: T1 : character
$RWORD RWORD$ DI read a word of characters from the current file delimited by <SP> or T1-T4 12
any non-SIXBIT character. Only the 1st 6 characters are remembered
Outputs: T1 : delimiting character
T2 : word of SIXBIT characters
$RWOR0 RWORD$ DI as $RWORD, but leading character already read T1-T3 $RWORD
Inputs: T1 : character
LIST OF ALL IOLIB ROUTINES Page A-11
Acs Size
Routine Macro DI Description destroyed (words) Section
======= ===== == =========== ========= ======= =======
A.3 Formatted Write Routines
--- --------- ----- --------
$WRITE WRITE$ DI write one byte to the current file. T1 14 7.2
Inputs: T1 : byte, right-justified
Returns: error : non-skip
o.k : skip
Outputs: T1 : IO-error-code (error return only)
$$WBYT WBYTE$ DI write one byte to the current file. Fatal errors go to $FATAL. T1 1 7.3
Inputs: T1 : byte, right justified
$$WCHR WCHAR$ DI write one character to the current file. Fatal errors go to $FATAL. T1 $$WBYT 7.4
Inputs: T1 : ASCII character, right justified
-------------------------------------------------------------------------------------------------------------------------
$WADDR WADDR$ DI write the contents of a halfword (e.g. an address) as 6 octal T1-T3 7
digits, zero filled
Inputs: T1 : binary halfword (rh)
$WBWRD WBWRD$ DI write a number as blocks (128 words) rounded up T1-T3 $WWWRD
Inputs: T1 : number of words
$WCASH WCASH$ DI write a sum in dollars and cents in the format '$ddddd.cc' T1-T3 15
Inputs: T1 : value in cents
$WCRLF WCRLF$ DI write a <cr><lf> none 5
Inputs: none
$WCWRD WCWRD$ DI write a number as a number of words of core choosing kwords or words T1-T3 $WWWRD
Inputs: T1 : number of words
$WDATE WDATE$ DI write a date in the format 'dd-mmm-yy' T1-T3 15
Inputs: T1 : date in internal form
$WDECL WDECL$ DI write a number in decimal T1-T3 $WRADX
Inputs: T1 : number
$WDNOW WDNOW$ DI write the date today in the format 'dd-mmm-yy' T1-T3 $WDATE
Inputs: none
$WDVIC WDVIC$ DI write a device name to the current file as 'nnn:' T1-T2 3
Inputs: T1 : device name in SIXBIT
$WFCHA WFCHA$ DI write a character exactly, by flagging control characters with ^, T1-T3 34
lower case characters with ', and naming special control characters.
e.g. ^A, 'Z, <BEL>
Inputs: T1 : ASCII character, right justified
$WFILE WFILE$ DI write a filename to the current file T1-T2 22
LIST OF ALL IOLIB ROUTINES Page A-12
Inputs: T1 : pointer to FDB containing filename
$WKWRD WKWRD$ DI write a number as Kwords rounded up T1-T3 $WWWRD
Inputs: T1 : number of words
$WNAME WNAME$ DI write a name which maybe in XWD format T1-T2 3
Inputs: T1 : name in SIXBIT
$WOCTL WOCTL$ DI write a number in octal T1-T3 $WRADX
Inputs: T1 : number
$WPATH WPATH$ DI write a path specification in []s T1-T3 18
Inputs: T1 : PPN or pointer to PATH. UUO block
$WPWOR WPWOR$ DI write a character followed by a word of SIXBIT characters T1-T2 $WWORD
Inputs: T1 : ASCII prefix character
T2 : word of SIXBIT characters
$WPWRD WPWRD$ DI write a core size in pages rounded up T1-T3 $WWWRD
Inputs: T1 : size in words
$WRADX WRADX$ DI write an integer in a given radix T1-T3 18
Inputs: T1 : number
T2 : radix
$WREAL WREAL$ DI write a word as a floating point number (F format if T1-T4 54
0.1 .le. n .ge. 1.0 and E format otherwise)
Inputs: T1 : number
$WTDAY WTDAY$ DI write a time and date in format 'hh:mm:ss dd-mmm-yy' T1-T3 6
Inputs: T1 : time in milliseconds
T2 : date in internal format
$WTDNW WTDNW$ DI write the time and date now (i.e. write a timestamp) T1-T3 4
Inputs: none
$WTEXT WTEXT$ DI write a text string to the current file T1 9
WLINE$ Inputs: T1 : pointer to ASCIZ text string
$WTIME WTIME$ DI write a time in hours and minutes 'hh:mm' T1-T3 8
Inputs: T1 : time in milliseconds
$WTIMS WTIMS$ DI write a time accurate to seconds 'hh:mm:ss' T1-T3 9
Inputs: T1 : time in milliseconds
$WTMTS WTMTS$ DI write a time accurate to tenths of a second 'hh:mm:ss.t' T1-T3 8
Inputs: T1 : time in milliseconds
$WTNOW WTNOW$ DI write the time now as 'hh:mm:ss' T1-T3 $WTIMS
Inputs: none
$WVERS WVERS$ DI write out all fields of a version number in standard format T1-T3 25
Inputs: T1 : version number
$WWORD WWORD$ DI write out a word as 6 SIXBIT characters T1-T2 7
Inputs: T1 : word of SIXBIT characters
LIST OF ALL IOLIB ROUTINES Page A-13
$WWWRD WWWRD$ DI write a number as a number of words e.g. 123W T1-T3 18
Inputs: T1 : number of words
$WXWD WXWD$ DI write a word as two halfwords, blank filled, separated by , T1-T3 8
Inputs: T1 : word
$W2FIL W2FIL$ DI write a 2 digit number with a given fill character T1-T3 8
Inputs: T1 : number
T2 : ASCII fill character
$W2FLB W2FLB$ DI write a number in 2 digits filled with a space T1-T3 $W2FIL
Inputs: T1 : number
$W2FL0 W2FL0$ DI write a number in 2 digits filled with a zero T1-T3 $W2FIL
Inputs: T1 : number
LIST OF ALL IOLIB ROUTINES Page A-14
Acs Size
Routine Macro DI Description destroyed (words) Section
======= ===== == =========== ========= ======= =======
A.4 Core Management Routines
--- ---- ---------- --------
$$ALLC ALLOC$ I allocate a block of free core. This routine exists to decide between T1 2 5.1
dynamic and static core allocation.
Inputs: T1 : number of words required
Returns: no core : non-skip
o.k. : skip
Outputs: T1 : point to word 1 of allocated block (o.k. only)
: 0,,ERNEC% (error only)
$$DALC DEALC$ I deallocate a block of core by returning it to the pool of T1 $$ALLC 5.1
free blocks
Inputs: T1 : point to word 1 of core block
--------------------------------------------------------------------------------------------------------------------------
$CRGET I allocate a block of core from above .JBFF, by moving .JBFF and T1 17 5.3
obtaining more core from the monitor if need be.
Inputs: T1 : size of chunk required
Returns: no core : non-skip
o.k. : skip
Outputs: T1 : point to 1st word of chunk (o.k. only)
: 0,,ERNEC% (error only)
$CRREL I it is not possible to deallocate a chunk using static management. none $CRGET 5.3
This call is a noop.
$HPGET I allocate a block of core from a linked list of free chunks of core. T1 108 5.2
If there is insuffient space, first garbage collect the list and then
get more space from the monitor.
Inputs: T1 : size of chunk required or 0 for largest available
Returns: no core : non-skip
o.k. : skip
Outputs: T1 : point to 1st word of chunk
: 0,,ERNEC% (error only)
$HPREL I deallocate a chunk (or chunks) of core by linking it back into T1 $HPGET 5.2
the chain of free chunks. Several chunks may be deallocated together
chaining them through their -1th word.
Inputs: T1 : point to 1st word of chunk
LIST OF ALL IOLIB ROUTINES Page A-15
Acs Size
Routine Macro DI Description destroyed (words) Section
======= ===== == =========== ========= ======= =======
A.5 Data Block Manipulation Routines
--- ---- ----- ------------ --------
$CLRFD CLRFD$ I create a new standard length FDB, clear it, set the length in $FDCNT T1 20
MAKFD$ and initialise $FDBFR and $FDSNC to -1.
Returns: no core : non-skip
o.k. : skip
Outputs: T1 : point to FDB (o.k. only)
: 0,,ERNEC% (error only)
$CLRF0 CLRFD$ I as $CLRFD, but allow caller to specify address and/or length of FDB T1 $CLRFD
If the address is given, the old FDB is used.
Inputs: T1 : length,,address of FDB
$INIID I clear the IDB, set the verbosity to standard, set MAXCOR to all core I 10+19
and set the last command character to endline. This routine contains
the IDB.
$LOSFD LOSFD$ I deallocate the space occupied by an FDB. If $FDPPN points to a path T1 7
block, the path block is deallocated also. This routine only
succeeds if dynamic core management is used.
Inputs: T1 : point to 1st word of FDB
$PATCH patch area loaded if FT$DBG is on none 0+200
$STACK pushdown stack and pointer thereto none 1+100 3.8
LIST OF ALL IOLIB ROUTINES Page A-16
Acs Size
Routine Macro DI Description destroyed (words) Section
======= ===== == ========== ========= ====== =======
A.6 Tempcore Routines
--- -------- --------
$TMPDL TMPDL$ DI delete a tempcore file from core and/or disk T1-T3 13 8.4
It is not an error if the file does not exist.
Returns: error : non-skip
o.k. : skip
Outputs: T1 : IO error code (error only)
$TMPFD TMPFD$ create an FDB for a tempcore file given a 3 character name T1-T4 17 8.2
The name of the file is nnnccc.TMP, where 'nnn' is the job number
and 'ccc' is the 3 character name.
Inputs: T1 : 3 SIXBIT characters, right justified
Outputs: D : point to FDB
$TMPIN TMPIN$ DI read 1 block of a tempcore file from core or from disk. If core, T1-T4 31 8.3
set flag FC$TCI to ensure that further calls to $INPUT give endfile
return.
Inputs: taken from FDB
Returns: error : non-skip
o.k. : skip
Outputs: T1 : IO error code (error only)
$TMPOU TMPOU$ DI close off a tempcore file. If the file is not yet ENTERed, try to T1-T4 19 8.5
write the file to tempcore. If so, or if tempcore fails, write to
disk and release channel.
Returns: error : non-skip
o.k. : skip
Outputs: T1 : IO error code (error only)
LIST OF ALL IOLIB ROUTINES Page A-17
Acs Size
Routine Macro DI Description destroyed (words) Section
======= ===== == =========== ========= ======= =======
A.7 Error Routines
--- ----- --------
$ADVIS ADVIS$ I write an advisory error message. Call as for $ERROR T1-T4 $ERROR 9.5
Inputs: as for $ERROR
Returns: yes
$ERROR I write an error message to the error file whose point is in $IDEFD(I) T1-T4 57 9.4
Full documentation may be found in section 9.4
Inputs: T1 : message point and flags
T2 : value
T3 : UUO or error type name (optional)
Returns: depends; yes if warning, no if fatal
$FATAL FATAL$ I write a fatal error message. Call as for $ERROR. T1-T4 $ERROR 9.5
Inputs: as for $ERROR
Returns: never; traps to $$FERR
$FTLIO FATAL$ DI write a fatal error message for the current file based on an IO error T1-T4 21 9.7
code, returned by basic IO module routines
Inputs: T1 : UUO-code,,error code
$FTLSY FATAL$ I write a fatal error message based on an error code returned by T1-T4 8 9.8
the command scanning subroutines.
Inputs: T1 : syntax error code
T2 : value
$WARN WARN$ I write a warning error message. Call as for $ERROR T1-T4 $ERROR 9.5
Inputs: as for $ERROR
Returns: yes
$WRNIO WARN$ DI write a warning error message about the current file. A code is T1-T4 $FTLIO 9.7
returned by the routines in the basic IO module.
Inputs: T1 : UUO-code,,error-code
$WRNSY WARN$ I write a warning error about bad syntax, given a code returned T1-T4 $FTLSY 9.8
by the command scanners on error.
Inputs: T1 : syntax error code
T2 : value
$$FERR exit to monitor mode after clearing input buffer. If CONTINUEd, T1 5 9.9
try to start at start address, if fail, exit.
Returns: only to program start address
LIST OF ALL IOLIB ROUTINES Page A-18
Acs Size
Routine Macro DI Description destroyed (words) Section
======= ===== == =========== ========= ======= =======
A.8 Utility Routines
--- ------- --------
$POPJ execute a POPJ P, instruction none IOMOD
$POPJ1 increment the return address and POPJ, thus doing a skip return none IOMOD
$POPJ2 double increment the return address and POPJ, thus doing a double none IOMOD
skip return. Cannot be used with $SAVEn.
$TOPJ POP the top of the stack into T1 and POPJ return T1 IOMOD
$TOPJ1 POP the top of the stack into T1 and skip POPJ return T1 IOMOD
$TOPJ2 POP the top of the stack into T1 and double skip POPJ return T1 IOMOD
Cannot be used with $SAVEn.
$XOPJ POP the top off the stack (to nowhere) and POPJ return none IOMOD
$XOPJ1 POP the top off the stack and skip POPJ return none IOMOD
--------------------------------------------------------------------------------------------------------------------------
$RESTT RESTT$ restore T1-T4 from the stack T1-T4 $SAVET
$SAVET SAVET$ save T1-T4 on the stack none 13
$SAVE1 SAVE1$ called on entry to a subroutine to save P1 and to restore P1 on exit none IOMOD
The caller is called as a subroutine so that his eventual POPJ
returns to $SAVE1 to restore P1. POPJ and POPJ1 are catered for
$SAVE2 SAVE2$ as $SAVE1, but P1 and P2 are saved and restored none IOMOD
$SAVE3 SAVE3$ as $SAVE1, but P1, P2 and P3 are saved and restored none IOMOD
$SAVE4 SAVE4$ as $SAVE1, but P1, P2, P3 and P4 are saved and restored none IOMOD
--------------------------------------------------------------------------------------------------------------------------
$BATCH BATCH$ determine whether the job's terminal is a PTY none 6
Returns: not PTY : non-skip
PTY : skip
$BEGCC BEGIn$ DI initialise a program and set up CCL tempcore input file if entry T1-T2 10 3.9
was at 'start+1'.
$BEGIN BEGIN$ DI initialise a program T1-T2 5 3.9
$CLBUF CLBUF$ DI clear command input by clearing the TTCALL TTY buffer or by reading T1 18
to endline.
LIST OF ALL IOLIB ROUTINES Page A-19
$CLLIN CLLIN$ DI clear the current command input line none 5
$CNVNU CNVNU$ return the universal date/time now T1-T4 $CNVUI
As $CNVIU but uses the date/time from the monitor
$CNVUI CNVUI$ convert a date/time in universal format to internal format T1-T4 102
Inputs: T1 : universal date,,time
Outputs: T1 : time in milliseconds
T2 : date in internal format
$CNVIU CNVIU$ convert internal date/time to universal format T1-T4 $CNVUI
Inputs: T1 : time in milliseconds
T2 : date in internal format
Outputs: T1 : universal date,,time
$FDTTY FDTTY$ DI check whether the current file is a terminal or not. none 6
Returns: not TTY : normal
TTY : skip
$MATCH MATCH$ match a SIXBIT name against a table of names, selecting T1-T3 36 10.1
either an exact match or an unambiguous abbreviation. A name in
the table may begin with '*' to say that the first letter is enough
to identify this name.
Inputs: T1 : IOWD length,address of table
T2 : SIXBIT name to match
Returns: error, no or several matches
o.k. :skip
Outputs: T1 : flag,,table index. lh=0 if exact, lt 0 if not (o.k. only)
: lt 0 : no match; ge 0 :several (error only)
$MONRT MONRT$ return to monitor mode by EXIT 1, unless job not logged in. Then T1 13
use LOGOUT. Return to caller on 'CONTINUE'.
Return: only if CONTINUE is typed at monitor mode
$SLEEP SLEEP$ send the job to sleep for a specified period using HIBER or SLEEP T1 9
Inputs: T1 : sleep time in seconds
$ZERO ZERO$ zero a chunk of core by BLT none 10
Inputs: T1 : length,,address
APPENDIX B
IOLIB MACROS
This appendix is a complete list of all IOLIB macros. The macros are listed under several headings but within those
headings the macros are listed in alphabetical order. The macros that are useful in writing the program, rather than macros
which merely call routines, are listed first. The macro name is given, along with the names of any routines called, a brief
description, the call, the number of lines of inline code generated, and a further reference. The descriptions in this
appendix are not as full as those of the routines in appendix A, and the user should refer to appendix A if he needs
clarification.
Inline
Macro Routine Description Call code Section
===== ======= =========== ==== ====== =======
B.1 Programming Macros
--- ----------- ------
BEGIN$ $BEGIN perform all program initialisation including concealed BEGIN$ tfn 5 3.9
mode entry points, CCL entry points, RESET UUO, stack
setup, IDB initialisation and command FDB setup
'tfn' 3 character tempcore filename (otherwise program name)
CMDFD$ set ac(D) to point to the current command file. CMDFD$ 1
Load ac(D) from $IDIFD(I).
ERRFD$ set ac(D) to point to the current error file. ERRFD$ 1
Load ac(D) from $IDEFD(I).
FDESC$ create an inline FDB and fill it with values FDESC$ dv,nm,ex,pt,md,ln $LNFDB+ 3.12
'dv' device name
'nm' file name
'ex' extension name
'pt' path spec. in <>, e.g. <104,427>
'md' IO mode
'ln' length of FDB, if longer than standard
HISEG$ if first call of program, create 'TWOSEG' and HISEG$ 0 3.11
'RELOC 400000' pseudo-ops to start two-segmenting
otherwise, if assembling high segment code, do nothing;
otherwise, set outstanding literals into low segment
and switch segments
IOLIB MACROS Page B-2
JBREN$ load .JBREN (reenter address) with the given address JBREN$ ac,adr 2
The user may choose the temporary ac.
'ac' temporary ac to be used
'adr' reenter address
JBVER$ set the version number defined by the $$V??? symbols JBVER$ 0 3.14
into .JBVER in DEC format
LDFD$ move an FDB point into ac(D) LDFD$ adr 1
'adr' address of FDB point
LDFDI$ move immediate an FDB point into ac(D) LDFDI$ adr 1
'adr' FDB point
LOSEG$ if assembling code into the low segment, do nothing LOSEG$ 0 3.11
otherwise, set all outstanding literals into high
segment and switch segments
MAKFD$ write code to create or initialise an FDB and MAKFD$ dv,nm,ex,pt,md,ln,ad 5+ 3.13
fill the FDB with values.
'dv' device name
'nm' file name
'ex' extension name
'pt' path spec. inside <>, e.g. <104,427,SF1>
'md' IO mode
'ln' length of FDB if non-standard
'ad' address of FDB; if none make a new FDB
if an ac, use it as point to address
MSGFD$ set ac(D) to point to the current message file. MSGFD$ 1
Load ac(D) from $IDOFD(I).
PATCH$ increment $$VEDT for each patch; increment $$VMIN by one PATCH$ <p1,p2,..pn> 0 3.14
and make a symbol '$n' for each pn to be used if adding
and subtracting code with IFDEF and IFNDEF
'p1,..pn' patch numbers
TRMFD$ set ac(D) to point to the job's terminal. Zero ac(D). TRMFD$ 1
VERSN$ define values for the symbols, $$VMAJ, $$VMIN VERSN$ vm,ve,vw 0 3.14
$$VEDT and $$VCOD. These symbols are used by the other
version number macros and are explained in section 3.14.
'vm' is the major version number
've' is the edit number (updated by PATCH$)
'vw' is the who last edited code
the minor version is set to zero (updated by PATCH$)
The versions of C and IO used are PRINTXed during assembly.
VTEXT$ creates an ASCIZ string of the version number from VTEXT$ 1+ 3.14
the version number symbols e.g. '5B(107)-1'
IOLIB MACROS Page B-3
Inline
Macro Routine Description Call code Section
===== ======= =========== ==== ====== =======
B.2 Basic IO Macros
--- ----- -- ------
APDWT$ $APDWT as APEND$ but on 'file being modified' failure APDWT$ 1 6.21
wait and try again a given number of times error return
APEND$ $APEND open a file for appending, setting buffer pointers APEND$ 1 6.22
appropriately. Only works for append mode files. error return
CLOSE$ $CLOSE execute a CLOSE UUO. If the call has an argument, two CLOSE$ bits 1!2 6.7
instructions are generated, and the arguments are used
as CLOSE UUO bits.
'bits' CLOSE UUO bits
DELET$ $DELET delete the current file DELET$ 1 6.10
error return
DLBUF$ $DLBUF deallocate a buffer ring DLBUF$ 1 6.18
ENTER$ $ENTER Execute an ENTER UUO for the current file. If the ENTER x 1 6.5
macro has an argument then the UUO may change the error return
create date/time field
'x' any argument (just a flag)
FRCHN$ $FRCHN locate the first free software IO channel starting FRCHN$ 1
with the contents of ac(T1) error return
GETST$ $GETST get the IO status halfword from the monitor. The status GETST$ 1 6.12
returned in ac(t1)
LUKUP$ $LUKUP execute a LOOKUP UUO for the current file. LUKUP$ 1 6.4
error return
INPUT$ $INPUT execute an INPUT UUO for the current file. Make a INPUT$ 1 6.2
buffer ring and find the required record if needed error return
endfile return
MKBUF$ $MKBUF build a buffer ring (see Appendix A) MKBUF$ 1 6.17
error return
MTxxx$ $MTxxx execute an MTAPE UUO for the current file. MTxxx$ 1 6.23
'xxx' may be any of the codes for the various MTAPE
functions, e.g. MTREW$ executes a rewind.
All functions are followed by an MTWAT$ to wait for completion.
MTBSF$ skips over the EOF unless at BOT.
OPEN$ $OPEN execute an OPEN UUO for the current file, setting OPEN$ 1 6.6
defaults and finding a free channel error return
OUTIN$ $OUTIN output the last record input (to a disk device) OUTIN$ 1 6.3
error return
IOLIB MACROS Page B-4
OUTPU$ $OUTPU execute an OUTPUT UUO for the current file OUTPU$ 1 6.3
making a buffer ring and finding required record if error return
necessary
RLEAS$ $RLEAS execute a RELEAS UUO for the current file and RLEAS$ x 1 6.8
deallocate buffers
'x' flag. If given, don't deallocate buffers.
RENAM$ $RENAM execute a RENAME UUO for the current file. The file RENAM$ 1 6.9
have been LUKUP$ed first. error return
SETST$ $SETST set the IO channel status from ac(T1) into the monitor SETST$ 1 6.13
UPDAT$ $UPDAT open a file for updating UPDAT$ 1 6.19
error return
UPDWT$ $UPDWT as UPDAT$, but on 'file being modified' failure UPDWT$ 1 6.20
wait and try again a given number of times error return
USETI$ $USETI find the required record for disk files. On entry USETI$ 1 6.11
ac(T1) contains 'last-record,,next record'
USETO$ $USETO find the required record for output for disk files USETO$ 1 6.11
On entry ac(T1) contains 'last-record,,this-record'
XTCAL$ $XTCAL execute a CALLI UUOZ for the current file, setting XTCAL$ uuo 2 6.15
physical-only if required error return
'uuo' CALLI UUO to be executed (arg in ac(T2))
XTDCL$ $XTDCL execute a device dependent CALLI UUO for the current XTDCL$ uuo 2 6.16
file. error return
'uuo' CALLI UUO to be executed
XTUUO$ $XTUUO execute an IO UUO for the current file XTUUO$ uuo 2 6.14
'uuo' UUO name error return
IOLIB MACROS Page B-5
Inline
Macro Routine Description Call code Section
===== ======= =========== ==== ====== =======
B.3 Read macros
--- ---- ------
RBYTE$ $$RBYT read a byte, and trap to $FATAL on error RBYTE$ 1 7.6
endfile
RCALT$ $RCALT read a character with command editing, but if last RCALT$ 1 7.10
character was altmode, return altmode instead.
RCCHR$ $RCCHR read a character with command editing RCCHR$ 1 7.10
RCHAR$ $$RCHR read a character with command editing RCHAR$ 1 7.8
READ$ $READ read a byte READ$ 1 7.5
error return
endfile
-----------------------------------------------------------------------------------------------------------------------------
The following macros will accept an argument. If an argument is provided it is assumed to be the address of the leading
character of the string to be read. If that address is ac(T1), the macro merely assembles a jump to the secondary entry point
of the routine. If the address is elsewhere, then the macro assembles an extra instruction to move the character into ac(T1).
If there is no argument, the macro assembles a PUSHJ to the routine as described in appendix A.
All the macros given below return the delimiting character in ac(T1) and the value read in ac(T2). Some routines return a
wildcard mask in ac(T3), and a few return extra data in ac(T4). Refer to the description of the routines for specific details
of parameters.
RANCH$ $RANCH read a character and check whether alphanumeric RANCH$ ac 1!2
error return means not alphanumeric error return
RCASH$ $RCASH read a cash value in dollars and cents RCASH$ ac 1!2
error return
RDATE$ $RDATE read a date from the current file in the format RDATE$ ac 1!2
dd-mmm-yy. error return
RDECL$ $RDECL read a decimal number RDECL$ ac 1!2
RDECM$ $RDECM read a decimal number possibly with a K, M or G RDECM$ ac 1!2
multiplier
RDVIC$ $RDVIC read a device name RDVIC$ ac 1!2
REDCH$ $REDCH read a character and perform basic editing REDCH$ ac 1!2 7.9
RFILE$ $RFILE read a file specification into an FDB. Note that this RFILE$ ac 1!2 7.11
macro is different. If there is no argument, there is error return
no switch table, and $RFILE creates an FDB. If there
is an argument, it is an ac which holds a point to the
switch table (possibly zero). If this is ac(T1), no
IOLIB MACROS Page B-6
extra code is created. A point to an FDB or zero must
be in ac(T2).
RKWRD$ $RKWRD read a core size as Kwords or pages RKWRD$ ac 1!2
RNAME$ $RNAME read an alphanumeric name and convert to a SIXBIT word RNAME$ ac 1!2
ROCTL$ $ROCTL read an octal number ROCTL$ ac 1!2
ROCTM$ $ROCTM read an octal number possibled postfixed by a K, M or G ROCTM$ ac 1!2
multiplier.
RPATH$ $RPATH read a path specification RPATH$ ac 1!2 7.12
error return
RPJPG$ $RPJPG read a project,programmer pair (no []) RPJPG$ ac 1!2 7.12
error return
RPPN$ $RPPN read a PPN RPPN$ ac 1!2 7.12
error return
RREAL$ $RREAL read a floating point number expressed in FORTRAN E or F RREAL$ ac 1!2
format.
RSWIT$ $RSWIT read a switch name and value RSWIT$ ac 1!2 7.13
error return
RTDAY$ $RTDAY read a tme and date RTDAY$ ac 1!2
error return
RTIME$ $RTIME read a time in the format hh:mm:ss RTIME$ ac 1!2
error return
RUCCH$ $RUCCH read a character and convert lower to upper case RUCCH$ ac 1!2
RWNAM$ $RWNAM read a possibly wild name RWNAM$ ac 1!2
RWNUM$ $RWNUM read a possibly wild number (or name if 1st character is RWNUM$ ac 1!2
alphabetic).
IOLIB MACROS Page B-7
Inline
Macro Routine Description Call code Section
===== ======= =========== ==== ====== =======
B.4 Write Macros
--- ----- ------
WADDR$ $WADDR write an octal address in 6 digits filled by zeros WADDR$ 1
WBWRD$ $WBWRD write a number as a number of blocks (128 words) WBWRD$ 1
WBYTE$ $$WBYT write a byte but trap to $FATAL on error WBYTE$ 1 7.3
WCASH$ $WCASH write a number of cents as dollars and cents WCASH$ 1
WCHAR$ $$WCHR write character WCHAR$ "c" 1!2 7.4
'c' an ASCII character
WCRLF$ $WCRLF write an endline <cr><lf> WCRLF$ 1
WCWRD$ $WCWRD write a number as a multiple of core size WCWRD$ 1
which may be P, K or W.
WDATE$ $WDATE write a date as dd-mmm-yy WDATE$ 1
WDECL$ $WDECL write a decimal number WDECL$ n 1!2
'n' a positive decimal number
WDNOW$ $WDNOW write the date now WDNOW$ 1
WDVIC$ $WDVIC write a device name as 'dev:' WDVIC$ 1
WFCHA$ $WFCHA write a funny character, making code explicit WFCHA$ 1
by flagging control and lower case characters
WFILE$ $WFILE write the filename from an FDB WFILE$ 1
WHELP$ $WHELP write a help text WHELP$ 1
WKWRD$ $WKWRD write a core size in Kwords WKWRD$ 1
WLINE$ $WTEXT write a text string adding a <cr><lf> WLINE$ <text> 1!2
'text' a string of ASCII characters
WNAME$ $WNAME write a name in SIXBIT or halfwords WNAME$ 1
WOCTL$ $WOCTL write an octal number WOCTL$ n 1!2
'n' a positive octal number
WPATH$ $WPATH write a path specification (or just PPN) WPATH$ 1
WPWOR$ $WPWOR write a word of SIXBIT characters preceded by an WPWOR$ "c",word 1!2!3
ASCII character. Either argument may be ommitted.
'c' an ASCII character
'word' up to 6 SIXBIT characters
IOLIB MACROS Page B-8
WPWRD$ $WPWRD write a core size in pages WPWRD$ 1
WRADX$ $WRADX write a number in a given radix (given in ac(T2)) WRADX$ 1
WREAL$ $WREAL write a floating point number WREAL$ n 1!2
'n' a number in FORTRAN E-format
WRITE$ $WRITE write a byte WRITE$ 1 7.2
error return
WTDAY$ $WTDAY write time and date as dd-mmm-yy hh:mm WTDAY$ 1
WTDNW$ $WTDNW write time and date now WTDNW$ 1
WTEXT$ $WTEXT write a text string WTEXT$ <text> 1!2
'text' a string of ASCII characters
WTIME$ $WTIME write time as hh:mm WTIME$ 1
WTIMS$ $WTIMS write time as hh:mm:ss WTIMS$ 1
WTMTS$ $WTMTS write time as hh:mm:ss.t WTMTS$ 1
WTNOW$ $WTNOW write time now as hh:mm:ss WTNOW$ 1
WWORD$ $WWORD write a word of SIXBIT characters WWORD$ word 1!2
'word' a string of up to 6 characters
WWWRD$ $WWWRD write a number as a number of words WWWRD$ 1
WXWD$ $WXWD write a word as two halfwords WXWD$ 1
W2FIL$ $W2FIL write 2 digits, filled on left W2FIL$ 1
W2FLB$ $W2FLB write 2 digits, filled on left by space W2FLB$ 1
W2FL0$ $W2FL0 write 2 digits, filled on left by zero W2FL0$ 1
IOLIB MACROS Page B-9
Inline
Macro Routine Description Call code Section
===== ======= =========== ==== ====== =======
B.5 Core Management Macros
--- ---- ---------- ------
ALLOC$ $$ALLC call the memory manager to allocate space ALLOC$ 1 5.1
error return
DEALC$ $$DALC call the memory manager to deallocate space DEALC$ 1 5.1
B.6 Data Block Manipulation Macros
--- ---- ----- ------------ ------
CLRFD$ $CLRFD maybe create, but certainly zero and initialise an CLRFD$ adr 1!2
FDB. If the macro has an argument use this as the address error return (no core)
of the FDB.
'adr' address of FDB
LOSFD$ $LOSFD deallocate space occupied by FDB. Deallocates path LOSFD$ 1
block, if any, too
B.7 Tempcore Macros
--- -------- ------
TMPDL$ $TMPDL delete a tempcore file TMPDL$ 1 8.4
error return
TMPFD$ $TMPFD create an FDB for a tempcore file TMPFD$ 1 8.2
TMPIN$ $TMPIN read a tempcore file TMPIN$ 1 8.3
error return
TMPOU$ $TMPOU write and close a tempcore file TMPOU$ 1 8.5
error return
IOLIB MACROS Page B-10
Inline
Macro Routine Description Call code Section
===== ======= =========== ==== ====== =======
B.8 Error Macros
--- ----- ------
ADVIS$ $ADVIS write an advisory message to the error file ADVIS$ <text>,arg,ec,uc 1 9.6
'text' the text of the message
'arg' a code for the type of argument
'ec' a 3 character code prefaciing the message
'uc' a 6 character UUO name
FATAL$ $ERROR write a fatal error message to the error file and FATAL$ <text>,arg,ec,uc 1 9.6
exit through $$FERR.
'text' the text of the message
'arg' a code for the type of the argument
'ec' a 3 character code which prefixes the message
'uc' a 6 character UUO name
WARN$ $ERROR send a warning error message to the error file WARN$ <text>,arg,ec,uc 1 9.6
'text' the text of the error message
'arg' a code for the data type of the argument
'ec' a 3 character code prefacing the message
'uc' a 6 character UUO name
IOLIB MACROS Page B-11
Inline
Macro Routine Description Call code Section
===== ======= =========== ==== ====== =======
B.9 Utility Routine Macros
--- ------- ------- ------
BATCH$ $BATCH discover whether job running from PTY BATCH$ 1
not PTY return
CLBUF$ $CLBUF clear buffer for job's terminal; read to CLBUF$ 1
endline otherwise
CLLIN$ $CLLIN read to endline CLLIN$ 1
CNVNU$ $CNVNU return now as a Universal date/time CNVNU$ 1
CNVUI$ $CNVUI convert Universal date/time to internal CNVUI$ 1
CNVIU$ $CNVIU convert internal date/time to Universal CNVIU$ 1
FDTTY$ $FDTTY check whether the current file in a terminal FDTTY$ 1
not TTY
TTY
MATCH$ $MATCH match a SIXBIT name against a table MATCH$ 1 10.2
MONRT$ $MONRT return to monitor mode MONRT$ 1
RESTT$ $RESTT restore T1-T4 from the stack RESTT$ 1
SAVET$ $SAVET save acs T1-T4 on the stack SAVET$ 1
SAVE1$ $SAVE1 preserve ac(P1) during a subroutine SAVE1$ 1
SAVE2$ $SAVE2 preserve acs P1-P2 during a subroutine SAVE2$ 1
SAVE3$ $SAVE3 preserve acs P1-P3during a subroutine SAVE3$ 1
SAVE4$ $SAVE4 preserve acs P1-P4 during a subroutine SAVE4$ 1
SLEEP$ SLEEP sleep by HIBER or SLEEP UUO for given time SLEEP$ ac 1!2
Time may be give in 'ac'.
ZERO$ $ZERO zero a chunk or memory ZERO$ 1
APPENDIX C
CONTENTS OF THE FDB
Index Symbol Description
===== ====== ===========
C.1 Words within the FDB
--- ----- ------ --- ---
0 $FDFPT forward pointer. The left half is used to link
FDBs together to form a linked list. The left
half is unused but reserved for IOLIB.
1 $FDCHN channel number. The right half contains the
software IO channel number in bits 29 to 32. The
user may select a channel number but normally he
will let IOLIB do this for him. The left half
contains flags showing the status of the IO
process on this file. The flags are described
below.
2 $FDTYP argument returned by a DEVTYP UUO on the channel.
Set by the $OPEN routine.
3 $FDNBK current record number for the FDB,,next record
number for the FDB. The next record number may be
set before calling $INPUT or $OUTPU for a disk
device only. Updated by $INPUT, $OUTPU, $USETI,
$USETO and initialised by $OPEN only if zero.
4 $FDBUF buffering details. The right half contains the
length of each buffer in words. The left half
contains the number of buffers. IOLIB assumes
that these details are identical for input and
output sides of a channel. Defaults are two
buffers of the standard size for the device. Set
up by $OPEN.
5 $FDIOW Point to IOWD chain for dump mode IO. Normally
zero for buffered modes, but may be the address of
the next buffer if out of sequence.
CONTENTS OF THE FDB Page C-2
6-10 $FDOPN 3 word OPEN UUO data block. The words are
described indiviually below, and in the Monitor
Calls Handbook.
6 $FDSTS IO channel status. The $open routine takes values
supplied in $FDMOD, for parity, density and
physical-only, and puts them into $FDSTS. All
other fields default to zero, in particular, the
default mode is ASCII (.IOASC). $GETST writes the
current IO status into the right half of $FDSTS.
7 $FDDEV device name, left-justified. The default is 'DSK'
for IOLIB IO.
10 $FDBHD buffer header addresses. The left half is the
output buffer header address and the right half is
the input buffer header address. The buffer
headers are within the FDB at $FDOBH and $FDIBH.
11-21 $FDPTH path specification in a form suitable for PATH.
UUOs. The first 2 words are unused, the 3rd word
is the PPN and further words are SFDs terminated
by a zero word.
13 $FDPPP PPN word in the path specification
14 $FDSFD first SFD name in the path specification
22-25 $FDOBH output buffer header (4 words). Also used for the
path mask for command scanning.
22-27 $FDPTM path mask block of 6 words masking the PPN and the
SFDs. Set by the filename scanner RFILE to
indicate wildcards typed.
26-31 $FDIBH input buffer header (4 words). Also used for part
of the path mask and for the filename mask in
command scanning.
30 $FDNMM filename name mask. Set by the filename scanner,
$RFILE, to indicate which characters were
wildcards.
32 $FDMOD modifier word. A vector of switches and
parameters that may be set by the user by program
or by command. The individual fields in the
modifier word are described below.
33 $FDMOM modifier mask. A vector of masks corresponding to
the various fields in $FDMOD. If the mask in
$FDMOM is set, then that field in $FDMOD has been
given.
34 $FDBFR /BEFORE specification. Set by the command scanner
to give the /BEFORE date and time.
CONTENTS OF THE FDB Page C-3
35 $FDSNC /SINCE specification. Set by the command scanner
to give the /SINCE date and time.
36 $FDABF /ABEFORE specification. Set by the command
scanner to give the access BEFORE date and time.
37 $FDASN /ASINCE specification. Set by the command scanner
to give the access SINCE date and time.
40-46 $FDRIB RIB block data. The format of the RIB block
section is as for extended disk UUOs. A standard
FDB contains the RIB block from .RBCNT to .RBVER,
but further words may be added by building an
extended FDB. The RIB data is physically the last
information in an FDB. For further details, see
the Monitor Calls Handbook.
40 $FDCNT the count of words in the extended RIB.
41 $FDPPN either the PPN or a point to a PATH. UUO block.
MAKFD$ and FDESC$ set up $FDPPN to point to
$FDPTH, but the user may write a PPN over this
pointer or even a pointer to another path block.
42 $FDNAM the filename in SIXBIT, left justified.
43 $FDEXT Extension. The left half contains the extension
in 3 SIXBIT characters, left-justified. The right
half is used by the command scanner for the
extension mask.
44 $FDPRV privilege word. Contains protection, mode and
create time and date information.
45 $FDSIZ file size in words.
46 $FDVER version number.
46 $ENFDB end of the FDB.
47 $LNFDB length of an FDB in words.
CONTENTS OF THE FDB Page C-4
Bits Symbol Description
==== ====== ===========
C.2 Bits definitions for $FDCHN
--- ---- ----------- --- ------
0 FC$OPN an OPEN UUO has been done on this channel
1 FC$LUK a LOOKUP UUO has been done on this channel.
2 FC$ENT an ENTER UUO has been done on this channel.
3 FC$TCI Tempcore input has been done on this channel
4 FC$CSC channel number set by caller.
C.3 Bit definitions in $FDMOD and $FDMOM
--- --- ----------- -- ------ --- ------
0 FM$NDV null device specification.
1 FM$NUL null extension. The extension was specified but
was null; therefore do not use a default
extension.
2 FM$DIR directory specified.
3 FM$PHY /PHYSICAL; physical only IO on this channel.
4 FM$NOM /OKNONE; ok if no file matches this
specification.
5 FM$DFX wild fixup unnecessary for this directory.
6-8 FM$TRM code for terminator of file specification.
9 FM$STR /STRS
10-23 unused
24 FM$PAR magtape recording parity (1=even).
20-26 FM$DEN magtape recording density (0=std, 1=250, 2=556,
3=800)
27-35 FM$PRO protection code as 3 octal digits.
APPENDIX D
CONTENTS OF THE IDB
Index Symbol Description
===== ====== ===========
0 $IDDYC pointer to a linked list of chunks of free core
for allocation to any routine that requires space.
The dynamic core pointer is not used by the static
core allocater.
1 $IDTOP maximum core that may be used by this program, set
by program or by command using the /MAXCOR switch.
The core is measured in words and the value is
actually the maximum+1.
2 $IDLAC look-ahead character. Used by the command scanner
to store the extra character when it has had to
look ahead to interpret the current character.
3 $IDCPC PC for the command scanning coroutine.
4 $IDLSC last character read by the command scanner $REDCH.
5 $IDNXC next character to be read. If this word is
non-zero, it forces the command scanner to read
this character instead of reading from the input
file.
6 $IDPNM program name. Set by the BEGIN$ macro by GETTAB.
7 $IDPPN program PPN. As $IDPNM.
10 $IDPEX low segment extension name (left half).
11 $IDPDV program device name.
12 $IDIFD input FDB pointer. The address of the FDB being
used for command input. Set to TTY: or to a
tempcore file by the BEGIN$ macro.
13 $IDOFD output FDB pointer. The address of the FDB being
used for message output. Set to TTY: by the
CONTENTS OF THE IDB Page D-2
BEGIN$ macro.
14 $IDEFD error FDB pointer. The address of the FDB being
used for error message output. Set to TTY: by
the BEGIN$ macro.
15 $IDCCL CCL entry point flag (0=normal, -1=CCL). Set up
by the BEGIN$ macro.
16 $IDSWT point to standard switch table. Used by $RSWIT to
compare switch against standard switches, if it
doesn't match against user-provided switches.
17 $IDRUN runoffset,,point to run FDB. Details for program
to be run on termination of this program.
20 $IDECD error codes. The left half contains 3 SIXBIT
characters to preface all error messages written
by the program. The right half contains the
verbosity code for error messages (0=low,
1=normal, 2=high). Set to 'normal' by the BEGIN$
macro.
21 $IDHNM file name for 'help'.
22 $IDDFD point to FDB containing defaults for file name
scanning.
23 $IDJNO reserved,,job number: set by BEGIN$ macro
24 $IDJPP job's PPN: set by BEGIN$ macro
25-35 $IDJPT default path specification for this task. Set by
the BEGIN$ macro, and should be used to change the
default path spec.
36 $IDCPU code for the CPU type, set by the BEGIN$ macro.
$CPKAX==0, and $CPKIX==1.
36 $ENIDB end of the IDB
37 $LNIDB length of the IDB.
APPENDIX E
IO ERROR CODES
Index Symbol Description
===== ====== ===========
E.1 UUO codes
--- --- -----
0 UUUUO$ error for undefined UUO
1 UUOPN$ OPEN UUO error
2 UUENT$ ENTER UUO error
3 UULUK$ LOOKUP UUO error
4 UUREN$ RENAME UUO error
5 UUINP$ INPUT UUO error
6 UUOUT$ OUTPUT UUO error
7 UURUN$ RUN UUO error
10 UUGET$ GETSEG UUO error
11 UUCLO$ CLOSE UUO error
12 UUTMP$ TMPCOR UUO error
IO ERROR CODES Page E-2
E.2 IO Error codes
--- -- ----- -----
0-27 ER???% LOOKUP/ENTER/RENAME error codes as defined in the
Monitor Calls Handbook appendix E. IOLIB sets
some of these codes for UUOs other than LOOKUP,
ENTER and RENAME when the messages are
appropriate, for instance, ERNEC%, no core
available is set when the is no space to build a
buffer ring.
-1 EREOF$ endfile, which may be an error in some cases
-2 ERBKT$ block too large, which includes the 'no room or
quota exceeded' cases for DSK:.
-3 ERDTE$ data error, most likely parity or checksum errors.
-4 ERDER$ device error. This normally means real trouble
with the device, although the real meaning is
device dependent.
-5 ERIMP$ improper mode for device.
-6 ERQTA$ code reserved for no room or quota exceeded case.
-7 ERRSD$ restricted device. Attempt to access a device
that is available, and is not spooled by the user,
but is restricted by the operator.
-10 ERNFC$ no free IO software channels. The user program
has used at least 15 out of the 16 possible. Note
that IOLIB does not attempt IO on channel 0 unless
forced.
-11 ERUNK$ unknown error. This error can be produced on IO
when no error bit was set in the status word,
which may be due to e.g. write-ring missing in
magtape.
APPENDIX F
IOLIB STANDARD ERROR IDS
All the 3 character error identifications produced by IOLIB are
listed here, together with their meanings. The error ids that
correspond to LOOKUP/ENTER/RENAME error codes are flagged by an '*'.
More details about these codes can be found in the Monitor Calls
Handbook, Appendix E. Error ids flagged with 'S' are produced by the
IOLIB command string reading routines.
Id Description
== ===========
AEF * File already exists
ASW S ambiguous switch name
BKT block too large ($INPUT/$OUTPU)
BNF * block busy
CSD * subfile directory already exists
DER device error ($INPUT/$OUTPU)
DNA * device not available ($OPEN also)
DNE * directory not empty
DTE * data error, e.g. checksum or parity error
($INPUT/$OUTPU)
EOF end of file ($INPUT)
FBM * file being modified
FNF * file not found
ILC S illegal character in input string
ILU * processor doesn't have 2 segment capability
IMP improper IO mode for this device
($OPEN/$INPUT/$OUTPU)
IOLIB STANDARD ERROR IDS Page F-2
IPG S programmer number zero or too big
IPJ S project number zero or too big
ISU * incorrect sequence of UUOs
LVL * too many levels of SFDs
NCE * can't create in directory
NDV s Null device name in device specification
NEC * not enough core (also $INPUT/$OUTPU)
NET * not enough table space in monitor (also $OPEN
if no spare DDBs in monitor)
NFC no free IO channels($OPEN)
NOR S number out of range
NRM * no room on structure
NSD * no such device (also $OPEN)
NSF * not a save file
POA * no room (??)
PRT * protection failure
QTA quota exceeded
RSD restricted device ($OPEN)
SLE * search list empty
SNF * no directory
SNS * no segment
STI S switch tables built incorrectly
TRN * transmission error
UKW S unknown keyword in switch specification
UNK unknown error code
USW S unknown switch name
VIL S value illegal in switch specification
WDV S wild device name in device specification
WLK * write-locked device
IOLIB STANDARD ERROR IDS Page F-3
2DV S two device names in one file specification
2EX S two extensions in one file specification
2NM S two file names in one file specification
2PT S two path specifications in one file
specification