1: / 2: / test trace flag routine. 3: / 4: / this is a highly tooled routine for efficiency reasons. 5: / The equivalent C code is: 6: / tTf(m, n) 7: / { 8: / extern char tTany; 9: / extern int tT[]; 10: / 11: / if (n < 0) 12: / return (tT[m]); 13: / else 14: / return ((tT[m] >> n) & 01); 15: / } 16: / 17: / Call: 18: / if (tTf(m, n)) ... 19: / Tests bit n of trace flag m (or any bit of m if n 20: / < 0) 21: / 22: / History: 23: / 12/13/78 (eric) -- written from C 24: / 25: 26: .globl _tTf 27: .globl _tTany 28: .globl _tT 29: 30: _tTf: 31: movb _tTany,r0 / test for any flags on 32: beq 1f / no, exit 33: mov 2(sp),r0 / yes, get specific flag 34: asl r0 35: mov _tT(r0),r0 36: mov 4(sp),r1 / what bit? 37: blt 1f / any: just return 38: neg r1 / move to low-order bit 39: ash r1,r0 40: bic $177776,r0 / clear all others 41: 1: 42: rts pc