1: /
   2: /
   3: 
   4: / a2 -- pdp-11 assembler pass 2
   5: 
   6: outw:
   7:         cmp     dot-2,$4
   8:         beq     9f
   9:         bit     $1,dot
  10:         bne     1f
  11:         add     $2,dot
  12:         tstb    passno
  13:         beq     8f
  14:         clr     -(sp)
  15:         rol     r3
  16:         adc     (sp)
  17:         asr     r3              / get relative pc bit
  18:         cmp     r3,$40
  19:         bne     2f
  20: / external references
  21:         mov     $666,outmod             / make nonexecutable
  22:         mov     xsymbol,r3
  23:         sub     $usymtab,r3
  24:         asl     r3
  25:         bis     $4,r3           / external relocation
  26:         br      3f
  27: 2:
  28:         bic     $40,r3          / clear any ext bits
  29:         cmp     r3,$5
  30:         blo     4f
  31:         cmp     r3,$33          / est. text, data
  32:         beq     6f
  33:         cmp     r3,$34
  34:         bne     7f
  35: 6:
  36:         jsr     r5,error; 'r
  37: 7:
  38:         mov     $1,r3           / make absolute
  39: 4:
  40:         cmp     r3,$2
  41:         blo     5f
  42:         cmp     r3,$4
  43:         bhi     5f
  44:         tst     (sp)
  45:         bne     4f
  46:         add     dotdot,r2
  47:         br      4f
  48: 5:
  49:         tst     (sp)
  50:         beq     4f
  51:         sub     dotdot,r2
  52: 4:
  53:         dec     r3
  54:         bpl     3f
  55:         clr     r3
  56: 3:
  57:         asl     r3
  58:         bis     (sp)+,r3
  59:         mov     r2,r0
  60:         jsr     r5,putw; txtp
  61:         add     $2,*tseekp
  62:         mov     r3,r0
  63:         jsr     r5,putw; relp
  64:         add     $2,*rseekp
  65: 8:
  66:         rts     pc
  67: 1:
  68:         jsr     r5,error; 'o
  69:         clr     r3
  70:         jsr     pc,outb
  71:         rts     pc
  72: 
  73: 9:
  74:         jsr     r5,error; 'x
  75:         rts     pc
  76: 
  77: outb:
  78:         cmp     dot-2,$4                / test bss mode
  79:         beq     9b
  80:         cmp     r3,$1
  81:         blos    1f
  82:         jsr     r5,error; 'r
  83: 1:
  84:         tstb    passno
  85:         beq     2f
  86:         mov     r2,r0
  87:         bit     $1,dot
  88:         bne     1f
  89:         jsr     r5,putw; txtp
  90:         clr     r0
  91:         jsr     r5,putw; relp
  92:         add     $2,*rseekp
  93:         add     $2,*tseekp
  94:         br      2f
  95: 1:
  96:         mov     txtp,r0
  97:         movb    r2,-1(r0)
  98: 2:
  99:         inc     dot
 100:         rts     pc
 101: 
 102: error:
 103:         mov     $666,outmod             / make nonexecutable
 104:         mov     r3,-(sp)
 105:         mov     r2,-(sp)
 106:         mov     r1,-(sp)
 107:         mov     r0,-(sp)
 108:         mov     $argb,r1
 109: 1:
 110:         movb    (r1),ch
 111:         beq     1f
 112:         clrb    (r1)+
 113:         mov     $1,r0
 114:         sys     write; ch; 1
 115:         br      1b
 116: 1:
 117:         mov     (r5)+,r0
 118:         movb    r0,0f
 119:         mov     line,r3
 120:         mov     $0f+6,r0
 121:         mov     $4,r1
 122: 2:
 123:         clr     r2
 124:         dvd     $10.,r2
 125:         add     $'0,r3
 126:         movb    r3,-(r0)
 127:         mov     r2,r3
 128:         sob     r1,2b
 129:         mov     $1,r0
 130:         sys     write; 0f; 7
 131:         mov     (sp)+,r0
 132:         mov     (sp)+,r1
 133:         mov     (sp)+,r2
 134:         mov     (sp)+,r3
 135:         rts     r5
 136: 
 137:         .data
 138: 0:      <f xxxx\n>
 139:         .even
 140:         .text
 141: 
 142: betwen:
 143:         cmp     r0,(r5)+
 144:         blt     1f
 145:         cmp     (r5)+,r0
 146:         blt     2f
 147: 1:
 148:         tst     (r5)+
 149: 2:
 150:         rts     r5

Defined functions

betwen defined in line 142; never used
error defined in line 102; used 4 times
outb defined in line 77; used 1 times
  • in line 70
outw defined in line 6; never used
Last modified: 1975-07-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 559
Valid CSS Valid XHTML 1.0 Strict