1: # 2: 3: #include "m6.h" 4: 5: pushget() { 6: ge = (ge+1)&0177776; 7: ge->word = gf-ge; 8: gf = ge; 9: ge =+2; 10: ++lg; 11: } 12: 13: dotrace() { 14: char *arg(); 15: int i,j; 16: printf("\n%d %c%s",lg,sharp,arg(0)); 17: for(j=9;j>0&&*arg(j)==0;j--); 18: for(i=1;i<=j;i++) 19: printf("%c%c%s%c",comma,lquote,arg(i),rquote); 20: printf("%c\n",c); 21: } 22: 23: popget() { 24: ge = gf; 25: gf =+ gf->word; 26: --lg; 27: if(gf<g0) diag("Software error"); 28: } 29: 30: pushput() { 31: if(pe&1) { 32: pf->prev =| 1; 33: pe++; 34: } 35: pe->word = pf-pe; 36: pf = pe; 37: pe =+2; 38: } 39: 40: popput() { 41: pe = pf; 42: pf =+ pf->word; 43: if(pf->prev&1) { 44: pe--; 45: pf->prev =& 0177776; 46: } 47: if(pf<p0) diag("Software error"); 48: } 49: 50: pushdef() { 51: de = (de+1)&0177776; 52: de->word = df-de; 53: df = de; 54: de =+2; 55: } 56: 57: put() { 58: if(lp>0) { 59: *pe++ = c; 60: if(pe>pmax) diag("Arg collection overflow"); 61: } 62: else putchar(c); 63: } 64: 65: get() { 66: char *p; 67: int n; 68: if(lg==0) 69: c = getchar(); 70: else while(1) { 71: if(gf->marg!=0) { 72: if((c = gf[gf->marg++])==0) gf->marg = 0; 73: else return; 74: } 75: c = (p = gf->mframe)[gf->mchar++]; 76: if(c!=dollar) return; 77: n = p[gf->mchar] - '0'; 78: if(n<0 || n>9) return; 79: ++gf->mchar; 80: gf->marg = arg(n) - gf; 81: } 82: }