! "W N, p=    @ #D  D ҃TP  B ы e@W 0 ,"& 7   0ߋp@E A Ze      |@7x@ eE "  r-lx  Pf eP5Ћ 4R`ȋ  `e `R7 ! "W N, ~=    @ #D  D ҃TP  B ы e@W 0 ,"& 7   0ߋp@E A Ze      |@7x@ eE "  -x  ^f e*ȋ5 5&D9ȋ5@*&e  (: 7 dldr ;Vdtff hboot ;bhpuboot ; hthp ;!Phtrkl ;"7Uhtrpv ;#(Pmboot ;$bmcopy %mem &qreset ;1krkf ;2+rkuboot ;3rpuboot ;4tboot ;5btcfN ;6Ztmhp| ;;WtmrkT ;<5\tmrp^ ;=oWuboot->X@B J)eL x  N N Ê <%! ,c ѐhˋÜ`E $  P   L ɋr hV wNLFD set up to format on drive 0 V   V V   v f 7VA 7HA B7:A74H7.7(7"777  7 7 7 7 77A7A 7A  7 7    A7  w   ~7 p 7r   Zw`  P 7P @7F 67< *70 7& 7   D#6V  !B $ !V   rw e07b`Z errorx tcst in r0; tccm in r1 &V$ V   55 eE V A A E]VE EP E?PB E! "W N, ~=    @ #D  D ҃TP  B ы e@W 0 ,"& 7   0ߋp@E A Ze      |@7x@ eE "  -x  ^f e*ȋ5 5&D9ȋ5@*&e  (: 7  ! "W N  @ &   / e&7 J  j De Ԥ!@eW  8m RW et ZEWue T!eD @5 &     7 = ߋpH@E A Ze      @7@ eE "     n rf rvDB9ɋ  disk offset J7f tape offset 07N count  T 0 *    0 Wp `@ illegal digit -  ^ e*ȋ5 5&D9ȋ5@*&e  (: 7    0 rf rv(&1ɋ     n rf rvDB9ɋ\  disk offset J7> tape offset 07& count  T      0 Wp `@ illegal digit \-  ^ e*ȋ5 5&D9ȋ5@*&e  (: 7 $ r t@P PNɋ rv(&1ɋ     n rf rvDB9ɋf  disk offset J7H tape offset 070 count  T      0 Wp `@ illegal digit f-  ^ e*ȋ5 5&D9ȋ5@*&e  (: 7 . r f rv!FDɋ(&1ɋ     n rf rvDB9ɋ! "W N, p=    @ #D  D ҃TP  B ы e@W 0 ,"& 7   0ߋp@E A Ze      |@7x@ eE "  r-lx  Pf eP5Ћ 4R`ȋ  `e `R7  n rf rvDB9ɋ & 'p' for rp; 'k' for rk  k` pD7b disk offset J7D tape offset 0 b  count  H    0 Wp `@ illegal digit 5PߋRTV`RߋR R tape error T `R`Rl hf \r f rv!r t@P ɋ  disk error  R7  n rf rvDB9ɋ "&*.26:>BFJNRVZ^bfjnrvz~_ _~_Z _p _  "&*.26:>Bp < z~&~&~zp ~~~  \ pw RB @z POWER FAILED wm &tv&e&  ֥  f&f&%NeF5x E:]440x x95 x*n hb ~w `w P jw w d7 w o w  \5xw z x"ePC=GOOD DATA= BAD DATA=m m\  A h5zE    B C ~EBaC C  C Ԝ  MM p @ B ew J @ B @ B @ B  RZ % 7*  w LOADER IS RESTORED 01234567LAST MEMORY ADDRESS IS 000000 @ nw ,N  x@   7 5x" zw F   e@ .w w  ~ e @  E e C e  @  @ e  B   %F    %  "     %     %@ T \ & b@  @&  @& @2& @ E&  "_t@w  _te e Ux&  &  w | _@F dEFx _  <@Exw *@ _tmmUx&  &  &  &  @%  w @_d@Ex     4    F e @$   z7   @@ %w W_w Yߋt" & w7 @B7 5x zw |   7 w nr   Zw X   w B w 6  m  m : r 6  h   N x| 0  ^ F x >P5w w 0"4 T ZVxw \    . N xߋp r r   H x 6 7 d ` H x@w w w@ w p lpw ^ \ %  %  ~ ZEU  0U@p   @BeR   C "( %D  BcJ e   7w w %zet rmmw X  L   : r I PARITY ERROR  LN@ P   ~  z e~ zz@~z zU " 8    f e @z@ee~z E @ E RRRRRRRR    6 l@  @  & @  & @  & @  & @ ,  ń R R R R    C  @ C  555 t l f7L  :@ @ Z  &  &  &  & @ @ 5@x @ @  . & Z@ b  & J@ r @ @  B5@x n    Hw  @ @       @ @ &  & ~  @  ~ քR R  @  F R &        JJJJJJJJRJJJJJJJJR @   | ~@ & V & J & > & 2  5@x r   ߋp—rE¥\Xw N    ¥ w 270 ew E D D D PE5x]]x@5x7 TO RESTORE LOADERS START AT 204 ENABLE PARITY? 1/0=YES/NO STARTING BANK #(8)? # OF 4K BANKS TO TEST(8)? PATTERN #? ? TYPE CONSTANT INPUT # OF 256. WORD BLOCKS TO TEST INSTEAD OF TYPE ADDRESS PROGRAM HAS BEEN RELOCATED,TO RESTORE START AT *DZQMB DONE!E7w P@Ex  ~_~ OF 256. WORD BLOCF TYPE ADDRESS PROGRAM HAS BEEN RELOCATED,TO RESTORE START AT *DZQMB DONE!E7w P@Ex  ~_~ OF 256. WORD BLOCp ready drive 0 and type y & %y  n ȋ e  rkf: error E7w P@Ex  ~_~ OF 256. WORD BLOC ! "W N  @ &   / e&7 J  j De Ԥ!@eW  8m RW et ZEWue T!eD @5 &     7 = ߋpH@E A Ze      @7@ eE "   r t@P ljɋ@Ex  ~_~ OF 256. WORD BLOC ! "W N  @ &   / e&7 J  j De Ԥ!@eW  8m RW et ZEWue T!eD @5 &     7 = ߋpH@E A Ze      @7@ eE "   r f rv!b`ɋx  ~_~ OF 256. WORD BLOC! "W N, R=    @ #D  D ҃TP  B ы e@W 0 ,"& 7   0ߋp@E A Ze      |@7x@ eE "  ɋ -lɋ e-RNHɋ ^?   r f rv!b`ɋx  ~_~ OF 256. WORD BLOC> w64 ready drive 0 and type y & %y >   > >   n F 76A 7(A B7A7H777777 7 7 7 7 77A7A 7A  7 7    A7  tw  v ^7x P 7j  ` :wX  0 7H 7> 74 7( 7 7   D#9> !B ' !"> j   R \ tcf: error &>$ >   55 eE > A A E]>E EP E?PB El  disk offset J7N tape offset 076 count  T      0 Wp `@ illegal digit lr-l  P eP5Ћ 4R`ȋ  `e `R7    0 rf rv@>1ɋD  disk offset J7& tape offset 07 count  T      0 Wp `@ illegal digit Dr-l  P eP5Ћ 4R`ȋ  `e `R7 $ r t@P hfɋ rv@>1ɋN  disk offset J70 tape offset 07 count  T      0 Wp `@ illegal digit Nr-l  P eP5Ћ 4R`ȋ  `e `R7 . r f rv!^\ɋ@>1ɋ!  "W N  f kr pX7 p&B :  /B e&7 `   Ce Ԥ!e  N   " et ZEWue T!e 5 &     f r f rvr t@P ! ɋp ȋ?E A Ze   ?    7?white: schulten black: kieseritzky event: breslau, 1859 1. p-k4 p-k4 2. p-kb4 pxp 3. b-b4 q-r5+ 4. k-b1 p-qn4 5. bxp n-kb3 6. n-qb3 n-n5 7. n-r3 n-qb3 8. n-q5 n-q5 9. nxp+ k-q1 10. nxr p-b6 11. p-q3 p-b3 12. b-qb4 p-q4 13. bxp b-q3 14. q-k1 pxp+ 15. kxp qxn+ 16. kxq n-k6+ 17. k-r4 n-b6+ 18. k-r5 b-n5++ rxp 20. r-k1 r/1-k1 21. b-b3 rxb 22. rxr rxr 23. kxr qxp+ -n1 pxb 24. q-n4 r-r5 25. qxp nxr 26. p-kr3 rxp 27. k-r2 nxp 28. r-k1 rxr 29. q-q8+ b-b1 30. nxr b-q4 31. n-b3 n-k5 32. q-n8 p-qn4 :V & 6 % w @ @m 5 0W-)5 @ :@mȋ Ne@ &< @ :@mAAAm e@ :N@ &8 o %wffww w"f@wwww7F@& HADCBFHLUYbf-sp/lib/npr-lp/lib/lpr-mh/lib/dprcan't start daemon BCDEFGHIJKR & 6 % w  7$eW-buW-[@ 5N@+U$<U$5U|$.Un$'U`$ U R$a  xvhZw-$w $ e###W-@+ f  7## N _,e W-N ##5 w-  5v#@ p"@  u- @ 5@u @)@2#8#w-.#  Rw"#w#w#wm#  4N"@e& %"% Z w w | " 7 " %% %wh w V f n%@& n% w. w  @A=H"9@N Z5 5 W- 5 u-N@ @m& 2 @e@-  umw w ~ @j f n%l  f n%^ N U f n%G N  @t 3 fE n%  @t&E n% H >Zv 2w w z  <5W-  "5W-5 @t@]wF w 4 -v v "` %7^ Z 7 L P L -F @ 7 > 2 . "Ew w EW-W- W-\  N ,\ @0 n \ t ?   > * 4\HwT w B @-Nefff& e& n%Nf& n%5% NeW Ne0 ww uw-  ww u@ @@e55 @ @b @@.  5 5 @@%@@m5W-0W-9 AwpXAmeu 5 @@@@m5W-0W-9 AwpAmeu @ AwpAmu5 5 @ ew- 5  @-e-  ft :%w-tw-n %ww N 55 @ 5N W- ww @E_ @E  _  _ _6 4~6@E _ " _ & _ * _ . _ 2 _ 6 _ _ @HPX`hp@E?J: _ > _ D _ H _ L _ P _ T _ X _ \ _ ` _ d _ h _ l _ p _ t _ z _  _  _ _R .H R @E _ _t \ t @E  _  _ _ ~ @E _  _  _  _  _ !_ !_ _    x _  !_ !_ !_ !_ !_ "!_ @E&!_ *!_ .!_ 2!_ 8!_ _ B pJ rR tZ vb x _ @E*"_ D"_ J"_ @E      N"`"n"|"""_ ww w De   % w7 7 ׯ-  ,%7  .% l B J d o f e c s l ӕ- 6 r f e0 $HC~ fWtE Ee0     `w  Ο      w7   0  Wp `e0[eӕ?f@)wwf@ TLw8w (%@w %-2w .%@7 wfww %7 wf@wxwt"wwf@w\wX"wz w|B@$Y r Cd$Yfw w"w"w&@&HF7NFfA7"  fA & 9 &fA @e&7w@"6rw6r@cannot open %s jsrsobbrbnebeqbgebltbgtblejmpswabclrcomincdecnegadcsbctstrorrolasraslmarkmfpimtpisxt @ 2   @ *   " @    @@   flagrtssplhaltwaitrtibptiotrsetrttmov cmpbitbicbisaddmuldivashashcxorbplbmibhiblosbvcbvsbhisbloemtsys clrbcombincbdecbnegbadcbsbcbtstbrorbrolbasrbaslbmfpdmfpd " : R @ @* B Z j @ 2 @J b r movbcmpbbitbbicbbisbsub ( P  0 `  8 p  0 @???w w&w @w 68 & 6 % w  /@-)e@c  x F  >  >  6  , @ȋ     ef  7    %-- - 1   v% v%- v%xn v% j& %5=  >AWp N .72AWp N$" %   f 6e 7 5 _ 5 _ ׯ_a5 @mAmH W-0E5  j  T , H" K 8 J,5 V ] @mR  d  e  u- ww 5 @A1, Awp@w@A1, 5 W-@@mAAm @@mAAm  w d 10j  5 @tEe0m  @t5 W-ww ~wDe   % ~w7 7 ׯ-  L 7  .< eB J@doxfenc|sLlr ӕ- R r f e0 @ >B ҋ D~8p t  ӕ0 $f v Le0 9e  7we&  m  ~~  ~  ~~ w|7 ~ t p0   \Wp `e0[eӕ?fB ,8P . ( @f    7 x  -f@w f@)wwfw^wZ~ wrwvw xw twpAupNNmf b w^w LH@@5 _ fA rBpEu@@`55DCN&  f& %5 2`5!-`f  $`f& %`Df %5 5!&   5!%@@AA Nf` b u_nNf b @`5_nf %Cww DCԒ ww DCB5ҒS wf@wlwh wzw~fXTwmN w\Bwm<wVfw, w:w w6f@ww  w wf@7"F@& HADCBF6rw6r@TrrrZrrrrrrNrnrfrr`a.outcannot open input bad format no name list %c UATDBCuatdbc%.8s %c%c  J & 6 % w zuW-  % @55 @&   % E%@p @&   % l@55 @ ȋ ! % 4}@ / & % @ / = %  W._%T_  $ f  _E%@5t @ A H@/@55 @ /u@ A Ht $ f  f-- z %  E  E w=#Ef 4% v55  b5W- W-y dN   % BNf P j 05   %  Ne @-8@e55@ A Hu@ A H ff e % $5  % f  \N   % :ww fe %ww  fe& p%% w@w ~w|Der  l % wd7 X7 XׯN- F DL 7 < .< eB Jd$ox`fnec sl|r ӕ- R r f e0 @ > ҋ D~8 ӕ0 $f v Le0 9e`Z RL 7<we&  m   ~    ~ w|7   0   Wp `e0[eӕ?fw@e7wfwv wxf/wnfwdfww wB wDf@ww ww"f@w  w fw`w\ w wfwF w wf D& w }wf@w w wwf@Af w,\w"Ve"w"Lew"B@lw":Alew- &@t`e  %ewV7F@& HADCBFUsage: mv name1 name2 Source file non-existent Directory target exists. ??? Directory rename only Directory rename only values of B will give rise to dom! Files are identical. %s: %o mode Cannot remove target file. Try again. /bin/cpcpno cp ? Cannot unlink source file.  7 @D /ѕ/ѕ.  D E#6'F$Ct www ѕ.  @77 Ћ . ?  ,  , &   p ww DC : e`m e rfww p@&f %h r<R r< r<R r< rWtC` re rw F   ! 7  %n     ,z  7 N ww ԔAA WpCeԔԔԔ BeWpCeԔԔԔ&  ed&  ed&  ed&  e@ &  ww A r nwmw D W- A r  r e0@ԕ A r e0@wfw * 5 ' Dԋ   r e0@  r  %@`LX` %6w*@ea Nef  %@w ~w Dez  t  % 8w7 ` 7 ` ׯV - N L w@ 7 B  .tw6 e8B J  ӕ-ׯ d   z r f e0&   ԕ- \  vA W   ~e0fv  @ >  ҋ D~8dh b ӕ0 $f v Le0 9e. (    7 we&  m   8~  8  8~ wB7  0   Wp `e0fwZAlQ  OfA  ^ y   F y @0fA  @9 fA @e&7w7@rwH7 fAW @w f175 e wxx 5w7L7H7D7@7<7874707,7(7$7 77777 777f&$ &  f BRfw~wP f@w: fwww@& BFf@eӕ?fwZJA 7 fAW,f B@ 8 @&61fA   @ @e71@ 1w@f   7  7 7 ffwrwnwf ,P v p @f T 7B 80-*"f@wwwHf@www& fwww 7Ff@  x )- @ $$ttyЋ7l@ b6rwR6r@f@  P`Hm` /tmp/maXXXXX/tmp/mbXXXXX/etc]^_WXYZ[`B & 6 %  w  b b% %@- Nf , &  7H %x %x0   5&0! &N ҥ "ff %f %% VE  3!ff %w  & E A 8 z ^ y% %x   7 6 F @%y     1  7 =  w, w  7 7 Ne  Ne @fG  % 8  8 >  eN N  :w w F ~N&  R&    &4 NY   %x :l ,x    w( w   f &  8  f &  8  ,  f l w  & \  8  B . 0w X   &   7  &  %w, w     w %`Ԑ %  7 d7 d 7 d 7 d7 d7 d7w D̋w ̥:w p    wbw RDCԢӋwF w 2Db Dbw w  B 5   - 9 Wp @@`e0  ww N V Lww DeL@4R &   pw/, J, K t5 t5N 2 5N 2 5  /utmpWho are you? .mailSave?.mailmboxSaved mail in 'mbox' .mail.mailNo mail. From %s %s/.mailCan't send to %s. dead.letterLetter saved in 'dead.letter' dead.letter/etc/passwdPFM:/ESTEDTDay Mon 00 00:00:00 1900 SunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDec/z d. o( xj fx e c s l u r0 /dev e e (w w C%_H " !f H Ĝ !ĜEB$& L B$  5`E&E %&  e t-\! ee %e ! $!&  ! 5!! w w - w  &  %7 5 5 5 ( %: 0 @@mH % AWp Ameu&" 5%  ! "W N  @ &   / e&7 J  j De Ԥ!@eW  8m RW et ZEWue T!eD @5 &     7 = ߋpH@E A Ze      @7@ eE "     n rf rvDB9ɋ ! "W N  @ &   / e&7 J  j De Ԥ!@eW  8m RW et ZEWue T!eD @5 &     7 = ߋpH@E A Ze      @7@ eE "   r f rv!b`ɋ ! "W N  @ &   / e&7 J  j De Ԥ!@eW  8m RW et ZEWue T!eD @5 &     7 = ߋpH@E A Ze      @7@ eE "   r t@P ljɋU d89FPVop  %&'()*+,-./0123456789:;<=>@ABCDEFGHIJKLMNOPQRSTYZ[\]^_`bdfhjklnopqyw  fb W m 7XYZ[\) gW =]^ N p_` ] 䰶0c) W) Wfim m  lorua) 0W =dg  jmpsm l4m (vm m zm }m }}m m Rm m Fm 5m m m m m m 5m 5 )m | - ѷm  зm  зm  з m l Lش m +  z 0촁cy| , з - ѷ m  ѷ  ,l rᴁ .l ۴m  з -l )ᴁ=m 3l ഁ m Ck 崁u m k i崁m l Aݴm Ll ഑m k 1崁 m )k {崑/m l ޴ m k Q崁Sm <k 崁h m l ܴqm k G崑zm k :崁2 m l jⴑ  / "%m k Z崑"m l ߴm l ߴ$,m m h/Om l Vm m ^adm l gjmm l _۴* Y\_behm l ۴knZ]`m l P۴Tcm l ڴ qtwm l ۴z}m k 崑tm k m l Kڴ(m k 洁m k 崑m |k 崁=m l tm k 洁{m k 崑 m l 6ڴm k 崁m k 崁m k 崑2m \l ٴm k 崑m rk F0m mm m 0m 8(+.m 4m 4Pm 6m , # @&  @)k  N, / //k ) rX00k  N3m `6m g6k  9<?Bm 6J TE N \1m 5m } 4m 5 7l  :m 5m  =@CF , BcP258 J b;>Am -7m DGm m H  Km m `RUX[m  m  ;^m  JMPSVm +m +VYm ^0m !4 m #m "m m @m m  S H m m  m m 5m 6$m Wm Wm R!m R!km m m 4m 4 m I#m I#&m #m w"fm [m [6)m m &79m ^0m `cfRm m TUm )m )5Xm Qm Qp|m ]0m m rm r m 8m 8. m :m : m  m *m * m m   m )m )m 4m ,m m |m 5m m 0m (m P m P m  m  m ^5m bm -#m  d m m w7m m m  m m m 5m m m >m m $m 4m ; m 87m 8r m ,m ,  m 2m 6m m m zm z|m p5m q  #&m Pm P8 !m #m $m F3m 'm m 8, Um D 69<?@Cm m Fm m 2I m yEm 3m YHKNQTm m WX[m Gm G^am ^-m dm m gjm  зmYm wm w\_m Xm Xbm Sm Seh .l Jtk 5m Pym 7m nL"m /m m 5m lm 5m 5S l l (m l ش& il <m m Fl k ,洁Tm 5m 5p U UZ  ) UV >l  =j+m m 03 p B6m m .@C k /Fm m xJMPSVm !m !Y\m m _ L p-` _ 0c X 䰴bm 4m 4jem ,m f   q{ [   -y g m m X  X w pm &m & U m L4m Om m Z"m # q m m  O#m _"m _"@Cm m RF 5 p~m m |m 5m 5|m m ;0 { %m m T m m `k  ܲm 4m 4p) GW =m !m !@m !m !m m /    m 尶Z"m #m #" = pF%m m k  NB m -#m F&#m m 2m m  58;m 6m >*-m Ym Yz0m 8 m 8 PJMPm m SVBE) }V <DHKm m nNQTm Bm B@W) W =bm m lopm 5m sJ T ЫDBvm #m #!m "m ") R ϫm 5m  i m 5m C 0m i m i m  խBm `7) Tm m  m m 4m x+m pm  խ:m r7m m m m m  pm d5m )I    ) U t! $ ' *  s 尴-  c 尴   "   m  m 2  n  f   % m @6* ib. ( m m hE 1  q 尴)4 7  d 尴h: l   4    m #m " e  %  m , - l l  m m + m ##m "#  m m  m m + ) 3V " l ɚ\q  qE  @{ m 5m 5  ~ j m  ; 7p m m  m 5m 5 m 4m 4 g   v m 5m 5    m f,m ] m !m R/ m {m {D m !m  # m E6 .&  m m 6U m T0m ;P m O0m f i l o m k 洁Bp s m #k 洁{v y m lk 崁 |    겴N q t w z m 5m 5^} m 5m 5 ) 1P  m 4m 4 m 5m 5r P P  ) 1P  m _5m 4f ) 1P  m 5m 5 m  -` m M6P ...ebinddevcetcblibamnt`tmp_usra.outrkunixrunrpunixhpunix?unixgorpw w x@ r E  y    w@  @Ջ E 7vf  r f  e0 t f2 w*Wp3e @7EA pw0w Tic-Tac-Toe w Accumulated knowledge? w b@  72 2w 'bits' of knowledge w rw new game ~s |s@ XO@C W vW yW | W | w "?  D 1 OsL ( Fsw 4L 7 L7 Js̋̕w Y w <  7 77  !|߇ (-~7ȕww hIllegal move ww NYou win w >I concede ~ www I win w  f Wqs`G~@  JsЋ  |w Draw w4J  ` ` W b @s b @B   w, @ w 0 'bits' returned bw/usr/games/ttt.kthe of and to a in that is was he for it with as his on be at by i this had not are but from or have an they which one you were her all she there would their we him been has when who will more no if out so said what up its about into than them can only other new some could time these two may then do first any my now such like our over man me even most made after also did many before must through back years where much your way well down should because each just those people mr how too little state good very make world still own see men work long get here between both life being under never day same another know while last might us great old year off come since against go came right used take three Albania:Tirana|Tirane" Andorra:Andorra la V[ell|iej]a Austria:Vienna|Wien Belgium:Brussel[s|]|Bruxelles Bulgaria:Sofi[a|ya] Czechoslovakia:Prague|Praha Denmark:Copenhagen|K[o|o/]benhavn East Germany:Berlin England|United Kingdom|Great Britain|UK:London Finland:Helsinki France:Paris Greece:Athens Hungary:Budapest Iceland:Reykjavik Ireland|Eire:Dublin Italy:Rom[e|a] Liechtenstein:Vaduz Luxembourg:Luxembourg Malta:Valletta Monaco:Monte Carlo Netherlands|Holland:The Hague|'sGravenhage|den Haag Norway:Oslo Poland:Wars[aw|zawa] Portugal:Lisbo[n|a] R[u|o]mania:Bucharest|Bucuresti San Marino:San Marino Spain:Madrid Sweden:Stockholm Switzerland:Bern|Berne Turkey:Ankara USSR|Russia:Mos[cow|kva] [West |]Germany:Bonn Yugoslavia:Belgrade|Beograd                            %% %ׯ%-% & Input file. 7*0 0t7 ', $$7h* wr* l w`* Z w) F  6w$* w"* w* ~  w) l wz, "'_) $<  yw -&V*& Ct+>6q@H0Z+< F630E6;p@?ZG;@c?GG?%/;.z@<0r?Q?K?3H?8CB}BrBwB>0<;;;BAAAN9 ?968GAHIjH@!0VHBG?@I/H?cHIE??>Ev/0$HhHEuE>?=>[EEE>EQG3?EkE+>?<C)HGD!EfEu?TEE:GG;n6WG_r (  & &%W!,_ @ T wt C,  rd X N nwF _  % Z W!,s(w   *@ f 4 *  V N &p_:%**70% pw4wSymbol table overflow. J(00 e F*7 & $ W!,SN'_    *$$ ** x  H  lr_z$**p$ H    <      3 3 3 4 5 4 7 4 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 6 4 5 4 9 1 1 1 1 2 2 2 2 3 3 3 3 r_ w     *3Af   $f   &   ^@      :    r # _    _ F _    pd ` _ Z  W!,:%w *;fA@@ fe   xf f 0    _ @  pwV"**7"_& &e   f " d_    _  _     b( & 6  w  %_@5- @s e @5- @l e %_@5- @ 7N f  _@5f  _%  p h%      P H ^ ^  & %@5S%P%%  f@&l 4e   4  X& %& 4e 4 N  pd ` _ 2  *A   @  f   \ w|   wj    *p*!w!A f x n   D_L$_ w T_  7f# 6Z#   w D  4#   _ f  _ | 7# B h l7" C l -"""" %%m"" "  m"  0 Pw("f Z  | lf d N  %$-  *@)@   @)@ w Type y to move first: w  2 Iw z 1111 2222 3333 4444 1234 1234 1234 1234 1 ---- ---- ---- ---- 2 ---- ---- ---- ---- 3 ---- ---- ---- ---- 4 ---- ---- ---- ----? ׭ yw .L@@f@f@f  x w You win  JZ X "w jw  D w I have a force win: "7 e w 2 W  &@  W   w  xW   #@ w o # w  4  N 4  w.w fe %ww ~wDe   % w7 7 ׯ-  (w7  .weB J ӕ- R r f e0 @ >2 ҋ D~8 ӕ0 $f v Le0 9e  7we&  m  ~    ~ w7 n d `0   LWp `e0eӕ?f@)" N H B : "  " "  w _ f  wZf ^ b7!  F J7! $!m!$!   C   j !m$  * w  h b 8 _ f ,  _ f  7.!   7! 7 ! !!! &v   N  f    Rf   6N  ! N   w J _ f` \ QED        9y # * W w  fw  @1  &@1 U &@1  U W   w LIllegal move &  w of w  e1e1e1@  &w |vxw rjhfdZ``mRmP w $Dw  w. f  w&  U%&tE7 E7E7f @@   w^fwJA 7 fAW,f B@ 8 @&61fA   @ @e7p1@ 1wf@wNwJwf@f& CB  ԕ-   e0fv   vA W  ~@& HADCBF7F%s %s differ: char %s, line %s %5s %3o %3o arg count cannot open %s EOF on %s dox<fJecslXr VR  <D   w  _ Z@@ _  _ 7"f ~ wzv  h < ^ ~ wV 6 :  " _     j B _ C Z _  7l B f Z  H& BWpdewp8B 0 2-&"$"  v    _7  f  \ V v  p w _  "7 BB   _ ! ~  f!   w@  A Ze 7  Ef `C  r CpDD`@ "`  "w &D D w D&`w f @  f mWp/w@Ef L  @@f@f@fxe?e CD  7 ;L@@f@f@fx @ & &w tw `  ; <     L@@f@f@fx D  +  &w ( ( + , V  w& 8  ]   [  w w _ f  ~q, ej-f*\   7F w Nesting depth. e -*? 7  D ! $7 ` &    \ w w* 9w`        w  w w w" w w  |  x w Fatal error 'T*w7 7  bf 6 ׭((.((((((((((((((w ~ &  Lffflp w ,`1 @  p eW   w  W   B   "w  2 w  w  w x/dev/ttyc/usr/bin/dds        behknqtwx{~y|02׭9.0 -c    w h N  N  7z׭tA ׭lFd7׭Z\ ׭L. , &7 $72  .    f p Cn f ` f P J D E7   * Ef  E7~ r7 lf ZwW!,_ wL W!, :8A ^fW!, ^W!,* +0* 7'  _&f&&    c U  7w'_ ^ b9_ f N ,D< . 27 &.    f-  N & _ . V _ _ _wp8 7r77 p$ w7  zN B   p T X7^   < :< 8 ~  ( N  TN~ ( -⇁ ` N " Hq,w  f1N1N1N1f&q,@ @  4 q,w q,q f&CC  n F lI 9 Blqqq&@1 7 & 2   (  "  % e &e w --p-@11   & *    -   !rectoryInvalid argumentFile table overflowToo many open filesNot a typewriterText file busyFile too largeNo space left on deviceIllegal seekRead-only file systemToo many linksBroken Pipe$ L 7 8  f    N 7| HN  f    Z N   H  , \N    tf  r e0 Ne0  > 7 ~v7r 7 h b   P N 7 @782r 00h &   _ r .&  v& l   C : B xv t 1  w0Out of space. -p- &    p-r@@ @l12& b , -1 p- f&7  -`CM J- ! e <$L$\$m ),  B,4l$4  -0-  2  | A  f -8 ># wOut of space - too big a block.  fJ -m -bJw e ew"  D    w r2  2--  %F2^   Wq 0W 3E`e@t7 &&@tEe B &error /dev/junk_  Fw \ -1f   w m &&  0 rx wp7v v 2 P T   z !@ pv  x e0  w    ' ( 7  f0      0  6 0  -   f  w e0 9eN N  h_ "  * `_ . 7w ' d w7j-mn ~-$ 7d e\ e7  7 e 2 T$%wout of space - no more block storage &N ~  @ @j-J "eeB -J,"eJ,eB,B,@@& Z ,$e - &f-7de0 10 -  -Bw>1 11  p-$e11-A 11Ae11-ez-'wUW!@-wOut of pushdown. W!, A 0? !% *+-./0123456789:; <T =h > ?ABCDEF I^ KnL'OP*QhS V2 XdZ [ ^_cDdf i kl&ozpqs v2 xdz  @- ׭q&&f  f  7  !  @am7  dded x    q  v&&(/bin/sh-c! w _ Xf  v ~  2 x 7 & b pd`   pd7`   e7    7   z      ` >  e B  C  ` |  e   fbb ^-`N7 LFH-@FF 7r0wp*w*. R    8wFT*( ) ? " (0)"0 not D ! ww$w,!w"rwt7*7 ,r7 w47--&m- e7@ ]]7`7@e7w ~7 ~7 v0 0!/!,`h^B t7eE7&t7t7E7.7  p ,    0w b? w XFile not found. d ׭ ԝ A  y  c < Lqf& 7  & eddd7    t T X T cq T 2 6qf& 7     8 vv  Jw j    Hv  w <l " v7    . m6  pc ` rd@    c   t-  -  | &&BBin switch. `+l7 j7 B7 d7 b 0  9Y a zw A Zfw L ,"+v-v ._^*l   7 ]w j 7-+m+     0 p P` 0 9 . wn  JF   Fԋ.09AZ _az  F ;wԋw7ww ` /\? 0^=:!D'h"t$&%`@E A 4*A C  5WpdD `  $  TBe  z ~!d d  z f C f  C jf   R   fB   | v  j ^ Xf& 2vw7 0  w t |  ww 7   w F N R ww w l_7   7   W!  Wqd ` z Dqd  & 6  w  % B @  ʥ0ʥ7 B te@P ʋ @m& d   @m D-N ww - FN *f % % *& % %ww Dԋ@ w|w j~wlDeb  \ % wL7 H7 Hׯ>- 6 4(w(7 * .weB J ӕ- R r f e0 @ @><8*,.60FHPX`hpb b "b&b*b.b2b6b 6D `  w     D 8 v@ 7pw J7 t w H  6 tX 7 hL w &7 V: w 7 Dw  Tw .   8m 6 w: $ 5 w rh  7  w &   - jE     w .\ v e0 ve0 `D D sN  pd `pd `B (eB &v@  r     &  pc rd   | &    ed~ z r n  ` V q,w FD >0 2"  f  7  Em7  dd     8 <q    q  ^ ~x& Tf > ҋ D~8,0 ӕ0 $f v Le0 9etn f` 7Pwe&  m4 2 ~    ~ w7   0   Wp `e0eӕ?f ,P   @f  7 4zr-ldfww:wN f@ww@w*f@@& HADCBF7Farg count bad mode ve0 w  XZ 7& DFN ,EBw r  E  m  f - (  r f e0 -. v F$ $ $$ w Q$B 쇷 ^7 lf w!, A  C W  CBe @w 2 7 x  -"7 e7 7 x em 7 h m^ m\ em  !0  w   @f  .f  7 >  4  3  v    2v  B & v   ! Pw  \ N v  D  6 \ V@@@@ ,7F " 772   q,@W -W 1f&@l1 11 1   t qq,Æ @f&q,@ @ Unknown error: doxJfXecslfr+;GYi{ 1BQ`x!Error 0Not super-userNo such file or directoryNo such processInterrupted system callI/O errorNo such device or addressArg list too longExec format errorBad file numberNo childrenNo more processesNot enough corePermission deniedError 14Block device requiredMount device busyFile existsCross-device linkNo such deviceNot a directoryIs a di|@  Ew w w *w (w )w bw ,@w "  -7  w  䇅EE @ Ex  T I PF  6 : w )+9  w -( j ,   ~ L 5  5 w $ L  e@` 8 E 7 |r0r1r2r3r4r5sppcff R # @  , w -w + Aewx w 4x0  &4 @D@$f p^evmov vcmp0vbit@vbicPvbis`vaddvsu? clr?@ com? inc? dec? neg?@ adc? sbc? tst? ror?@ rol? asr? asl?@jmp?swab?@ldfps?stfps?stst?clrf?@tstf?absf?negf? sxt? mtpi?mtpd?@ mfpi?@mfpdpLmulrLdivtLashvLashc F%B7 7 el h   h%n%  N N  N<   <  wh vw Fp@m-f ^7\w8w &NupwFD  N w w $ʋeWp D%dʋe % `wfwBw>fwf@w&w"lw f@Aw| f BRf@wwrwBf@w N  ww DeL@4 w w lw w >cw vw &w w w w dw w cw w no archive file w cannot create archive file w" W, w w a0؇77 w Tw `w  w Rw w Lxw w .w ,w  w w w w  W w w  -- not found /tmp/vtmambrbnebeqbgebltbgtblebplbmibhiblosbvcbvsbhisblohaltwaitrtiiotresetHmulfHmodfHaddfHmovfHsubfHcmpfpmovfHdivfpmoveipmovfipmovfoHmovieHmovifHmovofcfccsetfseti setd setljsrxxor(rts4cf &   w/%J %K  t5p t5rN  5N  5 2 B-B-%B-B-% &    w4w "DC%: he`m e rfww p@&f %JB r<R r< r<R r< rWtC` re rwF h  h!7 h%n  x  0!x 7 Bww ԔAA WpCeԔԔ/* * Text structure. * One allocated per pure * procedure on swap device. * Manipulated by text.c */ struct text { int x_daddr; /* disk address of segment */ int x_caddr; /* core address, if loaded */ int x_size; /* size (*64) */ int *x_iptr; /* inode of prototype */ char x_count; /* reference count */ char x_ccount; /* number of loaded references */ } text[NTEXT]; lg4sflghemtxsys? \mark~sobbsplfoctE  E8& E  tw r7`m7 w x7`  `w r7`z Nt hE  2E5U mt t d &w r7`  H X5 5@ X nzvcEE E X E    w R;eew zz :@FLRX^djpvԔ BeWpCeԔԔԔ&  ed&  ed&  ed&  e@ &  wxw fA r nw^mw FD % A r  r e0@ԕ A r e0@w@& HADCBF7LF6rwH6r@f@  P`Hm` bad conversion no permission /usr/adm/wtmpPFM:/ESTEDTDay Mon 00 00:00:00 1900 SunMonTueWedThuFriSatJanFebMarAprMayJunJulAug/* * Definition of the unix super block. * The root super block is allocated and * read in iinit/alloc.c. Subsequently * a super block is allocated and read * with each mount (smount/sys3.c) and * released with unmount (sumount/sys3.c). * A disk block is ripped off for storage. * See alloc.c for general alloc/free * routines for free list and I list. */ struct filsys { int s_isize; /* size in blocks of I list */ int s_fsize; /* size in blocks of entire volume */ int s_nfree; /* number of in cor~ "(2  ^corea.out?0HangupInterruptQuitIllegal instructionTrace/BPTIOTEMTFP exceptionKilledBus errorSegmentation violationBad system call?15?16?17sp ps pc r0 r1 r2 r3 r4 r5 releexitforkreadwriteopenclosewaitcreatlinkunlinkexecchdirtimemakdirchmodchownbreakstatseektellmountumountsetuidgetuidstimequitintrfstaSepOctNovDece free blocks (0-100) */ int s_free[100]; /* in core free blocks */ int s_ninode; /* number of in core I nodes (0-100) */ int s_inode[100]; /* in core free I nodes */ char s_flock; /* lock during free list manipulation */ char s_ilock; /* lock during I list manipulation */ char s_fmod; /* super block modified flag */ char s_ronly; /* mounted read-only flag */ int s_time[2]; /* current date of last update */ int pad[50]; }; temtsmdatesttygttyilginshogsleepsynckillswitchesboot/2*D! w ~chown uid f1 ... eCע0ע9w 7"w w BCan't open /etc/uids w w Who?  : w  ʋw :w VNw ww(77 Ћ w ?  }  0 Wp ` /etc/passwdfA7~ fA @e7x1@  1 @ &@wLՋ@@ 7B Ewww &w ~U/* * Location of the users' stored * registers relative to R0. * Usage is u.u_ar0[XX]. */ #define R0 (0) #define R1 (-2) #define R2 (-9) #define R3 (-8) #define R4 (-7) #define R5 (-6) #define R6 (-3) #define R7 (1) #define RPS (2) #define TBIT 020 /* PS trace bit */  & 6  bw P%  @% b @&  5  @% b:f  @&  !E%@@Ҕ/ҥ/ @@&  -@-:  @% bN@&  5&  N:f @%@-   @% b:f %5 bwfwhwdwf@wLw fw6w2  disk offset J7f tape offset 07N count  T 0 *    0 Wp `@ illegal digit -  ^ e*ȋ5 5&D9ȋ5@*&e  (: 7    0 rf rv(&1ɋ/* * Used to dissect integer device code * into major (driver designation) and * minor (driver parameter) parts. */ struct { char d_minor; char d_major; }; /* * Declaration of block device * switch. Each entry (row) is * the only link between the * main unix code and the driver. * The initialization of the * device switches is in the * file conf.c. */ struct bdevsw { int (*d_open)(); int (*d_close)(); int (*d_strategy)(); int *d_tab; } bdevsw[]; /* * Nblkdev is the number of entries * wf@ww$wlfww*wN f@ww0w*f@@& HADCBF7FUsage: cp oldfile newfile Cannot open old file. Copying file to itself. Can't create new file. Read error Write error. -  ɋ Wv  B   J  yru0drx<tpw (bad usage 7w@w Aw H ^ 7(- :w w -- not in archive format ׭z0 06 77w ^cannot open temp file  w  ~zvr E7Nȋ/@ w  Ћa%wwHD7@w (rows) in the block switch. It is * set in binit/bio.c by making * a pass over the switch. * Used in bounds checking on major * device numbers. */ int nblkdev; /* * Character device switch. */ struct cdevsw { int (*d_open)(); int (*d_close)(); int (*d_read)(); int (*d_write)(); int (*d_sgtty)(); } cdevsw[]; /* * Number of character switch entries. * Set by cinit/tty.c */ int nchrdev; 8X & 6  w 5 %e@7 $ 8 % \s0      ( x| ^  HW  58 x}b& f :% f %  x  %  & % %ww p l%_% _ R5%_%_ 65%5 5c%;`  Ne xNe  pe  7  5~w nw w  -- cannot open Pw w -- phase error 4J"wW 7 5 47wW 7 5x&fw w  -- cannot create w  w f@:w  w w  w - -/* * Each buffer in the pool is usually doubly linked into 2 lists: * the device with which it is currently associated (always) * and also on a list of blocks available for allocation * for other use (usually). * The latter list is kept in last-used order, and the two * lists are doubly linked to make it easy to remove * a buffer from one list when it was found by * looking through the other. * A buffer is on the available list, and is liable * to be reassigned to another disk block, if and only * if it is not marked BUSY. When a buffer is busy, the * available-list pointers can be used for other purposes. * Most drivers use the forward ptr as a link in their I/O * active queue. * A buffer header contains all the information required * to perform I/O. * Most of the routines which manipulate these things * are in bio.c. */ struct buf { int b_flags; /* see defines below */ struct buf *b_forw; /* headed by devtab of b_dev */ struct buf *b_back; /* " */ struct buf *av_forw; /* positi7  WpDe Wpet07  %  @ e ww DCL @ tEWt@PUA5UUwVw RDC%FD L EtUA5U8U0w w %F5 U@ 5U BU  e%   e%0ww E 5@ 7 rwnw j bU@& 5@ U L3on on free list, */ struct buf *av_back; /* if not BUSY*/ int b_dev; /* major+minor device name */ int b_wcount; /* transfer count (usu. words) */ char *b_addr; /* low order core address */ char *b_xmem; /* high order core address */ char *b_blkno; /* block # on device */ char b_error; /* returned after I/O */ char *b_resid; /* words not transferred after error */ } buf[NBUF]; /* * Each block device has a devtab, which contains private state stuff * and 2 list heads: the b_forw/b_bact7(@tE7tt  & 55@ EHEww %5- U L 5% zwvw r D5_ 5_ m _ eE5 5 tEB-_ mPtEAm@  _  U@& 5@ U t E4 Wt @`E@`t4`tE4B 4 E 4 4&  <& 5`9L20007X_sleep _spl0 L33~L34;L35L37L38_notavai"LL20008L40~iowaitbprbpL428L20010,~notavaiLbprbpsps_iodone"|~iodone|bprbpL46_mapfree"pL47L45_clrbuf"~clrbufbpcpL52_binit"~binitbpdpibdpL20012L57k list, which is doubly linked * and has all the buffers currently associated with that major * device; and the d_actf/d_actl list, which is private to the * device but in fact is always used for the head and tail * of the I/O queue for the device. * Various routines in bio.c look at b_forw/b_back * (notice they are the same as in the buf structure) * but the rest is private to each device driver. */ struct devtab { char d_active; /* busy flag */ char d_errcnt; /* error count (for recovery) */ 5@ EH 7> j'ww D57wblkdevdevtab88888HXRL200148L60J_devstar"`~devstar`bpdpdevblkdevlochbcom comrbpL62L63_rhstart"~rhstartbpabae dpdevblkdevloccomrbpL65L66L67_maplock _mapallo"~mapallobpabpiaL68lL69L20016L20018>L74`L20020T~mapfreepbpL78_swap"~swapstruct buf *b_forw; /* first buffer for this dev */ struct buf *b_back; /* last buffer for this dev */ struct buf *d_actf; /* head of I/O queue */ struct buf *d_actl; /* tail of I/O queue */ }; /* * This is the head of the queue of available * buffers-- all unused except for the 2 list heads. */ struct buf bfreelist; /* * These flags are kept in b_flags. */ #define B_WRITE 0 /* non-read pseudo-flag */ #define B_READ 01 /* read when I/O occurs */ #define B_DONE 02 /* transaction finished */ #d))(((8I(())(HY8YY)HYcountfpcoreaddrrdflg blknoL80L20022L82L20024L840_bflush"B~bflushBbpdevL86hL20026HL10001XL89xL87|L20028r_physio"~physiostratbpbasenbrw abptsdevL92 L93L10002L94*L20030L10003VL10004Z_lshift L96L20032L98L91~gefine B_ERROR 04 /* transaction aborted */ #define B_BUSY 010 /* not on av_forw/back list */ #define B_PHYS 020 /* Physical IO potentially using UNIBUS map */ #define B_MAP 040 /* This block has the UNIBUS map allocated */ #define B_WANTED 0100 /* issue wakeup when BUSY goes off */ #define B_RELOC 0200 /* no longer used */ #define B_ASYNC 0400 /* don't wait for I/O completion */ #define B_DELWRI 01000 /* don't write till block leaves available list */ ())))(()))8Ii h Hi i Yi h i 8eterrobpabpL990tty.ol (< w Ce & e& e& ww x 7ne 7be 7V ww | E%  fWp %w6& @5 '\ %  %(( 5\( %  %5eD-w BCE% 5 5 %%%  <4%5%A%Ze  5 % %   5 $  ww CDE%5 _% 5  $ _5ҋ !\ $ %a%ze% 5mbio.ol 4 w Nf " 5wU &@t   w B N  N " 5 U &@t  #N  N " 5  U @t  N w w DE & t  5  5 ww D t%% rU ww DU wxw tD5@ 5@^E@V 5  6EH0  H Y   _u "_buf h_bfreeli _bdevsw _nblkdev _cdevsw _nchrdev _canonb _coremap _swapmap _rootdir _cputype _execnt _lbolt _time _tout _callout x_mount _mpid _runin _runout _runrun _curpri _maxmem _lks _rootdev _swapdev _swplo _nswap  $ e & Ze5 E B xʋ=ʊ;tE5%ʋt&e % tE5% U@%  e &U wx5@tE5%% w B nE "Q tE mE@` __  )YHY hy y 9 )YnL63L65L70<L73L75~ttyoutp$actpcrtpcolpctypeL10005HL47L48nL51VL52L53L54zL55L58L66,L688_max L71hL76_ttrstrt"~ttrstrtatptp~ttstartatpaddrctpL82L81>L84&_timeout _ttread"B~ttreadBatptp  !` %&&  eww  ># F 7% &  e Rww 5 5  w ~ fw ` a ZğR NE@ EQ27.7.w$w # <&  %ww ėE5Ue-? ww E5  5 *ww E  y7tj7f wXyIyIIyXY_u "_bdevsw _nblkdev _cdevsw _nchrdev _ka6 _mmread"~mmreadbnoncaddevcsv L1L4_lshift _spl7 L5j_fuibyte _spl0 _passc cret _mmwrite"~mmwritebnoncaddevL8_dpadd L6_cpass L10*_suibyte pc.ol L86|L88b_passc _ttwrite"~ttwriteatptpcL91L90L20015L93L20013_cpass _ttystty"~ttysttyatpavtpvL96L95dc.o.ol p4@xw %FDueCteUA#@II5  &  0tw\w XDue45E w0w yyyyy(9yyyyxy9yxy x( IIyX9IyyyIIIyIyX9yI 9yx( yyyyhyyy9yyy(9y$w  !%Ah U@l vww    h7  Fww ~%v5hUAh    >w:w 6 t *w"w 5l nww %5h!%5hj %UAh ww ~%2 ww 5l%dz( f P * HwDw @d tw0YIYY)XY)YXXH))X)YYYYXhYXx)YXx)IYXXh))_bdevsw _nblkdev _cdevsw _nchrdev _u "_pc11 _pcopeU 4  707  w|w x 7v˕U ^' EE @ ˕/( tUC5U ww 565 & %5 E7E U77! ,!5EU˕Cwz  xߕ  - -؂"" Et5 @PUA e-HH0002L10003L10004_tmintr"~tmintrbpunitL25~L26DL27L29&L31:L34zL33p_tmread"~tmreaddev_tmphys"_physio _tmwrite"~tmwritedev~tmphysunitadev_lshift partab.ol { n"~pcopenflagdevcsv L2<L3L1FL4_lbolt _sleep _pcleade"cret _pcclose"J~pccloseJflagdevL8r_spl4 L9X_getc _spl0 L7v_pcread"z~pcreadzcL16L20001L18L19_passc _pcwrite"~pcwritecL21L20003_pcoutpu"t_cpass _pcstart"~pcstartcL23_pcrint"~pxyyyyyyxyyyyyHyyyyyyyxy_bdevsw _nblkdev _cdevsw _nchrdev _buf h_bfreeli _u _partab#rp.ob.ol 2 $w D5  Ete2@ "U L4      rWtPt r4` vx7r3-, 3-,34  *w&w "$ t&& eww :7 && %5 ߕ  5~ 5~ UcrintL26L25TL280L29L_putc _wakeup _pcpint"X~pcpintXL31p~pcoutputcL34L33L35~pcleadeiL39rf.ol t*w D5 t -U 4  707  ww 8 t&6& ewjw fb$b7X 080& %09 3 U7)7( zww f ew"_tctab _tcper _tcclose"~tcclosedevcsv _bflush cret _tcstrat"~tcstratbpabpL30_mapallo L10000FL4R_iodone L2_spl6 L5fL6nL7|_tcstart"_spl0 ~tcstartbpcomtccmpL9L20001L11L8L12L13_tcintr"L10004L29L30L19H~tcintrbptccmptcdtp77 Nwpw lN  f ewDw @N   f eww B >e `@Et0!2 w##hN<_iodone L1_lrem _ldiv _spl5 L6L5L7L10001L8L9_rpstart"_spl0 cret ~rpstartbpL10 _devstar _rpintr"~rpintrbpctrL11L12r_deverro L13PL14FL16XL17bL20000_rpread"~rpreaddev_rpphys"L19_physio _rpwrite"~rpwritedev e5 5N 5N  r f r tUAWt @Pww  & ~ & & eww (7 & %5 U77 zww f ewtw p f ewV (Xyyyyyy xI(yI yyyyyYIyyyyyIyyyyyL21~rpphyscdev_lshift L24,L23(lp.o.ol o4w 5 L UU@L ^ww  ^7 ww  ^ ww D5%a%z e7 y 7p y ( )'!^ ^ B-8eE7,w5  7  %<5  % 7 7 5  - 7 %P  -  w x yy yyy(yyyyX  _buf h_bfreeli _bdevsw _nblkdev _cdevsw _nchrdev _u "_rktab _rrkbuf _rkstrat"~rkstratbpqcqldabpcsv L2_mapallo L3*L4D_iodone L1r_spl5 L5XL6yyyyyIXiIXiIhI_buf h_bfreeli _bdevsw _nblkdev _cdevsw _nchrdev _u "_tmtab _rtmbuf _t_openf _t_blkno _t_nxrec _tmopen"~tmopenflagdminordevcsv L2L1,cret _tmclose"0~tmclose0flagdminor N5LwZw V %2L F w8w 4%d.  f w`{|}~~ 6"~BYIYYYYYYYYYYYYYYYYYYYYYY`L7n_rkstart"_spl0 cret _rkaddr"v~rkaddrvbpbdmpL9L10_lrem _ldiv ~rkstartbpL11 _devstar _rkintr"~rkintrbpL12hL13T_deverro L14<L20000d_rkread"l~rkreadldev_physio _rkwrite"~rkwritedevtc.ol w N @E0ww D5 %B EdevL5N_tcomman"^~tcomman^unitcomL7rL10000d_lbolt _sleep _tmstrat"~tmstratbpabppL10L11L20002L20004_clrbuf _iodone L9 L13_spl5 L14L15L16_tmstart"_spl0 ~tmstartbpunitcomblknoL18(L10001L17L20L21L20006L23L22L1YYYYYYXYYXXYXX_bdevsw _nblkdev _cdevsw _nchrdev _u "_lp11 _lpopen"~lpopenflagdevcsv L10000L2L1._lpcanon"^cret _lpclose"2~lpclose2flagdev_lpwrite"F~lpwriteFcL5RL20001L_cpass L10002L10003 L16L13L17L15L18L8~L10007L10008$L296L21L23L27"L31~L32B~lpcanon^cc1c2L9L10009L10004L14L7L10005L25_lpoutpu"L33VL35lL20003`_lpstart"~lpstartcL38L20005_getc L37_lpint"~lpintcL260L20004L29*~dhstart8cptpcnchatpspsL31L20013L33nL34_getc L35L36L37_ttrstrt _timeout dhfdm.ol 4"w Dueww wX_partab _bdevsw _nblkdev _cdevsw _nchrdev _dh11 _dmopen"~dmopentpdevcsv cret _dmclose"~dmclose @ 5*H C = 7. U"7 77 & 0 ww N xf$ e 7ww N x f$ e7 ww DB    wZiii8Hy8HL10010L40_wakeup ~lpoutpucL43_sleep _putc _spl4 _spl0 dhdm.ol /w Due@@B5@B`@  &  ww Due5 @@B`@w|w x5@0@Eue\te! 5@B &  B `@w X)Xdevsys.ool w  f&Wp %ww b &Wp  ww @ &Wp  ww  f&Wp %wpw lwV((((II_bdevsw _nblkdev _cdevsw _nchrdev _u "_partab _proc L_syopen"~syopenflagtp8HiHXyyyyyiyyXyyiyyyyyyyy)XiX)_partab _bdevsw _nblkdev _cdevsw _nchrdev _dh11 _ndh11 _dmopen"~dmopentpdevcsv L2,_spl5 L3DL200018_sleep _spl0 cret _dmclose"T~dmcloseTtpdevL5_dmint"~dminttpL7L9_wakeup L10L11devcsv _syttyp"L1"cret _syread"&~syread&tpdevL3D_sywrite"H~sywriteHtpdevL5f_sysgtty"j~sysgttyjflagtpdevL7~syttyptpL10hp.ool MP $w   ww D EteP@ "U L4    rWtPt r4` XZ7TyyXiiiiih(i_buf h_bfreeli _bdevsw _nblkdev _cdevsw _nchrdev _u "_httab _rhtbuf _h_openf _h_blkno _h_nxrec _htopen"~htopenflagunitdevcsv L10000L2 L1B_hcomman"cret _htclose"F~htcloseFflagunitdev_signal _flushtt dh.ool ) "tw %6Due8tU@0 #@ hN  0w|w xDueN  wTw P@te w:w 6@te w w ' #uEue%55 5   ww DueN&  hww D U@0U +t Wt@PU@5 5@3-, 3-,3  ww  t&& eww 775@" & %5p   5 ~ } w U7m7l NwRw NN  f* ew&w "N   f* eww B  e `@Et0!P w%,Qfd,L5x~hcommanunitdevcomL7L10001_lbolt _sleep L9L20002L11L20003L13L20005_htstrat"$~htstrat$bpabppL16`L17ZL20007RL20009L_clrbuf _iodone L15L19n_spl5 L20L21L22_htstart"_spl0 ~htstartbpunitblknoL24L23lL25L20010L1UUU2U ww @ A @@E0 @@  8 e ww  B!aNte5 % e %/2% @@e !U@0@`tQ7Q" = 2Ee %_w IxhIy xIhii0002L27L28LL29,L31:_rhstart _htintr"p~htintrpbpunitL33L34L35L37L40L39 _htread"~htreaddev_htphys"x_physio _htwrite"N~htwriteNdev~htphysxunitadev_lshift hs.ool T4(w D  U 4  707  ww   E(y xy xXy xxy xxy Yy xy _buf h_bfreeli _bdevsw _nblkdev _cdevsw _nchrdev _u "_hp_size#P_hptab _hpbuf _hp_open _hpopen"~hpopencsv L1&cret _hpstrat"*~hpstrat*bpabpp1p2L10000PL4\_iodone L3_lrem _ldiv _spl5 L7L6L8L10001L9L10_hpstart"_spl0 ~hpstartbpL118 &&& ew`w \X$X7N5@  (& % / ) U77 jw w f eww  f ew9yyyyyyyyyyXyyyy_buf h_bfreeli _bdevsy_bdevsw _nblkdev _cdevsw _nchrdev _u "_partab _proc L_dh11 _dh_clis _ndh11#"_dhsar _dhopen"~dhopenflagtpdevcsv L2L1_dhstart"8L3^_dhparam"h_dmopen cret _dhclose"~dhclosetpdev_dmclose _wflusht _dhread"~dhread._rhstart _hpintr"2~hpintr2bpctrL12L13_deverro L14zL15pL20000_hpread"~hpreaddev_hpphys"L18_physio _hpwrite"~hpwritedevL20~hpphyscdev_lshift L23JL22Fht.ool _ w DE% 0   f ww DE4 f f f wvw rDw _nblkdev _cdevsw _nchrdev _u "_hstab _rhsbuf _hsstrat"~hsstratbpabpmblkscsv L2L3*_iodone L1X_spl5 L4>L5FL6T_hsstart"\_spl0 cret ~hsstart\bpaddrL7L8x_rhstart _hsintr"~hsintrbpL9L10_deverro L20000_hsread"~hsreaddev_physio _hswrite"~hswritededev_ttread _dhwrite"~dhwritedev_ttwrite _dhrint"~dhrinttpcL94L10000_wakeup L20002L12*L13&_ttyinpu _dhsgtty">~dhsgtty>avtprdev_ttystty L15d~dhparamhtpatplpr_spl5 L17L16L18L19L20L21L24_spl0 _dhxint"~dhxinttpttybitbar Z5 tE( 5*%@EUEU: *E%@U ww D E e - - U  !55 4  707zn  dw`w \^a tE(%@EUEU:E 5 U7 -- &Y  G &[ < &&& eww O E5@ *5* %vmmain.o w 7 e   % %F %> Wt p 0 eWpWtN    L z R 7HD@ %2f  %`  % M  7 7   & & e&  % ^wZw V%(@%`#`     #&),/25!$'*-036"%(+.1478;>ADGJM9<?BEHKN:=@CFILOPSVY\_beQTWZ]`cfRUX[^adghknqtwz}ilorux{~jmpsv devinoL22tL20005dL24L20011|_iget L26L20018L21L20009L28L20007_iput L30zL20017L20015L35ZL20013L384L34hL31L40 _ifree"~ifreefpdevinoL41~getfsn1n2pdevL20020L45.L10002L47*L48L42@L49%_update" %( %#5 ww %(_N %_N &f  e%_N &f ` &f T ee%_@@m@me-\_ j% e  @teU %z  % e  @teUDm%z   %  Dm% #  @tU"e# jz%z%  mw,w (@e !Nf de % 2e Nf  w2 N  w N &e Nf& % ; 4 %d#Nf d&e %4  4e  apww DCe - N w w N &e *  a5Nf  e e w<  D~updateDipmpbpL50L20022VL53L20024L57_iupdat _prele _bflush iget.ol w &  5-(5-$̵̵2!e%   w~ e % ɂtt̕fe f 5  ,fe tl5eSee  w D  24 tw  /etc/initmem = %l RESTRICTED RIGHTS Use, duplication or disclosure is subject to restrictions stated in Contract with Western Electric Company, Inc. no clock9yXx(Y8Yi8))H))H )95 5 KNef 5 @ ` %5 @tp-@tp- %d ap%de% %d 5#4e N  _w PN %d  apww  L-%d%d N 4 4  e%ڂ% ww Q  *#  4nj& % e%΂̵ &  & &   4  w|w xBʵL Ee5f  5f tA@lee ʵeʵTeTN ww D5 pe5[ U5HN& e5 1e@-%& 5e5  N& @p- & ,ȃ N& = e@-E4 4 ww 6  w@UII9 9I9 Y YI9Ye % 7  w iinitno spacebad blockOut of inodesbad countno fsY)))hx )yyYhx Y4  pw @7ZHԔ%VX  ,wLno imtInode table overflow 8x I9I_u "_canonb _coremap _swapmap _rootdir _cputype _execnt _lbolt _time _tout _callout x_mount _mpid _runin xYYxh hyyX_runout _runrun _curpri _maxmem _lks _rootdev _swapdev _swplo _nswap _updlock _rablock _regloc _proc L_text _inode _ka6 _icode#_main"~mainipcsv L2_fuibyte L3B_clearse _mfree L4nL5LL6nL7hL8_printf L9 L10L11LL12z_min _fuiword L13 L14 L15_panicYYYiixyyxH X ih _canonb _coremap _swapmap _rootdir _cputype _execnt _lbolt _time _tout _callout x_mount _canonb _coremap _swapmap _rootdir _cputype _execnt _lbolt _time _tout _callout x_mount _mpid _runin _runout _runrun _curpri _maxmem _lks _rootdev _swapdev _swplo _nswap _updlock _rablock _regloc _u "_inode _bdevsw _nblkdev _cdevsw _nchrdev _buf h_bfreeli _iget"~igetip _cinit _binit _iinit _iget _newproc L16_expand _estabur"_copyout L1_sched cret _sureg"~sureguprpaL18L19L20L21L22L23L24L25L17~estaburapnddpntnsasep L27bL28_nseg"L29L30L31L32L33L3_mpid _runin _runout _runrun _curpri _maxmem _lks _rootdev _swapdev _swplo _nswap _updlock _rablock _regloc _bdevsw _nblkdev _cdevsw _nchrdev _buf h_bfreeli _inode _u "_iinit"~iinitcpbpcsv _bread _getblk L2BL3_panic _bcopy _brelse cret _alloc"~allocbpipfpdevbno_getfsip1ip2pdevinocsv L2$L20001_sleep L20013L20005*L6L8bL20003JL13_panic L20011jL1~L20007nL16_printf L20008|cret L5_ldiv _bread L17_brelse _iput",_lrem L18L20010~iput,rppL21vL22^_itrunc"2_ifree _iupdat"_prele ~iupdattm4L35L36L37L386L396L40BL41TL42HL43TL44XL45rL46L47L48L49L50L51L26~nsegnL52alloc.ol |8w t %   & % 744477w|w x N e  I  `5?Nf % "L5L20001_sleep L9L10D_badbloc"L11"_wakeup _clrbuf L4@L12_prdev _free"`~free`fpbpipdevbnoL14L20003vL13L16L17_bwrite ~badblocfpbnabnafpdevL100006L19LL20L18H_ialloc"P~iallocPfpbpipijkrpbpip1ip2ipL23._getfs L25L20015L27L28L29&_bwrite ~itrunc2iprpbpcpdpepL30&L31L20021RL33L35L36L20019zL38L40L41L20017L43_free _maknode"*~maknode*modeip_ialloc L46DL45@_wdir"p~wdirpipcp1cp2L20023_writei prf.ol ~.xw Ce 1 @ %%B %d%l%o %o  v %s eww Nf N& v Nf e0 wLw HD x 5t t tv%     tww w N~ w @@&f eww D  ( Nf& ewpanic: %s %s on dev %l/4L5>_lshift _min"L6_dpcmp _bmap L7L8_breada L20000_bread _iomove"_brelse cret _writei"8~writei8bpdnonbnipnaipL11lL10tL14vL15L16L17_getblk L20002L19L20.L21&_bawrite _bdwrite L23d_max"x~maxxabL25pricsv L2\_issig L3P_spl6 _spl0 L4D_wakeup"~_swtch"L5x_aretu L1Xcret ~wakeup~chancipL9L10_setrun"~setrunrppL12L11_setpri"~setpriuppppL15L16_sched"~schedp1rpanL184L19"L20003%l errbn%l er%o %o yyyyyy_ka6 _buf h_bfreeli _bdevsw _nblkdev _cL24~minabL27L26~iomovebpanflag cpnotL29L30_copyin L20004_copyout L32L28_dpadd L374L34 _cpass _passc slp.ool b w 0 %  t̕t 7 ~   w t̕t Pw ~C2  e~w\w .L20001@L22^L24|L25_malloc L27<L20005L30L31 L20007L34 L10001_xswap L36pL37l_swap L38_mfree L39b_panic ~swtchL41vrpipvnL42_savu _retu L43L46L47 L44(L50:_idle _sureg L51d_newproc"l~newproclupnpridevsw _nchrdev _panicst _printf"~printfxaxbxccsadxfmtx1x2x3 x4 x5x6x7x8x9csv L3L20001 L1r_putchar"L10000@L5XL10001LL10002P_printn"vL6lL7hL20003bcret ~printnvban_ldiv L10_lrem ~putcharXD4 ̕H@< 7. ~w"w DEted`% ww  ̥  5e%L% D m J TE%̥.̥+e%L%E%̥̥ 5e%L%D  & %_4@ && e ,m D&& e et& prppa1a2L53~L20009zL20011L58L59L60mL20013L61L64L65|L66rL67_copyseg _expand"~expandnewsizeinpa1a2L70L69^L71L72:L20015&subr.ol w @55S@5/5LN C5 @ @m@ @m0  %@0rccsL11L12L14_panic"~panics_update L16~L17"_idle _prdev"(~prdev(devstrL20_deverro"L~deverroLbprbpo1o2L22L23rdwri.ol JLw B 0_4E% Wp  _4B 55E5N  E%`# &E eH%4_4b w8w 4  * 77 2e%Lʥ  R HB 8  ww 5 7 ~̋ 5-f e%LDm ̕"  4%@ 4 D7C 5˕t  & & %˕ wt N f w Z @U@t55@ @mBN 0 w2@ @mN  @ @m7 %@ @m7@ @m0f %4@tEe5 `N 5 @ `AH  f 5D@E5 `N 5@ `N   7 %@ `7w     w@ j w   N 59@ 7* @- f& %N& 5rff eN  ww BE% Wp  _t _tB E5N  5E%`  X%& & 5 fff e/N 5*N N   &E e 5    ww u-@wt@w ju-@wZ5tu- NmfN %? N  N& % 5  Nm u-f % wswap errorno procsi )i)i)  )i))iğ  Ewb jw Duw:w 6w2w .DCB~wY(y(@w PC@Dmr*Q]p5# &\ P& %j7w`6B (     h(Xx HHX8)i(((YYYYYYYyYYYYYYYYyYYhYYyyy_bdevsw _nblkdev _cdevsw _nchrdev _inode _u "_buf h_bfreeli _canonb _coremap _swapmap _rootdir _cputype _execnt _lbolth(xx_inode _u))9)i8   HH )i HHH _time _tout _callout x_mount _mpid _runin _runout _runrun _curpri _maxmem _lks _rootdev _swapdev _swplo _nswap _updlock _rablock _regloc _bmap"~bmapipbnbpnbdibapnbpcsv L2"L20005L9L4_alloc L20004J_bdwrite L12L13:L14(L1cret L10L1 "_buf h_bfreeli _bdevsw _nblkdev _cdevsw _nchrdev _canonb _coremap _swapmap _rootdir _cputype _execnt _lbolt _time _tout _callout x_mount _mpid _runin _runout _runrun _curpri _maxmem _lks _rootdev _swapdev _swplo _nswap _updlock _rablock _regloc _readi"~readibpbnondnipnaiplbncsv L1H9)_u "_proc L_text _canonb _coremap _swapmap _rootdir _cputype _execnt _lbolt _time _tout _callout x_mount _mpid _runin _runout _runrun _curpri _maxmem _lks _rootdev _swapdev _swplo _nswap _updlock _rablock _regloc _file _inode _buf h_bfreeli _sleep"~sleepchanrps1$L15H_bread L16L17L18_brelse L19L20L21_passc"~passccL24NL25.L27<L10000jL20006FL23J_subyte _cpass"n~cpassncL29L20009xL28L20008~L31L33_fubyte _nodev"~nodev_nulldev"~nulldev_bcopy"~bcopycounttofromabcL39text.ol =D l<w D 5et l  < f& e ~  f %4p7j w^w Z$0  <54 et& %  ww _8  e % t-0a 4 tle?tEet  e  & & e7 N v e& 3L14L15L16L30L31~trappcsppsaidevcallpnps r1r0 csv _savfp L2L6J_printf L7TL8^L9l_panic L3r_psignal L12~_issig L33_psig _setpri L1cret _fuiword L10000L17B_fuword L18L19(L22bL23L16L20006_wakeup _swtch L15_procxmt"L17L20008_exit _psig"L10001L35L25~psigrpnpL23nL24_grow"j_suword L22_core"~coreipsL388_schar _namei L39L20012^_maknode _access L42R_itrunc _writei _estabur _iput L10002dL37`~growjsie3C      % ww D  & %wout of swap spaceswap errorout of textout of swap spaceI(h)I()I^L20001F_trap1"L26|L27_backup L32_grow ~trap1f_savu _nosys"~nosys_nullsys"~nullsyssig.ol *Pw t-N& * e%Lww %D t̥d̕d̥ ww Ĝ   Ĝ  wr 5w ` ˕ P  x% , e%L ww J2 57/%% 0 e jspaiL20020_ldiv L46L43_expand L47L20017_copyseg L50 L20019_clearse _ptrace"~ptracepL54.L53L200222L57LL59^L60t_sleep L61L20024L63L10007(L68L702L71JL72dL73L74L80L81~procxmtipL65L20025L64L69(h)I)_canonb _coremap _swapmap _rootdir _cputype _execnt _lbolt _time _tout _callout x_mount _mpid &e & 0E x7D  etQ7* ^wZw V78  mI C 55`1FB- 7 @7 >2. e & && e7 t77   ww d t@-@@ & @e 60`(" e  w>v` h`@l &   `w R̥ _fuibyte _fuiword L20028,_fubyte _fuword _suiword L20029L10005L75L76L20027L79sysent.ol 4 (8HXhx(_runin _runout _runrun _curpri _maxmem _lks _rootdev _swapdev _swplo _nswap _updlock _rablock _regloc _u "_proc L_text _inode _xswap"~xswapffosrpapcsv L2_malloc L38L4l_panic _xccdec"<_swap L5fL6~L7~_mfree L1_wakeup cret _xfree"~xfreeipxp - 0- e%L:  7 FE7x

e U E_D _ _2Jd8HXhx(8HXhx_sysent#_nullsys _rexit _fork _read _write _open _close _wait _creat _link _unlink _exec _chdir _gtime _mknod _chmod _chown _sbreak _stat _seek _getpid _smount _sumount _setuid _getuid _stime _ptracL9_iput _xalloc"~xallociprpxptsL138L14L20001L16L15>L21L22JL23L24L25_expand _estabur _readi L264_savu _swtch ~xccdec<rpxpL27htrap.ol GD VPw @E%U@e 7@  x&J NeT N^ l   ~  vcore)i)i)i)9i)9i)hxe _nosys _fstat _stty _gtty _nice _sslep _sync _kill _getswit _dup _pipe _times _profil _setgid _getgid _ssig clock.ol wP ,w M 2 e  5#   &  e  3ee3@E%  f  h F%<@_5f<, * " -- 5 ʋ wjNe %  >7mENe Ete%)N e E?%?Ete "e  1  N  1e "b d_~U5 _~ _r __rCL  _~ _rw . 7ww d'ww w:::::::n::ka6 = %o aps = %o trap type %o trapIYi)i()i)iE%  r2d e%Lۂ7 @E%@e 7 v  n wbw ^ B J e e   !tt_wyXiiiyyyyyh )8Yhhhh(HIxYIYI  8 H X X 9_canonb _coremap _swapmap _rootdir _cputype _execnt _lbolt _time _tout _callout x_mount _mpid _runin _runout _runrun _curpr(Ii(yyy_canonb _coremap _swapmap _rootdir _cputype _execnt _lbolt _time _tout _callout x_mount _mpid _runin _runout _runrun _curpri _maxmem _lks _rootdev _swapdev _swplo _nswap Y_canonb _coremap _swapmap _rootdir _cputype _execnt _lbolt _time _tout _callout x_mount _mpid _runin _runout _runrun _curpri _maxmem _lks _rootdev _swapdev _swplo _nswap _updlock _rablock _regloc#_u "_proc L_ka6 _sysent _trap"L10002&L29L5:L10nL11L1i _maxmem _lks _rootdev _swapdev _swplo _nswap _updlock _rablock _regloc _u "_proc L_inode _ipc _signal"~signaltppsigcsv L20001L4_psignal"*cret ~psignal*rppsigL6^L7HL8R_setrun _issig"b~issigbnpL20004L12_stop"L10L20003~stopcppp_updlock _rablock _regloc _u "_proc L_clock"~clockpcppsppsdevnps r1r0 p1p2csv _display L2xL3$L20001L4(_spl5 L6TL20003BL7ZL8pL20005`L10L12_incupc L13L1L15_spl1 L16_wakeup L17L20007L20RL22"L23@L24D_setpri L26n_issig L28_psig cret _timeout"~timeoutargstfuntimp1p2_spl7 L30L20009L31L32L20011L34L20013fio.ool  "w C % w  w D̵Ee e  E& x ww DE7 yfWp % & & 5X@&E` %e  HZH` %V N % & _Pw5 >f _\_Vw E ww   %jwiY85 `\7 \7 VD 7:7_65 %Om7 e?tE5me?tE5Nff e _67   De$ % 4˵ _6% % q_6na % & f& e7 He7B8 www e@@ A @e5pNf @ ef & ҋ@ fe x w61`ww  e?tE  t  e`` e ` `zr&  N wx `: &     out  H _u "_file _bdevsw _nblkdev _cdevsw _nchrdev _inode _getf"~getffprffcsv L2 L1cret _closef"*~closef*fpiprfpL5V_wakeup L6p_closei"xL10001L10002L11L12L8~closeiL13L12L20007L15L20009_ldiv L17L18@L19_brelse L21:L23~L24V_bmap _bread _bcopy L25L20012L30L31 cret _schar"0~schar0_uchar"D~ucharDc_fubyte L35bpipe.ool w  # ( ʕ2˕3̕w3@ 0  w D% 4 3 of swapXYY(xhxiprwmajdevripL10003L20000_iput _openi"L10005L10006L16L18*L136~openiiprwmajdevripL10007L170L20001&L20003_access":~access:modeipmaipL20p_getfs L21jL20009L20006bL23L10008L24L19L25_owner"~ownerip5Ee   Ue  , 7 f7b X ww D8   7 $     w% U e 7   7  5Ee w LD& ̵w(w $D̵ w))8YY)xxx(8YXXYii(((X9hx_uchar _namei L29L20014L20011L28_suser"~suserL33L32_ufalloc"~ufallociL20016 L37 L34_falloc"4~falloc4fpiL40^L20021@L39ZL20018DL20020bL45_printf malloc.ol 0hw CK-smK ewe  w BD e D-m tm@m-*4c &e4(Xx)(XHX()X)(_canonb _coremap _swapmap _rootdir _cputype _execnt _lbolt _time _tout _callout x_mount _mpid _runin _rXX9(8iYi4@m- tLm  Lew$ii_malloc"~mallocbpmpsizeacsv L2<L20001 L48L62L9"L14cret _mfree"D~mfreeDbpmpsizeunout _runrun _curpri _maxmem _lks _rootdev _swapdev _swplo _nswap _updlock _rablock _regloc _u "_inode _file _pipe"~pipeiprfwfrcsv _ialloc L1X_falloc L20001jL20003\cret _iput _readp"r~readprfpiprpL5L20005L7_wakeup _prele"L4_sleep _plock"_readi X iX h_canonb _coremap _swapmap _rootdir _cputype _execnt _lbolt _time _tout _callout x_mount _mpid _runin _runout _runrun _curpri _maxmem _lks _rootdev _swapdev _swplo _nswap _updlock _rablock _regloataaL11ZL20003RL12`L14L10L16L19L24nami.ool hw : %/&  %/    _ _E%@@& H   %VҐ %/%V %/o7 v7 p^5 & 7R5 J$ N % & 7B @e7 5 N _writep"~writepfpiprpcL10L11<L98L20007_psignal L13j_min _writei ~plockiprpL16L20009~preleiprpL18sys1.ool  ,w    _X %  5@ _65`_6@5 5 $ %_6eBN %_6 %_6  5c _u "_proc L_buf h_bfreeli _inode _exec"~execapnancbpdsipcptscsepcsv _uchar _namei L2*L1XL20001_sleep _getblk _access L46L5L20015tL7_fubyte L9_fuword L10_readi L11L16_estabur _xfree _expand _xalloc L17L20003L12L20005_clearse _suword L19L20007~L23_subyte L24L25L20009L30L20011L20013,_iput _brelse L36T_wakeup cret _rexit"\~rexit\_exit"t~exittapqL20017L20019L43_closef _malloc L45L46_panic _bcopy _bwrite _mfree L47L20023L50ZL200212L54ripL16rL17L_access L20L21_itrunc _prele _falloc _openi L15_iput _close"~closefpL22_closef _seek"L10001.L29L32nL33~seekfpntL23L24L25FL27`L20007x_link"~linkipxpL36DL37L38>L10002_suser L39L400_wdir7f ww  E8EE4P ww     ww p%%  ? J!0wfw b 5 n    ,%d7\ & e%L܂ 3ww   e%ww E7 E7wunlink -- iget  I h I L_setrun _swtch _wait"l~waitlbpfpL58rL20025vL61^L63"_bread _dpadd L57L65RL66~_fork"~forkp1p2L20027L71L72_newproc L73L67_sbreak"~sbreakadinL75_nseg L76L74L77L78tL20029f_copyseg L80L20031L82 _mknod"H~mknodHipL42nL44L41_sslep"~sslepd_spl7 L20008_dpcmp L20010_spl0 L10003L48 _sleep sys3.ool #$ w  & L ww    & L  ww f @&e @& @&e tle@e5 Nef e % f e % ww     I    I 8Hh xI  8H X  h I  sys2.ool . <w  ww  ww C >̰ 87̵ %  77%  6&e "?fwLw H     & $%w"w  ?E  & $%ww CB%5 5 E%@'   rE tE @ 0  w0w ,>    ww 5"   5     "  w| e%  0& f@t %{f e 2J 2& %22E2  w 5; " e%* 5-e % & f@t % 3  w:w 6  E%`I-5 w      x  _u "_inode _canonb _coremap _swapmap _rootdir _cputype _execnt _lbolt _time _tout _callout x_mount _mpid _runin _runout _runrun _curpri _maxmem _lks _rootdev _swapdev 2 0  w w  D̵#=%t 5t5%E ~5    x.5mfe ttwl E5` w N  Ag6E%@  +d - #N0-    ww    R H wpw l d`\jfe F@ff e  (wYhYYxxYhIYX_swplo _nswap _updlock _rablock _regloc _proc L_getswit"~getswitcsv cret _gtime"~gtime_stime"&~stime&_suser L3J_wakeup _setuid"N~setuidNuidL10000dL5t_getuid"x~getuidx_setgid"~setgidgidL10001L8_getgid"~getgid_getpid"~getpid_sync"~sync_update _nice"~nicenL14L15_unlink"~unlin$" e Nf e wwZ nn  x(8 x x hxYY_canonb _coremap _swapmap _rootdir _cputype _execnt _lbolt _time _tout _callout x_mount _mpid _runin _runout _runrun _curpri _maxmem _lks _rootdev _swapdev _skippp_uchar _namei L16_prele _iget L17JL18Z_panic L10002`L19_writei _iput _chdir"~chdiripL20L21L22_access _chmod"~chmodip_owner L23L24_chown""~chown"ipL25L_ssig"P~ssigPaL10003fL27nL26_kill"~killafpq(H x x8 x xHH8H  xH ywplo _nswap _updlock _rablock _regloc _buf h_bfreeli _u "_inode _file _bdevsw _nblkdev _cdevsw _nchrdev _fstat"~fstatfpcsv _getf L1_stat1"Lcret _stat""~stat"ip_uchar _namei L2H_iput ~stat1Lipubbpcpi_iupdat _ldiv _bread _lrem L20001_suword L20003_brelse /* * tunable variables */ #define NBUF 15 /* size of buffer cache */ #define NINODE 100 /* number of in core inodes */ #define NFILE 100 /* number of in core file structures */ #define NMOUNT 5 /* number of mountable file systems */ #define NEXEC 3 /* number of simultaneous exec's */ #define MAXMEM (64*32) /* max core per process - first # is Kw */ #define SSIZE 20 /* initial stack size (*64 bytes) */ #define SINCR 20 /* increment of stack (*64 bytes) */ #define NOFILE 15 /* max open files per py8yy yyH_canonb _coremap _swapmap _rootdir _cputype _execnt _lbolt _time _tout _callout x_mount _mpid _runin _runout _runrun _curpri _maxmem _lks _rootdev _swapdev _swplo _nswap _updlock _rablock _regloc _u "_file _inode _read"~readcs_dup"~dupfpiL10$_ufalloc _smount"(~smount(ipmpdsmp_getmdev"L11L12tL20005hL16L15L20zL10000L10001L19_getblk _bcopy _prele _sumount"4~sumount4ipmpd_update L21L20007PL24\L25nL20009rL28~getmdevipdL30 L31L32rocess */ #define CANBSIZ 256 /* max size of typewriter line */ #define CMAPSIZ 100 /* size of core allocation area */ #define SMAPSIZ 100 /* size of swap allocation area */ #define NCALL 20 /* max simultaneous time callouts */ #define NPROC 50 /* max number of processes */ #define NTEXT 40 /* max number of pure texts */ #define NCLIST 100 /* max total clist size */ #define HZ 60 /* Ticks/second of the clock */ /* * priorities * probably should not be * altered too much */ #define PSWP -100 #dv _rdwr" cret _write"~write~rdwr fpmodem_getf L3L4@L5lL6d_readp L8_writep L9_readi L10_writei _dpadd _open"~openip_uchar _namei L11_open1"$_creat"~creatipL13L12 _maknode L20003~open1$ipmodefpimtrfsys4.ool . Zw x ww ww 7 ww ğ7 707ww wpw lğ~7 ^ 77wNw JZVuw6w 2j? >w$w ww &%   00ww  3 $ Z E%@ X7    wlw h  E%@{ @& n efine PINOD -90 #define PRIBIO -50 #define PPIPE 1 #define PWAIT 40 #define PSLEP 90 #define PUSER 100 /* * signals * dont change */ #define NSIG 20 #define SIGHUP 1 /* hangup */ #define SIGINT 2 /* interrupt (rubout) */ #define SIGQIT 3 /* quit (FS) */ #define SIGINS 4 /* illegal instruction */ #define SIGTRC 5 /* trace or breakpoint */ #define SIGIOT 6 /* iot */ #define SIGEMT 7 /* emt */ #define SIGFPT 8 /* floating exception */ #define SIGKIL 9 /* kill */ #define SIGBUS 10 /* bus error */ #define SIGSEG 11 /* segmentation violation */ #define SIGSYS 12 /* sys */ #define SIGPIPE 13 /* end of pipe */ /* * fundamental constants * cannot be changed */ #define USIZE 16 /* size of user block (*64) */ #define NULL 0 #define NODEV (-1) #define ROOTINO 1 /* i number of all roots */ #define DIRSIZ 14 /* max characters per directory */ /* * structure to access an * integer in bytes */ struct { char lobyte; char hibyte; }; /* * structure to access an integer */ struct { int integ; ng column of device */ char t_erase; /* erase character */ char t_kill; /* kill character */ char t_state; /* internal state, not visible externally */ char t_char; /* character temporary */ int t_speeds; /* output+input line speed */ int t_dev; /* device name */ }; char partab[]; /* ASCII table: parity, character class */ #define TTIPRI 10 #define TTOPRI 20 #define CERASE '#' /* default special characters */ #define CEOT 004 #define CKILL '@' #define CQUIT 034 /* FS, cntl shift L */ #defineine EEXIST 17 #define EXDEV 18 #define ENODEV 19 #define ENOTDIR 20 #define EISDIR 21 #define EINVAL 22 #define ENFILE 23 #define EMFILE 24 #define ENOTTY 25 #define ETXTBSY 26 #define EFBIG 27 #define ENOSPC 28 #define ESPIPE 29 #define EROFS 30 #define EMLINK 31 #define EPIPE 32 }; /* * Certain processor registers */ #define PS 0177776 #define KL 0177560 #define SW 0177570  CINTR 0177 /* DEL */ /* limits */ #define TTHIWAT 50 #define TTLOWAT 30 #define TTYHOG 256 /* modes */ #define HUPCL 01 #define XTABS 02 #define LCASE 04 #define ECHO 010 #define CRMOD 020 #define RAW 040 #define ODDP 0100 #define EVENP 0200 #define NLDELAY 001400 #define TBDELAY 006000 #define CRDELAY 030000 #define VTDELAY 040000 /* Hardware bits */ #define DONE 0200 #define IENABLE 0100 /* Internal state bits */ #define TIMEOUT 01 /* Delay timeout in progress */ #define WOPEN 02 /* Waiting for op/* * The I node is the focus of all * file activity in unix. There is a unique * inode allocated for each active file, * each current directory, each mounted-on * file, text file, and the root. An inode is 'named' * by its dev/inumber pair. (iget/iget.c) * Data, from mode on, is read in * from permanent inode on volume. */ struct inode { char i_flag; char i_count; /* reference count */ int i_dev; /* device where inode resides */ int i_number; /* i number, 1-to-1 with device address */ int i_m/* * Random set of variables * used by more than one * routine. */ char canonb[CANBSIZ]; /* buffer for erase and kill (#@) */ int coremap[CMAPSIZ]; /* space for core allocation */ int swapmap[SMAPSIZ]; /* space for swap allocation */ int *rootdir; /* pointer to inode of root directory */ int cputype; /* type of cpu =40, 45, or 70 */ int execnt; /* number of processes in exec */ int lbolt; /* time of day in 60th not in time */ int time[2]; /* time in sec from 1970 */ int tout[2]; /* time of day oen to complete */ #define ISOPEN 04 /* Device is open */ #define SSTART 010 /* Has special start routine at addr */ #define CARR_ON 020 /* Software copy of carrier-present */ #define BUSY 040 /* Output in progress */ #define ASLEEP 0100 /* Wakeup when output done */ ode; char i_nlink; /* directory entries */ char i_uid; /* owner */ char i_gid; /* group of owner */ char i_size0; /* most significant of size */ char *i_size1; /* least sig */ int i_addr[8]; /* device addresses constituting file */ int i_lastr; /* last logical block read (for read-ahead) */ } inode[NINODE]; /* flags */ #define ILOCK 01 /* inode is locked */ #define IUPD 02 /* inode has been modified */ #define IACC 04 /* inode access time to be updated */ #define IMOUNT 010 /* inode is mountedf next sleep */ /* * The callout structure is for * a routine arranging * to be called by the clock interrupt * (clock.c) with a specified argument, * in a specified amount of time. * Used, for example, to time tab * delays on teletypes. */ struct callo { int c_time; /* incremental time */ int c_arg; /* argument to routine */ int (*c_func)(); /* routine */ } callout[NCALL]; /* * Mount structure. * One allocated on every mount. * Used to find the super block. */ struct mount { int m_dev; //* * The user structure. * One allocated per process. * Contains all per process data * that doesn't need to be referenced * while the process is swapped. * The user block is USIZE*64 bytes * long; resides at virtual kernel * loc 140000; contains the system * stack per user; is cross referenced * with the proc structure for the * same process. */ struct user { int u_rsav[2]; /* save r5,r6 when exchanging stacks */ int u_fsav[25]; /* save fp registers */ /* rsav and fsav must be first in on */ #define IWANT 020 /* some process waiting on lock */ #define ITEXT 040 /* inode is pure text prototype */ /* modes */ #define IALLOC 0100000 /* file is used */ #define IFMT 060000 /* type of file */ #define IFDIR 040000 /* directory */ #define IFCHR 020000 /* character special */ #define IFBLK 060000 /* block special, 0 is regular */ #define ILARG 010000 /* large addressing algorithm */ #define ISUID 04000 /* set user id on execution */ #define ISGID 02000 /* set group id on execution */ #* device mounted */ int *m_bufp; /* pointer to superblock */ int *m_inodp; /* pointer to mounted on inode */ } mount[NMOUNT]; int mpid; /* generic for unique process id's */ char runin; /* scheduling flag */ char runout; /* scheduling flag */ char runrun; /* scheduling flag */ char curpri; /* more scheduling */ int maxmem; /* actual max memory per process */ int *lks; /* pointer to clock device */ int rootdev; /* dev of root see conf.c */ int swapdev; /* dev of swap see conf.c */ int swplo structure */ char u_segflg; /* flag for IO; user or kernel space */ char u_error; /* return error code */ char u_uid; /* effective user id */ char u_gid; /* effective group id */ char u_ruid; /* real user id */ char u_rgid; /* real group id */ int u_procp; /* pointer to proc structure */ char *u_base; /* base address for IO */ char *u_count; /* bytes remaining for IO */ char *u_offset[2]; /* offset in file for IO */ int *u_cdir; /* pointer to inode of current directory */ char u_define ISVTX 01000 /* save swapped text even after use */ #define IREAD 0400 /* read, write, execute permissions */ #define IWRITE 0200 #define IEXEC 0100 ; /* block number of swap space */ int nswap; /* size of swap space */ int updlock; /* lock for sync */ int rablock; /* block to be read ahead */ char regloc[]; /* locs. of saved user registers (trap.c) */ dbuf[DIRSIZ]; /* current pathname component */ char *u_dirp; /* current pointer to inode */ struct { /* current directory entry */ int u_ino; char u_name[DIRSIZ]; } u_dent; int *u_pdir; /* inode of parent directory of dirp */ int u_uisa[16]; /* prototype of segmentation addresses */ int u_uisd[16]; /* prototype of segmentation descriptors */ int u_ofile[NOFILE]; /* pointers to file structures of open files */ int u_arg[5]; /* arguments to current system call */ int u_tsize; /* text siz/* * One file structure is allocated * for each open/creat/pipe call. * Main use is to hold the read/write * pointer associated with each open * file. */ struct file { char f_flag; char f_count; /* reference count */ int f_inode; /* pointer to inode structure */ char *f_offset[2]; /* read/write character pointer */ } file[NFILE]; /* flags */ #define FREAD 01 #define FWRITE 02 #define FPIPE 04 /* * A clist structure is the head * of a linked list queue of characters. * The characters are stored in 4-word * blocks containing a link and 6 characters. * The routines getc and putc (m45.s or m40.s) * manipulate these structures. */ struct clist { int c_cc; /* character count */ int c_cf; /* pointer to first block */ int c_cl; /* pointer to last block */ }; /* * A tty structure is needed for * each UNIX character device that * is used for normal terminal IO. * The routines in tty.c hae (*64) */ int u_dsize; /* data size (*64) */ int u_ssize; /* stack size (*64) */ int u_sep; /* flag for I and D separation */ int u_qsav[2]; /* label variable for quits and interrupts */ int u_ssav[2]; /* label variable for swapping */ int u_signal[NSIG]; /* disposition of signals */ int u_utime; /* this process user time */ int u_stime; /* this process system time */ int u_cutime[2]; /* sum of childs' utimes */ int u_cstime[2]; /* sum of childs' stimes */ int *u_ar0; /* address of /* * One structure allocated per active * process. It contains all data needed * about the process while the * process may be swapped out. * Other per process data (user.h) * is swapped with the process. */ struct proc { char p_stat; char p_flag; char p_pri; /* priority, negative is high */ char p_sig; /* signal number sent to this process */ char p_uid; /* user id, used to direct tty signals */ char p_time; /* resident time for scheduling */ char p_cpu; /* cpu usage for scheduling */ chndle the * common code associated with * these structures. * The definition and device dependent * code is in each driver. (kl.c dc.c dh.c) */ struct tty { struct clist t_rawq; /* input chars right off device */ struct clist t_canq; /* input chars after erase and kill */ struct clist t_outq; /* output list to device */ int t_flags; /* mode, settable by stty call */ int *t_addr; /* device address (register or startup fcn) */ char t_delct; /* number of delimiters in raw q */ char t_col; /* printiusers saved R0 */ int u_prof[4]; /* profile arguments */ char u_intflg; /* catch intr from sys */ /* kernel stack per user * extends from u + USIZE*64 * backward not to reach here */ } u; /* u_error codes */ #define EFAULT 106 #define EPERM 1 #define ENOENT 2 #define ESRCH 3 #define EINTR 4 #define EIO 5 #define ENXIO 6 #define E2BIG 7 #define ENOEXEC 8 #define EBADF 9 #define ECHILD 10 #define EAGAIN 11 #define ENOMEM 12 #define EACCES 13 #define ENOTBLK 15 #define EBUSY 16 #defar p_nice; /* nice for scheduling */ int p_ttyp; /* controlling tty */ int p_pid; /* unique process id */ int p_ppid; /* process id of parent */ int p_addr; /* address of swappable image */ int p_size; /* size of swappable image (*64 bytes) */ int p_wchan; /* event process is awaiting */ int *p_textp; /* pointer to text structure */ } proc[NPROC]; /* stat codes */ #define SSLEEP 1 /* sleeping on high priority */ #define SWAIT 2 /* sleeping on low priority */ #define SRUN 3 /* running */ #define SIDL 4 /* intermediate state in process creation */ #define SZOMB 5 /* intermediate state in process termination */ #define SSTOP 6 /* process being traced */ /* flag codes */ #define SLOAD 01 /* in core */ #define SSYS 02 /* scheduling process */ #define SLOCK 04 /* process cannot be swapped */ #define SSWAP 010 /* process is being swapped out */ #define STRC 020 /* process is being traced */ #define SWTED 040 /* another tracing flag */ */ u.u_prof[3] = (u.u_arg[3]>>1) & 077777; /* pc scale */ } # /* */ #include "../param.h" #include "../conf.h" #include "../inode.h" #include "../user.h" #include "../buf.h" #include "../systm.h" /* * Bmap defines the structure of file system storage * by returning the physical block number on a device given the * inode and the logical block number in a file. * When convenient, it also leaves the physical * block number of the next block of the file in rablock * for use in read-ahead. */ bmap(ip, bn) struct inode *ip; int bn; { register *bp, *bap, nb; in# /* */ /* * Everything in this file is a routine implementing a system call. */ #include "../param.h" #include "../user.h" #include "../reg.h" #include "../inode.h" #include "../systm.h" #include "../proc.h" getswit() { u.u_ar0[R0] = SW->integ; } gtime() { u.u_ar0[R0] = time[0]; u.u_ar0[R1] = time[1]; } stime() { if(suser()) { time[0] = u.u_ar0[R0]; time[1] = u.u_ar0[R1]; wakeup(tout); } } setuid() { register uid; uid = u.u_ar0[R0].lobyte; if(u.u_ruid == uid.lobyte || suser()) { # /* */ #include "../param.h" #include "../systm.h" #include "../user.h" #include "../proc.h" #include "../text.h" #include "../inode.h" /* * Swap out process p. * The ff flag causes its core to be freed-- * it may be off when called to create an image for a * child process in newproc. * Os is the old size of the data area of the process, * and is supplied during core expansion swaps. * * panic: out of swap space * panic: swap error -- IO error */ xswap(p, ff, os) int *p; { register *rp, a; t *nbp, d, i; d = ip->i_dev; if(bn & ~077777) { u.u_error = EFBIG; return(0); } if((ip->i_mode&ILARG) == 0) { /* * small file algorithm */ if((bn & ~7) != 0) { /* * convert small to large */ if ((bp = alloc(d)) == NULL) return(NULL); bap = bp->b_addr; for(i=0; i<8; i++) { *bap++ = ip->i_addr[i]; ip->i_addr[i] = 0; } ip->i_addr[0] = bp->b_blkno; bdwrite(bp); ip->i_mode =| ILARG; goto large; } nb = ip->i_addr[bn]; if(nb == 0 && (bp = u.u_uid = uid; u.u_procp->p_uid = uid; u.u_ruid = uid; } } getuid() { u.u_ar0[R0].lobyte = u.u_ruid; u.u_ar0[R0].hibyte = u.u_uid; } setgid() { register gid; gid = u.u_ar0[R0].lobyte; if(u.u_rgid == gid.lobyte || suser()) { u.u_gid = gid; u.u_rgid = gid; } } getgid() { u.u_ar0[R0].lobyte = u.u_rgid; u.u_ar0[R0].hibyte = u.u_gid; } getpid() { u.u_ar0[R0] = u.u_procp->p_pid; } sync() { update(); } nice() { register n; n = u.u_ar0[R0]; if(n > 20) n = 20; if(n < 0 && !suserrp = p; if(os == 0) os = rp->p_size; a = malloc(swapmap, (rp->p_size+7)/8); if(a == NULL) panic("out of swap space"); xccdec(rp->p_textp); rp->p_flag =| SLOCK; if(swap(a, rp->p_addr, os, 0)) panic("swap error"); if(ff) mfree(coremap, os, rp->p_addr); rp->p_addr = a; rp->p_flag =& ~(SLOAD|SLOCK); rp->p_time = 0; if(runout) { runout = 0; wakeup(&runout); } } /* * relinquish use of the shared text segment * of a process. */ xfree() { register *xp, *ip; if((xp=u.u_procp->p_textp)  alloc(d)) != NULL) { bdwrite(bp); nb = bp->b_blkno; ip->i_addr[bn] = nb; ip->i_flag =| IUPD; } rablock = 0; if (bn<7) rablock = ip->i_addr[bn+1]; return(nb); } /* * large file algorithm */ large: i = bn>>8; if(bn & 0174000) i = 7; if((nb=ip->i_addr[i]) == 0) { ip->i_flag =| IUPD; if ((bp = alloc(d)) == NULL) return(NULL); ip->i_addr[i] = bp->b_blkno; } else bp = bread(d, nb); bap = bp->b_addr; /* * "huge" fetch of double indirect block */ if(i ==()) n = 0; u.u_procp->p_nice = n; } /* * Unlink system call. * panic: unlink -- "cannot happen" */ unlink() { register *ip, *pp; extern uchar; pp = namei(&uchar, 2); if(pp == NULL) return; prele(pp); ip = iget(pp->i_dev, u.u_dent.u_ino); if(ip == NULL) panic("unlink -- iget"); if((ip->i_mode&IFMT)==IFDIR && !suser()) goto out; u.u_offset[1] =- DIRSIZ+2; u.u_base = &u.u_dent; u.u_count = DIRSIZ+2; u.u_dent.u_ino = 0; writei(pp); ip->i_nlink--; ip->i_flag =| IUPD; out: iput(pp);!= NULL) { u.u_procp->p_textp = NULL; xccdec(xp); if(--xp->x_count == 0) { ip = xp->x_iptr; if((ip->i_mode&ISVTX) == 0) { xp->x_iptr = NULL; mfree(swapmap, (xp->x_size+7)/8, xp->x_daddr); ip->i_flag =& ~ITEXT; iput(ip); } } } } /* * Attach to a shared text segment. * If there is no shared text, just return. * If there is, hook up to it: * if it is not currently being used, it has to be read * in from the inode (ip) and established in the swap space. * If it is being  7) { i = ((bn>>8) & 0377) - 7; if((nb=bap[i]) == 0) { if((nbp = alloc(d)) == NULL) { brelse(bp); return(NULL); } bap[i] = nbp->b_blkno; bdwrite(bp); } else { brelse(bp); nbp = bread(d, nb); } bp = nbp; bap = bp->b_addr; } /* * normal indirect fetch */ i = bn & 0377; if((nb=bap[i]) == 0 && (nbp = alloc(d)) != NULL) { nb = nbp->b_blkno; bap[i] = nb; bdwrite(nbp); bdwrite(bp); } else brelse(bp); rablock = 0; if(i < 255) rablock = bap[i+1]; return iput(ip); } chdir() { register *ip; extern uchar; ip = namei(&uchar, 0); if(ip == NULL) return; if((ip->i_mode&IFMT) != IFDIR) { u.u_error = ENOTDIR; bad: iput(ip); return; } if(access(ip, IEXEC)) goto bad; iput(u.u_cdir); u.u_cdir = ip; prele(ip); } chmod() { register *ip; if ((ip = owner()) == NULL) return; ip->i_mode =& ~07777; if (u.u_uid) u.u_arg[1] =& ~ISVTX; ip->i_mode =| u.u_arg[1]&07777; ip->i_flag =| IUPD; iput(ip); } chown() { register *ip; if (!suser() |used, but is not currently in core, * a swap has to be done to get it back. * The full coroutine glory has to be invoked-- * see slp.c-- because if the calling process * is misplaced in core the text image might not fit. * Quite possibly the code after "out:" could check to * see if the text does fit and simply swap it in. * * panic: out of swap space */ xalloc(ip) int *ip; { register struct text *xp; register *rp, ts; if(u.u_arg[1] == 0) return; rp = NULL; for(xp = &text[0]; xp < &text[NTE(nb); } /* * Pass back c to the user at his location u_base; * update u_base, u_count, and u_offset. Return -1 * on the last character of the user's read. * u_base is in the user address space unless u_segflg is set. */ passc(c) char c; { if(u.u_segflg) *u.u_base = c; else if(subyte(u.u_base, c) < 0) { u.u_error = EFAULT; return(-1); } u.u_count--; if(++u.u_offset[1] == 0) u.u_offset[0]++; u.u_base++; return(u.u_count == 0? -1: 0); } /* * Pick up and return the next character | (ip = owner()) == NULL) return; ip->i_uid = u.u_arg[1].lobyte; ip->i_gid = u.u_arg[1].hibyte; ip->i_flag =| IUPD; iput(ip); } /* * Change modified date of file: * time to r0-r1; sys smdate; file * This call has been withdrawn because it messes up * incremental dumps (pseudo-old files aren't dumped). * It works though and you can uncomment it if you like. smdate() { register struct inode *ip; register int *tp; int tbuf[2]; if ((ip = owner()) == NULL) return; ip->i_flag =| IUPD; tp = &XT]; xp++) if(xp->x_iptr == NULL) { if(rp == NULL) rp = xp; } else if(xp->x_iptr == ip) { xp->x_count++; u.u_procp->p_textp = xp; goto out; } if((xp=rp) == NULL) panic("out of text"); xp->x_count = 1; xp->x_ccount = 0; xp->x_iptr = ip; ts = ((u.u_arg[1]+63)>>6) & 01777; xp->x_size = ts; if((xp->x_daddr = malloc(swapmap, (ts+7)/8)) == NULL) panic("out of swap space"); expand(USIZE+ts); estabur(0, ts, 0, 0); u.u_count = u.u_arg[1]; u.u_offset[1] = 020; u.u_base = 0from the user's * write call at location u_base; * update u_base, u_count, and u_offset. Return -1 * when u_count is exhausted. u_base is in the user's * address space unless u_segflg is set. */ cpass() { register c; if(u.u_count == 0) return(-1); if(u.u_segflg) c = *u.u_base; else if((c=fubyte(u.u_base)) < 0) { u.u_error = EFAULT; return(-1); } u.u_count--; if(++u.u_offset[1] == 0) u.u_offset[0]++; u.u_base++; return(c&0377); } /* * Routine which sets a user error; placed itbuf[2]; *--tp = u.u_ar0[R1]; *--tp = u.u_ar0[R0]; iupdat(ip, tp); ip->i_flag =& ~IUPD; iput(ip); } */ ssig() { register a; a = u.u_arg[0]; if(a<=0 || a>=NSIG || a ==SIGKIL) { u.u_error = EINVAL; return; } u.u_ar0[R0] = u.u_signal[a]; u.u_signal[a] = u.u_arg[1]; if(u.u_procp->p_sig == a) u.u_procp->p_sig = 0; } kill() { register struct proc *p, *q; register a; int f; f = 0; a = u.u_ar0[R0]; q = u.u_procp; for(p = &proc[0]; p < &proc[NPROC]; p++) { if(p == q) continue; if(; readi(ip); rp = u.u_procp; rp->p_flag =| SLOCK; swap(xp->x_daddr, rp->p_addr+USIZE, ts, 0); rp->p_flag =& ~SLOCK; rp->p_textp = xp; rp = ip; rp->i_flag =| ITEXT; rp->i_count++; expand(USIZE); out: if(xp->x_ccount == 0) { savu(u.u_rsav); savu(u.u_ssav); xswap(u.u_procp, 1, 0); u.u_procp->p_flag =| SSWAP; swtch(); /* no return */ } xp->x_ccount++; } /* * Decrement the in-core usage count of a shared text segment. * When it drops to zero, free the core space. */ xccdec(xp) int *n * illegal entries in the bdevsw and cdevsw tables. */ nodev() { u.u_error = ENODEV; } /* * Null routine; placed in insignificant entries * in the bdevsw and cdevsw tables. */ nulldev() { } /* * copy count words from from to to. */ bcopy(from, to, count) int *from, *to; { register *a, *b, c; a = from; b = to; c = count; do *b++ = *a++; while(--c); } a != 0 && p->p_pid != a) continue; if(a == 0 && (p->p_ttyp != q->p_ttyp || p <= &proc[1])) continue; if(u.u_uid != 0 && u.u_uid != p->p_uid) continue; f++; psignal(p, u.u_arg[0]); } if(f == 0) u.u_error = ESRCH; } times() { register *p; for(p = &u.u_utime; p < &u.u_utime+6;) { suword(u.u_arg[0], *p++); u.u_arg[0] =+ 2; } } profil() { u.u_prof[0] = u.u_arg[0] & ~1; /* base of sample buf */ u.u_prof[1] = u.u_arg[1]; /* size of same */ u.u_prof[2] = u.u_arg[2]; /* pc offset xp; { register *rp; if((rp=xp)!=NULL && rp->x_ccount!=0) if(--rp->x_ccount == 0) mfree(coremap, rp->x_size, rp->x_caddr); } # /* */ #include "../param.h" #include "../seg.h" #include "../buf.h" #include "../conf.h" /* * Address and structure of the * KL-11 console device registers. */ struct { int rsr; int rbr; int xsr; int xbr; }; /* * In case console is off, * panicstr contains argument to last * call to panic. */ char *panicstr; /* * Scaled down version of C Library printf. * Only %s %l %d (==%l) %o are recognized. * Used to print diagnostic information * directly on console tty. * Since it is not interrupt driven, * all system activities are pretty much * suspended. * Printf should not be used for chit-chat. */ printf(fmt,x1,x2,x3,x4,x5,x6,x7,x8,x9,xa,xb,xc) char fmt[]; { register char *s; register *adx, c; adx = &x1; loop: while((c = *fmt++) != '%') { if(c == '\0') return; putchar(c); } c = *fmt++; if(c == 'd' || c == 'l' || c == 'o') printn(*adx, c=='o'? 8: 10); if(c == 's') { s = *adx; while(c = *s++) putchar(c); } adx++; goto loop; } /* * Print an unsigned integer in  * address_of_saved_ps - 2; */ default: printf("ka6 = %o\n", *ka6); printf("aps = %o\n", &ps); printf("trap type %o\n", dev); panic("trap"); case 0+USER: /* bus error */ i = SIGBUS; break; /* * If illegal instructions are not * being caught and the offending instruction * is a SETD, the trap is ignored. * This is because C produces a SETD at * the beginning of every program which * will trap on CPUs without 11/45 FPU. */ case 1+USER: /* illegal instruction */ if(fuiworbread(rootdev, 1); cp = getblk(NODEV); if(u.u_error) panic("iinit"); bcopy(bp->b_addr, cp->b_addr, 256); brelse(bp); mount[0].m_bufp = cp; mount[0].m_dev = rootdev; cp = cp->b_addr; cp->s_flock = 0; cp->s_ilock = 0; cp->s_ronly = 0; time[0] = cp->s_time[0]; time[1] = cp->s_time[1]; } /* * alloc will obtain the next available * free disk block from the free list of * the specified device. * The super block has up to 100 remembered * free blocks; the last of these is read to * obtain 100 base b. */ printn(n, b) { register a; if(a = ldiv(n, b)) printn(a, b); putchar(lrem(n, b) + '0'); } /* * Print a character on console. * Attempts to save and restore device * status. * If the switches are 0, all * printing is inhibited. */ putchar(c) { register rc, s; rc = c; if(SW->integ == 0) return; while((KL->xsr&0200) == 0) ; if(rc == 0) return; s = KL->xsr; KL->xsr = 0; KL->xbr = rc; if(rc == '\n') { putchar('\r'); putchar(0177); putchar(0177); } putchar(0); KL->d(pc-2) == SETD && u.u_signal[SIGINS] == 0) goto out; i = SIGINS; break; case 2+USER: /* bpt or trace */ i = SIGTRC; break; case 3+USER: /* iot */ i = SIGIOT; break; case 5+USER: /* emt */ i = SIGEMT; break; case 6+USER: /* sys call */ u.u_error = 0; ps =& ~EBIT; callp = &sysent[fuiword(pc-2)&077]; if (callp == sysent) { /* indirect */ a = fuiword(pc); pc =+ 2; i = fuword(a); if ((i & ~077) != SYS) i = 077; /* illegal */ callp = &sysent[i&077]; for(i=more . . . * * no space on dev x/y -- when * the free list is exhausted. */ alloc(dev) { int bno; register *bp, *ip, *fp; fp = getfs(dev); while(fp->s_flock) sleep(&fp->s_flock, PINOD); do { if(fp->s_nfree <= 0) goto nospace; bno = fp->s_free[--fp->s_nfree]; if(bno == 0) goto nospace; } while (badblock(fp, bno, dev)); if(fp->s_nfree <= 0) { fp->s_flock++; bp = bread(dev, bno); ip = bp->b_addr; fp->s_nfree = *ip++; bcopy(ip, fp->s_free, 100); brelse(bp); fp->s_flock = xsr = s; } /* * Panic is called on unresolvable * fatal errors. * It syncs, prints "panic: mesg" and * then loops. */ panic(s) char *s; { panicstr = s; update(); printf("panic: %s\n", s); for(;;) idle(); } /* * prdev prints a warning message of the * form "mesg on dev x/y". * x and y are the major and minor parts of * the device argument. */ prdev(str, dev) { printf("%s on dev %l/%l\n", str, dev.d_major, dev.d_minor); } /* * deverr prints a diagnostic from * a device driver. * It pri0; icount; i++) u.u_arg[i] = fuword(a =+ 2); } else { for(i=0; icount; i++) { u.u_arg[i] = fuiword(pc); pc =+ 2; } } u.u_dirp = u.u_arg[0]; trap1(callp->call); if(u.u_intflg) u.u_error = EINTR; if(u.u_error < 100) { if(u.u_error) { ps =| EBIT; r0 = u.u_error; } goto out; } i = SIGSYS; break; /* * Since the floating exception is an * imprecise trap, a user generated * trap may actually come from kernel * mode. In this case, a s0; wakeup(&fp->s_flock); } bp = getblk(dev, bno); clrbuf(bp); fp->s_fmod = 1; return(bp); nospace: fp->s_nfree = 0; prdev("no space", dev); u.u_error = ENOSPC; return(NULL); } /* * place the specified disk block * back on the free list of the * specified device. */ free(dev, bno) { register *fp, *bp, *ip; fp = getfs(dev); fp->s_fmod = 1; while(fp->s_flock) sleep(&fp->s_flock, PINOD); if (badblock(fp, bno, dev)) return; if(fp->s_nfree <= 0) { fp->s_nfree = 1; fp->s_free[0] = 0nts the device, block number, * and an octal word (usually some error * status register) passed as argument. */ deverror(bp, o1, o2) int *bp; { register *rbp; rbp = bp; prdev("err", rbp->b_dev); printf("bn%l er%o %o\n", rbp->b_blkno, o1, o2); } ignal is sent * to the current process to be picked * up later. */ case 8: /* floating exception */ psignal(u.u_procp, SIGFPT); return; case 8+USER: i = SIGFPT; break; /* * If the user SP is below the stack segment, * grow the stack automatically. * This relies on the ability of the hardware * to restart a half executed instruction. * On the 11/40 this is not the case and * the routine backup/l40.s may fail. * The classic example is on the instruction * cmp -(sp),-(sp) *; } if(fp->s_nfree >= 100) { fp->s_flock++; bp = getblk(dev, bno); ip = bp->b_addr; *ip++ = fp->s_nfree; bcopy(fp->s_free, ip, 100); fp->s_nfree = 0; bwrite(bp); fp->s_flock = 0; wakeup(&fp->s_flock); } fp->s_free[fp->s_nfree++] = bno; fp->s_fmod = 1; } /* * Check that a block number is in the * range between the I list and the size * of the device. * This is used mainly to check that a * garbage file system has not been mounted. * * bad block on dev x/y -- not in range */ ba/ case 9+USER: /* segmentation exception */ a = sp; if(backup(u.u_ar0) == 0) if(grow(a)) goto out; i = SIGSEG; break; } psignal(u.u_procp, i); out: if(issig()) psig(); setpri(u.u_procp); } /* * Call the system-entry routine f (out of the * sysent table). This is a subroutine for trap, and * not in-line, because if a signal occurs * during processing, an (abnormal) return is simulated from * the last caller to savu(qsav); if this took place * inside of trap, it wouldn't have a chadblock(afp, abn, dev) { register struct filsys *fp; register char *bn; fp = afp; bn = abn; if (bn < fp->s_isize+2 || bn >= fp->s_fsize) { prdev("bad block", dev); return(1); } return(0); } /* * Allocate an unused I node * on the specified device. * Used with file creation. * The algorithm keeps up to * 100 spare I nodes in the * super block. When this runs out, * a linear search through the * I list is instituted to pick * up 100 more. */ ialloc(dev) { register *fp, *bp, *ip; int i,# #include "../param.h" #include "../systm.h" #include "../user.h" #include "../proc.h" #include "../reg.h" #include "../seg.h" #define EBIT 1 /* user error bit in PS: C-bit */ #define UMODE 0170000 /* user-mode bits in PS word */ #define SETD 0170011 /* SETD instruction */ #define SYS 0104400 /* sys (trap) instruction */ #define USER 020 /* user-mode flag added to dev */ /* * structure of the system entry table (sysent.c) */ struct sysent { int count; /* argument count */ int (*call)(); /* namence to clean up. * * If this occurs, the return takes place without * clearing u_intflg; if it's still set, trap * marks an error which means that a system * call (like read on a typewriter) got interrupted * by a signal. */ trap1(f) int (*f)(); { u.u_intflg = 1; savu(u.u_qsav); (*f)(); u.u_intflg = 0; } /* * nonexistent system call-- set fatal error code. */ nosys() { u.u_error = 100; } /* * Ignored system call */ nullsys() { }  j, k, ino; fp = getfs(dev); while(fp->s_ilock) sleep(&fp->s_ilock, PINOD); loop: if(fp->s_ninode > 0) { ino = fp->s_inode[--fp->s_ninode]; ip = iget(dev, ino); if (ip==NULL) return(NULL); if(ip->i_mode == 0) { for(bp = &ip->i_mode; bp < &ip->i_addr[8];) *bp++ = 0; fp->s_fmod = 1; return(ip); } /* * Inode was allocated after all. * Look some more. */ iput(ip); goto loop; } fp->s_ilock++; ino = 0; for(i=0; is_isize; i++) { bp = bread(dev, i+2); ip = of handler */ } sysent[64]; /* * Offsets of the user's registers relative to * the saved r0. See reg.h */ char regloc[9] { R0, R1, R2, R3, R4, R5, R6, R7, RPS }; /* * Called from l40.s or l45.s when a processor trap occurs. * The arguments are the words saved on the system stack * by the hardware and software during the trap processing. * Their order is dictated by the hardware and the details * of C's calling sequence. They are peculiar in that * this call is not 'by value' and changed user re bp->b_addr; for(j=0; j<256; j=+16) { ino++; if(ip[j] != 0) continue; for(k=0; ks_inode[fp->s_ninode++] = ino; if(fp->s_ninode >= 100) break; cont:; } brelse(bp); if(fp->s_ninode >= 100) break; } fp->s_ilock = 0; wakeup(&fp->s_ilock); if (fp->s_ninode > 0) goto loop; prdev("Out of inodes", dev); u.u_error = ENOSPC; return(NULL); } /* * Free the specified I node * on the specigisters * get copied back on return. * dev is the kind of trap that occurred. */ trap(dev, sp, r1, nps, r0, pc, ps) { register i, a; register struct sysent *callp; savfp(); if ((ps&UMODE) == UMODE) dev =| USER; u.u_ar0 = &r0; switch(dev) { /* * Trap not expected. * Usually a kernel mode bus error. * The numbers printed are used to * find the hardware PS/PC as follows. * (all numbers in octal 18 bits) * address_of_saved_ps = * (ka6*0100) + aps - 0140000; * address_of_saved_pc =# /* */ #include "../param.h" #include "../systm.h" #include "../filsys.h" #include "../conf.h" #include "../buf.h" #include "../inode.h" #include "../user.h" /* * iinit is called once (from main) * very early in initialization. * It reads the root's super block * and initializes the current date * from the last modified date. * * panic: iinit -- cannot read the super * block. Usually because of an IO error. */ iinit() { register *cp, *bp; (*bdevsw[rootdev.d_major].d_open)(rootdev, 1); bp = fied device. * The algorithm stores up * to 100 I nodes in the super * block and throws away any more. */ ifree(dev, ino) { register *fp; fp = getfs(dev); if(fp->s_ilock) return; if(fp->s_ninode >= 100) return; fp->s_inode[fp->s_ninode++] = ino; fp->s_fmod = 1; } /* * getfs maps a device number into * a pointer to the incore super * block. * The algorithm is a linear * search through the mount table. * A consistency check of the * in core free-block and i-node * counts. * * bad count on dev x/y -- the count * check failed. At this point, all * the counts are zeroed which will * almost certainly lead to "no space" * diagnostic * panic: no fs -- the device is not mounted. * this "cannot happen" */ getfs(dev) { register struct mount *p; register char *n1, *n2; for(p = &mount[0]; p < &mount[NMOUNT]; p++) if(p->m_bufp != NULL && p->m_dev == dev) { p = p->m_bufp->b_addr; n1 = p->s_nfree; n2 = p->s_ninode; if(n1 > 100 || n2 > 100) { prdev("bad count", dev); p->s_nf ~IMOUNT; iput(ip); ip = mp->m_bufp; mp->m_bufp = NULL; brelse(ip); } /* * Common code for mount and umount. * Check that the user's argument is a reasonable * thing on which to mount, and return the device number if so. */ getmdev() { register d, *ip; extern uchar; ip = namei(&uchar, 0); if(ip == NULL) return; if((ip->i_mode&IFMT) != IFBLK) u.u_error = ENOTBLK; d = ip->i_addr[0]; if(ip->i_addr[0].d_major >= nblkdev) u.u_error = ENXIO; iput(ip); return(d); } re"; ip = namei(&schar, 1); if(ip == NULL) { if(u.u_error) return(0); ip = maknode(0666); if(ip == NULL) return(0); } if(!access(ip, IWRITE) && (ip->i_mode&IFMT) == 0 && u.u_uid == u.u_ruid) { itrunc(ip); u.u_offset[0] = 0; u.u_offset[1] = 0; u.u_base = &u; u.u_count = USIZE*64; u.u_segflg = 1; writei(ip); s = u.u_procp->p_size - USIZE; estabur(0, s, 0, 0); u.u_base = 0; u.u_count = s*64; u.u_segflg = 0; writei(ip); } iput(ip); return(u.u_error==0); } /*ree = 0; p->s_ninode = 0; } return(p); } panic("no fs"); } /* * update is the internal name of * 'sync'. It goes through the disk * queues to initiate sandbagged IO; * goes through the I nodes to write * modified nodes; and it goes through * the mount table to initiate modified * super blocks. */ update() { register struct inode *ip; register struct mount *mp; register *bp; if(updlock) return; updlock++; for(mp = &mount[0]; mp < &mount[NMOUNT]; mp++) if(mp->m_bufp != NULL) {  * grow the stack to include the SP * true return if successful. */ grow(sp) char *sp; { register a, si, i; if(sp >= -u.u_ssize*64) return(0); si = ldiv(-sp, 64) - u.u_ssize + SINCR; if(si <= 0) return(0); if(estabur(u.u_tsize, u.u_dsize, u.u_ssize+si, u.u_sep)) return(0); expand(u.u_procp->p_size+si); a = u.u_procp->p_addr + u.u_procp->p_size; for(i=u.u_ssize; i; i--) { a--; copyseg(a-si, a); } for(i=si; i; i--) clearseg(--a); u.u_ssize =+ si; return(1); } /* * sys-trace systip = mp->m_bufp->b_addr; if(ip->s_fmod==0 || ip->s_ilock!=0 || ip->s_flock!=0 || ip->s_ronly!=0) continue; bp = getblk(mp->m_dev, 1); ip->s_fmod = 0; ip->s_time[0] = time[0]; ip->s_time[1] = time[1]; bcopy(ip, bp->b_addr, 256); bwrite(bp); } for(ip = &inode[0]; ip < &inode[NINODE]; ip++) if((ip->i_flag&ILOCK) == 0) { ip->i_flag =| ILOCK; iupdat(ip, time); prele(ip); } updlock = 0; bflush(NODEV); } # /* */ #include "../param.h" #include "../systm.h" #include "../user.h" #include "../proc.h" #include "../inode.h" #include "../reg.h" /* * Priority for tracing */ #define IPCPRI (-1) /* * Structure to access an array of integers. */ struct { int inta[]; }; /* * Tracing variables. * Used to pass trace command from * parent to child being traced. * This data base cannot be * shared and is locked * per user. */ struct { int ip_lock; int ip_req; int ip_addr; int ip_data; } ipc; /* * Senem call. */ ptrace() { register struct proc *p; if (u.u_arg[2] <= 0) { u.u_procp->p_flag =| STRC; return; } for (p=proc; p < &proc[NPROC]; p++) if (p->p_stat==SSTOP && p->p_pid==u.u_arg[0] && p->p_ppid==u.u_procp->p_pid) goto found; u.u_error = ESRCH; return; found: while (ipc.ip_lock) sleep(&ipc, IPCPRI); ipc.ip_lock = p->p_pid; ipc.ip_data = u.u_ar0[R0]; ipc.ip_addr = u.u_arg[1] & ~01; ipc.ip_req = u.u_arg[2]; p->p_flag =& ~SWTED; setrun(p); while (ipc.ip_req > 0) # /* */ #include "../param.h" #include "../systm.h" #include "../reg.h" #include "../buf.h" #include "../filsys.h" #include "../user.h" #include "../inode.h" #include "../file.h" #include "../conf.h" /* * the fstat system call. */ fstat() { register *fp; fp = getf(u.u_ar0[R0]); if(fp == NULL) return; stat1(fp->f_inode, u.u_arg[0]); } /* * the stat system call. */ stat() { register ip; extern uchar; ip = namei(&uchar, 0); if(ip == NULL) return; stat1(ip, u.u_arg[1]); iput(ip); } /* d the specified signal to * all processes with 'tp' as its * controlling teletype. * Called by tty.c for quits and * interrupts. */ signal(tp, sig) { register struct proc *p; for(p = &proc[0]; p < &proc[NPROC]; p++) if(p->p_ttyp == tp) psignal(p, sig); } /* * Send the specified signal to * the specified process. */ psignal(p, sig) int *p; { register *rp; if(sig >= NSIG) return; rp = p; if(rp->p_sig != SIGKIL) rp->p_sig = sig; if(rp->p_stat > PUSER) rp->p_stat = PUSER; if(rp->p_sleep(&ipc, IPCPRI); u.u_ar0[R0] = ipc.ip_data; if (ipc.ip_req < 0) u.u_error = EIO; ipc.ip_lock = 0; wakeup(&ipc); } /* * Code that the child process * executes to implement the command * of the parent process in tracing. */ procxmt() { register int i; register int *p; if (ipc.ip_lock != u.u_procp->p_pid) return(0); i = ipc.ip_req; ipc.ip_req = 0; wakeup(&ipc); switch (i) { /* read user I */ case 1: if (fuibyte(ipc.ip_addr) == -1) goto error; ipc.ip_data = fuiword(ipc.ip_addr* The basic routine for fstat and stat: * get the inode and pass appropriate parts back. */ stat1(ip, ub) int *ip; { register i, *bp, *cp; iupdat(ip, time); bp = bread(ip->i_dev, ldiv(ip->i_number+31, 16)); cp = bp->b_addr + 32*lrem(ip->i_number+31, 16) + 24; ip = &(ip->i_dev); for(i=0; i<14; i++) { suword(ub, *ip++); ub =+ 2; } for(i=0; i<4; i++) { suword(ub, *cp++); ub =+ 2; } brelse(bp); } /* * the dup system call. */ dup() { register i, *fp; fp = getf(u.u_ar0[R0]); if(fp == Nstat == SWAIT) setrun(rp); } /* * Returns true if the current * process has a signal to process. * This is asked at least once * each time a process enters the * system. * A signal does not do anything * directly to a process; it sets * a flag that asks the process to * do something to itself. */ issig() { register n; register struct proc *p; p = u.u_procp; if(n = p->p_sig) { if (p->p_flag&STRC) { stop(); if ((n = p->p_sig) == 0) return(0); } if((u.u_signal[n]&1) == 0) r); break; /* read user D */ case 2: if (fubyte(ipc.ip_addr) == -1) goto error; ipc.ip_data = fuword(ipc.ip_addr); break; /* read u */ case 3: i = ipc.ip_addr; if (i<0 || i >= (USIZE<<6)) goto error; ipc.ip_data = u.inta[i>>1]; break; /* write user I (for now, always an error) */ case 4: if (suiword(ipc.ip_addr, 0) < 0) goto error; suiword(ipc.ip_addr, ipc.ip_data); break; /* write user D */ case 5: if (suword(ipc.ip_addr, 0) < 0) goto error; suword(ipc.ip_adULL) return; if ((i = ufalloc()) < 0) return; u.u_ofile[i] = fp; fp->f_count++; } /* * the mount system call. */ smount() { int d; register *ip; register struct mount *mp, *smp; extern uchar; d = getmdev(); if(u.u_error) return; u.u_dirp = u.u_arg[1]; ip = namei(&uchar, 0); if(ip == NULL) return; if(ip->i_count!=1 || (ip->i_mode&(IFBLK&IFCHR))!=0) goto out; smp = NULL; for(mp = &mount[0]; mp < &mount[NMOUNT]; mp++) { if(mp->m_bufp != NULL) { if(d == mp->m_dev) goto out;eturn(n); } return(0); } /* * Enter the tracing STOP state. * In this state, the parent is * informed and the process is able to * receive commands from the parent. */ stop() { register struct proc *pp, *cp; loop: cp = u.u_procp; if(cp->p_ppid != 1) for (pp = &proc[0]; pp < &proc[NPROC]; pp++) if (pp->p_pid == cp->p_ppid) { wakeup(pp); cp->p_stat = SSTOP; swtch(); if ((cp->p_flag&STRC)==0 || procxmt()) return; goto loop; } exit(); } /* * Perform the action specified bydr, ipc.ip_data); break; /* write u */ case 6: p = &u.inta[ipc.ip_addr>>1]; if (p >= u.u_fsav && p < &u.u_fsav[25]) goto ok; for (i=0; i<9; i++) if (p == &u.u_ar0[regloc[i]]) goto ok; goto error; ok: if (p == &u.u_ar0[RPS]) { ipc.ip_data =| 0170000; /* assure user space */ ipc.ip_data =& ~0340; /* priority 0 */ } *p = ipc.ip_data; break; /* set signal and continue */ case 7: u.u_procp->p_sig = ipc.ip_data; return(1); /* force exit */ case 8: exit(); defaul } else if(smp == NULL) smp = mp; } if(smp == NULL) goto out; (*bdevsw[d.d_major].d_open)(d, !u.u_arg[2]); if(u.u_error) goto out; mp = bread(d, 1); if(u.u_error) { brelse(mp); goto out1; } smp->m_inodp = ip; smp->m_dev = d; smp->m_bufp = getblk(NODEV); bcopy(mp->b_addr, smp->m_bufp->b_addr, 256); smp = smp->m_bufp->b_addr; smp->s_ilock = 0; smp->s_flock = 0; smp->s_ronly = u.u_arg[2] & 1; brelse(mp); ip->i_flag =| IMOUNT; prele(ip); return; out: u.u_error = EBUSY; out1:  * the current signal. * The usual sequence is: * if(issig()) * psig(); */ psig() { register n, p; register *rp; rp = u.u_procp; n = rp->p_sig; rp->p_sig = 0; if((p=u.u_signal[n]) != 0) { u.u_error = 0; if(n != SIGINS && n != SIGTRC) u.u_signal[n] = 0; n = u.u_ar0[R6] - 4; grow(n); suword(n+2, u.u_ar0[RPS]); suword(n, u.u_ar0[R7]); u.u_ar0[R6] = n; u.u_ar0[RPS] =& ~TBIT; u.u_ar0[R7] = p; return; } switch(n) { case SIGQIT: case SIGINS: case SIGTRC: case SIGIOT: cast: error: ipc.ip_req = -1; } return(0); }  iput(ip); } /* * the umount system call. */ sumount() { int d; register struct inode *ip; register struct mount *mp; update(); d = getmdev(); if(u.u_error) return; for(mp = &mount[0]; mp < &mount[NMOUNT]; mp++) if(mp->m_bufp!=NULL && d==mp->m_dev) goto found; u.u_error = EINVAL; return; found: for(ip = &inode[0]; ip < &inode[NINODE]; ip++) if(ip->i_number!=0 && d==ip->i_dev) { u.u_error = EBUSY; return; } (*bdevsw[d.d_major].d_close)(d, 0); ip = mp->m_inodp; ip->i_flag =&e SIGEMT: case SIGFPT: case SIGBUS: case SIGSEG: case SIGSYS: u.u_arg[0] = n; if(core()) n =+ 0200; } u.u_arg[0] = (u.u_ar0[R0]<<8) | n; exit(); } /* * Create a core image on the file "core" * If you are looking for protection glitches, * there are probably a wealth of them here * when this occurs to a suid command. * * It writes USIZE block of the * user.h area followed by the entire * data+stack segments. */ core() { register s, *ip; extern schar; u.u_error = 0; u.u_dirp = "co# /* */ #include "../param.h" #include "../systm.h" #include "../user.h" #include "../inode.h" #include "../file.h" #include "../reg.h" /* * Max allowable buffering per pipe. * This is also the max size of the * file created to implement the pipe. * If this size is bigger than 4096, * pipes will be implemented in LARG * files, which is probably not good. */ #define PIPSIZ 4096 /* * The sys-pipe entry. * Allocate an inode on the root device. * Allocate 2 file structures. * Put it all together with flags. */ pipe() { register *ip, *rf, *wf; int r; ip = ialloc(rootdev); if(ip == NULL) return; rf = falloc(); if(rf == NULL) { iput(ip); return; } r = u.u_ar0[R0]; wf = falloc(); if(wf == NULL) { rf->f_count = 0; u.u_ofile[r] = NULL; iput(ip); return; } u.u_ar0[R1] = u.u_ar0[R0]; u.u_ar0[R0] = r; wf->f_flag = FWRITE|FPIPE; wf->f_inode = ip; rf->f_flag = FREAD|FPIPE; rf->f_inode = ip; ip->i_count = 2; ip->i_flag = IACC|IUPD; ip->i_mode = IALLOC; } /* * Read call dir*/ 3, &ptrace, /* 26 = ptrace */ 0, &nosys, /* 27 = x */ 1, &fstat, /* 28 = fstat */ 0, &nosys, /* 29 = x */ 1, &nullsys, /* 30 = smdate; inoperative */ 1, &stty, /* 31 = stty */ 1, >ty, /* 32 = gtty */ 0, &nosys, /* 33 = x */ 0, &nice, /* 34 = nice */ 0, &sslep, /* 35 = sleep */ 0, &sync, /* 36 = sync */ 1, &kill, /* 37 = kill */ 0, &getswit, /* 38 = switch */ 0, &nosys, /* 39 = x */ 0, &nosys, /* 40 = x */ 0, &dup, /* 41 = dup */ 0, &pipe, /* 42 = pipe (u.u_dent.u_ino == 0) { if(eo == 0) eo = u.u_offset[1]; goto eloop; } for(cp = &u.u_dbuf[0]; cp < &u.u_dbuf[DIRSIZ]; cp++) if(*cp != cp[u.u_dent.u_name - u.u_dbuf]) goto eloop; /* * Here a component matched in a directory. * If there is more pathname, go back to * cloop, otherwise return. */ if(bp != NULL) brelse(bp); if(flag==2 && c=='\0') { if(access(dp, IWRITE)) goto out; return(dp); } bp = dp->i_dev; iput(dp); dp = iget(bp, u.u_dent.u_ino); if(dp == NULL) returected to a pipe. */ readp(fp) int *fp; { register *rp, *ip; rp = fp; ip = rp->f_inode; loop: /* * Very conservative locking. */ plock(ip); /* * If the head (read) has caught up with * the tail (write), reset both to 0. */ if(rp->f_offset[1] == ip->i_size1) { if(rp->f_offset[1] != 0) { rp->f_offset[1] = 0; ip->i_size1 = 0; if(ip->i_mode&IWRITE) { ip->i_mode =& ~IWRITE; wakeup(ip+1); } } /* * If there are not both reader and * writer active, return witho*/ 1, ×, /* 43 = times */ 4, &profil, /* 44 = prof */ 0, &nosys, /* 45 = tiu */ 0, &setgid, /* 46 = setgid */ 0, &getgid, /* 47 = getgid */ 2, &ssig, /* 48 = sig */ 0, &nosys, /* 49 = x */ 0, &nosys, /* 50 = x */ 0, &nosys, /* 51 = x */ 0, &nosys, /* 52 = x */ 0, &nosys, /* 53 = x */ 0, &nosys, /* 54 = x */ 0, &nosys, /* 55 = x */ 0, &nosys, /* 56 = x */ 0, &nosys, /* 57 = x */ 0, &nosys, /* 58 = x */ 0, &nosys, /* 59 = x */ 0, &nosys, /* 60 = x */ n(NULL); goto cloop; out: iput(dp); return(NULL); } /* * Return the next character from the * kernel string pointed at by dirp. */ schar() { return(*u.u_dirp++ & 0377); } /* * Return the next character from the * user string pointed at by dirp. */ uchar() { register c; c = fubyte(u.u_dirp++); if(c == -1) u.u_error = EFAULT; return(c); } ut * satisfying read. */ prele(ip); if(ip->i_count < 2) return; ip->i_mode =| IREAD; sleep(ip+2, PPIPE); goto loop; } /* * Read and return */ u.u_offset[0] = 0; u.u_offset[1] = rp->f_offset[1]; readi(ip); rp->f_offset[1] = u.u_offset[1]; prele(ip); } /* * Write call directed to a pipe. */ writep(fp) { register *rp, *ip, c; rp = fp; ip = rp->f_inode; c = u.u_count; loop: /* * If all done, return. */ plock(ip); if(c == 0) { prele(ip); u.u_count = 0; ret 0, &nosys, /* 61 = x */ 0, &nosys, /* 62 = x */ 0, &nosys /* 63 = x */ }; # /* */ /* * Structure of the coremap and swapmap * arrays. Consists of non-zero count * and base address of that many * contiguous units. * (The coremap unit is 64 bytes, * the swapmap unit is 512 bytes) * The addresses are increasing and * the list is terminated with the * first zero count. */ struct map { char *m_size; char *m_addr; }; /* * Allocate size units from the given * map. Return the base of the allocated * space. * Algorithm is first fit. */ malloc(mp, size) struct map *mp; urn; } /* * If there are not both read and * write sides of the pipe active, * return error and signal too. */ if(ip->i_count < 2) { prele(ip); u.u_error = EPIPE; psignal(u.u_procp, SIGPIPE); return; } /* * If the pipe is full, * wait for reads to deplete * and truncate it. */ if(ip->i_size1 == PIPSIZ) { ip->i_mode =| IWRITE; prele(ip); sleep(ip+1, PPIPE); goto loop; } /* * Write what is possible and * loop back. */ u.u_offset[0] = 0; u.u_offset[1] = ip-# #include "../param.h" #include "../inode.h" #include "../user.h" #include "../systm.h" #include "../buf.h" /* * Convert a pathname into a pointer to * an inode. Note that the inode is locked. * * func = function called to get next char of name * &uchar if name is in user space * &schar if name is in system space * flag = 0 if name is sought * 1 if name is to be created * 2 if name is to be deleted */ namei(func, flag) int (*func)(); { register struct inode *dp; register c; register char *cp;{ register int a; register struct map *bp; for (bp = mp; bp->m_size; bp++) { if (bp->m_size >= size) { a = bp->m_addr; bp->m_addr =+ size; if ((bp->m_size =- size) == 0) do { bp++; (bp-1)->m_addr = bp->m_addr; } while ((bp-1)->m_size = bp->m_size); return(a); } } return(0); } /* * Free the previously allocated space aa * of size units into the specified map. * Sort aa into map and combine on * one or both ends if possible. */ mfree(mp, size, aa) struct map *mp; >i_size1; u.u_count = min(c, PIPSIZ-u.u_offset[1]); c =- u.u_count; writei(ip); prele(ip); if(ip->i_mode&IREAD) { ip->i_mode =& ~IREAD; wakeup(ip+2); } goto loop; } /* * Lock a pipe. * If its already locked, * set the WANT bit and sleep. */ plock(ip) int *ip; { register *rp; rp = ip; while(rp->i_flag&ILOCK) { rp->i_flag =| IWANT; sleep(rp, PPIPE); } rp->i_flag =| ILOCK; } /* * Unlock a pipe. * If WANT bit is on, * wakeup. * This routine is also used * to unlock inodes in gene int eo, *bp; /* * If name starts with '/' start from * root; otherwise start from current dir. */ dp = u.u_cdir; if((c=(*func)()) == '/') dp = rootdir; iget(dp->i_dev, dp->i_number); while(c == '/') c = (*func)(); if(c == '\0' && flag != 0) { u.u_error = ENOENT; goto out; } cloop: /* * Here dp contains pointer * to last component matched. */ if(u.u_error) goto out; if(c == '\0') return(dp); /* * If there is another component, * dp must be a directory and * mus{ register struct map *bp; register int t; register int a; a = aa; for (bp = mp; bp->m_addr<=a && bp->m_size!=0; bp++); if (bp>mp && (bp-1)->m_addr+(bp-1)->m_size == a) { (bp-1)->m_size =+ size; if (a+size == bp->m_addr) { (bp-1)->m_size =+ bp->m_size; while (bp->m_size) { bp++; (bp-1)->m_addr = bp->m_addr; (bp-1)->m_size = bp->m_size; } } } else { if (a+size == bp->m_addr && bp->m_size) { bp->m_addr =- size; bp->m_size =+ size; } else if (size) do { t = bp->mral. */ prele(ip) int *ip; { register *rp; rp = ip; rp->i_flag =& ~ILOCK; if(rp->i_flag&IWANT) { rp->i_flag =& ~IWANT; wakeup(rp); } } t have x permission. */ if((dp->i_mode&IFMT) != IFDIR) { u.u_error = ENOTDIR; goto out; } if(access(dp, IEXEC)) goto out; /* * Gather up name into * users' dir buffer. */ cp = &u.u_dbuf[0]; while(c!='/' && c!='\0' && u.u_error==0) { if(cp < &u.u_dbuf[DIRSIZ]) *cp++ = c; c = (*func)(); } while(cp < &u.u_dbuf[DIRSIZ]) *cp++ = '\0'; while(c == '/') c = (*func)(); if(u.u_error) goto out; /* * Set up to search a directory. */ u.u_offset[1] = 0; u.u_offset[0] = 0; _addr; bp->m_addr = a; a = t; t = bp->m_size; bp->m_size = size; bp++; } while (size = t); } } # /* */ /* * This table is the switch used to transfer * to the appropriate routine for processing a system call. * Each row contains the number of arguments expected * and a pointer to the routine. */ int sysent[] { 0, &nullsys, /* 0 = indir */ 0, &rexit, /* 1 = exit */ 0, &fork, /* 2 = fork */ 2, &read, /* 3 = read */ 2, &write, /* 4 = write */ 2, &open, /* 5 = open */ 0, &close, /* 6 = close */ 0, &wait, /* 7 = wait */ 2, &creat, /* 8 = creat */ 2, &link, /*  u.u_segflg = 1; eo = 0; u.u_count = ldiv(dp->i_size1, DIRSIZ+2); bp = NULL; eloop: /* * If at the end of the directory, * the search failed. Report what * is appropriate as per flag. */ if(u.u_count == 0) { if(bp != NULL) brelse(bp); if(flag==1 && c=='\0') { if(access(dp, IWRITE)) goto out; u.u_pdir = dp; if(eo) u.u_offset[1] = eo-DIRSIZ-2; else dp->i_flag =| IUPD; return(NULL); } u.u_error = ENOENT; goto out; } /* * If offset is on a block boundary   9 = link */ 1, &unlink, /* 10 = unlink */ 2, &exec, /* 11 = exec */ 1, &chdir, /* 12 = chdir */ 0, >ime, /* 13 = time */ 3, &mknod, /* 14 = mknod */ 2, &chmod, /* 15 = chmod */ 2, &chown, /* 16 = chown */ 1, &sbreak, /* 17 = break */ 2, &stat, /* 18 = stat */ 2, &seek, /* 19 = seek */ 0, &getpid, /* 20 = getpid */ 3, &smount, /* 21 = mount */ 1, &sumount, /* 22 = umount */ 0, &setuid, /* 23 = setuid */ 0, &getuid, /* 24 = getuid */ 0, &stime, /* 25 = stime , * read the next directory block. * Release previous if it exists. */ if((u.u_offset[1]&0777) == 0) { if(bp != NULL) brelse(bp); bp = bread(dp->i_dev, bmap(dp, ldiv(u.u_offset[1], 512))); } /* * Note first empty directory slot * in eo for possible creat. * String compare the directory entry * and the current component. * If they do not match, go back to eloop. */ bcopy(bp->b_addr+(u.u_offset[1]&0777), &u.u_dent, (DIRSIZ+2)/2); u.u_offset[1] =+ DIRSIZ+2; u.u_count--; if# /* */ #include "../param.h" #include "../user.h" #include "../filsys.h" #include "../file.h" #include "../conf.h" #include "../inode.h" #include "../reg.h" /* * Convert a user supplied * file descriptor into a pointer * to a file structure. * Only task is to check range * of the descriptor. */ getf(f) { register *fp, rf; rf = f; if(rf<0 || rf>=NOFILE) goto bad; fp = u.u_ofile[rf]; if(fp != NULL) return(fp); bad: u.u_error = EBADF; return(NULL); } /* * Internal form of close. * Decrement reference count on * file structure and call closei * on last closef. * Also make sure the pipe protocol * does not constipate. */ closef(fp) int *fp; { register *rfp, *ip; rfp = fp; if(rfp->f_flag&FPIPE) { ip = rfp->f_inode; ip->i_mode =& ~(IREAD|IWRITE); wakeup(ip+1); wakeup(ip+2); } if(rfp->f_count <= 1) closei(rfp->f_inode, rfp->f_flag&FWRITE); rfp->f_count--; } /* * Decrement reference count on an * inode due to the removal of a * referencing file structure. * On the la# #include "../param.h" #include "../systm.h" #include "../user.h" #include "../proc.h" #define UMODE 0170000 #define SCHMAG 10 /* * clock is called straight from * the real time clock interrupt. * * Functions: * reprime clock * copy *switches to display * implement callouts * maintain user/system times * maintain date * profile * tout wakeup (sys sleep) * lightning bolt wakeup (every 4 sec) * alarm clock signals * jab the scheduler */ clock(dev, sp, r1, nps, r0, pc, ps) { register struct ll of core */ updlock = 0; i = *ka6 + USIZE; UISD->r[0] = 077406; for(;;) { UISA->r[0] = i; if(fuibyte(0) < 0) break; clearseg(i); maxmem++; mfree(coremap, 1, i); i++; } if(cputype == 70) for(i=0; i<62; i=+2) { UBMAP->r[i] = i<<12; UBMAP->r[i+1] = 0; } printf("mem = %l\n", maxmem*5/16); printf("RESTRICTED RIGHTS\n\n"); printf("Use, duplication or disclosure is subject to\n"); printf("restrictions stated in Contract with Western\n"); printf("Electric Company, Inc.\n"); mast closei, switchout * to the close entry point of special * device handler. * Note that the handler gets called * on every open and only on the last * close. */ closei(ip, rw) int *ip; { register *rip; register dev, maj; rip = ip; dev = rip->i_addr[0]; maj = rip->i_addr[0].d_major; if(rip->i_count <= 1) switch(rip->i_mode&IFMT) { case IFCHR: (*cdevsw[maj].d_close)(dev, rw); break; case IFBLK: (*bdevsw[maj].d_close)(dev, rw); } iput(rip); } /* * openi called to allow handler * ocallo *p1, *p2; register struct proc *pp; /* * restart clock */ *lks = 0115; /* * display register */ display(); /* * callouts * if none, just return * else update first non-zero time */ if(callout[0].c_func == 0) goto out; p2 = &callout[0]; while(p2->c_time<=0 && p2->c_func!=0) p2++; p2->c_time--; /* * if ps is high, just return */ if((ps&0340) != 0) goto out; /* * callout */ spl5(); if(callout[0].c_time <= 0) { p1 = &callout[0]; while(p1->c_func !xmem = min(maxmem, MAXMEM); mfree(swapmap, nswap, swplo); /* * determine clock */ UISA->r[7] = ka6[1]; /* io segment */ UISD->r[7] = 077406; lks = CLOCK1; if(fuiword(lks) == -1) { lks = CLOCK2; if(fuiword(lks) == -1) panic("no clock"); } /* * set up system process */ proc[0].p_addr = *ka6; proc[0].p_size = USIZE; proc[0].p_stat = SRUN; proc[0].p_flag =| SLOAD|SSYS; u.u_procp = &proc[0]; /* * set up 'known' i-nodes */ *lks = 0115; cinit(); binit(); iinit(); rootdirf special files to initialize and * validate before actual IO. * Called on all sorts of opens * and also on mount. */ openi(ip, rw) int *ip; { register *rip; register dev, maj; rip = ip; dev = rip->i_addr[0]; maj = rip->i_addr[0].d_major; switch(rip->i_mode&IFMT) { case IFCHR: if(maj >= nchrdev) goto bad; (*cdevsw[maj].d_open)(dev, rw); break; case IFBLK: if(maj >= nblkdev) goto bad; (*bdevsw[maj].d_open)(dev, rw); } return; bad: u.u_error = ENXIO; } /* * Check mode perm= 0 && p1->c_time <= 0) { (*p1->c_func)(p1->c_arg); p1++; } p2 = &callout[0]; while(p2->c_func = p1->c_func) { p2->c_time = p1->c_time; p2->c_arg = p1->c_arg; p1++; p2++; } } /* * lightning bolt time-out * and time of day */ out: if((ps&UMODE) == UMODE) { u.u_utime++; if(u.u_prof[3]) incupc(pc, u.u_prof); } else u.u_stime++; pp = u.u_procp; if(++pp->p_cpu == 0) pp->p_cpu--; if(++lbolt >= HZ) { if((ps&0340) != 0) return; lbolt =- HZ; if(++time[1] = = iget(rootdev, ROOTINO); rootdir->i_flag =& ~ILOCK; u.u_cdir = iget(rootdev, ROOTINO); u.u_cdir->i_flag =& ~ILOCK; /* * make init process * enter scheduling loop * with system process */ if(newproc()) { expand(USIZE+1); estabur(0, 1, 0, 0); copyout(icode, 0, sizeof icode); /* * Return goes to loc. 0 of user init * code just copied out. */ return; } sched(); } /* * Load the user hardware segmentation * registers from the software prototype. * The software registers mission on inode pointer. * Mode is READ, WRITE or EXEC. * In the case of WRITE, the * read-only status of the file * system is checked. * Also in WRITE, prototype text * segments cannot be written. * The mode is shifted to select * the owner/group/other fields. * The super user is granted all * permissions except for EXEC where * at least one of the EXEC bits must * be on. */ access(aip, mode) int *aip; { register *ip, m; ip = aip; m = mode; if(m == IWRITE) { if(getfs(ip->i_dev)->s_ronly= 0) ++time[0]; spl1(); if(time[1]==tout[1] && time[0]==tout[0]) wakeup(tout); if((time[1]&03) == 0) { runrun++; wakeup(&lbolt); } for(pp = &proc[0]; pp < &proc[NPROC]; pp++) if (pp->p_stat) { if(pp->p_time != 127) pp->p_time++; if((pp->p_cpu & 0377) > SCHMAG) pp->p_cpu =- SCHMAG; else pp->p_cpu = 0; if(pp->p_pri > PUSER) setpri(pp); } if(runin!=0) { runin = 0; wakeup(&runin); } if((ps&UMODE) == UMODE) { u.u_ar0 = &r0; if(issig()) psigust have * been setup prior by estabur. */ sureg() { register *up, *rp, a; a = u.u_procp->p_addr; up = &u.u_uisa[16]; rp = &UISA->r[16]; if(cputype == 40) { up =- 8; rp =- 8; } while(rp > &UISA->r[0]) *--rp = *--up + a; if((up=u.u_procp->p_textp) != NULL) a =- up->x_caddr; up = &u.u_uisd[16]; rp = &UISD->r[16]; if(cputype == 40) { up =- 8; rp =- 8; } while(rp > &UISD->r[0]) { *--rp = *--up; if((*rp & WO) == 0) rp[(UISA-UISD)/2] =- a; } } /* * Set up software prototype s != 0) { u.u_error = EROFS; return(1); } if(ip->i_flag & ITEXT) { u.u_error = ETXTBSY; return(1); } } if(u.u_uid == 0) { if(m == IEXEC && (ip->i_mode & (IEXEC | (IEXEC>>3) | (IEXEC>>6))) == 0) goto bad; return(0); } if(u.u_uid != ip->i_uid) { m =>> 3; if(u.u_gid != ip->i_gid) m =>> 3; } if((ip->i_mode&m) != 0) return(0); bad: u.u_error = EACCES; return(1); } /* * Look up a pathname and test if * the resultant inode is owned by the * current user. * If not(); setpri(u.u_procp); } } } /* * timeout is called to arrange that * fun(arg) is called in tim/HZ seconds. * An entry is sorted into the callout * structure. The time in each structure * entry is the number of HZ's more * than the previous entry. * In this way, decrementing the * first entry has the effect of * updating all entries. */ timeout(fun, arg, tim) { register struct callo *p1, *p2; register t; int s; t = tim; s = PS->integ; p1 = &callout[0]; spl7(); while(p1->c_func != 0egmentation * registers to implement the 3 pseudo * text,data,stack segment sizes passed * as arguments. * The argument sep specifies if the * text and data+stack segments are to * be separated. */ estabur(nt, nd, ns, sep) { register a, *ap, *dp; if(sep) { if(cputype == 40) goto err; if(nseg(nt) > 8 || nseg(nd)+nseg(ns) > 8) goto err; } else if(nseg(nt)+nseg(nd)+nseg(ns) > 8) goto err; if(nt+nd+ns+USIZE > maxmem) goto err; a = 0; ap = &u.u_uisa[0]; dp = &u.u_uisd[0]; while(n, try for super-user. * If permission is granted, * return inode pointer. */ owner() { register struct inode *ip; extern uchar(); if ((ip = namei(uchar, 0)) == NULL) return(NULL); if(u.u_uid == ip->i_uid) return(ip); if (suser()) return(ip); iput(ip); return(NULL); } /* * Test if the current user is the * super user. */ suser() { if(u.u_uid == 0) return(1); u.u_error = EPERM; return(0); } /* * Allocate a user file descriptor. */ ufalloc() { register i; for (i=0; ic_time <= t) { t =- p1->c_time; p1++; } p1->c_time =- t; p2 = p1; while(p2->c_func != 0) p2++; while(p2 >= p1) { (p2+1)->c_time = p2->c_time; (p2+1)->c_func = p2->c_func; (p2+1)->c_arg = p2->c_arg; p2--; } p1->c_time = t; p1->c_func = fun; p1->c_arg = arg; PS->integ = s; } t >= 128) { *dp++ = (127<<8) | RO; *ap++ = a; a =+ 128; nt =- 128; } if(nt) { *dp++ = ((nt-1)<<8) | RO; *ap++ = a; } if(sep) while(ap < &u.u_uisa[8]) { *ap++ = 0; *dp++ = 0; } a = USIZE; while(nd >= 128) { *dp++ = (127<<8) | RW; *ap++ = a; a =+ 128; nd =- 128; } if(nd) { *dp++ = ((nd-1)<<8) | RW; *ap++ = a; a =+ nd; } while(ap < &u.u_uisa[8]) { *dp++ = 0; *ap++ = 0; } if(sep) while(ap < &u.u_uisa[16]) { *dp++ = 0; *ap++ = 0; } a =+ ns; while(ns >= 128)+) if (u.u_ofile[i] == NULL) { u.u_ar0[R0] = i; return(i); } u.u_error = EMFILE; return(-1); } /* * Allocate a user file descriptor * and a file structure. * Initialize the descriptor * to point at the file structure. * * no file -- if there are no available * file structures. */ falloc() { register struct file *fp; register i; if ((i = ufalloc()) < 0) return(NULL); for (fp = &file[0]; fp < &file[NFILE]; fp++) if (fp->f_count==0) { u.u_ofile[i] = fp; fp->f_count++; fp# #include "../param.h" #include "../user.h" #include "../systm.h" #include "../proc.h" #include "../text.h" #include "../inode.h" #include "../seg.h" #define CLOCK1 0177546 #define CLOCK2 0172540 /* * Icode is the octal bootstrap * program executed in user mode * to bring up the system. */ int icode[] { 0104413, /* sys exec; init; initp */ 0000014, 0000010, 0000777, /* br . */ 0000014, /* initp: init; 0 */ 0000000, 0062457, /* init: */ 0061564, 0064457, 0064556, 0000164, }; /  ->f_offset[0] = 0; fp->f_offset[1] = 0; return(fp); } printf("no file\n"); u.u_error = ENFILE; return(NULL); } * * Initialization code. * Called from m40.s or m45.s as * soon as a stack and segmentation * have been established. * Functions: * clear and free user core * find which clock is configured * hand craft 0th process * call all initialization routines * fork - process 0 to schedule * - process 1 execute bootstrap * * panic: no clock -- neither clock responds * loop at loc 6 in user mode -- /etc/init * cannot be executed. */ main() { extern schar; register i, *p; /* * zero and free a { a =- 128; ns =- 128; *--dp = (127<<8) | RW; *--ap = a; } if(ns) { *--dp = ((128-ns)<<8) | RW | ED; *--ap = a-128; } if(!sep) { ap = &u.u_uisa[0]; dp = &u.u_uisa[8]; while(ap < &u.u_uisa[8]) *dp++ = *ap++; ap = &u.u_uisd[0]; dp = &u.u_uisd[8]; while(ap < &u.u_uisd[8]) *dp++ = *ap++; } sureg(); return(0); err: u.u_error = ENOMEM; return(-1); } /* * Return the arg/128 rounded up. */ nseg(n) { return((n+127)>>7); } # /* */ #include "../param.h" #include "../inode.h" #include "../user.h" #include "../buf.h" #include "../conf.h" #include "../systm.h" /* * Read the file corresponding to * the inode pointed at by the argument. * The actual read arguments are found * in the variables: * u_base core address for destination * u_offset byte offset in file * u_count number of bytes to read * u_segflg read to kernel/user */ readi(aip) struct inode *aip; { int *bp; int lbn, bn, on; register dn, n; register stru #&o out; } } if(u.u_error) return; ip = maknode(u.u_arg[1]); if (ip==NULL) return; ip->i_addr[0] = u.u_arg[2]; out: iput(ip); } /* * sleep system call * not to be confused with the sleep internal routine. */ sslep() { char *d[2]; spl7(); d[0] = time[0]; d[1] = time[1]; dpadd(d, u.u_ar0[R0]); while(dpcmp(d[0], d[1], time[0], time[1]) > 0) { if(dpcmp(tout[0], tout[1], time[0], time[1]) <= 0 || dpcmp(tout[0], tout[1], d[0], d[1]) > 0) { tout[0] = d[0]; tout[1] = d[1]; } ct inode *ip; ip = aip; if(u.u_count == 0) return; ip->i_flag =| IACC; if((ip->i_mode&IFMT) == IFCHR) { (*cdevsw[ip->i_addr[0].d_major].d_read)(ip->i_addr[0]); return; } do { lbn = bn = lshift(u.u_offset, -9); on = u.u_offset[1] & 0777; n = min(512-on, u.u_count); if((ip->i_mode&IFMT) != IFBLK) { dn = dpcmp(ip->i_size0&0377, ip->i_size1, u.u_offset[0], u.u_offset[1]); if(dn <= 0) return; n = min(n, dn); if ((bn = bmap(ip, lbn)) == 0) return; dn = ip->i_dev; # #include "../param.h" #include "../systm.h" #include "../user.h" #include "../reg.h" #include "../file.h" #include "../inode.h" /* * read system call */ read() { rdwr(FREAD); } /* * write system call */ write() { rdwr(FWRITE); } /* * common code for read and write calls: * check permissions, set base, count, and offset, * and switch out to readi, writei, or pipe code. */ rdwr(mode) { register *fp, m; m = mode; fp = getf(u.u_ar0[R0]); if(fp == NULL) return; if((fp->f_flag&m) == 0) { sleep(tout, PSLEP); } spl0(); }  } else { dn = ip->i_addr[0]; rablock = bn+1; } if (ip->i_lastr+1 == lbn) bp = breada(dn, bn, rablock); else bp = bread(dn, bn); ip->i_lastr = lbn; iomove(bp, on, n, B_READ); brelse(bp); } while(u.u_error==0 && u.u_count!=0); } /* * Write the file corresponding to * the inode pointed at by the argument. * The actual write arguments are found * in the variables: * u_base core address for source * u_offset byte offset in file * u_count number of bytes to write * u_segflg wru.u_error = EBADF; return; } u.u_base = u.u_arg[0]; u.u_count = u.u_arg[1]; u.u_segflg = 0; if(fp->f_flag&FPIPE) { if(m==FREAD) readp(fp); else writep(fp); } else { u.u_offset[1] = fp->f_offset[1]; u.u_offset[0] = fp->f_offset[0]; if(m==FREAD) readi(fp->f_inode); else writei(fp->f_inode); dpadd(fp->f_offset, u.u_arg[1]-u.u_count); } u.u_ar0[R0] = u.u_arg[1]-u.u_count; } /* * open system call */ open() { register *ip; extern uchar; ip = namei(&uchar, 0); if(ip == NULL)!$'(+.147:=)ite to kernel/user */ writei(aip) struct inode *aip; { int *bp; int n, on; register dn, bn; register struct inode *ip; ip = aip; ip->i_flag =| IACC|IUPD; if((ip->i_mode&IFMT) == IFCHR) { (*cdevsw[ip->i_addr[0].d_major].d_write)(ip->i_addr[0]); return; } if (u.u_count == 0) return; do { bn = lshift(u.u_offset, -9); on = u.u_offset[1] & 0777; n = min(512-on, u.u_count); if((ip->i_mode&IFMT) != IFBLK) { if ((bn = bmap(ip, bn)) == 0) return; dn = ip->i_dev; } else dn =  return; u.u_arg[1]++; open1(ip, u.u_arg[1], 0); } /* * creat system call */ creat() { register *ip; extern uchar; ip = namei(&uchar, 1); if(ip == NULL) { if(u.u_error) return; ip = maknode(u.u_arg[1]&07777&(~ISVTX)); if (ip==NULL) return; open1(ip, FWRITE, 2); } else open1(ip, FWRITE, 1); } /* * common code for open and creat. * Check permissions, allocate an open file structure, * and call the device open routine if any. */ open1(ip, mode, trf) int *ip; { register struct# /* */ #include "../param.h" #include "../systm.h" #include "../user.h" #include "../proc.h" #include "../buf.h" #include "../reg.h" #include "../inode.h" /* * exec system call. * Because of the fact that an I/O buffer is used * to store the caller's arguments during exec, * and more buffers are needed to read in the text file, * deadly embraces waiting for free buffers are possible. * Therefore the number of processes simultaneously * running in exec has to be limited to NEXEC. */ #define EXPRIip->i_addr[0]; if(n == 512) bp = getblk(dn, bn); else bp = bread(dn, bn); iomove(bp, on, n, B_WRITE); if(u.u_error != 0) brelse(bp); else if ((u.u_offset[1]&0777)==0) bawrite(bp); else bdwrite(bp); if(dpcmp(ip->i_size0&0377, ip->i_size1, u.u_offset[0], u.u_offset[1]) < 0 && (ip->i_mode&(IFBLK&IFCHR)) == 0) { ip->i_size0 = u.u_offset[0]; ip->i_size1 = u.u_offset[1]; } ip->i_flag =| IUPD; } while(u.u_error==0 && u.u_count!=0); } /* * Return the logical maximum * file *fp; register *rip, m; int i; rip = ip; m = mode; if(trf != 2) { if(m&FREAD) access(rip, IREAD); if(m&FWRITE) { access(rip, IWRITE); if((rip->i_mode&IFMT) == IFDIR) u.u_error = EISDIR; } } if(u.u_error) goto out; if(trf) itrunc(rip); prele(rip); if ((fp = falloc()) == NULL) goto out; fp->f_flag = m&(FREAD|FWRITE); fp->f_inode = rip; i = u.u_ar0[R0]; openi(rip, m&FWRITE); if(u.u_error == 0) return; u.u_ofile[i] = NULL; fp->f_count--; out: iput(rip); } /*  -1 exec() { int ap, na, nc, *bp; int ts, ds, sep; register c, *ip; register char *cp; extern uchar; /* * pick up file names * and check various modes * for execute permission */ ip = namei(&uchar, 0); if(ip == NULL) return; while(execnt >= NEXEC) sleep(&execnt, EXPRI); execnt++; bp = getblk(NODEV); if(access(ip, IEXEC) || (ip->i_mode&IFMT)!=0) goto bad; /* * pack up arguments into * allocated disk buffer */ cp = bp->b_addr; na = 0; nc = 0; while(ap = fuword(u.u_arg of the 2 arguments. */ max(a, b) char *a, *b; { if(a > b) return(a); return(b); } /* * Return the logical minimum * of the 2 arguments. */ min(a, b) char *a, *b; { if(a < b) return(a); return(b); } /* * Move 'an' bytes at byte location * &bp->b_addr[o] to/from (flag) the * user/kernel (u.segflg) area starting at u.base. * Update all the arguments by the number * of bytes moved. * * There are 2 algorithms, * if source address, dest address and count * are all even in a user copy, * * close system call */ close() { register *fp; fp = getf(u.u_ar0[R0]); if(fp == NULL) return; u.u_ofile[u.u_ar0[R0]] = NULL; closef(fp); } /* * seek system call */ seek() { int n[2]; register *fp, t; fp = getf(u.u_ar0[R0]); if(fp == NULL) return; if(fp->f_flag&FPIPE) { u.u_error = ESPIPE; return; } t = u.u_arg[1]; if(t > 2) { n[1] = u.u_arg[0]<<9; n[0] = u.u_arg[0]>>7; if(t == 3) n[0] =& 0777; } else { n[1] = u.u_arg[0]; n[0] = 0; if(t!=0 && n[1]<0) n[0] = -1; [1])) { na++; if(ap == -1) goto bad; u.u_arg[1] =+ 2; for(;;) { c = fubyte(ap++); if(c == -1) goto bad; *cp++ = c; nc++; if(nc > 510) { u.u_error = E2BIG; goto bad; } if(c == 0) break; } } if((nc&1) != 0) { *cp++ = 0; nc++; } /* * read in first 8 bytes * of file for segment * sizes: * w0 = 407/410/411 (410 implies RO text) (411 implies sep ID) * w1 = text size * w2 = data size * w3 = bss size */ u.u_base = &u.u_arg[0]; u.u_count = then the machine language copyin/copyout * is called. * If not, its done byte-by-byte with * cpass and passc. */ iomove(bp, o, an, flag) struct buf *bp; { register char *cp; register int n, t; n = an; cp = bp->b_addr + o; if(u.u_segflg==0 && ((n | cp | u.u_base)&01)==0) { if (flag==B_WRITE) cp = copyin(u.u_base, cp, n); else cp = copyout(cp, u.u_base, n); if (cp) { u.u_error = EFAULT; return; } u.u_base =+ n; dpadd(u.u_offset, n); u.u_count =- n; return; } if (flag== } switch(t) { case 1: case 4: n[0] =+ fp->f_offset[0]; dpadd(n, fp->f_offset[1]); break; default: n[0] =+ fp->f_inode->i_size0&0377; dpadd(n, fp->f_inode->i_size1); case 0: case 3: ; } fp->f_offset[1] = n[1]; fp->f_offset[0] = n[0]; } /* * link system call */ link() { register *ip, *xp; extern uchar; ip = namei(&uchar, 0); if(ip == NULL) return; if(ip->i_nlink >= 127) { u.u_error = EMLINK; goto out; } if((ip->i_mode&IFMT)==IFDIR && !suser()) goto out; /* * unlo 8; u.u_offset[1] = 0; u.u_offset[0] = 0; u.u_segflg = 1; readi(ip); u.u_segflg = 0; if(u.u_error) goto bad; sep = 0; if(u.u_arg[0] == 0407) { u.u_arg[2] =+ u.u_arg[1]; u.u_arg[1] = 0; } else if(u.u_arg[0] == 0411) sep++; else if(u.u_arg[0] != 0410) { u.u_error = ENOEXEC; goto bad; } if(u.u_arg[1]!=0 && (ip->i_flag&ITEXT)==0 && ip->i_count!=1) { u.u_error = ETXTBSY; goto bad; } /* * find text and data sizes * try them out for possible * exceed of max sizes */ ts = (B_WRITE) { while(n--) { if ((t = cpass()) < 0) return; *cp++ = t; } } else while (n--) if(passc(*cp++) < 0) return; } ck to avoid possibly hanging the namei */ ip->i_flag =& ~ILOCK; u.u_dirp = u.u_arg[1]; xp = namei(&uchar, 1); if(xp != NULL) { u.u_error = EEXIST; iput(xp); } if(u.u_error) goto out; if(u.u_pdir->i_dev != ip->i_dev) { iput(u.u_pdir); u.u_error = EXDEV; goto out; } wdir(ip); ip->i_nlink++; ip->i_flag =| IUPD; out: iput(ip); } /* * mknod system call */ mknod() { register *ip; extern uchar; if(suser()) { ip = namei(&uchar, 1); if(ip != NULL) { u.u_error = EEXIST; got(u.u_arg[1]+63)>>6) & 01777; ds = ((u.u_arg[2]+u.u_arg[3]+63)>>6) & 01777; if(estabur(ts, ds, SSIZE, sep)) goto bad; /* * allocate and clear core * at this point, committed * to the new image */ u.u_prof[3] = 0; xfree(); expand(USIZE); xalloc(ip); c = USIZE+ds+SSIZE; expand(c); while(--c >= USIZE) clearseg(u.u_procp->p_addr+c); /* * read in data segment */ estabur(0, ds, 0, 0); u.u_base = 0; u.u_offset[1] = 020+u.u_arg[1]; u.u_count = u.u_arg[2]; readi(ip); /* * initialize stack segment */ u.u_tsize = ts; u.u_dsize = ds; u.u_ssize = SSIZE; u.u_sep = sep; estabur(u.u_tsize, u.u_dsize, u.u_ssize, u.u_sep); cp = bp->b_addr; ap = -nc - na*2 - 4; u.u_ar0[R6] = ap; suword(ap, na); c = -nc; while(na--) { suword(ap=+2, c); do subyte(c++, *cp); while(*cp++); } suword(ap+2, -1); /* * set SUID/SGID protections, if no tracing */ if ((u.u_procp->p_flag&STRC)==0) { if(ip->i_mode&ISUID) if(u.u_uid != 0) { u.u_uid = ip->i_uid; u.u_procp->p_r; a = u.u_procp->p_addr + n - u.u_ssize; i = n; n = u.u_ssize; while(n--) { copyseg(a-d, a); a++; } expand(i); return; bigger: expand(n); a = u.u_procp->p_addr + n; n = u.u_ssize; while(n--) { a--; copyseg(a-d, a); } while(d--) clearseg(--a); }  rp = p1; a = rp->p_size; if((rp=rp->p_textp) != NULL) if(rp->x_ccount == 0) a =+ rp->x_size; if((a=malloc(coremap, a)) != NULL) goto found2; /* * none found, * look around for easy core */ spl6(); for(rp = &proc[0]; rp < &proc[NPROC]; rp++) if((rp->p_flag&(SSYS|SLOCK|SLOAD))==SLOAD && (rp->p_stat == SWAIT || rp->p_stat==SSTOP)) goto found1; /* * no easy core, * if this process is deserving, * look around for * oldest process in core */ if(n < 3) goto sloop; n uid = ip->i_uid; } if(ip->i_mode&ISGID) u.u_gid = ip->i_gid; } /* * clear sigs, regs and return */ c = ip; for(ip = &u.u_signal[0]; ip < &u.u_signal[NSIG]; ip++) if((*ip & 1) == 0) *ip = 0; for(cp = ®loc[0]; cp < ®loc[6];) u.u_ar0[*cp++] = 0; u.u_ar0[R7] = 0; for(ip = &u.u_fsav[0]; ip < &u.u_fsav[25];) *ip++ = 0; ip = c; bad: iput(ip); brelse(bp); if(execnt >= NEXEC) wakeup(&execnt); execnt--; } /* * exit system call: * pass back caller's r0 */ rexit() { u.u/258;>*-0369<?@CFIL= -1; for(rp = &proc[0]; rp < &proc[NPROC]; rp++) if((rp->p_flag&(SSYS|SLOCK|SLOAD))==SLOAD && (rp->p_stat==SRUN || rp->p_stat==SSLEEP) && rp->p_time > n) { p1 = rp; n = rp->p_time; } if(n < 2) goto sloop; rp = p1; /* * swap user out */ found1: spl0(); rp->p_flag =& ~SLOAD; xswap(rp, 1, 0); goto loop; /* * swap user in */ found2: if((rp=p1->p_textp) != NULL) { if(rp->x_ccount == 0) { if(swap(rp->x_daddr, a, rp->x_size, B_READ)) goto swaper; rp->x_caddr = a;_arg[0] = u.u_ar0[R0] << 8; exit(); } /* * Release resources. * Save u. area for parent to look at. * Enter zombie state. * Wake up parent and init processes, * and dispose of children. */ exit() { register int *q, a; register struct proc *p; u.u_procp->p_flag =& ~STRC; for(q = &u.u_signal[0]; q < &u.u_signal[NSIG];) *q++ = 1; for(q = &u.u_ofile[0]; q < &u.u_ofile[NOFILE]; q++) if(a = *q) { *q = NULL; closef(a); } iput(u.u_cdir); xfree(); a = malloc(swapmap, 1); if(a == NULL) # /* */ #include "../param.h" #include "../user.h" #include "../proc.h" #include "../text.h" #include "../systm.h" #include "../file.h" #include "../inode.h" #include "../buf.h" /* * Give up the processor till a wakeup occurs * on chan, at which time the process * enters the scheduling queue at priority pri. * The most important effect of pri is that when * pri<0 a signal cannot disturb the sleep; * if pri>=0 signals will be processed. * Callers of this routine must be prepared for * premature re a =+ rp->x_size; } rp->x_ccount++; } rp = p1; if(swap(rp->p_addr, a, rp->p_size, B_READ)) goto swaper; mfree(swapmap, (rp->p_size+7)/8, rp->p_addr); rp->p_addr = a; rp->p_flag =| SLOAD; rp->p_time = 0; goto loop; swaper: panic("swap error"); } /* * This routine is called to reschedule the CPU. * if the calling process is not in RUN state, * arrangements for it to restart must have * been made elsewhere, usually by calling via sleep. */ swtch() { static struct proc *p; register i, panic("out of swap"); p = getblk(swapdev, a); bcopy(&u, p->b_addr, 256); bwrite(p); q = u.u_procp; mfree(coremap, q->p_size, q->p_addr); q->p_addr = a; q->p_stat = SZOMB; loop: for(p = &proc[0]; p < &proc[NPROC]; p++) if(q->p_ppid == p->p_pid) { wakeup(&proc[1]); wakeup(p); for(p = &proc[0]; p < &proc[NPROC]; p++) if(q->p_pid == p->p_ppid) { p->p_ppid = 1; if (p->p_stat == SSTOP) setrun(p); } swtch(); /* no return */ } q->p_ppid = 1; goto loop; } /* * Wait system calturn, and check that the reason for * sleeping has gone away. */ sleep(chan, pri) { register *rp, s; s = PS->integ; rp = u.u_procp; if(pri >= 0) { if(issig()) goto psig; spl6(); rp->p_wchan = chan; rp->p_stat = SWAIT; rp->p_pri = pri; spl0(); if(runin != 0) { runin = 0; wakeup(&runin); } swtch(); if(issig()) goto psig; } else { spl6(); rp->p_wchan = chan; rp->p_stat = SSLEEP; rp->p_pri = pri; spl0(); swtch(); } PS->integ = s; return; /* * If priorit n; register struct proc *rp; if(p == NULL) p = &proc[0]; /* * Remember stack of caller */ savu(u.u_rsav); /* * Switch to scheduler's stack */ retu(proc[0].p_addr); loop: runrun = 0; rp = p; p = NULL; n = 128; /* * Search for highest-priority runnable process */ i = NPROC; do { rp++; if(rp >= &proc[NPROC]) rp = &proc[0]; if(rp->p_stat==SRUN && (rp->p_flag&SLOAD)!=0) { if(rp->p_pri < n) { p = rp; n = rp->p_pri; } } } while(--i); /* * If no process is l. * Search for a terminated (zombie) child, * finally lay it to rest, and collect its status. * Look also for stopped (traced) children, * and pass back status from them. */ wait() { register f, *bp; register struct proc *p; f = 0; loop: for(p = &proc[0]; p < &proc[NPROC]; p++) if(p->p_ppid == u.u_procp->p_pid) { f++; if(p->p_stat == SZOMB) { u.u_ar0[R0] = p->p_pid; bp = bread(swapdev, f=p->p_addr); mfree(swapmap, 1, f); p->p_stat = NULL; p->p_pid = 0; p->p_ppid = 0; p-y was low (>=0) and * there has been a signal, * execute non-local goto to * the qsav location. * (see trap1/trap.c) */ psig: aretu(u.u_qsav); } /* * Wake up all processes sleeping on chan. */ wakeup(chan) { register struct proc *p; register c, i; c = chan; p = &proc[0]; i = NPROC; do { if(p->p_wchan == c) { setrun(p); } p++; } while(--i); } /* * Set the process running; * arrange for it to be swapped in if necessary. */ setrun(p) { register struct proc *rp; rp = p; rprunnable, idle. */ if(p == NULL) { p = rp; idle(); goto loop; } rp = p; curpri = n; /* * Switch to stack of the new process and set up * his segmentation registers. */ retu(rp->p_addr); sureg(); /* * If the new process paused because it was * swapped out, set the stack level to the last call * to savu(u_ssav). This means that the return * which is executed immediately after the call to aretu * actually returns from the last routine which did * the savu. * * You are not>p_sig = 0; p->p_ttyp = 0; p->p_flag = 0; p = bp->b_addr; u.u_cstime[0] =+ p->u_cstime[0]; dpadd(u.u_cstime, p->u_cstime[1]); dpadd(u.u_cstime, p->u_stime); u.u_cutime[0] =+ p->u_cutime[0]; dpadd(u.u_cutime, p->u_cutime[1]); dpadd(u.u_cutime, p->u_utime); u.u_ar0[R1] = p->u_arg[0]; brelse(bp); return; } if(p->p_stat == SSTOP) { if((p->p_flag&SWTED) == 0) { p->p_flag =| SWTED; u.u_ar0[R0] = p->p_pid; u.u_ar0[R1] = (p->p_sig<<8) | 0177; return; } ->p_wchan = 0; rp->p_stat = SRUN; if(rp->p_pri < curpri) runrun++; if(runout != 0 && (rp->p_flag&SLOAD) == 0) { runout = 0; wakeup(&runout); } } /* * Set user priority. * The rescheduling flag (runrun) * is set if the priority is higher * than the currently running process. */ setpri(up) { register *pp, p; pp = up; p = (pp->p_cpu & 0377)/16; p =+ PUSER + pp->p_nice; if(p > 127) p = 127; if(p > curpri) runrun++; pp->p_pri = p; } /* * The main loop of the scheduling (swapping) * expected to understand this. */ if(rp->p_flag&SSWAP) { rp->p_flag =& ~SSWAP; aretu(u.u_ssav); } /* * The value returned here has many subtle implications. * See the newproc comments. */ return(1); } /* * Create a new process-- the internal version of * sys fork. * It returns 1 in the new process. * How this happens is rather hard to understand. * The essential fact is that the new process is created * in such a way that appears to have started executing * in the same call to newproc p->p_flag =& ~(STRC|SWTED); setrun(p); } } if(f) { sleep(u.u_procp, PWAIT); goto loop; } u.u_error = ECHILD; } /* * fork system call. */ fork() { register struct proc *p1, *p2; p1 = u.u_procp; for(p2 = &proc[0]; p2 < &proc[NPROC]; p2++) if(p2->p_stat == NULL) goto found; u.u_error = EAGAIN; goto out; found: if(newproc()) { u.u_ar0[R0] = p1->p_pid; u.u_cstime[0] = 0; u.u_cstime[1] = 0; u.u_stime = 0; u.u_cutime[0] = 0; u.u_cutime[1] = 0; u.u_utime = 0; return;  process. * The basic idea is: * see if anyone wants to be swapped in; * swap out processes until there is room; * swap him in; * repeat. * Although it is not remarkably evident, the basic * synchronization here is on the runin flag, which is * slept on and is set once per second by the clock routine. * Core shuffling therefore takes place once per second. * * panic: swap error -- IO error while swapping. * this is the one panic that should be * handled in a less drastic way. Its * very ha as the parent; * but in fact the code that runs is that of swtch. * The subtle implication of the returned value of swtch * (see above) is that this is the value that newproc's * caller in the new process sees. */ newproc() { int a1, a2; struct proc *p, *up; register struct proc *rpp; register *rip, n; p = NULL; /* * First, just locate a slot for a process * and copy the useful info from this process into it. * The panic "cannot happen" because fork has already * checked for the existen} u.u_ar0[R0] = p2->p_pid; out: u.u_ar0[R7] =+ 2; } /* * break system call. * -- bad planning: "break" is a dirty word in C. */ sbreak() { register a, n, d; int i; /* * set n to new data size * set d to new-old * set n to new total size */ n = (((u.u_arg[0]+63)>>6) & 01777); if(!u.u_sep) n =- nseg(u.u_tsize) * 128; if(n < 0) n = 0; d = n - u.u_dsize; n =+ USIZE+u.u_ssize; if(estabur(u.u_tsize, u.u_dsize+d, u.u_ssize, u.u_sep)) return; u.u_dsize =+ d; if(d > 0) goto biggerd. */ sched() { struct proc *p1; register struct proc *rp; register a, n; /* * find user to swap in * of users ready, select one out longest */ goto loop; sloop: runin++; sleep(&runin, PSWP); loop: spl6(); n = -1; for(rp = &proc[0]; rp < &proc[NPROC]; rp++) if(rp->p_stat==SRUN && (rp->p_flag&SLOAD)==0 && rp->p_time > n) { p1 = rp; n = rp->p_time; } if(n == -1) { runout++; sleep(&runout, PSWP); goto loop; } /* * see if there is core for that process */ spl0();ce of a slot. */ retry: mpid++; if(mpid < 0) { mpid = 0; goto retry; } for(rpp = &proc[0]; rpp < &proc[NPROC]; rpp++) { if(rpp->p_stat == NULL && p==NULL) p = rpp; if (rpp->p_pid==mpid) goto retry; } if ((rpp = p)==NULL) panic("no procs"); /* * make proc entry for new proc */ rip = u.u_procp; up = rip; rpp->p_stat = SRUN; rpp->p_flag = SLOAD; rpp->p_uid = rip->p_uid; rpp->p_ttyp = rip->p_ttyp; rpp->p_nice = rip->p_nice; rpp->p_textp = rip->p_textp; rpp->p_pid = mpid;  rpp->p_ppid = rip->p_pid; rpp->p_time = 0; /* * make duplicate entries * where needed */ for(rip = &u.u_ofile[0]; rip < &u.u_ofile[NOFILE];) if((rpp = *rip++) != NULL) rpp->f_count++; if((rpp=up->p_textp) != NULL) { rpp->x_count++; rpp->x_ccount++; } u.u_cdir->i_count++; /* * Partially simulate the environment * of the new process so that when it is actually * created (by copying) it will look right. */ savu(u.u_rsav); rpp = p; u.u_procp = rpp; rip = up; n = rip->p_sizeUNT]; ip++) if(ip->m_inodp == p) { dev = ip->m_dev; ino = ROOTINO; goto loop; } panic("no imt"); } p->i_count++; p->i_flag =| ILOCK; return(p); } if(ip==NULL && p->i_count==0) ip = p; } if((p=ip) == NULL) { printf("Inode table overflow\n"); u.u_error = ENFILE; return(NULL); } p->i_dev = dev; p->i_number = ino; p->i_flag = ILOCK; p->i_count++; p->i_lastr = -1; ip = bread(dev, ldiv(ino+31,16)); /* * Check I/O errors */ if (ip->b_flags&B_ERROR)Dx & 6  w h 5555_@ @mȥ-@ @mH7 y  Av=@ @m5N %f@ pTof & 5N @ pN %o u- _( \ 5 \ 5 _ % @ T X 7 @ T 7 S P L7 p  5 lf > 7@<87 6  o@ &T 5 > N; a1 = rip->p_addr; rpp->p_size = n; a2 = malloc(coremap, n); /* * If there is not enough core for the * new process, swap out the current process to generate the * copy. */ if(a2 == NULL) { rip->p_stat = SIDL; rpp->p_addr = a1; savu(u.u_ssav); xswap(rpp, 0, 0); rpp->p_flag =| SSWAP; rip->p_stat = SRUN; } else { /* * There is core, so just copy. */ rpp->p_addr = a2; while(n--) copyseg(a1++, a2++); } u.u_procp = rip; return(0); } /* * Change the size of the data+sta { brelse(ip); iput(p); return(NULL); } ip1 = ip->b_addr + 32*lrem(ino+31, 16); ip2 = &p->i_mode; while(ip2 < &p->i_addr[8]) *ip2++ = *ip1++; brelse(ip); return(p); } /* * Decrement reference count of * an inode structure. * On the last reference, * write the inode out and if necessary, * truncate and deallocate the file. */ iput(p) struct inode *p; { register *rp; rp = p; if(rp->i_count == 1) { rp->i_flag =| ILOCK; if(rp->i_nlink <= 0) { itrunc(rp); rp->i_mode = 0; ifr x  > N X  u- [ X5  @ A pu-@ @ @ @ 0   %% o|  > w<w * j w(w 7 &@e77 @e7f @_ z  4%#  @e7@e75 RARWp Aa1ARWp Aa1 R%R Z 7~0 Z 7j0@eT7^@eT7H7 Fifck regions of the process. * If the size is shrinking, it's easy-- just release the extra core. * If it's growing, and there is core, just allocate it * and copy the image, taking care to reset registers to account * for the fact that the system's stack has moved. * If there is no core, arrange for the process to be swapped * out after adjusting the size requirement-- when it comes * in, enough core will be allocated. * Because of the ssave and SSWAP flags, control will * resume after the swap in see(rp->i_dev, rp->i_number); } iupdat(rp, time); prele(rp); rp->i_flag = 0; rp->i_number = 0; } rp->i_count--; prele(rp); } /* * Check accessed and update flags on * an inode structure. * If either is on, update the inode * with the corresponding dates * set to the argument tm. */ iupdat(p, tm) int *p; int *tm; { register *ip1, *ip2, *rp; int *bp, i; rp = p; if((rp->i_flag&(IUPD|IACC)) != 0) { if(getfs(rp->i_dev)->s_ronly) return; i = rp->i_number+31; bp = bread(rp->i_dev,   & 7"  & X #T &    $   z  z w w - ?5 5%#__ _%a%z%A%Z%__*N  d5%a%z%A%Z%0%9%_  Nf Z 5%%- __-    5% @wr %_@p N b 5%  bwtch, which executes the return * from this stack level. * * After the expansion, the caller will take care of copying * the user's stack towards or away from the data area. */ expand(newsize) { int i, n; register *p, a1, a2; p = u.u_procp; n = p->p_size; p->p_size = newsize; a1 = p->p_addr; if(n >= newsize) { mfree(coremap, n-newsize, a1+newsize); return; } savu(u.u_rsav); a2 = malloc(coremap, newsize); if(a2 == NULL) { savu(u.u_ssav); xswap(p, 1, n); p->p_flag =| SSWAP; swtch(ldiv(i,16)); ip1 = bp->b_addr + 32*lrem(i, 16); ip2 = &rp->i_mode; while(ip2 < &rp->i_addr[8]) *ip1++ = *ip2++; if(rp->i_flag&IACC) { *ip1++ = time[0]; *ip1++ = time[1]; } else ip1 =+ 2; if(rp->i_flag&IUPD) { *ip1++ = *tm++; *ip1++ = *tm; } bwrite(bp); } } /* * Free all the disk blocks associated * with the specified inode structure. * The blocks of the file are removed * in reverse order. This FILO * algorithm will tend to maintain * a contiguous free list much lon@5%'%"TN  %  N %\ 4  *5@-7 %)? 5%  - f N0  |v_N  5% _ %_@ _w * <O X Nf X   w w e-T  e-e7w w  w w 7 @/w  h5%/ Z5%/ ` F7|%*7 r 45@X7z  y-6); /* no return */ } p->p_addr = a2; for(i=0; ip_addr); sureg(); } ger * than FIFO. */ itrunc(ip) int *ip; { register *rp, *bp, *cp; int *dp, *ep; rp = ip; if((rp->i_mode&(IFCHR&IFBLK)) != 0) return; for(ip = &rp->i_addr[7]; ip >= &rp->i_addr[0]; ip--) if(*ip) { if((rp->i_mode&ILARG) != 0) { bp = bread(rp->i_dev, *ip); for(cp = bp->b_addr+512; cp >= bp->b_addr; cp--) if(*cp) { if(ip == &rp->i_addr[7]) { dp = bread(rp->i_dev, *cp); for(ep = dp->b_addr+512; ep >= dp->b_addr; ep--) if(*ep) free(rp->i_dev, *ep); brelse(dp); 22  *w   45- z   5  w@w  u5 um@ 5A 7ruWp mu8uu@ H@ ȋ@e@- Nf J @w:TWp m:Be ( 5 @@mH  % w  w@5   w@ w 5 u 5 / @ 5%% @ ȥ.@w@ w *RUADGJMPS } free(rp->i_dev, *cp); } brelse(bp); } free(rp->i_dev, *ip); *ip = 0; } rp->i_mode =& ~ILARG; rp->i_size0 = 0; rp->i_size1 = 0; rp->i_flag =| IUPD; } /* * Make a new file. */ maknode(mode) { register *ip; ip = ialloc(u.u_pdir->i_dev); if (ip==NULL) return(NULL); ip->i_flag =| IACC|IUPD; ip->i_mode = mode|IALLOC; ip->i_nlink = 1; ip->i_uid = u.u_uid; ip->i_gid = u.u_gid; wdir(ip); return(ip); } /* * Write a directory entry with * parameters left as side effects *  u@ ȋ@p@ww  57Nf Nb X  Ne @-@E5% %N| X d@tE %q X wzw h  A H@wRw @N %ou@ 5@ H@ ȋ wu@e5w   wN jw ~w De   % w7 7 ׯ - (w 7  .w eB J ӕ- R r f # #include "../param.h" #include "../systm.h" #include "../user.h" #include "../inode.h" #include "../filsys.h" #include "../conf.h" #include "../buf.h" /* * Look up an inode by device,inumber. * If it is in core (in the inode structure), * honor the locking protocol. * If it is not in core, read it in from the * specified device. * If the inode is mounted on, perform * the indicated indirection. * In all cases, a pointer to a locked * inode structure is returned. * * printf warning: no inodes -to a call to namei. */ wdir(ip) int *ip; { register char *cp1, *cp2; u.u_dent.u_ino = ip->i_number; cp1 = &u.u_dent.u_name[0]; for(cp2 = &u.u_dbuf[0]; cp2 < &u.u_dbuf[DIRSIZ];) *cp1++ = *cp2++; u.u_count = DIRSIZ+2; u.u_segflg = 1; u.u_base = &u.u_dent; writei(u.u_pdir); iput(u.u_pdir); } e0 @ >>  ҋ D~8  ӕ0 $f v Le0 9e    7 we&  m   ~    ~ w7 z  p l 0   X Wp `e0eӕ?f@  ,6 P , &  @f  T7r  T  -  f@w fw.w*  w~fwp7 fwJA 7 - if the inode * structure is full * panic: no imt -- if the mounted file * system is not in the mount table. * "cannot happen" */ iget(dev, ino) { register struct inode *p; register *ip2; int *ip1; register struct mount *ip; loop: ip = NULL; for(p = &inode[0]; p < &inode[NINODE]; p++) { if(dev==p->i_dev && ino==p->i_number) { if((p->i_flag&ILOCK) != 0) { p->i_flag =| IWANT; sleep(p, PINOD); goto loop; } if((p->i_flag&IMOUNT) != 0) { for(ip = &mount[0]; ip < &mount[NMOBEHKNQTWX[L fAW,f B@ 8 @&61fA   @ @e7v1@ 1wfwXwTw fw>AQ  OfA  ^ y   F y @0fA  @9 fA @e&7w7@w7 fAW @wz fV1V7n 5 ewZ 5& w& L& H& D& @& <&~ 8&x 4&r 0&l ,&f (&` $&Z &T &N &H &B &< &6 &0 &* f& fw~w f "& w }f@fA w,6w"0e"w"&ew"@lw"Alew &@t`e @& HADCBF7F2cpvpl~ */usr/fort/fc1/usr/fort/fc2%s: as-f.tmp1/bin/asa.outa.outmove failed: %s ld-x/lib/fr0.o-lf/lib/filib.a-l/bin/ldf.tmp1de# /* */ /* * RP disk driver */ #include "../param.h" #include "../buf.h" #include "../conf.h" #include "../user.h" struct { int rpds; int rper; int rpcs; int rpwc; int rpba; int rpca; int rpda; }; #define RPADDR 0176710 #define NRP 8 struct { char *nblocks; int cyloff; } rp_sizes[] { 40600, 0, /* cyl 0 thru 202 */ 40600, 203, /* cyl 203 thru 405 */ 9200, 0, /* cyl 0 thru 45 */ 9200, 360, /* cyl 360 thru 405 */ -1, 0, /* cyl 0 thru 327 */ -1, 78, /* cyl 78 thru 405 */ 15600, 0, SED; spl0(); } else pcleader(); } pcread() { register int c; spl4(); do { while ((c = getc(&pc11.pcin)) < 0) { if (pc11.pcstate==EOF) goto out; if ((PCADDR->pcrcsr&(ERROR|BUSY|DONE))==0) PCADDR->pcrcsr =| IENABLE|RDRENB; sleep(&pc11.pcin, PCIPRI); } } while (passc(c)>=0); out: spl0(); } pcwrite() { register int c; while ((c=cpass())>=0) pcoutput(c); } pcstart() { register int c; if (PCADDR->pcpcsr&DONE && (c = getc(&pc11.pcout)) >= 0) PCADDR->pcpbuf = c; } pcrinfineincludeCan't creat %s Undefined controlNested 'include'Missing file %sControl syntax%d: Line overflowCan't find %s Try again Fatal error in %s d$ o x` fn e c s l| rT  0 %ew /* cyl 0 thru 77 */ 15600, 328, /* cyl 328 thru 405 */ }; struct devtab rptab; struct buf rrpbuf; #define GO 01 #define RESET 0 #define HSEEK 014 #define IENABLE 0100 #define READY 0200 #define SUFU 01000 #define SUSU 02000 #define SUSI 04000 #define HNF 010000 /* * Use av_back to save track+sector, * b_resid for cylinder. */ #define trksec av_back #define cylin b_resid rpstrategy(abp) struct buf *abp; { register struct buf *bp; register char *p1, *p2; bp = abp; if(bp->b_flags&B_PHYS) mat() { if (pc11.pcstate==WAITING) { if (PCADDR->pcrcsr&ERROR) return; pc11.pcstate = READING; } if (pc11.pcstate==READING) { if (PCADDR->pcrcsr&ERROR) pc11.pcstate = EOF; else { putc(PCADDR->pcrbuf, &pc11.pcin); if (pc11.pcin.cc < PCIHWAT) PCADDR->pcrcsr =| IENABLE|RDRENB; } wakeup(&pc11.pcin); } } pcpint() { pcstart(); if (pc11.pcout.cc <= PCOLWAT) wakeup(&pc11.pcout); } pcoutput(c) { if (PCADDR->pcpcsr&ERROR) { u.u_error = EIO; return; } if (pc11.pcout.cc >= PC# /* */ /* * Memory special file * minor device 0 is physical memory * minor device 1 is kernel memory * minor device 2 is EOF/RATHOLE */ #include "../param.h" #include "../user.h" #include "../conf.h" #include "../seg.h" mmread(dev) { register c, bn, on; int a, d; if(dev.d_minor == 2) return; do { bn = lshift(u.u_offset, -6); on = u.u_offset[1] & 077; a = UISA->r[0]; d = UISD->r[0]; spl7(); UISA->r[0] = bn; UISD->r[0] = 077406; if(dev.d_minor == 1) UISA->r[0] = (ka6-6)->rpalloc(bp); p1 = &rp_sizes[bp->b_dev.d_minor&07]; if (bp->b_dev.d_minor >= (NRP<<3) || bp->b_blkno >= p1->nblocks) { bp->b_flags =| B_ERROR; iodone(bp); return; } bp->av_forw = 0; bp->cylin = p1->cyloff; p1 = bp->b_blkno; p2 = lrem(p1, 10); p1 = ldiv(p1, 10); bp->trksec = (p1%20)<<8 | p2; bp->cylin =+ p1/20; spl5(); if ((p1 = rptab.d_actf)==0) rptab.d_actf = bp; else { for (; p2 = p1->av_forw; p1 = p2) { if (p1->cylin <= bp->cylin && bp->cylin < p2->cylin || p1->cylinOHWAT) sleep(&pc11.pcout, PCOPRI); putc(c, &pc11.pcout); spl4(); pcstart(); spl0(); } pcleader() { register int i; i = 100; do pcoutput(0); while (--i); } [(bn>>7)&07] + (bn & 0177); c = fuibyte(on); UISA->r[0] = a; UISD->r[0] = d; spl0(); } while(u.u_error==0 && passc(c)>=0); } mmwrite(dev) { register c, bn, on; int a, d; if(dev.d_minor == 2) { c = u.u_count; u.u_count = 0; u.u_base =+ c; dpadd(u.u_offset, c); return; } for(;;) { bn = lshift(u.u_offset, -6); on = u.u_offset[1] & 077; if ((c=cpass())<0 || u.u_error!=0) break; a = UISA->r[0]; d = UISD->r[0]; spl7(); UISA->r[0] = bn; UISD->r[0] = 077406; if(dev.d_m >= bp->cylin && bp->cylin > p2->cylin) break; } bp->av_forw = p2; p1->av_forw = bp; } if (rptab.d_active==0) rpstart(); spl0(); } rpstart() { register struct buf *bp; if ((bp = rptab.d_actf) == 0) return; rptab.d_active++; RPADDR->rpda = bp->trksec; devstart(bp, &RPADDR->rpca, bp->cylin, bp->b_dev.d_minor>>3); } rpintr() { register struct buf *bp; register int ctr; if (rptab.d_active == 0) return; bp = rptab.d_actf; rptab.d_active = 0; if (RPADDR->rpcs < 0) { /* errfilopsvy|inor == 1) UISA->r[0] = (ka6-6)->r[(bn>>7)&07] + (bn & 0177); suibyte(on, c); UISA->r[0] = a; UISD->r[0] = d; spl0(); } } or bit */ deverror(bp, RPADDR->rper, RPADDR->rpds); if(RPADDR->rpds & (SUFU|SUSI|HNF)) { RPADDR->rpcs.lobyte = HSEEK|GO; ctr = 0; while ((RPADDR->rpds&SUSU) && --ctr); } RPADDR->rpcs = RESET|GO; ctr = 0; while ((RPADDR->rpcs&READY) == 0 && --ctr); if (++rptab.d_errcnt <= 10) { rpstart(); return; } bp->b_flags =| B_ERROR; } rptab.d_errcnt = 0; rptab.d_actf = bp->av_forw; bp->b_resid = RPADDR->rpwc; iodone(bp); rpstart(); } rpread(dev) { if(rpphys(dev)) physio(rpstra# /* */ /* * TJU16 tape driver */ #include "../param.h" #include "../buf.h" #include "../conf.h" #include "../user.h" struct { int htcs1; int htwc; int htba; int htfc; int htcs2; int htds; int hter; int htas; int htck; int htdb; int htmr; int htdt; int htsn; int httc; int htbae; /* 11/70 bus extension */ }; struct devtab httab; struct buf rhtbuf; #define NUNIT 8 char h_openf[NUNIT]; char *h_blkno[NUNIT]; char *h_nxrec[NUNIT]; #define HTADDR 0172440 #define GO 01 #define NOP 0 #defi# /* */ /* * RF disk driver */ #include "../param.h" #include "../buf.h" #include "../conf.h" #include "../user.h" struct { int rfcs; int rfwc; int rfba; int rfda; int rfdae; }; struct devtab rftab; struct buf rrfbuf; #define NRFBLK 1024 #define RFADDR 0177460 #define GO 01 #define RCOM 02 #define WCOM 04 #define CTLCLR 0400 #define IENABLE 0100 rfstrategy(abp) struct buf *abp; { register struct buf *bp; bp = abp; if(bp->b_flags&B_PHYS) mapalloc(bp); if (bp->b_blkno >= NRFBLK*(bp->b_detegy, &rrpbuf, dev, B_READ); } rpwrite(dev) { if(rpphys(dev)) physio(rpstrategy, &rrpbuf, dev, B_WRITE); } rpphys(dev) { register c; c = lshift(u.u_offset, -9); c =+ ldiv(u.u_count+511, 512); if(c > rp_sizes[dev.d_minor & 07].nblocks) { u.u_error = ENXIO; return(0); } return(1); } ne WEOF 026 #define SFORW 030 #define SREV 032 #define ERASE 024 #define REW 06 #define CLR 010 #define P800 01300 /* 800 + pdp11 mode */ #define P1600 02300 /* 1600 + pdp11 mode */ #define IENABLE 0100 #define CRDY 0200 #define EOF 04 #define DRY 0200 #define MOL 010000 #define PIP 020000 #define ERR 040000 #define SSEEK 1 #define SIO 2 htopen(dev, flag) { register unit; unit = dev.d_minor&077; if (unit >= NUNIT || h_openf[unit]) u.u_error = ENXIO; else { h_openf[unit]++; h_blkno[unit] = 0; v.d_minor+1)) { bp->b_flags =| B_ERROR; iodone(bp); return; } bp->av_forw = 0; spl5(); if (rftab.d_actf==0) rftab.d_actf = bp; else rftab.d_actl->av_forw = bp; rftab.d_actl = bp; if (rftab.d_active==0) rfstart(); spl0(); } rfstart() { register struct buf *bp; if ((bp = rftab.d_actf) == 0) return; rftab.d_active++; RFADDR->rfdae = bp->b_blkno.hibyte; devstart(bp, &RFADDR->rfda, bp->b_blkno<<8, 0); } rfintr() { register struct buf *bp; if (rftab.d_active == 0) return; bp = # /* */ /* * PC-11 Paper tape reader/punch driver */ #include "../param.h" #include "../conf.h" #include "../user.h" #define PCADDR 0177550 #define CLOSED 0 #define WAITING 1 #define READING 2 #define EOF 3 #define RDRENB 01 #define IENABLE 0100 #define DONE 0200 #define BUSY 04000 #define ERROR 0100000 #define PCIPRI 30 #define PCOPRI 40 #define PCOLWAT 50 #define PCOHWAT 100 #define PCIHWAT 250 struct { int pcrcsr; int pcrbuf; int pcpcsr; int pcpbuf; }; struct clist { int cc; int cf; int h_nxrec[unit] = 65535; hcommand(dev, NOP); } } htclose(dev, flag) { register int unit; unit = dev.d_minor&077; h_openf[unit] = 0; if (flag) { hcommand(dev, WEOF); hcommand(dev, WEOF); } hcommand(dev, REW); } hcommand(dev, com) { register unit; extern lbolt; unit = dev.d_minor; while (httab.d_active || (HTADDR->htcs1 & CRDY)==0) sleep(&lbolt, 1); HTADDR->htcs2 = (unit>>3)&07; while((HTADDR->htds&DRY) == 0) sleep(&lbolt, 1); if(unit >= 64) HTADDR->httc = P800 | (unit&07); else rftab.d_actf; rftab.d_active = 0; if (RFADDR->rfcs < 0) { /* error bit */ deverror(bp, RFADDR->rfcs, RFADDR->rfdae); RFADDR->rfcs = CTLCLR; if (++rftab.d_errcnt <= 10) { rfstart(); return; } bp->b_flags =| B_ERROR; } rftab.d_errcnt = 0; rftab.d_actf = bp->av_forw; iodone(bp); rfstart(); } rfread(dev) { physio(rfstrategy, &rrfbuf, dev, B_READ); } rfwrite(dev) { physio(rfstrategy, &rrfbuf, dev, B_WRITE); }  cl; }; struct pc11 { int pcstate; struct clist pcin; struct clist pcout; } pc11; pcopen(dev, flag) { extern lbolt; if (flag==0) { if (pc11.pcstate!=CLOSED) { u.u_error = ENXIO; return; } pc11.pcstate = WAITING; while(pc11.pcstate==WAITING) { PCADDR->pcrcsr = IENABLE|RDRENB; sleep(&lbolt, PCIPRI); } } else { PCADDR->pcpcsr =| IENABLE; pcleader(); } } pcclose(dev, flag) { if (flag==0) { spl4(); while (getc(&pc11.pcin) >= 0); PCADDR->pcrcsr = 0; pc11.pcstate = CLO HTADDR->httc = P1600 | (unit&07); while((HTADDR->htds&(MOL|PIP)) != MOL) sleep(&lbolt, 1); HTADDR->htcs1 = com | GO; } htstrategy(abp) struct buf *abp; { register struct buf *bp; register char **p; bp = abp; p = &h_nxrec[bp->b_dev.d_minor&077]; if (*p <= bp->b_blkno) { if (*p < bp->b_blkno) { bp->b_flags =| B_ERROR; iodone(bp); return; } if (bp->b_flags&B_READ) { clrbuf(bp); iodone(bp); return; } } if ((bp->b_flags&B_READ)==0) *p = bp->b_blkno + 1; bp->av_forw = 0; spl5(); if (httab.d_actf==0) httab.d_actf = bp; else httab.d_actl->av_forw = bp; httab.d_actl = bp; if (httab.d_active==0) htstart(); spl0(); } htstart() { register struct buf *bp; register int unit; register char *blkno; loop: if ((bp = httab.d_actf) == 0) return; unit = bp->b_dev.d_minor; HTADDR->htcs2 = (unit>>3)&07; if(unit >= 64) HTADDR->httc = P800 | (unit&07); else HTADDR->httc = P1600 | (unit&07); unit =& 077; blkno = h_blkno[unit]; if (h_openf[unit] < 0 || (HTADD0) { com =| TREV; tctab.d_active = SREV; } *tccmp = com; } tcintr() { register struct buf *bp; register int *tccmp; register int *tcdtp; tccmp = &TCADDR->tccm; tcdtp = &TCADDR->tccsr; bp = tctab.d_actf; if (*tccmp&TAPERR) { if((*tcdtp&(ENDZ|BLKM)) == 0) deverror(bp, *tcdtp, 0); if(*tcdtp & (ILGOP|SELERR)) { tcper[bp->b_dev&07]++; tctab.d_errcnt = 0; } *tccmp =& ~TAPERR; if (--tctab.d_errcnt <= 0) { bp->b_flags =| B_ERROR; goto done; } if (*tccmp&TREV) { setforwdp_bufp; int dp_nxmit; char dp_state; char dp_timer; int dp_proc; } dp11; /* device registers */ struct { int dprcsr; char dprbuf; char dpsyn0; int dptcsr; char dptbuf; char dpsyn1; }; /* bits */ #define ODDPAR 010000 #define IENABLE 0100 #define HDUPLX 02 #define CTRANS 0100000 #define RORUN 040000 #define RING 020000 #define DSRDY 010000 #define CARRIER 04000 #define DONE 0200 #define IENABLE 0100 #define SIENABL 040 #define WRITE 1 #define READ 0 #define DTRDY 01 #define RCVACT 04000 #defR->htcs1 & CRDY)==0) { bp->b_flags =| B_ERROR; httab.d_actf = bp->av_forw; iodone(bp); goto loop; } if (blkno != bp->b_blkno) { httab.d_active = SSEEK; if (blkno < bp->b_blkno) { HTADDR->htfc = blkno - bp->b_blkno; HTADDR->htcs1 = SFORW|IENABLE|GO; } else { if (bp->b_blkno == 0) HTADDR->htcs1 = REW|IENABLE|GO; else { HTADDR->htfc = bp->b_blkno - blkno; HTADDR->htcs1 = SREV|IENABLE|GO; } } return; } httab.d_active = SIO; rhstart(bp, &HTADDR->htfc, bp->b_wcoun: tctab.d_active = SFORW; *tccmp =& ~TREV; } else { setback: tctab.d_active = SREV; *tccmp =| TREV; } (*tccmp).lobyte = IENABLE|RNUM|GO; return; } tcdtp = &TCADDR->tcdt; switch (tctab.d_active) { case SIO: done: tctab.d_active = 0; if (tctab.d_actf = bp->av_forw) tcstart(); else TCADDR->tccm.lobyte = SAT|GO; iodone(bp); return; case SFORW: if (*tcdtp > bp->b_blkno) goto setback; if (*tcdtp < bp->b_blkno) goto setforw; *--tcdtp = bp->b_addr; /* core ine DPADDR 0174770 #define DPPRI 5 #define SYN 026 /* (receive) sync character */ /* * The open fails unless the device is not open or * the opening process is the one that has it open already. */ dpopen(dev, flag) { int dptimeout(); if (dp11.dp_proc!=0 && dp11.dp_proc!=u.u_procp) { u.u_error = ENXIO; return; } dp11.dp_proc = u.u_procp; dp11.dp_state = READ; if (dp11.dp_buf==0) { dp11.dp_buf = getblk(NODEV); dp11.dp_bufp = dp11.dp_buf->b_addr; dp11.dp_timer = HZ; timeout(dptimeout, 0t<<1, &HTADDR->htbae); } htintr() { register struct buf *bp; register int unit; if ((bp = httab.d_actf)==0) return; unit = bp->b_dev.d_minor&077; if (HTADDR->htcs1 & ERR) { /* deverror(bp, HTADDR->hter, 0); */ if(HTADDR->htds&EOF) { if(bp != &rhtbuf && h_openf[unit]) h_openf[unit] = -1; } HTADDR->htcs1 = ERR|CLR|GO; if ((HTADDR->htds&DRY)!=0 && httab.d_active==SIO) { if (++httab.d_errcnt < 10) { h_blkno[unit]++; httab.d_active = 0; htstart(); return; } } address */ *--tcdtp = bp->b_wcount; tccmp->lobyte = ((bp->b_xmem & 03) << 4) | IENABLE|GO | (bp->b_flags&B_READ?RDATA:WDATA); tctab.d_active = SIO; return; case SREV: if (*tcdtp+3 > bp->b_blkno) goto setback; goto setforw; } } , HZ); } DPADDR->dpsyn0 = SYN; DPADDR->dprcsr = HDUPLX|IENABLE; DPADDR->dptcsr = IENABLE|SIENABL|DTRDY; } dpclose() { DPADDR->dprcsr = 0; DPADDR->dptcsr = 0; dp11.dp_timer = 0; dp11.dp_proc = 0; if (dp11.dp_buf != 0) { brelse(dp11.dp_buf); dp11.dp_buf = 0; } } /* * Read waits until: * there is loss of "data set ready", or * a timeout occurs, or * a full record has been received. * The former two result in an error. */ dpread() { register char *bp, **epp; bp = dp11.dp_buf->b_addr;bp->b_flags =| B_ERROR; httab.d_active = SIO; } if (httab.d_active == SIO) { httab.d_errcnt = 0; h_blkno[unit]++; httab.d_actf = bp->av_forw; httab.d_active = 0; iodone(bp); bp->b_resid = HTADDR->htfc; } else h_blkno[unit] = bp->b_blkno; htstart(); } htread(dev) { htphys(dev); physio(htstrategy, &rhtbuf, dev, B_READ); u.u_count = -rhtbuf.b_resid; } htwrite(dev) { htphys(dev); physio(htstrategy, &rhtbuf, dev, B_WRITE); u.u_count = 0; } htphys(dev) { register unit, a; unit = de# /* */ /* * DN-11 ACU interface */ #include "../param.h" #include "../conf.h" #include "../user.h" struct dn { struct { char dn_stat; char dn_reg; } dn11[3]; } #define DNADDR 0175200 #define PWI 00200 #define ACR 00100 #define DLO 0020 #define DONE 0200 #define IENABLE 0100 #define DSS 040 #define PND 020 #define MENABLE 04 #define DPR 02 #define CRQ 01 #define DNPRI 5 dnopen(dev, flag) { register struct dn *dp; register int rdev; rdev = dev.d_minor; dp = &DNADDR->dn11[rdev]; if (dp-> epp = &dp11.dp_bufp; for(;;) { if(dpwait()) return; if (*epp > bp) break; spl6(); if (dp11.dp_timer <= 1) { spl0(); return; } sleep(&dp11, DPPRI); spl0(); } iomove(dp11.dp_buf, 0, min(u.u_count, *epp-bp), B_READ); } /* * write checks to make sure that the data set is not reading, * and that it is ready. Then the record is copied * and transmission started. */ dpwrite() { register char *bp; if (u.u_count==0 || dpwait()) return; dp11.dp_state = WRITE; bp = dp11.dp_bv.d_minor; a = lshift(u.u_offset, -9); h_blkno[unit] = a; h_nxrec[unit] = ++a; } dn_reg&(PWI|DLO)) u.u_error = ENXIO; else { DNADDR->dn11[0].dn_stat =| MENABLE; dp->dn_stat = IENABLE|MENABLE|CRQ; } } dnclose(dev) { DNADDR->dn11[dev.d_minor].dn_stat =& MENABLE; } dnwrite(dev) { register struct dn *dp; register c; extern lbolt; dp = &DNADDR->dn11[dev.d_minor]; for(;;) { while ((dp->dn_stat&DONE)==0) sleep(DNADDR, DNPRI); dp->dn_stat =& ~DONE; contin: if (dp->dn_reg&(PWI|ACR)) { u.u_error = EIO; return; } if (dp->dn_stat&DSS) return; c = 0; iuf->b_addr; dp11.dp_bufp = bp; if (u.u_count>512) u.u_count = 512; dp11.dp_nxmit = u.u_count; iomove(dp11.dp_buf, 0, u.u_count, B_WRITE); dpstart(); } /* * If "data set ready" is down return an error; otherwise * wait until the dataset is in read state with no carrier, * which means a record has just been received. */ dpwait() { for(;;) { if ((DPADDR->dptcsr&DSRDY)==0 || dp11.dp_buf==0) { u.u_error = EIO; return(1); } spl6(); if (dp11.dp_state==READ && (DPADDR->dptcsr&CARRIER)==0)# /* */ /* * TC-11 DECtape driver */ #include "../param.h" #include "../conf.h" #include "../buf.h" #include "../user.h" struct { int tccsr; int tccm; int tcwc; int tcba; int tcdt; }; struct devtab tctab; char tcper[8]; #define TCADDR 0177340 #define NTCBLK 578 #define TAPERR 0100000 #define TREV 04000 #define READY 0200 #define IENABLE 0100 #define UPS 0200 #define ENDZ 0100000 #define BLKM 02000 #define ILGOP 010000 #define SELERR 04000 #define SAT 0 #define RNUM 02 #define RDATA 04 #definef (u.u_count==0 || (dp->dn_stat&PND)==0 || (c=cpass())<0) continue; if (c=='-') { sleep(&lbolt, DNPRI); sleep(&lbolt, DNPRI); goto contin; } dp->dn_reg = c-'0'; dp->dn_stat =| DPR; } } dnint(dev) { wakeup(DNADDR); }  { spl0(); return(0); } sleep(&dp11, DPPRI); spl0(); } } /* * Start off the next character to be transmitted; * when the record is done, drop back into read state. */ dpstart() { register int c; extern char partab[]; dp11.dp_timer = 10; if (--dp11.dp_nxmit >= 0) { c = (*dp11.dp_bufp++) & 0177; DPADDR->dptbuf = c | ~partab[c]&0200; } else { dp11.dp_bufp = dp11.dp_buf->b_addr; dp11.dp_state = READ; } } /* * Count down the DP timer (once per second) * If it runs out, it presu SST 010 #define WDATA 014 #define GO 01 #define SFORW 1 #define SREV 2 #define SIO 3 tcclose(dev) { bflush(dev); tcper[dev&07] = 0; } tcstrategy(abp) struct buf *abp; { register struct buf *bp; bp = abp; if(bp->b_flags&B_PHYS) mapalloc(bp); if(bp->b_blkno >= NTCBLK || tcper[bp->b_dev&07]) { bp->b_flags =| B_ERROR; iodone(bp); return; } bp->av_forw = 0; spl6(); if (tctab.d_actf==0) tctab.d_actf = bp; else tctab.d_actl->av_forw = bp; tctab.d_actl = bp; if (tctab.d_active==0) tcrux{~mably means the other station * won't speak. */ dptimeout() { if (dp11.dp_timer==0) return; if (--dp11.dp_timer==0) { dpturnaround(); dp11.dp_timer = 1; } timeout(dptimeout, 0, HZ); } /* * Receiver interrupt: if reading, stash character * unless there is an overrun. */ dprint() { register int c; c = DPADDR->dprbuf & 0177; if (dp11.dp_state==READ) { if ((DPADDR->dprcsr&ODDPAR) == 0) c =| 0200; if (dp11.dp_bufp < dp11.dp_buf->b_addr+512) *dp11.dp_bufp++ = c; } } /* * Transmittstart(); spl0(); } tcstart() { register struct buf *bp; register int *tccmp, com; loop: tccmp = &TCADDR->tccm; if ((bp = tctab.d_actf) == 0) return; if(tcper[bp->b_dev&07]) { if((tctab.d_actf = bp->av_forw) == 0) (*tccmp).lobyte = SAT|GO; bp->b_flags =| B_ERROR; iodone(bp); goto loop; } if (((*tccmp).hibyte&07) != bp->b_dev.d_minor) (*tccmp).lobyte = SAT|GO; tctab.d_errcnt = 20; tctab.d_active = SFORW; com = (bp->b_dev.d_minor<<8) | IENABLE|RNUM|GO; if ((TCADDR->tccsr & UPS) == # /* */ /* * DP-11 Synchronous interface driver * This driver is rather insensitive to the remote * device it talks to, which is to say most of the protocol * must be supplied by the calling program. * Exceptions: parity is even; 7 data bits per character; * max. of 512 characters per record; 10 second timeout * on waiting to receive; half-duplex transmission. */ #include "../param.h" #include "../conf.h" #include "../user.h" #include "../buf.h" /* control info */ struct { char *dp_buf; char *er interrupt: * Knock down hardware bits. * If carrier has dropped, the record is done, so turn the line around; * otherwise start another character. */ dpxint() { register int dpstat; dpstat = DPADDR->dptcsr; DPADDR->dptcsr =& ~(CTRANS|RORUN|RING|DONE); if (dpstat & (CTRANS|RORUN)) dpturnaround(); else if (dpstat&DONE && dp11.dp_state==WRITE) dpstart(); } /* * Change the state from writing to reading at the end of a record. */ dpturnaround() { DPADDR->dprcsr =& ~RCVACT; if (dp11.dp_state==WRITE) { dp11.dp_timer = 10; dp11.dp_state = READ; dp11.dp_bufp = dp11.dp_buf->b_addr; } wakeup(&dp11); }  The actual structure of a clist block manipulated by * getc and putc (mch.s) */ struct cblock { struct cblock *c_next; char info[6]; }; /* The character lists-- space for 6*NCLIST characters */ struct cblock cfree[NCLIST]; /* List head for unused character blocks. */ struct cblock *cfreelist; /* * structure of device registers for KL, DL, and DC * interfaces-- more particularly, those for which the * SSTART bit is off and can be treated by general routines * (that is, not DH). */ struct { int tags&RAW)==0 && (c==CQUIT || c==CINTR)) { signal(tp, c==CINTR? SIGINT:SIGQIT); flushtty(tp); return; } if (tp->t_rawq.c_cc>=TTYHOG) { flushtty(tp); return; } if (t_flags&LCASE && c>='A' && c<='Z') c =+ 'a'-'A'; putc(c, &tp->t_rawq); if (t_flags&RAW || c=='\n' || c==004) { wakeup(&tp->t_rawq); if (putc(0377, &tp->t_rawq)==0) tp->t_delct++; } if (t_flags&ECHO) { ttyoutput(c, tp); ttstart(tp); } } /* * put character on TTY output queue, adding delays, * expanding tabs, and han# /* */ /* * RS03/04 disk driver */ #include "../param.h" #include "../buf.h" #include "../conf.h" #include "../user.h" struct { int hscs1; /* Control and Status register 1 */ int hswc; /* Word count register */ int hsba; /* UNIBUS address register */ int hsda; /* Desired address register */ int hscs2; /* Control and Status register 2 */ int hsds; /* Drive Status */ int hser; /* Error register */ int hsas; /* not used */ int hsla; /* not used */ int hsdb; /* not used */ int hsmr; /* not ustrcsr; int ttrbuf; int tttcsr; int tttbuf; }; /* * The routine implementing the gtty system call. * Just call lower level routine and pass back values. */ gtty() { int v[3]; register *up, *vp; vp = v; sgtty(vp); if (u.u_error) return; up = u.u_arg[0]; suword(up, *vp++); suword(++up, *vp++); suword(++up, *vp++); } /* * The routine implementing the stty system call. * Read in values and call lower level. */ stty() { register int *up; up = u.u_arg[0]; u.u_arg[0] = fuword(up); u.u_ardling the CR/NL bit. * It is called both from the top half for output, and from * interrupt level for echoing. * The arguments are the character and the tty structure. */ ttyoutput(ac, tp) struct tty *tp; { register int c; register struct tty *rtp; register char *colp; int ctype; rtp = tp; c = ac&0177; /* * Ignore EOT in normal mode to avoid hanging up * certain terminals. */ if (c==004 && (rtp->t_flags&RAW)==0) return; /* * Turn tabs to spaces as required */ if (c=='\t' && rtp->ted */ int hsdt; /* not used */ int hsbae; /* 11/70 bus extension */ }; struct devtab hstab; struct buf rhsbuf; #define HSADDR 0172040 #define ERR 040000 /* hscs1 - composite error */ #define GO 01 #define RCLR 010 #define DRY 0200 /* hsds - Drive Ready */ hsstrategy(abp) struct buf *abp; { register struct buf *bp; register mblks; bp = abp; mblks = 1024; /* RJS03 */ if(bp->b_dev.d_minor >= 8) mblks = 2048; /* RJS04 */ if(bp->b_blkno >= mblks) { bp->b_flags =| B_ERROR; iodone(bp); returng[1] = fuword(++up); u.u_arg[2] = fuword(++up); sgtty(0); } /* * Stuff common to stty and gtty. * Check legality and switch out to individual * device routine. * v is 0 for stty; the parameters are taken from u.u_arg[]. * c is non-zero for gtty and is the place in which the device * routines place their information. */ sgtty(v) int *v; { register struct file *fp; register struct inode *ip; if ((fp = getf(u.u_ar0[R0])) == NULL) return; ip = fp->f_inode; if ((ip->i_mode&IFMT) != IFCHR) { _flags&XTABS) { do ttyoutput(' ', rtp); while (rtp->t_col&07); return; } /* * for upper-case-only terminals, * generate escapes. */ if (rtp->t_flags&LCASE) { colp = "({)}!|^~'`"; while(*colp++) if(c == *colp++) { ttyoutput('\\', rtp); c = colp[-2]; break; } if ('a'<=c && c<='z') c =+ 'A' - 'a'; } /* * turn to if desired. */ if (c=='\n' && rtp->t_flags&CRMOD) ttyoutput('\r', rtp); if (putc(c, &rtp->t_outq)) return; /* * Calculate delay; } bp->av_forw = 0; spl5(); if (hstab.d_actf==0) hstab.d_actf = bp; else hstab.d_actl->av_forw = bp; hstab.d_actl = bp; if (hstab.d_active==0) hsstart(); spl0(); } hsstart() { register struct buf *bp; register addr; if ((bp = hstab.d_actf) == 0) return; hstab.d_active++; addr = bp->b_blkno; if(bp->b_dev.d_minor < 8) addr =<< 1; /* RJS03 */ HSADDR->hscs2 = bp->b_dev.d_minor & 07; rhstart(bp, &HSADDR->hsda, addr<<1, &HSADDR->hsbae); } hsintr() { register struct buf *bp; if (hst u.u_error = ENOTTY; return; } (*cdevsw[ip->i_addr[0].d_major].d_sgtty)(ip->i_addr[0], v); } /* * Wait for output to drain, then flush input waiting. */ wflushtty(atp) struct tty *atp; { register struct tty *tp; tp = atp; spl5(); while (tp->t_outq.c_cc) { tp->t_state =| ASLEEP; sleep(&tp->t_outq, TTOPRI); } flushtty(tp); spl0(); } /* * Initialize clist by freeing all character blocks, then count * number of character devices. (Once-only routine) */ cinit() { register int ccp; regists. * The numbers here represent clock ticks * and are not necessarily optimal for all terminals. * The delays are indicated by characters above 0200, * thus (unfortunately) restricting the transmission * path to 7 bits. */ colp = &rtp->t_col; ctype = partab[c]; c = 0; switch (ctype&077) { /* ordinary */ case 0: (*colp)++; /* non-printing */ case 1: break; /* backspace */ case 2: if (*colp) (*colp)--; break; /* newline */ case 3: ctype = (rtp->t_flags >> 8) & 03; ifab.d_active == 0) return; bp = hstab.d_actf; hstab.d_active = 0; if(HSADDR->hscs1 & ERR){ /* error bit */ deverror(bp, HSADDR->hscs2, 0); HSADDR->hscs1 = RCLR|GO; if (++hstab.d_errcnt <= 10) { hsstart(); return; } bp->b_flags =| B_ERROR; } hstab.d_errcnt = 0; hstab.d_actf = bp->av_forw; iodone(bp); hsstart(); } hsread(dev) { physio(hsstrategy, &rhsbuf, dev, B_READ); } hswrite(dev) { physio(hsstrategy, &rhsbuf, dev, B_WRITE); } er struct cblock *cp; register struct cdevsw *cdp; ccp = cfree; for (cp=(ccp+07)&~07; cp <= &cfree[NCLIST-1]; cp++) { cp->c_next = cfreelist; cfreelist = cp; } ccp = 0; for(cdp = cdevsw; cdp->d_open; cdp++) ccp++; nchrdev = ccp; } /* * flush all TTY queues */ flushtty(atp) struct tty *atp; { register struct tty *tp; register int sps; tp = atp; while (getc(&tp->t_canq) >= 0); while (getc(&tp->t_outq) >= 0); wakeup(&tp->t_rawq); wakeup(&tp->t_outq); sps = PS->integ; spl5(); while ((ctype == 1) { /* tty 37 */ if (*colp) c = max((*colp>>4) + 3, 6); } else if(ctype == 2) { /* vt05 */ c = 6; } *colp = 0; break; /* tab */ case 4: ctype = (rtp->t_flags >> 10) & 03; if(ctype == 1) { /* tty 37 */ c = 1 - (*colp | ~07); if(c < 5) c = 0; } *colp =| 07; (*colp)++; break; /* vertical motion */ case 5: if(rtp->t_flags & VTDELAY) /* tty 37 */ c = 0177; break; /* carriage return */ case 6: ctype = (rtp->t_flags >> 12) & 03; if(ctype == 1getc(&tp->t_rawq) >= 0); tp->t_delct = 0; PS->integ = sps; } /* * transfer raw input list to canonical list, * doing erase-kill processing and handling escapes. * It waits until a full line has been typed in cooked mode, * or until any character has been typed in raw mode. */ canon(atp) struct tty *atp; { register char *bp; char *bp1; register struct tty *tp; register int c; tp = atp; spl5(); while (tp->t_delct==0) { if ((tp->t_state&CARR_ON)==0) return(0); sleep(&tp->t_rawq, TTIPRI);) { /* tn 300 */ c = 5; } else if(ctype == 2) { /* ti 700 */ c = 10; } *colp = 0; } if(c) putc(c|0200, &rtp->t_outq); } /* * Restart typewriter output following a delay * timeout. * The name of the routine is passed to the timeout * subroutine and it is called during a clock interrupt. */ ttrstrt(atp) { register struct tty *tp; tp = atp; tp->t_state =& ~TIMEOUT; ttstart(tp); } /* * Start output on the typewriter. It is used from the top half * after some characters have been # /* */ /* * general TTY subroutines */ #include "../param.h" #include "../systm.h" #include "../user.h" #include "../tty.h" #include "../proc.h" #include "../inode.h" #include "../file.h" #include "../reg.h" #include "../conf.h" /* * Input mapping table-- if an entry is non-zero, when the * corresponding character is typed preceded by "\" the escape * sequence is replaced by the table value. Mostly used for * upper-case only terminals. */ char maptab[] { 000,000,000,000,004,000,000,000, 000,00 } spl0(); loop: bp = &canonb[2]; while ((c=getc(&tp->t_rawq)) >= 0) { if (c==0377) { tp->t_delct--; break; } if ((tp->t_flags&RAW)==0) { if (bp[-1]!='\\') { if (c==tp->t_erase) { if (bp > &canonb[2]) bp--; continue; } if (c==tp->t_kill) goto loop; if (c==CEOT) continue; } else if (maptab[c] && (maptab[c]==c || (tp->t_flags&LCASE))) { if (bp[-2] != '\\') c = maptab[c]; bp--; } } *bp++ = c; if (bp>=canonb+CANBSIZ) breput on the output queue, * from the interrupt routine to transmit the next * character, and after a timeout has finished. * If the SSTART bit is off for the tty the work is done here, * using the protocol of the single-line interfaces (KL, DL, DC); * otherwise the address word of the tty structure is * taken to be the name of the device-dependent startup routine. */ ttstart(atp) struct tty *atp; { register int *addr, c; register struct tty *tp; struct { int (*func)(); }; tp = atp; addr = tp->t_0,000,000,000,000,000,000, 000,000,000,000,000,000,000,000, 000,000,000,000,000,000,000,000, 000,'|',000,'#',000,000,000,'`', '{','}',000,000,000,000,000,000, 000,000,000,000,000,000,000,000, 000,000,000,000,000,000,000,000, '@',000,000,000,000,000,000,000, 000,000,000,000,000,000,000,000, 000,000,000,000,000,000,000,000, 000,000,000,000,000,000,'~',000, 000,'A','B','C','D','E','F','G', 'H','I','J','K','L','M','N','O', 'P','Q','R','S','T','U','V','W', 'X','Y','Z',000,000,000,000,000, }; /* *ak; } bp1 = bp; bp = &canonb[2]; c = &tp->t_canq; while (bpt_flags; if ((c =& 0177) == '\r' && t_flags&CRMOD) c = '\n'; if ((t_fladdr; if (tp->t_state&SSTART) { (*addr.func)(tp); return; } if ((addr->tttcsr&DONE)==0 || tp->t_state&TIMEOUT) return; if ((c=getc(&tp->t_outq)) >= 0) { if (c<=0177) addr->tttbuf = c | (partab[c]&0200); else { timeout(ttrstrt, tp, c&0177); tp->t_state =| TIMEOUT; } } } /* * Called from device's read routine after it has * calculated the tty-structure given as argument. * The pc is backed up for the duration of this call. * In case of a caught interrupt, an RTI will re-execute. */ ttread(atp) struct tty *atp; { register struct tty *tp; tp = atp; if ((tp->t_state&CARR_ON)==0) return; if (tp->t_canq.c_cc || canon(tp)) while (tp->t_canq.c_cc && passc(getc(&tp->t_canq))>=0); } /* * Called from the device's write routine after it has * calculated the tty-structure given as argument. */ ttwrite(atp) struct tty *atp; { register struct tty *tp; register int c; tp = atp; if ((tp->t_state&CARR_ON)==0) return; while ((c=cpass())>=0) { spl5(); while (tp->t_outq.c_ccL; tp->t_speeds = SSPEED | (SSPEED<<8); tp->t_flags = ODDP|EVENP|ECHO; dhparam(tp); } dmopen(dev); tp->t_state =& ~WOPEN; tp->t_state =| ISOPEN; if (u.u_procp->p_ttyp == 0) u.u_procp->p_ttyp = tp; } /* * Close a DH11 line. */ dhclose(dev) { register struct tty *tp; tp = &dh11[dev.d_minor]; dmclose(dev); tp->t_state =& (CARR_ON|SSTART); wflushtty(tp); } /* * Read from a DH11 line. */ dhread(dev) { ttread(&dh11[dev.d_minor]); } /* * write on a DH11 line */ dhwrite(dev) { ttwrite(# /* */ /* * RK disk driver */ #include "../param.h" #include "../buf.h" #include "../conf.h" #include "../user.h" #define RKADDR 0177400 #define NRK 4 #define NRKBLK 4872 #define RESET 0 #define GO 01 #define DRESET 014 #define IENABLE 0100 #define DRY 0200 #define ARDY 0100 #define WLO 020000 #define CTLRDY 0200 struct { int rkds; int rker; int rkcs; int rkwc; int rkba; int rkda; }; struct devtab rktab; struct buf rrkbuf; rkstrategy(abp) struct buf *abp; { register struct buf *bp; regist > TTHIWAT) { ttstart(tp); tp->t_state =| ASLEEP; sleep(&tp->t_outq, TTOPRI); } spl0(); ttyoutput(c, tp); } ttstart(tp); } /* * Common code for gtty and stty functions on typewriters. * If v is non-zero then gtty is being done and information is * passed back therein; * if it is zero stty is being done and the input information is in the * u_arg array. */ ttystty(atp, av) int *atp, *av; { register *tp, *v; tp = atp; if(v = av) { *v++ = tp->t_speeds; v->lobyte = tp->t_erase; &dh11[dev.d_minor]); } /* * DH11 receiver interrupt. */ dhrint() { register struct tty *tp; register int c; while ((c = DHADDR->dhnxch) < 0) { /* char. present */ tp = &dh11[(c>>8)&017]; if (tp >= &dh11[NDH11]) continue; if((tp->t_state&ISOPEN)==0 || (c&PERROR)) { wakeup(tp); continue; } if (c&FRERROR) /* break */ if (tp->t_flags&RAW) c = 0; /* null (for getty) */ else c = 0177; /* DEL (intr) */ ttyinput(c, tp); } } /* * stty/gtty for DH11 */ dhsgtty(dev, av) er *qc, *ql; int d; bp = abp; if(bp->b_flags&B_PHYS) mapalloc(bp); d = bp->b_dev.d_minor-7; if(d <= 0) d = 1; if (bp->b_blkno >= NRKBLK*d) { bp->b_flags =| B_ERROR; iodone(bp); return; } bp->av_forw = 0; spl5(); if (rktab.d_actf==0) rktab.d_actf = bp; else rktab.d_actl->av_forw = bp; rktab.d_actl = bp; if (rktab.d_active==0) rkstart(); spl0(); } rkaddr(bp) struct buf *bp; { register struct buf *p; register int b; int d, m; p = bp; b = p->b_blkno; m = p->b_dev.d_minor - v->hibyte = tp->t_kill; v[1] = tp->t_flags; return(1); } wflushtty(tp); v = u.u_arg; tp->t_speeds = *v++; tp->t_erase = v->lobyte; tp->t_kill = v->hibyte; tp->t_flags = v[1]; return(0); } int *av; { register struct tty *tp; register r; tp = &dh11[dev.d_minor]; if (ttystty(tp, av)) return; dhparam(tp); } /* * Set parameters from open or stty into the DH hardware * registers. */ dhparam(atp) struct tty *atp; { register struct tty *tp; register int lpr; tp = atp; spl5(); DHADDR->dhcsr.lobyte = tp->t_dev.d_minor | IENABLE; /* * Hang up line? */ if (tp->t_speeds.lobyte==0) { tp->t_flags =| HUPCL; dmclose(tp->t_dev); return; } lpr = (tp->t_speeds.hibyte<<10) | (tp-> 7; if(m <= 0) d = p->b_dev.d_minor; else { d = lrem(b, m); b = ldiv(b, m); } return(d<<13 | (b/12)<<4 | b%12); } rkstart() { register struct buf *bp; if ((bp = rktab.d_actf) == 0) return; rktab.d_active++; devstart(bp, &RKADDR->rkda, rkaddr(bp), 0); } rkintr() { register struct buf *bp; if (rktab.d_active == 0) return; bp = rktab.d_actf; rktab.d_active = 0; if (RKADDR->rkcs < 0) { /* error bit */ deverror(bp, RKADDR->rker, RKADDR->rkds); RKADDR->rkcs = RESET|GO; while((RKA# /* */ /* * DM-BB fake driver */ #include "../tty.h" #include "../conf.h" struct tty dh11[]; dmopen(dev) { register struct tty *tp; tp = &dh11[dev.d_minor]; tp->t_state =| CARR_ON; } dmclose(dev) { } t_speeds.lobyte<<6); if (tp->t_speeds.lobyte == 4) /* 134.5 baud */ lpr =| BITS6|PENABLE|HDUPLX; else if (tp->t_flags&EVENP) if (tp->t_flags&ODDP) lpr =| BITS8; else lpr =| BITS7|PENABLE; else lpr =| BITS7|OPAR|PENABLE; if (tp->t_speeds.lobyte == 3) /* 110 baud */ lpr =| TWOSB; DHADDR->dhlpr = lpr; spl0(); } /* * DH11 transmitter interrupt. * Restart each line which used to be active but has * terminated transmission since the last interrupt. */ dhxint() { register struct tty DDR->rkcs&CTLRDY) == 0) ; if (++rktab.d_errcnt <= 10) { rkstart(); return; } bp->b_flags =| B_ERROR; } rktab.d_errcnt = 0; rktab.d_actf = bp->av_forw; iodone(bp); rkstart(); } rkread(dev) { physio(rkstrategy, &rrkbuf, dev, B_READ); } rkwrite(dev) { physio(rkstrategy, &rrkbuf, dev, B_WRITE); } *tp; register ttybit, bar; bar = dhsar & ~DHADDR->dhbar; DHADDR->dhcsr =& ~XINT; ttybit = 1; for (tp = dh11; bar; tp++) { if(bar&ttybit) { dhsar =& ~ttybit; bar =& ~ttybit; tp->t_state =& ~BUSY; dhstart(tp); } ttybit =<< 1; } } /* * Start (restart) transmission on the given DH11 line. */ dhstart(atp) struct tty *atp; { extern ttrstrt(); register c, nch; register struct tty *tp; int sps; char *cp; sps = PS->integ; spl5(); tp = atp; /* * If it's currently active, or del# /* */ /* * TM tape driver */ #include "../param.h" #include "../buf.h" #include "../conf.h" #include "../user.h" struct { int tmer; int tmcs; int tmbc; int tmba; int tmdb; int tmrd; }; struct devtab tmtab; struct buf rtmbuf; char t_openf[8]; char *t_blkno[8]; char *t_nxrec[8]; #define TMADDR 0172520 #define GO 01 #define RCOM 02 #define WCOM 04 #define WEOF 06 #define SFORW 010 #define SREV 012 #define WIRG 014 #define REW 016 #define DENS 060000 /* 9-channel */ #define IENABLE 0100 #defi# /* */ /* * DH-11 driver * This driver calls on the DHDM driver. * If the DH has no DM11-BB, then the latter will * be fake. To insure loading of the correct DM code, * lib2 should have dhdm.o, dh.o and dhfdm.o in that order. */ #include "../param.h" #include "../conf.h" #include "../user.h" #include "../tty.h" #include "../proc.h" #define DHADDR 0160020 #define NDH11 16 /* number of lines */ #define DHNCH 8 /* max number of DMA chars */ struct tty dh11[NDH11]; /* * Place from which to do DMA oaying, * no need to do anything. */ if (tp->t_state&(TIMEOUT|BUSY)) goto out; /* * t_char is a delay indicator which may have been * left over from the last start. * Arrange for the delay. */ if (c = tp->t_char) { tp->t_char = 0; timeout(ttrstrt, tp, (c&0177)+6); tp->t_state =| TIMEOUT; goto out; } cp = dh_clist[tp->t_dev.d_minor]; nch = 0; /* * Copy DHNCH characters, or up to a delay indicator, * to the DMA area. */ while (nch > -DHNCH && (c = getc(&tp->t_outq))>=0) { ne CRDY 0200 #define GAPSD 010000 #define TUR 1 #define HARD 0102200 /* ILC, EOT, NXM */ #define EOF 0040000 #define SSEEK 1 #define SIO 2 tmopen(dev, flag) { register dminor; dminor = dev.d_minor; if (t_openf[dminor]) u.u_error = ENXIO; else { t_openf[dminor]++; t_blkno[dminor] = 0; t_nxrec[dminor] = 65535; } } tmclose(dev, flag) { register int dminor; dminor = dev.d_minor; t_openf[dminor] = 0; if (flag) tcommand(dminor, WEOF); tcommand(dminor, REW); } tcommand(unit, com) { extern output */ char dh_clist[NDH11][DHNCH]; /* * Used to communicate the number of lines to the DM */ int ndh11 NDH11; /* * Hardware control bits */ #define BITS6 01 #define BITS7 02 #define BITS8 03 #define TWOSB 04 #define PENABLE 020 /* DEC manuals incorrectly say this bit causes generation of even parity. */ #define OPAR 040 #define HDUPLX 040000 #define IENABLE 030100 #define PERROR 010000 #define FRERROR 020000 #define XINT 0100000 #define SSPEED 7 /* standard speed: 300 baud */ /* * Software cif (c >= 0200) { tp->t_char = c; break; } *cp++ = c; nch--; } /* * If the writer was sleeping on output overflow, * wake him when low tide is reached. */ if (tp->t_outq.c_cc<=TTLOWAT && tp->t_state&ASLEEP) { tp->t_state =& ~ASLEEP; wakeup(&tp->t_outq); } /* * If any characters were set up, start transmission; * otherwise, check for possible delay. */ if (nch) { DHADDR->dhcsr.lobyte = tp->t_dev.d_minor | IENABLE; DHADDR->dhcar = cp+nch; DHADDR->dhbcr = nch; c = 1<tmcs & CRDY)==0) sleep(&lbolt, 1); TMADDR->tmcs = DENS|com|GO | (unit<<8); } tmstrategy(abp) struct buf *abp; { register struct buf *bp; register char **p; bp = abp; p = &t_nxrec[bp->b_dev.d_minor]; if (*p <= bp->b_blkno) { if (*p < bp->b_blkno) { bp->b_flags =| B_ERROR; iodone(bp); return; } if (bp->b_flags&B_READ) { clrbuf(bp); iodone(bp); return; } } if ((bp->b_flags&B_READ)==0) *p = bp->b_blkno + 1; bp->av_forw = 0; sopy of last dhbar */ int dhsar; struct dhregs { int dhcsr; int dhnxch; int dhlpr; int dhcar; int dhbcr; int dhbar; int dhbreak; int dhsilo; }; /* * Open a DH11 line. */ dhopen(dev, flag) { register struct tty *tp; extern dhstart(); if (dev.d_minor >= NDH11) { u.u_error = ENXIO; return; } tp = &dh11[dev.d_minor]; tp->t_addr = dhstart; tp->t_dev = dev; DHADDR->dhcsr =| IENABLE; tp->t_state =| WOPEN|SSTART; if ((tp->t_state&ISOPEN) == 0) { tp->t_erase = CERASE; tp->t_kill = CKIL->t_dev.d_minor; DHADDR->dhbar =| c; dhsar =| c; tp->t_state =| BUSY; } else if (c = tp->t_char) { tp->t_char = 0; timeout(ttrstrt, tp, (c&0177)+6); tp->t_state =| TIMEOUT; } out: PS->integ = sps; } pl5(); if (tmtab.d_actf==0) tmtab.d_actf = bp; else tmtab.d_actl->av_forw = bp; tmtab.d_actl = bp; if (tmtab.d_active==0) tmstart(); spl0(); } tmstart() { register struct buf *bp; register int com; int unit; register char *blkno; loop: if ((bp = tmtab.d_actf) == 0) return; unit = bp->b_dev.d_minor; blkno = t_blkno[unit]; if (t_openf[unit] < 0 || (TMADDR->tmcs & CRDY)==0) { bp->b_flags =| B_ERROR; tmtab.d_actf = bp->av_forw; iodone(bp); goto loop; } com = (unit<<8) | ((bp->b_xmem & 03) << 4) | IENABLE|DENS; if (blkno != bp->b_blkno) { tmtab.d_active = SSEEK; if (blkno < bp->b_blkno) { com =| SFORW|GO; TMADDR->tmbc = blkno - bp->b_blkno; } else { if (bp->b_blkno == 0) com =| REW|GO; else { com =| SREV|GO; TMADDR->tmbc = bp->b_blkno - blkno; } } TMADDR->tmcs = com; return; } tmtab.d_active = SIO; TMADDR->tmbc = bp->b_wcount << 1; TMADDR->tmba = bp->b_addr; /* core address */ TMADDR->tmcs = com | ((bp->b_flags&B_READ)? RCOM|GO: hpcs1 & ERR) { /* error bit */ deverror(bp, HPADDR->hpcs2, 0); if(HPADDR->hper1 & (DU|DTE|OPI)) { HPADDR->hpcs2 = CLR; HPADDR->hpcs1 = RECAL|GO; ctr = 0; while ((HPADDR->hpds&PIP) && --ctr); } HPADDR->hpcs1 = RCLR|GO; if (++hptab.d_errcnt <= 10) { hpstart(); return; } bp->b_flags =| B_ERROR; } hptab.d_errcnt = 0; hptab.d_actf = bp->av_forw; bp->b_resid = HPADDR->hpwc; iodone(bp); hpstart(); } hpread(dev) { if(hpphys(dev)) physio(hpstrategy, &hpbuf, dev, B_READ); }  ((tmtab.d_errcnt)? WIRG|GO: WCOM|GO)); } tmintr() { register struct buf *bp; register int unit; if ((bp = tmtab.d_actf)==0) return; unit = bp->b_dev.d_minor; if (TMADDR->tmcs < 0) { /* error bit */ /* deverror(bp, TMADDR->tmer); */ while(TMADDR->tmrd & GAPSD) ; /* wait for gap shutdown */ if ((TMADDR->tmer&(HARD|EOF))==0 && tmtab.d_active==SIO) { if (++tmtab.d_errcnt < 10) { t_blkno[unit]++; tmtab.d_active = 0; tmstart(); return; } } else if(bp != &rtmbuf && (TM# /* */ /* * RP04 disk driver * * This driver has been tested on a working RP04 for a few hours. * It does not attempt ECC error correction and is probably * deficient in general in the case of errors and when packs * are dismounted. */ #include "../param.h" #include "../buf.h" #include "../conf.h" #include "../user.h" struct { int hpcs1; /* Control and Status register 1 */ int hpwc; /* Word count register */ int hpba; /* UNIBUS address register */ int hpda; /* Desired address register */ in hpwrite(dev) { if(hpphys(dev)) physio(hpstrategy, &hpbuf, dev, B_WRITE); } hpphys(dev) { register c; c = lshift(u.u_offset, -9); c =+ ldiv(u.u_count+511, 512); if(c > hp_sizes[dev.d_minor & 07].nblocks) { u.u_error = ENXIO; return(0); } return(1); } ADDR->tmer&EOF)==0) t_openf[unit] = -1; bp->b_flags =| B_ERROR; tmtab.d_active = SIO; } if (tmtab.d_active == SIO) { tmtab.d_errcnt = 0; t_blkno[unit]++; tmtab.d_actf = bp->av_forw; tmtab.d_active = 0; iodone(bp); bp->b_resid = TMADDR->tmbc; } else t_blkno[unit] = bp->b_blkno; tmstart(); } tmread(dev) { tmphys(dev); physio(tmstrategy, &rtmbuf, dev, B_READ); u.u_count = -rtmbuf.b_resid; } tmwrite(dev) { tmphys(dev); physio(tmstrategy, &rtmbuf, dev, B_WRITE); u.u_count = 0; }t hpcs2; /* Control and Status register 2*/ int hpds; /* Drive Status */ int hper1; /* Error register 1 */ int hpas; /* Attention Summary */ int hpla; /* Look ahead */ int hpdb; /* Data buffer */ int hpmr; /* Maintenance register */ int hpdt; /* Drive type */ int hpsn; /* Serial number */ int hpof; /* Offset register */ int hpca; /* Desired Cylinder address register*/ int hpcc; /* Current Cylinder */ int hper2; /* Error register 2 */ int hper3; /* Error register 3 */ int hppos; /* Burst error # /* */ /* * DM-BB driver */ #include "../param.h" #include "../tty.h" #include "../conf.h" #define DMADDR 0170500 struct tty dh11[]; int ndh11; /* Set by dh.c to number of lines */ #define DONE 0200 #define SCENABL 040 #define CLSCAN 01000 #define TURNON 07 /* RQ send, CD lead, line enable */ #define TURNOFF 1 /* line enable only */ #define CARRIER 0100 struct dmregs { int dmcsr; int dmlstat; }; /* * Turn on the line associated with the (DH) device dev. */ dmopen(dev) { register struct tty * tmphys(dev) { register unit, a; unit = dev.d_minor; a = lshift(u.u_offset, -9); t_blkno[unit] = a; t_nxrec[unit] = ++a; } bit position */ int hppat; /* Burst error bit pattern */ int hpbae; /* 11/70 bus extension */ }; #define HPADDR 0176700 #define NHP 8 struct { char *nblocks; int cyloff; } hp_sizes[] { 9614, 0, /* cyl 0 thru 23 */ /* cyl 24 thru 43 available */ -1, 44, /* cyl 44 thru 200 */ -1, 201, /* cyl 201 thru 357 */ 20900, 358, /* cyl 358 thru 407 */ /* cyl 408 thru 410 blank */ 40600, 0, 40600, 100, 40600, 200, 40600, 300, }; struct devtab hptab; struct buf hpbuf; char hp_openf; /* Drtp; tp = &dh11[dev.d_minor]; DMADDR->dmcsr = dev.d_minor; DMADDR->dmlstat = TURNON; if (DMADDR->dmlstat&CARRIER) tp->t_state =| CARR_ON; DMADDR->dmcsr = IENABLE|SCENABL; spl5(); while ((tp->t_state&CARR_ON)==0) sleep(&tp->t_rawq, TTIPRI); spl0(); } /* * If a DH line has the HUPCL mode, * turn off carrier when it is closed. */ dmclose(dev) { register struct tty *tp; tp = &dh11[dev.d_minor]; if (tp->t_flags&HUPCL) { DMADDR->dmcsr = dev.d_minor; DMADDR->dmlstat = TURNOFF; DMADDR->dmc# /* */ /* * KL/DL-11 driver */ #include "../param.h" #include "../conf.h" #include "../user.h" #include "../tty.h" #include "../proc.h" /* base address */ #define KLADDR 0177560 /* console */ #define KLBASE 0176500 /* kl and dl11-a */ #define DLBASE 0175610 /* dl-e */ #define NKL11 1 #define NDL11 0 #define DSRDY 02 #define RDRENB 01 struct tty kl11[NKL11+NDL11]; struct klregs { int klrcsr; int klrbuf; int kltcsr; int kltbuf; } klopen(dev, flag) { register char *addr; register struct tty *tive Commands */ #define GO 01 #define PRESET 020 #define RECAL 06 #define RCLR 010 #define OFFSET 014 #define READY 0200 /* hpds - drive ready */ #define PIP 020000 /* hpds - Positioning Operation in Progress */ #define ERR 040000 /* hpcs1 - composite error */ #define DU 040000 /* hper1 - Drive Unsafe */ #define DTE 010000 /* hper1 - Drive Timing Error */ #define OPI 020000 /* hper1 - Operation Incomplete */ /* Error Correction Code errors */ #define DCK 0100000 /* hper1 - Data Check error */ #define sr = IENABLE|SCENABL; } } /* * DM11 interrupt. * Mainly, deal with carrier transitions. */ dmint() { register struct tty *tp; if (DMADDR->dmcsr&DONE) { tp = &dh11[DMADDR->dmcsr&017]; if (tp < &dh11[ndh11]) { wakeup(tp); if ((DMADDR->dmlstat&CARRIER)==0) { if ((tp->t_state&WOPEN)==0) { signal(tp, SIGHUP); DMADDR->dmlstat = 0; flushtty(tp); } tp->t_state =& ~CARR_ON; } else tp->t_state =| CARR_ON; } DMADDR->dmcsr = IENABLE|SCENABL; } } p; if(dev.d_minor >= NKL11+NDL11) { u.u_error = ENXIO; return; } tp = &kl11[dev.d_minor]; if (u.u_procp->p_ttyp == 0) { u.u_procp->p_ttyp = tp; tp->t_dev = dev; } /* * set up minor 0 to address KLADDR * set up minor 1 thru NKL11-1 to address from KLBASE * set up minor NKL11 on to address from DLBASE */ addr = KLADDR + 8*dev.d_minor; if(dev.d_minor) addr =+ KLBASE-KLADDR-8; if(dev.d_minor >= NKL11) addr =+ DLBASE-KLBASE-8*NKL11+8; tp->t_addr = addr; if ((tp->t_state&ISOPEN) ==ECH 0100 /* hper1 - ECC hard error */ #define CLR 040 /* hpcs2 - Controller Clear */ #define FMT22 010000 /* hpof - 16 bit /word format */ /* * Use av_back to save track+sector, * b_resid for cylinder. */ #define trksec av_back #define cylin b_resid hpopen() { if(!hp_openf){ hp_openf++; HPADDR->hpcs2 = CLR; HPADDR->hpcs1 = RCLR|GO; HPADDR->hpcs1 = PRESET|GO; HPADDR->hpof = FMT22; } } hpstrategy(abp) struct buf *abp; { register struct buf *bp; register char *p1, *p2; bp = abp; p1# /* */ /* * LP-11 Line printer driver */ #include "../param.h" #include "../conf.h" #include "../user.h" #define LPADDR 0177514 #define IENABLE 0100 #define DONE 0200 #define LPPRI 10 #define LPLWAT 50 #define LPHWAT 100 #define EJLINE 60 #define MAXCOL 80 struct { int lpsr; int lpbuf; }; struct { int cc; int cf; int cl; int flag; int mcc; int ccc; int mlc; } lp11; #define CAP 01 /* Set to 0 for 96-char printer, else to 01 */ #define EJECT 02 #define OPEN 04 #define IND 010 /* Set to 0) { tp->t_state = ISOPEN|CARR_ON; tp->t_flags = XTABS|LCASE|ECHO|CRMOD; tp->t_erase = CERASE; tp->t_kill = CKILL; } addr->klrcsr =| IENABLE|DSRDY|RDRENB; addr->kltcsr =| IENABLE; } klclose(dev) { register struct tty *tp; tp = &kl11[dev.d_minor]; wflushtty(tp); tp->t_state = 0; } klread(dev) { ttread(&kl11[dev.d_minor]); } klwrite(dev) { ttwrite(&kl11[dev.d_minor]); } klxint(dev) { register struct tty *tp; tp = &kl11[dev.d_minor]; ttstart(tp); if (tp->t_outq.c_cc == 0 || tp->t_ou = &hp_sizes[bp->b_dev.d_minor&07]; if (bp->b_dev.d_minor >= (NHP<<3) || bp->b_blkno >= p1->nblocks) { bp->b_flags =| B_ERROR; iodone(bp); return; } bp->av_forw = 0; bp->cylin = p1->cyloff; p1 = bp->b_blkno; p2 = lrem(p1, 22); p1 = ldiv(p1, 22); bp->trksec = (p1%19)<<8 | p2; bp->cylin =+ p1/19; spl5(); if ((p1 = hptab.d_actf)==0) hptab.d_actf = bp; else { for (; p2 = p1->av_forw; p1 = p2) { if (p1->cylin <= bp->cylin && bp->cylin < p2->cylin || p1->cylin >= bp->cylin  0 for no indent, else to 010 */ #define FORM 014 lpopen(dev, flag) { if(lp11.flag & OPEN || LPADDR->lpsr < 0) { u.u_error = EIO; return; } lp11.flag =| (IND|EJECT|OPEN); LPADDR->lpsr =| IENABLE; lpcanon(FORM); } lpclose(dev, flag) { lpcanon(FORM); lp11.flag = 0; } lpwrite() { register int c; while ((c=cpass())>=0) lpcanon(c); } lpcanon(c) { register c1, c2; c1 = c; if(lp11.flag&CAP) { if(c1>='a' && c1<='z') c1 =+ 'A'-'a'; else switch(c1) { case '{': c2 = '('; goto tq.c_cc == TTLOWAT) wakeup(&tp->t_outq); } klrint(dev) { register int c, *addr; register struct tty *tp; tp = &kl11[dev.d_minor]; addr = tp->t_addr; c = addr->klrbuf; addr->klrcsr =| RDRENB; if ((c&0177)==0) addr->kltbuf = c; /* hardware botch */ ttyinput(c, tp); } klsgtty(dev, v) int *v; { register struct tty *tp; tp = &kl11[dev.d_minor]; ttystty(tp, v); }  && bp->cylin > p2->cylin) break; } bp->av_forw = p2; p1->av_forw = bp; } if (hptab.d_active==0) hpstart(); spl0(); } hpstart() { register struct buf *bp; if ((bp = hptab.d_actf) == 0) return; hptab.d_active++; HPADDR->hpcs2 = bp->b_dev.d_minor >> 3; HPADDR->hpca = bp->cylin; rhstart(bp, &HPADDR->hpda, bp->trksec, &HPADDR->hpbae); } hpintr() { register struct buf *bp; register int ctr; if (hptab.d_active == 0) return; bp = hptab.d_actf; hptab.d_active = 0; if (HPADDR->esc; case '}': c2 = ')'; goto esc; case '`': c2 = '\''; goto esc; case '|': c2 = '!'; goto esc; case '~': c2 = '^'; esc: lpcanon(c2); lp11.ccc--; c1 = '-'; } } switch(c1) { case '\t': lp11.ccc = (lp11.ccc+8) & ~7; return; case FORM: case '\n': if((lp11.flag&EJECT) == 0 || lp11.mcc!=0 || lp11.mlc!=0) { lp11.mcc = 0; lp11.mlc++; if(lp11.mlc >= EJLINE && lp11.flag&EJECT) c1 = FORM; lpoutput(c1); if(c1 == FORM) lp11.mlc = 0; } case '\r': lp11.ccc = 0; if(lp11.flag&IND) lp11.ccc = 8; return; case 010: if(lp11.ccc > 0) lp11.ccc--; return; case ' ': lp11.ccc++; return; default: if(lp11.ccc < lp11.mcc) { lpoutput('\r'); lp11.mcc = 0; } if(lp11.ccc < MAXCOL) { while(lp11.ccc > lp11.mcc) { lpoutput(' '); lp11.mcc++; } lpoutput(c1); lp11.mcc++; } lp11.ccc++; } } lpstart() { register int c; while (LPADDR->lpsr&DONE && (c = getc(&lp11)) >= 0) LPADDR->lpbuf = c; }/* * Read in the block, like bread, but also start I/O on the * read-ahead block (which is not allocated to the caller) */ breada(adev, blkno, rablkno) { register struct buf *rbp, *rabp; register int dev; dev = adev; rbp = 0; if (!incore(dev, blkno)) { rbp = getblk(dev, blkno); if ((rbp->b_flags&B_DONE) == 0) { rbp->b_flags =| B_READ; rbp->b_wcount = -256; (*bdevsw[adev.d_major].d_strategy)(rbp); } } if (rablkno && !incore(dev, rablkno)) { rabp = getblk(dev, rablkno); if (rabp-_flags = B_BUSY | B_RELOC; bp->b_back->b_forw = bp->b_forw; bp->b_forw->b_back = bp->b_back; bp->b_forw = dp->b_forw; bp->b_back = dp; dp->b_forw->b_back = bp; dp->b_forw = bp; bp->b_dev = dev; bp->b_blkno = blkno; return(bp); } /* * Wait for I/O completion on the buffer; return errors * to the user. */ iowait(bp) struct buf *bp; { register struct buf *rbp; rbp = bp; spl6(); while ((rbp->b_flags&B_DONE)==0) sleep(rbp, PRIBIO); spl0(); geterror(rbp); } /* * Unlink a buffer from the av lpint() { register int c; lpstart(); if (lp11.cc == LPLWAT || lp11.cc == 0) wakeup(&lp11); } lpoutput(c) { if (lp11.cc >= LPHWAT) sleep(&lp11, LPPRI); putc(c, &lp11); spl4(); lpstart(); spl0(); } >b_flags & B_DONE) brelse(rabp); else { rabp->b_flags =| B_READ|B_ASYNC; rabp->b_wcount = -256; (*bdevsw[adev.d_major].d_strategy)(rabp); } } if (rbp==0) return(bread(dev, blkno)); iowait(rbp); return(rbp); } /* * Write the buffer, waiting for completion. * Then release the buffer. */ bwrite(bp) struct buf *bp; { register struct buf *rbp; register flag; rbp = bp; flag = rbp->b_flags; rbp->b_flags =& ~(B_READ | B_DONE | B_ERROR | B_DELWRI); rbp->b_wcount = -256; (*bdevsw[rbpailable list and mark it busy. * (internal interface) */ notavail(bp) struct buf *bp; { register struct buf *rbp; register int sps; rbp = bp; sps = PS->integ; spl6(); rbp->av_back->av_forw = rbp->av_forw; rbp->av_forw->av_back = rbp->av_back; rbp->b_flags =| B_BUSY; PS->integ = sps; } /* * Mark I/O complete on a buffer, release it if I/O is asynchronous, * and wake up anyone waiting for it. */ iodone(bp) struct buf *bp; { register struct buf *rbp; rbp = bp; if(rbp->b_flags&B_MAP) mapfr# /* */ /* * indirect driver for controlling tty. */ #include "../param.h" #include "../conf.h" #include "../user.h" #include "../tty.h" #include "../proc.h" syopen(dev, flag) { register *tp; if(tp = syttyp()) (*cdevsw[tp->t_dev.d_major].d_open)(tp->t_dev, flag); } syread(dev) { register *tp; if(tp = syttyp()) (*cdevsw[tp->t_dev.d_major].d_read)(tp->t_dev); } sywrite(dev) { register *tp; if(tp = syttyp()) (*cdevsw[tp->t_dev.d_major].d_write)(tp->t_dev); } sysgtty(dev, flag) { register *->b_dev.d_major].d_strategy)(rbp); if ((flag&B_ASYNC) == 0) { iowait(rbp); brelse(rbp); } else if ((flag&B_DELWRI)==0) geterror(rbp); } /* * Release the buffer, marking it so that if it is grabbed * for another purpose it will be written out before being * given up (e.g. when writing a partial block where it is * assumed that another write for the same block will soon follow). * This can't be done for magtape, since writes must be done * in the same order as requested. */ bdwrite(bp) struct ee(rbp); rbp->b_flags =| B_DONE; if (rbp->b_flags&B_ASYNC) brelse(rbp); else { rbp->b_flags =& ~B_WANTED; wakeup(rbp); } } /* * Zero the core associated with a buffer. */ clrbuf(bp) int *bp; { register *p; register c; p = bp->b_addr; c = 256; do *p++ = 0; while (--c); } /* * Initialize the buffer I/O system by freeing * all buffers and setting all device buffer lists to empty. */ binit() { register struct buf *bp; register struct devtab *dp; register int i; struct bdevsw *bdp; tp; if(tp = syttyp()) (*cdevsw[tp->t_dev.d_major].d_sgtty)(tp->t_dev, flag); } syttyp() { register tp; tp = u.u_procp->p_ttyp; if(tp == NULL) u.u_error = ENXIO; return(tp); } buf *bp; { register struct buf *rbp; register struct devtab *dp; rbp = bp; dp = bdevsw[rbp->b_dev.d_major].d_tab; if (dp == &tmtab || dp == &httab) bawrite(rbp); else { rbp->b_flags =| B_DELWRI | B_DONE; brelse(rbp); } } /* * Release the buffer, start I/O on it, but don't wait for completion. */ bawrite(bp) struct buf *bp; { register struct buf *rbp; rbp = bp; rbp->b_flags =| B_ASYNC; bwrite(rbp); } /* * release the buffer, with no I/O implied. */ brelse(bp) struct buf *bp; { regis bfreelist.b_forw = bfreelist.b_back = bfreelist.av_forw = bfreelist.av_back = &bfreelist; for (i=0; ib_dev = -1; bp->b_addr = buffers[i]; bp->b_back = &bfreelist; bp->b_forw = bfreelist.b_forw; bfreelist.b_forw->b_back = bp; bfreelist.b_forw = bp; bp->b_flags = B_BUSY; brelse(bp); } i = 0; for (bdp = bdevsw; bdp->d_open; bdp++) { dp = bdp->d_tab; if(dp) { dp->b_forw = dp; dp->b_back = dp; } i++; } nblkdev = i; } /* * Device startter struct buf *rbp, **backp; register int sps; rbp = bp; if (rbp->b_flags&B_WANTED) wakeup(rbp); if (bfreelist.b_flags&B_WANTED) { bfreelist.b_flags =& ~B_WANTED; wakeup(&bfreelist); } if (rbp->b_flags&B_ERROR) rbp->b_dev.d_minor = -1; /* no assoc. on error */ backp = &bfreelist.av_back; sps = PS->integ; spl6(); rbp->b_flags =& ~(B_WANTED|B_BUSY|B_ASYNC); (*backp)->av_forw = rbp; rbp->av_back = *backp; *backp = rbp; rbp->av_forw = &bfreelist; PS->integ = sps; } /* * See if the bl routine for disks * and other devices that have the register * layout of the older DEC controllers (RF, RK, RP, TM) */ #define IENABLE 0100 #define WCOM 02 #define RCOM 04 #define GO 01 devstart(bp, devloc, devblk, hbcom) struct buf *bp; int *devloc; { register int *dp; register struct buf *rbp; register int com; dp = devloc; rbp = bp; *dp = devblk; /* block address */ *--dp = rbp->b_addr; /* buffer address */ *--dp = rbp->b_wcount; /* word count */ com = (hbcom<<8) | IENABLE | GO | ((rb# /* */ #include "../param.h" #include "../user.h" #include "../buf.h" #include "../conf.h" #include "../systm.h" #include "../proc.h" #include "../seg.h" /* * This is the set of buffers proper, whose heads * were declared in buf.h. There can exist buffer * headers not pointing here that are used purely * as arguments to the I/O routines to describe * I/O to be done-- e.g. swbuf, just below, for * swapping. */ char buffers[NBUF][514]; struct buf swbuf; /* * Declarations of the tables for the maock is associated with some buffer * (mainly to avoid getting hung up on a wait in breada) */ incore(adev, blkno) { register int dev; register struct buf *bp; register struct devtab *dp; dev = adev; dp = bdevsw[adev.d_major].d_tab; for (bp=dp->b_forw; bp != dp; bp = bp->b_forw) if (bp->b_blkno==blkno && bp->b_dev==dev) return(bp); return(0); } /* * Assign a buffer for the given block. If the appropriate * block is already associated, return it; otherwise search * for the oldest non-busy p->b_xmem & 03) << 4); if (rbp->b_flags&B_READ) /* command + x-mem */ com =| RCOM; else com =| WCOM; *--dp = com; } /* * startup routine for RH controllers. */ #define RHWCOM 060 #define RHRCOM 070 rhstart(bp, devloc, devblk, abae) struct buf *bp; int *devloc, *abae; { register int *dp; register struct buf *rbp; register int com; dp = devloc; rbp = bp; if(cputype == 70) *abae = rbp->b_xmem; *dp = devblk; /* block address */ *--dp = rbp->b_addr; /* buffer address */ *--dp = rbp->b_wgtape devices; * see bdwrite. */ int tmtab; int httab; /* * The following several routines allocate and free * buffers with various side effects. In general the * arguments to an allocate routine are a device and * a block number, and the value is a pointer to * to the buffer header; the buffer is marked "busy" * so that no on else can touch it. If the block was * already in core, no I/O need be done; if it is * already busy, the process waits until it becomes free. * The following routines albuffer and reassign it. * When a 512-byte area is wanted for some random reason * (e.g. during exec, for the user arglist) getblk can be called * with device NODEV to avoid unwanted associativity. */ getblk(dev, blkno) { register struct buf *bp; register struct devtab *dp; extern lbolt; if(dev.d_major >= nblkdev) panic("blkdev"); loop: if (dev < 0) dp = &bfreelist; else { dp = bdevsw[dev.d_major].d_tab; if(dp == NULL) panic("devtab"); for (bp=dp->b_forw; bp != dp; bp = bp->b_forcount; /* word count */ com = IENABLE | GO | ((rbp->b_xmem & 03) << 8); if (rbp->b_flags&B_READ) /* command + x-mem */ com =| RHRCOM; else com =| RHWCOM; *--dp = com; } /* * 11/70 routine to allocate the * UNIBUS map and initialize for * a unibus device. * The code here and in * rhstart assumes that an rh on an 11/70 * is an rh70 and contains 22 bit addressing. */ int maplock; mapalloc(abp) struct buf *abp; { register i, a; register struct buf *bp; if(cputype != 70) return; spl6(); locate a buffer: * getblk * bread * breada * Eventually the buffer must be released, possibly with the * side effect of writing it out, by using one of * bwrite * bdwrite * bawrite * brelse */ /* * Read in (if necessary) the block and return a buffer pointer. */ bread(dev, blkno) { register struct buf *rbp; rbp = getblk(dev, blkno); if (rbp->b_flags&B_DONE) return(rbp); rbp->b_flags =| B_READ; rbp->b_wcount = -256; (*bdevsw[dev.d_major].d_strategy)(rbp); iowait(rbp); return(rbp); } w) { if (bp->b_blkno!=blkno || bp->b_dev!=dev) continue; spl6(); if (bp->b_flags&B_BUSY) { bp->b_flags =| B_WANTED; sleep(bp, PRIBIO); spl0(); goto loop; } spl0(); notavail(bp); return(bp); } } spl6(); if (bfreelist.av_forw == &bfreelist) { bfreelist.b_flags =| B_WANTED; sleep(&bfreelist, PRIBIO); spl0(); goto loop; } spl0(); notavail(bp = bfreelist.av_forw); if (bp->b_flags & B_DELWRI) { bp->b_flags =| B_ASYNC; bwrite(bp); goto loop; } bp->b while(maplock&B_BUSY) { maplock =| B_WANTED; sleep(&maplock, PSWP); } maplock =| B_BUSY; spl0(); bp = abp; bp->b_flags =| B_MAP; a = bp->b_xmem; for(i=16; i<32; i=+2) UBMAP->r[i+1] = a; for(a++; i<48; i=+2) UBMAP->r[i+1] = a; bp->b_xmem = 1; } mapfree(bp) struct buf *bp; { bp->b_flags =& ~B_MAP; if(maplock&B_WANTED) wakeup(&maplock); maplock = 0; } /* * swap I/O */ swap(blkno, coreaddr, count, rdflg) { register int *fp; fp = &swbuf.b_flags; spl6(); while (*fp&B_BUSY) { *fp =| B_WANTED; sleep(fp, PSWP); } *fp = B_BUSY | B_PHYS | rdflg; swbuf.b_dev = swapdev; swbuf.b_wcount = - (count<<5); /* 32 w/block */ swbuf.b_blkno = blkno; swbuf.b_addr = coreaddr<<6; /* 64 b/block */ swbuf.b_xmem = (coreaddr>>10) & 077; (*bdevsw[swapdev>>8].d_strategy)(&swbuf); spl6(); while((*fp&B_DONE)==0) sleep(fp, PSWP); if (*fp&B_WANTED) wakeup(fp); spl0(); *fp =& ~(B_BUSY|B_WANTED); return(*fp&B_ERROR); } /* * make sure all write-behind blocks * on dev (or NODEV for all) * a0200,0200,0000, 0000,0200,0200,0000,0200,0000,0000,0200, 0200,0000,0000,0200,0000,0200,0200,0000, 0200,0000,0000,0200,0000,0200,0200,0000, 0000,0200,0200,0000,0200,0000,0000,0201 }; ttstart(tp = &dc11[dev.d_minor]); if (tp->t_outq.c_cc == 0 || tp->t_outq.c_cc == TTLOWAT) wakeup(&tp->t_outq); } /* * DC11 receiver interrupt. */ dcrint(dev) { register struct tty *tp; register int c, csr; tp = &dc11[dev.d_minor]; c = tp->t_addr->dcrbuf; /* * If carrier is off, and an open is not in progress, * knock down the CD lead to hang up the local dataset * and signal a hangup. */ if (((csr = tp->t_addr->dcrcsr) & CARRIER) == 0) { if ((tp->t_state&WOPEN) == 0) { tp->t_addr->re flushed out. * (from umount and update) */ bflush(dev) { register struct buf *bp; loop: spl6(); for (bp = bfreelist.av_forw; bp != &bfreelist; bp = bp->av_forw) { if (bp->b_flags&B_DELWRI && (dev == NODEV||dev==bp->b_dev)) { bp->b_flags =| B_ASYNC; notavail(bp); bwrite(bp); goto loop; } } spl0(); } /* * Raw I/O. The arguments are * The strategy routine for the device * A buffer, which will always be a special buffer * header owned exclusively by the device for this purpose dcrcsr =& ~CDLEAD; if (tp->t_state & CARR_ON) signal(tp, SIGHUP); flushtty(tp); } tp->t_state =& ~CARR_ON; return; } if (csr&ERROR || (tp->t_state&ISOPEN)==0) { if (tp->t_state&WOPEN && csr&CARRIER) tp->t_state =| CARR_ON; wakeup(tp); return; } csr =& PARITY; if (csr&&(tp->t_flags&ODDP) || !csr&&(tp->t_flags&EVENP)) ttyinput(c, tp); } /* * DC11 stty/gtty. * Perform general functions and set speeds. */ dcsgtty(dev, av) int *av; { register struct tty *tp; register r; tp * The device number * Read/write flag * Essentially all the work is computing physical addresses and * validating them. */ physio(strat, abp, dev, rw) struct buf *abp; int (*strat)(); { register struct buf *bp; register char *base; register int nb; int ts; bp = abp; base = u.u_base; /* * Check odd base, odd count, and address wraparound */ if (base&01 || u.u_count&01 || base>=base+u.u_count) goto bad; ts = (u.u_tsize+127) & ~0177; if (u.u_sep) ts = 0; nb = (base>>6) & 01777; /* *# /* */ /* * DC-11 driver */ #include "../param.h" #include "../conf.h" #include "../user.h" #include "../tty.h" #include "../proc.h" /* * Base address of DC-11's. Minor device i is at * DCADDR + 10*i. */ #define DCADDR 0174000 /* * Number of DC's for which table space is allocated. */ #define NDC11 14 /* * Control bits in device registers */ #define CDLEAD 01 #define CARRIER 04 #define SPEED1 010 #define STOP1 0400 #define RQSEND 01 #define PARITY 040 #define ERROR 0100000 #define CTRANS  = &dc11[dev.d_minor]; if (ttystty(tp, av)) return; if (r = dcrstab[tp->t_speeds.lobyte&017]) tp->t_addr->dcrcsr = r; else tp->t_addr->dcrcsr =& ~CDLEAD; if (r = dctstab[tp->t_speeds.hibyte&017]) tp->t_addr->dctcsr = r; }  Check overlap with text. (ts and nb now * in 64-byte clicks) */ if (nb < ts) goto bad; /* * Check that transfer is either entirely in the * data or in the stack: that is, either * the end is in the data or the start is in the stack * (remember wraparound was already checked). */ if ((((base+u.u_count)>>6)&01777) >= ts+u.u_dsize && nb < 1024-u.u_ssize) goto bad; spl6(); while (bp->b_flags&B_BUSY) { bp->b_flags =| B_WANTED; sleep(bp, PRIBIO); } bp->b_flags = B_BUSY | B_PHYS 040000 #define RINGIND 020000 struct tty dc11[NDC11]; struct dcregs { int dcrcsr; int dcrbuf; int dctcsr; int dctbuf; }; /* * Input-side speed and control bit table. * Each DC11 has 4 speeds which correspond to the 4 non-zero entries. * The table index is the same as the speed-selector * number for the DH11. * Attempts to set the speed to a zero entry are ignored. */ int dcrstab[] { 0, /* 0 baud */ 0, /* 50 baud */ 0, /* 75 baud */ 0, /* 110 baud */ 01101, /* 134.5 baud: 7b/ch, speed     | rw; bp->b_dev = dev; /* * Compute physical address by simulating * the segmentation hardware. */ bp->b_addr = base&077; base = (u.u_sep? UDSA: UISA)->r[nb>>7] + (nb&0177); bp->b_addr =+ base<<6; bp->b_xmem = (base>>10) & 077; bp->b_blkno = lshift(u.u_offset, -9); bp->b_wcount = -((u.u_count>>1) & 077777); bp->b_error = 0; u.u_procp->p_flag =| SLOCK; (*strat)(bp); spl6(); while ((bp->b_flags&B_DONE) == 0) sleep(bp, PRIBIO); u.u_procp->p_flag =& ~SLOCK; if (bp->b_flags&B_WANTED) wak 0 */ 0111, /* 150 baud: 8b/ch, speed 1 */ 0, /* 200 baud */ 0121, /* 300 baud: 8b/ch, speed 2 */ 0, /* 600 baud */ 0131, /* 1200 baud */ 0, /* 1800 baud */ 0, /* 2400 baud */ 0, /* 4800 baud */ 0, /* 9600 baud */ 0, /* X0 */ 0, /* X1 */ }; /* * Transmitter speed table */ int dctstab[] { 0, /* 0 baud */ 0, /* 50 baud */ 0, /* 75 baud */ 0, /* 110 baud */ 0501, /* 134.5 baud: stop 1 */ 0511, /* 150 baud */ 0, /* 200 baud */ 0521, /* 300 baud */ 0, /* 600 baud */ 05t% j10 & 6  w R%@7x%%@7h% b% L 71 P% L 70_<%&  _ B\fWmdW70`W0%^W 0e0 00 %%j10 j%707`0 0Wv0 j%WE7tVWt7WWt7WWt7WWeE7Z'  .VZ'  VZ :    /(' 7 /jW/ >?/% 6/ /ȋ [  & [ ewW/ j%% V_~%V_%Ueup(bp); spl0(); bp->b_flags =& ~(B_BUSY|B_WANTED); u.u_count = (-bp->b_resid)<<1; geterror(bp); return; bad: u.u_error = EFAULT; } /* * Pick up the device's error number and pass it to the user; * if there is an error but the number is 0 set a generalized * code. Actually the latter is always true because devices * don't yet return specific errors. */ geterror(abp) struct buf *abp; { register struct buf *bp; bp = abp; if (bp->b_flags&B_ERROR) if ((u.u_error = bp->b_error)==0) u.u_31, /* 1200 baud */ 0, /* 1800 baud */ 0, /* 2400 baud */ 0, /* 4800 baud */ 0, /* 9600 baud */ 0, /* X0 */ 0, /* X1 */ }; /* * Open a DC11, waiting until carrier is established. * Default initial conditions are set up on the first open. * t_state's CARR_ON bit is a pure copy of the hardware * CARRIER bit, and is only used to regularize * carrier tests in general tty routines. */ dcopen(dev, flag) { register struct tty *rtp; register *addr; if (dev.d_minor >= NDC11) { u.u_error = E_#'_tjWX/ w b *7Z D/4 %$|#/t# &/ Z m`#Y/7V# /7 Y /.7Y .%%4# %rxY  .w . *ZTYPY   . m"6Yw " r e%A! y Y   YX""d _ x%+'  "_1'55 Xe  55&5' Ve @"_5 |Xe  5 hXe  5 TXe  55&9' e !w &X  E='  !eXC'error = EIO; } NXIO; return; } rtp = &dc11[dev.d_minor]; rtp->t_addr = addr = DCADDR + dev.d_minor*8; rtp->t_state =| WOPEN; addr->dcrcsr =| IENABLE|CDLEAD; if ((rtp->t_state&ISOPEN) == 0) { rtp->t_erase = CERASE; rtp->t_kill = CKILL; addr->dcrcsr = IENABLE|CDLEAD|SPEED1; addr->dctcsr = IENABLE|SPEED1|STOP1|RQSEND; rtp->t_state = ISOPEN | WOPEN; rtp->t_flags = ODDP|EVENP|ECHO; } if (addr->dcrcsr & CARRIER) rtp->t_state =| CARR_ON; while ((rtp->t_state & CARR_ON) == 0) sleep(&rtp->t_rawq, TTIPRI)  ] W  E % Z W    &  E Z/& W %&  I' R %K'   O'   ,ww ,,7&W ,W f W7 Www Nf   ^, \wrw `% %~NQ'NU'  wBw 0 7 V7 rW+7 R5 3 ^W_ + +ȥ:  5 @pJWRW %~Q  +JW   + 7Q  0+*9~+& V7 zQ0/* */ char partab[] { 0001,0201,0201,0001,0201,0001,0001,0201, 0202,0004,0003,0205,0005,0206,0201,0001, 0201,0001,0001,0201,0001,0201,0201,0001, 0001,0201,0201,0001,0201,0001,0001,0201, 0200,0000,0000,0200,0000,0200,0200,0000, 0000,0200,0200,0000,0200,0000,0000,0200, 0000,0200,0200,0000,0200,0000,0000,0200, 0200,0000,0000,0200,0000,0200,0200,0000, 0200,0000,0000,0200,0000,0200,0200,0000, 0000,0200,0200,0000,0200,0000,0000,0200, 0000,0200,0200,0000,0200,0000,0000,0200, 0200,0000,0000,0200,0000,; rtp->t_state =& ~WOPEN; if (u.u_procp->p_ttyp == 0) { u.u_procp->p_ttyp = rtp; rtp->t_dev = dev; } } /* * Close a dc11 */ dcclose(dev) { register struct tty *tp; (tp = &dc11[dev.d_minor])->t_state = 0; if (tp->t_flags&HUPCL) tp->t_addr->dcrcsr =& ~CDLEAD; wflushtty(tp); } /* * Read a DC11 */ dcread(dev) { ttread(&dc11[dev.d_minor]); } /* * Write a DC11 */ dcwrite(dev) { ttwrite(&dc11[dev.d_minor]); } /* * DC11 transmitter interrupt. */ dcxint(dev) { register struct tty *tp; n+ 0X+9P+PQupwHQ>+e7`*  00*9(*  w:w ( * w*w  %rT  w %fxT%dpT55 TT  LT  557 U )Nf 5\WTX' %  fe  c'  @e5 ef  h'  n'  fe  5%2hTbT OZ\VT PTp[ f  5_rw  PS  HS  7 T (%&  e  %2SS ~NZ\S S[   7 X(wtw bNq'   5N  %t0W %t0W5&&|' Re %ww v% m&' % Z%\W'  '  ' e%%Ԃww  fe  & F F(wF7 F .wFef/B J ӕ- R r f e0 @ >pF ҋ D~8// NFӕ0 $f v Le0 9eFF F  FF 7Ewe&  mE E Z~  Z  Z~ w7 E E E0   EWp `e0f|E ,rEP hE bE @f FE ^74E /^*E"E-EEf B\BB\  7Bterminated. %s 4, 8,0<,@@,PD,`H,L,? O,?@ S,? W,? [,? _,?@ c,? g,? k,? o,?@ s,? w,? {,?@,?,?@,?,?,?,?@,?,?,? ,? ,?,?@ ,?@,p,r,t,v,,,,,,,,,,,,-- -----!-%-+-0-5-:-e  %  &e  %  E?%  ,' wF ` Z?M7 M7 M&  %  %%e%e &e  `w  LQ>&7 y R  tVt5V Q8t-LLV|EQ e7 $LtVt&VQ et0 Vt0 V_ %  \Q  tVt5V-bP_ %  t Vt Be0# @aє 6a    BA   W 6ae B@e0am* C` aeȐ9 ȕ0 aȕ1 PC JC8+,,,  zzz%.1o%.8s+%dmovcmpbitbicbisaddsuclrcomincdecnegadcsbctstrorrolasrasljmpswabldfpsstfpsststclrftstfabsfnegfsxtmtpimtpdmfpimfpdmuldivashashcbrbnebeqbgebltbgtblebplbmibhiblosbvcbvsbhisblohaltwaitrtiiotresetmulfmodfaddfmovfsubfcmpfmovfdivfmoveimovfimovfomoviemovifmovofcfccsetfsetisetdsetljsrxorrtscflgsflgemtsysmarksobsploctindirexitforkreadwriteopenclosewaitcreat  ww r  tVe t V\ N e%w , etN e5`e-MetVtUV 6N etVN e "' tV '  % w w   Ne -M%  % & M e7 M'   @E%@E7H %'  ' 7!BU@6B 2B RaE UUa6BBB linkunlinkexecchdirtimemknodchmodchownbreakstatseekgetpidmountumountsetuidgetuidstimeptrace27fstat29smdatesttygtty33nicesleepsynckillswitch3940duppipetimesprofil45setgidgetgidsignal495051525354555657585960616263r0r1r2r3r4r5sppc%.8s: %sb b , , %d %s {}; %.1o*$%s(%s)*(%s)+*-(%s)*(%s)(d~oxxfeVcds4lr^ 0 %ew6> WtAx% mv  %  ~wr w ` 6G  N>W 4  "w>   ~FRW>W 4 F  ~F%FN>W 4  w %F%F FF3 [mF*%vF  p-Z\ -K %RF  p-Z\  [2F @`e7DFwX -Kw < DCe Ԥ w. w   x5 E@E!%E-E_ ^DE b w w C KR J  e55  J a; a66  aAa `&e  a   aBAe!`!Z!P!##"!"b!,!H$t"!!`"!! " . > N ^  e@tEWt@P56<W%" e  %fe  j%%;<5 ^J-PF RJrImBF  @J`I  -,F$Fm"F`  e %fe j%% @w w ~~j1C jd %w w n Z V wj C>W%HW7C0 ej1-C >W  j%% w  >W\WĔ D-%FW%dWCCCCww  Z  ww N ZD-N&, \W+,  0,  ww w>:a  U>w:a > w:a >w>w>w  7 > >a >U>>W 8UHa W 8E<> a h h   Wp `e0eӕ?f& ,P   @f  p27l "p2-f@w fw(w$"wfww  b"wfw7R fw #JA 7 fAW,f B@ 8 @&61fA   @ @e7X 1@# 1wfw: w6 #w fT.Y..vs.cOdc.cNpartab.cMbio.cLsys.cKlp.cJdhdm.cIhp.cHkl.cGtm.cvt.cErk.cDdh.cCdhfdm.cBtty.cAhs.c@dp.c?dn.c>tc.c=ht.c<pc.c;rp.c:rf.ccat.ca.out7mem.cbio.ocat.odc.odh.o7Z* Wp Aa1Wp Aa1 %2!R0  9!T0  A!V0  G!X0  M!Z0  T!\0  B#)7 )7 )@eT7)7 ))$  1|$Y!  '-))  z)) f #T ) n)d)& f ĔT) f : B)8)& f Ĕ()  ) ) #w`w N-(( (((?( n%#_ _ _ %a%z %A%Z%__$ ( d %a%z%A%Z%0%9%_ d f(%% t(w w #wfw A#Q  OfA  ^ y   F y @0fA  @9 fA @e&7~ wz 7t @ #w7 fAW @wD fr41r478 5 e&w$ &# 5& w&FL&@H&:D&4@&.<&(8&"4&0&,&(& $& &&&&& &&&f& fwH ,#wdhdm.odhfdm.odn.odp.ohp.ohs.oht.okl.olp.omem.opartab.opc.orf.ork.orp.osys.otc.otm.otty.ovs.ovt.of ȋ `% J( F(  % wh% $( D f 5 t%C-'_ _ _ _ -'-'-'-' ' ' ' 'i! 0 w! 0   % %_ l'@d' %   %'%"V d  ' &%   d %\ n d d 7 & &_&%. &_&?& 8%  -&&! 0 &f $ N! 0 _,l&f&_, d %  f "& w }f@fA w, w" e"w" ew" @lw" Alew &@t`e @& HADCBF7F+L T \ d   & (38:')1.x.pdh *  ( d0/lib/c0/lib/c1/lib/c2/lib/crt0.o/lib/mcrt0.o/lib/fcrt0.o/lib/fc0/lib/fc1/lib/crt2.o/lib/crt20.o/usr/c/c0/usr/c/c1/usr/c/c2/tmp/ctm0a%s: c0-Pc1c2as-/bin/asa.outa.outmove failed: %s ld-X-l2-lc-l/bin/lU.Y..5iget.c4slp.c3sys1.c2sys2.c1rdwri.c0main.c/clock.c.fio.c-malloc.c,nami.c+sysent.c*pipe.c)sig.c(sys3.c'alloc.c&trap.c%prf.c$subr.c#text.c"sys4.ca.outmain.oclock.ofio.oiget.omain.omalloc.onami.opipe.oprf.o_r d %_,! 0 _,w xf =4wjw X&!  Nf   @ % %w6w $%%e!! 0 T%e!%e7%w w % %%B#%! 0 lw w %/2 R%/ p%* D /w  R%/-0%,% ,% f $% *: 7 yw D wD w 2  w. 7 $$ -$$$ $$$ f $   w D 55um5A 7ruWp BddefineincludeendififdefifndefunixCan't creat %s If-less endifUndefined controlNested 'include'Missing file %sControl syntax%d: Line overflowToo much definingtoo many definesExcessive define loopingdefine recursion loop Can't find %s Try again Fatal error in %s defined function requires argumentsdefine argument mismatchdefine prototype argument errornon-terminated stringdZoTxfe2c@slrp2  0 rdwri.osig.oslp.osubr.osys1.osys2.osys3.osys4.osysent.otext.otrap.om\$2Dԋ@e! f wr e Wp m$ @ ! 0 #ʋ CԒ e!w %1% % %! 0 % %w w w#1%z# v#%d" 0 w @f ` ̋ d  ~ ̥(  ~ %12%׆ ,%(% D ̋ ~ w B C %/ ”% %ӥ.w w N @ԥ/̋tw w  X57Nf  N"   Ne @-@ %ewW.Y..mkconfm40.ovl.sc.cmkconf.ca.outdata.sc.osysfixl.outxl.outm40.om40.sm45.sl.outsysfix.ca.outE5% %N9"  @tE %." wZ w H C Ȕw< w * C F %o  w @e” ̋Cw  w N w :@e5@ A H@e55  Ne .A Aa1n@e50 5% %(L" 0 w` N D 5  Ne0 A Aa1Fu-p"@ 5  N ~ @e25.}. .}. . @ 4 =.5 @ @anfe2 `   & 6  w  % @ % @ @m  @ @m u-w$w   f ( 7N     5   N   ww  %d @ 5he@--\ N   w` BNef  w*5 @ A Aap %d@w  f h%f F%5%N!  f0 % wX._..fc1errorsu-u-@ @aF@e25..@. . ~ w Z@5@ %) wB@ȥ  u@5%,%) 4 }- N  " 0 @ w 5 u %)_ w%\ 5@- %\@ ȕ\@ H0%\E 5%" %\@ ȕ\@ H@%"%'u%'@ ȕ' V5@-% " 0 %'@ ȕ'@ H%( %) 5%,%) @ Nw ~wDe   % w7 z7 zׯp- h f(wZ7 \ .wPeHB J ӕ- R r f e0 @ > ҋ D~8pt ӕ0 $f v Le0 9e  7we&  mf d ~    ~ w7 8 . *0   Wp `e0eӕ?f ,P   @f  7Y._..WconfurunUkenTdmrmain.oyoldbox1!proc.h file.hinode.huser.htty.hsystm.hparam.hlib1lib2buf.hconf.hreg.hfilsys.htext.hlow.oldmailboxmch.oconf.oseg.hino.hbox2 D @_w %a%z %A%Z%_wj w TN  %0%9w> w ( @5 A @  w w ~wDe   % @w7 7 ׯ-  (w7  .wxe"B J ӕ- R r f e0 @ >$ ҋ D~8"" ӕ0 $f v Le0 9e  7we&  m  @~  @  x-f@w fwNwJ~wzf@w2w.wXf@www6 f$f@@& HADCBF7F/dev/rk2/dev/rp0%s cannot open %s %l bad free count bad free block (%l) read error %d count = %d; errno = %d fdoxfecsrlrZ._.. bjcheckerscubictttttt.kwumppsychchessskymoo[._..x`...ctm0actm4actm1actm2actm5actm3aatm2aatm3actm0cctm3bla04170atm2batm3bctm5cctm3ce...dumparasbascatRccQcdbpasswd chmodchown clri cmpcpdate db dcSdfdswduechooshexit6fcgotoifshkillldlnlogin\._..stmaaastmbaastmcaastmdaastmeaastmfaastmgaaa...lsmailmkdirmvnmodoprprpsrewrmrmdirxsizesortstripsttysusumsynctimetpttyuniqddwhowriteedrestoryefile]._..Ulib.baignatabcignctabsaltw2006ratrofsuftabubookratfor~unitsetabeigntmac.rtmgntmgatmgbxtmgctmac.squizlib.bobtmgccrontabtmac.sb...crt0.oc0fc0qfcrt0.ofilib.afr0.oc1liba.a~libf.ac2|libs.a{liby.atmgbylibp.axmcrt0.ofc1vas2filibtlprfc0fc1fc2libd.afc0libo.amlibc.aoas2ncheckdcheckichecknewgrpchgrp^._..kchk$cryptwsabcrtblcolcomm}creflcrpostrmesgfediformcuchksnospeaktmanupostjtryaccniceovsplinerathole sleepplot splittyponohupproofc...mtablpdoinitinitggettyfglobinit#mkfs"mknod!ttys mountcronnidgetpasswdrcupdateumountdpdutmpdtabgorkspdgroupmotdwallcnewsndpdvogettyvvogetty & 6  hw V%  @eeeN % # # !"*"   "- z "&e  "&  7  F%ww  C˥*˥?˥[ӋK & z ?e X!= L  N  Q  F% B4$ $%%+ "6$ F 6$& z ?e "/  O &  ӕ N ww D & X e-,e"e!ww Cbcdpfespdatem6manpwdotapomtcalskymazeeqncatsimfactorgrepnroffptiroffnfsplogibmtssptxtabsindexgraffindaplspellproflookteed...rp0mt0mknodakmemmt1cmemrrp0enullhs0rhs0mt4mt5rp1rp2rrp1rrp2rp3rmt0xxrrk1rrp0rrp1tap0tap1tap2tap3tap4tap5tap6tap7D&  %&" _   %" wXw Fg  F% &w:w (.. w Nf p w DCE 5 7n y5 #%]  & p w%-  5 @5  5    & & w HNf  p  w(w DCԢӋ w@w D %" E ӕ/D%" z HDwf@w fww neqnwchypacdiffcolgsiindtmgcpallfsendslavefsclcunitsfsfgetratforfscnvlxyaccm11l11bobb11quizcallusortorestorhcatsimquotbannerpinheadtty8runrf2rf3rf4rf5rf6rf7rhp0rhp1rhp2rhp3rhp4rhp5rhp6rhp7rhs0rhs1rhs2rhs3rhs4rhs5rhs6rhs7rk0rk1rk2rk3rk4rk5rk6rk7> z wfwrwn wnf@wVwR wLf@w:w6 w*f@@& HADCBF7F" *?[ Arg count No match /usr/bin/Command not found. ./No directory /bin/shArg list too long loupepdgencbisendpigcryptnumberkmantcatsimsearchcpircigetjststktekstarekaaishuprimesrevtacctlazarusvt0gsipteklexkrofffdbagenlogoutrmt0rmt1rmt2rmt3rmt4rmt5rmt6rmt7rp0rp1rp2rp3rp4rp5rp6rp7rrf0rrf1rrf2rrf3rrf4rrf5rrf6rrf7rrk0rrk1rrk2rrk3rrk4rrk5rrk6rrk7" & 6  zw h0%@ e%T %T  7x 7 s 7p 7f 7 a  & :   & : j 0#4 @/ 7* 8 U . U $ E  & :     e zw 7 7 7   & %  zE  wZ  X%%a%z %Z |e Ԑ  X% \&%A%#%  %@ % % % $%   X%w D &  _...^bin]lib\tmp[admZgamesYsysXfortmdecsourcelpdpubmkenrrp0rrp1rrp2rrp3rrp4rrp5rrp6rrp7tap0tap1tap2tap3tap4tap5tap6tap7tty8xX%̋wfw@e7 wf@ww wjf@wz wN f@w`w\ w*f@@& HADCBF7BF0T ea 0p --z 11e 22@ ;login: :login: login: login: :login: ;login: /bin/loginlogin alpha A A | beta B B | gamma \ \ GAMMA G G | delta D D | DELTA W W epsilon S S | zeta Q Q | eta N N THETA T T | theta O O | lambda L L LAMBDA E E | mu M M | nu @ @ xi X X | pi J J | PI P P rho K K | sigma Y Y | SIGMA R R tau I I | phi U U | PHI F F psi V V | PSI H H | omega C C OMEGA Z Z | nabla [ [ | not _ _ partial ] ] | integral ^ ^ e6 f r   ,e7 &      &e " LLeJpL@11     L  wOut of space. x LeJpLeJ@BlR s3 BJJ& F 1L1 JpL f&7 L`CKeJ GBxe, 2eJ BeJ, 2 J 4lB4 4NJ0NAeJ  0 & 6  w %T N @-6E#@e5%% x N b@x@ 7|e 5  @ @m&  5Nf  N p u-  ww 65 @  u-@eZ55 u-P N =  x6 tAZ   -Hu=@eZ5@  f  5 ' $ 55 fNaeNQTWZ]ILOJ ,Out of headers.      @ @W nW J0W,W,@@& ,Be "LeJ  r &r J7 d & L 7B 74  * J@  eJ UnJ7 e e B02 L  leJ2   JLJA eJJ  bwpwJcannot opef  % _D@@m w @@a @  f ~ NNaef ~ 5` @@ap% d   @@a u u-@  ~u=@eZ5@  f  _&@  f ~ NNaef ~ 5` @@a u u-@ 8   & 2%  Nfe& 2%_&w p  u  }@@wRw @    }w( w  j    D 0jz f`` z0*Hcannot open output file formaletter77 h S  S  vrh& \  R  r N e0 6 e0 , w08AGMQV[blt}JanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecembern output file form.m Z  f %7:2 w& Nw  @  @me5'5@ RA @l 5 } @  N u@ RA @l 5@A 1`  }  ww @ @  w @  @ &R@ &P %A @, @ 0 w ~wDe   % w7 7 ׯv- n l(w`7 b .wVeB J ӕ- R r f e0 ( w w  w w{  } 7  w 6 w w  p j   2 &f VV\[{]V}Q  A  Hw  f 80 9 ] }  NN6         f rt  rlw T @N z F@w@. X$ `&n p7  ,   F  & 6  w  72 7& 7* 7 7" 7 *7 7 +e@ȥ-#@7 y   ~e@ȋ e w%@75 @PAPpP % ",@EPP x55 @P@pP %@0PP5 @0P %!P x5 )X x5u@EpP@EP f@5 @EPX x5v5 @P0P  @ > ҋ D~8 ӕ0 $f v Le0 9e  7we&  ml j ~    ~ w7 > 4 00   Wp `e0eӕ?f ,P   @f  7 -f@w fw>w:wnf@w"wwLf@www*f@<7    @ [w  ]w  B 7   t   wf n0  Nf \ 7 J T &D ~7 *7 ,&[w  e0w ]w  Lp &:w w w    w    B 6  &f   "&   z e q,  78  w :   H w@0P %7 T 7R    @EPE5 -EP@7 r` p5 ,wvw d @ @De@H,[_ N 5=@0 N * a x"N 5@-UA@ ȥ]L@p@w@0 55 @e0@-AupAmeu@ @5%0A@ ȥ]  @p + % N w A@ 5%\6 55@@& HADCBF7Fd : X v ffffffff Usage: crpost [-d] file1 file2 ... -d: 0 < d < 10 read error doxVfdecslrrfBBb2 W"f&@w  w        v$p t  \V z PJ l :  :4 T     q,   &J   7   7 eJ&J " q,  n7q,  Z7eJ &fCC  j @q o  5%0%7@t@me5 @ % u A@ 5 A1@@Ew|f ,P   @f  p 7 8p -f@w  f@)wfw*>JA 7 8fAW,f B@ 8 @&61fA   @ @e71@D 1wHf@wwJw*f@@& HA\_`cfiloruadgjmpsvbehknqtwx{~y|z}&F  6`( &   w`&  Bl~error on copy f1N1N1N1&0tC  BZqqq&qq, qf& @l1 11 1  D ( & qf7 q,@ @  b@  ȝv q,q >DCBF7fFcds~Bad string p mgetpw.o # Dw    7 w &  %5 5 EB ҐNe % B %:% %:%0%9Wp D`eD- /etc/passwd(h_getpw"~getpwL2bppbufcnbuq,@      f7 q,@ @  T 8 @  \ȝ   x f   Wv Ee&    2 2 2  7 4 f& Wv Ee&  @E7 2 we2 @` & w2 f  2 2 Wv E@`e& & ! , e : loop if $1x = x exit icheck $1 dcheck $1 shift goto loop fuidpwfcsv L3L4_open L5,L20000$L1(cret _seek L6NL8ZL20002T_getc L11vL16L13zL17mon.oo #48w  & & & e  & % R %5 w }@p@p w|A Wpu`A Wpu '@@ E5!  & f % f@ &f ewmon.out(Ix_monitor"~monitorL2L3highpcsbufssizbufsiz cntsiz obuflowpccsv L4F_profil L5_creat _write _close L1_nargs L6.prstr6ffltpr.o "< eӕ?pfloat"pscien"putchr.o ",p0fr ,hP ^ X @f < |7,* p| - |_putchar"_flush"._fout$vfl:getchr.o +"B0f   7 7 7 )_mount"cerror nice.o "Tf"w _nice"cerror nlist.o " <fwA@ e  X O-m- e7|-| -t-l) l"  @ 7"B7,<7,6 7,0,( e TL7_ldiv L8cret perror.o #Hw - N rf % % r& % %ww Dԋ@ wvUnknown error:  (  _errno _sys_ner _sys_err _perror"~perrorcnscsv L2())())))_getchar"_errno _fin badret4atof.o !Llw Wf&  C% - 0    0  ~ 5  ע- 0 Wp `  BW@ &  W B~  VVw0\ B@e_nlist"donebufcdonecountopen.o "pfwww_open"cerror pipe.o "h$f*wBJ _pipe"cerror pipe*prof.o "x$ fwwww $,L3_strlen"rL4H_write L5L6cret ~strlenrsstrL8zrin.o.o $$w 5    %9  5 BC@C5  %-%.%0 555 B5 !5wti9_rin"~rincdfn)_atof"csv cret digitone@outhugeten Bbig\chdir.o !dfww  _chdir"cerror chmod.o !t fww w _chmod"cerror chown.o !t fww w _profil"putc.o " lfwAQ  OfA  ^ y   F y @0fA  @9 fA @e&72w.7(@wD7 @IY_putc"\_putwcsv L2:L20001L20003L20005L6XL7&_getchar L3F_exit L8fL9zL20007lcret fltused alloc.o !f&UUDe .E ' $ 7?%7e-Ue?z7tnUh55 ` ć `7@ 84U ef@e7E_chown"cerror close.o !Tf@w _close"cerror creat.o !pfwww_creat"cerror dup.oo !\$f@)w)dup)_dup"cerror execl.o !lfw@e7 w _execl""_fflush"_fcreat"cerror _errno badretgoodretflqsort.o $Dw w wAupNNmf , ww @@5 _~ fA rBpEu@@`55DCN&  f& d%5 2`D--`f  $`f& %`Df %5 D-&  C-D-%@@AA@ Nf` , u_8Nf , @`5_8f %Cw~w zH_allocs#_allocp#_alloct#_alloc"_sbrk L6L7&tL11L12fL8L20001L13_free"fltpr.o "H7  ӕ- ӕ0B~ӕ.  ӕ0~ B~7  ӕ-ӕ. B~ӕe cerror execv.o !(0fw w  (w )_execv"cerror __exectr rttfork.o "d$fw7 _fork"cerror _par_uid$fstat.o "lf@ww _fstat"cerror getc.o $" `fwJA 7 fAW, tDCԒ wZw VNDCB5ҒS w*   ӕ- ӕ+ r e0e0S99Y999I9pfloat"pscien"Nfltused"_ndigit ecvt fcvt printf.o "0 ,w ~wDe   % w7 7 ׯ-  (w7  .w~eB J ӕ- R r f e0 @ >* ҋ D~8f B@ 8 @&61fA   @ @e7"1@ 1wXYIindir_getc"d_getw"_fopen"cerror _errno badretfillgetcsw.o 1"0 f&_getcsw"getgid.o 9"< f/_qscmp _qses _qsort"~qsortfc esancsv _qs1",cret ~qs1,eshplpacijlnL38L2~L4L20001_qsexc"L20003L9 L20008L20005L20007_qstexc"L20010L12 L14bL15F~qsexcrirjc ӕ0 $f v Le0 9e  7we&  m  ~    ~ w7 f \ X0   DWp `e0vdoxfecsl$rI8Ygetgid/_getgid"getuid.o E"0 f_getuid"gtty.oo K"lf@ww  _gtty"cerror kill.oo Y"0fw %_kill"cerror kill%indirlink.oo m"t fww w  _link"cerror makdir.o "ijnL20~qstexcrirjrkcijknL24read.o "x"f@ww"w_read"cerror sbrk.o "H<fD@wm:Hw.wm(fwHww ))_sbrk"_e)888_printf"pfloat pscien _putchar csv cret formplooprjustndigitgnumtwidthndfndswtabdecimalvoctalhexfloatsciencharacstringlogicalremote$prbufdfww _makdir"cerror mdate.o "t"fwA@A"w _mdate"cerror mknod.o "&$fwww&w _mknod"cerror mknodmount.o "&f&w nd cerror ndL_brk"(seek.o "|$f@ww$w _seek"cerror setgid.o #`$f@.w )setgid._setgid"cerror setuid.o #Tf@w _setuid"cerror signal.o #(HfAW @w f17 5 eXw 5&  w&L&H&D&@&<&8&4&0&,&(&z$&t &n&h&b&\&V &P&J&Df& 0)rtt_signal"cerror NSIG  %ew_nargs"jsrsdltstipcmpiradditjmpixbri|reset.o " Hw www w)99_setexit"_reset"csv cret sr5 spc"ltod.oo z"p$f =f 5= _ltodraceindir_ptrace"cerror _errno atoi.oo #|\w B 5  ʥ ʥ ʥ- ʥ9 Wp @@`eʥ0  wy_atoi"~atoiapcfnpcsv L3L10000L6DL20004,L7JL8Vcret cerror.o !D7FdvecttvectXsleep.o #Df@#_sleep"sleep#stat.oo &#t fww w _stat"cerror stime.o /#\f@Aw _stime"cerror stty.o 6#lf@ww _stty"cerror sync.o =#< f"_dtol"ldfps.o f"4 fu_ldfps"ladd.o _"D0w BB BJww BBdb@ BJw)9)9_lsub"_ladd""csv cret ctime.o # `w N  ww DeL@4 &  0w/%J %K  t5 t5N 5N 5  B-cerror"_errno $_sync"sync$time.o D#H f BR_time"times.o L#Tfw +_times"times+umount.o R#|0fw _umount"cerror indir_errno unlink.o Y#dfww  _unlink"cerror wait.oo a#t $B-%B-B-% &  0 ww DC%: e`m e rfww p@&f % r<R r< r<R r< rWtC` re rwF   !7 %n@    0!" 7 ww HԔAA WpCebԔԔԔ BeWpCexԔԔԔ&  ed&  ed&  ed&  e@ &  wRw Nr0 7 75 5 5 Der Z  Talloc.d t  --fatal 5C  nr d 5E r  7bad address in parsingH І 5' b5E    F@e DEC55 DECwf&  @! C ef5 Clw^ Lttte!uw7stack overflow  f & w })_wait"_nargs cerror write.o h#x"f@ww"w_write"cerror abort.o !< f_abort"ioterrlst.o #pDL[u#5>Tfr 2?Ud!Error 0Not super-userNo such file or directoryNo such processInterrupted system callI/O eA r nw8mw .D % A r  r e0@ԕ A r e0@wPF@DM:/ESTEDTDay Mon 00 00:00:00 1900 SunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDecxx&@D f @D @5C g 5E r    7bad address in translationHuue ue” uACeu  7not a bundle e 6& & e-& ,ȋ 1 wW & 7 A &ECA@lAU xrrorNo such device or addressArg list too longExec format errorBad file numberNo childrenNo more processesNot enough corePermission deniedError 14Block device requiredMount device busyFile existsCross-device linkNo such deviceNot a directoryIs a directoryInvalid argumentFile table overflowToo many open filesNot a typewriterText file busyFile too largeNo space left on deviceIllegal seekRead-only file systemToo many linksBroken PipeX9IXXXhxxh (XhhxxXh9IX_cbuf _dmsize#_timezon#0_tzname#2L1@L2D_dayligh#6_daytab#8_ctime"~ctimeatcsv _localti"_asctime" cret ~localtictdaylbegittimdaylenddaynocopyt_dpadd _gmtime"0L10000jL5_sunday"L6L10001L10002~shHhXxH(hxHhH(  99(9 9htracingfgisefclfbfsbfcflush":obuild"putch"iget"Pkput generate"cfile dfile ofile input main"succ"~fail"_sys_err#L1DL2LL3[L4uL5L6L7L8L9L10L11L12L13L14#L155L16>L17TL18fL19rL20L21L22L23L24L25L26L27L28 L29L302L31?L32UL33d_sys_ner#Bexit.oo "0 undayatdtadL8_dysize"~gmtime0L10tptimd0d1xtime_ldiv _ldivr L11L20001L14L15L20003~asctime cptptncpL21HL19L22bL23x_ct_numb"~dysizey