1: /
   2: /
   3: 
   4: / f22 -- allocate common
   5: 
   6: .globl  calloc
   7: .globl  entry
   8: 
   9: .globl  declimpl
  10: .globl  size
  11: .globl  getc
  12: .globl  getw
  13: .globl  xbuf
  14: .globl  code
  15: .globl  typ
  16: 
  17: calloc:
  18:         clr     r3
  19: 1:
  20:         cmp     r3,symtp
  21:         bhis    1f
  22:         mov     symtab(r3),r0
  23:         bic     $!70,r0         / class
  24:         cmp     r0,$40          / common block
  25:         bne     3f
  26:         mov     r3,-(sp)
  27:         mov     symtab+2(r3),r3
  28:         clr     r2              / byte offset
  29: 2:
  30:         tst     r3
  31:         beq     2f
  32:         jsr     r5,declimpl
  33:         mov     symtab+4(r3),-(sp)
  34:         mov     2(sp),symtab+4(r3)
  35:         mov     r2,symtab+6(r3)
  36:         jsr     r5,size
  37:         add     r0,r2
  38:         mov     (sp)+,r3
  39:         br      2b
  40: 2:
  41:         mov     (sp)+,r3
  42:         clr     symtab+2(r3)
  43:         mov     r2,symtab+6(r3)         / common block size
  44: 3:
  45:         add     $8,r3
  46:         br      1b
  47: 1:
  48:         rts     r5
  49: 
  50: entry:
  51:         mov     progt,r0
  52:         jmp     *1f(r0)
  53: 1:
  54:         main
  55:         subr
  56:         funct
  57:         blocd
  58: 
  59: main:
  60:         jsr     r5,code
  61:                 <main:\n\0>; .even
  62:         rts     r5
  63: 
  64: subr:
  65: funct:
  66:         jsr     r5,code
  67:                 <%n.:	%n_\n\0>; .even
  68:                 8
  69:                 8
  70:         clr     r3
  71: 1:
  72:         cmp     r3,symtp
  73:         bhis    1f
  74:         mov     symtab+2(r3),r0
  75:         beq     2f
  76:         mov     (r0)+,r1        / num dims
  77:         asl     r1
  78:         add     r0,r1           / ptr to last dim
  79:         mov     r3,-(sp)
  80:         mov     (r1),-(sp)      / dope id
  81:         clr     r2              / dope offset
  82: 3:
  83:         add     $2,r2
  84:         mov     -(r1),r3
  85:         cmp     r0,r1
  86:         bhi     3f
  87:         neg     r3              / adjustable dimension
  88:         ble     3b
  89:         mov     r0,-(sp)
  90:         jsr     r5,declimpl
  91:         mov     symtab(r3),r0
  92:         clrb    r0
  93:         swab    r0
  94:         jsr     r5,code
  95:                 <	rval%dp; %n_\n\0>; .even
  96:                 r0
  97:                 r3
  98:         mov     symtab(r3),r3
  99:         bic     $![377\<8+7],r3
 100:         cmp     r3,$2\<8+1              / is it i*2
 101:         beq     4f
 102:         bic     $!7,r3
 103:         movb    typ(r3),r3
 104:         jsr     r5,code
 105:                 <	%c%di2\n\0>; .even
 106:                 r3
 107:                 r0
 108: 4:
 109:         mov     2(sp),r0
 110:         jsr     r5,code
 111:                 <	stst; d%d+%d.\n\0>; .even
 112:                 r0
 113:                 r2
 114:         mov     (sp)+,r0
 115:         br      3b
 116: 3:
 117:         tst     (sp)+
 118:         mov     (sp)+,r3
 119: 2:
 120:         add     $8,r3
 121:         br      1b
 122: 1:
 123: blocd:
 124:         rts     r5

Defined functions

blocd defined in line 123; used 1 times
  • in line 57
calloc declared in line 6; defined in line 17; used 3 times
entry declared in line 7; defined in line 50; used 3 times
funct defined in line 65; used 1 times
  • in line 56
main defined in line 59; used 1 times
  • in line 54
subr defined in line 64; used 1 times
  • in line 55
Last modified: 1975-07-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 507
Valid CSS Valid XHTML 1.0 Strict