1: /
   2: /
   3: 
   4: / f46 -- constant evaluation
   5: 
   6: .globl  getcon
   7: .globl  dope
   8: 
   9: .globl  code
  10: 
  11: getcon:
  12:         mov     r0,-(sp)
  13:         mov     r2,-(sp)
  14:         clr     r2                      / dec . counter
  15:         clrf    fr0
  16:         movif   $10.,fr1
  17:         clr     -(sp)                   / - flag
  18:         cmpb    (r1)+,$'+
  19:         beq     1f
  20:         cmpb    -(r1),$'-
  21:         bne     1f
  22:         inc     r1
  23:         inc     (sp)
  24: 1:
  25:         movb    (r1)+,r0
  26:         sub     $'0,r0
  27:         cmp     r0,$9
  28:         blos    2f
  29:         cmp     r0,$'.-'0
  30:         bne     1f
  31:         dec     r2
  32:         br      1b
  33: 2:
  34:         tst     r2
  35:         beq     2f
  36:         dec     r2
  37: 2:
  38:         mulf    fr1,fr0
  39:         movif   r0,fr2
  40:         addf    fr2,fr0
  41:         br      1b
  42: 1:
  43:         tst     r2
  44:         bne     1f
  45:         dec     r2
  46: 1:
  47:         cmp     r0,$'e-'0
  48:         beq     2f
  49:         cmp     r0,$'d-'0
  50:         bne     1f
  51: 2:
  52:         mov     r3,-(sp)
  53:         clr     r3
  54:         clr     -(sp)
  55:         cmpb    (r1),$'-
  56:         bne     3f
  57:         inc     r1
  58:         inc     (sp)
  59:         br      2f
  60: 3:
  61:         cmpb    (r1),$'+
  62:         bne     2f
  63:         inc     r1
  64: 2:
  65:         movb    (r1)+,r0
  66:         sub     $'0,r0
  67:         cmp     r0,$9
  68:         bhi     2f
  69:         mpy     $10.,r3
  70:         add     r0,r3
  71:         br      2b
  72: 2:
  73:         tst     (sp)+
  74:         beq     2f
  75:         neg     r3
  76: 2:
  77:         add     r3,r2
  78:         mov     (sp)+,r3
  79: 1:
  80:         movf    fr1,fr2
  81:         add     $1,r2
  82:         beq     1f
  83:         blt     2f
  84:         clr     -(sp)
  85:         br      3f
  86: 2:
  87:         mov     pc,-(sp)
  88:         neg     r2
  89: 3:
  90:         sub     $1,r2
  91:         ble     2f
  92:         mulf    fr1,fr2
  93:         br      3b
  94: 2:
  95:         tst     (sp)+
  96:         bne     2f
  97:         mulf    fr2,fr0
  98:         br      1f
  99: 2:
 100:         divf    fr2,fr0
 101: 1:
 102:         tst     (sp)+
 103:         beq     1f
 104:         negf    fr0
 105: 1:
 106:         cmpb    -(r1),$',
 107:         bne     1f
 108:         movf    fr0,-(sp)
 109:         inc     r1
 110:         jsr     r5,getcon
 111:         movf    (sp)+,fr1               / a,b -> r1,r0
 112: 1:
 113:         mov     (sp)+,r2
 114:         mov     (sp)+,r0
 115:         rts     r5
 116: 
 117: dope:
 118:         cmp     progt,$6                / test "block data"
 119:         bne     1f
 120:         rts     r5
 121: 1:
 122:         clr     r3
 123: 1:
 124:         cmp     r3,symtp
 125:         bhis    1f
 126:         mov     symtab(r3),r0
 127:         bic     $!70,r0
 128:         cmp     r0,$20
 129:         bne     2f
 130:         mov     symtab+2(r3),r0
 131:         beq     2f
 132:         mov     (r0)+,r1
 133:         mov     r1,r2
 134:         asl     r2
 135:         add     r0,r2
 136:         mov     (r2),r0
 137:         jsr     r5,code
 138:                 <d%d:	%d.\n	\0>; .even
 139:                 r0
 140:                 r1
 141: 3:
 142:         dec     r1
 143:         blt     3f
 144:         mov     -(r2),r0
 145:         bge     4f
 146:         jsr     r5,code
 147:                 <..; \0>; .even
 148:         br      3b
 149: 4:
 150:         jsr     r5,code
 151:                 <%d.; \0>; .even
 152:                 r0
 153:         br      3b
 154: 3:
 155:         mov     symtab(r3),r2
 156:         clrb    r2
 157:         swab    r2
 158:         jsr     r5,code
 159:                 <%d.\n\0>; .even
 160:                 r2
 161: 2:
 162:         add     $8,r3
 163:         br      1b
 164: 1:
 165:         rts     r5

Defined functions

dope declared in line 7; defined in line 117; used 3 times
getcon declared in line 6; defined in line 11; used 5 times
Last modified: 1975-07-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 389
Valid CSS Valid XHTML 1.0 Strict