1: / clri -- clear inode
   2: 
   3:         cmp     (sp)+,$2
   4:         blt     error
   5:         beq     1f
   6:         mov     4(sp),fs1
   7:         mov     4(sp),fs2
   8: 1:
   9:         tst     (sp)+
  10:         mov     (sp)+,r0
  11:         clr     r5
  12: 1:
  13:         movb    (r0)+,r1
  14:         beq     1f
  15:         mpy     $10.,r5
  16:         sub     $'0,r1
  17:         cmp     r1,$10.
  18:         bhis    error
  19:         add     r1,r5
  20:         br      1b
  21: 1:
  22:         add     $31.,r5
  23:         mov     r5,r0
  24:         als     $-4,r0
  25:         mov     r0,0f
  26:         sys     open; fs1: filsys; 0
  27:         bes     error
  28:         mov     r0,-(sp)
  29:         sys     seek; 0:..; 3
  30:         mov     (sp),r0
  31:         sys     read; buf; 512.
  32:         mov     (sp)+,r0
  33:         sys     close
  34:         mov     r5,r0
  35:         als     $5,r0
  36:         bic     $!777,r0
  37:         add     $buf,r0
  38:         mov     $16.,r5
  39: 1:
  40:         clr     (r0)+
  41:         sob     r5,1b
  42:         sys     open; fs2: filsys; 1
  43:         bes     error
  44:         mov     r0,-(sp)
  45:         mov     0b,0f
  46:         sys     seek; 0:..; 3
  47:         mov     (sp)+,r0
  48:         sys     write; buf; 512.
  49:         bes     error
  50:         sys     exit
  51: 
  52: error:
  53:         mov     $1,r0
  54:         sys     write; 1f; 2f-1f
  55:         sys     exit
  56: 1:
  57:         <error\n>
  58: 2:
  59: 
  60: filsys: </dev/junk\0>
  61: .even
  62:         .bss
  63: buf:    .=.+512.

Defined functions

error defined in line 52; used 5 times
filsys defined in line 60; used 2 times
fs1 defined in line 26; used 1 times
  • in line 6
fs2 defined in line 42; used 1 times
  • in line 7

Defined variables

buf defined in line 63; used 3 times
Last modified: 1975-05-14
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 528
Valid CSS Valid XHTML 1.0 Strict