1: / tap1 -- dec-disk lod/dmp
   2: 
   3: .globl  _localtime, _end
   4: namep = 0
   5: mode = 2
   6: uid = 4; gid = 5
   7: size0 = 7
   8: size1 = 8
   9: time0 = 10.
  10: time1 = 12.
  11: tapea = 14.
  12: dirsiz = 16.
  13: mdirent = 496.
  14: 
  15:         mov     (sp),rnarg
  16:         mov     (sp)+,narg
  17:         mov     $cmr,command
  18:         incb    flu
  19:         tst     (sp)+
  20:         cmp     narg,$2
  21:         bge     1f
  22:         mov     $2,narg
  23:         br      3f
  24: 1:
  25:         mov     (sp)+,r0
  26:         mov     sp,parg
  27: 1:
  28:         movb    (r0)+,r1
  29:         beq     3f
  30:         mov     $swtab,r2
  31: 2:
  32:         cmp     r1,(r2)+
  33:         beq     2f
  34:         tst     (r2)+
  35:         bne     2b
  36:         br      useerr
  37: 2:
  38:         jsr     pc,*(r2)+
  39:         br      1b
  40: 3:
  41:         jsr     pc,optap
  42:         mov     $_end,r4 / string pointer
  43:         jsr     pc,setb
  44:         jmp     *command
  45: 
  46: optap:
  47:         tstb    flm
  48:         bne     2f
  49:         mov     $578.,tapsiz
  50:         mov     $192.,ndirent
  51:         sys     open; tc; 2
  52:         br      3f
  53: 2:
  54:         mov     $-1,tapsiz
  55:         mov     $mdirent,ndirent
  56:         cmp     command,$cmr
  57:         beq     2f
  58:         sys     open; mt; 0
  59:         br      3f
  60: 2:
  61:         sys     open; mt; 1
  62: 3:
  63:         bes     1f
  64:         mov     r0,fio
  65:         mov     ndirent,r1
  66:         ash     $-3,r1
  67:         mov     r1,ndentd8
  68:         mov     ndirent,r1
  69:         mul     $dirsiz,r1
  70:         add     $dir,r1
  71:         mov     r1,edir
  72:         rts     pc
  73: 1:
  74:         jsr     r5,mesg
  75:                 <Tape open error\n\0>; .even
  76:         jmp     done
  77: 
  78: setcom:
  79:         cmp     command,$cmr
  80:         bne     useerr
  81:         mov     (r5)+,command
  82:         rts     r5
  83: 
  84: noflag:
  85:         mov     (r5)+,r0
  86:         beq     1f
  87:         tstb    (r0)
  88:         beq     noflag
  89:         br      useerr
  90: 1:
  91:         rts     r5
  92: 
  93: useerr:
  94:         jsr     r5,mesg
  95:                 <Bad usage\n\0>; .even
  96:         jmp     done
  97: 
  98: swtab:
  99:         '0; dcof
 100:         '1; dcof
 101:         '2; dcof
 102:         '3; dcof
 103:         '4; dcof
 104:         '5; dcof
 105:         '6; dcof
 106:         '7; dcof
 107:         'c; dcc
 108:         'd; dcd
 109:         'f; dcf
 110:         'i; dci
 111:         'm; dcm
 112:         'r; dcr
 113:         't; dct
 114:         'u; dcu
 115:         'v; dcv
 116:         'w; dcw
 117:         'x; dcx
 118:          0; 0
 119: 
 120: dcof:
 121:         movb    r1,tcx
 122:         movb    r1,mtx
 123:         rts     pc
 124: 
 125: dcc:
 126:         incb    flc
 127:         rts     pc
 128: 
 129: dcf:
 130:         incb    flf
 131:         rts     pc
 132: 
 133: dcd:
 134:         jsr     r5,setcom; cmd
 135:         rts     pc
 136: 
 137: dci:
 138:         incb    fli
 139:         rts     pc
 140: 
 141: dcm:
 142:         incb    flm
 143:         rts     pc
 144: 
 145: dcu:
 146:         incb    flu
 147:         jsr     r5,setcom; cmr
 148:         rts     pc
 149: 
 150: dcr:
 151:         clrb    flu
 152:         jsr     r5,setcom; cmr
 153:         rts     pc
 154: 
 155: dct:
 156:         jsr     r5,setcom; cmt
 157:         rts     pc
 158: 
 159: dcv:
 160:         incb    flv
 161:         rts     pc
 162: 
 163: dcw:
 164:         incb    flw
 165:         rts     pc
 166: 
 167: dcx:
 168:         jsr     r5,setcom; cmx
 169:         rts     pc
 170: 
 171: cmd:
 172:         jsr     r5,noflag; flm; flc; flf; 0
 173:         cmp     narg,$2
 174:         bgt     1f
 175:         jmp     useerr
 176: 1:
 177:         jsr     pc,rddir
 178:         jsr     r5,gettape; delete
 179:         jsr     pc,wrdir
 180:         br      check
 181: 
 182: cmr:
 183:         jsr     r5,noflag; 0
 184:         tstb    flc
 185:         bne     1f
 186:         tstb    flm
 187:         bne     1f
 188:         jsr     pc,rddir
 189:         br      2f
 190: 1:
 191:         jsr     pc,clrdir
 192: 2:
 193:         jsr     pc,getfiles
 194:         jsr     pc,update
 195:         br      check
 196: 
 197: cmt:
 198:         jsr     r5,noflag; flc; flf; flw; 0
 199:         jsr     pc,rddir
 200:         tstb    flv
 201:         beq     1f
 202:         jsr     r5,mesg
 203:         <   mode    uid gid tapa    size   date    time name\n\0>; .even
 204: 1:
 205:         jsr     r5,gettape; taboc
 206:         br      check1
 207: 
 208: cmx:
 209:         jsr     r5,noflag; flc; flf; 0
 210:         jsr     pc,rddir
 211:         jsr     r5,gettape; xtract
 212:         br      done
 213: 
 214: check:
 215: 
 216: check1:
 217:         jsr     pc,usage
 218: 
 219: done:
 220:         jsr     r5,mesg
 221:                 <END\n\0>; .even
 222:         sys     exit
 223: 
 224: encode:
 225:         mov     r2,-(sp)
 226:         mov     r4,(r1)
 227:         mov     (r5)+,r2
 228: 1:
 229:         movb    (r2),(r4)+
 230:         jsr     pc,setb
 231:         tstb    (r2)+
 232:         bne     1b
 233:         mov     (sp)+,r2
 234:         rts     r5
 235: 
 236: decode:
 237:         mov     r2,-(sp)
 238:         mov     r1,-(sp)
 239:         mov     (r1),r1
 240:         mov     (r5)+,r2
 241: 1:
 242:         movb    (r1)+,(r2)+
 243:         bne     1b
 244:         mov     (sp)+,r1
 245:         mov     (sp)+,r2
 246:         rts     r5
 247: 
 248: setb:
 249:         mov     r0,-(sp)
 250:         mov     r4,r0
 251:         add     $513.,r0
 252:         cmp     r0,sp
 253:         bhis    2f
 254:         bic     $777,r0
 255:         cmp     r0,0f
 256:         beq     1f
 257:         mov     r0,0f
 258:         sys     break; 0:..
 259:         bes     2f
 260: 1:
 261:         mov     (sp)+,r0
 262:         rts     pc
 263: 
 264: 2:
 265:         jsr     r5,mesg
 266:                 <Out of core\n\0>; .even
 267:         jmp     done

Defined functions

check defined in line 214; used 2 times
check1 defined in line 216; used 1 times
cmd defined in line 171; used 1 times
cmr defined in line 182; used 5 times
cmt defined in line 197; used 1 times
cmx defined in line 208; used 1 times
dcc defined in line 125; used 1 times
dcd defined in line 133; used 1 times
dcf defined in line 129; used 1 times
dci defined in line 137; used 1 times
dcm defined in line 141; used 1 times
dcof defined in line 120; used 8 times
dcr defined in line 150; used 1 times
dct defined in line 155; used 1 times
dcu defined in line 145; used 1 times
dcv defined in line 159; used 1 times
dcw defined in line 163; used 1 times
dcx defined in line 167; used 1 times
decode defined in line 236; never used
dirsiz defined in line 12; used 1 times
  • in line 69
done defined in line 219; used 4 times
encode defined in line 224; never used
gid defined in line 6; never used
mdirent defined in line 13; used 1 times
  • in line 55
mode defined in line 5; never used
namep defined in line 4; never used
noflag defined in line 84; used 5 times
optap defined in line 46; used 1 times
  • in line 41
setb defined in line 248; used 2 times
setcom defined in line 78; used 5 times
size0 defined in line 7; never used
size1 defined in line 8; never used
swtab defined in line 98; used 1 times
  • in line 30
tapea defined in line 11; never used
time0 defined in line 9; never used
time1 defined in line 10; never used
uid defined in line 6; never used
useerr defined in line 93; used 4 times
Last modified: 1975-05-14
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1056
Valid CSS Valid XHTML 1.0 Strict