Nova RDOS

Kragen Javier Sitaker, 2017-06-15 (22 minutes)
Bob Supnik got a revocable hobbyist license for RDOS from Dirty Genitals identical to the DEC OS/8 license
RDOS for the Nova seems to have been multitasking; it has error messages like OUT OF TCB'S and ERROR IN USER TASK QUEUE TABLE
also I am inferring a hierarchical filesystem from DIRECTORY DEPTH EXCEEDED
I'm `dd conv=swab`ing the image from http://simh.trailing-edge.com/kits/rdosswre.tar.Z
I guess this OS is from 1984 though.  I wonder if it's really for a Nova?
it looks a lot more like TOPS-10 or something than it does like Unix
NUL-terminated strings, ^M for newlines, things that appear to be device names like MT0: MT1: MT2: CT0: CT1: CT2:, allusions to using matching pairs of <> in filenames (presumably to delimit the 
name of the directory)
two-letter filename extensions, ALL CAPS
command flags leading with /
different file types, user-visible contiguous file allocation
misspelled error messages
SYSGEN
octal addresses
I am inferring a 16-bit word-addressed memory?
up to a mebiword of memory
horrifying interactivity: DUAL PROCESSORS (IPB)? ("0"=NO "1"=YES) 
ENTER RTC FREQ (1=10HZ 2=50HZ 3=60HZ 4=100HZ 5=1000HZ)
WANT STANDARD(11 INCH) ?^M^@ENTER FORM SIZE IN LINES(1-143) ==>^@ENTER LINE NUMBER OR CR ==>^@
CHARACTER PRECEEDING A "(" MUST BE AN OPERATOR^M^@LEGAL OPERATORS ARE +, -, !, #, &, @, <, >^M^@NESTED OR MISSING BRACKET(S)^M^@")" MUST BE PRECEEDED BY A NUMBER OR LETTER^M^@
oh hey, here are "shell script commands" from DG RDOS: DELETE BADSP.RB SYS000.RB
I think this is a formatted output template: **##### TOTAL ERRORS, ##### PASS 1 ERRORS
COPYRIGHT (C) DGC 1977,1978,1979,1980,1981,1982,1984,1985ALL RIGHTS RESERVED

Here's a domacro command line:

    DUMP/V BACKUP:7 URDOS<A B C I O>.LB ALMSPD.<SR RB> BACKUP

This suggests the <> aren’t directory names but limited wildcards.

Oh hey, here’s some source code; I think their macro assembler defined
the instructions as macros!

```
; COPYRIGHT (C) DATA GENERAL CORPORATION 1977, 1978, 1979, 1980, 1981, 1982
; 1983, 1984
; ALL RIGHTS RESERVED.
; LICENSED MATERIAL-PROPERTY OF DATA GENERAL CORPORATION.
; THIS SOFTWARE IS MADE AVAILABLE SOLELY PURSUANT TO THE TERMS OF A
; DGC LICENSE AGREEMENT WHICH GOVERNS ITS USE.
;
;INSTRUCTION DEFINITON FILE

  .TITLE  NBID
  .XPNG           ;DELETE ALL SYMBOLS


;DEFINE STANDARD IO DEVICES

.DUSR MDV=      01      ;MULTIPLY-DIVIDE
.DUSR MAP=    02      ;840 MEMORY MANAGEMENT & PROTECTION UNIT
.DUSR ERCC=   02      ;KLUDGE ENTRY FOR S-20 (YRDOS) -MEM PARITY
.DUSR MAP0= 02      ;MEMORY ALLOCATION AND PROTECTION
.DUSR BMAP=  03      ;ECLIPSE MAP
.DUSR MAP1=       03      ;MEMORY ALLOCATION AND PROTECTION
.DUSR MAP2=  04      ;  "
.DUSR PAR=
        04      ;NOVA 3 PARITY MEMORY UNIT
.DUSR MCAT= 06      ;MULTI-PROCESSOR COMMUNICATIONS ADAPTER TRANSMITTER
.DUSR MCAR=        07      ;MULTI-PROCESSOR COMMUNICATIONS ADAPTER RECEIVER
.DUSR TTI=    10
      ;TELETYPE READER/KEYBOARD
.DUSR TTO=   11      ;TELETYPE PUNCH/PRINTER
.DUSR PTR=     12      ;PAPER TAPE READER
.DUSR PTP=  13      ;PAPER TAPE PUNCH
.DUSR RTC=   14      ;REAL TIME CLOCK
.DUSR PLT=
    15      ;INCREMENTAL PLOTTER
.DUSR CDR=        16      ;CARD READER
.DUSR LPT=        17      ;LINE PRINTER
.DUSR DJP=       20      ;FIRST JAWA CONTROLLER
.DUSR DSK=      20      ;FIRST FIXED HEAD DISK CONTROLLER
.DUSR ADCV=  21      ;A/D CONVERTER
.DUSR MTA=      22      ;FIRST MAG TAPE CONTROLLER
.DUSR DACV= 23      ;D/A CONVERTER
.DUSR DCM=      24      ;DATA COMMUNICATIONS MULTIPLEXOR
.DUSR DAP=    24
      ;PRIMARY CENTAUR/ARGUS CONTROLLER
.DUSR DMP=   25      ;FIRST PACMAN
.DUSR DSP=       26      ;PAGING DISK CONTROLLER
.DUSR DEP=     26      ;THIN-AIR ECHO/CACTUS/QUAD
.DUSR DZP=  27      ;ZEBRA DISK CONTROLLER
.DUSR DHP=      27      ;R2D2 PHOENIX CONTROLLER
.DUSR QTY=    30      ;QUAD MULTIPLEXOR
.DUSR IBM1=  31      ;IBM 360/370 INTERFACE
.DUSR IBM2=     32
.DUSR DKP=  33      ;FIRST MOVING HEAD DISK CONTROLLER
.DUSR CAS=  34      ;FIRST CASSETTE CONTROLLER
.DUSR ALM=  34      ;ASYNCHRONOUS LINE MULTIPLEXOR (ALM-8 AND ALM-16)
.DUSR ASLM=  34      ;ASLM (4336)
.DUSR MX1=        34      ;1024 LINE ASYNCHRONOUS MULTIPLEXOR
.DUSR MX2= 35
.DUSR IPB=  36      ;INTER-PROCESSOR BUS
.DUSR IVT=        37      ;NON-PROGRAMMABLE INTERVAL TIMER
.DUSR DPI=    40      ;DUAL PROCESSOR INPUT
.DUSR DPO=       41      ;DUAL PROCESSOR OUTPUT
.DUSR DIO=      42      ;DIGITAL I/O INTERFACE
.DUSR MXM=      44      ;1024 LINE MUX MODEM CONTROLLER
.DUSR ALM1=    44      ;SECOND ASYNC. LINE MULTIPLEXOR 
.DUSR MCAT1=  46      ;SECOND MULTI-PROC COMMO ADAPTER XMITTER
.DUSR MCAR1=  47      ;SECOND MULTI-PROC COMMO ADAPTER RECEIVER
.DUSR TTI1=  50      ;SECOND TTY
.DUSR TTO1=        51
.DUSR PTR1= 52      ;SECOND PAPER TAPE READER
.DUSR PTP1=  53      ;SECOND PAPER TAPE PUNCH
.DUSR RTC1=   54      ;SECOND REAL TIME CLOCK
.DUSR PLT1=    55      ;SECOND PLOTTER
.DUSR CDR1=    56      ;SECOND CARD READER
.DUSR LPT1=        57      ;SECOND LINE PRINTER
.DUSR DSK1=       60      ;SECOND FIXED HEAD DISK CONTROLLER
.DUSR DJP1= 60      ;SECOND JAWA CONTROLLER
.DUSR MTA1=    62      ;SECOND MAG TAPE CONTROLLER
.DUSR DAP1=        64      ;SECONDARY CENTAUR/ARGUS CONTROLLER
.DUSR DMP1=        65      ;SECOND PACMAN CONTROLLER
.DUSR DSP1=  66      ;SECOND PAGING DISK CONTROLLER
.DUSR DEP1=     66      ;SECOND THIN-AIR CACTUS/ECHO/QUAD CONTROLLER
.DUSR DZP1=       67      ;SECOND ZEBRA DISK CONTROLLER
.DUSR DHP1=      67      ;SECOND R2D2 PHOENIX CONTROLLER (THIN-AIR)
.DUSR QTY1= 70      ;SECOND QUAD MULTIPLEXOR
.DUSR DKP1=   73      ;SECOND MOVING HEAD DISK CONTROLLER
.DUSR ASLM1=
       74      ;SECONDARY ASLM (4336)
.DUSR CAS1=     74      ;SECOND CASSETTE CONTROLLER
.DUSR FPU1=        74      ;SINGLE-PRECISION FLOATING POINT
.DUSR FPU2=   75      ;DOUBLE-PRECISION FLOATING POINT
.DUSR FPU=    76      ;FLOATING-POINT CONTROLLER
.DUSR CPU=  77      ;CENTRAL PROCESSING UNIT
;DEFINE THE STACK INSTRUCTIONS



;MULTIPLY/DIVIDE
.DUSR DIV=  073101
.DUSR MUL=      073301

;DEFINE MEMORY REFERENCE INSTRUCTIONS THAT DON'T REQUIRE AC'S
.DMR JMP=      000000
.DMR JSR=       004000
.DMR ISZ=       010000
.DMR DSZ=       014000

;DEFINE MEMORY REFERENCE INSTRUCTIONS THAT REQUIRE AC'S
.DMRA LDA=   020000
.DMRA STA=      040000

;DEFINE THE ALC INSTRUCTIONS
.DALC COM=      100000
.DALC NEG=      100400
.DALC MOV=      101000
.DALC INC=      101400
.DALC ADC=      102000
.DALC SUB=      102400
.DALC ADD=      103000
.DALC AND=      103400

;DEFINE THE ALC SKIPS
.DUSR SKP=     1
.DUSR SZC=   2
.DUSR SNC=   3
.DUSR SZR=   4
.DUSR SNR=   5
.DUSR SEZ=   6
.DUSR SBN=   7

;DEFINE THE IO INSTRUCTIONS
.DIO  NIO=  060000
.DIOA DIA=      060400
.DIOA DOA=      061000
.DIOA DIB=      061400
.DIOA DOB=      062000
.DIOA DIC=      062400
.DIOA DOC=      063000

;DEFINE THE IO SKIP INSTRUCTIONS
.DIO SKPBN= 063400
.DIO SKPBZ=     063500
.DIO SKPDN=     063600
.DIO SKPDZ=     063700


;DEFINE SPECIAL INSTRUCTIONS
.DUSR INTEN=  NIOS CPU                ;INTERRUPT ENABLE
.DUSR INTDS= NIOC CPU                ;INTERRUPT DISABLE
.DIAC READS=        DIA 0,CPU               ;READ THE SWITCHES
.DIAC INTA= DIB 0,CPU               ;INTERRUPT ACKNOWLEDGE
.DIAC MSKO=     DOB 0,CPU               ;MASK OUT
.DUSR IORST= DICC 0,CPU              ;IO RESET
.DUSR HALT=  DOC 0,CPU               ;HALT
 .EOT
```

oh, and here's their system call interface
separate EXECUTE FOREGROUND and EXECUTE BACKGROUND calls, and separate READ BLOCK, READ SEQUENTIAL CHARACTERS, READ SEQUENTIAL LINE, READ RANDOM, and GET TTY CHAR calls
I don't know how you start designing an operating system in 1977 and screw up the design this badly

```
;
; COPYRIGHT (C) DATA GENERAL CORPORATION 1977, 1978, 1979, 1984
; ALL RIGHTS RESERVED.
; LICENSED MATERIAL-PROPERTY OF DATA GENERAL CORPORATION.
; THIS SOFTWARE IS MADE AVAILABLE SOLELY PURSUANT TO THE TERMS OF A
; DGC LICENSE AGREEMENT WHICH GOVERNS ITS USE.
;
; DEFINE AS PERMANENT SYMBOLS ALL MONITOR RELATED SYMBOLS


; DEFINE THE NOVA SYSTEM CALL

.DUSR   .SYSTM= JSR     @17


; DEFINE THE USER STACK POINTER LOCATION

.DUSR
USP=    16




; DEFINE THE MONITOR CALLS



; COMMANDS WHICH DO NOT REQUIRE DEVICE ACTION OR CHANNEL NUMBER

.DUSR   .CREAT= 0B7             ; CREATE FILE
.DUSR   .DELET= 1B7             ; DELETE FILE
.DUSR   .RENAM= 2B7             ; RENAME A FILE
.DUSR   .MEM=   3B7             ; RETURN MEMORY LIMITS
.DUSR   .BREAK= 4B7             ; BREAK
.DUSR   .RLSE=  5B7     
; RELEASE A DEVICE
.DUSR   .DIR=   6B7             ; CHANGE BASE DIRECTORY
.DUSR   .EXEC=  7B7             ; EXECUTE A PROGRAM OVERLAY
.DUSR   .INIT=  10B7            ; INIT DISK DEVICE


.DUSR   .RTN=   11B7            ; SYSTEM RETURN
.DUSR   .RESET= 12B7            ; I/O RESET
.DUSR   .ERTN=  15B7            ; ERROR RETURN FROM PROGRAM
.DUSR   .CRAND= 16B7            ; CREATE RANDOM
.DUSR   .GCHAR= 17B7            ; GET TTY CHAR
.DUSR   .PCHAR= 20B7            ; TTY PUT CHAR
.DUSR   .DELAY= 21B7            ; WAIT N CYCLES
.DUSR   .MEMI=  22B7    
; ALLOCATE MEMORY INCREMENT
.DUSR   .CCON=  41B7            ; CREATE CONTIGUOUS
.DUSR   .EXFG=  43B7            ; EXECUTE FOREGROUND
.DIO    .IOCS=  44B7            ; IOCS SYSTEM CALL
.DUSR   .IOCO=  45B7            ; IOCS OPEN
.DUSR   .EXBG=  55B7            ; EXEC IN BG
.DUSR   .IOCP=  57B7            ; IOCS PRE-OPEN
;      .DUSR   .XXXX=  60B7            ; RESERVED
.DUSR   .MOUNT= 64B7            ; MOUNT FLOPPY
;     COMMANDS WHICH REQUIRE CHANNEL NUMBER

.DIO    .ROPEN= 23B7    ; OPEN FOR READING
.DIO    .MTOPD= 52B7    ; OPEN MAG TAPE FOR DIRECT I/O
.DIO    .OVOPN= 24B7    ; OPEN OVERLAYS
.DIO    .CHATR= 26B7    ; CHANGE THE FILE ATTRIBUTES
.DIO    .GTATR= 27B7    ; GET THE FILE/DEVICE ATTRIBUTES
.DIO    .RDB=   13B7    ; READ BLOCK
.DIO    .WRB=   14B7    ; WRITE BLOCK
.DIO    .APPEND=25B7    ; OPEN FILE FOR APPENDING
.DIO    .OPEN=  30B7    ; OPEN FILE
.DIO    .CLOSE= 31B7    ; CLOSE FILE
.DIO    .RDS=   32B7    ; READ SEQUENTIAL CHARACTERS
.DIO    .RDL=   33B7    ; READ SEQUENTIAL LINE
.DIO    .RDR=   34B7    ; READ RANDOM
.DIO    .WRS=   35B7    ; WRITE SEQUENTIAL CHARACTERS
.DIO    .WRL=   36B7    ; WRITE SEQUENTIAL LINE
.DIO
.WRR=   37B7    ; WRITE RANDOM
.DIO    .OVLOD= 40B7    ; LOAD OVERLAY
.DIO    .SCALL= 42B7    ; GENERAL CALL
.DIO    .MTDIO= 46B7    ; MAG TAPE DIRECT I/O
.DIO    .SPOS=  47B7    ; SET FILE POSITION
.DIO    .GPOS=  50B7    ; GET FILE'S CURRENT POSITION
.DIO    .EOPEN= 51B7    ; OPEN FOR EXCLUSIVE USE
.DIO    .TOPEN= 52B7    ; TRANSPARENT OPEN
.DIO    .CHLAT= 53B7    ; CHANGE LINK ACCESS ATTRIBUTES
.DIO    .CHSTS= 54B7    ; GET CHANNEL STATUS
.DIO    .UPDAT= 56B7    ; UPDATE FILE SIZE INFORMATION
.DIO    .EWRB=  61B7    ; EXTENDED MEM WRITE
.DIO    .ERDB=  62B7    ; EXTENDED MEM READ
.DIO    .POPEN= 63B7    ; PHYSICAL I/O OPEN

; THE FOLLOWING CALLS ARE SCALLS

.DUSR   .GHRZ=  .SCALL 0        ; GET CLOCK FREQ
.DUSR   .DUCLK= .SCALL 1        ; DEF USER CLOCK
.DUSR   .RUCLK= .SCALL 2        ; REMAOVE USER CLOCK
.DUSR   .GTOD=  .SCALL 3        ; GET TOD
.DUSR   .STOD=  .SCALL 4        ; SET TOD
.DUSR   .SDAY=  .SCALL 5        ; SET DAY


.DUSR   .GDAY=  .SCALL 6        ; GET DAY
.DUSR   .IDEF=  .SCALL 7        ; DEFINE DEVICE INT
.DUSR   .IRMV=  .SCALL 10       ; REMOVE DEV INT
.DUSR   .SPKL=  .SCALL 11       ; SPOOL KILL

.DUSR   .SPDA=  .SCALL 12       ; SPOOL DISABLE
.DUSR   .SPEA=  .SCALL 13       ; SPOOL ENABLE
.DUSR   .RSTAT= .SCALL 14       ; STATUS OF RESOLUTION ENTRY
.DUSR   .CPART= .SCALL 15       ; CREATE PARTITION
.DUSR   .CDIR=  .SCALL 16       ; CREATE SUBDIRECTORY
.DUSR   .LINK=  .SCALL 17       ; LINK ENTRY
.DUSR   .EQIV=  .SCALL 20       ; CHANGE DIRECTORY SPECIFIER
.DUSR   .GDIRS= .SCALL 21       ; GET DIRECTORY SPECIFIER
.DUSR   .SYSI=  .SCALL 22       ; SOS COMPATIBLE CALL
.DUSR   .WCHAR= .SCALL 23       ; WAIT FOR TTY CHAR
.DUSR   .ICMN=  .SCALL 24       ; INIT COMMON
.DUSR   .WRCMN= .SCALL 25       ; WRITE TO COMMON
.DUSR   .RDCMN= .SCALL 26       ; READ COMMON
.DUSR   .ODIS=  .SCALL 27       ; DISABLE INT (CONTL A,C,F)
.DUSR   .OEBL=  .SCALL 30       ; ENABLE INT
.DUSR   .DEBL=  .SCALL 31       ; ENABLE MAPPED DEV ACCESS
.DUSR   .DDIS=  .SCALL 32       ; DISABLE MAPPED DEV ACCESS
.DUSR   .RDOPR= .SCALL 33       ; READ OPERATOR
.DUSR   .WROPR= .SCALL 34       ; WRITE OPERATOR
.DUSR   .STMAP= .SCALL 35       ; DCH MAP REQ FOR USER
.DUSR   .GCIN=  .SCALL 36       ; GET CONSOLE INPUT DEV
.DUSR   .GCOUT= .SCALL 37       ; GET CONSOLE OUTPUT DEV
.DUSR   .STAT=  .SCALL 40       ; GET STATUS OF FILE
.DUSR   .ECLR=  .SCALL 41       ; RELEASE A FILE
.DUSR   .TCRET= .SCALL 42       ; TRANSPARENT .CREATE
.DUSR   .TCRND= .SCALL 43       ; TRANSPARENT .CRAND
.DUSR   .TCCON= .SCALL 44       ; TRANSPARENT .CCON
.DUSR   .FGND=  .SCALL 45       ; IS THERE A FOREGROUND
.DUSR   .GMEM=  .SCALL 46       ; GET MEM PARTITIONS
.DUSR   .SMEM=  .SCALL 47
; SET MEM PARTITIONS
.DUSR   .BOOT=  .SCALL 50       ; INVOKE BOOT
.DUSR   .MDIR=  .SCALL 51       ; GET MASTER DIR. SPECIFIER
.DUSR   .GCHN=  .SCALL 52       ; GET A FREE CHANNEL
.DUSR   .ULNK=  .SCALL 53       ; DELETE A LINK ENTRY
.DUSR   .WRPR=  .SCALL 54       ; WRITE PROTECT MEMORY
.DUSR   .WREBL= .SCALL 55       ; WRITE ENABLE MEMORY
.DUSR   .GSYS=  .SCALL 56       ; GET CURRENT OPERATING SYSTEM NAME
.DUSR   .OVRP=  .SCALL 57       ; REPLACE AN OVERLAY
.DUSR   .ABTC=  .SCALL 60       ; ABORT A TCB CALL
.DUSR   .GMCA=  .SCALL 61       ; WHAT MCA AM I
.DUSR   .SECI=  .SCALL 62       ; RESCHEDULE EVERY SEC
.DUSR   .HSTRU= .SCALL 63       ; RUN HISTOGRAM
.DUSR   .HSTST= .SCALL 64       ; STOP HISTOGRAM
.DUSR   .RDSW=  .SCALL 65       ; READ SWITCHES
.DUSR   .VMEM=  .SCALL 66       ; GET VIRTUAL MEMORY
.DUSR   .MAPDF= .SCALL 67       ; VIRTUAL DATA MAP DEF
.DUSR   .TUOFF= .SCALL 70       ; TURN TUNING OFF
.DUSR   .TUON=  .SCALL 71       ; TURN TUNING ON
.DUSR   .INTAD= .SCALL 72       ; DEFINE INT TASK
.DUSR   .IOCI=  .SCALL 73       ; IOCS MAGTAPE INIT
.DUSR   .CONN=  .SCALL 74       ; CREATE CONTIGUOUS NO INIT

.EOT
```

Oh fuck, here’s how you open a fucking file.  You fill in a User File
Table entry?

```
;
; COPYRIGHT (C) DATA GENERAL CORPORATION 1977,1978,1979,1980,1982,1983,
; 1984,1985.
; ALL RIGHTS RESERVED.
; LICENSED MATERIAL-PROPERTY OF DATA GENERAL CORPORATION.
; THIS SOFTWARE IS MADE AVAILABLE SOLELY PURSUANT TO THE TERMS OF A
; DGC LICENSE AGREEMENT WHICH GOVERNS ITS USE.

;====================================
; RDOS REVISION 07.50 USER PARAMETERS
;====================================

        .TITL   PARU



;
; USER FILE TABLE (UFT) TEMPLATE
;

; USER FILE DEFINITION (UFD) OF UFT

.DUSR UFTFN=0           ;FILE NAME
.DUSR UFTEX=5           ;EXTENSION
.DUSR UFTAT=6           ;FILE ATTRIBUTES
.DUSR UFTLK=7           ;LINK ACCESS ATTRIBUTES
.DUSR UFLAD=7           ;LINK ALTERNATE DIRECTORY
.DUSR UFTBK=10          ;NUMBER OF LAST BLOCK IN FILE
.DUSR UFTBC=11          ;NUMBER OF BYTES IN LAST BLOCK
.DUSR UFTAD=12          ;DEVICE ADDRESS OF FIRST BLOCK (0 UNASSIGNED)
.DUSR UFTAC=13          ;YEAR-DAY LAST ACCESSED
.DUSR UFTYD=14          ;YEAR-DAY CREATED
.DUSR UFLAN=14          ;LINK ALIAS NAME
.DUSR UFTHM=15          ;HOUR-MINUTE CREATED
.DUSR UFTP1=16          ;UFD TEMPORARY
.DUSR UFTP2=17          ;WORDS/BLOCK .STAT.RSTA.CHST
.DUSR UFTUC=20          ;USER COUNT
.DUSR UFTDL=21          ;DCT LINK (RH) HIGH-ORDER DEVICE ADDRESS (LH)

; DEVICE CONTROL BLOCK (DCB) OF UFT

.DUSR UFTDC=22          ;DCT ADDRESS
.DUSR UFTUN=23          ;UNIT NUMBER
.DUSR UFCA1=24          ;CURRENT BLOCK ADDRESS (HIGH ORDER)
.DUSR UFTCA=25          ;CURRENT BLOCK ADDRESS (LOW ORDER)
.DUSR UFTCB=26          ;CURRENT BLOCK NUMBER
.DUSR UFTST=27          ;FILE STATUS
.DUSR UFEA1=30          ;ENTRY'S BLOCK ADDRESS (HIGH ORDER)
.DUSR UFTEA=31          ;ENTRY'S BLOCK ADDRESS (LOW ORDER)
.DUSR UFNA1=32          ;NEXT BLOCK ADDRESS (HIGH ORDER)
.DUSR UFTNA=33          ;NEXT BLOCK ADDRESS (LOW ORDER)
.DUSR UFLA1=34          ;LAST BLOCK ADDRESS (HIGH ORDER)
.DUSR UFTLA=35          ;LAST BLOCK ADDRESS (LOW ORDER)
.DUSR UFTDR=36          ;SYS.DR DCB ADDRESS
.DUSR UFFA1=37          ;FIRST ADDRESS (HIGH ORDER)
.DUSR UFTFA=40          ;FIRST ADDRESS (LOW ORDER)

; DCB EXTENSION

.DUSR UFTBN=41          ;CURRENT FILE BLOCK NUMBER
.DUSR UFTBP=42          ;CURRENT FILE BLOCK BYTE POINTER
.DUSR UFTCH=43          ;DEVICE CHARACTERISTICS
.DUSR UFTCN=44          ;ACTIVE REQ COUNT
                        ;B0 INDICATES Q, 0=DSQ1,1=DSQ2




.DUSR UFTEL=UFTCN-UFTFN+1       ;UFT ENTRY LENGTH
.DUSR UFDEL=UFTDL-UFTFN+1       ;UFD ENTRY LENGTH

.DUSR UDBAT=UFTAT-UFTDC ;NEGATIVE DISP. TO ATTRIBUTES
.DUSR UDDL=UFTDL-UFTDC  ;NEGATIVE DISP. TO FIRST ADDRESS (HIGH ORDER)
.DUSR UDBAD=UFTAD-UFTDC ;NEGATIVE DISP. TO FIRST ADDRESS (LOW ORDER)
.DUSR UDBBK=UFTBK-UFTDC ;NEGATIVE DISP. TO LAST BLOCK
.DUSR UDBBN=UFTBN-UFTDC ;POSITIVE DISP. TO CURRENT BLOCK



; FILE ATTRIBUTES  (IN UFTAT)

.DUSR ATRP =1B0         ;READ PROTECTED
.DUSR ATCHA=1B1         ;CHANGE ATTRIBUTE PROTECTED
.DUSR ATSAV=1B2         ;SAVED FILE
.DUSR ATNRS=1B7         ;CANNOT BE A RESOLUTION ENTRY
.DUSR ATUS1=1B9         ;USER ATTRIBUTE # 1
.DUSR ATUS2=1B10        ;USER ATTRIBUTE # 2
.DUSR ATPER=1B14        ;PERMANENT FILE
.DUSR ATWP =1B15        ;WRITE PROTECTED

; FILE CHARACTERISTICS  (IN UFTAT)

.DUSR ATLNK=1B3         ;LINK ENTRY
.DUSR ATPAR=1B4         ;PARTITION ENTRY
.DUSR ATDIR=1B5         ;DIRECTORY ENTRY
.DUSR ATRES=1B6         ;LINK RESOLUTION (TEMPORARY)
.DUSR ATCON=1B12        ;CONTIGUOUS FILE
.DUSR ATRAN=1B13        ;RANDOM FILE


.DUSR ATMSK=377B7      ; Mask to get high order disk address from
                    ; left byte of offset UFTDL

;
; DCT PARAMETERS.
;

.DUSR DCTBS=0           ;1B0=1 => DEVICE USES DATA CHANNEL
.DUSR DCTMS=1           ;MASK OF LOWER PRIORITY DEVICES
.DUSR DCTIS=2           ;ADDRESS OF INTERRUPT SERVICE ROUTINE

; DEVICE CHARACTERISTICS  (IN UFTCH)

.DUSR   DC100=  1B15    ; CONSOLE INPUT DEVICE IS D100 OR D200
                        ; TERMINAL (SET BY INIT1)
.DUSR   DCSTB=  1B15    ; SUPPRESS TRAILING BLANKS $CDR ONLY
.DUSR   DCCPO=  1B15    ; DEVICE REQUIRING LEADER/TRAILER
.DUSR   DCSTO=  1B15    ; USER SPECIFIED TIME OUT CONSTANT (MCA)
.DUSR   DCCGN=  1B14    ; GRAPHICAL OUTPUT DEVICE WITHOUT TABBING 
                        ; HARDWARE
.DUSR   DCIDI=  1B13    ; INPUT DEVICE REQUIRING OPERATOR INTERVENTION
.DUSR   DCLCD=  1B12    ; INPUT DEVICE IS 6053-TYPE TERMINAL
.DUSR   DCCNF=  1B12    ; OUTPUT DEVICE WITHOUT FORM FEED HARDWARE
.DUSR   DCTO=   1B11    ; TELETYPE OUTPUT DEVICE
.DUSR   DCKEY=  1B10    ; KEYBOARD DEVICE
.DUSR   DCNAF=  1B09    ; OUTPUT DEVICE REQUIRING NULLS AFTER FORM FEEDS
.DUSR   DCRAT=  1B08    ; RUBOUTS AFTER TABS REQUIRED
.DUSR   DCPCK=  1B07    ; DEVICE REQUIRING PARITY CHECK
.DUSR   DCLAC=  1B06    ; REQUIRES LINE FEEDS AFTER CARRIAGE RTN
.DUSR   DCSPO=  1B05    ; SPOOLABLE DEVICE
.DUSR   DCFWD=  1B04    ; FULL WORD DEVICE (ANYTHING GREATER THAN
.DUSR   MSK37=377
.DUSR   MSK17=177
.DUSR   DCLT8=  1B04    ; LESS THAN 8 BITS / CHARACTER (BYTE DEVICES).
.DUSR   DCFFO=  1B03    ; FORM FEEDS ON OPEN
.DUSR   DCLTU=  1B02    ; CHANGE LOWER CASE ASCII TO UPPER
.DUSR   DCC80=  1B01    ; READ 80 COLUMS
.DUSR   DCDIO=  1B00    ; SUSPEND PROTOCOL ON TRANSMIT (MCA)
.DUSR   DCBDK=  1B00    ; DISK CHARACTERISTIC (SET NON-PARAMETRICALLY)
                        ; SET MEANS ITS 3330
.DUSR   DCSPC=  1B00    ; SPOOL CONTROL
                        ; SET = SPOOLING ENABLED
                        ; RESET = SPOOLING DISABLED
.DUSR   DCBIM=  1B12+1B15  ;Absolute binary I/O key.

;CHARACTERISTICS WORD FOR MY DCT'S

.DUSR   TTOCH=DCCGN+DCCNF+DCTO+DCPCK+DCLAC+DCC80+DCSPO+DCSPC
.DUSR   TTICH=DCKEY+DCLTU


;
; DEVICE CHARACTERISTICS FOR QTY, ULM, AND ALM (PARU.SR)
;
 .DUSR  DCNI=   1B15    ;(MASKING ENABLES) CONSOLE INTERRUPTS
;.DUSR  DCCGN=  1B14    ;(MASKING DISABLES) TAB EXPANSION
 .DUSR  DCLOC=  1B13    ;LOCAL LINE (MASKING MAKES MODEM LINE)

;.DUSR  DCTO=   1B11    ;_ FOR RUBOUT (MASKING GIVES BACKSPACE)
                        ;IGNORE LINEFEED (MASKING CONVERTS
                        ; LF/NL TO CR)
;.DUSR  DCKEY=  1B10    ;(MASKING DISABLES) INPUT ECHOING.
                        ;MASKING ALSO DISABLES LINE EDIT
                        ;(^Z,ESC,DEL,\),
                        ;UNLESS "DCEDT" ALSO MASKED.

;.DUSR  DCNAF=  1B9     ;(MASKING DISABLES) 20 NULLS AFTER FORM FEED
 .DUSR  DCXON=  1B8     ;(MASKING ENABLES) XON/XOFF FOR $TTR
;               1B7     ;SAVE FOR FUTURE USE

;.DUSR  DCLAC=  1B6     ;(MASKING DISABLES) LINE FEED AFTER
                        ;   CARRIAGE RETURN
;.DUSR  DCSPO=  1B5     ;(MUST BE OFF) SPOOLING
 .DUSR  DCCRE=  1B4     ;CARRIAGE RETURN ECHO (MASKING DISABLES)
 .DUSR  DCEDT=  1B0     ;LINE EDIT (ESC,^Z,DEL,\) DISABLED IF
                        ; MASK THIS BIT OR "DCKEY", BUT NOT BOTH.
;
; .WRL TO QTY:64
;
;       AC0= CODE+LINE #
;       AC1= DATA

.DUSR   W64DC=  0B7     ;NEW DEVICE CHARACTERISTIC MASK
                                ;FOR OPEN CHANNEL, AC1 AS ABOVE.
.DUSR   W64LS=  1B7     ;CHANGE LINE SPEED FOR DG/CS,
                                ; AC1 RIGHT-JUSTIFIED CLOCK SELECT.
.DUSR   W64MS=  2B7     ;CHANGE DG/CS MODEM STATE, AC1=
.DUSR     W64DTR= 1B15          ;  RAISE DATA TERMINAL READY
                                ;      ELSE LOWER
.DUSR     W64RTS= 1B14          ;  RAISE REQUEST TO SEND
                                ;      ELSE LOWER
.DUSR   W64CH=  3B7     ;CHANGE CHARACTERISTICS FOR LINE
                                ;AC1 SAME AS DG/CS HARDWARE SPEC.


;       JAWA Controller Board
;       ---------------------------
;       The following values will be placed in PARU.SR and specify
;       the various fields used by the JAWA controller to determine its
;       current state and type of media being used.

;       Mode of operation (used externally)
;       -----------------

.DUSR   CMODE = 0B7             ; Don't use bits 8-15 for mode
.DUSR   SMODE = 1B7             ; Set mode using bits 8-15

;       Tracks per inch (used externally)
;       ----------------
.DUSR   TPI48   = 1B8           ; 2 step pulses to next track (48)
.DUSR   TPI96   = 0B8           ; 1 step pulse to next track (96)

;       Number of Heads (used externally)
;       ---------------
.DUSR   NHED1   = 0B9           ; 1 head (single sided media)
.DUSR   NHED2   = 1B9           ; 2 heads (double sided media)

;       Sectors per Track (used externally)
;       -----------------
.DUSR   SPT01   = 01B6          ;  1 sector per track
.DUSR   SPT02   = 02B6          ;  2 sectors per track
.DUSR   SPT03   = 03B6          ;  3 sectors per track
.DUSR   SPT04   = 04B6          ;  4 sectors per track
```

Hmm, this error code is interesting:

    .DUSR   CTMLI=  321     ; TOO MANY LEVELS OF INDIRECT FILES

I guess “indirect files” are symlinks?

Here’s some of their subroutine linkage convention:

```

        .TITLE  PARS

;
; LINKAGE & STACK STUFF
;

.DO ?ANSW

        .MACRO  RSAVE           ; CALL TO SAVE REGISTERS
          STA     3,@CSP
          JSR     @.SAV
%

.DUSR   RTRN=   JSR     @4      ; CALL TO RESTORE REGISTERS
.DUSR   RTLOC=  0               ; RETURN LOCATION (THIS FRAME)
.DUSR   AC0=    1               ; AC0
.DUSR   AC1=    2               ; AC1
.DUSR   AC2=    3               ; AC2
.DUSR   TMP=    4               ; FIRST TEMPORARY
.DUSR   MXTMP=  TMP+7           ; LAST TEMPORARY

.DUSR   VRTN=   MXTMP+1         ; VIRTUAL RETURN (THIS FRAME)
.DUSR   SP=     -1              ; CURRENT STACK POINTER
.DUSR   SLGT=   VRTN-SP+1       ; STACK FRAME LENGTH
.DUSR   OSP=    -SLGT+SP        ; LAST FRAME POINTER
.DUSR   NSP=    SLGT+SP         ; NEXT FRAME POINTER
.DUSR   OTMP=   TMP-SLGT        ; OLD FIRST TMP POINTER
.DUSR   OAC0=   AC0-SLGT        ; OLD AC0
.DUSR   OAC1=   AC1-SLGT        ; OLD AC1

.DUSR   OAC2=   AC2-SLGT        ; OLD AC2
.DUSR   ORTN=   RTLOC-SLGT      ; RETURN LOCATION (PREVIOUS FRAME)
.DUSR   OVRTN=  VRTN-SLGT       ; VIRTUAL RETURN (PREVIOUS FRAME)
.DUSR   NFRAM=  11              ; NUMBER OF SYSTEM STACK FRAMES
.DUSR   NDSF=   16              ; NUMBER FRAMES ON DISK STACK

  .DO ?MSW

.DUSR   SVC=    103510          ; SYSTEM CALL ON NOVA 3
.DUSR   SCL=    127510          ; SYSTEM CALL ON NOVA 3

  .ENDC

.ENDC

.DO ?ABSW

        .MACRO  RSAVE           ; CALL TO SAVE STATE
          SAVE    ^1+1          ; PLUS 1 FOR OVLY RTN
%

.DUSR   RTRN=    RTN            ; CALL TO RESTORE STATE

.DUSR   OAC0=   -4              ; CALLER'S AC0
.DUSR   OAC1=   -3              ; CALLER'S AC1
.DUSR   OAC2=   -2              ; CALLER'S AC2
.DUSR   OSP=    -1              ; CALLER'S CSP
.DUSR   ORTN=   0               ; RETURN LOCATION
.DUSR   OVRTN=  1               ; CALLER'S VIRTUAL RETURN
.DUSR   TMP=    2               ; CALLEE'S FIRST TEMPORARY
.DUSR   SLGTH=  300             ; SYSTEM STACK LENGTH
.DUSR   ISLGT=  100             ; INTERRUPT STACK LENGTH

.ENDC
```

Here we have some documentation about their shell scripts, which are
called “domacros” and probably are the files whose names end in “.MC”:

```
     DO[/H]  domacro  arg1/s1  arg2/s2  . . . .

Global /H    Help; display this message

  domacro    Name of a DO macro file
             This file may contain any commands which are valid in a
               standard CLI macro file
             It may also contain variables like %1%, %2%, etc.

  argn/sn    Local arguments and switches
             %1% in the domacro will evaluate to arg1/s1
             Up to 256 arguments are allowed
```

Backup script domacro:

    EQUIV/P BACKUP MT0
    INIT/F BACKUP
    XFER TBOOT.SV BACKUP:0
    DUMP/V BACKUP:1 CLI.SV CLI.OL CLI.ER EBOOT.SV ABOOT.SV BOOTSYS.SV RCLI.SV
    XFER BOOTSYS.SV BACKUP:2
    DUMP/A/V BACKUP:3 BOOTSYS.OL
    XFER DKINIT.SV BACKUP:4
    XFER EBOOT.SV BACKUP:5
    DUMP/V BACKUP:6 SYS.LB SYS5.LB IDEB.RB RDOS.SR CBOOT.SV TBOOT.SV ^
    MCABOOT.SV DKINIT.SV DSKED.SV OVLDR.SV SEDIT.SV OEDIT.SV SYSGEN.SV ^
    NSPEED.SV SPEED.ER MEDIT.RB EDIT.SV EDIT.RB MAC.SV MACXR.SV ASM.SV XREF.SV ^
    RLDR.SV RLDR.OL BATCH.SV LFE.SV VFU.SV ENPAT.SV PATCH.SV FLOAD.SV FDUMP.SV ^
    NBID.SR OSID.SR NSID.SR NEID.SR N4ID.SR NFPID.SR BURST.SV PARU.SR PARS.SR ^
    NCID.SR NSKID.SR FPID.SR LITMACS.SR RFPI.RB MATH.LB N3SAC3.RB ^
    BATCH.OL BATCH.ER DBURST.SV OWNER.SV DDUMP.SV DLOAD.SV DDUMP.OL ^
    DLOAD.OL DDUMP.ER MICRODBOOT.SV ^
    DO.SV INITIALIZE.SV INSTALL.MC MBOOT.SV
    DUMP/V BACKUP:7 URDOS<A B C I O>.LB ALMSPD.<SR RB> BACKUP ^
    085000022.18 RDOS0750.FL 0694000<13,20>.00 0694000<15,19,22>.01 ^
    093400027.00
    XFER ABOOT.SV BACKUP:8
    RELEASE BACKUP

Topics