1: /
   2: /
   3: 
   4: / a4 -- pdp-11 assembler pass 2
   5: 
   6: oset:
   7:         mov     r2,-(sp)
   8:         mov     (r5)+,r1
   9:         mov     r0,r2
  10:         bic     $!777,r0
  11:         add     r1,r0
  12:         add     $6,r0
  13:         mov     r0,(r1)+        / next slot
  14:         mov     r1,r0
  15:         add     $1004,r0
  16:         mov     r0,(r1)+        / buf max
  17:         mov     r2,(r1)+        / seek addr
  18:         mov     (sp)+,r2
  19:         rts     r5
  20: 
  21: putw:
  22:         mov     r1,-(sp)
  23:         mov     r2,-(sp)
  24:         mov     (r5)+,r2
  25:         mov     (r2)+,r1        / slot
  26:         cmp     r1,(r2)         / buf max
  27:         bhis    1f
  28:         mov     r0,(r1)+
  29:         mov     r1,-(r2)
  30:         br      2f
  31: 1:
  32:         tst     (r2)+
  33:         mov     r0,-(sp)
  34:         jsr     r5,flush1
  35:         mov     (sp)+,r0
  36:         mov     r0,*(r2)+
  37:         add     $2,-(r2)
  38: 2:
  39:         mov     (sp)+,r2
  40:         mov     (sp)+,r1
  41:         rts     r5
  42: 
  43: flush:
  44:         mov     (r5)+,r2
  45:         cmp     (r2)+,(r2)+
  46: flush1:
  47:         mov     (r2)+,r1
  48:         mov     r1,0f           / seek address
  49:         mov     fout,r0
  50:         sys     indir; 9f
  51:         .data
  52: 9:      sys     seek; 0:..; 0
  53:         .text
  54:         bic     $!777,r1
  55:         add     r2,r1           / write address
  56:         mov     r1,0f
  57:         mov     r2,r0
  58:         bis     $777,-(r2)
  59:         inc     (r2)            / new seek addr
  60:         cmp     -(r2),-(r2)
  61:         sub     (r2),r1
  62:         neg     r1
  63:         mov     r1,0f+2         / count
  64:         mov     r0,(r2)         / new next slot
  65:         mov     fout,r0
  66:         sys     indir; 9f
  67:         .data
  68: 9:      sys     write; 0:..; ..
  69:         .text
  70:         rts     r5
  71: 
  72: readop:
  73:         mov     savop,r4
  74:         beq     1f
  75:         clr     savop
  76:         rts     pc
  77: 1:
  78:         jsr     pc,getw1
  79:         cmp     r4,$200
  80:         blo     1f
  81:         cmp     r4,$4000
  82:         blo     2f
  83:         add     $usymtab-4000,r4
  84:         rts     pc
  85: 2:
  86:         add     $symtab-1000,r4
  87: 1:
  88:         rts     pc
  89: 
  90: getw:
  91:         mov     savop,r4
  92:         beq     getw1
  93:         clr     savop
  94:         rts     pc
  95: getw1:
  96:         dec     ibufc
  97:         bgt     1f
  98:         movb    fin,r0
  99:         sys     read; inbuf; 512.
 100:         bes     3f
 101:         asr     r0
 102:         mov     r0,ibufc
 103:         bne     2f
 104: 3:
 105:         mov     $4,r4
 106:         sev
 107:         rts     pc
 108: 2:
 109:         mov     $inbuf,ibufp
 110: 1:
 111:         mov     *ibufp,r4
 112:         add     $2,ibufp
 113:         rts     pc

Defined functions

flush defined in line 43; never used
flush1 defined in line 46; used 1 times
  • in line 34
getw defined in line 90; never used
getw1 defined in line 95; used 2 times
oset defined in line 6; never used
putw defined in line 21; never used
readop defined in line 72; never used
Last modified: 1975-07-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 401
Valid CSS Valid XHTML 1.0 Strict