1: / tape boot program to load and transfer
   2: / the next item on the tape.
   3: 
   4: / entry is made by jsr pc,*$0
   5: / so return can be rts pc
   6: 
   7: core = 24.
   8: halt=0
   9: .. = [core*2048.]-512.
  10: start:
  11:         mov     $..,sp
  12:         mov     sp,r1
  13:         cmp     pc,r1
  14:         bhis    2f
  15:         clr     r0
  16:         cmp     (r0),$407
  17:         bne     1f
  18:         mov     $20,r0
  19: 1:
  20:         mov     (r0)+,(r1)+
  21:         cmp     r1,$core*2048.
  22:         blo     1b
  23:         jmp     (sp)
  24: 
  25: 2:
  26:         mov     $1f,*$4
  27:         mov     $340,*$6
  28:         tst     *$htcs1
  29:         mov     $htrew,rew
  30:         mov     $htread,tread
  31:         br      2f
  32: 1:
  33:         mov     $tsread,tread
  34:         mov     $tsrew,rew
  35: 2:
  36:         jsr     pc,*rew
  37:         mov     $2,tapa
  38:         mov     $-256.,wc
  39:         jsr     pc,*tread
  40: 
  41:         mov     *$2,r0
  42:         add     *$4,r0
  43:         sub     $512.,r0
  44:         asr     r0
  45:         neg     r0
  46:         bge     1f
  47: 
  48:         mov     r0,wc
  49:         mov     $3,tapa
  50:         mov     $512.,ba
  51:         jsr     pc,*tread
  52: 1:
  53:         jsr     pc,*rew
  54:         clr     r0
  55:         mov     $20,r1
  56:         mov     sp,r4
  57:         clc
  58:         ror     r4
  59: 1:
  60:         mov     (r1)+,(r0)+
  61:         sob     r4,1b
  62:         jsr     pc,*$0
  63:         br      .
  64: 
  65: htcs1 = 172440
  66: htba  = 172444
  67: htfc  = 172446
  68: htcs2 = 172450
  69: htds  = 172452
  70: httc  = 172472
  71: 
  72: P800 = 1300
  73: P1600 = 2300
  74: PIP = 20000
  75: RESET = 40
  76: MOL = 10000
  77: ERR = 40000
  78: REV = 33
  79: READ = 71
  80: REW = 7
  81: 
  82: htread:
  83: 1:
  84:         mov     ba,mtma
  85:         cmp     mtapa,tapa
  86:         beq     1f
  87:         bhi     2f
  88:         jsr     pc,hrrec
  89:         br      1b
  90: 2:
  91:         jsr     pc,htrew
  92:         br      1b
  93: 1:
  94:         mov     wc,r1
  95: 1:
  96:         jsr     pc,hrrec
  97:         add     $256.,r1
  98:         bmi     1b
  99:         rts     pc
 100: 
 101: hrrec:
 102:         mov     $htds,r0
 103:         tstb    (r0)
 104:         bpl     hrrec
 105:         bit     $PIP,(r0)
 106:         bne     hrrec
 107:         bit     $MOL,(r0)
 108:         beq     hrrec
 109:         mov     $htfc,r0
 110:         mov     $-512.,(r0)
 111:         mov     mtma,-(r0)
 112:         mov     $-256.,-(r0)
 113:         mov     $READ,-(r0)
 114: 1:
 115:         tstb    (r0)
 116:         bpl     1b
 117:         bit     $ERR,(r0)
 118:         bpl     1f
 119:         mov     $RESET,*$htcs2
 120:         mov     $-1,*$htfc
 121:         mov     $REV,(r0)
 122:         br      hrrec
 123: 1:
 124:         add     $512.,mtma
 125:         inc     mtapa
 126:         rts     pc
 127: 
 128: htrew:
 129:         mov     $RESET,*$htcs2
 130:         mov     $P1600,*$httc
 131:         mov     $REW,*$htcs1
 132:         clr     mtapa
 133:         rts     pc
 134: 
 135: 
 136: tsbuf = 172520
 137: tssr  = 172522
 138: 
 139: TSINIT = 140013
 140: TSCHAR = 140004
 141: TSREW  = 102010
 142: TSREAD = 100001
 143: TSRETRY = 100401
 144: 
 145: tsread:
 146: 1:
 147:         mov     ba,mtma
 148:         cmp     mtapa,tapa
 149:         beq     1f
 150:         bhi     2f
 151:         jsr     pc,tsrrec
 152:         br      1b
 153: 2:
 154:         jsr     pc,tsrew
 155:         br      1b
 156: 1:
 157:         mov     wc,r1
 158: 1:
 159:         jsr     pc,tsrrec
 160:         add     $256.,r1
 161:         bmi     1b
 162:         rts     pc
 163: 
 164: tsrrec:
 165: 1:
 166:         tstb    tssr
 167:         bpl     1b
 168:         mov     $136006,r0
 169:         mov     $512.,(r0)
 170:         clr     -(r0)
 171:         mov     mtma,-(r0)
 172:         mov     $TSREAD,-(r0)
 173:         mov     r0,tsbuf
 174: 1:
 175:         tstb    tssr
 176:         bpl     1b
 177:         cmp     $1,tssr
 178:         blos    1f
 179:         mov     $TSRETRY,(r0)
 180:         mov     r0,tsbuf
 181:         br      1b
 182: 1:
 183:         add     $512.,mtma
 184:         inc     mtapa
 185:         rts     pc
 186: 
 187: tsrew:
 188:         jsr     pc,tsinit
 189:         mov     $TSREW,136000
 190:         mov     $136000,tsbuf
 191:         clr     mtapa
 192:         rts     pc
 193: 
 194: tsinit:
 195:         tstb    tssr
 196:         bpl     tsinit
 197:         mov     $136000,r0
 198:         mov     $TSCHAR,(r0)+
 199:         mov     $136010,(r0)+
 200:         clr     (r0)+
 201:         mov     $10,(r0)+
 202:         mov     r0,(r0)+
 203:         clr     (r0)+
 204:         mov     $16,(r0)+
 205:         mov     $136000,tsbuf
 206: 1:
 207:         tstb    tssr
 208:         bpl     1b
 209:         rts     pc
 210: mtapa:  0
 211: mtma:   0
 212: tapa:   0
 213: wc:     0
 214: ba:     0
 215: rew:    0
 216: tread:  0

Defined functions

ERR defined in line 77; used 1 times
MOL defined in line 76; used 1 times
P1600 defined in line 73; used 1 times
P800 defined in line 72; never used
PIP defined in line 74; used 1 times
READ defined in line 79; used 1 times
RESET defined in line 75; used 2 times
REV defined in line 78; used 1 times
REW defined in line 80; used 1 times
TSCHAR defined in line 140; used 1 times
TSINIT defined in line 139; never used
TSREAD defined in line 142; used 1 times
TSRETRY defined in line 143; used 1 times
TSREW defined in line 141; used 1 times
ba defined in line 214; used 3 times
core defined in line 7; used 2 times
  • in line 9, 21
hrrec defined in line 101; used 6 times
htba defined in line 66; never used
htcs1 defined in line 65; used 2 times
htcs2 defined in line 68; used 2 times
htds defined in line 69; used 1 times
htfc defined in line 67; used 2 times
htread defined in line 82; used 1 times
  • in line 30
htrew defined in line 128; used 2 times
httc defined in line 70; used 1 times
mtapa defined in line 210; used 6 times
mtma defined in line 211; used 6 times
rew defined in line 215; used 4 times
start defined in line 10; never used
tapa defined in line 212; used 4 times
tread defined in line 216; used 4 times
tsbuf defined in line 136; used 4 times
tsinit defined in line 194; used 2 times
tsread defined in line 145; used 1 times
  • in line 33
tsrew defined in line 187; used 2 times
tsrrec defined in line 164; used 2 times
tssr defined in line 137; used 5 times
wc defined in line 213; used 4 times
Last modified: 1981-07-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 565
Valid CSS Valid XHTML 1.0 Strict