1: /
   2: /
   3: 
   4: / f32 -- expression to tree
   5: 
   6: .globl  e1
   7: .globl  e2
   8: .globl  e11
   9: 
  10: .globl  error
  11: .globl  getsym
  12: .globl  blockp
  13: .globl  blocks
  14: .globl  declimpl
  15: .globl  conu
  16: .globl  ptemp
  17: .globl  functn
  18: .globl  funimpl
  19: 
  20: /	e1:	e2[,e1]
  21: /	e2:	e2[.or.e3]
  22: /	e3:	e3[.and.e4]
  23: /	e4:	[.not.]e5
  24: /	e5:	e6[.rel.e6]
  25: /	e6:	[+-]e7[+-e6]
  26: /	e7:	e7[*/e8]
  27: /	e8:	e9[**e9]
  28: /	e9:	constant
  29: /		name[(e1)]
  30: /		(e2)
  31: e1:
  32:         jsr     r5,e2
  33:         cmp     r0,$36.         / ,
  34:         bne     1f
  35:         jsr     r5,block; e1
  36:         rts     r5
  37: 
  38: e2:
  39:         jsr     r5,e3
  40: 2:
  41:         cmp     r0,$30.         / or
  42:         bne     1f
  43:         jsr     r5,block; e3
  44:         br      2b
  45: 
  46: e3:
  47:         jsr     r5,e4
  48: 2:
  49:         cmp     r0,$28.         / and
  50:         bne     1f
  51:         jsr     r5,block; e4
  52:         br      2b
  53: 
  54: e4:
  55:         jsr     r5,getsym
  56:         cmp     r0,$26.         / not
  57:         bne     e5
  58:         clr     r2
  59:         jsr     r5,block; e5a
  60:         rts     r5
  61: 
  62: e5a:
  63:         jsr     r5,getsym
  64: e5:
  65:         jsr     r5,e6
  66:         cmp     r0,$14. / .lt.
  67:         blo     1f
  68:         cmp     r0,$24. / .ge.
  69:         bhi     1f
  70:         jsr     r5,block; e6a
  71:         rts     r5
  72: 
  73: e6a:
  74:         jsr     r5,getsym
  75: e6:
  76:         cmp     r0,$12.         / +
  77:         beq     e6a
  78:         cmp     r0,$10.         / -
  79:         bne     2f
  80:         clr     r2
  81:         jsr     r5,block; e7a
  82:         br      3f
  83: 2:
  84:         jsr     r5,e7
  85: 3:
  86:         cmp     r0,$10.         / -
  87:         blo     1f
  88:         cmp     r0,$12.         / +
  89:         bhi     1f
  90:         jsr     r5,block; e7a
  91:         br      3b
  92: 
  93: e7a:
  94:         jsr     r5,getsym
  95: e7:
  96:         jsr     r5,e8
  97: 2:
  98:         cmp     r0,$6.          / /
  99:         blo     1f
 100:         cmp     r0,$8.          / *
 101:         bhi     1f
 102:         jsr     r5,block; e8a
 103:         br      2b
 104: 
 105: e8a:
 106:         jsr     r5,getsym
 107: e8:
 108:         jsr     r5,e9
 109:         cmp     r0,$4           / **
 110:         bne     1f
 111:         jsr     r5,block; e9a
 112: 1:
 113:         rts     r5
 114: 
 115: e9a:
 116:         jsr     r5,getsym
 117: e9:
 118:         cmp     r0,$2           / constant
 119:         beq     3f
 120: / (e2)
 121:         cmp     r0,$32.         / (
 122:         bne     1f
 123:         jsr     r5,e2
 124:         br      2f
 125: e10:
 126:         jsr     r5,e1
 127: 2:
 128:         cmp     r0,$34. / )
 129:         beq     2f
 130:         jsr     r5,error; 29.
 131:         rts     r5
 132: 2:
 133:         jsr     r5,getsym
 134:         rts     r5
 135: 1:
 136:         tst     r0
 137:         beq     e11
 138: / unknown
 139:         jsr     r5,error; 30.
 140:         rts     r5
 141: 
 142: / name
 143: e11:
 144:         mov     r3,r2
 145:         jsr     r5,getsym
 146:         cmp     r0,$32.         / (
 147:         bne     1f
 148:         jsr     r5,appl
 149:         jsr     r5,block; e10
 150:         rts     r5
 151: 1:
 152:         mov     r2,r3
 153:         mov     r0,-(sp)
 154:         jsr     r5,declimpl
 155:         mov     symtab(r3),r0
 156:         bic     $!70,r0
 157:         cmp     r0,$30                  / class =| funct
 158:         bne     1f
 159:         jsr     r5,appl
 160:         mov     $42.,r3                 / just function name
 161:         br      2f
 162: 1:
 163:         clr     r3
 164: 2:
 165:         mov     (sp)+,r0
 166:         mov     r2,-(sp)
 167:         mov     blockp,r2
 168:         add     $6,blockp
 169:         mov     r3,(r2)
 170:         mov     (sp)+,2(r2)
 171:         clr     4(r2)
 172:         rts     r5
 173: 
 174: / number
 175: 3:
 176:         mov     blockp,r2
 177:         add     $6,blockp
 178:         mov     r0,(r2)
 179:         mov     r3,2(r2)
 180:         cmpb    2(r2),$5                / const->int
 181:         bne     4f
 182:         movb    $1,2(r2)
 183: 4:
 184:         mov     r3,temp
 185:         mov     conu,4(r2)
 186:         inc     conu
 187:         jsr     r5,ptemp; 'c; temp; symbuf
 188:         jsr     r5,getsym
 189:         rts     r5
 190: 
 191: appl:
 192:         clr     functn
 193:         bit     $70,symtab(r2)          / class
 194:         bne     1f
 195:         bis     $30,symtab(r2)
 196:         jsr     r5,funimpl
 197: 1:
 198:         mov     r2,r3
 199:         jsr     r5,declimpl
 200:         mov     symtab(r2),r0
 201:         bic     $!70,r0                 / class again
 202:         cmp     r0,$20          / array
 203:         beq     1f
 204:         cmp     r0,$30          / funct
 205:         beq     2f
 206:         jsr     r5,error; 33.
 207:         bic     $70,symtab(r2)
 208:         br      appl
 209: 1:
 210:         mov     $32.,r0
 211:         rts     r5
 212: 2:
 213:         mov     $34.,r0
 214:         rts     r5
 215: 
 216: block:
 217:         mov     blockp,r3
 218:         add     $6,blockp
 219:         mov     r0,(r3)+
 220:         mov     r2,(r3)+
 221:         mov     r3,-(sp)
 222:         jsr     r5,*(r5)+
 223:         mov     r2,*(sp)
 224:         mov     (sp)+,r2
 225:         sub     $4,r2
 226:         rts     r5

Defined functions

appl defined in line 191; used 3 times
block defined in line 216; used 10 times
e1 declared in line 6; defined in line 31; used 3 times
e10 defined in line 125; used 1 times
e11 declared in line 8; defined in line 143; used 4 times
e2 declared in line 7; defined in line 38; used 19 times
e3 defined in line 46; used 2 times
e4 defined in line 54; used 2 times
e5 defined in line 64; used 1 times
  • in line 57
e5a defined in line 62; used 1 times
  • in line 59
e6 defined in line 75; used 1 times
  • in line 65
e6a defined in line 73; used 2 times
e7 defined in line 95; used 1 times
  • in line 84
e7a defined in line 93; used 2 times
e8 defined in line 107; used 1 times
  • in line 96
e8a defined in line 105; used 1 times
e9 defined in line 117; used 1 times
e9a defined in line 115; used 1 times
Last modified: 1975-07-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 403
Valid CSS Valid XHTML 1.0 Strict