1: /
   2: /
   3: 
   4: / f47 -- analysis of data statements
   5: 
   6: .globl  cdata
   7: .globl  dodata
   8: .globl  onedata
   9: .globl  compare
  10: 
  11: .globl  code
  12: .globl  getcon
  13: .globl  error
  14: .globl  getsym
  15: .globl  consub
  16: .globl  size
  17: .globl  geti
  18: .globl  setln
  19: .globl  getln
  20: .globl  declimpl
  21: .globl  evalcon
  22: .globl  dattab
  23: .globl  contab
  24: .globl  efno
  25: .globl  perror
  26: .globl  qsort
  27: .globl  negflg
  28: .globl  repfact
  29: .globl  geti
  30: .globl  holround
  31: 
  32: cdata:
  33:         mov     r5,-(sp)
  34:         jsr     r5,setln
  35:         mov     $dattab,r4
  36:         mov     $contab,r5
  37: dloop:
  38:         jsr     r5,getln
  39:                 br 2f
  40:         br      1f
  41: 2:
  42:         mov     r4,-(sp)
  43:         mov     $dattab,r1
  44:         mov     r4,r2
  45:         mov     $8.,r3
  46:         jsr     pc,qsort
  47:         mov     (sp)+,r4
  48:         mov     (sp)+,r5
  49:         rts     r5
  50: 1:
  51:         cmp     r0,$'d
  52:         bne     dloop
  53:         mov     $line+4,r1
  54: / loop per specification-set
  55: 1:
  56:         clr     repfact
  57:         mov     r1,r2
  58: 2:
  59:         jsr     r5,getsym
  60:         cmp     r0,$40.         / =|
  61:         bne     3f
  62: 8:
  63:         jmp     8f
  64: 9:
  65:         jmp     9f
  66: 3:
  67:         cmp     r0,$6           / /
  68:         bne     2b
  69:         mov     r1,-(sp)
  70:         mov     r2,r1
  71:         mov     (sp)+,r2
  72: / loop per specification
  73: 2:
  74:         cmp     r4,r5
  75:         blo     3f
  76:         jmp     7f
  77: 3:
  78:         jsr     r5,getsym
  79:         tst     r0
  80:         bne     8b
  81:         bit     $70,symtab(r3)          / test classed
  82:         bne     3f
  83:         jsr     r5,declimpl
  84: 3:
  85:         mov     symtab(r3),r0
  86:         mov     r0,holquo               / temp storage
  87:         incb    holquo+1                / round size
  88:         bicb    $1,holquo+1
  89:         bit     $200,r0                 / test parameter
  90:         bne     9b
  91:         bic     $!70,r0
  92:         cmp     r0,$10                  / simple
  93:         beq     3f
  94:         cmp     r0,$20                  / array
  95:         bne     9b
  96: 3:
  97:         bit     $100,symtab(r3)         / test common
  98:         beq     3f
  99:         cmp     progt,$6                / test block data
 100:         bne     9b
 101:         mov     symtab+4(r3),(r4)+      / common block
 102:         br      4f
 103: 3:
 104:         cmp     progt,$6                / test block data
 105:         beq     9b
 106:         clr     (r4)+
 107:         tst     symtab+6(r3)            / test allocated
 108:         bne     4f
 109:         mov     nxtaloc,symtab+6(r3)
 110:         jsr     r5,size
 111:         add     r0,nxtaloc
 112: 4:
 113:         clr     (r4)                    / offset slot
 114:         cmpb    (r1),$'(                / test subscript
 115:         bne     3f
 116:         inc     r1
 117:         jsr     r5,consub
 118:         bic     $70,holquo
 119:         bis     $10,holquo      / array -> scalar
 120:         mov     r0,(r4)
 121: 3:
 122:         movb    symtab+1(r3),r0 / width of item
 123:         inc     r0
 124:         bic     $1,r0
 125:         mov     r0,holround
 126:         add     symtab+6(r3),(r4)+
 127:         tst     repfact
 128:         beq     3f
 129:         dec     repfact
 130:         movb    efno+1,r3
 131:         mov     r3,(r4)+
 132:         mov     r5,(r4)+
 133:         br      4f
 134: 3:
 135:         mov     r1,-(sp)
 136:         mov     r2,r1
 137:         mov     (sp)+,r2
 138: 5:
 139:         jsr     r5,getsym
 140:         cmp     r0,$2                   / constant
 141:         beq     3f
 142:         cmp     r0,$10.                 / -
 143:         bne     8f
 144:         inc     negflg
 145:         jsr     r5,getsym
 146:         cmp     r0,$2                   / constant
 147:         bne     8f
 148: 3:
 149:         cmpb    (r1)+,$'*
 150:         bne     3f
 151:         cmp     r3,$intcon
 152:         bne     8f
 153:         jsr     r5,geti
 154:         dec     r0
 155:         bmi     8f
 156:         mov     r0,repfact
 157:         br      5b
 158: 3:
 159:         dec     r1
 160:         mov     r1,-(sp)
 161:         mov     r2,-(sp)
 162:         mov     r3,efno
 163:         clrb    r3
 164:         swab    r3
 165:         mov     r3,(r4)+
 166:         sub     r3,r5
 167:         mov     r5,(r4)+                / ptr to const
 168:         mov     r5,r3
 169:         mov     $symbuf,r1
 170:         jsr     r5,evalcon
 171:         clr     negflg
 172:         mov     (sp)+,r1
 173:         mov     (sp)+,r2                / note r1 <=> r2
 174: 4:
 175:         cmpb    efno+1,holquo+1         / compare sizes
 176:         blt     9f                      / constant too small
 177:         beq     3f
 178:         bicb    $!77,holquo
 179:         cmp     holquo,$int2con+10      / simple int*2?
 180:         bne     4f
 181:         sub     $2,-4(r4)               / reduce const length
 182:         cmpb    efno,$5
 183:         beq     3f                      / hollerith, OK
 184:         add     $2,-2(r4)               / get least sig.
 185:         br      3f
 186: 4:
 187:         bit     $20,holquo              / test array
 188:         beq     9f
 189:         cmpb    efno,$5                 / test hollerith
 190:         bne     9f
 191: 3:
 192:         cmpb    (r1),$'/
 193:         beq     3f
 194:         cmpb    (r1)+,$',
 195:         bne     8f
 196:         tst     repfact
 197:         bne     4f
 198:         cmpb    (r2)+,$',
 199:         bne     8f
 200: 4:
 201:         jmp     2b
 202: 3:
 203:         cmpb    (r2)+,$'/
 204:         bne     8f
 205:         tstb    (r2)
 206:         beq     1f
 207:         cmpb    (r2),$',
 208:         bne     3f
 209:         inc     r2
 210: 3:
 211:         mov     r2,r1
 212:         tst     repfact
 213:         bne     8f
 214:         jmp     1b
 215: 7:
 216:         jsr     r5,error; 28.           / data table overflow
 217:         br      2f
 218: 8:
 219:         jsr     r5,error; 21.           / data syntax error
 220:         br      2f
 221: 9:
 222:         jsr     r5,error; 22.           / data semantic error
 223: 2:
 224:         mov     $dattab,r4              / reset ptrs
 225:         mov     $contab,r5
 226:         jsr     r5,perror
 227: 1:
 228:         jmp     dloop
 229: 
 230: dodata:
 231:         cmp     progt,$6
 232:         beq     1f                      / block data
 233:         mov     $dattab,r3
 234:         cmp     r3,r4
 235:         bne     2f                      / is data
 236:         mov     nxtaloc,r0
 237:         jsr     r5,code
 238:                 <.=.+%d.\n.text\n\0>; .even
 239:                 r0
 240:         rts     r5
 241: 2:
 242:         jsr     r5,onedata
 243:         sub     nxtaloc,r1
 244:         neg     r1
 245:         blt     9b
 246:         jsr     r5,code
 247:                 <.=.+%d.\n.text\n\0>; .even
 248:                 r1
 249: 1:
 250:         rts     r5
 251: 
 252: onedata:
 253:         clr     r1
 254: 2:
 255:         mov     2(r3),r0
 256:         sub     r1,r0
 257:         bmi     9f
 258:         beq     3f
 259:         jsr     r5,code
 260:                 <.=.+%d.\n\0>; .even
 261:                 r0
 262:         add     r0,r1
 263: 3:
 264:         mov     4(r3),r0
 265:         add     r0,r1
 266:         asr     r0
 267:         mov     r0,-(sp)
 268:         mov     6(r3),r2
 269: 3:
 270:         mov     (r2)+,r0
 271:         jsr     r5,code
 272:                 <%o\n\0>; .even
 273:                 r0
 274:         dec     (sp)
 275:         bne     3b
 276:         tst     (sp)+
 277:         add     $8.,r3
 278:         cmp     r3,r4
 279:         bhis    1f
 280:         cmp     (r3),-8(r3)             / any more in this block
 281:         beq     2b
 282: 1:
 283:         rts     r5
 284: 9:
 285:         clr     line
 286:         jsr     r5,error; 32.           / overlapping data init
 287:         jsr     r5,perror
 288:         rts     r5
 289: 
 290: / comparison routine for qsort
 291: 
 292: compare:
 293:         cmp     (r0),(r4)
 294:         bne     1f
 295:         cmp     2(r0),2(r4)
 296: 1:
 297:         rts     pc

Defined functions

cdata declared in line 6; defined in line 32; used 3 times
compare declared in line 9; defined in line 292; used 1 times
  • in line 9
dloop defined in line 37; used 2 times
dodata declared in line 7; defined in line 230; used 3 times
onedata declared in line 8; defined in line 252; used 4 times
Last modified: 1975-07-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 505
Valid CSS Valid XHTML 1.0 Strict