1: / db2 -- debugger 2: 3: lookupn: 4: cmp symbol,$'. 5: bne 1f 6: mov dot,taddr 7: rts pc 8: 1: 9: tst error 10: beq 1f 11: rts pc 12: 1: 13: mov r2,-(sp) 14: mov namstrt,r1 15: mov namsiz,r2 16: jsr pc,1f 17: mov (sp)+,r2 18: rts pc 19: 1: 20: mov $symbol,r0 21: cmp (r0)+,(r1)+ 22: bne 2f 23: cmp (r0)+,(r1)+ 24: bne 3f 25: cmp (r0)+,(r1)+ 26: bne 4f 27: cmp (r0)+,(r1)+ 28: bne 5f 29: tst (r1)+ 30: mov (r1)+,taddr 31: rts pc 32: 2: 33: tst (r1)+ 34: 3: 35: tst (r1)+ 36: 4: 37: tst (r1)+ 38: 5: 39: cmp (r1)+,(r1)+ 40: cmp r1,r2 41: blo 1b 42: inc error 43: clr taddr 44: rts pc 45: 46: lookupv: 47: mov r5,-(sp) 48: mov $nambuf,r5 49: clr r2 50: mov $177777,r3 51: 1: 52: cmp r5,namsiz 53: bhis 4f 54: mov 12(r5),r1 55: sub r0,r1 56: neg r1 57: blt 3f 58: cmp r1,r3 59: bhi 3f 60: cmp r1,$4000 61: bhis 3f 62: cmp r2,r5 63: bhi 3f 64: mov r1,r3 65: mov r5,r2 66: 3: 67: add $14,r5 68: br 1b 69: 4: 70: mov (sp)+,r5 71: rts pc 72: 73: get: 74: mov *(r5)+,r0 75: jsr r5,remap 76: tst error 77: bne 2f 78: mov r0,0f 79: mov curfin,r0 80: sys seek; 0:0; 0 81: bec 1f 82: 2: 83: inc error 84: rts r5 85: 1: 86: mov curfin,r0 87: sys read; temp; 2 88: bes 2b 89: tst r0 90: beq 2b 91: mov temp,r0 92: rts r5 93: 94: remap: 95: mov dbfin,curfin 96: cmp getoff,$1024. 97: bne 1f 98: cmp r0,txtsiz 99: bhis 2f 100: add $20,r0 101: mov symfin,curfin 102: rts r5 103: 2: 104: cmp r0,rtxtsiz 105: blo 3f 106: sub rtxtsiz,r0 107: cmp r0,datsiz 108: bhis 2f 109: add $1024.,r0 110: rts r5 111: 2: 112: add rtxtsiz,r0 113: neg r0 114: cmp r0,stksiz 115: bhi 3f 116: neg r0 117: add datsiz,r0 118: add stksiz,r0 119: add $1024.,r0 120: rts r5 121: 1: 122: add getoff,r0 123: rts r5 124: 3: 125: inc error 126: rts r5 127: 128: printo: 129: mov $obuf+6,r1 130: clr r2 131: 1: 132: inc r2 133: movb r0,-(r1) 134: bicb $!7,(r1) 135: bisb $'0,(r1) 136: clc 137: ror r0 138: asr r0 139: asr r0 140: bne 1b 141: mov r2,0f+2 142: mov r1,0f 143: mov $1,r0 144: sys write; 0:obuf; 6 145: rts pc 146: 147: mesg: 148: movb (r5)+,r0 149: beq 1f 150: jsr pc,putc 151: br mesg 152: 1: 153: inc r5 154: bic $1,r5 155: rts r5 156: 157: pnl: 158: jsr r5,mesg; <\n\0> 159: rts pc 160: 161: psp: 162: jsr r5,mesg; < \0> 163: rts pc 164: 165: pstar: 166: jsr r5,mesg; <*\0> 167: rts pc 168: 169: plp: 170: jsr r5,mesg; <(\0> 171: rts pc 172: 173: prp: 174: jsr r5,mesg; <)\0> 175: rts pc 176: 177: pb: 178: jsr r5,mesg; <b\0> 179: rts pc 180: 181: pcom: 182: jsr r5,mesg; <,\0> 183: rts pc 184: 185: put: 186: mov *(r5)+,r0 187: jsr r5,remap 188: tst error 189: bne 2f 190: cmp curfin,dbfin 191: bne 2f 192: mov r0,0f 193: mov dbfout,r0 194: bne 1f 195: 2: 196: tst (r5)+ 197: 3: 198: inc error 199: rts r5 200: 1: 201: tst error 202: bne 3b 203: sys seek; 0:0; 0 204: bes 2b 205: mov (r5)+,0f 206: mov dbfout,r0 207: tst bytemod 208: beq 1f 209: mov $1,0f+2 210: br 2f 211: 1: 212: mov $2,0f+2 213: 2: 214: sys write; 0:0; 2 215: bes 3b 216: rts r5 217: 218: decodadr: 219: mov r0,r3 220: mov r3,-(sp) 221: bic $!10,(sp) 222: bic $!7,r0 223: cmp r0,$7 224: beq pcadr 225: 7: 226: mov r3,r0 227: asr r0 228: asr r0 229: asr r0 230: bic $!6,r0 231: jmp *1f(r0) 232: 233: 1: 234: simp 235: incr 236: decr 237: indx 238: 239: simp: 240: tst (sp) 241: beq 1f 242: jsr pc,plp 243: 1: 244: jsr pc,preg 245: tst (sp)+ 246: beq 9f 247: jsr pc,prp 248: br 9f 249: 250: incr: 251: tst (sp)+ 252: beq 1f 253: jsr pc,pstar 254: 1: 255: jsr pc,plp 256: jsr pc,preg 257: jsr r5,mesg; <)+\0>; .even 258: br 9f 259: 260: decr: 261: tst (sp)+ 262: beq 1f 263: jsr pc,pstar 264: 1: 265: jsr r5,mesg; <-(\0>; .even 266: jsr pc,preg 267: jsr pc,prp 268: br 9f 269: 270: indx: 271: tst (sp)+ 272: beq 1f 273: jsr pc,pstar 274: 1: 275: jsr pc,get1 276: jsr pc,pname 277: jsr pc,plp 278: jsr pc,preg 279: jsr pc,prp 280: br 5f 281: 282: pcadr: 283: mov r3,r0 284: bit $20,r3 285: beq 7b 286: tst (sp)+ 287: beq 1f 288: jsr pc,pstar 289: 1: 290: bit $40,r3 291: bne 6f 292: jsr r5,mesg; <$\0> 293: jsr pc,get1 294: jsr pc,pname 295: br 5f 296: 6: 297: jsr pc,get1 298: add $2,r0 299: add r1,r0 300: mov $3,r1 301: jsr pc,pname 302: br 5f 303: 9: 304: tst (r5)+ 305: clr r0 306: rts r5 307: 5: 308: mov $2,r0 309: rts r5 310: 311: preg: 312: mov r3,r0 313: bic $!7,r0 314: asl r0 315: mov regtab(r0),obuf 316: mov $1,r0 317: sys write; obuf; 2 318: rts pc 319: 320: regtab: 321: "r0 322: "r1 323: "r2 324: "r3 325: "r4 326: "r5 327: "sp 328: "pc 329: 330: pname: 331: mov r5,-(sp) 332: mov r3,-(sp) 333: mov r1,-(sp) 334: jsr pc,lookupv 335: tst r2 336: beq 5f 337: cmp (sp),$1 338: bne 1f 339: tst r3 340: bne 5f 341: 1: 342: mov r2,r1 343: mov $8,-(sp) 344: mov r0,r5 345: 1: 346: movb (r1)+,r0 347: beq 1f 348: jsr pc,putc 349: dec (sp) 350: bne 1b 351: 1: 352: tst (sp)+ 353: cmp 12(r2),r5 354: beq 1f 355: blt 2f 356: jsr r5,mesg; <-\0> 357: br 3f 358: 2: 359: jsr r5,mesg; <+\0> 360: 3: 361: mov r3,r0 362: 5: 363: jsr pc,printo 364: 1: 365: tst (sp)+ 366: mov (sp)+,r3 367: mov (sp)+,r5 368: rts pc 369: 370: get1: 371: mov *(r5)+,r1 372: add $2,r1 373: mov r1,temp 374: jsr r5,get; temp 375: rts pc