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