1: / 2: / 3: 4: / a3 -- pdp-11 assembler pass 1 5: 6: assem: 7: jsr pc,readop 8: jsr pc,checkeos 9: br ealoop 10: tst ifflg 11: beq 3f 12: cmp r4,$200 13: blos assem 14: cmpb (r4),$21 /if 15: bne 2f 16: inc ifflg 17: 2: 18: cmpb (r4),$22 /endif 19: bne assem 20: dec ifflg 21: br assem 22: 3: 23: mov r4,-(sp) 24: jsr pc,readop 25: cmp r4,$'= 26: beq 4f 27: cmp r4,$': 28: beq 1f 29: mov r4,savop 30: mov (sp)+,r4 31: jsr pc,opline 32: br ealoop 33: 1: 34: mov (sp)+,r4 35: cmp r4,$200 36: bhis 1f 37: cmp r4,$1 / digit 38: beq 3f 39: jsr r5,error; 'x 40: br assem 41: 1: 42: bitb $37,(r4) 43: beq 1f 44: jsr r5,error; 'm 45: 1: 46: bisb dot-2,(r4) 47: mov dot,2(r4) 48: br assem 49: 3: 50: mov numval,r0 51: jsr pc,fbcheck 52: movb dotrel,curfbr(r0) 53: asl r0 54: movb dotrel,nxtfb 55: mov dot,nxtfb+2 56: movb r0,nxtfb+1 57: mov dot,curfb(r0) 58: movb fbfil,r0 59: sys write; nxtfb; 4 60: jes wrterr 61: br assem 62: 4: 63: jsr pc,readop 64: jsr pc,expres 65: mov (sp)+,r1 66: cmp r1,$200 67: bhis 1f 68: jsr r5,error; 'x 69: br ealoop 70: 1: 71: cmp r1,$dotrel 72: bne 2f 73: bic $40,r3 74: cmp r3,dotrel 75: bne 1f 76: 2: 77: bicb $37,(r1) 78: bic $!37,r3 79: bne 2f 80: clr r2 81: 2: 82: bisb r3,(r1) 83: mov r2,2(r1) 84: br ealoop 85: 1: 86: jsr r5,error; '. 87: movb $2,dotrel 88: ealoop: 89: cmp r4,$'; 90: beq assem1 91: cmp r4,$'\n 92: bne 1f 93: inc line 94: br assem1 95: 1: 96: cmp r4,$'\e 97: bne 2f 98: tst ifflg 99: beq 1f 100: jsr r5,error; 'x 101: 1: 102: rts pc 103: 2: 104: jsr r5,error; 'x 105: 2: 106: jsr pc,checkeos 107: br assem1 108: jsr pc,readop 109: br 2b 110: assem1: 111: jmp assem 112: 113: fbcheck: 114: cmp r0,$9. 115: bhi 1f 116: rts pc 117: 1: 118: jsr r5,error; 'f 119: clr r0 120: rts pc 121: 122: checkeos: 123: cmp r4,$'\n 124: beq 1f 125: cmp r4,$'; 126: beq 1f 127: cmp r4,$'\e 128: beq 1f 129: add $2,(sp) 130: 1: 131: rts pc