1: / disk boot program to load and transfer
   2: / to a unix entry
   3: 
   4: / entry is made by jsr pc,*$0
   5: / so return can be rts pc
   6: 
   7: core = 24.
   8: .. = [core*2048.]-512.
   9: start:
  10:         mov     $..,sp
  11:         mov     sp,r1
  12:         cmp     pc,r1
  13:         bhis    2f
  14:         reset
  15:         clr     r0
  16:         cmp     (r0),$407
  17:         bne     1f
  18:         mov     $20,r0
  19: 1:
  20:         mov     (r0)+,(r1)+
  21:         cmp     r1,$end
  22:         blo     1b
  23:         jmp     (sp)
  24: 
  25: 2:
  26:         mov     $inod,r0
  27: 1:
  28:         clr     (r0)+
  29:         cmp     r0,sp
  30:         blo     1b
  31:         jsr     pc,getc
  32:         cmp     r0,$'k
  33:         bne     3f
  34:         mov     $rkblk,r0
  35:         br      1f
  36: 3:
  37:         cmp     r0,$'p
  38:         bne     2b
  39:         mov     $rpblk,r0
  40: 1:
  41:         mov     r0,rxblk
  42:         mov     $'\n,r0
  43:         jsr     pc,putc
  44:         mov     $names,r1
  45: 
  46: 1:
  47:         mov     r1,r2
  48: 2:
  49:         jsr     pc,getc
  50:         cmp     r0,$'\n
  51:         beq     1f
  52:         cmp     r0,$'/
  53:         beq     3f
  54:         movb    r0,(r2)+
  55:         br      2b
  56: 3:
  57:         cmp     r1,r2
  58:         beq     2b
  59:         add     $14.,r1
  60:         br      1b
  61: 1:
  62:         mov     $names,r1
  63:         mov     $1,r0
  64: 1:
  65:         clr     bno
  66:         jsr     pc,iget
  67:         tst     (r1)
  68:         beq     1f
  69: 2:
  70:         jsr     pc,rmblk
  71:                 br start
  72:         mov     $buf,r2
  73: 3:
  74:         mov     r1,r3
  75:         mov     r2,r4
  76:         add     $16.,r2
  77:         tst     (r4)+
  78:         beq     5f
  79: 4:
  80:         cmpb    (r3)+,(r4)+
  81:         bne     5f
  82:         cmp     r4,r2
  83:         blo     4b
  84:         mov     -16.(r2),r0
  85:         add     $14.,r1
  86:         br      1b
  87: 5:
  88:         cmp     r2,$buf+512.
  89:         blo     3b
  90:         br      2b
  91: 1:
  92:         clr     r1
  93: 1:
  94:         jsr     pc,rmblk
  95:                 br 1f
  96:         mov     $buf,r2
  97: 2:
  98:         mov     (r2)+,(r1)+
  99:         cmp     r2,$buf+512.
 100:         blo     2b
 101:         br      1b
 102: 1:
 103:         clr     r0
 104:         cmp     (r0),$407
 105:         bne     2f
 106: 1:
 107:         mov     20(r0),(r0)+
 108:         cmp     r0,sp
 109:         blo     1b
 110: 2:
 111:         jsr     pc,*$0
 112:         br      start
 113: 
 114: iget:
 115:         add     $31.,r0
 116:         mov     r0,r5
 117:         ash     $-4.,r0
 118:         jsr     pc,rblk
 119:         bic     $!17,r5
 120:         ash     $5.,r5
 121:         add     $buf,r5
 122:         mov     $inod,r4
 123: 1:
 124:         mov     (r5)+,(r4)+
 125:         cmp     r4,$addr+16.
 126:         blo     1b
 127:         rts     pc
 128: 
 129: rmblk:
 130:         add     $2,(sp)
 131:         mov     bno,r0
 132:         inc     bno
 133:         bit     $LRG,mode
 134:         bne     1f
 135:         asl     r0
 136:         mov     addr(r0),r0
 137:         bne     rblk
 138: 2:
 139:         sub     $2,(sp)
 140:         rts     pc
 141: 1:
 142:         clr     -(sp)
 143:         movb    r0,(sp)
 144:         clrb    r0
 145:         swab    r0
 146:         asl     r0
 147:         mov     addr(r0),r0
 148:         beq     2b
 149:         jsr     pc,rblk
 150:         mov     (sp)+,r0
 151:         asl     r0
 152:         mov     buf(r0),r0
 153:         beq     2b
 154: 
 155: rblk:
 156:         mov     r1,-(sp)
 157:         mov     r0,r1
 158:         clr     r0
 159:         jmp     *rxblk
 160: 
 161: rpda = 176724
 162: rpblk:
 163:         div     $10.,r0
 164:         mov     r1,-(sp)
 165:         mov     r0,r1
 166:         clr     r0
 167:         div     $20.,r0
 168:         bisb    r1,1(sp)
 169:         mov     $rpda,r1
 170:         mov     (sp)+,(r1)
 171:         br      1f
 172: 
 173: rkda = 177412
 174: rkblk:
 175:         div     $12.,r0
 176:         ash     $4.,r0
 177:         bis     r1,r0
 178:         mov     $rkda+2,r1
 179: 
 180: 1:
 181:         mov     r0,-(r1)
 182:         mov     $buf,-(r1)
 183:         mov     $-256.,-(r1)
 184:         mov     $5,-(r1)
 185: 1:
 186:         tstb    (r1)
 187:         bge     1b
 188:         mov     (sp)+,r1
 189:         rts     pc
 190: 
 191: tks = 177560
 192: tkb = 177562
 193: getc:
 194:         mov     $tks,r0
 195:         inc     (r0)
 196: 1:
 197:         tstb    (r0)
 198:         bge     1b
 199:         mov     tkb,r0
 200:         bic     $!177,r0
 201:         cmp     r0,$'A
 202:         blo     1f
 203:         cmp     r0,$'Z
 204:         bhi     1f
 205:         add     $40,r0
 206: 1:
 207:         cmp     r0,$'\r
 208:         bne     putc
 209:         mov     $'\n,r0
 210: 
 211: tps = 177564
 212: tpb = 177566
 213: putc:
 214:         tstb    tps
 215:         bge     putc
 216:         cmp     r0,$'\n
 217:         bne     1f
 218:         mov     $'\r,r0
 219:         jsr     pc,putc
 220:         mov     $'\n+200,r0
 221:         jsr     pc,putc
 222:         clr     r0
 223:         jsr     pc,putc
 224:         mov     $'\n,r0
 225:         rts     pc
 226: 1:
 227:         mov     r0,tpb
 228:         rts     pc
 229: 
 230: end:
 231: inod = ..-1024.
 232: mode = inod
 233: addr = inod+8.
 234: buf = inod+32.
 235: bno = buf+514.
 236: rxblk = bno+2
 237: names = rxblk+2
 238: LRG = 10000
 239: reset = 5

Defined functions

LRG defined in line 238; used 1 times
addr defined in line 233; used 3 times
bno defined in line 235; used 4 times
buf defined in line 234; used 8 times
core defined in line 7; used 1 times
  • in line 8
end defined in line 230; used 1 times
  • in line 21
getc defined in line 193; used 2 times
iget defined in line 114; used 1 times
  • in line 66
inod defined in line 231; used 5 times
mode defined in line 232; used 1 times
names defined in line 237; used 2 times
putc defined in line 213; used 6 times
rblk defined in line 155; used 3 times
rkblk defined in line 174; used 1 times
  • in line 34
rkda defined in line 173; used 1 times
rmblk defined in line 129; used 2 times
rpblk defined in line 162; used 1 times
  • in line 39
rpda defined in line 161; used 1 times
rxblk defined in line 236; used 3 times
start defined in line 9; used 2 times
tkb defined in line 192; used 1 times
tks defined in line 191; used 1 times
tpb defined in line 212; used 1 times
tps defined in line 211; used 1 times
Last modified: 1975-06-27
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 454
Valid CSS Valid XHTML 1.0 Strict