1: / tape boot program to load and transfer
   2: / to a 'tp' entry
   3: 
   4: / entry is made by jsr pc,*$0
   5: / so return can be rts pc
   6: / jsr pc,(r5) is putc
   7: / jsr pc,2(r5) is getc
   8: / jsr pc,4(r5) is mesg
   9: 
  10: core = 24.
  11: .mt. = 1
  12: .. = [core*2048.]-512.
  13: start:
  14:         mov     $..,sp
  15:         mov     $name,r4
  16:         mov     sp,r1
  17:         cmp     pc,r1
  18:         bhis    2f
  19:         clr     r0
  20:         cmp     (r0),$407
  21:         bne     1f
  22:         mov     $20,r0
  23: 1:
  24:         mov     (r0)+,(r1)+
  25:         cmp     r1,$end
  26:         blo     1b
  27:         jmp     (sp)
  28: 
  29: 2:
  30:         jsr     pc,rew
  31:         mov     $tvec,r5
  32:         mov     $'=,r0
  33:         jsr     pc,(r5)
  34: 2:
  35:         mov     r4,r1
  36: 1:
  37:         jsr     pc,2(r5)
  38:         cmp     r0,$'\n
  39:         beq     1f
  40:         cmp     r0,$'@
  41:         beq     2b
  42:         movb    r0,(r1)+
  43:         cmp     r0,$'#
  44:         bne     1b
  45:         sub     $2,r1
  46:         cmp     r1,r4
  47:         blo     2b
  48:         br      1b
  49: 1:
  50:         clrb    (r1)
  51:         cmp     r1,r4
  52:         blos    start
  53:         mov     $1,tapa
  54:         mov     $-6144.,wc
  55:         jsr     pc,taper
  56:         clr     r1
  57: 1:
  58:         mov     r1,r2
  59:         mov     r4,r0
  60: 2:
  61:         cmpb    (r0)+,(r1)
  62:         bne     2f
  63:         tstb    (r1)+
  64:         bne     2b
  65:         br      1f
  66: 2:
  67:         mov     r2,r1
  68:         add     $64.,r1
  69:         cmp     r1,$12288.
  70:         blo     1b
  71:         jsr     pc,rew
  72:         br      start
  73: 1:
  74:         mov     44.(r2),tapa
  75:         mov     38.(r2),r0
  76:         inc     r0
  77:         clc
  78:         ror     r0
  79:         neg     r0
  80:         mov     r0,wc
  81:         clr     r0
  82: 1:
  83:         clr     (r0)+
  84:         cmp     r0,sp
  85:         blo     1b
  86:         jsr     pc,taper
  87:         jsr     pc,rew
  88:         clr     r0
  89:         cmp     (r0),$407               / unix a.out?
  90:         bne     2f
  91: 1:
  92:         mov     20(r0),(r0)+
  93:         cmp     r0,sp
  94:         blo     1b
  95: 2:
  96:         jsr     pc,*$0
  97:         br      start
  98: 
  99: .if .mt.
 100: mts = 172520
 101: mtc = 172522
 102: mtbrc = 172524
 103: mtcma = 172526
 104: 
 105: taper:
 106:         clr     mtma
 107:         cmp     mtapa,tapa
 108:         beq     1f
 109:         bhi     2f
 110:         jsr     pc,rrec
 111:         br      taper
 112: 2:
 113:         jsr     pc,rew
 114:         br      taper
 115: 1:
 116:         mov     wc,r1
 117: 1:
 118:         jsr     pc,rrec
 119:         add     $256.,r1
 120:         bmi     1b
 121:         rts     pc
 122: 
 123: rrec:
 124:         bit     $2,*$mts
 125:         bne     rrec
 126:         tstb    *$mtc
 127:         bge     rrec
 128:         mov     $-512.,*$mtbrc
 129:         mov     mtma,*$mtcma
 130:         mov     $60003,*$mtc
 131: 1:
 132:         tstb    *$mtc
 133:         bge     1b
 134:         tst     *$mtc
 135:         bge     1f
 136:         mov     $-1,*$mtbrc
 137:         mov     $60013,*$mtc
 138:         br      rrec
 139: 1:
 140:         add     $512.,mtma
 141:         inc     mtapa
 142:         rts     pc
 143: 
 144: rew:
 145:         mov     $60017,*$mtc
 146:         clr     mtapa
 147:         rts     pc
 148: .endif
 149: 
 150: .if .mt.-1
 151: tcdt = 177350
 152: tccm = 177342
 153: taper:
 154:         mov     $tcdt,r0
 155:         mov     $tccm,r1
 156: for:
 157:         mov     $3,(r1)                 / rbn for
 158: 1:
 159:         tstb    (r1)
 160:         bge     1b
 161:         tst     (r1)
 162:         blt     rev
 163:         cmp     tapa,(r0)
 164:         beq     rd
 165:         bgt     for
 166: 
 167: rev:
 168:         mov     $4003,(r1)              / rbn bac
 169: 1:
 170:         tstb    (r1)
 171:         bge     1b
 172:         tst     (r1)
 173:         blt     for
 174:         mov     (r0),r2
 175:         add     $5,r2
 176:         cmp     tapa,r2
 177:         blt     rev
 178:         br      for
 179: 
 180: rd:
 181:         clr     -(r0)                           / bus addr
 182:         mov     wc,-(r0)                        / wc
 183:         mov     $5,-(r0)                        / read
 184: 1:
 185:         tstb    (r1)
 186:         bge     1b
 187:         tst     (r1)
 188:         blt     taper
 189:         rts     pc
 190: 
 191: rew:
 192:         mov     $4003,tccm
 193:         rts     pc
 194: .endif
 195: 
 196: tvec:
 197:         br      putc
 198:         br      getc
 199:         br      mesg
 200: 
 201: tks = 177560
 202: tkb = 177562
 203: getc:
 204:         mov     $tks,r0
 205:         inc     (r0)
 206: 1:
 207:         tstb    (r0)
 208:         bge     1b
 209:         mov     tkb,r0
 210:         bic     $!177,r0
 211:         cmp     r0,$'A
 212:         blo     1f
 213:         cmp     r0,$'Z
 214:         bhi     1f
 215:         add     $40,r0
 216: 1:
 217:         cmp     r0,$'\r
 218:         bne     putc
 219:         mov     $'\n,r0
 220: 
 221: tps = 177564
 222: tpb = 177566
 223: putc:
 224:         tstb    tps
 225:         bge     putc
 226:         cmp     r0,$'\n
 227:         bne     1f
 228:         mov     $'\r,r0
 229:         jsr     pc,(r5)
 230:         mov     $'\n+200,r0
 231:         jsr     pc,(r5)
 232:         clr     r0
 233:         jsr     pc,(r5)
 234:         mov     $'\n,r0
 235:         rts     pc
 236: 1:
 237:         mov     r0,tpb
 238:         rts     pc
 239: 
 240: mesg:
 241:         movb    *(sp),r0
 242:         beq     1f
 243:         jsr     pc,(r5)
 244:         inc     (sp)
 245:         br      mesg
 246: 1:
 247:         add     $2,(sp)
 248:         bic     $1,(sp)
 249:         rts     pc
 250: 
 251: end:
 252: tapa:   .=.+2
 253: mtapa:  .=.+2
 254: mtma:   .=.+2
 255: wc:     .=.+2
 256: name:   .=.+32.

Defined functions

.mt. defined in line 11; used 2 times
core defined in line 10; used 1 times
  • in line 12
end defined in line 251; used 1 times
  • in line 25
for defined in line 156; used 3 times
getc defined in line 203; used 1 times
mesg defined in line 240; used 2 times
mtapa defined in line 253; used 3 times
mtbrc defined in line 102; used 2 times
mtc defined in line 101; used 6 times
mtcma defined in line 103; used 1 times
mtma defined in line 254; used 3 times
mts defined in line 100; used 1 times
name defined in line 256; used 1 times
  • in line 15
putc defined in line 223; used 3 times
rd defined in line 180; used 1 times
rev defined in line 167; used 2 times
rew defined in line 191; used 4 times
rrec defined in line 123; used 5 times
start defined in line 13; used 3 times
tapa defined in line 252; used 5 times
taper defined in line 153; used 5 times
tccm defined in line 152; used 2 times
tcdt defined in line 151; used 1 times
tkb defined in line 202; used 1 times
tks defined in line 201; used 1 times
tpb defined in line 222; used 1 times
tps defined in line 221; used 1 times
tvec defined in line 196; used 1 times
  • in line 31
wc defined in line 255; used 4 times
Last modified: 1975-06-27
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 436
Valid CSS Valid XHTML 1.0 Strict