1: / esub 2: / r1 = pointer to input string 3: / 4: esub: 5: mov r1,-(sp) 6: tst switch 7: beq 1f 8: mov opointer,r1 9: jsr pc,putword 10: 1: 11: tst iflag 12: beq 1f 13: mov $2,tflag 14: jmp interrupt 15: 1: 16: inc switch 17: mov $10.,r0 18: jsr pc,allocate 19: mov r1,r0 20: mov opointer,r1 21: jsr pc,putword 22: mov (sp)+,r1 23: jsr pc,scan 24: 25: tst iflag 26: beq 1f 27: mov $3,tflag 28: jmp interrupt 29: 1: 30: mov r2,-(sp) 31: mov r1,r0 32: mov ipointer,r1 33: jsr pc,putword 34: mov opointer,r1 35: jsr pc,pop 36: bec 9f; 4; 9: 37: mov r0,-(sp) /last output 38: mov asmem,r1 39: jsr pc,getsp 40: bes 2f 41: 5: 42: clr curlyf 43: mov (sp),r1 44: mov r0,r2 45: jsr pc,release 46: 6: 47: mov opointer,r1 48: jsr pc,pop 49: bec 4f 50: clr switch 51: 4: mov r2,r1 52: jsr pc,rewind 53: tst (sp)+ 54: mov (sp)+,r2 55: rts pc 56: 57: 58: / not in memory 59: 2: 60: mov curly,r1 61: jsr pc,getsp 62: bes 2f 63: br 5b 64: 2: 65: mov (sp),r1 66: jsr pc,rewind 67: mov $'\[,r0 68: 1: 69: jsr r5,tfoput 70: jsr pc,getchar 71: bec 1b 72: mov $'\],r0 73: jsr r5,tfoput 74: mov $10.,r0 75: jsr pc,allocate 76: mov r1,r2 77: mov (sp),r0 78: tst curlyf 79: beq 1f 80: clr curlyf 81: mov curly,r1 82: jsr pc,addentry 83: br 2f 84: 1: 85: mov asmem,r1 86: jsr pc,whead 87: jsr pc,addentry 88: 2: 89: mov r2,r1 90: jsr pc,accept 91: br 6b 92: / 93: / 94: / earg 95: / r0 = number in ascii 96: / 97: earg: 98: tst iflag 99: beq 1f 100: mov $4,tflag 101: jmp interrupt 102: 1: 103: mov r1,-(sp) 104: inc argf 105: sub $'0,r0 106: asl r0 107: mov arg(r0),r1 108: beq 5f 109: 4: 110: mov (sp),r0 111: mov r1,(sp) 112: mov ipointer,r1 113: jsr pc,putword 114: mov opointer,r1 115: jsr pc,pop 116: bec 3f 117: clr switch 118: 3: 119: mov (sp)+,r1 120: jsr pc,rewind 121: jsr pc,scan 122: mov r0,-(sp) 123: mov ipointer,r1 124: jsr pc,pop 125: bec 9f; 4; 9: 126: mov r0,r1 127: clr argf 128: clr curlyf 129: mov (sp)+,r0 130: rts pc 131: 5: 132: mov r0,-(sp) 133: mov $'\[,r0 134: jsr r5,tfoput 135: mov (sp),r0 136: asr r0 137: add $'0,r0 138: jsr r5,tfoput 139: mov $'\],r0 140: jsr r5,tfoput 141: mov $10.,r0 142: jsr pc,allocate 143: mov (sp)+,r0 144: mov r1,arg(r0) 145: jsr pc,accept 146: 147: br 4b