Director Error Messages

Alleged: FEs 0,1,2 can become 1,2,2 !!! When a Director procedure is called, a record is kept of the procedure called and the value of the result returned. Subsequently, a process may use the procedures described here to interpret the result value and generate a meaningful error message. COMMANDS TO DIRECT %const %integer topm= 102 In the table below, the first two digits give the number of the command in XOPER the next three digits describe the (first) three parameters 0 none 1 string(6) 2 numeric 3 string(6.11) 4 string(4) 5 string(1) 6 string(6) or numeric 7 string 0 < length < 32 8 no checking done the sixth digit 0 must have the specified number of parameters 1 may have fewer -------------------------------------------------! The following ACTivities are currently SPARE: ! ! -------------------------------------------------! %const %string (25) %array m(1:topm)= %c "30-1220-ACR", "40-2001-AUTOFILE", "79-7000-AUTOSLOAD", "13-2220-BADFSYSCYLTRK", "43-2200-BADFSYSPAGE", "18-1201-BASEF", "50-2001-BROADCAST", "07-2000-CCK", "92-2000-CHECKFSYS", "14-2201-CCKDONE", "42-2000-CLEARBADPAGESLIST", "10-2000-CLEARFSYS", "100-2000-CLEARNNT", "26-2001-CLOSE", "12-0000-CLOSEDOWN", "70-2201-CLOSEFE", "70-2201-CLOSEFEP", "61-2201-CLOSEFSYS", "80-2201-CLOSENODE", "90-7201-CLOSEPAD", "82-7201-CLOSETCP", "91-2001-CLOSETIME", "76-1000-CLOSETO", "45-2001-CLOSEUSERS", "72-0000-CLOSE?", "60-2000-CONNECTFE", "15-0000-CREATE", "89-0000-DAY", "55-8001-DELIVER", "02-1200-DELUSER", "28-0000-DESTS", "39-1220-DIRMON", "67-2001-DIRPRINT", "57-2000-DISCONNECTFE", "11-2200-DUMPINDNO", "96-2000-DUMP", "97-2000-DUMPCODE", "98-2000-DUMPNNT", "74-0000-EMPTYDVM", "101-2200-EMPTYINDEX", "03-2221-ERTE", "63-0000-FAIL", "77-1000-FE", "73-2001-FEUSECOUNT", "06-1201-FSYS", "69-2200-FSYSBITNO", "68-2220-FSYSCYLTRK", "44-2200-GOODFSYSPAGE", "71-0000-INFOALERT", "48-1500-INT:", "29-1201-KILL", "99-8001-LOGACTION", "54-0000-LOGSPACE", "87-1220-LS", "95-2001-MONITOR", "32-0000-MAINLP", "47-1201-MSG", "16-1221-NEWSTART", "01-1220-NEWUSER", "51-1201-NNT", "05-0000-OBEYFILE", "78-2000-OPENFE", "78-2000-OPENFEP", "46-2000-OPENFSYS", "81-2000-OPENNODE", "93-7000-OPENPAD", "83-7000-OPENTCP", "52-1000-OPENTO", "46-2001-OPENUSERS", "38-1400-PASS", "17-0000-PASSOFF", "65-2001-PREEMPTAT", "22-0000-PRG", "25-2001-PRINT", "04-3201-PRM", "59-0000-PROMPTOFF", "58-0000-PROMPTON", "21-1121-RENI", "35-2200-REP", "20-3201-S", "64-2001-SCARCITY", "33-1201-SENDMSG", "66-2001-SESSIONLENGTH", "37-1201-SETBASEF", "49-0000-SETMSG", "75-1220-SIGMON", "34-1200-SINT:", "88-0000-SITE", "08-0000-SNOS", "94-8001-SS", "102-2001-SSMONITOR", "31-1221-START", "27-0000-STOP", "41-1221-TESTSTART", "36-2000-TEXT", "24-0000-TRANSFER", "62-2001-USECOUNT", "23-0000-UNPRG", "09-2000-USERNAMES", "56-6201-{USERS}", "19-0000-VSN", "53-1201-XNNT" ----------------------------------------------------------------------- %const %integer module= 3 %end %oflist %include "dirarc:d.c03FORMATS" %routinespec makennt %external %integer %fn %spec decode pgs(%integer code) %external %integer %fn %spec dchsize(%string %name file index, file, %integer %name fsys, nkb) %external %integer %fn %spec ddeluser(%string %name file index, %integer %name fsys) %external %integer %fn %spec demptyi(%integer %name fsys, indno) %external %integer %fn %spec dfinfo(%string %name file index, file, %integer %name fsys, %string %name offerto, %integer %array %name i) %external %integer %fn %spec dfstatus(%string %name file index, file, %integer %name fsys, act, value) %external %integer %fn %spec dgetda(%string %name file index, file, %integer %name fsys, %integer %array %name i) %external %integer %fn %spec dnewuser(%string %name file index, %integer %name fsys, nkb) %external %integer %fn %spec dprg(%string %name user, file, %integer %name fsys, %string %name label, %integer %name site) %external %integer %fn %spec dprimecontingency(%routine ontrap) %external %integer %fn %spec drename index(%string %name oldname, newname, %integer %name fsys) %external %integer %fn %spec drename(%string %name file index, oldname, newname, %integer %name fsys) %external %integer %fn %spec dsfi(%string %name file index, %integer %name fsys, type, set, %string %name s, %integer %array %name i) %external %integer %fn %spec dstop(%integer %name reason) %external %integer %fn %spec dtransfer(%string %name file index1, file index2, file1, file2, %integer %name fsys1, fsys2, type) %external %integer %fn %spec dunprg(%string %name file index, file, %integer %name fsys, %string %name label, %integer %name site) %external %routine %spec increment(%integer %name adr, by, orig) %external %integer %fn %spec into(%integer fn, %string (11) template) %external %integer %fn %spec outof(%integer flag) %external %integer %fn %spec ss(%integer cnsl, %string %name s) %external %routine %spec adjust dlvn bit(%integer fsys, set) %external %integer %fn %spec async msg(%string (6) user, %integer invoc, dact, p1, p3) %external %integer %fn %spec auto comm(%string (19) user, %string (255) file, %integer act) %external %integer %fn %spec av(%integer fsys, type) %external %integer %fn %spec bad page(%integer type, fsys, bitno) %external %integer %fn %spec cck(%integer fsys, check, %integer %name percent) %external %routine %spec clear fsys(%integer fsys) %routine %spec copy to log file(%integer fa1, fa2) %external %integer %fn %spec create and connect(%string (19) findex, %string (255) file, %integer fsys, nkb, alloc, mode, %integer %name seg, gap) %external %routine %spec cyc check(%integer fad, maxbytes) %external %routine %spec dchain(%integer seg, destroy) %external %integer %fn %spec dchaccess(%string %name xfile index, xfile, %integer %name xfsys, xnewmode) %external %integer %fn %spec dconnecti(%string (19) findex, %string (255) file, %integer fsys, mode, %integer %name seg, gap) %external %integer %fn %spec dcreatef(%string (19) findex, %string (255) file, %integer fsys, nkb, alloc, leave, %integer %name da) %external %integer %fn %spec ddaynumber %external %integer %fn %spec ddestroyf(%string (19) findex, %string (255) file, %integer fsys, dealloc) %external %integer %fn %spec ddisconnecti(%string (19) findex, %string (255) file, %integer fsys, lo) %external %integer %fn %spec ddtentry(%integer %name entad, %integer fsys) %external %integer %fn %spec ddumpindno(%integer fsys, indno) %external %routine %spec derr2(%string (31) s, %integer fn, err) %external %routine %spec doperr(%string (23) txt, %integer fn, res) %external %routine %spec doper2(%string (255) s) %external %integer %fn %spec douti(%record (parmf) %name p) %external %integer %fn %spec dout11i(%record (parmf) %name p) %external %integer %fn %spec dpermissioni(%string (19) owner, %string (6) user, %string (8) date, %string (255) file, %integer fsys, type, adrprm) %external %integer %fn %spec dpoffi(%record (parmf) %name p) %external %integer %fn %spec dponi(%record (parmf) %name p) %external %integer %fn %spec dpon3i(%string (6) user, %record (parmf) %name p, %integer invoc, msgtype, outno) %external %routine %spec empty dvm %external %integer %fn %spec encrypt(%integer mode, %string (63) pass, %long %integer %name e, %integer %name k, dt) %external %integer %fn %spec fbase2(%integer fsys, adr) %external %routine %spec file for hottop(%integer invoc) %external %integer %fn %spec find nnt entry(%string (19) index, %integer %name fsys, nnad, %integer type) %external %string %fn %spec fromstring(%string (255) s, %integer i, j) %external %integer %fn %spec funds(%integer %name gpindad, %integer indad) %external %routine %spec get av fsys2(%integer type, %integer %name n, %integer %array %name a) %external %integer %fn %spec getbit(%integer adr, n) %external %integer %fn %spec hinda(%string (6) uname, %integer %name fsys, indad, %integer type) %external %string %fn %spec htos(%integer i, pl) %external %string %fn %spec itos(%integer n) %external %integer %fn %spec listmod(%string (6) s1, %integer n1, n2) %integer %fn %spec loglink(%record (parmf) %name p, %integer act) %external %routine %spec move(%integer length, from, to) %external %routine %spec output message to fep(%record (fepf) %array %name feps, %integer fe, type, adr, len, stream, protocol) %external %integer %fn %spec packdt %external %routine %spec place(%string (39) text, %integer screen, line, col, action) %external %routine %spec prec(%string (255) s, %record (parmf) %name p, %integer n) %external %routine %spec prhex(%integer i) %external %routine %spec printstring(%string (255) s) %external %routine %spec printsymbol(%integer symbol) %external %integer %fn %spec sconnect(%integer seg, startp, pgs, newcopy, flags) %external %integer %fn %spec setbit(%integer adr, n, value) %external %integer %fn %spec set closing bit(%integer fsys) %external %integer %fn %spec string to file(%integer len, adr, fad) %external %routine %spec symbols(%integer n, symbol) %external %integer %fn %spec sysad(%integer key, fsys) %external %integer %fn %spec txtmess(%string (6) user, %record (parmf) %name rp, %integer sync, invoc, txtlen, txtad, fsys, sact) %external %routine %spec uctranslate(%integer adr, len) %external %string %fn %spec unpackdt(%integer dt) %external %integer %fn %spec val(%integer adr, len, rw, psr) %external %routine %spec write(%integer n, places) %external %routine %spec wrs(%string (255) s) %external %routine %spec wrsnt(%string (255) s, %integer n, t) %external %routine %spec wrss(%string (255) s1, s2) %external %routine %spec wrsn(%string (255) s, %integer n) %external %routine %spec wrs3n(%string (255) s1, s2, s3, %integer n) %external %integer %fn %spec ainda(%string (19) index, %integer fsys, %integer %name afindad) %external %routine %spec reset checksum %external %integer %fn %spec disconnect arch %external %routine %spec attu(%string %name s) %external %routine %spec fill(%integer length, from, filler) %external %integer %fn %spec find(%integer findad, %string %name file, %integer %name index) %external %integer %fn %spec finda(%string (19) index, %integer %name fsys, findad, %integer type) %external %integer %fn %spec hash(%string (6) user, %integer nnthash) %integer %fn %spec howfull(%integer fsys) %external %integer %fn %spec map file index(%string %name index, %integer %name fsys, findad, %string (63) txt) %external %integer %fn %spec movesection(%integer fsys1, startp1, fsys2, startp2, epgs) %external %routine %spec ncode(%integer pc) %external %integer %fn %spec ninda(%integer fsys, indno, %integer %name indad) %external %integer %fn %spec pp(%integer semaddr, semano, %string (63) s) %external %integer %fn %spec s11ok(%string %name s11) %external %integer %fn %spec sysbase(%integer %name sys start, %integer fsys) %external %integer %fn %spec uif(%string %name index, file, una, ina, full) %external %integer %fn %spec ui(%string %name index, una, ina) %external %integer %fn %spec unok(%string %name user) %external %routine %spec vv(%integer semaddr, semano) ----------------------------------------------------------------------- %string (69) %fn message(%integer n) %const %string (39) %array first(1001:1115)= %c {1001} "File too big or bad site", {1002} "Name used for a group", {1003} "No free segments for Alloc Dseg", {1004} "Denable Terminal Stream fails", {1005} "File not available", {1006} "Use count on fsys negative", {1007} "No space for index", {1008} "Bad parameter", {1009} "Must allow 15 mins", {1010} "File system full", {1011} "Bad USER name", {1012} "Nkb must be 2 or between 4 and 32", {1013} "Name number table full", {1014} "User already has index on fsys", {1015} "No free file descriptors", {1016} "File already exists", {1017} "No free permission descriptors", {1018} "Invalid filename &", {1019} "Password truncated to 11 characters", {1020} "File & on offer", {1021} "File being executed", {1022} "Bits already clear for some pages", {1023} "Fsys not available", {1024} "Intermediate group does not exist", {1025} "Disk transfer failed", {1026} "Name used for a file", {1027} "File too big", {1028} "CBT freelist empty", {1029} "No free CONLIST entries", {1030} "Invalid index name", {1031} "Ambiguous", {1032} "File & does not exist or no access", {1033} "Conflicting use of file & in another VM", {1034} "File is already connected", {1035} "Segment in use or GAP too small", {1036} "(De-)Nominate fails", {1037} "User & not known", {1038} "Already claimed", {1039} "File & is not connected", {1040} "File is connected", {1041} "Single file limit exceeded", {1042} "File is connected in another VM", {1043} "No free section descriptors", {1044} "invalid group name", {1045} "User's parameters not accessible", {1046} "Bad permission", {1047} "Not enough stack", {1048} "TELL message rejected", {1049} "Permission list full (max 16)", {1050} "User not in list", {1051} "OWNP is zero or no-destroy set", {1052} "File is connected in write mode", {1053} "No interrupt data", {1054} "No outward call set up", {1055} "Facility not available! (see AG)", {1056} "Area crosses segment boundary", {1057} "End of session", {1058} "Bad parameter or RCB not accessible", {1059} "Archive index checksum failure", {1060} "User has no funds", {1061} "Process not available", {1062} "Max in DAP Claim Queue", {1063} "DAP not claimed at start", {1064} "DAP claim cancelled", {1065} "Bad Date or Time", {1066} "Close sequence cancelled", {1067} "Not claimed", {1068} "Failed to lock-down area", {1069} "CCK already done", {1070} "List is full", {1071} "No time left", {1072} "DAP not started", {1073} "DAP not available", {1074} "Not enough contiguous DAP blocks", {1075} "Not an IPL disc", {1076} "User does not have permission", {1077} "Failed to claim archive semaphore", {1078} "Disconnect cannot find file", {1079} "Area not locked", {1080} "Not in list", {1081} "LP is already MAIN", {1082} "Maximum areas already locked", {1083} "Total file space limit exceeded", {1084} "Restricted connect", {1085} "Fsys closing", {1086} "Failed to create and connect #msg", {1087} "Index corrupt", {1088} "Re-map fails", {1089} "Invalid file", {1090} "Maximum already allocated", {1091} "Block still active", {1092} "Interactive use not allowed", {1093} "User does not have privilege", {1094} "Failed to claim semaphore", {1095} "Cannot allocate main LP", {1096} "Password failure", {1097} "Bad page reported in NINDA", {1098} "Resources Scarce", {1099} "Obsolete index format encountered", {1100} "Logged on", {1101} "System Full", {1102} "Logon Fails", {1103} "Invalid Pass", {1104} "Process Running", {1105} "Invalid Name", {1106} "Workfile Fail", {1107} "No User Service", {1108} "No Batch File", {1109} "No Funds", {1110} "User not found", {1111} "FE closing", {1112} "Node closing", {1113} "PAD closing", {1114} "Connected", {1115} "???" %const %integer top second= 1660 %const %string (39) %array second(1620:top second)= %c {1620} "Invalid NKb", { equiv to E + 120 } {1621} "Invalid TSN", {1622} "Invalid Chapter", {1623} "Non unique file or group found", {1624} "Invalid Type", {1625} "Invalid Maxrec", {1626} "Invalid ADR", {1627} "Invalid Fsys", {1628} "Invalid Stream", {1629} "Invalid LEN", {1630} "Invalid OFFSET", {1631} "Invalid CURSOR", {1632} "Invalid SEG", {1633} "Old password not given", {1634} "New password not given", {1635} "Invalid ACT", {1636} "Invalid START REC", {1637} "Invalid DATE", {1638} "Invalid UNITS", {1639} "Cannot send TELL messages to executives", {1640} "Invalid SET", {1641} "Operation not valid on a file index", {1642} "String too long", {1643} "MAXFILE must be > 64Kb", {1644} "Too many groups in #ARCH", {1645} "Invalid APF", {1646} "Invalid INCR", {1647} "Inconsistent or invalid params to DEAL", {1648} "Cannot rename a file to be a group", {1649} "Cannot rename a group to be a file", {1650} "Errors encountered by DDESTROY", {1651} "String type invalid", {1652} "P_DEST = -1", {1653} "File already connected at another seg", {1654} "File already connected in a smaller gap", {1655} "File already connected, cannot NEWCOPY", {1656} "File already connected in another mode", {1657} "Invalid MARK", {1658} "Mismatching fragment", {1659} "File not on offer", {1660} "Cant rename g1 to g1.g2 " %result = "Successful" %if n=0 n = n+1000 %result = first(n) %if 1001<=n<=1115 %result = second(n) %if 1620<=n<=top second %result = "???" %end; ! MESSAGE ----------------------------------------------------------------------- %external %string %fn derrs(%integer n) %string (255) num, text num = itos(n) text = message(n) %result = " ".num." ".text %end; ! DERRS -----------------------------------------------------------------------

DDUMP

%external %routine ddump(%integer start, finish, ch, lim) Prints a hexadecimal dump from virtual address START to virtual address FINISH to DIRLOG. The dump has either 16 if LIM = 16, or 32 bytes per line.

DFLAG

%external %integer %fn dflag(%integer %name xflag, %string %name xtxt) This procedure returns the text string associated with FLAG as described in the list above. The text returned is of the form: sp flag sp error-message

DERROR

%external %integer %fn derror(%string %name xtxt) This procedure returns a string which describes the most recent call on a Director procedure. The text has the form: sp procedure-name sp flag sp error-message It is envisaged that sections of code could be written in the form: FLAG = DCONNECT(... -> FAIL %unless FLAG = 0 %or FLAG = 34 ... FAIL: J = DERROR(TXT) PRINTSTRING(TXT) NEWLINE %end

DPROCEDURE

%external %integer %fn dprocedure(%integer act, adr) This procedure provides a general interface to Director to allow new facilities to be tested easily ACT is an activity number and ADR the address of a record ACT = 1 Returns Directors 'proclist'. In this case, ADR is the address of a record of format: %integername N, %integer A the proclist entries are returned to address A onwards and the number of entries is returned in N. Currently each proclist entry is 56 bytes long, but is liable to change. ACT = 2 Allows the caller to 'fork' another invocation of his own process. ADR is the address of a record of format: %integer INVOC, %string(11)PARAM The new invocation number is returned in INVOC and PARAM is placed in the UINF record of the new invocation as UINF_SPOOLRFILE. The caller should disable the IO streams before calling this procedure. Director disconnects the streams and reconnects them subsequently to the new invocation. ACT = 3 Sends a message to another invocation of your own process. ADR is the address of a record of format: %record(PARMF) P, %integer INVOC, MSGTYPE, OUTNO MSGTYPE = 3 async, OUTNO = 5(pon+poff), 6(pon) ACT = 4 Allows the caller to find out howfull a disc is. ADR is the address of a record of format: %integer FSYS, PERCENTFULL

OPER

%external %integer %fn doper(%string %name xtxt) This procedure causes the text string to be displayed on the Operlog (taking as many lines of scrolled Oper output as necessary).

DOPERPROMPT

%external %integer %fn doper prompt(%string %name xs) This procedure is used when an interactive process is started from an OPER

DOPERR

%external %routine doperr(%string (23) txt, %integer fn, res) This procedure is used to write a short error message to the OPER console. FN is used to select a value from the list of names below and the text written is of the form: TXT sp NAME(FN) sp RES %const %integer top= 15 %const %string (4) %array name(1:top)= %c {..1}"CRTE", {..2}"CONN", {..3}"PERM", {..4}"DSFI", {..5}"DSCN", {..6}"STOP", {..7}"GTDA", {..8}"DFST", {..9}"RNAM", {.10}"SPOL", {.11}"XFER", {.12}"DNDA", {.13}"CNDA", {.14}"GFND", {.15}"DSTR"

Test basefile name

We have stated that "basefile name" specifies the name of the object file that is to be entered as the "subsystem", and that the version residing on a fixed site on the System disc is used if that name is null. If the "test basefile name", is non-null, it overrides the setting of "basefile name", even if the latter is null, for the next invocation. Thus if the subsystem under test fails disastrously the next log-on will yield the default or specified subsystem, which can then be used to study the failure and remake the test subsystem.

Director monitor filename

The Director monitor filename, if non-null, specifies a file belonging to the process owner, into which Director places the following: * Process failure messages not diagnosed by the subsystem. * Extra monitoring of Director procedure entries (see 'Director monitor level'), or extra monitoring of contingencies. * Text specified, by the process, to Director procedure DPRINTSTRING * The contents of areas of store, printed by DDUMP. This monitoring file, which must not exceed 512 Kbytes in size, is used in a circular manner.

Contingency monitor level

For the case of being unable to satisfy references to Director procedures, and for other programming errors not otherwise diagnosable, the field "contingency monitor level" will be useful. This field is zeroed at IPL, it can be set by a call of Director procedure DSFI (TYPE=17). Bits in this word have meanings as follows: Bit value Meaning and use 1 Print a routine trace-back on the occurrence of a contingency, with contents of stack frames. 2 Print text describing the contingency in words and codes ("CLASS/SUBCLASS"). 4 Print a hexadecimal dump of the stack segment. 8 2**3 Print a hexadecimal dump of Director GLA. 16 Print the contents of the virtual memory (relating segment number to filename and to disc address). 32 Print a de-assembly from the code segment of the area around the value of the PC register at the time of the contingency. 64 Print out the machine registers. A useful value for this field is 99. In order to diagnose the situation in which a subsystem has been unable to satisfy its references to Director procedures, it is useful to have a recognisable pattern in the places where the System Call descriptors are intended to be placed. With the contingency monitor level 64, that pattern will be found in the printing of the machine registers DR0 and DR1 if the filling of the System Call descriptor was unsuccessful. The contingency monitor level field can also be set by typing, at the Oper console, a command of the form: n/SIGMON m 0 where n is the process number (as displayed on the Oper screen) m is an integer specifying the required value of the field, as above.

Director monitor level

If Director monitor level is set non-zero, see SETDIRMON, a message is written to Dirlog after each Director procedure called, giving the values of the parameters supplied and the result returned.

Director version

A System disc has four fixed sites (256 Kbytes each), for up to four versions of Director. Site zero is used by default. Setting the Director version field causes the next invocation of the process to use the specified Director version (0, 1, 2 or 3) rather than the default version (0). This facility should only be used after consultation with the System Manager, as the contents of a given Director site cannot always be guaranteed to be valid.

DPRINTSTRING

%external %integer %fn dprintstring(%string %name xs) Allows a privileged process to write a string to DIRLOG.

DBITMAP2

%external %integer %fn dbitmap2(%integer %name lo, hi, %integer fsys)

DDELUSER

%external %integer %fn ddeluser(%string %name xfile index, %integer %name xfsys)

DEMPTYI

%external %integer %fn demptyi(%integer %name xfsys, xindno) This privileged procedure writes 'EMPTY' at the start of the 1K block INDNO on FSYS.

DGETNNTENTRIES

%external %integer %fn d get nnt entries(%integername xn, xadr) %integer j, u u = 0 j = into(99, "KI") -> out %unless j = 0 j = 45 -> out %unless val(i(1) {xadr}, 8000<<3, 1, 1) = 0 j = get nnt entries(u, i(1)) out: i(0) = u %result = outof(j) %end; ! d get nnt entries ---------------------------------------------------------------------- %routine makennt %conststring(6)index = "VOLUMS" %conststring(11)file = "#NNTENTRIES" %constlonginteger mask = x'ffffffffffffff00' %integer j, seg, gap, adr, n, k, m, p, p0, p1, last entry %longintegerarrayformat liaf(0:16000) %longintegerarrayname li, c %longinteger lw seg = 0; gap = 0 j = create and connect(index, file, -1, 128, (1<<24) ! (64{set eep}+16{zero}+1), 3, seg, gap) -> out %unless j = 0 adr = (seg << 20) + 320 j = get nnt entries(n, adr) -> out %unless j = 0 doper2(itos(n)." nnt entries") li == array((seg<<20)+312, liaf) m = 1 m = m << 1 %while m < n m = m - 1 %cycle m = m >> 1 %exit %if m = 0 %cycle p = 1, 1, n-m k = p %while k > 0 %cycle j = k + m %exit %if li(k) <= li(j) lw = li(j) li(j) = li(k) li(k) = lw k = k - m %repeat %repeat %repeat adr = seg << 20 c == array(adr, liaf) last entry = n + 39 %cycle p = 8, 1, 39 { fill 'page' table } p0 = (p-8) << 9 %exit %if p0 > last entry p1 = p0 + 511 p1 = last entry %if p1 > last entry c(p) = c(p1) & mask %repeat integer(adr+32) = p-1 { last page } integer(adr+36) = last entry j = ddisconnecti(index, file, -1, 0) out: doper2("Flag ".itos(j)) %end; ! make nnt -----------------------------------------------------------------

DGETINDEXES

%external %integer %fn dgetindexes(%integer %name xfsys, xn, %string (19) %array %name index) This procedure supplies a sorted list of index names accredited on FSYS. The names are either listed (to DIRLOG) if ADR = -1 or written as a series of 19 byte strings to ADR onwards. N is set to the number of names returned. The array at ADR must be able to hold as many index names as there are on the disc. The current max is 1365, i.e. 20 * 1365 (=27300) bytes.

DGETINDEXES2

%external %integer %fn dgetindexes2(%integer %name xfsys, xn, %record (getindexf) %array %name index) This procedure supplies a list of the indexes accreditted on FSYS, sorted into INDEX NO order. A series of records of format (string(19)NAME, byteinteger KB, SPARE, halfinteger INDNO) is returned to ADR onwards, a maximum of 24 * 1365 bytes. N is set to the number of records supplied.

DINDEX2

%external %integer %fn dindex(%string %name xindex, %integer %name xfsys, xadr) This procedure returns the index INDEX on fsys FSYS into ADR onwards, with sensitive fields blanked off.

DNEWUSER

%external %integer %fn dnewuser(%string %name xfile index, %integer %name xfsys, xnkb) This privileged procedure creates either a user record+main file index (if FILE INDEX is simply a username) or a file index (if FILE INDEX is supplied as username{fileindexname} ). The index is created on disc pack FSYS with NKB Kbytes. NKB must either be 2 or a multiple of 4 between 4 and 32. (NKB is taken as: NPD << 24 ! NFD << 8 ! NKB )

DPROCS

%external %integer %fn dprocs(%integer %name xmaxprocs, xadr) This procedure copies Supervisor's list of current processes to ADR onwards. Each entry is 32 bytes long and the number of entries is returned in MAXPROCS.

DRENAMEINDEX

%external %integer %fn drename index(%string %name xoldindex, xnewindex, %integer %name xfsys) This privileged procedure renames index OLDINDEX to NEWINDEX. Both OLDINDEX and NEWINDEX must either be of the form: username or username{indexname} ie not one of each. Note that only the specified index is renamed. If the user has other fileindexes, these are not renamed.

DREPLACEINDEX

%external %integer %fn dreplace index(%integer %name xfsys, xindno, xadr, xrw) Allows 1024 bytes in the index area of a disc to be read or overwritten by a privileged process. RW = 0 ..... Copy FROM index area TO user area RW non-zero ..... Copy FROM user area TO index area

DSYSAD

%external %integer %fn dsysad(%integer %name xfsys, xtype, xadr, xrw) This privileged procedure returns the bitmap (TYPE=0) the name-number table (TYPE=1) the DIRCOM record (TYPE=5) or the bad pages bitmap (TYPE=6) in ADR onwards for FSYS. RW = 0 ..... Copy FROM system area TO user area RW non-zero ..... Copy FROM user area TO system area

DUSERINDEXES

%external %integer %fn duserindexes(%string %name xuser, %integer %name xfsys, xn, %record (userindexf) %array %name index) Searches FSYS (or all fsys's if FSYS is -1) for indexes belonging to USER. Returns N records to ADR onwards of the form: %string(11)index, %integer fsys