! "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"~dysizeyL25L24~ct_numbcpacpnL27L28getpid.o >"< errcom"\pbundle"parse"Jdiag"Dalt"salt"stop"rgoto"tables start"rend stkb stke ktab trswitch trace x si j k n g1 env advsucccrsretcontincontinctfailcvfret8advcxek ep ek.fs ep.fs fs ktat .tp"gcontin$badadrVgfvgcxgkf@_exit"hmul.oo R"0 6p_hmul"locv.oo t"j $f&jCB  ԕ- j e0fv   vA W  ~_locv"bufjdividNnargs.o "`lTfA w,\w"Ve"w"Lew"B@lw":Alew- &@t`efgetpid_getpid"abs.o.o !L 6_abs"_fabs" csv.o.o !`@& HADCBFcsv"cret"mcount.o "d eH  mcount"countbas ptrace.o ",<fw(ww@ 7 ,wI9ptlfile outb outt outw <0 & 6  9(savr5$fptrap _exit _main startw$ 7 &  .w e B J ӕ- R r f e0 @ >  ҋ D~8   ӕ0 $f v Le0 9ep j b \ 7L we&  m0  .  V~  V  V~ w7   0   Wp `e0eӕ?f  , P  @f  (7X  (v n -h ` f@w fww %lw@ݪ#E   m#m#few e& & !*&p#j#7 h# ԋ! w*  w^-V5Ke'D& C N h"#F* U"E   w r   mt j  Uw 2&e*w 8(ew `o w Rx-" w <r&5w V2& w N8(ee" f&%w:"%@7p:"6  r e0H~0 R~ & 6  >w , r40&   % >%5& #@y& 5 % > % >wzfw4w0wn fwwwN f@ww$w*f@@& HADCBF7Ff@  x" "*@ $$ttyЋ7@ /dev/ttyxcannot swfw@e7 wfw JA 7 fAW,f B@ 8 @&61fA   @ @e7h1@  1wffw@w< w fw&w" wf@w w wf@ww" w fAW @w f(1(7 5 e w( 5& w"&~ L&x H&r D&l @&f <&` 8&Z 4&T 0&N ,& @% &!!< T$&# ,7" !=[!:7! N% " -L }L w!!*w $x%E   w mE]7!!-w pf! &ȝ7   < W l E n d^    $ w h. w ZrEE б! ! w! !;!e &t&0 eD t& AE@`e@efBJ b &w eB$tat was y was n cannot change mode /devH (&B $&< &6 &0 &* &$ & & & & f& fw. wX f@ww2 w4f@f@& HADCBF7F/usr/lpd/tfaXXXXX/usr/lpd/cfaXXXXX/usr/lpd/lfaXXXXX/usr/lpd/dfaXXXXXcmrCannot open %s Cannot remove %s Cannot rename %s /etc/lpdlpdCopy file is too large pdp::::m0000,m000:$ ident Cannot create %s /etc/passwddpojxfeHcVs&lrwD8 E`w8U ( w( > 7  $!!eF"el7  ph8# 7\8#ew \!D!<wP     w "&& H %7 T#P#xbnh^ 8 < @ ^ ^ ^ R8 %   ѕ  "" "" | r " #"w xUU %E BCw2 & " $  p" d" \ #Algeria:Alg[iers|er] Botswana:Gaberones Burundi:Bujumbura Cameroun:Yaound['e|e'|e] Central Africa[n Rep[ublic|]|]:Bangui Chad:Ndjamena Congo:Brazzaville Dahomey:Porto Novo Ethiopia:Addis Ababa Gabon:Libreville Ghana:Accra Guinea-Bissau:Bissau Guinea:Conakry Ivory Coast:Abidjan Kenya:Nairobi Lesotho:Maseru Liberia:Monrovia Libya:Al Bayda['|] Malagasy[ Rep[ublic|]|]|Madagascar:Tananarive Malawi:Zomba Mali:Bamako Mauritania:Nouakchott Morocco:Rabat Mo[z|,c|c,|c]ambique:Louren[,c|c,|c]o Marques Niger:Niam(  0 e`vep 8 x h_ \ T v  P b!# w }e  @!w n5    EU w b   Pw  D   @  &U  \!, 2 PE 8 :5R -J   : v ! !,  E& % w l2&w f8(e4 w 2&ew 8(7% 7 !& Z V 5U  & !(>ey Nigeria:Lagos Rhodesia:Salisbury Rwanda:Kigali Senegal:Dakar Sierra Leone:Freetown Somali[ Rep[ublic|]|]:Mogadis[cio|hu] Sudan:Khartoum Swaziland:Mbabane Tanzania:Dar es Salaam Togo:Lom['e|e'|e] Tunisia:Tunis Uganda:Kampala United Arab Rep[ublic|]|Egypt:Cairo Upper Volta:Ouagadougou Zambia:Lusaka Za["i|i"|i]re:Kinshasha [Rep[ublic|] of |]South Africa:Pretoria [The |]Gambia:Bathurst chdir ken cc -c -O *.c ar r ../lib1 rm *.o chdir ../dmr cc -c -O *.c ar r ../lib2 rm *.o chdir ../conf as m40.s mv a.out m40.o : as m45.s : mv a.out m45.o : cc sysfix.c : mv a.out sysfix cc mkconf.c mv a.out mkconf mkconf rk tm tc done cc -c c.c as l.s ld -x a.out m40.o c.o ../lib1 ../lib2 : as data.s l.s : ld -x -r -d a.out m45.o c.o ../lib1 ../lib2 : nm -ug : sysfix a.out x : mv x a.out cmp a.out /rkunix cp a.out /rkunix mkconf rp tm tc done cc -c c.c as l.s ld -x a.out m40.o c.o ../lib1 ../lib2 : a!-X!$k!*w !(   U0U  UE U W!%|7U > !+  U8  NU UU |!(7L- h h >UU P U w * *ww a W     w je!)w \) rW  b& Xw  fEtWt18%*W fE WtA8%Vt 7 *f+  ^w " bw u 7 d & 6  w   L 5Z L  L 5Z L  L 5Z L 5  "7 %"@̥- 7h  y+ e-X  ,%^ Z%-F  & MeD%+ ̥/ &   F   U    &  5. N N %-  Z 5>   +    5  P  ` js data.s l.s : ld -x -r -d a.out m45.o c.o ../lib1 ../lib2 : nm -ug : sysfix a.out x : mv x a.out cmp a.out /rpunix cp a.out /rpunix mkconf hp tm tc done cc -c c.c as l.s ld -x a.out m40.o c.o ../lib1 ../lib2 : as data.s l.s : ld -x -r -d a.out m45.o c.o ../lib1 ../lib2 : nm -ug : sysfix a.out x : mv x a.out cmp a.out /hpunix cp a.out /hpunix rm mkconf c.c l.s a.out *.o : rm sysfix  VS!a @%I& D$  y+b -b *b /b &b b b b %b [ ^b v p !b +   (!]w ] # Z}+ - *: /F 0 &$   % ^ !X >   w vHt4w lH r*w XB`%w N$B w DHA B@w 8HBPw .HBpBw "H rw HA B`+wX&PEEE & W%$   Uf7 ~ (Wp @e@` w rV E7 > Z  k b %< Fww  F   U   "55 5 N f  %5N f t %um% -o N  ww Nu5 } _} @ 5 NeN. t %ww N &  _< 5 @   ԥ: %:,N> RS5%:L  > M  ww  5  X e A r Be78    ? a.outn@ 8 0 nZ*f xxxx ^ d       "0  0 @ P ` 0A r 5 %7*ww f   N  @mw^w L L  L  L   Z a   Z a   Z a   Z a  ww      7  w &  ( % 5 5 EB ҐNe z% B %:% %:%0%9Wp D`eD- w ~wh De^  X  % Vw7 D 7 D ׯ: - 2 0 (8"0 0 w$#F* 2"e 2 & "  E   e    wV%`%`%7 ^%  e  w)  d-w\7 7 %%w D 7%7 %  n) |Evn Ewdb EXC$$`$$ eRHC@6F* ew ) w b2&w X8(N @w h2&  w 2&w |8(\$7R$7 J$w 2&F* #w &2& w 2& w 2& w 2&@w 2&@w 2& v rw 2&wEw# @ @ @ @ @ @ @    @    @ tvpprtvrx ~#w% p w D 7jw F 7Zw H 7X7Nnw ^t7RwAWpqL,fAWpL,L,AWpqP,fAWpP,P,%  5  %w w N 85 f < &@& , &@&  &@&" @e w w ~ A r e0C r te0Pwf w T  j "  7X Tw:  & B %85 5 EB ҐNe F% B %:% %:%0%9Wp D`eD- 7. $ ӕ- ӕ0B~ӕ.  ӕ0~ B~7 0 `&e  ,   ,ebww5Q$  f   EU P5h   PfPPQ7 Ƈ5    5 C B A  `5  5  5  eE  "$ $5 $$ 5j  5R  5@:  wL   w>  (  ӕ-ӕ. B~ӕe ӕ- ӕ+ r e0e0Sw ~wDe   % w 7 7 ׯ- ѷ (w7  .wуe"B J ӕ- R r f e0 @ >l ҋ D~8## Jӕ0 $f v Le0 9e F  7we&  m  ~    ~ w7  з 0   Wp `e0fx   5@   B     Uw  w www  7 d `a NURZW 8U W 8Efc     ` - a h h    a  ! p R B W !W e UETR5l  5Z  ULwp      7 r@r@  e J!0 & 6  w  n %U@-Oe @@mȋA@@m r eN!A! y6 #  # # # # # # # z#@@me7  f# b# b# 7|% ! p :# _x eN p # , #_5 AWp>,i5 AWpAm@?>, %AWp%F,N%! 7AWppslF,F,AWpqH,fWpH,H,AWpqL,fzWpL,L,AWpqP,f ,nP d ^ @f B j70 #j&-Їf 88  7 ߲ͷ ͅ7 7 ͅf@w fwVwR#wf@)wxfw*#JA 7 ,fAW,f B@ 8 @&61fA   @ @e71@# 1wfww #ww w wAupNNmf  wtw bZ@@5  JW!W! 57 e  , ¸® f    $ $$$& N & N  N N S C B A  eW!Շ w^ m2$ rf5e        W!P    0&d& dN & dN dC N eN e-Z!d!n!x!!!     ~/usr/adm/sha***other/usr/adm/shm/usr/adXWpP,P,AWp1>, % 55QAWp>,H5 AWpAmCpCm>,>, %AWpCpF,F,AWpqH,CpsH,AWpqL,CpsL,AWpqP,CpsP, % b!X  !  5>$f %N !  5! @ AWpN>,f %N    5" @N     Z d  f>, e"" @ 7J&7@&76&7>&_& fA rBpEu@@`55DCN& * f& ͖%5 2`D--`f * $`f& N%`Df ͖%5 D-& * C-D-%@@AA@ Nf`  u_Nf  @`5_f N%Cww  DCԒ ww DCB5ҒS wf@ww&#wf@ww|,#w fAW @wZ fj1j7N 5m/shtCan't save Can't truncate %8s%-8.8s%-8d%-8s%5l %7.2f %6.0f%7s%6.2f%%%6.1f%9.2f%9.2f%7s%6.2f%%Only 1 file with -s Can't open %s %3d %.8s /usr/adm/sht/usr/adm/shm**junk**%.8s--%3d %c%c%c %d/etc/passwdd oxHfVecsldrj0PFf#j#M:/ESTEDTDay Mon 00 00:00:00 1900 SunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDec> \d6 e 5 9AWp>,0AWpqF,uAWpNe>," @ AWpqP,fAWpqL,fAWpqH,f5& e u- ww  t >$6Nez& "Cez˥ ˋ ˥: Nez#" @ t0B$pC&t&>$(" B e %w:w (5&3" e 75="9" @ C5w&>" e 7&5 &5& e 7&5&5& be7&5 7vwv&55&5& 2e b5 uu&F" Ve  ew:2# 5& w:&HL&BH&$Ne &fe pC&tpB$VpB$@@&77Ne 5Wp F,Ne 5pC&55&AWpH,H,5&7R7LNe 5&AWpL, &   R w4w "DC%: e`m e rfww p@&f %^ r<R r< r<R r< rWtC` re rwF   !7 %nD   >#  0!>#&  7 |ww <n#ԔAA WpCe#<ԔԔԔ BeWpCe#ԔԔԔ&  ed&  ed&  ed&  e@ &  5u w N v 5N v 55u   w5u w w@0qw  "  5GWNe 55&7`7ZAWpqF,5&747.w FD % A r  r e0@ԕ A r e0@w@& HADCBF7Ff5w X * f5w B }7 .&ʦW&f 7 @% @A&@7 @L> Be0# @є     BA   W e B@e0m ~` eȐ9 ȕ0 ȕ1 LH F`0VV6rw"ɇ6r@f@  P`Hm`  F FɷD70AWpuqH,5&77AWpuqL,5&77AWpuqP,fef ~%%N  "  5 >$f ~%N w w 5 5 AWpBBm`u % @ 5A ruWp>,5 AWpAmBBm>, %@w. 5  %AWpAmBBm>,A w " 55 AWp>,mAWp-F,eAWpNe>," @ v 5%yMAWp1>,AWpCpslF,F,AWpqH,fAWpH,H, PP7 EDE!wEED5!5! w |#W!wwh  #wW! B  w w wzwh  # E7\EUE@U@ E UU   BE? eCE e@E x$5xe5f5@NeY H e 5@(> *; ,66  ,Bmtmpnam.om 2 lw *ea " &4f e@wpl%d%cIYx_IEH0958#2_tmpnam"~tmpnamscsv _getpid L24_printf cret printf.om UL4w F@e7@e5% zwe   % uewe_Vf@& %_V%ue-dl Xr0J0 5 h5., & T55 5 5  r eA! y"N J Z@YN ?N :u6@E? -@e5=5e@ffe& e 5 @e5 f@& % ?F@e5N 55 @5@@5rff %@ f@& %@ ff %@ @e7 5_%f& %ww | 0l hwd5  @A tE5 @e0?, (nL10L10000L10001__Iscan"cret L10005L22"L21L10007L10008L17(L13L186L27\~_Iscanchfileidnmatchformatlistp__Isfil#L122L10009 L20003L10002.__Isfrm"__Inxch __Ichar"j~_IcharjchcptrL30L29L20005__Iflot"~_Iflottemplengthfptrx__Inodg"__Isstr L33w @t5E @E5% e7@e0? ww 5 %9AWp Ameu5 %0 @ww | xwtw p @e5 @ -N JA r }eA r 5 @e@-= e 0@? @e@-w&2@H!"%(!&!VDV(2DV(2<<Vy )_ftoa"~ftoaiendigprecformatfstyleikxystr csv _nargs L2L3`_IEHzap L10000&L10001:L100024L10004NL4VL5ZL6|L8L10L20001L20003L12L13L20005L16 L17pL18RL19hL20007ZL22L20009vL10005L10006L2L32L20007_atof L10011L10012L20008L37~_Inodgch__Idigt L36L35L10013 L10027L10028L73L74.L10034L10035L10036L10037L10038L10039L10040 L81lL79dL59`L62L64L61L76@L66L60|L77TL49ZL67L63~_Isfrmchspeclengthlflagpo)))))))   ))5L26XL27L28L20011L31RL20013 cret fltused dummy.om 0ndigit"_ieh305i"clenf.om $`w 5  @ ȋ@wIy__clenf"~_clenfnscsv L2L20001 cret scan1.om sw 5 %w5 @ @a58 % 5  interL45,L44L10033RL10014L20011L10015__Iint L20009__Iestr L10020L20015L10021L10022L10023L20013L10029 L10024 L10025$__Ilong L75B_printf L20014<__Imtab __Ispnd L80\__Ierr L82{fltused scan2.om z txw 555 5+  x @ @- AupAmuf %N 5& 5y  y y)))yy __ptrb%@%*@ @aAAm Aap Ne@ @a& f& %w w w5 @5 7 y x @wNefe   ߃  A@ w 5 wz }w dPffe %  wE @ 5- dA r 5u-A 5re0= A 5ruA r 5 = wftoa _scanf"~scanfipnpptrsjkflpp1p2p3p4 csv L2@__Iinpt L6 __Igstr __Igetc __Iungs __Iungc L7,L8L4TL3Z_cgetc _ungetc L20001L50fltused scan3.om |Bw  Nf f fff e   ww @ȥ^5 5 @pB % @AB pB@ 5%]wRw N H D 5  @w$w @7 yw w @B ww ww w  ERROR  9999__Ierr"~_Ierrgicalprbufspacesbufprevput.om i("xw  ed-( wunprint producing too many chars9IIYI_IEH3rev"~IEH3revccsv _IEH3out _IEH3out L1$L3(_IEH3err cret maktab.om Bnw @ȥ^5 5 @pn % @An pn@ 5%]w_copen"L10001L10002L5L9jL7PL6JL4L8dL10x~copenfnfilenametypecsv L10003_open L20001(L2.L12B_IEH3mbu cret _creat L11_IEH3err cputc.om 08w % %@wAWp eu@ N @ f A@ HA1`@A@,@ & f abc d emessagecsv L2_printf _cputc _cgoof _cexit cret __Iendm#B__Imtab"@~_Imtab@chnormaliformatpL4`L20001dL8L20003|L10000L10001__Inxch"~_InxchchL11__Isfil __Igetc L12__Ispce"L13L10L10003L10004L19L15~_IspcecL1y_IEH3end#n_IEH3mta"~IEH3mtachnormaliformatpcsv L2 L20001$L6VL20003<L10000NL10001Rcr%@ @@p&f % @N+ @@0 cputc cputc: %d not opencputc: writing %diy(HX_IEH3fpt d_cputc"~cputcchfn0005L14__Ispnd"~_IspndchL10006L20__Iinpt __Iungc __Igstr" ~_Igstr __Iungs"0~_Iungs0chnodig.om L@2w @  w@27 y +-.Ee,y_IEH3nod"L100012L10002<L20000L3,~IEH3nodchcsv _IEH3dig L2L1cret L10003$gets.om et nexch.om G 6w  5@ @w9Yh_IEH3nxc"~IEH3nxcchcsv L2_IEH3sfi _cgetc L3"_IEH3spc L40L1,cret unget.om ,|,w %| AWp eu@  f @Aep N A1@H@ wungetcungetc/unprintf: buffer full file %diyfpcsv _nargs L2L3_IEHzap L10000&L4.cret L5VL6_IEH3err L7n_IEH3mbu L9_seek _write L10L11L12+_cout#makbuf.om =Dw ,AWp eu@Ap@A p N %xNef %( = % $ !Ned 5%.@ p@Aedp@=@p @A ,Rw %R u   =%  w=@gets IY _gets"~getspscsv _nargs L2L3R_IEHzap L4*L20001 L5<_cin _cgetc L6HL1Dcret puts.om `Vw  %V u@& @ 5  _IEH3fpt d_ungetc"~ungetcfnfpccsv _nargs L2L3|_IEHzap L4<_IEH3mbu L5\L6_IEH3err cret getch.om 'xHw  w)9HY_getchar"~getcharcsv _cin _cgetc cret cgetc.om pZep@=@%  @t5pw8Xx_IEH3fpt d_IEH3bsz#_IEH3mbu"~IEH3mbufnfpblocbxsizetypecsv _ttyn L2NL20000FL3 @wputs iy_puts"~putscfpstrcsv _nargs L2L3V_IEHzap L42L20001"_cout _cputc cret cwrd.om P w @@5A@puNff %5wA 5rw @@5A@puNff %5w|A 5rw % %N$ AWp eu@ NB @  f @9 Gfe@&@p&f Te  x@N] @@@ @ A@ wcgetc cgetc: %d illegal file numbercgetc: %d not open to readcgetc: error on %dXv_fstat L4pL6zL7_alloc L8_IEH3olb L1_IEHfbak L10000L10001 cret cflush.om w % ?%;AWp eu@  ff %@p@Ap@ @ &f %w`cflushYiX_cwrite"~cwritefn buffunitlennwrbuffp1csv _write L10000<L18cret _cread"H~creadHfn buffunitlennrdbuffp1_read L10002L2unprnt.om fwDe   % && e 7 x7 nׯn-_IEH3fpt d_cgetc"L10003L13L16~cgetcfnfpcsv _nargs L2L3_IEHzap L10000&L44L5$_IEH3err L10001PL6^L7BL8t_IEH3mbu L9L2_IEH3fpt d_cflush"~cflushfnfpcsv _nargs L2L3_IEHzap L1L4v_write _seek cret ceof.oom tw AWp eu@ w w AWp eu@@ w YY_IEH3fpt d_ceof"~ceoffnfpcs f d.7 \ .|B Jdofecsl ӕ- 6 r f e0 $C~ fWtE Ee0    & `w t phΟd ^  V  J B w7 0 & "0  Wp `e0[HY0000L1L20002_read L10L14L15]cret _cin#putch.om [Tw @& w9IXi_putchar"~putcharccsv _cout _cputc cret cerror.om X@ w B Nf f fff e   wERROR _IEH3err"~IEH3errabc dv L2.L1*cret _cerr"2~cerr2fnfpL4VL5pL3lcexit.om *lw 5 N % N wIhx_cexit"~cexitircodecsv L20001 _cclose _exit cret cclose.om w ]%YAWp eu@  @   x& f %@ff %@)9HHH_unprint"ndigix$pfloat pscien _IEH3rev _IEH3bck formplooprjustgnumwidthndfndswtab|decimaloctalfloatsciencharacstringlo emessagecsv L2B_printf _cputc _cgoof#@_cexit cret copen.om 0,w @7 y 5  f 5 Nf @wf 5f N arwjPJdxcopen: bad file %sHYhAp@0 @ @%@  @ 0 N w6@ &f \L(8I_IEH3fpt d_cclose"L10002L7L6\L5L~cclosefnfpcsv L1L100004L2r_seek _write L20000p_IEH3olb#L8_free _close cret getvec.om 1xHw N w9HY_getvec"~getvecncsv _alloc cret relvec.om dxHw N w9HY_relvec"~relvecptrcsv _free cret wdleng.om (`w 55 @wIy_wdlen H) ) )YY )) 9XTqqqqXHX8XH8Hrewind"create"fsfile"w r a l zero.oom u""H&qq, qH((XH(zero"putchar w r a l altch.om h"~f7t q,@ @  @  ȝ40 q,q  )g"~wdlenglengkcsv L2L20001cret system.om 46w  fA>6 eNe w/bin/shsh-cIY_system"~systemstatusstrcsv _fork L2(L5AL4>L36_execl _wait cret ciodec.om  _IEH3fpt dcalloc.om Tw AupN w)_yyval _yylval _yypv _yydebug#T_yyv ,_yystate#V_yychar#X_yynerrs#Z_yyerrfl#\_yyparse"L10003^L25L28L380L10005fL22L9L13L15L21~yyparse9YIiy altercha"plausibl stats allocate release copy bufchar getbuf swap w r a l w1 flag u1 fixct nchar|alloc.om f"<$& xCC  6 jq&  6`(  <  w`<  IXi_calloc"~callocnscsv _alloc cret cfree.om xHw N w9HY_cfree"~cfreeptrcsv _free cret alloc.om |w D m" a2  eweE !݃%%5 %Je w fDe!c bb! c33wpsnpsaccsv L2*L3HL4p_printf L5`_yypact _yyact L6tL1L10_yylex L11L10000L10001L16L17_yyr2 _yyactr _yyr1 _yypgo _yygo L18pL20001dL19xcret L26_yyerror L29 L20005L31L20003L34L35L36L37L39DL40Blerror on copy f < , Wv Ee<   f1N1N1N1f&@l1 11 1 ,    ,2 2 $2 4 7 f& Wv Ee< , @E7 2h w$e$2 ,@`&0 w2 ,f  2 2 $Wv E@`e< & 7! ,44 H_freelis#_slop#_alloc"~alloccpnpsizeasizecsv L2BL1>L20001L9 L200058cret L3JL5VL20003PL10000lL10001n_sbrk L10_free"~freezacc.oom >#P0w w)9_yyaccpt"~yyaccptcsv cret zerr.oom C#B\w N   %   w7. y  rblx %s, line %d, on input: %s \t \n $end %c    (i  e eD  q,@ p f  Z 4  f7\ q,@ @  8@  Jȝ ,   4f r4   ,44e&     & ZZeXpZ@11    Z Out of space. @ ZeXpZeXbBl s3 BXX& R 1Z1 XpZ f&7 Z`COeXcpnpaptrptrL12L20007L14L15L16L11iehzap.om 6XB,lw f %B %Z % w: argument count wrong That's all, folks 9HHHy_IEHzap"~IEHzapscsv _write L2BL3Z_exit cret _yyline _yyerror"L10001L10002L15rL11bL13lL17x~yyerrorscsv L2_printf L3&L4L5_yychar L6N_yysterm L7L20001DL1Jcret L10003ZL12L20002fL14L16L18zinit.om G#P0w w)9_yyinit"~yyinitcsv cret  Klaltercha putchar lookchar w r a l ncharLlength.om r"H@@@@(H8Hlength"position" w r a l rewind.om s"ekchar"Dputchar"allocate"release"\stats$>w!r!a!l!bufchar"<copy"getbuf"~swap" fixct"^resetafiRb1"<badafoutTnbufw1",cleanwheadb1s"b1e"$u1"4flag$<getbnochncharXnbuf2hsznumbnumb2initl<log2NzzzfrlistZxxxhblkXfrendzwwwyyy d AWpNVf  I "@&f e 95 C , )C% "C  %%C   , @ @A@lH wX Jw <% ,AWpAVCplXCpɜZ@   _J   \ xH C5 WpNV B5WpAXu%> 6NWpfVf h%"f h%  "f h%  N% f h%collect~exp2dpreposteusefulPloop1loop2advance8headszloop3coalnocoal0strbufzbotchstrendXdatadrVdataszasmemerr2bgargsheaderszendZ &"f h%" B5 "f h% "  j N% f h%WpAXu%WpfVf h%<NvWpfVf h%f h% t" B5"f h%(WpAXu%WpfVf h%NWpfVf h% z"_ 7 V T7 tw w %b@ ;WpuV"e&"@7% 7@p" -% ""     #&7 w$ w  "N7N y % 7    "r"*\h#'"\T J d\>>6   , $ > Nw w n %* *2"j7 y */%" "%\  " "w  /*%" w % 7   7 rw w %d d7 Z  w _" 7 tw h dWpuV%= P: n 4BWpwX%78X: & 6  w %  d @-  5 5`u 5 R_F" A" >"2"M@ @m& F @ @m'  MM "!!B Bm p"m! " !% !!! R!  u-5  f  @  % M N6@EH5 5 @ T55Nef  L % &!KZ5 #%! /"__`p Rw@p" -% "" |7 w w c  w hrw Pw w 7 Dw w z  wx w f @-E_7EwE7 E7E7E7E@@muu AfAVpu @ %9 A 7r,EC r Eu& #@e5u @ A H @wAA` 7rDu@ mDmD5-DЇ E D-DD  @ mDD zD@m{5 % @ @aA pT $L @ @a0 Nef  xww  J :%B ": ~ % H(   & % ( > 8 "  t@` 5&@ 8 e&"^K  7%-JKFKBK>Kww  8J,K>L(K6:7 #&7    5  F@t&e&f %%   %N    5 |  -zD  ^DmdDH RD @  >DmDDH 2D@*D@&D w u@@mȕ @ A r 5 N ff N% @@mC r e0Ȑ @wVw D    }w, w % 7  7 2; 0; 7 _ |7 ;7 ww  d \w ~ w  @ XN@me5'5@ A @lXN 5 } @ XNN u@ A @lXN fef %%3%/Nf %@- 0   Nf %@- /  bN N  d . 5 .  . 5 .  . 5 . hI^I  7"WQ  PN  D  7 &*p p p p   7  7  7  7xwnw \Nq  wTw B L xHx <r <l <5@A 1`XN }  ww @ XN@ XNwA @PN PN%  9 N  ` A@ XN@ &@ & v%A @,XN@ 0 XN w Z~wADeA  A % bw<7 A7 AׯA- A A(wtA7 vA .wjAeB J ӕ- R r f e0 @ >A ҋ D~8 @ӕ0 $f v Le0 9e@@ @@ 7@we&  f <` < ww  5;Nf  N{   Ne V@-@E5%N  N  F@tE % wtw b@5_@ r ebA! y"@  >f6b.^7 [F R8N2 K$G D7  @ @m757 2 /T$ @ @m7F@ @m7  F _@w<w *.ZFnm@ ~@ b~  b  b~ w7 R@ H@ D@0   0@Wp `e0eӕ?f@ ,@P @ ? @f ? V7d? V??-??f@wH fw ww(fww H?&wfw7DA fwJA 7 >fAW,f B@ 8 @&61fA   @ @e7P1@" 1w<fplausibl"lookchar"wc"se F @e5H="f@efe e% AWp Ameu5 E 5%N  @Ae@%'  6 E =%E whw VPWpe&"VwFw 40&",Wpe&"pVX Wp@Z    " @"w w   (N  67 `WpeVu "@&f e5 (_r  b x> \ X ( N xD$"@&f ew2w.(w"f@ww.wfAW @w fX1X7 5 ew4 5& w&?L&?H&?D&?@&?<&?8&?4&?0&?,&?(&?$&? &?&?&?&?&? &?&?&?f& fw:w f D& w }f@ww>wf@fA w,w"e"w"ew"x@lw"pAlewc &@t`e @& HADCBF76<F ` 6bvlt  `(<fz/tmp/crt0a/tmp/crt1a/tmp/crt2a/tmp/crt3a/tmp/crt4a/usr/lib/aign/usr/lib/atabUsage: cref [-aceilosux] file1 ... Can't open %s /bin/sortsort-a-o/usr/bin/upostupost/usr/bin/crpostcrpost-4x-3Line too long: %d %s Illegal character: %o line %d Cannot open grammar table; see lem Bad grammar table. CannoA(Hhhhhhhh8hhHXhhhXHxxcsqrt."csqrt_rval8p z1_gmv8 z2_stsp ftrval8 call cabs. gmv4 c_rval4 sqrt. b_w9aint."temp one@retrn alog.om Z(H  ; 7ww XX)Y9Ialog."dlog."log retrn rerr temp alog10.om \2T  ; 77ww ?[7f(XX)Y9Idlog10."alog10."log retrn rerr temp const*amax0.om ^>0t open ignore/only file: %s Cannot read ignore/only file: %s Cannot read ignore/only file: %s Can't create user's temp file. Error %d Can't find %s Try again Fatal error in %s t = %d Unrecognized flag: %c /usr/lib/ctab/usr/lib/cign/usr/lib/etab/usr/lib/eign/usr/lib/ctab/usr/lib/cignIgnore/only symbol too long < D d >  "'/<\J@|^"'*\00 Too many symbols. Too many characters in symbols. `N`P`R`TWraparound temp file %d &d|ovxfeTa_atan2. c0rdv4 cos. rmp4 sin. retrn d0basedummy_dccos.om 6h@A(Hhhhh(8HhhhxHH    Y@  www8899)amax0."max0."retrn temp amax1.om `H<    Y@  wwwHHHII9amax1."dmax1." max1."retrn temp amin0.om b>0    Y@  www88cbs2lrV 0  %ewdccos."dccos_rval16p z1_gmv16 z2_stsp ftrval8 b_call dexp. gmv8 c_c0rdv8 d_a_dsin. rsb8 rmp8 c1dcos. rad8 c2rval16 retrn d0basedummy_dclog.om r0zrtrrtvrrtrz(99)amin0."min0."retrn temp amin1.om dH<    Y@  wwwHHHII9amin1."dmin1." min1."retrn temp amod.om f8H  /;{@7ww HHI)Yamod."dmod."retrn on,/25!$'*-036"%(+.1478;>ADGJMHhhhhhhhH((dclog."dclog_zrval16p z1_gmv16 z2_stsp ftrrval16 call dcabs. gmv8 c_rval8 b_a_datan2. dlog. retrn d0lbasexdummy_dcsin.om 6he@temp rerr atan.om h<  ; 7wHH)I9atan."datan."atan retrn temp atan2.om j0H  / ;{ 7ww HHYI)9atan2."datan2."retrn rerr temp atan2 cabs.om l X`  Q 7ww f@@&@V@ VXmccos.om oh@A(Hhhhh(8HhhhxHHccos."ccos_rval8p z1_gmv8 z2_stsp ftrval4 b_call exp. gmv4@A(Hhhhh(8HhhhxHHdcsin."dcsin_rval16p z1_gmv16 z2_stsp ftrval8 b_call dexp. gmv8 c_c0rdv8 d_a_dcos. rsb8 rmp8 c1dsin. XY9I)cabs."dcabs."sqrt retrn rerr temp hypot*one@cexp.om q<` 7 77 77ww 8Y9i99y99)Icexp."rval8p retrn temp rerr exp sin cos cmplx.om v0<  /  YQww 8 c_c0rdv4 d_a_sin. rsb4 rmp4 c1cos. rad4 c2rval8 retrn d0basedummy_clog.om trzrtrrtvrrtrz(HhhhhhhhH((clog."clog_zrval8p z1_rad8 c2rval16 retrn d0basedummy_dcsqrt.om 0DA(Hhhhhhhh8hhHXhhhXHxxdcsqrt."88)Icmplx."dcmplx."retrn temp rerr conjg.om xx077w899)conjg."rval8p retrn temp cos.oom z<  ; 7wHH)I9cos."dcos."cos retrn temp dble.om Th(h8HXdble."rval4p lval r4r8 gas8 gmv8 z2_stsp ftrrval8 call cabs. gmv4 c_rval4 b_a_atan2. alog. retrn d0lbasexdummy_csin.om }h@A(Hhhhh(8Hdcsqrt_rval16p z1_gmv16 z2_stsp ftrval16 call dcabs. gmv8 c_rval8 dsqrt. b_a_datan2. c0rdv8 dcos. rmp8 dsin. retrn d0basedummy_tanh.oom LRLNLVHVZVZVZR@(H(hxtanh."taretrn temp dim.om *0/ ;;7ww ()9dim."retrn temp rerr dimag.om l0 V7w89)dimag."rval16p retrn temp exp.oom (H  ; 7ww XX)Y9Iexp."dexp."exp retrn rerr temp float.om hhhxHHcsin."csin_rval8p z1_gmv8 z2_stsp ftrval4 b_call exp. gmv4 c_c0rdv4 d_a_cos. rsb4 rmp4 c1sin. rad4 c2rval8 retrn d0basedummy_csqrt.om Dnh_Rstsp ftLrval4p a_call exp. gmv4 b_Vrval4 c0Hrdv4 c_Zrsb4 rad4 retrn basePabs.oom Tx0  ;7w889)abs."dabs."retrn temp aimag.om Vl0V7w89)aimag."rval8p retrn temp aint.om Xl0;@wTh(hH8Xfloat."rval4p lval gas4 i4r4 retrn temp iabs.om `$ ;7w()iabs."retrn temp idim.om .0 / ;{7ww 89)idim."retrn rerr temp idint.om \$ ;7w()idint."retrn temp ierr.om pl(ltz7 d -^w xeNH ePwz"e7 "e&&pwwz)99ierror."erret#lrerr retrn zeroterrbufzcerrpxeerbufonepifix.om `x(xX8Hhifix."int."lval r4i4 ga<?BEHKN:=@CFILOPSVY\_beQTWZ]fw@ 7 f&f:ЕЕ zP :Cx :: 0 rB`E \  6\ : !: :E R:S: Z 0 & s>e0W!9eW!ZeT!ᇅ @ @  ))s4 rval4p retrn temp isign.om .0 / ;{7ww 89)isign."retrn rerr temp mod.oom 2< /;{@7ww ()Imod."retrn temp one@rerr real.om t0  ;7w889)real."dreal.mget.oo H^,$fA7X^ fA @e7R1@  1 @ www &w Ugetc" getw#dfopen"put.oo |(<fA7v|  fA & 9 &fA @e&7Bw>8@w crypt"_crypt"savr5 key:wheelcod:cagecode:wheeldiv0shift cagewheelwordecvt.o Q: ,f5w 2 * f5w  }7 2*W&fD 7 @% @A&@l7@L> Be0# @Dє l    BA   W le B@e0"retrn temp sign.om 4<  / ;{7ww 889)Isign."dsign."retrn temp rerr sin.om <  ; 7wHH)I9sin."dsin."sin retrn temp sngl.om Th(h8HXsngl."rval8p lval r8r4 gas4 retrn w&w w putc""putw#flush"Bfcreat"flRatan.o : zf5 f5u 7d@ h& `!7J& @ Ae 875775VVfW@H77 wf@@ 7`7PwL 7RXCDmZ ` DeȐ9 ȕ0 Dȕ1 P" J`0DDVV> _ndigit#Becvt">fcvt"8_ecvt"_fcvt"eflagnbufDsigntemp sqrt.om &H  ; 7ww XX)Y9Isqrt."dsqrt."sqrt retrn rerr temp ctime.o e,$ 7 7 7Hww7w())))))ctime."retrn temp setfil.o e<TAw w pw  ѥ !wX)HiH9setfil."X   B:BJRZbjrZ@@!hI@!hAy1?ϑy"?D{Av#OP#C!+C|]2CU*j 4xBJh{CW*RsCL~Szlzerone@lssgtrrbuftopltenth:epsilonL>ten Bpaddigit1digitoutoutoutpow.o (\`f5u @AfW@V fW@V  V)9pow"_pow"log exp badXone@bad1Vhalf@exp.o Y|@f@getbuf chkunit retrn utable temp rerr nice.oo el$ "w(nice."retrn temp getarg.o e,p</ AH  `A T  ԕ 5  wb7 w8I)89I9)getarg."iargc."^retrn temp argp atan""_atan"atan2"<_atan2"savesatanret~pi2sq2m12arctansq2p1*onepi4"p4pp4:p3Bp2Jp1Rp0Zq3bq2jq1rmesg.o t& &@w Ջ@@ 7& Emesg"sin.oo Pf5 f5 & Wf&&7rW?W Wf@@67f@f @AdVHB`R@7^&e# 7V # VVE=sMBԝ`=B.pF:|+eiD(/zC@;\)@3dexp"_exp"ldexp stexpone@outlog2erand.oo e T TXL FwX : w4 ., w$ H7wWp3e @E))rand."srand."retrn valueXseed1VfirstTranDuio.oo X& &q8,_^2L|Evw22-~7A@mW@ @ V@hZL>0BhZL>VV "@NnDOLX2xة3I䔶TX]1 D!L%dIgN5&GbqhDK-?sin"&_sin"cos"_cos"frpi2fourthhalf@P2P1P0Q1Q0sqrt2biglog.o dHf5 @Wf&7V @W@@`RD6B^PBVwVV5@3e1@rzlB#"3h@?ØGe@lB,k$aXUv  8^7V  >787 w  read."write."$seek."Hseek0."nopen."?fourAone@p4p3p2p1p0q3q2q1q0switch.o L fA  AEswitch"sqrt.o Z$f5 @&E@f& e@ B@~VVsqrt"_sqrt"half@ttyn.o Hl*Tf@log"_log"ldexp stexpbignegsqrt2o2one@p3p2p1p0q2q1q0log2ldiv.o x"$6rw6r@_ldiv"_ldivr$"_lrem"dpadd.o JP f@  P`Hm` _dpadd"fp.o.o }pXf 7Pcreat."close."errno."indirtemp rval4p i4i2 lvalp reterrorDretrn   x r"Pl@r r$$ttyЋ7:@ 0/devttyn"_ttyn"namebufrer1ddevler`rand.o *<$7fWp3e @7Erand"srand"_rand"_srand"ranx*crypt.o C .P7 EDE!wEED5!5! w |pW!ww  wW! B  w w ww  E7,EUE@U@  E UU  hBE? eCE e@E x5He565@eY H e 5@> ; "66  "& `&e  "   "ebww5Q$  f   EU P58   PfPPQ7 5    5 C B A  `5  5  5  eE  "$ $5` $$ 5:  5"  5@   wL   w>  (   8mod0mod1mod2mod3mod4*mod5:mod6Jmod7Zbadi1fmod0rssp checkjpctmp&setabtasignsetabsignnormaregsaret2aexpxofloRretahretbVbregunfloovfloi.mulbexpxorsignXac4ac5 gamma.o  0f5 W7 f@3B VVVV& W@-f@)wfwTvJA 7 ^fAW,f B@ 8 @&61fA   @ @e71@| 1w&f@@& HADCBF7F&Jf:t Illegal flag: %c Argc = %d %s%s Can't open %s Zdoxfecsflr  5@   B    ~ Uw j w VwZwRw  7 4 0a U"*W 8U W 8Efc     ` - a h h    a  ! p R B \W !W e UETR5<  5*  Uwp      7 r@r@  e  J7W@V&fA&  7p l hb7T P&@ XHA A&@&@ @ @&A &0 BX  tld\TL|ǹ-q'k@?%CIA!hIIxT0W \A  hw ҕ ZZ r fw e0Runtime error 8YIImain temp"hrerr"fptrap erret argp mesgZW!W! 57 e  , ~ f    $ $$$& N & N  N N S C B A  eW!Շ w^ m rf5e        W!P    0&d& dN & dN dC N eN e-lvbZ :\VL^(Dp\*:JZYIgamma"_gamma"signgam$_signgam$log sin ha[^adghknqtwz}ilorux{~jmpsvylf@one@twoAeightBlargenegativeasymptotJregularlret.ret6erret>goobiep5ppip4p0p6tp5lp4dp3\p2Tp1Lp0|q6q5q4q3q2q1q0s5s4s3s2s1s0floor.o gD<f5 f5 @@W@@@ mio.om %t x  7  e  7  err iill7    v w 7 j b w V 7 z 7 V 7 7 7 d  X V w f, J  (w 0j7 | w D% % w "w ia^fvegd|idlhhJxTp-l0t1t2t3t4t5t6t7t8t9t,/( )"@ w z  x w n7    ^ w w \w b   72 H w d w (kw _floor"_ceil"floor"ceil":one@fmod.o mdf55 @u 5_fmod"one@savr5.o  savr5$ 0 * " w  P7 _   w l4 7  w  $3   .  )& w z7 w Z7lw   .6w B7X e :e w f 7 ~   wP zww mww @ @ 0 @#w ef r @Pe007w $ q 5w fw w0 | 0 Ћ     0 @e:6@ 0 8W w 4d- , & 6  w Lb ^ Z%@- _le % N   D@&   @&   7 Ne  Ne   fe $%Ne  fe $% Jw x X P@mRȕ ?B 6.@m. A1`@ȋ_Z@1 Ń@  Nefe T   xfe  Ne   7w f  - 7w g  f & 9 f @e&7 @l7@ 'f` @e71@ w Bh 1 @  B ~ f w 4 0 Wp `@ A   y  f\7  %  &  w 7 w  7  w w w w 7 w`nw Rw 2w @: 6  2,"rtibptm.extm.lngi@fptrap"ac0$ac1$ac2$ac3$reenterspc"spsNe   fe $%Ne  __fe  Ne  _fe _fe  Ne  __w (  %= w N ~=w @  x  N@ &+ %w l fw Nf  Nf   x rww t D C ̢̋ wZ̢w > 2 ,w@w .-@= Nf  % N1   ww ~ww ee(ed w ~emw -w ,` w  0w @ w ~.w  0w ~@w ~w -w  +w r e0w @e0w & 7 :& w ve   mXcm ` 7 -w  0w @w ~ .w    0w ~@w ~7 n ׭pr׭g ׭]?V P ׭G?@?:$w P w d$sr0sr1trapinsbadinsfpsrclass3class2hi.cfcci.setfi.seti i.setdi.setlfsrctmod0rxmod242mod0fmod24fsret i.ldfpsi.stfpsi.clrx:i.tstx\i.absxVi.negxLmod0ramod24imod24dfregbi.mulxi.modxi.addxi.ldxi.subxi.cmpx^i.stx(i.divxDi.stexppi.stcxji.stcxyi.ldexp\i.ldcjxi.ldcyxretDe   % w7 7 ׯ- x v(wj7 l .w`e@B J ӕ- R r f e0 @ >  ҋ D~8hl ӕ0 $f v Le0 9e  7we&  mv t ~    ~ w7 H > :0   &Wp `e0eӕ?f ,P   @f   7 p  xw ow 0  "w > P w   w rww  w Jfҋ tw ~w& w  w   ѕ  HH w  t  T 1 ,7 ? 7 7 w 8׭r׭׭ ??׭?   & w %    + - w %  00 @ e0 .    d  + - ew J 2 `  &    ,% w n&  +  -w 0 + - w 0 u p `e0  ,w & w "w }zw D~w \ w |!7 tw MJw D~\ w 1 @0  \\fortxx "~chkunit"creatf"openf"unit utable$ btable$0 filnam buffer bufp fputc.flush1`fflushRfgetcnlflgb fputccBnspace spacesgetargnflg ilen twidth fgetcnV storin gcflg gatofB atoi iowu"l ioru" rewi" enfl" ftable$X _end r1.om +d\\ \&\e&&&&\&&\H`" \ E`f\\call"callp"retrn"stsp"8rc.om B \e \  C  C   rCCf&\  T@E@DD@CDD@ED@BD \VEH    &&\ Vf&\    Ef\   @    p`B `$"% \%\  a  \   \ \w P)gas1" gas2"gas4"gas8"stop"lval" rval4"4rval8"$do1"Zdo12"Bdo14"Zdo2"Tdo22">do24"Tgoto"~cgoto"cagoto"agoto"rerr gotoer2.o CDB &@f&wf&\c8c16"c16c8"i4c8"r4c8"r8c8"i4c16"      m -d N!#! B 6 *      \ \%H#pU\  \ %%%%%%ilt4"ile4" ieq4"ine4"$ige4"0igt4"<lan2"hlor2"dlnt2"pieq2"vile2"igt2"ige2"r4c16"r8c16"cad8",csb8"<cmp8"Pcdv8"ncng8"cad16"(csb16"8cmp16"Lcdv16"jcng16"rval16"rval16p"gas16"ceq8"cne8"ceq16" cne16"cpi8":cpi16">one@abcdefgargsargddivideprd.om D.0Pp~R \ \d b\898slist1"sl leq2"vine2"ilt2"|lne2"leq1"lne1"comparRoneHzeroNr3.om 00H \ \ V    \lif2"lif1"rif4"iif2""iif4"rif8" r4.om 24e\\Vpf\ r\ \ \ \&\&\iad2"isb2"imp2"idv2"i2i4" i1i4ist2"slist3"$temp re.om FFl 6 . &      \& \ Hrle8"rlt8"req8"rne8"rge8" rgt8"(compar:one0zero6rf.om HFl 6 . &      \& \Hrlt4"rle4"re " i4i2"i4i1"ing2"&rval2"*rval1".l2l1"2r5.om 38` @  @ @ @f\ VH 6  \iad4"isb4"imp4"idv4"ing4".rerr load"storer6.om 5|     V&\ \ &\  &\  &\q4"rne4"rge4" rgt4"(compar:one0zero6rg.om JT`\\\ \ \`\`\`\ `\ `\gmv1"gmv2"gmv4"gmv8"gmv16"stst"gmv1p"&gmv2p".gmv4p"6gmv8p"Bgmv16p"Nrh.om L      Xrerad4"rad8"rsb4"rsb8" rmp4"rmp8"rdv4"*rdv8"&rng4":rng8"6r4r8"Dr8r4"@i4r4"Zi2r4"Vr4i4"rr8i2"di2r8"Lr4i2"ni4r8"Pr8i4"hrerr store2r7.om 8e&\e&\e&\e$&&\ e&\w 2&N`\w &ew ` f\bf~\  ePp~ f #e\w  #e&\ #e\   e$&&\ #؆e&\   ʆePf&\achkgal1"gal2"gal4"gal8"gal16"$gar1"@gar2"Pgar4"`gar8"xgar16"rerr rx.om N ecore$rr endio"rio4"Brio8"<iio2"Niio4"Hlio2"Tlio1"Zcio8"cio16" ecvt fcvt _ndigit slcnt ilval itype iowf"viowp"liorf"formp$ setiordflg binflg itmfnd^ scale\ itmflg pbuf ppar llpcnt fmtchr&llp crackngflg` repZ itemswitchmswitchafmt^ffmtvefmtgfmtdfmt|ifmt Pp~N w fMw e&N`\achklvalp"rval1p"rval2p"rval4p"rval8p"&alval"2alvalp"arval"Larvalp">rerr getsubhr8.om 9l(  \  pApf\ipi2"r9.om ;X0 & 6  )savr5$_exit _main startdlfmthhfmtJxfmtTscalminuslnumbtslashlpar rparquote@gnumelist_nocr$d eorec1eorecngetitm0crack1 width err1ndig cvswgflg iocviicvlocvPlicvfocvficvdocvdicvgocvgicveocveicvaocv aicvzxocvxicvhocvhicvqocvqicvgetbuf< 66w f\ w f\%W@  @@ W@ @ Mw Ione@ipi4"rpi4"rpi8"rerr ra.om =0H V f  &\Aw )9Irpr4"rpr8"log exp rerr error*rb.om ?<0`&&\ 2*D! w chown uid f1 ... eCע0ע9w 7$w w DCan't open /etc/uids w w Who?  : w  ʋw :w XPw ww'77 Ћ w ?  }  0 Wp ` /etc/groupfA7~ fA @e7x1@  1 @ &@wLՋ@@ 7B Ewww &w ~UL & 6  w %L p  e  p p r  J @Ӌ%Ң  @ p &   p $ E J  J  !  Ӌ     J  %N7  `] p& `  E &   & ~% &   p %ʥ ӋҢӋˋ%,L#$  J   @%"L, @.%@N   **e`   +  +  +  ++  +  +  ++  +  +  j+ @ w<w *B55  L+wE%@ B+ 0+5_$ &+  ` 0 +  `& T "fe `& |%  @a   @a& T % %  *  T fe |% % @a 0 n*  @a& T "fe @a&,w@w .B %9 Wp D`e%0ww ~wr*Deh*  b* % w7 N*7 N*ׯD*- <* :*(w.*7 0* .w$*e6B J ӕ- R r f e0 @ >) ҋ D~8^b )ӕ0 $f v Le0 9ez)t) l)f) 7V)we&  m:) 8) ~    ~ w7 ) ) (0   (Wp `e0eӕ?f( ,(P      p w w % wN 7  w Ce %,%:   N %  7ww  %9Wp D`eN %0Rwdw R    % *w>w ,- ` N Xf % % X& %  %ww Dԋ@ ww ~wDe   % "w7 t7 tׯj- b `(wT7 V .wJe B J ӕ- |%  @a $  @a& T %  %_ `  6  `& T w D ) )'e!-'N)&C ewhEttE 0@. Nz)&_ e j) P@.  0! NJ)&{ e  %  w  ''%d  " $, &fe& |%w&   Aap$, %dww pf( %Nf( t %@-N  f( 7 X(D @e!ww %d2&( ( @f ( .7L( f.(x(-r(j(fwwlwf@wwrwfwmxwwmfwxww f@ww~wX f$f@w|wxw*f@@& HADCBF7V#FispF/dev/rrk2/dev/rrp0Bad flag cannot open %s %s: Not enough core %5l arg; %l/%.14s entries link  R r f e0 @ > ҋ D~8, 0  ӕ0 $f v Le0 9e  7|we&  m` ^ "~  "  "~ w7 2 ( $0   Wp `e0eӕ?f ,P   @f  $7 4 $-fw@e7: wfw@ JA 7 @fAW,f B,&  @a p$, %d7 &Nef : % %p$,ww f' %f' %%N  ww rB %9 Wp D`e%0wVw D7 r%7 8&7&7&7& V% N%e!, : :' @ wEtWtE A@.@0 w ~wGDeG  G % w7 F7 FׯF- F F(wF7 F .wFe B J ӕ- R r f e0 @ >xF ҋ D~8  cnt %l %d %d Monstrous directory %l read error %d write error %d dox,f:ecslHr.0@ 8 @&61fA   @ @e7 1@F  1wff@wL w f@wwP wf@.w f@wl f@w~V wN f@wdw`Z w*f@@& HADCBF7 Ffw @ 7 f&f$ЕЕ dP $Cx $$  rB`E \ \  !$ $E R$S$ VFӕ0 $f v Le0 9e"FF FF 7Ewe&  mE E ~    ~ w7 E E E0   EWp `e0eӕ?fzE ,pEP fE `E @f DE TN72E TN(E E-EEf@w fww wf@ww wzf@wpwl wX f$f@wHwD w*f@>8~_ & 6  w  f7b%B> bw .+3e@ȥ-'t7 y +D@  e %j N w T f z 7*N  [N  v  `%lt7a Wp1 + %ae  7 a " z &e `% -aa |at&ez  n %e-\aTa % Veww t5@E%@a \ wZw H 55@E%@. f  D 0 & s>e0W!9eW!ZeT!ᇅusage: newgrp groupname /etc/groupcannot open group file %s: not a valid group name /etc/passwdcannot open password file password: setgidSorry /bin/sh-Unknown error: d<o6xxfec"slr$    ! 3 E U a s   # 7 K \ k z !Error 0Not super-userNo such file or directoryNo such processInterrupted@& HADCBF70DF@ J bsf</dev/rrk2/dev/rrp0Bad flag cannot open %s %s: free%l dups in free missing%5l spcl %6l files %6l large %6l huge %6l direc %6l indir %6l indir2%6l used %6l free %6l indirectdata (large)indirect2nd indirectdata (very large)data (small)%l bad; inode=%l, class=%s %l dup; inode=%l, class=%s %l arg; inode=%l, class=%s bad freeblock read error %d No update write error %d dox&f4ecsl %e   \   `5 %@mAmp ww 5?@E%@8 .e * )  "D"e %D" D  0`  e D f  wPw >D..w$ w %% f \  D%  N&  e D ww A rWpDe+L- we%b+   %   n Lw LCB5_R%_^  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 directoryInvalid argumentFile table overflowToo many open filesNot a typewriterText file busyFile too largeNo space left on deviceIllegal seekRead-only file systemToo many linksBroken Pipe @ @BrTN 35 %t `  b `%tE bd& `%Eedww f' %Nf& %@- N  jw~w lf& %f& %% N  &w:w (B %9 Wp D`e%0w w  aNff D%]a ww ~waDea  a % w7 pa7 paׯfa- ^a \a(wPa7 Ra .wFae( B J ӕ- R r f e0   R8(( & 6  w  7n*%?R X*w D*0e@ȥ-$7 yX@  e %~ $N w p f F 7) N $ wZ7 )N $ ( n%'t7)7 )z) % $ b)Z) P)a -N)  &e n% -.)() ")te  %e-))7 ( -(( &e n% -(( (te f %ew < C@ >` ҋ D~8P T  `ӕ0 $f v Le0 9e`` `` 7x`we&  m\` Z` ~    ~ w7 .` $` `0   `Wp `e0eӕ?f_ ,_P _ _ @f _ f7_ X f__-__f@)wfww^ wf@wwd wzf@wwj wX f$f@ 6D & 6  w %?  .w -0e@ȥ-$4 7  y @ z e %2 T N w B p- f V 7Z- N^  U^-_Nn  7 2-7 0-7 .-7 ,-7 *-7 (-7 &-7 $-7 "-7 "-@. %@N , |%*t7,   e |% -,, ,te  %e-,,7 , , |% r, _ R s  T  b, `, Z,x  U55E%@/ &e "5 @ "X el( $e @ %XD(b  ww D&(5(`ȋ&(` ' $ 'E'`&E' $ewdw RCB5_`%_' $ 35 %t `  * n%tE *,& n%Ee,ww f' %Nf' d%@- N $ pww rf& %f& %% N& $ w|wxp w*f@@& HADCBF7ZF DaisrxH/dev/rrk2/dev/rrp0Bad flag cannot open %s %s: %d /%.14s ???.../%.14sOut of core-- increase NDIRS Monstrous directory %l read error %d write error %d do xLfZecslhrf(  & 6  w @- \ @ R e%ww .Nef  2 \_@Ej 7 y? I T \NE@t&EZ \%_ f  7 l   %7 .z 7~ yy _~ _~ _~ _~7   ]7 c # _  -d 7   _Z 5. _F Z %_2 _ ph@% _~- PJ F  b &  & 6  w  b% @  eu/@  r e$A! yk @5 J H e w . ^   l 7777772t& 5t  7 &  e@ @r _L xR5 5   r5 A5%0 5u- N e Nf %e %< 5  5  @ 5 /%J %K  t5@ t5BN  5N  5  B-B-%B-B-% &    w4w "DC%: Le`m e rfww p@&f %" r<R r< r<R r< rWtC` re rwF L  L!7 L%n  H  0!H 7 N"ww xԔAA WpCeԔԔԔ BeWpCeԔԔ2# L % 5 7{-  5 %; _ ;    @ %_8-T _8(   _~  @ %_8- f_8\) N J @ %_8-*_8 {  _ , %_l _ @  _ @  M  7 S : -X  -:    5n.  bZ % #@  4 t@- N  x % d @7  7 ~ 4 l   T5 M-HMfe  5+ P%e    l See N   e %͂fe ( - ( 5 5 5% % -l N  5 =N 5 @ 5e  t@-@ m N@ Ԕ& l ed& l ed& l ed& l e@ & l wxw fA r nw^mw FD % A r  r e0@ԕ A r e0@w@& HADCBF7 F6rw6r@f@  P`Hm` `:*4>39:<14;LJLLLt/dev/mt0bad character in key %l%l-%l ,%l- no filesystem name can not open %s last chance before scribbling on %s %l files not rest2 F > "-5IL U \-   c   %7v7 -l r   \H ~w~w l    5 @5 b @ @m@m5 AA @ @   { / ww @ @m  w   5%   4 -H<* ,e* / v\ eh b-\eR-LD/ 8m%N$T%   r _6 (5 @ p- @ 5%5 @ ^  5S%ON b 7D   l %   %N r%,r@   R  r t@-_0 H wt w b D5 S a I5?Ne a&   @a *% Ne @a&  @ @a @ @a  @a ored - small ilist %l not in range %l not dumped %l does not exist the epoch disk read error %l disk write error %l checksum error change tapes skip %d tapes tape read error %l can not open %s %s bad freeblock out of freelist d d o x f e c sp l r "PFptM:/ESTEDTDay Mon 00 00:00:00 1900 SunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDec  T  ww /    - w  -zw ~wr Deh  b  % w7 N 7 N ׯD - < : (w. 7 0  .w$ e B J ӕ- R r f e0 @ > ҋ D~8   ӕ0 $f v Le0 9ezt lf 7Vwe&  m: 8 ~    ~ w7   0    a w w D5 _  a0  %%  J a1 C-E_  @a0 % 8%  a1%  Aa1  1 %% a& @a& (  % >% 2 a1%  Aa1  j 1 C- 0  %% a& @a& ( %Ne& ( Uw4 w "    & ( w w @ 7N  w w f Wp `e0eӕ?f ,P   @f  7b x-rjf@w fww wlf@ww wJfww w, f@@& HADCBF7F      $ ( @`m $ ,functionsubroutinecommondimensionblockintegerrealdatadoublesysmovtstclrjmpintcharf N%f %% NB pw w f N%f r%% NV ,wX w F Nf   Bd % 3 k < w w   -\ _7   B k{     v % 7   f % |-xt-plb`j N%PPfR %%4  @   @m %ww  %0 %9Wp D`e@ @T  & 6  Dw   7N'  7:'e%@ȥ-7 q   e % DX! & n7$   5$   & ww  & 7 &p$7v$7p$_V7 h$7 f$b$^$ J 7L$ %;,7.$%, ,$($$$ r e A! y4 \ # J  #e   7% f7 ##r b % 7 X!    @ Xloatdoublestructexterngloblbyteeventextdatabsscomm%s: cannot stat characterdirectory block special (%d/%d) cannot open executable pure executable separate executable archive data c programdata c programfortranassembler programroff, nroff, or eqn inputassembler programroff, nroff, or eqn inputassembler programdata commandsprobably text with garbage with garbage d(o"xdfrecslrww ffE %  ww    7   H x ԋwbw Pf r* %x % w%y `%  T%     w  f& %N& 5 f& %e0= =@ww   %d B  , j &  ^V    p %dw&w %d. ( ,   p %d7 f (  pww x# %a%z 8   L#Up*_ _ 2#"#e7$# ## ,%  f #  -"""7 %_  $    ! . 7$ R ,7 $"h J ,_  N$ _ _  . !  7d$   @"0" E76$  _ t_ww   +%9.5 AWp ue5` (%0%9 ! @ 5@ ` %05    r e A!  <[1234567890-_]^\ >qwertyuiop@ asdfghjkl;: zxcvbnm,./ <[1234567890-_]^\ > @ ;: ,./ <{!"#$%&'() =_}~| >QWERTYUIOP` ASDFGHJKL+* ZXCVBNM,.? <{ !"#$%&'() =_} ~ | >QWERTYUIOP` ASDFGHJKL+* ZXCVBNM,.? ~wDe   % w7 7 ׯ-  (w7  .weB J ӕ- R r f e0 @ >4 ҋ D~8  ӕ0 $f v Le0 9e  7we&  m  ~    ~ w7 p f b0   NWp `e0eӕ?f6 ,,P "  @f   7. y b!  N!%/e-B! 8!-.!,!&  -!! ! L%a%z - 臀 Up *e  wL `- - Lw   7 7 - &w w  | j e7l b h -X Z P X ww  J ww -, 4 -( . ww  d% %p%l  "%l " >% wpw ^7 ! $% % X!̋`!#% L % % 6! % nX! -f   7 ߊ 7x 7 vfwwwf fwwwF f@w0 fwtwp$wfw\wX*wf@w@w<0wf,(wm"6wwmfw6ww f@ww<wf f@wwBwBf@w N  ww DeL@4 &   w!Ԕww r! h!   ww $    w 7 .! 7 !& & %7 ! ! 7 ! *% %   w@w .7   7|7 7hwV!& L% EJw !h % %  7 wE %#.v w x! l% L% 7wVl%%#^E   % # w  l%Ne  l%l%n "%l% T LԔ -<چl%l%6 "%ww 5 w)-  n%e V5 eee# J  @w2w  N H         e <   Ne  %  ! w w r  e 7 -7wd w R ! f N !E  ef N !!w w  !f $*.[\~"">6HH,+r?/bin/shsh-t!/tmp/exxxxx T,0  %ew d & 6  w _ @m7 :  (7 Z :  7 O :  7D :  7~9# : bb/' : NP%+ :  721 :  78 : %k  B-%5 S   O:> : @ : G : M : US : UpY : U\^ : UHf : U4 7N ,x    N !E̔ԥ $`n!e E7`Zw ~ef N D!w DuEC E% 7 !-|!w]  "'` %7 7RL'& %e'w& -6  * ") %7e)w f %f e% w w  7 8!(7 , t e Ee0$te!    . 7N 777e7w w    ~h%  m 7 w ;5ND  (57 x  c Х   ew~0  5 h -! 67 H-  <Lwz?? /bin/sh-tArg count Cannot open utmp ! ... /etc/utmpEOT not logged in.    7     77%     n D 7  D 7%%  67 7 7 r 5* 0BV " % * &_7 . *m(- 5 m#-   " %7 %  5  7   `ȋ -   -x  5r d  n r E5P  5S~D 4 B B 7 8 4 0 _ Ԏ  4 %  De % %%\ % ԕ\Ԑ@e!ԕ E- - &  @-Ue-5 E@e7 2e-w6 w $ v-&  $U       J  ` 7`He-@І w w n%  # T%\ HU% !Ґ%$~ "7%g7  wH w . !w* Ԕ7  w !l%#-Message from Permission denied. f@  x "@ $$ttyЋ7@  /dev/ttyx/devw   -        %-   7 ww  @ ȋ T wr 7 w T  ̥9 Wp @@`e̥0 7^ y t  t 7B &VpCww D5 %a%ze5 %A%Ze  ww   -   ww  @ P  !%       -  7 | 7 w6w $D5L %a%ze54 %A%Ze  E * % - 0@E%l'(z%& E%1%6@ n+@ &d+ %5,e!l%7%l'!l%Ԕwhw VDCB Ԕ%l'^wBw 0  n @ z  ex J pe - a7Xe & \  \ & \ w7*e \  \  w DC !wzw h-wfe w B$D@e55 !ʋ:7 %^  z%*_db & 6  w %@5 f H 5   N 47"  % 5lf f%5 >%  % ll %@@-^%W5 @@mȋ@@mȕ @@m  %5 @  %@ Ne 5@@m  % % : ef ,P   @f    $  -   w  - 7 w   ww    %   %     wZw Hfe %w>w , -( | N f %. % & %1 %ww Dԋ@ ww ~w De   % zw7 7 ׯ - (w 7  .w e4B J ӕ- R r f e0 @ >\  ҋ D~8\`_ !ҕ w%* 7 y %(%_} ҕR Z%) @e@-Vҕ RJҕ% DIҕA p3 7!*ҕ *ҕ %^ % Ґ %X% %]@pҕҐ%X%_7w   6 .!l%ԔN7L -N 7 4$ 7"&  &  7wfœԋ˥&  ԋw , DC ^ x  wԋ̋7 7  ~-xpf@w f@)wfw~wzwf@wbw^wdf@wFwBwBf@w N  ww DeL@4 &   w/%J %K  t5 t5N  5N  5  B-B-%B-B-% &    w4w "DC%: be`m e rfww p@ : ӕ0 $f v Le0 9e   7we&  m  z~  z  z~ w7   0   vWp `e0eӕ?fwwdwf@)wfw^wZjwf@wBw>pwf.*wm$vwwmfwvwbw fAW @w f4147 5 e w| 5& w&JL&& % ` & %  0+ 0+ԋԢ  & % ` -&   z w RDCË wNԠ@~ w "  %77 r  e0 ww D7 ~ ̋ ww  C R N%HH7 Bԕ\ԕ % >%<ԕ-ԕԐ%+~ ++ "%% % ԕ\te0Ee0e% %,Ճ7* w,f@w* fw* w& !&f b%  r<R r< r<R r< rWtC` re rwBF b  b!"7" b%nT    0!6 7  ww l ԔAA WpCe*l ԔԔԔ BeWpCe@ԔԔԔ&  ed&  ed&  ed&  e@ &  l wxw fA r nw^mw FD % A r  r e0@ԕ A r e0@w@& HADCBF7DH&>D&8@&2<&,8&&4& 0&,&(&$& &&&&& &&&f& f@www*f@@& HADCBF7@F    [.<(+!&]$*);^-/|,%_>?`:#@'="abcdefghijklmnopqr~stuvwxyz{ABCDEFGHI}JKLMNOPQR\STUVWXYZ0123456789w fw @e7 !wfw7 fw w !wf@w w !wf wm &!wx wm fw &!wVwz f@wj wf ,!w, fAW @wD f&,1&,78 5 e2w$ 2! 5& w&L&H&D&@&<&8&4&0&,&(&$& &&&&& &&&|f& fwFf@  x  "f@   $$ttyЋ7t@ j6rwZ6r@f@  P`Hm` /etc/utmpcannot open wtmp Nobody. tty PF M:/ESTEDTDay Mon 00 00:00:00 1900 SunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDec/dev7-./% <=2&?'@O{[lP}M]\Nk`Kaz^L~no|JZ_myjС !"#$()*+, 01345689:;>ABCDEFGHIQRSTUVWXYbcdefghipqrstuvwx*bkwxibs=obs=cbs=bs=if=of=skip=count=conv=,ebcdicasciilcaseucaseswabnoerrorsyncbad arg: %s cannot open: %s cannot create: %s counts: cannot be zero not enough memory readwritenot a number: %s %l+%l recordH 8!w f D& w }f@w w w mode uid gid tapa size date time name w  w ]@^@ w   w tEND  B ҋfABR&e E7 7w Out of core w@ @  E7h=\@ \@P=\z= ~fe N 7 4=  4/=7@=\8=5 \0f & d~S<   e fe N e@Ee~ <w "Directory checksum <w  v<commandd@flua@parg@swtabuseerroptapPsetbflm`@tapsiz@ndirent@tcmtfio@ndentd8@dir\edir@mesgdonefsetcomnoflagdcofHdccRdcd^dcfXdcifdcmldcr~dctdcurdcvdcwdcxtcxmtxflc]@flf^@cmdfli_@cmtflvb@flwc@cmxLrdD~  & 6  w  _ @&  5 @X F wt:@9 @ 7@7:@-+ 7 e% 7%@&  5 @h F w 7           B  7 Z V       B  7 w n  wj}  5% = w 8 H7^ \0@  8 n;Pf;@h;$ T;Vw Tape seek error w w ::+ f@ X:w X t x jw  y V  L w  -:.: -: ::e:dir.gettapeRdeletewrdircheckbclrdirgetfilesupdateDtaboc check1bxtract usage< encoderdecodepstrputcch\@getcclrentsumf@rseektreadttapeb\0bitmap wseektbootmboottwritetrderrrseeka@twrerrwseeka@seekerr@verifyZname@calloutvexpandfserrPcatlbr@statb@name1@numbnumbx y 7  z F 7 N @ 5 ww  N 5N 5@ 5 @ @-  <ww  55@ -@ -      @w* w 5 % AWp Amu@e5  @ww ~wP DeF  @  % w7 , 7 , ׯ" -   (w 7   .w eB J ӕ- R r f e0 @R |@%&r@  X:@t@W.Ћ &/Е/P 0@ zw -- Cannot open file w@@^:E @\&  New 9w ,Directory overflow ww aw @w @@@Ӌ k9 w, 9'w, 9#w Lr9U9909797 9999 9 \& w &@-"9@9ˋ ʋ/f  ew 8߇ -8 8 $w , not found 8e8-8 w d >f& f&@numb2,numb1*sizeh@bitcalc map\0setmap update1mss@phserrp emap\@maperr$ nentrj@nusedl@lusedp@nfreen@pmod crterr crterr1 smdatectime.o L1L2~ctime at~localti ctdaylbegittimdaylenddaynocopytL100004 L5P L6 L10001 L10002 ~sunday atdtadL8@ >  ҋ D~8 ӕ0 $f v Le0 9eX R J D 74 we&  m    ~    ~ w7  0   Wp `e0eӕ?f  , P  @f z 7th  ^ V -P H f ZTL  7< 8 47. 7 $f@w| fwww\f@)wHr@ ~@W#00 @N7Lf r f e0 T\ )5% *8 BCeB v77 t \0~ 8 ew 7Ї 0\&  5N,Nvew 7 Ew7B 7w @@  @- r7 \0!   N7* l7   `\0 w@f@ Xw ` -- Phase error 1 \0  \@\ 5  ew 6퇇BCeB vB  ~gmtime L10Atptimd0d1xtimeAL11L20001vL14L15L20003~asctimecptptncpL21L19L22L23~dysizexyL25L24~ct_numbcpacpnL27L28csv.oldiv.odpadd.o _localti" _end$A_cbuf$B_dmsize#_timezon#_tzname#_dayligh#_daytab#_cfwww*f@@& HADCBF7Fcdu cannot open %s cannot create %s %4d do xNf\ecsljr\0\0 ~ 6E&t6tEw Tape overflow w* \\  6e @686 :6 ,6 \0 55 55 ~5w Rw H entries 5w :w 0 used 5 5w w  free 5w w last t5_@&t5 t5 5 @w  @w @w @w fe  w /  w r/ vw ^w R: Vw > B@ w $ s5x-5w-5rtime" csv"_asctime"cret"_dpadd" _gmtime" _sunday" _dysize"x_ldiv"_ldivr$A_ct_numb"_lrem" * 7{f@  x "V@ $$ttyЋ7@@ 6ttyx /dev-   w4 Cw @xC@ @wBr8 N4  (\0$ ! ,4  x7 ww~@ fA  f @ w ( -- create error w N  ww DeL@4 &   w/%J %K  t5 t5N 5N 5 f B-B-%B-B-% &    w4w "DC%: xe`m e rJ8# w H z+@p<7lwjw  realw Jw userw <w sys w .+ w Try again. 0 5w Command terminated abnormally.   VҔ    V%x/usr/bin/ V% V%w6O. JTw Command not found. w w w w 0ԕ !r& r<ww z w t:w h w b:w X w R w L 0:ԕ !fww p@&f %2A r<R r< r<R r< rWtC` re rw2F x  x!272 x%n    0! 7 F2Aww BԔAA WpCeBԔԔԔ BeWpCeԔԔԔ&  ed&  ed&  ed&  e@ &  Bwxw fA r nw^mw FD % A r  r e0@ԕ A r e0@w@& H w 8.V re07>Hw  f re0dwH E/bin/sh:/< @~@V@O@ -n@d@`@ R  T  A L@ @ B>@.@*@@-?7??Wtw??Wpe\w?w *Tape open error w-? w?@ȋw Bad usage wn0H1H2H3H4H5H6H7HcRd^fXifmlr~turvwxwDwI??w h>>>w P7>w Dw <>>w (Lw .`@]@^@->w& lw  Jw >> J $  ADCBF6rw16r@f@  P`Hm` w 4w @w ~x \0@\0@@/dev/tapx/dev/mt0/usr/mdec/tboot/usr/mdec/mbootPFM:/ESTEDTDay Mon 00 00:00:00 1900 SunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDeca.outnamepmodeuidgidsize0size1time0 time1 tapeadirsizmdirentrnarg@narg@cmrT & 6  .w  w"f$f@@& HADCBF 7  &oprd  @  zaE ~ &P @? &fA  r f e0 iou|00 000    @@@ee  @2Kn,X` %05075110134134.515020030060012001800240048009600extaextbeven-evenodd-oddraw-rawcooked-nlnlecho-echoLCASElcase-LCASE-lcase-tabstabshup-hupcr0cr1cr2cr3tab0tab1tab2tab3nl0nl1nl2nl3ff0ff1bs0bs133tty3337tty3705aw  : b 0rw w O b N b [ b w w -\J DP   -,0 wz w h  Z 5_X AWpe<uDC %f& %5 f& %f %5 f %@  u5_    @5̥-  ˥- @ 5B- 5 @ B  u- @ B  u-uu5   @  & 6  `w N& G7 ԋ@̥: ̥:=F&  EF& B  ~Ӌ8 J %  UF& B  ~ :  ,  %  ww z ^    7L H w` & 6 %, 5 5 EB ҐNe % B %:% %:%0%9Wp D`eD- w ~wDe   % Vw7 7 ׯz- r p(vt05tntn300titi700tekekerasekillunknown mode: %s input speed output speed speed erase = '%c'; kill = '%c' even odd raw -nl echo lcase -tabs hup nltabcrffbs %s%d %s%d baud dox,f:ecslHr A@555!5! 0 Y X TT 0 9D̥. C˥. D-C-_T  B _T ӥ0 $ B C- B @5 ABp@ Aԥ0 @w, ̋@mȋ ˋ@mȋD-̥ C-$˥ !@C-˥ @_ @mAmA@AA -_DC ̥ ̢˥ @˥  w RC@ @m wD˥ < ˭      wd7 f .wZeB J ӕ- R r f e0 @ > ҋ D~8  ӕ0 $f v Le0 9e  7we&  mp n V~  V  V~ w7 B 8 40   Wp `e0eӕ?f ,P   @f  h 7 $h -f RzrR  7b    7 w open error: 7aw W zw Pcan't create temp file for 7z7 zp-j\-bV-ZP w improper format: <m:e 7 44w- mB w unexpected EOF: 7 w rcan't rewrite: w7w Ncan't read temp file for: 7vr7 dVRwZwL Ew2/tmp/stma ˥  @   @ @m˥   w %9%0 ww  f  %w|w j\WpBe<  % wVw D:WpDe<E@7 y    w  Ne T A a1 . Ne T A a1ww  D5 AWp `eu B =@wtw b% % wX f@wR fww^w2f@)^ Z7T 7 Jfw@e7*wbfw0JA 7 fAW,f B@ 8 @&61fA   @ @e71@6 1wf@wd<w fwNwJ@wf@w2w.Fw` f@wJ f@wLw, f@@& HADCBF7Ffw@ 7 f&fhЕЕ P hCx h h   wfwddJA 7 fAW,f B@ 8 @&61fA   @ @e71@j 1wrfwApQ  OfA  ^ y   F y @0fA  @9 fA @e&7>w:74@vw7 w w w AupNNmf wtw bZ @@5 _ fA rBpEu@@`55DCN&  t rB`E \P z\T ~ !h hE Rh Sh   0 & s>e0W!9eW!ZeT!ᇅpassword: bad password file /bin/sh-cannot execute shell sorry /etc/passwddpojxfeHcVs&lrh   @ @   f& %5 2`D--`f  $`f& %`Df %5 D-&  C-D-%@@AA@ Nf` u_ Nf @`5_ f %Cww   DCԒ ww  DCB5ҒS wf>:wm4|w(wm"fw|ww fAW @w f17 5 ew 5& w8& L& H& h & 6  4w "   %_: Z 4_:ew  R #@ R e@7~  R e@7a 5 @th R @t7j2 @t h5 AWpN R AWpAw@AWpAwP AWp   $   ww   5 @mAAmH@mv ȋ7 jww ]ZT+  E98G  +$&N $%5 x & 6  w  4 %k P w|^u @7d y@-IJ DmB? 0 ew& mH%e@ȥ-ȥ+ $%  b    e@& <!WpBe<  ` H, %  ` AmH % - ^ X RmP :72 b% be E7 r7t7 m7 XD& @& <&8&4&0&,&(&$& &&&&& &&&f& fwwwh fwwN f@www*f@@& HADCBF7F  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~i $5@o $5 t $5y $5~ $5 $5 $5 $t&  t&  t&  t&E  t&E   $ww tE Nf $%wdw R@ f $%wDw 2fe %w(w ~wDe   % w7 7 ׯ-  (w7  .weB J ӕ- R r f e0 @ >2 ҋ D~8azt b  |  j  X  5T  D2 8 \ "   e&  ee-- 2&  7  vw"w 5 5  m <m!6$ " v -#N 57 T f N 0 \ %     & d e -  F & ԥ -  w w   mo^~abdnrtP   -Too many keys -/usr/tmp/stmXaa/tmp/stmXaaCannot locate temp Can't create temp Can't create output Can't open "0  ӕ0 $f v Le0 9e  7we&  m  ~    ~ w7 n d `0   LWp `e0eӕ?f@wwl f@wwN f@www*f@@& HADCBF7F     $ ).38>@B@G K P W[^c 5 B) 5 4ef N 0@ 0 $  e B-B d e 0 & ӥ   $   e%߆e  3B e-    B-  w w CeD \ w %  w J " & ' b (w w n -,@ m ȥ- @ m wJ @ mA rea?C re~ & 6  |w ju%f ]N  Ue f < 5fef Z%% % %N  '%N  Nff e@@m@m5f %N & ww ~~w"De   % w`7 7 ׯ-  (w7  .weB J ӕ- R r f e0 @ > ҋ D~8 ^ӕ0 $f v Le0 9e*$  7we&  m  ~    ~ w7   0   Wp `e0eӕ?f ,xP n h @f L B7": B0(-"f@wl fww"wLf@ww(w*f@@& HADCBF7Fa.out%s not found Bad format: %s %s: %l+%l+%l=%l (%o) zd ^  & 6  N w < l%#@5@  7  y         > "   (   %@&1 * 07 >_D  VM    7F[ >  . %  %   %L  % @ 5 E5 c  >5 AWp@ _zAWp  M_z5 AWpB , @J59 -j AWpf LF & 6  w ,$ 7$ p 5l *5 _Le@ȥ-Me@h ; x%Wew N ($Ke@ 7@e@ 75e@ȋ7#* #& ##N 7 @ȥ+ e@ 7# Nf  # %    w w l#f# P  w w | $l# 2B#1NeV#  @E7$## P wH w 6 $ "7   - ox fecsl(rBN % < %5 @ - @ AWpp  - ?AWpA Euu  _z u-N >  > NAWpA A fAWpA f >eAWpN  > V5AWpA eWtNAWpf AWpA f >eAWp AWpN  >  >AWp@  >N  > %2_ ww *  5 > ` fef %N  d > &B H %H -  6 %  "N "  7r 7"   e7 v"v v l 7 f b"5   f ` 7 _Ne  7 | Ne h w` Ne 22!7 F  0w< p2$ !Y ^V  Y ! 2$ %02$ 0$2$7 !&C e F e H  K P! R  B! -8  $! (! ! ! h b p7 P w< w * D#%" WpP w R 7 [<WE%@P. I/E. >/:6@<  ׭. ׭. F@@ҕ/ҕ.ҕ. " 2   -- directory not empty ? Vwp%@a0 De@e!҆ It#tyNe&e . ,2J p " Ne&e . @E%` -r  &e  7 ew @ A Hww  5 5 AWp AWpu @ AWpu , AWpA eu`@t5`@Et5ff %ff %Ff %%A =%>eˋ 5 %F5ʕ % %~ %ҕ  ʕ?  J Ne0   1$ % V % w w -  _Z% %     % _ZZ 72$ N b  p0$2$<  %   -  - @ -  40% - % 7!&    4    m 7!   - ww  0$% ~ %˕a%0$0˕ wpw ^B (#WpNe0  $ $  w6 %  : & 6  w >5 5 # @fr  eu-Nff z% ww .Nef h N_@E%@V N j5%N_  @-_N  N < 5  =f 8;52-# e N? < NLH ; EA@ u=( %x"Nf[ <% h55u  N5% %y N  Nh <  > w^F%Fw @ *w>w ,f w(w ~wRDeH  B % (w7 .7 .ׯ$-  (w7  .we B J ӕ- R r f e0 @ > ҋ D~8B F  ӕ0 $f v Le0 9eZT LF 76we&  m  (~  (  (~ w7   0   Wp `e0eӕ?  e2$E% JE% %0$0 w  7 N  w7 y 5  L 7 %   w fC Ĕw^w LC r   r Ne0 w.w C   % J *G7 y   97 7  'U- 7  7  r 7 l %d ^  R%   w|w jB %9 Wp D`e%0wNw <-N w6f , wrw `fe %wVw D fe& F%% w2@w ~wDe   % w7 z7 zׯp- h f(wZ7 \ .wPezB J ӕ- R r f e0 @ > ҋ D~8 ӕ0 $f v Le0 9e  7we&  mf d ~    ~ w7 8 . *0   Wp `e0eӕ?ffwRJ wp f@wZ ffwA@ e  N X OHR@-88>,m*-0 e7- --)T "  @ 7"7,7, 7, e fwLwHZ wTfw4A` Q  OfA  ^ y   F y @0fA  @9 fA @e&7w7@f w7 f@P   @f  %7B f%-fwwlw f@w f@)wf@wrwr fwvJA 7 fAW,f B@ 8 @&61fA   @ @e781@| 1wfwwwf@wwwfAW @w f'1'7 5 e w 5wwt fw@e7wRfwD7 ff@wbw^wfwJwFw fw0w f D& w }f@wwwf@fA w,w"e"w"ew"@lw"Alew &@t`e @& HADCBF7hFf@  x~ "L@ $$ttyЋ76@ ,wxwtl wnf@w\wXr wL fwBw>x w, f@@& HADCBF7 Ff@  xF " ~ @ $$ttyЋ7 @ akltxRjdX^n/devcannot change to /dev _proc_swapdev/unixNo namelist /dev/mem/usr/sys/coreNo mem TTY F S UID PID PRI ADDR SZ WCHAN COMMAND TTY PID COMMAND %c: %3o %c%4d0SWRIZT%6l%4d%5o%4d%7o /devcannot & w,&L&H&D&@&<&8&4&0&,&(&$& &&&&& &&&f& f BRf@wwwBf@w N   ww DeL@4 &   w/%J %K  t5 t5N 5N 5  B-B-%B-B-% &    w4w "DC%%s: non existent %s: try again %s: cannot chdir /etc/globglobrm-r-f**%s: no glob %s: directory %s: %o mode %s: not removed doxDfRecsl`r   %ew&/devopen /dev no swap device %.16s %.64sd oxFfTecslbr /dev: e`m e rfww p@&f %*.' r<R r< r<R r< rWtC` re rwF   !7 %n    0! 7 J.'ww $ԔAA WpCe$ԔԔԔ BeWpCeԔԔԔ& ed& ed& ed& e@ & $wxw fA r nw^mw FD % A r  r e0@ԕ b%  W mw@ȋN w5ȋ XbL? /dev/tap0/dev/mt0  A r e0@w@& HADCBF7Ff@  x @'" @@' @'$$ttyЋ7@ 6rw6r@f@  P`Hm` HB=  p  V$V/dev/ttyxVery funny. Page Too many args. %0PFM:/ESTEDTDay Mon 00 00:00:00 1900 SunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDec/devz_z_z_z_z_z_z_z_z_z_z_z_z_z_z_z _z_z_z_z@ER7 y  _zw ~wDe   % ^ w7 7 ׯ-  (w7  .we$B J ӕ- R r f e0 @ >N ҋ D~8LP ,ӕ0 $f v Le0 9e  7we&  mww wf|wmv wxjwmdfwT wVwF f@w6w2 w, f@@& HADCBF7F6rw6r@Vttt\ttttttPtpthttba.outcannot open input bad format no name list %c UATDBCuatdbc%.8s %c%c dvopxfeNc\s,lr  F4 & 6  w @ @m 5 0%)5 @ F@mȋ Ne@ &H @ F@mAAAmHe@ FN@ &D Y %wbfww nwHf@wxwttw*f@@& HADCBF7@FLP-lp/lib/lprcan't start daemon   ^ ~  ^   ^ ~ w7   |0   hWp `e0eӕ?fP ,FP < 6 @f  7 T-f@)wfwpwlZwpf@wTwP`wNf@w8w4fw, f@@& HADCBF74F6rw.6r@rrrrrrrrrf *<N`& \ & 6  w ^zu%  % @55( @&   % E%@p( @&   % J@55 @ ȋ  % }@ ȥ/  % @ ȥ/   %  ._%"_  r, f  _E%@5| @ A H@/@55 @ ȥ/u@"%~v~(2:DLV@3s&&fY LT0NT *HT$BT<T6lrprtvx. 6 > F N 33ff x $0.@....U.../*.j...*/   2 " : J  * B R fpx 03#33f&ff) , b ^ j  r  V z  Z cannot open %s jsrsobbrbnebeqbgebltbgtblejmp A H| , f  f- -  H %  E@  E@ w=#Ef^ 6% v55  b5% %y BN  k % Nf 0 j 5%   %  Ne @-8@e55@ A Hu@ A H ff e % 5  % D  :N   % w N & 6  F w 4  7e%Fu-?@ 53a  x U"-wUUUUU  e %@ȥ+ f 7 N _e %N Tfb5 ! 5 J@ pl u- @ 5@u -  (   -  Pwwwwm  2Nlfe Z%  "swabclrcomincdecnegadcsbctstrorrolasraslmarkmfpimtpisxtflagrtssplhaltwaitrtibptiotrsetrttmov cmpbitbicbisaddmuldivashashcxorbplbmibhiblosbvcbvsbhisbloemtsysclrbcombincbdecbnegbadcbsbcbtstbrorbrolbasrbaslbmfpdmfpdmovbcmpbbitbbicbbisbsub???" dx or x f eP c^ s. l rw fe %w|w j fe& P%% wX@w @~wDez  t % w"7 `7 `ׯV- N L(w@7 B .w6eB J ӕ- R r f e0 @ > ҋ D~8 ӕ0 $f v Le0 9e ~x 7hwe&  mL J ~    ~ w7   0   Wp `e0eӕ?fw ^ w` w N  7  Z%w< w * n f %\ @& % ^ w w =7 N "5 5 'N@ @m&  @ @- 5 % ^  ^ u-um wj w X @ 7  y  .f %w4  .  .N  . .N ^ ^ @t ^ .fE % ^ @t&Ew  65% wv 58 & 6  xw f 0@-*e@c  x J  B  B  : ` 0 e@ȋ    ef  7    %%% %    T% T%% T%zp T% l& %5  AWp N 74AWp N&$ %   f e 7 5 _ 5 _ _a5 @e7wfw7 f/ffwwwL f@ww w(f@w fwvwr w fw\ w f D& w }f@w"w wf@fA w,w"e"w"ew"@lw"Alew &@t`e @& HADCBF7(FUsage: mv name1 name2 Source file non-existent Directory target exists. ?%5 @t@]w D -l %7jw* 7 Z ^-^ X P7 NBE 6w E%%%\  ^ N ^ w\ ^ @ 7<  y0n\t?w ~ )N fff& e& %Nf& %5% eWNe0 ^ w0w  u ^ -Dw w u@ ȋ@@ 55 @b @.  5 5 @@m5%0 %9 Awp`e@mAmH %0E5% l  V , J" ) : N.5 4 ; @m0  B  e  u- ww 5 @Ap, Awp@w@Ap, 5 %@@mAAmH @@mAAmH w 0 10H  5 @tEe0K  @t5 %ww ~w De   % \w7 7 ׯ-  ?? 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. dox>fLecslZr   %ewu @@%5 @@m5%0 %9 Awpn`eu @@ AwpJAmu5 5 @ e-$ 5 e  -   @-f " %- -  (%wtw bN 855 N ^ @ 5 ^ %w&w @E r eZA! y*@E 7 yw@E 7v y@E? r eA! y.(w7  .weN B J ӕ- R r f e0 @ >j ҋ D~8v z  Hӕ0 $f v Le0 9e  7we&  m  \~  \  \~ w7   0   Wp `e0eӕ?fl ,bP X R @f 6  7$ ~  - f@w f@)w7 @D /ѕ/ѕ.  D E#6'F$Ct www ѕ.  @77 Ћ . ?  "&+05@E7" y9@E7 y>_zB_z@ _ xF_zK_zP_zT_zX_z\_za_ze_zj_zn_zr_zv_zz_z@E7 y ~_z_z_z_z_z@E r eA! y_z_z_z_z_z_z_z_z_z_z@E? r eA! y"_fww ww jw wAupNNmf @ wPw >p@@5 _ fA rBpEu@@`55DCN&  f& %5 2`D--`f  $`f& %`Df %5 D-&  C-D-%@@AA@ Nf` @ u_LNf @ @`5_Lf %Cww DCԒ ww DCB5ҒS wf@(+.147:=).@ & 6  w j% %@- Nf  n .  7h %x %x0 J n 5&! N *ҥ "*ff %*f P %% pE  3!ff %w b  A =   y% %xh $7  @%y tn  y $   $wL w : 7 87 6Ne Ne fead.letter/etc/passwddox,f:ecslHr0 PFM:/ESTEDTDay Mon 00 00:00:00 1900 SunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDec/dev * %Cww ~ LDCԒ wlw Z&DCB5ҒS w<f2.wm(!w0wmfw!ww f@ww!w fww!w f BRf@f&&CB  ԕ- & e0fv   vA W  ~w N  |ww DeL@4 &   w/%J %K  t5  t $%  D   eN 8  :w w F ~N&  &  .  &\ N $  %x   $.  wH w 6 <  f  \   f  8     f   w <     j  Xw v v   d ` Z Z 7 X  & N r %wL w : J   w8 %Ԑ d%  J/258;>*-035 N b 5N b 5  B-B-%B-B-% &    w4w "DC%: e`m e rfww p@&f %\ ' r<R r< r<R r< rWtC` re rwF   !7 %nZ  !  0!!< 7  'ww ^$!ԔAA WpCe!^$ԔԔԔ BeWpCe"ԔԔԔ& > ed& > ed& > 7H N7> N 7. N 7 N7 N7  N7<w D̋w ̥:w . <  w w p  ^ 5 @Ee05@p.@p<@t5 %w, w  DCԢӋw w D Dww ~wDe   % w7 z7 zׯp- h f(wZ7 \ .wPeB J ӕ- R r f e0 @ >  ҋ D~80( & 6  w l$ 7$Ne @e 7# >@-8e+@a # x # # # # # #f  # # # #e@ȋ  t#  `#7 `#7 ^#7 \#7 x# P# P#  f f 7   5 ef f LU u-' r&' e'E5 " "6% r b  "J r& e "z" r -  ed& > e@ & > ^$wxw fA r nw^mw FD % A r  r e0@ԕ A r e0@w@& HADCBF7F6rwZ6r@f@  P`Hm` '' rxd@b c-r-w-s@x- r-w-sx-r-w-x-t 6 F N V b j r ~ ./etc/passwd/etc/group %s: total %d %5d %2d %-6.6s%-4 ӕ0 $f v Le0 9e    7 we&  mf  d  ~    ~ w7 8  . * 0    Wp `e0eӕ?f  , P  @f  7   8  -  f       7 ߘ 7 7 f@w fww>wfwDJA 7 . fAW,e e Hww vC%_F " r !f F r Ĝ !ĜED$& J D$  r 5`E&E r%&   r e p -`! ee r%e! (!&  ! r 5!#! r wL w : - w6  &  %7 5 5 5 ( %: 0 @@mH % AWp Ameu(" " 5% u-6d%3d,%3d%7s %-7.7s %-4.4s %-12.12s %4d %s %.14s %s unreadable %s not found d>o8xzfec$slr$'PF!!M:/ESTEDTDay Mon 00 00:00:00 1900 SunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDecf B@ 8 @&61fA   @ @e71@J 1wffwwPwfwAVQ  OfA  ^ y   F y @0fA  @9 fA @e&78w47.@\w07 f@wwbw f@wwhw fAW @w f17 5 e wn 5& w&@@m ww x ff %5 %et`wP w > w  d% w2 w C4e  $ w w z$CԔˋԕ/C Ԕ % z$w w ("f _N*! r _b7 j$ (" "  %  ".% $f \%& f % %`Ȝ$  w0 w  $e- Z e~xer4 4   _Nef N9! r 55 5  w 8 & 6  hw V     > &  7 %x   F%  D &  # @ D &  4 %@ˋԔ%< 5 %< ԕ &  F% 5h%   t%< ThNez4  _Nez @˥:P lE D &   -  F%Dep  h @ex!Th 5h% wlD &  8  F%Nep Ԥ_:_ @5 f AfWp @@`e5f˥ L& H& D& @& <& 8& 4& 0& ,& (& $& & & & & & & &~ &x f& f BRfwtw f@w N  ww DeL@4| &    w/%J %K  t5p t5rN 5N 5  B-B-%B-B-% &     w>w ,DC%: e` tE@E%`E @E%@E`UE5UEtttttt5` ttt ttN@&  7`w DC h5E}%'E}%' 3- 3-3-3- wp@wp E}% 55@5upw  ~wpDef  ` % $ w7 L7 LׯB- : 8(w,7 . .w"eH!B J ӕ: 5 d AdWp @@`e5d˥:  @ @   :  F%_> 0H T 5j$5n%a'n @net&fj %4 fj F%Nj R T 5j& fj %4 fj F%Nj  ` T 5j fen F%fenfj r% Nj J j    p  F%Nf  Nd Nf ˋ    %   F%  _>w   T 7$DC Sm e rfww p@&f %  r<R r< r<R r< rWtC` re rw F   !n 7n  %n  x  0!x 7 4 w$w ԔAA WpCeԔԔԔ BeWpCeԔԔԔ& ed& ed& ed& e@ & ww pA r nwhmw PD % A r  r e0@ԕ A r e0@- R r f e0 @ > ҋ D~8p!t! ӕ0 $f v Le0 9exr jd 7Twe&  m8 6 $ ~  $   $ ~ w7   0   Wp `e0eӕ?f ,P   @f  $7 x!$~v-phf@w f@)wfw~!JA 7 xfA ~5% CԤ @e!:5 H 7 @7 >7 <@w@w .D ԋ   F% ̥:wf v v   7  7 7 fw w fww w f@w fw@e7 wnf@w wV f"w@ fw|wx w f@w`w\ wf@wDw@ w f@.w f@w fAW wf@& HADCBFw B 5  ʥ ʥ ʥ- ʥ9 Wp @@`eʥ0  w7Ff@  x "p@ $$ttyЋ7Z@ P6rw@6r@f@  P`Hm` /tmp/maxxxxx/tmp/mbxxxxx/etc/utmpWho are you? .mailSave?.mailmboxSaved mail in 'mbox' .mailNo mail. From %s %s/.mailCan't send to %s. dead.letterLetter saved in 'dead.letter' dW,f B@ 8 @&61fA   @ @e7:1@! 1w>fww!w$w w wAupNNmf ww @@5 _  fA rBpEu@@`55DCN&  f& :%5 2`D--`f  $`f& * %`Df %5 D-&  C-D-%@@AA@ Nf` u_ Nf @`5_ f@w fz 1z 7 5 e<w 5& wR&8L&2H&,D&&@& <&8&4&0&,&(&$& &&&&& &&&f& fww w f@w wd f BRf@ww w*f@@& HADCBF7Ff@  x  " @   $$ttyЋ7@ fwh@ 7 \f&fЕЕ P Cx L   * rB`E \ 0 \ 4  ! llE R S  LLl 0 l& s>e0W!9eW!ZeT!TᇅL/dev/ttyxSorry. Name: Password: No directory /etc/utmp/usr/adm/wtmp/etc/motd.mailYou have mail. /bin/sh-No shell. Login incorrect. /etc/passwdBad /etc/passwd  0.! B 7"7- " *D! x K!& B D^ffr& 4 eFBm@ &Nmf|& 4 eBN6JA e &Nmfr& 4 e &mNmf|& 4 eHP p>*f R t> *NR  %w w C D   1 W- 7 0@ 0 p `   % ܆   r f  e07(: not found non-numeric arg zP& & 6  Fw 4% z $% F%@ԋ/@0! @0@&  NE%@  $% F@@&   $% F Fwzfwwwn fwwwN f@www*f@@& HADCBF7ZFUsage: ln target [ newname ] No directory link Can't link ~x `x`rr&  ~wl w Z DC N& J ~wL w : DBtEBmE b" <h$ 7 b" *   -b"|= %eh= % 55 s! B @ `e % @ E4@44 wbw PD   & & & 4 e      B  n&eww D7̥-l  a!7h< &  7X<! B 77 77zn&7Np & 6  w % h %_        !  7,   7 _%  _ R   R  %_@  R  %:ʋ R_%:@ ҋ % "@   B&  ʋ:    R  %0 %9Wp D`e a%: E 7!5LORUADGJMPSVB7t& & r& 4 e f  B r&  %m wJw 2 5 *@ @`5%*E rD e2B*%* e%F.B ww *f R 7  ww N%.B! B * R  e ww n 7~ ym;m ; m; x!pw>w , ::! x (&! x ! xN! x  Z:ww CBtEF  e ! B ww ffr& 4 eTT  7E %  %     R >X J    767 %  wlf@wj fwxwtPwJfw`VJA 7 fAW,f B@ 8 @&61fA   @ @e71@\ 1wffwwbwzfwAhQ  OfA  ^ b.4 & 6  ^w V  6 5  6 % ^BeK7 I˥-= r e( A! y D-  B  5 #f  PI LI JI FI :I >I  :I  6I X,I  D- F TBe&˥-Z 74 y e H  D- w(w D  & & %ew r& 4 e $& e % @8e2$e `& %! B ~ E7t 7:j E` 79X E7Nw.w DCe  ww ~wCDeC  C % *w7 C7 CׯC- C C(wC7 C .wCe!B J ӕ- R r f e0 @ >2C ҋ D~8"" Cӕ0 $f v Le0 9eBB BB 7Bwe&  mB B *~  *  *~ w7 nBy   F y @0fA  @9 fA @e&7w7@nw7 Lf@wwtwfAW @w f 1 7 5 ewz 5& w8&L&H&D&@&<&8&4&0&,&(&$& &&~&x&r&l &f&`&Zf& fwwwh fwwN ftE`Ew nNf  HHmHHmG H5  Fd$E%  & B w$8$m6$e5`.$ffr& 4 e> GL(7e 3 . * ' @ x   '7- '  "' '' r#  m#Gm|#Gmx#FwmFw* %Fw * 7F 7F 7F F*- 5 2-vF/-nF,-fF) jF7 nF7 hF7 hF7 ^F \F NFN*-L    E %`e  dB `B0   LBWp `e0eӕ?f4B ,*BP B B @f A hT7A ""hTAA-AAfww("w f@w fwVwR."wfw>w:4"w fw$w :"wffw A@"Q  OfA  ^ y   F y @0fA  @9 fA @e&7w~7x@F"w7 h@@www*f@@& HADCBF7Ffw@ 7 vf&fЕЕ 6P Cx v    rB`E \ \  ! E R S  vv 0 & s>e0W!9eW!ZeT!~ᇅvR\/tmp/ptmp/etc/passwdUsage: passwd user password Temporary file busy -- try again Cannot create temporary file Cannot open /etc/passwd User name not foune  FF "EF EE #EE EE $EE E EEe?E?7EEE EEeE7E ~E7 EEmxE5`7zE5 *-X8   xf UZE 2E   x  x e mE mE mE $tm  D D7 D`DD r 7Dw*w   7D  B & Ee0$t%! aFPremature EOF on %s&*/tmp/lxyyyyy. < D d in password file Permission denied Urk Cannot create /etc/passwd Password file illformed 0  @ @   D  D D D C * r Wp mC@7` 7 ^ 7 \ C 7L &6J  %ww w  =  B ww D `3 ̋D-/   & 0 (r& 4 e& & e 0 e%ewPw >Nf  BBmBBmBBFe8fm*m(fr& 4 eV BS |BP xBL #I *NR  %?  * : " j ! B " %J,2679<49:lu:2H "  "#$ (> (0Bad 'use'No relocation bits_etext_edata_endUndefined: %.8s l.outCan't create l.outCan't create tempinternal error: symbol not foundLocal symbol overflow%.8s: Multiply definedRelocation errora.outl.outa.outl.outa.outNo pages/lib/lib?.acannot openSymbol table overflow%s(%.8s): %s Local symbol botchBad formatdDo>xfec*slrhT\ & 6  w @ @m ww% V    \ %& & V%ww -nj w^ XmXw  .5h &   @]wv @w Z 25k &   AA @@w: @w n \&     w   w 5 "_4p&   *5r &  U@_t&    &  _w&  z&    ]}&  - & Ne z l&   <:   % ( $5f   & f   &   ww Nf 8 5 wv w `wfw T @aAaH wJ@m ȋw &h   f   @ap :5 f   @w @a0 fef % @m @`@`0 fefe %fef %f@w  Wp `e0eӕ?f ,P  @f  7 -zrf@@& HADCBF%s%cd.o(xjfxecslr777^ W5|9  W w xW ~ E L E бw .*!;!  7! 6w Vxw Nx  Xw w 0f ! !;!efh7" " " " & &  ~ 7 |4 > ` Ґ7b4 lrve6+W 6+e" `7D $$$$4 `7&e7!e2   7& 9 9 rev  re  f  dw b09 0Wq `Wt` b f  .A\ fww w.fw 7 fwwwf@wlwhw f D& w }f@w.w*wf@fA w,w"e"w"ew"@lw"Alew &@t`e @& HADCBF7Fno command -o-a!()-r-w-c{}=!=if error }}/usr/bin/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  %ewV( nw  -a s  7 ($(V( ΀w Ef5 ` (P   w e%@$ w ~ &f # ! -.-.. ѕ/W/   De  w  L p d ZfpĝkeD wW!feweD&f  s f e0 w ( .fA7vV   7h3@@ ea be e63703 8565 25E3$) 75$)52725 4w Hiw4 77426 w ? w724&f l4D ` V47 4  < ( !y@ DhbFZD 6ыD//<>%72W 0W 9w` T  | v& pU74 3    w "g< |7 3 $ U f 3 X< >  24 & 6  2w @% f%x   %& * & & % 7Ne  @fe J  0& %ww 5 5w~%: %   5 5% %  @@mH h5%  V5% @@m w 5 @@mAAmHw@@m ȋ w D wf h bZ   7J F B7< 7 2f@)wpffA & 9 &fA @e&7Bw>8@xw w&w w   \  &&ҋ  > w <w*n t e0r apw  <w re* w & r xn*6BXZLvvvLL   e !,  e !,  en  d!, mL2P FE@ | w ~U  2! z!, p *+7+ 7! U @!, 6 w x!('!-6!$G!*M !(   e@wwwN f@www*f@@& HADCBF7Ff@  x "@ $$ttyЋ7p@ fgoto error label not found /dev% ZiFE @b[7]@R P : ׬/ӕ/Z95`ҋ  ׭  ׭  ׭ ׭x׭y .?   ev p!+  !(781- t \ 8 `e r!*w R* :7`w Ba    w "e!)w ) "f+7 0  w H[!a!k * Ow fK  H4 D$   R0 | y+l -l *l /l &l l l l %l [ ^l z !l + 0/ V 2!]w 2] / # Y}+ - *> /J 4 &(   % !\ ^ =  & 6  Rw @& & .%w<f@wLwHw, f@@& HADCBF7F/* * KT-11 addresses and bits. */ #define UISD 0177600 /* first user I-space descriptor register */ #define UISA 0177640 /* first user I-space address register */ #define UDSA 0177660 /* first user D-space address register */ #define RO 02 /* access abilities */ #define WO 04 #define RW 06 #define ED 010 /* extend direction */ /* * structure used to address * a sequence of integers. */ struct { int r[]; }; int *ka6; /* 11/40 KISA6; 11/45 KDSA6 */ /* * address to access 11/70 UNIBUS map */ #  w tt3w jf rB*w XB`%w NB w DA B@w 8BPw .BpBw "f rw A B`+wd&PEEE &     U.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~9^= H S gj7$f xxxx 9/tmp/atm1a/tmp/atm2a/tmp/atm3aj79...r0r1r2/* * Inode structure as it appears on * the disk. Not used by the system, * but by things like check, df, dump. */ struct inode { int i_mode; char i_nlink; char i_uid; char i_gid; char i_size0; char *i_size1; int i_addr[8]; int i_atime[2]; int i_mtime[2]; }; /* modes */ #define IALLOC 0100000 #define IFMT 060000 #define IFDIR 040000 #define IFCHR 020000 #define IFBLK 060000 #define ILARG 010000 #define ISUID 04000 #define ISGID 02000 #define ISVTX 01000 #define IREAD 0400 #define IWRITE 020define UBMAP 0170200 r3r4r5sppcexitforkreadwriteopenclosewaitcreatlink unlink exec chdir time makdirchmodchownbreakstatseektellmountumountsetuidgetuidstimefstatmdatesttygtty nice"signal0mov movb cmp cmpb bit 0bitb bic0 #define IEXEC 0100 nZ]`cfilopsv @bicb bis Pbisb add `sub brbnebeqbgebltbgtblebplbmibhiblosbvcbvsbhisbecbccblobcsbesjbrjnejeqjgejltjgtjlejpljmijhijlosjvcjvsjhisjecjccjlojcsje< & 6  w r u-  @ @m& b% u-w:w (~wzDep  j % w 7 V7 VׯL- D B(w67 8 .w,eB J ӕ- R r f e0 @ > ҋ D~8 ӕ0 $f v Le0 9e| tn 7^we&  mB @ ~    ~ w7   0 @ $ w( ZL7j7B7?7;7w rS D 9 @ ^ ^w ? = H S /lib/as2-g&7 ԋ 7 w &D7~ 7z$   zw ? 6&f@ 8 &8? 8w t8700  r e0H~*  @% 88! ?0e*-&j9j75j7 | 8t 7! 7 7& N!=9!:77 T!!w x̵w mݬ7 $+ 7sclr clrb com @ comb @inc incb dec decb neg negb adc @ adcb @sbc sbcb tst tstb ror rorb rol @ rolb @asr asrb asl aslb jmp @swab jsrrtssys clcclvclzclnsecsevsezsencfccsetfsetd setisetl clrf negf absf tstf @movf movif movfimovof movfoaddf subf mulf divf cmpf modf movie moveildfps @stfps fr0fr1fr2fr3fr4fr5alstalscvmpypmulpdivrashtashcvdvdrxorxsxt mark sob~.byte.even.if.endif.globl.text* %% &- 7 wnw \ 5 fe& | %  % w<w * %0 %9Wp D`e@ ww ffE %  ww b @ 7* R O   T: ԋww @ H @ ȋwx w b~w0De&   % wD7 7 ׯ-  (w7  .we`B J ӕ- R r f e0 @ > ҋ D~8 lӕ0 $fY#C _w w @w W w7 L7@!  0 9e a ze A Zet# 1 W x#  < - - < eeW z# - - eW N. w out of symbol space   1 1    7"& Q -4  "New wb  #deQ  ew 0label not found z# W@PPW  7 "8j.  T 1 .data.bss.comm0 0P@W- 7 7nwlw = 7Fw H 7? wv  fDa~ rve6+ 6+e" Ke W (ᇇ v Le0 9e82 *$ 7we&  m  ~    ~ w7   0   Wp `e0eӕ?f ,P | v @f Z T7H T>6-0(f@wP fwNwJw0fw6w2wf@wwwfwmwwmfwww f@w ~!Mw out of code space _4-"_ 7 "M J-D   _4!Q w Tout of code space 7dMw#  w 0   # T H  z  , y&hhxLh >fr  _e J B    f   T _ _D  _ &  _ ^  "   ̔" _eE  t ?ww f$f BRf@w~wzwBf@w N l  bww DeL@4F &   w/%J %K  t5 t5N H 5N H 5  B-B-%B-B-% &    w4w "DC%: e`m e rfww p@&f %T r<R r< r<R r< rWtC` ree    -" w if...else...fi imbalance  & -" e Q X  w /bin/ed-         F & & =  7%T@     t 7   w for/next imbalance @7~ D $ @ J "l ( " @ x x   L " = < "  w D . & |  |qtwz} rwdF   !D7D %n    0!n 7 Tww &ԔAA WpCe&ԔԔԔ BeWpCeԔԔԔ& $ ed& $ ed& $ ed& $ e@ & $ &wxw fA r nw^mw FD % A r  r e0@ԕ A r e0@w@& HADCBF7 F6rw6r@f@  P`Hm` '8J12 w    w   ,& &  @     > <  = ע=  ע> (  ע=   ע= 0 fe . + -  J w :T  : w *Z  . * /   w b   w h   ^ w p   _ w   (  ` )*  .  w j   w ,reserved name !Q T7 > 0 J (  >w  ) [  w f 7  ]l(  & 6  L w R1  % @  euw@  r eA! y:   ~ ewX d@ @Wp we @ @7 ( 77`T@ @t5e  - w %P  < d ^ 53Df | %N * 5 @AWpfeD  AWpwTFAWpwV: % @340149:Pdi/dev/rp0/etc/dtab/dev/mt0bad character in key no file system specified %s: cannot open %s incremental dump from No memory %l big; not dumped. %l files %l blocks %l.%l tapes %l phase errors cannot create %s %s full date updated the epoch special read error %l change tapes write error can not open %s ~ d o x f e c s l, rThPFM:/ESTEDTDay Mo T  &f@ @ @@  V& ע) N ,T[v\S \f\#\X V r@w" &  D\   H j.\ 7  0,Cannot create b.out b& 7`  -V# H%82* \   Z " N Ft\ :7h\Sw \  \w 4\w \ w b\ "w T E\ X w out of space 7\Sj   @& ^ 7 @o  $     @  t& t t  7%  5 t& t 55 5 Ofe  %? *-@%-8-2&E t 5%   N   e  umT -Nf  % ~ & %f& %5 r NA r &  % H`^\Z  drt& t 5* en 00 00:00:00 1900 SunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDec$K!SK   |  t  l d8@5@1eU) ( $ !S S  w L %f ;d#0 @7" 0"7 H#aw # W z  7*# ` Tmp file? 7"n"#   w [  zCannot open file 0 w Rw ready "7 " # L=w   5Q@  e X w too many lines @"D"8" # ( 7`$"7v$"#j # &   #w 0[ W i#  Z7 Zw Y7 Y ! `# @@ :w Y7 `e0  .Wff&  } - } 0  ~  } 0  ` 5w f0B`W@ &  W B~  e0VV \ B@e 7-}      e}  wmmB W0  .} 0}  j .} }  Wf"" ;}   V7  77B@e0}  f -}  r f e0} &$e 5 =w 4w  w \ 7.7*t# &l#e E  [w @ w @]w zfA76  fA @e701@!  1 @ f5 f5u 7d@ h& `!7J& @ Ae 87 57 7 5VVfW@H7 7 wp @@ 7j 7Z wV  7\ !XCX jr"D>4zF,XD"2B  Bf5 f5 & Wf&&7H W?WA@mW@ @ V@> 0 "   B> 0 "  VV f5 @&E@f& e@ B@~VV 7 f Wp3e @7 Ef5w * f5w }7 HxHW&f] 7 `H@% TH@A&@]7& @L> Be0# @]є ]    BA   W! $-7 j77XT  & 4 / machine language assist / for 11/45 or 11/70 CPUs .fpp = 1 / non-UNIX instructions mfpi = 6500^tst mtpi = 6600^tst mfpd = 106500^tst mtpd = 106600^tst spl = 230 ldfps = 170100^tst stfps = 170200^tst wait = 1 rtt = 6 reset = 5 HIPRI = 300 HIGH = 6 / Mag tape dump / save registers in low core and / write all core onto mag tape. / entry is thru 44 abs .data .globl dump dump: bit $1,SSR0 bne dump / save regs r0,r1,r2,r3,r4,r5,r6,KIA6 / starting at abs location 4 mov r0,4 mov $6,r0 mov r1,(r0)+ mo W ]e B@e0]m G` ]eȐ9 ȕ0 ]ȕ1 G G`0]]VVf5u @AfW@V fW@V  Vf@ Wf@@67 f@f @A B @7 &e# 7 # VVf5 @Wf&7  @W@@ x j B v VwF VV \  disk offset J7> tape offset 07& count  T      0 Wp `@ illegal digit \-  ^ e*ȋ5 5&D9ȋ5@*&e  (: 7 $ r t@P PNɋv r2,(r0)+ mov r3,(r0)+ mov r4,(r0)+ mov r5,(r0)+ mov sp,(r0)+ mov KDSA6,(r0)+ / dump all of core (ie to first mt error) / onto mag tape. (9 track or 7 track 'binary') mov $MTC,r0 mov $60004,(r0)+ clr 2(r0) 1: mov $-512.,(r0) inc -(r0) 2: tstb (r0) bge 2b tst (r0)+ bge 1b reset / end of file and loop mov $60007,-(r0) br . .globl start, _end, _edata, _etext, _main / 11/45 and 11/70 startup. / entry is thru 0 abs. / since core is shuffled, / this code can be executed but once start: iRFPF7 D^; F^66  F^/* * fix system image for I/D space * Move data down to 0; move text to 4K. * Also put the data at the start of the * file and the text after it. */ int tbuf[259]; int rbuf[259]; int obuf[259]; int txtsiz; int datsiz; int bsssiz; int symsiz; int txtrel 8192; int datrel; main(argc, argv) char **argv; { register word, rel, s; if (argc<3) { printf("Arg count\n"); exit(1); } if ((tbuf[0] = open(argv[1], 0)) < 0) { printf("Input file\n"); exit(1); } rbuf[0] = open(argv[1], 0); if ((fcnc $-1 bne . reset clr PS / set KI0 to physical 0 mov $77406,r3 mov $KISA0,r0 mov $KISD0,r1 clr (r0)+ mov r3,(r1)+ / set KI1-6 to eventual text resting place mov $_end+63.,r2 ash $-6,r2 bic $!1777,r2 1: mov r2,(r0)+ mov r3,(r1)+ add $200,r2 cmp r0,$KISA7 blos 1b / set KI7 to IO seg for escape mov $IO,-(r0) / set KD0-7 to physical mov $KDSA0,r0 mov $KDSD0,r1 clr r2 1: mov r2,(r0)+ mov r3,(r1)+ add $200,r2 cmp r0,$KDSA7 blos 1b / initialization / get a temp (1-word) stack / tNDJ^ `&e  F^   F^De Dbww5Q$] ] f   EU P5tC   P]fPPQ7 &C5    5 C B A  `5C  5B  5B  eE]  "$ $5B $$ 5vB  5^B  ]5@FB  wL   w>] ]reat(argv[2], obuf)) < 0) { printf("Output file\n"); exit(1); } if (getw(tbuf) != 0407) { printf("Bad input format\n"); exit(1); } putw(0407, obuf); txtsiz = getw(tbuf); datsiz = getw(tbuf); bsssiz = getw(tbuf); symsiz = getw(tbuf); getw(tbuf); getw(tbuf); if (getw(tbuf) != 0) { printf("No relocation bits\n"); exit(1); } putw(txtsiz, obuf); putw(datsiz, obuf); putw(bsssiz, obuf); putw(symsiz, obuf); putw(0, obuf); putw(0, obuf); putw(1, obuf); datrel = -txtsiz; /* * Copy ouurn on segmentation / copy text to I space / clear bss in D space mov $stk+2,sp mov $65,SSR3 / 22-bit, map, K+U sep bit $20,SSR3 beq 1f mov $70.,_cputype 1: inc SSR0 mov $_etext,r0 mov $_edata,r1 add $_etext-8192.,r1 1: mov -(r1),-(sp) mtpi -(r0) cmp r1,$_edata bhi 1b 1: clr (r1)+ cmp r1,$_end blo 1b / use KI escape to set KD7 to IO seg / set KD6 to first available core mov $IO,-(sp) mtpi *$KDSA7 mov $_etext-8192.+63.,r2 ash $-6,r2 bic $!1777,r2 add KISA1,r2 mov r2,KDSA6 / set upB (    5@A  A B    A UAw] A w] AwAwAw  7 pA lAa ZAU^AfAW 8U] W 8E]fc     ` ]^-A A a h h   ] ]a  ! p ]]R B] @W !W e UETR5x@  5f@  UX@wp   ]]   7 @r@]r@]  t data first */ tbuf[1] = 0; seek(tbuf[0], 020+txtsiz, 0); seek(rbuf[0], 020+txtsiz, 0); seek(rbuf[0], txtsiz, 1); seek(rbuf[0], datsiz, 1); s = datsiz >> 1; while (s--) { word = getw(tbuf); rel = getw(rbuf); if (rel&01) word =- datrel; word =+ getrel(rel); putw(word, obuf); } /* * Now to the text. */ rbuf[1] = 0; tbuf[1] = 0; seek(rbuf[0], 020+txtsiz, 0); seek(rbuf[0], datsiz, 1); seek(tbuf[0], 020, 0); s = txtsiz >> 1; while(s--) { rel = getw(rbuf); word = getw(tbuf);  supervisor D registers mov $6,SISD0 mov $6,SISD1 / set up real sp / clear user block mov $_u+[usize*64.],sp mov $_u,r0 1: clr (r0)+ cmp r0,sp blo 1b / jsr pc,_isprof / set up previous mode and call main / on return, enter user mode at 0R mov $30000,PS jsr pc,_main mov $170000,-(sp) clr -(sp) rtt .globl trap, call .globl _trap / all traps and interrupts are / vectored thru this routine. trap: mov PS,saveps tst nofault bne 1f mov SSR0,ssr mov SSR1,ssr+2 mov SSR2,ssr+4 mov $1,SSR0 e  JW!^W! ^ 5?7 ?e  , ??? f]    ]]$ $$$]& N & N  N N S C B A  eW!]Շ w^ m>?0? ,? rf]5*?e        W!]]P    0&]d& dN & dN dC N eN e->>>> /tmp/btmab.out/dev/vt0listdoneqrunprinpromifgotoretufornextoctasaveif (rel&01) word =- txtrel; word =+ getrel(rel); putw(word, obuf); } /* * The symbol table. */ tbuf[1] = 0; seek(tbuf[0], 020+txtsiz, 0); seek(tbuf[0], txtsiz, 1); seek(tbuf[0], datsiz, 1); seek(tbuf[0], datsiz, 1); s = symsiz; while ((s =- 12) >= 0) { putw(getw(tbuf), obuf); putw(getw(tbuf), obuf); putw(getw(tbuf), obuf); putw(getw(tbuf), obuf); rel = getw(tbuf); putw(rel, obuf); word = getw(tbuf); switch(rel&07) { case 2: word =+ txtrel; break; case 3: cajsr r0,call1; _trap / no return 1: mov $1,SSR0 mov nofault,(sp) rtt .text .globl _runrun, _swtch call1: mov saveps,-(sp) spl 0 br 1f call: mov PS,-(sp) 1: mov r1,-(sp) mfpd sp mov 4(sp),-(sp) bic $!37,(sp) bit $30000,PS beq 1f .if .fpp mov $20,_u+4 / FP maint mode .endif jsr pc,*(r0)+ 2: spl HIGH tstb _runrun beq 2f spl 0 jsr pc,_savfp jsr pc,_swtch br 2b 2: .if .fpp mov $_u+4,r1 bit $20,(r1) bne 2f mov (r1)+,r0 ldfps r0 movf (r1)+,fr0 movf (r1)+,fr1 movf fr1,fr4 movf (r1)dumpfielseeditcommdispdrawerasargexplogsincosatnrndexprintabssqrwww &w U@!H!P!X!`!h!p!x!`!@@!hI@!hAy1?ϑy"?D{Av#OP#C!+C|]2CU*j 4xBJh{CW*RsCL~Sz"@NnDOLX2xة3I䔶TX]1 D!L%dIgN5&GbqhDK-?> E=sMBԝ`=B.pF:|+eiD(/zC@;\)@3d5@3e1@rzlB#"3h@?ØGe@lB,k$aXUse 4: word =+ datrel; } putw(word, obuf); } fflush(obuf); close(obuf[0]); exit(0); } getrel(r) { switch (r&016) { case 02: /* ref to text */ return(txtrel); case 04: /* ref to data */ case 06: /* ref to bss */ return(datrel); case 0: return(0); default: printf("Bad relocation %o\n", r); return(0); } } +,fr1 movf fr1,fr5 movf (r1)+,fr1 movf (r1)+,fr2 movf (r1)+,fr3 ldfps r0 2: .endif tst (sp)+ mtpd sp br 2f 1: bis $30000,PS jsr pc,*(r0)+ cmp (sp)+,(sp)+ 2: mov (sp)+,r1 tst (sp)+ mov (sp)+,r0 rtt .globl _savfp _savfp: .if .fpp mov $_u+4,r1 bit $20,(r1) beq 1f stfps (r1)+ movf fr0,(r1)+ movf fr4,fr0 movf fr0,(r1)+ movf fr5,fr0 movf fr0,(r1)+ movf fr1,(r1)+ movf fr2,(r1)+ movf fr3,(r1)+ 1: .endif rts pc .globl _incupc _incupc: mov r2,-(sp) mov 6(sp),r2 / base of prof with base,leng,off,scale mov 4(sp),r0 / pc sub 4(r2),r0 / offset clc ror r0 mul 6(r2),r0 / scale ashc $-14.,r0 inc r1 bic $1,r1 cmp r1,2(r2) / length bhis 1f add (r2),r1 / base mov nofault,-(sp) mov $2f,nofault mfpd (r1) inc (sp) mtpd (r1) br 3f 2: clr 6(r2) 3: mov (sp)+,nofault 1: mov (sp)+,r2 rts pc .globl _display _display: dec dispdly bge 2f clr dispdly mov PS,-(sp) mov $HIPRI,PS mov CSW,r1 bit $1,r1 beq 1f bis $30000,PS dec r1 1: jsr pc,fuword mov r0,CSW mov (sp)+,PS cmp r0,(sp)+,r1 mov (sp),r0 br 1f _retu: spl 7 mov (sp)+,r1 mov (sp),KDSA6 mov $_u,r0 1: mov (r0)+,sp mov (r0)+,r5 spl 0 jmp (r1) .globl _spl0, _spl1, _spl4, _spl5, _spl6, _spl7 _spl0: spl 0 rts pc _spl1: spl 1 rts pc _spl4: spl 4 rts pc _spl5: spl 5 rts pc _spl6: spl 6 rts pc _spl7: spl HIGH rts pc .globl _copyseg _copyseg: mov PS,-(sp) mov 4(sp),SISA0 mov 6(sp),SISA1 mov $10000+HIPRI,PS mov r2,-(sp) clr r0 mov $8192.,r1 mov $32.,r2 1: mfpd (r0)+ mtpd (r1)+ sob r2,1b mov  _runrun beq 2f bic $340,PS jsr pc,_swtch br 2b 2: tst (sp)+ mtpi sp br 2f 1: bis $30000,PS jsr pc,*(r0)+ cmp (sp)+,(sp)+ 2: mov (sp)+,r1 tst (sp)+ mov (sp)+,r0 rtt .globl _savfp, _display _savfp: _display: rts pc .globl _incupc _incupc: mov r2,-(sp) mov 6(sp),r2 / base of prof with base,leng,off,scale mov 4(sp),r0 / pc sub 4(r2),r0 / offset clc ror r0 mul 6(r2),r0 / scale ashc $-14.,r0 inc r1 bic $1,r1 cmp r1,2(r2) / length bhis 1f add (r2),r1 / base mov nofault,-(sp) mov $$-1 bne 2f mov $120.,dispdly / 2 sec delay after CSW fault 2: rts pc / Character list get/put .globl _getc, _putc .globl _cfreelist _getc: mov 2(sp),r1 mov PS,-(sp) mov r2,-(sp) spl 5 mov 2(r1),r2 / first ptr beq 9f / empty movb (r2)+,r0 / character bic $!377,r0 mov r2,2(r1) dec (r1)+ / count bne 1f clr (r1)+ clr (r1)+ / last block br 2f 1: bit $7,r2 bne 3f mov -10(r2),(r1) / next block add $2,(r1) 2: dec r2 bic $7,r2 mov _cfreelist,(r2) mov r2,_cfreelist 3: mov (sp)+,r2 mo(sp)+,r2 mov (sp)+,PS rts pc .globl _clearseg _clearseg: mov PS,-(sp) mov 4(sp),SISA0 mov $10000+HIPRI,PS clr r0 mov $32.,r1 1: clr -(sp) mtpd (r0)+ sob r1,1b mov (sp)+,PS rts pc .globl _dpadd _dpadd: mov 2(sp),r0 add 4(sp),2(r0) adc (r0) rts pc .globl _dpcmp _dpcmp: mov 2(sp),r0 mov 4(sp),r1 sub 6(sp),r0 sub 8(sp),r1 sbc r0 bge 1f cmp r0,$-1 bne 2f cmp r1,$-512. bhi 3f 2: mov $-512.,r0 rts pc 1: bne 2f cmp r1,$512. blo 3f 2: mov $512.,r1 3: mov r1,r0 rts pc .globl _ldi2f,nofault mfpi (r1) inc (sp) mtpi (r1) br 3f 2: clr 6(r2) 3: mov (sp)+,nofault 1: mov (sp)+,r2 rts pc / Character list get/put .globl _getc, _putc .globl _cfreelist _getc: mov 2(sp),r1 mov PS,-(sp) mov r2,-(sp) bis $340,PS bic $100,PS / spl 5 mov 2(r1),r2 / first ptr beq 9f / empty movb (r2)+,r0 / character bic $!377,r0 mov r2,2(r1) dec (r1)+ / count bne 1f clr (r1)+ clr (r1)+ / last block br 2f 1: bit $7,r2 bne 3f mov -10(r2),(r1) / next block add $2,(r1) 2: dec r2 bic v (sp)+,PS rts pc 9: clr 4(r1) mov $-1,r0 mov (sp)+,r2 mov (sp)+,PS rts pc _putc: mov 2(sp),r0 mov 4(sp),r1 mov PS,-(sp) mov r2,-(sp) mov r3,-(sp) spl 5 mov 4(r1),r2 / last ptr bne 1f mov _cfreelist,r2 beq 9f mov (r2),_cfreelist clr (r2)+ mov r2,2(r1) / first ptr br 2f 1: bit $7,r2 bne 2f mov _cfreelist,r3 beq 9f mov (r3),_cfreelist mov r3,-10(r2) mov r3,r2 clr (r2)+ 2: movb r0,(r2)+ mov r2,4(r1) inc (r1) / count clr r0 mov (sp)+,r3 mov (sp)+,r2 mov (sp)+,PS rts pc 9: v _ldiv: clr r0 mov 2(sp),r1 div 4(sp),r0 rts pc .globl _lrem _lrem: clr r0 mov 2(sp),r1 div 4(sp),r0 mov r1,r0 rts pc .globl _lshift _lshift: mov 2(sp),r1 mov (r1)+,r0 mov (r1),r1 ashc 4(sp),r0 mov r1,r0 rts pc .globl csv csv: mov r5,r0 mov sp,r5 mov r4,-(sp) mov r3,-(sp) mov r2,-(sp) jsr pc,(r0) .globl cret cret: mov r5,r1 mov -(r1),r4 mov -(r1),r3 mov -(r1),r2 mov r5,sp mov (sp)+,r5 rts pc .globl _u _u = 140000 usize = 16. CSW = 177570 PS = 177776 SSR0 = 177572 SSR1 = 17$7,r2 mov _cfreelist,(r2) mov r2,_cfreelist 3: mov (sp)+,r2 mov (sp)+,PS rts pc 9: clr 4(r1) mov $-1,r0 mov (sp)+,r2 mov (sp)+,PS rts pc _putc: mov 2(sp),r0 mov 4(sp),r1 mov PS,-(sp) mov r2,-(sp) mov r3,-(sp) bis $340,PS bic $100,PS / spl 5 mov 4(r1),r2 / last ptr bne 1f mov _cfreelist,r2 beq 9f mov (r2),_cfreelist clr (r2)+ mov r2,2(r1) / first ptr br 2f 1: bit $7,r2 bne 2f mov _cfreelist,r3 beq 9f mov (r3),_cfreelist mov r3,-10(r2) mov r3,r2 clr (r2)+ 2: movb r0,(r2)+ mov pc,r0 mov (sp)+,r3 mov (sp)+,r2 mov (sp)+,PS rts pc .globl _backup .globl _regloc _backup: mov 2(sp),r0 movb ssr+2,r1 jsr pc,1f movb ssr+3,r1 jsr pc,1f movb _regloc+7,r1 asl r1 add r0,r1 mov ssr+4,(r1) clr r0 2: rts pc 1: mov r1,-(sp) asr (sp) asr (sp) asr (sp) bic $!7,r1 movb _regloc(r1),r1 asl r1 add r0,r1 sub (sp)+,(r1) rts pc .globl _fubyte, _subyte .globl _fuword, _suword .globl _fuibyte, _suibyte .globl _fuiword, _suiword _fuibyte: mov 2(sp),r1 bic $1,r1 jsr pc,giwor7574 SSR2 = 177576 SSR3 = 172516 KISA0 = 172340 KISA1 = 172342 KISA7 = 172356 KISD0 = 172300 KDSA0 = 172360 KDSA6 = 172374 KDSA7 = 172376 KDSD0 = 172320 MTC = 172522 SISA0 = 172240 SISA1 = 172242 SISD0 = 172200 SISD1 = 172202 IO = 177600 .data .globl _ka6 .globl _cputype _ka6: KDSA6 _cputype:45. stk: 0 .bss .globl nofault, ssr nofault:.=.+2 ssr: .=.+6 dispdly:.=.+2 saveps: .=.+2 .text / system profiler / /rtt = 6 /CCSB = 172542 /CCSR = 172540 /PS = 177776 / /.globl _sprof, _xprobuf, _probuf, _probsiz, _mov r2,4(r1) inc (r1) / count clr r0 mov (sp)+,r3 mov (sp)+,r2 mov (sp)+,PS rts pc 9: mov pc,r0 mov (sp)+,r3 mov (sp)+,r2 mov (sp)+,PS rts pc .globl _backup .globl _regloc _backup: mov 2(sp),ssr+2 mov r2,-(sp) jsr pc,backup mov r2,ssr+2 mov (sp)+,r2 movb jflg,r0 bne 2f mov 2(sp),r0 movb ssr+2,r1 jsr pc,1f movb ssr+3,r1 jsr pc,1f movb _regloc+7,r1 asl r1 add r0,r1 mov ssr+4,(r1) clr r0 2: rts pc 1: mov r1,-(sp) asr (sp) asr (sp) asr (sp) bic $!7,r1 movb _regloc(r1),r1 asd br 2f _fubyte: mov 2(sp),r1 bic $1,r1 jsr pc,gword 2: cmp r1,2(sp) beq 1f swab r0 1: bic $!377,r0 rts pc _suibyte: mov 2(sp),r1 bic $1,r1 jsr pc,giword mov r0,-(sp) cmp r1,4(sp) beq 1f movb 6(sp),1(sp) br 2f 1: movb 6(sp),(sp) 2: mov (sp)+,r0 jsr pc,piword clr r0 rts pc _subyte: mov 2(sp),r1 bic $1,r1 jsr pc,gword mov r0,-(sp) cmp r1,4(sp) beq 1f movb 6(sp),1(sp) br 2f 1: movb 6(sp),(sp) 2: mov (sp)+,r0 jsr pc,pword clr r0 rts pc _fuiword: mov 2(sp),r1 fuiword: jsmode /_probsiz = 7500.+2048. / /_isprof: / mov $_sprof,104 / interrupt / mov $340,106 / pri / mov $100.,CCSB / count set = 100 / mov $113,CCSR / count down, 10kHz, repeat / rts pc / /_sprof: / mov r0,-(sp) / mov PS,r0 / ash $-11.,r0 / bic $!14,r0 / add $1,_mode+2(r0) / adc _mode(r0) / cmp r0,$14 / user / beq done / mov 2(sp),r0 / pc / asr r0 / asr r0 / bic $140001,r0 / cmp r0,$_probsiz / blo 1f / inc _outside / br done /1: / inc _probuf(r0) / bne done / mov r1,-(sp) / mov $_xprobuf,r1 /2: / cmp (r1)+,r0 / l r1 add r0,r1 sub (sp)+,(r1) rts pc / hard part / simulate the ssr2 register missing on 11/40 backup: clr r2 / backup register ssr1 mov $1,bflg / clrs jflg mov ssr+4,r0 jsr pc,fetch mov r0,r1 ash $-11.,r0 bic $!36,r0 jmp *0f(r0) 0: t00; t01; t02; t03; t04; t05; t06; t07 t10; t11; t12; t13; t14; t15; t16; t17 t00: clrb bflg t10: mov r1,r0 swab r0 bic $!16,r0 jmp *0f(r0) 0: u0; u1; u2; u3; u4; u5; u6; u7 u6: / single op, m[tf]pi, sxt, illegal bit $400,r1 beq u5 / all but m[tf], r pc,giword rts pc _fuword: mov 2(sp),r1 fuword: jsr pc,gword rts pc giword: mov PS,-(sp) spl HIGH mov nofault,-(sp) mov $err,nofault mfpi (r1) mov (sp)+,r0 br 1f gword: mov PS,-(sp) spl HIGH mov nofault,-(sp) mov $err,nofault mfpd (r1) mov (sp)+,r0 br 1f _suiword: mov 2(sp),r1 mov 4(sp),r0 suiword: jsr pc,piword rts pc _suword: mov 2(sp),r1 mov 4(sp),r0 suword: jsr pc,pword rts pc piword: mov PS,-(sp) spl HIGH mov nofault,-(sp) mov $err,nofault mov r0,-(sp) mtpi (r1) bne 3f / inc (r1) / br 4f /3: / tst (r1)+ / bne 2b / sub $4,r1 / mov r0,(r1)+ / mov $1,(r1)+ /4: / mov (sp)+,r1 /done: / mov (sp)+,r0 / mov $113,CCSR / rtt / /.bss /_xprobuf: .=.+512. /_probuf:.=.+_probsiz /_mode: .=.+16. /_outside: .=.+2 sxt bit $200,r1 beq 1f / mfpi bit $100,r1 bne u5 / sxt / simulate mtpi with double (sp)+,dd bic $4000,r1 / turn instr into (sp)+ br t01 / simulate mfpi with double ss,-(sp) 1: ash $6,r1 bis $46,r1 / -(sp) br t01 u4: / jsr mov r1,r0 jsr pc,setreg / assume no fault bis $173000,r2 / -2 from sp rts pc t07: / EIS clrb bflg u0: / jmp, swab u5: / single op mov r1,r0 br setreg t01: / mov t02: / cmp t03: / bit t04: / bic t05: / bis t06: / add t16: / sub clrb bflg t11: / movb t12: / cmpb t1br 1f pword: mov PS,-(sp) spl HIGH mov nofault,-(sp) mov $err,nofault mov r0,-(sp) mtpd (r1) 1: mov (sp)+,nofault mov (sp)+,PS rts pc err: mov (sp)+,nofault mov (sp)+,PS tst (sp)+ mov $-1,r0 rts pc .globl _copyin, _copyout .globl _copyiin, _copyiout _copyiin: jsr pc,copsu 1: mfpi (r0)+ mov (sp)+,(r1)+ sob r2,1b br 2f _copyin: jsr pc,copsu 1: mfpd (r0)+ mov (sp)+,(r1)+ sob r2,1b br 2f _copyiout: jsr pc,copsu 1: mov (r0)+,-(sp) mtpi (r1)+ sob r2,1b br 2f _copyout: jsr pc,co3: / bitb t14: / bicb t15: / bisb mov r1,r0 ash $-6,r0 jsr pc,setreg swab r2 mov r1,r0 jsr pc,setreg / if delta(dest) is zero, / no need to fetch source bit $370,r2 beq 1f / if mode(source) is R, / no fault is possible bit $7000,r1 beq 1f / if reg(source) is reg(dest), / too bad. mov r2,-(sp) bic $174370,(sp) cmpb 1(sp),(sp)+ beq t17 / start source cycle / pick up value of reg mov r1,r0 ash $-6,r0 bic $!7,r0 movb _regloc(r0),r0 asl r0 add ssr+2,r0 mov (r0),r0 / if reg has been psu 1: mov (r0)+,-(sp) mtpd (r1)+ sob r2,1b 2: mov (sp)+,nofault mov (sp)+,r2 clr r0 rts pc copsu: mov (sp)+,r0 mov r2,-(sp) mov nofault,-(sp) mov r0,-(sp) mov 10(sp),r0 mov 12(sp),r1 mov 14(sp),r2 asr r2 mov $1f,nofault rts pc 1: mov (sp)+,nofault mov (sp)+,r2 mov $-1,r0 rts pc .globl _idle _idle: mov PS,-(sp) spl 0 wait mov (sp)+,PS rts pc .globl _savu, _retu, _aretu _savu: spl HIGH mov (sp)+,r1 mov (sp),r0 mov sp,(r0)+ mov r5,(r0)+ spl 0 jmp (r1) _aretu: spl 7 mov / machine language assist / for 11/40 / non-UNIX instructions mfpi = 6500^tst mtpi = 6600^tst wait = 1 rtt = 6 reset = 5 .globl trap, call .globl _trap trap: mov PS,-4(sp) tst nofault bne 1f mov SSR0,ssr mov SSR2,ssr+4 mov $1,SSR0 jsr r0,call1; _trap / no return 1: mov $1,SSR0 mov nofault,(sp) rtt .globl _runrun, _swtch call1: tst -(sp) bic $340,PS br 1f call: mov PS,-(sp) 1: mov r1,-(sp) mfpi sp mov 4(sp),-(sp) bic $!37,(sp) bit $30000,PS beq 1f jsr pc,*(r0)+ 2: bis $340,PS tstbincremented, / must decrement it before fetch bit $174000,r2 ble 2f dec r0 bit $10000,r2 beq 2f dec r0 2: / if mode is 6,7 fetch and add X(R) to R bit $4000,r1 beq 2f bit $2000,r1 beq 2f mov r0,-(sp) mov ssr+4,r0 add $2,r0 jsr pc,fetch add (sp)+,r0 2: / fetch operand / if mode is 3,5,7 fetch * jsr pc,fetch bit $1000,r1 beq 1f bit $6000,r1 bne fetch 1: rts pc t17: / illegal u1: / br u2: / br u3: / br u7: / illegal incb jflg rts pc setreg: mov r0,-(sp) bic $!7,r0 bis r0,r2 mov (sp)+,r0 ash $-3,r0 bic $!7,r0 movb 0f(r0),r0 tstb bflg beq 1f bit $2,r2 beq 2f bit $4,r2 beq 2f 1: cmp r0,$20 beq 2f cmp r0,$-20 beq 2f asl r0 2: bisb r0,r2 rts pc 0: .byte 0,0,10,20,-10,-20,0,0 fetch: bic $1,r0 mov nofault,-(sp) mov $1f,nofault mfpi (r0) mov (sp)+,r0 mov (sp)+,nofault rts pc 1: mov (sp)+,nofault clrb r2 / clear out dest on fault mov $-1,r0 rts pc .bss bflg: .=.+1 jflg: .=.+1 .text .globl _fubyte, _subyte .globl _fuibyte, _suibyte .globl _fuword, _suworksr6 = sysu mov $usize-1\<8|6,(r1)+ / initialize io segment / set up counts on supervisor segments mov $IO,(r0)+ mov $77406,(r1)+ / rw 4k / get a sp and start segmentation mov $_u+[usize*64.],sp inc SSR0 / clear bss mov $_edata,r0 1: clr (r0)+ cmp r0,$_end blo 1b / clear user block mov $_u,r0 1: clr (r0)+ cmp r0,$_u+[usize*64.] blo 1b / set up previous mode and call main / on return, enter user mode at 0R mov $30000,PS jsr pc,_main mov $170000,-(sp) clr -(sp) rtt .globl _ldiv _D  disk offset J7& tape offset 07 count  T      0 Wp `@ illegal digit Dr-l  P eP5Ћ 4R`ȋ  `e `R7 $ r t@P hfɋd .globl _fuiword, _suiword _fuibyte: _fubyte: mov 2(sp),r1 bic $1,r1 jsr pc,gword cmp r1,2(sp) beq 1f swab r0 1: bic $!377,r0 rts pc _suibyte: _subyte: mov 2(sp),r1 bic $1,r1 jsr pc,gword mov r0,-(sp) cmp r1,4(sp) beq 1f movb 6(sp),1(sp) br 2f 1: movb 6(sp),(sp) 2: mov (sp)+,r0 jsr pc,pword clr r0 rts pc _fuiword: _fuword: mov 2(sp),r1 fuword: jsr pc,gword rts pc gword: mov PS,-(sp) bis $340,PS mov nofault,-(sp) mov $err,nofault mfpi (r1) mov (sp)+,r0 br 1f _suiword: _suwldiv: clr r0 mov 2(sp),r1 div 4(sp),r0 rts pc .globl _lrem _lrem: clr r0 mov 2(sp),r1 div 4(sp),r0 mov r1,r0 rts pc .globl _lshift _lshift: mov 2(sp),r1 mov (r1)+,r0 mov (r1),r1 ashc 4(sp),r0 mov r1,r0 rts pc .globl csv csv: mov r5,r0 mov sp,r5 mov r4,-(sp) mov r3,-(sp) mov r2,-(sp) jsr pc,(r0) .globl cret cret: mov r5,r1 mov -(r1),r4 mov -(r1),r3 mov -(r1),r2 mov r5,sp mov (sp)+,r5 rts pc .globl _u _u = 140000 usize = 16. PS = 177776 SSR0 = 177572 SSR2 = 177576 KISA0 = 172]l`< wwp7ZZU7T(U7N*7HY7BX7<p\* |z7#^ EfF E50 UaE x U0 %  2pv Er bڝԝI 2 ĝZURE@LBE   5 e E&a"aord: mov 2(sp),r1 mov 4(sp),r0 suword: jsr pc,pword rts pc pword: mov PS,-(sp) bis $340,PS mov nofault,-(sp) mov $err,nofault mov r0,-(sp) mtpi (r1) 1: mov (sp)+,nofault mov (sp)+,PS rts pc err: mov (sp)+,nofault mov (sp)+,PS tst (sp)+ mov $-1,r0 rts pc .globl _copyin, _copyout _copyin: jsr pc,copsu 1: mfpi (r0)+ mov (sp)+,(r1)+ sob r2,1b br 2f _copyout: jsr pc,copsu 1: mov (r0)+,-(sp) mtpi (r1)+ sob r2,1b 2: mov (sp)+,nofault mov (sp)+,r2 clr r0 rts pc copsu: mov (sp)+,340 KISA6 = 172354 KISD0 = 172300 MTC = 172522 UISA0 = 177640 UISA1 = 177642 UISD0 = 177600 UISD1 = 177602 IO = 7600 .data .globl _ka6, _cputype _ka6: KISA6 _cputype:40. .bss .globl nofault, ssr, badtrap nofault:.=.+2 ssr: .=.+6 badtrap:.=.+2 1 UE@B ``  5 ``   H䜂ٜԜ ͜ }] ` f EA` `  NtExTTTTTTLXXXXXT7X@ExP@P555@EWtU& @ U7 @D7@t z@ r525/E*@tE` mʛ5 5 5 5&e \e V55 %&EPtEr0 mov r2,-(sp) mov nofault,-(sp) mov r0,-(sp) mov 10(sp),r0 mov 12(sp),r1 mov 14(sp),r2 asr r2 mov $1f,nofault rts pc 1: mov (sp)+,nofault mov (sp)+,r2 mov $-1,r0 rts pc .globl _idle _idle: mov PS,-(sp) bic $340,PS wait mov (sp)+,PS rts pc .globl _savu, _retu, _aretu _savu: bis $340,PS mov (sp)+,r1 mov (sp),r0 mov sp,(r0)+ mov r5,(r0)+ bic $340,PS jmp (r1) _aretu: bis $340,PS mov (sp)+,r1 mov (sp),r0 br 1f _retu: bis $340,PS mov (sp)+,r1 mov (sp),KISA6 mov $_u,r0 1: mX & 6  2w  %  "@& P  ww uuNn& T @ 5 @@% @@w` Au #?@AuAWpeZuNf ew <5 5 @@m5t= AWpUAmAm@ȝ % % ww 5 5 AWpUAmAm@H %T %ww 5 AWpUAm1TSAWpUAmAm@ȭ  AWpUAmAm AWpUd5 5   ЇE660H ("E Bv EE (&v  6  jUdI  BU<& &~  P ~ & ~X J&  *4.EUPEIUUvEzIErU jEdU\E@VUNE HU@:0, ov (r0)+,sp mov (r0)+,r5 bic $340,PS jmp (r1) .globl _spl0, _spl1, _spl4, _spl5, _spl6, _spl7 _spl0: bic $340,PS rts pc _spl1: bis $40,PS bic $300,PS rts pc _spl4: _spl5: bis $340,PS bic $100,PS rts pc _spl6: bis $340,PS bic $40,PS rts pc _spl7: bis $340,PS rts pc .globl _copyseg _copyseg: mov PS,-(sp) mov UISA0,-(sp) mov UISA1,-(sp) mov $30340,PS mov 10(sp),UISA0 mov 12(sp),UISA1 mov UISD0,-(sp) mov UISD1,-(sp) mov $6,UISD0 mov $6,UISD1 mov r2,-(sp) clr r0 mov $8192.,r1 NNm  %w:w (~wDe   % w 7 7 ׯ-  (w7  .weB J ӕ- R r f e0 @ >n ҋ D~8" Lӕ0 $f v Le0 9e   7we&  m  ~    ~ w7   0   Wp `e0eӕ?fp ,fP \ V @   P ~xr|0pLF  & C~6RmH   W W @57`PP4R`0  ȋ `5 a~tEķ Xc  h  0 L&  6r 6r@@A6v@@& ADCBFw 7 ^Ve B   ^*d /% %FU %> Wt pmov $32.,r2 1: mfpi (r0)+ mtpi (r1)+ sob r2,1b mov (sp)+,r2 mov (sp)+,UISD1 mov (sp)+,UISD0 mov (sp)+,UISA1 mov (sp)+,UISA0 mov (sp)+,PS rts pc .globl _clearseg _clearseg: mov PS,-(sp) mov UISA0,-(sp) mov $30340,PS mov 6(sp),UISA0 mov UISD0,-(sp) mov $6,UISD0 clr r0 mov $32.,r1 1: clr -(sp) mtpi (r0)+ sob r1,1b mov (sp)+,UISD0 mov (sp)+,UISA0 mov (sp)+,PS rts pc .globl _dpadd _dpadd: mov 2(sp),r0 add 4(sp),2(r0) adc (r0) rts pc .globl _dpcmp _dpcmp: mov 2(sp),r0 mov 4(sp),rf : <7 ( &<-f@@& HADCBF,!&)& !?!!>!>!!>! !>!!!!>? > ?? > ! '!!!?!!!!!"<$"! ?!3-!!!!1)%#!!!!!>!!> !!%">!!>"! !!!!!!!!!! !!!-3!! ! ??  ???, -24   "  X missing argument 0 ed^WpWtN^ " ^ "^ "^ "_ "(^ 2 7^Uf]] %`]] %4_ (T]]]]nfM] `F @ U n 7\\U n 7RL X   & & e& ^ % wLw <%(NT%`#ж %(T%#5 ww %(S_T N d %_T N d &f  e%_T 1 sub 6(sp),r0 sub 8(sp),r1 sbc r0 bge 1f cmp r0,$-1 bne 2f cmp r1,$-512. bhi 3f 2: mov $-512.,r0 rts pc 1: bne 2f cmp r1,$512. blo 3f 2: mov $512.,r1 3: mov r1,r0 rts pc .globl dump dump: bit $1,SSR0 bne dump / save regs r0,r1,r2,r3,r4,r5,r6,KIA6 / starting at abs location 4 mov r0,4 mov $6,r0 mov r1,(r0)+ mov r2,(r0)+ mov r3,(r0)+ mov r4,(r0)+ mov r5,(r0)+ mov sp,(r0)+ mov KISA6,(r0)+ / dump all of core (ie to first mt error) / onto mag tape. (9 track or 7 track 'binary')  %s doxf&ecsl4r<N d &f ` &f T ee%_T @@m@me-2\_T  j% e  @teU %z  % e  @teUDm%z   %  Dm% #  @tU"e# jz%z%  ݴww @etww RRt ]%R E  H>_ (& !% zG7jZRbZ4447mov $MTC,r0 mov $60004,(r0)+ clr 2(r0) 1: mov $-512.,(r0) inc -(r0) 2: tstb (r0) bge 2b tst (r0)+ bge 1b reset / end of file and loop mov $60007,-(r0) br . .globl start, _end, _edata, _main start: bit $1,SSR0 bne start / loop if restart reset / initialize systems segments mov $KISA0,r0 mov $KISD0,r1 mov $200,r4 clr r2 mov $6,r3 1: mov r2,(r0)+ mov $77406,(r1)+ / 4k rw add r4,r2 sob r3,1b / initialize user segment mov $_end+63.,r2 ash $-6,r2 bic $!1777,r2 mov r2,(r0)+ / / l45.o needs to be in data space / to get l45.o; as data.s l.s .data Y7Yww t N ^e   I  `5?Nf %  !Nf E de !% zG2e hNf H  Iw2 ND_ J a w N ^&e  Nf& % ; 4 %d#Nf H d&e !%4  F4e h apww DCe - NM_ J w w N ^&e  *  a5Nf n  e e wD   5 5 KNef E 5 @ ` %5 @tp-Ll@tp-Nl %d ap%de% zG%d 5#4e h NW_ J _w LN ^%d  apw$w @f L-%d%d Ne_ J 4 4  e%^fڂo_ (ww VQ V@f *# nfʥ  X NH >8J j  ^w,w 5 7 I Inf̋ 5-I e%jD_ (̕I  4%@ J HD7,C*d Z/ 5˕t H & & 2!%˕ܢ wt N f  w 5tu- NmfN*d /%? HN*d Z/  HNE%  r2d e%jۂ2:7,:`f h@E%@e 7”  Dؓ ww  Be 4 e e   !tt_ww C % w 9 w pD̵Ee he h E& P- w2w "DEa74 yfWp ]% wft ]w DEa73 y-JfWp ]f & 2!% 5  Nm  u-f*d /% j w6w &@55ˡS@5/5LN C5 @ @m@ @m0  %@0 .G@U@t55@ @mBN 0 wh@ @mN  .G@ @m7 G%@ @m7F@ @m0f E %4@tEe5 `N 5 zG@ `AH .G  zGt ]%-J)wpw `DC% ^%!̵  %@5I 7 ґt7 Ǒt0 ww  z2 60   7     ww nw] w   ?$w؄ %1w f   04 4 wLPze%p}a "ߐw CK-smK ewe  w BD e D-m tm@m-*4c &e4 H 4UU& !% Fe%^f΂Jl̵ e&   v4e %x7 V 4Lww  &   Jl5-(5-$̵̵@f2!e%^fv_ (}_ "M w e %xɂtt̕fe L f E 5 zG fe X tl5eSee  zGw D  4 & & e&   v4 4  v4wf E 5D@E5 `N 5@ `N .G .G zG7 F%@ `7Fw ğğ Ÿ Ÿ w@ \ j w ~ğp n n f ^EwHJ Bj5w n)wpw `whw XDCB~wPw @D 5etd Z/ _ ( n# f& Ke _ (  f*d /%4D7Dbf hww `$0  n#4@m- tLm  LewLw < %/h5& n  %/     _<2 _:2E%@@& . H  k %VҐ %/%V %/97 @7 :(5 & L 75 $ N zG% & . 7 @e7֎5Ȏ N zG L & L & E 5X@&|E` !%ej b v Vw BʵL ^Ee5f L  E 5f X tA@lee ʵJSHSeʵTeTN Fww D5 pe5[ U5HN& E e5 1e@-%& E 5e5  N& @p- zG& ,ȃ zGN& = e@-E4 4 ww Ȭ  w@U4l g  w @7lZ54 et&d /%  wTw D _j# j e %Jl t-ҝ0a_ (4 t:e?tEetd Z/ _ (e  & & e^\7 RN D e& Ke3C    H H  2!% L ww D  &*d /%ww @E%U@e 7R@  x`9@` " NeJ`HZH` %V N zG% & . _0wB5 f n _0_0w E ww ԍ Ѝ B%jww + # X(Z JLH@ʕ2˕3̕w3@ 0  w bD% 4 3 5Ee h v4 Ue   N4, 7 Ȍ7Č  v4ww D N4  v47  v4 o l % w% UHԔ%V>.X0V N w`w PCe 1 @ %%B %d%l%o %o   %s eww Nf L N&  Nf X e0 ww D x 5t t tv%     twZw Jwe N_ " w (@@&f_ "eww D _ J Nf&_ "eww B _E% Wp ] _B f 5 " NT` " b` ( & %   | wNNe %  7ϛENe Ete`%`)N e E?%?Ete` "e  1  N  1e "ěP %d_$U5 _$ _$ % _0$_$C l  $( _$ _$w  H 7ww dww ww nft-N& % e%jww % v4e  7 6 2* 2 7  v45Ee hw $D&  ̵w w D̵ hww  z2 60  _7e  %0 0 H5@ . _75`_7@5 5 $ %_7eN B%_7 %_7 t 55 ʊƊ7 Ɗ7  7_75 %"Om7 e?tE5me?tE5Nff 5LE5<N 2 E%`# &E beH 2 N L 59@ 7O @- Of& 4F%N& E 5rff LeN zGk nww BE% Wp ] _ 0_B f E5 N 2 5E%`  L X%& H& E 5 fff LeN zG 5N dGN .Grl &E be D t̥d̕d̥ wfw VĜ   Ĝ  w: 5w  h˕ H  % nf, e%j jww 2 57u%% 0 <e $(*&e  &  0E xh`7  eștQ7p w"w 7Ϙ`f2 60  I C . 55`1- 7 7 xtd `e & &&  e _77    ."De$ % ˵ _7% |%tۉ_7؉a  % & f& e7 :e70 w(w$ w  e@@ A @e5 pNf  @ ef  & \ ҋ@ fe  5 ʈ ˆ 5 5 e% ` mh %`\0  %6 N zG%-e h -w5 F B + .wjw Zu-@wV@w @u-@w<@w &C@Dmҧ*Q]Ч5# & & %jw`B T      j w F %   t̕t j@M7:M`f h   ^w< `t̕t ( Pw Cnf2  e~ww D4 ̕L^IL 7Lbf hww DEted`%e7 Ft7>70  ! wdw N t@-@@ & L 톘e |v`nh e  w` @l6 &     ` w \Rnf̥ -җ >0- e%j!: TTp}  7 S   0S  ;$SS S e%%6   % "` m e URERR_)R_) F R_)w M; x :2e e  5# :e  &  e e 3ee3@E%  • f V  Ɣ 6:%<0:_h,5f<: : : -: :-::e h5947e hnfʋ e%j (2  _9 wdw Tnfˋ e%j   ? Ȇ7 7 7 7 7 7  1`ww @e?tE @4 d t   e` ` e ` T`܅&   N wd ` &      w  |;ww  |;ww C ,>̰ 8($7̵ % 3  37v7n%  ڄL&e T Ƅ8? wrw b z2 60    & <%wHw 8z2 60 pE  & <%ww CB%5 . 5 . E%@ie'   v4 "E E - % @ 0  wVw F ,փ 0  -w2w " ,D̵ǂ=T%Ht 5<t5%E "5    xa5mfe T ttwtt ] &  55@ h `EHEwNw >%5- U >I F L-5%6z ww Ds5_M5s_Mms _M teE5 t5 tEB-_Mm^stEAms@ s _M U@&  5@ U t E4 sWt @`E@`t4`tE4B f 4r E 4 4r&  &  5nr5@ h EH U@`--U   UU TR TV5 PRww J R(5Z5P| w q :7b*%5@P2UB<77 :7.7$ nIT 0: wpw `N n]f([ |LeA 7cw>w .N n] f([ |Le7 bww DB f  :  Jw(!!V c!!!!!!ZZ([c!XX c!!!!!!!!!NTTTUU!! E5` w h z2 60 A 6E%@ +~z2 60 с ǁ0-   ww  z2 60 o i   ww  &&fe T &&ff be  RwJ&&&|& be Nff&`& be wN&wJ&Ze w  ,*& ? ww  z2 60  & ?  ww ef  @7Lr Nj5rw|w lD57rrw\w LCe Nqr&  e&  e&  ww Rr 7Hre 7*\***core%7:\;l;<,=9:< >C4,DB>DD~:?P=bC@ABCB(%?%%nN&N%C>tC2EB%%@2EE%(CJCD%%%%%%%%%%%%%%% `--- `-..no file out of swap=====unlink -- igetblkdevdevtabA~*Jl 5-'~e %x& f@t ]% 3  zGw2w " z2 60 E%`}-F6} ww xt~ww #f~b~ #ww H~"B~7"e hww ğ(~7H} 78}8}07.}wrw b"}}}}wZw Jğ}7} 7|7|w8w (|}}|w w |? }ww Bww }%  (  |0ww z2 60 3 v4| n a (E%@ Zeb5 E B xhbʋ=ʊ;tE5%ʋt&e  % tE5% U@%  e &U  wԴ5@tE5%% w D Rww tB &5"e %bEP4 ER l,%ww D  O   e  j wܳw ̳D#  R@&e  %2   JQ |#`{}@~ABCDEFGHIJKLMNOPQRSTUVWXYZRRRRbRRR({)}!|^~'`BZZYtrap"start"dump"call" _klrint"ZU_klxint"(U_clock"*_tcintr"Y_rkintr"X_tmintr"p\_trap"#nofault$\ssr$^_runrun$c_swtch"_savfp"T_display"T_incupc"V_getc"_put F|X:|6|7 J|   wVw F z2 60 E%@{ @& . { 7{ v4ww E{E*|&|E4P ww   { {  ww {%% 3{ ?| {{!{0wPw @ 5 {znf    ,%fz7z J{& % e%j܂ zww  {  e{%ww zE7D{z@{z<{z E70{w  Rww pDC 33wV N w $k8Cteڞk sDuepeeH3 #@UCU@ww Dueڞ N4ww ~@teڞ hSwtw d@teڞ SwZw JDueڞ R % e hw(w BteڞU53& P ww DueڞN& T wԱw ıAB f rjE үc"_cfreeli$ c_backup"l_regloc#`_fubyte"B_subyte"\_fuibyte"B_suibyte"\_fuword"_suword"_fuiword"_suiword"_copyin"_copyout"_idle"6_savu"H_retu"j_aretu"^_u!_spl0"_spl1"_spl4"_spl5"_spl6"_spl7"_copyseg"_clearse"_dpadd"T_dpcmp"b_end$h_edata#c_main"_ldiv"L_lrem"X_lshift"fcsv"vcret"_ka6#]_cputype#]badtrap$d_bdevsw#]_nulldev"!_rkstrat"Vw Nf H 5wpU &@t ]  Iw >B N G N H 5 U &@t ] #N G N H 5 zG U @t ] N E w Iw DE & t ] 5 I zG5 NwTw DD t]%c% dGU zGww DU Fww D5@ h5@2E@26z h5 >z EH0 6zww D@t]tE mE@` B__ Vj j w>w .i7 i7aiB T wB f iE .i tE mE@` \ __ w ~ D5 J e5AWp-U nI4  \ 7  07  t ww D e5 5N X 5N L  r f r tUAWt @Pww 4 (  & ~ &_rktab$ c_nodev"!_tmopen"Z_tmclose"Z_tmstrat"([_tmtab$c_tcclose"X_tcstrat"X_tctab$ c_cdevsw#]_klopen"NT_klclose"T_klread"T_klwrite"U_klsgtty"U_mmread"U_mmwrite"DV_rkread"`X_rkwrite"X_tmread"]_tmwrite"D]_rootdev#^_swapdev#^_swplo#^_nswap#^_canonb$*c_coremap$*d_swapmap$d_rootdir$e_execnt$e_lbolt$e_time$e_tout$e_callout$e_mount$@f_mpid$^f_runin$`f_runout$bf_curpri$df_maxmem$ff_lks$hf_updlock$jf_rablock s-3! wz  w ^@-0a (6z v%6z2<U@16z  2 @t]a ( t-t-  5U@&  >IwԾ μ1 >I5U F0003t tw bD &  5 R NwDw 4D \00Uww D5  bKU5 zGE@ hww н@ ~wȽw 6z7v07p07j07d0 WpDex Wpe & RJeww p ( 7 & n%5 U7 7  nI zw"w fV |Leww  fV |Leww ԮN 4L@E0wȮw D5 J%B EU nI4  * 7$  07   hw`w P 7 ˕U nI ' EE @ ˕   tUC5U ww ح| 565 & n%5 E7I EA U76 76 $lf_proc$nf_text$j_inode$Jl_icode#^_mfree"/_printf""_min"2_panic"(_cinit""O_binit"I_iinit"z _iget"n_newproc"V_expand"_estabur" _sched"_sureg"6 _nseg"d _nblkdev$x_nchrdev$x_buf$x_bfreeli$6z_bread"E_getblk"H_bcopy"!_brelse"zG_alloc" _getfs"^_sleep"_badbloc" _wakeup"h_clrbuf"I_prdev"J_free" _bwrite"F_ialloc" _iput"_ifree"&_update"_iupdat"_prele"v4_bflush"4L_itrx}t6z802007*0 zG % ] @ e |.w0w DCL @ tEWt@PUA5UUww ּDC%F L EtUA5U8U0ww %F5 U@P  5PUP fBU  e%   e%0w w E 5@FP h7 8Pww  U@&  5@ U O@t 7OwO@t7O@tE7O! ,!5 E U˕Cwf  xbߕ nI - -؂"" Et5 @PUA e-w D2e 2 0 : Jw¬w D42 & Z & Z ww e  5R@t@]U`RwZw JD eJ - - U I nI!55 4  & 707  ww ҫ U7j nI`W 5 :@25RtEWt@Punc"_maknode"_wdir"_writei"_panicst$Nz_putchar"_printn"_deverro"n_readi"_bmap"L_breada"4F_iomove"L_bawrite"dG_bdwrite".G_max"_cpass" _passc"j _file$Pz_issig"&_setrun"_setpri"_malloc"Z/_xswap"2!_swap"K_xccdec"n#_xfree"!_xalloc"."_sysent#`_psignal"%_psig"&_trap1"%_grow"$(_nosys"%_nullsys"%_ipc$p}_signal"%_stop"V&_procxmt")_exit" 8_core"`'_schar"f2_namei"60_access"._ptrace"(_rexit"7_fork":_read"\;_write"l;_open"<_close",=_wait"9_creat":<_link" >_unlink"C_exec"4_chdir",D_gtime"B_mknod">_chmod"D_chown"D_sbreak"~:_stat"?_seek"P=_getpid"bC_smount"@_sumount"A_setuid"B_getuid"C_stime"B_fstat"?_stty"nN_gtty"&N_nice"C_sslep">_sync"tC_kill"2E_getswit"B_dup"@_pipe"2_times"E_profil"E_setgid"(C_getgid"JC_ssig"D_timeout"l,_getf5 0D,D50D,D BC00D `DD !7!4!100D `DD!&!#BC00D `DD !!!00D `DD!!  0D5 ,DZ5,DT5,DN5,DH5,DB50,D<50,D65 ,D0w f w ^w V w Nw w w zw r5 0D,D50D,D BC00D `DD !7!4!100D `DD!&!#BC00D `DD !!!w j'-,00 -0j07 /@ 5@2e2 A rd A rd5 @ AWpd/p@ W-5@ @ D @ $.5@ W-N/W->/ -+./7 (/wx&w f& */t5/E5Pff % . N x v+7 .N 3.-.w&w % @7,.5 @ A Am ,D  W-@@ w%w %5 t@t @aAt pDv tW-t@T.5 D.r<.  5",_closef"-_closei"P-_openi"-_owner"._uchar"z2_suser"._ufalloc"._falloc" /_readp"3_plock"N4_writep"3_rdwr"|;_open1"<_stat1"?_getmdev"PB_buffers$x}_swbuf$_httab$_iowait"I_incore"G_geterro"N_notavai">I_iodone"nI_mapfree"bK_devstar"RJ_rhstart"J_maplock$_mapallo"J_physio"|L_partab#b_maptab#a_cfree$_sgtty"N_wflusht"N_flushtt"bO_canon"O_ttyinpu"P_ttyoutp"JQ_ttstart"R_ttrstrt"R_ttread"hS_ttwrite"S_tty00D `DD!! D.E=?d x*8>5  w z@e7 f:w f5 w R@e 7 >:w > 0w 05) &w  !w  w w w "w w 0 w 0w #) $=w w w w w w w w w w w w w w ~ w vw nw > w 6w . w &w w  w w L5@c  @P<@ @`R &L5DtW-tW-t .  .,Nevfr\ %@w,%w %`V   } 5% = w$w $ 7 -5 fe& :%  j- w$@w $ 5 5 H P- R-Ne18N    5-  @ 5D@ A* @   ,@  ,A&A x8MA x8w#w #)OA x8 ,TA x8N  w#w #@t5@E5 H, N NAlabama|Ala|AL:Montgomery:AL Alaska|AK:Juneau:AK Arizona|Ariz|AZ:Phoenix:AZ Arkansas|Ark|AR:Little Rock:AR Cal[if[ornia|]|]|CA:Sacramento:CA Col[o[rado|]|]|CO:Denver:CO Conn[ecticut|]|CT:Hartford:CT Del[aware|]|DE:Dover:DE Fl[orid|]a|FL:Tallahassee:FL Georgia|Ga:Atlanta:GA Hawaii|HI:Honolulu:HI Idaho|Ida|IO:Boise:IO Ill[inois|]|IL:Springfield:IL Ind[iana|]|IN:Indianapolis:IN Iowa|Ia:Des Moines:IA Kans[as|]|Kan|KS:Topeka:KS Kentucky|Ky:Frankfort:KY Louisiana|La:Baton Rouge:LA Maine|Me:Augusta:ME Maryland|Md:CcDc  (<D R  @<D R w ,3 "( w03w 35 -;@w3;5W-W-e -*< -$< @`Wp u`-< -; @`t5`-; ; -; ; w V2 5 57-; -;-;e57-; -;-~;eW-(-R7-P;-D;-L; -6;->;e(-7- ;-;-"; - ;-;e(@w1w ~16:, _ &,N x N 3 55+ , x@@ D / N F+ x + /- N F ( q )  e p  +  Z+$ #o - o - o p  wP"w >" @ 5@YA5 w&"w "@t5A ru%q  k @5@aA5  *Ne18N w!w !A rNea 8@t w~!w Annapolis:MD Mass[achusetts|]|MA:Boston:MA Mich[igan|]|MI:Lansing:MI Minn[esota|]|MN:Saint Paul|St Paul:MN Miss[issippi|]|MS:Jackson:MS Missouri|Mo:Jefferson City:MO Mont[ana|]|MT:Helena:MT Nebraska|Neb|NB:Lincoln:NB Nevada|Nev|NV:Carson City:NV New Hampshire|NH:Concord:NH New Jersey|NJ:Trenton:NJ New Mexico|NM:Santa Fe:NM New York|NY:Albany:NY N[orth|] Carolina|NC:Raleigh:NC N[orth|] Dakota|ND:Bismarck:ND Ohio|O|OH:Columbus:OH Oklahoma|Okla|OK:Oklahoma City:OK Oregon|Ore|OR:Salem:OR Pennsylvania|Pa:Harrisb5@ ,DN '  wV1:u 5 w-9eNe 3N '5 * w9@ w 0 ,( w099.6,6 D 7@9D3D2 D6 x 8 R   3 DD709 e5^ P[e9 `Ue2 9 pOeq9D78 Ev5= ;Ej57 f5E\5    8F97 F978   8$97 978 t8|8 7l8 `8 j87V8P874747F8788 DDl!@   xA * r  7 *fe 2;%w2! )w !NffA x8%w!w ! )1 )0-D&  6& r e0 "& r Ne0 .  N  h) w -`) w ~  0)  .)  ),NZ   w@ w .  ( 7( N 5 ( 7(@7 ( w5 (u- N  r( v( uN  w-$tA x8 8(<(  urg:PA Rhode Island|RI:Providence:RI S[outh|] Carolina|SC:Columbia:SC S[outh|] Dakota|SD:Pierre:SD Tenn[essee|]|TN:Nashville:TN Texas|Tex|TX:Austin:TX Utah|UT:Salt Lake City:UT Vermont|Vt:Montpelier:VT Virginia|Va:Richmond:VA Wash[ington|]|WA:Olympia:WA W[est|] Virginia|WVa|WV:Charleston:WV Wisconsin|Wis|WI:Madison:WI Wyo[ming|]|WY:Cheyenne:WY sD x   2 > 487 8487 84D3 DDw / 7 w/ 77 :%5  ufe7 :%N B 5wv7w .N  d7N x N 3  27* *7$7 :%fe7 :%N B 5@- @E76 6 w6. 7 6w . uu@w.w - -66665 H7 6 5e-6 @7~67|66w-u r6 7d6+eN x  5 N h65u-70( w(w T (  wL'uu ' A >e 'N 3N x ' T$ F F$   '4$  *$ F }e v' 8 ew-V'wN'u* J'N 3N x N <5 &'  w'w'_ew-&w&_w &u &  N@e-&0 . , )e &N x N 3N 5 z&  6 wZ& wew-H&w@&w x 25    !$'*-"%(  , uu ew-5 -5@5 5 75w5w5@w ,-5J2N w, 5555 5f @# H$ n5%eN x 2  N h655 5 u-ew-,5 05w 5W-H j 5 @w @, -514w:,4555 >@ e57 404e@-)AWt AD A@ rdtCE D @ rdP=e}eew-R4u-wB4J4 B4Nf @# 7 &  &&@ 5D * " ,  R %  %   %A x8 % @ 5D@@5Ne ;NAA r<& @ uA 7r!%-!-!W--!W-<-,%W-<-!_ !_w N 7% P5 55w-$e@e5"w$N w A x8w$w #  $,  @ $ 0 Lz$,  p$  ,7 P$ ( t`VN$A ! A ! A ; & 6 % w D;C5@$ D! D-D      &  *%5@@'-0D# *D  &D "D      &  *% Du!ueN x ?  }e}ee w-BwBwB:w 0:@ p=0D NNmf R w:w :@ Dw:@ D @B?BeB@t@]?Be~B@ D w 9bB5>$ bC! ^C-ZC< F = F  w$4u&4'eN x 0  N &75Hu-u u-ew-3 3w3@_. Cw  w w "w w 0 w 0w w w w w tw bw P w >w , p50DAe N Jefp50DAe 2q50DAe D &    %eq%DTw ) @ x8 0E<2M8222e!  ZA !  $ 7#A !  -  #A !  A !  A ! % # 1`D#A 2 #A 2 5z# NA x8 A !  _A ! A ! :#,_5 ,#  N # _ 05 "@w07 " 5A x8_w  &5 5" w@t@]w "5 a h r"5 1 8eX"8@t@me5ww v0"> F & < %5>'-C# C  B B: F ; F < F & < % +u!ueN 3:> F }e}ee <2w-fAw^Aw8w 8@ p=0D NNmf  w8w p8@ Dwj8"AA AD @@?Ae@@t@]?@e@@ D  0D5 ,DZ5,DT5,DN5,DH5,DB50,D<50,D65 ,D0w f w ^w V w Nw w w zw r,2$2e2 @ : 71 D1 :%5 @ D@ D@ D@ D@ D@ D@ D@ D@ D@ E@ A AD p E@ @@ C r @Bt @tPp0D@  w:(w ((A r NA r  rfA r<&f@ x8ew'w '@-  6- F w' w ' zz0 1`D p0 , f0 7X0w'w ' L0 7>0 ,w|'@ 5 @ @- wXw"w : v%A x8 ! !  \w-!   !BBB x8 n@ww  7 ! !  57!ww  T! 7 h!Ne :   *:N ^: *: ^ *:N ^:N *: :B5B+B r:e SBNB@B r:e w, C 4 EC`fC K"e  "@@ b(C C @@ b(Ce 050#050$0000w&0$   &f2 2@22w  ZB @: dB x8_j%D& 2;%D& 2;%@& 2;%D& 2;%zM 5fe& 2;%$D& 2;%(D& 2;%*D& 2;%@& 2;%@& 2;%@& 2;%@& 2;%@& 2;%D& 2;%@ M& 2;% *:ww   xB : B x8_&D& :%D& :%@& :%D& :%fe& :%@ eM7.  3 DD7  _ 0\ V2 PqD7 ~EV > p;EH 7 F E: x >  7 7| :  zr7 h7^ ReZ 7J > H74.7 7 7$7 DDsD x5(5.505B5T5`5  7 < 7 <n D3 DDw  -5  7  5e- @7r7pzwu f 7X+eN 3 5 N arzjbt  HL> R , ^  H  D 5 D   \ H    :e&  ee-- &  7 w w 5 5 |vn ml <fm^!6$ " 8 H -P#N 57  Zf N Z %    & P e - ,  ̋ `& ԥ -` | H w$D& :%(D& :%*D& :%@& :%@& :%@& :%@& :%@& :%D& :%@ M& :% *:ww r55 : j V @e-J(@wNe 3 N= ue Ne x \= w-f @# w  55 55`@ 5@@ ww  55 55`@ 5@@ ww  @ 5DPu L ` .w-23e\5u-  , uu ew-  - @5  7 w w @w - > N &7w  55  f @#  $ b %eN 3 F N \55 5 u-ew-  $ w W-  ^ 5 @w 4 -  w. 555 =uew- 0 e2@-)AWt AD A@ rdtCE D @ rdP=e}eew-H u-w8 @  8 N w r5 B) 5 | 4ef N @ 0Z   e B-BZ P e5 % Zˋ Z   @ A pZX u-   BB X% eV &eX  `& ӥ  X    eZ%Z͆e  3 B H e-   ^  H B-`  H w w  CeD w%  w ` " &@Ee55 @t5N $.&@ &D  %wA A@ r<ww w  f )%f )% f )% f )%f )% f )%f )%f )% & f )%wjw X@ p=0D  AAm 1`CwBw 0$555555555 B ! B ! 5 VB ! B ! @Nefefefe +e<5 4 *f @# w u 'eN 3 F N 5 u-u u-ew-  w @_:7w ~wHDe>  8 % w7 $7 $ׯ-  (w7  .weBB J ӕ- R r f e0 @ > ҋ D~8BB ӕ0 $f v Le0 9ePJ B< 7,we&  m  ~    ~ w7  8   `ww -d@ mXȥ- @ mF w@ m.$A rea?C reaw . ` 8   0 w w  N   ww - |  r -dh ww D C ̢̥  w@w tC@ @m wf˥ < ˭      0  0 ˥  @   0 @ @m˥   w %9% xNefefefe +eW-- Nefefe ,% 5  + 5   w55   "55 55je@t 5D fN x N 3H5Nfff.&f V-e /Nffff& V-e  Ff -   u  ue  X t w-w   B x8_l* @_l*@_l*w  X5 P q= N fff  0   Wp `e0eӕ?f@w@ fwwBw f@)w fwl@e7dBwfw fwBw>Bww *wBJ wf@w wBwf@wwBw` fwBf@wwCw*f@@& HADCBF7FF 0 ww  f  %ww b~WpBe  % wxw f\WpDeE@7" y~  b  w  Ne A a1 . Ne A a1ww  D5 AWp `eu  =@ww % % wz w dw Z wV AupNNmf | wJw 8 . @@5 _  fA rBpEu@@`55DCN& f& %5 +eHW-kW-p   W-n4ׯp A r}      @e=ׯ/  N ff ,%wW-bW-r lw  `5 X q= W-kNff ,% ,(W-r= W-nW-bW-0 W-9@e= ww A ru@t5 @5W- @55 Nf - Nf - Nf - Nf -      X00:122.< j H| d,, @< Chess /usr/lib/book%s: %d:%d%d 00 kqrbnp PNBRQK a b c d e f g h q q q q k k k k r n b b n r %d. ... ppnbrqkrnbtime = %d/%d forced mate Resign Illegal move saveremoveexitmanualresignfirstrestoreclockwhiteblackscorehint %d repeateh? Draw by repetition White wins Black wins Stale mate /bin/ 2`D--`f $`f&  %`Df z %5 D-& C-D-6@e5@eu-@@AA@ Nf` | u_ Nf | @`5_ f  %Cww   DCԒ ww  DCB5ҒS w~f@w| fww w\f@)wHfw&JA 7  fAW,f B@ 8 @&61wr w \  wX N $.@-w 6 @ w4 @D.E?d xd./j/H/&/.d.5  w z@ 7 :w f5 w R@7 w > 0w 05) &w !w  w w w "w w 0 w 0w #) w w w w w w w w w w w w w w ~ w vw nw > w 6w . w &w w  w w L5mailmailchess/usr/bin/mailmailchesschess.outcannot create file chess.outcannot open file o-o-ooooo-oooambiguous 8dD9o>9x9f9e9c*9s8l9r +fA   @ @e71@, 1wfwA2Q  OfA  ^ y   F y @0fA  @9 fA @e&7hwd7^@8w7 f>:wm4>w(wm"fw>ww fAW @w f17 5 e wD 5& w8& L& H& D& @& <&8&4&0&,&(&@c  (@@ @`R &L5CcDc D R  @D R w   w w@@ 5 @w w 5 -j@w -d -^ @`Wp u`-: -0 @`t5`-  -  w 5 5p- --e5J- --eW-(-:-j-^-F -P-8e(->-:-4-. #&),/$& &&&&& &&&f& fwwJwh fwPwN f@wwTw*f@@& HADCBF7F  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~ -&-e(@wZ w H ,5@ ,DN '  w u 5 w-eNe x N '5 > w@w  @@ 0 C@ -P@ @ A 1l@C@  .5  5  \(@5 @ 1A ACWpduN n5 A B r5@ 5C@ 5@A 5r5`@ w   D 7@`D3D2 D x3t44X4443x & 6  w  4~ %- w>^u @v7& y@-I  m?  ew& mH%e@ȥ-ȥ+ %    @ e@& N !WpBe  ` H,b %  ` AmH % -^   m 7 $ % $ e E7 r7t7 m7 Xzmo^~abdnrtz-Too many keys -/usr/tmp/stmXaa/tmp/stmXaaCannot locate temp Can't create temp Can't create output Can't open 0 1,2,3,4,5,6:7{(integers)}:integers|[natural|counting] numbers 1,2,3,5,8,13:21{(Fibonacci)}:Fibonacci{ seq{ence}| numbers} 1,2,4,8,16,32:64{(powers of 2)}:powers of 2|2[**|^]n 1,2,6,24,120,720:5040{(factorials)}:factorials|n! 1,3,5,7,9,11:13{(odd nos.)}:odd [integ|numb]ers 1,3,6,10,15,21:28{(triangular)}:triangular{ numbers}|C(n,2) 1,3,9,27,81:243{(powers of 3)}:powers of 3|3[**|^]n 1,4,9,16,25:36{(squares)}:squares|n[**|^]2 1,4,16,64:256{(powers of 4)}:powers of 4|4[**|^]n 1,5,25,125:625{(powers of 5)}:powe_w   ww   wf&UUDe .E ~' x$  7X ?f%7\e-B UL6 e?. 7<6U055 ` ć `7 U ef@e7Ew ~w De   % w7 7 ׯ - | z (wn 7 p  .wd eB J ӕ- R r f e0 @ >  ҋ D~8 ӕ0 $f & 6  0w @ w x7 B wtx7v7&j7 x %d7 r hh+ B 7\7Z+47& x + x +7&+ x %7+6&6 +6&6& x e6+6&6&6&+ x e 6 +|6&t6& l6& d6& r &+P6& x e_<+TN @ &_+8 &66&+ &5++5&_+5&_rs of 5|5[**|^]n 1,8,27,64,125:216{(cubes)}:cubes|n[**|^]3 2,3,5,7,11,13:17{(primes)}:prime[ number]s 2,4,6,8,10,12:14{(even nos.)}:even [integ|numb]ers|multiples of 2|2n 3,6,9,12,15:18{(3n)}:multiples of 3|3n  v Le0 9e    7 we&  mz  x  ~    ~ w7 L  B > 0   * Wp `e0eӕ?f  , P  @f  7     -  f@w fwJA 7 ^ fAW,f B@ 8 @&61fA   @ @e7H1@ 1wf@+5&5&+_+++5&5&+_+++x5&p5&+_`57_<+_+_B5:5& r +(5& 5& _5 5&5& x %4> r +4&4&_44&+4& 4& x e4 r +4&4&+v4& x e_<b4++_<+_<+_<+_<+z_<+p_<47b_< $_<4_+3&3&_+++9<?BE147:=w&w"wfwm wwmfw ww f@ww&wZ fAW @w f17 5 ew, 5& w& L& H& D& @& <& 8& 4& 0& ,& (& $& & & & & & & & & f& f BRff@@& HADCBF7F ]|}NN`+++_+++3&+_++++3 +_j3,^3&+_N3,B3&,_23,&3& ,_3, 3&,_2  ,2&,2& &,2& x e _<2 (,2&$,2& &",2&x2 0,f2&,,Z2& h &*,D2 8,22&4,&2& 4 &2,:,_@,_F,_L,_R,_X,_^,_d,_j,_Z & 6  w    %@  *@\  =% wB@  % =@%T   7% w  ww 5%w  \ w 5 N 5%w7 y@AA @@@] Zu]5  w@ %,7b y  w 7R y* #  Np]|}[\]{|}<[\]{|}...itrToo hard for me Too many facts about one thing I've forgotten some of it /usr/lib/quiz/indexNo info Right! What? Rights %d, wrongs %d, extra guesses %d, score %d%% Subjects: - For example, quiz asks you a and you answer the quiz works the other way around Type empty line to get correct answer. Bad info %s I don't know about that ~ d o x f e cp,_v,_|,_,1&  &,_,1&  &,_x1,_h1,_X1,L1&,_,81&,_,v_<1,_1,_0,0&0&0&,_",_,_0,_,_,_,0&0&,_,_,_,r0&j0&,_,_,_,F0&>0&,_,_,_,_0 ,_? _<B_4/?/?f \ %  N 5]%w    ~N 5}l%w N X wH @ &2&  % " w  AZ@w @U w w w w (7F  y5   N     w w x u5 u@ @m5'e# *@@%d#\ @ } } :  :=@ ȥ @  % e s l, r0  ?   _</ 7,~/,z/ 7 0 _<b/ _<R/H/ _<8/./ 7r_<w  N5N >5% % %z_ %a_ 7%a_z %z_z %i*%f'%h#%o  5%a%zw@_v %w%f%s%q%r%en%b%rV%d%e>%s%c&%b  w w 5 u-/5 %@ @m@ @m& 5%  @ @m H  u-  wR w :  2 5f ff e w w 7 7h H    4%   w w 5 d $ A 1 % w w Ne @EU7L*@-(H7  y%@5e e%f @ %  *%N  v @large|big:small on:off standing up:sitting down inside:outside high:low old:new|young hot:cold out:in heavy|dark:light daytime:night[time| time] stop|come:go top:bottom floor:ceiling near:far run:walk empty|hungry:full backwards:f[or|ront]wards big|large:little|small fat|thick:thin|skinny bright|light:dark|dull right:wrong|left give:take|receive|get buy:sell shiny|bright:dull dawn:dusk fall down|go to bed:[get|stand|rise] up asleep:awake up:down open[|ed|]:close[d|] smile:frown|cry happy|glad:sad hard:soft%a%o%b %d%i %a %u _8 %q%u  P %Fw w: @ 7 %0%9%A@ r eA! y .74 7  y _X =+ + %--< => !  7 %*_X  t%* j7p %/d _* f   @5%"?  _v w 7$ @-@w  @m N fe p  z * p @ %  -  5 @ &4. R%@ 6@ 4  % 2    @    5 0       @ & pwmn  0 5% %   , fee%-ZZ T   @ p w  uf& %  u-@|easy boy|woman|lady:girl|man fast:slow wet:dry covered|hid[den|]:uncovered|open good:bad always|sometimes|now:never|sometimes beautiful|pretty:ugly rough:smooth hairy:bald||smooth above:below yin:yang sweet:sour if:unless from|fro:to with[|in|]:without|against after:before together:apart plus:minus  @w  @ 5 * +-+++e-+ p 7~+x+  j+ mf+&  7\+ - w< w *  5j f Nf"- (%@e5%E> <- . e( e@ ?  e w @w w NT- ( %9%E  Ne N (wr w ` N 9 a- (/n 3j j f wB w 0 c- (N Ne- ( B 34 w w Nk- ( /   7  7  9( 3ww )ft- x %  u-@   =@@ww p TWp5 EwHWt 7rw~5  t-nn 7 h  Tw*w     %     Wpd  m r  ww   Y  f @ % ~  2   )  T 3  F 5  4 B  & W   b   d    w   2 5   @   u-258;>ADGHKNQTWZ]ILORUX[^ )x-fv-) x e)ww )f{- x %)-f~-z) x el)w`w N N " wV) wH) 7B) 8)&  7,)- )ww - ( rww @ eDww @ exww %/@-)deN f T @l- ( @-Ne  p  N N N Nf T <  N N N  --- eww 47 7 7 @e5E'  . (eee'' z% e5@5eE5@t _\ x. f  d  7Z/ ( J 7@:@-ew$NJ   N,/ ( @ *( 5@ *( 7&&7N @ 4' * e )5 e}/@7_ wT  x. r7/ f-@ z% e5%'e@t% & @fD/ (%%@e@-͆-' *( /) %* ^+ ) 0+& -' *( /) %* ^+ 0+& -' *( /) %* ^+ 0+& -' *( /) %* ^+ ]0+& -' *( /) %* ^+ `0+& -' *( /) %* ^+ c0\0+& -' *( /) %* ^+ 0+& -' *( /) %* ^+ 0+& -' *( /) %* ^+ 0+& -' *( /) %* ^+ 00 -                 { ( ~ ? _ 0( ; +& -' *( /) %* ^+     < > 20r0S0Y0+& -' *( /) %* ^+ ) +& -' *( /) %* ^+ ; ;" ! u0y0=  hDm{'8.@Z*-rrrlhhetalsisipiytotaniniciathinmlibililhfdiaaiorororararuararoarariararararoooooonentanananololieliiaiaitetrererevleDalce%edede$edduceeteaeaarzanzalzrdzelvnivievCuoninuuuquatuttatatortentatouslosisisasr$urigr#rtoror@E7_ o/ ( _4w z~w4Dev4  p4 % w\7 \47 \4ׯR4- J4 H4(w<47 >4 .w24e/B J ӕ- R r f e0 @ >3 ҋ D~8// 3ӕ0 $f v Le0 9e33 z3t3 7d3we&  mH3 F3 ~    ~ w7 3 3 30   2Wp `e0eӕ?f2 ,2P 2 3 4 5 6 7 :0O0- s     @ A ?  ( ~B ? _ - >     @ A ?  ] ( ~B ? _ 0+& -' *( /) %* ^+ ] +& -' *( /) %* ^+ W0+& -' *( /) %* ^+ X0+& -' *( /) %* ^+ ^0+& -' *( /) %* ^+ _0+& -' *( /) %* ^+ a0+& -' *( /) %* ^+ b0+& -' *( /) %* ^+ d0+& -' *( /) %* ^+ e0)0) +& -' *( /) %* ^+ 0+& -' *( /) %* ^+ ] +& -' *( /) %* ^+ ] [0&0 -     herrrrcopyntonhononen$nn%ainlininomomimllllillcklllllalfalaltablbllalalalikgagiagergmgkgdgifnifereeidididuenclunc&esncerncinc%ancerncarncancalncincusicticieclacrooeli$ieoontintrinrinpinninminlinlinlin%sinrinlinnlinkinlinlinlinlinlinyhineethnehingindinbinnoutortittiseispisrisnislisuislisbi 2 2 @f 2 F72 /F22-2x2f v#7p#h#7  7X# T# P#7.2 7 @#f@w& f@)wfw@e7/wfw73 fww/wf*wBJ fAW @w fH1H7 5 ezw|/ 5& wH&F3L&@3H&:3D&43@&.3<&(38&"34&30&3,&3(& 3$&3 &2&2&2             { ( ~ ? _ 00?0A0j0l0   :0) +& -' *( /) %* ^+ ) +& -' *( /) %* ^+ ,0+& -' *( /) %* ^+ -0+& -' *( /) %* ^+ .0+& -' *( /) %* ^+ /0+& -' *( /) %* ^+ 00+& -' *( /) %* ^+ 10@0B0} ;" ! % +& -' *( /) %* ^+ 0+& -' *( /) %* ^+ 00;" ! , v00000w05:=JKbcf<ENQVWZ]`abcdejknopsgisdissraporugurgicaairhifedsciorarooalracacuselelheltaltaalvukthtchadua#uaur%gaonaiaia%ririiiiaaea$eaciaiaaaaoiuoi#i#eivsisiisals$es$asoooaithithowowurpoooooo alaioaiolioio%sioionoioiooooiiiiiiteiaightomeoekeeee#aomaiaia$eaiaialeaea#eacrouhieearro#o&2&2 &2&2&2f& f@fA w,w"e"w"~ew"t@lw"lAlew_ &@t`e @& HADCBF7/F/300N+Q+T+W+Z+]+`+c+f+i+l+p+t+x+|+0@<<,~ 28>ZhpxXfpz<<<"(.4:PlBv &BRb~Z4<D`hp<<@kn{"%2ANSTUby/25NOPQ`otuv $1>?BO^mno   #0189:;<=   $iizovoevomut%useost%cerit%ise%ese%asetearert%meaeropaewn$seonrmelldleleknheaheeihethshhechdgrdoundldiducncBa&aca&eca&ica&ega$uuiouiouiou$iueoueoueubesesb%pibCeCeDshDchionsinsalslishtsisgesgsdesdsasearooironrinenieninrighrighligheighhifraf$dgoaoaoahaui$es%quii%osiinni(failailailili&<Xhr< ,,,,,,,,,,,,,,,,,,,,,,---- -%*+-/=^   X H V X ` & : j 90@ -                  { ( ~ ? _ 0;" ! % s0+& -' *( /) %* ^+ 00=, / 0 2 3 4 5 6 7 [- (1 V0 0(8 =: - >   < = @ A ?   N #M 9 C HT_&f'g(h)i*j+k,l-m.n1r8t:v;w?{@~ADEIJQ`axyz|}urouar$urenaionrirnlglalfalalbllk&gahleeckeodtudeedaa2 3 4 5 6 7  ( ~B ? _ f0=D - >   F G @ A ? 2 3 4 5 6 7  ( ~B ? _ g0=I - >   K L @ A ? 2 3 4 5 6 7  ( ~B ? _ h0 -                 { ( ~ ? _ 000q0R S - >     @ A ?  ( ~B ? _ U W X V Y [ \ Z ] Q0 _ U0Z0(` (a b m0n0o00*0+0)c ,d t0[e x0;0>0- s    r. ; E J?}@AzPQOo^]qd$!#4---------.. . ....".).1.6.<.B.G.L.R.X.^.d.j.n.s.{................... 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14ps.[]Ps:ls;:QQ0QkkKkiiIiooOofc s.s. S+-*/%%^=><!=!>!< 0!=+- 0  @ A ?  )p ( ~B ? _ 0!0"0#0$0%0- >     @ A ?  )u ( ~B ? _ +& -' *( /) %* ^+ 0U W X V C0Y [ \ Z E0=y / 0 2 3 4 5 6 7 [x (1 V0=| - >   < = @ A ? 2 3 4 5 6 7  ( ~B ? _ f0= - >   F G @ A ? 2 3 4 5 6 7  ( ~B ? _ g0= - >   K L @ A ? 2 3 4 5 6 7  ( ~B ? _ h0 +& -' *( /) %* ^+ 0-*/%%^;ld1+sl1+dsl1-dsld1-s;d1+:;1+d:;d1-:;1-d:Kd1+kK1+dkKd1-kK1-dkId1+iI1+diId1-iI1-diOd1+oO1+doOd1-oO1-dolxlx . . .l.ldslds?vLdkdkKdkdidiIdidodoOdoKIOlabcdefghijklmnopqrstuvwxyz.cannot open input filebundle %d elements at %o bundling space exceededroutput(%o) []s%s c[%s]pc SLs.0SLs.cannot open input filequnrecognizable argument /usr/lib/lib.b/bin/dcdc-errorUMINUSLETTERDIGITSQRT   U W X V G0Y [ \ Z I0+& -' *( /) %* ^+ 0U W X V K0Y [ \ Z M0} ;" ! (0'0( - >     @ A ?  ( ~B ? _ = \0( 50[ <0D0H0L0[ =0F0J0N0 _ T0R0+& -' *( /) %* ^+ ) p0{ % ] *( /) %* ^+ 30*( /) %* ^+ 40^+ 60^+ 70^+ 80^+ 90+& -' *( /) %* ^+ 0+& -' *( /) %* ^+ ] +& -' *( /) %* ^+ 0) , P0i0+& -' *( /) %* ^+ k0=y / 0 2 3 4 5 6 7 [ (1 V0+& _IFFFFEQ_WHILE_FORNELEGEINCRDECR_RETURN_BREAK_DEFINEBASEOBASESCALEEQPLEQMIEQMULEQDIVEQREMEQEXP_AUTODOTQSTR$acceptstartstattaildefdargsdlistslistdletseEQOPCRSBLEVrefprefixcargsconseoraconstantlorap||`vZstate %d, value %d, char %d character %d read reduce %d syntax errorerror recovery pops state %d, uncovers %d error recovery discards char %d dox0f>ecslLrF 0 %ewauto break case char 4 continue default do double 4 else extern 2 float 4 for goto if int 4 long register return static struct 3 switch while manco capac:sinchi roca sinchi roca:lloque yupanqui lloque yupanqui:mayta capac mayta capac:capac yupanqui capac yupanqui:inca roca inca roca:yahuar huacac yahuar huacac:viracocha viracocha:pachacuti pachacuti:tupa inca yupanqui tupa inca yupanqui:huayna capac huayna capac:huascar huascar:atahuallpa our discontent:\ Made glorious summer by this sun of York:\ {King }Richard III{ I-i}:\ {King }Richard III There['s| is] a divinity that shapes our ends{,}:\ Rough[-| ]hew them how we will{.}:\ Hamlet{ V-ii}:\ Hamlet There is a tide in the affairs of men:\ Which{,} taken at the flood{,} leads on to fortune{;}:\ Julius Caesar{ IV-iii}:\ Brutus Never{,} never{,} never{,} never{,} never{.}:\ Pray you undo this button{.}{ Thank you{,} sir{.}}:\ {King }Lear{ V-iii}:\ {King }Lear I grow{,} I prosper{\:}:\ Now{,} g ! "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`ɋfiloruadgjmpsvods{,} stand up for bastards{!}:\ {King }Lear{ I-ii}:\ Edmund The better part of valour is discretion{;}:\ in the which better part I have saved my life{.}:\ {King }Henry IV{,} Part I{ V-iv}:\ Falstaff Asses are made to bear{,} and so are you{.}:\ Women are made to bear{,} and so are you{.}:\ {The }Taming of the Shrew{ II-i}:\ Full fathom five thy father lies{;}:\ Of his bones are coral made{;}:\ {The }Tempest{ I-ii}:\ Ariel She lov['|e]d me for the dangers I had pass['|e]d{;}:\ And I lov['|e]d her that shhknqtwx{~The quality of mercy is not strain['|e]d:\ It droppeth as the gentle rain from heaven:\ {The }Merchant of Venice{ IV-i}:\ Portia Friends{,} Romans{,} Countrymen:\ lend me your ears{;}:\ Julius Caesar{ III-ii}:\ {Mark }Antony Neither a borrower nor a lender be:\ For loan oft loses both itself and friend{.}:\ Hamlet{ I-iii}:\ Polonius To be{,} or not to be{\:}:\ that is the question{\:}:\ Hamlet{ III-i}:\ Hamlet Alas{,} poor Yorick{!}:\ I knew him{,} Horatio{;}:\ Hamlet{ V-i}:\ Hamlet Double{,} double toil ane did pity them{.}:\ Othello{ I-iii}:\ Othello Uneasy lies the head that wears a crown{.}:\ Many good morrows to your Majesty{!}:\ {King }Henry IV{,} Part II{ III-i}:\ Mislike me not for my complexion{,}:\ The shadow['|e]d livery of the burnish['|e]d sun{.}:\ {The }Merchant of Venice{ II-i}:\ Morocco Cowards die many times before their deaths{;}:\ The valiant never taste of death but once{.}:\ Julius Caesar{ II-ii}:\ Caesar O{h}{!|,} Pardon me{,} thou bleeding piece of earth{,}:\ That I am meek and gentle ^K0@ & 6  w ,% @- e `d%@^    ,   F^ 7 >^E! Ne @  @aAap  % 555 `4&, e @5&3 e  _: Ne TNe T7 _ Ne @  _J w b D &a Xe   `& %P % 5/ h   ` & %P %  h w w 05- h @ Zd trouble{;}:\ Fire burn and cauldron bubble{.}:\ Macbeth{ IV-i}:\ Witch{es} By the pricking of my thumbs{,}:\ Something wicked this way comes{.}:\ Macbeth{ IV-i}:\ Out, damned spot! out, I say!:\ :\ Macbeth{ V-i}:\ Lady Macbeth [Second |2nd |]Witch Unbidden guests:\ Are often welcomest when they are gone{.}:\ {King }Henry VI{,} Part I{ I-ii}:\ She is a woman{,} therefore may be woo'd{;}:\ She is a woman{,} therefore may be [won|screw'd]{.}:\ Titus Andronicus{ II-i}:\ Demetrius Such duty as the subject owewith these butchers{.}:\ Julius Caesar{ III-i}:\ {Mark }Antony The play's the thing:\ Wherein I'll catch the conscience of the king{.}:\ Hamlet{ II-ii}:\ Hamlet How sharper than a serpent's tooth it is:\ to have a thankless child{.}:\ {King }Lear{ I-iv}:\ {King }Lear Had I but served my God with half the zeal I served my king:\ He would not in [mine|my] old age have left me naked to [mine|my] enemies{.}:\ {King }Henry VIII{ IV-ii}:\ {Cardinal }Wolsey It seems she hangs upon the cheek of night:\ Like a rich @ ZfNeai  %Ne0 h w  w v D `0 %   @ 5 5 Be  r e\A! y"@e Bef& e5P%/ % @w Ґw D@5N  A  Ku  % &`&`p  5&   `&`ep % %2 %9   w<  &u@A H ȋ Wp qf55@ 5 Wp uus the prince{,}:\ Even such a woman oweth to her husband{.}:\ {The }Taming of the Shrew{ V-ii}:\ Kate Who is Silvia{?} what is she{,}:\ That all our swains commend her{?}:\ {The }Two Gentlemen of Verona{ IV-ii}:\ Thurio Tu-whit{,} tu-who[ - | |--]a merry note{,}:\ While greasy Joan doth keel the pot{.}:\ Love's Labo{u}r Lost{ V-ii}:\ Winter My only love sprung from my only hate{!}:\ Too early seen unknown{,} and known too late{!}:\ Romeo and Juliet{ I-v}:\ Juliet But{,} soft{!} what light through yonder winjewel in an Ethiop's ear{.}:\ Romeo and Juliet{ I-v}:\ Romeo Where the bee sucks{,} there suck I{;}:\ In a cowslip's bell I lie{.}:\ {The }Tempest{ V-i}:\ Ariel O brave new world{,}:\ That has such people [in't|in it]{!}:\ {The }Tempest{ V-i}:\ Miranda Why{,} then the world's mine oyster{,}:\ Which I with sword will open{.}:\ {The }Merry Wives of Windsor{ II-ii}:\ Falstaff A goodly apple rotten at the heart{\:}:\ O{h}{,} what a goodly outside falsehood hath{!|.}:\ {The }Merchant of Venice{ I-iii}:\ Antonio  @ @- s=_Nn  w DCԢӋw| w f bG5 5ԕ*@eaԕ*N r@ @m %   2@ _$n%bG_P     Te%/ ^5% % _$5% /% +T *5% N  ds 5 @mAmp %  RN  B @r5 @ :5 @m5%.  ) % @ Z@dow breaks{?}:\ It is the east{,} and Juliet is the sun{!}:\ Romeo and Juliet{ II-ii}:\ Romeo What's in a name{?} That which we call a rose:\ By any other name would smell as sweet{.}:\ Romeo and Juliet{ II-ii}:\ Juliet Good night{,} good night{!} parting is such sweet sorrow{,}:\ That I shall say good night till it be morrow{.}:\ Romeo and Juliet{ II-ii}:\ Juliet A plague o['|n] both your houses{!}:\ They have made worms' meat of me{.}:\ Romeo and Juliet{ III-i}:\ Mercutio This royal throne of kings{,} thiI never kill['|e]d a mouse{,} nor hurt a fly{;}:\ I trod upon a worm against my will{,}:\ Pericles{ IV-i}:\ Marina Golden lads and girls all must{,}:\ Like chimney sweepers{,} come to dust{.}:\ Cymbeline{ IV-ii}:\ Guiderius You blocks, you stones, you worse than senseless things!:\ O you hard hearts{,} you cruel men of Rome{.}:\ Julius Caesar{ I-i}:\ Marullus A horse[!|,|] a horse[!|,|] my kingdom for a horse[!|]:\ :\ {King }Richard III{ V-iv}:\ {King }Richard III My salad days,:\ When I was green in judg[e 5 %  @ pXN  45_bGf % Z_wtw b5 % % %0+%.7  %+%-5 %-  %0%  @5) %%95 BD@5  h%9Wp Cae5 B5  55555%| &5wv7Y5w ZY7 zY wT^ R  XW  w " C Wp9@@`eˋY& 0%WpDen wf 0 s scepter['|e]d isle{,}:\ This earth of majesty{,} this seat of Mars{,}:\ {King }Richard II{ II-i}:\ John of Gaunt Not all the water in a rough rude sea:\ Can wash the balm from an anointed king{.}:\ {King }Richard II{ III-ii}:\ {King }Richard II I'll put a girdle round the earth:\ In forty minutes{.}:\ {A }Midsummer[-| ]Night's Dream{ II-i}:\ Puck I can call spirits from the vasty deep{.}:\ Why{,} so can I{,} or so can any man{;}:\ {King }Henry IV{,} Part I{ II-iv}:\ There are more things in heaven and ea|]ment, cold in blood[,|]:\ Antony [and|&] Cleopatra{ I-v}:\ Cleopatra Age cannot wither her, nor custom stale:\ Her infinite variety[.|]:\ Antony [and|&] Cleopatra{ II-iii}:\ Enobarbus Give me some music\: music, moody food:\ Of us that trade in love[.|]:\ Antony [and|&] Cleopatra{II-v}:\ Cleopatra 'Tis better playing with a lion's whelp,:\ Than with an old one dying[.|]:\ Antony [and|&] Cleopatra:\ Enobarbus The barge she sat in, like a burnished throne,:\ Burned on the water[.|] The poop was burnished goe%bGnw  Xw7   ӕ- ӕ0B~ӕ.  ӕ0~ B~7   ӕ-ӕ.r B~ӕe ӕ- ӕ+ r e0e0Sw ~w XDeX  X % h w7 W7 WׯW- W W(wW7 W .wWeB J ӕ- R r f e0 @ >~W ҋ D~8 \Wӕ0 $f v Le0 9e(W"W F WW 7Wwrth{,} Horatio{,}:\ Than are dream[t|ed] of in your philosophy{.}:\ Hamlet{ I-v}:\ Hamlet The time is out of joint{;} O cursed spite{,}:\ That ever I was born to set it right{!}:\ Hamlet{ I-v}:\ Hamlet Once more unto the breach{,} dear friends{,} once more{;}:\ Or close the wall up with our English dead{.}:\ {King }Henry V{ III-i}:\ {King }Henry V Was ever woman in this humour woo['|e]d{?}:\ Was ever woman in this humour [won|screw'd]{?}:\ {King }Richard III{ I-ii}:\ {King }Richard III Now is the winter of ld[;|.|]:\ Antony [and|&] Cleopatra:\ Enobarbus e&  mV V h ~  h   h ~ w7 V V V0   VWp `e0fV ,VP vV pV @f TV `74 BV `8V0V-*V"Vf@w fw JA 7 UfAW,f B@ 8 @&61fA   @ @e7r 1@ 1w@fAW @wH fb1b7< 5 e w(  5& w&WL&WH&VD&V@&V<&V8&V4&V0&V,&V(&V$&V &V&V&V&V&V &V&V&Vf& f@fu@& HADCBF7TFf5w * f5w }7 .V&VW&f$c 7 V@% V@A&@Lc7 @L> Be0# @$cє Lc    BA   W Lce B@e0$cm4 ~U` $ceȐ9 ȕ0 $cabilities ability able about above absence absent absentee absenteeism absolute absolutely abstract abstracts academic academically academician accept acceptability acceptable acceptably acceptance acceptances accepted accepting accepts access accessed accesses accessible accessing accession accessions accident accidental accidentally accidents accompany accompanying accomplished accomplishment accomplishments accordance accorded according accordingly account accountability accountable accountancy accountantch be bear bearer bearing became because become becomes becoming been before began begin beginning begins begun behavior behavioral behind being belief beliefs believe believed believes bell belong belonging belongings below beneath beneficial benefit benefits bent besides best better betterment between beyond big bigger biggest bill billed billing bills binary biometrika bit bits black blank blanks block blocked blocking blocks blue board boards body bold bond bonds book books borrow borrowed both bottom ȕ1 LU FU`0$c$cVV6rw"U6r@  `U^U7JUcPP7 TEDE!wETED5!5! w |W!w0w   wW! B  w0 w" w w   (:TE7vTE*TU"TE@TU@T T jcE UUcTTT S BE? encCE ec@E xH5Se5Sts accounted accounting accounts accumulated accuracy accurate accurately achieve achieved achievement achieving acknowledge acknowledging acknowledgments acquired acquiring acquisition across act acting action actions activated activates activation active actively activities activity acts actual actually actuate actuated acute acutely adapt adapted adaption add added adding addition additional additions additive address addressed addresses addressing adds adequacy adequate adequately adhesives adjacent adjbottoms bought bound boundaries boundary bounded bounds box branch branches break breakdown breaker breakers brief briefed briefing briefly bring brings broad broadened broader broadest broadly broken brought brown bubble budget budgetary budgets build building buildings builds built bureau bureaucracy bureaucratic burning bus buses business busy but buy buyer buying buys by bypass bypassing cabinet cabinets cable cabling calculate calculated calculates calculating calculation calculations calendar caliber 5@hSeYc H enc 5@BS> c; c66  c\Sc `&e  c   cSeSbww5Q$Rc ^c f   EU P5R   PTcfPPQ7 4R5    5 C B A  `5R  5Q  5Q  eETc  "$ $5Q $$ 5Q udged adjunct adjuncts adjust adjusted adjusting adjustment adjustments administer administered administering administrate administrated administration administrative administrator administrators admit admittedly adopt adopted adopting adoption advance advanced advances advantage advantageously advantages adversary adverse adversely advise advised advisers advising advisors advisory affairs affect affected affecting affects affirmation affirmative affirmed aforementioned after afternoon again against age agcalibrated calibrates calibration california call called calling calls came can candidate candidates cannot capabilities capability capable capacity capital capitalization capitalize capitalized card cards care career careful carefully carried carries carroll carry carrying case cases casual casually catalog catalogs categories category cathode cathodes catholic caught cause caused causes causing cease ceases cell cells center centered centers central centrally centuries century certain certainly chain chai 5lQ  Rc5@TQ  wL   w>Rc TcQ (    5@Q  P B    P UPwRc P wRc PwPwPw  7 ~P zPa hPUlPtPW 8U`c W 8ETcfc     ` \chc-PP a h h   Tc \ca  ! p ^cRcR BRc OW !W e UETR5O  encies agency agent ago agree agreeable agreed agreement agreements agrees ahead aid aide aided aids aimed air alert algebraic algol algorithm algorithms all allocate allocated allocates allocation allocations allow allowable allowance allowed allowing allows almost alone along alphabet already also alter alteration altered alternate alternating alternation alternative alternatively alternatives although always america american among amount amounts amplifier amplitude an analog analogous analogy analyses anned chaining chairman chairmen chance chances chang change changed changes changing channel channels chapter chapters character characteristic characteristics characterize characterized characterizes characters charge chargeable charged charges charging chart charter chartered charts cheaper cheapest check checked checking checks chemical chemicals chemistry chief chiefs children choice choices choose choosing chosen circle circles circuit circuitry circuits circumstances cited cites citing citizens city ci5tO  UfOwp   Rc^c   7 (Or@Tcr@`c  e  JW!vcW!c 5N7 Ne  , NNN fTc    Tc`c$ $$$`c& N & N  N N S C B A  eW!\cՇ w^ mLN>N :N rfdc58Ne        W!`cTcP    0&Tcd& dN & dN dC N eN e-MMMM"]'|:,̼o P1_p6A67jl;nO#=alysis analyst analysts analytic analytical analyze analyzed analyzer analyzing ancillary and angle animal announced announcements announces annual anode anodes another answer answered answering answers anticipated any anyone anything anyway apart apparatus apparent apparently appeal appealing appeals appear appearance appeared appearing appears append appended appendices appending appendix appends applicability applicable applicant applicants application applications applied applies apply applying appointevil claim claimed claiming claims class classes classification classified clean cleaning cleanliness clear clearance cleared clearing clearly clears clerical clerk clerks clock close closed closely closer closes closest closing closure clue cluster clustering clusterings clusters cm code codes codifying coding coefficient coefficients coffee coherency coherent cold collaboration collaborative colleagues collected collection collections collective collects college color colored column columns combination com p=ף> BCCzEtJ$tJ$nO(khTdpz /usr/lib/unitsattofemtopiconanomicromillicentidecidekahectahectokilomegameggigaterano table you have: you want: * %e / %e conformability underflow or overflow %e %s*%c*cannot recognize %s %l units; %l bytes %sredefination %s 6 d o x f ed cr sB l r`d appointment appoints appraisals approach approached approaches approaching appropriate appropriately appropriateness approval approvals approve approved approximate approximated approximately approximation april arbitrarily arbitrary are area areas argue argued argument arguments arise arisen arises arising arithmetic arose around arrange arranged arrangement arrangements arranges arranging array arrays arrival arrive arrives arriving art article arts as ascertain ascertained aside ask asked asking asks abinations combinatorial combine combined combining come comes coming command commands comment comments commerce commercial commercially commitment commitments committed committee committees common commonly communicate communicated communicates communicating communication communications communist communities community compact companies companion companions company comparability comparable comparative comparatively compare compared compares comparing comparison comparisons compatibility compatible compensate 0> ,:JZZZZZZBRZZzZZPh4 4>^jzspect aspects assembly assess assessed assessment asset assets assign assignable assigned assigning assignment assignments assigns assist assistance assistant assistants assisted associate associated associating association assume assumed assumes assuming assumption assumptions assurance assure assured assures asymmetric at atmosphere atmospheric atom attach attached attack attempt attempted attempting attempts attend attendance attendant attended attention attitude attitudes attorney attract attraction attcompensating compensation compensatory compete competence competency competent competently competes competing competition competitive compilation compilations compiled compiler compilers compiles compiling complement complementary complements complete completed completely completes completion complex complexities complexity compliance complicate complicated complicating component components composed composite composition compositions comprehend comprehended comprehending comprehension comprehensive comprisey|z}ractive attractiveness attributable attributes audio augment augmentation augmented augmenting august author authorities authority authorization authorizations authorize authorized authorizing authors automated automatic automatically auxiliary availability available average averaged averages averaging avoid avoidance avoided avoiding aware awareness away axes axis back background backgrounds bad badly balance balanced ball band bandwidth bank banking banks bar bars base based bases basic basically basis ba comprises comprising compromise compromised compromises computation computational computations compute computed computer computerized computers computes computing conceivable conceived concentrate concentrated concentration concept conceptions concepts conceptually concern concerned concerning concerns conclude concluded concludes conclusion conclusions condensed condition conditional conditionally conditioned conditioning conditions conducive conduct conducted conductivity conductor conductors conference conferences confidence confident confidential confidentiality configuration configurations confirm confirmation confirmations confirmed confirms confounded confounding confuse confused confusion congruent conjectured conjectures connect connected connecting connection connections connects conscious consequence consequences consequently consider considerable considerably consideration considerations considered considering considers consist consisted consistency consistent consisting consists constant constanectives directly director directories directors directory disagreement disagreements disappear disappears discharge discharges disclose disclosed discloses disclosure disconnected discount discounts discourage discouraged discourages discouraging discover discovered discovers discovery discrepancies discrepancy discrete discriminable discriminate discriminated discriminating discrimination discriminatory discuss discussed discusses discussing discussion discussions dispense dispensing display displayed dispexploratory explore explored exponential exponentially exposed exposure express expressed expression expressions extend extended extending extension extensive extensively extent external extinguished extra extracted extracting extreme extremely extremes fabricated face faced faces facilitate facilitated facilities facility fact factor factorial factors facts faculties faculty fail failed failing fails failure failures fair fairly fairness faith fall falls false familiar families family far fashion fast fastts constitute constituting constrain constrained constraint constraints construct constructed constructing construction constructs consult consultant consultants consulted consulting consults consumable consumed consumer consuming consumption contact contacted contacts contain contained containers containing contains contemplate content contention contents context continuation continue continued continues continuing continuity continuous continuously contract contractions contractor contracts contractual colaying displays disposal disposed dissimilar dissimilarities dissimilarity distance distances distant distinct distinction distinctions distinctive distinctly distinguish distinguished distinguishing distorted distortion distortions distractions distribute distributed distributing distribution distributions disturb disturbed disturbing diverse divide divided divides division divisions do document documentation documented documenting documents does doing dollars domain dominance dominant dominated done door er fastest favor favorable fear feasibility feasible feature features february federal federally feed feedback feel feeling feels feet felt female females few fewer field fields fifteen fifth fig figs figure figures file filed files filing fill filled filling fills film filter filtered filtering filters final finally finance financed finances financial financing find finding findings finds fine finely finish finished finite fire fires firm firmly first fiscal fiscally fit fits fitted fitting five fix fixed ntradicting contradiction contradictions contrast contributed contributions control controllable controlled controller controlling controls convenience convenient conveniently convention conventional conventions conversant conversation conversations converse conversely conversion convert converted converter convertibility converting convey conveyed convince convinced convincing cooperate cooperates cooperation cooperative cooperators coordinate coordinated coordinates coordinating copied copies copy core codoors doped dotted double doubling doubt doubtful down dr draft drafting drafts draftsman drastically draw drawing drawings drawn drew drink drinks drive drives driving drop dropped dropping drops dubious due duplicates duplicating duplication duration during dust duties duty dynamic each earlier earliest early earmarked earth ease eased easier easily east easy economic economical economically economics economists economy edge edges edit edited editing editor editorial editors educate educated educating eduflat flexibility flexible flip floor flop flops flow flowing follow followed following follows food foot for force forced forceful forces foregoing foreign forest form formal formally format formation formats formatted formed former forming forms formula formulae formulated formulation forth fortran forward found four fourth fraction fractions frame frames framework framing free freed freedom freely french frequencies frequency frequent frequently fresh friend friendly friends from front fulfill fulfilled frner corners corporate corporation correct corrected correcting correction corrections corrective correctly correctness corrects correlated correlation correlations correspond corresponded correspondence corresponding corresponds cosines cost costing costly costs could council councils count counted counter counting countries country counts couple coupled coupling course courses court cover covered covering covers create created creates creating creation creative creativeness credit crisis criteria criteriocation educational educationally effect effective effectively effectiveness effects efficiency efficient efficiently effort efforts eight either elaborate electric electrical electrode electrodes electron electronic electronically electronics electrons element elements eliminate eliminated eliminates eliminating elimination else elsewhere embedded embedding embodies embodiment embodiments embodying emergencies emergency emotional emotionally emotions emphasis emphasized emphasizes empirical empirically emplulfilling full fully function functional functionally functioning functions fund fundamental funded funding funds furnish furnished furnishes further furthermore future gain gained gainers gaining gains gap gas gaseous gases gate gates gather gathered gathering gating gauge gauges gave general generalist generalists generality generalization generalize generalized generally generals generate generated generates generating generation generator generators geographical geographically geometries geometry germann critical critically criticism criticisms criticize criticized critics crop crops cross crossovers cubic cultural culture cultures currencies currency current currently curve curves customer customers cut cutoff cuts cutting cycle cycles cyclic cycling daily dallas damage damaged damages damaging danger dangerous dark data date dated dates day days dead deal dealing deals dealt debug debugged debugging december decide decided decides deciding decision decisions declared decoded decoder decoding decompositioyed employee employees employer employment empty enable enabled enables enabling enclose enclosed encloses encode encoded encoding encounter encountered encounters encourage encouraged encouragement encourages end ended ending ends energy enforced enforcement enforcing engage engaged engineer engineering engineers english enhance enhanced enhancement enjoy enjoys enlarged enough ensure ensures enter entered entering enters enthusiasm enthusiastic entire entirely entities entitled entity entries entry envel germany get gets getting give given gives giving glance glass glasses global glow go goal goals goes going gone good goods govern governed governing government governmental governments gradually graduate graduates graduating grant granted granting graph graphic graphical graphics graphs great greater greatest greatly green gross grossly ground grounded grounds group grouped grouping groupings groups grow growing grown grows growth guarantee guaranteed guaranteeing guarantees guard guarded gudeance guess guon decrease decreases decreasing deep deeply defect defective defects defend defendant defendants defense define defined defines defining definite definitely definition definitions degree degrees delay delayed delaying delays delete deleted deletes deleting deletion deletions deliver deliverable delivered delivers delivery demand demanding demands demonstrate demonstrated demonstration demonstrations density deny department departmental departments departure departures depend dependency dependent depending ope environment environmental environments environs epitaxial equal equality equally equals equated equation equations equilibrium equipment equipped equitable equivalence equivalent equivalently error errors escape especially essential essentially essentials establish established establishing establishment establishments estimate estimated estimates estimation et etc evaluate evaluated evaluating evaluation evaluations even evening event events ever every everybody everyone everyones everything everywhere essed guesses guests guidance guide guided guidelines guiding habit habits had hair half hall halls hand handbook handle handled handler handles handling hands hang hanging hangs happen happened happening happens hard harder hardly hardware has have having hazy he head headings heads health healthy hear heard hearing heat heating heavily heavy height heights held help helped helpful helps hence her here herein hereinafter hers hesitate hidden hierarchal hierarchical hierarchy high higher highest highly hilldepends depicted deposit deposition deposits depth derive derived deriving descendant descendants descending describe described describes describing description descriptions descriptive descriptors design designate designated designating designed designing designs desirability desirable desire desired desires desiring despite destination detail detailed detailing details detect detected detecting detection detects determination determine determined determines determining develop developed developers developevidence evidenced evident evidently evil exact exactly exaggerated exaggerates examination examinations examine examined examines examining example examples exceed exceeded exceeding exceedingly exceeds excellence excellent except exception exceptionally exceptions excess excessive excessively exchange exclude excluded exclusive executable execute executed executes executing execution executive executives exercise exercised exercises exhaust exhaustion exhaustive exhibit exhibited exhibitions exist existed him himself hire hired hiring his historic historical history hold holding holds hole holes holidays home hook hope hoped hopefully hopes horizontal horizontally hospital hospitals host hot hour hours house houses housing how however human humanly humans hundred hundreds hypotheses hypothesis hypothesized hypothetical idea ideal ideally ideas identical identifiable identification identifications identified identifies identify identifying identity idle if ignore ignored ignores ignoring illness illustrate iing development developments develops deviance deviant deviation deviations device devices diagnose diagnosed diagnoses diagnostic diagonal diagram diagrams dial dialing diameter dictated dictates dictionary did die dielectric differ differed difference differences different differential differentiate differentiating differently differing differs difficult difficulties difficulty diffusion digit digital digits dimension dimensional dimensionality dimensions direct directed direction directions directive dir existence existent existing exists exit exiting exits expand expanded expanding expansion expect expectancy expectation expected expects expedite expeditious expendable expended expenditure expenditures expense expenses expensive experience experienced experiences experiment experimental experimentally experimentation experimented experimenters experimenting experiments expert expertise experts explain explained explaining explains explanation explicit explicitly exploit exploitation exploited exploration llustrated illustrates illustrating illustration illustrations illustrative illustratively image images immediate immediately impact impedance impede implement implementation implemented implementing implementors implications implicitly implied implies imply implying importance important impose imposed impossibility impossible impressed impression impressions impressive impressively improve improved improvement improvements improving impurities impurity in inability inaccessible inactive inadequacy inadequate inappropriate inches inclination inclined include included includes including incoming incompetence incompetent incomplete inconsistent inconvenience inconvenienced inconvenient incorporate incorporated incorporates incorporating incorporation incorrect incorrectly increase increased increases increasing increasingly increment incremental incremented incrementing increments incur incurred incurring indeces indeed indefinite independence independent independently index indexed indexes indexing india indicst look looked looking looks loop loops lose loses losing loss losses lost lot low lower lowest machine machinery machines made magnetic magnitude magnitudes mail mailed mailing mails main mainly maintain maintained maintaining maintains maintenance major majority majors make maker makers makes making male males man manage manageable managed management managements manager managerial managers managing manipulate manipulation manned manner manning manual manually manuals manufactured manufacturer manufacturerves out outcome outcomes outgoing outline outlined outlines outlining output outputs outs outset outside outsiders over overall overhead overlap overlaps overly overview overviews own owned owner owners owns package packages packing packs page pages paid pain painful pair paired pairs panel panels paper papers paragraph paragraphs parallel parameter parameters paramount part partial partially participants participated participating particular particularly parties partition partitioned partitioning partitionate indicated indicates indicating indication indications indicative indicator indicators indices indifferent individual individualized individuals industrial industry ineffective inefficiency inefficient inequalities inequality inexperienced infer inference inferences influence influencing influential inform informal informally information informational informations informative informed informing infrequently inherent inhibits initial initialed initialization initialize initializes initially initiate initis manufacturing manuscript manuscripts many map mapped mapping maps march margin marginal margins mark marked markedly market marketability marketing markets marking marks mask masked masking mass master mastered masters match matched matches matching material materials mathematical mathematically mathematician mathematicians mathematics matrices matrix matter matters maximizes maximum may me mean meaning meaningful meaningfulness meaningless meanings means meant measurable measure measured measurement meass partly parts party pass passage passed passes passing past patent patentable patented patents path paths patient patients pattern patterns pause pauses pay pays peak pension pensions people per perceived percent percentage percentages perceptible perceptibly perceptions perceptual perfect perfectly perform performance performed performing performs perhaps period periodic periodically periodicals periods peripheral peripherals periphery permanent permanently permissible permission permissions permissive peated initiating initiation initiative inner input inputs insert inserted inserting insertion insertions inserts inside insight insights insist instability install installation installations installed installing instance instances instant instantaneously instead institute instituted institutes institution institutional institutions instructed instruction instructional instructions instructor instructors insufficient insurance insure insured insures integer integers integral integrated integrating intellectuaurements measures measuring mechanical mechanics mechanism mechanisms media median medical medicine medium meet meeting meetings meets member members membership memberships memoranda memorandum memory men mention mentioned mere merely merge merged merging merit message messages met metal metallization metallurgy metals method methodological methodologies methodology methods metric microfilm middle might mileage miles military million mind minded minds minimal minimize minimized minimizes minimizing minimum rmit permits permitted permitting person personal personalized personally personnel persons pertain pertaining pertains pertinent perusal phase phased phases phenomena philosophy photocopied photocopies photocopy photocopying physical physically pick picked picking pickup pictorial picture pictures piece pieces pile piles pilot pipe piped pipes pitfalls place placed places placing plan planar plane planned planner planning plans plant plants plausible play played players playing plays pleasant please pleasel intelligibility intelligible intended intends intense intensely intensity intensive intent inter interact interacting interaction interactions interactive interacts interchange interchangeable interchangeably interconnect interconnected interconnection interconnections interconnects interest interested interesting interests interface interfaces interior interlocation intermediary intermediate internal internally international internationally interpret interpretable interpretation interpretations interpretminister minor minority minute minutes miscellaneous missed missing mistake mistakes mix mixed mixes mixture mode model modeling models moderate modern modes modification modifications modified modifies modify modifying modular module modules modulo moment momentarily money monitor monotone monotonic monotonically month monthly months moon moral more moreover morgan morning most mostly motivated motivation motor mount mounted mounting move moved moves moving much multi multidimensional multiple multiplicatid pleasing plots plotted plotter plotters plotting plurality plus point pointed pointer pointers pointing points polarity police policies policy political politically pollution polymers polynomial polynomials pool pooled pooling pools poor poorer poorly popular popularity populating population porter portion portions position positions positive possess possession possibilities possibility possible possibly post posts potential potentially power powerful practicable practical practice practiced practices praed interrelationship interrelationships interrupt interrupted interrupting interruption interruptions interstage interval intervals interview interviewed interviewing interviews intimate intimately into introduce introduced introduces introducing introduction introductory invalid invalidates invent invented invention inventive inventor inventories inventory inverse inversely inverted inverter invest investigate investigated investigation investigations investment investments invite invites involve involved on multiplied multiplier multipliers multiply multiprogram multiprogrammed multiprogramming multistage multivariate murder murray must mutually my name named namely names naming narrow nation national nationally nations natural naturally nature near nearer nearest nearly necessarily necessary necessitate necessitates necessity need needed needing needs negate negated negative neglect neglected neighbor neighboring neither net network networks neutral never nevertheless new newer newest newly news next nice cticing practitioners preassigned precede preceded preceding precise precisely precision predetermined predict predicted predicting prediction predictions prefer preferable preference preferences preferred premium premiums preparation prepare prepared preparing prescription presence present presentation presentations presented presently presents press pressed pressure pressurized presumably presumed pretty prevent prevented preventing preventive prevents previous previously price priced prices pricing primainvolvement involves involving ion ions irrelevant is isolate isolated isolation issue issued issues it item itemized items iteration iterations its itself james january jargon jersey job jobs john johnson join joined joint jointly journal journals jr judge judged judgment judgmental judgments judicious judiciously july jump jumps june just justice justification justified justify justifying keep keeping keeps kennedy kept key keyed keys kill kind kinds knew know knowing knowingly knowledge knowledgeable knonight nine no nobody node nodes noise noisy non none nonexistence nonlinear nonlinearity nonowners nonzero nor norm normal normality normalized normalizes normally norms north not notable notably notation note noted notes noteworthy nothing notice noticeable noticeably noticed notification notified notify noting novel november now nuclear number numbered numbering numbers numeric numerical numerically numerous object objectionable objective objectively objectives objects obligation obligatory observation obrily primary prime priming principal principle principles print printed printer printers printing prints prior priori priorities priority privacy private privilege privileged privileges probabilities probability probable probably problem problematical problems proc procedural procedure procedures proceed proceeded proceeding proceeds process processed processes processing processor processors produce produced produces producing product production productive productivity products profession professional profwn knows label labeled labeling labelled labelling labels laboratories laboratory lack lacking lacks lag laid land language languages large largely larger largest laser lasers last late later latest latter law laws lay layer layers laying layout layouts lays lead leader leaders leadership leading leads learn learned learning least leave leaves leaving led left leftmost legal legally legitimate lend lending length lengthening lengthens lengths lengthy less lessened lesser let lets letter letters letting leveservations observe observed observer observing obsolete obtain obtained obtaining obtains obvious obviously occasion occasional occasionally occupancy occupations occupied occupies occupy occupying occur occurred occurrence occurrences occurring occurs october odd of off offer offered offering offerings offers office officer officers offices official officially officials often oil old older omission omitted on once one ones only onto open opened opening openings opens operable operate operated operates operessionalism professionally professionals professor professors profile profiles program programmed programmer programmers programming programs progress progresses prohibited prohibitively prohibits project projected projection projections projectors projects promotion promotional promotions prompt prompting promptly pronounced proof propagate propagated propagating propagation proper properly properties property proportion proportional proportionate proportions proposal proposals propose proposed proposes prl levels liability liable liason liberal liberalized librarian librarians libraries library lie lies life light lighting lights like likely likened likewise limit limitation limitations limited limiting limits line linear linearly lines link linkage linkages linked linking links list listed listing lists literal literally literature little live lived load loaded loading loads loan loaned loans local locally locate located locates locating location locations log logged logging logic logical long longer longeating operation operational operations operative operator operators opinion opinions opportunism opportunities opportunity opposite optical optically optimal optimality optimistic optimization optimum option options or oral orally order ordered ordering orderings orderly orders ordinary organization organizational organizations organize organized organizer organizing orientation oriented origin original originally originals originated originating originator orthogonal other others otherwise ought our ourselospects protect protected protecting protection protects proters prove proved proven proves provide provided provides providing proving provision provisional provisionally provisions public publication publications publicly publish published pulse pulses purchase purchased purchases purchasing pure purely purpose purposes pushed pushing put puts putting qualities quality quantities quantity quantization quarter quarterly question questionable questioning questionnaire questionnaires questions quick quickly quiet quite quote quoted quotes radio raise raised random randomly range ranged ranges ranging rank ranking rankings ranks rapid rapidly rare rarely rate rated rates rather rating ratings ratio rational ratios ray rays reach reached reaches reaching reaction reactions read readable reader readers readily reading readings reads ready real realistic realistically realities reality realization realize realized realizing really rear reason reasonable reasonably reasons reassigned reassignment receipts receive r sequential sequentially serial series serious seriously serve served serves service serviced services servicing serving set sets setting settings seven several severe shall shape share shared sharing sharp she sheet sheets shift shifting shifts ship shipped shipping ships shop shopping shops short shortage shortages shortened shortens shorter shortest shortly shot shots should show showed showing shown shows side sides sign signal signals signature signed significance significant significantly signing simihereof these they thick thickness thin thing things think thinking thinks third thirty this thoroughly those though thought three threshold thresholds through throughout thus tight time timed timely times timing tip tips title titles to today together toggled told tolerance tolerances tolerant tolerated toll tolls tone tones too took tool tools top topic topical topics tops total totally totals touch toward towards trace traced tracing tracings track tracks trade traditional traditionally traffic train traieceived receiver receivers receives receiving recent recently recognition recognize recognized recognizes recognizing recommend recommendation recommendations recommended recommending record recorded recorders recording recordings records recover recovered recovering recovers recovery rectangular recurring recursive recursively red reduce reduced reduces reducing reduction reductions refer reference referenced references referencing referral referred referring refers reflect reflected reflecting reflection lar similarity similarly simple simpler simplest simplicity simplified simplify simply simultaneous simultaneously since single sit site sits situation situations six sixth size sized sizes skill skilled skills slide slides sliding slight slightly slips slot slots slow slower slowly slows small smaller smallest snow so social societal society soft softest software sole solely solid solution solutions solve solved solving some someone something sometimes somewhat somewhere son soon sooner sophisticated sort ned trainee trainees training transaction transactions transcribe transcribed transcribes transcribing transcription transfer transferred transfers transform transformation transformations transformed transforming transistor transistors transit transition transitions transitory translate translated translation translations translator translators transmission transmit transmitted transmitter transmitting transport transportation transporting travel traveled travelers traveling traverse traversed traverses trreflections refused regard regarded regarding regardless region regional regionally regions register registered registers registration regression regular regularly regulated regulations reinforced reinforces reinforcing reject rejected rejecting rejection rejects relate related relates relating relation relations relationship relationships relative relatively relay relayed release released releases relevance relevant reliability reliable relief remain remainder remained remaining remains remarkable remarkabsorted sorter sorters sorting sorts sought sound sounds source sources space spaced spaces spacing spatial speaker speaking special specialist specialists specialization specialized specializing specially specialties specialty specific specifically specification specifications specifics specified specifies specify specifying spectrum speech speed spell spelling spells spend spent sphere spherical spirit spite splitting spoke sponsor sponsored sponsors spot spots spread spring square squares stability stabilaversing tray trays treasury treat treated treating treatment treats tree trees trial trials triangle triangles triangular tried triggered trip trivial trivially trouble troubles truck true truly try trying tube turn turned turning turns twelve twenty twice two type typed types typewriter typical typically typing typist typists ultimate ultimately unable unacceptable unacceptably unaffected unaltered unassigned unauthorized unavoidable unaware unchanged uncommon uncover uncovered undefined under undergradualy remarks remember remembered remembers remote remotely removal remove removed removes removing rent rental rentals renting repair repaired repairing repairs repeat repeated repeatedly repeater repeaters repeating repeats repetitions repetitive replace replaced replacement replaces replacing report reported reporters reporting reports represent representation representations representative representatives represented representing represents reproduce reproducing reproduction reputation request requested reize stable staff staffed staffing staffs stage stages stand standard standards standing stands start started starting starts state stated statement statements states static station stations statistic statistical statistically statisticians statistics status stay steady step steps still stimulate stimuli stimulus stop stopped stopping stops storage store stored stores storing straight straightforward strange strangers strategies strategy stream streams street streets strength strengthened stress strict stricte underlying understand understandable understanding understands understood undesirable undetected undivided undocumented unduly uneasy unequal unexpected unfamiliar unfortunate unfortunately unidirectionality unidirectionally uniform uniformity uniformly unimportant union unique unit united units unity universal universally universe universities university unknowingly unknown unless unlikely unlimited unnecessarily unnecessary unofficial unpublished unrealistic unrelated unreliable unresponsive unsatisfacquesting requests require required requirement requirements requires requiring requisite requisition requisitions research researcher researchers resemblance resemble resembles reserve reserved reset resetting resident resist resistance resisted resistivity resistor resistors resolution resolve resolved resource resources respect respected respective respectively respects respond respondent respondents response responses responsibilities responsibility responsible responsibly responsive rest resting restoretest strictly strikes striking string strings strong stronger strongly structural structurally structure structured structures structuring struggle student students studied studies study studying style subject subjected subjective subjects submit submitted submitting subordinate subroutine subroutines subsequent subsequently subset subsets substantial substantially substantive substitute substituted substituting substitution substrate succeed succeeding success successful successfully succession successive tory unspecified unstable unsupported until unused unusual unwanted unwilling unwise unwritten up update updated updates updating upon upper us usage use used useful usefulness useless user users uses using usual usually utilities utility utilization utilize utilized utilizing vacation vacations valid validate validated validating validation validity valuable value valued values van variability variable variables variance variances variation variations varied varies varieties variety various variously vary  restored restoring restrict restricted restriction restrictions restrictive result resultant resulted resulting results retrieval retrieve retrieved return returned returning returns reveal revealed revealing reveals reverse review reviewed revised revision revisions reward rewarding rewards rewritten rich right rights rigid rigidly rise risk risks roads role roles room rooms root rooted roots rose rotate rotation rotations rough roughly round rounded rounding route routed routes routine routines routing rsuccessively such sudden suddenly suffer suffice sufficiency sufficient sufficiently suggest suggested suggesting suggestion suggestions suggestive suggests suitability suitable suitably suited sum summaries summarize summarized summarizes summary summing sums super superior supervise supervised supervises supervising supervision supervisor supervisors supervisory supplement supplementary supplied supplier suppliers supplies supply supplying support supported supporting supports suppose supposed supposedly varying vast vector vectors verbal verification verified verifiers verifies verify verifying version versions vertical vertically very via viability viable vice view viewed viewpoint views vis visible vision visit visited visiting visitor visitors visits visual vital vocational voice voids voltage voltages volume volumes wait waited waiting walk walking walks wall walls want wanted wanting wants war warn warned warning warnings warrant warranted warrants warranty was washington wastage waste wasted wastefuloutings row rows rule ruled rules run running runs sacrificing safe safely safety said salary sale saleable sales same sample samples sampling san satisfaction satisfactorily satisfactory satisfied satisfies satisfy satisfying save saved saving savings say saying says scalar scale scaled scaling scan scanned scanning scans schedule scheduled schedules scheduling schematically scheme schemes school schooled schools science sciences scientific scientifically scientist scientists scope score scorers scores scrsure surface surprised surprising surround surrounded surrounds survey surveyed surveyors surveys suspect suspected suspects switch switched switches switching symbol symbolically symbols symmetric symmetrically symmetry system systematic systematically systems table tables tabling take taken takes taking talk talked talker talkers talking talks tape tapes target task tasks tax taxed teach teacher teachers teaching teachings team teams technical technically technician technicians technique techniques techno wasting water wavelength way ways we weak weakest week weekly weeks weight weighted weighting weights welcome welcomes well went were western what whatever when whenever where whereas whereby wherein wherever whether which while white who whole whom whose why wide widely wider widespread width will willfully william willing willingly willingness wind window windows wire wired wires wiring wise wiser wish wishes wishful with withdraw withdrawal withdrawals within without witnessed witnesses women word wordieen screened screening sea search searched searches searching second secondary secondly seconds secret secretarial secretaries secretary secretive secrets section sectional sections secure securely security see seeing seek seeking seem seemed seems seen sees segment segmented segments seldom select selected selection selective selectively selects self sell selling sells semiconductor send sending sense sensitive sensitivity sent separate separated separately separates separation september sequence sequenceslogical technologically technologies technologist technologists technology teeth telecommunication telecommunications telephone telephones telephoning telephony tell tellers telling tells temp temperature temporarily temporary ten tend tended tendencies tendency tends term termed terminal terminals terminate terminated terminates terminating termination terms test tested testing tests texas text texts than that the their them themselves then theorem theoretical theoretically theory there thereby therefore tng words work workable worked worker workers working works workshop workshops world worlds worry worse worst worth worthy would write writer writers writes writing written wrong wrote year years yes yet yield yielded yields york you young your yours zero zeros zone zones ants:colony|hill apes:shrewdness asses:pace|bunch badgers:cete bass:shoal bears:sloth bees:swarm birds:dissimulation brats:passel candidates:slate caterpillars:army cats:clowder cattle:drove|herd chickens:peep|flock crows:murder curs:cowardice dogs:pack doves:dule ducks:[pad|ba]dling earthquakes:swarm eggs:clutch elephants:herd elk:gang ferrets:business finches:charm firemen:brigade fish:school foxes:skulk geese in flight:skein geese on water:gaggle goats:trip hawks:cast hens:brood herons:siege horses:haras@  p ! "  %ZRNeF Dw "" *"  & Ne 0"  ;"R"   Ne Y"  e"}"   " @55 5 5%"_  +5 N @ 5@N T "  5_65_6Nf@   @&  5 @  " \@ =5@&  5 & f v%Cock Robin:{the }sparrow sleep|Duncan:Macbeth {the }cat:curiosity|care {John {F{.} }}Kennedy|JFK:{Lee Harvey }Oswald|{the }FBI|{the }CIA {Lee Harvey }Oswald:{Jack }Ruby|{the }FBI|{the }CIA {Martin Luther }King:{James {Earl }}Ray|{the }FBI|{the }CIA [Bobby |Robert {F{.} }]Kennedy|RFK:{Sirhan }Sirhan|{the }FBI|{the }CIA Christ:{the }Romans|{Pontius }Pilate {Sharon }Tate:{Charles }Manson Charles Lindbergh Jr{.}:{Bruno }Hauptman{n} {Mr{.} }{{and }Mrs{.} }Borden|{her }parents:Lizzie{ Borden} {Prof{essor} }{James|team hounds:kennel jellyfish:smack kangaroos|monkeys:troop kittens:kindle lapwings:deceit larks:exaltation|bevy leopards:leap lions:pride locusts:plague magpies:tidings maidens|quail:bevy martens:richness men:band moles:labor monkeys|kangaroos:troop mountains:range mules:barren|baren nightingales:watch operating companies:at&t|bell system owls:parliament partridges|grouse:covey peacocks:ostentation pheasants:bouquet plovers:congregation ponies:string prisoners:gang pups:litter quail|maidens:bevy rabbits:ne@&  5 @  "  N N 5 N N @ 5 @ N @ 5 @  5   "  5        %@@E4P  ~ 7pf \ ^@"Ne@&  "  f \ ?N@& " @ Ne N @  " >@5Ne :@ }Moriarty:{Sherlock }Holmes Achilles:Paris Abel:Cain {the }nurses:{Richard }Speck {J{.} |Julius }Caesar:Brutus{ et al.} Pompeii:Vesuvius {Abraham |Abe }Lincoln:{John {Wilkes }}Booth {Yukio }Mishima:{Yukio }Mishima {Alexander }Hamilton:{Aaron }Burr Cleopatra:{the |an }asp [Ann Boleyn|Catharine Howard]:Henry{ VIII} vaudeville:{the }movies|film {the }movies|film:TV|television st ravens:unkindness rhinoceroses:crash roebucks:bevy rooks:building seals:pod sheep:flock ships:fleet snipe:walk|wisp sparrows:host squirrels:dray starlings:murmuration stars:constellation storks:mustering swallows:flight teal:spring toads:knot turkeys:rafter turtledoves:pitying whales:gam|pod witches:coven wolves:route woodcocks:fall woodpeckers:descent {wild }swine:sounder @EU4PNef& %@@EU4PNfe& %_6@E5@t] @t] _6w rDe f  % "e&  "  D%    # (ww N   #  v & & v% ww D 8 ̋ww fe %ww  f& % T  f& 2%e0 8 wtw bD̋@-wX w BDCԢӋw8 w " ?# # Ne4j & 6  w n%   % @ @m/ӕ.  R  @m& e @ D-wfw$@e7wfw7 f D& w }f@wwwf@fA w,w"e"w"ew"@lw"Alewy &@t`e @& HADCBF7Farg count /bin/cpcp  %ew %.CE D- T #     5#  "# 5!N fw fw  ## %)#@ wpw ^,BNe Ne #fefe %#fefe %#fefe %ʥ/ ʋҋ @aˋ %uu`5 @& B& v% fe,& %wfw,#w f@wx fww0#wXf@)wDfw\wX /usr/lib/tmg $1.t $1.s as - $1.s ld /usr/lib/tmga a.out /usr/lib/tmgb /usr/lib/tmgc -ls p & 6  w   % %  7.# "#& %7#(e04r# Bd!q!" 7#5t!"  7"%47 "--c%"t"      w! -r"    e70"@ 7(" &" "  h7"" w ' "'"#!'!7"7!! R˥ '!(!!!  !!' 2 !!  ww 6#wfw 7 ffww<#wf*wBJ f@wwB#wf@wwH#w~ fAW @w f(1(7 5 ewN# 5& w &L&H&D&@&<&8&4&0&,&(&$& &&|&v&p&j &d&^&Xf& f BRfwT#f D& w. }.de HD .if t .tl '\(rn''' .if t 'sp \\n(m1-1 .if n 'sp \\n(m1 .ps 10 .ft R .if e .1e .if o .1o .ps .ft 'sp \\n(m2 .if \\n(:n .nm 1 1 2 .ns .. .wh 0 HD .de FT 'sp \\n(m3 .ps 10 .ft R .if e .2e .if o .2o .ps .ft 'bp .. .wh -7 FT (1inch) .de m1 .nr m1 \\$1 .. .de m2 .nr m2 \\$1 .. .de m3 .nr m3 \\$1 .ch FT -\\n(m3-\\n(m4-2 .. .de m4 .nr m4 \\$1 .ch FT -\\n(m3-\\n(m4-2 .. .m1 3 .m2 2 .m3 2 .m4 3 .de he .de 1e .tl \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9 \\.. .de 1o .tl \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\!!e!  r e( A! y  Ġ(ĥ Z!7R!wU?8! 4!?.! *! 70!!& ?! !7! N!& ? w V @ 7` - !  w8w & ĝ 7 ` ĥ e ! -x t -l h , ` ĥ e N !U2ĥ$8 tĥ0+ĥ9(e-  m 7 ğ ċ7  2ĥ\ &ĥ  w^ĥ$r#Ew 6 % >   wf@w\wXX#wf@fA w,2w",e"w""ew"@lw"Alew &@t`e w jwZwVwjLJw\w JBB BJw:w (BBdb@ BJwf@& HADCBF7F6rw6r@ !!!*!:!A!H!O!V!]!0 8 D P   ) vLvLLLLvLLLL$8 \\$9 \\.. .. .de fo .de 2e .tl \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9 \\.. .de 2o .tl \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9 \\.. .. .de eh .de 1e .tl \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9 \\.. .. .de oh .de 1o .tl \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9 \\.. .. .de ef .de 2e .tl \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9 \\.. .. .de of .de 2o .tl \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9 \\.. .. .he '''' .fo '''' .de bl .rs .sp \\$1 .. .de n1 .nm \\$1 1 2 .nr :n 0 .if \\n(.$% fe& T%%  r l@w eu-!@& Nf r w w  5 DD-Bp 7 y e  5 f ( 33 %&UaN&e 2 3  Nf ( jw w  DD-0 7L y e   f  2N&e ( 22 wl Nf  w J 5 @ȥ)U5 5 5 5 5 5 DD-_5 &();()^|LTXXN()<>&P2 @ HangupQuitIllegal instructionTrace/BPT trapIOT trapEMT trapFloating exceptionKilledBus errorMemory faultBad system callSig 14Sig 15Sig 16Sig 17Sig 18Sig 19/usr/adm/sha% # : cannot opensyntax error '" ;&<>()|^ "'Command line overflow Too many argsToo many characters;& <>([?*chdirchdir: bad directorychdir: arg countshiftshift: no args login/bin/loginlogin: cannot execute newgrp/bin/newgrpnewgrp: can .nr :n 1 .. .de n2 .nm \\$1 1 2 .. .if n .ll 60 .if n .lt 60 .if t .ll 6i .if t .lt 6i  7 y  |e5 e 5eD->U eD-*!& %< 5 5 @ @m !  Nf r 3sssw |@ @m Ne 5 u-@ `A Amp w Be  &  w w p !f @w^ w L @EwN w <  9@ 2 x @ ! (not execute wait:try again : cannot open: cannot create/dev/null/etc/globglob: cannot execute /usr/bin/: not found/bin/shNo shell! : too large : -- Core dumped**gok()  0+ %ew4@ & 6  Vw D 7 7  * 5D *   ZRERUL 8 P M%%@5%%   F%N$ F 5%8   %9%7  (  F 5 8 w*w rv 8 w w @  5 @ p- @ N F 5%ww  F5   @ @m@ & ( N F @ @m5 F FwFw 4N F@  w(f ,|P r l @f P  7 >  4,-&f   7  7 7 f@)wtf@wwX fAW @wv f 1 7j 5 ewV 5& w&NL&HH&BD&<@&6<&08&*4&$0&,&(&$&  &&        e    4% m e7 x mv e7x l f \ \ e5L P mH  8> @ * < , m2 e7,  7 N   fN $w w   = c @m5[5 @ @m  Cf %5  @m & % Am 1 #@ @m  @ @m !@ @m & %A Am  @ @m  D-w0 w   5}@p@p@w w t0 & 6  w l%e@ȥ- e@P7 y >   ew& " w2w. @  ( O%   4t4 t  5* %5  %t5%0%9%a%z%A%Z  7@~B~   :ww '_ "_~  pC7|7_}7 _77&33e%7^77 @7(7w77&&& &&&f& f@wvw, f@@& HADCBF7LFABDWSN\Go^LEM[_@CZ]UFVHJPKYRITOXQ 6Dbh~4FVf~.@Tlrxc (B | o < / - - \<-n | ) /| - `c o|' ` '` \ ' '   C ` ! @m5u-u-w  w 5 @ m~  -j @ md AH@5 wd w R  @& Z  @& Z  55 ? ? 5 _  %   m Hj  %   m H  m  $ v 5&f p 5%  mf  D 5   mB H  m.   5   m H -  m _  % 77 7t7 8 f p2e %~@72 8ĝ.%a(0 %WpCe  Z ww  55 N F 2AWp qu&55 AWp qAWp qWpCfAWp fe &e %5  5pC& e ww N& Z e%ww  7:7 5 Aq55@7d5 5&@pVp@@50 ;= 55 @@m / \u, \ - - /- , ( /u uO - - o ` ` ` o/o[]/- '' []- '` - " " [] [] - o | o ~ > - - t ~~ O-O=c , c ` c , <  0   m H -  0 0@ww  @ȥ- 5 F7  @&  ?N  @&  ?< H ? L @ mB 6 p au-_( @ m A m A H  u-@ m 5@ 5 @ m  u-@ m 5@ mHNffff P e@ 5u^@ m^A mTA H @ m@  %@ m& 5@ 5 @ m  %@ m 5@AHt %%e %5 @@mAHt %}ww  hw  mT AWp `@ҋ % -* w 7 pD777w77@ w f W57 7 5 r 57 5557 5557547   r      0! r C  &8 (%w7    ӕ- ӕ0B~h ӕ.  ӕ0~ B~7F <   ӕ-ӕArgentina:Buenos Aires Bahamas:Nassau Barbados:Bridgetown Bolivia:La Paz Bra[z|s]il:Brasilia Canada:Ottawa Chile:Santiago Colombia:Bogot['a|a'|a] Costa Rica:San Jose Cuba:Ha[v|b]ana Dominican Republic:Santo Domingo Ecuador:Quito El Salvador:San Salvador Guatemala:Guatemala Guyana:Georgetown Haiti:Port au Prince Honduras:Tegucigalpa Jamaica:Kingston Mexico:Mexico Nicaragua:Managua Panama:Panama Paraguay:Asunci['o|o'|o]n Peru:Lima Trinidad[ and Tobago|]:Port of Spain United States|US{A}:Washington Uruguay mHNffff P e@ 5% N&  P e ww u-u- cNf . u-a u- dc N f .  ff x eu-u-   f f x e u-   ww u-N  u-N  u-N  wpw ^u= @ @m&f %@ @m@ @mf ef %5N  5 @ @m .$ B~ӕe ӕ- ӕ+ r e0e0Sw ~wDe   % w7 l7 lׯb- Z X(wL7 N .wBeB J ӕ- R r f e0 @ > ҋ D~8 ӕ0 $f v Le0 9e F  7twe&  mX V ~    ~ w7 *  0   Wp `e0f ,P  :Montevideo Venezuela:Caracas  u- u-ww ~wDe   % w7 7 ׯ-  (w|7 ~ .wre$B J ӕ- R r f e0 @ > ҋ D~8LP ӕ0 $f v Le0 9e  7we&  m  ~    ~ w7 Z P L0   8Wp `e0eӕ?f  ,P   @f @f  7  -fw JA 7 ^fAW,f B@ 8 @&61fA   @ @e7@ 1@  1w`f BRf@f =f 5= @& HADCBF7tFf5w * f5w }7 ldW&f! 7 L@% @@A&@!7> @L> Be0# @  7P T-f@w f@)wfwZJA 7 ZfAW,f B@ 8 @&61fA   @ @e7z1@` 1wfw\wXfwf@w@w<lwf,(wm"rwwmfwrwxw f@wwxwN f@ww~w*f@@& HADCB!є !    BA   W !e B@e0!m ` !eȐ9 ȕ0 !ȕ1  `0!!VV 7N"PP7 \EDE!wEBED5!5! w |W!w B w\    2wW! B  w B  wr H w\ 0 w\   BE7EUE@xU@p l "E UUN"p|v 2 bN: & 6 t w @ E57` B%b f e|-xtww p f  %w\w J D- w8@56t@m5)tBm@,","@5ruJt5u-Ӈ D-w @  5@t@m @mAWtAmH u- @ @mA AmH u-ww.w @   N @ WtF7FfA7z fA @e7t1@  1 @ Out of space Cannot open Arg count Jackpot * --- . . %d%d,%df& w ^  vv`D D`D e    incomplete line omitted d o x f$ e c s l2 rwww &w UBE? e"CE eL"@E xb5e55@eYL" H e" 5@> X"; Z"66  Z"^" `&e  Z"   Z"|evbww5Q$"  " f   EU P5   P"fPPQ7 5    5 C B A  `5n  5V  5D  eE p @ @ & w w f Z %p fN f} f    2B 6 0wf w T  t @m0  D-0C- -t@mWtAmp,t@mWtAmp,t @mt @m0 D-@ t@m0  C- & @m WtAmA Ht@mWtAmp,  @m WtAmH @m wd w R % @- e% f  B7 7 7 @&  @ "  "$ $5 $$ 5  5  "5@  wL   w>" "n (    5@^  @ B    & U0w"  w" www  7  a UW 8U" W 8E"fc     `  ""-lv a h h   "  "a  ! p  ""R B" W !W e UETR5  5  Uwp   " "   7 r@"r@"  e  JW!$"W!4" 5N7 Fe  , 04& f"    ""$ $$$"& N & N  N N S C B A  eW! "Շ w^ m  rf"5e        W!""P    0&"d& dN & dN dC N eN e-- fe  2    w))IyYhyiputcall kput obuild seekchar getchar outb outw outt cfile lfile flush iget sptr generate succ getnam"ignore.o Bd < 5w9)fn succ iget ignore"inc.o.o toct trswitch#trace"trans.o T 0 w)gsucc iget trans"tx.o.o l<  w)igenerate obuild .tx".txs"unary.o p0   N w succ .ng".nt".cm"f.oy.o 3|06 w)9.f"succ seekchar  Ehlptx|dpwZt`xDJanFebMarAprMayJunJulAugSepOctNovDec/usr/adm/wtmpNo %s %-8.8s%6.2f total%9.2f %s %2ddox0f>ecslLr> |  X^" ( DV,Z G$T w w w w) ) succ .u update .ia" .ib".da".db"infix.o L8T c  S  N C 6xw .p sprv .a".s" .o".n".x"*lvrv.o W\$ww)).lv".rv"succ getword putoct.o |x"$&E@  e0  putch obuild putoct"arith.o td L ) >%% 6!w &&-  %w)9Y succ fail iget seekchar getword alterwor sprv"Pupdate",.l"".u".p"    mult.o \6< 6pv  r6  rvwIII9.m".q".r"".p sprv octal.o a `  w w)9iIYiputcall iget kput putoct generate succ octal"params.o fH  A1`w(8Ifiget env si .t".st"ctest.o "` & 7 9(Yfj classtab jget ctest"putcstr succ ctestc"cstr.o  7 w7 ~v rW 1 &\4 wN D >w 8 0W @  ~wv )y9Ymend.o . end"any.o lf w w8yi8YIifx j succ fail ctest iget any"append.o t0 &  w) succ putcstr iget append"bundle.o $`  @@e wI(9Yfgg1 succ params"push.oo l($ f && f   succ iget push"putcal.o q<` TA 1W 7translation overflow(((HX9fgk errcom ktab ktat putcall"kput" putdec.o vD$  &-  vr f @e0w<wIi)jget iget succ create rewind putchar getchar allocate smark"rewcstr" putcstr"getcstr"Lsize"~cstrwcstrrcstrtcstrbsympjget.o RT\ XA@E@7  D7` 0` @` p= W  9(Hfj n inputpbundle iget succ bundle"reduce"char.oo `  w&  w9yI(ifij jget iget char"succ fail copy.oo x`W B e 2 7translation overflow2E w wi8HXH8yfix k-32768  putch obuild putdec"px.ot.o 0N  >ff& > w5 %wI8(Y(8y8(8ifij n iget jget succ fail .px".pxs"litcLreln.oo <Zx -# - - -  classtab jget"jgetc\inptinpr$readc^inpb` ktab ktat putcall obuild errcom succ generate rewcstr getcstr scopy"decmal.o  `  w w)9iIYiputcall iget kput putdec generate succ decimal"discd.o $\0  w) 9release discard"iget succ emit.o )F`fe#W8@!q # u -  -w6 w .p sprv .eq".ne" .lt".le"$.gt"0.ge"<trueHfalseRshift.o d0  vvw .p sprv .sr".sl"stack.o |nw W8  Ae@fD W4P w8& #  w~6 & 6  w %U7 >  7D7> 727,5 /r& %!         %CF` % )%&@   p@ @m& $ @ @m  1%  j b% % @ @m   * ~ %vzz % u-_&%         ww  f  %ww @5 wX)9hhhIfgofile dogen succ g1 k emit"find.o 8P&  w& && ee 6e  &   *  ew |6 r n j b6 V R N F  >ew2 Yi(8 9ixI9iiYfigsucc pbundle goto iget g1 stack"unstack" gotab"Laccept" string.o T N& wY(I(9fij succ ctest iget string"table.o &H f w ~wDe   % w7 n7 nׯd- \ Z(wN7 P .wDe"B J ӕ- R r f e0 @ > ҋ D~8JN ӕ0 $f v Le0 9e  7vwe&  mZ X ~    ~ w7 , " 0   Wp `e0eӕ?f ,P   @f  7p Y iIilptr rptr sptr succ fail iget find"enter"seekchar getword getchar putword putchar alterwor getcstr rewcstr length rewind indextableptempwhichframelright left(nomorelfoundgetnam.o =j!   w)9Iallocate putword putchar iget succ table"tq.o.o ,@AuuA Ce5 wA 1`wh88X(Hhx8hfiek ep ek.fs ep.fs si x fs generate .tq"gpar"0gq"trace.o x<   )iputch puR-f@w fw,XJA 7 @fAW,f B@ 8 @&61fA   @ @e71@^ 1wf@wwdwf@wpwljwf@f& CB  ԕ-   e0fv   vA W  ~w @BB BJw0w BBdb@ BJw@& HADCBF7F: cannot open %7s %7s %s %7s %7s total bdoxfecsnlr&w & 7:< A A_p_@5@ 5P`5 @ 5a @ af f 5@ ; 1l__@ 5_ @ af f 5@ ; 1l__; pa;A - 9@ _@ P`Nm X@A @a  NA - @ a@m  *@ _@ P`Nm @A @a  NA - @ A @a   3NN@ lP` @ a@m  *NB - @A @a  NN@ lP` X /V: AAm -%w w  NG - RJ@ a NG - @ D7+G - J G -+ 0 P`+ _+ Ia 8@ IfG -%wjw X@ @A p\ @'NG - @ 5 @ \G - -?@ \G - ? ?p\ww G@ 5\5 u n? @ \G - @ \e5`-D?_| 55@@m55 .@ \ _@ \ P`f f 5@ \ P`f f 5@&),/25!$'*-036"%(+.1478;>ADGJM9<?BEHKN:=pP` N>: a4: &P`*: &_fff:B -eN  N  N w#w #  79@ 5_9 A AP`upP`NN f f 59 A p_~9 p-_p9 P`f96B - |f  N>B - |f   / 9 A Aa  ` pa xMNf8 &af8 &P`8 &_DB -e N w~"w l" N X5 N / *  u-N X w."w " 5@A7e5` u- > NffG -e@@m55 @ \ pP`@ \ AAmp_@e5` u- u-u5 5 -@ \Nm f @ \@m &\ H%@ @al)$f) 5la @e5` u- 7>) A$ p__,) A$ pP`P`) A Am epa =( a( &P`( &_ff(G -e (%H - 5 @ @-6HN@ @a&$.H -%@ @a$  u-7H -wW &  %7 B <AZW - AA& A  nA  8<'TALA&L :A2A&C$AA&RAA&-;R' ;@7B'7 <'@@& @@& @@& _B @ 0_ b;@&L H%p@7F;_ >;^@&C,;L@&R;:@&- ;&@@&@&fW -e@ ?? lapa@ 5_@ 5P`@ 5_@ 5P`NFV@ -% 5@@ 5@-uN XNd@ - N N f f E 1P`NN & f @m4E pP`@ 5@mAA@ @@@5N Nj@ - N XNNm f f "E 1_ / Y! E aE &_D &P`@ &fffDp@ -eN N w.w n. wDt 7D@ P`@ &P` f 5@ _@ P`@ &_@ P` f @m paa_NB - @ P` X@ a l@ P` w w55B - N %N %N *%N XNB - %@5 1P` %@t5 1`P` Id5 P`Z5 &_fffB -e ww  p7(5 0 P`5 _%quR%~FJ%^FB% F:Cf ' 5 5C+ 7O7ONf  %O N F %vO@m lO5`O04c4cN >V4 1a H&?& _" ??&?& _" ??&?& \_" ? ?&?& %7 %_  n?& d?& _" T?L?& _B >&>>& _B > 7%_ H%_ B%_ N$_ D$_ T$_ U$_ x>{$_ }$_ 69 09P>p\_ 9 98>p\_  _ >q _B >c=5BD 1_8D pP`,D A AaB lapa XD affffC@ -e NfC@ -eN N w~-w l-wCwp-w ^- 55%0%9 AWp Ameu@@m 5 W Nf@ -%@w-w ,w2Cw,w ,w$C WC@ - w,w , D7B@ 5_B A p_@ 5B A pP`P`B A Aaepa &WB aB &_B &P`fBA -e pB)A -  * F4 a<4 &_24 &P`f$4f+F -e N 4PF -%ww 5 ! %%%\\%\e%  @ 5@w`w N@C7J/ y@mnNȥ=bNp4c XNTN4c JNFN_4c 2 >K2 27g2 @ 2 p x27>%  :d2 t> :-::7 N2 !8 N0: : m:& x0 78: m:1[ %w w  5% % 7#W71 yKHE*B+?7 B&%\ 5%"vB\jf lBhBpjf ^B%XB jfE[ % 5%"2B0jfjfl"-P= w Njf | / u- @ a l@ a *N XN4A - N w+w + ,7A%- 5@@5 5@@m 5 555u@ \ 5l_@ \ af f 5 u-XA A upAmp_@A pa@ 5@ \ _@m5` u-A C r A A\ AP`AmAA pP` JU2N@;A -%u @ \PA - u-@ a@ &P`x@ &_VA -eb@gA - T@ P` 2M &M$M"Me &M &F -eF - L  / /  wL /%   /%  \dF - d 5HH.@N-L Lw J 5= % @-XL@-NL = @ww .%d 5%  dF &  %0 <A Aa1d@ @a&F -% \ @ K  @ @aKd 5-K A Aa1d@ @a&F -%5 @ @aF - @ @a& \bjf ' 5#% 1 1e[ % 00 A pbh0 0g0_%Ujf ' 5@ %dV @_%@ %dV d_%@ %dV _%@ %dV _%@ dVw & 7 &AM M I{E}A"=~9^5@-<0\ 5%"@@mȕ\ @@@mH @%@ N|[ % 5 {}"~ ^  @-|;@7`/@m8@wt w6 w $      @m`@X%R>@ a @ 5u-_` @ \ 5_@ \ 5P`@@77 yN @ \qA - @ \ a *NNNm wA - N @ \ a *@ \zA - NNNm AN F? aA A\ @a  @ \A - ? aA A\ @la  *NNNm A> _> P`Nm X%R> a  /u @ \  u-wD(w 2( 7l>@ 5_@ 5P`@ 5  u- / ww  DNF - @ 7_J@ 7P`JwJww  @w@ w u-@w@w r  A@]] @ %dNG %w@w .@0]w0w  wFwF F;F-5pF7l- ypF7J`F7I NFeJFvCE-F-R-B-S - F d07D  F& x0 7C @G %7 H d07OEEwBw 0w:w (7 B Cw*w  'G -tO /` @` w  @m w  5% % %  5 5@-'@@mH }% % @@mH 5% @@m@wJ w 8  |5% % jf & \bjf ' 5'7B> b - 3 * \b[ - jf ( 5 @jf, 9 95  @jf - 1\b5  \b@mAHjf N - 1b5   b@mAHjf 2f b\ &\b[ -%_@ 5P`@ 5_@ 5P`@ @m@5@@m@-@@5@ 5@mAA@ @@@5NNN& f &f & %e@m= 1_NNN& f @mx= 1P`@ a@ &a f A @laJ= 1aN<=A -%N XNA - @ a *NNm NA - N X@ A p,aa @ a@ a  / 2QNff<A -e Q< a< &P`x< &_A -eN N N wlOdO 7G -Nf - dEbEZE m\E&EG -e /wO  1ww  ,+N L5+ /N /@  wdw R ++N L5+ /+ /@  ww  r+n+5N L5N /@  ww  0+,+5N L5N /@  ww _ /@  wzw h @ 7aJ 7,hG - , |,  JapP`f, _ @ JfrGww  7$978 jf ( V<79O<7 9%o9%f%O8 %F8 7878ww  5% % jf & jf 7 787wxw f 7% %  7z87wRw @47 007 07 0@e5"h7 0 0R0[ -ee0e6,60 Q eH5@5eE5@t _:, x[ b0  `0  7V0[ - F0 7<060@-ew 00 0 0 0N\ - @ R 5@ R 7557JN @ 4R T eS5 e}/@7/_* w/  x[ n/\ b/-@ Q eH5%'e@t% "/ @f\ -%$5@e@-͆@E7._* ..I\ - .._+f&UT/UP/De D/.E 6/' 0/$ 0 7 00 0!  " # $ + - , * . % ' & ( )     " % & ' ( ) * , *E *F *G *H !  " # $ + - , * .   % ' & ( )     " % & ' ( ) * , "0*N P Q R S D0E0F0?0@0B0A0P Q R S *V K0L0M0N0O0P0Q0R0S0T0 0: ; !2 #9 $8 .? /A 0< 1@ 2= 3> 000&0H0I06070001020pilecpilerpileoversqrtabovesizefontromanitalicboldleftrightdelimDELIMDEFINEdefine.gsize.GSIZEgsizeGSIZEgfontGFONTHATDOTDOTDOTBARTILDEUNDERPRODINTINTEGRALUNIONINTERSUMFROMTOSUPSUPERSUBPILELPILECPILERPILEOVERSQRTABOVESIZEFONTROMANITALICBOLDLEFTRIGHTupUPdownDOWNfwdFWDbackBACKmarkMARKlineupLINEUPmatrixlcolccolrcolcolcan't open file %s quoted string %.20s... too longdefinitions nested > 9token %.20s... too long. define %s . name %s defin~w`;DeV;  P; % /w7 <;7 <;ׯ2;- *; (;(w;7 ; .w;er\B J ӕ- R r f e0 @ >: ҋ D~8\\ :ӕ0 $f v Le0 9eh:b: Z:T: 7D:we&  m(: &: /~  /  /~ w7 9 9 90   9Wp `e0eӕ?f9 ,9P 9 9 @f 9 fi7,x9 \304050.? /A 0< 1@ 2= 3> 0.? /A 0< 1@ 2= 3> 0#9 $8 .? /A 0< 1@ 2= 3> 0!  " # $ + - , * .   % ' & ( )     " % & ' ( ) * , !  " # $ + - , * . 0 1 % ' & ( )     " % & ' ( ) * , -g <0: ; !2 #9 $8 .? /A 0< 1@ 2= 3> '0: ; !2 #9 $8 .? /A 0< 1@ 2= 3> (0: ; !2 #9 $8 .? /A 0< 1@ 2= 3> )0: ; !2 #9 $8 .? /A 0< 1@ 2= 3ed as %s N,Z,Z,,>,T+++8,state %d, value %d, char %d character %d read reduce %d syntax errorerror recovery pops state %d, uncovers %d error recovery discards char %d l\j\l\l\`.d.o.x.f/e.c.sl.l/rfik0fin9f9-`9X9f f-~]`-X-~]  7H- D- @-7 9 7 0-f@w f@)wfw(,w$,\wf,,wm ,\wb+wm+fw+\w@w+ fAW @w+ ffk1fk7+ 5 e61w+\ 5& w&*:L&$:H&:D&:@&:<& :8&:4&:0&9,&9(&9$&9 &9&9&9&9&9 &9&9&9f& f> *0 n o p q C0U0V0W0X0G08090!  " # $ + - , * . 0 1 % ' & ( )     " % & ' ( ) * +r , ,0-0.0/0#9 $8 .? /A 0< 1@ 2= 3> 0#9 $8 .? /A 0< 1@ 2= 3> 0#9 $8 .? /A 0< 1@ 2= 3> 0: ; !2 #9 $8 .? /A 0< 1@ 2= 3> $0: ; !2 #9 $8 .? /A 0< 1@ 2= 3> %0w +v !  " # $ + - , * . 0 1 % ' & ( )     " % & ' ( ) * , =0w +x w +y F2 & 6  w $Ne  @E%  7(@& r  1FNe@&  @E%  e@ %    x& %  wJ2xx % w  V @55 &5 @@@-NNNfex@ &F % -umu-wfww\wf@wbw f@wwfwlfwwlwN @@& HADCBF7:7F-CLRV. b:bob: S%d <- S%d over S%d; b=%d,h=%d,w=%d .ds %d \*(%d\*(%d.ds %d "\*(%d\*(%d\*(%d. b:b shift b: S%d <- S%d vert %d S%d vert %d; b=%d,h=%d,w=%d . e:eb: S%d <- S%d S%d; b=%d,h=%d,w=%d .ds %d \*(%d\*(%d . numb: %s %d . shift: %d . sqrt: S%d <- S%d;b=%d,h=%d,w=%d .ds %d \e|\*(%d . S%d <- %c pile of: S%d;h=%d b=%d,w=%d .ds %d \ \*(%d\ \*(%d\ \*(%d\ .ds %d \*(%d\*(%d\*(%d. shift2 s%w +z !0P Q R S +| n o p q +~ 0* * * * 0000J000000:0;0 0+0#9 $8 .? /A 0< 1@ 2= 3> 0: ; !2 #9 $8 .? /A 0< 1@ 2= 3> #0!  " # $ + - , * . 0 1 % ' & ( )     " % & ' ( ) * , >0w + w + w + w + 0000>A|}!"#$%&'(3456789:;<=>UVWXYZ[\]^_`abo|3f@wvwrrw*f@@& HADCBF7<Fd <- %d %d %d h=%d,b=%d,w=%d BDHNTU6*h.ds %d \*(%d\*(%d\*(%d. from to: S%d <- %d f %d t %d; h=%d b=%d,w=%d .ds %d \*(%d. curly: h=%d b=%d n=%d w=%d l=%c,r=%c .ds %d ^ .ds %d ~ .ds %d .ds %d ...ds %d .ds %d .ds %d \*(%d\*(%d. %c diacrit: S%d <- %d; h=%d,b=%d,w=%d .ds %d \*(%d . move %d dir %d amt %d; h=%d b=%d D DDDDDD#D)D/D5D8D;DADFDLDRDXD`DfDlDsDwD}DDDDDDDDDDDDDDDDDDDDDDDDEE EEEE E(E/E6E:E>EBEFEJEPEVEXEZE^EbEfEjEnEsEwE{EEEEEJajklmnopqrTY^cdoz{~    IWwILOPSVY\_beQTWZ]`cfRUX[^adghknqtwz}ilorux{EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE<=>\ >=<=!=+-==cdotCDOTtimesTIMESSIGMApiPIalphabetagammaGAMMAdeltaepsilonomegaDELTALAMBDAPHIOMEGAlambdamunuthetarhosigmatauphiINFINFINITYinfinfinitypartialPARTIALzetaetaiotakappaxiomicronupsilonchipsiTHETAXIUPSILONPSIdelDELnothingNOTHINGapproxAPPROX>_<_/=+_=_8.98.9xxRJPAB\eGDSCWEFZLM@TKYIb/BC DJKLM2\3]4^5_6`I/W/b/tu/hh}ijFcGdHeaklms]t4 3f5_u67TU*X+Y,Z-[g{O 579=?OQSUW[]_acegikmoquwy{}5WWWWWWWWWWWWWWWWWWWWWXX XXXX#X*X0X6X+D;62(!1 -:".?:H5&  * $ <6:(E    -3$ =8 K  8-  G55K.'E IF%  ) >'  $#Uoooo]]QNikXouXVOXUH[[~=~=~\tconverted token %.20s... too long. %ctext: S%d <- %s; b=%d,h=%d,w=%d .ds %d "%s 8998~dfs22> I.tr ~ %s.ne %d .rs 'sp %d \*(%d 'sp %d .EN%smissing right delim (?) at %.20s.ds %d "%s .ds %d "%s\*(%d. answer <- S%d no strings leftcan't open file %sNEQN ERROR HEREfatal error: file %s, between lines %d and %d .ds %d " . mark %d as %d .ds %d "\*(%d .ds %d " . lineup %d at %d SYYY]YaYeYjYmYqYuY|YYYYYYYYYYYYYYYYYYYYYYYYZ ZZZ Z&Z,Z2Z8Z(-B    ,I 0,"/ *$4. %c column of S%d, rows=%d \ \ . colct=%d . row %d: b=%d, hb=%d . matrix S%d: r=%d, c=%d, h=%d, b=%d, w=%d .ds %d "\*(%d%s  & , F \ j n |   !!.!F!V!z!!!!!$" D"j"n"""""""####(#2#<#F#P#Z#  d#n#d#x# ##      ## ####$$$$"$($  .$8$ !  " # $ + - , * .   % ' & ( )     " % & ' ( ) * , 0@!  " # $ + - , * . 0 1 % ' & NTABUPDOWNBACKFWDMATRIXLCOLCCOLRCOLCOLMARKLINEUPSUMINTPRODUNIONINTERLPILEPILECPILERPILEABOVEDEFINEDELIMGSIZEGFONTFROMTOOVERSQRTSUPERSUBSIZEFONTROMANITALICBOLDMQMQ1LEFTRIGHTDOTDOTDOTHATTILDEBARUNDER$acceptstuffeqnboxmatrixcollistcolumnlcollistccolrcolcolsboxsupersizefontlpilecpilerpilepilesubleftrightpboxfromtodiacritfwdupbackdowntextsupsupersub.ENsumfromtohatdotdotdotbartildeunderprodintintegralunioninterpilel75L 5 4'U;3 *;)G3K.S /( "-+7    K     ;,      .      %  2 -  8                        #        1        -2       5                               ;    '   -   !            @  >                1  %         &B      7         z40  & 6  w Ke'@ȥ-e@ȥl N@ȥa M@ȥv Mu e% f  5 N  Mf %%"M%M % M N MhMLmL7ZM%L NM HMef %   5 Mf J Nf %Nf %dNf %pL L Wp@7LLWpN2Ef %`L E7VLPL E7FLLN 7 @L;7 *LI         # L1M L% LK]LL%"!K E7K2LK7 K$LmKKHM K%KeL K L L K N XKeK2EKWpe2EA-(K-KK@eKA @ KAp~KApeefK&K e KKw K7 KN 7 J_8JJI 7J J_47J7J JH7J7J7J7J7J7J7J7JwJwJ7J7JxJ AwJ7pJ7 bJ=\JWp-^J 9LJWp-LJ+C ҋ D~8jn Bӕ0 $f v Le0 9eBB F BB 7Bwe&  mB B          n ~  n   n ~ w7 ZB PB LB0   8BWp `e0f@wrw` fwvJA 7 AfAW,f B@ 8 @&61fA   @ @e7 1@| 1wfwj wf wfwR AQ  OfA  ^ y   F y @0fA  @9 fA @e&7 w 7 @w7 x@      jmpsvy|w w l@wh@AupNNmf  ww @@@@5 _p fA rBpEu@@`55DCN& t f& ?%5 2`D--`f t $`f& %`Df ?%5 D-& t C-D-%@@AA@ Nf`  u_*Nf  @`5_*f %Cw@w . >DCԒ ww >DCB5ҒS wf@w w wf@w w w f@f&xNCB  ԕ- xN e0fv   vA W  ~f =f 5= @& HADCBF7=Ff5w * f5w }7 ==W&fN 7 =@% v=@A&@N7R @L> Be0# @Nє N    BA   W Ne B@e0Nm <` NeȐ9 ȕ0 Nȕ1 <x & 6  |w   Fww@7,@&   t@77 @ @m %  | J5  |w-   |Nff eww  H5 F5&  ^ f %w @w  H5 5&   f %w P@w d   |  5&  &V %w(  w   78  6 -f   7 ߬ 7 7 f@w fww p<wfw7^ fwxwtBwf@w\wXHwlf@w@w<NwJ fw&w"Tw* f BRf "& w }f@fA w,w"e"w"ew"@lw"Alew &@t`e  <`0NNVV <<7<NPP7  O; O66  O:O `&e  O   O:e:bww5Q$N N f   EU P5:   PNfPPQ7 95    5 C B A  `59  59  5z9  eEN  "$ $5>9 $$ 59  59  N5@8  wL5 @f_VEf d@b`c  5 f_VKf \ 5Q &  f_VSf  5W |&  f,_VNfY % |w w WpqrWpqtWpqvWp er@w w -pw | vmvw w^ Tq   @aȥ/@a 7, @aȋf@    tw w* w  @&@ t read %s ...--%s ~doxfecsl,r  %ew   w>N N8 (    5@8  v8 B    \8 Uf8wN H8 wN 48w88w08w  7 8 8a 7U88W 8UN W 8ENfc     ` NN-77 a h h   N Na  ! p NNR BN :7W !W e UETR57  57  U6wp   NN @&@ w w @&@ @&@ w w @&@  w w p @> wh w V .y  wN w < @@&,WpWtf %w w @@&WpWtf %w w @@&& %w w @p  w w @@&t& %w w v ĝcu\tEQ@@&& %wP w > @%-5 AA @@EA@, w   7 6r@Nr@N  e  JW!NW!N 567 |6e  , f6j6\6 fN    NN$ $$$N& N & N  N N S C B A  eW!NՇ w^ m55 5 rfN55e        W!NNP    0&Nd& dN & dN dC N eN e-J5T5@585u>(\EEa.outCan't find %s Bad format: %s mon.outNo mon.out No symbols: %s No time accumulated w EA@, w w @ w w 5 @ m&} % 5%y 5  @ wn w X +u-  AWpA-w< -u-w  p 55%f &f @ @a @ @ap@ m 5@ @a0  w D Ne \ANfef %5  @@mp @@m5@@m0 Nfefe %Nfef %.nr DO \n(.o .nr tm 0 . RT - reset everything to normal state .de RT .if !\\n(1T .BG .if !\\n(IK .di .ce 0 .ul 0 .if \\n(IP .in -\\n(IQn .if !\\n(IP .nr IQ 5 .if \\n(IP .nr IP -1 .ft R .if t .ta 5n 10n 15n 20n 25n 30n 35n 40n 45n 50n 55n 60n 65n 70n 75n 80n .if n .ta 6 11 16 21 26 31 36 41 46 61 56 61 66 71 76 81 .ps \\n(PS .vs \\n(VSp .fi .. . IZ - initialization .de IZ .br .if n .nr y 0-6 .if t .nr y -1i .nr x 0 1 .nr IP 0 .nr IQ 5 .nr PS 10 .nr VS 12 .ps \\n(PS .vs \\n(VSp .nr TB 0 .if t .CM .if t .nr L/dev/vt0Cannot open vt name %%time #call ms/call %8.8s%6.1f%6s %7.2f  dn oh x f eF cT s$ l r> $$$$$$ $$Df`V$$h2Nzf(4DTd |  w    7 5F @e5@ ȋ6 =%:=Nfe  5%:@e5 =%:=Ne 5 l76 @w0w DC ԋ w ̢̢w f & N  _ ff % E%@_  5 _ @@%@@5 f  5N  ff %Nfef % NN l _ t@a hL 6i .if n .nr LL 60 .ll \\n(LLu .nr LT \\n(.l .lt \\n(LTu .if n .tc ~ .if n .tr ~ .if n .ds CH "- % - .if t .ds CH "\(en % \(en .ds Ch \\*(CH .if n .ds CF "\\*(DY .wh 0 NP .if t .wh -1i FO .if n .wh -6 FO .if n .wh -3 BT .if t .wh -.5i BT .if t .nr EP 10.i .if n .nr EP 60 .. .de TM .pi /usr/bin/col .nr ST 1 .ds MN \\$1 .nr MM \\n(.$ .nr tm 1 .if \\n(.$-1 .ds CA \\$2 .if \\n(.$-2 .ds CC \\$3 .rm RP .rm S0 .rm S2 .rm AX .. .de RP .nr ST 2 .rm SG .rm CS .rm TM .. . TL - title and initialization .de TL .nr TVl  disk offset J7N tape offset 076 count  T      0 Wp `@ illegal digit lr-l  P eP5Ћ 4R`ȋ  `e `R7    0 rf rv@>1ɋt&Nae Zt&Nae Lt@a%K  @`A`pr@`/q@a/r  %  @a WtAa`pr@`0rN f@&fer e N  @t!eu-_Z ww .. wNf w C@57^ y 2x78 y , N f w@    A @@P5  D   Nf   w Nf  1 .di WT .na .fi .if n .ll 50 .if n .if \\n(tm .ll 30 .if t .ll 5.0i .if t .if \\n(tm .ll 3.5i .ft B .if !\\n(tm .ps 12 .. .de TX .rs .if t .sp .5i .if n .sp 3 .ce 1000 .if n .ul 1000 .ps 12 .ft B .vs 15p .ne 4 .WT .. . AU - author(s) .de AU .nr AV 1 .ad .br .di .br .nf .nr NA +1 .ds R\\n(NA \\$1 .ds E\\n(NA \\$2 .di A\\n(NA .ll \\n(LLu .if !\\n(tm .ft I .if \\n(tm .ft B .if \\n(tm .if n .ll 16 .if \\n(tm .if t .ll 1.4i .ps 10 .. .de AX .ft R .rs .ce 1000 .if n .ul 0 .ps 10 .vs 12p .if n .sp 2 .if t .sp .  ww ~w De   % w7 7 ׯ - (w 7  .w eB J ӕ- R r f e0 @ >T  ҋ D~8.2 2 ӕ0 $f v Le0 9e    7 we&  m   ~    ~ w7  0   n Wp `e0eӕ?fV  ,L P B <  @f A1 .if n .sp .if t .sp 0.5 .I1 .if \\n(NA-1 .if n .sp 2 .if \\n(NA-1 .if t .sp .A2 .if \\n(NA-1 .if n .sp .if \\n(NA-1 .if t .sp 0.5 .I2 .if \\n(NA-2 .if t .sp .if \\n(NA-2 .if n .sp 2 .A3 .if \\n(NA-2 .if t .sp 0.5 .if \\n(NA-2 .if n .sp .I3 .if \\n(NA-3 .if t .sp .if \\n(NA-3 .if n .sp 2 .A4 .if \\n(NA-3 .if t .sp 0.5 .if \\n(NA-3 .if n .sp .I4 .if \\n(NA-4 .if t .sp .if \\n(NA-4 .if n .sp 2 .A5 .if \\n(NA-4 .if n .sp .if \\n(NA-4 .if t .sp 0.5 .I5 .. . AI - authors institution .de AI .br .ft R .di .di I\\n(NA .nf .. . AB - begin an abstract .de AB .br .di .ll \\n(LTu .nr 1T 1 .nr IK 1 .di WB .rs .ce 1 .if t .ft I .if n .ul .ll \\n(LTu ABSTRACT .sp .fi .if t .ft R .nr oi \\n(.i .if n .in +\\n(.l/12 .if t .in +\\n(.lu/12u .if t .ll -\\n(.lu/12u .if n .ll -\\n(.l/12 .br .ps \\n(PS .if t .ti +5n .if n .ti +5 .. . AE - end of an abstract .de AE .br .di .ll \\n(LLu .nr 1T 0 .nr IK 0 .if n .in \\n(oi .if t .in \\n(oiu .di .ce 0 .if \\n(ST-1 .SY .rm SY .. . OK - "other keywords" for cover sheet. .de OK .br .di .dt. .de DS .KS .\\$1D .. .de CD .ce 1000 .nf .nr oi \\n(.i .if t .sp 0.5 .if n .sp 1 .. .de D .ID .. .de ID .nf .nr oi \\n(.i .if t .sp 0.5 .if n .sp 1 .if t .in +0.5i .if n .in +8 .. .de LD .nf .nr oi \\n(.i .if t .sp 0.5 .if n .sp 1 .. . DE - display end .de DE .ce 0 .if n .in \\n(oi .if t .in \\n(oiu .KE .if t .sp 0.5 .if n .sp 1 .fi .. . KS keep - for keep release features. As in IBM .de KS .if !\\n(IK .KQ .nr IK +1 .. . KQ - real keep processor .de KQ .br .di KK .nr TB 0 .. . KF - floating keep .de KF .n .ta \\n(IQ+1 .if t .ta \\n(IQn .ti -\\n(IQn \\$1\t\c .. . RS - prepare for double indenting .de RS .in +\\n(IQn .nr IP +1 .. . RE - retreat to the left .de RE .br .in -\\n(IQn .. . CM - cut mark .de CM .po 0 .tl '-''' .po .. . B - bold font .de B .ft B .if n .ul 1000 .. . R - Roman font .de R .ft R .if n .ul 0 .. . I - italic font .de I .ft I .if n .ul 1000 .. . TA - tabs set in ens or chars .de TA .ta \\$1n \\$2n \\$3n \\$4n \\$5n \\$6n \\$7n \\$8n \\$9n .. . SM - make smaller size .de SM .ps -2 .. . LG i OD .nf .ft B .. . CS - spew out cover sheet .de CS .br .di .if t .pl 15i .tr ~ .if n .sp 6 .if t .po 0.5i .if t .sp .5i .if t .lg .if t .ll 7.0i .nf \s24\(bs\s12\fB Bell Laboratories \s16\fRCover Sheet for Technical Memorandum .sp .if t \s6\l'7i' .fi .ps 9 .ft I .if t .sp 2p The information contained herein is for the use of employees of Bell Laboratories and is not for publication. (See GEI 13.9-3)\p .ft R .nf .if t \s6\l'7i' .sp .if t .ll 6.0i .if n .ll 30 .if t .po 1.0i .ps 9 .if t .ta if !\\n(IK .FQ .nr IK +1 .. . FQ real floating keep processor .de FQ .br .di KK .nr TB 1 .. . KE release - everything between keep and release is together .de KE .if \\n(IK .if !\\n(IK-1 .RQ .if \\n(IK .nr IK -1 .. . RQ real release .de RQ .br .di .if \\n(dn+\\n(nl-\\n(EP .if !\\n(TB .sp 200 .if !\\n(dn+\\n(nl-\\n(EP .if \\n(TB .nr TB 0 .nf .in 0 .if !\\n(TB .KK .in .fi .. . EQ default equation breakout .de EQ .if t .sp .5 .if n .sp .ce .ne 2 .ds EL \\$1 .if \\n(.$-1 .ds EL \\$2 .nr LE \\n(.$ .@\\$1 .. . Th- make larger size .de LG .ps +2 .. . NL - return to normal size .de NL .ps \\n(PS .. . DA - force date; ND - no date or new date. .de DA .if \\n(.$ .ds DY \\$1 \\$2 \\$3 \\$4 .ds CF \\*(DY .. .de ND .ds DY \\$1 \\$2 \\$3 \\$4 .rm CF .. .if \n(mo-0 .ds mo January .if \n(mo-1 .ds mo February .if \n(mo-2 .ds mo March .if \n(mo-3 .ds mo April .if \n(mo-4 .ds mo May .if \n(mo-5 .ds mo June .if \n(mo-6 .ds mo July .if \n(mo-7 .ds mo August .if \n(mo-8 .ds mo September .if \n(mo-9 .ds mo October .if \n(mo-10 .ds 0.5i 4.5i 4.9i .if n .ta 10 40 47 .mk Title- \fB\s10 .rt .if t .in 0.5i .if n .in 10 .WT .rt .ll \\n(LLu .if t .in 4.5i .if n .in 40 \s9\fRDate-\s10\fB .rt .if t .in 4.9i .if n .in 47 \\*(DY .sp .if t .ti 4.5i .if n .ti 40 .mk \s9\fRTM-\fB\s10 .br .rt .CT \\*(MN .rt .in 0 .sp .mk \s9\fROther Keywords-\fB .rt .if t .in 1.1i .if n .in 20 .OD .rm OK .rm OD .in 0 .if t .sp .7i .if n .sp 3 .ps 9 .if t .ta 1.8i 3.3i 4.3i .if n .ta 20 35 45 .ft R Author Location Extension Charging Case- \s10\fB\\*(CA .ps 10 .nf .mis nonsense permits recognition of .EQ L, .EQ I, .EQ C . by invoking macros @L, @I, and so forth. .de @L .ce0 .nr LE -1 .. .de @C .nr LE -1 .. .de @I .ce 0 .ti 10n .nr LE -1 .. .de EN .ce 0 .lt \\n(.lu .if \\n(LE .if n .sp -1 .if \\n(LE .if n .tl '''\\*(EL' .if n .sp 1 .if \\n(LE .if t .sp -1-\\n(.au .if \\n(LE .if t .tl '''\\*(EL' .if \\n(LE .if t .sp \\n(.au .if t .sp 0.5 .ns .. . EM end up macro - process left over keep-release .de EM .if \\n(TB .br .if \\n(TB  .if \\n(TB .NP .. . NP new page .de NP .ifmo November .if \n(mo-11 .ds mo December .if \n(dw-0 .ds dw Sunday .if \n(dw-1 .ds dw Monday .if \n(dw-2 .ds dw Tuesday .if \n(dw-3 .ds dw Wednesday .if \n(dw-4 .ds dw Thursday .if \n(dw-5 .ds dw Friday .if \n(dw-6 .ds dw Saturday .ds DY \*(mo \n(dy, 19\n(yr .IZ .rm IZ .rm mo .de FN .FS .. . FS - begin footnote .de FS 'ce 0 .di .da FF .ev1 .if !\\n+x-1 .fs .. . FE - footnote end .de FE .br .in 0 .ev .di .if t .if !\\nx-1 .nr dn +\\n(.v .nr y -\\n(dn .if n .ch FO \\ny .if t .ch FO \\nyu .if t .if \\n(nl+\\n(k .A1 .rt \\*(R1 \\*(E1 \fR\s9Filing Case- \s10\fB\\*(CC .if \\n(NA-1 .CB 2 .if \\n(NA-2 .CB 3 .if \\n(NA-3 .CB 4 .if \\n(NA-4 .CB 5 .ft R .if t .sp .4i .if n .sp 2 .WB .br .if t .sp |8.3i .if n .sp 5 .FF .rm FF .if t .sp |9.3i .nr x 50-\\n(nl .if n .sp \\nx .if t .po 0.5i .if t .ll 7i .nf .if t \l'7i' .if t .ta 1.4i 2.8i 4.2i .if n .ta 15 30 45 .if t .sp 8p Pages Text \\$1 Other \\$2 Total \\$3 .if t .sp 8p .if n .sp .if t No. Figures \\$4 No. Tables \\$5 No. Refs. \\$6 \b'|||||~~' .if n No.  t .CM .if t 'sp 0.5i .if n 'sp 3 .ft R .lt \\n(LTu .ps \\n(PS .PT .ps .ft P .if t 'sp 0.5i .if n 'sp 3 .nr x 0 1 .if t .nr y 0-1i .if n .nr y 0-6 .if \\n(MF .fz .nr MF 0 .ns .os .ev 1 .if \\n(TB .nf .if \\n(TB .KK .if \\n(TB .fi .ev .nr TB 0 .mk .. .de PT .if \\n%-1 .tl '\\*(LH'\\*(Ch'\\*(RH' .. . FO - footer of page .de FO .nr FC +1 .nr dn 0 .if \\nx .xf .nr MF 0 .if \\n(dn .nr MF 1 .if t .ch FO -1i .if n .ch FO -6 .if !\\n(FC-1 .if \\n(NX .RC .if !\\n(FC-1 .if !\\n(NX 'bp .nr FC -1 .. . 2C - begin doubl.v-\\n(.p-\\ny .ch FO \\n(nlu+\\n(.vu .if n .if \\n(nl-\\n(.p-\\ny .ch FO \\n(nl+1 .. .de fs SEPARATOR .if n __________________________ .if t \l'1i' .br .. .de fz .FS .nf .fy .fi .FE .. .de fx .di fy .. .de xf .ev1 .nf .FF .rm FF .di .fi .ev .. .de FL .ev1 .ll \\$1 .ev .. .de HO Bell Laboratories, Holmdel, New Jersey 07733 .. .de WH Bell Laboratories, Whippany, New Jersey 07981 .. .if t .ch FO 12i .if t .wh -1i fx .if t .ch FO -1i .if n .ch FO 100 .if n .wh -6 fx .if n .ch FO -6 .ev1 .ll \n(LLu .if n .ll -\Figures \\$4 No. Tables \\$5 No. Refs. \\$6 .if t \l'7i' .ps 7 .if n .sp .tl 'E-1932-C (6-73)'SEE REVERSE SIDE FOR DISTRIBUTION LIST'' .if t .po 0.5i .ll \\n(LLu .fi .if t .sp |10.8i .if t .po 0 .ps 10 .if t .tl '-''' .if t .pl .bp 1 .if t .po \\n(DOu .. . CB - help with cover sheet .de CB .br .mk .A\\$1 .rt .if \\$1-1 .if !\\$1-2 \& \\*(R2 \\*(E2 .if \\$1-2 .if !\\$1-3 \& \\*(R3 \\*(E3 .if \\$1-3 .if !\\$1-4 \& \\*(R4 \\*(E4 .if \\$1-4 .if !\\$1-5 \& \\*(R5 \\*(E5 .br .. .de CT \\$1 \\$2 \\$3 \\$4 ..e column .de 2C .if !\\n(1T .if n .sp 4 .if !\\n(1T .if t .sp 2 .RT .mk .nr NC 1 .nr NX 1 .nr L1 \\n(.l .nr L2 \\n(.l*7/15 .if n .ll \\n(L2 .if t .ll \\n(L2u .if n .FL \\n(L2*11/12 .if t .FL \\n(L2u*11u/12u .nr RO \\n(L2*8/7 .ns .. .de RC .if \\n(NC-1 .C2 .if !\\n(NC-1 .C1 .nr NC \\n(ND .. .de C1 .rt .if n .po +\\n(RO .if t .po +\\n(ROu .nr ND 2 .nr x 0 1 .ns .. .de C2 .po \\n(DOu 'bp .nr ND 1 .. . 1C - return to single column format .de 1C .nr NX 0 .br .po \\n(DOu .nr ND 1 .if n .ll \\n(L1 .if t .ll \\n(L1\n(.l/12 .if t .ll -\\n(.lu/12u 'ps8 'vs10p .ev .br .em EM  . S1 - tm style .de S1 .if n .sp 6 .if t .sp .75i .if t .ta 4.75i .if n .ta 47 .ll 80 .ps 36 .br .if t \t\(bs .vs .25i .ps 12 .br .ft B .nf \tBell Laboratories .ft R .fi .na .ps 8 .vs 12p .if n .sp 3 .if t .sp .5i .mk .fi .ll .if n .ll 40 .if t .ll 4.0i Subject: .ft B .ps .WT .ft R .br .if \\n(MM-1 \\s8Case- \\*(CA\\s10 .if \\n(MM-2 --\s8 File- \\*(CC\\s10 .br .rt .if n .ll 70 .if t .ll 6.5i .if t .in 5.10i .if n .in 52 .ps 8 .mk .ti -6n date: .ps \\n(PS .ft B .br .rt \\*(DY .sp .ft R .ps 8 .mk .ti -6n fru .bp .. . .de R3 . .ll 120 . .pl 102 . .nr LT \\n(.l . .. .de MH Bell Laboratories, Murray Hill, New Jersey 07974 .. .de BT .ft R .lt \\n(LTu .tl '\\*(LF'\\*(CF'\\*(RF' .ft P .. . PP - paragraph .de PP .RT .ne 2 .if \\n(1T .if t .sp 0.3 .if \\n(1T .if n .sp .if t .ti +5n .if n .ti +5 .. . SH - (unnumbered) section heading .de SH .RT .if \\n(1T .sp 1 .if !\\n(1T .BG .RT .ne 7 .ft B .if n .ul 1000 .. . NH - numbered heading .de NH .RT .if \\n(1T .sp 1 .if !\\n(1T .BG .RT .ne 7 .ft B .if n .ul 1000 .nr a \\$1om: .ps .br .rt .ft B .A1 .br .A2 .br .A3 .br .A4 .br .A5 .ft R .sp .mk .ps 8 .ti -6n .ft R .if \\n(MM TM: .br .rt .ps .ft B .hy 0 .ll 10n .if \\n(MM \\*(MN .hy .ll .ft R .ll \\n(LLu .in .sp .ad .ce .ft I MEMORANDUM FOR FILE .ft R .sp .ad .. . S2 - release paper style . SY - cover sheet of released paper .de SY .ll \\n(LLu .sp 6 .ns .if \\n(TV .TX .if \\n(AV .AX .ce 0 .nf .sp 3 .WB .fi .. . S2 - first text page, released paper format .de S2 .SY .rm SY .bp 1 .if \\n(TV .TX .if \\n(AV .AX .ce 0 .ft R .ad .. . .if !\\n(.$ .nr a 1 .if !\\na .nr a 1 .nr H\\na +1 .if !\\na-4 .nr H5 0 .if !\\na-3 .nr H4 0 .if !\\na-2 .nr H3 0 .if !\\na-1 .nr H2 0 .if !\\$1 .if \\n(.$ .nr H1 1 .ds SN \\n(H1. .if \\na-1 .as SN \\n(H2. .if \\na-2 .as SN \\n(H3. .if \\na-3 .as SN \\n(H4. .if \\na-4 .as SN \\n(H5. \\*(SN .. . BG - begin, execute at first PP .de BG .br .di .ce 0 .nr 1T 1 .S\\n(ST .rm S0 .rm S1 .rm S2 .rm OK .rm OD .rm TX .rm AX .rm WT .rm I1 .rm I2 .rm I3 .rm I4 .rm I5 .rm CB .rm E1 .rm R1 .rm R2 .rm E2 .de TL .ft B .sp .D & 6  &w @-  t5 5`u F5 %>?81R_N I&%>8 4/I(B Bm p  %00  ` u-  0@ @m&  @ @m8 > z7  H `GQV5 Nef  \Yhnt5  z @ @a& @ @a0 Nef  ww  8%+  S0- mike lesk conserve paper style .de S0 .ll \\n(LLu .rs .sp 6 .ns .if \\n(TV .TX .if \\n(AV .AX .ce 0 .nf .WB .fi .ad .. . SG - signature .de SG .nf .if n .in +2*\\n(.l/3 .if t .in +2u*\\n(.lu/3u .sp 2 .A1 .if \\n(NA-1 .sp 2 .A2 .if \\n(NA-2 .sp 2 .A3 .if \\n(NA-3 .sp 2 .A4 .if \\n(NA-4 .sp 2 .A5 .in \\$1 .br .. . Tables. TS - table start, TE - table end .de TS .br .RT .ul 0 .if t .sp 0.5 .if n .sp .nf .. .de TE .fi .if n .sp 1 .if t .sp 0.5 .. . DS - display. If .DS C, center; L, left-adjust; I, indenif n .ul 100 .ce 100 .LG \\.. .de AU .ft I .if n .ul 0 .ce 100 .sp .NL \\.. .de AI .ft R .ce 100 .if n .ul 0 .if n .sp .if t .sp .5 .NL \\.. .ds Ch \\*(CH .if n .sp 2 .if t .sp 1 .fi .ll \\n(LLu .. . IP - indented paragraph .de IP .RT .if !\\n(IP .nr IP +1 .if t .sp 0.3 .if n .sp .ne 3 .if \\n(.$-1 .nr IQ \\$2 .LB "\\$1" .. . LP - left aligned (block) paragraph .de LP .RT .if t .sp 0.3 .if n .sp .ne 3 .if \\n(.$ .LB \\$1 .. . IE - synonym for .LP .de IE .LP .. . LB - label paragraph .de LB .in +\\n(IQn .if  >  & >% n   t`@` 5p@  B>ep&/  7.%-// //ww  /. : | 5 > @t&epf %% >  %N `  %    %    %   h  ^ v 7 `FDp 4 v 7 Y2.7   | 5 > fef %%.%*Nf %@-& > XNf %@-E > 4N `wDN ` w $Nc > ww    ,2 ,  tww  5J f  % Nf  Nm >  &Ne @-@E5%N > N > @@tE %| >w6w $@5P@c  x@ > 8 57  @ @m7 & # (/tmp/crt0a/tmp/crt1a/usr/lib/eign/usr/lib/etabCan't open %s /bin/sortsort-o/usr/bin/upostupostcountcount/usr/bin/crpostcrpost-ELine too long: %d. Illegal character: %o line %d Cannot open grammar table; see lem Bad grammar table; see lem Cannot open ignore/only file. Cannot read ignore/only file. Cannot read ignor/only file. Error %d Can't find %s Try again Fatal error in %s t = %d Unrecognized flag: %c Ignore/only symbol too long.  Too many symecsl$r* 0 %ew @ @m7+@ @m7 0 @wj w X .B+  @e5H=f@efe e% AWp Ameu5 * 85%N  @Ae@%' > * 8=%* `w w @Wprepwt w b (7 V0pWpFepp 6Wp%EWpA u@e5 AZ } ( Wpffe e5bols in ignore/only file. i/o file too big; ssiz = %d d oxFfTecslbr3 0  %ew^.]..statemurdersincacollectivesxbardtmisspellspellpoetryindexamericaeuropepresseq-easyposnegsseq-hardsafricadeptWmidearthVsov   @ p w > AWpN&Wpf 0   Wp @:w * %H AWpACplCpɜ@  5_ WpAu%NvWpf | g |  | f % | 8 | %  Wpup-  WpA pluep5NNf |  |  | _7  ^ & 6  F w %@- d e%5  @ 7 @@  \ z 5 L Q  wv  5  " 4 d7 , < d2 5c  > (    } x n e        e    @- x  7 h   % @& z  5 @  zwR   ww  ! "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 p m  7 w w @-)7|)wx)7 z)7p)7l)7b)@@muu AfAVpu @ %9 A 7r)C r(u& #@e5u @ A H @wAA` 7r(u@ m(m(5-(Ї H ~(-x(x( > R@ m\(`( X(@m-N(H(  > 6(m4(H *( @  (m(H (@(@' w u@@mȕ @ A r 5 Tww _5 5 #u@0D  @D 5% u5 b 5%  %(% %  5 -v@ D -`@pD u5 @  @m5 AAD @   @D 5%   @ uN @D 5~ 5 @D 5 % u-N u- @D 5%  _$ |5_ww B e5_ 555( )%`w w x@ r E  y    w@  @Ջ E 7vf  r f  e0 t f2 w*Wp3e @7EA pw0w MOO w new game PѕW TPw P TW T7 w$w bad guess TW W Y H7 7 w ? TѕW YT 0 ԆT XP TW X ` TPR lN ff % @@mC r e0Ȑ @wzw h    }wP w :p fb  w&w   B w2   w  # p  F    p p  w7 T t@` pw t %$   $ 7     D Wp 6`ew w.w   $@me55#e15 } # u#e15wm# (-@pD %~u   5%  u u-'uu-  @ D    @@D @@e5`uX@@-)u@ <A@  @ D @- u- @D u @@5 %   u@D   u-   @D   u- f"   d5_ww @E% . .  fW X^ w bulls; F w cows -4 .wF& ^w guesses w}  ww  ##w |%v#1B %-d#7 ^# w Z~wd%DeZ%  T% % w<7 @%7 @%ׯ6%- .% ,%(w %7 "% .w%e(B J ӕ- R r f e0 @ >$ ҋ D~8PT $ӕ0 $f v Le0 9el$f$ ^$X$ 7H$we&  m,$ *$ ~    ~ w7 # # #0   #Wp `e0eӕ?.N ww ~w De   % w7 7 ׯ-  (w7  .we B J ӕ- R r f e0 @ >l ҋ D~8   Jӕ0 $f v Le0 9e  7we&  m  ~    ~ w7   0   Wp `e0eӕ?fn ,dP Z T @f 8f# ,#P # # @f # 37$|# X3r#j#-d#\#f@wH fww^w(fww "dwfw7$ fwjJA 7 "fAW,f B@ 8 @&61fA   @ @e71@p 1w<fwwvw"f@ww|wfAW @w f5157 5 e *7&  *-f     7  7 7 f@wd fww wDf@)w0fwh@e7` wfw7P fw:w6" wfAW @w f,1,7  5 eV w( 5& w&L&H&D&@&<&8&4&0&,&(&$& &&&|&v&p &j&d&N!%w  0h0h  7  ^"4  w +w 6 -s D h7 Zw  xtl  0"   ^ w<5#5e׭azw7^ 57ABwыwToo many files. w 5& w&#L&#H&#D&#@&#<&#8&#4&|#0&v#,&p#(&j#$&d# &^#&X#&R#&L#&F# &@#&:#&4#f& fww f D& w }f@w|wxwf@fA w,Rw"Le"w"Bew"8@lw"0Alew# &@t`e @& HADCBF7F6nt^ $ *^f& fw. w f "& w }f@fA w,w"e"w"ew"@lw"Alew &@t`e @& HADCBF7:F       " % ( + / 2 H/tmp/p.tmpaanandasforisofonorthetouparg count %s: cannot open cannot create %s try again /bin/sortsort-d-o/usr/bin/sortsort-d-osomeone moved sort cannot reopen %s %s: cannot open .xx " " "vdoxf7  77  | N  ,7+# E++7?w 7 7   | 9   7    _ B 0 9 A  Z a z  NB7 < 67    \ w VR  nw Dh  7 f hw`durxylt a@n#\\7894312fA@ ыW hW x@ H B\f & 0 Nw L P7 = @`7&(   (  ׬-˕-   ˋ w w`  w`  7 ŀ! #  7 7 p mn mt 7 7Z 7X 7V 7T BV -t t n j 7 H     %  \ ]       w.   & B d w v&w n&w f& m 6Bw B~ m  & rw ~` e Zw ~ & f  % N`  ^ $\ (X jN` .7 S f  7F &L ' ZSf $ Lw 2#H "w`Q *S "S f &7A  w D   w T  F   ~K   P %VE (  > 0K @F R&  VR7 &P BR dI P+ -0  478912fA@ ыW TW `@ E EEf Q Q7 Q QT Q Q7 Q QH%Q A Q ~; pQw lQ@w   ȋЭ7 h    e78  t 0 5-d 7 E"   7 7 :) |& " -l W   TwN& @& 2 0  !&w bj%&     v w`? - e-98734127n \& VSNE N  - xer^W$ ad bp$ br( N` w ~&  V%   f r  ve0 e  fr  v  r  N`   e t N` d N` #    7  2  ^ V 7 ȋ w w   &\ʋ .,()"'` ae a e  i o u y&  T S  7@ H 7 (7, |Qw SW  NN 7 JQTT@ @@`7`S@E (NwLQ I; &~|v  I,  I& -ȋ FDdLlL_w cc. ceF ds^ fij int ix li ll ls na ne nf pa$ blF plp sk sp ss ta ti tr ul un he> hx( foL ehZ ohb efj ofr m1z m2 m3 m4 hc hy n1 n2 nn* ni: joJ arV ro\ nxb po de ig tc mk      77 w  7  z   w B 77w B 7w &  7 H  w  7( L * " 7w  aw l ^ w Hw >7w 2 77 ̇-Հ &EE a B a p   B `De  Ep D C a ^"E8& jC1E`C`˜ E ^  CEC`ѵ 7 @w VՀ  &:  $J E  J 0 "!S3"#`p`Аp@РP`p"! #!4!@``Pp`FP>V>wN>w T_7 F DL7VR7 FL,L4L TL_7 `F7 L L7 >L7 *R7 LCannot open: & AW `R3AwQw KK=E=Q$VDQ@e@7PK=@NQ x=N-NP @UNNPP7 PU@NNPPw PEe  LN<rX  ^P 7 RP7 *NB DP' v@ N -.P W  PwP& B& 4 O   4&w 2%&  M  B @w`M MM  ~ 77 7 w \ ^ B 7     w 0 27 w  &     w 7| w  7 w w d X t6 J B  6  1" w    (w tB v7Dw d f7.w T& P7 7    w "PPw "FFw "w x "w p "w h "w  7`w  7Rw  7Dw  76  : 2 7* "   7w #s5$#D"1f1@` @P` 0P` @````p``p0#!Q "b"1P```PPp@ P@0`` @!`@PA! "Qp@`p``@F! g 3!Bp ``Phk22jWf@P`@P0@ 00 @P@`0#b&`2gY&FI00 @0 @ @@@ @`6%e`8XC  @`PP P 00p P P p P`P` )Vh`0fuP p`0```0@`P000 `@``8U)rPEVwzM vM-:KO 7 O?? ?-?D e-NMHM9873412?B7<x?\D_h DB~? lX  :7 J JUD?M O I I-Ifx& X"2P @X X$$ttyЋ6@ /dev& &   7BL S bDNE N ? >   K^W$ ?  K n r~? l7 r?7 >  c`?7 Z? > &  $  7>7>7K x7   7 w R 77 w < >7w ,8 .7w 77   w  b 7 ^ w  7J >" Zw 7 ,& NE-UxW$     (  b%  7 T?  w X G-  w J5w "w "zw J ` v r j :#%  , v j 7 j7 ^|| ^ "m 7 7 -D$*``00 0`p`5"0f Pf"G>B"f()/ /// @/N@//_?OU3u&'=  //`O@//?@/0e:ou36t(OUH/,oL+/???L?>???o,O=U5/63'V /)P./0>._|-ݶm?o//3"? /?@~(wf"J?H2*s0 P0 o UͯfV/ @p o~%hlr"gjC@ `@P0@ `0 @P@`0r&bY*FH0"p @` `P P @@``&@w T & .? > z \K?w (8I d& x ??> >>> w 87H=G-H  J>w H >>7> n J=w H  &=== G7 G7 =w n   7 = w R :S 7<=& ~ w 6 :S r 7< TG t N 0Jw  G7<B<& & = < G  = G w N Nw V6%mG%F w w( v - ( -% ?  Bw`wz  #7 7 7 7 p #^&  97 V T%  & 0 z7 & p 7   `6%XfXC@  ``P P"`q"cr Q"0`S!Q"0P`Sp!)Vha0f6uP p`@`aR pc"b'cP `0a@ `@``HU)rPUWDD*` p`0  ˙`.`p`5"0 f`a'AAB.  (08@H/usr/lib/suftabixcmvld/dev/tty0/tmp/rtmaf@  x %"t@% %$$ttyЋ7^@ T/devw R @ 7|Fw 6 nF w bFZF7 VFw 6 \     1rX& H I'+ -097H   W H 1 @l W IՇ w 8I & ; 4 w r 7P<   H;w P H ;;7; |  7; d   7t; L  .7^; 4  7H;6;   7";7 ;  G7 ;::7 x;7 x;  G d;w &I 7T; w "H : : w H% % . e  #  # 7 7 7  dw` pm7  h  fA p ! ~7d A 7 F > 7 0 . #    *# w@-<2.7vw" - D 2 v A Z a zfE?w - w  ^ E^ 7 ^7 v7 D h0  - 7%   w .I tG D = w 0 p 7 ;7 pIhI`I Pw T 2H G H $G7 G7 G7 :7 :Y9 " Gh9w G &T9T9N9 F 4 w 2H A w 2H   NE`9S w 2H  D? `C :? nF ( w 2H &7 HF & 2C 8F  0 AU88@f> n 7 >7 B @w  @-@_wToo many string/macro names. bD@E-z8W$ w@ 7 t@7 `>7 Z> Z> d@#bD W$( %  D  7 D  , ^  t 7  >  fw`     7` e 7 n 7 l   7   L v 8 r* (  L D  5  - 4    8  7a    w  - -  m 7  m 7  z7   - Հ E #’E -J &  T wV |  "  R  *  > )-V 4 w?7 lU7 G7 IH 7ZU-H >U -G8UG0U G   H R-GR R 7BH!7>H7G7T X! T M l |W! 7 T7 M ~H p  vM 7rM7 T 7fM 7 VM HJ2ICCCECDD @&fABwBы wBG7 :T DH7F F7 *T $T  T%YF  GE V V V7 V  V U_ Z "  0 9 A  Z a z  U U7S U U S lE X  B@  U$8 87& @7 w@ 7 > 7 @*Ew&E  Ew= ? \ wv7E7 =j7? &    =7 ? w 2H D ? wD 7 B  D  b 7 D7 b=7 b?  D -6R=66 N 57 62 0-6R,&66e6#6p6X6pT6 DGDHDGG<6DGn6w pCannot do "ev". &  l ! 7C  & N e5A  o5tAn 7 lA  7C 5 &   x  m(A&A@7VC & ! bw f2H57 5 * 5 8U W TU5 U@" W 6U 8Uw"5 W TU &   w 2Hr5  N  v >  Bm4 B@ -:@4@> z"@  ?4w x2Hw r ~ > AEl9r4M w Dw:  w 2HV4 z   >'s &p D'M <'> 6' 0'  7& ' F37B3 ' j &I &Fm&&7 & &0< & 37 b%7 &7 &7 2 & & & & d < 27 & / 2 7 |& z& `&7 Z&7 $ n/7 j/ /3 27 &7 &&& `  7%"  &  &%  7`& % x \ %7 %7 v$7 . .7 h$ ݇  "%% %rz%x%t% 7 %`% p%  5$ D%-@%^%  4% 0% @%  V /)P./0>._|-ݶm?o//3"? /?@~(wf"J?H2*s0 P0 o UͯfV/ @p o~%hlr"gjC@ `@P0@ `0 @P@`0r&bY*FH0"p @` `P P @@``&@`6%XfXC@  ``P P"`q"cr Q"0`S!Q"0P`Sp!)Vha0f6uP p`@`aR pc"b'cP `0a@ `@``HU)rPUWDD*` p`0  ˙`.`p`5"0 f`a ʋ@1iIaA w 2H4 > wz3 fwj3 ?f3 T 1 \ "> 2 A&w 02H3 2H3W hR& CC= e37 = @ *3  $  < \7N/7K/7 P9 w 2HJ3<93 ,8  73 d@7t378 7 dw h2H*_h77w2 _h7 7 7)^2 2H|w 2Hexec failed f%  \7? ? 7 27 < j3-z=  R3  n3a b3^ " ?.37 <  F% "w % -%% %-$- %5$ @1  J7 >1$ - Հ E HI ’E & > 0 w$ , $ r$ $ l$ 0 r$)-$( 0 \$ <$ ׬-˕- *$ $$ 2$ˋ &w$w`$ :$ w`$ $7$ŀ &  E7 j#    %  -7 -&   / N` - 7 , ' / v "w2 ,    !TYw C x . 7 H77 M0h0h5 000%(nl$dn yrmodydwhp  .G 76X4  ] +w WQ-P̋Nm @Hԋ ^ H>rԋ8 Hf7ll &܁ 7 J)s "#o i *q $h7 f n w |Gw tG 7 B@@ 0rX   F zTY,7 w4 aH7j77 HJ 2 3332 3 b?1  3  zJ%  r 2 27 27 222  -<*6<"6 <2 B @w n6w d67 2 f p2`2m^2 7 V27 T2T2-T2 $ X21 V2 m1mJ2 82 1r  (2 - 2d -2  m2 2w r1  1 ,> ; *; ;-;0C7 ;7 "57 =Y= = 1 1w 5_X z57 =-0Y &0 ; .0(0;7 "0-x;0 xw = -b;? b@0lX7 :   & d2w %&w %&w %& F/! :2w fX"m &   w <."e  pw  -,&,%1 & f B % N`% w@B&\, zN` w &  V%   f r  ve0 e  ->0H80H40G*0G&0  fr  0 0 v / / r / N`  // // e / N`H#׭zw^7PjLH 7& 6H #p H_h77%H H PF vr`T 7e r w r8 . -B 7B   vr 7j&  0  p `  Too many files. , @*0 %"0 v: R=-0L=U@ m/ - ; W 6U  B& f &  +  - 7 =   @W -W +` <7< 9 x-V0jL ?N0 J0 J w`60w40 B0 j9w  ^9Line overflow & & 80?HI7 :97 07 07 ^<7 /HI/ 8 7 /7 /K7b/ `/  & / 7 / 6   7/ /   .!? H/e7 h/%HI2/   / N`  0   r -X/eaeA  6/$0/*/ $/ / -/ / t.& & CE\ w D7l >7  E(  E\& EUbDNE W$ N ?  :,% $ T " $,  p7 $ $ $  $ $  7wW7 7 #f& & rw))H `#6&M H7N#  Bwh) >#e7 HH*n$\\e fs&t !pck xyldura:?"ww wBadx bp pn br cc c2 ce fi in liL lln ls ns rs na ne nf pl< spZ lv sv os taT ti tr. ul tl lt hc hyn nh nm np nnar$ro2RO*nx:soXpohdedsamasdadirmrnigtc& eceolc> ncV evifwhchrdjtm6nr mkrt abflHexxhRemfcafpi hw+P/7 - F7  7* ȋ 6#*F w  !w 5&ŀŀ5ŀ tW M   W Mww ^+?r Exception word space full. 7 !& f&L)ʋ,-C@ ċċנs ċ@ ҋH6  ы-ՀHw wHQw 2wJLR'BBHQ/usr/l+e5 W"  Dw <w+A-+HR r++r+HQl+ 9G9G7 N+T+9  1 @ @w8fEw (+w"+8G8HP  EHPe5  A%w $wBad storage allocation  A Z a zfEw * w*r:Gj:WEW jf&  +" -$ * HNpN /  4 & r6 77 ` & &  4 - (0  p `e077ҋʋ ""  .,ʋ .,()"'` ae a eiouyAE IOUY&  ^( HR  7( 4G x7 (7( aw j.2 /ww >11w 2. L(F(7D(7 B(͇>(:(-2(Հ*( ,(&EE a B a p   B `De  Ep ' :F ta 6XE;' pC4E`C`˜ ib/suftabixcmvldIXCMVLD/dev/tty0nr.out/tmp/rtmaY$Y`R/usr/lib/tmac.AAAA.' . (08@HPX`hpx 7   &U  W 6U@  ) @b5  )4%R @$W 8S 1w  1-1_w  eNo more number registers. & & \._f& 7 3 + \  w vD7<)  V3 E( F3 vE\& fEUb7 - .vR)J .p(D .t @< .ov(6 .l")0 .i)* .$($ .xB( .c, .h, .nX)   Il@w@H-&X ԕ- w n E < v' CEC`ѵ 7X' T'@w X Հ  4 &L)* WE  W0 "!S3"#`p`Аp@РP`p"! #!4!@``Pp`#s5$#D"1f1@` @P` 0P` @````p``p0#!Q "b"1P```PPp@ P@0`` @!`@PA! "Qp@`p``@F! g 3!Bp ``Phk22jWf@PXv5 !Y ~ \  tw JD7 ( 0  ? ' m'e7&5 8-' (' '4(7 ((7 ((447 47 47 ('' 'e'w|' -r'Yj'7h' 7`'747f(7`(7j(74 1 8eE&G&77 d1 - r? ''eef&w 7 G7 21 5 @ "40R  " 1 4 1  " r" b7V B73 3 0r&n& d&5 7 ^,% %-^1 ~7 5 `@P0@ 00 @P@`0#b&`2gY&FI00 @0 @ @@@ @`6%e`8XC  @`PP P 00p P P p P`P` )Vh`0fuP p`0```0@`P000 `@``8U)rPEVD$*``00 0`p`5"0f Pf"G>B"f()/ /// @/N@//_?OU3u&'=  //`O@//?@/0e:ou36t(OUH/,oL+/???L?>???o,O=U5/63'8 & 6  w h 7| 8"e@ȥ-7l y 4  (  &       N w     w eN w ~ Bʥ^J %*7 y ӕ <ӕ2 ,+ʋ&ӕ &ӕ%^ %~ %]@p ӕ%~  ww   f  5 N   5 ~~7 7 7 7   5  tm} }{H{oward} }Taft {W{illiam|m} }{H{oward} }Taft:1909-{19}13:{W{oodrow} }Wilson {W{oodrow} }Wilson:1913-{19}21:{W{arren} }{G{amaliel} }Harding {W{arren} }{G{amaliel} }Harding:1921-{{19}2}3:{C{alvin} }Coolidge {C{alvin} }Coolidge:1923-{{19}2}9:{H{erbert} }Hoover {H{erbert} }Hoover:1929-{19}33:{F{ranklin} }{D{elano} }Roosevelt|FDR {F{ranklin} }{D{elano} }Roosevelt|FDR:1933-{19}45:{H{arry} }{S }Truman {H{arry} }{S }Truman:1945-{19}53:{D{wight} }{D{avid} }Eisenhower {D{wight} }{D{avid} }Eisenhower:1953-{19}61:e#W8@!q # u@5 wX)9hhhIfgofile dogen succ g1 k emit"end.om " end"f.oom "|06 w)9.f"succ seekchar getword find.om "P&  w& && ee  CC-5~f %"N  h %d N  X R    w: 4 ~`5”%  %  ~ &   !˥œ &  ԋ &  ԋ _N _w  DC O x wtԋ̋& % ` & % ԋԢ  & % ` &   ! w DCË wԠ@~ w  v{J{ohn} }{F{itzgerald} }Kennedy|JFK {J{ohn} }{F{itzgerald} }Kennedy|JFK:1961-{{19}6}3:{L{yndon} }{B{aines} }Johnson|LBJ {L{yndon} }{B{aines} }Johnson|LBJ:1963-{{19}6}9:{R{ichard} }{M{ilhouse} }Nixon {R{ichard} }{M{ilhouse} }Nixon:1969-{19}74:{G{erald} }{R{obert} }Ford {G{erald} }{R{obert} }Ford:1974-:  6e  &   *  ew |6 r n j b6 V R N F  >ew2 Yi(8 Y iIilptr rptr sptr succ fail iget find"enter"seekchar getword getchar putword putchaNf  ^ ww n n t/ l,%^N+  BH/  0 $  3   7  ww ~w De   % 6w7 7 ׯ-  (w7  .we<B J ӕ- R r f e0 @ >h ҋ D~8dh Fӕ0 $f v Le0 9e   7we&  m  6~  6  6~   r alterwor getcstr rewcstr length rewind indextableptempwhichframelright left(nomorelfoundgetnam.om "j!   w- fe  2    w))IyYhyiputcall kput obuild seekchar getchar outb outw  w7   0   Wp `e0eӕ?fj ,`P V P @f 4  7" l - f@w f@)wfwwrwf@w~wzxwf@f&CB  ԕ-  e0fv   vA W  ~@& HADCBF7FbcnvX^dRj$*.[\&fl`X*pDp$many.om "lf w w8yi8YIifx j succ fail ctest iget any"append.om "t0 &  w) succ putcstr iget append"arith.om "td L ) >%% 6!w &&-  %w)outt cfile lfile flush iget sptr generate succ getnam"ignore.om "d < 5w9)fn succ iget ignore"inc.o.om "$T w w w w) ) succ .u update .ia" .ib".da".db"infix.om "8T c  S  N C 6xwjUnknown flag RE error Can't open %s %s:%s RE botch %s:%l:%s:%s dPoJxfe(c6slr 9Y succ fail iget seekchar getword alterwor sprv"Pupdate",.l"".u".p".t".st"bundle.om "$`  @@e wI(9Yfgg1 pbundle iget succ bundle"reduce"char.oom "`  w&  w9yI(ifi .p sprv .a".s" .o".n".x"*jget.om "T\ XA@E@7  D7` 0` @` p= W  9(Hfj n input classtab jget"jgetc\inptinpr$readc^inpb`lvrv.om "\${G{eorge} }Washington:1789-{17}97:{J{ohn} }Adams {J{ohn} }Adams:1797-1801:{T{homas} }Jefferson {T{homas} }Jefferson:1801-{{18}0}9:{J{ames} }Madison {J{ames} }Madison:1809-{18}17:{J{ames} }Monroe {J{ames} }Monroe:1817-1825:{J{ohn} }{Q{uincy} }Adams {J{ohn} }{Q{uincy} }Adams:1825-{{18}2}9:{A{ndrew} }Jackson {A{ndrew} }Jackson:1829-{18}37:{M{artin} }Van Buren {M{artin} }Van Buren:1837-{18}41:{W{illiam|m} }{H{enry} }Harrison {W{illiam|m} }{H{enry} }Harrison:1841:{J{ohn} }Tyler {J{ohn} }Tyler:1841-{{18}4}5:{J{amj jget iget char"succ fail copy.oom "x`W B e 2 7translation overflow2E w wi8HXH8yfix k ktab ktat putcall obuild errcom succ generate rewcstr getcstr scopy"cstr.oom " 7 www)).lv".rv"succ mult.om "6< 6pv  r6  rvwIII9.m".q".r"".p sprv octal.om " `  w w)9iIYiputcall iget kput putoct generate succ octal"params.om "H es} }{K{nox} }Polk {J{ames} }{K{nox} }Polk:1845-{{18}4}9:{Z{achary} }Taylor {Z{achary} }Taylor:1849-{18}50:{M{illard} }Fillmore {M{illard} }Fillmore:1850-{{18}5}3:{F{ranklin} }Pierce {F{ranklin} }Pierce:1853-{{18}5}7:{J{ames} }Buchanan {J{ames} }Buchanan:1857-{18}61:{A{braham|be} }Lincoln {A{braham|be} }Lincoln:1861-{{18}6}5:{A{ndrew} }Johnson {A{ndrew} }Johnson:1865-{{18}6}9:{U{lysses} }{S{impson} }Grant {U{lysses} }{S{impson} }Grant:1869-{18}77:{R{utherford} }{B{irchard} }Hayes {R{utherford} }{B{irchard} 7 ~v rW 1 &\4 wN D >w 8 0W @  ~wv )y9YIi)jget iget succ create rewind putchar getchar allocate smark"rewcstr" putcstr"getcstr"Lsize"~cstrwcstrrcstrtcstrbsympctest.om "" A1`w(8Ifiget env si succ params"push.oom "($ f && f   succ iget push"putcal.om "<` TA 1W 7translation overflow(((HX9fgk errcom ktab ktat putcall"kput" putdec.om }Hayes:1877-{18}81:{J{ames} }{A{bram} }Garfield {J{ames} }{A{bram} }Garfield:1881:{C{hester} }{A{lan} }Arthur {C{hester} }{A{lan} }Arthur:1881-{{18}8}5:{G{rover} }Cleveland{ (1st term)} {G{rover} }Cleveland{ (1st term)}:1885-{{18}8}9:{B{enjamin} }Harrison {B{enjamin} }Harrison:1889-{18}93:{G{rover} }Cleveland{ (2nd term)} {G{rover} }Cleveland{ (2nd term)}:1893-{18}97:{W{illiam|m} }McKinley {W{illiam|m} }McKinley:1897-1901:{T{heodore|eddy} }Roosevelt|TR {T{heodore|eddy} }Roosevelt|TR:1901-{{19}0}9:{W{illiam|` & 7 9(Yfj classtab jget ctest"putcstr succ ctestc"decmal.om " `  w w)9iIYiputcall iget kput putdec generate succ decimal"discd.om "\0  w) 9release discard"iget succ emit.om "F`f"D$  &-  vr f @e0w<w-32768  putch obuild putdec"putoct.om "x"$&E@  e0  putch obuild putoct"px.ot.om "0N  >ff& > w5 %wI8(Y(8y8(8ifij n iget jget succ fail .px".pxs"litcLreln.oom "<Zx -# - - -  -  -w6 w .p sprv .eq".ne" .lt".le"$.gt"0.ge"<trueHfalseRshift.om "d0  vww  B%0%9 wWp D`ew CDӋ  D   3N  ww BN N e r@  xXJ` C- rDWpB`>% AJ @0 e  @JepJ%  r e0  r e0@ % BBm  @J ww zDetae%e[ rde r`%e r@w:w (~wDe  7# F>$e54$N(ef %7(-(z # 6 85   #@ ww  # #e7##Apww  #1`@% 7## |#?~# z#v# E7l#f#e5uo N#@= ?@# <#?8# 4#wFw 4'qAp&0 w w  N ` p5  p5 @w w .@ ef  @w uo%X w w @ H w f N `vw .p sprv .sr".sl"stack.om #|nw W8  Ae@fD W4P w8& #  w9ixI9iiYfigsucc pbundle goto iget g1 stack"unstack" gotab"Laccept" string.om #T N % w 7 7 ׯ-  (w7  .weB J ӕ- R r f e0 @ >f ҋ D~8(, Dӕ0 $f v Le0 9e   7we&  m  ~    ~ w7   0   Wp `e0eӕ?fh ,^P T N @f 2 7f  0- p5%Z !wJ w 8  " S--o-- !-  !C- E7-Nefe-- euu@ uNff %5uo = 22ZX ew w ~ = @@=uum%X-^  u}} w< w * }  @  @w w  $ E7$$$?$$$e$ w w  `b &  e N `ȋ + f  & & & e u-& wY(I(9fij succ ctest iget string"table.om #&H f w )9Iallocate putword putchar iget succ table"tq.o.om #,@AuuA Ce5 wA 1`wh88X(Hhx8hfiek epf@@& HADCBF S M Tu W Th F S\`dhlptx|JanFebMarAprMayJunJulAugSepOctNovDecusage: cal [month] year %s %l %s %l %s %s %s %s %s %s Bad argument %s JdoxfexcsVlrH   wR w @ $$o$$  %0* $ w* w  5 U ?ew w o5 E%D& w w d+ E7Z+T+R+?N+J+F+eB+w w jln j-v d  P Fw` w N  4 70wF # @ m"7 "0 "5" @`7"@me5% " N `""1w     ` &  w~ w l * ek.fs ep.fs si x fs generate .tq"gpar"0gq"trace.om #x<   )iputch putoct trswitch#trace"trans.om #T 0 w)gsucc iget trans"tx.o.om #l<  w)igenerate obuild .tx".txs"unary.om #p0  ._..aplasciicatfontcongressXdeverrenpffhgreekhanoikbdsoundstabstmheadertmpage1m *7 **p wL w : N 2))pN 2w& w  - ) ) )A Hww  !e5 uo  @ew@w   % % N w@  x t    p N      8  6% &  7w e%(%f &  N `e5N  ef %7x % ww  A r  A r e0@?>  N w succ .ng".nt".cm" &@ & 6  w  4     V 7 &\ t%5% - @%   &w R4^  5  &5   V 7^ \L t%5% n ^4^  5 Pw-E%@ .* .# N % ww v 7  2 2 % @wTw B @^X@me% B 5 @@mAp23  : w`w N % " e5e7  -  @ 5 0 N ?  E7@= ? ? ww   5 5%05  u-@= .+ ` v &  % @ % @   x4NNm w"NNAupNA 5r 0 Aupu@ N %w N `5ȥ- 5 5 9AWp B`eu . .. r0 r1 r2 r3 r4 r5 sp pc csw mov movb cmp cmpb bit bitb bic bicb bis bisb add sub br bne beq bge blt bgt ble bpl bmi bhi blos bvc bvs bhis bec bcc blo bcs bes jbr jne jeq jge jlt jgt jle jpl jmi jhi jlos jvc jvs jhis jec jcc jlo jcs jes clr clrb com comb inc incb dec decb neg negb adc adcb sbc sbcb tst tstb ror rorb rol rolb asr asrb asl aslb jmp swab jsr rts sys clc clv clz cln sec sev sez sen cfcc setf setd seti setl clrf negf absf tstf movf movif movfi movof movfo addf subf mulf divf cmpf modf movie  @m 7@2 w@p^2fww f@w fwwwf@ww wlfww&wN f@wjwf,w*f@@& HADCBF7lF.../ 0@ wN@w 6 5 5 w(w  85@m5 n@ 7ww  5*~%uo%X@ @ @-@e5 @ 7nww p  85 @ @Nm P &  w:w (% 2 &    %  ww 5  `5 @ ȋN ww  `55  `AH%@p% %wzw h movei ldfps stfps fr0 fr1 fr2 fr3 fr4 fr5 als alsc mpy mul div ash ashc dvd xor sxt mark sob .byte .even .if .endif .globl .text .data .bss .comm &!$'(+.147:=),/$  `5 5 `ȋ 5%@ 5` # #A H-#> @ ?v# r#ww ~wn%Ded%  ^% % Fw7 J%7 J%ׯ@%- 8% 6%(w*%7 ,% .w %e%B J ӕ- R r f e0 @ >$ ҋ D~8"&&& $ӕ0 $f v Le0 9ev$p$ h$b$ 7R$we&  m6$ 4$ F~  F & 6  w  %  %P@ 5%_% _@ %_%'_@ &0 %  6&f te e6 * e% @ %_%'y      26 % 2   4   6   eH6& teHM&e teHd&e te He6 * eH%e%    t & 6  @w . 0*7*7*D&7&7 &0*@e7` X@e7`D&@e7`22ZX e% @& " 7d1 4\1  7N1 ww Nv  ww n %_ N% J%<$D%I h 6% *%  $$% %O$ %%H $ $D$ $$ $5$$0}$$$p$$ $" NX$$ $ $G$$$:$$3$$ t$  w~w l$V$   F~ w7 $ # #0   #Wp `e0eӕ?f# ,#P # # @f # 47# *&4|#t#-n#f#f H! 2B!:! 2  7*! &! "!7# 7 !f@w^ f@)wHfww0&w*f@@& HADCBF7"F%s Call stack overflowSoftware errorSoftware error %d %c%s%c%c%s%c%c Software errorSoftware errorArg collection overflow    . 4 Definition table overflow& 6 @ L l No room for substr # trace  warn  copy quote! serial " list  size substr go  gobk  del  dnl  seq  sne add sub mpy div exp gt eq ge lt ne le  def if $f v Le0 9e** ** 7*we&  m* * ~    ~ w7 ^* T* P*0   <*Wp `e0eӕ?f$* ,*P * * @f ) ,7) ,))-))fww )Rw4fAW @w f.1.7 5 ewn 5& w&8+L&2+H&,+D&&+@& +<&+8&+4&+$0<>#:;,0&+,&+(&*$&* &*&*&*&*&* &*&*&*f& f@@& HADCBF7J(Farg count /usr/bin/%s not found doxf&ecsl4r, 0$1 d`oZxfe8cFslr4369<?@CFILORUADGW  EA&w6AYpNo error. Floating op code error Floating divide check Integer conversion error Floating overflow Floating underflow Floating undefined Floating maintennace trap P2c0 & 6  w  @7sq@ 7& heAWt12t5&7& eB& e@A 12r %q xwzw|w7 w7 ww%3@ @mȥ-*@ @mf7b y@ @m F T (      5Rbf %5%R DN ^  E%  vvvv ^5 @ x %vz & 6  w  %#  f5 %  @0& "?ew   @ ȋ @5/ * 1@5 *  5 Z| *5 ~@e5 %Ae5u-5  % @P5 @ A  t5  %Ne- *%0 @ % | *    ww 5   Dv  7vv t 7~v@ @m7%_5 _ 7 Pv @ @m&  72v D_~N2x& %  H5Wtq2t> ;mAWp @mvA@`5 t02t5@ AWp@m<A@`5 N%t02t5@N%B- aAWp@`A@`5 t02t5@  5_ u u ^ _J & L t ^ 5 tt'! e * D%a zA`u@ *@ 5wfl ,bP X R @f 6 7$ - f   7  7 7 f@@& HADCBF "DB$!  @@ !A "B$DA% ________________________________________________ | []| ________________________________/ D F 5@-4 Dt t 7~t: D D  7ftS D\t %   ^4p5%  :t  7$t^ Dt tm  %f a  5% 5 5!@mȬpr& %d@mȬp8 &%!H& % :a < 5% & %   ^3p5%   0s ^4s * & L s ^ s ^s s  7rg Dr t 7r_q Dy7 r7 l L________________| 7 rmXAWp @mHA@`5 :aAWp@,`A@`  2rA A @l2r7`Jr FrAWp@mA@`5 N%E 72rr-rrrrB- r7 rjq  %5j& %N2x& % 5 & L q ^q ^ 5 qq| e D% D  5@- D V5I   Dq e:5  @ 55  @m 5? p: e  Df* & 6  hw V%  4 e5 @= % 5 }eue@ A H u-=  Z  Z  Z  2  2  2   wpw ^~w+De+  + % w@7 +7 +ׯ+- + +(w+7 + .wv+eB J ӕ- R r f e0 @ >"+ ҋ D~8 +ӕ0 % D @5@- D ww  x *  Fww N F ww @ xA @~ ~E-@ x)@ A px~@ &x@ &x %A 1x@ xw(@ x F w @ %xA @x xf L A @lxH @  ww @ x@ &x@ &x d%@ px @ x F ~wfw T%u_ 7 u uv7 y N ^7t% %)%WdN ^7t% tW%\%A%LKN ^7t% % w7 (%A~t6%Zvt mhteH^te 42x%aNt%zFt m8teH.t2x7 N ^7t% %_ 2xaw  N ^42x% w PaeHå <aw D@aȕ  A r  N f  %& fNmA r e0^ @ww p>seqE72swj7   ӕ- ӕ0B~ӕ.  ӕ0~ B~7  JW!ZW!j 54g7 ,ge  , gg g f8    8D$ $$$D& N & N  N N S C B A  eW!@Շ w^ mff ~f rfH5|fe        W!D8P    0&8d& dN & dN dC N eN e-efee:B"`@,Czlx1n2@2%'-.<  B Unrecognizable argument: %c /usr/lib/saltread salt/usr/tmp/ttmpa1/usr/tmp/ttmpa2/usr/tmp/ttmp-+ w  =  n - e w-hw Shuffle 4L$ $Z T -F  t l:-  w  p 7  r7w7      7 x w w Action $ h & w You break even w You win $ w You lose $   A23456789TJQKHSDC  b ӕ-ӕ.t B~ӕe ӕ- ӕ+ r e0e0Sw ~w~rDetr  nr % w7 Zr7 ZrׯPr- Hr Fr(w:r7 q ҋ D~88< qӕ0 $f v Le0 9eqq F xqrq 7bqwe&  mFq Dq ~    ~ w7 q q q0   pWp `e0fa3creat tmp fileopen input file/usr/bin/usortusort-osortforkprobscreat tmp/usr/lib/w2006open w2006open tmpopen tmp create tmp/bin/sortsort+0nr+1-osortforkprob/bin/catcatPossible typo's in /bin/prpr-3-hprforkprobcannot %s read error write error on t.%d d o xN f\ e c s lj r~ 0  %ew> E=sMBԝ`=B.pF:|+eiD(/zC@;\)@3d5@3e1@rzlB#"3h wp ,pP p p @f p ~7p @~pp-ppf@w fwwFwfw@e7Lwjfw\7 r f"wB fwnwjRw"f@wRwNXwfAW @w. f17" 5 etw^ 5& w&hqL&bqH&\qD&Vq@&Pq<&Jq8&Dq4&>q0&8q,&2q(&,q$&&q & q&q&q&@?ØGe@lB,k$aXUbj<6,rx>$P<| *:P & 6  w 5 % @5%0%9 ^AWp Ameu@ 5N wHw 6~wDe   % @w7 x7 xׯn- f d(wX7 Z .wNeB J ӕ- R r f e0 @ > ҋ D~8&* ӕ0 $f v Le0 9e  7we&  md b @~  @ q&q &q&p&pf& fw2 dw f D& w }f@w w hwf@fA w, w" e"w" ew" @lw" Alew &@t`e @& HADCBF7mFf5w R * f5w < }7 ooW&f  7 o@% o@A&@27 @L> Be0# @ є 2    BA   W z & 6  w t< @mȥ-# @m r eA! yR @m 7D 6 @m7* @m7 D- %B   d%    UB \ H   ; `2N `ȋ rea2N  rea@2N 2N HN    d%  H  %  -"H  w  C˥0 ˥9 Wp @@`e ˋwf@w @~ w7 6 , (0   Wp `e0eӕ?f ,P  @f  F7 .F-f@#f@@& HADCBFarg count bad character dZoTxfe2c@slrF2e B@e0 mz "o` eȐ9 ȕ0 ȕ1 nB n`0  VVf5u @AfW@V fW@V  Vf@ Wf@@67 f@f @A z B @7 &e# 7 # VVf5 @Wf&7@  @W@@J < . BH : , Vw VV mm fw""JA 7 fAW,f B@ 8 @&61fA   @ @e71@( 1w fwA.Q  OfA  ^ y   F y @0fA  @9 fA @e&7w7@4wP7 Vf@ww:w*f@@& HADCBF7FZbbbbbbbr) & 6  \w J %@-  7 e%  \ e^&5 @  % 5 Be u- 8 F^/  ^*  ^&  /  \wxw f~w4+De*+  $+ % wH7 +7 +ׯ+- * *(w*7 * .w*e"B J ӕ- R r f e0 @ >* ҋ D~8JN p*ӕ0 $f v L7mPP7 BmEDE!wE(mED5!5! w |W!wwn  (wW! B  w w wwn  8~lE7lEnlUflE@^lU@Vl Rl NE UUVlbl\l l * BE? eRCE e@E xX5ke5k5@keY傁 H eR 5@k> ; 66  bbbcannot open input xCannot create output e0 9e<*6* .*(* 7*we&  m) ) ~    ~ w7 ) ) )0   )Wp `e0eӕ?f) ,)P ) z) @f ^) L,7`L) RL,B):)-4),)fw2w. )>Xwf"w f@@& HADCBFw B 5  ʥ ʥ ʥ- ʥ9 Wp @@`eʥ0  w7V(Fusk `&e     bke\kbww5Q$6 B f   EU P5j   P8fPPQ7 xj5    5 C B A  `5Tj  56 8Ti ( w w x@ r E  y    w@  @Ջ E 7vf  r f  e0 t f2 w*Wp3e @7EA pw0w w Black Jack  0  4w new game 7 m7  w  jvfr (7dVm`  Tw up 6N2J+ 7 :-4w (*  mage: nice [ -n ] command /usr/bin/%s not found rdoxfecs~l rL,     5@Di  &i B    i Uiw6 h w6 hwhwhw  7 h ha hUhhW 8UD W 8E8fc     ` @L-Rh\h a h h   8 @a  ! p B6R B6 gW !W e UETR5g  5g  Ugwp   6B   7 lgr@8r@D  em wm  w Insurance? w 7` 7` 7 7 - Y- w You have black jack! Z7`j 7`d D6-2J Jw dSplit pair? w B , - #- w 4Double down? w cm v m-$  -  w You bust w~ w Hit? w w  w You have t ( hw: Kw Dealer has D@ m0<m,8 0 w ^ = blackjack (-  w 6 = bust 7  X[^adgjmY\_ T  & 6 % w |   %y  5 &  0 !  ` e 5 ! te0   r@t0 0 !7 $ `   `  `"5 C-  `A ` "   ee ~0 !2 e  ! te05U  ! te05U  7tU6 t5rrow's path - a list of room numbers. The list is terminated with a 0. The first room in the path must be connected to the room you are in. Each succeeding room must be connected to the previous room. If there is no tunnel between two of the rooms in the arrow's path, the arrow chooses one of the three tunnels from the room it's in and goes its own way. If the arrow hits the wumpus, you win! If the arrow hits you, you lose! Warnings: When you are one or two rooms away from the ww  wɋR b `  ҕ | ey q  Z   H   . wN hCB C B8  7 :  e8 f rfe0 w f r fe0 w f    q,   &8   7X  7K 67   te05 _R5 _R5   7v ! `t&e0        !   . >  !  ` S  W Y  _- n  2   `" { 77!`_-z   !>  75 W- @ `"   te0     C5   x 5  umpus, the computer says: 'I smell a Wumpus' When you are one room away from some other hazard, it says: Bat - 'Bats nearby' Pit - 'I feel a draft' Instructions? (y-n) You are in room %d You fell into a pit You were eaten by the wumpus Theres a bat in your room I smell a wumpus Bats nearby I feel a draft There are tunnels to %d Move or shoot (m-s) which room? You hit the wall Give list of rooms terminated by 0 You shot yourself You slew the wumpus That was your last shotBe8&8 " q,  n7q,  Z7e8 &fCC  j @q o  &  6`( d  Vw`  Bl error on copy f1N1N1N1&0C  Bqqq&qq, qf& H@l1 11 1 + m  xX _te0E ! `7tU6_  |%y   j%y_L_\w"w     ue0  a" aH ww  d   ċ r @7ww z  ^ wpxN @  v& ~ wLw :  !  0 9      Wp D`e ww DC  at06  ww  Another game? (y-n) Same room setup? (y-n)   D ( & qf7 q,@ @  b@  ȝ q,q q,@   h \   f7d Hq,@ @  T 8 @  \ȝ(  x f   Wv Ee    2 2 2  7 f& Wv Ee  @E7 2bwe2 @@ww ~wDe   % wv7 7 ׯ-  L7  .<epB Jdox*f8ecslFr ӕ- R r f e0 @ > ҋ D~8 $ ӕ0 $f v Le0 9e  7we&  m  ~    ~ w|7 T J F0   2Wp `e0[eӕ?f ,P ehknZ]`cfi@` .&&w2 f  2 2 Wv E@`e & ! ,   e e$ fhr    ,  e7 & 2 ,    &e " ::e8p:@11     : bwOut of space.  :e8p:e8Bl s3 B88& F V 1:1 8p: f&7 H 0 :  @f  7  (-f  ~   7n j f 7z 7 V w w LwHAupNNmf  ww  @@5 _  fA rBpEu@@`55DCN& f& %5 2`5!-`f $`f& . %`Df l %5 5!&  5!%@@AA Nf`  u_Nf  @`5_Bn"0 z 7 x    /       &e  & !eRɋʋe7 7 xnpedmfinqc? ^ B 77zawM p >  8ҕ d "    "    wLNf0q e`CKe8 Gxe, 2e8 Be8, 2 8 4l4 4<80<Ae8   ,Out of headers.      @ @W \W 85W,W,@@& ,e ":e8  & 87 & 7 7  v 8 d e8^ U\87R e ef . %Cww  DCԒ wvw d DCB5ҒS wFf BRwf@6p7lF@& HADCBFv 7p fh Wp3e @7Z Ef h . a   ( * [ G}Mdf:p([fh "_yX Welcome to 'Hunt the Wumpus.' The Wumpus lives in a cave of %d rooms. Each room has %d tunnels leading to other rooms. Hazards: 7   w x www ʋ @ n | @ \  ~/bin/ed/tmp/ftmpaCannot open temp. file t f w< 2 jN   F       xw p w ww|< = f  B L v .  "  8  " @ F wP  ww< , ҕ  052 :  Z. e8& 2   8:8A e8 8  bw w 8  not in memory. Cannot open file cannot open output file form.m Bottomless Pits - Some rooms have Bottomless Pits in them. If you go there, you fall into the pit and lose! Super Bats - Some other rooms have super bats. If you go there, a bat will grab you and take you to somewhere else in the cave where you could fall into a pit or run into the . . . Wumpus: The Wumpus is not bothered by the hazards since he has sucker feet and is too big for a bat to lift. Usually he is asleep. Two things wake him up: your entering his room your shooting an ar w 6"(  z  ҕ  d P ҕ zww` / "ҕ   D ҕ:  .ҕ wZ      ҕ w& H z  > p WpUWfU| 7  \,    H |c  h e 45 $ \)  ~8w -5 (   Ve   w  l & 6  8w &  l  5v d  f %N 5 % @&  5@} d 7a2 *&ef %N  te   %2wfw T % d. ,s   N d    dx % ww ~w|Der  l % w7 X7 XׯN- F D(w87 : .w.eB J ӕ- R row anywhere in the cave. If the wumpus wakes, he either decides to move one room or stay where he was. But if he ends up where you are, he eats you up and you lose! You: Each turn you may either move or shoot a crooked arrow. Moving - You can move to one of the adjoining rooms; that is, to one that has a tunnel connecting it with the room you are in. Shooting - You have 5 arrows. You lose when you run out. Each arrow can go from 1 to 5 rooms. You aim by telling the computer the aw vw f w8w  `-X P J @ vҕ lB-*w > w header not accounted for part of asmem released free headers free blocks size  &@     ʋeʋB   & T P D D* 7 0 ʋ.| &'ʋ%f ?  J % <  xeʋBf    r f e0 @ > ҋ D~8 ӕ0 $f v Le0 9e~ vp 7`we&  mD B ~    ~ w7   0   Wp `e0eӕ?f ,P   @f  7 -|tf@w f@)wfw7: fw,w(w|f@ww wZf@#f@www*f@@& HADCBF7F/etc/utmputmp? %s? try again /dev/ttyxcannot open tty%c Broadcast Message ... d0o*xlfzecslr_hNN;  -h(  *n;y; / ;  ?x(%; e^( ?P(% L( @( pЁ2e2( _` ; _` ( U2 ; ( (*;; / r *<< / ' ?'e' '' 'r' 0 25 %|_` ' ?r~' <  | %I J&5D 21 7<  %V<  5% bl<   ' A pЁ2_` <  _` N<  _` w&w &  }/ eeu-u-9  p6B8Buu"@@&( X%  vH( \"A1eeu-ڂ_   p:B -G? % A p@g@ @g A p@  vH _w h # fe &W? /%f 58BZ 56B }-n? eu-}N \"A1e p8Bu@K -? ww  7   .%other::1: bin::3:root,bin ('< / 52< / -&< /< /hh<= /Vh = / w2&w &  P(-H(J(@(=  6( y*(ew% (-( ((;=  'tyt yy 'tyApt_B y_0y\_0I87~+ y't t_Bv't t_Bd'tt_BR't t_B@'t'tc0't"t[ 't\tSX=Dx7J0F07 07g= &tx@ r  @ r m -'@ re5 @ mx e% @ r mN @ r m0  -ww 7 7%7|% t%( .%(Ue  +L%L%7  f .%_(@ 0 vH m } .%N P5 _:@t _6@t@t5%!@ 8BA @6Bt@-V@ A %vHpvHDu#@tx-@te@t&e  @ty|qtwz}rux{~AWtx`Wtvx`ePpt&t t=  |&tx&t r&j& 0 Ё`&_ w ($&;ttʥ  (%a%z%A%Z %0%9%_ ttt&t &#= /e -%% 7&w#w #%ev-n= n nw|#w j# 5 %"%m>%%7 2% % %/8 J"%*&= ! 6"5% %  R% "5%/%  4%%* !5   w"5 @87) yunv  -% N A 1} N Am 1] -_6 P ^N? / @ }@ }f &? /% -@m }@m }@ &? /% -? /} X& A 1VE  &e} X& A 1V5 @ %vH_ -dw>w , t7 ~@ 58B@ 6B#x~tl~t Z~t`  lp -" :~eB-ڂ _!5  t0 -~2J` & 6  v2w d2 BNf  |4et7A  |  R " <' p Fw*2w 2 @t5t@t5^Vw1w 1 >/ (4 p/N `/ %  ` x4 3  4 4 p5 5 P/ p/5 3  H&5)5 6  ff 2%  -5ff 2e05  d3  N5 `5 s55 P/ p/w0w 0Ƅ >//&w0w 0 @ = _ !5%  = %\  !5\ u-_N ^!5 r e8A! y%02%9.@e7H%0 5 5%0w$ _%9 upAmew%a%z%A%Z %_%.%$:lDu%a%z%A%Z%0%9 %_%.%$N  H#B#:# 5@_w #  _=  _b=  _b= t t5%  "( .%-}[t%;t5H-1t0 T)eu% AEtAWt 1P( te(( X% @ me(( X%@ m @ me5@ mze5u-_ (tp/  R(t&et&e X% ?tup5 -|| -n? v|tph|t  J|t`  p( -r  ,|e-|| <: f@w0w 0ue @ 5r@ b  55_N f  5e}- = u=w0w / %@ b@tt5  @w/w / 2\ 15 / 15 / /5 / 5 /@t%t N 5 / -l15 /5 /5 @ 5 / -D1<1 6 /  1 11 16 /e....46 /e10W6 /%. 58B0 _b>  _b>  _h >  _h>  _n>  _n#>  _n*>  _n1>  _t7>  _t=>  _B>  _sG>  % " 7 "% "% !% !%:!_!mn!7 h _w p fs5 @tt  @sj@4sj@ew4 -N! @    -6!%  rrt>  N \ w  5% 3 5 !,%\  5%}(\? /% *t ? /t0 te ? / te ? / -{w2w  DWp Ce4 `5$ C-Wp e4@w -4. -*? 5 WpAm @A Amp4 -LWp w  @ B5 _%@ vH 7|N P t } .%5 @t5%@ } Nf & A 1} -bz%FZ7 5 _%@t5_$@ 7-_$@tAWt06 /%...@K &6 /e006 /%0p. 6 / |07 / r0l07 /%X0G7 / L0X7 / H0 D0- >/\z7 / &0 07 / 0 07 / 0/7 / 7 /w-w - / >/7 /Nf / /7 / /  p/wL-w :-N7 / $w0-w -N7 /  r 7 /w-w ,7 /w,w , ؀@ A Hw,w , @A H w, 21%%  5%}% 21N 21%  x5 > wNw < 5 R5@ r e8A! y N 21w  N 21 5%$> /%- @ 5 5%0<%985 %9AWp Ameu 5%0 N%+-> /%AupN> / $ 21 _T- 21_T N 21 &5%*_TN 21 5> '%*N 21 5%/_"N 21 5 > @` BEBt@0:@ }7@ p}- N @ } &f@ /e@ } -\@ P p} Z Fݵ @ }N( *   x @ N @ &}fT@ /e @  p}@ } -x_#N .+ - _# b wZ w H @ B5 $@ vH@ p}N ^@ 5lvH @ vH } ^ -  @ B @ re ^ -  @ B@ r w , ,@ 7`,,K -,7 @w`,w N, 5 @ @mH u-w6,w $,   @m Am@R @m  @m -;w+w + u717 /#@t @mAE t  @0 N 7 / --8 /wp+w ^+ PF@-1C@870 y w&9 . 7/9 d-\-T- @D9  A1`@ȋe %w -W9`9 . 7~h9 >  _%\ N 21 5u-_w X 7  -. @ w w  $@ B_(N )@ p5 5 4@ vH,@ p-% r@& . 7 9  9 /9R~ \ z,9@~ \ 94~ \ KX*vu5 5 5X r e8A! y 5 pЁ5  @tU5 @tU @tU p +L9 /9 /9 /9 /(: /L: /l: /)~i)e~)x)er)l)ef)? b)e\)X)Li5 5 r eT8A! y: /: /: /: /;   _h@t6t-+_h%_h@tt+;  u$@te@t&e@t&e X%5P@ m e@e5eu-ʂ 5 @te \"A mm  -0 &( 5 @ Nf  N N w&w  D   ww N N ww  ww  9D  5 j          @5 wLw :N  & j  n & j     $        ww  7   lA / eu-@ vH @ vH qA / M4@ 5}+N A / %AA /%NA@ A / - A / A / ww  %r  f 42 57o%af 42 5& f R2% f 1 5@wPw > w,qw>w ,A w.w N 1ww   ww ~wpDep  p % 21w7 p7 pׯp- p p(wp7 p .wpeABtermTERMtokenTOKENleftLEFTnonassocNONASSOCbinaryBINARYrightRIGHTprecPRECinvalid escape, or illegal reserved word: %s%s should have been defined earliereof before %%}yyvalyyvalv(yypv%c%d)yypv[%d]EOF inside commentEOF in string or character constantaction does not terminatenonterminal %s not defined! %s: %d too many statesputitem(%s), state %d yacc error--duplicate itemout of state space%d: %s %d, %s %d, working set overflow State %d, nolook = %d flag set! %s  n   7 7  w0!  ?w n  7h7 r ^_ X4_ x>_ 0_ "  :7 N%_  _  7 N%   7 N%r @f V   _f 40 R7( n 3  w N _l  J ӕ- R r f e0 @ >@p ҋ D~8BB pӕ0 $f v Le0 9eoo oo 7owe&  mo o 21~  21  21~ w7 |o ro no0   ZoWp `e0eӕ?fBo ,8oP .o (o @f  o ~7n B~nn-nnf VlPlHl  78l 4l 0l7*n 7 lf@too many lookahead sets$$$~$yyact %d: reduce/reduce conflict (red'ns %d and %d ) on %s %d: shift/reduce conflict (shift %d, red'n %d) on %syypactyyr1yyr2off = %d, k = %d action table overflow %d no space in action tableyygoyypgo%s: gotos on %s nonterminal %s %d %d state %d, pre-nonterminal %s states %d and %d have equal positions state %d %s same as %d %s accepterrorshift %dreduce %d . reduce %d . error The function "system" is called/dL0oF0  7 N    @03 J  h w J  w<w * 2tw&w C n ww  @ ~ t5 u B5   65 _ x     n5 _, e 5 \ W ' n M  5 25@  5 Nf %55%%w fwwBwfw@e7"Bwhfww(BwNf@ww.Bw, f@@& HADCBF7dmF Kx0f0e$0c20s0l0r~ I n= N }uN&  [ n5 55  ~ %t_ 5 3wB% %_ { n_ % 5ssKCw  5 @0C_f P_f   %_X x  5     p55% % @P%  @P% @P= N  %@=@0   N& % _d"x./yopt -r./yopt -rv./yopt./yopt -v/usr/yacc/yopti-r-rv-voptimization execl call failsMH2019.yaccopt -rMH2019.yaccopt -rvMH2019.yaccoptMH2019.yaccopt -v : int nterms %d; int nnonter %d; int nstate %d; char *yysterm[] { "%s", 0 }; char K  <5% %  @00t@p     \5 D _ 4 nw$w  555555 ~œ%   dœ% n -_ 5 & %œ _D%7% 5 œ _D%!% n  N5& %œ _% n  œ%(     @P:% -_-_*yysnter[] { "%s", "%s" }; %d/%d terminals, %d/%d nonterminals %d/%d grammar rules, %d/%d states %d shift/reduce, %d reduce/reduce conflicts reported %d/%d working sets used memory: states,etc. %d/%d, parser %d/%d %d/%d distinct lookahead sets %d extra closures %d action entries %d action entries saved through merging %d states %d goto entries %d entries saved by goto default conflicts: %d shift/reduce, %d reduce/reduce fatal error: , line %d int %s[] {0,%d ,-1}; memory overflo0 & 6 F w N  ww zN  J swdw R% @&  7@!$   76# 6 . 7  8 . 7  : . 7  > . 7  D . 7  K . 7  R . 7 Z . a . v  l n j \   wTw B >5%  w: 4%  $  7  5s      5w BD n  5 5N& %@Ap  @) n@@s  }u e}u 5 @=N @0  @ApN }s_ _ ,_ 5& %__ _ _ T5& %__ 5'u@= n@B@ 55 @6 Q nww NULL { %s }ORVorvxZxZ$828<8 h h\8d8l8t8VX)XUW 6 6  V f "'\bnrt| l H $ 6 Z 8888) bhzntz"%'\@@899=>prhy.outputcannot open y.outputillegal option: %cyacc.tmpy.tab.ccannot open table filecannot open input# $enderror$acceptdefine yyerrok yyerrf = 0 define yyclearin yychar = -1 subroutine yyact  >  >ww   t @ 52wlw Z@ r eA! y wB    w  % % 8%  h % eeww www zf wpw ^ \N  wL  <4  27  $N  3 3w   w D5  2D- N  `52@0B @5  5  H52 }@0 @w > C* 5D % D-  N5%  3@w w B C-2w w @ 55 55u  55_*u@5_* ` R5A1}5@p% t A1= %  u_ju 5 5 @Jr=  f t =@0 f t 5 tA1N 55@@  Nf j D Nf  @D-5 5D(   4 _C @4_C  u-_5@5@@5%  DC-D- }@0 @5-Nf j 5_ _u _ _Nfs there:\ Home{-| }Thoughts{,} From Abroad:\ {Robert }Browning Ah, but a man's reach should exceed his grasp{,}:\ Or what's a heaven for{?}:\ Andrea Del Sarto:\ {Robert }Browning How do I love thee? Let me count the ways.:\ I love thee to the depth and breadth and height:\ Sonnet{s} {From the Portuguese}{ 43}:\ {Elizabeth }{Barrett }Browning A Book of Verses underneath the Bough{,}:\ A Jug of Wine, a Loaf of Bread{-|,| }and Thou:\ {The }Rubaiyat{ of Omar Khayyam}{ 12}:\ {Edward }Fitzgerald The Moving Finger j 5_  %   @0_@p_@ _Nf  _@5@@ N CN  w    @0@  5 N f  N N  w C"  xn . $     n wFw 4 %,  w0 u-%   n  n  J  3u@Come live with me and be my love:\ And we will all the pleasures prove:\ {The }Passionate Shepherd{ to his Love}:\ {Christopher }Marlowe Shall I compare thee to a summer's day{?}:\ Thou art more lovely and more temperate:\ Sonnet 18:\ {William }Shakespeare Fine knacks for ladies, cheap, choice, brave, and new!:\ Good pennyworths{! }but money cannot move:\ Fine Knacks{ for Ladies}:\ {John }Dowland My mind to me a kingdom is:\ Such perfect joy therein I find:\ My Mind to Me a Kingdom Is:\ {Sir }{Edward }Dyer  writes; and, having writ,:\ Moves on{\:|,|.} nor all your Piety nor Wit:\ {The }Rubaiyat{ of Omar Khayyam}{ 71}:\ {Edward }Fitzgerald Ah Love! could you and I with Him conspire:\ To grasp this sorry Scheme of Things entire:\ {The }Rubaiyat{ of Omar Khayyam}{ 99}:\ {Edward }Fitzgerald Remember me when I am gone away,:\ Gone far away into the silent land:\ Remember:\ {Christina }Rossetti Home is the sailor, home from the sea,:\ And the hunter home from the hill:\ Requiem:\ {Robert }{Louis }Stevenson I fled H ˂ x| ! n! n 55@2 @5    @04D-%! n u@2uN u@&   5=u A1@& t &  u   5f %5 N K_@ @5  ~  s_w DC@  x &  w& & & & Underneath this stone doth lie:\ As much beauty as could die:\ Epitaph on Elizabeth{,} {L. H.}:\ {Ben }Jonson Death be not proud, though some have called thee:\ Mighty and dreadful{,} for thou art not so:\ {Holy }Sonnet{s}{ 10}:\ {John }Donne Gather ye rose-buds while ye may:\ Old Time is still a-flying:\ To the Virgins{,} {To Make Much of Time}:\ {Robert }Herrick Why so pale and wan, fond lover?:\ Prithee{,} why so pale{?}:\ Song:\ {Sir }{John }Suckling Stone walls do not a prison make:\ Nor iron bars a caim, down the nights and down the days;:\ I fled Him, down the arches of the years:\ {The }Hound of Heaven:\ {Francis }Thompson So 'ere's to you, Fuzzy-Wuzzy, at your 'ome in the Soudan;:\ You're a {pore|poor} benighted {'|h}eathen but a first class fightin{'|g} man:\ Fuzzy{-| }Wuzzy:\ {Rudyard }Kipling Morns abed and daylight slumber:\ Were not meant for man alive:\ Reveille:\ {A{.}{ }E{.}{ }}Houseman I will arise and go now, and go to Innisfree,:\ And a small cabin build there{,} of clay and wattles made:\  w @7@  x 5& t   n7 h@ _@_C5u& t f     5u & t @& t   5uu & t f  5@& t  N     _8@p,  N P@ 4    N     t --=! nww CB%ge:\ To Althea{,} From Prison:\ {Richard }Lovelace I saw Eternity the other night:\ Like a great ring of pure and endless light:\ {The }World:\ {Henry }Vaughan Come and trip it as you go,:\ On the light fantastic toe:\ L'Allegro:\ {John }Milton When I consider how my light is spent:\ Ere half my days in this dark world and wide:\ On His Blindness|When I Consider:\ {John }Milton The grave's a fine and private place{,}:\ But none{,} I think{,} do there embrace{.}:\ To His Coy Mistress:\ {Andrew }Marvel Great  {The }{Lake Isle of }Innisfree:\ {William }{Butler }Yeats I must go down to the seas again, to the lonely sea and the sky,:\ And all I ask is a tall ship and a star to steer her by:\ Sea{-| }Fever:\ {John }Masefield April is the cruelest month, breeding:\ Lilacs out of the dead land:\ {The }Waste{ }Land:\ {T{.}{ }S{.}{ }}Eliot Now as I was young and easy under the apple boughs:\ About the little house and happy as the grass was green:\ Fern Hill:\ {Dylan }Thomas  w  x ^! n   f ,zP p j @f N #7< !#2*-$f !!  7  7 7 f@w f@)wfwhwd!wfTPwmJ!wv>wm8fw(!wTw f@w w!w*f@@& HADCBF7F% wits are sure to madness near allied:\ And thin partitions do their bounds divide:\ Absalom and Achitophel|Absalom:\ {John }Dryden A little learning is a dangerous thing{;}:\ Drink deep{,} or taste not the Pierian spring{.}:\ {An }Essay on Criticism|{On }Criticism:\ {Alexander }Pope The curfew tolls the knell of parting day{,}:\ The lowing herd wind slowly o'er the lea:\ Elegy{ Written in a Country Church{-| }Yard:\ {Thomas }Gray The best laid schemes o' mice an' men gang aft a-gley{,}:\ An{'|d} lea{'|v}e u & 6  w p    5f %% l@ F  2_@Ӌ  /@ /˥/ @@e *ҋe@  @̋  5t tf `%e@% Ȃ@  whw V-^  ZN f `% `% & `% `%ww Dԋ@ ww ~w De   % nw7   ~x~pcannot open inputfsendstartdefinereturnfreturnsyspitsyspotOut of free space bad integer string eof on inputr > J > > 2 8 x  T T  xxxxx xxxx x illegal literal stringpopno operand preceding operatorillegal juxtaposition of operandserror in functionno operand at end of expressiontoo many ('sunrecognized component in matchno space beginning statementunrecognized component in matchunrecognizes nought but grief an{'|d} pain for promised joy{.}:\ To a Mouse:\ {Robert }Burns Tiger! tiger! burning bright!:\ In the forests of the night:\ {The }Tiger:\ {William }Blake My heart leaps up when I behold:\ A rainbow in the sky:\ My Heart Leaps Up:\ {William }Wordsworth The world is too much with us; late and soon{,}:\ Getting and spending{,} we lay waste our powers:\ {The }World is Too Much With Us|Sonnet:\ {William }Wordsworth A sadder and a wiser man{,}:\ He rose the morrow morn:\ {The }{Rime of }{The }7 ׯ - (w 7  .w eB J ӕ- R r f e0 @ >d  ҋ D~804 B ӕ0 $f v Le0 9e    7we&  m  n~  n  n~ w7   0   ~Wp `e0eӕ?ff ,\P R L @f 0  7 8  -fwXwTd component in assignmentunrecognized component in gotoname doubly definedname doubly definedillegal component in define^dV:VDJ     ~h$d$,attempt to take an illegal valueattempt to store in a valuephase errorillegal functionillegal functionparameters do not matchattempt to transfer to non-labelattempt to make an illegal assignment#%Ancient Mariner:\ {Samuel }{Taylor }Coleridge In Xanadu did Kubla Khan:\ A stately pleasure{-| }dome decree:\ Kubla Khan:\ {Samuel }{Taylor }Coleridge She walks in beauty, like the night:\ Of cloudless climes and starry skies:\ She Walks in Beauty:\ {George Gordon, }{Lord }Byron I want a hero- an uncommon want{,}:\ When every year and month sends forth a new one:\ Don Juan{ Canto I}:\ {George Gordon, }{Lord }Byron A thing of beauty is a joy forever.:\ Its loveliness increases{;|.} {it will never/Pass into n>wfw@w<Dwf@w$w Jwpf$fPwN f@wwTw*f@@& HADCBF7F/etc/mtabarg count umount/etc/mtab%s not in mount table Unknown error: 2doxfe`cns>lr -?O[m} 1EVet!Error 0Not super-userNo such file or directoryNo such processInterrupted systeroot 8m othingness}:\ Endymion{ Book I}:\ {John }Keats Matched with an aged wife, I mete and dole:\ Unequal laws unto a savage race:\ Ulysses:\ {Alfred{,} }{Lord }Tennyson He will hold thee, when his passion shall have spent its novel force{,}:\ Something better than his dog{,} a little dearer than his horse:\ Locksley Hall:\ {Alfred{,} }{Lord }Tennyson 'Tis better to have loved and lost:\ Than never to have loved at all:\ {In }Memoriam{ A. H. H.}:\ {Alfred{,} }{Lord }Tennyson Oh, to be in England:\ Now that April'm 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 directoryInvalid argumentFile table overflowToo many open filesNot a typewriterText file busyFile too largeNo space left on deviceIllegal seekRead-only file systemToo many linksBroken Pipe  $#& R% Z  j z    T    e :ww Ne8    R%  &  ed- e   _5 %9AWp `euNe &%0 %d %,!%-O% h% eB%  _JN Zҕҕ  wҕR5 Ne &%0 %dR%,% % ҕ+%9AWp `euҕR5 Ne &%0, %d% % R Ne &% %  % %% @f ( 8 7z 8 -fwLwHwf40,w fwwwnf@wwwLf@www*f@@& HADCBF7F/etc/mtab%s on %s arg count mount/etc/mtabUnknown error: dox&f4ecslBr8 )9Q[u&8GWfwrm -f /etc/mtab /etc/update %*_ҕ%9AWp `eu _%% ҐNe &% ҕ _~Ne &_f@w fwZwV wfwB@e7: wfw7  fw JA 7 fAW,f B@ 8 @&61fA   @ @e71@  1wfwxwt wfd`wmZ wNwmHfw8 wzw* f@w^ fAW  !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 directoryInvalid argumentFile table overflowToo many open filesNot a typewriterText file busyFile too largeNo space left on deviceIllegal seroot::0:3::/: daemon::1:1::/: bin::3:3::/bin: ken::6:1::/usr/ken: @w f 1 7 5 e>w 5& w&L&~H&xD&r@&l<&f8&`4&Z0&T,&N(&H$&B &<&6&0&*&$ &&&f& f@#f BRfw w f D& w }f@ww wf@fA w,xw"re"w"hew"^@lw"VAlewI &@t`e w 4wekRead-only file systemToo many linksBroken Pipe & 6  w % . @-e5%% + . `e 5  @ @m& f 5Nf N P7 J u-  ww @ %@ _ fe f  % @ 5% @0     N 7n % d F   N & %  Z 5  Z @p 7 N fe f % @ %@ @ ww4w&w N   ww DeL@4 & n  : w/%J %K  t5  t5 N  5N  5  B-B-%B-B-% & n  :  w4w "DC%: e`m e rfww p@&f L %  r<R r< r<R r< rWtC` re rwPF   !070 %n6   000 010 020 030 040 050 060 070 18- 090 0a0 0b0 0f0 0g0 0h0 0i0 0j0 0k0 0l0 0m0 0n0 0o0 0p0 0q0 0r1 0s0 0t2 0u0    N & % ww   N =  u=@w w t  u  }@@wVw D    }w, w  B_  . f %7 w; .w  @  @me5'5@ A @l 5 } @  N u@ A @l 5@A 1`  }  ww @ @  w @   0!  7  ww  H ԔAA WpCeb  ԔԔԔ BeWpCex ԔԔԔ& ed& ed& ed& e@ &  wxw fA r nw^mw FD % A r  r e0@ԕ A r e0@w@& HADCBF7fF6rw6r@f@  P`Hm`  `LH/usr/lib/crontab/tmp/crontmp/bin/shsh-tcannot open table  . & 6  w %. 3@b3@ 5!@ 5@tN]f@& % 9  b? wn@cw H5 %0%9w4AWp Ameu@ 5@w b- N xf %p % x& %s %ww Dԋ@ ww p~wDe   % BwR7 n7 nׯd- \ Z(wN7 P .w @ &@ & %A @, @ 0 w ~wVDeL  F % w7 27 2ׯ(-  (w7  .weHB J ӕ- R r f e0 @ > ҋ D~8pt ӕ0 $f v Le0 9e^X PJ 7:we&  m  ~    ~ w7   0   Wp `e0eӕ?f , 0  %ewPF@ D M:/ESTEDTDay Mon 00 00:00:00 1900 SunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDecDevB J ӕ- R r f e0 @ > ҋ D~8 ӕ0 $f v Le0 9e  7vwe&  mZ X B~  B  B~ w7 , " 0   Wp `e0eӕ?f ,P   @f  >7  >-fwwwwN f@wwP   @f   7Tn x d\-VNf@w fww ~wnf@wwwLf@www*f@@& HADCBF7F Usage: cpost [-d] file1 file2 ... -d: 0 < d < 10 read error dox6fDecslRr   & 6  w    5$f %%$%$ ˋ e $ %e@%. wz % @&@& ^% 9 @ҋ  /@ /ʥ/ @$%$ ăˋIe A@ @ e?  A@ @ e $ @ˋ? @ 5$t t$f %_e@w XJ-V | N f %X % & %w*f@@& HADCBF7Farg count mknodusage: mknod name b/c major minor Unknown error: d\oVxfe4cBslr>/?Wa{ ,>M]l}!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 deniedE j & 6  tw    7t  B    P L  B    < 7&  97                     ҋ% e<-    rw D & x @-%% N  w @-@- 0 e@-  w Ne  D  wz w h   l9  @aȋ Z p f[ %ww Dԋ@ ww ~w De   % w7 7 ׯ - (w 7  .w e^B J ӕ- R r f e0 @ >\  ҋ D~8 : ӕ0 $f v Le0 9e   7we&  m  ~    ~ w7   0   vWp `e0eӕ?f^ ,TP J Drror 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 Pipef@w fwwwfwwwf@wwwf@ww|wd f BRf@wLwHw*f@@& HADCBF7F6rw 6r@ @` :arg count %s: cannot create %s: cannot open %s: cannot open isize = %d free list %d/%d d--777 0 0 $ %s: cannot open init %s: bad format %s: too big %l/%l: out of textout of swap space0B@@@@@@@@A b5 @@QDQEQ@ U0 % 5 Q 2pv Er b" "I 2 F%%  m5%f F%&  N 7 7- e-  % : 5 @ 0  %5 fe  -8 5 @ 0  %  w w . @ `& e5Pg& %5PP& %5P@07@& % @eCpt5P % 5 ~5 ~P & 6  Jw 8 u@e= dA1 @e0 @e5 } *A1  @e0  ww     tE5 % 7 @ww zF7 z  %@ B H  @A@x = %Zd  X  L  @  4  (  8@ @aC r ~ &@ @a @ @at" "7 "5U0 7r޷ xv"ަBE   5 e Eއ1 އަB   5 |v  8އ,އ! ! + `! f EA `E E v EE \&v  E H&v  v   Zݞ # I .Dݞ # I#& %-  55 5 @ @a0 %5 @ @a0 @ @a0 % @e55 5 @E7  y 4  ( 5_& Nefefefe  e%_U 5Nef  u 55 55@e5f& %5f& %te5@e5f > 5 %_}ee fef F%55`Nefefefe  eN _e0 A AaA rNe0  @  0  F5 wj b@l Z@l R@l J@l B@l5,*(&$" 5 @ @ap= @m5@ A ru% =% 9AAm ru%a %z%ze%z%a %z @0% % uN_2w ^& %7w^ E w p^ % ww n x r  ݞ # & ܞ| #v &n ܇d   4P ~ (P~  & ~ &~&   &  # jܘb܇PI@Iܷзܦ   P~ۇ۷  & C~ۇmH   W W @ 6r 6r@@A6v@@& ADCBFw 7 Ze ft5 Z5P_@Nefefefe7f e Nefefefe:f e  \$<7_NefefefeJ e eNe 5 u-_@ @aA Aap f  ww  5 @@mH@ @a @@mȋ- @&< % nww p d5 5 5 "@09 M *AWp B`eu @@ww  527Z y ] ^  (%7 `w\f@wwwLf@www*f@@& HADCBF7F  !"$(06J $ B L%  " %F   Wt p 0 e%>TWpWtN( 1 8 5 7. L%f "%` "%2 2z |M BF @ 0 X- 7 X- 7JD :  v: & & &e&  P#% wnw ^%(`#%ș%( #5 %ww %(dN P(%N  % 5 @p l5% % %  @0ww  fZ h%fH F%5% Nb @wTw B f h%f %5% Nr w w  &" 5 0    f >  5 @ A p %d@ww  %dR 5 @ A p %df  7 rn p bw6w $@ @m H @ @m 55 }   %                   P(&f p e% G_L(N P(&f F &f : ee%@@m@me-H je%  @teU   %ze% @teUDm  %z   %Dm#%  @tU"e# jz%z% w\w L@etwHw 8t &% b  d< 2& >% dd7Dڐ4e% Nf f f  eww  5Nf  5 @ @m %= @ @m H % DwXw F "   wB w *%dldd @a0 -R   7r@D@a@`02@am  7rD - 5.e50 J D.D-0 J & & % @`2 J -@0m!  J D-0wLw :~wP DeF  @  % B w7 , 7 , ׯ" -   (w 7   .w[ r< ww7TDr7Nr7HG7Btz7<x76u57$PPR`0  ȋ ` 7  CtEe  e &55F { e[f W  W C G[tEm(>  0 "& A4477ww N H,e 5  I  `5?Nf ~*%  !Nf b de >% dd2e R6Nf d  fw2 NB 42 w w N H,&e 5 Nf& ~*% ; 4 %d#Nf d d&e >%4  c4e R6 apw.w DCe - NK 42 w w N H,&e eB J ӕ- R r f e0 @ >  ҋ D~8 ӕ0 $f v Le0 9eX R J D 74 we&  m    B ~  B   B ~ w7  0   Wp `e0eӕ?f  , P  @f z 7Vh  ^ V -P H f   7  7 7  AA|AxAl7@`fA-=================y$s=t..vtvRw88qqqqxr=====================================r.s=======================zz=s=uu=.vtvJy|y=h  /etc/initmem = %l no clockiinitno spacebad blockOut of inodesbad countno fsno imtInode table overflow panic: %s %s on dev %l/%l errbn%l er%o %o swap errorno procsout of swap spaceswap error 5 *  a5Nf X-  e e w  . 5 5 KNef b 5 @ ` %5 @tp-d@tp-f %d ap%de% dd%d 5#4e R6 NU 42 +_+w N H,%d  apwdw TX L-%d%d Nc 42 4 4  e%v ڂm 2ww Q X *#  d 4ܜܞ& >% ce%v ΂b̵  & .  `Qe %7 6 iwTw D & 5  b5-(5-$̵̵X 2!e%v t 2{ 1c w e %ɂtt̕fe v$ f b 5 dd .fe $ tl5eSee  ddw D  /4 & ,  & .  `Q 4 d  ddf b 5D@E5 `N (5@ `N d d dd7 H%@ `72̓w Hڂڂ ؂ ؂ Ђ Ȃ Ƃw(@ b" j w ğ  | tEw^` "jKw ?ww ww DCB~ww D 5et DL  2 X@ f& nhe  2  fB L%47z R6ww v$0 e44@m- tLm  Leww |s %/& X-  %/   rr . _&Or _$OE%@@& J H  r %VҐ %/%V %/Or7 Vr7 Pr>r5 & v$ 72r5 *r$ N dd% & J 7"r @e7q5q N ddq v$ & 6; & b 5X@&qE` >%eq xq q  `Qww BʵL H,Ee5f v$  b 5f $ tA@lee ʵxveʵTeTN cw"w D5 pe5[ U5HN& b e5 1e@-%& b 5e5  N& ) @p- dd& ) ,ȃ ddN& ) = e@-E4 4 w*w ޏ * w@U4 }  0w @ X@54 et& L%  .ww _T@  e %b t-0a 24 tPe?tEet DL  2e v: & & &etr7 hN 2Z e& nhe3C  v:  # #  >% L wTw DD  &B L%w$w  @E%U@e 7h@  xZ> 1 lqHZH` %V N dd% & J _pMw5 .qf X- _|M_vMw LpE pwHw 8p p "%jpw$w  x *# X(pq Jbq^qVqʕ2˕3̕w3@ 0  .w D% 4 3 5Ee R6 `Q Ue 5  8Q, 7 o7o 2o `Qw,w Do 8Q  `Q7 o  `Q o o B w%7ZHԔ%VTDXFl 3d .ww Ce 1 1@ %%B %d%l%o %o  1 %s 1ew*w Nf v$ N& 1 Nf $ e0 1ww D x 5t t tv%  1 1 1 1tww wJ N 1 ^w h@@&f 1ewTw DD  42 Nf& 1ew"w B _3E% Wp l _3BNeH 1 NR 1 ` 2 < B   |& 6wNe "%  7~ENe "Ete%)N "e "E?%?Ete "e " 1  N " 1e "~f~ pB$3~d-~'~_AU~5 _A _@~ B _A_@C~ !  E _A _@w ,~ # 7~ww d}ww ww  t-N& B e%ww  U `Qe 5 7 Lo Ho@o 5 70o 3 `Q5Ee R6w dD& 5 ̵wLw mw:m6mw2m.m(m"mm &e@@ A @e56mpNf " @ ef " & b" ҋ@ fe " k5 k k 5 k5 e%  m~l %rl0  %6 .N dd%  @$e 5 \ X A Dww u-@w@w u-@w|@w fC@Dm*Q]5# &Ҋ 8#Ɗ& P#%jw`B 2$      T= w \ %   t̕t n7hx R6   #w| t̕t Pw JC 2  x6e~w4w $D4 ̕ 7z R6ww DEted`& && &e7 \{t7T{7F{ 3 .7{ ww { t@-@@ & v$ {e {{`{~{ &e  wFz` v:zz@lL{ & #   $ ` {w {rzR ̥ -z Tz0- e%7z: ! 5 7 jzjzE7\zT  x6! 5 42۸z (y7 ! R6w2w "y-  w7 ! R6 _G xz "%_G " R6 ww 2lt7k ww @k%   Ie%k .  DL  2 d  >% cj&B L%̕ ,  R6 R6 ,  ʥ x6e% e%ڂ w   Bj, n ʥL k b  L% 2 2 22 2lj 2$   2$ lj 2$   2$ j dd1ʥ   ZjVjWtUp% :ww ~x 5  ̥  5e%%4z  tD mB DL J X E%̥.̥+e%% E%̥̥ 5e%%D  & >%_7@ && nhe ,m D&& nhe et& L%4_7 2ww   # #7` 7 27 "%e "]%Z 7 ~ " Krl "  ^ " ;RL "Bڃ e%%6   % " my ye UE_Fx_F F _Fw M  2  e  5#   &  e   3ee3@E%  x x f  xw d%<^_RI5f<J J B 2-@:-60 R65"b R6 ʋ0 x6e% (Hi 5 _U 3iww ,i ˋ e% i  ? i7 i7 i7 i7 i7 i7 i  ii1`wDw 4 Vie?tE ViJi P(t  6i4ie`,i&i i`i &e ` i jh`hh& #  N v:w v:*h`h & #     $w V fXwVw F fXwFw 6Ch I>̰ g8>hg:hg7g̵ % O  P7g7g% 2e% ʥ     ~ fю #  #wlw \5 7 $ѷ  ̋ 5- e%D 2̕  4%@ ` #D7BCB DL 5˕t # & & >%˕ w\t N f # w &5tu- NmfNB L%? #NB DL E%  r2d 6e%ۂ`7Zx R6@E%@e 7w  Dv 6wVw F B n e e   !tt_ww C % w Ov w D̵Ee R6e R6 E& :J wrw bDE72 yfWp j% .w&ft (w DE7 y- fWp 3gbg&e 2$ gNg? hww  dO M   g g& jY%ww xdO M fgE 0 & jY%wBw 2 CB%5 J 5 J E%@f{f'  / `Q "E .gE J ;f @ 0  .ww f If 0  Iwrw bf ID̵e=jf%^ft 5Rft5%E 8f5    x5mfe 2$ t #N& >% 5  Nm # u-fB L% # wvw f@55S@5/5LN (C5 @ @m@ @m0  %@0 d@U@t55@ @mBN (0 w@ @mN ( d@ @m7 B%@ @m7*΀@ @m0f b %4@tEe5 `N (5 dd@ `AH  hft &%-?uww DC% H,u% u!̵ u %@5I 7 tt7 tt0 tw6w & dO M   7 t   . ww twst w   ?:uw؄ %Gtw   04 4 whe%! 1sw XCK-smK ew0e  w BD e D-m tm@m-*4c &tw E5` w  dO M A!e6E%@ +eedO M d .de0- .d 0 .ww   dO M d d  e 0e .ww  $efe 2$ حҭff @$e  w @$e Nf @$e w|wxZ 5w (d I@d& \ ww  dO M  d& \  .ww  f . @&e v$ @& b @&e $ tle@e5 Nef " e % f " e % ddw8w (c I  @ ww 5b"cb dO M  5   X  " Ib .w e%v  b& f@t &%bf b a dd2J d2& >%22>bE2 dd `Qw 5ya;X " D6& r! @5 '\ %D  % 5\ %B  !%5DeD-w *BCE% 5 5 %%% B  Ll4%5%A%Ze  r! 5 % %  R6 r! 5 4n  owxw h CDE%5 _o% 5  4n _o5tҋ !\ 4n %a%ze% 5 4n _copyout"P#_copyiin",#_copyiou"D#_idle"#_savu"#_retu"#_aretu"#_spl0"#_spl1"#_spl4"#_spl5"#_spl6"#_spl7"#_copyseg"#_clearse"$_dpadd"2$_dpcmp"@$_ldiv"v$_lrem"$_lshift"$csv"$cret"$_ka6# _bdevsw#&_nodev"=_nulldev"=_hsstrat"y_hstab$$_hpopen"s_hpstrat"t_hptab$._htopen".v_htclose"tv_htstrat"Rw_httab$8_cdevsw#h_klopen"8q_klclose"q_klread"q_klwrite"q_klsgtty"xr_mmread"r_mmwritee%v Wa*b 5-=ae %& f@t (% .3  ddwrw b dO M E%``-t` .w*w xaww @|axa8ww ^aXa7 R6ww ğ>a7^` 7N`N`07D`ww 8`aa,`ww ğ`7` 7 `7 `wxw h_``_w`w P_? `wNw > BwBw 2`%  (  _0ww dO M 3 `Q_ X-  2e & r! Ze5 E B xfʋ=ʊ;tE5%ʋt&e 5 % tE5% U@%  e &U r! w5@tE5%% w ̴D owĴw B &5"e !%EP4 Eo VI%wZw JD  l   e ! T= ww D# . o@&e 5 %2  ".s_hsread"z_hswrite"z_hpread"u_hpwrite"u_htread"Jy_htwrite"|y_rootdev# _swapdev# _swplo#_nswap#_canonb$B_coremap$B_swapmap$ _rootdir$ _execnt$ _lbolt$ _time$ _tout$ _callout$ _mount$X _mpid$v _runin$x _runout$z _curpri$| _maxmem$~ _lks$ _updlock$ _rablock$ _proc$ _text$_inode$b_icode#_mfree"L_printf" 1_min"5_panic"2_cinit" l_binit"f_iinit"d(_iget"X-_newproc"@9_expand"v:_estE%@ \_XP_L_7 `_ 3 . .ww  dO M E%@^ .@& J ^ .7^ `Qw@w 0 E^E@_<_E4P .ww   _ _  .ww ^%% I^ ?_ ^4^!(^0ww 5 ^^    ,% ]7] `^& B e%܂ ]w"w  0^ " e$^%ww ^E7Z^^V^^R^^  4n  oww DC 33w k w dN8CteBN sDuepeeH3 #@UCU@ww ܲDueB k4wβw @teB Rpww @teB pww DueB o % e R6whw XBteBU53& rm w4w $DueBN& p ww AB $ ME abur"&_sched"6_sureg">&_nseg"P(_nblkdev$_nchrdev$_buf$_bfreeli$N_bread"b_getblk"d_bcopy">_brelse"dd_alloc"(_getfs"H,_sleep"5_badbloc"~*_wakeup"R6_clrbuf"f_prdev"42_free")_bwrite"c_ialloc"*_iput"._ifree",_update",_iupdat"._prele"`Q_bflush"i_itrunc"/_maknode"0_wdir"0_writei"3_panicst$f_putchar"1_printn"1_deverro"X2_readi"2_bmap"6;_breada"c_iomove"65_bawrite"Nd_bdwrite"d_max"5E7F^ww Nf d 5wU &@t *  ew ~B N d N d 5 U &@t * #N d N d 5 dd U @t * N b w ew DE & t * 5 e dd5 jww D t,%?%8 NdU ddw^w NDU cwHw 8D5@ R65@йE@ȹN R65 V 2EH0 Nww ؿD@tE m.E@` "__ M T= w~w nL7 L7aLB 2$ wRB $ LE .L LtE mnE@` 8" __ 쯾w D>  ww D Ete@ "U XfL4  $  v$  rWtPt r4` N73-, 3-,3f  _cpass"=_passc"T=_file$h_issig"C_setrun"x6_setpri"6_malloc"DL_xswap">_swap"nh_xccdec"X@_xfree">_xalloc"?_sysent#_psignal"B_psig"C_trap1"pB_grow"E_nosys"B_nullsys"B_ipc$!_signal"B_stop"@C_procxmt"zF_exit"T_core"JD_schar"PO_namei" M_access"J_ptrace"E_rexit"T_fork"W_read"FX_write"VX_open"X_close"Z_wait"U_creat"$Y_link"Z_unlink"`_exec"Q_chdir"a_gtime"__mknodt, s-3! w  w @-ط 2N %N0<U@"N 5 @t, 2 t-t-  b5U@& < (fw & (f5U c0003t tw D ҽ& 5 5  jww tD 00UwTw DD5  LhU5 ddE@ R6w w @ ~ww N7777 WpDew֯w ƯVJ t&& geww 77 5@" & X2%5p   5 ~ ͑ Ǒ U77 Xf Nw w N u fCt fieww N u  fCt fiewʮw B $ BJe v$ `@Et0!J ww nDE%DCIDC 0 LC \C f v w8w (DE4DC f v f v f v ww D 5 "[_chmod"la_chown"a_sbreak"hW_stat"\_seek":Z_getpid"L`_smount"]_sumount"^_setuid"__getuid"__stime"__fstat"t\_stty"Xk_gtty"k_nice"j`_sslep"[_sync"^`_kill"b_getswit"__dup"t]_pipe"O_times"b_profil"b_setgid"`_getgid"4`_ssig"a_timeout"VI_getf"I_closef"I_closei":J_openi"J_owner"vK_uchar"dO_suser"K_ufalloc"K_falloc"K_readp"O_plock"8Q_writep"P_rdwr"fX_open1"jY_stat1"\_get Wpe!tNf`07X dd % & @ e wpw `DCL @ tEWt@PUA5UUw&w DC%F L EtUA5U8U0wڼw ʼ%FF5 U@? 5 5U BU  e%   e%0w`w PE 5@t? R67 fw>w .? ^U@& 5 5@ U l@t 7 w @t7@tE7d5 tE( 5 5*%@EUEU: 5 *E%@U wZw JD E e\C - - U f Xf!55 4  0 707x  wެw άha tE(%@EUEU:E LCDC5 U7 Xf-- &Y  G &[ < &&& geww O E5@ *5* %,CDCmdev":__buffers$!_swbuf$?_tmtab$?_iowait"e_incore"d_geterro"j_notavai"(f_iodone"Xf_mapfree"Lh_devstar" 0){ s = s/10 f = f + 1 } scale = t + f f=1 while(x > 2){ x = sqrt(x) f=f*2 } while(x < .5){ x = sqrt(x) f=f*2 } u = (x-1)/(x+1) s = u*u b = 2*f c = b d = 1 e = 1 for(a=3;1==1;a=a+2){ b=b*s c=c*a+d*b d=d*a g=c/d if(g==e){ scale = t return(u*c/d) } e=g } } scale = 20 define a(x){ auto a, b, c, d, e, f0/1 RF0 100000 - error 040000 - freeze 020000 - write check error 010000 - data parity error 004000 - non-existent disk 002000 - write lock out 001000 - missed transfer 000400 - disk clear 000200 - control ready 000100 - interrupt enable 000040 - extend memory 000020 - extend memory 000010 - maintenance 000004 - function 000002 - function 000001 - go 1/n - RKn 100000 - drive error 040000 - overrun 020000 - write violation 010000 - seek error 004000 - programming error 002000 - non-existent memory 001000 - &` `"%4 z77` _  _Z 55@ h @- @ h 5 u-S " 5 _ @ d 5Ne2] " 5 _ 5@ ^d/AWp#Am %@ dAWp#Am f fe0h " eNe2fe2 " %N@ &h B@ `d AWp#Am " 2N@ &h u-"NAWp#Am f fe1 " eNe2fe2 " % u-_5 _N@ &h 7%@, g, s, t if(x==0) return(0) t = scale f=1 while(x > .5){ scale = scale + 1 x= -(1-sqrt(1.+x*x))/x f=f*2 } while(x < -.5){ scale = scale + 1 x = -(1-sqrt(1.+x*x))/x f=f*2 } s = -x*x b = f c = f d = 1 e = 1 for(a=3;1==1;a=a+2){ b=b*s c=c*a+d*b d=d*a g=c/d if(g==e){ scale = t return(x*c/d) } e=g } } scale = 20 define j(n,x){ auto a,b,c,d,e,g,i,s s= -x*x/4 if(n<0){ n= -n x= -x } a=1 c=1 for(i=1;i<=n;i++){ a=a*x c = c*2*i } b=a d=1 e=1 for(i=1;1;i++){ a=a*s data late 000400 - timing error 000200 - non-existent disk 000100 - non-existent cylinder 000040 - non-existent sector 000020 - 000010 - 000004 - 000002 - checksum error 000001 - write check error 2/n TCn 100000 - end zone 040000 - parity error 020000 - mark track error 010000 - illegal operation 004000 - selection error 002000 - block missed 001000 - data missed 000400 - non-existent memory 000200 - tape is up to speed 000100 - clock simulates timing 000040 - maintenance mark track 000020 - data track 000 ^d-N@ `d@m &h NAWp#Am f fe1fe0N@ &h (@ @- N@ &h Nefe2fe2fe " e u- u-_t " 5 _L@ d @ d " _Hu-@ ^fNf 5 _4N@ &h  r eA! y!@ ^d AWp#Am AWp#Am N f " N@ &h :@ 5d 1A " '@ `d b=b*i*(n+i) + a c=c*i*(n+i) g=b/c if(g==e){ return(g) } e=g } } 010 - data track 000004 - data track 000002 - extended data 000001 - extended data 3/n MTn - no messages 4/n RPn 100000 - write protect violation 040000 - file unsafe violation 020000 - non-existent cylinder 010000 - non-existent track 004000 - non-existent sector 002000 - program error 001000 - format error 000400 - mode error 000200 - longitudinal parity error 000100 - word parity error 000040 - checksum error 000020 - timing error 000010 - write check error 000004 - non-existent memory 000002 - end of AWp#Am " @ `d-359@ u-_4C " u-_E " J " ww |@ ȋwt@ } w N 5  @ ȋ@w<w *@7* yw w %a %z %Z%A ww  5 9AWp B`eu 0@ww Nf 7 yw~ w h @    @wNw <Nf  7J yw$ w u5 W[illia|]m [I|1|the Conqueror]:11:W[illia|]m [II|2|Rufus|the Red] W[illia|]m [II|2|Rufus|the Red]:11:Hen[ry|] [I|1] Hen[ry|] [I|1]:12:Stephen Stephen:12:Hen[ry|] [II|2] Hen[ry|] [II|2]:12:Rich[ard|] [I|1] Rich[ard|] [I|1]:12:John John:13|12-13:Hen[ry|] [III|3] Hen[ry|] [III|3]:13:Ed[w[ard|]|] [I|1] Ed[w[ard|]|] [I|1]:13-14|13|14:Ed[w[ard|]|] [II|2] Ed[w[ard|]|] [II|2]:14:Ed[w[ard|]|] [III|3] Ed[w[ard|]|] [III|3]:14:Rich[ard|] [II|2] Rich[ard|] [II|2]:14:Hen[ry|] [IV|4] Part 1 Hen[ry|] [IV|4] Part 1:15|14-15pack 000001 - disk error .  @$ wu- . @   u-uRL HA H=@w ^%0%9 wVw >O " 5 '@ `d AWp#Am " N@ &h Ne2T " u-\ " ww F@e7(]@e5J% w]e   % uew\e_x f@& %_x %ue-\l \r0\0 5 h5:Hen[ry|] [IV|4] Part 2 Hen[ry|] [IV|4] Part 2:15|14-15:Hen[ry|] [V|5] Hen[ry|] [V|5]:15:Hen[ry|] [VI|6] Hen[ry|] [VI|6]:15:Ed[w[ard|]|] [IV|4] Ed[w[ard|]|] [IV|4]:15:Ed[w[ard|]|] [V|5] Ed[w[ard|]|] [V|5]:15:Rich[ard|] [III|3] Rich[ard|] [III|3]:15:Hen[ry|] [VII|7] Hen[ry|] [VII|7]:15-16|15|16:Hen[ry|] [VIII|8] Hen[ry|] [VIII|8]:16:Ed[w[ard|]|] [VI|6] Ed[w[ard|]|] [VI|6]:16:Mary Mary:16:Eliz[abeth|][ [I|1]|] Elizabeth[ [I|1]|]:16-17|16:Ja[me|]s [I|1] Ja[me|]s [I|1]:17:Cha[rle|]s [I|1] Cha[rle|]s [I|1]:17:[Om._..x.fcorey.maila.outxx.j\ d\ T55 5 N\5 F\ r e^A! y"N J Z@YN ?N :u6@E?[ [-@e5=5e@ffe& @e 5 @e5 f@& % ?[@e5N 55 @5@@5rff %@ f@& %@ ff %@ @e7ZZ Z5_ %f& %wX w F  0Z Zw< 5  @A tE5 @eliver |]Cromwell [Oliver |]Cromwell:17:Rich[ard|] Cromwell Rich[ard|] Cromwell:17:Ch[arle|]s [II|2] Cha[rle|]s [II|2]:17:Ja[me|]s [II|2] Ja[me|]s [II|2]:17:W[illia|]m and Mary W[illia|]m and Mary:17-18|17:Anne Anne:18:Geo[rge|] [I|1] Geo[rge|] [I|1]:18:Geo[rge|] [II|2] Geo[rge|] [II|2]:18:Geo[rge|] [III|3] Geo[rge|] [III|3]:18-19|18|19:Geo[rge|] [IV|4] Geo[rge|] [IV|4]:19:W[illia|]m [IV|4] W[illia|]m [IV|4]:19:Victoria Victoria:19:Ed[w[ard|]|] [VII|7] Ed[w[ard|]|] [VII|7]:19-20|19|20:Geo[rge|] [V|5] Geo[rge+ .   # & ) , / 0 3 6 9 < ? B 0?fZ bZw @t5E @E5% e7@e0?Z Zw w 5 %9AWp AmeuY5 Y%0 Y@w^ w L Y YwL w : @e5 @ -Y YA r }eA r 5 @e@-= e 0@?0Y ,Y@e@-w w  4 % n  %@ 5%f%F5 5 5 - 555 5 B5 @5 5 B5|] [V|5]:20:Ed[w[ard|]|] [VIII|8] Ed[w[ard|]|] [VIII|8]:20:Geo[rge|] [VI|6] Geo[rge|] [VI|6]:20:Eliz[abeth|] [II|2] bI & 6  vw 4 z7%9 ef l rf  7^N, " %  >Dfe2 l Ne2 Ne2  % w6w $H " F>cH\5 5 @ 0 ^f %Ne 5 @@m_R@@m  _B@ AAmeph@ 0 `d1@@mn@@mN!@ `d@ `d@ 0 d@ A phh@ 0 `d @@m  @@m NNme  A  B5 um555 B5 u-5uWA5 B5@5 % "0 . @@50 u-5 )55e0= @ @-. 5uu5 B5 u- A >E @ 5- dA r 5u-A 5re0= A 5ruA r 5 = wZ w H 5  @ ȋ@w6 w $ % nu  Shire:Michel Delving|Hobbiton Mordor:Minas Morgul Gondor:Minas Tirith Umbar:{City of the }Corsairs Rhovanion:Esgaroth{ upon the Long Lake} Rohan:Edoras Lothl['o|o|o']rien:Caras Galadon Breeland:Bree Arnor:Ann['u|u'|u]minas Arthedain:Fornost{ Erain}|Norbury of the Kings  1d@ d @@a0 @@m @@m @@m0 %_ 5 _Ma l _&.aa  @ ad~a xa@ 0 d5 _%  XaTa5?Ja Fa@ `dRN@ &h R .AWp#Am N AWp#Am 1" AWp#Am &@ A `fA`fp^f AWp#Am 1  AWp#Am Q N@ &h   u-AWp#Am Z` _AWp#Am R u-.` *` l=%  w=@w  ^% nu @& J @ 5  J @ww | % n %N  AWp ebhu@ N  @  f X @9 Gfe@&@p&f e  x@N   @@@ @ A@ wxw f " Nf f fff " e  Jb lw8w & @&7^  y 5  f  5 Nf X @wf  5f lNB  w  ,%X n %@wAWp ebhu@ N`  @ f X A@ HA1`@A@,@ & f 0%@ @@p&f T% @Ns  @@0 w ,AWp ebhu@Ap@A p N %xNef  %(  = % $ !Ned 556:84{(C(n,3))}:Tetrahedral{ numbers}|C(n,3) 1,4,11,20,31,44,61:100{(n**2 base 8)}:[Squares|n[**|^]2} base 8|octal squares 1,4,16,256:65536{(2**2**n)}:{labeled }boolean functions|2[**|^]2[**|^]n 1,6,28:496{(perfect nos)}:perfect{ numbers} 2,7,1,8,2,8:1{(e)}:{digits of }e 3,1,4,1,5,9:2{(pi)}:{digits of }pi 3,7,31,127:8191{(Mersenne primes)}:Mersenne{ primes} ;3&:%46 -% %&,;42&86->#-D2*JP V#\* b&H #%&h3+q>-"!*<>$$!3#>-3#>44##<5-6.' >4 & 3# & %" <;. 9 4 : 89@ F 1*L *R 4$X ^ %d j ;4p &4v "4| & ?> $( > $ 6.& %  $ 3+ "  *$ 3# *  % %.@ p@Aedp@=@p @A ehp@=@%  @t5pww | 5 N  % N vwdw R ]%YAWp ebhu@  @   x& f 0%@ff T%@Ap@0 @  @%@  @ 0 N Vw@ &f 0w nN wpw ^D m" a2  ew.eE !݃%%Wate for me at the gate.:wait No, he couldn't go eather.:either Speak softly, plese.:please Does the horse kik high?:kick John never told a ly:lie Poor cloun, he hasn't any friends!:clown No scool today, it's snowing.:school Cawl the kids in out of the rain.:call When the clock strikes, it will be sevin.:seven Corn flackes are better than puffed wheat.:flakes The pear was biten in half.:bitten That towel gets you only haf dry.:half The keeper feeds the bares at eight.:bears The son went behind a cloud.:sun   "4     $ ;  $$ ?>* %  >4 5%: :R %X ^ -/d j =-p  | * ! %     $ *$ :   $  )  *$  6&  /  % +2v ! #  ; $+0 3+6 < <>B  H -N $T "Z *"f 8;l r <>x + +  # 8<   <  8<   <3 ~  #  %  -5 %Je w De!c bb! c33ww zf T% T% T% wJ7h ^  ӕ- ӕ0B~<ӕ.  ӕ0~ B~7   ӕ-ӕ. B~ӕe ӕ- ӕ+ r e0e0Sf@w fw`w\wf@wDwf fw.w*wFf@www$fDid you see the monky at the zoo?:monkey   ;  "  $  %," ( . 4 4$: @ "F L ;4R X ?<^ 4j p v $| 6&  %  ;4  " d  <3    :%  ;-  "  0  -#  <>  0   ;-& $-, "2 8 <>> 7'J "+P  V ;3\ b :%h -t -z  %  "  ;#  :% n  ?<  <5  $D % 1! %  3* $` $* wmwwmfwww f@www f@wwwf@fA w,lw"fe"w"\ew"R@lw"JAlew= &@t`e @& HADCBF7MFf@  xM h"M @h h$$ttyЋ7M@ Mf5w  * f5w t }7 tMlMW&fi 7 TM@% HM@A= @ C F 2 5 8 ; > A D G H K N Q T W Z ] I L O R U X [ ^ J M P S V Y \ _ ` c f i l o r u a d g j m p s v b e h k n q t w x { ~ y |  z } >- :%!! $3#<>$!-0 63#< B$HN<>T$*Z*`!j>-p$%v5%|>/ <: % *  7' /%%>/#<:   :% 4 # <:":(.>-4 :$ @ F4$L$R*$X# j p #|-#4%v4#* #4 <44 #-#?<<44 #&@0i7@L> Be0# @iє 0i    BA   W 0ie B@e0im L` ieȐ9 ȕ0 iȕ1 Lz L`0iiVVH\&')679!)19bbbb ( ( Nnt t | Ss -ms/usr/lib/tmac.swhere is input file %s .TS.TS .TE.nr 49 0 .nr %2d 0 .nr 48 \n(%2d+\w'%s'+%dn .if \n(48-\n(%2d .nr %2d \n(48 .nr 47 \n(%2d+\w'%s'+%dn .if \n(47-\n(%2d .nr %2d \n(47 .nr %d \n(%2d+\w'%s'6Vienna GameKing's Gambit Declined%5& , 2&%8%>.&DJ#:%V$\*#bh2*n t"z %%:% ") <;:%P.&$&: ?=$% . %:%$%*6/0 /6./<B1)H N T=- `?=f l%rx&~.&Z 28<;.&'<;56.':$%#".#*#:d>-#$^(4.->-BH<:NX:%^:jp v4| d*<::%>- 4     :## *<##3#7/2>48>%D:, P7/V\%b h#n t>4zJ3#, ")$;"$ #"" !>4 4  6?+%dn .if \n(%d-\n(%d .nr %d \n(%d .fc  @ %s %s@@%s@%s%s@@%s@ .fc .TE .ta \n(%du fr!"%(!&! x f x J T f x J T 4 ^ 4 ^ x ftoa gets puts .Rcgetc cgetc: %d illegal file numbercgetc: %d not open to readcgetc: error on %dERROR arw, &:copen: bad file %scputc cputc: %d not opencputc: writing %d`: argument count wrong That's all, folks 4i%#2 %"$ * 0-.-;6#<;-F<>#R2*X^$dj0(pv |<> 2*-58<$:5$8<$+:#$*#%2* "-5# <>&, 2# 8;->&-H7/N% Z8;`f l&;r-x~:%%<> <> :%%" ;4&4-# 4#65% <:$%!$:%*4: @;#F$L#R!X3#^;4 j>-pv5%| %:%%>- )*4!0 ") 5% 3+L $ d! ;#:2* &-,#2+$8$>  J P+V!\ 4%h n*4tz;<*$D*4b:,<>  =+-:,  :% ;+ %ew/dev> #  +#% "&?>&/26-8#->2*DJ S<> ^,d j" p&;v-|%,:% &-LT  ,#X%'% "#?=6:% <;.%$-.*#0;-6&-<* 7/B3 R%X^;+d&j:%p%v+"|"0(?<<::3;4 6& 7/% : % =+<> -=+$ */<>6' <6.B'H+#N TZ `*"+#0=4fl1*z$*7':%$+#$3+ 3#3+;4 ;<>?#*<>#*#   =4:>-"#(1*.$*489@"F4%L"R<>X^*"dj>4p v4-|=4-.#1*$*3+ >-3+:;-$&3*" =4>-1,1,2,1,2,2,3,1,2,2,3,2,3,3,4:1{(1's in binary nos)}:number of 1's in binary numbers 1,1,2,2,4,2,6,4,6,4,10:4{(phi(n))}:Euler's [totient|phi]{ function}|phi(n) 1,2,2,4,2,4,2,4,6,2:6{(diff of primes)}:diff{erences} [between|of] primes 1,2,4,11,34:156{(unlabeled graphs)}:{unlabeled }graphs 1,2,5,14,42,132:429{(Catalan)}:Catalan{ numbers} 1,2,5,16,61:272{(Euler)}:Euler{ numbers} 1,3,12,60,360:2520{(n!/2)}:Even permutations|n!/2 1,3,16,125,1296,16807:262144{(n**(n-2))}:{labeled }trees|n[**|^](n-2) 1,4,10,20,35,#!+#% ";-#&-#,;#8-#>D*JPV 2\:b<>r*;x#~,##:, ;4#l%+##2* <>&7/&%  "  S &* <>")"($.4*4:#@-#F L:R0))^")d<='p-#v|) "*&#6&7/#Xj%<:#6-&-1*!*%3:%! #$&$,%2=4B&H>-NT%Z`*fl%3+<$r {2*&1!0( 3+*$ =< <>;3 :%%4%%5%  3+<>$ *>->406=6@F$L RFour Knights Game#p?7&7/?< >7&3#7/ #;4$'-+464+6 -4.-'">(.%;>4: DJ.=V$.\'bh3+nt?=z %  ;$.'' .5 ;& P7/-'$5>5. &<5 $"-( .*4#: 8:F!L*RX:3^ d3+j p?-';4 ($(3$&($,,(6-2(&-8(3*D(!*J(:3P(!V(93>(9*\(b(>-l(&r(9*%93&+$ (;4x(~(((9*( ( 1*(!*(<>(&(>4(!(3+((( (;4(="((; )$)3*)!*)+$$)*)>40)&6):3<)!B)9*H)N)3+T)Z)`) f)>4r) x)="~)!);))!)9*))") )2"))="|%3+(2"(9*)=l)3#)$)<:+)=+))+) 7$8#8-#8#893 8#&8+#,8283+88>8$D8 J82*P8 V80 ,52*73#87/\8b8 )t8 z8)"882*8 8 8!83#8 8488-886-8&-8+#88=;88#8&9*# 9#9$83+9 90 82*&9,9 )69 <93#3 &49*t4=<8;4B9 H99*.;4^9d9j- z9*9Scotch Game=<9<4997/99*;99!9,9 9-,999989   <> -*"2,?>8"#> 22 D2J=?'$*  2)#)<=' ) *&%5-&3+ $&<>+%<3($3.'4$:'@F )L R5%X^;3d j:p v;+$+3+$*$$<>#-# +"3+|--#*##%,)9*)*:, * *;-**+"*$#(*3#.* 4*-:*$@*!1*L**R*,3X*^*:,d*$,j*=+p*!v*9*|*$*#,**>-**$**;#*#*"%9*:%$)>-F*3#* *Ruy Lopez * *1****,*+$+% +9*++:,+ $+2"*+ 0+)6+<+=;B+;H+#)N+T+-#Z+#`+3#f+ l+ 7/x+~+#4+ +?<++8;++<5++7/+ +#4+ +<:+5%+ +93++:,+ +998<9=<:! :$; :' :-$&:,:5-2:!8:2*>:$D:'J:P:4#V:\:;-:*4b: h::r:x:;+::<>: : <:: ::3: :4 : : : : :;4: :<>~:+:: :%::<>;& ;9$:$; ;;-(;!.;-$4;$:;*$@;$F;5-L; R;=+X;^;;3!3j;-$p;$v;*$|;$;<:; ; 5,;,;,;!;:,;:;;+4;";<>; ;:3;=+;;#5;;?<45&5-&:%  &+, 2 +#>D2+J+P4+V\:,b h<484n4t;4~3*#*+ 8::1 1) ;-5% <>$$*#<>$$3+*0;46#4<"4B&H,N $T%7/` f-&l r6-x#-~: ) 3+&*Z" +<<>, $*" -#+#,;#,# ,#), ,<:$, *,:,0,6,-#<,#B, ;*N,T,:%Z, `,<>f,l,*;r,;x,#4~,,;#H,-#,#,&$,,%,,5%, ,>?, ,:,,,3), ,<>,, ;2,-<>- -2*--4.-$--3,:,*- 0-*4:-@-3#,3+F- L-<>r+3#,9*V- \-:p- v-3#|- - --#%--5%- --<- -2"--0)-)-4.- -*4-- =<-5-; <=+";:3d;;#< <#1("?=5=4==;4===<=&=7/='=7/='=:%o=7/=2*=;4==<>-+ <>;+"+"#4(".-#4 :* @ F- 3+LR <>bh;3n t:z$# ,##1)+#:, 3+3+<>4-#-0(  /- 8;&,:328<->D#+JP;#V#\5%b h0(n t>?z 7/-< 3# * *#- -#"\4<>#((!$-2).).3# . .#3#.$.0*.0.2*6.<.0B. H.0N.T.5- `.-3f.$l.$r.x.2)~.). .)0Z.3#..*.!.*-3+-0 . .<>. . ). .<>..#..-.$.2*/ /3# // //0 $/ */ )0/ 6/;4B/H/9*N/ T/*"Z/ `/f/ l/=//;4//;4//7///<>/ /)2// 2/o==<>=:%>& >.-.> >$&>&,>;-2>8><>>>D> *4P> V>;3\> b>=n>:%t>:z>>9*> >$3->>1)>>93> ><>> > > ><>>+>>!; 4$>$>+$?$?$>93J>$>9*>;4 ? ?3).?4?7.:?.@?-.F?L?$R?&X?;-^? d?<>j?p? |? ?<:??0 ??:3??3)??;4? ?=+v?$??$Z==+(?93? ? 9*? !?!1!  $*  ' " $(  . < 4  : ?<@ "F ="L R !?=^ ,=d 4/+#930$05-80 >0D0 J09*P0V0"\0b0<>h0 n0#t0 z0-#0#0 ;40 0 0 07/00300:00+#09*00 <:006&00;3011)11:,119* 1&17/,1 212*202"0 819* >1:,V1\16.b1h1+"n1"t13"z11;4119311;41$1*$1$1-116&1&17/1&13+19*1 1& )1#?#@ @;4@@  <>(@$.@9*<#?$@:"@="4@:@ ")V@ \@*b@h@'.n@ t@<:z@ @'@@;3@ @:@;) @ @ @;@ @9*@" @#*@#+<4@!@:@@6&@AA  AAA*$A$A9**A0A-6AA A(A AAA;A A" A AA&A:AAA!="5%6.X>-"" 6/"?> "6&">-," 8"$>"D"&J"?=/V"&-\" b"3+h"5#n">/t"P"z"<;"5"*""-" "3+"">-"-"*""&-""";&"2""=""3#'. #* # #<># "#=+(# .##4#:#'@#F#:L#5%X##,^# d#,#j##p#=4v#|#<:# #;3##:,#R##-####3##Three Knights Game=6' #6.#'#;## #1*#1*42 28;2 2,2 2#&2 ,2:22829*>2$D2;#J2#P2\2 b25%h2 n2:,t2z29*22-#2 2 2$2-#V2=<2$2"#*2 2 )2 2;#2#2 ;#2#2-#2 2 )2 3$2-#2=<3#3;&"3(3'.3 434-@3=fA-*B0B93DB& JB'PB&VB:%\B bB=B#*B2*B!BGorin Gambit3-BB;2B B5%BB93BB-#C C<> CC7/C C=+$CB#+*C-#P@=">B=B2*3C9#8CGiuoco Piano `CfC%&lC6&rC%xC C< C CCCCC"CC8-$$*"" #$ $!%Falkbeer Counter Gambit{@% F%>4L%R%;+X%$#^%3#d%j%9*p%v%!*7/%&%=4%%,3%%3,%$,%:3%!%<4%!2%4&%&%+"%!%3$% %3-#3#4933+# 4 43+4  40),4)24:84 >43#D4 J4 P4V4*\4 b4 )h4 n40z4 4:%4#4-#4 4-4#43#4 4;<46<4#4%64*#4%42*44)04 4-4#4 5 5-5 5$4)5 "593#252)85>5<;D5 J5+-P5$V5-%\5b5;+h5$n56-t5&-z57/5&5 :%55=55'55255#+5<=5'55#5)5 5;25&5-$5 55-5<C DDD'/D D &D,D2D8D>D<DD JD4PDVD8<\DbD '/nD tDzD< D>6D-0&!6&;4<& B&2*H& N& "Z& `& T&;4f& l&+v&!|&;4%;-&3$&&=+&$+&&=4&,4&;4& ,&7.&' &!2*&!&;4&'?&>-&7.&$.&6.&''$-*" '$'1*' ', $'$**'4,0',6':,<' B' 9*N' T'6?Z'5?`'-f'$5l'=6r'x'&~''9*H'6&'';4''=6''<=' ''6$'$'3$' '=6' '2*''6&'5)25-#56#6$6./<, 6&6>?,6/.266>86'/>676D6'J6>7P67V6)\6 b6h6n66-t6$-z6&/<6'66-6-6$26 63#6 62$6$6$665-6;26&63<6<6-+6&6:367;-7 773#7& 75-&7,7.&87>7%D7J7<P7V7.'275%\7 b7-.l7&r73#7;-x7$-~7-67$73#6$7 70(7 7%.7 7937 72*77#,77:%7 7;#7"E-F$ F+$FF:(F"+F $F#E1*.F!*4F<>>F$DF$PF3$VF\F)(bFhF")tF)zF$*FF$FF3$F F FF)(FF8:nF3$F0 F F=F F;)FF$F G93G!3 G;4GG9*$G*G$0G 6G9*JF:3G<=hGnG93tG$3zG :,GG9*G! G;)GG:3G<=G!G*#G$G#*#GGGG;4G"G 9*GG<>HH*#H$H"GG"4H  H*#PG$.H#4HDHJH<:PH&VH;4\H%bH,%hH%nH'tH zH7'H H +#HH<:H H;2H H+#H3=H H93HH <:H H-HH;2H H+$H$I,-II;4I I5,I=,&I,,I:,6IH3+mIrI-##I+#IIIIII*#I#I1!I+#I I2*II*IIII") W=+X&X#;:X&%X+4X4$X=4*X &0X,+6X-X X3,XX;4vX3*X2"XX*XY$Y  Y9*Y Y+$.5$Y<5*Y50Y+,.:Y,@Y!FY2*PY!VY")\YbY9*hW$W:3Y="hYnY#".V# #,YYDanish Gambit <>Y Y>-Y Y9*Y Y:1Y*1Y;)Y YY Y<>Yg-g hhh-#h"h(h .h84h :h:@h Fh&!LhRh!Xh^h1*dh jh=|hh=+h h>-hh;&h#*h(!h6&#h>-h6.'h/'h'h*#hh#h&/hh=+h i%ii-i i>-&i,i5%2i* 8i:3>i*Di89Ji:3Vi89\ibi4*hi#*ni+ti zi5%ii>4iPi iii&ii'i i7'ii5%ii>4i#iii&iII<>J J7/JJ-4:(J.J34J&-:J;3@JFJ6-LJ#-RJ2*XJ^J )dJ jJ" pJvJ |J#J >?JJ7/"J* J:,J&J<>JJ,JJ)JJ$JJ*4JJ;3JJ:,J K")KK:I:,J<>J7/K K9*,K2*mI2K-&BK -HK>63-NK-TK93^KdK6-jK&-pK vK |K) K K" K K;)K#K3#K&K2*K KEvans Gambit+33=K4K$4K93K#+K<=KY 8=ZZ=5Z Z:, Z &Z%,Z 2Z<>8Z >Z5%DZJZ-PZVZ;)\Z bZ"Z"hZnZ>-xZ;)~ZZ="Z Z="Y9*ZY#*Z 6.Z Z<=ZZ4-Z&-Z=4Z&Z#-ZZZZ:Z[$[  [#-[[2*$[*[0[6[9*[:<[B[Bishops Opening,.#2b[<>h[#n[4,t[#+z[%[[5%[[-'[ [ [ [:[[[[;4["[[ [$[[-#L[="[ i:3j i#ij;&j,>&"j<=(j.j3,4j:j?/@jFj7'LjRj-Xj^j=+dj#jj>-pj*#vj:3|j *j*#j#j5%j j j1*j&?6jj8=j j>?j6jjj j=j j j-jj:k k<>k k=k%.(k .k:%4k :k89@k "kFk>-LkVk\kbk&hk#*nk!tk zk;&k ,:k"k?'kk2+kk'k k:,k k7'kk+2k)2kk k<=k!)k=+ $KLL<= $L L L)L) &L#,L*#L LK3#L!L2*LK!L#RC2*|I3+K1!L3#LTwo Knight's defence :%0M 6M3#M MM3#M[ <>\ \;4\\0(\ "\93(\.\=+4\:\>-@\F\;#Y2*Z>-[5%L\U#R\:,l\=4r\ x\4.~\ \ *\ \$\ \;+\\#\ \3#\ \* \\9*\\9* %5%*>-S="U3#g\>4\French Defence>7]&]]6& ]&]7/,]!2]+28]">]<>D]J]>-P] V]5%\]7/ h]<>n] t]>-z] ]5%] b]];3]]2*] ]*4]<>]] ]] ]]6& ]8<]]<>]kkl l>-ll*l#k!"l1!(l#h!*j!2l0(8l/Ll&4Rl Xl ^l dl5%jlpl?=vl=|l>/ll<:l l:l!l;&l=+ll l2*l l(!ll*l!l1!l!l0(l l>-m # mm;#m m $m %*m0m 6m3% Tm Zm`m=fmNm lm#rm |m>-m m:3m!m0(m.mm4.m! m2*mm*4m m<>mm>-m m=+m Fl !ZM M9*N  N;-N N'<"N"=(N<.N4N :N:@NFN<LN RN;-XN ^N dN jN=|N %N N5%N N<>N N-$N N;-N N N! N2*N#N!N N3#N -3N N=O O*$O$O # &O,O9* O$2O"8O;#BO"HO!3)TOZO9*`O fO4=lO&rO-3xO~O:%OO+"O"O+$NO;4O$O-OO3+O OOOO O<>OO9*O O] ]>-^ ^;^^+^#$^*^<> 6^>-<^B^;H^N^+T^\0^"Z^*c^2++r^;3x^8< ^;+^ ~^+^<>^^>-^ ^#^ ^6.^ ^^ l^ ^5%^^^%"+^4%^^_ _ _3_% &_3%,_8_+>_D_J_ _2_ P_;3V_ d_j_2""p_v_*|_!_0(_; _4#_ ___* _(_9)_1(_89_#_%_ _5%__<>_ l m m m$m4# n=<n1"n<>(n.n:34n:n>-@nFn*4Ln RnXn^n=dn#jn#pnvn$|n;31n*$n!1n0(n$n+$n !n=+n n n$n$n n:nn>-nf$g!n n n9*n o\3# oSicilian Defence;*o,0o6o*?PP9*P $P3+*P0P<>6PTPZP;+`P$#fP3#lPrP1!xP ~P2*PP5%P=PP:,P P>?PP9*PP<>P9*#*P2*PP>?P#P<>Q PQ3#QQ-Q$%$Q#+0 0Q 6Q4?rQ#xQ~Q;Q0(Q93Q Q1!Q;<Q<>QQ(2QQ Q(QQQ9(Q_!1_>4_3!1`6-`-`;3 ` !&`>-,` 2`%8`>` D`J` P`- \`+3b`$h`8` `%``>-` ` `` `+ `` `'` `.'``<.` `;<` `<>a a>-a a "a%(a>-.a 4a:a @a Fa V``aLa5%Ra5%c^#daja*pa]^ !` za=+a a a=6 a6.a a>-a =6a>/ a6.a$%aa5%a aa aop"p>=p=p8=p p &p,p32p8p=>p Dp5.Jp.Pp#Vp \p"bphp'.nptp'zpp<:o<>p p;3pp="pppp.pp-.p$p+$pp4+p$p*$p$p=-p q-q q>?qq<> q&q+-,q 2q=48q1(>q89DqJqPq Vq#)\q1bq=-nq<>tqzq=+qqq1(q89q0(qq*; q%q'q-/q q=-q )9qq4"q qqQ QQ2*R<>lQR5%R R5%*Q3#$R P*R-4R$>R/BP-DRJR4TR ZR`R P fR"lR3+OvRN$R RM-RRCMRPonziani #,R R;#R R R#R$R R-#R#R65,R$,R-3S$S=4SS=R$S  S930S 6S3#*S3+-pb vb5%|bb2*b b6.bb$b$Xb b*$b &.b b;&b b>/bb'b b7'b a$bb$b>->4c c2*c c $c*#*c#4c?/:c@c7'Fc Lc<3Rc$3Xc=+^c%3jc$3pc&%vc|c>-ccc34*c>-c#c#%cc&#c#c<3cc/.c$3c=+cc<3c$3cq-r rr r9)r) r#)&r ,r%2r(8r=->r(q Dr>?Jr Tr<>Zr%fr4%lrrr$xr ~rrr*4rr>?r!r0(r(!r4+rr<>rr%rr#)r4"r r5.r&r>5rs6&s ss s* s$&s)*,s2s,8s(>s9)Ds Js3,Ps*Vs#\sbs=;hsns $zs sss$s/s#$s*4s#s<>"2s.&s#"s*4ss s#s+/s+.s63ss6sops Game) T T>-TT-"T(T9*.T*24T:T#*@T:FT#LT'.<;XT5^T24dT 'jT=?pT&7vT6-|T-T '6-T-T?=T<>T&T3+TT>-T T"T&T+2T T-+T&T3#RT"TT;-TT"U UM'?>U> U5%&U,U3+2U 8U$,;?PUVU\U bU9*hUnU<>tUzU>4U$U$U UL>-U!U5%U2*U!U;4UU#2*U;&>-U9*>U1!U3+U3#USUCe?/c=+c c d7' ddcd;&d$$d1**d=<6d#+HdNdTdZd`dfd&#ld rd"xd#~d2"dd=+dd*d d>-d!d;&d!*0d d3dd$d6.d$*d d:9d d2"d e<:e $*e <:e $e2"*e# ee0e 6e;4-e*,e:9ee*ee<:ee*e eee&st4&t tt(t3+ t ,t2t8t#>t$DtJt(PtVt)(\tbt3ht nt#ttzt<>t(t):09t3%tt3tt&t t%t(0t4%tt*4tt'&tt/.tt%'tu=%u u9=u u$ u&u-/,u 2u=-8u>u4+Du Ju#)PuVu9)t<>\u&tbu<>ts%luvu`rr=4uu2$u32u u>?u$u<>u( u9)uu2"uu=4u u*$uuunter Game!$ VV*V V9*"V(V&65,4V*,:V+2@V*FV.,LV#&RV1*XV!*^V2*dV&#jV,#pV$&vV%,|V#V=+V V>/VV3%V$V*$V$V*VV,-VV7'VV5%VV-VV"VW & W W6&WW")$W*W>-W5-0W 6W,.V="@WFW<:PWVW:3\W!bW':nWtWzW&W5-W W&5<;W;W! WW W=WWW W,4W,$W&W#?-*fe 0f6f;#Ff Lf8;RfXf%^fdf;4jf pf<>vf#|f="f f>-f f$f @f f*$f c!d$f:f7'f<:ff;+ff>4f f6$f$f=6g g g g:gg6.$g<: 0g;46g -rgxg$~g2* g$gg>-g *gg g*$gg%g g&'g g+gg1*gg:%g "4&v v9= v=v2"vv>?$v*v<>0v6v=4v$v=+vv3v v#w w$ww%w( w9)&w,w*$2w8w>w*$JwPw#5Vw\w3#bw#hw>?nwtw<>zw(w w w w w3w'w6.w 'w$ww#ww=w8 w<5w08w9)w(0w'ww# x xx3x"x (x.x4x:x>?@x Fx*LxRx#Xx 9=dx jx px vx'|x x= x(*x9=x>?x*#x= x*;2:x5=x=x9 x x#x9)x(*xy*$yyy"y (y.y=4y :y@y FyLy( Ry9=Xy=^y#dy(*x  y jypy'x~y3y ^x y<>y yy =yy+"y+y y++.yy&y y 6&y+ #  $ =+" (<:.;3:'@ F<:L&R-4X ^%dj="p 4 v;-|‡ ';-'>?* #ƈ-̈҈=<؈ވ4-640(=5$*  20 9:&,-212889> D+,J1P#-V \<>bh*$nt<>;+z=4*$ %+.*$ =4ĉ4+ʉ Љ#։?<#:9#0865 ,$+$$"+$-,*760,-66-<;-B="H#;N46T*,Z5-`#f6=lr80x~>7*+*;+*3441)7/Ƙ+3̘ Ҙ=;ؘޘ<>3+ /6 3  ; &*,!20 8 >=/D J=6ʗ:P , V#4` j6$ z=6;$*$$&6&.™ș'Ιԙ="ڙ /'&?=yy+z  z<>y+z z "z(z 4z*:z @z, Lz;Rz Xz=<^zdz9;jzpz3,vz |z<>z(zzz z3Fzz3+.z z z#zy z"z *zz,z,z3,zz#z {"{#=%{{3{!${)!*{0{6{ <{B{H{<>N{(T{9)Z{ f{ l{=r{x{~{ {<>{{*{{,{,{3,{{"{ {#{({!`{ z( {=4w*$x="{ {%{&-?<  = 4&" ( .-":4"@ "F=6L R6&X!^0(d j#-p v*$|# 4# 4& #Ċ ʊЊ֊+܊?< &' =+%   #4&܉ 4!   <:& @ <>L R=4X^d j1)p!*v|!;4F#- %$} X  5% p ʋ4&=<ڋ,4!4.6&  #4$)3& ,$+2"8<:> D:,JP&$V \$b%h;&n&t/'z*;%%  /';4:,:, Қ ؚ:, 2*&:," ;4)3!2&<=,! "$2?/8"B2*H!N$T` $lr;x &;f ~ 80)#)ƛ2*̛Z#қ;؛/& &Dw{u%v${1(|#)q89|1|,&,|2|2+8| >| D| J|5 P|$+V|.\|$b|;,h|n|*;t|z|>?| |1)| |"+| |+"|"|3"||8=||=5|&|5.| |)3| |,4||/,| |<>}  }'5}}%}"}'(}.}-/4}:}=+@} F}0 L} R};-X} ^} =4j}p}7'v} |}}}6&} }<:} };-} }#)}* }1};+hq;3&|#)d}0(}>=} }}%}-%&!8 25"(.4:2@$FL;&RX.^!d8jp v|( 0 *,>?, :,Č4.ʌ Ќ#4֌܌% 5% *4!% 7' ;#$#*>.06,#<#B-%H N&T Z?>`f5-l r6&x ~<>:,"0 %=<$ -/'/č0)ʍ)Ѝ+-֍'܍-/ >=.74&ޚ;%4ƚ%/̚%4&*%*#)4#) :@=4F;3V:,\P b&hr6&x##:!2"-!-*=Ҝ-*؜ Ɯ ̜ ޜ1!$;-8; 5,,:, "( )4:: .@FP#V#$\"b<$h$$x<$~ " r ; ##$ĝʝН;֝$<$8:}!%}$~! ~!~~*~"~/(~.~#4~ :~@~ F~ %L~!V~(!\~!b~?>h~ n~% z~'~!~(!~!~ ~ ~-~*~ ~~= ~:9~7/~ ~/6~6~-6~26~./~>6 &- -5.""2(45.#"434:8#@="F#5L+-R#X:3^*8d+j*p1:v|.&:1;&# !?> -.   ;+'.=- $.*'0*6 <B!H7'NT<>Z`4.f l:r x#4~% 5%,#8<<3 :,Ǝ;-̎Ҏ$؎ގ#;-: # >?<> #$&,%6<5%B 64N T.)Z'`46f/l>.rx<4~(/91":9/(?>   Ə%̏*ҏ/؏;<ޏ%3*"1: # :%""($.;4:,#@;)F$L<$R" ^#d:,- p v6?|- < # ;-">6 ;-ƞ̞<$Ҟ  :X j$6"؞=<ޞ<><;$;):3 $&=",#<$B;&HN"T"6 $Z2"`jp  $ v*| =4 &*, Ÿ?/ȟ/Ο=/ԟ ڟ/' :95-*  1!!~ ~  =/t~7'~%*  .+*4 :;+@"F1)L R$X ^*d "j#p v/|#!(4#>&!%$ Ā*ʀ Ѐ#4ր܀-,$% ?>-,>."$(.-44 :%@"!F# R-$X ^< d j$pv*|"!?>L?< "(! !=/  :3>ȁ< ΁ ԁ$ ځ!$ #!!"91 1 ! 43 " *&,)2 8#> DJPV!\(!b!h-#nt0(z :9#-<: :% % 5% Ȑ&ΐ Ԑ;4ڐ 6&  H 0(") $,+4"(4-. 4,:@>?FL8;RX2*^d;+jp<>v |* :*6= 0766. đ?7ʑБ=<ܑ֑7/2* <: +3 :,/' "(&.+3>:,D+- P/'V J \=6b 8l#+r% 5% :, &  |;# #6&89̠ Ҡ1!ؠޠ+" :;4 <> # &!*$8=62$>D=+,6&N  ~ Ơ T:Ћ=" =45%Г6.p7/^*!, 7/ 6&*:9ġ,#ʡ#С<:֡* , #-/* ! ;# -/"(#.4?<:/@$FL*R!X=/^ djpv |0(% &#$-$ $+$ $‚Ȃ΂%Ԃ ڂ:9 *4!;>   :9*1="!*".( .4 :>@*4LR;>X ^>dj=+pv|F$# /?> =6 ȃ$΃ԃ ڃ  / ;* 4">? $,* 06 < BH:,N T0 Z"`%f l5%r x<>~ #) 8;"+""Ē ʒ*"В֒:(ܒ1*!*2*- % $*$!*0 06<>< B#-H N;4T Z=+`6& l")r x<>~=":,;-&-7/& #-=+ fƓ  ړ 8:  -% $;3)#, 2"84">"D<>JP=4V \8(bh0 nt#)z;3&5-:,%5% >? Ƣ<>̢Ң=6آ ޢ6&0(4.:!$#4   o7/&t39*839*LFR-#X#b3#h%t&z6&,:"354-$4-#ȣ$Σ£ ԣ0(ڣ*# * # !ƒ&",-/2 8%>=+ DN X6&^ d<:j'54v8= |   '= <> =ƄЄ-ք ܄6. ?= 5##=4 <:-$#)*0&6 <6&BH<:N T7'Z d'5j p |  *#?== <:ą<>! Ѕ2*օ1!܅*;1#-% % % %" (,.41):@:FL%RX*^d4%j p7/v|#4<>=678 ##%# Ĕʔ Д֔?8ܔ>5/? =%%4%  %,/$:,*' 0+6$<5%B H;+N T Z`!f lr$x"~ 8 .4 '2" 1)(!4.ƕ̕&ҕؕ0(ޕ $*"1!  3+  8; &o5%,5;3:5;3F@Lo:,R _<>d_<>pj v=4| !9*2"-##3#*ʤ"Ф ֤:9ܤ?<%<::% ;-="$*$0 6#< 3B9*H0(#*^$dj;#p v#|;:&:3#<;;#$=R X ĥ-#ʥ#ܥ3#2" <>.=4  -ʅ #-v'. (%6<'B pH;-N=,%/^3=d4%j)"p98v-3|:9 #!-;#).)*4/.)Ć2)ʆ!)Іֆ ܆ #) -/ % &!(!!$6&* 06<=* H/V \#bh-/n t0(B$z==+ <: ;-'1(891;3 ȇ'· ԇ6-ڇ -!.&7/ <> =6&.,286=>DJ-P=6V\,bh3;n tz ! 6=&>6-$– Ȗ=Ζ Ԗ!ږ;8 ( *"6= -&'"(&. "4/':@4-FL=;R X;3^ d8;jp;4v|:,4. .& 0( 7/ <>ė 56З ֗;3ܗ,*/'$,8;= 3# *<:$:%*0#$6<;#B#H3#N; Z%`f-lr="x ~:%3*  T*9*$ n Ĥo>-Alekhine's Defense,#<> =-#!""(.#4*'"@<3F'L="R ^*d"Xj;-pz#!-##0( 8:;# #,# §ȧ Χ#ԧ6-ڧ&-0 /8; = ;=3="( .,34 :@!F*LR0 X^-dj#p4&| 4&! =#-#!¨"ȨΨ,Ԩڨ#& v <>=40(  5,%,$),*0;)6<*BH"N'%T,5Z'`6-f&-l=4r :! &x>-~ 9*:,%5%2"Ʃ ̩3#ҩةަ$ީCaro-Kann Defense6." 5- 7'<>" *#2#80)>)D'J P")V\ ;3h n"+tz<>)") "+<> ;3  ,ʸ"#и#ָ ܸ"+ 8: ( 8; *# #$; * 4"+: @:,F P7'b:<>V0 :(:r<>x (\ ~>4 =":(=5% 1**x4$Ĺ;)ιԹ#=48;-&# % 4*5-"&(>4.)!:!@!F-LR;-X ^ dj4*pv>4|<>=4>- .4 % * :;;)8:#  );$>4$*"0$6#< B; NT1*Z$*`"f$l=4rx>-~# ">-;)H8:*$ 3";);"4=4 -3<5 0(+"93(.>447/@0(FL2*RX6.^d93j<5v2*|3-937/6.p>44# ȪΪ Ԫ?=ڪ#+%0(>4 2* :ª5%" 0;+6+<=+BH$N T3#ZNimzovich Defense=?>z:6?6*;«=ȫ Ϋ$ԫ, %/ =+:,4$"  &!,4$28>->4$JP#V \   +b)h n"t zD")"  "7/ <> =4ĺ&ʺ8;кֺ:,ܺ4$"=6" =; $<>* 0=46 <H$N#Z `")f l0 r!8;~ "46-&-# 6-&-7/ #ƻ ̻"һ ػ-$$5- +""<> =+ ;-&&-,7/2&87/D J4"P"V;)8:>=4\b>-p | v% ) ;)%1*$*<>$,% %"=44, #-##7'&)2,2*48>")DJ="PV%\b$hn,$tz-;-&-="*$="&%3$#& 4,4$  "1*!*:, 4%$" (>4. ګ!43#: D "h9*JCenter Counter Defense2"tz ; 1!?; ; #¬Ȭ8;ά Ԭڬ4-<4434 &4;3"(.?<4:34@4F<3L!3R;4X!3&4^*dn-#t#z=4&:3!>--4 :%2;- "­=6*;έ"ԭ*ڭ" ȭ- "+  -&7/$"+* 0-< B+2H&-#TN Z<:`j# v| 8; "+p" 6-&-8; ,#Ƽ1̼ Ҽؼ6-޼-) &=4#<4-=/# &6-, &-2")8B4.NT;#Z#`,#flrx'~ 7' *44-%&6--=4#ƽ̽8;ҽ޽( ,%  *8:""4,|>-,%8; >2 89J P*#V#\;#b#h4,nt1*z$*" '$ ""޹;)>-2:%D:; 5-6&  0 <> >44, 1*<>  >4&,"1)8">,$DJ#P V-<\b<>hn4,tz4,2>-*#*>4#,#(!#:,9*0( #!!2:,6&")?< <:  ="& ,:32 8;->&&-D7/J&T>-Z `3#f,5 .v5.|&/&.7/ 4.;3 >4&=+Į ʮ:,Ю;+ ܮ=<<> 4-&-=4& >-֮ 3#p(9*.>->;3DJ:,PV7/\b9*hn2"tz3#8\$Yugoslav Defense<>%¯ȯ ί#ԯ گ=+>-5%+)(=""6&& $&,7/2 8 %,D J P V*\ b6-h&-n,%tz<>=4-3>*1#*6-# &-8:̾Ҿ#) ƾ#ؾ ؽ ޾<:޻=48;H")-3 -6 :," &:,, 2() >6-D#-J<:P#V4-\&-b(h n#t&z" :,"##-###&-)*¿ȿ$ο Կڿ -% ")=;;- 9*!-$*#0 6<><B9*4$>-HN ; b"h0(tz8::11)("9("<>:(1*$*-34,$9*-3 3<3$3;<"(:1.$41):@"93FL<>V \"\>-b9*n l=6z;$  0 #-%:,9*4$" 9* 3#% <>$ *=+0 6>-< B 5%H X^dj p v |" :9 ?;;* ,İ4"ʰ"а-ְܰ<: :,# 9* 7/;4$>-*0="6R <3#B \ o ٦ cW  L7/ #="=~>-  &09 Ʊ ̱"ұ(ر3:ޱ&5-&<>6- 4- &-"!&-#":, &, =D-J$P8;V \"b h:,n t$1! "+=467/z#$8-##*:%1*$"%$:,$=;0($ <> #" (!98418:$9@1F"$L$R-3X^*d j#p v'|  <> =# =4.:" x&   T4,B4$6. 9*6.5-;2BenoniBenko GambitBenko Gambit 6&@ F=5L R:,X^>4dj'v|7'6&4%!?<>- 5- 1)8989;2 5%>4>- =6 & 8:28<4>&D:%J P 1*\*b%hn8:t&z"8: 4- $:%:7/;2V<4?< =689(,3;2 : &, 2<>8>8:D J"P V*#\89l;) x8:~0 + "+&&     >=Բڲ=< 3 $  4%4#>?=9"( 3@ F8?dj3p Rv, 9!4# , 7/*3³ȳ4#γ Գ8*ڳ 8$)" "6./%$  /%6<3,BH/N-Z`4,f l7'rx,%~3,T *  <>;)=4 1!4,-;3/*; 0 -$" $4";$"*#0 6 <>B H=4N T:3Z ` <>l$r*$x&~8:$1!=""# "! :1 3*6. "$( .4 :7'7/@F !*b$hn:\4*x~*=6 7'V>4=6P5-5-p>46.,>-6&<==; =44$-3 4$>- 29* ):34 :; @F89L R4$X^9*dj>4v=|:9* 4$.p5-*!9* 8  , 89=9,:,3|>?²8<Ȳ4#β ;8:8@,=:L",R$X^d"j+"p)"v:| 1*>*="=4<;)f:31!""<><> <> =+ :3=4=+;)" (-#@#F3*L*R8:X"#d jp v=| =+4, '4,38: ^:3" 4$4$" =< <>$=6*0 ;)<!BN T-Z `; f l9*r x "  "4$ 0 6.69*H"~4,93 3"4*>4"4$ =6 6. (2"!(!:1:@9*F L)"R"X"93jp'd%v$| 4$">49*=" 4$"$">-939(.0 41)^:;25- ". 4. +$$ *"+0%< "+H BN;<>?T=-^%d#%| )$ 4% ;) " $Ķ%ζ&Զ6 j =<<*##:;#*# "+5%$ # *"+5%ڶ;<0;3; ܵ> ;:8:T")#ֵ#H f<>x#f:,#: <> >4:,>-*##η+.Էڷ;+ '" ;):%:4,6":3; " 4-D90J+PV\89b%h*8n<4t*z1**;!")4-&-;47/&<>>-=""$>-=""  <51*89"1($. 4-$: @5-F$L* R X"8:;); ^d#v" .<> >- <4 8: >-6-;- 6=;9#=+# 2" 2$ 8;&,:%28 DJ;2>; PV<>` f=6l r6.x~3-&-7/0(&#+3)3)0( <> 93 =6&#)<;#;## -##,#$4,*0936.0(6<<>PV=+\ b;-h-n>-tz%5%>-J4$## <>=6 3- 93 3- 935%#;##,# &6.4,,#2#<B-H N -Z `9(f!l-r x" 9(!2" 2"~4,; <>"& -#6-&-5%  #- $2"2**&02"<>:@=6JP<>\ b=4hn9*t z2" 7 &/&&.74,7/'.' 2"T:%6.V4,:teradian radian2 sphere 4 pi-steradian sr steradian / Time second sec s sec minute 60 sec min minute hour 60 min hr hour day 24 hr da day week 7 day year 365.24219879 day fuzz yr year month 1|12 year ms millisec us microsec / Mass gram millikg gm gram mg milligram metricton kilokg / Avoirdupois lb .45359237 kg lbf lb g ounce 1|16 lb oz ounce dram 1|16 oz dr dram grain 1|7000 lb gr grain shortton 2000 lb ton shortton longton 2240 lb / Apothe06-2 gm cubit 18 in cup 1|2 pt curie 3.7+10 /sec dalton amu decade 10 yr dipotre /m displacementton 35 ft3 doppelzentner 100 kg dozen 12 drop .03 cm3 dyne cm-gm/sec2 electronvolt e-volt ell 45 in engineerschain 100 ft engineerslink 100|100 ft equivalentfootcandle lumen/pi-ft2 equivalentlux lumen/pi-m2 equivalentphot cd/pi-cm2 erg cm2-gm/sec2 ev e-volt faraday 9.652+4 coul fathom 6 ft fermi 1-15 m fifth 4|5 qt fin 5 dollar finger 7|8 in firkin 9 gal footcandle lum"9(!.  1)&92,2 8; >9D#JP>- "V\%f l2"rx2">-:%~  1*!*#!-##*23+ 1)2*!*0(-< <>=4 ;2&!, <>8>=6DJ"P V<>b&h=4n t1*!*:, "$ ;#$#!3#+#&$ *>?cary scruple 20 grain apdram 60 grain apounce 480 grain appound 5760 grain / Length meter m cm centimeter mm millimeter km kilometer nm nanometer micron micrometer angstrom decinanometer inch 2.54 cm in inch foot 12 in feet foot ft foot yard 3 ft yd yard rod 5.5 yd rd rod mile 5280 ft mi mile british 1200|3937 m/ft nmile 1852m acre 4840 yd2 cc cm3 liter kilocc ml milliliter / US Liquid gallon 231 in3 gal gallon quart 1|4 gal qt quart pien/ft2 footlambert cd/pi-ft2 fortnight 14 da franklin 3.33564-10 coul frigorie kilocal furlong 220 yd galileo 1-2 m/sec2 gamma 1-9 weber/m2 gauss 1-4 weber/m2 geodeticfoot british-ft geographicalmile 1852 m gilbert 7.95775-1 amp gill 1|4 pt gross 144 gunterschain 22 yd hand 4 in hectare 1+4 m2 hefnercandle .92 cd hertz /sec hogshead 2 barrel hd hogshead homestead 1|4 mi2 horsepower 550 ft-lb-g/sec hp horsepower hyl gm force sec2/m hz /sec imaginarycubicfoot 1.4 ft3 jero, :3+&"<>( .3+z-=44:89 N-3T#Z*#`#f;2l r3*x*~1!:3 0(<> =66." 3#4,26.\4$H3+ 9*3#>-  S  4$3#"2"(. =Z&`=6f l r x:~&# 6. >- 3#!-$$ &6&>4nt 1|2 qt pt pint floz 1|16 pt fldr 1|8 floz / US Dry dry 268.8025 in3/gallon fuzz peck 8 dry-quart pk peck bushel 4 peck bu bushel / British brgallon 277.420 in3 fuzz brquart 1|4 brgallon brpint 1|2 brquart brfloz 1|20 brpint brpeck 554.84 in3 fuzz brbushel 4 brpeck / Energy Work newton kg-m/sec2 nt newton joule nt-m cal 4.1868 joule / Electrical coulomb coul ampere coul/sec amp ampere watt joule/sec volt watt/amp ohm volt/amp mho /ohm farad coulboam 4|5 gal karat 1|24 kcal kilocal kcalorie kilocal kev 1+3 e-volt key kg khz 1+3 /sec kilderkin 18 gal knot nmile/hr lambert cd/pi-cm2 last 80 bu league 3 mi lightyear c-yr line 1|12 in link 66|100 ft longhundredweight 112 lb longquarter 28 lb lusec 1-6 mm-hg m3/s mach 331.46 m/sec magnum 2 qt marineleague 3 nmile maxwell 1-8 weber metriccarat 200 mg mev 1+6 e-volt mgd megagal/day mh millihenry mhz 1+6 /sec mil 1-2 in millenium 1000 year minersinch 1.5 ft3-; ="4$ &:1, 2+"+>D1:J P3#V \>4b!h;-n%t$z 5% ="!>6/693-'<>/=66.,$3+#2"  >-4, "4$0(!( .:1< B#:,N T>4Z$`*$f$l$r x~ =,$;#,##3# 9* ->- ;3:%/volt henry sec2/farad weber volt-sec / Light cd candela lumen cd sr lux cd sr/m2 / Money / epoch fri sept 6, 1974 wall st j $ dollar argentinapeso .102 $ australiadollar 1.4925 $ austriaschilling .053 $ belgiumfranc .0253 $ brazilcruzeiro .149 $ britainpound 2.3101 $ canadadollar 1.012 $ colombiapeso .0397 $ denmarkkrone .1603 $ equadorsucre .0401 $ finlandmarkka .2630 $ francefranc .2071 $ greecedrachma .0338 $ hongkongdollar .198 $ indiarupee .125 $ iranrial .0148 $ iraqdin/min minim 1|60 fldr mo month mpg mile/gal mph mile/hr nail 1|16 yd nauticalmile nmile nit cd/m2 noggin 1|8 qt nox 1-3 lux ns nanosec oersted 2.5+2 pi-amp/m oe oersted pace 36 in palm 3 in parasang 3.5 mi parsec au-radian/arcsec pascal nt/m2 pc parsec pennyweight 1|20 oz percent % perch rd pf picofarad phot lumen/cm2 pica 1|6 in pieze 1+3 nt/m2 pipe 4 barrel point 1|72 in poise gm/cm-sec pole rd poundal ft-lb/sec2 pdl poundal proof 1|200 psi lb-%5%0( 3+4.$ **40#64$<3# B !+"X!^"dj2"pv93|!3:3!=6;+$+3+ -#$>- >4 4$ 3#& 9*" 2"&=6$ *4$R3#2">-<2*1)81!H4,9*L0(R6.6&0ar 3.4 $ israelpound .2385 $ italylira .001508 $ japanyen .003303 $ lebanonpound .45 $ mexicopeso .08006 $ netherlandsguilder .3675 $ newzealanddollar 1.43 $ norwaykrone .1795 $ pakistanrupee .102 $ perusol .0234 $ phillippinespeso .149 $ portugalescudo .0387 $ singaporedollar .4035 $ southafricarand 1.425 $ spainpeseta .0174 $ swedenkrona .2225 $ switzerlandfranc .3314 $ taiwandollar .0264 $ uruguaypeso .00081 $ venezuelabolivar .233 $ germanymark .3744 $ mark germanymark bolivar veng/in2 quarter 9 in quartersection 1|4 mi2 quintal 100 kg quire 25 rad 100 erg/gm ream 500 registerton 100 ft3 rehoboam 156 floz rhe 10 m2/nt-sec rontgen 2.58-4 curie/kg rood 1.21+3 yd rope 20 ft rutherford 1+6 /sec rydberg 1.36054+1 ev sabin 1 ft2 sack 3 bu seam 8 bu section mi2 shippington 40 ft3 shorthundredweight 100 lb shortquarter 25 lb siemens /ohm sigma microsec skein 120 yd skot 1-3 apostilb slug lb-g-sec2/ft span 9 in spat 4 pi sr spindle 14400 yd s \tables#x!si!j!k!n! g1!env! ek!ek.fs!ep!ep.fs!fs!lptr!sptr!rptr!outb$ outt!@outw# stkt! stkb$stke$ktat!ktab$Linput#cfile#lfile#dfile#ofile#ezuelabolivar peseta spainpeseta rand southafricarand escudo portugalescudo sol perusol guilder netherlandsguilder peso mexicopeso yen japanyen lira italylira dinar iraqdinar rial iranrial rupee indiarupee drachma greecedrachma franc francefranc markka finlandmarkka sucre equadorsucre pound britainpound cruzeiro brazilcruzeiro / PDP-11 baud bit/sec byte 8 bit word 2 byte block 512 byte K 1024 word tc 578 block rktrack 12 block rkcylinder 2 rktrack rk 203 rquare 100 ft2 stere m3 sthene 1+3 nt stilb cd/cm2 stoke 1-4 m2/sec stone 14 lb strike 2 bu surveyfoot british-ft surveyorschain 66 ft surveyorslink 66|100 ft tablespoon 4 fldr teaspoon 4|3 fldr tesla weber/m2 therm 1+5 btu thermie 1+6 cal timberfoot ft3 tnt 4.6+6 m2/sec2 tonne 1+6 gm torr mm hg township 36 mi2 tun 8 barrel water .22491|2.54 kg/m2-sec2 wey 40 bu weymass 252 lb Xunit 1.00202-13m  kcylinder rptrack 10 block rpcylinder 20 rptracks rp 406 rpcylinder rftrack 8 block rfshoe 8 rftrack rfdisk 16 rfshoe rf 2 rfdisk / Trivia % 1|100 admiraltyknot 6080 ft/hr apostilb cd/pi-m2 are 1+2 m2 arpentcan 27.52 mi arpentlin 191.835 ft astronomicalunit au atmosphere 1.01325+5 nt/m2 atm atmosphere atomicmassunit 1.66044-27 kg fuzz amu atomicmassunit bag 94 lb bakersdozen 13 bar 1+5 nt/m2 barie 1-1 nt/m2 barleycorn 1|3 in barn 1-28 m2 barrel 42 gal barye 1-1 nt/0 & 6  w %&   @&  71   @&  7v  @&  =   L%J      L7$ L7 L7 L7 L L L \               &   &     r 7t 7 X b eH % N e: %8 ( %(  %   L / dimensions m *a* kg *b* sec *c* coul *d* candela *e* dollar *f* radian *g* bit *h* deg *i* / constants fuzz 1 pi 3.14159265358979323846 c 2.997925+8 m/sec fuzz g 9.80665 m/sec2 au 1.4959789+11 m fuzz mole 6.022169+23 fuzz e 1.6021917-19 coul fuzz energy c2 force g mercury 1.33322+5 kg/m2-sec2 hg mercury / dimensionless degree 1|180 pi-radian circle 2 pi-radian turn 2 pi-radian grade .9 degree arcdeg 1 degree arcmin 1|60 arcdeg arcsec 1|60 arcmin sm2 bev 1+9 e-volt biot 10 amp blondel cd/pi-m2 boardfoot 144 in3 bolt 40 yd bottommeasure 1|40 in britishthermalunit 1.05506+3 joule fuzz btu britishthermalunit buck dollar cable 720 ft caliber 1-2 in calorie cal carat 205 mg cent centidollar cental 100 lb centesimalminute 1-2 grade centesimalsecond 1-4 grade century 100 year cfs ft3/sec chain 66 ft circularinch 1|4 pi-in2 circularmil 1-6|4 pi-in2 clusec 1-8 mm-hg m3/s coomb 4 bu cord 128 ft3 cordfoot cord crith 9. L5  ` &  7 7   e %  %  %   L L5 ` &  7 F P e6 %: $ %*  %  % U  P &    : &    $ &     &   L    LEm m~   x &   tD  w@w .@EJ,  Np    xww ~w De   % w7 7 ׯ - (w 7  .w eB J ӕ- R r f e0 @ >Z  ҋ D~8 8 ӕ0 $f v Le0 9e    7 we&  m   ~    ~ w7  0   t Wp `e0eӕ?f\  ,R P H B  @f & 7d+  7b+ 7T+15 5 5 Der Z  Talloc.d++ t  --fatal *5C * *r  5E r  x+7bad address in parsingH І *5' b5E    F@e DEC55 DEC6*2*(*w$*f&  @! LC eT,f5  C)w) )Lttt e!$4u w7stack overflow   > >.lvO ++.ibO--.dbO$6&B>ZR>Z >)++.iaO`--.daOl6\>eh>q.ntO.ngO.cmO!>->~>!zW|<<<<|~|$>">X(>>86J:TXLV  | ||~ |jtoo many char classesO?E    -f@w fwJA 7 fAW,f B@ 8 @&61fA   @ @e71@ 1w,fwwwfwAQ  OfA  ^ y   F y @0fA  @9 fA @e&7FwB7<@wR7 Ff@www, f@@&&@D f @D @5C D)g 5E r  x+  7bad address in translationHuue ueT,” uACeu  7not a bundle eT, 6& & e-v(v(& ,f(f(h(ȋ 1, wZ(W @& D(8(,7 4(A &ECA @lA UuxJDJ"DHK1 N ?H:J"?I;??? N T.globl classtabclasstab:NN ?) V?; J6 J@8ZH.V?..NV?vv8,>v HADCBF7F pvvArg count Input file Output file Bad input format No relocation bits Bad relocation %o ldoxf ecsxlrcrt0.ostartsysfix.o~mainargcargvwordsrel~getrelrprintf.oformploop rjustndigitgnumjwidthndfndswtabdecimalloctalhex6 h;>? l2;DDRD\ ;?;R?Il?cI:*:?y.pn:1 .pxs;12.tn:1 .txs;12NN ?/**/1 succO@@v>)>D>, 8X>Dn;: j>n> proc(6pWparams;N ?.c*Wpush;N ;K=.N v?6 i.i6 v<>v^`pvpW?1 O @floatscien characstringlogicalxremoteprbuf$prstr,ffltpr.oputchr.oflclose.ogetc.o.indirbadretfillopen.oputc.obadretgoodretflseek.oexit.ocsv.ocerror.osavr5$_exit"_main"_tbuf$_rbuf$ _obuf$ _txtsiz$_datsiz$_bsssiz$_symsiz$_txtrel#_datrel$csv"_printf"_open"_fcreat"_getw"L_putw?>l, >salt;N I:alt;NPgoto;VN`H:I:|H >'>g, $ >:   4> V(L)V)>, alt;Ov\salt;O * :F(X)>Y>k/>} I f < w wV $ @@e w2 p w&  w B B e  2T, 7translation overflow2T,E w * > ..R:  .Bc* b\n\0Od1 succOn1 succO  <H  *>k ()>w z|)@:  > >  * 8 HF <trans;1 NT .pxNn .pnO .tO .pO = *  \ >_  < >s  * >    N C 6xwwjw^ 6pv  r6  rvwhm T  Tw w  A 1`w f && f   TA 1T,W 7translation overflow  X >f f& >  w5 % wD -# - - -  -  -w06 w(  vvw N& \w f V R N < lw[ ? >  > ]> [-\<1]N O *> D $? gpar;NH @ | (r ~ ) >O  W.c1 generateO {} >   } >  > .txN .tnO .tq;N < > T *$ > T $6 > T F > T *V p  ? .tq;Nb ?i I0H;.  >{ (  ) ? *  .tp;.byte N H,H;  H AuuA Ce5  wA 1`w  Z w6  w   N w6  w&E@  e0 B L ) >%% 6!w z&&- t h%wj V& 7   7 4w<7 >& "W 1+ & 4 Pw  w  W @+  j w A@E@7  7+ > >s;'N 6  h? >\>N O >\0>;.evenH<N( O,  \ > ^ z & ?5 \\\Nj 6hh z ?o   H ? r 8 r >   4  >  .t;alt;salt;N N H:I:? : ? .l;Nf   t>I  , >S  ( )  r >]  >k .l;N .rvO .fO 0+ @+ p=   W       74  7'  e > 8@@@@qqqqf7t  tq,@ @  R X @ | ȝ40 T#q,q  n\#& xCC  6 jq&  6`( d# w`d#  Blerror  *  > ( )*r > [8 ]> .uO2.stO@=^>7b>E++d.aOp.sOx.mO.qO.rO.oO.xO.nO==.eqO!=.neO<=.leO>=.geO<<.slO.ltO>>.srO.gtO6+"h>u -2>} *B> /R> %b> |r> ^> &> > > > > > <>on copy f < T# Wv Eed#   f1N1N1N1f&@l1 11 1 ,    T#2 D#2 L#2 \# 7 Lf& Wv Eed# T# @E7 2D#(wD#L#eL#2 T#D#@`&D#w2 T#f  2 D#2 L#D#Wv E@`ed# & 7! ,\#\# e e,4  q,@ p & \#  f7 q,@ @  8@  JȝT#  \#fr\#   ,\#\#e& ^  T   & B4B4e@4pB4@11    B4 .!Out of space. B4e@4pB4e@4"Bls3 B@4@4& R 1B41 @4pB4 f&7  t B4`COe@4 Kl<"L"\"mX,`  ww  7  Ng w7  5 b l x 7t t  Ne @-@E5% @tE5 tpw ~5 5   @ b   -  5 @ A pb -z @ 0  V of  &  5   N 5 - @ b r @ b  \ f@ &b     error in %s status = %d unlink %s ratjunkcan't open ratjunk can't open %ssubroutinefunctionrealintegerlogicaldoubleprecisioncomplexblockblockdata MAIN.ft d o x f e c s l" rF 0 %ew 1e@4 8Be@4,2  @44l"4 4D4@40D4Ae@4      @ @W b4W @8&"Error in allocator. W b4W @8w,Pw,H@@& p ,"B4e@4 &@4@&## 7#7#cannot open output file alloc.db4@47|e e 882 b`mZZB4  b4w N  w7  V  wj 7  V of  5   w  5 u 5 / @ 5%% @ ȥ.@w w u@ ȋ@p@w w N Nf N  N wR w <  h 5 @ @m @ @m  5GNf N  Ne @-@E5% %2|  & 6  w   7r  7| 5 @ 0  %f 55z4 f_^ 527 y A rfN ~ u-*A rf !A rf Nb > A rf N $A rf 1 A rfN 5 ( N5%7A rfN ~ A rfN     f  5 AAm rf AAm rf Nf > %f rwfz     z5A r   Le@4D2 :4, b  @4B4@4A e@4@4 `N @tE5   @ % wZ w H l f b A H@w2 w N %ou@ 5@ H@ ȋ w u@e5w N r  pN %o w w | N   wj N w N   7 @ ;Nefe2 t Ne VNefe  5Ne2 Nefe2 2 Ne2 ~ Ne N b Ne2    w  5 @J7D y @ ȕ e  @ȥȥȥȥ% ȋ@H ww @ @  $z 6e ZA 1z@ &  wFw 4 5 @0z % @ z7&  w w   =w@ A Hw  5  @@mȋ@wf&UUDe .E ' $  7 ?%7e- U e? 7jU55 b wNe2 w  5= %  =@wrw ` N@&  p wNw <N J\ V1bw0w    @f  e e  _ Kf  Tf  cYf  eaf  if  epf  e zf  f  @@e0p 45 @@mAH2 5 @@mAAmH @@m > @@mȕ.  ` ć `7l d`U ef@e7:E4w ~w^ DeT  N  % w7 : 7 : ׯ0 - ( & (w 7   .w erB J ӕ- R r f e0 @ > ҋ D~8 ӕ0 $f v Le0 9ef` XR 7Bwe&  m& $ ~    ~ w7   0   Wp `e0eӕ?@@mȕf @@m ww ~ @ A H wlw T%a%z%A%Z %0%9 w,w w   e@nd  w hNf   4ww ~w,De"   % wv7 7 ׯ-  (w7  .weB J ӕ- R r f e0 @ > ҋ D~8 hӕ0 $f v f ,P   @f   7nv  ld-^Vf 6 0(   7  7  7 f@)wrfwmwTwmfww2w f@@& HADCBF7zF ^P"08%s %s ljlld oxFfTecslbr Le0 9e4. &  7we&  m   ~    ~ w7  0   Wp `e0eӕ?f  , P x r  @f V F7D  F: 2 -, $ f   7  7 7 f@w@ fwPwLw fw8w4  wfw7v fwww/usr/lib/quiz/state:state:cap[ital|]:abbr[ev[iation|]|] /usr/lib/quiz/america:[country-|]America:cap[ital|] /usr/lib/quiz/europe:[country-|]Europe:cap[ital|] /usr/lib/quiz/africa:[country-|]Africa:cap[ital|] /usr/lib/quiz/midearth:[country-|]M[iddle-Earth|E]:cap[ital|] /usr/lib/quiz/pres:pres[ident|]:term:succ[essor|] /usr/lib/quiz/sov:sov[ereign|]:cen[t[ury|]|]:succ[essor|] /usr/lib/quiz/seq-easy:seq[uence|]-easy:next:name /usr/lib/quiz/seq-hard:seq[uence|]-hard:next:name /usr/lib/quiz/posneg:pos[itive|]:n  fwwwfwAQ  OfA  ^ y   F y @0fA  @9 fA @e&7Bw>78@w7 \ fAW @w fH1H7 5 e0w 5& w& L& H& D& @& <& 8& 4& 0& ,& (& $& & & & & & & & & f& fw eg[ative|] /usr/lib/quiz/bard:Shakespeare[-line[s|]|]|line[s|]:next:work:char{acter} /usr/lib/quiz/inca:inca:succ[essor|] /usr/lib/quiz/murders:victim:killer /usr/lib/quiz/collectives:ind{ividuals}:coll{ective} /usr/lib/quiz/misspell:mis{spell}:right /usr/lib/quiz/poetry:poem-line:next:poem:author P`  & 6  w z5 e@ @mȥ-,@ @m7 y lH7 hE777<84 @0@ @m5N 5%rN %fN of t &  N J  u- *   5    % I zF5 +.1 @ A p-<@ <@ @@ M@ 0 P V ww  X w f "& w }f@fA w,w"e"w"ew"@lw"Alew &@t`e @& HADCBF7z F2cdfrvXxf`/usr/fort/fc1/usr/lib/ratfor/usr/fort/fc2cflag=%d, nl=%d ld-x/lib/fr0.o-lf/lib/filib.a-l/bin/ldratjunkf.tmp1%s: ratjunkcan't ratfor ld-r-x/bin/lda.out%s: as-f.tmp1/bin/asa.outmove failed: %s %s Can't find %s Try again Fatal     #define CHAR 01 #define BLOCK 02 #define INTR 04 #define EVEN 010 #define KL 020 #define ROOT 040 char *btab[] { "rk", "rp", "rf", "tm", "tc", "hs", "hp", "ht", 0 }; char *ctab[] { "console", "pc", "lp", "dc", "dh", "dp", "dj", "dn", "mem", "rk", "rf", "rp", "tm", "hs", "hp", "ht", 0 }; struct tab { char *name; int count; int address; int key; char *codea; char *codeb; char *codec; char *coded; char *codee; } table[] { "console", -1, 60, CHAR+INTR+KL, "\tklin; br4\n\tklou:\tjsr\tr0,call; _dnint\n", "", "\t&dnopen, &dnclose, &nodev, &dnwrite, &nodev,", "dhdm", 0, 304, INTR, "\tdmin; br4+%d.\n", "", ".globl\t_dmint\ndmin:\tjsr\tr0,call; _dmint\n", "", "", /* * DR11-A+ * DR11-C+ * PA611+ * PA611+ * DT11+ * DX11+ */ "dl", 0, 308, INTR+KL, "\tklin; br4+%d.\n\tklou; br4+%d.\n", "", "", "", "", /* * DJ11 */ "dh", 0, 308, CHAR+INTR+EVEN, "\tdhin; br5+%d.\n\tdhou; br5+%d.\n", ".globl\t_dhrint\ndhin:\tjsr\tr0,call; _dhrint\n", ".globl\t_dhx(equal(q->name, p)) { if(root < 0 && (q->key&BLOCK)) { root = 0; q->key =| ROOT; } if(q->count < 0) { printf("%s: no more, no less\n", p); return(1); } q->count =+ n; if(q->address < 300 && q->count > 1) { q->count = 1; printf("%s: only one\n", p); } return(1); } if(equal(p, "done")) return(0); printf("%s: cannot find\n", p); return(1); } equal(a, b) char *a, *b; { while(*a++ == *b) if(*b++ == 0) return(1); return(0); } getchar() { int c; c = 0; read(0, ou; br4\n", ".globl\t_klrint\nklin:\tjsr\tr0,call; _klrint\n", ".globl\t_klxint\nklou:\tjsr\tr0,call; _klxint\n", "", "\t&klopen, &klclose, &klread, &klwrite, &klsgtty,", "mem", -1, 300, CHAR, "", "", "", "", "\t&nulldev, &nulldev, &mmread, &mmwrite, &nodev,", "pc", 0, 70, CHAR+INTR, "\tpcin; br4\n\tpcou; br4\n", ".globl\t_pcrint\npcin:\tjsr\tr0,call; _pcrint\n", ".globl\t_pcpint\npcou:\tjsr\tr0,call; _pcpint\n", "", "\t&pcopen, &pcclose, &pcread, &pcwrite, &nodev,", "int\ndhou:\tjsr\tr0,call; _dhxint\n", "", "\t&dhopen, &dhclose, &dhread, &dhwrite, &dhsgtty,", /* * GT40 * LPS+ * VT20 */ 0 }; char *stra[] { "/ low core", "", "br4 = 200", "br5 = 240", "br6 = 300", "br7 = 340", "", ". = 0^.", "\tbr\t1f", "\t4", "", "/ trap vectors", "\ttrap; br7+0.\t\t/ bus error", "\ttrap; br7+1.\t\t/ illegal instruction", "\ttrap; br7+2.\t\t/ bpt-trace trap", "\ttrap; br7+3.\t\t/ iot trap", "\ttrap; br7+4.\t\t/ power fail", "\ttrap; br7+5.\t\t/ emulator &c, 1); return(c); } clock", -2, 100, INTR, "\tkwlp; br6\n", ".globl\t_clock\n", "kwlp:\tjsr\tr0,call; _clock\n", "", "", "parity", -1, 114, INTR, "\ttrap; br7+7.\t\t/ 11/70 parity\n", "", "", "", "", /* * 110 unused * 114 memory parity * 120 XY plotter * 124 DR11-B * 130 AD01 * 134 AFC11 * 140 AA11 * 144 AA11 * 150-174 unused */ "lp", 0, 200, CHAR+INTR, "\tlpou; br4\n", "", ".globl\t_lpint\nlpou:\tjsr\tr0,call; _lpint\n", "", "\t&lpopen, &lpclose, &nodev, &lpwrite, &nodev,", "rf", 0, trap", "\ttrap; br7+6.\t\t/ system entry", "", ". = 40^.", ".globl\tstart, dump", "1:\tjmp\tstart", "\tjmp\tdump", "", 0, }; char *strb[] { "", ". = 240^.", "\ttrap; br7+7.\t\t/ programmed interrupt", "\ttrap; br7+8.\t\t/ floating point", "\ttrap; br7+9.\t\t/ segmentation violation", 0 }; char *strc[] { "", "/ floating vectors", ". = 300^.", 0, }; char *strd[] { "", "//////////////////////////////////////////////////////", "/\t\tinterface code to C", "///////////////////////////////(^`< wwt7Z^U7T,U7N*7HW7BZ7<]& * $"7#| EfF E50 UbE x U0 %  2pv Er b|I 2 lVUNE@HBE   5 e Eaa204, BLOCK+CHAR+INTR, "\trfio; br5\n", ".globl\t_rfintr\n", "rfio:\tjsr\tr0,call; _rfintr\n", "\t&nulldev,\t&nulldev,\t&rfstrategy, \t&rftab,", "\t&nulldev, &nulldev, &rfread, &rfwrite, &nodev,", "hs", 0, 204, BLOCK+CHAR+INTR, "\thsio; br5\n", ".globl\t_hsintr\n", "hsio:\tjsr\tr0,call; _hsintr\n", "\t&nulldev,\t&nulldev,\t&hsstrategy, \t&hstab,", "\t&nulldev, &nulldev, &hsread, &hswrite, &nodev,", /* * 210 RC */ "tc", 0, 214, BLOCK+INTR, "\ttcio; br6\n", ".globl\t_tcintr\n", ///////////////////////", "", ".globl\tcall, trap", 0 }; char *stre[] { "/*", " */", "", "int\t(*bdevsw[])()", "{", 0, }; char *strf[] { "\t0", "};", "", "int\t(*cdevsw[])()", "{", 0, }; char *strg[] { "\t0", "};", "", "int\trootdev\t{(%d<<8)|0};", "int\tswapdev\t{(%d<<8)|0};", "int\tswplo\t4000;\t/* cannot be zero */", "int\tnswap\t872;", 0, }; int fout; int root -1; main() { register struct tab *p; register *q; int i, n, ev, nkl; int flagf, flagb; while(input()); /* * p 1 UE@B aa  5 tana   H| u ^ `f f EA` ` :> NtExXXXXXXP\\\\\X7@ExTDT"555@EWtU& @ U7@D7@t z@ r525/E*@tE` mr5 5 5 5&Pe \e V55 %)&EPtE"tcio:\tjsr\tr0,call; _tcintr\n", "\t&nulldev,\t&tcclose,\t&tcstrategy, \t&tctab,", "", "rk", 0, 220, BLOCK+CHAR+INTR, "\trkio; br5\n", ".globl\t_rkintr\n", "rkio:\tjsr\tr0,call; _rkintr\n", "\t&nulldev,\t&nulldev,\t&rkstrategy, \t&rktab,", "\t&nulldev, &nulldev, &rkread, &rkwrite, &nodev,", "tm", 0, 224, BLOCK+CHAR+INTR, "\ttmio; br5\n", ".globl\t_tmintr\n", "tmio:\tjsr\tr0,call; _tmintr\n", "\t&tmopen,\t&tmclose,\t&tmstrategy, \t&tmtab,", "\t&tmopen, &tmclose, &tmread, &tmwriteass1 -- create interrupt vectors */ nkl = 0; flagf = flagb = 1; fout = creat("l.s", 0666); puke(stra); for(p=table; p->name; p++) if(p->count != 0 && p->key & INTR) { if(p->address>240 && flagb) { flagb = 0; puke(strb); } if(p->address >= 300) { if(flagf) { ev = 0; flagf = 0; puke(strc); } if(p->key & EVEN && ev & 07) { printf("\t.=.+4\n"); ev =+ 4; } ev =+ p->address - 300; } else printf("\n. = %d^.\n", p->address); n = p->count; if(n < 0) n 5 5   ЇEޛ:؛H ЛʛE Bv EE (&v  6  fU`f`I  >U8>8& 0"&  P ~ & ~ &  .ܚ֚EUPEIUUrEvIEnU fE`UXE@RUJE DU<60( , &nodev,", "ht", 0, 224, BLOCK+CHAR+INTR, "\thtio; br5\n", ".globl\t_htintr\n", "htio:\tjsr\tr0,call; _htintr\n", "\t&htopen,\t&htclose,\t&htstrategy, \t&httab,", "\t&htopen, &htclose, &htread, &htwrite, &nodev,", "cr", 0, 230, CHAR+INTR, "\tcrin; br6\n", "", ".globl\t_crint\ncrin:\tjsr\tr0,call; _crint\n", "", "\t&cropen, &crclose, &crread, &nodev, &nodev,", /* * 234 UDC11 */ "rp", 0, 254, BLOCK+CHAR+INTR, "\trpio; br5\n", ".globl\t_rpintr\n", "rpio:\tjsr\tr0,call;  = -n; for(i=0; ikey & KL) { printf(p->codea, nkl, nkl); nkl++; } else printf(p->codea, i, i); } if(flagb) puke(strb); puke(strd); for(p=table; p->name; p++) if(p->count != 0 && p->key & INTR) printf("\n%s%s", p->codeb, p->codec); flush(); close(fout); /* * pass 2 -- create configuration table */ fout = creat("c.c", 0666); puke(stre); for(i=0; q=btab[i]; i++) { for(p=table; p->name; p++) if(equal(q, p->name) && (p->key&BLOCK) && p->count) { pri   P ~tnx0lHB  & C~2NmH   W W @57\PP0R`0  ȋ `5 a~StEķ Tc    0 L&  6r 6r@@A6v@@& ADCBFw 7 z_Ve F   P_d /% %FNV %> Wt _rpintr\n", "\t&nulldev,\t&nulldev,\t&rpstrategy, \t&rptab,", "\t&nulldev, &nulldev, &rpread, &rpwrite, &nodev,", "hp", 0, 254, BLOCK+CHAR+INTR, "\thpio; br5\n", ".globl\t_hpintr\n", "hpio:\tjsr\tr0,call; _hpintr\n", "\t&hpopen,\t&nulldev,\t&hpstrategy, \t&hptab,", "\t&hpopen, &nulldev, &hpread, &hpwrite, &nodev,", /* * 260 TA11 * 264-274 unused */ "dc", 0, 308, CHAR+INTR, "\tdcin; br5+%d.\n\tdcou; br5+%d.\n", ".globl\t_dcrint\ndcin:\tjsr\tr0,call; _dcrint\n", ".globl\t_dcxintntf("%s\t/* %s */\n", p->coded, q); if(p->key & ROOT) root = i; goto newb; } printf("\t&nodev,\t\t&nodev,\t\t&nodev,\t\t0,\t/* %s */\n", q); newb:; } puke(strf); for(i=0; q=ctab[i]; i++) { for(p=table; p->name; p++) if(equal(q, p->name) && (p->key&CHAR) && p->count) { printf("%s\t/* %s */\n", p->codee, q); goto newc; } printf("\t&nodev, &nodev, &nodev, &nodev, &nodev,\t/* %s */\n", q); newc:; } puke(strg, root); flush(); close(fout); if(root < 0) writp 0 e _WpWtN._ & 8_ &L_ &z_ &_ &^ 6 7^VVe /%Uf^^ %`^^ %_ ,U^^j^e^gMR^ `F @ :V r 7]]"V r 7NH X   & & e& _ % wLw <%(T%`#̶ %(T%#5 ww %(nT_X N h %_X N h &f  e%\ndcou:\tjsr\tr0,call; _dcxint\n", "", "\t&dcopen, &dcclose, &dcread, &dcwrite, &dcsgtty,", "kl", 0, 308, INTR+KL, "\tklin; br4+%d.\n\tklou; br4+%d.\n", "", "", "", "", "dp", 0, 308, CHAR+INTR, "\tdpin; br6+%d.\n\tdpou; br6+%d.\n", ".globl\t_dprint\ndpin:\tjsr\tr0,call; _dprint\n", ".globl\t_dpxint\ndpou:\tjsr\tr0,call; _dpxint\n", "", "\t&dpopen, &dpclose, &dpread, &dpwrite, &nodev,", /* * DM11-A */ "dn", 0, 304, CHAR+INTR, "\tdnou; br5+%d.\n", "", ".globl\t_dnint\ndne(2, "no block device given\n", 22); } puke(s, a) char **s; { char *c; while(c = *s++) { printf(c, a); printf("\n"); } } input() { char line[100]; register char *p; register struct tab *q; register n; p = line; while((n=getchar()) != '\n') { if(n == 0) return(0); if(n == ' ' || n == '\t') continue; *p++ = n; } *p++ = 0; n = 0; p = line; while(*p>='0' && *p<='9') { n =* 10; n =+ *p++ - '0'; } if(n == 0) n = 1; if(*p == 0) return(1); for(q=table; q->name; q++) if_X N h &f ` &f T ee%_X @@m@me-\_X  j% e  @teU %z  % e  @teUDm%z   %  Dm% #  @tU"e# jz%z%  ٴww @etww SSt ,^%pS E  H_ ,& !% ~G7[0S [4447tZ7pZww t N be   I  `5?Nf %  !Nf E de !% ~G2e lNf H  Iw2 N_ N ] w N b&e  Nf& % ; 4 %d#Nf H d&e !%4  F4e l apww DCe - N_ N w w N b&e M Iw~w n L g  g̥  5e%fk%Lg D md ^/ J gE%̥.̥+e%fk%gE%̥̥ 5e%fk%D x & 6!%_"@ && Ke ,m D&& Ke et&e /%4_"N` ,ww TgL LVK n7G47 02e%,T F%eT T]%Z 7T S  KSS   S  ;SS S e%%6   % "` m e U~SExStS_)hS_) F PS_)w M8< x ;2tf e  5# h;tf  &  e tf 3ee3@E%  f Z  ” :%<:_l,5f<: : : -::-::pf l5:7jf lgʋ *  a5Nf r  e e wD   5 5 KNef E 5 @ ` %5 @tp-l@tp-l %d ap%de% ~G%d 5#4e l N_ N _w LN b%d  apw$w f L-%d%d N_ N 4 4  e% gڂ_ ,ww LWQ FWf *# fkgʥ    J n  bw,w 5 7 J Jg̋ 5-J e%fkDY` ,̕>J  4%@ F LD7(Cd ^/ 5˕t L & & 6!%˕آ wt N f  w 5tu- NmfNd /%? LNd ^/  LE%  r2d e%fkۂ:7: g l@E%@e 7  Dԓ ww  Btf 4 e e   !tt_ww C % w 5 w pD̵Ee le l E& T- w2w "DEb74 yfWp p^% wft .^w DE*b7\4 y-KfWp n^                      # & ) , / 2 5 ! $ ' * - 0 3 6 " % ( + . 1 4 7 8 ; > A N& 6!% 5  Nm  u-fd /% n w6w &@55ǡS@5/5LN  C5 @ @m@ @m0  %@0 2G@U@t55@ @mBN  0 wh@ @mN   2G@ @m7 G%@ @m7G@ @m0f E %4@tEe5 `N  5 ~G@ `AH 2G ft ,^%-lK%wpw `DC% b%!̵  %@5I 7 Αt7 Ñt0 ww  ~2 :0   7     ww jwY w   ? w؄ %-w f   04 4 wLze%~6b &ېw CK-smK ewe  w BD e D-m tm@m-*4c &e4 H 4\VXV& !% Fe% g΂l̵ lf&   z4e %vy7 V 8Lww  &   l5-(5-$̵̵f2!e% g` , ` &I w e %vyɂtt̕fe P f E 5 ~G fe \ tl5eSee  ~Gw D  4 & * lf&   z4 4   ~Gf E 5D@E5 `N  5@ `N 2G 2G ~G7 F%@ `7Fw   w@ ` j w zğl j j b ZEwDF Fj1w n%wpw `whw XDCB~wPw @D 5ete ^/ b` , r# f& Ke t` ,  fd /%4HE7BEg lww \$0  r#4@m- tLm  LewLw < %/6& r  %/     _@2 _>2E%@@& . H  g %VҐ %/%V %/57 <7 6$5 & P 75 $ N ~G% & . 7 @e7Ҏ5Ď N ~G P & P & E 5X@&xE` !%ef ^ r z4ww BʵL bEe5f P  E 5f \ tA@lee ʵSSeʵTeTN Fww D5 pe5[ U5HN& E e5 1e@-%& E 5e5  N& @p- ~G& ,ȃ ~GN& = e@-E4 4 ww Ĭ  w@U4h c  w @7h54 et&e /%  wTw D _n# fk e %l t-Ν0a` ,4 t6e?tEete ^/ ` ,e  & & eZX7 NN @ e& Ke3C    L L  6!%ܜ L ww D  &d /%ww @E%U@e 7N@  x`H:` & NeRHZH` %V N ~G% & . _0wB5 f r _0_0w E ܍ww Ѝ ̍ F%jww d, # X(V JHD<ʕ2˕3̕w3@ 0  w bD% 4 3 5Ee l z4 Ue   R4, 7 Č7  z4ww D R4  z47  z4 k h % w% UZHԔ%V:*X,R J w`w PCe 1 @ %%B %d%l%o %o   %s eww Nf P N&  Nf \ e0 ww D x 5t t tv%     twZw Jwe N ` & w (@@&f+` &eww D <` N Nf&@` &eww B _E% Wp r^ _B j ` & N` & ` , " %   | wNNe %  7˛ENe Etea%a)N e E?%?Etea "e  1  N  1e "L % d _ $U5 _ $ _$ % _4$_$C p  (( _ $ _$w  L 7|ww dww ww gt-N& % e%fkww % z4e  7 2 .& 6 7  z45Ee lw $D&  ̵w w D̵ lww  ~2 :0  _7hf  %1 1 H5@ . _75`_7@5 5 $ %_7eN F%_7 %_7 p 55 ƊŠ7 Š7  7_75 %Om7 e?tE5me?tE5Nff55HE58N 6 E%`# &E feH 6 N P 59@ 7P @- Pf& 8F%N& E 5rff PeN ~Gg jww BE% Wp t^ _ ,_B j E5N 6 5E%`  P X%& H& E 5 fff PeN ~G 5N hGN 2Gnh &E feD t̥d̕d̥ wfw VĜ   Ĝ  w: 5w  l˕ H  % g, e%fk jww 2 57q%% 0 8e ((&&e  &  0E x`7  eętQ7l w"w 7˘aj2 :0  I C . 55`1- 7 7 tp` \e & &&  e _77    2"De$ % ˵ _7% x%p׉_7ԉa  % & f& e7 6e7, w$w w e@@ A @e5pNf  @ ef  & ` ҋ@ fe  ވ5 ƈ 5 5 e% ` md %`X0  %6 N ~G%.hf l  5 B > ' *wjw Zu-@wV@w @u-@w<@w &C@DmΧ*Q]̧5# & & %jw`B X      n w B %   t̕t jM7M g l   bw< `t̕t ( Pw Cg2  e~ww D4 ̕jMJ\M 7NMg lww DEted`% e7 Bt7:7,   wdw N t@-@@ & P 킘e xr`jd e  w` @l2 &     `w XRg̥ -Η :0- e%fk: T~  7 TڗTE7T~T  ~  TT T7 T~ lww -|T  wpT7 lT~ l _* xaLT F%_*:T 74Tv.ww t7ˆ wxw h&%   -e%  e ^/ @b ,& H  !% F&d /%̕g, 0g l lg,  ʥ e%fk e%fkڂ w p g(, n ʥL 쇄% E e /% 2 2 22 2l X   X l X   X h ~G1ʥ   @<WtUp0 e%fk (.  _ 9 wdw Tgˋ e%fk   ? Ć7 7 7 7 7 7  1`ww ̰ 8$ 7̵ % 3  37r7j%  e$~tz00070 ~G % ,^ @ e $/w0w DCL @ tEWt@PUA5UUww ּDC%Fx L EtUA5U8U0ww %F45 U@`Qd  5LQUDQ fBU  e%   e%0w w E 5@Pd l7 Pww B U@&  5@ U XP@t 7PwP@t7tP@tE7fPB ww | U7  rI W 5 Ο@Ɵ5RtEWt@PU@`-f -U   UU TR.  TV5  PRww J R(5Z5P   Ο7*%5@PƟU7 Ο77v rIT 0Ο ww N [fY Le0D 7dww ثN [ fY Le7 |dww DB j  Ο  քH&e X „4?wrw b ~2 :0    & <%wHw 8~2 :0 ߃lE  & <%ww CB%5 . 5 . E%@ea'   z4 "E E - ! @ 0  wVw Fރ ,҃ 0  -w2w " ,D̵Â=P%Dt 58t5%E 5    xLb5mfe X tttt 0^ &  55@ l `EHEwNw >%5- U BI F L.5%z ww Ds5_N5s_Nms _NteE5 t5 tEB-_NmZstEAms@ s _N U@&  5@ U t E4 sWt @`E@`t4`tE4B j 4r E 4 4r&  &  5jr5@ l EHޟww D5 J Etec@ "U rIL4   \   P  rWtPt r4` :743-, 3-,3  ww  t&& VJeww r:7 && r%5 ߕ  5~ 5~] W U7M7L rI Nww N ] f[ Lewԩw ĩN ]  f[ Leww B j w E5` w h ~2 :0 A6E%@ +z~2 :0 ́ Á0-   ww  ~2 :0 k e   ww  l'h' fe X R'L'ff fe  RwJ.'('*'$' fe Nf'' fe w&w&Zpf w  ,&& ? ww  ~2 :0  & ?  ww lff   7Hr Nj1rw|w lD57rrw\w LCe Nqr&  e&  e&  ww Nr 7Dre 78re 7,r Nwܸw ̸dr ,E% eq fWp v^%ww D @&e   fO hw`w PfeExte%~ n^ e 7*w w De  e   le l   4wηw C ڵ  w    cHbe P `@Et0!cb wd(!!!!![c!!!XYYc!VWc!!!!!!!!!RTTTUU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!UHV!!!!!!!!!!!!!]]!XYl[[!!!!!!!!!!!!!!!!h  /etc/initmem = %l RESTRICTED RIGHTS Use, duplication or disclosure is subject to restrictions stated in Contract with Western Electric Company, Inc. no clockiinitno spacebad blockOut of inodes@&e P @& E @&e \ tle@e5 Nef  e % f  e % ~Gww  ,  @ ww 5o" ~2 :0  5   f  " / wt e% g  & f@t ,^%~f E ~ ~G2J H2& !%22$E2 ~G z4w 5_~;f " e%6&  @5 '\ %c  %tbtb 5\tb %d  %5ceD-w BCE% 5 5 %%% %  fO4%5%A%Ze   5 % %  l  5 NQ  Sw8w ( CDE%5 _R% 5  NQ _R5cҋ !\ NQ %a%ze% 5 NQ e &bad countno fsno imtInode table overflow panic: %s %s on dev %l/%l errbn%l er%o %o swap errorno procsout of swap spaceswap errorout of textout of swap spaceJ%#######$8$V$\$#b$h$#\%d%ka6 = %o aps = %o trap type %o trap>'>'>'>'>'>'N'>'>'>'))*"*B*`***core%7":`;p;<0=9><>C40DB>DD:?T=fC@ABCB(%?%%rN*N%C>xC6EB%%@2EE%,CNCD%%% g=~*l 5-#~e %vy& f@t .^% 3  ~Gw2w " ~2 :0 E%`}-6} ww xp~ww #b~^~#ww D~#>~7#pf lww ğ$~7D} 74}4}07*}wrw b}}}}wZw Jğ}7} 7|7|w8w (|}}|w w |? }ww Bww }%  (  |0ww ~2 :0 3 z4| r Vb ,E%  Zec5 E B xbʋ=ʊ;tE5%ʋt&e  % tE5% U@%  e &U  wԴ5@tE5%% w D Sww tB &5"e %cEP4 ER p,%ww D  O   e  n wܳw ̳D#  S@&e  %2   %%%%%%%%%%%% `--- `-..no file out of swap=====unlink -- igetblkdevdevtab|#`{}@~ABCDEFGHIJKLMNOPQRSTUVWXYZRRR"RfRRR({)}!|^~'`XX@X##hN<B N G N H 5 U &@t 0^ #N G N H 5 ~G U @t 0^ N E w Iw DE & t 0^ 5 I ~G5 NwTw DD t2^%c%Z hGU ~Gww DU Fww D5@ l5@J3E@B3z l5 z EH0 zww D@ttE mE@` F__ Vi n w>w .i7 i7aiB X wB j iE .i tE m\E@` ` __ w ~N 8L@E0wrw bD5 J%B EU rI4  \ | 7v r 07j ^   w w 7J ˕U rI2 ' EE @ ˕   tUC5U "f_end$_edata#c_main"_ldiv"P_lrem"\_lshift"jcsv"zcret"_ka6#(^_cputype#*^badtrap$_bdevsw#,^_nodev"!_nulldev"!_rpstrat"[_rptab$c_tmopen"X_tmclose"Y_tmstrat"Y_tmtab$c_tcclose"V_tcstrat"W_tctab$c_cdevsw#n^_klopen"RT_klclose"T_klread"T_klwrite"U_klsgtty"U_mmread"U_mmwrite"HV_rpread"]_rpwrite"]_tmread"l[_tmwrite"[_rootdev#__swapdev#__swplo#__nswap#__canonb$c_coremap$d_swapmap$e_roo2^ s-3! wz  w ^@-R1fb ,z v%z2<U@2z  2 @t2^mb , t-t-  5U@&  BIwԾ μ(2 BI5U F0003t tw bD &  5 R NwDw 4D \00Uww D5  fKU5 ~GE@ lww н@ ~wȽw z7171717 1 WpDezy Wpww  565 & r%5 E7 E U7 7 ! ,!5n Eb U˕CwN   xcߕ rI - -؂"" Et5 @PUA  e-w DƟ9g Ɵ 0 Ο ޟwlw \D4Ɵ & HY & HY w>w .jf  b 5R@t@]U`Rww D eޟ - - U I rI!55 4  Ы 7  07  tdir$ff_execnt$hf_lbolt$jf_time$lf_tout$pf_callout$tf_mount$f_mpid$ g_runin$ g_runout$g_curpri$g_maxmem$g_lks$g_updlock$g_rablock$g_proc$g_text$fk_inode$l_icode#__mfree"/_printf"&_min"6_panic",_cinit"&O_binit"I_iinit"~ _iget"r_newproc"Z_expand"_estabur" _sched"_sureg": _nseg"h _nblkdev$vy_nchrdev$xy_buf$zy_bfreeli$z_bread"E_getblk"H_bcopy"!_brelse"~G_alloc" _getfs"b_sleep"_badbloc" _wakeup"l_clrbuf"I_prdev"N_free" _bwrite"F_ialloc" _iput"_ifree"*_update"_iupdat"_prele"z4_bflush"8L_itrunc"_maknode"_wdir"_writei"_panicst$z_putchar"_printn"_deverro"r_readi"_bmap"P_breada"8F_iomove"P_bawrite"hG_bdwrite"2G_max"_cpass" _passc"n _file$z_issig" &_setrun"_setpri"_malloc"^/_xswap"6!_swap"K_xccdec"r#_xfree"!_xalloc"2"_sysent#a_psignalp 0 e*_WpWtNL_ & V_ &j_ &_ &_ &^ 6 7^VVe /%Uf^^ %`^^ %_ ,U^^^^8gMp^ `F @ XV r 7]]@V r 7NH X   & & e& 6_ % wLw <%(T%`#̶ %(T%#5 ww %(T_X N h %_X N h &f  e%55HE58N 6 E%`# &E feH 6 N P 59@ 7P @- Pf& 8F%N& E 5rff PeN ~Gg jww BE% Wp ^ _ ,_B j E5N 6 5E%`  P X%& H& E 5 fff PeN ~G 5N hGN 2Gnh &E fe"%_psig"&_trap1"%_grow"((_nosys"%_nullsys"%_ipc$~_signal"%_stop"Z&_procxmt")_exit"8_core"d'_schar"j2_namei":0_access"._ptrace"(_rexit"7_fork"":_read"`;_write"p;_open"<_close"0=_wait"9_creat"><_link">_unlink"C_exec"4_chdir"0D_gtime"B_mknod">_chmod"D_chown"D_sbreak":_stat"?_seek"T=_getpid"fC_smount"@_sumount"A_setuid"B_getuid"C_stime"B_fstat"?_stty"rN_gtt_X N h &f ` &f T ee%_X @@m@me-\_X  j% e  @teU %z  % e  @teUDm%z   %  Dm% #  @tU"e# jz%z%  ٴww @etww SSt J^%S E  H_ ,& !% ~G70[NS([444 5 B > ' *wjw Zu-@wV@w @u-@w<@w &C@DmΧ*Q]̧5# & & %jw`B X      n w B %   t̕t jN7N*g l   bw< `t̕t ( Pw C8g2  e~ww D4 ̕M$JzM 7lM,g lww DEted`%y"*N_nice"C_sslep">_sync"xC_kill"6E_getswit"B_dup"@_pipe"2_times"E_profil"E_setgid",C_getgid"NC_ssig"D_timeout"p,_getf",_closef"-_closei"T-_openi"-_owner"._uchar"~2_suser"._ufalloc"._falloc"/_readp"3_plock"R4_writep"3_rdwr";_open1"<_stat1"?_getmdev"TB_buffers$$~_swbuf$B_httab$Z_iowait"I_incore"G_geterro" N_notavai"BI_iodone"rI_mapfree"fK_devstar"VJ_rhstart"J_maplock$d_mapallo"J7Z7Zww t N be   I  `5?Nf %  !Nf E de !% ~G2e lNf H  Iw2 N_ N ] w N b&e  Nf& % ; 4 %d#Nf H d&e !%4  F4e l apww DCe - N_ N w w N b&e 6M Iw~w n M*g  8g̥  5e%k%L,g D md ^/ J 8gE%̥.̥+e%k%8gE%̥̥ 5e%k%D x & 6!%_"@ && Ke ,m D&& Ke et&e /%4_"l` ,ww t8gl LtK n7GT7 P2e%_physio"L_partab#c_maptab#tb_cfree$f_sgtty"N_wflusht"N_flushtt"fO_canon"O_ttyinpu"P_ttyoutp"NQ_ttstart"S_ttrstrt"R_ttread"lS_ttwrite"S_ttystty"T_kl11$_tcper$_tcstart"|W_rtmbuf$_t_openf$Ɵ_t_blkno$Ο_t_nxrec$ޟ_tcomman"HY_tmstart"Y_tmphys"[_rp_size#c_rrpbuf$_rpstart"\_rpphys"] *  a5Nf r  e e wD   5 5 KNef E 5 @ ` %5 @tp-m@tp-m %d ap%de% ~G%d 5#4e l N` N _w LN b%d  apw$w  g L-%d%d N` N 4 4  e%(gڂ` ,ww jWQ dW g *# k8gʥ     J n  bw,w 5 7 J J8g̋ 5-J e%kDw` ,̕\J  4%@ F LD7(Cd ^/ 5˕t L & & 6!%˕آ wt N f  w 5tu- NmfNd /%? LNd ^/  LF^b< wwt7Z^U7T,U7N*7HW7BZ7<(]& J DB7#|& EfF E50 UbE x U0 %  2pv Er bI 2 VUNE@HBE   5 e EaaD G J M 9 < ? B H K N : = @ C F I L O P S V Y \ _ b e Q T W Z ] ` c f R U X [ ^ a d g h k n q t w z } i l o r u x N& 6!% 5  Nm  u-fd /% n w6w &@55ǡS@5/5LN  C5 @ @m@ @m0  %@0 2G@U@t55@ @mBN  0 wh@ @mN   2G@ @m7 G%@ @m7G@ @m0f E %4@tEe5 `N  5 ~G@ `AH 2G  1 UE@B aa  5 aa   H  #^ ` f EA` ` Z^ NtExXXXXXXP\\\\\X7 @ExTDT"555@EWtU& @ U7Ҝ@D7ʜ@t z@ r525/E*@tE` m5 5 5 5&pe \e V55 %I&EPtE H 4zVvV& !% Fe%(g΂m̵ f&   z4e %y7 V 8Lww  &   m5-(5-$̵̵ g2!e%(g ` ,'` &I w e %yɂtt̕fe P f E 5 ~G fe \ tl5eSee  ~Gw D  4 & * f&   z4 4   ~Gf E 5D@E5 `N  5@ `N 2G 2G ~G7 F%@ `7Fw   w@ ` j w zğl j j b ZEwDF Fj1w n%wpw `whw XDCB~wPw @D 5ete ^/ ` , r# f& Ke ` ,  fd /%4fE7`E,g lww \$0  r#,5 5   ЇE:H E Bv EE (&v  6  fU`I  >U8^X& P"F  P ~ & ~  &  .EUPEIUUrEvIEnU fE`UXE@RUJE DU<60( z4ww BʵL bEe5f P  E 5f \ tA@lee ʵTTeʵTeTN Fww D5 pe5[ U5HN& E e5 1e@-%& E 5e5  N& @p- ~G& ,ȃ ~GN& = e@-E4 4 ww Ĭ  w@U4h c  w @7h54 et&e /%  wTw D _n# k e %m t-Ν0a` ,4 t6e?tEete ^/ ` ,e  & & eZX7 NN @ e& Ke3C    L L  6!%ܜ L ww D  &d /%ww @E%U@e 7N@  x`f:` & Ne   P ~tnx0lHB  & C~2NmH   W W @57\PP0R`0  ȋ `5 a~stEķ Tc  4  0 L&  6r 6r@@A6v@@& ADCBFw 7 _Ve F   n_d /% %FlV %> Wt ZHԔ%V:*X,R J w`w PCe 1 @ %%B %d%l%o %o   %s eww Nf P N&  Nf \ e0 ww D x 5t t tv%     twZw Jwe N>` & w (@@&fI` &eww D Z` N Nf&^` &eww B _E% Wp ^ _B j ` & N` &  a , " %   | wNNe %  7˛ENe EteB N G N H 5 U &@t N^ #N G N H 5 ~G U @t N^ N E w Iw DE & t N^ 5 I ~G5 NwTw DD tP^%c%x hGU ~Gww DU Fww D5@ l5@h3E@`3{ l5 { EH0 {ww D@t e7 Bt7:7,   wdw N t@-@@ & P 킘e xr`jd e  w` @l2 &     `w XR8g̥ -Η :0- e%k: U:~  7 UڗUE7T~T  :~  TT T7 T:~ lww -T  wT7 T:~ l _* x&ajT F%_*XT 7RT.ww t7ˆ wxw h&%   -e%  e ^/ ^b ,& H  !% F&d /%̕8g, Ng l l8g,  ʥ e%k e%kڂ w p 8g(, n ʥL 쇄% E e /% 2 2 22 2l X   X l X   X h ~G1ʥ   @<WtUp0P^ s-3! wz  w ^@-p1b ,{ v%{2<U@2{  2 @tP^b , t-t-  5U@&  BIwԾ μF2 BI5U F0003t tw bD &  5 R NwDw 4D \00Uww D5  fKU5 ~GE@ lww н@ ~wȽw {7<17617017*1 WpDey WpJT F%ḛ 8$ 7̵ % 3  37r7j%  eB~t{00070 ~G % J^ @ e B/w0w DCL @ tEWt@PUA5UUww ּDC%F L EtUA5U8U0ww %FR5 U@~Q  5jQUbQ fBU  e%   e%0w w E 5@ Q l7 Pww ` U@&  5@ U vP@t 7PwP@t7P@tE7P`E%  r2d e%kۂ:7:*g l@E%@e 7  Dԓ ww  Bf 4 e e   !tt_ww C % w 5 w pD̵Ee le l E& T- w2w "DE%5- U BI F L.5%{ ww Ds5_N5s_Nms _NteE5 t5 tEB-_NmZstEAms@ s _N U@&  5@ U t E4 sWt @`E@`t4`tE4B j 4r E 4 4r&  &  5jr5@ l EHft J^%-K%wpw `DC% b%!̵  %@5I 7 Αt7 Ñt0 ww  ~2 :0   7     ww jwY w   ? w؄ %-w f   04 4 wL{e%:~Tb &ېw CK-smK ewe  w BD e D-m tm@m-*4c &e4w E5` w h ~2 :0 A6E%@ +z~2 :0 ́ Á0-   ww  ~2 :0 k e   ww  '' fe X p'j'ff fe  RwJL'F'H'B' fe Nf,'&' fe w'w'Zf w  ,&& ? ww  ~2 :0  & ?  ww ff   7Hr Nj1rw|w lD57rrw\w LCe Nqr&  e&  e&  ww Nr 7Dre 78re 7,r Nwܸw ̸dr ,E% eq fWp ^%ww D @&e   fO hw`w PeEe% ^ e 74*w w De  e   le l   4wηw C ڵ  w    c4@m- tLm  LewLw < %/.6& r  %/     _@2 _>2E%@@& . H  g %VҐ %/%V %/57 <7 6$5 & P 75 $ N ~G% & . 7 @e7Ҏ5Ď N ~G P & P & E 5X@&xE` !%ef ^ r @&e P @& E @&e \ tle@e5 Nef  e % f  e % ~Gww  ,  @ ww 5o" ~2 :0  5    g  " / wt e%(g  & f@t J^%~f E ~ ~G2J H2& !%22$E2 ~G z4w 5_~; g " e%6&  @5 '\ %c  %bb 5\b %d  %5ceD-w BCE% 5 5 %%% %  fO4%5%A%Ze   5 % %  l  5 NQ  Sw8w ( CDE%5 _R% 5  NQ _R5 cҋ !\ NQ %a%ze% 5 NQ e &RHZH` %V N ~G% & . _0wB5 f r _0_0w E ܍ww Ѝ ̍ F%jww , # X(V JHD<ʕ2˕3̕w3@ 0  w bD% 4 3 5Ee l z4 Ue   R4, 7 Č7  z4ww D R4  z47  z4 k h % w% U(g=~*m 5-#~e %y& f@t L^% 3  ~Gw2w " ~2 :0 E%`}- 7} ww xp~ww #b~^~#ww D~#>~7#f lww ğ$~7D} 74}4}07*}wrw b}}}}wZw Jğ}7} 7|7|w8w (|}}|w w |? }ww Bww }%  (  |0ww ~2 :0 3 z4| r tb ,E%  Ze2c5 E B xcʋ=ʊ;tE5%ʋt&e  % tE5% U@%  e &U  wԴ5@tE5%% w D Sww tB &5"e %2cEP4 ER p,%ww D  O   e  n wܳw ̳D#  S@&e  %2    z4e  7 2 .& 6 7  z45Ee lw $D&  ̵w w D̵ lww  ~2 :0  _7f  %1 1 H5@ . _75`_7@5 5 $ %_7eN F%_7 %_7 p 55 ƊŠ7 Š7  7_75 %Om7 e?tE5me?tE5Nff@ B|X6|2|7 F|   wVw F ~2 :0 E%@{ @& . { 7{ z4ww E{E&|"|E4P ww   { {  ww {%% /{ ?| {{!{0wPw @ 5 {z8g    ,%Ngz7z F{& % e%k܂ zww  {  e {%ww zE7@{z<{z8{z E7NQ  Sww pDC 33wV N w $k8Ctek sDuepeeH3 #@UCU@ww Due N4ww ~@te lSwtw d@te SwZw JDue S % e lw(w BteU53& P ww DueN& T wԱw ıAB j njE үtE m:E@` F__ Vi n w>w .i7 i7aiB X wB j iE .i tE mzE@` ` __ w ~N 8L@E0ğwrw bD5 J%B EğU rI4  \ 7  07~ r   w w 7^ ˕U rIF ' EğE @ ˕   tUC5U learse" _dpadd"X_dpcmp"f_end$4_edata#c_main"_ldiv"P_lrem"\_lshift"jcsv"zcret"_ka6#F^_cputype#H^badtrap$0_bdevsw#J^_nodev"!_tmopen"X_tmclose"Y_tmstrat"Y_tmtab$c_nulldev"!_tcclose"V_tcstrat"W_tctab$c_hpopen"[_hpstrat" \_hptab$c_cdevsw#^_klopen"RT_klclose"T_klread"T_klwrite"U_klsgtty"U_mmread"U_mmwrite"HV_tmread"l[_tmwrite"[_hpread"]_hpwrite"]_rootdev#.__swapdev#0__swplo#2__nswap#ript count subscript out of range subscript syntax error DATA syntax error DATA semantics error equivalence inconsistency equivalence syntax error separate common blocks equivalenced common block illegally extended by equivalence common inconsistency created by equivalence DATA table overflow () imbalance in expression expression syntax error illegal variable in equivalence Storage initialized twice by DATA non array/function used with subscripts/arguments goto syntax error illegal return continue, returnww  565 & r%5 Eğ7 E U7 7 ! ,!5 Ev U˕Cwb   x,cߕ rI - -؂"" Et5 @PUA  e-w D9g  0  wlw \D4 & HY & HY w>w .f  v 5R@t@]U`Rww D e - - U I rI!55 4  Ы  7  07  4__canonb$c_coremap$d_swapmap$e_rootdir$f_execnt$f_lbolt$f_time$f_tout$f_callout$f_mount$ g_mpid$(g_runin$*g_runout$,g_curpri$.g_maxmem$0g_lks$2g_updlock$4g_rablock$6g_proc$8g_text$k_inode$m_icode#6__mfree"/_printf"&_min"6_panic",_cinit"&O_binit"I_iinit"~ _iget"r_newproc"Z_expand"_estabur" _sched"_sureg": _nseg"h _nblkdev$y_nchrdev$y_buf$y_bfreeli${_bread"E_getblk"H_bcopy, stop, call, end, or pause syntax error assign syntax error if syntax error I/O syntax error do or I/O iteration error do end missing illegal statement in block data multiply defined labels undefined label dimension mismatch expression syntax error end of statement in hollerith constant array too large B table overflow unrecognized statement  ww | U7  rI W 5 @5RtEWt@PU@`-z -U   UU TRB  TV5#  PRww  J R(5Z5P   7*%̟5@PU7 77 rIT 0 ww N [f̟Y LeND 7dww ثN [ f̟Y Le7 |dww DB j  쟃  "!_brelse"~G_alloc" _getfs"b_sleep"_badbloc" _wakeup"l_clrbuf"I_prdev"N_free" _bwrite"F_ialloc" _iput"_ifree"*_update"_iupdat"_prele"z4_bflush"8L_itrunc"_maknode"_wdir"_writei"_panicst${_putchar"_printn"_deverro"r_readi"_bmap"P_breada"8F_iomove"P_bawrite"hG_bdwrite"2G_max"_cpass" _passc"n _file${_issig" &_setrun"_setpri"_malloc"^/_xswap"6!_swap"K_xccdec"r#_xs v y |  ww &D D  wfw VD Etec@ "U rIL4  \  P  rWtPt r4` N7H3-, 3-,3   ww  t&& Jew^w N775@" & r%5p   5 ~ q k U7a7` rI Nww ҩN ] f  \ Leww N ]  f  \ free"!_xalloc"2"_sysent#<_link">_unlink"C_exec"4_chdir"0D_gtime"B_mknod">_chmod"D_chown"D_sbreak":_stat"?_seek"T=_getpid"fC_smount"@_sumount"A_setuid"B_getuid"T60.% \  w -?c*w 0.Aj*w $.Dw)U0IH|OOOS_Sw #hU _sync"xC_kill"6E_getswit"B_dup"@_pipe"2_times"E_profil"E_setgid",C_getgid"NC_ssig"D_timeout"p,_getf",_closef"-_closei"T-_openi"-_owner"._uchar"~2_suser"._ufalloc"._falloc"/_readp"3_plock"R4_writep"3_rdwr";_open1"<_stat1"?_getmdev"TB_buffers$B~_swbuf$`_httab$x_iowait"I_incore"G_geterro" N_notavai"BI_iodone"rI_mapfree"fK_devstlogical*1logicalinteger*1integer*2integerdoublecomplexdoubleprecisioncomplexreal*8realw  w  w w w l $ (w 58Ifw   K W/ w w n >w RTU I>IU@'>'>'>'>'>'N'>'>'>'))*"*B*`***core%7":`;p;<0=9><>C40DB>DD:?T=fC@ABCB(%?%%rN*N%C>xC6EB%%@2EEar"VJ_rhstart"J_maplock$_mapallo"J_physio"L_partab#2c_maptab#b_cfree$_sgtty"N_wflusht"N_flushtt"fO_canon"O_ttyinpu"P_ttyoutp"NQ_ttstart"S_ttrstrt"R_ttread"lS_ttwrite"S_ttystty"T_kl11$_tcper$ğ_tcstart"|W_rtmbuf$̟_t_openf$_t_blkno$_t_nxrec$_tcomman"HY_tmstart"Y_tmphys"[_hp_size#c_hpbuf$ _hp_open$$_hpstart"\_hpphys"]Q X2w f e&w  w P I w @I@IBIw $`3 >IBIePxw "main: w r"%n.:%,CNCD%%%%%%%%%%%%%%% `--- `-..no file out of swap=====unlink -- igetblkdevdevtab|#`{}@~ABCDEFGHIJKLMNOPQRSTUVWXYZRRR"RfRRR({)}!|^~'`XX@X%,Qfd,trap"start"dump/usr/sourcerp1 %n_  ~IL>IF `f eC 9 &w : \&\w Aw Aw l \0> w b9Aw   cw N w Hcw tb9 AD B(@A w  c%d: w  %o Fw 4f b9 S$   `# ׭--.w h h-EWW 7t8XTTTw\7wHw ,\7&w X \77w N \77Fw \7 E  X* Temp file? f.tmp1f.tmp2-n+w 2w Bf,IFw 6d,IF5Itanhsqrtsnglsinsignrealmodmin1min0max1max0isignintifixidintidimiabsfloatexpdsqrtdsindsigndrealdmoddmin1dmax1dlog10dlogdimagdimdexpdcsqrtdcsindcosdconjgdcmplxdclogdcexpdccosdcabsdbledatan2datandabscsqrtcsincosconjgUI*B `w @ d%d: %d.  w $ ..; w  %d.; Iw   w  f@qDaRqw  $ w z "w l %w ^Ŝ=IDq@f&55 .  w - - E ` s qDD`fD @ `   r D D  b D&`@ f f@Dfnw h1: w  w T; .%d w  $  w Hw  (w .(w " &Tw  (M w zI `w ; d%dw 6 V; V66  V%V `&e  V   V%ez%bww5Q$XV dV f   EU P5$   PZVfPPQ7 $5    5 C B A  -b%`DZ%XDT%>I -" +"*'" w 2 lval; c%d w w %w  stsp; ft+%d. e$ w $w  stst; ft+%d. e$& "$ w *w &w w ; >Iw 5EE w n  w ^ Ez)w B%c%d" ""   e07=2 82752 'f@$ w (W,w  W) STJ)" 7 W FwxST@E$x""""T#(w  w w 4ST w W. Bw V%<R3Wh4 $. *+ w ST < & Rw @7 3ҕ  Uw w w $ @$ w  WeWd W+W-w WeRRw &@$ ST@$   `5r$  5Z$  5H$  eEZV  "$ $5 $ $$ 5#  5#  XV5@#  wL   w>XV ZVr# (    5@b#  D# B    *# U4#wXV # wXV #w#w"w  7 " "a "U""W 8UfV W 8EZVfc     ` bVnV-p"z" a w  $w ^ agoto $w P cagoto W( <D@ )W,w Vfw  cgoto ы ɋw  #w 8w  .%d @ , )w  0 w #w &w >w : ɋ w H  3 0w w  stop; %d !w   w w r paus; %d  @w b %w P retrn ɋw H &-40I w 58I ew  slist1; d%d 2:w & w  slist3 iow \ w j slist2; 2bw l w n=w Vw Fw @ !,&fȕ) w .w fw "w  w ޕ,w  "w )w w  %s  (w ) bksprewienfl w .4(w Aw Dw w .w w "w 6w A j*  x%X7 / 7 F 0 p `e07/"" " j v ' ".7/ef J 7 ~/UW %I Xfh r e0c r e0ce0#7 1`>w h-=w L.bss :> w <ft: .=.+%d. !b9w ".data w base:  (7]58I&Pp  @j*w  ! "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ɋ ',$  ' N& & %' ''  _ 00  _  ' ' N& %  _ wn w \  5    :̥4˥1 . +  &&  %4 33   @w w &*̥& < %0-  @ %2.0 4w` w N @ wL @w 4 B" ʥ ʋ @@ & 6  `w  N%M , T   & &    :e  !2   <  & & %~ @! 6!& >%       %   7 y % d  JJ   &   :% ( !    :%  (  7N   2.e %0 %6!- e 2e%6!   e%6!@t  & 6  w  % @+ e &% @- e % @&  7(@! b   7'%@&  7V+N+@" b   7&+ 7%7%7% X t  z `  %  % `  l %%  * _|" b <%(" b 4%;" b (%Q" b %b" b %w" b %" b $" b $" b $    ԋw w D  00w w D̥ w w D Epa-l % /$ ^% e<67a2wZ w H  Wp1& % 77*w6 w $ AWpDe&C  Ԓ˥( r5 ӥ,$w w D <AmWp1&N&  ̋)̥(r5ԥ*CWp@$&Wp1&7: @e w` w N @ '7wD w 2 B '̥,̋'  * %6! !  ew   2e%6!ww D   & x 4 ww J!L %%  w7,7&7 w PB -   V         & e ` :e T ww 2  @%ae et& %N! >% <  @7@! &  %6! >% wRfwwj wF fwwp w& " b $" b $" b $# b $# b $4# b $D# b $X# b $etEp# b  ww v&  5 x  ^L!$ 44 ,w84 $ ^L## 4 ^4 # 4 4 34 %%0 w $%:  Pw% Ԑ 0w zD %9 Wp C`e%0 wZw D&j 7. y z# b Y #ԥ,w w DNWpfe&  w @e!w D̥r0 4 eww &0   wvw dD̋ wbӋ̥-(̥*-(+̋ԥr̥0̥4Wp1&#w  _(N'  5_.N'  %%  ='+R +ӕ,'7V re077  r/@e07$7! ++  A1 w0w  _f@w fwfwbv wf@)wfw:@e72| wfw7 f&f w fww wbf@ww w@f@ww w fAW @w f`!1`!7~ 5 eRwj 5& w&L&H&D&@&<&8&4&0&,&(&$& &&&&& &&&%d4   #e 3## b %d# b ̥̥###& # b%  # b # bwnw \ B$ % ԋ ̥,5 ̥*  Ԥ(, N#  2 !ww  5D ̋ w ԋ%D ԋ ^D%D @w  t @`@`E r9C e(%(( #ewXw F *$˥ ˥ Ҕˋ ˥ ˥  @e5+̥&˥  5p3 @0tD  @F@p@&w*"#̥̥̥    00 w2w  = @˥8 H$  ) t t5& %     w˥ w AWpDe&̥$  Wpe&@'wh <'&  w : DCԥ$ӥ$ w, ˥7 tf& f BRf D& w }f@wTwP wf@fA w,*w"$e"w"ew"@lw"Alew &@t`e w wwww@& HADCBF70F @X/bin/sh-/etc/rc/etc/init/etc/ttys/etc/utmp/usr/adm/wtmp/dev/tty8//dev/ttyxetc/getty %0 %e$t$ @`$@`E r9 e(u3*Ң!ӋӋed$ˋ˥0ӥ9 $Z  wӥbe%((DL$$ w d* %+ ̥  r 1*4  9̥̥̥ .4  r C*, ˥,   @   ^̥  @ˋ˥   ww z7 R  _̥̥̥ "  @˥      ̥e`˥0 ̥7 te`̥0̥+ ˥+ ԢӋC@ ˂ x $       삱 釮 憫 ヨw pDC˥$   ''ҔwRw @uu@ H w*@ ȋw D  7w'w D̥* ̥(̥- ( 5 ԋ +̥)ww ~wDe   % w|7 ~7 ~ׯt- l j(w^7 ` .wTeL$B J ӕ- R rwL(ʥ#˥  04   ̥(̥%K#0 p R  40  ˥ 00     _ww  5 D w h 4  ̥˥&   @w C˥ % ^> 84 4  03wBw 0D̥C?<˥ f e0 @ > ҋ D~8t$x$ ӕ0 $f v Le0 9e  7we&  mj h ~    ~ w7 < 2 .0   Wp `e0eӕ?f ,P   @f   ,7$  |$ ,-f ((  7  7 7 fw w $w<f@)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ɋ˥˥6$  32   ʥʥ w! ʥ,@ D h 52  005s5r h N @    w \̥%  ʥ &   wvw dDC h    ̥w(fw w $w ft p wmj $w^ wmX fwH $ww: f@w* w& $wff@fA w, w" e"w" ew" @lw" Alew &@t`e @& HADCBF7jF !!!!!!"!&!*!.!3! 8! (_Z Hq%}_-_ ) H8+_ q_@ 2 _%$b 6%  _ Z_%#_ &_:   % _ y % _Nb r e`A! yb 6_b@5 % _ _N_ w 8,B 5h w0,  Nfe %  5h  Nfe %   Nff % N $"=w  <y %@ 5h=%%  e@_5 f 0f 6 f& |%w0w D &mf& %6f 6N:f 6 ww N@f 6 ww @  xhdEf 6 PfNaf 6 ww  ` lddf^mf 6 Nff f fff 6e  H8 $7HdwRw @ D -rf 6%w*w *}`De@e!wf { 9E%f  9E r erdA! yR +D 5h w+%(Nf&e b %  $"=%$%(Nf&e b %  $"=% r e:aA! y" f %Pe( ^ xa  U "4 % %, p _%p, NBv& %e =_  _%y-re@@ Bv&  & %w )D@t%Bv% %!% Nf& % w)  f 6, !;f 6ff !f 6 f !{ 9f 6%{ 9fff 6{ 9e%f%_g{ 9 g 6 'g !{ 9=g !{ 9Fg !{ 9Ng{ 9{ 97R\} { 9A1e{ 9=f} _V{ 97\@e!Wg  97 ] Bv&  & %}]_{ 9% { 9 & & & &  &  .eA~09 & 6  9w |9#a  9{@& 8 a  9@& 8 7* @a   9}|  |a 6z 8{@& 8 a  9a 6  7 |  9w8w 8C E%}$z@ 5h55N&  55W 5h@ 5h3Nf %w83@ 5h 5h@3Nf %s@5N5he > e > Nf&  & % w \)D% %!% =e >e >w")%$%(%( w (Dw( &&&& .e w ( D%$:ON&  % w(j555Nffe %w b(D Hl  f %  $z& %    }& % w (w (u-@w (@w 'D  &# .  %%#%: 5h e !e_ & & &  .e { 91{ 91 { 9{ 9&  .e_{ 9{ 9&&  .e 4_ & & & .e{ 9{ 9&g .e{ 9 _ !og_* !ug_R {  & |_.{ 9 7>_ 5h @e!g  9&& {  & .e _d & { t &w w D Ԑ { P9 %@ww { 9 Ng f  5 e}-@=E@-5ʥ@%$/N&& `% $@ 5h E@-@%$  &f `% eʋ_ w 6B5  @@ 5% C w6 r e2`A! y"   & e%#3% % Za  H8Nm %  &a 6%NBv %%y -}% 5hNfe %CBv %#w'w 'C_  xb.e 6 Z_80e 6 _8%e  Z+ H8    xb L4e LG :e>e=$ H8%*& d#% + Te 6% %& -\e* H8 _de wp&w ^&{e w`&w N&D  ee e 6 w*&w &DN&  % % %w%w %D9 5 2 x c ( 6 { 9g 6 { 9%g 6ww vB _2%_B$%     h5_B$5 t%_2%%2 5@" ,(r%/_B$7& && .e2 $"2 $"25L 5& 5% @-%% r_ %% % %$%   .  &  5  &  5%5  r eg 5 _ZNfe b % _Z%y_Z%_Z@_%yQ& & & .e $"3 5 5 % y Ne 8 ` % Ne 8 ` Cc % bNm <% wx%Bv_%m_ Q%_%:3%L\_[_ "_C%Bv%_2N <%S%m Q%nN iI i5bENm <% f5%$z%}%   b 6 w%$z"% % %%%% wr% ƃ% t-w :%BC%%  %  %w%55EU%%% %P%!w $DL-  e 6 e Ne  wz$w h$C%$%( %%#wJ$ w 4$D 5h#%gfw$ w #DN f @,c7zM y Uw#w #%  xHcA! y4U & &&_" . _\% _.%_\% _2%(@% &ex_"@A p_"%%K  ee%( /:% /%.%L%%  & %_"%'%#e& ,%wv .@m2_B$ .5_H$u-Nf  w &C   $"3w%g $"3h7pB y & &  .e&& & - .e 3- &fb 6e |w%yf*b 6%_Nb  _2w ^3Bu@ 5h5%5 %6%"_%y_NY5& Y eNf` % dY | N Nf` %@Y AWp 8 e 6 IIffVc 6e I,b, e 6 eNe 6 %M:I 4I0I *INffIIffc 6e H e 6 e Ne 6 Ce 6 e Ne 6  f 6w""@t5M5 @ @a0 Z u-N&& 9% @a Ze 5 5 @ /3 t & &  .e3 $"%$%_'_'&( .e 3 3 34 4 _%%#% 4 _%% %%%2- %  %(;%84%2l %# `t  5h_ %?2h7@ y%3  #_,&%:4 : 4_&@ 47Ye  %5%(%F %% -Xym%y% %! WNBv %5WNf %5_@55  5h@5 5E H8@ r e`A! y. f _%+%I_ _D5 '+ N&  @5%' 5 kf %5D%b H8 f f H8_%@%b H8 Dm@e@ap-Z@ @a5Z u-AupA- uAupu @ @-G GGG GNm ffGfc 6e G5 GNme 6 u-5 *~G zGe 6 N&& 9%@-N&& 9%e 6 e ㆵ u-"G Ge 6 5 u-_~Ne 6 N&& 9%@-f 6 e 놵 w . CB 05 '4- f  w 4- 54t5 te ׂ  w C  Y_&   &  3_%w n`5 5 B f5Nef .-% C Cae !u%% ef ,% %(%0_)  .   w%(%%# A1l %( Ne *Ce . P &  5%*  5 _*@ @ae54N @-/ .@m2%*%/@ @a% %*%5 ! U5$z5y5%m5%+ %,%I%J w5 2 %$z%$%}%$z}5u 5h%uuNf& %5%m-v_55u- Nf F &ubXu_u-_5>   75)5TN f  AAE@ 5TN   AE@ u@ 5_Nf &b 6e_u- f %% 1w w xB #  %*.%+-%HLK  $"w,w DC B_xTd7I y & tE5& jE e& eN _x& & e& & e& e_x D5& D e&  & &Bv %% @ 5h'%!% ) $"= m %$f 6 <  @_(N f  54%(%* / %( .5 )@A pr u-_~)%*   . &  2_(w @ @me,55 De,_+%*_+%f5 Ce,M I%*E%@Ap,p( $" N v, AA 2r %AA 2r  eC- u-u5ueD- FA1@ @m5DC(@p@0@pAf r2p $"5 _^+ N&_f+w6 w $ D eD-w w  D@( = xBh=a;ADp}5@ =@0=Q-=x@' ~h %+A r=A r &@t@t=Ah w~ w l BCJ- `f .-%f .-%_~. $"J- f H%*%.B%> 9%(5%/%*eAfVp^ H `&e     GeGbww5Q$  f   EU P5,G   PfPPQ7 F5    5 C B A  `5F  5F  5F  eE  "$ $5TF $$ 5.F  5F  5@E  wL   w> selectnameshort constantstringfloatdouble*r++*--r++pre--pre++post--post!un&*-~.+-*/%>><<&|^->int->doubledouble->int&&||&~double->longlong->doubleinteger->longlong->integer==!=<=<>=>p>=p=+=-=*=/=%=>>=<<=&=|=^=& for tests*/%=& ~=*=/=%?<<=<<callcallcallgotojump condbranch condset nregsload valueforce registerP`/d/<h/l/jh/l/=h/l/>h/l/?h/l/@h/l/Ah/l/Bh/l/Ch/l/Dh/l/Eh/l/(p/x/Fp/x/)t/|/Gt/|/p/x/t/|/ p/x/!t/|/AADtp0(%( 5 @ `, 5!@ `5,@ `,BD " `,w* w  O5BeCe~%zh  97N@w w %w w D%% %w %: w Dbh7L9 y e( $"wt e& # .e4movclrcmptstaddsubincdecmuldivasrashaslbicbic $1,bitbit $1,bisbis $1,xornegcom*$ashclmulldivlremalmulaldivalreE (    5@E  E B    rE U|Ew ^E w JEwNEwFEw  7 (E $Ea EUEEW 8U W 8Efc     ` -DD a h h    a  ! p R B PDW !W e UETR50D  5D  UDwp      7 Cr@r@  *//H//+//I//,//J//-//K//.//L/////7//U//Q//0//N//1//O//%//&//b//c//[//\//R//S//T//V//W//X//<//=//>//?00@00A//B 00C00D00E0 0//////0000 // // 0#0 #00 //jL011 0!0%0&0b80c80P0( 1) 1*1+1,1-1. 17 10 111F1G1HX2I2J2K2LX2N1U1O2f*03*34>38F39N3:b3;j3[ 3R~3S~3T~3V3W3X3jmp GBjmp(I) jsrc,MA GBmjeqjnejlejgtjltjgejlosjhijlojhis/nopjbr?Rn?Xn?dn?nn??|n?n?n?n?n?n?n?n?n?n?nn?oTo*oT?Po?fooToo??p??p??p?&p?&p?2p>pNphpzpT?pT?p?p?p?p?p?p?p?p?Tp?Tp?p?p? q? q??q??q?*q?6q?Hq??\q?p??xq?q?p?p?Tp?Tp?p?p??q??q?q?Tq?q??q?p?Tp?e  JW!ʃW!ڃ 5C7 Ce  , |CCrC f    $ $$$& N & N  N N S C B A  eW!Շ w^ mBB B rf5Be        W!P    0&d& dN & dN dC N eN e-`BjBVBNB<=@A>?DEBC=EDCB'>`F`L`R`Z```  :hhjsrc,#(I) GAjsrc,(I) clr clrf movC,I movof,I GBmovC(I),I GBmovof(I),I mov+,I+ mov,I GBmov+2(I),I+ mov(I),I movC',I M'C mov',I M,A GJmovC(J),I M'C(J) GBmovC(I),-(sp) M'C(I) movCsp)+,I GJmov(J),I M,#(J) GBmov(I),-(sp) M,#(I) movsp)+,I GAM1,A+ V GJmov+2(J),I+ mov(J),I M1,#+2(J) V(J) GBmov+2(I),-(sp) mov(I),-(sp) add1,#+2(I) V(I) movsp)+,I movsp)+,I+ GAMP GAM M+ V KAmovC,A KAmovfo,A GBKAmovf,#(I) GBmovC,#(I) movC(I),I GBKAmovfp??qqqqr?*rT:rTr?nr?nr?rT?r?r?r? s?0sqq?rTr?nr?nr?r? s?0s`s?sT?s?sqTr?nr?r? s?0s t?*tT?Pt?~t?*r?t?tu u?p?Tp?p? q??q?8u?Bu??Ru??^u??ju?u?u??u??u?u?u??v??v??,vtvtvzvzvvvvv?vvvTvTvvTvTvTNNNN```##< * * * * < 6 6 6 6 6 ````` Z | Z X 4  B Z z   Z t l ppppppDaLaTa\afabbppppppppArg countMissing temp fileCan't create %s.globl fltused Missing temp file.globl .data Illegal initializationmov%c r%d,r0 mov r%d,-(sp) mov%c r%d,%c(sp) tst%c r%d No code table for op: %sNo code table for op %dmov%c r%d,o,#(I) GBKImovC,#(I) movC,I KAGJmovf,#(J) KAGJmovfo,#(J) GDKAmovC,*(sp)+ GDKAmovfo,*(sp)+ GAGAM' GAMD,I GAKJMD(J),I GAKIMP,I KDGAMD(sp)+,I KCGAMPsp)+,I GAM,I+ V GAM,I M+,I+ V GAKIM+,I+ V M,I KCGAMsp)+,I Msp)+,I+ V GCKAxor,(sp) movsp)+,I GAasr GATsxt- div,I- GATsxt- KJdiv(J),I- GATsxt- KIdiv,I- KCGATsxt- divsp)+,I- M,A' mov,I movC',I MP,I movC,A KBM(I),A' mov,I KAM,A' mov,I KBGJM(I),#(J) mov(J),I movf',I KIMP,I movf,A KC?vvv?ww w.w?@w?PwT?fwwwww?wwT?w?x?0xv?vvTvvTvT?vv?wwww?wwT?w?0xVxVxXxvv?vzvTv^x?zxT?v?w?xwww?wwT?w?0xxxxx x x ?xy?y?>ytvtvzzvzv z?z?zvvvv?p?pTvTvv?Tp?Tr%d mov%c r%d,r%d mov%c r%d,r%d Register overflow: simplify expressionr%d*tst r%d adcsbcF 04 00000000FFFFFFFFF *+,HIJcmp r0,$%o jhi L%d asl r0 jmp *L%d(r0) .data L%d:mov $L%d,r1 mov r0,L%d L%d:cmp r0,(r1)+ jne L%d jmp *L%d-L%d(r1) .data L%d:mov r0,r1 clr r0 div $%o,r0 asl r1 add $L%d,r1 mov r0,*(r1)+ mov (r1)+,r1 L%d:cmp r0,-(r1) jne L%d jmp *L%d-L%d(r1) .data L%d: "56x`4movC',I MPsp)+,I movC,A KCmovof',I MPsp)+,I movfo,A KAGJM,#(J) mov(J),I KCGBMsp)+,#(I) mov(I),I GDKCmovC2(sp),I MPsp)+,I movC,*(sp)+ KCGBmovC(I),I MPsp)+,I movC,#(I) KCGBmovof(I),J MPsp)+,J movfo,#(I) movf,I movC',I sxt- divP,I- movC-,A KCmovC',I sxt- divsp)+,I- movC-,A KCGJmovC(J),I sxt- divsp)+,I- movC-,#(J) GDKCmovC2(sp),I sxt- divsp)+,I- movC-,*(sp)+ movC',I sxt- div,I- movC,A KCmovC',I sxt- divsp)+,I- movC,A KCGJmovC(J),I sxt- divsp)+,I-p?p?pvv?w??q??qvv?p?p??q?? z?? z?Bz?Bz?Nz?Zz?lz?z?z?z??z??z??zw ~wJDeJ  J % H8w7 J7 JׯJ- J J(wJ7 J .wJezB J ӕ- R r f e0 @ >PJ ҋ D~8{ { .Jӕ0 $f v Le0 9eII II 7Iwe&  mI I H8~  dddddddddddd      !j  p$L%d(r%d)r%dCompiler error: pname(r%d)%c%c(r%d)pname called illegallyIllegal use of registerL%d_%.8s%sNo match' for op %djbr L%d sub $%o,r0 L%d L%d %o L%d:.. L%d L%d L%d L%d:.. %o L%d:L%d L%d .text Duplicate case (%d)ashc $0,r0 cfcc jbr L%d L%d:tst (sp)+ cmp (sp)+,(sp)+ add $%o,sp %d: movC,#(J) GDKCmovC2(sp),I sxt- divsp)+,I- mov,*(sp)+ KCmovb',I xor,(sp) movsp)+,I movb,A GDmovC(sp),-(sp) KAxor,(sp) movCsp)+,I movC,*(sp)+ asrC' movC,I GBasrC(I) movC(I),I movif,I GBmovif(I),I GAmovif,I GAmovfi,I GAsetl movfi,-(sp) movsp)+,I movsp)+,I+ seti setl movif,I seti GBsetl movif(I),I seti GCsetl movifsp)+,I seti GI!sxt mov+,I GBmov+2(I),I GAmov+,I KCGCjsrc,M add10,sp KCGCjsrc,M add6,sp 44 4!4P3F4G4Nb4Ub4K>5LL5\H8  H8~ w7 I I ~I0   jIWp `e0eӕ?fRI ,HIP >I 8I @f I 夁7B I {IH-HHf@w fw>Bw:B{wfw&B{JA 7 pHfAW,f B@ 8 @&61fA   @ @e7A1@ { 1w&f@@& HADCBF7GF6rwI6r@ A %c%oStack botchIntermediate file error.byte .text .data .bss .globl _%s jmp cret .comm _%s,%o .=.+%o .even jsr r5,csv tst -(sp) sub $%o,sp mov $L%d,r0 jsr pc,mcount .bss L%d:.=.+2 .text ~%s=L%d ~%s=%o ~%s=r%d Expression input botch _%s: _%s: ~~%s: Binary expression botch%o%c gggggg  \%$$$d%<$\%J%$$<$\%$#<$<$\%d%$$<$<$\%$$<$ "#$%&%p'&&&'''%&3''' (,"-,,,--,,,"-"-"-"-"--*+,HIJl5M'C GBM'C(I) ML,A KBML(I),A KAMC,A GBML,#(I) GBKJML(J),#(I) GBKIMC,#(I) KBGJML(I),#(J) KAGJMC,#(J) GDKBML(I),*(sp)+ GDKAMC,*(sp)+ clr clr+ mov,A+ sxt mov(I),A+ sxt KAmov,A+ sxt KAsetl movfi,A seti KAGJsetl movfi,#(J) seti M,A+ V M,A M+,A+ V KBM(I),A M+2(I),A+ V GBM,2+#(I) V(I) KAM,A M+,A+ V GBmov,#+2(I) sxt(I) KAGJM+,#+2(J) V(J) M,#(J) KCGBmovsp)+,#+2(I) sxt(I) KCGBMsp)+,#(I) Msp)+,#+2(I) V(I) M'C KBmovC',J M(I),J JJ7IPP7 IEDE!wEIED5!5! w |&{W!w;;w;x;  <{wW! B  w;; w;; w;;w;x;  L{HE7 IEHUHE@HU@H H E UUHHH ~H 4@BE? eƒCE e@E xl{5 ; 66  */*/*/8/8/8/\/Divide checkC error: constExp. ov. pass 2<<88888888867>6">6#>6$>6%>6(>6)>6*>6+>6->6.>6Q60>6<5=5>5?5@5A5B5C5D5E5H>6I>6O>6movof,I GBmovof(I),I GEHAjL6(l6)l67l60l6:686clrC(sp) mov,-(sp) GBmov(I),-(sp) mov+,-(sp) mov,-(sp) GCM'sp) GCM,(sp) GCKBM(I),(sp) GCKAM,(sp) GCsxt(sp) GAsetl movfi,-(sp) seti 7db7o\7x7f7e:7cH7s7l7r:::;;;;;;::;l>t>;$=F=@=6=;;??|><>H==.@Z>==F>==;;;<<$<4%% 5 h`` 6 T3L01 ^$ 3<e1  55   A A3Amp1 7p1% % %  115%# 1 V5%  %"%'* e1p  5@-_ % ,A 5re0= A 5ruA r 5 = ww  5  @ ȋ@ww  2%- " %N-  AWp e6u@ N.  @  f Z @9 Gfe@&@p&f e  x-@N-.  @@@ @ A@ ww @& L ww vB. Nf f fff e  L n wHw 6 @J.7 y 5  f # 5  FNp1 D@ up1% _ $01 b1#_~ < 1  71( &e1r  mF#& <%7 m,#, F  n 7 "7 _  1 " _~ w $h \5% % 7L5 %;% %  fNme 5% @@m0rfe  7 Ne, F  n   1 0 b1ww p     @m`@` @` wD  @m w  V5%  Nf Z @wf # 5f ~#Nf.  w  <%|. " %@wAWp e6u@ N.  @ f Z A@ HA1`@A@,@ & f B$%@ @@p&f f$% @N.  @@0 w ,AWp e6u@Ap@A p N (%%xNef # %( = % $ !Ned !5&t( & 6 v  $w $  7(  && l( p:1  w$w $N & F/ LF/ & N B Ne  8&wr$w `$& F/ LF/ &  h7' B Zw8$w &$  % D7'% 1:1 2' & F/ LF/ & ' B w#w #N B N  %w#w # 5% % % 7)%( & F=@w# 55 5AAm '%'%" fNm t  @-%%{%} N% % 7J+7H y ww4 7(%4j4  |(4  5 %+ @ %+ N%@ +  5% % % 7z%a%z%A%Z w 5 '% 2% /%{,%})%;&%(#%) %'%" fNm  @-fNm  5% w @@m@ww v   %0%9@ 5wRw @wJw 8%0 %9%z %a%A%.@ p.@Aedp@=@p @A e6p@=@%  @t5pww  5 N % N $wtw b ]%YAWp e6u@  @   x.& f B$%@ff f$%@Ap@0 @ . @%@ . 2"@ 0 .N h#w@ &f B$w ~N !ww nN 2"wpw ^D m " a2  ew.eE. !݃ ' F @@m%( %) w " $$w"w ".' N F/f n F/  w"w " % u@ 5 55fNm 5 %;%{% %} %QN0' F % +% %+%-%*%(%/%,%&%|%=;%;w'@@m0 Nh' F @w!% % u%'%" fNm  @-%( _%)_ _NL' %Zw  w  ,5% % 77 :#% % % #p4 # 5w"04 34  5 0 35 %c, F n " |!A 1 35  @  3@mAH4 \5% % 7L5  @p4 *5% @04N |!A 135  @ 3@mAH4ww 47 xt7 r7 p@e5d5 T RH, ee2e  ) e(5@5eE5@t%%5 #%Je 2"w De.!c bb! c33ww zf f$%. f$%. f$% wJ7z p   ӕ- ӕ0B~N ӕ.  ӕ0~ B~7, "   ӕ-ӕ. B~ӕe ӕ- ӕ+ r e0e0Sf@w fwr wn .wf@wV .wf fw@ w< /wFf@w$ w /F _w !  F/ L 7$  "" ~$ p:1+ |!5" "1N1=w * %'%" @F/ @-@F/5 %;@0E/F/  F/  u %'%" @F/ @-@F/5 %;@0E/NeF/  # ' NeF/ ' h#e B Z#  5 @ApF/F/ @G/@0F/N |!5 !! 5N1N N  '  _ x,     7-   7@-ew^Z   |N.-  @ :* 5@ :* 77 N ` @ * * el*5 e}/@7_ w   x, 9- -@ ) e(5%'e@t%  @fF- %@e@-͆@E7X_ NLq-  >6_w FF@e7 @e5L% .w w$f wm /w wm fw /ww f@w w /w f@w w /wf@fA w,~ w"x e"w"n ew"d @lw"\ AlewO &@t`e @& HADCBF7Ff@  x 7"2/@7 7$$ttyЋ7@ f5w * f5w }7 W&f>7 7 x@N  N B Ne  u@ ȋNNf ! ww ' N F/f n 7 D"  76" R N $":1" F/  wjw X  N  N  wFw 4 ' F :1 B ww  ' F :1 B ww  @ 5 % % % w w ## &b1' eNf %'  'wzw h ## &b1' e 5%;%}%   %d'w(w  e   % uew~ e_ f@& %_ %ue-F l : r0, 0 5 h5.   T55 5 5  r e-A! y"N @J Z@YN 4?N :u6@E? -@e5=5e@ffe& e 5 @e5 f@& % ?$@e5N 255 @5@@5rff %@ f@& %@ ff % l@A&@f77& @L> Be0# @>7є f7    BA   W f7e B@e0>7m ` >7eȐ9 ȕ0 >7ȕ1  `0>7>7VVY if(.not.) if(.not.) if(.not.)missing left parenmissing right parenthesis at %.20s statement too long at %.20smissing left paren at %.20smissing right paren at %.20s if(.not.()) illegal BREAKillegal NEXTerror at line %d, file %d: syntax error, line %d, file %d -0v1v1.(  77wu @@-NN h , u- @ 5@5@ r e'A! y@ %= 2(<(A( N 7( N %=%>F(%=K(= , %=P(U(%& [(%| a(  Nw %G 0pv1 ww @  , ww ~0v1v1f(  7 hb v1 X -NH&v1 >wTw B , %( ,  r%w"w  %@ @e7 5_6%f& %w w  0J Fw 5  @A tE5 @e0?  w ` @t5E @E5% e7@e0? w& w  5 %9AWp Ameu5 z%0 p@w w \ Xw w @e5 @ -, (A r }eA r 5 @e@-= e 0@? @e@-w: w (  %- " ' ((>&  &  %s .ge..gt..le..ne..lt..eq..ne..not..and..or.%s continue goto b+e+h+k+n+s+x+|+++++++++++++++> x J J J " 0 N \ j x 0@             0             0 0 0 0 00000000 0000 0  !            0000 ;< =>? @ABCDEFA r 5 A r Ne0 , ww  N j(  ww t( N  ww @ l x($ a$ .\$ U$ PN$ G$ @t$ 9f$& @ 0T$ :)F$ !2$ + $ $ B $  w# # # #w t 7#7%@-6r ew%w% 7%7f7`7Z7% %!r %@ 5%f%F5 5 5 - 555 5 B5 @5 5 B5  B5 um555 B5 u-5uWA5 B5@5 % "0 . @@50 u-5 )55e0= @ @-. 5uu5 B5 u- A >E @ 5- dA r 5u-GJKLMPQnopq   ! "+++++++,,,,,!,&,,,2,7,?,H,O,U,],c,h,k,r,x,|,,,         ;{}$*doDOifIFelseELSEforFORrepeatREPEATuntilUNTILwhileWHILEbreakBREAKnextNEXTdefineDEFINEincludeINCLUDE errorLCURLRCURLLPARRPARSCOLDIGITSXIFXELSEXFORXWHILEXBREAKNEXTOLDDONEWDOXGOKXDEFINEXINCLUDEREPEATUNTIL$acceptstatlstatififelsewhileforrepeatnewdolabelcan't open %sunbalanced quotecan't open %scan't open %stoo many defined namesDbstate %d, value %d, char %d character %d read reduce %d syntax errorerror recovery pops state %d, uncovers %d error recovery discards char %d ----!"%(!&!N  N N ftoa <cget__%_w ('D V333 3 3 ̥  Ve e5R w&w &#( $@ 5H5MM * MM%[ *3 3 3M_%#  *%d 5 5 @ r eCA! y% D u& ff *e _E%4D &  &d%#L_E%ID & J &$& & &f (% R "%%E% % ) ) R )_7%AA%7A % ) %7A& % B& (% RvA )pA )fAdA_\A +TA_JA +BA_:A8A.%0A (%$%(A %%5 % ) RA )@ *%_%D_f t& (%@ )@_  %_ @ BFUF _Z%\@$@|@er@l$ h$ )_Zb@X$\@ R$ 5f  N& & n *e ( @^ @c cgetc: %d illegal file numbercgetc: %d not open to readcgetc: error on %dERROR arw.(<copen: bad file %scputc cputc: %d not opencputc: writing %db! : argument count wrong That's all, folks j7 %ew/dev>  *e_%$  ^(1% & 0 &f]D 5 5  5   5_ %3_ _ KeK   $ KK%% %lD KeKu@E%N .(5f %#  &  *e?JKeDK( @E%$ %_K K& f _x %4  f % _&_2 5 %%D  5%52 kF  6%J#7???#? ##? # z2_F + %:7 ?CˋF˕  # #7#  ( %F  T ww  |%C<#  ( ^% P%? ) <%'# > &g *e ( %" R> ) w 7"%>"> " 45" %";" Rn"h"b> )N (wR"w^"w t n%   \%w^F                 " %      5 N &&  teI5@tE5E @555%P %% 55 u5 !%%D-5%> %%c%5 %5 %)5 D-%  3 ) )5%% D  Nff e ff e55 f %  &ff *e ?HeH % HH )&  e?HeHw\!w J!@ T w := X7=!5 ! )=7 = R= )N ) ===!=F r,e &F r,%e-~=F r,t= )wn=b=ww `= r $XA0 NA7FA#3˕ E% *` AL@˥E%E  `3EU3˥E `eF  ˥eF  x   e%Xx 8NEiF r,%V / xG ->DG >  Nfe ! 5w> ^G >w w   %  iG =@w rL> `%$>ʋʕ w B/ L. @CҢ Ӌ7]w/e w . = ==%7 ], YY7 Y Y  v-I r ez@A! y.] ] d=7 x] fY w.(& %2)> e&&  % P 6%(%1 4(% %)%/%*B  \e%P<7<& & % .>?=& & % -@A=" * % +_ '7 HX%* r'%/7 4X_l .XB _D 4. Nff f fff 4.e D 4.ww  Be VDe~@ww 0F@ 7`&F%_ FD  ,1ww D%%$D ww D% % w|@@% xD`?EeEBpC r r@ @Px @ t tw  L N%D  Lww  _%_7p,5  \LNefe %%@,N% 7 &L& f 8#eLM 0 `ʥ w > 7 >%  ' wʥzG E  `4=7 =B7 B r wvBwv= % E `eG  E 0 `w j%d8G  ,1w\w JCN ff 8#e5` &% %%%@ 'w w C5 %  7< 7%% %  5ff 4'%5 wmVA@ w %V H5 tAE@P@t55D]<ʋ%7X%0 -%_R;[ ;_R _ j_L [ ӕ.7 [% L +{I|I% L7W %_R%[~[_R[_R5/&_60|_B _lI_w h, r&@-@wd,7 ,W@w H,[K  [%LKC " F:Z :w,w +  Zfp C r,e$C r, K E&C r, -zF)C r,7 Zw+w +7 fZ`  %' %-C wn+w \+C a_7 a_ LehE r,%7 KE% 7+%% .(7+e    % %%kE 7 + xE  T  Rww t+NrE r,e r 8P@+FG :+ j76+%E  RGpE r,e7 +w@w .@@E  ` .(E%N * r55%  fVpC 7*% %upN EfeE r,e_ NeqE r,e `5%f&f ʥ% ʥ 2! % ʥ 2!2 ʐ% ;; ;; E%E%  P p `5 % O *5 5 7\% 5 L 5Nf& 4'%55` 5`  -@@- ?rwm? r- rE% ʥ ʥ G ʕ ʥ  *7`66 2_#ʥ  $ &j fpG r,e _#ʥ_#E%5 E%%?G  (A74; yEC 7VC ) r e@A! y  1 .+  %0%7 te` ) %7`  Y ~97 Y V) w*w *Zj9Q@e5@e5XQ X r e8AA! y0Yʋ  $%(ʕ  Xʕ  8 8 < X7X&XpZC r,eX& %&  *ejX 4bX&  &  *e ?PeP%XPiC  ,1 _ e :5% %7)w)& f&f e%% 5ru NNE r,% Ame 5rA f r upNE r,% @E% @E  `% @E%E AA @@5E r, w<w *CB 7(%'%#(   4-H  HN HE r,%7 Hw HHL%(G H 7 H 7 xE%1E r,%)E%%%%e7"H&E?>_#w 6 04G7*! y tU_'99 ` x.G 97 99 & &  "e9 9 %YtU= D %)7p 7j9E  fe `R9Vp^ -HB <49 ` \% #$  `tU 6 7w.  % 'w BDCG  = = t`7 = .(E%% ED-7 d= . %N mF=%7 <=e%%N m=%7 = G VeS QC  T _ D 77%7W7W_%7 7W7W7xWW_%" %/#$  %e |7d  W   HtE5% % ZWuu- u-1 5H+A78 y %@e@-}C  ,1ee}_@5 r eAA! y6 O Ow'%_N _ & & & *e?NeNdN & &  *e?NeN% ~e %% : w4& & h *e (7G5&Ew E ww  HE7, y !F _ & zG r' n'0F r,% 3F r,%  z%_7:' R >C6F&G _: x0E  )_ _ _ 5 %aF Z xE 0 & &f (% @ )* %;B & z&f (% ^ ) dB\B +f (% r%_ b%%&F_Z&_@wH w 6 H N T w0 w  7eH  w w  D5pH wtEE@Pw @EtAE@PUww Nffg *e (ww N (LH r,%wxw fD+&H7T yHe H&H r,e%  H r, w&&H r,e (&&H (&&H ( 5H (&H r,%w NoH r,%ww rNpH r,%wjw XB5wN .(2 *2w "B  .(E  `E%E%!%  ' xFH"ttE A `Cp@H  E ݃H ww N * Eww n h74%' N%;" 5̋    ̥̋ %w  w 7 0 % 0ww 0 % %  4 7 4% 4 70ww  H ww  ?,e,$ ,,&  & & f *e (w& $&DDDx~DDDDD>82 \FAPAXA`AfAlAvAntXtHX !d: : :  AAAA  ! !B p intcharfloatdoublestructlongautoexternstaticregistergotoreturnifwhileelseswitchcasebreakcontinuedodefaultforsizeofArg countCan't find %sCan't create tempBBSymbol table overflowWarning: assignment operator assumedNontermifA @e71@  1 @ fA7  fA & 9 &fA @e&7w|@fA  AEwww &w Uw w&w Nw DRw @ .%;%  @,e~,?z,et,P h,Apn N,J, (/ )ww fe 1%ww ` 3bCe@ TH7 y U d0  @& 0 @ & 0& w< 7 97 97 97 29w @ 9 97 9 .9 9$ e!& 7 297 2 9 t + - 7.w t 7 p2l2j97p. f9' V9D9 ~ `   nated commentUnknown characterString too longBNBB1N100Long character constantNonterminated stringBBNB1N1N1N1N0BExpression overflowexpression overflowExpression syntaxCCC-2@  j V @ j j Txr~06 @<$(Illegal conditionalCall of non-functionIllegal indirectionIllegal lvalueIllegal structure refUnimplemented structure operationIllegal conversionInteger operand required%d: Expression overflowLvalu   ! $ ' ( + . 1 4 7 : = ) , / 2 5 8 ; > * - 0 3 6 9 < ? @ C F I L O R U A D G J M 22.7 . 0 81wp8`w1 e0w ~w8De8  8 % V,w7 87 8ׯ8- 8 8(w87 8 .w~8e`JB J ӕ- R r f e0 @ >*8 ҋ D~8JJ 8ӕ0 $f v Le0 9e77 77 77we&  m7 7 V,~  V,  V,~ w7 f7 \7 X70   D7Wp `e0eӕ?f 5e requiredConstant required.@jN:Fr~DH D N ( BSToo many }'sExternal definition syntaxBBSCompound statement requiredBNBBSNBBSBNBNToo many initializersBBNB1N0B1N0B1N1N0B1N1N1N1N0Inconsistent external initializationUnexpected EOFBNBNMissing '}'Case not in switchSwitch table overflowDefault not in switchUnknown keywordRedefinitionStatement syntaxStatement syntaxBNNNN0Undefined structure: %.8sNot an argume:&( & 6  9w |9#A  9([@& 8 A  9@& 8 7` @A   9:]\  \A 6Z 8([@& 8 A  9A 6  7 H\  9w8w 8C E%0]$Z@ 5H55N&  55W 5H@ 5H3Nf %w83@ 5H 5H@3Nf %s@5Nf d54d  74 4 476 7 4fw`w\JwfwHAJQ  OfA  ^ y   F y @0fA  @9 fA @e&7w7@JwP7 5f@wwJw*f@@& HADCBF75F 6675dgPP7 5EDE!wE5ED5!5! w |JW!wP33w,32  Jnt: %.8sBN%.8s undefinedBSN\!\!\!\! ng; pg66  pg4tg `&e  pg   pg3e3bww5Q$g "g f  e<<888888888g g1 (    5@1  1 B    l1 Uv1wg X1 wg D1wH1w@1wT3^3~33333 &fB 6e *W%Yf*B 6%_NB  _,w ^3Bu@ 5H5%5 %6%"_%Y_N95& 9 zeNf@ % j9 v N Nf@ %F9 B9 @ZW%YN&  95& 9 ze VNf %5wU 85& 8 v N Nf %55 Nf &fB 6eN @w1%ZN  5 5%%: Nf %5  7 "1 1a 1U11W 8U$g W 8Egfc     `  g,g-00 a h h   g  ga  ! p "ggR Bg J0W !W e UETR5*0  50  U 0wp   g"g   7 /r@gr@$g  e  JW!:gW!Jg 5/7 /e  , v/z/l/ fg    g$g$ $$$._..lockcfa02132dfa02132cfa01081dfa01081dfa01067cfa01070dfa01070cfa01076dfa01076cfa01079dfa00296cfa00181dfa00181cfa00305dfa00305%(%F %% -YM%Y% %! 7NBV %57Nf %5_@55  5H@5 5E B8@ r e@A! y. ` _%+%I_ _D5 '+ N&  @5%' 5 Kf %5D%b B8 ` f B8_%@%b B8 DM@e5$g& N & N  N N S C B A  eW! gՇ w^ m.. . rf(g5.e        W!$ggP    0&gd& dN & dN dC N eN e-Z.d.P.H.\AAAB BBB B $B +B4B9B@BCBIBNBUBZB`BiBlBtBxB[@@@@@   t*"lN2@@@AT000F @"  -df w Rw 4  7  w ( #F "  r$"dfw :F w ,:  W  ѕ W N W V Pw L:w : w : UF w : ! F  $L`B~FdUw`!G w j@ w 4!G w P@w h@w 4w 4 @ /dev/lp/usr/lpd/lock/usr/lpdfA7  ! U5$Z5Y5%M5%+ %,%I%JV5 , %$Z%$%0]%$Z0]5u 5H%uuNf& %5%M-8V_55u- Nf F &uBXu_u-_5>   75)54N f | AAE@ 54N  | AE@ u@ 5_Nf &B 6e_u-  u+ -4B NB 6_8 (_T P%0]_-_ ) B8+_ P_@ , _%$B 6%  _ T_%#_ &_4   % _ Y % _NB r e@A! yB 6_B@5 % _ _N_ w 8,B 5H w0,  Nfe %  5H  Nfe %   Nff % N "=w +DY %@ 5H=%%  e@?5 ` 0F 6 f& v%w0w D &Mf& %6F 6N:F 6 ww N@F 6 ww @  xhDEF 6 PFNaF 6 ww  .@ l>D8D>mF 6 Nff f fff 6e  B8 $7CwRw @ D -rF 6%w*w *:]?De@e!wF ([ 9E%F  9E r erDA! yRF 6 @m5DC(@p@0@pAf r2p "5 _X+ N&_`+w6 w $ D eD-w w  D@( = xBH=a;ADp}5@ =@0=Q-=x@' ~H %+A r=A r &@t@t=AH w~ w l BCJ- `f (-%f (-%_x. "J- ` H%*%.B%> 9%(5%/%*eAfVp^  5H w+%(Nf&e \ %  "=%$%(Nf&e \ %  "=% r e:AA! y" ` %Pe( ^ xA  U 4 |% %, p _ %p, NBV& %e =_   _ %Y-Qe@@ BV&  & %w )D@t%BV% %!% Nf& % w)  5H, !;F 6FF*a !F 6 F*a !([ 9F 6%([ 9FFF 6([ 9e%F%_G([ 9 G 6 'G*a !([ 9=G*a !([ 9FG*a !([ 9NG([ 9([ 97<:] ([ 9A1e([ 9=f:] _P([ 97;@e!WG  97 = BV&  & %:]=_([ 9% ([ 9 & & & &  &  |.e eAADtp0(%( 5 @ `, 5!@ `5,@ `,BD " `,w* w  .5BeCe~%"aH  97.@w w %w w D%% %w %: w DbH7R y e( "wt e& # |.e4movclrcmptstaddsubincdecmuldivasrashaslbicbic $1,bitbit $1,bisbis $1,xornegcom*$ashclmulldivlremalmulaldivalremjeqe 8 e 8 Nf&  & % w \)D% %!% =e 8e 8w")%$%(%( w (Dw( &&&& |.e w ( D%$@/N&  % w(j555Nffe %w b(D K  ` %  $Z& %    0]& % w (w (u-@w (@w 'D  &# .  %%#%: 5H % !e_ & & &  |.e ([ 91([ 91 ([ 9([ 9&  |.e_([ 9([ 9&&  |.e 4_ & & & |.e([ 9([ 9&g |.e([ 9 _*a !oG_$*a !uG_L ([  & v_(([ 9 7_ 5H @e!G  9&& ([  & |.e _^ & ([ t &w w D Ԑ ([ J9 %@ww ([ 9 NG 6 jnejlejgtjltjgejlosjhijlojhis/nopjbr?RN?XN?dN?nN??|N?N?N?N?N?N?N?N?N?N?NN?OTO*OT?PO?fOOTOO??P??P??P?&P?&P?2P>PNPhPzPT?PT?P?P?P?P?P?P?P?P?TP?TP?P?P? Q? Q??Q??Q?*Q?6Q?HQ??\Q?P??xQ?Q?P?P?TP?TP?P?P??Q??Q?Q?TQ?Q??Q?P?TP?P?#w'w 'C_ xB.E 6 T_20E 6 _2%e  T+ B8    xB F4E FG :E>E=$ B8%*& d#% + TE 6% %& -\E* B8 _dE wp&w ^&{E w`&w N&D  Ee E 6 w*&w &DN&  % % %w%w %D9 5 2 x C ( "%([ 9G 6 ([ 9%G 6ww vB _,%_<$%     H5_<$5 n%_,%%2 5@" &(r%/_<$7& && |.e2 "2 "25L 5& 5% @-%% r? %% % %$%   .  &  5  &  5%5  r eGA! ?QQQQR?*RT:RTR?nR?nR?RT?R?R?R? S?0SQQ?RTR?nR?nR?R? S?0S`S?ST?S?SQTR?nR?R? S?0S T?*TT?PT?~T?*R?T?TU U?P?TP?P? Q??Q?8U?BU??RU??^U??jU?U?U??U??U?U?U??V??V??,VtVtVzVzVVVVV?VVVTVTVVTVTVT?V % %%%% wr% ƃ% t-w :%BC%%  %  %w%55EU%%% %P%!w $DL-  E 6 e NE  wz$w h$C%$%( %%#wJ$ w 4$D 5H#%Gfw$ w #DN ` @,C7- y Uw#w #%  xHCy4U & &&_" . _V% _(%_V% _,%(@% &ex_"@A p_"%%K  ee%( /:% /%.%L%%  & %_"%'%#e& ,%wv .@m2_<$ .5_B$u-Nf  w &C   "3w%g "3H7v" y & &  |.e&& & - |.e 3/3 VV?WW W.W?@W?PWT?fWWWWW?WWT?W?X?0XV?VVTVVTVT?VV?WWWW?WWT?W?0XVXVXXXVV?VzVTV^X?zXT?V?W?XWWW?WWT?W?0XXXXX X X ?XY?Y?>YtVtVZzVzV Z?Z?ZVVVV?P?PTVTVV?TP?TP?w#@ w #CB NE 6 _) ) f _t55>AWp 8 E 6 ))ffVC 6e ),b, E 6 eNE 6 %M@) :)6) 0)Nff ))ffC 6e ) E 6 e NE 6 CE 6 e NE 6  F 6w""@t5M5 @ @a0 Z u-N&& 9% @a Ze 5 5 @ @ap-t & &  |.e3 "%$%_'_'&( |.e 3 3 34 4 _%%#% 4 _%% %%%2- %  %(;%84%2l %# `t  5H? %?2H7  y%3  #_&&%:4 : 4_&@ 47X94ae   P?PVV?W??Q??QVV?P?P??Q?? Z?? Z?BZ?BZ?NZ?ZZ?lZ?Z?Z?Z??Z??Z??Zw ~w*De*  * % B8w7 |*7 |*ׯr*- j* h*(w\*7 ^* .wR*eZB J ӕ- R r f e0 @ >) ҋ D~8[ [ )ӕ0 $f v Le0 9e)) )) 7)we&  mh) f) B8~  B8 Z@ @a5Z u-AupA- uAupu @ @-' ''' 'Nm ff'fC 6e '5 'NmE 6 u-5 *' 'E 6 N&& 9%@-N&& 9%E 6 e ㆵ u-(' $'E 6 5 u-_xNE 6 N&& 9%@-F 6 e 놵 w . CB 05 '4- F  w 4- 54t5 te ׂ  w C `:9_&   &  3_%w n`5 5 B `5Nef (-% C Cae !u%% ef ,% %(%0_)  .   w%(%%# A1l %( Ne *Ce . P &  5%*  5 _|*@ @ae54N @-/ .@m2%*%/@ @a% %*%  B8~ w7 :) 0) ,)0   )Wp `e0eӕ?f) ,(P ( ( @f ( La7"( [La((-((f@w fwD"w@"[wfw,"[JA 7 (fAW,f B@ 8 @&61fA   @ @e7!1@ [ 1w&f@@& HADCBF7n'F6rwz)6r@ %% 1w w xB #  %*.%+-%HLK  "w,w DC B_rTD7) y & z%5& p% ze& zeN _r& & ze& & ze& ze_r $5& $ ze&  & &BV %% @ 5H'%!% ) "= M %$F 6 < < @_(N f  54%(%* / %( .5 )@A pr u-_x)%*   . &  2_(w @ @me,55 De,_+%*_+%f5 Ce,M I%*E%@Ap,p( " N p, AA 2r %AA 2r  eC- u-u5ueD- FA1@<=@A>?DEBC=EDCB'>@F@L@R@Z@`@  4bbHHHH@@@##6 $ $ $ $ 6 0 0 0 0 0 @@@@@ T v T R . < T t  T n f jjjjjjDALATA\AfA \ \jj jjj jjjArg countMissing temp fileCan't create %s.globl fltused Missing temp file.globl .data Illegal initializationmov%c r%d,r0 mov r%d,-(sp) mov%c r%d,%c(sp) tst%c r%d No code table for op: %sNo code table for op %dmov%c r%d,r%d mov%c r%d,r%d mov%c r%d,r%d Register overflow: simplify expressionr%d*tst r%d adcsbc@*.********@@@@@@@@@*+,HIJcmp r0,$%o jhi L%d asl r0 jmp *L%d(r0) .data L%d:mov $L%d,r1 mov r0,L%d L%d:cmp r0,(r1)+ jne L%d jmp *L%d-L%d(r1) .data L%d:mov r0,r1 clr r0 div $%o,r0 M,A' mov,I movC',I MP,I movC,A KBM(I),A' mov,I KAM,A' mov,I KBGJM(I),#(J) mov(J),I movf',I KIMP,I movf,A KCmovC',I MPsp)+,I movC,A KCmovof',I MPsp)+,I movfo,A KAGJM,#(J) mov(J),I KCGBMsp)+,#(I) mov(I),I GDKCmovC2(sp),I MPsp)+,I movC,*(sp)+ KCGBmovC(I),I MPsp)+,I movC,#(I) KCGBmovof(I),J MPsp)+,J movfo,#(I) movf,I movC',I sxt- divP,I- movC-,A KCmovC',I sxt- divsp)+,I- movC-,A KCGJmovC(J),I sxt- divsp)+,I- movC-,#(J) GDKCmovC2(sp),I sxt- d0 -%_L;[ ;_L _ j_K [ ӕ.7 [%K h+{I|I%K7LW %_L%[,[_L[_L5/&_60|_B _fI_w <, r&@-@w8,7 V@w ,ZJ  Z%KJC " F:Z :w+w +  Zfp C l,e$C l, J E&C l, -(F)C l,7 2Zw+w n+7 Z_  %' %-C wB+w 0+C`_7 `_(Aasl r1 add $L%d,r1 mov r0,*(r1)+ mov (r1)+,r1 L%d:cmp r0,-(r1) jne L%d jmp *L%d-L%d(r1) .data L%d: "56rZ.DDDDDDDDDDDD     6!!,6!8 !d6!8 6! 6! 6! d6!$!6!26!T6! 6!d 8 j$L%d(r%d)r%dCompiler error: pname(r%d)%c%c(r%d)pname called illegallyIllegal use of registerL%d_%.8s%sNo match' for op %djbr L%d sub $%o,r0 L%d L%d %o L%d:.. L%d L%d L%d L%ivsp)+,I- movC-,*(sp)+ movC',I sxt- div,I- movC,A KCmovC',I sxt- divsp)+,I- movC,A KCGJmovC(J),I sxt- divsp)+,I- movC,#(J) GDKCmovC2(sp),I sxt- divsp)+,I- mov,*(sp)+ KCmovb',I xor,(sp) movsp)+,I movb,A GDmovC(sp),-(sp) KAxor,(sp) movCsp)+,I movC,*(sp)+ asrC' movC,I GBasrC(I) movC(I),I movif,I GBmovif(I),I GAmovif,I GAmovfi,I GAsetl movfi,-(sp) movsp)+,I movsp)+,I+ seti setl movif,I seti GBsetl movif(I),I seti GCsetl movifsp)+,I seti GI!sxt mo7:; yEC 7UC ) r e@A! y  1 .+  %0%7 te` T) %7<`  JY 97 @Y *) wz*w d*Zp9Q@e5@e5:XtQ X r e8AA! y0Xʋ  $%(ʕ  Xʕ  8 8  < ~X7`X&TXpZC l,ez5?z5@z5Az5Bz5Cz5Dz5_%_w &D P333 3 3 ̥  Pe e5R w&w x&#( $@ 5H5zMvM $ ^MZM%[ *3 3 36M_%#  $%d 5 5 @ r eCA! y% D u& ff $e _E%4D &  &d%#~L_E%ID & J &$ $eJKKK KK%K3KAKDKGKJKLKOKQKTKXK[K_KbKeKhKkKnKrKvKyK|KKKKKKKKKKKKKKKKKKKKKK:,field selectnameshort constantstringfloatdouble*r++*--r++pre--pre++post--post!un&*-~.+-*/%>><<&|^->int->doubledouble->int&&||&~double->longlong->doubleinteger->longlong->integer==!=<=<>=>p>=p=+=-=*=/=%=>>=<<=&=|=^=& for tests*/%=& ~=*=/=%?<<=<<callcallcallgotojump condbranch condset nregsload valueforce rEz5H86I86O86movof,I GBmovof(I),I GEHAjF6(f6)f67f60f6:686clrC(sp) mov,-(sp) GBmov(I),-(sp) mov+,-(sp) mov,-(sp) GCM'sp) GCM,(sp) GCKBM(I),(sp) GCKAM,(sp) GCsxt(sp) GAsetl movfi,-(sp) seti 7d\7oV7x7f7e47cB7s7l7rLa_%$  X(1% & 0 &f]D 5 5  5   5_ %3_ _ KeK   $ ~KzK%% %lD XKeRKu@E%N ((5f %#  &  $e?JeJ( @E%$ %_JJ& f _r %4  f % _&_, 5 %%D  5%52 5 egisterPZ/^/<b/f/jb/f/=b/f/>b/f/?b/f/@b/f/Ab/f/Bb/f/Cb/f/Db/f/Eb/f/(j/r/Fj/r/)n/v/Gn/v/j/r/n/v/ j/r/!n/v/*z/z/Hz/z/+~/~/I~/~/,z/~/Jz/~/-//K//.//L/////7//U//Q//0//N//1//O//%//&//b//c//[//\//R//S//T//V//W//X//<//=//>//?/0@0/A//B0 0C00D00E 00///////00/ // // 00 00 //jF011 0!0%0&0b20c20P0(1)1*1+1,1-1.171011|1S V B E H K N Q T W X [ ^ a d g j m Y \ _ b e h k n Z ] ` c N &&  teI5@tE5E @555%P %% 55 u5 !%%D-5%> %%c%5 %5 %)5 D-%  3 ) )5%% D  Nff e ff e55 f %  &ff $e ?HeH % H~H )&  e?`HeZHw0!w !@ F1G1HR2I2J2K2LR2N1U1O2f$03$34838@39H3:\3;d3[3Rx3Sx3Tx3V3W3X3jmp GBjmp(I) jsrc,MA GBjsrc,#(I) GAjsrc,(I) clr clrf movC,I movof,I GBmovC(I),I GBmovof(I),I mov+,I+ mov,I GBmov+2(I),I+ mov(I),I movC',I M'C mov',I M,A GJmovC(J),I M'C(J) GBmovC(I),-(sp) M'C(I) movCsp)+,I GJmov(J),I M,#(J) GBmov(I),-(sp) M,#(I) movsp)+,I GAM1,A+ V GJmov+2(J),I+ mov(J),I M1,#+2(J) V(J) GBmov+2(I),-(sp) mov(I),-(sp) add1,#+2(I)@1  & 6  0w 0%B  0 @& / 7Xd @B   0`@& 0 b@& 0 B  0# _@`̋ rWtKe    Z B l, ^ B l, ` 0b 0 ^  0w/w / 5 K˥. 5`%KA rDueK Ҥe%6XKeʋ K%K7^wl/ J%JB  0 4 4 4 ]KeҔ%Kw / / xC% @w!N & &  $ef& f%+* $e 3N& f& $e4:;89w v DCB%#  xC f && %w>  |w  DE%& P &# $eww CE%%% wFeF&  & %# FFw x@% %D-D w`w N@  xC wFw " M.D  V(I) movsp)+,I movsp)+,I+ GAMP GAM M+ V KAmovC,A KAmovfo,A GBKAmovf,#(I) GBmovC,#(I) movC(I),I GBKAmovfo,#(I) GBKImovC,#(I) movC,I KAGJmovf,#(J) KAGJmovfo,#(J) GDKAmovC,*(sp)+ GDKAmovfo,*(sp)+ GAGAM' GAMD,I GAKJMD(J),I GAKIMP,I KDGAMD(sp)+,I KCGAMPsp)+,I GAM,I+ V GAM,I M+,I+ V GAKIM+,I+ V M,I KCGAMsp)+,I Msp)+,I+ V GCKAxor,(sp) movsp)+,I GAasr GATsxt- div,I- GATsxt- KJdiv(J),I- GATsxt- KIdiv,I- KCGATsxt- divsp)+,I- K. @CҢ Ӌ7]w.e w . = ==%7 v], dY^Y7 ZY VY  J-I r ez@A! y.6] 0] j=7 &] Y wf.(& %2)> e&&  % P 6%(%1 4(% %)%/%*B  \e%P<7<& & % .>?=& & % -@A=" * % +_ '7 W%* r'%/7 W_f WB _7W%. Nff f fff .e D .ww  Be PDe~@ww E@ 7`E%_ED  0ww D%%$D wrw `D% % wP@@% xD`?LEeFEBpC r r@ @Px @ t tw  zL N%D  `Lww  _%_7v,5   LNefe %%F,N% 7 K& f 2#eKMKehE l,%7 KE% 7+%% ((7+e    % %%kE 7 + xE  N  Lww xz+NrE l,e l OF+F @+ j7<+%E  LFpE l,e7+ww @@E _ ((E%N * r55%  fVpC 7*% %upN EfeE l,e_ NeqE l,e `5%f&f e% ʥ 2! % ʥ 2!2 ʐ% ;; |;t; E%E%  P p _5 % O *5 5 7b% 5 R 5Nf& .'%55` 5`  -?@- ?rwm? r- rE% ʥ ʥ G ʕ ʥ  *7`V6R6 2_#ʥ  $ &p lpG l,e _#ʥ_#E%5 E%%>G  >>bol table overflowWarning: assignment operator assumedNonterminated commentUnknown characterString too longBNBB1N100Long character constantNonterminated stringBBNB1N1N1N1N0BExpression overflowexpression overflowExpression syntaxCCC-2: d P : d d Nrlx~*0:6"Illegal conditionalCall of non-functionIllegal indirectionIllegal lvalueIllegal structure refUnimplemented structure operationIllegal conv :5% %7)w)& f&f e%% 5ru NNE l,% Ame 5rA f r upNE l,% @E% @E _% @E%E AA @@5E l, ww CB 7(%'%#(   .-xH  xHN hHE l,%7 ^Hw PHLHL%(G JH 7 @H 7 xE%1E l,%)E%%%%e7G&E ~e_#w 04G70! y tU_ '9z9 ` x.G j97 d9\9 & &  "eF9 F9 %YtU= D %)7v 79E  fe_9Vp^ -NH B8_ \% #* $_tU 6 7w  % 'w BDCG  P= J= t`7 >= ((E%% ED-7 = . %N m<%7 zB > H " BSToo many }'sExternal definition syntaxBBSCompound statement requiredBNBBSNBBSBNBNToo many initializersBBNB1N0B1N0B1N1N0B1N1N1N1N0Inconsistent external initializationUnexpected EOFBNBNMissing '}'Case not in switchSwitch table overflowDefault not in switchUnknown keywordRedefinitionStatement syntaxS %% : w& & h $e (7G5&Ew E ww  HE7, y !F _ & (G x' t'0F l,% 3F l,%  z%_7@' L B6FF _4 x0E  )_ _ _ 5 %aF Z xE 0 & &f z(% @ )* %;>B & &f z(% ^ ) B B +f z(% r%_ b%%E_T &_& w w H N N w w 7eH  ww D5pH wtEE@Pw @EtAE@PUww Nffg $e (wnw \N (RH l,%wLw :D+&H7Z yHe H&H l,e%  H l, w&&H l,e (&&H (&&H ( 5H (&H l,%w `NoH l,%wXw FNpH l,%w>w ,B5w"tatement syntaxBNNNN0Undefined structure: %.8sNot an argument: %.8sBN%.8s undefinedBSNV!V!V!V!6!h!2!h!h!h!h!!!!!z&':&*'"&&"'Conflict in storage classType clashMisplaced 'long'Bad structure name%.8s redeclaredDimension/struct table overflowBad functionBBNBNBBad register %oField too longBad type for fieldDeclaration syntax%.8s redeclared g(B)(*)*)*)Z)r)P*\*`*h*p**`*01BNS,,,,,,,Illegal indirectionBNBBNNSNBNNBNNBNNBNBNBNBad struct& &f z(% L "%%E% % ) ) L )_7%`A^A%7TA % ) %7BA& % B& z(% L$A )A )AA_ A +A_@ +@_@@4%@ .%*%@ $% %5 % ) L@ )@ *%_%D_f t& z(%z@ )r@_  %_ P@ BFUF _T%[6@$.@*@e @r$ n$ )_T@^$ @ X$ 5f  N& & n $e ( ?^ ?kF ((2 *2w B  ((E _E%E%!%  ' xFH"ttE A_Cp@H  E ݃H wjw XN * EwTw B h7:%' N%;"4̋    ̥̋ %w w 7 0 % ~0ww r0 h% %  d4 7 Z4% N4 780ww z H wvw d ?,e,$ x,t,&  & & f $e (w&w ureCompiler error (length)Break/continue errorBotch in outcode<<888888888 ) <%'# > &g $e ( %" Ln> ) w 7"%R>"L> " 45" %":" Lt"n"> )N (wX"wd"w H n%   \%w2F  N  .%;%  @2,e,,?(,e",P ,Apn ++ (h/ )ww fe 0%ww ` D3bCe@ TH7 y U 20  @& p0 @ & p0& w7 97 97 97 29w  9 97 ~9 .v9 r9$ e!& 7 `2^97 X2 P9 T + - 7D.w T 7 *2&2$97*. 9' 9- . No floating point!-7 - 0 81wp# /* */ /* * Screw Works interface via DC-11 */ #include "../tty.h" #define VSADDR 0174150 #define CDLEAD 01 #define B1200 030 #define STOP1 0400 #define CLSEND 02 #define RQSEND 01 #define MAGIC_MAP 0377 struct { int vsrcsr; int vsrbuf; int vsxcsr; int vsxbuf; }; struct { struct clist iq; struct clist oq; } vs; vsopen(dev) { VSADDR->vsrcsr = IENABLE|B1200|CDLEAD; VSADDR->vsxcsr = STOP1|IENABLE|B1200; vschar(0); } vsclose(dev) { vschar(0); VSADDR->vsrcsr =& ~IENABLE; while (getc(&vs.iw = X7=!5 ! )=7 = Lz= )N ) n=d=f=!^=F l,e &F l,%e-,=F l,"= )w==wtw b= l $A0 @7@#3˕ E% *` @K@˥E%E _3EU3˥E _eF  ˥eF  ~   e%6X~ 8DiF l,%8 ҋ D~8JJ 7ӕ0 $f v Le0 9e77 77 77we&  mn7 l7 P,~  P,  P,~ w7 @7 67 270   7Wp `e0eӕ?f 4d44d  74 4 476 7 q) >= 0); } vswrite(dev) { register int count, c; count = 0; while ((c=cpass()) >= 0) { if (--count <= 0) { count = 60; vschar(0); } vschar(c); } vschar(0); } vschar(c) { c =^ MAGIC_MAP; spl5(); while (vs.oq.c_cc > 60) { vsxintr(); sleep(&vs.oq, TTIPRI); } putc(c, &vs.oq); vsxintr(); spl0(); } vsxintr() { static lchar; register c; register int *xcsr; xcsr = &VSADDR->vsxcsr; if (*xcsr&DONE) { if (lchar==MAGIC_MAP) { *xcsr =& ~RQSEND; lchar = 0; if (vs.oq.c_cc +e%6X݂w w D   x`E&e G l,eww D %7ww   D ff "e5Nefe % & .'%`wRw @5  D5 %  5w> 85%> / xG ->DG >  Nfe ! 5wX> ^G H>w w   %  iG =@w F= `%=ʋʕ$ 4fwwJwfwzAJQ  OfA  ^ y   F y @0fA  @9 fA @e&7w7@JwP7 5f@wwJw*f@@& HADCBF75F[AAAB BBB B $B +B4B9B@BCBIBNBUBZB`BiBlBtBxB[@@@@@   ==0) goto wake; } if ((*xcsr&CLSEND) == 0) { *xcsr =& ~RQSEND; *xcsr =| RQSEND; if ((*xcsr&CLSEND) == 0) goto wake; } if ((c = getc(&vs.oq)) >= 0) VSADDR->vsxbuf = lchar = c; if (vs.oq.c_cc <= 15) wake: wakeup(&vs.oq); } } vsread(dev) { register int c; spl5(); while ((c = getc(&vs.iq)) < 0) sleep(&vs.iq, TTIPRI); spl0(); passc("?0*#?546?213?879?"[c&017]); } vsrintr() { register int c; c = VSADDR->vsrbuf; if (vs.iq.c_cc<=10) putc(c, &vs.iq); wakeup(&vs. 0 _ʥ w= 7 =%  ' wʥzG E _4J=7 b=:B7 4B l w$Bw$= % E _eG  E 0_w >%d>G  0w0w CN ff 2#e5` &% %%%@ 'w w C5 %  7n< 7%% %  5ff .'%5 wmA@ wp %\ H5 tAE@P@t55D];ʋ%ʥn$fH,@@@A& $&>>>rx>>>>>82, \ FAPAXA`AfAlAvAhnRnB R !d4 4 4 AAAA  ! !B j intcharfloatdoublestructlongautoexternstaticregistergotoreturnifwhileelseswitchcasebreakcontinuedodefaultforsizeofArg countCan't find %sCan't create tempBBSymiq); } # /* */ /* * VT01 driver via DR11C to 11/20 */ #include "../param.h" #include "../user.h" int vtflag; struct vtreg { int csr; int buf; }; #define VTADDR 0167770 #define RQINT 01 #define BIENABL 040 #define SEOF 0100000 #define VTPRI 8 vtopen(dev, flag) { if (!flag) u.u_error = ENXIO; else VTADDR->csr = BIENABL; } vtclose() { VTADDR->buf = SEOF; VTADDR->csr =| RQINT; } vtwrite() { register int c; int register count; while ((c=cpass()) >= 0) { retry: for (count=0; count<10; cou !B ' !"> j   R \ tcf: error &>$ >   55 eE > A A E]>E EP E?PB Eu x { ~ nt++) if ((VTADDR->csr&RQINT)==0) { VTADDR->buf = c&0377; VTADDR->csr =| RQINT; goto contin; } spl5(); if (VTADDR->csr&RQINT) { vtflag++; sleep(VTADDR, VTPRI); } spl0(); goto retry; contin:; } } vtintr() { VTADDR->csr =& ~RQINT; if (vtflag) { vtflag = 0; wakeup(VTADDR); } }  "&*.26:>BFJNRVZ^bfjnrvz~_ _~_Z _p _  "&*.26:>Bp < z~&~&~zp ~~~  \ pw RB @z POWER FAILED # /* */ /* * GP DR11C driver used for C/A/T */ #include "../param.h" #include "../user.h" #include "../tty.h" #define CATADDR 0167750 #define PCAT 9 #define CATHIWAT 60 #define CATLOWAT 15 struct { int catlock; struct clist oq; } cat; struct { int catcsr; int catbuf; }; ctopen(dev) { if (cat.catlock==0) { cat.catlock++; CATADDR->catcsr =| IENABLE; } else u.u_error = ENXIO; } ctclose() { cat.catlock = 0; } ctwrite(dev) { register c; extern lbolt; while ((c=cpass()) >= 0) { spl5(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); while (cat.oq.c_cc > CATHIWAT) sleep(&cat.oq, PCAT); while (putc(c, &cat.oq) < 0) sleep(&lbolt, PCAT); catintr(); spl0(); } } catintr() { register int c; if (CATADDR->catcsr&DONE && (c=getc(&cat.oq))>=0) { CATADDR->catbuf = c; if (cat.oq.c_cc==0 || cat.oq.c_cc==CATLOWAT) wakeup(&cat.oq); } else { if (cat.catlock==0) CATADDR->catcsr = 0; } }  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 |000 nul|001 soh|002 stx|003 etx|004 eot|005 enq|006 ack|007 bel| |010 bs |011 ht |012 nl |013 vt |014 np |015 cr |016 so |017 si | |020 dle|021 dc1|022 dc2|023 dc3|024 dc4|025 nak|026 syn|027 etb| |030 can|031 em |032 sub|033 esc|034 fs |035 gs |036 rs |037 us | |040 sp |041 ! |042 " |043 # |044 $ |045 % |046 & |047 ' | |050 ( |051 ) |052 * |053 + |054 , |055 - |056 . |057 / | |060 0 |061 1 |062 2 |063 3 |064 4 |065 5 |066 6 |067 7 | |070 8 |071 9 |072 : |073 ; |074 < |075 = |0N  disk offset J70 tape offset 07 count  T      0 Wp `@ illegal digit Nr-l  P eP5Ћ 4R`ȋ  `e `R7 . r f rv!^\ɋ B   %F    %  "     %     %@ T \ & b@  @&  @& @2& @ E&  "_t@w  _te e Ux&  &  w | _@F dEFx _  <@Exw *@ _t76 > |077 ? | |100 @ |101 A |102 B |103 C |104 D |105 E |106 F |107 G | |110 H |111 I |112 J |113 K |114 L |115 M |116 N |117 O | |120 P |121 Q |122 R |123 S |124 T |125 U |126 V |127 W | |130 X |131 Y |132 Z |133 [ |134 \ |135 ] |136 ^ |137 _ | |140 ` |141 a |142 b |143 c |144 d |145 e |146 f |147 g | |150 h |151 i |152 j |153 k |154 l |155 m |156 n |157 o | |160 p |161 q |162 r |163 s |164 t |165 u |166 v |167 w | |170 x |171 y |172 z |173 { |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?mmUx&  &  &  &  @%  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 74 | |175 } |176 ~ |177 del| ! "W N, R=    @ #D  D ҃TP  B ы e@W 0 ,"& 7   0ߋp@E A Ze      |@7x@ eE "  ɋ -lɋ e-RNHɋ ^? 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 > 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>p ready drive 0 and type y & %y  n ȋ e  rkf: error  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  &  &  & eg _fubyte"r_subyte"_fuibyte"r_suibyte"_fuword"_suword"_fuiword"_suiword"gwordpwordfuworderr suword_copyin"_copyout"&copsu:_idle"f_savu"x_retu"_aretu"KISA6_u!_spl0"_spl1"_spl4"_spl5"_spl6"_spl7"_copyseg"UISA0UISA1UISD0UISD1_clearse"L_dpadd"_dpcmp"dump"MTCRstart" _end _edata _main  & @ @ 5@x @ @  . & Z@ b  & J@ r @ @  B5@x n    Hw  @ @       @ @ &  & ~  @  ~ քR R  @  F R &        JJJJJJJJRJJJJJJJ trap; br7+7. / programmed interrupt trap; br7+8. / floating point trap; br7+9. / segmentation violation . = 254^. hpio; br5 ////////////////////////////////////////////////////// / interface code to C ////////////////////////////////////////////////////// .globl call, trap .globl _klrint klin: jsr r0,call; _klrint .globl _klxint klou: jsr r0,call; _klxint .globl _clock kwlp: jsr r0,call; _clock .globl _tcintr tcio: jsr r0,call; _tcintr .globl _tmintr tmio: jsr r0,call; _tmintr .globl _hpintJR @   | ~@ & 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 BLOCKISA0KISD0usizeIO_ldiv"|_lrem"_lshift"csv"cret"_ka6#_cputype#badtrap$KS TO TEST INSTEAD OF TYPE ADDRESS PROGRAM HAS BEEN RELOCATED,TO RESTORE START AT *DZQMB DONE!E7w P@Ex  ~_~@B J)eL x  N N Ê <%! ,c ѐhˋÜ`E $  P   L ɋr hd$ !                       & '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  ._../ low core br4 = 200 br5 = 240 br6 = 300 br7 = 340 . = 0^. br 1f 4 / trap vectors trap; br7+0. / bus error trap; br7+1. / illegal instruction trap; br7+2. / bpt-trace trap trap; br7+3. / iot trap trap; br7+4. / power fail trap; br7+5. / emulator trap trap; br7+6. / system entry . = 40^. .globl start, dump 1: jmp start jmp dump . = 60^. klin; br4 klou; br4 . = 100^. kwlp; br6 kwlp; br6 . = 114^. trap; br7+7. / 11/70 parity . = 214^. tcio; br6 . = 224^. tmio; br5 . = 240^. ! "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 ._..dldrdtfmbootmcopymemrkftbootuboothbootzhpubooththphtrkhtrpresetrkubootrpuboottcftmhptmrktmrpF^b< wwt7Z^U7T,U7N*7HW7BZ7<(]& J DB7#|& EfF E50 UbE x U0 %  2pv Er bI 2 VUNE@HBE   5 e EaaV 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 L20001L32L10004L10005L10006_psignal L29_times"~timespL20003_suword _profil",~profil,0  ȋ `5j a~?tEķ (    0 &  6r 6r@@A6v@@& ADCBF(hII !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    jh\7P EfF E50 UE  U0 %  2pv Er bI 2 *U"E@BE   5 e E1 UE@B   5   pd( H  ; ` f EA `IIIIihh,5 5   ЇE:H E Bv EE (&v  6  fU`I  >U8^X& P"F  P ~ & ~  &  .EUPEIUUrEvIEnU fE`UXE@RUJE DU<60( "!_brelse"~G_alloc" _getfs"b_sleep"_badbloc" _wakeup"l_clrbuf"I_prdev"N_free" _bwrite"F_ialloc" _iput"_ifree"*_update"_iupdat"_prele"z4_bflush"8L_itrunc"_maknode"_wdir"_writei"_panicst${_putchar"_printn"_deverro"r_readi"_bmap"P_breada"8F_iomove"P_bawrite"hG_bdwrite"2G_max"_cpass" _passc"n _file${_issig" &_setrun"_setpri"_malloc"^/_xswap"6!_swap"K_xccdec"r#_xdump klinkloukwlptciotmiohpiocall _klrint _klxint _clock _tcintr _tmintr _hpintr C_stime"B_fstat"?_stty"rN_gtty"*N_nice"C_sslep">_sync"xC_kill"6E_getswit"B_dup"@_pipe"2_times"E_profil"E_setgid",C_getgid"NC_ssig"D_timeout"p,_getf",_closef"-_closei"T-_openi"-_owner"._uchar"~2_suser"._ufalloc"._falloc"/_readp"3_plock"R4_writep"3_rdwr";_open1"<_stat1"?_getmdev"TB_buffers$B~_swbuf$`_httab$x_iowait"I_incore"G_geterro" N_notavai"BI_iodone"rI_mapfree"fK_devst  NtEx.|27@Ex>pN555@EWtU& @ U7D@D7<@t z@ r525/E*@tE m5 5 5 5&e \e V55 %&EPtEF5 5   ЇEpfjH b\E Bv EE (&v  6  :U4 I  U_tmopen _tmclose _tmstrat _tmtab _nulldev _tcclose _tcstrat _tctab _hpopen _hpstrat _hptab _cdevsw#B_klopen _klclose _klread _klwrite _klsgtty _mmread _mmwrite _tmread _tmwrite _hpread _hpwrite _rootdev#_swapdev#_swplo#_nswap#learse" _dpadd"X_dpcmp"f_end$4_edata#c_main"_ldiv"P_lrem"\_lshift"jcsv"zcret"_ka6#F^_cputype#H^badtrap$0_bdevsw#J^_nodev"!_tmopen"X_tmclose"Y_tmstrat"Y_tmtab$c_nulldev"!_tcclose"V_tcstrat"W_tctab$c_hpopen"[_hpstrat" \_hptab$c_cdevsw#^_klopen"RT_klclose"T_klread"T_klwrite"U_klsgtty"U_mmread"U_mmwrite"HV_tmread"l[_tmwrite"[_hpread"]_hpwrite"]_rootdev#.__swapdev#0__swplo#2__nswap#  &   P ~ & ~ &  ZnhEUPErIUjU^FEJIEBU :E4U,E@&UE U 0 nld`   P ~HB`ZL0@  & C~"|mH   W W @570PPR`r hpio: jsr r0,call; _hpintr _X N h &f ` &f T ee%_X @@m@me-\_X  j% e  @teU %z  % e  @teUDm%z   %  Dm% #  @tU"e# jz%z%  ٴww @etww SSt J^%S E  H_ ,& !% ~G70[NS([444mfpi @ mtpi rttresettrap"call":_trap PSnofaultev, /* rk */ &nodev, &nodev, &nodev, &nodev, &nodev, /* rf */ &nodev, &nodev, &nodev, &nodev, &nodev, /* rp */ &tmopen, &tmclose, &tmread, &tmwrite, &nodev, /* tm */ &nodev, &nodev, &nodev, &nodev, &nodev, /* hs */ &hpopen, &nulldev, &hpread, &hpwrite, &nodev, /* hp */ &nodev, &nodev, &nodev, &nodev, &nodev, /* ht */ 0 }; int rootdev {(6<<8)|0}; int swapdev {(6<<8)|0}; int swplo 4000; /* cannot be zero */ int nswap 872; 4__canonb$c_coremap$d_swapmap$e_rootdir$f_execnt$f_lbolt$f_time$f_tout$f_callout$f_mount$ g_mpid$(g_runin$*g_runout$,g_curpri$.g_maxmem$0g_lks$2g_updlock$4g_rablock$6g_proc$8g_text$k_inode$m_icode#6__mfree"/_printf"&_min"6_panic",_cinit"&O_binit"I_iinit"~ _iget"r_newproc"Z_expand"_estabur" _sched"_sureg": _nseg"h _nblkdev$y_nchrdev$y_buf$y_bfreeli${_bread"E_getblk"H_bcopy$SSR0zssr$SSR2~call10_runrun _swtch _savfp"_display"_incupc"_getc"_putc"0_cfreeli _backup"_regloc backupjflgbflgfetchNt00.t01t02t03t04t05t06t07|t102t11t12t13t14t15t16t17u0u1u2u3u4pu5u6Nu7setr   P ~tnx0lHB  & C~2NmH   W W @57\PP0R`0  ȋ `5 a~stEķ Tc  4  0 L&  6r 6r@@A6v@@& ADCBFw 7 _Ve F   n_d /% %FlV %> Wt ww7L7F7@7:747.HHHHHHHYiHHHH(8br4br5br6br7trap start &nodev, &nodev, /* pc */ &nodev, &nodev, &nodev, &nodev, &nodev, /* lp */ &nodev, &nodev, &nodev, &nodev, &nodev, /* dc */ &nodev, &nodev, &nodev, &nodev, &nodev, /* dh */ &nodev, &nodev, &nodev, &nodev, &nodev, /* dp */ &nodev, &nodev, &nodev, &nodev, &nodev, /* dj */ &nodev, &nodev, &nodev, &nodev, &nodev, /* dn */ &nulldev, &nulldev, &mmread, &mmwrite, &nodev, /* mem */ &nodev, &nodev, &nodev, &nodev, &nodstty"T_kl11$ڞ_rrkbuf$_rkstart"W_rkaddr"jW_tcper$_tcstart""Y_rtmbuf$_t_openf$2_t_blkno$:_t_nxrec$J_tcomman"Z_tmstart"[_tmphys"n]ar"VJ_rhstart"J_maplock$_mapallo"J_physio"L_partab#2c_maptab#b_cfree$_sgtty"N_wflusht"N_flushtt"fO_canon"O_ttyinpu"P_ttyoutp"NQ_ttstart"S_ttrstrt"R_ttread"lS_ttwrite"S_ttystty"T_kl11$_tcper$ğ_tcstart"|W_rtmbuf$̟_t_openf$_t_blkno$_t_nxrec$_tcomman"HY_tmstart"Y_tmphys"[_hp_size#c_hpbuf$ _hp_open$$_hpstart"\_hpphys"] 1 UE@B aa  5 aa   H  #^ ` f EA` ` Z^ NtExXXXXXXP\\\\\X7 @ExTDT"555@EWtU& @ U7Ҝ@D7ʜ@t z@ r525/E*@tE` m5 5 5 5&pe \e V55 %I&EPtEp 0 e*_WpWtNL_ & V_ &j_ &_ &_ &^ 6 7^VVe /%Uf^^ %`^^ %_ ,U^^^^8gMp^ `F @ XV r 7]]@V r 7NH X   & & e& 6_ % wLw <%(T%`#̶ %(T%#5 ww %(T_X N h %_X N h &f  e%7Z7Zww t N be   I  `5?Nf %  !Nf E de !% ~G2e lNf H  Iw2 N_ N ] w N b&e  Nf& % ; 4 %d#Nf H d&e !%4  F4e l apww DCe - N_ N w w N b&e \h(8HXhxh(hh8H(8Xhhx_bdevsw#_nodev 6M Iw~w n M*g  8g̥  5e%k%L,g D md ^/ J 8gE%̥.̥+e%k%8gE%̥̥ 5e%k%D x & 6!%_"@ && Ke ,m D&& Ke et&e /%4_"l` ,ww t8gl LtK n7GT7 P2e% &nulldev, &tcclose, &tcstrategy, &tctab,rk rkio; br5 .globl _rkintr rkio: jsr r0,call; _rkintr &nulldev, &nulldev, &rkstrategy, &rktab, &nulldev, &nulldev, &rkread, &rkwrite, &nodev,tm tmio; br5 .globl _tmintr tmio: jsr r0,call; _tmintr &tmopen, &tmclose, &tmstrategy, &tmtab, &tmopen, &tmclose, &tmread, &tmwrite, &nodev,ht htio; br5 .globl _htintr htio: jsr r0,call; _htintr &htopen, &htclose, &htstrategy, &httab, &htopen, &htclose, &htread, &htwrite, &nodev,cr c *  a5Nf r  e e wD   5 5 KNef E 5 @ ` %5 @tp-m@tp-m %d ap%de% ~G%d 5#4e l N` N _w LN b%d  apw$w  g L-%d%d N` N 4 4  e%(gڂ` ,ww jWQ dW g *# x8 & 6 % w @  5 55 j 7J  _F _@5f%  5 ~ %,! 5 5  5 5 Nee5` N 5 @ 55 u-5 Nf& N% Nf& N% e ~     5  &  N%e < T j 7x 5 @ x. !  5 &   N%5 w e N  5 @ '   5   &' N% e4 N B  6 T ( s .%ww  @e5 Nf N  Nww pdDe ,%   _% %  De̥0 ̥9 Wp Be` ̋O 8  . V 57 HU    N ,`%, %  N e&    N rin; br6 .globl _crint crin: jsr r0,call; _crint &cropen, &crclose, &crread, &nodev, &nodev,rp rpio; br5 .globl _rpintr rpio: jsr r0,call; _rpintr &nulldev, &nulldev, &rpstrategy, &rptab, &nulldev, &nulldev, &rpread, &rpwrite, &nodev,hp hpio; br5 .globl _hpintr hpio: jsr r0,call; _hpintr &hpopen, &nulldev, &hpstrategy, &hptab, &hpopen, &nulldev, &hpread, &hpwrite, &nodev,dc dcin; br5+%d. dcou; br5+%d. .globl _dcrint dcin: jsr r0,call; _dcrint .globl _dcxint dcou: H 4zVvV& !% Fe%(g΂m̵ f&   z4e %y7 V 8Lww  &   m5-(5-$̵̵ g2!e%(g ` ,'` &I w e %yɂtt̕fe P f E 5 ~G fe \ tl5eSee  ~Gw D  4 & * f&   z4 4  wpw `@ H @ ȋ wBw 2 5 fe& %@ww ~wDe   % w7 7 ׯ-  wx7 z .twneB J  ӕ-ׯDd < z r f e0&   ԕ- \  vA W  ~e0fv  @ > ҋ D~8 ӕ0 $f v Le0 9ef` XR 7Bwe&  m& jsr r0,call; _dcxint &dcopen, &dcclose, &dcread, &dcwrite, &dcsgtty,kl klin; br4+%d. klou; br4+%d. dp dpin; br6+%d. dpou; br6+%d. .globl _dprint dpin: jsr r0,call; _dprint .globl _dpxint dpou: jsr r0,call; _dpxint &dpopen, &dpclose, &dpread, &dpwrite, &nodev,dn dnou; br5+%d. .globl _dnint dnou: jsr r0,call; _dnint &dnopen, &dnclose, &nodev, &dnwrite, &nodev,dhdm dmin; br4+%d. .globl _dmint dmin: jsr r0,call; _dmint dl klin; br4+%d. klou; br4+%d. dhz4ww BʵL bEe5f P  E 5f \ tA@lee ʵTTeʵTeTN Fww D5 pe5[ U5HN& E e5 1e@-%& E 5e5  N& @p- ~G& ,ȃ ~GN& = e@-E4 4 ww Ĭ  w@U4h c  w @7h $ ~    ~ wB7   0   Wp `e0f@w fwwwf@eӕ?f ,vP l f @f J &7 8 &.&- f@www&f@ww w7F@& BF       < 7 b ,  F  G r s d  dhin; br5+%d. dhou; br5+%d. .globl _dhrint dhin: jsr r0,call; _dhrint .globl _dhxint dhou: jsr r0,call; _dhxint &dhopen, &dhclose, &dhread, &dhwrite, &dhsgtty,/ low corebr4 = 200br5 = 240br6 = 300br7 = 340. = 0^. br 1f 4/ trap vectors trap; br7+0. / bus error trap; br7+1. / illegal instruction trap; br7+2. / bpt-trace trap trap; br7+3. / iot trap trap; br7+4. / power fail trap; br7+5. / emulator trap trap; br7+6. / system entry. = 40^..globl start, dump1: jmp startZHԔ%V:*X,R J w`w PCe 1 @ %%B %d%l%o %o   %s eww Nf P N&  Nf \ e0 ww D x 5t t tv%     twZw Jwe N>` & w (@@&fI` &eww D Z` N Nf&^` &eww B _E% Wp ^ _B j  r      I J     ) 9 U  +;WQT`p$%Z]iy0Z4?4Babcde4h0&'PQ044 :ef4Tn-Muv,/34FHKNOacfijrkrprftmtchshphtconsolepclp jmp dump. = 240^. trap; br7+7. / programmed interrupt trap; br7+8. / floating point trap; br7+9. / segmentation violation/ floating vectors. = 300^./////////////////////////////////////////////////////// interface code to C//////////////////////////////////////////////////////.globl call, trap/* */int (*bdevsw[])(){ 0};int (*cdevsw[])(){ 0};int rootdev {(%d<<8)|0};int swapdev {(%d<<8)|0};int swplo 4000; /* cannot be zero */int nswap 872;l.s .=.+4 . = %d^. %s%sc.c55HE58N 6 E%`# &E feH 6 N P 59@ 7P @- Pf& 8F%N& E 5rff PeN ~Gg jww BE% Wp ^ _ ,_B j E5N 6 5E%`  P X%& H& E 5 fff PeN ~G 5N hGN 2Gnh &E fedcdhdpdjdnmemrkrfrptmhshphtconsole klin; br4 klou; br4 .globl _klrint klin: jsr r0,call; _klrint .globl _klxint klou: jsr r0,call; _klxint &klopen, &klclose, &klread, &klwrite, &klsgtty,mem &nulldev, &nulldev, &mmread, &mmwrite, &nodev,pc pcin; br4 pcou; br4 .globl _pcrint pcin: jsr r0,call; _pcrint .globl _pcpint pcou: jsr r0,call; _pcpint &pcopen, &pcclose, &pcread, &pcwrite, &nodev,clock kwlp; br6 .globl _clock kwlp: jsr r0,call; _clock parity tr%s /* %s */ &nodev, &nodev, &nodev, 0, /* %s */ %s /* %s */ &nodev, &nodev, &nodev, &nodev, &nodev, /* %s */ no block device given %s: no more, no less %s: only one done%s: cannot find dxorxfePc^slur&crt0.ostartmkconf.o~mainevipqnflagfflagbnkl~pukeacs~inputlinep 5 B > ' *wjw Zu-@wV@w @u-@w<@w &C@DmΧ*Q]̧5# & & %jw`B X      n w B %   t̕t jN7N*g l   bw< `t̕t ( Pw C8g2  e~ww D4 ̕M$JzM 7lM,g lww DEted`%ap; br7+7. / 11/70 parity lp lpou; br4 .globl _lpint lpou: jsr r0,call; _lpint &lpopen, &lpclose, &nodev, &lpwrite, &nodev,rf rfio; br5 .globl _rfintr rfio: jsr r0,call; _rfintr &nulldev, &nulldev, &rfstrategy, &rftab, &nulldev, &nulldev, &rfread, &rfwrite, &nodev,hs hsio; br5 .globl _hsintr hsio: jsr r0,call; _hsintr &nulldev, &nulldev, &hsstrategy, &hstab, &nulldev, &nulldev, &hsread, &hswrite, &nodev,tc tcio; br6 .globl _tcintr tcio: jsr r0,call; _tcintr qn~equalab~getchar(cprintf.oNformploopbrjustndigitgnum widthndfndswtabdecimaloctalxhexrfloatsciencharacPstring^longorununsignedremotelongprbufprstrclose.oTcreat.ojexit.offltpr.oputchr.oflread.o write.o.cerror.oPcsv.o^savr5$_exit"_main"_btab#x_ctab#_table#_stra#J _strb#~ _strc# _strd# _stre# _strf# _strg# _fout$ _root# csv"^_input"_creat"j_puke"_printf"N_flush"_close"T_equal"_write".cret"j_getchar"(_read" pfloat"pscien"_putchar"cerror"P_errno$JT F%ḛ 8$ 7̵ % 3  37r7j%  k8gʥ     J n  bw,w 5 7 J J8g̋ 5-J e%kDw` ,̕\J  4%@ F LD7(Cd ^/ 5˕t L & & 6!%˕آ wt N f  w 5tu- NmfNd /%? LNd ^/  LE%  r2d e%kۂ:7:*g l@E%@e 7  Dԓ ww  Bf 4 e e   !tt_ww C % w 5 w pD̵Ee le l E& T- w2w "DE2E%@@& . H  g %VҐ %/%V %/57 <7 6$5 & P 75 $ N ~G% & . 7 @e7Ҏ5Ď N ~G P & P & E 5X@&xE` !%ef ^ r @&e P @& E @&e \ tle@e5 Nef  e % f  e % ~Gww  ,  @ ww 5o" ~2 :0  5    g  " / wt e%(g  & f@t J^%~f E ~ ~G2J H2& !%22$E2 ~G z4w 5_~; g " e%54 et&e /%  wTw D _n# k e %m t-Ν0a` ,4 t6e?tEete ^/ ` ,e  & & eZX7 NN @ e& Ke3C    L L  6!%ܜ L ww D  &d /%ww @E%U@e 7N@  x`f:` & NeRHZH` %V N ~G% & . _0wB5 f r _0_0w E ܍ww Ѝ ̍ F%jww , # X(V JHD<ʕ2˕3̕w3@ 0  w bD% 4 3 5Ee l z4 Ue   R4, 7 Č7  z4ww D R4  z47  z4 k h % w% U(g=~*m 5-#~e %y& f@t L^% 3  ~Gw2w " ~2 :0 E%`}- 7} ww xp~ww #b~^~#ww D~#>~7#f lww ğ$~7D} 74}4}07*}wrw b}}}}wZw Jğ}7} 7|7|w8w (|}}|w w |? }ww Bww }%  (  |0ww ~2 :0 3 z4| r tb ,E%` & N` &  a , " %   | wNNe %  7˛ENe EteB N G N H 5 U &@t N^ #N G N H 5 ~G U @t N^ N E w Iw DE & t N^ 5 I ~G5 NwTw DD tP^%c%x hGU ~Gww DU Fww D5@ l5@h3E@`3{ l5 { EH0 {ww D@t e7 Bt7:7,   wdw N t@-@@ & P 킘e xr`jd e  w` @l2 &     `w XR8g̥ -Η :0- e%k: U:~  7 UڗUE7T~T  :~  TT T7 T:~ lww -T  wT7 T:~ l _* x&ajT F%_*XT 7RT.ww t7ˆ wxw h&%   -e%  e ^/ ^b ,& H  !% F&d /%̕8g, Ng l l8g,  ʥ e%k e%kڂ w p 8g(, n ʥL 쇄% E e /% 2 2 22 2l X   X l X   X h ~G1ʥ   @<WtUp0P^ s-3! wz  w ^@-p1b ,{ v%{2<U@2{  2 @tP^b , t-t-  5U@&  BIwԾ μF2 BI5U F0003t tw bD &  5 R NwDw 4D \00Uww D5  fKU5 ~GE@ lww н@ ~wȽw {7<17617017*1 WpDey WpeB~t{00070 ~G % J^ @ e B/w0w DCL @ tEWt@PUA5UUww ּDC%F L EtUA5U8U0ww %FR5 U@~Q  5jQUbQ fBU  e%   e%0w w E 5@ Q l7 Pww ` U@&  5@ U vP@t 7PwP@t7P@tE7P` ww | U7  rI W 5 @5RtEWt@PU@`-z -U   UU TRB  TV5#  PRww  J R(5Z5P   7*%̟5@PU7 77 rIT 0 ww N [f̟Y LeND 7dww ثN [ f̟Y Le7 |dww DB j  쟃  dvanc; case MCALL: *cp++ = block(0,0,0,0); /* 0 arg call */ os = CALL; break; case INCBEF: case INCAFT: case DECBEF: case DECAFT: *cp++ = block(1, CON, INT, 0, 1); break; case LPARN: if (o!=RPARN) goto syntax; goto advanc; case LBRACK: if (o!=RBRACK) goto syntax; build(LBRACK); goto advanc; } build(os); goto opon1; syntax: error("Expression syntax"); errflush(o); return(0); } copname(acs) struct hshtab *acs; { register struct hshtab *cs; register struct tname *<tt N^ &  55@ l `EHEwNw >%5- U BI F L.5%{ ww Ds5_N5s_Nms _NteE5 t5 tEB-_NmZstEAms@ s _N U@&  5@ U t E4 sWt @`E@`t4`tE4B j 4r E 4 4r&  &  5jr5@ l EHww &D D  wfw VD Etec@ "U rIL4  \  P  rWtPt r4` N7H3-, 3-,3   ww  t&& Jew^w N775@" & r%5p   5 ~ q k U7a7` rI Nww ҩN ] f  \ Leww N ]  f  \ t (sp)+ mov (sp)+,r5 rts pc 1: jmp *(r1) esw1: '+; binop '-; binop '*; binop '/; binop '&; binop 037; binop 035; binop 036; binop '%; binop '[; brack '^; binop 1; exnum '!; binop 0; 0 binop: cmpb (sp),$'+ beq 1f jsr pc,errore 1: movb r4,(sp) br advanc exnum: mov numval,r1 mov $1,r0 br oprand brack: mov r2,-(sp) mov r3,-(sp) jsr pc,readop jsr pc,expres cmp r4,$'] beq 1f jsr r5,error; '] 1: mov r3,r0 mov r2,r1 mov (sp)+,r3 mov (sp)+,r2 oprand: inc opfound mov $exsw2, 7Hr Nj1rw|w lD57rrw\w LCe Nqr&  e&  e&  ww Nr 7Dre 78re 7,r Nwܸw ̸dr ,E% eq fWp ^%ww D @&e   fO hw`w PeEe% ^ e 74*w w De  e   le l   4wηw C ڵ  w    cLeww |B j *be P `@Et0!ca wF(!!!!!!!!!XYYc!VWc!!![! \c!!!RTTTUU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!UHV!!!!!!!!!!!!!!!!XYl[[!!!!!![!]]!!!!!!h  /etc/initmem = %l RESTRICTED RIGHTS Use, duplication or disclosure is subject to restrictions stated in Contract with Western Electric Company, Inc. no clockiinitnount the number of appearances of temp1[j] */ count = 0; tred = -temp1[j]; for( p=1; p<=nterms; ++p ){ if( temp1[p]+tred == 0 ) ++count; } if( count >ntimes ){ lastred = tred; ntimes = count; } } /* clear out entries in temp1 which equal lastred */ for( p=1; p<= nterms; ++p ) if( temp1[p]+lastred == 0 )temp1[p]=0; /* write out the state */ /* first, check for equality with another state */ /* see if there is a nonterminal with all dots 6&  @5 '\ %c  %bb 5\b %d  %5ceD-w BCE% 5 5 %%% %  fO4%5%A%Ze   5 % %  l  5 NQ  Sw8w ( CDE%5 _R% 5  NQ _R5 cҋ !\ NQ %a%ze% 5 NQ e & spacebad blockOut of inodesbad countno fsno imtInode table overflow panic: %s %s on dev %l/%l errbn%l er%o %o swap errorno procsout of swap spaceswap errorout of textout of swap spaceJ%#######$8$V$\$#b$h$#\%d%ka6 = %o aps = %o trap type %o trap>'>'>'>'>'>'N'>'>'>'))*"*B*`***core%7":`;p;<0=9><>C40DB>DD:?T=fC@ABCB(%?%%rN*N%C>xC6EB%%@2EEbefore it. */ p0 = 0; q1 = pstate[i+1]; for( q0=pstate[i]; q0pitem) ) < NTBASE ) goto standard; if( p0 == 0 ) p0 = p1; else if( p0 != p1 ) goto standard; } /* now, all items have dots before p0 */ if( cdebug ){ settty(); printf("state %d, pre-nonterminal %s\n",i,nontrst[p0-NTBASE].name); } for( j=0; jpitem) != p0 ) goto nextj; } /* we have a match with state j ! */ tystate[i] = -j; zzacsave =+ tystate[j]; zznsave++; wrstate(i); return; nextj: ; } standard: tystate[i] = 2; wrstate(i); size = 0; for( p0=1; p0<=nterms; ++p0 ) if( (p1=temp1[p0])!=0 ) { arrval( TESTACT+trmseNQ  Sww pDC 33wV N w $k8Ctek sDuepeeH3 #@UCU@ww Due N4ww ~@te lSwtw d@te SwZw JDue S % e lw(w BteU53& P ww DueN& T wԱw ıAB j njE ү"call"_klrint"^U_klxint",U_clock"*_tcintr"W_tmintr"Z_hpintr"(]_trap"#nofault$(ssr$*_runrun$c_swtch"_savfp"X_display"X_incupc"Z_getc"_putc"_cfreeli$c_backup"p_regloc#`_fubyte"F_subyte"`_fuibyte"F_suibyte"`_fuword"_suword"_fuiword"_suiword"_copyin"_copyout"_idle":_savu"L_retu"n_aretu"b_u!_spl0"_spl1"_spl4"_spl5"_spl6"_spl7"_copyseg"_ct[p0].value ); if( p1 < 0 ) arrval( REDUCACT - p1 ); else if( p1 == ACCEPTCODE ) arrval( ACCEPTACT ); else if( p1 == ERRCODE ) arrval( ERRACT ); else arrval( SHIFTACT + p1 ); size =+ 2; } if( lastred ) arrval( REDUCACT + lastred ); else arrval( ERRACT ); tystate[i] = size+1; /* store entry size in tystate */ zzacent =+ (size+1); return; } wrstate(i){ /* writes state i */ int j0,j1,s; struct item *pp, *qq; settty(); printf("\nstE m:E@` F__ Vi n w>w .i7 i7aiB X wB j iE .i tE mzE@` ` __ w ~N 8L@E0ğwrw bD5 J%B EğU rI4  \ 7  07~ r   w w 7^ ˕U rIF ' EğE @ ˕   tUC5U free"!_xalloc"2"_sysent#<_link">_unlink"C_exec"4_chdir"0D_gtime"B_mknod">_chmod"D_chown"D_sbreak":_stat"?_seek"T=_getpid"fC_smount"@_sumount"A_setuid"B_getuid"f = r5 .globl iget .globl env,si .globl succ .globl params params: jsr pc,iget mov (r0),r0 asl r0 mov env(f),r1 add r0,si(r1) jmp succ ww  565 & r%5 Eğ7 E U7 7 ! ,!5 Ev U˕Cwb   x,cߕ rI - -؂"" Et5 @PUA  e-w D9g  0  wlw \D4 & HY & HY w>w .f  v 5R@t@]U`Rww D e - - U I rI!55 4  Ы  7  07  37 .byte -14,141,142,143,144,145,146,147 .byte 150,151,152,153,154,155,156,157 .byte 160,161,162,163,164,165,166,167 .byte 170,171,172,-14,-26,-14,176,-14 .data namedone:.byte 0 a.tmp1: a.tmp2: a.tmp3: .even curfb: -1;-1;-1;-1;-1;-1;-1;-1;-1;-1 obufp: outbuf symend: usymtab .bss curfbr: .=.+10. savdot: .=.+6 bufcnt: .=.+2 hshsiz = 1553. hshtab: .=2*hshsiz+. pof: .=.+1 wordf: .=.+1 fin: .=.+1 fbfil: .=.+1 fileflg:.=.+1 errflg: .=.+1 ch: .=.+1 .even symbolb:bob: S%d <- S%d over S%d; b=%d,h=%d,w=%d .ds %d \*(%d\*(%d.ds %d "\*(%d\*(%d\*(%d. b:b shift b: S%d <- S%d vert %d S%d vert %d; b=%d,h=%d,w=%d . e:eb: S%d <- S%d S%d; b=%d,h=%d,w=%d .ds %d \*(%d\*(%d . numb: %s %d . shift: %d . sqrt: S%d <- S%d;b=%d,h=%d,w=%d .ds %d \e|\*(%d . S%d <- %c pile of: S%d;h=%d b=%d,w=%d .ds %d \ \*(%d\ \*(%d\ \*(%d\ .ds %d \*(%d\*(%d\*(%d. shift2 s%d <- %d %d %d h=%d,b=%d,w=%d s==STATIC) { dsym->hoffset = isn; printf(".bss\nL%d:.=.+%o\n.text\n", isn++, rlength(dsym)); } else if (dsym->hclass==REG) { if ((type&TYPE)>CHAR && (type&XTYPE)==0 || (type&XTYPE)>PTR || regvar<3) error("Bad register %o", type); dsym->hoffset = --regvar; } syntax: return(elsize); } getype() { register int o, type; register struct hshtab *ds; switch(o=symbol()) { case TIMES: return(getype()< 2: .even / / wc: mov r1,-(sp) mov r2,-(sp) mov r3,-(sp) clr r3 1: cmp r3,nbuf bge 1f mov r3,r2 asl r2 tst w1(r2) ble 2f mov r3,r1 ashc $9.,r1 bic $777,r1 add $b1,r1 jsr pc, goto getf; case NAME: defsym = ds = csym; type = 0; ds->ssp = dimp; getf: switch(o=symbol()) { case LPARN: if (xdflg) { xdflg = 0; ds = defsym; declare(ARG1, 0, 0, 0); defsym = ds; xdflg++; } else if ((o=symbol()) != RPARN) goto syntax; type = type<ssp&0377; oname); } ont; collect/t/cont; collect/u/cont; collect/v/cont; collect/w/cont; collect/x/cont; collect/y/cont; collect/z/cont; collect/A/cont; collect/B/cont; collect/C/cont; collect/D/cont; collect/E/cont; collect/F/cont; collect/G/cont; collect/H/cont; collect/I/cont; collect/J/cont; collect/K/cont; collect/L/cont; collect/M/cont; collect/N/cont; collect/O/cont; collect/P/cont; collect/Q/cont; collect/R/cont; collect/S/cont; collect/T/cont; collect/U/cont; collect/V/cont; collect/W/cont; collect/X/cont; collect/Y/c/ / / a6 -- pdp-11 assembler pass 1 opline: mov r4,r0 jsr r5,betwen; 0; 200 br 1f cmp r0,$'< bne xpr jmp opl17 xpr: jsr pc,expres add $2,dot rts pc 1: movb (r4),r0 cmp r0,$24 beq xpr jsr r5,betwen; 5; 36 br xpr mov r0,-(sp) jsr pc,readop mov (sp)+,r0 asl r0 jmp *1f-12(r0) 1: opl13 / map fop freg,fdst to double opl6 opl7 opl10 opl11 opl13 / map fld/fst to double opl13 opl13 / map fop fsrc,freg to double opl15 opl16 opl17 opl20 opl21 opl22 opl23 xpr opl25 opl26 opl27tate %d\n",i); qq = pstate[i+1]; for( pp=pstate[i]; pp0 ){ /* shift, error, or accept */ if( j1 == ACCEPTCODE ) printf( "accept" ); else if( j1 == ERRCODE ) printh tst r1 bne 1f mov r0,r4 bis $400,r4 jsr pc,putw inc numval br 1b 1: mov $-1,r4 jsr pc,putw mov $'<,r4 tst (sp)+ rts pc rsch: jsr pc,rch cmp r0,$'\e beq 4f cmp r0,$'\n beq 4f clr r1 cmp r0,$'\\ bne 3f jsr pc,rch mov $schar,r2 1: cmpb (r2)+,r0 beq 2f tstb (r2)+ bpl 1b rts pc 2: movb (r2)+,r0 clr r1 rts pc 3: cmp r0,$'> bne 1f inc r1 1: rts pc 4: jsr r5,error; '< jmp aexit schar: .byte 'n, 012 .byte 't, 011 .byte 'e, 004 .byte '0, 000 .byte 'r, 015 .byte 'a, 006 / / / a8 -- pdp-11 assembler pass 1 chartab: .byte -14,-14,-14,-14,-02,-14,-14,-14 .byte -14,-22, -2,-14,-14,-22,-14,-14 .byte -14,-14,-14,-14,-14,-14,-14,-14 .byte -14,-14,-14,-14,-14,-14,-14,-14 .byte -22,-20,-16,-14,-20,-20,-20,-12 .byte -20,-20,-20,-20,-20,-20,056,-06 .byte 060,061,062,063,064,065,066,067 .byte 070,071,-20,-02,-00,-20,-14,-14 .byte -14,101,102,103,104,105,106,107 .byte 110,111,112,113,114,115,116,117 .byte 120,121,122,123,124,125,126,127 .byte 130,131,132,-20,-24,-20,-20,1f( "error" ); else printf( "shift %d", j1 ); } else printf("reduce %d",-j1 ); } /* output the final production */ if( lastred ) printf("\n\t. reduce %d\n\n", lastred ); else printf("\n\t. error\n\n" ); ret: settab(); } % r@& . 7 9  9 /9R~ \ z,9@~ \ 94~ \ KX*vu5 5 5X r e8A! y 5 pЁ5  @tU5 @tU @tU p +L9 /9 /9 /9 /(: /L: /l: /)~i)e~)x)er)l)ef)? b)e\)X)Li5 5 r eT8A! y: /: /: /: /;   _h@t6t-+_h%_h@tt+;   jsr r5,error; '* 1: jsr pc,addres add r0,dot rts pc errora: jsr r5,error; 'a rts pc checkreg: cmp r2,$7 bhi 1f cmp r3,$1 beq 2f cmp r3,$4 bhi 2f 1: jsr pc,errora 2: rts pc errore: jsr r5,error; 'e rts pc checkrp: cmp r4,$') beq 1f jsr r5,error; ') rts pc 1: jsr pc,readop rts pc /* fake portable I/O routines, for those sites so backward as to not have the port. library */ int cin, cout; extern int fin, fout; copen( s, c ) char *s; { int f; if( c == 'r' ){ fin = f = open( s, 0 ); } else if( c == 'a' ){ f = open( s, 1 ); seek( f, 0, 2 ); } else { /* c == w */ f = creat( s, 0666 ); } return( f ); } cflush(x){ /* fake! sets file to x */ flush(); fout = x; } system(){ error( "The function \"system\" is called" ); } ccll; skip/H/coll; skip/I/coll; skip/J/coll; skip/K/coll; skip/L/coll; skip/M/coll; skip/N/coll; skip/O/coll; skip/P/coll; skip/Q/coll; skip/R/coll; skip/S/coll; skip/T/coll; skip/U/coll; skip/V/coll; skip/W/coll; skip/X/coll; skip/Y/coll; skip/Z/coll; collect/'/cont; collect/-/hyphen; collect/ /out; collect/a/cont; collect/b/cont; collect/c/cont; collect/d/cont; collect/e/cont; collect/f/cont; collect/g/cont; collect/h/cont; collect/i/cont; collect/j/cont; collect/k/cont; collect/l/cont; collect/m/cont; colle: cmp r3,$24 / register type bne 1f jsr pc,checkreg clr r0 rts pc 1: add $2,dot clr r0 rts pc alp: jsr pc,readop jsr pc,expres jsr pc,checkrp jsr pc,checkreg cmp r4,$'+ bne 1f jsr pc,readop clr r0 rts pc 1: mov $2,r0 rts pc amin: jsr pc,readop cmp r4,$'( beq 1f mov r4,savop mov $'-,r4 br getx 1: jsr pc,readop jsr pc,expres jsr pc,checkrp jsr pc,checkreg clr r0 rts pc adoll: jsr pc,readop jsr pc,expres add $2,dot clr r0 rts pc astar: jsr pc,readop cmp r4,$'* bne 1fose(i){ close(i); } cexit(i){ flush(); exit(); }  mov l(r1),r3 sub a(r1),r3 /L-A cmp r2,r3 ble 1f jsr pc,release mov r2,r0 jsr pc,allocate mov 4(sp),r0 / 1: mov a(r1),w(r1) /rewind w pointer mov a(r0),-(sp) / 4: mov (sp),0f mov afi,r0 sys seek;0:.. ;0 /set input pointer cmp r2,$512. ble 2f mov $512.,r3 /# output this time mov r3,0f mov r3,3f add r3,(sp) sub r3,r2 /# left to output br 1f / 2: mov r2,0f mov r2,3f mov r2,r3 clr r2 / 1: mov afi,r0 sys read;b1;0:.. bes bad cmp r0,r3 bne bad mov afout,r0 mov (r1),0f add r3,(r1) sys2J` & 6  v2w d2 BNf  |4et7A  |  R " <' p Fw*2w 2 @t5t@t5^Vw1w 1 >/ (4 p/N `/ %  ` x4 3  4 4 p5 5 P/ p/5 3  H&5)5 6  ff 2%  -5ff 2e05  d3  N5 `5 s55 P/ p/w0w 0Ƅ >//&w0w 0 @ =||((lp&03)==0))return(0); if((lt>>3) == (lp>>3)){ return(lt&03); } if((lt>>3) > (lp>>3)) return(3); return(1); } int cdebug 0; /* debug for common states */ wract(i){ /* output state i */ /* temp1 has the actions, lastred the default */ int p, p0, p1, size; int ntimes, tred, count, j; struct item *q0, *q1; /* find the best choice for lastred */ lastred = 0; ntimes = 0; for( j=1; j<=nterms; ++j ){ if( temp1[j] >= 0 ) continue; if( temp1[j]+lastred == 0 ) continue; /* co/ / / cmplx fortran function .globl cmplx. .globl dcmplx. .globl retrn .globl temp .globl rerr dcmplx.:temp .+2 setd br 1f cmplx.: temp .+2 setf 1: cmp *2(sp),$2 bne 1f mov r3,r1 tst (r1)+ movf *(r1)+,r0 movf *(r1)+,r1 mov $temp,r1 movf r0,(r1)+ movf r1,(r1)+ jmp retrn 1: jsr r5,rerr; 6. / / / cexp fortran function .globl cexp. .globl rval8p .globl retrn .globl temp .globl rerr .globl exp .globl sin .globl cos cexp.: temp rval8p; 2 .+2 setf movf (sp)+,r0 jsr pc,exp bes 1f movf r0,temp movf (sp),r0 jsr pc,sin mulf temp,r0 movf r0,temp+4 movf (sp)+,r0 jsr pc,cos mulf temp,r0 movf r0,temp jmp retrn 1: jsr r5,rerr; 5. turn(1); return(0); } numb(str) char *str; { /* convert to integer */ int k; for (k=0; *str >= '0' && *str <= '9'; str++) k = k*10 + *str - '0'; return(k); } broken(str, nlin) { switch(ylet(str,nlin)) { case 'n': case 'N': return(1); } return(0); } ylet (str, k) char *str; { k++; while (*str &&k--) str++; return(*--str); } span(str, k) { switch(ylet(str,k)) { case 's': case 'S': return(1); } return(0); } maknew(str) char *str; { /* make two numerical fields */ ine error5 cmp r0,$buffer+nword+nword blo 1b mov (sp)+,r0 rts pc mtrack: mov (r0)+,(r5) jsr pc,flag rts r0 flag: bit $100200,tccm beq flag blt error6 rts pc flag1: bit $100200,tccm beq flag1 bge 1f tst tcst bge error7 add $2,(sp) 1: rts pc comobv: mov r0,r4 bic $!777,r0 asl r0 mov cobtab(r0),r0 swab r0 clr r1 ror r0 rol r1 asl r0 asl r0 rol r1 swab r4 bic $177401,r4 bis cobtab(r4),r0 rts pc bcomobv: mov r0,r2 bic $!70,r2 mov r0,r3 mov $6.,r4 1: asr r3 dec r4 bne 1d Missing temp fileIllegal initialization.bss L%d:.=.+4 .text mov%c r%d,r0 mov%c r%d,%c(sp) tst%c r%d No code table for op: %sNo code table for op %dmov%c r%d,r%d mov%c r%d,r%d Register overflow: simplify expressionr%d*tst r%d adcsbc r%d """""Hh(FTNTNNNt*+,HIJB@@B@@L\\nnh "56&$L%d(r%d)r%dCompiler error: pname(r%d)%c%c(r%d)pname called illegallyIllegal use of re?{xuJ q | z * inp1L24L20004L27L28 _font"~fontp1p2_shift"~shiftp1L30L32 _sqrt"~sqrthinpsp2L34L35 L36 L37L20006L40 _lpile"0L10005 L10006 L69L62>L65L59~lpile0binlist2hitypebhgetvec (n) { return (alloc(n)); }  alloc(); while(a != '\n') { c->p1 = d = alloc(); c = d; l: c->ch = a; if(a == '\0') { if(fin) { close(fin); fin = 0; a = getchar(); goto l; } rfail = 1; break; } a = getchar(); } b->p2 = c; if(rfail) { delete(b); b = 0; } return(b); } syspot(string) struct node *string; { register struct node *a, *b, *s; s = string; if (s!=0) { a = s; b = s->p2; while(a != b) { a = a->p1; putchar(a->ch); } } putchar('\n'); } strstr(s) char s[]; { inti = r3 .globl putcall,iget,kput,putdec .globl generate,succ .globl decimal decimal: mov $1f+1,r0 jsr pc,putcall jsr pc,iget mov (r0),r0 jsr pc,kput jmp succ 1: mov (i),r0 jsr pc,putdec jmp generate 2.,b1e(r2) / set end clr w1(r2) /clear w mov (sp)+,r0 sub b1s(r2),r0 add r1,r0 / set r0=byte addr in buffer mov (sp)+,r1 mov (sp)+,r3 rts pc / / / routine to wc a buffer / mov buffer addr,r2 / mov buffer addr+6,r1 beginning of buffer / jsr pc,clean / clean: mov r0,-(sp) mov b1s(r2),0f mov afout,r0 sys seek;0:..;0 mov r1,0f sys write;0:..;512. clr w1(r2) /clear w mov (sp)+,r0 rts pc / / routine to get buffer addr of byte whose disc / addr is in r0 - also returns addr of write / flag for buffb = isn++; brklab = isn++; label(o3 = isn++); statement(0); label(contlab); contlab = o1; if ((o=symbol())==KEYW && cval==WHILE) { cbranch(tree(), o3, 1); label(brklab); brklab = o2; goto semi; } goto syntax; case CASE: o1 = conexp(); if ((o=symbol())!=COLON) goto syntax; if (swp==0) { error("Case not in switch"); goto stmt; } if(swp>=swtab+swsiz) { error("Switch table overflow"); } else { swp->swlab = isn; (swp++)->swval =.globl allocate,putword,putchar .globl iget .globl succ .globl table table: mov $10,r0 jsr pc,allocate mov r1,-(sp) clr r0 jsr pc,putword jsr pc,putword jsr pc,putword jsr pc,putchar jsr pc,iget mov (sp)+,(r0) jmp succ dy ~ { x w t q n k h e b v s p m j g d a u r o l i f c ` _ \ Y V S P M J ^ [ X U R O L I ] Z W T Q N K H G D A > ; 8 5 2 F C @ = : 7 4 1 E B ? < 9 6 3 0 / , ) & #   . + ( % "    - * '  o1; label(isn++); } goto stmt; case SWITCH: o1 = brklab; brklab = isn++; np = pexpr(); chkw(np); rcexpr(block(1,RFORCE,0,0,np), regtab); pswitch(); brklab = o1; return; case DEFAULT: if (swp==0) error("Default not in switch"); if ((o=symbol())!=COLON) goto syntax; label(deflab = isn++); goto stmt; case FOR: o1 = contlab; o2 = brklab; contlab = isn++; brklab = isn++; if (o=forstmt()) goto syntax; label(brklab); contlab = i = dfile(temp[t1].beg); if((ct = temp[t1].ct) >= 8) { ct = 8; *curf = -1; } else { *curf = '\t'; } put(i,temp[t1].beg,ct); put(i,curf,curfl); if(cross) put(i,curs,cursl); conf(lno,4,lbuf); put(i,lbuf,5); break; case 2: i = dfile(curf+1); put(i,curf+1,curfl-1); if(cross) put(i,curs,cursl); else { conf(lno,4,lbuf); put(i,lbuf,5); } if((ct = temp[t1].ct) >= 8) { put(i,temp[t1].beg,8); put(i,&mone,1); PARN) { /* incr part */ peeksym = -1; statement(0); branch(contlab); return(0); } l = contlab; contlab = isn++; st = tree(); if ((o=symbol()) != RPARN) return(o); ss = space; if (space-treebase > forsps) { error("Expression too large"); space = &treebase[forsps]; } sp2 = savxpr; for (sp1=treebase; sp1hclass>0) { error("Redefinition"); goto stmt; } o1->hclass = STATIC; o1->htype = ARRAY; if (o1->hoffset==0) o1->hoffset = isn++; label(o1->hoffset); if ((peeksym=symbol())==RBRACE) return; goto stmt; } } peeksym = o; rcexpr(tree(), efftab); semi: if ((o=symbol())==SEMI) return; syntax: error("Statement synturn(0); } flsh(fil) { extern tp[],utmp; if(optr[fil] <= 0) return(optr[fil]); if(bct[fil]++ >= 128 && utmp == 0) { printf("Wraparound temp file %d\n",fil); dexit(); } nflush++; if(write(tp[fil],obuf[fil],optr[fil]) != optr[fil]) return(-1); optr[fil] = 0; return(0); } nt point; char *p, *q; p = str; for (point=0; *str; str++) if (*str=='.') point=1; if (!point && *(str-1)== '$') return(0); for(; str>p; str--) if ( (point && *str == '.') || (!point && digit(*(str-1)) ) ) break; if (!point && p==str) /* not numerical, don't split */ return(0); p= str; q = exstore; while (*exstore++ = *str++); *p = 0; return(q); } digit(x) { return(x>= '0' && x<= '9'); } settab(ncol, ilin) { int k, icol; printf(".ta "); for (icol = 0; icolname, cval); if (nel>nchstr) { strflg++; printf(".=.+%o\n", nel-nchstr); strflg = 0; nchstr = nel; } return(nchstr); } if (peeksym==RBRACE) return(ninit); initflg++; s = tree(); initflg = 0; switch(width) { case 1: printf(".byte "); if (s->op != CON) goto bad; case 2: if (s->op==CON) { printf("%o\n", s->value) case SFCON: case CON: printf("$"); psoct(p->value); return; case FCON: printf("L%d", p->value); return; case NAME: i = p->offset; if (flag==2) i =+ 2; if (i) { psoct(i); if (p->class!=OFFS) putchar('+'); if (p->class==REG) regerr(); } switch(p->class) { case SOFFS: case XOFFS: pbase(p); case OFFS: printf("(r%d)", p->regno); return; case EXTERN: case STATIC: pbase(p); return; case REG: printf("r%d", p->nloc); return; } ellect/1/cont; collect/2/cont; collect/3/cont; collect/4/cont; collect/5/cont; collect/6/cont; collect/7/cont; collect/8/cont; collect/9/cont; collect/0/cont; collect/./cont; collect/_/cont; collect/ /out; skip/'/agobl; skip/"/agobl; skip/op==FCON || s->op==SFCON) { if (type==STRUCT) { ninit =+ 3; goto prflt; } goto bad; } rcexpr(block(1,INIT,0,0,s), regtab); break; case 4: sf = fcval; printf("%o;%o\n", sf); goto flt; case 8: prflt: printf("%o;%o;%o;%o\n", fcval); flt: if (s->op==FCON || s->op==SFCON) break; default: bad: bxdec(); } return(++ninit); } bxdec() { error("Inconsistent external initialization"); } statement(d) { register o, o1, o2; int o3, o4; structrror("Compiler error: pname"); return; case AMPER: putchar('$'); p = p->tr1; if (p->op==NAME && p->class==REG) regerr(); goto loop; case AUTOI: printf("(r%d)%c", p->nloc, flag==1?0:'+'); return; case AUTOD: printf("%c(r%d)", flag==1?0:'-', p->nloc); return; case STAR: p = p->tr1; putchar('*'); goto loop; } error("pname called illegally"); } regerr() { error("Illegal use of register"); } pbase(ap) struct tnode *ap; { register struct tnode *p; p = ap; if (p->class=ength(ds) / nel; /* * Pretend a structure is kind of an array of integers. * This is a kludge. */ if (basetype==STRUCT) { nel =* realwidth/2; width = 2; } if ((peeksym=symbol())==COMMA || peeksym==SEMI) { printf(".comm\t_%.8s,%o\n",ds->name,(nel*width+ALIGN)&~ALIGN); return; } ninit = 0; printf(".data\n_%.8s=.\n", ds->name); if ((o=symbol())==LBRACE) { do ninit = cinit1(ds, basetype, width, ninit, nel); while ((o=symbol())==COMMA); if (o!=RBRACE) peeksym = o; } else { pe; > A 7 C F 2 5 D G " % ( + ' " %   7 : ) , / =SOFFS || p->class==STATIC) printf("L%d", p->nloc); else printf("_%.8s", &(p->nloc)); } xdcalc(ap, nrleft) struct tnode *ap; { register struct tnode *p; register d; p = ap; d = dcalc(p, nrleft); if (d<20 && p->type==CHAR) { if (nrleft>=1) d = 20; else d = 24; } return(d); } dcalc(ap, nrleft) struct tnode *ap; { register struct tnode *p, *p1; if ((p=ap)==0) return(0); switch (p->op) { case NAME: if (p->class==REG) return(9); case AMPER: case FCON: case AUTOI: case AL209 L210 L211+L212/~label lL2145_popstk" L10057( L215 L216 L219 L221 ~popstk aL220:L20072 L222EL223V~error fsp1p2p3 p4 p5p6_flush _fout L225b~psocth ansignnL227~ L228g# /* C compiler */ #include "c0h.c" extdef() { register o, elsize; int type, sclass; register struct hshtab *ds; if(((o=symbol())==EOF) || o==SEMI) return; peeksym = o; type = INT; sclass = EXTERN; xdflg = FNDEL; if ((elsize = getkeywords(&sclass, &type)) == -1 && peeksym!=NAME) goto syntax; if (type==STRUCT) blkhed(); do { defsym = 0; decl1(EXTERN, type, 0, elsize); if ((ds=defsym)==0) return; funcsym = ds; ds->hflag = FNDEL; printf(".globl _%.8s\n", ds->name); xdflg UTOD: return(12); case CON: case SFCON: return(p->value==0? 4:(p->value==1?5:8)); case STAR: p1 = p->tr1; if (p1->op==NAME || p1->op==CON) return(12); } return(p->degree<=nrleft? 20: 24); } notcompat(ap, ast, op) struct tnode *ap; { register at, st; register struct tnode *p; p = ap; at = p->type; st = ast; if ((at&07)==STRUCT) at =& 077770; /* map to int */ if (st==0) /* word, byte */ return(at>1 & at<=07); if (st==1) /* word */ return(at>0 & at<=07); st =- 2; if ((at&0%7 te`  %7    7  ww Z@e5@e5 H r e.A! y0Zʋ  L%(ʕ  6ʕ    0 7&e e & %&  e&  &  e ?e%P   VeS Q  _ D &7>%7L7F_%$ 76707x($_%" %/= 0; if ((ds->type&XTYPE)==FUNC) { if ((peeksym=symbol())==LBRACE || peeksym==KEYW) { funcblk.type = decref(ds->type); cfunc(ds->name); return; } } else cinit(ds); } while ((o=symbol())==COMMA); if (o==SEMI) return; syntax: error("External definition syntax"); errflush(o); statement(0); } cfunc(cs) char *cs; { register savdimp; savdimp = dimp; printf(".text\n_%.8s:\n", cs); if (stflg) printf("~~%.8s:\n", cs); declist(ARG); regvar = 5; retlab = isn++; if ((peeksym07L41L42 L43*L44J_lintyp"L10008jL10009lL45L46L10010L47L48L49L20002L52L10011L54(L55L10012"L58_plength L10013TL59^L60 L62~_convert"L64L10014L10015cret L10019L72L74L77L70.L73L75L76~convertnpt/L61RL67L68L69rL20005L71}L72L73L74*L75L200070L77\L79L81L82L10012L83L10013L84_cpyact"" L10014L85L10015L86 L89L93&L94_finact"L1L966_getchar _putchar L99VL100;L101hL102ZL103L104pL106L107L109cret ~fin = symbol()) != LBRACE) error("Compound statement required"); statement(1); printf("L%d:jmp cret\n", retlab); dimp = savdimp; } cinit(ds) struct hshtab *ds; { register basetype, nel, ninit; int o, width, realwidth; nel = 1; basetype = ds->type; /* * If it's an array, find the number of elements. * "basetype" is the type of thing it's an array of. */ while ((basetype&XTYPE)==ARRAY) { if ((nel = dimtab[ds->ssp&0377])==0) nel = 1; basetype = decref(basetype); } realwidth = width = l_debug _defsym _funcsym _xdflg _proflg _stflg _csym _cval _fcval _nchstr _nerror _paraml _parame _strflg _osleft _mosflg _initflg _inhdr _dimtab _obuf _sbuf _dimp _regvar _funcblk eksym = o; ninit = cinit1(ds, basetype, width, 0, nel); } /* * Above we pretended that a structure was a bunch of integers. * Readjust in accordance with reality. * First round up partial initializations. */ if (basetype==STRUCT) { if (o = 2*ninit % realwidth) printf(".=.+%o\n", realwidth-o); ninit = (2*ninit+realwidth-2) / realwidth; nel =/ realwidth/2; } /* * If there are too few initializers, allocate * more storage. * If there are too many initializers, extend * the decla tnode *np; stmt: switch(o=symbol()) { case EOF: error("Unexpected EOF"); case SEMI: case RBRACE: return; case LBRACE: if (d) { o2 = blkhed() - 6; if (proflg) { printf("mov\t$L%d,r0\n", isn); printf("jsr\tpc,mcount\n"); printf(".bss\nL%d:.=.+2\n.text\n", isn++); } printf("jsr r5,csv\n"); if (o2==2) printf("tst -(sp)\n"); else if (o2 != 0) printf("sub $%o,sp\n", o2); } while (!eof) { if ((o=symbol())==RBRACE) return; peeksym = o; statement(llect/u/cont; collect/v/cont; collect/w/cont; collect/x/cont; collect/y/cont; collect/z/cont; collect/A/cont; collect/B/cont; collect/C/cont; collect/D/cont; collect/E/cont; collect/F/cont; collect/G/cont; collect/H/cont; collect/I/cont; collect/J/cont; collect/K/cont; collect/L/cont; collect/M/cont; collect/N/cont; collect/O/cont; collect/P/cont; collect/Q/cont; collect/R/cont; collect/S/cont; collect/T/cont; collect/U/cont; collect/V/cont; collect/W/cont; collect/X/cont; collect/Y/cont; collect/Z/cont; cored size for benefit of "sizeof" */ if (ninitnel) { if ((ds->type&XTYPE)==ARRAY) dimtab[ds->ssp&0377] = ninit; nel = ninit; } /* * If it's not an array, only one initializer is allowed. */ if (ninit>1 && (ds->type&XTYPE)!=ARRAY) error("Too many initializers"); if (((nel&width)&ALIGN)) printf(".even\n"); } cinit1(ds, type, awidth, aninit, nel) struct hshtab *ds; { float sf; register struct tnode *s; register width, n0); } error("Missing '}'"); return; case KEYW: switch(cval) { case GOTO: if (o1 = simplegoto()) branch(o1); else dogoto(); goto semi; case RETURN: doret(); goto semi; case IF: np = pexpr(); o2 = 0; if ((o1=symbol())==KEYW) switch (cval) { case GOTO: if (o2=simplegoto()) goto simpif; cbranch(np, o2=isn++, 0); dogoto(); label(o2); goto hardif; case RETURN: if (nextchar()==';') { o2 = retlab; goto simpif; } actiL111$L112L113L20009L10023L10024L116L117L118L119L200114L121L122 L10026L10027L141^L140NL142nL138*L136L137L139<L143~~defin>cpcptL124~L125fL126L123zL128L129?L130L131$L132L133L10028L144\L20012  if (stack->typ) writes("illegal function"); a1 = stack->p1; if (a1->typ!=5) writes("illegal function"); a1 = a1->p2; op = a1->p1; a3base = a3 = alloc(); a3->p2 = op->p2; op->p2 = 0; a1 = a1->p2; a2 = list->p2; f1: if (a1!=0 & a2!=0) goto f2; if (a1!=a2) writes("parameters do not match"); op = op->p1; goto f3; f2: a3->p1 = a4 = alloc(); a3 = a4; a3->p2 = and(a1); assign(a1->p1, eval(a2->p2, 1));/* recursive */ a1 = a1->p2; a2 = a2->p1; goto f1; f3: o; case 5: a = addr->p2->p1; delete(a->p2); a->p2 = value; return; } } >p1; if (e == 0) etc->p1 = 0; else etc->p1 = eval(e, 0); e = b->p2; if (e == 0) etc->p2 = 0; else { e = eval(e, 1); etc->p2 = strbin(e); delete(e); } goto badvanc; retard: a = back->p1; if (a == 0) { rfail = 1; goto fail; } list = a; back = list->p2; var = back->p2; str = var->p1; etc = var->p2; if (etc->p2) goto retard; if (var->typ == 1) { if (bextend(str, last) == 0) goto retard; goto adv0; } if (ubextend(str, last) == 0) goto retard; adv0: a = str->p2; adv01->typ == 0) { list->p1 = 0; if (rfail == 1) { a = 0; goto fail; } list = base; if (r == 0) next = last = 0; else { next = r->p1; last = r->p2; } goto adv1; } b = alloc(); list->p1 = b; list = b; badv1: list->p2 = back = alloc(); back->p1 = last; b = a->p2; c = a->typ; list->typ = c; if (c < 2) { back->p2 = eval(b, 1); goto badvanc; } last = list; str = alloc(); etc = alloc(); back->p2 = var = alloc(); var->typ = b->typ; var->p1 = str; var->p2 = etc; e = b-+... main.c2parser.c0zacc.c)zerr.c*zinit.ca.outmain.oparser.ozacc.ozerr.ozinit.o: if (a == last) next = 0; else next = a->p1; advanc: a = list->p1; if (a == 0) { a = alloc(); if (r == 0) { a->p1 = a->p2 = 0; goto fail; } b = r->p1; a->p1 = b; if (next == 0) { a->p2 = r->p2; goto fail; } while(1) { e = b->p1; if (e == next) { a->p2 = b; goto fail; } b = e; } } list = a; adv1: back = list->p2; var = back->p2; d = list->typ; if(d < 2) { if (var == 0) goto advanc; if (next == 0) goto retard; a = next; b = var->p1;p = execute(op); /* recursive */ if (op) goto f3; a1 = stack->p1->p2; op = a1->p1; a3 = a3base; stack->p1 = op->p2; stack->typ = 1; op->p2 = a3->p2; f4: a4 = a3->p1; free(a3); a3 = a4; a1 = a1->p2; if (a1 == 0) goto advanc; assign(a1->p1, a3->p2); goto f4; case 11: case 10: case 9: case 8: case 7: a1 = and(stack); stack = pop(stack); a2 = and(stack); a3 = doop(op, a2, a1); delete(a1); delete(a2); stack->p1 = a3; stack->typ = 1; goto advanc; case 15:,...$dextern&y0.c(y1.cKy2.c1y3.c#y4.cy5.cl.outy0.oy1.oy2.oy3.oy4.oy5.oa.out e = var->p2; while(1) { if (a->ch != b->ch) goto retard; if (b == e) goto adv01; if (a == last) goto retard; a = a->p1; b = b->p1; } } str = var->p1; etc = var->p2; str->p1 = next; str->p2 = 0; c = etc->p2; if (var->typ == 1) { d = bextend(str, last); if (d == 0) goto retard; if (c == 0) goto adv0; while(1) { c =- d; if (c == 0) goto adv0; if (c < 0) goto retard; d = bextend(str, last); if (d == 0) goto retard; } } if (c = a1 = copy(list->p2); a2 = 1; goto l3; case 14: a1 = list->p2; a2 = 0; l3: stack = push(stack); stack->p1 = a1; stack->typ = a2; goto advanc; } } doop(op, arg1, arg2) { register int a1, a2; a1 = arg1; a2 = arg2; switch (op) { case 11: return(div(a1, a2)); case 10: return(mult(a1, a2)); case 8: return(add(a1, a2)); case 9: return(sub(a1, a2)); case 7: return(cat(a1, a2)); } return(0); } execute(e) struct node *e; { register struct node *r, *b, *c; struct node *[], yyr1[], yyr2[], yyact[], yypact[]; auto int *ps, s[_maxdepth]; auto int ac, n, *p; yystate = 0; yychar = -1; yynerrs = 0; yyerrflag = 0; ps= &s[0]-1; yypv= &yyv[0]-1; stack: /* put a state and value onto the stack */ if( yydebug ) printf( "state %d, value %d, char %d\n",yystate,yyval,yychar ); *++ps = yystate; *++yypv = yyval; newstate: /* set ap to point to the parsing actions for the new state */ p = &yyact[ yypact[yystate+1] ]; actn: /* get= 0) { if(d==3 & next!=0) { str->p2 = last; goto adv0; } goto advanc; } while(c--) if (ubextend(str, last) == 0) goto retard; goto adv0; fail: list = base; goto f1; fadv: free(back); b = list->p1; free(list); if (b == 0) return(a); list = b; f1: back = list->p2; var = back->p2; if (list->typ < 2) { delete(var); goto fadv; } str = var->p1; etc = var->p2; if (a != 0 & etc->p1 != 0) { if (str->p2 == 0) { free(str); str = 0; } assign(etc->p1, copy(str)); } m, *ca, *d, *a; r = e->p2; lc = e->ch; switch (e->typ) { case 0: /* r g */ a = r->p1; delete(eval(r->p2, 1)); goto xsuc; case 1: /* r m g */ m = r->p1; a = m->p1; b = eval(r->p2, 1); c = search(m, b); delete(b); if (c == 0) goto xfail; free(c); goto xsuc; case 2: /* r a g */ ca = r->p1; a = ca->p1; b = eval(r->p2, 0); assign(b, eval(ca->p2, 1)); goto xsuc; case 3: /* r m a g */ m = r->p1; ca = m->p1; a = ca->p1; b = eval(r->p2, 0); d = search(m, b->p2d p  ~ | !  |  c = j f   z C } n  }   \!  f  } x { B y  2 n LOPS  'M8 N=@Cp) o& +MK c  *MB =  'M88)  'wD [^MPSV)  *MX b &M0J) & &M  &M$#&), M  Uif (str) free(str); free(etc); free(var); goto fadv; } ); if (d == 0) goto xfail; c = eval(ca->p2, 1); if (d->p1 == 0) { free(d); assign(b, cat(c, b->p2)); delete(c); goto xsuc; } if (d->p2 == b->p2->p2) { assign(b, c); free(d); goto xsuc; } (r=alloc())->p1 = d->p2->p1; r->p2 = b->p2->p2; assign(b, cat(c, r)); free(d); free(r); delete(c); goto xsuc; } xsuc: if (rfail) goto xfail; b = a->p1; goto xboth; xfail: rfail = 0; b = a->p2; xboth: if (b == 0) { return(e->p1); } b = eval(b, 0); if (b == lookr movb r0,(r1)+ cmp r0,$'# bne 1b sub $2,r1 cmp r1,r4 blo 2b br 1b 1: clrb (r1) cmp r1,r4 blos start mov $1,tapa mov $-6144.,wc jsr pc,tread clr r1 1: mov r1,r2 mov r4,r0 2: cmpb (r0)+,(r1) bne 2f tstb (r1)+ bne 2b br 1f 2: mov r2,r1 add $64.,r1 cmp r1,$12288. blo 1b jsr pc,rew br start 1: mov 44.(r2),tapa mov 38.(r2),r0 inc r0 clc ror r0 neg r0 mov r0,wc clr r0 1: clr (r0)+ cmp r0,sp blo 1b jsr pc,tread jsr pc,rew br callout tapa: 0 wc: 0 ba: 0 name = ..-32. #include "sno.h" /* * sno4 */ and(ptr) struct node *ptr; { register struct node *a, *p; p = ptr; a = p->p1; if (p->typ == 0) { switch (a->typ) { case0: case 0: a->typ = 1; case 1: goto l1; case 3: flush(); return(syspit()); case 5: a = a->p2->p1; goto l1; case 6: return(binstr(nfree())); } writes("attempt to take an illegal value"); goto case0; l1: a = copy(a->p2); } return(a); } eval(e, t) struct node *e; { struct node *list, *a2, *a3, *a4, *a3base; et) return(0); if (b == lookfret) { rfail = 1; return(0); } if (b->typ!=2) writes("attempt to transfer to non-label"); return(b->p2); } assign(adr, val) struct node *adr, *val; { register struct node *a, *addr, *value; addr = adr; value = val; if (rfail == 1) { delete(value); return; } switch (addr->typ) { default: writes("attempt to make an illegal assignment"); case 0: addr->typ = 1; case 1: delete(addr->p2); addr->p2 = value; return; case 4: sysput(value); returnd1h1h2h3p1p2p3supshL772 L78\ L79f L80s L81y L82d L83 L84 L85 L86  register struct node *a1, *stack, *op; if (rfail == 1) return(0); stack = 0; list = e; goto l1; advanc: list = list->p1; l1: op = list->typ; switch (op) { default: case 0: if (t == 1) { a1 = and(stack); goto e1; } if (stack->typ == 1) writes("attempt to store in a value"); a1 = stack->p1; e1: stack = pop(stack); if (stack) writes("phase error"); return(a1); case 12: a1 = and(stack); stack->p1 = look(a1); delete(a1); stack->typ = 0; goto advanc; case 13: Z ] I O R U X [ J 9 ,68,16,74,17,75,18,76,19,77,50 ,92,51,93,52,94,53,95,54,96,73 ,47,87,47,98,47,116,131,117,132,133 ,47,-1,4,-1,20,-1,104,104,125,-1 ,105,-1,106,70,99,71,100,72,101,127 ,134,128,135,129,136,130,137,-1,97,-1 ,107,-1,108,-1,109,-1,115,93,116,-1 ,52,-1,7,-1,8,-1,10,-1,11,-1 ,12,-1,13,-1,51,-1,14,-1,102,-1 ,15,-1,53,95,117,-1,54,-1,55,-1 ,16,-1,17,-1,18,-1,19,25,84,30 ,85,42,88,43,89,44,90,45,91,103 ,123,-1,79,-1}; int yypgo[] {0,1,3,13,53,55,57,61,63,79 ,81,83,85,87,91,93,95,97,99,101 ,103,105,107,109,111,1138ii8Y ((89((9Y 99 IHH HI((9Y extern int yyline; /* input line number */ yyerror(s) char *s; { extern int yychar; extern char *yysterm[]; printf("\n%s", s ); if( yyline ) printf(", line %d,", yyline ); printf(" on input: "); if( yychar >= 0400 ) printf("%s\n", yysterm[yychar-0400] ); else switch ( yychar ) { case '\t': printf( "\\t\n" ); return; case '\n': printf( "\\n\n" ); return; case '\0': printf( "$end\n" ); return; default: printf( "%c\n" , yychar ); return; } } tcdt = 177350 tccm = 177342 tread: mov $tcdt,r0 mov $tccm,r1 for: mov $3,(r1) / rbn for 1: tstb (r1) bge 1b tst (r1) blt rev cmp tapa,(r0) beq rd bgt for rev: mov $4003,(r1) / rbn bac 1: tstb (r1) bge 1b tst (r1) blt for mov (r0),r2 add $5,r2 cmp tapa,r2 blt rev br for rd: mov ba,-(r0) / bus addr mov wc,-(r0) / wc mov $5,-(r0) / read 1: tstb (r1) bge 1b tst (r1) blt tread rts pc rew: mov $4003,tccm rts pc 8ii8Y ((89((9Y 99 IHH HI((9Y  the next action, and perform it */ n = ( ac = *p++ ) & 07777; /* n is the "address" of the action */ switch( ac>>12 ) { /* switch on operation */ case 1: /* skip on test */ if( yydebug && (yychar<0) ){ yychar = yylex(); printf( "character %d read\n", yychar ); } if( n != ( (yychar<0) ? ( yychar=yylex() ) : yychar ) ) ++p; goto actn; /* get next action */ case 2: /* shift */ yystate=n; yyval=yylval; yychar= -1; if( yyerrfb bic $!7,r3 bis r3,r2 mov r0,r3 mov $6.,r4 1: asl r3 dec r4 bne 1b bic $!700,r3 bis r3,r2 com r2 bic $!777,r2 rts pc bn: .=.+2 savr5: .=.+2 savsp: .=.+2 cobtab: .=.+1024. buffer: .=.+nword+nword 7    r epA! y.  7  w(& %2)> 2e&&  % P 6%(#%1  X R7NJ~%)%/%* $e%P<7 & & % .>?=& & % -@A=" * % +_F  _D  l 7 ~ z\7  y b \%/_7L%0 %_ &  _ _F H_f = r5 i = r3 .globl j,n .globl iget,jget .globl succ,fail .globl .px,.pxs .pxs: mov i,r0 tst (i)+ br 1f .px: jsr pc,iget 1: inc litc mov n(f),-(sp) mov j(f),-(sp) mov r0,-(sp) 2: tstb *(sp) beq 2f jsr pc,jget cmpb r0,*(sp) beq 1f tst (sp)+ mov (sp)+,j(f) mov (sp)+,n(f) jmp fail 1: clr n(f) inc (sp) inc j(f) br 2b 2: cmp (sp)+,(sp)+ mov (sp)+,n(f) jmp succ litc: 0 _dlag ) --yyerrflag; goto stack; /* stack new state */ case 3: /* reduce */ if( yydebug ) printf("reduce %d\n",n); ps =- yyr2[n]; yypv =- yyr2[n]; yyval=yypv[1]; yyactr(n); /* consult goto table to find next state */ for( p= &yygo[yypgo[yyr1[n]]]; *p != *ps && *p >= 0 ; p =+ 2 ) ; yystate = p[1]; goto stack; /* stack new state and value */ case 4: /* accept */ return(0); case 0: /* error ... attempt to resume parsing */ F  ӕ.7 % {|%7 ,7%[[_F7_F_F5/&_T60|_T __Fw ZV P7J% %  D-@w,7 (@w  7  & 1 " t5 7 ww 7   %' t%8 ww C _. 7 _47  yP 7PC J r eA! y  1 .+  %00,8252 ,4401,8256,4402,8253,4403,8254,12312,4398,8255,4399 ,8257,4400,8252,4401,8256,4402,8253,4403,8254,12313 ,4387,8249,4388,8248,4398,8255,4399,8257,4400,8252 ,4401,8256,4402,8253,4403,8254,12314,4353,8225,4354 ,8224,4355,8226,4356,8227,4357,8228,4358,8235,4359 ,8237,4360,8236,4361,8234,4362,8238,4367,8197,4368 ,8198,4369,8229,4370,8231,4371,8230,4372,8232,4373 ,8233,4374,8218,4375,8221,4376,8219,4377,8220,4386 ,8201,4389,8213,4390,8217,4391,8214,4392,8215,4393 ,8216,4394,8223,4396,8222,0,4353,8225,4354, switch( yyerrflag ){ case 0: /* brand new error */ ++yynerrs; yyerror( "syntax error" ); case 1: case 2: /* incompletely recovered error ... try again */ yyerrflag = 3; /* find a state where "error" is a legal shift action */ while ( ps >= s ) { for( p= &yyact[ yypact[*ps+1] ] ; (*p>>12) == 1 ; p =+ 2 ) /* search ps actions */ if( *p == 4352 ) goto found; /* the current ps has no shift onn "rb.orc.ord.ore.orf.org.orh.orx.o39L213L214L10048_ispow2 L235hL10043L236L20045L10046L249~delayprregtabletreepp1L251HL10055(L20046BL250DL252b_sdelay"L253rL254~sdelayappp1L10056L256_ncopy"L255L10057L257L20049~ncopyappL261L260~chkleaf:error", pop stack */ if( yydebug ) printf( "error recovery pops state %d, uncovers %d\n", *ps, ps[-1] ); --ps; --yypv; } /* there is no state on the stack with an error shift ... abort */ abort: return(1); found: /* we have a state with a shift on "error", resume parsing */ yystate = p[1] & 07777; goto stack; case 3: /* no shift yet; clobber input char */ if( yydebug ) printf( "error recovegnore erase label dlabel setsiz 2: erase: jsr pc,cerase br disp label: jsr pc,getc tst r0 bne label br disp dlabel: clr vtcol clr vtlc 1: jsr pc,getc tst r0 beq disp jsr pc,char br 1b setsiz: jsr pc,getc mov r0,cscale br disp point: jsr r5,collect 4 jsr pc,vtpoint br disp vect: jsr r5,collect 8. jsr pc,vtvect br disp frame: jsr pc,getc br disp circle: clr xory mov $cxy,r1 1: jsr pc,getc movb r0,(r1)+ cmp r1,$cxy+6 blo 1b jmp disp / temp mov radius,r1 mov r1,# define NUMA 14 # define NUMC 128 # define NUMS 3 # define SIZA 8 # define SIZC 2 # define SIZS 8 # define PTRI 509 # define CHARI 4000 # define PTRX 509 # define CHARX 4000 # define CONT 1 # define COLL 2 # define SAVE 3 # define OUT 4 # define ASYM 5 # define ASW 6 # define CSYM 7 # define CSW 8 # define INCL 9 # define DECL 10 # define SK2 11 # define SK 12 # define TABS 13 # define SEMI 14 # define SHARP 15 # define SKIP 0 # define COLLECT 1 # define SKIP2 2 #define CREATC 0644 ry discards char %d\n", yychar ); if( yychar == 0 ) goto abort; /* don't discard EOF, quit */ yychar = -1; goto newstate; /* try again in the same state */ } } } @w0w 0ue @ 5r@ b  55_N f  5e}- = u=w0w / %@ b@tt5  @w/w / 2\ 15 / 15 / /5 / 5 /@t%t N 5 / -l15 /5 /5 @ 5 / -D1<1 6 /  1 11 16 /e....46 /e10W6 /%. 58B0 lA / eu-@ vH @ vH qA / M4@ 5}+N A / %AA /%NA@ A / - A / A / ww  %r  f 42 57o%af 42 5& f R2% f 1 5@wPw > w,qw>w ,A w.w N 1ww   ww ~wpDep  p % 21w7 p7 pׯp- p p(wp7 p .wpeAByyaccpt(){}  _pres _pfirst _pempty#_nnonter#_lastred#_ftable _foutput _arrndx _zzcwset#_zzpairs#_zzgoent#_zzgobes#_zzacent# _zzacsav#"_zznsave#$_zzclose#&_zzsrcon#(_zzrrcon#*_ctokn _lineno#,_peekc#._tstates _ntstate _mstates _clset _lkst ` _nlset#0_lsetsz#2_wsets ` _cwset _wssize#4_numbval _rflag#6_oflag#8_ndefout#:_nerrors#<_fatfl#>_machine 15,01114,01122,01107,03111,01120, 01103,01126,01105,01132,01104,01102,01123,01131, xxxxx,01106,01130,01101,01127,01112,01125,01113, 01060,03061,01062,01063,01064,01065,01066,01067, 01070,01071,01052,01055,00004,00005,00006,01055, 00007,01100,02050,02051,03133,02135,00010,00011, 01075,00012,03072,01053,xxxxx,04041,00013,01077, 02047,04174,xxxxx,01043,00014,01044,xxxxx,xxxxx, xxxxx,xxxxx,xxxxx,xxxxx,xxxxx,xxxxx,xxxxx,xxxxx, xxxxx,xxxxx,xxxxx,xxxxx,xxxxx,xxxxx,xxxxx,xxxxx, }; int ibuf[259]; int obuf[2(chdir ../util; tp 2cr *) >/dev/null : 0 mboot dd if=../util/mboot ibs=512 count=1 conv=sync : 1 hboot dd if=../util/hboot ibs=512 count=1 conv=sync : 2 thru 97 dd if=/dev/tap2 bs=512 skip=1 count=96 : 98 dd if=../util/hpuboot ibs=512 count=1 conv=sync : 99 dd if=../util/rpuboot ibs=512 count=1 conv=sync : 100 dd if=../util/rkuboot ibs=512 count=1 conv=sync : 101 thru 4099 dd if=/dev/rk0 bs=512 skip=1 count=3999 : 4100 dd if=../util/rkuboot ibs=512 count=1 conv=sync : 4101 thru 8099 dd if=/dev/rk1 bs=512 skd } z  |  } break; case 46:{ yyval = numb(yypv[1]); } break; case 47:{ yyval = numb(yypv[1]); } break; case 48:{ yyval = 'H'; } break; case 49:{ yyval = 'B'; } break; case 50:{ yyval = 'N'; } break; case 51:{ yyval = 'D'; } break; case 52:{ yyval = 'T'; } break; case 53:{ yyval = 'U'; } break; case 56:{ yyval = yypv[2]->c1; } break; case 57:{ yyval = '{'; } break; case 58:{ yyval = yypv[2]->c1; } break; case 59:{ yyval = '}'; } break; case 60:{ yyval = 0; } break; case 61:{ lp[ct++] = yypv[1]; } break; case 62:{ lp[.globl .m,.q,.r .globl .p,sprv .m: jsr pc,sprv mov (sp),r0 mpy 4(sp),r0 mov r1,4(sp) br 1f .q: jsr pc,sprv mov 4(sp),r1 sxt r0 dvd (sp),r0 mov r0,4(sp) br 1f .r: jsr pc,sprv mov 4(sp),r1 sxt r0 dvd (sp),r0 mov r1,4(sp) 1: jmp .p  { switch ( ylet(style[icol],ilin)) { default: case 'L': case 'l': format = "%s@"; break; case 'R': case 'r': format= "@%s"; break; case 'n': case 'N': if (!dwide[icol] || tabentry[ilin][icol+1] != 0) { format=dwide[icol]? "@%s" : "%s@"; break; } case 'c': case 'C': format = "@%s@"; break; case 's': case 'S': format= ""; break; } if (! (dwide [icol-1]>0 && tabentry[ilin][icol] == 0 )) printf(format, tabentry[ilin][icol]); onbr"~chconbrlL40L42_dogoto"~dogotonp_tree _build _chkw _doret"~dorettL45D~putcharPbcL47b_putc L271 L273 ~getypez dstypeoL10071 L268 L274x L20048 L279 L280 L282` _conexp L283< L20046$ L286p ~decsyn oL288~redec L290fltused  { int i; char *o; /*printf("%d %c %d\n",fil,*string,n);/*DEBUG*/ string--; if((i = optr[fil] + n - 512) >= 0) { n =- i; o = &obuf[fil][optr[fil]] -1; while(--n >= 0) *++o = *++string; optr[fil] = 512; flsh(fil); n = i; } o = &obuf[fil][optr[fil]] - 1; optr[fil] =+ n; while(--n >= 0) { *++o = *++string; } return(0); } flsh(fil) { extern tp[]; if(optr[fil] <= 0) return(optr[fil]); nflush++; if(write(tp[fil],obuf[fil],optr[fil]) != optr[fil]) return(-1); optr[fil] = 0/ read rk rblk: iocom = 5 f = r5 i = r3 .globl j .globl succ .globl ctest,iget .globl string string: tst -(sp) jsr pc,iget 1: mov j(f),(sp) mov r0,-(sp) jsr pc,ctest mov (sp)+,r0 bcs 1b mov (sp)+,j(f) jmp succ *INSTR*/ /* dexit(); /*INSTR*/ /* times(tbuf); /*INSTR*/ /* tm1 = tbuf[0]/6; /*INSTR*/ /* tm2 = tbuf[1]/6; /*INSTR*/ /* printf("Prep: %d %d\n", tm1, tm2); /*INSTR*/ /* exit(); /*DEBUG*/ fn = "/bin/sort"; av[0] = "sort"; av[1] = tmp[0]; av[2] = "-o"; av[3] = tmp[0]; av[4] = 0; callsys(fn, av); /* times(tbuf); /*INSTR*/ /* tm1 = tbuf[3]/6; /*INSTR*/ /* tm2 = tbuf[5]/6; /*INSTR*/ /* printf("Sort: %d %d\n", tm1, tm2); /*INSTR*/ if(usw) { fn = "/usr/bin/upost"; av[0] = "upost"; i = 0; } e@ & e %   0 %c t  - x lf X R D>  w(w $   Nf    ww N ww N  r  ww  wzw v p@ A HwVw R L@A H w. w  @ i))99d, w BNf et7 p Fww @t5@t5~vwrw n ^ N % 8 ` x $     !(  2  BE  ff %  Iff eL   j |   wjw fb ZXwTw PL DBw>w : @ =@ww uurn; } error(a) { printf("Error %d\n",a); dexit(); } dexit() { extern nflush; /* printf("nflush = %d\n",nflush); /*DEBUG*/ if(tp[0] > 0 && utmp == 0) { unlink(tmp[0]); unlink(tmp[1]); } exit(); } callsys(f,v) char f[],*v[]; { int t,status,i; if((t = fork()) == 0) { for(i = 1; i <= 12; i++) signal(i,0); execv(f,v); printf("Can't find %s\n",f); exit(1); } else { if(t == -1) { printf("Try again\n"); return(1); } } while(t != wait(&status)); /* printf("Status = %o, %s\n",i = r3 .globl putcall,iget,kput,putoct .globl generate,succ .globl octal octal: mov $1f+1,r0 jsr pc,putcall jsr pc,iget mov (r0),r0 jsr pc,kput jmp succ 1: mov (i),r0 jsr pc,putoct jmp generate L227 L220 L221, L219~treeDcsandflgoppppsosopstprstopL160L10034L164_nextcha L165L167_copname" L20042PL173eL10031L10032 _block L177rL178L179L183,L228_errflus L159 L20043*L189L190L195L199L10043LL206XL10044zL207r(yyprdn) common/yycomn/yylval,yyval,yypv,yyvalv(150) common/yylcom/yychar,yyerrf,yydebu integer yychar, yyerrf, yydebu integer yyprdn,yyval,yylval,yypv,yyvalv #define yyclearin yychar = -1 #define yyerrok yyerrflag = 0 extern int yychar, yyerrflag; int yyval 0; int *yypv; int yylval 0; yyactr(__np__){ please define type # of %s earlierbad precedence syntax, input %dgoto 1000 switch(__np__){ previous rule not terminatedtoken illegal on lhs of grammar rulemissing :semicolon preceeds action * intcharfloatdoublestructlongautoexternstaticregistergotoreturnifwhileelseswitchcasebreakcontinuedodefaultforsizeofArg countCan't find %sCan't create temp.globl .data Symbol table overflowWarning: assignment operator assumedNonterminated commentUnknown characterL%d:.byte %o,0 Long character constantNonterminated string.data L%d:%o;%o;%o;%o .text Expression overflowexpression overflowExpression syntaxBad function.bss L%d:.=.+%o .text Bad register %of = r5 .globl j .globl classtab,jget .globl ctest .globl putcstr .globl succ ctest: inc ctestc mov r0,-(sp) jsr pc,jget asl r0 bit *(sp)+,classtab(r0) clc beq 1f asr r0 jsr pc,putcstr inc j(f) sec 1: rts pc .data ctestc: 0 L10012 L65:L20024RL20026T_subseq"L71L20031L72L73L74L10003L75L76L78L20032L804L89L91~L85L10007L10008L10009_getnum _getstr"_getcc"6L102L10010L104L105(L20021&L107fL108TL112~subseqxcabcL114L10019L115L116L113entry[ilin][icol], ct); else if (span(style[icol],ilin) && (icol+1==ncol || !span(style[icol+1],ilin))) printf(".if \\n(%d-\\n(%d .nr %d \\n(%d\n", 30+ilin, icol+50, icol+50, ilin+30); } } /* run out table, put field characters in */ printf (".fc  @\n"); for (ilin=0; ilin  _b>  _h >  _h>  _n>  _n#>  _n*>  _n1>  _t7>  _t=>  _B>  _sG>  % " 7 "% "% !% !%:!_!mn!7 h _w p fs5 @tt  @sj@4sj@ew4 -N! @    -6!%  rrt>  N \ w  5% 3 5 !,%\  5%}(\0(%( 5 @ `, 5!@ `5,@ `,BD " `,w w 15BeCe~-1nF  271@wt movclrcmptstaddsubincdecmuldivasrashaslbicbic $1,bitbit $1,bisbis $1,xornegcom*$jeqjnejlejgtjltjgejlosjhijlojhis/nopjbr ?K?K?K?K?K?K??K??K?K?K?L?L?L?L?L?&L?6L?JLhL?xLTLLT?L?LLT5 %5 %)5 D-%  3  5%%   Nff e ff ef %  &ff xe ?.e( %  &  e?eww @ / x% @wN & &  xef& f%+* xe 3N& f& xe4:;89w >DCB%#  x used _hshtab _space _cp _cmst P_isn _swtab _swp _contlab _brklab _retlab _deflab _nauto _autolen _peeksym _peekc _eof _line _treebas _debug _defsym _funcsym _xdflg _proflg _stflg _csym _cval _fcval _nchstr _nerror _paraml _parame _strflg _osleft _mosflg _initflg _inhdr _dimtab _obuf _sbuf _dimp _regvar _funcblk 7 % %upN Efe %_^ Ne 5%f&f be 5% %7w& f&f be%# 5ru NN  Ame 5rA f r upN  @E% @E % @E% AA @@5 ww CB 7%-%)r  ffe %-P  HN @# 7 2w ,(?% :  7  $f v Le0 9ev*p* h*b* 7R*we&  m6* 4* 0~  0  0~ w7 * ) )0   )Wp `e0eӕ?f) ,)P ) ) @f ) Z7D') JXZ|)t)-n)f)f@w fw'w&PXwfw&VXJA 7 (fAW,f B@ 8 @&61fA   @ @er3 / byte 1: mov 2(sp),r4 / working x bisb (r1)+,r3 2: add cscale,r4 aslb r3 bcs 3f bne 2b sub cscale,r5 dec (sp) bne 1b tst (sp)+ mov (sp)+,x add $8*7,x add $16.*7,r5 mov r5,y incb vtcol rts pc 3: mov r4,x mov r5,y jsr pc,vtpoint br 2b .bss .=.+50. stack: eof: .=.+2 lchar: .=.+2 nchar: .=.+2 hiwat: .=.+2 fchar: .=.+2 charb: .=.+nbuf scnt: .=.+2 xy: .=.+12. x = xy y = xy+2 count: .=.+2 evenodd:.=.+2 vtcol: .=.+2 vtlc: .=.+2 cscale: .=.+2 cxy: ox: .=.+2 oy: .=.+2 radius: cx: .=.+2 _d"x./yopt -r./yopt -rv./yopt./yopt -v/usr/yacc/yopti-r-rv-voptimization execl call failsMH2019.yaccopt -rMH2019.yaccopt -rvMH2019.yaccoptMH2019.yaccopt -v : int nterms %d; int nnonter %d; int nstate %d; char *yysterm[] { "%s", 0 }; char yy y   y%;  f %   f % %_< %%__  f %  l%%^X T    _74,($7    7 &  & %   _ _ _  5   x t%_< %b_< f P& %D <_, 4 .%_<   5 B@ @ae54N @-#@ !%*@ @a% %  @@54 u-%* \  ~ &  2_z#w b @ @me,55 De,_%%*_%%f5 Ce,M I%*E%@Ap,p(  N d& AA 2r %AA 2r  eC- u-u5ueD- FA1@ @m5...patablefctable]mtab.catabctabMetablea.outetabctaba.outetabetabmq mov r1,mul mov ac,rsq mov mq,rsq+2 mov r1,cy mov $-1,cx asl r1 asl r1 mov r1,count br cirarc cirarc: jsr r5,idle; 10 br 2f br 1f 2: jmp disp 1: loop: tst cx bge 2f mov $-ssize,r0 br 1f 2: mov $ssize,r0 1: mov r0,dely tst cy bge 2f mov $ssize,r0 br 1f 2: mov $-ssize,r0 1: mov r0,delx mov cx,mq mov cx,mul mov mq,r1 mov ac,r0 mov cy,mq mov cy,mul add mq,r1 adc r0 add ac,r0 sub rsq+2,r1 sbc r0 sub rsq,r0 mov cx,r1 mov cy,r2 bic $!100000,r0 bic $!100000,r1 bic $!100L3N_disarra"X_chkfun"L4_length L20000 L5L10002L11L12@ _error" L20006_block"xL20001L17L18T _decref L208L20007.L21LL22i L20010`L24_incref L25L20013L26} L33_chklval"L34_chkw"L35L36L37L38L10000.L296L30 L31d_setype"L1_fold"L100~getstrcL118&L119L20034L1211_mapch"tL1225~getcc6cccpccL124RL20036FL127lL1288L10022L10023L10024L10025L10026L135@L153L156L157 L145L144L143L10028L10029$L138L140~mapchtL130acnmpeekacL131.L1334L134L100f = r5 i = r3 .globl j .globl jget,iget .globl char .globl succ,fail char: jsr pc,jget bne 1f tst (i)+ jmp fail 1: mov r0,-(sp) jsr pc,iget mov (sp)+,(r0) inc j(f) jmp succ / read and echo character from tty. / perform normal cr/lf uc/lc mapping. tks = 177560 tkb = 177562 getc: tstb *$tks bge getc mov tkb,r0 bic $!177,r0 cmp r0,$'A blo 1f cmp r0,$'Z bhi 1f add $'a-'A,r0 1: cmp r0,$'\r bne putc mov $'\n,r0 / put a character on the tty. / also performs delay. tps = 177564 tpb = 177566 putc: cmp r0,$'\n bne 1f mov $'\r,r0 jsr pc,(r5) mov $'\n,r0 1: tstb tps bpl 1b mov r0,tpb rts pc / write a string to tty / jsr pc, mesg; ; .even mesg: movb *(sp),0) printf ("%s\n",page[(mustwr+i) % PL]); flush(); } outc (c, lp) char **lp; { int j; j = 0; while (j >0 || *(*lp) == '\b' || *(*lp) == ESC || **lp == SI || **lp == SO) { switch (*(*lp)) { case '\b': j++; (*lp)++; break; case '\0': *(*lp)++ = ' '; j--; break; case ESC: /* 'escape' */ (*lp) =+ 2; break; case SI: case SO: (*lp)++; break; default: (*lp)++; j--; break; } } if (c != ' ' || *(*lp) == '\0') *(*lp) = c; (*lp)++; } store (ll) { if (page[ll/ / / sqrt & dsqrt fortran functions .globl sqrt. .globl dsqrt. .globl sqrt .globl retrn .globl rerr .globl temp dsqrt.: temp .+2 setd br 1f sqrt.: temp .+2 setf 1: movf *2(r3),r0 jsr pc,sqrt bes 1f movf r0,temp jmp retrn 1: jsr r5,rerr; 13. 8253 ,4403,8254,12328,4383,8250,4384,8251,4385,8242,4387 ,8249,4388,8248,4398,8255,4399,8257,4400,8252,4401 ,8256,4402,8253,4403,8254,12329,4383,8250,4384,8251 ,4385,8242,4387,8249,4388,8248,4398,8255,4399,8257 ,4400,8252,4401,8256,4402,8253,4403,8254,12330,4363 ,8302,4364,8303,4365,8304,4366,8305,0,12355,12373 ,12374,12375,12376,12359,12344,12345,4353,8225,4354,8224 ,4355,8226,4356,8227,4357,8228,4358,8235,4359,8237 ,4360,8236,4361,8234,4362,8238,4367,8240,4368,8241 ,4369,8229,4370,8231,4371,8230,4372,8232xxxxArg countMissing temp fileCan't create %sTree space botch.globl fltused Missing temp fileIllegal initialization.bss L%d:.=.+4 .text mov%c r%d,r0 mov%c r%d,%c(sp) tst%c r%d No code table for op: %sNo code table for op %dmov%c r%d,r%d mov%c r%d,r%d Register overflow: simplify expressionr%d*tst r%d adcsbc r%d  Bb"|@NHNHHHn*+,HIJ<::<::FVVhhz/ PDP-11/20 vt01 driver ssize = 2 nbuf = 4500. rti = 2 reset = 5 drsc = 167770 drrc = 167774 dr11cx = 167772 dr11ps = 167750 dr11pb = 167752 lks = 177546 vtsc = 176756 vtxr = 176760 vtyr = 176762 csw = 177570 ps = 177776 ac = 177302 mq = 177304 mul = 177306 div = 177300 sr = 177311 ash = 177316 .. = 20 jmp *$restart .+2; 0 / bus .+2; 0 / ins .+2; 0 / bpt .+2; 0 / iot .+2; 0 / pwr .+2; 0 / emt .+2; 0 / sys . = [100-..]^. / clock clint; 300 . = [500-..]^. / dr11c dr11int; 240 restart:too many lookahead sets$$$~$yyact %d: reduce/reduce conflict (red'ns %d and %d ) on %s %d: shift/reduce conflict (shift %d, red'n %d) on %syypactyyr1yyr2off = %d, k = %d action table overflow %d no space in action tableyygoyypgo%s: gotos on %s nonterminal %s %d %d state %d, pre-nonterminal %s states %d and %d have equal positions state %d %s same as %d %s accepterrorshift %dreduce %d . reduce %d . error The function "system" is called/dL0oF0dV     r h  4 G  : o  m  _ & s  k  z  b \  D 8 B ?   i g   t   =   t hpunixrp40xvC',I sxt- div,I- movC,A KCmovC',I sxt- divsp)+,I- movC,A KCGJmovC(J),I sxt- divsp)+,I- movC,#(J) GDKCmovC2(sp),I sxt- divsp)+,I- mov,*(sp)+ KCmovb',I xor,(sp) movsp)+,I movb,A GDmovC(sp),-(sp) KAxor,(sp) movCsp)+,I movC,*(sp)+ movC',I asr movC,A GBasrC(I) movC(I),I movif,I GBmovif(I),I GAmovif,I GAmovfi,I GAsetl movfi,-(sp) movsp)+,I seti setl movif,I seti GBsetl movif(I),I seti GAmov,-(sp) setl movifsp)+,I seti GCsxt GAmovsp)+,I -- 7j&1@\X 1w&f@@& HADCBF7F(F6rwH*6r@<=@A>?DEBC=EDCB(KfSVW' P<@#<@d@p@|@@ #!""$vJJJHJ0@@@## @@@A A  L v R r  < HH00HHHHHHbAjArAzAAiy(8XyyXyyXyy$ 5&  5&  \5@&  wL   w>\ \& (    5@x&  Z& B    @& UJ&w\ ,& w\ &w&w&w  7 % %a %U%%W 8U] W 8E\fc     ` \ ]-%% a h h   \ \a  ! p ]\R B\ %W !W e,8224,4355,8226,4356,8227,4357,8228,4358,8235,4359 ,8237,4360,8236,4361,8234,4362,8238,4367,8240,4368 ,8241,4369,8229,4370,8231,4371,8230,4372,8232,4373 ,8233,4374,8218,4375,8221,4376,8219,4377,8220,4386 ,8201,4389,8213,4390,8217,4391,8214,4392,8215,4393 ,8216,4394,8223,4396,8222,12350,4378,8311,4395,8330 ,0,4378,8311,4395,8331,0,4378,8311,4395,8332 ,0,4378,8311,4395,8333,0,12301,12302,12303,12304 ,-1}; int yypact[] {0,1,62,65,124,125,148,149,150,150 ,150,205,208,211,214,217,276,150,150,150 ,150,277,280,28s rkf.s strip a.out cp a.out ../util/rkf as reset.s strip a.out cp a.out ../util/reset as dldr.s strip a.out cp a.out ../util/dldr as mcopy.s tm.s wrk.s rk.s strip a.out cp a.out ../util/tmrk as mcopy.s tm.s wrp.s rp.s strip a.out cp a.out ../util/tmrp as mcopy.s tm.s whp.s hp.s strip a.out cp a.out ../util/tmhp as mcopy.s ht.s wrk.s rk.s strip a.out cp a.out ../util/htrk as mcopy.s ht.s wrp.s rp.s strip a.out cp a.out ../util/htrp as mcopy.s ht.s whp.s hp.s strip a.out cp a.out ../util/hthp rm a.o((hxx(h(xx(H((hx8H( mov $inod,r4 1: mov (r5)+,(r4)+ cmp r4,$addr+16. blo 1b rts pc / routine to read in block / number specified by bno / after applying file system / mapping algorithm in inode. / bno is incremented, success / return is a skip, error (eof) / is direct return. rmblk: add $2,(sp) mov bno,r0 inc bno bit $LRG,mode bne 1f asl r0 mov addr(r0),r0 bne rblka 2: sub $2,(sp) rts pc / large algorithm / huge algorithm is not implemented 1: clr -(sp) movb r0,(sp) clrb r0 swab r0 asl r0 mov addr(r0),r0)Hyiy)iHy)yy))vH%5 @ 5vHu @ p-vH - u-uu -d @ 7`p h5 @ vH@ p-vHN ^@ vH ^ee( - e  ^N ^e - _' @ B @  ^ -  w w p   } .%@ } 15 5 -n @ re5 }@ re5 } @ }  p) @ @ / 5 @ } @ @ / - ump condbranch condset nregsload valueforce registerP((<((j((=((>((?((@((A((B((C((D((E(((((F(()((G(((((( ((!((*((H((+((I((,((J((-((K((.((L((/((W((7((U((Q((0()N()1 ) )O ) )%))&))b))c))<))=))>")&)?*).)@.)*)A&)")B2)7)C<)@)D@)<)E7)2)))))")&)*).).)*) &)") )) F)K) K)F) ))j)0+0+ )!)%)&)b`)c`)P*(Z*)Z***+*,*-*.Z*7Z* Z& f% w$ w  u-@w @w D  w%%%%%# 5~Fw C_ xCC / p_C / _%e  p+ 0    xB C G CC=$ 0%*& d#% + C /% %& -C* 0 _C ww pC wrw `D  Ce C / w<fr0,fr5 movf $one,fr0 clrf fr1 1: dec r1 bmi 1f movf fr0,fr2 movf fr1,fr3 mulf fr4,fr0 mulf fr4,fr1 mulf fr5,fr2 mulf fr5,fr3 subf fr3,fr0 addf fr2,fr1 br 1b 1: tst r0 beq 1f clrf -(sp) movf $one,fr2 movf fr2,-(sp) movf fr1,-(sp) movf fr0,-(sp) jmp divide 1: movf fr1,-(sp) movf fr0,-(sp) jmp *(r4)+ )9999(9h9yyyy9yyyyyyy9Ix _cvtab _opdope _ctab _symbuf _hshDeclaration syntax%.8s redeclared(8HY(8(888ii(IHIyI888X88XXII(888AE@ 5N  AE@ u@ 5_Z Nf & e_Z u- u- N _ (_ X%_Z -_V ) +_Z ,_Z @ _Z %$ %  _Z  _Z %#_Z  &_  % _Z   % _Z N r eA! y 'N_ _Z N_V w ,4R,8Z,9b,:v,;~,jmp GBjmp(I) jsrc,MA GBjsrc,#(I) GAjsrc,(I) clr clrf movC,I movof,I GBmovC(I),I GBmovof(I),I mov+,-(sp) mov,I GBmov+2(I),-(sp) mov(I),I movC',I M'C mov',I M,A GJmovC(J),I M'C(J) GBmovC(I),-(sp) M'C(I) movCsp)+,I GJmov(J),I M,#(J) GBmov(I),-(sp) M,#(I) movsp)+,I GAM1,A+ V'GJmov+2(J),-(sp) mov(J),I M1,#+2(J) V'(J)GBmov+2(I),-(sp) mov(I),-(sp) add1,#+2(I) V'(I)movs rts r5 vtvect: jsr r5,idle; 10 rts pc mov xy+4,r0 mov xy+6,r1 mov $2,r3 / sign(dx) mov r0,r2 sub x,r2 / abs(dx) bge 1f mov $-2,r3 neg r2 1: mov $2,r4 / sign(dy) sub y,r1 / abs(dy) bge 1f mov $-2,r4 neg r1 1: clr r5 clr -(sp) / residules cmp r2,r1 blt 2f / select loop on max(dx,dy) mov r2,count asr count loop1: jsr pc,xvtpoint cmp r5,(sp) ble 1f add r2,(sp) sub r5,(sp) clr r5 add r4,y 1: add r1,r5 add r3,x dec count bge loop1 tst (sp)+ rts pc 2: mov r1,count asr X w e d V  _foutput _cin _cout _arrndx _zzcwset _zzpairs _zzgoent _zzgobes _zzacent _zzacsav _zznsave _zzclose _zzrrcon _zzsrcon _ctokn _ntlim _tlim _lineno _peekc _tstates _ntstate _mstates _clset _lkst _nlset _lsetsz _wsets _cwset _wssize _numbval _rflag _oflag _ndefout _machine _setup"L10001L10002L14ZL16bL9<L17pL10008"L100 8 8(iY Y Y yyyYyY Duplicate case (%d)cfcc jbr L%d L%d:tst (sp)+ cmp (sp)+,(sp)+ add $%o,sp %d: %c%oEEEE! r * * r * * dr D" Hn(& $&@@ @ \@<FNV\bl& |&|&"& "&0& !d  ! !BL z V V L V  L V ,    7` 25ʥ    %!ʥE%5 E%% @ _ w J7j y tU_ VR :` x >7 84 & &   e  %YtU= %)7 7E  feVp^ -  v% # tU P 7Zwl  .% w J N w6w 2.e w _%2 5@ "r%/_7& & & v(e2 2 25L "5& 5% @-%% r? %% ,% %$%    &  5   &  5 r eEA! y"U & &&_: % $ v(e Nf  2%wf%U(A p_%p)+,I GAMP GAMsp) VM KAmovC,A KAmovfo,A GBKAmovf,#(I) GBmovC,#(I) movC(I),I GBKAmovfo,#(I) GBKImovC,#(I) movC,I KAGJmovf,#(J) KAGJmovfo,#(J) GDKAmovC,*(sp)+ GDKAmovfo,*(sp)+ GAGAM' GAMD,I GAKJMD(J),I GAKIMP,I KDGAMD(sp)+,I KCGAMPsp)+,I GAM,I M+,(sp) VGAKIMsp)+,(sp) VM,I KCGAMsp)+,2(sp) VMsp)+,(sp) GCKAxor,(sp) movsp)+,I GAasr GATsxt- div,I- GATsxt- KJdiv(J),I- GATsxt- KIdiv,I- KCGATsxt- divsp)+,I- M,A' mov,I movC',I MP,I movC,A KBM(I),A' mov,I KAM,A' mov,I KBGJM(I),#(J) mov(J),I movf',I KIMP,I movf,A KCmovC',I MPsp)+,I movC,A KCmovof',I MPsp)+,I movfo,A KAGJM,#(J) mov(J),I KCGBMsp)+,#(I) mov(I),I GDKCmovC2(sp),I MPsp)+,I movC,*(sp)+ KCGBmovC(I),I MPsp)+,I movC,#(I) KCGBmovof(I),J MPsp)+,J movfo,#(I) movf,I movC',I sxt- divP,I- movC-,A KCmovC',I sxt- divsp)+,I- movC-,A KCGJmovC(J),I sxt- divsp)+,I- movC-,#(J) GDKCmovC2(sp),I sxt- divsp)+,I- movC-,*(sp)+ mo L10027& L126L127L10025L118:L119PL120TL121\L122fL129L128L123nL124vL125z~foldopap1ap2p1v1v2L115L114L116<L20019XL20020b_conexp"~conexpt_tree L132L134  s $ ~ t   =    t   g  mv a.out r3.o as r4.s; mv a.out r4.o as r5.s; mv a.out r5.o as r6.s; mv a.out r6.o as r7.s; mv a.out r7.o as r8.s; mv a.out r8.o as r9.s; mv a.out r9.o as ra.s; mv a.out ra.o as rb.s; mv a.out rb.o as rc.s; mv a.out rc.o as rd.s; mv a.out rd.o as re.s; mv a.out re.o as rf.s; mv a.out rf.o as rg.s; mv a.out rg.o as rh.s; mv a.out rh.o as rx.s; mv a.out rx.o ar r /lib/filib.a *.o rm *.o chdir ../rt1 as abs.s; mv a.out abs.o as aimag.s; mv a.out aimag.o as aint.s; mv a.out aint.o as alog.s; mv a.out alog.o ah w %( $@ 55 X %[ 3 3 3_ %#  X%d 5 5 @ r eA! y%@ u& ff xe _E%T & &d%#_ E%i & &$ xe_%$  1% & ^ &f} 5 5 5  5_%3 ee%5%1e& &%% %.%L%% & %_0u- @w C   3w%g 3" _*" xF%$%_*"_*"&( p(e 3 3 34 4 %#% 4 % %%%2- %  %(;%84%2l %#] != 0) free (page[ll]); page[ll] = alloc ( leng (lbuff) + 2); copy (page[ll],lbuff); } fetch(ll) { int i; for (i=0; i < LINELN; i++) lbuff[i] = '\0'; copy (line=lbuff, page[ll]); } copy (s,t) char *s, *t; { if (t == 0) return (*s=0); while (*s++ = *t++); } leng (s) char *s; { int l; for (l=0; s[l]; l++); return (l); } n }C z   UETR5$  5$  U$wp   \]   7 $r@\r@]  e  JW!]W!(] 5h$7 `$e  , J$N$@$ f\    \]$ $$$]& N & N  N N S C B A  eW!\Շ w^ m## # rf]5#e        W!]\P    0&\d& dN & dN dC N eN e-.#8#$## L20044 L163 L164 _rlength L20046 L167 L168P L169v L170rL171 L172_prste"" _blkend" ~blkend csL20048 L177 L179 L180L10016<L186B L182Z L188^ L185> ~prste" csrflgacsL187L189~errflust aooL191 L20050~ ~declist scsclasselsizeoffsettypeL194 5:4N f  AAE@ 54N   AE@ u@ 5_x Nf z &B /e_x u- u-3B NB /_ (_ N%Z_x -_t ) 0+_x M_x @  _x %$B /%  _x  p_x %#_x  &_  , % _x  V % _x NB r e@A! yB /'NB_ _x BN_t w <$B 5~F * x+ % %#2 %e7&= e %% D w%% && & h e & 7t5&6w dJ wXw T L 7l  y o w, < e ~     %    %7   _ x  _, t_, l_, 5 Z%aN Z x :0 0 *f %  * ; mv a.out f44.o as ../fx/fhd.s f45.s; mv a.out f45.o as ../fx/fhd.s f46.s; mv a.out f46.o as ../fx/fhd.s f47.s; mv a.out f47.o ld -r ../a.out *.o mv a.out .. rm *.o chdir ../fx as fhd.s fx1.s; mv a.out fx1.o as fhd.s fx2.s; mv a.out fx2.o as fhd.s fx3.s; mv a.out fx3.o as fhd.s fx4.s; mv a.out fx4.o as fhd.s fx5.s; mv a.out fx5.o as fhd.s fx6.s; mv a.out fx6.o as fhd.s fx7.s; mv a.out fx7.o as fhd.s fx8.s; mv a.out fx8.o as fhd.s fx9.s; mv a.out fx9.o as fhd.s fxa.s; mv a.out fxa.o as fhd.s fxb.s; mv a.ou w4$  Nfe j%  5~F  Nfe j%   Nff j% N =w #D 5~F w#%(Nf&e %  =%$%(Nf&e %  =% r eXAA! y"  %Pe( ^ x8A b U 4 % %, p _~%p, NfS& f%e =_ b _~%V# # # int fromflg 0; # define CONTIG 257 # define QTEXT 258 # define SPACE 259 # define THIN 260 # define TAB 261 # define UP 262 # define DOWN 263 # define BACK 264 # define FWD 265 # define MATRIX 266 # define LCOL 267 # define CCOL 268 # define RCOL 269 # define COL 270 # define MARK 271 # define LINEUP 272 # define SUM 273 # define INT 274 # define PROD 275 # define UNION 276 # define INTER 277 # define LPILE 278 # define PILE 279 # define CPILE 280 # define RPILE 281 # define ABOVE 282 # define DEFINE N& <85& 28 eRNf f%5wR 75& 7  N Nf f%55 Nf b &B /eN @w)%ZN  5 5Nf X%5%(%F %% -Q(K%V% %! 7NfS %56Nf %5_@55  5~F@5 5E 0@ r e@A! y.  _%+%I_ _D5  " w z u sj  GCM,(sp) GCKBM(I),(sp) GCKAM,(sp) /d/o/x0f,0e/c/s/l:0rZV3d3t3333333l3|3366355553328886z575586^66606644^4h444444H 8X _cvtab _opdope _ctab _symbuf _hshused _hshtab _space _cp _cmst P_isn _swtab _swp _contlab _brklab _retlab _deflab _nauto _autolen _peeksym _peekc _eof _line _treebas _debug _defsym _funcsym _xdflg _proflg _stflg _csym _cval _fcval _nchstr _nerror @ 5@ @m@5@@m@-@@5@ 5@mAA@ @@@5NNN& &f & %e@mv 1NNN& @mT 1@ @ & A @l& 1Nf %N Ns @  NNm Ny N @ A p, @ @   Nff~ e nh ^ &T & eN N N w&-CLR>. d: N K H E B ? < 9 M J G D A > ; 8 7 4 1 . + ( % " 6 3 0 - * ' $ ! 5 2 / , ) & #                           L86*L87L90L20009<L93_simpleg L98L20011_branch L100, _dogoto _doret _pexpr" L107*_cbranch _label L108@_nextcha L110_chconbr L113< L10006hL114L20012L20016_conexp L121L122L20017L20021L124L20019_chkw _pswitch" L128zL129_forstmt"N L131L134L135.L136L137;~forstmt#$  %e d    tE5% % uu- u-1 5+7" y %@e@-  ee}_@5 r eA! y w%_N _ & & & e?edN & &  e?e%__%_w dD 333 3 3 ̥  e e  h 9  F ?  _paraml _parame _strflg _osleft _mosflg _initflg _inhdr _dimtab _obuf _sbuf _dimp _regvar _funcblk _build"L10003L10004L10005L10006L7L20003xL19(L27L15L10L16L23pL28 ~buildopdopepcvndtleftccvnp1p3p2t1t2t3csv L2L10029L147L148kL150~defout6cpciL153L20017@L20013L157L20019RL10035L20015XL10031dL10032pL10033|L155L163_chstash"~chstashcL165L166L164L10040L10041L10042L10043L10044L207n L199D L200J L206h L204\ L205b L201P L202V L10055L10056L188L196prflagaregctabletreerregstringcprregtableopdatreeoptp1p2reg1L10015PL99~_branch _label L20033L98zL20024L20026L102nL103x_oddreg _chkleaf":L10016L105L106L10017 L1076 L110Z L111z L10032 L10018 L118 L20029 L20027 L121 213,4390,8217,4391,8214,4392,8215,4393 ,8216,4394,8223,4396,8222,0,12322,4394,8270,0 ,4353,8272,4354,8273,4355,8274,4356,8275,0,12356 ,12357,12358,12351,12352,12354,12353,4353,8272,4354,8273 ,4355,8274,4356,8275,4394,8278,0,12363,12364,12365 ,12366,12367,12368,12369,12370,12371,12372,12298,4383,8250 ,4384,8251,4385,8242,4387,8249,4388,8248,4398,8255 ,4399,8257,4400,8252,4401,8256,4402,8253,4403,8254 ,12293,12294,12296,12326,12360,12361,12342,12343,12336,12337 ,12338,12339,12340,12341,4398,8255,4399,8257,44011,4395 ,8313,0,4378,8311,4395,8314,0,12321,4353,8272 ,4354,8273,4355,8274,4356,8275,4395,8316,0,4363 ,8302,4364,8303,4365,8304,4366,8305,4395,8318,0 ,12299,4394,8319,0,4394,8320,0,4394,8321,0 ,4394,8322,0,12305,12306,12307,12308,12362,12319,12315 ,12316,12317,12318,12346,12347,12300,12331,4387,8249,4388 ,8248,4398,8255,4399,8257,4400,8252,4401,8256,4402 ,8253,4403,8254,12309,4383,8250,4384,8251,4385,8242 ,4387,8249,4388,8248,4398,8255,4399,8257,4400,8252 ,4401,8256,4402,8253,4403,8254,12323,4353,8225,4354 / hpwrite wblk: iocom = 61 N& 55V 5@ 53Nf %3@ 5 5@3Nf %s@5Nf 5 e}-@=E@-5ʥ@%$/N&& % $@ 5 E@-@%$  &f % eʋ_w B5  @@ 5% C wx r eFA! y7  7n  e%#3% ,%d ,-1}; memory overflow NULL { %s }  )9IyiiiyHIhi9YY(h9YY9YY(hyYHYyyIHIyy+2(sp),*2+2(sp) rts pc 1: mov 4+2(sp),r1 mov 6+2(sp),r0 jsr pc,seekchar mov 0+2(sp),r0 jsr pc,alterword / make sp hold a simple rv (forget it might be a table value) sprv: mov (sp)+,r0 cmp $-1,2(sp) bne 1f mov (sp)+,(sp) mov (sp)+,(sp) 1: mov r0,pc 9: jmp succ 8224 ,4355,8226,4356,8227,4357,8228,4358,8235,4359,8237 ,4360,8236,4361,8234,4362,8238,4367,8240,4368,8241 ,4369,8229,4370,8231,4371,8230,4372,8232,4373,8233 ,4374,8218,4375,8221,4376,8219,4377,8220,4386,8201 ,4389,8213,4390,8217,4391,8214,4392,8215,4393,8216 ,4394,8223,4396,8222,4397,8295,12348,4383,8250,4384 ,8251,4385,8242,4387,8249,4388,8248,4398,8255,4399 ,8257,4400,8252,4401,8256,4402,8253,4403,8254,12327 ,4383,8250,4384,8251,4385,8242,4387,8249,4388,8248 ,4398,8255,4399,8257,4400,8252,4401,8256,4402,bol"L10005\L10006dL88dL92L90tL94L84L10013pL10014zL10015L10016L10017L10018L61L67@L68JL110~L70xL96L69\L79L99L640L81>L98L20018L82HL109nL77L63(L100L111~symbolspcL55L56L54FL57L60 L20016D_getchar .globl putch,obuild .globl putoct putoct: mov r0,-(sp) bic $7,r0 bic r0,(sp) clc ror r0 ror r0 ror r0 beq 1f jsr pc,putoct 1: mov (sp)+,r0 add $'0,r0 jsr pc,putch rts pc ? 7 `    / copy and execute DEC loaders core = 24. prs = 177550 mov $dldr,r0 mov $[core*2048.]-300,r1 mov r1,r2 1: mov (r0)+,(r1)+ cmp r0,$end blo 1b jmp (r2) dldr: 10706 24646 10705 62705 114 5001 13716 177570 6016 103402 5016 404 241 6116 1001 10116 5000 4715 105303 1374 4715 4767 74 10402 162702 4 22702 2 1441 4767 54 61604 10401 4715 2004 105700 1753 0 751 110321 770 16703 150 105213 105713 100376 116303 2 60300 42703 177400 5302 207 12667 44 4715.globl .p,sprv .globl .a,.s,.o,.n,.x / + .a: jsr pc,sprv add (sp),4(sp) br 9f / - .s: jsr pc,sprv sub (sp),4(sp) br 9f / | .o: jsr pc,sprv bis (sp),4(sp) br 9f / & .n: jsr pc,sprv com (sp) bic (sp),4(sp) br 9f / ^ exclusive or .x: jsr pc,sprv mov (sp),r0 xor r0,4(sp) 9: jmp .p  9 y)) yiyy yyiiiiii) y)y yy)) iiii iy5 %5 %)5 D-%  3  5%%   Nff e ff ef %  &ff xe ?.e( %  &  e?eww @ / x% @wN & &  xef& f%+* xe 3N& f& xe4:;89w >DCB%#  x _svargv _eht _ebase _ewid _yyval _yypv _yylval _tht <_tbase <_ptr _nptr d_sptr d_eqnreg _eqnht _eqnbase _lefteq _righteq _lastcha _ESC _HREV _HFWD _SI _SO _boverb"~boverbtregbhwp1p2csv _oalloc _max L2L3 _printf L4 _down _fwd L5$ _back _upc,flag1 br 1b / reverse pass put in / foreward and reverse / block numbers mov $4017,tccm jsr pc,flag 1: mov $nword+3.,r4 2: clrb tcst clr (r5) jsr pc,flag dec r4 bne 2b clrb tcst clr (r5) mov bn,r0 jsr pc,comobv jsr pc,flag movb r1,tcst mov r0,(r5) jsr pc,flag dec bn blt check clrb tcst clr (r5) jsr pc,flag clrb tcst clr (r5) jsr pc,flag clrb tcst mov bn,(r5) jsr pc,flag clrb tcst clr (r5) jsr pc,flag clrb tcst clr (r5) jsr pc,flag br 1b / foreward pass / confirm blo/ copy mag tape to disk / load with proper tape and disk drivers jsr pc,rew 2: jsr pc,4(r5) .even jsr pc,numb mov r0,dska jsr pc,4(r5) .even jsr pc,numb mov r0,tapa jsr pc,4(r5) .even jsr pc,numb mov r0,r2 1: jsr pc,tread jsr pc,wblk inc tapa inc dska dec r2 bne 1b jsr pc,rew rts pc numb: clr r1 1: jsr pc,2(r5) cmp r0,$'\n beq 1f sub $'0,r0 cmp r0,$9 bhi 2f mul $10.,r1 add r0,r1 br 1b 1: mov r1,r0 rts pc 2: jsr pc,4L20052 _declare L10020DL212\L2082L217xL201L205~getkeyw elsizetptrolongfisadeclskwtkwscptrL197 L199L206,L207L10017BL10018F_strdec"L213hL214L215~L218L196L219L220L221L222L224L226~strdecdsmosftkwpelsizessymoL228 mov f,r0 /go back to prev stack frame mov k(r0),k(f) 3: tst (sp)+ jmp succ cerase: bit $1,csw bne cerase jsr r5,vtcom 6 rts pc vtcom: jsr r5,idle; 10 br 1f jsr pc,vtok mov (r5)+,vtsc rts r5 1: tst (r5)+ rts r5 getc: tst nchar bne 2f tst eof beq 1f jmp restart 1: mov $240,ps jsr pc,stardr clr ps br getc 2: movb *fchar,r0 bic $!377,r0 inc fchar dec nchar cmp fchar,$charb+nbuf bne 1f mov $charb,fchar 1: rts pc stardr: cmp nchar,$nbuf\/2 ble 2f cmp nchar,$nbuf blt 1f mov pc,hiwat rts pc 1: tst hiwat bne 1f 2: clr hiwat bis $2,drsc 1: rts pc ww D% % w@@% x& `?eBpC r r@ @Px @ t tw b ^ Z%  Dw<-2x(p ..:PT\fnvzIllegal conditionalCall of non-functionIllegal indirectionIllegal lvalueIllegal structure refUnimplemented structure operationIllegal conversionInteger operand required...$dldr.sdtf.smcopy.srkf.stboot.suboot.sfsboot.smboot.sJrun]hp.s[ht.sbreset.s"rhp.srk.sWrp.srrk.sIrrp.stc.sPtcf.sXtm.stpboot.stty.swhp.sYwrk.s|wrp.smakout cmp a.out /bin/rmdir cc -s -f -O sa.c cmp a.out /usr/bin/sa cc -s -n -O sh.c cmp a.out /bin/sh cc -s -O size.c cmp a.out /bin/size cc -s -O sleep.c cmp a.out /usr/bin/sleep cc -s -O sort.c cmp a.out /bin/sort cc -s -O split.c cmp a.out /usr/bin/split as strip.s strip a.out cmp a.out /bin/strip cc -s -O stty.c cmp a.out /bin/stty cc -s -O su.c cmp a.out /bin/su as sum.s strip a.out cmp a.out /bin/sum cc -s -O sync.c cmp a.out /bin/sync cc -s -O tbl.c -lp cmp a.out /usr/bin/tbl cc -s -O tee.crd+nword blo 1b mov (sp)+,r0 rts pc mtrack: mov (r0)+,(r5) jsr pc,flag rts r0 flag: bit $100200,tccm beq flag blt error6 rts pc flag1: bit $100200,tccm beq flag1 bge 1f tst tcst bge error7 add $2,(sp) 1: rts pc comobv: mov r0,r4 bic $!777,r0 asl r0 mov cobtab(r0),r0 swab r0 clr r1 ror r0 rol r1 asl r0 asl r0 rol r1 swab r4 bic $177401,r4 bis cobtab(r4),r0 rts pc bcomobv: mov r0,r2 bic $!70,r2 mov r0,r3 mov $6.,r4 1: asr r3 dec r4 bne 1b bic $!7,r3 bis r3,r2 movf = r5 i = r3 .globl x,k .globl ktab,ktat .globl putcall,obuild .globl errcom,succ,generate .globl rewcstr,getcstr .globl scopy scopy: mov $2f+1,r0 jsr pc,putcall jsr pc,rewcstr mov k(f),r2 neg r2 add $2,r2 1: jsr pc,getcstr tst r0 beq 1f movb r0,ktab(r2) inc r2 cmp r2,$ktat blt 1b jsr r0,errcom ;.even 1: clrb ktab(r2) bic $1,r2 neg r2 mov r2,k(f) jmp succ 2: mov i,r0 jsr pc,obuild jmp generate .globl .p,sprv .globl .sr,.sl / >> .sr: neg (sp) / << .sl: mov 4(sp),r1 clr r0 alsc (sp),r0 mov r1,4(sp) jmp .p  -% N A 1} N Am 1] -_6 P ^N? / @ }@ }f &? /% -@m }@m }@ &? /% -? /} X& A 1VE  &e} X& A 1V5 @ %vH_ -dw>w , t7 ~@ 58B@ 6B#x~tl~t Z~t`  lp -" :~eB-ڂ _!5  t0 -~/usr/bin/wc cc -s -O who.c cmp a.out /bin/who as write.s ld -s a.out -l cmp a.out /bin/write rm a.out / unix DEC-tape time/mtrack track formatter nword = 256. nblock = 578. endz = 7200. ps = 177776 tcst = 177340 tccm = 177342 tcwc = 177344 tcba = 177346 tcdt = 177350 mov r5,savr5 mov sp,savsp start: mov savr5,r5 mov savsp,sp jsr pc,4(r5) .even clr r0 mov $cobtab,r1 1: jsr pc,bcomobv mov r2,(r1)+ inc r0 cmp r0,$512. bne 1b mov $buffer,r0 1: mov $-1,(r0)+ cmp r0,$buffer+nword+nword blo 1b mov savr5,r5 jsr pc,2(r5) mov $340,ps mov $tcdt,r5 mov  clr eof mov $stack,sp mov $7,cscale mov $charb,fchar mov $charb,lchar clr nchar mov $100,drsc / IE on dr11c / mov $100,lks / IE on clock disp: jsr pc,getc asl r0 cmp r0,$2f-1f bhis 2f jmp *1f(r0) 1: disp / ignore order point vect frame circle arc explor disp / screw movexy disp / photo 2: jsr pc,cerase clr vtcol clr vtlc mov $-4000,x mov $3777,y mov $7,cscale 1: jsr pc,getc jsr pc,char br 1b order: jsr pc,getc asl r0 cmp r0,$2f-1f bhis disp jmp *1f(r0) 1: disp / iopr.c cmp a.out /bin/opr cc -s -O passwd.c cmp a.out /bin/passwd as pfe.s strip a.out cmp a.out /usr/bin/pfe cc -s -O pr.c cmp a.out /bin/pr cc -s -f -O prof.c cmp a.out /usr/bin/prof cc -s -O ps.c cmp a.out /bin/ps cc -s -O ptx.c cmp a.out /usr/bin/ptx cc -s -O pwd.c cmp a.out /usr/bin/pwd cc -s -O quiz.c cmp a.out /usr/bin/quiz cc -s -O rc.c cmp a.out /usr/bin/rc cc -s -O restor.c cmp a.out /bin/restor as rew.s strip a.out cmp a.out /bin/rew cc -s -O rm.c cmp a.out /bin/rm as rmdir.s strip a.<=@A>?DEBC=EDCB(KfSVW' P<@#<@d@p@|@@ #!""$|PPPNP6@@@## @@@A A  R | X x  B NN66NNNNNNbAjArAzAA~~~~Arg countMissing temp fileCan't create %sTree space botch.globl fltuse Xh(r5) .even tst (sp)+ rts pc ba: buf wc: -256. .bss buf: .=.+512. dska: .=.+2 tapa: .=.+2 .text L167L168L20053L170L172~sortcpfplpafptalpintchL175L176VL177LL20055L180L181L174L179H_ispow2"Z~ispow2ZtreedatreeL184L183_pow2"~pow2treediatreeL187L188L20057L10041L10042L10043L10045_optim V V V ?VSSlWSSvW?W?WSSSS?NN?NNTSTSS?TXN?TXN?fN?fNTT?$T??N??NSS?NN?fN??N??W??W?W?W?W?W?W?W?W?W?? Xw ~wn+Ded+  ^+ % 0w7 J+7 J+ׯ@+- 8+ 6+(w*+7 ,+ .w +eXB J ӕ- R r f e0 @ >* ҋ D~8BXFX *ӕ0 hiY99IYYfltused!fpp_getnum"_peekc _getchar _cval _fcval _error nfract.totdig2decpt0base,getdigfperr_tbitset _nolook _nstate _pstate _apstate _actsiz _tystate _stsize _memsiz _mem0 _mem _amem _memact _nprod _prdptr _prdlim _levprd _nterms _nerrors _fatfl _extval _trmset _cnames _cnamsz _cnamp _maxtmp _temp1 _temp2 _trmlev _nontrst _indgo _pres _pfirst _pempty _nnonter _lastred _ftable8xx8  283 # define DELIM 284 # define GSIZE 285 # define GFONT 286 # define FROM 287 # define TO 288 # define OVER 289 # define SQRT 290 # define SUPER 291 # define SUB 292 # define SIZE 293 # define FONT 294 # define ROMAN 295 # define ITALIC 296 # define BOLD 297 # define MQ 298 # define MQ1 299 # define LEFT 300 # define RIGHT 301 # define DOT 302 # define DOTDOT 303 # define HAT 304 # define TILDE 305 # define BAR 306 # define UNDER 307 #define yyclearin yychar = -1 #define yyerrok yyerrflag = 0 extern int yy cmp a.out /usr/bin/tee as time.s strip a.out cmp a.out /bin/time as tp?.s ld a.out -lc -l cmp a.out /bin/tp cc -s -O tr.c cmp a.out /usr/bin/tr as tty.s ld -s a.out -l cmp a.out /bin/tty cc -s -f -O typo.c cmp a.out /usr/bin/typo cc -s -O umount.c cmp a.out /etc/umount cc -s -O uniq.c cmp a.out /bin/uniq cc -s -f -O units.c cmp a.out /usr/bin/units as update.s strip a.out cmp a.out /etc/update cc -s -O usort.c cmp a.out /usr/bin/usort cc -s -O wall.c cmp a.out /etc/wall cc -s -O wc.c cmp a.out _line _ascbuf _nerror _cctab _efftab _regtab _sptab _lsptab _instab _brancht _opdope _opntab _nstack _nfloat _spacep _spacema _treebas _didreor _czero#_cone#_fczero#_tabtab#_cregtab _lleft#&_lassgn#2_llocv#<_main"~mainargcspargvtreetreespacctablecsv L2 L3_error _exit _fopen L4FL5@ r  @ r m -'@ re5 @ mx e% @ r mN @ r m0  -ww 7 7%7|% t%( .%(Ue  +L%L%7  f .%_(@ 0 vH m } .%N P5 _:@t _6@t@t5%!@ 8BA @6Bt@-V@ A %vHpvHDu#@tx-@te@t&e  @t../fx/fhd.s f31.s; mv a.out f31.o as ../fx/fhd.s f32.s; mv a.out f32.o as ../fx/fhd.s f33.s; mv a.out f33.o as ../fx/fhd.s f34.s; mv a.out f34.o as ../fx/fhd.s f35.s; mv a.out f35.o as ../fx/fhd.s f36.s; mv a.out f36.o as ../fx/fhd.s f37.s; mv a.out f37.o as ../fx/fhd.s f38.s; mv a.out f38.o as ../fx/fhd.s f39.s; mv a.out f39.o ld -r ../a.out *.o mv a.out .. rm *.o chdir ../f4 as ../fx/fhd.s f41.s; mv a.out f41.o as ../fx/fhd.s f42.s; mv a.out f42.o as ../fx/fhd.s f43.s; mv a.out f43.o as ../fx/fhd.s f44.s $-4000,x clrb vtcol ret: rts pc vtbs: sub $8.*7,x decb vtcol rts pc vttab: incb vtcol add $8.*7,x bitb $7,vtcol bne vttab rts pc vtpfx: jsr pc,getc mov r0,r1 sub $'7,r1 cmp r1,$2 bhi ret asl r1 jmp *0f(r1) 0: vtrev vthrev vthfor vtrev: add $8.*7,y decb vtlc vthrev: add $8.*7,y decb vtlc rts pc vthfor: sub $8.*7,y incb vtlc rts pc gchar: asl r1 asl r1 asl r1 asl r1 add $chrtab,r1 mov x,-(sp) / reference x mov y,r5 / working y mov $16.,-(sp) / table counter clr i = r3 .globl putch,putoct .globl trswitch .globl trace trace: jsr pc,putch mov i,r0 jsr pc,putoct mov $'\n,r0 jsr pc,putch rts pc .data trswitch: 0 0003,00004,00005,01141,00007,01130, 02042,02145,00003,02157,00005,02160,00007,00008, 01137,01134,00003,00004,00005,00006,00007,00008, 00001,01167,00003,00004,00005,00006,00007,00008, 00001,01055,01055,00004,01075,00006,00007,00008, 00001,00002,00003,00004,00005,00006,00007,001075, 00001,01076,00003,01074,01057,00006,01131,00008, 01135,01050,01174,01173,01050,01051,01175,01051, 01135,01133,01133,01130,00005,00006,00007,00008, 00001,00002,02173,02175,02047,02140,02136,00008, 00001,00002,02176,00004,/ read rp rblk: iocom = 5 ,4373,8233 ,4374,8218,4375,8221,4376,8219,4377,8220,4386,8201 ,4389,8213,4390,8217,4391,8214,4392,8215,4393,8216 ,4394,8223,4395,8306,4396,8222,0,12332,12333,12334 ,12335,4387,8249,4388,8248,4398,8255,4399,8257,4400 ,8252,4401,8256,4402,8253,4403,8254,12311,4387,8249 ,4388,8248,4398,8255,4399,8257,4400,8252,4401,8256 ,4402,8253,4403,8254,12310,4387,8249,4388,8248,4398 ,8255,4399,8257,4400,8252,4401,8256,4402,8253,4403 ,8254,12320,4383,8250,4384,8251,4385,8242,4387,8249 ,4388,8248,4398,8255,4399,8257,4400,8296 ,8222,12291,4096,16384,0,4353,8225,4354,8224,4355 ,8226,4356,8227,4357,8228,4358,8235,4359,8237,4360 ,8236,4361,8234,4362,8238,4367,8240,4368,8241,4369 ,8229,4370,8231,4371,8230,4372,8232,4373,8233,4374 ,8218,4375,8221,4376,8219,4377,8220,4386,8201,4389 ,8213,4390,8217,4391,8214,4392,8215,4393,8216,4394 ,8223,4396,8222,12289,12290,4383,8250,4384,8251,4385 ,8242,4387,8249,4388,8248,4398,8255,4399,8257,4400 ,8252,4401,8256,4402,8253,4403,8254,12292,12295,12297 ,4353,8225,4354,8224,4355,8226,4356,8227,4357,L95GL20018L10012L90L10013L10014L91*L93<L97`L10027L10028L10029L10030L184 L189 L195 L10033L10034L10035L10036L10037L10038L112 L114 L1324 L140 L135^ L130z L180: L168 L165 L117 L158Z L123 L172 L119 L161r L183r L170 L126$ L137~ L139 ~cex_cvtab _opdope _ctab _symbuf _hshused _hshtab _space _cp _cmst P_isn _swtab _swp _contlab _brklab _retlab _deflab _nauto _autolen _peeksym _peekc _eof _line _treebas _debug _defsym _funcsym _xdflg _proflg _stflg _csym _cval _fcval _nchstr _nerror yy)I  9 I y x 9 x I x yy))x ye @ 5@   5_N vf  5e}- = u= ww %@ @t5  @wLw H @\ 6 (   @t% N v -  5 @  -   ~zvr* eb^ZVP eFBs %4 5($ %ite pointer .bss cstrr: .=.+2 /read pointer cstrb: .=.+cstrt /base of quick access fragment status,f); /*DEBUG*/ if((t = (status & 0377)) != 0) { if(t != 2) { printf("Fatal error in %s\n",f); printf("t = %d\n",t); } dexit(); } return((status>>8) & 0377); } flags(argv) char *argv[]; { int j,xx; char *ap; j = 1; ap = argv[1]; while(*++ap != '\0') { switch(*ap) { default: printf("Unrecognized flag: %c\n",*ap); dexit(); case 'c': count = 1; continue; case 'i': /* Ignore file */ if(!xx) { xx = 1; only = 0; ignonl = argv[++j]; }.globl succ .globl iget .globl push push: jsr pc,iget mov (r0),r2 mov r2,r1 1: mov r1,-(sp) jsr pc,iget mov (sp)+,r1 mov r0,-(sp) mov (r0),-(sp) dec r2 bgt 1b mov r1,-(sp) jsr pc,succ / preserve c bit from here on mov (sp)+,r2 1: mov (sp)+,*(sp)+ dec r2 bgt 1b rts pc /pass sret or fret back to invoking rule [] {0,1,1,1,2,2,2,2,2,2 ,4,5,5,6,6,6,6,7,9,10 ,11,12,12,3,3,3,3,3,3,3 ,3,3,3,3,3,3,3,3,3,3 ,3,3,3,3,27,28,29,30,26,26 ,26,26,26,26,24,25,21,21,22,22 ,22,8,8,16,17,19,18,14,15,15 ,15,15,20,13,23,23,23,23,23,23 ,23,23,23,23,23,31,31,31,31,-1}; int yyr2[] {0,1,1,0,1,2,2,1,2,1 ,1,1,2,4,4,4,4,1,1,1 ,1,2,0,3,2,2,2,4,4,4 ,4,4,3,3,1,5,3,3,2,2 ,2,2,2,4,2,2,2,2,1,1 ,1,1,1,1,1,1,2,2,2,2 ,0,1,3,1,1,1,1,2,1,1 ,1,2,1,1,3,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,-1}; int yygo[] {0,-1,1,0,2,14,73,31,87,119 ,133,-1,98,2,47,7,66,8,67,omp: %s %s\n",a,b); /*DEBUG*/ a--; b--; while(*++a == *++b) { if(*a == '\0') return(1); } return(0); } char buf[512]; int nread 1; get(ifile) int ifile; { char static *ibuf; if(--nread){ return(*ibuf++); } if(nread = read(ifile,buf,512)){ if(nread < 0)goto err; ibuf = buf; return(*ibuf++); } nread = 1; return(0); err: nread = 1; printf("read error\n"); return(0); } int tp[1] 1; int optr[4]; char bsp[512]; char *obuf[1] bsp; int nflush; put(fil,string,n) char *string;?O?nP?PnQ?QT?Q?Q?O?R? 0: .even mov (sp)+,r1 mov (sp)+,r0 0 rts pc compare: mov r0,-(sp) mov $buffer,r0 1: cmp (r0)+,$-1 b; itab.hptr = &ipsp; itab.symt = &issp; itab.hsiz = PTRI; itab.ssiz = CHARI; itab.nsym = 0; itab.curb = 1; if((fi = open(ignonl,0)) < 0) { printf("Cannot open ignore/only file.\n"); dexit(); } if((read(fi,b,6) == 6) && (b[0] == 0100200)) { if(read(fi,itab.hptr,b[1]) < b[1]) { printf("Cannot read ignore/only file.\n"); dexit(); } if(read(fi,itab.symt,b[2]) < b[2]) { printf("Cannot read ignor/only file.\n"); dexit(); } close(fi); } else { close(fi); compile(); } retct/T/cont; collect/U/cont; collect/V/cont; collect/W/cont; collect/X/cont; collect/Y/cont; collect/Z/cont; skip2/a/coll; skip2/b/coll; skip2/c/coll; skip2/d/coll; skip2/e/coll; skip2/f/coll; skip2/g/coll; skip2/h/coll; skip2/i/coll; skip2/j/coll; skip2/k/coll; skip2/l/coll; skip2/m/coll; skip2/n/coll; skip2/o/coll; skip2/p/coll; skip2/q/coll; skip2/r/coll; skip2/s/coll; skip2/t/coll; skip2/u/coll; skip2/v/coll; skip2/w/coll; skip2/x/coll; skip2/y/coll; skip2/z/coll; skip2/A/coll; skip2/B/coll; skip2/C/coll; 10304 4715 303 50304 16707 26 4767 177752 4715 105700 1342 6204 103002 0 677 6304 114 0 . = dldr-500+744 16701 26 12702 352 5211 105711 100376 116162 2 [core*2048.]-400 5267 177756 765 prs end: VV V V ?VSSlWSSvW?W?WSSSS?NN?NNTSTSS?TXN?TXN?fN?fNTT?$T??N??NSS?NN?fN??N??W??W?W?W?W?W?W?W?W?W?? Xw ~w+De+  + % 0w7 +7 +ׯ+- + +(w|+7 ~+ .wr+eXB J ӕ- R r f e0 @ >+ ҋ D~8BXFX *; return(0); } $13,tccm jsr pc,flag / 8Kch for end zone mov $endz,r4 1: jsr r0,mtrack; 101101 dec r4 bne 1b / foreward guard mov $199.,r4 1: jsr r0,mtrack; 10101 dec r4 bne 1b / blocks mov $nblock,r3 1: jsr r0,mtrack; 10101 jsr r0,mtrack; 10110 jsr r0,mtrack; 11010 jsr r0,mtrack; 01000 jsr r0,mtrack; 01000 jsr r0,mtrack; 01000 jsr r0,mtrack; 01000 mov $nword-4,r4 2: jsr r0,mtrack; 111000 dec r4 bne 2b jsr r0,mtrack; 111011 jsr r0,mtrack; 111011 jsr r0,mtrack; 111011 jsr r0,mtrack; 111011 js b ee%5%1e& &%% %.%L%% & %_6u- @w C   3w%g 3" _0" xF%$%_0"_0"&( v(e 3 3 34 4 %#% 4 % %%%2- %  %(;%84%2l %intf("Line too long: %d.\n",lno); dexit(); } if(c & 0200) { printf("Illegal character: %o line %d\n",c,lno); dexit(); } if(fl) { if((*flag[fl])()) continue; } /*printf("cs = %d cc = %c ca = %d\n",cs,c,tab[cs].cl[c]); /*DEBUG*/ if(p = tab[cs].cl[c]) (*acts[p])(); continue; } if(ibuf == ibuf1) return; ibuf = ibuf1; goto top; } init() { int b[3]; auto fi,i; extern coll(),save(),out(),asym(),asw(),csym(),csw(); extern incl(),decl(),sk(),sk2(); extern dexit(); ib, 7 $7 $7 7 w @  7  . $ e!& 7 7   + - 7w t 7 rn7h ' t ~    7  0 wp`w e0YYYI9YY9 init(); i = 0; if(argc == 1) { *ibuf1 = 0; curfl = 2; curf[0] = '_'; curf[1] = '\t'; goto pipe; } while(++i < argc) { curs[4] = '\t'; if(fopen(argv[i],ibuf1) < 0) { printf("Can't open %s\n",argv[i]); dexit(); } curfl = 0; while((curf[curfl] = *argv[i]++) != 0 && curfl <=8) if(curf[curfl++] == '/') curfl = 0; curf[curfl++] = '\t'; if(curfl == 8) curf[8] = -1; pipe: ibuf = ibuf1; lno = 1; driver(); close(file); } flsh(0); close(tp[0]); /* monitor(0); /DEBC=EDCB' P&#&NZfl #!""$^22202##   4 ^ z : Z r r $ ~ 00000000LT\dn````Arg countMissing temp fileCan't create %sTree space botch.globl fltused Missing temp fileI M8M??xM??xM??M?M?M?MMMMMT?MT? N?N?N?.N?BN?FN?NN?NN?TXN?TXN?fN?fN?rN?rN??N??N?N?N??N?fN??N?N?NN?NN?TXN?TXN?fN?fN??N??N?N?TO?(O?? L20002L13L14D L15XL16J _eqnbox"l~eqnboxlbhp1p2L18L17jL19BL20 L21 _size"n~sizenp1p2_numb"|~numb|c `t  5~F? %5"F7# y%3  #_  4@ 478Ze   7_b!   3_ w ``5 5 B 5Nef '% C Cae !u%% ef &% %(_&$ %%   w%%# A1l %( Ne $Ce L &  5%*  5 B@ @ae54N @-#@ !%*@ @a% %  @@54 u-%* \  ~ &  2_z#w b @ @me,55 De,_%%*_%%f5 Ce,M I%*E%@Ap,p(  N d& AA 2r %AA 2r  eC- u-u5ueD- FA1@ @m5L%  5  Nfe L%   Nff L% N =w D 5 w%(Nf&e %  =%$%(Nf&e %  =% r eBA! y" %Pe( ^ x" U 4 % %, p _`%p, N& H%e =_b _`%-&e@@ cc -c -O c0[01234].c cc -c -O c1[0123].c as c1t.s; mv a.out c1t.o cc cvopt.c a.out table.s table.i as table.i; mv a.out table.o cc -c -O c2[01].c ed c0t.s g/fpp =/s/1/0/ w q as c0t.s; mv a.out c0t.o cc -s -n c0?.o cmp a.out /lib/c0 ed c0t.s g/fpp =/s/0/1/ w q as c0t.s; mv a.out c0t.o cc -f -s -n c0?.o cmp a.out /lib/fc0 cc -s -n c1?.o table.o cmp a.out /lib/c1 cc -f -s -n c1?.o table.o cmp a.out /lib/fc1 cc -s -n c2?.o cmp a.out /lib/c2 rm *.o table.i a.out DC(@p@0@pAf r2p 5 _L% N&_T%w w D eD-w w D@( = x2F=a;ADp}5@ =@0=Q-=x@' RF %+A r=A r &@t@t=A_F w w BCJ- `f '%f '%_l( J-  H%*%.B%> 9%(5%/%*eAfVp^ AADtpd       O N M L K I GAmovif,I GAmovfi,I GAsetl movfi,-(sp) movsp)+,I seti setl movif,I seti GBsetl movif(I),I seti GAmov,-(sp) setl movifsp)+,I seti GCsxt GAmovsp)+,I -- -!-P,F-G-NZ-UZ-K-L-M'C GBM'C(I) ML,A KBML(I),A KAMC,A GBML,#(I) GBKJML(J),#(I) GBKIMC,#(I)  M8M??xM??xM??M?M?M?MMMMMT?MT? N?N?N?.N?BN?FN?NN?NN?TXN?TXN?fN?fN?rN?rN??N??N?N?N??N?fN??N?N?NN?NN?TXN?TXN?fN?fN??N??N?N?TO?(O??* ҋ D~8BXFX *ӕ0  $f v Le0 9ev*p* h*b* 7R*we&  m6* 4* 0~  0  0~ w7 * ) )0   )Wp `e0eӕ?f) ,)P ) ) @f ) Z7D') JXZ|)t)-n)f)f@w fw'w&PXwfw&VXJA 7 (fAW,f B@ 8 @&61fA   @ @e7j&1@\X 1w&f@@& HADCBF7F(F6rwH*6r@<=@A>?DEBC=EDCB(KfSVW' P<@#<@d@p@|@@ #!""$vJJJHJ0@@@## @@@A A  L v R r  < HH00HHHHHHbAjArAzAAN& <85& 28 eRNf f%5wR 75& 7  N Nf f%55 Nf b &B /eN @w)%ZN  5 5Nf X%5%(%F %% -Q(K%V% %! 7NfS %56Nf %5_@55  5~F@5 5E 0@ r e@A! y.  _%+%I_ _D5  mov $4005,tccm jsr pc,compare jsr pc,flag tst r4 bne 1b mov $4003,tccm jsr pc,flag1 br error4 jsr pc,compare mov savr5,r5 mov savsp,sp rts pc error1: mov $1,r0 br 1f error2: mov $1,r0 br 1f error3: mov $3,r0 br 1f error4: mov $4,r0 br 1f error5: mov $5,r0 br 1f error6: mov $6,r0 br 1f error7: mov $7,r0 1: mov $1,tccm mov savr5,r5 mov savsp,sp jsr pc,4(r5) ; .even rts pc compare: mov r0,-(sp) mov $buffer,r0 1: cmp (r0)+,$-1 bne error5 cmp r0,$buffer+nwo5:4N f  AAE@ 54N   AE@ u@ 5_x Nf z &B /e_x u- u-3B NB /_ (_ N%Z_x -_t ) 0+_x M_x @  _x %$B /%  _x  p_x %#_x  &_  , % _x  V % _x NB r e@A! yB /'NB_ _x BN_t w <$B 5~F 5~F55N& , 55V 5~F@ 5~F3Nf %3@ 5~F 5~F@3Nf %s@5Nf , 5 e}-@=E@-5ʥ@%$/N&& % $@ 5~F E@-@%$  &f % eʋ_w .B5  @@ 5% C w. r e\@A! y7 < 7f<  e%#>HCHRHYH_HfHkHpHvH|HHHHHHHHHHHHHHHHHHHHHHHHHHHHI IIIIIIII"I&I)I,I/I2I5I9I=I@ICIFIHITIYI[I`IeIjIoIyIIII:,nameshort constantstringfloatdouble*r++*--r++pre--pre++post--post!un&*-~.+-*/%>><<&|^->int->doubledouble->int&&||&~double->longlong->doubleinteger->longlong->integer==!=<=<>=>p>=p=+=-=*=/=%=>>=<<=&=|=^=& for tests=& ~?callcallcallgotoj w4$  Nfe j%  5~F  Nfe j%   Nff j% N =w #D 5~F w#%(Nf&e %  =%$%(Nf&e %  =% r eXAA! y"  %Pe( ^ x8A b U 4 % %, p _~%p, NfS& f%e =_ b _~%Vf = 1; goto loop; /* lead backward */ case 014: leadf = 0; goto loop; /* initialize */ case 000: escf = 1; leadf = 1; rail = 0; mag = 0; font = 0; x = 0; y = 1300; goto loop; default: error("Bad control"); } /* flash code */ case 00: case 01: flash(code&077); goto loop; } error("Eh?"); } done() { fflush(obuf); exit(); } erase() { wvt(2, 01, 01); } flash(c) { char *cp; int sx, sy; int ft; if (font) c =| 0100; if(rail && mag) ft = p'+ N& | @5%' 5 If `%5D%b 0  f 0_x %@%b 0 D(K@e5 5W5V5%(K5%+ %,%I%JO5  %W%$%Z%WZ5u 5~F%uuNf& f%5%(K- O_x 5u_x u-_x    75)00005,00006,00007,00008, 00001,00002,00003,00004,00005,00006,00007,00008, 00001,00002,00003,00004,00005,00006,00007,00008, 00001,00002,00003,00004,00005,00006,00007,00008, }; int fontab[128] { 00000,01150,01164,01156,01155,03154,03151,01172, 01163,01144,01142,01170,01146,02152,01165,01153, xxxxx,01160,01055,02073,xxxxx,01141,01137,01143, 02140,01145,02047,01157,00001,01162,00002,01166, 01055,01167,01161,01057,03056,01147,00003,03054, 01046,01171,xxxxx,01045,xxxxx,01121,01124,01117, 01110,01116,011Z S P W R U \ ] ^ _ ` a } :0j2 & 6  2w 1%A  2X@& l1 A  2@& N1 7rZ @A   2X 17.Z@e-$ZA  2@e7ZBZX 1X 1X 1 5,@X 17WX 1  &Y %7Y 7 Y f f%# 0X 1 lYA /PW 81X@& l1 A  2 0X 1 F/ Y  2wf0w T0C wR0%ZW@Duplicate case (%d)cfcc jbr L%d L%d:tst (sp)+ cmp (sp)+,(sp)+ add $%o,sp %d: %c%oEEEE! r * * r * * dr D" AWp 8 E / .)*)ffD /e ),b, *E / eN/E / %M( (( (Nff((ffJD /e ( 4E / e N8E / C@E / e NEE / jE /w(@t5M5 @ @a0 Z u-N&& Z2% @a Ze 5 5 @ @ap-Z@ @a5Z u-AupA- uAupu @ @-v' p'l'h' b'Nm ffP'fD /e <'5 2'NmJE / u-5 *' 'OE / N&& Z2%@-N&& H2%WE / e ㆵ u-& &[E / 5 u-_N`E / N&& Z2%@-eE / e 놵 w 4CB 05 '4- qE  w4- 54t5 te ׂ  w C  %% 1w w ~B b#  %*.%+-%HLK  w2w DC B_tC7^( y & %5& $ e& eN _& & e& & e& e_ z$5& p$ e&  & &  z  k   s & _  mts = 172520 mtc = 172522 mtbrc = 172524 mtcma = 172526 tread: 1: mov ba,mtma cmp mtapa,tapa beq 1f bhi 2f jsr pc,rrec br 1b 2: jsr pc,rew br 1b 1: mov wc,r1 1: jsr pc,rrec add $256.,r1 bmi 1b rts pc rrec: mov $mts,r0 bit $2,(r0)+ bne rrec tstb (r0)+ bpl rrec inc r0 mov $-512.,(r0)+ mov mtma,(r0) mov $mtc,r0 mov $60003,(r0) 1: tstb (r0) bpl 1b tst (r0)+ bpl 1f mov $-1,(r0) mov $60013,-(r0) br rrec 1: add $512.,mtma inc mtapa rts pc rew: mov $60017,*$mtc clr mtapa rts pto loop; /* lower rail */ case 001: rail = 0; goto loop; /* upper mag */ case 003: mag = 1; goto loop; /* lower mag */ case 004: mag = 0; goto loop; /* upper font */ case 006: font = 1; goto loop; /* lower font */ case 005: font = 0; goto loop; /* escape forward */ case 007: escf = 1; goto loop; /* escape backward */ case 010: escf = 0; goto loop; /* stop */ case 011: error("done"); /* lead forward */ case 012: leadase(); y = 1300; } } else { y =+ esc; /* if (y>1300) error("Off top"); */ } goto loop; /* control, size change */ case 02: if ((code&020) != 0) { /* size */ esc = code & 017; if (esc==15) error("Bad size"); size = sizetab[esc]; wvt(3, 1, 4, size); if (dflag & single[esc]) x =+ 55; if (!dflag & !single[esc]) x =- 55; dflag = !single[esc]; goto loop; } switch(code&017) { /* control */ /* upper rail */ case 002: rail = 1; gohSwitch table overflowDefault not in switchUnknown keywordRedefinitionStatement syntaxExpression too largeStatement syntaxUndefined structure: %.8sNot an argument: %.8s%.8s undefined~%.8s=%c%o ~%.8s=L%d Conflict in storage classType clashMisplaced 'long'Bad structure name%.8s redeclaredDimension/struct table overflowiy))ytermTERMtokenTOKENleftLEFTnonassocNONASSOCbinaryBINARYrightRIGHTprecPRECinvalid escape, or illegal reserved word: %s%s should have been defined earliereof before %%}yyvalyyvalv(yypv%c%d)yypv[%d]EOF inside commentEOF in string or character constantaction does not terminatenonterminal %s not defined! %s: %d too many statesputitem(%s), state %d yacc error--duplicate itemout of state space%d: %s %d, %s %d, working set overflow State %d, nolook = %d flag set! %s     XX@ 5u-_H @  5@  5@ 7 yN @ K @   NNNm Q N @   @ T NNNm Z N " A A @  @ ]  A A @l  NNNm c   Nm %R   u @  u-wXw T L7H@ 5@ 5@ 5@ 5@ 506L10007L58~summarypnisL60zL61_printf L62L63L64L65(L20021L67$L69L70L71L72^L20023FL75L76 L77*L78PL79sL80L81L82L83 L84 L850 L86c L87t L10008zL59L89 L90L91 L92L93 L94L95 yi9X99 )999 9 i9 H 9 H H i9  9 H H 9 9 ip=1 count=3999 : 8100 : dd if=../util/rkuboot ibs=512 count=1 conv=sync : 8101 thru 12099 : dd if=/dev/rk0 bs=512 skip=1 count=3999 aregtregL100380L89@_arlengt"HL10040 L20031TL107fL101xL105`~arlengtHtL100nL99jL20033Z_dirsw# L108 _simpsw# L109 _hashsw#6 L1106 _pswitch"~~pswitch~deflabfptlablptabsbestpoctabZijafpalpncaserangeswpworstL112L113 L111_sortjle  $ %%  eu@E%N 5f %#  &  xe?fe`( @E%_$ _%4  f % _&_5 %%  5%52 5 N &&  te5@tE5E @555%P %% 55 u5 $%%D-55 %> %%e%_cbranch"L10050 L10051 L201 L200 L194 L197 L192 ~cbranchalblareg condoptreelblregatreel1L191 L10052 L195b L20063H _label" L20067 L20071z L20069 L10047 L10048 _rcexpr L202& L203Z L10053< L204N L206l L207%L10054v L10055z _branch" ~branch opclblaop` Cc % bN(K $% wT%fS_%(K_ 7 _C%fS%_FN $%F%(K D%nA \G< \G]B8N(K $% 5%W%Z%W- &f@B /e S%VfRB /%_vB  _Fw *Bu@ 5~F5%5 %6%"_%V_N85& 8 eNf@ f% 8  N Nf@ f%b8 ^8 @ZW%V page[ll%PL]=0; } fetch (ll%PL); cp = 0; continue; case '\0': continue; case ESC: c = getchar(); if (c == '7') { store(ll%PL); ll--; fetch (ll%PL); } else { outc (ESC, &line); outc (c, &line ); } continue; case '\r': line = lbuff; continue; case '\t': outc (' ', &line); cp = line-lbuff; while (cp++%8) outc(' ', &line); continue; default: outc(c, &line); } for (i=0; i  _%\ N 21 5u-_w X 7HCHRHYH_HfHkHpHvH|HHHHHHHHHHHHHHHHHHHHHHHHHHHHI IIIIIIII"I&I)I,I/I _ !5%  = %\  !5\ u-_N ^!5 r e8A! y%02%9.@e7H%0 5 5%0w$ _%9 upAmew%a%z%A%Z %_%.%$:lDu%a%z%A%Z%0%9 %_%.%$N  H#B#:# 5@_w #  _=  _b=  _b= xxxxArg countMissing temp fileCan't create %sTree space botch.globl fltused Missing temp fileIllegal initialization.bss L%d:.=.+4 .text mov%c r%d,r0 mov%c r%d,%c(sp) tst%c r%d No code table for op: %sNo code table for op %dmov%c r%d,r%d mov%c r%d,r%d Register overflow: simplify expressionr%d*tst r%d adcsbc r%d  Bb"|@NHNHHHn*+,HIJ<::<::FVVhhzzb "56  $L%d(r%d)r%dCompiler error: pname(r%d)%c%c(r%d)pname called illegallyIllegal use of registerL%d_%.8s%sNo match' for op %dcmp r0,$%o jhi L%d asl r0 jmp *L%d(r0) .data L%d:mov $L%d,r1 mov r0,L%d L%d:cmp r0,(r1)+ jne L%d jmp *L%d-L%d(r1) .data L%d:mov r0,r1 clr r0 div $%o,r0 asl r1 add $L%d,r1 mov r0,*(r1)+ mov (r1)+,r1 L%d:cmp r0,-(r1) jne L%d jmp *L%d-L%d(r1) .data L%d:jbr L%d sub $%o,r0 L%d L%d %o L%d:.. L%d L%d L%d L%d:.. %o L%d:L%d L%d .text  _%2 5@ "r%/_7& & & v(e2 2 25L "5& 5% @-%% r? %% ,% %$%    &  5   &  5 r eEA! y"U & &&_: % $ v(e Nf  2%wf%U(A p_%5DC(@p@0@pAf r2p 5 _R% N&_Z%w w D eD-w w D@( = x2F=a;ADp}5@ =@0=Q-=x@' RF %+A r=A r &@t@t=A_F w w BCJ- `f "'%f "'%_r( J-  H%*%.B%> 9%(5%/%*eAfVp^ AAfS f%V f%@ 5~F=%%  e@?5  E /  f& %ww D Jf& `%E /NE / wdw RNE / wNw <@  xCE / ENE / ww  = ==;E / Nff f fff /e  0 7=ww  D -E /%ww B __%     ~F5_5 ӕ0 $f v Le0 9e** ** 7*we&  m* * 0~  0  0~ w7 Z* P* L*0   8*Wp `e0eӕ?f * ,*P * * @f ) Z7>') JXZ))-))f@w fw&w&PXwfw&VXJA 7 H)fAW,f B@ 8 @&61fA   @ Dtp0(%( "5 @ `, "5!@ `5,@ `,BD " `,w w L25BeCe~-42nF  272@wt movclrcmptstaddsubincdecmuldivasrashaslbicbic $1,bitbit $1,bisbis $1,xornegcom*$jeqjnejlejgtjltjgejlosjhijlojhis/nopjbr ?K?K?K?K?K?K??K??K?K?K?L?L?L?L?L?&L?6L?JLhL?xLTLLT?L?LLT M8M??xM??xM??M?M?M?MMMMMT?MT? N?N?N?.N?BN?FN?NN?NN?TXN?TXN?fN?fN?rN?rN??N??N?N?N??N?fN??N?N?NN?NN?TXN?TXN?fN?fN??N??N?N?TO?(O??@p ҋ D~8BB pӕ0 $f v Le0 9eoo oo 7owe&  mo o 21~  21  21~ w7 |o ro no0   ZoWp `e0eӕ?fBo ,8oP .o (o @f  o ~7n B~nn-nnf VlPlHl  78l 4l 0l7*n 7 lf@l _fcval _nchstr _nerror _paraml _parame _strflg _osleft _mosflg _initflg _inhdr _dimtab _obuf _sbuf _dimp _regvar _funcblk _extdef"~extdefdselsizetypesclassocsv _symbol L1_getkeyw" L10000TL2L6`_blkhed" _decl1 L7b_printf L8L10001L4_decref _cfunc"_cinit"|L11p_error Y IIY Y yyyyY Y  IY  IY Y iYY8228 ,4358,8235,4359,8237,4360,8236,4361,8234,4362,8238 ,4369,8229,4370,8231,4371,8230,4372,8232,4373,8233 ,4374,8218,4375,8221,4376,8219,4377,8220,4386,8201 ,4389,8213,4390,8217,4391,8214,4392,8215,4393,8216 ,4394,8223,4396,8222,0,4394,8261,0,4394,8262 ,0,4394,8263,0,4394,8264,0,4353,8225,4354 ,8224,4355,8226,4356,8227,4357,8228,4358,8235,4359 ,8237,4360,8236,4361,8234,4362,8238,4367,8197,4368 ,8198,4369,8229,4370,8231,4371,8230,4372,8232,4373 ,8233,4374,8218,4375,8221,4376,8219,4377,8220,4386 ,8201,4389,8_cvtab#_opdope#_ctab#_symbuf _hshused _hshtab _space _cp _cmst P_isn _swtab _swp _contlab _brklab _retlab _deflab _nauto _autolen _peeksym _peekc _eof _line _treebas L20035 L20034 L124 L125 _prins L1270 L1298 L131H L20036V L10019r L138 L141 L142 L143 L10020 L144. _collcon L146* L147D L148T L149v L10021h L150p L10022 L152 L1558 L10023$ L10024 _xdcalc L157L160x L162 L163L164L20037 L171 L174 L175L176& L182L10026 L190L20030erm[] { "%s", 0 }; char *yysnter[] { "%s", "%s" }; %d/%d terminals, %d/%d nonterminals %d/%d grammar rules, %d/%d states %d shift/reduce, %d reduce/reduce conflicts reported %d/%d working sets used memory: states,etc. %d/%d, parser %d/%d %d/%d distinct lookahead sets %d extra closures %d action entries %d action entries saved through merging %d states %d goto entries %d entries saved by goto default conflicts: %d shift/reduce, %d reduce/reduce fatal error: , line %d int %s[] {0# `t  5~F? %5"F7# y%3  #_  4@ 47b8Ze   D8_h! "  3_ w ``5 5 B 5Nef "'% C Cae !u%% ef &% %(_,$ %%   w%%# A1l %( Ne $Ce L &  5%* ?O?O?nP?PnQ?QT?Q?Q?O?R?+ ҋ D~8BXFX *@e7d&1@\X 1w&f@@& HADCBF7(F6rw*6r@ J&**7*B]PP7 v*EDE!wE\*ED5!5! w |bXW!wZ44w643  xXwW! B  wZ44 wL4"4 w64 4w643  X)E7)E)U)E@)U@) )  ]E UUB]))) L) $BE? e]CE e@]@E xX5 )e5(5@(eY@] H e] 5@(> L]; N]66  N](R] `&e  N]   N](e(bww5Q$\ ] f   EU P5'   P\fPPQ7 '5    5 C B A  `5'  5p'  5^'  eE\  "$ $5"' $$ 5&  5&  \5@&  wL   w>\ \& (    5@x&  Z& B    @& UJ&w\ ,& w\ &w&w&w  7 % %a %U%%W 8U] W 8E\fc     ` \ ]-%% a h h   \ \a  ! p ]\R B\ %W !W e UETR5$  5$  U$wp   \]   7 $r@\r@]  e  JW!]W!(] 5h$7 `$e  , J$N$@$ f\    \]$ $$$]& N & N  N N S C B A  eW!\Շ w^ m## # rf]5#e        W!]\P    0&\d& dN & dN dC N eN e-.#8#$##<=@A>?DEBC=EDCB(KfSVW' P<@#<@d@p@|@@ #!""$|PPPNP6@@@## @@@A A  R | X x  B NN66NNNNNNbAjArAzAA~~~~Arg countMissing temp fileCan't create %sTree space botch.globl fltused Missing temp fileIllegal initialization.bss L%d:.=.+4 .text mov%c r%d,r0 mov%c r%d,%c(sp) tst%c r%d No code table for op: %sNo code table for op %dmov%c r%d,r%d mov%c r%d,r%d Register overflow: simplify expressionr%d*tst r%d adcsbc r%d """""Hh(FTNTNNNt*+,HIJB@@B@@L\\nnh "56&$L%d(r%d)r%dCompiler error: pname(r%d)%c%c(r%d)pname called illegallyIllegal use of registerL%d_%.8s%sNo match' for op %dcmp r0,$%o jhi L%d asl r0 jmp *L%d(r0) .data L%d:mov $L%d,r1 mov r0,L%d L%d:cmp r0,(r1)+ jne L%d jmp *L%d-L%d(r1) .data L%d:mov r0,r1 clr r0 div $%o,r0 asl r1 add $L%d,r1 mov r0,*(r1)+ mov (r1)+,r1 L%d:cmp r0,-(r1) jne L%d jmp *L%d-L%d(r1) .data L%d:jbr L%d sub $%o,r0 L%d L%d %o L%d:.. L%d L%d L%d L%d:.. %o L%d:L%d L%d .text Duplicate case (%d)cfcc jbr L%d L%d:tst (sp)+ cmp (sp)+,(sp)+ add $%o,sp %d: %c%oEEEE! # define PL 102 # define ESC 033 # define SI 017 # define SO 016 # define LINELN 800 char *page[PL]; char lbuff [LINELN], *line; main () { int c, i, j, ll, cp, mustwr; extern int fin, fout; fin = dup(0); fout = dup(1); for (ll=0; ll0) switch (c = getchar()) { case '\n': store (ll%PL); if (++ll >= mustwr) if (page[ll%PL] != 0) { printf ("%s\n",page[ll%PL]); mustwr++; free (page[ll%PL]); ijgapmidwnlistp1p2L10000LL10001PL42L20008L45L20010L10002FL10003PL48L49 L50L20012tL53* L540 L55A L56L57L58H L100076L63K L64Q L20013L66T L67Z L70] L71c L72z L73 L20015 _shift2" ~shift2 b1b2b3subsh+2(I) ML,A KAMC,A GBML,#(I) KBGJML(I),#(J) KAGJML,#(J) GBKJML(J),#(I) GBKIML,#(I) GDKBML(I),*(sp)+ GDKAML,*(sp)+ M'C M,A KBM(I),A KAM,A GBM'C(I) KBGJM(I),#(J) KBmovC',J M(I),J movC,A KAmovC',J M,J movC,A KAGJM,#(J) KCGBMsp)+,#(I) KCGBmovC(I),J Msp)+,J movC,#(I) asrC GBasrC(I) aslC GBaslC(I) ash,A KBash(I),A KAash,A j ..7.".#.$.%.(.).*.+.-...Q.0.< .= .> .? .@ .A .B .C .D .E .H.I.O.movo-!-P,F-G-NT-UT-K-L-M'C GBM'C(I) ML,A KBML(I),A KAMC,A GBML,#(I) GBKJML(J),#(I) GBKIMC,#(I) KBGJML(I),#(J) KAGJMC,#(J) GDKBML(I),*(sp)+ GDKAMC,*(sp)+ clr clr+ mov,A+ sxt mov,A mov+,A+ mov(I),A+ sxt KAmov,A+ sxt KAsetl movfi,A seti KAGJsetl movfi,#(J) seti KBmov(I),A mov+2(I),A+ KAmov,A movsp)+,A+ GBmov,#+2(I) sxt(I) KAGJmovsp)+,#+2(J) mov,#(J) GBKImov+2,#(I) sxt(I) KCGBmovsp)+,#+2(I) sxt(I) KCGBmovsp)+,#(I) movsp)+,#vC',I sxt- div,I- movC,A KCmovC',I sxt- divsp)+,I- movC,A KCGJmovC(J),I sxt- divsp)+,I- movC,#(J) GDKCmovC2(sp),I sxt- divsp)+,I- mov,*(sp)+ KCmovb',I xor,(sp) movsp)+,I movb,A GDmovC(sp),-(sp) KAxor,(sp) movCsp)+,I movC,*(sp)+ movC',I asr movC,A GBasrC(I) movC(I),I movif,I GBmovif(I),I GAmovif,I GAmovfi,I GAsetl movfi,-(sp) movsp)+,I seti setl movif,I seti GBsetl movif(I),I seti GAmov,-(sp) setl movifsp)+,I seti GCsxt GAmovsp)+,I -- >HCHRHYH_HfHkHpHvH|HHHHHHHHHHHHHHHHHHHHHHHHHHHHI IIIIIIII"I&I)I,I/I2I5I9I=I@ICIFIHITIYI[I`IeIjIoIyIIII:,nameshort constantstringfloatdouble*r++*--r++pre--pre++post--post!un&*-~.+-*/%>><<&|^->int->doubledouble->int&&||&~double->longlong->doubleinteger->longlong->integer==!=<=<>=>p>=p=+=-=*=/=%=>>=<<=&=|=^=& for tests=& ~?callcallcallgotoj clint: rti dr11int: bic $2,drsc movb drrc,*lchar tst drrc bge 1f inc eof br 3f 1: inc lchar inc nchar cmp lchar,$charb+nbuf bne 3f mov $charb,lchar 3: jsr pc,stardr 2: rti char: bit $!177,r0 jne disp jsr r5,idle; 10 rts pc mov r0,r1 sub $40,r1 bpl gchar movb chrsw+40(r1),r1 jmp *0f(r1) 0: ret / ignore vtnl vtcr vtbs vttab vtpfx ret / was escape vtnl: sub $16.*7,y incb vtlc incb vtlc cmpb vtlc,$[256.\/7]*2-6 blt vtcr mov $3777,y clrb vtlc jsr pc,cerase vtcr: movf,I GBmovof(I),I GEHAj.(.).7.0.clrC(sp) mov,-(sp) GBmov(I),-(sp) mov+,-(sp) mov,-(sp) GCM'sp) GCM,(sp) GCKBM(I),(sp) GCKAM,(sp) /d/o/x0f&0e/c/s/l40rZ2I5I9I=I@ICIFIHITIYI[I`IeIjIoIyIIII:,nameshort constantstringfloatdouble*r++*--r++pre--pre++post--post!un&*-~.+-*/%>><<&|^->int->doubledouble->int&&||&~double->longlong->doubleinteger->longlong->integer==!=<=<>=>p>=p=+=-=*=/=%=>>=<<=&=|=^=& for tests=& ~?callcallcallgotojump condbranch condset nregsload valueforce registerP((<((j((=((>((?((@((A((B((C((D((E(((((F(()((G(((((( ((!((*((H((+((I((,((J((-((K((.((L((/((W((7((U((Q((0))N))1))O))%))&))b))c))< )$)=$) )>(),)?0)4)@4)0)A,)()B8)=)CB)F)DF)B)E=)8) )$)$) )(),)0)4)4)0) ,)()  )$) L)Q) Q)L) $) )j)6+6+ )!)%*&*bf)cf)P*(`*)`***++,+-*.`*7`*0`*1*F6+G6+H+I+J,K6,L+N6+U6+O",fX)3D,4X,8`,9h,:|,;,jmp GBjmp(I) jsrc,MA GBjsrc,#(I) GAjsrc,d        movC,I KAGJmovf,#(J) KAGJmovfo,#(J) GDKAmovC,*(sp)+ GDKAmovfo,*(sp)+ GAGAM' GAMD,I GAKJMD(J),I GAKIMP,I KDGAMD(sp)+,I KCGAMPsp)+,I GAM,I M+,(sp) VGAKIMsp)+,(sp) VM,I KCGAMsp)+,2(sp) VMsp)+,(sp) GCKAxor,(sp) movsp)+,I GAasr GATsxt- div,I- GATsxt- KJdiv(J),I- GATsxt- KIdiv,I- KCGATsxt- divsp)+,I- M,A' mov,I movC',I MP,I movC,A KBM(I),A' mov,I KAM,A' mov,I KBGJM(I),#(J) mov(J),I movf',I KIMP,I movf,A KCmovC',I MPsp)+,I movC,A KCmovof',I MPsp)+,I movfo,A KAGJM,#(J) mov(J),I KCGBMsp)+,#(I) mov(I),I GDKCmovC2(sp),I MPsp)+,I movC,*(sp)+ KCGBmovC(I),I MPsp)+,I movC,#(I) KCGBmovof(I),J MPsp)+,J movfo,#(I) movf,I movC',I sxt- divP,I- movC-,A KCmovC',I sxt- divsp)+,I- movC-,A KCGJmovC(J),I sxt- divsp)+,I- movC-,#(J) GDKCmovC2(sp),I sxt- divsp)+,I- movC-,*(sp)+ movC',I sxt- div,I- movC,A KCmovC',I sxt- divsp)+,I- movC,A KCGJmovC(J),I sxt- divsp)+,I- movC,#(J) GDKCmovC2(sp),I sxt- divsp)+,I- mov,*(sp)+ KCmovb',I xor,(sp) movsp)+,I movb,A GDmovC(sp),-(sp) KAxor,(sp) movCsp)+,I movC,*(sp)+ movC',I asr movC,A GBasrC(I) movC(I),I movif,I GBmovif(I),I GAmovif,I GAmovfi,I GAsetl movfi,-(sp) movsp)+,I seti setl movif,I seti GBsetl movif(I),I seti GAmov,-(sp) setl movifsp)+,I seti GCsxt GAmovsp)+,I -- -!-P,F-G-NZ-UZ-K-L-M'C GBM'C(I) ML,A KBML(I),A KAMC,A GBML,#(I) GBKJML(J),#(I) GBKIMC,#(I) KBGJML(I),#(J) KAGJMC,#(J) GDKBML(I),*(sp)+ GDKAMC,*(sp)+ clr clr+ mov,A+ sxt mov,A mov+,A+ mov(I),A+ sxt KAmov,A+ sxt KAsetl movfi,A seti KAGJsetl movfi,#(J) seti KBmov(I),A mov+2(I),A+ KAmov,A movsp)+,A+ GBmov,#+2(I) sxt(I) KAGJmovsp)+,#+2(J) mov,#(J) GBKImov+2,#(I) sxt(I) KCGBmovsp)+,#+2(I) sxt(I) KCGBmovsp)+,#(I) movsp)+,#+2(I) ML,A KAMC,A GBML,#(I) KBGJML(I),#(J) KAGJML,#(J) GBKJML(J),#(I) GBKIML,#(I) GDKBML(I),*(sp)+ GDKAML,*(sp)+ M'C M,A KBM(I),A KAM,A GBM'C(I) KBGJM(I),#(J) KBmovC',J M(I),J movC,A KAmovC',J M,J movC,A KAGJM,#(J) KCGBMsp)+,#(I) KCGBmovC(I),J Msp)+,J movC,#(I) asrC GBasrC(I) aslC GBaslC(I) ash,A KBash(I),A KAash,A j..7.".#.$.%.(.).*.+.-...Q.0.<.=.>.?.@.A.B.C.D.E.H.I.O.movof,I GBmovof(I),I GEHAj.(.).7.0.clrC(sp) mov,-(sp) GBmov(I),-(sp) mov+,-(sp) mov,-(sp) GCM'sp) GCM,(sp) GCKBM(I),(sp) GCKAM,(sp) /d/o/x0f,0e/c/s/l:0rZV3d3t3333333l3|3366355553328886z575586^66606644^4h444444 5 B@ @ae54N "@-#@ !%*@ @a% %  @@54 u-%* b  ~ &  2_#w b @ @me,55 De,_%%*_%%f5 Ce,M I%*E%@Ap,p(  N j& AA 2r %AA 2r  eC- u-u5ueD- FA1@ @m5DC(@p@0@pAf r2p 5 _R% N&_Z%w w D eD-w w D@( = x2F=a;ADp}5@ =@0=Q-=x@' RF %+A r=A r &@t@t=A_F w w BCJ- `f "'%f "'%_r( J-  H%*%.B%> 9%(5%/%*eAfVp^ AADtp0(%( "5 @ `, "5!@ `5,@ `,BD " `,w w L25BeCe~-42nF  272@wt movclrcmptstaddsubincdecmuldivasrashaslbicbic $1,bitbit $1,bisbis $1,xornegcom*$jeqjnejlejgtjltjgejlosjhijlojhis/nopjbr ?K?K?K?K?K?K??K??K?K?K?L?L?L?L?L?&L?6L?JLhL?xLTLLT?L?LLT M8M??xM??xM??M?M?M?MMMMMT?MT? N?N?N?.N?BN?FN?NN?NN?TXN?TXN?fN?fN?rN?rN??N??N?N?N??N?fN??N?N?NN?NN?TXN?TXN?fN?fN??N??N?N?TO?(O??+ ҋ D~8BXFX *ӕ0 $f v Le0 9e** ** 7*we&  m* * 0~  0  0~ w7 Z* P* L*0   8*Wp `e0eӕ?f * ,*P * * @f ) Z7>') JXZ))-))f@w fw&w&PXwfw&VXJA 7 H)fAW,f B@ 8 @&61fA   @ @e7d&1@\X 1w&f@@& HADCBF7(F6rw*6r@ J&**7*B]PP7 v*EDE!wE\*ED5!5! w |bXW!wZ44w643  xXwW! B  wZ44 wL4"4 w64 4w643  X)E7)E)U)E@)U@) )  ]E UUB]))) L) $BE? e]CE e@]@E xX5 )e5(5@(eY@] H e] 5@(> L]; N]66  N](R] `&e  N]   N](e(bww5Q$\ ] f   EU P5'   P\fPPQ7 '5    5 C B A  `5'  5p'  5^'  eE\  "$ $5"' $$ 5&  5&  \5@&  wL   w>\ \& (    5@x&  Z& B    @& UJ&w\ ,& w\ &w&w&w  7 % %a %U%%W 8U] W 8E\fc     ` \ ]-%% a h h   \ \a  ! p ]\R B\ %W !W e UETR5$  5$  U$wp   \]   7 $r@\r@]  e  JW!]W!(] 5h$7 `$e  , J$N$@$ f\    \]$ $$$]& N & N  N N S C B A  eW!\Շ w^ m## # rf]5#e        W!]\P    0&\d& dN & dN dC N eN e-.#8#$##<=@A>?DEBC=EDCB(KfSVW' P<@#<@d@p@|@@ #!""$|PPPNP6@@@## @@@A A  R | X x  B NN66NNNNNNbAjArAzAA~~~~Arg countMissing temp fileCan't create %sTree space botch.globl fltused Missing temp fileIllegal initialization.bss L%d:.=.+4 .text mov%c r%d,r0 mov%c r%d,%c(sp) tst%c r%d No code table for op: %sNo code table for op %dmov%c r%d,r%d mov%c r%d,r%d Register overflow: simplify expressionr%d*tst r%d adcsbc r%d """""Hh(FTNTNNNt*+,HIJB@@B@@L\\nnh "56&$L%d(r%d)r%dCompiler error: pname(r%d)%c%c(r%d)pname called illegallyIllegal use of registerL%d_%.8s%sNo match' for op %dcmp r0,$%o jhi L%d asl r0 jmp *L%d(r0) .data L%d:mov $L%d,r1 mov r0,L%d L%d:cmp r0,(r1)+ jne L%d jmp *L%d-L%d(r1) .data L%d:mov r0,r1 clr r0 div $%o,r0 asl r1 add $L%d,r1 mov r0,*(r1)+ mov (r1)+,r1 L%d:cmp r0,-(r1) jne L%d jmp *L%d-L%d(r1) .data L%d:jbr L%d sub $%o,r0 L%d L%d %o L%d:.. L%d L%d L%d L%d:.. %o L%d:L%d L%d .text Duplicate case (%d)cfcc jbr L%d L%d:tst (sp)+ cmp (sp)+,(sp)+ add $%o,sp %d: %c%oEEEE! x 0 0 x 0 0 jx J" B!H"H"%&3\"h"p""&'&&&&'&&&''''''Divide checkC error: constExp. ov. pass 2<<888888888HCHRHYH_HfHkHpHvH|HHHHHHHHHHHHHHHHHHHHHHHHHHHHI IIIIIIII"I&I)I,I/I\`w  _%_75  Nefe %%M% H 7 & f eB~eb 7 dE% R7N%% 78e  | % % p  t  ww N N   7%   7ww @@E  E%N  r55%  fVpC  tk h {qwxevbmhSwitch table overflowDefault not in switchUnknown keywordRedefinitionStatement syntaxExpression too largeStatement syntaxUndefined structure: %.8sNot an argument: %.8s%.8s undefined~%.8s=%c%o ~%.8s=L%d Conflict in storage classType clashMisplaced 'long'Bad structure name%.8s redeclaredDimension/struct table overflowiy))y)Hyiy)iHy)yy))7 % %upN Efe %_^ Ne 5%f&f be 5% %7w& f&f be%# 5ru NN  Ame 5rA f r upN  @E% @E % @E% AA @@5 ww CB 7%-%)r  ffe %-P  HN @# 7 2w ,(?% :  7 iy)) I I  )yy y ii5 5%; 6 xD  - %  fe  5w   % w wt   %   =@w 2 * $%ʋʕ   0 ʥ w 7 %  wʥ E /7   Ew| x% E e E 0w 6%d0!  wPPL101L100~lintyptL93~error fsp1p2p3 p4 p5p6_fflush L103 _printf _putchar ~blockxanapopoldpd nptp1 p2p3_gblock"L107~gblocknpL109L110 _exit ~chklvalappL111L113 L10027& L126L127L10025L118:L119PL120TL121\L122fL129L128L123nL124vL125z~foldopap1ap2p1v1v2L115L114L116<L20019XL20020b_conexp"~conexpt_tree L132L134 PP2ppppp &v"(8Hl^ B Z ^ > \\\\2xxxxx.globl _%.8s External definition syntax.text _%.8s: ~~%.8s: Compound statement requiredL%d:jmp cret .comm _%.8s,%o .data _%.8s=. .=.+%o .=.+%o Too many initializers.even _%.8s=L%d .=.+%o .byte %o %o;%o %o;%o;%o;%o Inconsistent external initializationUnexpected EOFmov $L%d,r0 jsr pc,mcount .bss L%d:.=.+2 .text jsr r5,csv tst -(sp) sub $%o,sp Missing '}'Case not in switciiyyiyi)iyih * x+ % %#2 %e7&= e %% D w%% && & h e & 7t5&6w dJ wXw T L 7l  y o w, < e ~     %    %7   _ x  _, t_, l_, 5 Z%aN Z x :0 0 *f %  * yy)I  9 I y x 9 x I x yy))x y%;  f %   f % %_< %%__  f %  l%%^X T    _74,($7    7 &  & %   _ _ _  5   x t%_< %b_< f P& %D <_, 4 .%_<     ) x      yx )y y y_% e _ r5  f& & n e & |_  %[v7rjfb` \XV R C_ < 8%:%7 .*ˋ.˕     7%__7 & %_;  t _w 2 %N %8 %@[xrp l h5 `%+TNJ % L 6e,7.Ce$C &  9 y)) yiyy yyiiiiii) y)y yy)) iiii iy ee%5%1e& &%% %.%L%% & %_0u- @w C   3w%g 3" _*" xF%$%_*"_*"&( p(e 3 3 34 4 %#% 4 % %%%2- %  %(;%84%2l %# `t  5~F? %5"F7# y%3  #_  4@ 478Ze   7_b!   3_ w ``5 5 B 5Nef '% C Cae !u%% ef &% %(_&$ %%   w%%# A1l %( Ne $Ce L &  5%*  5 B@ @ae54N @-#@ !%*@ @a% %  @@54 u-%* \  ~ &  2_z#w b @ @me,55 De,_%%*_%%f5 Ce,M I%*E%@Ap,p(  N d& AA 2r %AA 2r  eC- u-u5ueD- FA1@ @m5DC(@p@0@pAf r2p 5 _L% N&_T%w w D eD-w w D@( = x2F=a;ADp}5@ =@0=Q-=x@' RF %+A r=A r &@t@t=A_F w w BCJ- `f '%f '%_l( J-  H%*%.B%> 9%(5%/%*eAfVp^ AADtp0(%( 5 @ `, 5!@ `5,@ `,BD " `,w w 15BeCe~-1nF  271@wt movclrcmptstaddsubincdecmuldivasrashaslbicbic $1,bitbit $1,bisbis $1,xornegcom*$jeqjnejlejgtjltjgejlosjhijlojhis/nopjbr ?K?K?K?K?K?K??K??K?K?K?L?L?L?L?L?&L?6L?JLhL?xLTLLT?L?LLT M8M??xM??xM??M?M?M?MMMMMT?MT? N?N?N?.N?BN?FN?NN?NN?TXN?TXN?fN?fN?rN?rN??N??N?N?N??N?fN??N?N?NN?NN?TXN?TXN?fN?fN??N??N?N?TO?(O??* ҋ D~8BXFX *ӕ0  $f v Le0 9ev*p* h*b* 7R*we&  m6* 4* 0~  0  0~ w7 * ) )0   )Wp `e0eӕ?f) ,)P ) ) @f ) Z7D') JXZ|)t)-n)f)f@w fw'w&PXwfw&VXJA 7 (fAW,f B@ 8 @&61fA   @ @e7j&1@\X 1w&f@@& HADCBF7F(F6rwH*6r@<=@A>?DEBC=EDCB(KfSVW' P<@#<@d@p@|@@ #!""$vJJJHJ0@@@## @@@A A  L v R r  < HH00HHHHHHbAjArAzAAxxxxArg countMissing temp fileCan't create %sTree space botch.globl fltused Missing temp fileIllegal initialization.bss L%d:.=.+4 .text mov%c r%d,r0 mov%c r%d,%c(sp) tst%c r%d No code table for op: %sNo code table for op %dmov%c r%d,r%d mov%c r%d,r%d Register overflow: simplify expressionr%d*tst r%d adcsbc r%d  Bb"|@NHNHHHn*+,HIJ<::<::FVVhhzzb "56  $L%d(r%d)r%dCompiler error: pname(r%d)%c%c(r%d)pname called illegallyIllegal use of registerL%d_%.8s%sNo match' for op %dcmp r0,$%o jhi L%d asl r0 jmp *L%d(r0) .data L%d:mov $L%d,r1 mov r0,L%d L%d:cmp r0,(r1)+ jne L%d jmp *L%d-L%d(r1) .data L%d:mov r0,r1 clr r0 div $%o,r0 asl r1 add $L%d,r1 mov r0,*(r1)+ mov (r1)+,r1 L%d:cmp r0,-(r1) jne L%d jmp *L%d-L%d(r1) .data L%d:jbr L%d sub $%o,r0 L%d L%d %o L%d:.. L%d L%d L%d L%d:.. %o L%d:L%d L%d .text Duplicate case (%d)cfcc jbr L%d L%d:tst (sp)+ cmp (sp)+,(sp)+ add $%o,sp %d: %c%oEEEE! r * * r * * dr D" HCHRHYH_HfHkHpHvH|HHHHHHHHHHHHHHHHHHHHHHHHHHHHI IIIIIIII"I&I)I,I/I2I5I9I=I@ICIFIHITIYI[I`IeIjIoIyIIII:,nameshort constantstringfloatdouble*r++*--r++pre--pre++post--post!un&*-~.+-*/%>><<&|^->int->doubledouble->int&&||&~double->longlong->doubleinteger->longlong->integer==!=<=<>=>p>=p=+=-=*=/=%=>>=<<=&=|=^=& for tests=& ~?callcallcallgotojump condbranch condset nregsload valueforce registerP((<((j((=((>((?((@((A((B((C((D((E(((((F(()((G(((((( ((!((*((H((+((I((,((J((-((K((.((L((/((W((7((U((Q((0()N()1 ) )O ) )%))&))b))c))<))=))>")&)?*).)@.)*)A&)")B2)7)C<)@)D@)<)E7)2)))))")&)*).).)*) &)") )) F)K) K)F) ))j)0+0+ )!)%)&)b`)c`)P*(Z*)Z***+*,*-*.Z*7Z*0Z*1*F0+G0+H+I+J,K0,L+N0+U0+O,fR)3>,4R,8Z,9b,:v,;~,jmp GBjmp(I) jsrc,MA GBjsrc,#(I) GAjsrc,(I) clr clrf movC,I movof,I GBmovC(I),I GBmovof(I),I mov+,-(sp) mov,I GBmov+2(I),-(sp) mov(I),I movC',I M'C mov',I M,A GJmovC(J),I M'C(J) GBmovC(I),-(sp) M'C(I) movCsp)+,I GJmov(J),I M,#(J) GBmov(I),-(sp) M,#(I) movsp)+,I GAM1,A+ V'GJmov+2(J),-(sp) mov(J),I M1,#+2(J) V'(J)GBmov+2(I),-(sp) mov(I),-(sp) add1,#+2(I) V'(I)movsp)+,I GAMP GAMsp) VM KAmovC,A KAmovfo,A GBKAmovf,#(I) GBmovC,#(I) movC(I),I GBKAmovfo,#(I) GBKImovC,#(I) movC,I KAGJmovf,#(J) KAGJmovfo,#(J) GDKAmovC,*(sp)+ GDKAmovfo,*(sp)+ GAGAM' GAMD,I GAKJMD(J),I GAKIMP,I KDGAMD(sp)+,I KCGAMPsp)+,I GAM,I M+,(sp) VGAKIMsp)+,(sp) VM,I KCGAMsp)+,2(sp) VMsp)+,(sp) GCKAxor,(sp) movsp)+,I GAasr GATsxt- div,I- GATsxt- KJdiv(J),I- GATsxt- KIdiv,I- KCGATsxt- divsp)+,I- M,A' mov,I movC',I MP,I movC,A KBM(I),A' mov,I KAM,A' mov,I KBGJM(I),#(J) mov(J),I movf',I KIMP,I movf,A KCmovC',I MPsp)+,I movC,A KCmovof',I MPsp)+,I movfo,A KAGJM,#(J) mov(J),I KCGBMsp)+,#(I) mov(I),I GDKCmovC2(sp),I MPsp)+,I movC,*(sp)+ KCGBmovC(I),I MPsp)+,I movC,#(I) KCGBmovof(I),J MPsp)+,J movfo,#(I) movf,I movC',I sxt- divP,I- movC-,A KCmovC',I sxt- divsp)+,I- movC-,A KCGJmovC(J),I sxt- divsp)+,I- movC-,#(J) GDKCmovC2(sp),I sxt- divsp)+,I- movC-,*(sp)+ movC',I sxt- div,I- movC,A KCmovC',I sxt- divsp)+,I- movC,A KCGJmovC(J),I sxt- divsp)+,I- movC,#(J) GDKCmovC2(sp),I sxt- divsp)+,I- mov,*(sp)+ KCmovb',I xor,(sp) movsp)+,I movb,A GDmovC(sp),-(sp) KAxor,(sp) movCsp)+,I movC,*(sp)+ movC',I asr movC,A GBasrC(I) movC(I),I movif,I GBmovif(I),I GAmovif,I GAmovfi,I GAsetl movfi,-(sp) movsp)+,I seti setl movif,I seti GBsetl movif(I),I seti GAmov,-(sp) setl movifsp)+,I seti GCsxt GAmovsp)+,I -- -!-P,F-G-NT-UT-K-L-M'C GBM'C(I) ML,A KBML(I),A KAMC,A GBML,#(I) GBKJML(J),#(I) GBKIMC,#(I) KBGJML(I),#(J) KAGJMC,#(J) GDKBML(I),*(sp)+ GDKAMC,*(sp)+ clr clr+ mov,A+ sxt mov,A mov+,A+ mov(I),A+ sxt KAmov,A+ sxt KAsetl movfi,A seti KAGJsetl movfi,#(J) seti KBmov(I),A mov+2(I),A+ KAmov,A movsp)+,A+ GBmov,#+2(I) sxt(I) KAGJmovsp)+,#+2(J) mov,#(J) GBKImov+2,#(I) sxt(I) KCGBmovsp)+,#+2(I) sxt(I) KCGBmovsp)+,#(I) movsp)+,#+2(I) ML,A KAMC,A GBML,#(I) KBGJML(I),#(J) KAGJML,#(J) GBKJML(J),#(I) GBKIML,#(I) GDKBML(I),*(sp)+ GDKAML,*(sp)+ M'C M,A KBM(I),A KAM,A GBM'C(I) KBGJM(I),#(J) KBmovC',J M(I),J movC,A KAmovC',J M,J movC,A KAGJM,#(J) KCGBMsp)+,#(I) KCGBmovC(I),J Msp)+,J movC,#(I) asrC GBasrC(I) aslC GBaslC(I) ash,A KBash(I),A KAash,A j ..7.".#.$.%.(.).*.+.-...Q.0.< .= .> .? .@ .A .B .C .D .E .H.I.O.movof,I GBmovof(I),I GEHAj.(.).7.0.clrC(sp) mov,-(sp) GBmov(I),-(sp) mov+,-(sp) mov,-(sp) GCM'sp) GCM,(sp) GCKBM(I),(sp) GCKAM,(sp) /d/o/x0f&0e/c/s/l40rZ2I5I9I=I@ICIFIHITIYI[I`IeIjIoIyIIII:,nameshort constantstringfloatdouble*r++*--r++pre--pre++post--post!un&*-~.+-*/%>><<&|^->int->doubledouble->int&&||&~double->longlong->doubleinteger->longlong->integer==!=<=<>=>p>=p=+=-=*=/=%=>>=<<=&=|=^=& for tests=& ~?callcallcallgotojump condbranch condset nregsload valueforce registerP((<((j((=((>((?((@((A((B((C((D((E(((((F(()((G(((((( ((!((*((H((+((I((,((J((-((K((.((L((/((W((7((U((Q((0))N))1))O))%))&))b))c))< )$)=$) )>(),)?0)4)@4)0)A,)()B8)=)CB)F)DF)B)E=)8) )$)$) )(),)0)4)4)0) ,)()  )$) L)Q) Q)L) $) )j)6+6+ )!)%*&*bf)cf)P*(`*)`***++,+-*.`*7`*0`*1*F6+G6+H+I+J,K6,L+N6+U6+O",fX)3D,4X,8`,9h,:|,;,jmp GBjmp(I) jsrc,MA GBjsrc,#(I) GAjsrc,(I) clr clrf movC,I movof,I GBmovC(I),I GBmovof(I),I mov+,-(sp) mov,I GBmov+2(I),-(sp) mov(I),I movC',I M'C mov',I M,A GJmovC(J),I M'C(J) GBmovC(I),-(sp) M'C(I) movCsp)+,I GJmov(J),I M,#(J) GBmov(I),-(sp) M,#(I) movsp)+,I GAM1,A+ V'GJmov+2(J),-(sp) mov(J),I M1,#+2(J) V'(J)GBmov+2(I),-(sp) mov(I),-(sp) add1,#+2(I) V'(I)movsp)+,I GAMP GAMsp) VM KAmovC,A KAmovfo,A GBKAmovf,#(I) GBmovC,#(I) movC(I),I GBKAmovfo,#(I) GBKImovC,#(I) movC,I KAGJmovf,#(J) KAGJmovfo,#(J) GDKAmovC,*(sp)+ GDKAmovfo,*(sp)+ GAGAM' GAMD,I GAKJMD(J),I GAKIMP,I KDGAMD(sp)+,I KCGAMPsp)+,I GAM,I M+,(sp) VGAKIMsp)+,(sp) VM,I KCGAMsp)+,2(sp) VMsp)+,(sp) GCKAxor,(sp) movsp)+,I GAasr GATsxt- div,I- GATsxt- KJdiv(J),I- GATsxt- KIdiv,I- KCGATsxt- divsp)+,I- M,A' mov,I movC',I MP,I movC,A KBM(I),A' mov,I KAM,A' mov,I KBGJM(I),#(J) mov(J),I movf',I KIMP,I movf,A KCmovC',I MPsp)+,I movC,A KCmovof',I MPsp)+,I movfo,A KAGJM,#(J) mov(J),I KCGBMsp)+,#(I) mov(I),I GDKCmovC2(sp),I MPsp)+,I movC,*(sp)+ KCGBmovC(I),I MPsp)+,I movC,#(I) KCGBmovof(I),J MPsp)+,J movfo,#(I) movf,I movC',I sxt- divP,I- movC-,A KCmovC',I sxt- divsp)+,I- movC-,A KCGJmovC(J),I sxt- divsp)+,I- movC-,#(J) GDKCmovC2(sp),I sxt- divsp)+,I- movC-,*(sp)+ movC',I sxt- div,I- movC,A KCmovC',I sxt- divsp)+,I- movC,A KCGJmovC(J),I sxt- divsp)+,I- movC,#(J) GDKCmovC2(sp),I sxt- divsp)+,I- mov,*(sp)+ KCmovb',I xor,(sp) movsp)+,I movb,A GDmovC(sp),-(sp) KAxor,(sp) movCsp)+,I movC,*(sp)+ movC',I asr movC,A GBasrC(I) movC(I),I movif,I GBmovif(I),I GAmovif,I GAmovfi,I GAsetl movfi,-(sp) movsp)+,I seti setl movif,I seti GBsetl movif(I),I seti GAmov,-(sp) setl movifsp)+,I seti GCsxt GAmovsp)+,I -- -!-P,F-G-NZ-UZ-K-L-M'C GBM'C(I) ML,A KBML(I),A KAMC,A GBML,#(I) GBKJML(J),#(I) GBKIMC,#(I) KBGJML(I),#(J) KAGJMC,#(J) GDKBML(I),*(sp)+ GDKAMC,*(sp)+ clr clr+ mov,A+ sxt mov,A mov+,A+ mov(I),A+ sxt KAmov,A+ sxt KAsetl movfi,A seti KAGJsetl movfi,#(J) seti KBmov(I),A mov+2(I),A+ KAmov,A movsp)+,A+ GBmov,#+2(I) sxt(I) KAGJmovsp)+,#+2(J) mov,#(J) GBKImov+2,#(I) sxt(I) KCGBmovsp)+,#+2(I) sxt(I) KCGBmovsp)+,#(I) movsp)+,#+2(I) ML,A KAMC,A GBML,#(I) KBGJML(I),#(J) KAGJML,#(J) GBKJML(J),#(I) GBKIML,#(I) GDKBML(I),*(sp)+ GDKAML,*(sp)+ M'C M,A KBM(I),A KAM,A GBM'C(I) KBGJM(I),#(J) KBmovC',J M(I),J movC,A KAmovC',J M,J movC,A KAGJM,#(J) KCGBMsp)+,#(I) KCGBmovC(I),J Msp)+,J movC,#(I) asrC GBasrC(I) aslC GBaslC(I) ash,A KBash(I),A KAash,A j..7.".#.$.%.(.).*.+.-...Q.0.<.=.>.?.@.A.B.C.D.E.H.I.O.movof,I GBmovof(I),I GEHAj.(.).7.0.clrC(sp) mov,-(sp) GBmov(I),-(sp) mov+,-(sp) mov,-(sp) GCM'sp) GCM,(sp) GCKBM(I),(sp) GCKAM,(sp) /d/o/x0f,0e/c/s/l:0rZV3d3t3333333l3|3366355553328886z575586^66606644^4h444444, x  & 6 % w Z  f7v P7p @-@7T e @& V 5 e@ @.  w p p    v   p 5 @ P77A& .e&7& ewB77&> je | *  v  ww  r5% @@ H=@&77 ww   7 P  K Jdu7 ~ d an I-~~ d an end d and a s d and any d and eac d and fre d and ind d and its d and kno d and pre d and ret d and sep d and sub d and tha d and the d and wri d and wri d and~~~ d anew, s d another d any dat d apart f d arbitra d are use d are~~~ d as I-no d as an a d as an e d as a~~~ d as desc d as dire d as need d as the d as the d as~~~ 1 d at 304 d at a di d at a pr d at data d at loca d at loca d at the d at the d at~~~ d be made d be mare d be mare d be mark d be the d be used d because ncreasing ncreasing ncremente nct to~~~ nction is nction of nction of nction of nction se nction wi nction wi nctionall nctions b nctions~~ nctive tr ncy of th ncy of th nd nd "A.1" nd 104 ma nd 104 st nd 1C ill nd 1C sho nd 203 co nd 205 ar nd 205 co nd 206,~~ nd 208, s nd 222.~~ nd 222~~~ nd 224, r nd 232 fo nd 237 ar nd 237.~~ nd 26B ar nd 307 ea nd 3C ill nd 3C sho nd 4C sho nd 529. nd I-numb nd a coun nd a matc nd a sepa nd a spec nd all of nd alloca nd an I-~ nd an end nd and re nd and~~~ ndg returns %d dctran returns %d dclast = %o dclser =%o dcih returns %d invalid dc command bad format Iiiihii9Y9YiYyYyf"w w@&HFfA7R; fA @e71@x;  1 @ fA7~;  fA & 9 &fA @e&7w@;"(.6<BDJPV\bhnrx|/usr/chess/bookseek 0 /%s Cannot open %s eh? ambiguous illegal gok %c kqrbnp PNBRQK r n b k q b n rr n b q k b n r o-o-onullresigndrawep(q)iles suc iles the iles the iles the iles to iles whi iles, an iles, an iles, bu iles, di iles, ho iles, so iles, th iles, un iles,~~~ iles. A iles. D iles. F iles. F iles. I iles. S iles. T iles. T iles. T iles.~~~ iles.~~~ iles;~~~ iles;~~~ iles~~~ iles~~~ ile~~~ ile~~~ ile~~~ ile~~~ ile~~~ ile~~~ ile~~~ ile~~~ ile~~~ ile~~~ 1 ile~~~ 1 ile~~~ 1 ile~~~ 1 ile~~~ 1 ile~~~ 1 ile~~~ 1 ile~~~ 1 ile~~~ 1 ile~~~ 1 ile~~~ 1 ile~~~ 2 ile~~~ 2 ile~~~ 2 ile~~~ 2 ile~~~~~ ile~~~~~ iliated  @$ G@bswitch" @ fA7FL  fA & 9 &fA @e&7w@n&@wՋ@@ 7t Ef `C  r CpDD`f@ Z`  H &D D  D&` f@ www &w Uw w&w w sortargcgetnum(num2colfrevfnumfascii|tabfibuf involv In~~~ in~~~ in~~~ in~~~ is a d is a f is a n is a p is a s is a s is an is a~~ is a~~ is che is des is eff is eli is enc is fou is fou is gen is gen is gre is ill is ind is ind is ind is lin is not is not is of is par is per is per is per is pos is pos is pre is pro is pro is pro is pro is rea is ref is sea is sea is so is sto is sto is tha is the is the is to is und is ver is~~~ is~~~ is~~~ is~~~ is~~~ is~~~ is~~~ is~~~  betwee 4 ~ 15 f 4 ustrati 4 stem. 4 r stora 5 .~~~ 6 5 become 4 ~ 15 d 4 user~~~ 4 ssible 4 r provi 5 . User 5 be use 4 ~ 14 t 4 user. 4 so that 4 r more 5 . In t 5 at the 4 ~ 14 f 4 user to 4 so cont 4 r in th 5 . File 5 at loc 4 ~ 14 a 4 user ar 4 sk file 4 r examp 5 . Any 5 areas 4 ~ 14 4 used fo 4 shows t 4 purpose 5 -node. 5 are al 4 ~ 12 s 4 urring 4 showing 4 previou Aug 23 14:16 \n", ciotp) ; extern int *iot, iotta[], *ciotp, ef[], *cacms ; ccih.c ccih extern int selmes[], *ciotp, *irr, *iras ; start( ciotp ) ; commd.c commd pt[10] = ciotp ; /* store link into last to this iot */ ciotp = iotp ; ciotp = iotp ; ciotp = iotp ; ciotp = iotp ; ciotp = iotp ; ciotp = iotp ; /* set curren iotp */ fcp[11] = ciotp ; fcp[11] = ciotp ; /* update last link */ extern int *iot, fct[], *bt, *ciotp ; /*diag*/printf(" cief[1] == 2 ) goto badf ; if( ef[1] == 2 ) goto badf ; if( ef[1] == 2 ) goto badf ; if( op[0] == '\n' ) { ef[1] = 1; goto badf; } if(( ef[1] == 2) &&( ef[2] == 'l') ) if(( op[0] = getchar() ) == '\n' ){ ef[1] = 1; goto lir ;} if((ef[1]==1) &&(i==0) ) ; if((op[0] = getchar() ) == '\n') { ef[1] = 1 ; goto badf ; } if((op[0] = getchar() ) == '\n') {ef[1] = 1 ; goto badf ; } if((op[1] = getchar() ) == '\n') { ef[1] = 1 ; goto badf ; }  _sidcf _chcnt _maxch _p20flg _printf"S_getchar"zR_savpsw"Q_ef _ciotp _dcdspy"4_mtdspy"_iodspy"T!_dkdspy"h$_qdspy"_bfdspy"$._ccdspy"J_numbrs"_getnum"~_pswold _pswtmp _dccs#^V_mtc#fV_dkc#lV_ccs#xV_mts#dV_reboot"~S_ccsr#V_cco#zV_cci#|V_dcwc#`V_dcma#bV_c1 _c2 _c3 _d1 _d2 _d3 _syinit"_ldunix"S_iras"P_irc _ircmax sswiely, a ively, ma ively, wh ively. F iven by a iven dire iven file iven mome iven the iven to t iven when iven. Th iven. Th ives to t ive~~~ 7 ividual d ividual w iving a~~ iving its ivities t ix A.~~~ ix the ma ixed and ixed leng ixed leng ixed leng ixed leng ixed~~~ ize 423 s ize 423.~ ize by an ize error ize may t ize of da ize of~~~ ize, comp ize, the ized by t ized for ized in t ize~~~ 6 ize~~~ 10 junct to~ junction junction just~~~ 1 k (I-node k 0 and b k 0 and b k 1, and k 1. Tog k 10  w2w 2 5 @? 5@ HNe17 2 @ /  4@@ @ ,:5 N H7 4 5* 4- 4 47 2@7 27 27 2w21w 17@5@5@,:5N 7575 t5 @ 5@ 5Z8M@CNff %@M MȕxNff % L Lȕ-Nf * )7 7  7 7 7   ch points ch provid ch refer ch reliev ch system ch the co ch the sa ch they h ch throug ch throug ch time t ch user a ch user h ch user. ch users ch will b ch will b ch will n ch would ch, root chal arra chal dire chal dire chal dire chal dire chal dire chal dire chal file chal file chal file chal file chal file chal file chal name chal name chal nami chal nami chal nami chal nami chal~~~ 1 chal~~~ 1 chal~~~ 1 changed a changed b changed.~ character character chart for charts sh charts sh charts sh chart prior art prior art prior art prior art prior art prising a prising a prising t problem o procedure process i process.~ program a program e program i program p program s program s program. programmi programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs, programsart FIG. art arran art file art file~ art form. art from art from art gener art metho art metho art of a art of th art root~ art suffe art syste art, diff art. A g art. Com art. In articular articular articular articular articular articular articular articular articular articular arting lo arting po arting po arts show arts show arts show arts, the art~~~ 20 ary ary and f ary conce ary depen ary diagr ary for d ary maxim ary numbe ary numbe ary stora ary, it i ary. Phy ary~~~ 15 ar~~~ 13 as again~ All da all I- all of all of all of alloca alloca alloca alloca alloca alloca alloca alloca alloca alloca alloca alloca alloca alloca alloca along~ alread Also c also c also c also c also c Also l also c altern altern Althou Althou altern always always always always amodif among an alt An an an att an end an ent an I-n an I-n an I-n an I-n an exi an ind an ind an ind an ind an int an inv an ope an unu and "A and 22 and 22 and 22 and 23  11 or~~~ 11 or~~~ 13 or~~~ 14 or~~~ 17 or~~~ 18 or~~~ 18 or~~~ 20 or~~~ 20 or~~~~~ ose I-no ose I-nu ose a da ose a se ose crea ose data ose digi ose digi ose much ose of p ose phys ose prog ose prog oses, bu ose~~~ 1 osing ca osition osition ossibili ossibili ossible ossible ossible. ossible~ ost due ost due ost file ost part ost, all ost. Th ost~~~ osure ot a dat ot a dir ot appar ot be er ot conce ot conta ot conta ot direc ot direc ot direc ot direc ot direc ot direc ot direc ot direc ot d struct struct struct struct sub-~~ subdir subdir subrou subrou subrou subrou subrou subrou subrou subtle such a such a such a such b Such m such s suer. suffer Summar symbol symbol symbol symbol symbol symbol System System symbol symbol SYSTEM System system system system system system system system system system system system system system system system system system system system system system system system system system system system system ut.cgetchar chcnt = 0 ; chcnt getput.cgetchar chin[++chcnt] = *tkb & 0177 ; chcnt getput.cgetchar extern maxch, chcnt ; chcnt getput.cgetchar if( chcnt > maxch ) goto newlin ; chcnt getput.cgetchar if( chin[chcnt] == '#' ) {if(chcnt >=1 ) { chcnt=-2; /*decr*/ chcnt getput.cgetchar if( chin[chcnt] == '@' ) { chcnt = -1 ; /* delete line*/ chcnt getput.cgetchar if(( chin[chcnt] == '\n' ) ||( chin[chcnt] == '\r' ) ) chcnt getput.cgetchar maxch = chcnt ; chcnt getput.cgetchar return( chin[ch-' wJ f'4^@x;  N @e -|' wf@OB&L 6= .& f & 8%@e& & 8%@,u-z;  eu-~;  N N Nf V eFf)EwEEeEHEeEAeAH@wf)Ed&; 8 7P&L&;  0% ; 8 7%%;  >% 8% J&VE$ $ 7 7 2 $$-" 7 $ @7z$- & 6 % mlevniceprintplaymanualsetupscore/xxxxxxxxseektestinputxxxxxxxxxxxxxxxehpictscaleforeachbookw 5D 55 5 LdED .@ 5 7CC DC 4%5 @Z w-Z@D &*N w-D e V3e `47 e5 @ @ r @_l X 7@_ X  6_ _ X 5___ 5>@ 2  3"c `4wc er m a single a single a single a single a small a small~ a specia a specia a storag a storag a storag a stored a subrou a summar a symbol A throug A throug A throug a true h a used b a user d a user m a user m a user m a user w a user w a user w a user w a user w a user~~ a user~~ A" is fo A" is no A" is se A", for~ A"~~~ 4 a volume a which a whole A" is se A, 1B an A, 1B, a A, 2B, 2 A, 3B an A, 4B an a write a, and i a, direc A, I-lis A, inclu A, it wi A. All A.~~~ 10 A.~~~ 15 a, e.g. A.1" are A.1@_ - ]f 95-\_ -\@\ff h&%_ kkW T%jjW T%_ W T5 \e@-A mp\Aup@ m^\ fW T% _ W T F1=% W \_ @ @[[r[#h[f[[[s[a    x _ W _ 0=% [_ WuWf_ _ -j[gW T_ -V[V[W T_ -B[F[ X T_ X T_ f 9 this ero, the ero~~~ ero~~~ 1 erpreted erred be erred fr erred fr erred fr erred th erred to erred to erred to erred to erred to erred to errelati erring t erring~~ erroneou erroneou error an error,~~ Errors i error. error.~~ error.~~ errorono errors i errors i errors m errors n errors o errors o errors. error~~~ ers 223, ers 420. ers and ers and ers and ers and ers appe ers are ers are ers are ers are ers are ers are~ ers asso ers caut ers cont ers easi ers file ers for ers from ers in b er@    xzzzz@ @ @    xL&0@8U 4Uȕ+,U (Uc U : W-_Rc@ 2 ;@ 2 TA 2cA 2 wf/w T/@ ?T TwF/w 4/N T  J AT T @T ~Tȕ/Nef . w.w .@t5A ru%@5W-@ T Tȕk W-@T Tȕq@A5S SHS@ @5S SAe0HwJ.w 8. , H i ntion, ph ntion: t ntion;~~~ ntion;~~~ ntions of ntions, a ntive phy ntly bein ntly bein ntly occu ntly prov nto I-lis nto buffe nto buffe nto open nto the I nto the I nto the I nto the I nto the c nto the f nto the l nto the o nto the o nto the v nto this nto~~~ 4 nto~~~ 5 nto~~~ 9 nto~~~ 10 ntrast to ntrast to ntries (l ntries 10 ntries 11 ntries 52 ntries ar ntries co ntries co ntries ha ntries ha ntries is ntries mu ntries po ntries po ntries.~~ ntries.~~ ntries~~~ ntries~~~ ntroduced ntroducti e. A file. B file. D file. I file. L file. T file. T file. T file. T file. T file. W file. W file.~~~ file.~~~ file.~~~ file.~~~ file.~~~ file.~~~ file.~~~ Files 20 file; wh files 20 files 22 files am files an files an files an files an files an files an Files ar files ar files be files be files by files by files by files co files cr files ex files ex files fo files fo files in files in files in files in files is files is files of files of files of files on files or files su files th files th fi1 file~~~ 2 file~~~ 2 file~~~ 2 file~~~ 2 file~~~~~ file~~~~~ filled, t filled, t find a ma find each find phys first I-n first I-n first be first por first por first ref first use first use first use first use first use first use first~~~ first~~~ first~~~ fit from fix A.~~~ fix the m fixed and fixed len fixed len fixed~~~ flag indi flagged f flags are flexible flow char flow char flow char flow char flow char for a fir for a par for a sec for a sin for all d for all o for all o for a~~~ for backu ng 6 ion poi 6 econd u 7 e~~~ 6 7 to dat 6 tion in 6 path na 6 inters~ 6 each I- 7 es~~~ 1 7 to a d 6 th~~~ 6 own in 6 ing and 6 e open 7 esent i 7 the nu 6 the ope 6 ould be 6 indepen 6 e indic 7 erred t 7 the in 6 the new 6 or~~~ 6 in open 6 e first 7 er wish 7 subrou 6 the fre 6 ory is 6 implifi 6 e acces 7 er may 7 simpli 6 ter mem 6 ond use 6 ill be 6 e I-~~~ 7 ent~~~ 7 simple 6 tem dir 6 oncerne  ]c v4 7\\ cA 2 w\ @ w-w -5 NS JS5W- @ pc@ W- w-w -< # <; z5%@e&; 4%@ N N   wT-w B-@@t5%b@ t@mDC! #e "! L3t!$@t&@t% Ne   f  e5 L3twp,w ^,Q 8   8 (  r4)+ rts pc patt: bit (r5)+,_dir(r0) bne 1f mov r0,r1 add (r5)+,r1 jsr pc,look jsr pc,look rts r5 1: add $6,r5 rts r5 satt: mov r5,-(sp) bit (r5)+,_dir(r0) bne 1f mov r0,r1 add (r5)+,r1 jsr pc,look / pawn mov r0,r1 2: mov (sp),r5 bit (r5)+,_dir(r1) bne 1f add (r5)+,r1 tst _board(r1) beq 2b tst (r5)+ mov r4,-(sp) jsr pc,look jsr pc,look jsr pc,look jsr pc,look cmp (sp)+,r4 bne 2b 1: mov (sp)+,r5 add $14.,r5 rts r5 look: cmp (r5)+,_board(r1) bne 1f mov -2(r5),(r4)+ 1:d|yvspolifc`]Znkheb_\Ymjgda^[XWTQNKHEBVSPMJGDAUROLIFC@?<9630-*>;852/,)=:741.+('$!&# %"lr r4 div r3,r4 asr r4 mul r3,r4 mov r5,r4 add r1,r4 mov (sp)+,r5 mov r1,-(sp) mov r2,-(sp) loop: mov r1,r0 cmp (r0),(r4) bge loop1 add r3,r1 br loop loop1: cmp r2,r4 blos 1f sub r3,r2 mov r2,r0 cmp (r0),(r4) bge loop1 jsr pc,exchange cmp r1,r4 bne loop mov r2,r4 br loop 1: cmp r1,r4 beq 1f jsr pc,exchange mov r1,r4 br loop1 1: mov (sp)+,r2 mov r4,-(sp) mov r4,r1 add r3,r1 jsr pc,qsort mov (sp)+,r2 mov (sp)+,r1 br qsort done: rts pc exchange: mov r1,-(sp) mov  ode, her ode, sto ode, tha ode. Ea ode. Fi ode. Fu ode. It ode. Wi ode.~~~ ode.~~~ odern~~~ odes 201 odes all odes and odes are odes are odes are odes are odes are odes as odes by odes by~ odes dir odes for odes in odes in odes in odes on odes per odes per odes poi odes res odes tak odes to odes) st odes, an odes, th odes. A odes. D odes. T odes; di odes;~~~ odes~~~ odes~~~ odes~~~ odes~~~ ode~~~ ode~~~ ode~~~ ode~~~ ode~~~ 1 ode~~~ 1 ode~~~ 1 ode~~~ 1 ode~~~ 2 ode~~~ 2 odicall ame is r ame is s ame is~~ ame is~~ ame is~~ ame mann ame matc ame may ame must ame of a ame of a ame of a ame of a ame of t ame of t ame or a ame phys ame refe ame sear ame spec ame time ame tree ame volu ame". T ame, and ame, et~ ame, whi ame,~~~ ame. "R ame. A ame. In ame. Th amed fil amed in amed~~~ amees fo ames and ames and ames and ames app ames are ames are ames for ames for ames in ames is~ ames may ames mus ames of ames of ames of ames of~ ames of~ ames onl ames whi ames wit ames, a name Newly neces need No pe node node not a numbe numbe numbe numbe numbe numbe numbe numbe numbe obtai occur of fi of le of wo on th one w opera opera or wr own c Physi Physi owner permi Physi physi point point point point previ progr progr progr read read readi refer refer regar reque retur role Root root same same searc secon set i set t shari shari shari shown Singl  12 l~~~ 13 l~~~ 13 l~~~ 14 l~~~ 15 l~~~ 15 l~~~ 16 l~~~ 16 l~~~ 18 l~~~ 18 l~~~ 18 l~~~ 18 l~~~ 19 l~~~ 21 l~~~~~ l~~~~~ l~~~~~ m actions m and use m and use m area 50 m area 50 m as a do m a~~~ 20 m because m debuggi m directo m directo m directo m directo m directo m directo m directo m directo m directo m directo m drawbac m each I- m entry) m error,~ m errors m file si m file~~~ m for dat m for the m form in m giving m in Tabl m in comm m indexes m informa m in~~T>XX  w7vPPE@E? (E p@Ext.$ZFUE ]&&   5  c  (7  E w*  &PC @EE 7H 7BE 6-0U, $( $E U5@ D &5@775@  wD J@ Ex.>6HPe5.e(`D E ectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory" rectory, rectory, rectory, rectory, rectory. rectory. rectory. rectory. rectory. rectory. rectory. rectory~ rectory~ rectory~ rectory~ rectory~ rectory~ rectory~ rectory~ r = ob; symtab = stab; for (c=0; c<200; c++) { stab[c].name[0] = '\0'; stab[c].value = 0; } defloc = lookup("define", 1); defloc->value = defloc->name; incloc = lookup("include", 1); incloc->value = incloc->name; stringbuf = sbf; line = ln; lineno = 0; if (fcreat(tmp4, obuf) < 0) { printf("Can't creat %s\n", tmp4); dexit(); } while(getline()) { if (ibuf==ibuf2) putc(001, obuf); /*SOH: insert */ if (ln[0] != '#') for (lp=line; *lp!='\0'; lp++) putc(*lp, obuf); putc('\n',  e~~~ 13 e~~~ 13 e~~~ 13 e~~~ 13 e~~~ 13 e~~~ 13 e~~~ 13 e~~~ 13 e~~~ 14 e~~~ 14 e~~~ 14 e~~~ 14 e~~~ 14 e~~~ 14 e~~~ 14 e~~~ 14 e~~~ 14 e~~~ 14 e~~~ 14 e~~~ 14 e~~~ 15 e~~~ 15 e~~~ 15 e~~~ 15 e~~~ 15 e~~~ 15 e~~~ 15 e~~~ 15 e~~~ 15 e~~~ 15 e~~~ 15 e~~~ 15 e~~~ 16 e~~~ 16 e~~~ 16 e~~~ 16 e~~~ 16 e~~~ 16 e~~~ 16 e~~~ 16 e~~~ 16 e~~~ 16 e~~~ 17 e~~~ 17 e~~~ 17 e~~~ 17 e~~~ 17 e~~~ 17 e~~~ 17 e~~~ 17 e~~~ 18 otp = %o\n",ciotp ) ; common.c _ int *iot; int *ciotp; dspydr.c main ccdspy( ciotp ) ; ciotp = iodspy() ; dcdspy(ciotp) ; /* call dc display routine */ dkdspy(ciotp) /* call dk display routine */ ; mtdspy(ciotp) /* call mt display routine */ ; extern int *ciotp ; /*diag*/ printf("ciotp = %o \n", ciotp ) ; iodspy.c iodspy return(ciotp) ; pter = ciotp ; extern int *iot, ef[], *ciotp ; syinit.c syinit ciotp = iot ; extern int fct[], *ciotp, *tsical physical physical physical physical physical pical of pid acce pid acce pid inde ping tra place, t placed i placed i placing ple and ple and~ ple arra ple exte ple file ple file ple file ple in a ple" fil ple, a u ple, a~~ ple, inc ple, nam ple, sys ple, the ple, to ple, to plement plemente plementi ples of plete se pleted.~ pleted.~ pletely~ pletes t plex and plex sin plexitie plexity plicate plicate plicate plicated plicated plicated plicated plicate~ plicatio plicatio plies a plified pl 7 w f $"_- 7    "p$"_$׭\ p$"d^'$"׭\   "dp$"IF׭P  ׭D\ pl  "`(p$"+׭>$׭  ׭   ^"B'/<\ Ff - $"N׭* c!/T p$" *"C׭f  ׭Z/Nc!*.0t7$":%׭4\ `\$p$"P *" F"data file data file data file data file data file data file data file data file data file data file data file data file data file data file data file data file data file data file data file data file data file data file data file data file data file data file data is t data layo data layo data layo data layo data rema data stor data stor data used data whic data, and data, dir data. A data~~~ data~~~ data~~~ data~~~ data~~~ 1 data~~~ 1 data~~~ 1 data~~~ 1 data~~~ 1 data~~~ 2 date the dated as da_ccint"`_dcint"`_mtint"(`_dkint"8`_clkint"H`_ccih _dcih _mtih _dkih _iras _pswold _reg rtistreg`testirT`tstretX`phighb`retx`resregldunix.oJ.+X  Xȋ_X_ldunix"printf.oJ{+HPw A 5r5Nf ` A 5rNe0 ww @e5@ les f files f files f files f files f files f file~~ f file~~ f file~~ f file~~ f I-node f I-node f I-node f I-node f I-node f indica f indica f indire f indire f indire f indire f indire f input/ f its po f large f levels f links f links f many o f miscel f of the f physic f primar f provid f read a f refere f simple f simult f stored f system f system f system f the bl f the cl f the co f the cu f the cu f the cu f the da f the da f the da f the da f the da f the da f the da f the de f the di f t 03<5m@,=5 @> _&e u@ 03<5m@,=5@$> :e  L= @m,= e5  @3== 5 @5== Ff50 %  %  %  0* F" %  %  %  0* u@Juw-&$eN  %  =% e}ee Nfw hB@w \B-*w nB@7 *wxfw*w TB7 *wbf@w`w\w<w@fwHw$ w&f \w }w7n,FB@$Y r Cd$YDf 7-.7#(e 7#e7#m  %efwwwVwZf@www4w8fAww5WpeW  W D wDwwf& @&HFfA7hJ  first~ e fixed e flags e flow c e flow c e flow c e for ma e for th e for th e for th e for th e form o e format e format e format e format e format e formin e for~~~ e free I e free b e free I e free I e free. e free~~ e free~~ e full p e full p e full p e functi e functi e functi e genera e genera e given e given e given e given e greatl e handli e has be e having e having e having e having e I-node e I-node e I-node e I-node e I-~~~ e herein e hierar e hierar e hierar e hierar e I-list e I-list  C __dklast C __dklser 053160D __dkma C __dkntf C __dkq 026060T __dkstat C __dktl 022042T __dktran 053156D __dkwc C __ef 020220T __endiot C __eof 017616T __fatal C __fclen C __fct C __fcthrs C __frecnt 051172T __getchar 016176T __getnum 012464T __gq 033770T __initb 012402T __initq C __inmess 020524T __iodspy C __iot C __iotta 050326T __iras C __irc C __ircmax C __klcs 051606T __l - - - - - - - - - on 5 rams~~~ 5 length 5 es may 6 ame~~~ 6 an ind 5 themsel 5 rammati 5 le. Th 5 es in t 6 ame of 6 an I-n 5 the vol 5 r.~~~ 1 5 le and 5 erences 6 ame fil 6 additi 5 the sec 5 r ident 5 layout 5 erence 6 additio 6 256 wo 5 the roo 5 r I-nod 5 l stora 5 er.~~~ 6 _____ o 6 21 5 the buf 5 own at 5 l data 5 er iden 6 ____ of 6 locat 5 the_ 5 ow char 5 its I-n 5 er area 6 I-node. 6 File 5 4 check t 4 ows the 4 ng bit 4 ist (I- 4 h the I 4 ectory, 4 ch user 4 ovide f 4 ng a~~~ 4 isk fil 4 h of th 4 eatment 4 ch is~~ 4 ough th 4 nes for 4 is then 4 h is~~~ 4 earch i 4 ce~~~ 1 4 ossible 4 neously 4 is prov 4 h data 4 e. Thi 4 ccurrin 4 ory str 4 ned as 4 is perf 4 gh the 4 e. I-n 4 ccordin 4 ory nam 4 ne or m 4 is not 4 ge arra 4 e the f 4 cation, 4 ory lev 4 nd writ 4 ion~~~ 4 ge area 4 e that  e simpli e simply e simult e single e size 4 e size 4 e size o e size, e size~~ e size~~ e so tha e some d e space e space e specia e specia e specia e specia e spectr e starti e starti E STORAG e storag e storag e storag e storag e storag e storag e storag e storag e storag e storag e storag e storag e storag e storag e storag e storag e stored e stored e subrou e such b e superv e superv e superv e swappe e symbol e symbol E SYSTEM e symbol e symbol e system e system e system e system e system e syste I-number I-number I-number I-number I-number I-number I-number I-number I-number I-number I-number I-number I-number I-~~~ 7 I-~~~ 8 I-~~~ 10 I-~~~ 10 I-~~~ 11 I-~~~ 17 h~~~ 13 h~~~ 13 h~~~ 15 h~~~ 19 i -~~~~~ I-list ( I-list 2 I-list 2 I-list 2 I-list 2 I-list 2 I-list a I-list a I-list i I-list i I-list) I-list), I-list, I-list. I-list.~ I-list.~ I-node 2 I-node 2 I-node 2 I-node 2 I-node 2 I-node 2 I-node c I-node c I-node w I-node) I-node, I-nodes I-nodes I-nodes I-nodes I-nodes I-nodes5-[K@Hw [I[6X T _ f 95-Z1@.wZ/ZBX T _ _ RI NX`XrX|XX TW _ @ _ zZX Tw2Iw IW- NX T 5 Ih FN 7 T w6dccs = %o dcwc = %o dcma = %o dcbe blocks o blocks o blocks o blocks o blocks p blocks u blocks w blocks, blocks, blocks, blocks, blocks. blocks. blocks. blocks.~ blocks.~ blocks.~ blocks; block~~~ block~~~ block~~~ block~~~ block~~~ block~~~ block~~~ block~~~ block~~~ block~~~ block~~~ block~~~ bodiment bodiment bodiment bolic fi bolic fi bolic na bolic na bolic na bolic na bolic na bolic na bolic na bolic na bolic na bolic na bolic ne both ent both. N both~~~ Brief bove. T branches broadly broutine broutine broutine broutin @ uu- e}eew!w-eN j*F % }ee Tw\Ff@wH@wB@@ _,*,=_) <55 3=e& 0* ee& 0* 55=e & 0* e z & 0* 4=e& 0* 5 <=e& 0* n== 5<@ K=a& 0* e_(= ==@ 5@ 2< l@& 0* e:5: 5N wR3f 5 @? 5@ HNe1v9 4 @ /  6@@ @ D<5 N 9 6 5* 6- 6 69 4@9 49 49 4wf2f 69  r6 V O9  O @5@5@D<5N n95_N b/  N 89x  9 b/  - ified plified plified plified plified, plify fi plished plishes pluralit pluralit pluralit ply inde ply.~~~ point fr point in point of point to point to point to point to point.~~ pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointers pointers pointers pointers pointers pointers pointers pointers pointers ps of f mes of f mes of~~ mes of~~ mes only mes such mes the mes whic mes with mes, and mes, nam mes. A~ mes. Fo mes.~~~ mes~~~ mes~~~ 1 mes~~~~~ method f method o method o method o method o methods methods me~~~ 3 me~~~ 8 me~~~ 8 me~~~ 11 me~~~ 12 me~~~ 14 me~~~ 14 me~~~ 18 me~~~ 20 might wr milar~~~ minated minated, minated. mination mine the mined an mined lo mined lo mined,~~ minent m ming con ming fun ming fun ming lar ming may ming of ming of ming or ming sch ming ser ming sma ming, an m1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pt to th ption ption ption is ption of ptions~~ ptually pt~~~ 7 pular, a pularity pulate f pulate I pulating pulating purpose purpose purpose purposes put buff put data put into put reso put/outp put/outp put/outp puter ap puter me puter me puter me puter me puter me puter me puter sy puter sy puters, puters~~ pute g~~~ 6 g~~~ 8 g~~~ 8 g~~~ 9 g~~~ 10 g~~~ 11 g~~~ 12 g~~~ 13 g~~~ 13 g~~~ 13 g~~~ 14 g~~~ 14 g~~~ 14 g~~~ 15 g~~~ 15 g~~~ 17 g~~~ 19 g~~~ 19 g~~~ 20 g~~~ 20 g~~~ 20 g~~~ 21 g~~~ 21 g~~~~~ g~~~~~ g~~~~~ h 14B ar h 16 wor h 18 are h 20 are h 23 are h 24 giv h 25B ar h a flag h a numb h a numb h admini h all of h all~~~ h an arr h anothe h any ar h any fi h any ot h any~~~ h are eq h are us h as dat h as dis h as lis h assure h a~~~ h a~~~ h become h begins h being h betwe  is rea is rea is rep is res is res is ret is ret is ret is rew is sea is set is set is set is set is set is sho is sho is sig is so is sto is ter is the is the is the is the is the is the is the is the is to is to is tra is tra is tra is use is use is, ea is, th is, th is~~~ is~~~ is~~~ is~~~ It is is~~~ is~~~ is~~~ is~~~ is~~~ it is it mus it the it wil its "f its co its co Its I- its I- its I- its I- its I- its ph its po itself ]; selmes[10]; reg[8]; siccf common.c _ siccf;sidcf; dspydr.c main siccf = 0 ; siccf = 1 ; extern siccf, sidcf; siccf = 1 ; /*init to simulate the ccreg on pdp20 */ syinit.c syinit extern siccf, sidcf ; if( siccf == 0 ) { sidcf common.c _ siccf;sidcf; dspydr.c main sidcf = 0 ; sidcf = 1 ; extern siccf, sidcf; sidcf = 1 ; /*init to simulate the dcreg on pdp 20 */ syinit.c syinit extern siccf, sidcf ; if( sidcf == 0 ) { snack ccdspy on the on the on the on the Once~~ on the on the one di one or one or one or one or one su ones.~ one~~~ only a only b only d only,~ on~~~ open f operat operat operat operat operat operat operat operat operat operat operat operat operat operat operat operat operat operat operat or dir or for or mor or mor or mor or mor or mor or oth or pro or pro or pro or pro or the order order order order~ orient orient or~~~ other other other other  f he new n he norma he norma he numbe he numbe he numbe he numbe he numbe he numbe he numbe he occas he only he open he open he open he open he open he open he opera he order he outse he outse he owner he owner he owner he parti he physi he physi he physi he physi he physi he physi he physi he physi he physi he physi he physi he physi he physi he physi he physi he physi he physi he point he possi he preci he prefi he prese he prese he prese he prese he prese he prese he prese he prese he Prior he pr er of th er of th er of th er of th er of th er of th er of wo er of wo er of~~~ er of~~~ er of~~~ er opera er point er prese er previ er progr er progr er read~ er reque er reque er retur er searc er servi er stora er stora er stora er store er subdi er subro er syste er syste er that er the m er the p er the u er to an er to an er to di er to fi er to op er to pe er to ph er to re er to re er to re er to re er to th er to th er to th er to us er twice er two. er user er user er which er which er whicor dir e or ind e or mor e or mor e or mor e or mor e or pro e or pro e order~ e outset e outset e owner e owner e owner e partic e partic e passed e pass~~ e perfor e permis e permis e permis e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e pointe e pointe e point~ e popula e possib e precis e prefix e prepar e presen e presen eal~~~ 16 al~~~ 18 al~~~ 18 al~~~ 18 al~~~ 19 al~~~ 21 al~~~~~ am actio am error am form am itsel am parti am size, am subro am. Eac ame "1" ame "1"~ ame "A" ame "A" ame "A" ame "A", ame "A.1 ame "USE ame (the ame 123. ame 125 ame 127~ ame A.1, ame and ame and ame I-no ame I-no ame and ame and ame as~~ ame a~~~ ame begi ame begi ame by w ame data ame dire ame file ame file ame file ame file ame file ame file ame I-no ame in a ame in o ame in s ame is a ame is a ame is a ame is f ame is f ame is p ) ) extern int ef[] ; dkdspy.c dkdspy n[i++] = getnum(ef) ; ef[1] = 1 ; ef[1] = 0 ; if( ef[1] == 2 ) goto badf ; if( ef[1] == 2 ) goto badf ; if(( ef[1] == 1 ) &&( n[i] == 0 ) ) i =-1 /* decr */; if(ef[1] == 2 ) goto badf ; while(( ef[1] == 0 ) &&( i <= 5 ) ) extern int ef[] ; dspydr.c main i = getnum(ef) ; if( ef[1] == 2 ) goto badf ; if( ef[1] == t e is fir e is fou e is fou e is fou e is in e is lin e is mad e is mod e is ope e is ope e is par e is poi e is poi e is pre e is rea e is rea e is rea e is ref e is sea e is sep e is so e is ver e is~~~ e is~~~ e is~~~ e is~~~ e is~~~ e is~~~ e is~~~ e it app e it is e itself e key to e key~~~ e large e last d e last d e last m e last~~ e later e layout e length e less s e less~~ e level e linear e linkin e linkin e linkin e linkin e links e list ( e list 5 e list 5 e list 5 e list 5 e list per~~~ per~~~ pesudo Physic physic physic physic physic physic physic physic physic physic physic physic physic physic physic physic physic place, placed placed placin plural point point point pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointi i o locati o locati o longer o lose d o marked o named~ o not co o not in o obtain o one in o one, t o open a o open a o open a o open f o open t o open t o open t o permit o permit o pesudo o physic o physic o physic o physic o physic o physic o possib o princi o prior o provid o provid o read b o read o o read o o read, o reduce o refer o refer o refer o refer o refer o relate o remove o rename o share o simpli o simula o specia o that a o that a o that b o that i o that s o that t o the ad o the ed, the~~ ed, thus ed,~~~ 16 ed,~~~ 18 ed. Also ed. As b ed. As f ed. Comp ed. Each ed. If t ed. In t ed. Inst ed. Main ed. The ed. The ed. The ed. The ed. The ed. Ther ed. This ed. This ed. User ed. When ed.~~~ 4 ed.~~~ 5 ed.~~~ 7 ed.~~~ 7 ed.~~~ 7 ed.~~~ 10 ed.~~~ 11 ed.~~~ 12 ed.~~~ 16 ed.~~~ 18 ed.~~~ 18 ed.~~~ 21 eded for eded to c eded.~~~ edetermin edetermin edetermin ediate ac edicated edicated edicated edly comp edly upda eds the f eds the f eds. It educe the ed~~ 5 d~~~ 6 d~~~ 7 d~~~ 7 d~~~ 8 d~~~ 8 d~~~ 9 d~~~ 10 d~~~ 11 d~~~ 11 d~~~ 13 d~~~ 13 d~~~ 15 d~~~ 15 d~~~ 16 d~~~ 17 d~~~ 17 d~~~ 18 d~~~ 19 d~~~ 20 d~~~ 21 d~~~ 21 d~~~ 21  99 89i9HH 89YYY? ???TDRRRRS3pFf 55% 5 @0 @0 W-- 55W-oW-0W-0HW-9D 97 AupAmeu `55W-0u-@@4  7  ,@@p@@ h7 ,@@pAupu@Ff5 @5@LW-9ast I-no ast modi ast modi ast one ast port ast to t ast to~~ ast~~~ as~~~ 13 as~~~ 17 at 205. at 304 s at 3B, i at 408 w at a dif at a dir at a kno at a kno at a kno at A.1, at a pre at all I at all p at any p at any~~ at an~~~ at a~~~ at a~~~ at block at data At FIG. at FIG. at FIG. at FIG. at deal at error at file at file at immed at immin at is de at is, e at is, s at is, t at is, t at least at locat at locat at locat at locat at locat at no sp at of st at of th at one p at shown at the b"(.6<BDJPV\bhntz~/mnt/chess/book/treeseek 0 /%s Cannot open %s %c kqrbnp PNBRQK r n b k q b n rr n b q k b n r %d. ... o-oo-o-onullresignep(q) pnbrqkrnb/dev/vscannot open vs /mnt/chess/draw/cvtabcannot open cvtab Cannot create %s nullresigno-ooo-oo*x-ep(q)ch+junk on end ambiguous illegal . . /dev/vt0cannot open vt /mnt/chess/draw/cvtabcannot open cvtab %d %d %d %d wgen %9.0f bgen %9.0%q k @5@5@N Ne18N ww A rNea 8@t ww |A r NC r  rfA r<& ew>w :4 (  ww   7ww  7 ww - -j7 W-7@ m5@2e2@ A rd 5A rd5@ @ m4AWpd(H 5@@ become become been l before begin. beginn behalf being being~ benefi betwee betwee betwee be~~~ be~~~ be~~~ bit 12 bit 12 bit 20 bit 20 bits 2 block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block BLOCKS blocks blocks blocks blocks [0] ; /*diag*/printf("(at %o)", ccs ) ; extern int selmes[], fct[], *ccs, *cco, *cci, *cacms, ef[] ; printf("ccs= %o cco= %o\n", *ccs, *cco ) ; ccih.c ccih *ccs = 0 ; *ccs = 0100100 ; /* left bit is read only bit. extern int inmess[], *cco, *cci, *ccs ; cctran.c cctran extern int *ccs, *cci, *cco ; if( *ccs >= 0 ) { while( *ccs >= 0 ) while(( i<=(len-1) ) &&( ccs[0] < 0 ) ) *cco = mess[i++] ; common.c _ int *ccs c1; int *cco c2; int *cci c3; dspydr.c main iv; int *dciv; int *mtiv; int *dkiv; int *clkiv; syinit.c syinit *dciv = &dcint ; cciv[1] = dciv[1] = mtiv[1] = dkiv[1] = clkiv[1] = 0340 ; /* set priority */ dciv = 0124 ; extern int *cciv, *dciv, *mtiv, *dkiv, *clkiv ; dclast common.c _ int *cclast; int *dclast; int *mtlast; int *dklast; dcbeg.c dcbeg dclast = iotp ; extern int *dclast, *sycroq ; dcdspy.c dcdspy if( i >= 1 ) dclast = n[0] ; printf("dclast = %o dclser =%o\n", dclast, dclser ) ; extern int *d se r user. r users' r users, r using t r which d r which i r which i r which p r who cre r wishes r wishes r wishes r wishes r wishes r wishes r wishes~ r within r write i r write r r writing r writing r writing r writing r writing r writing r written r's area, r's~~~ 9 r's~~~ 9 r) to loc r)~~~ 7 r, a link r, altern r, altern r, and th r, and~~~ r, mainte r, or sys r, the su r, there r,~~~ 5 r,~~~ 6 r,~~~ 7 r,~~~ 8 r. Advan r. Any d r. As be r. Diagr r. Furth r. In a r. In od/: t s r o j i h g f e d a M L   ybA'? , } `O  0 z0g^A MLS5 s X : . -d*  &" %5 F  777& ewr&7r7l7 @ 5N  w w @ 5 @ 5 @  ~ ww u@ @@mȕ A r 5 N ff % @@mC r e0Ȑ @wN V7 L ӕ0B~8ӕ.  ӕ0~ B~  :ӕ. B~ӕe ӕ- ӕ+ r e0e0S&e@7 e(  @&-8w 5 @5@LW-9DW-d<A r5A ruA r5A ruA r 5A r u@t AWt@PAWt@P@]=@w> 8 ; int comd, ba, *fcp, fc ; switch(comd) { /* comds that need to deallocate buffers */ commd ccdspy.c ccdspy flag = commd( mess, &i ) ; ccih.c ccih na = commd( inmess, &linked ) ; commd.c commd commd(sc,linked) int sc[], *linked ; { d1 common.c _ d1; d2; d3; d4; d5; d6; d7; d8; d9; int *dccs d1; int *dcwc d2; int *dcma d3; dspydr.c main dccs = icle sketches the history of their use in Bell Laboratories research, and describes some of the current frontiers of our minicomputer work. While some of these applications will by their nature remain closely associated with research, an increasing number of them have already impacted and will continue to impact directly on the Bell System. Background__________ By 1966 it was clear that the single-stream batch com- puting era at Bell Laboratories, typified by computers  *mtcr m2; char *dkcr d4; char *ccsr c1; int *mts m1; int *mtc m2; int *mtbrc m3; int *mtma m4; m1; m2; m3; m4; m3 common.c _ int *mts m1; int *mtc m2; int *mtbrc m3; int *mtma m4; m1; m2; m3; m4; m4 common.c _ int *mts m1; int *mtc m2; int *mtbrc m3; int *mtma m4; m1; m2; m3; m4; main dspydr.c main main() { /* display driver - dspydr */ maxch common.c _ fclen; fcthrs; comd; chcnt; maxch; dspydr.c main extern chcnt, maxch ; maxch = 0 ; fatal.c fatal chcnt = maxch + 1 ; /* deled the co d the di d the I- d the en d the I- d the I- d the la d the na d the ph d the ph d the ph d the pr d the re d the se d the us d the us d their d then p d then t d then u d there d theref d therei d the~~~ d the~~~ d the~~~ d the~~~ d throug d thus c d thus~~ d thus~~ d time~~ d to a s d to acc d to acc d to as d to ass d to be d to be d to be d to be d to buf d to by d to cho d to con d to con d to cor d to cur d to fil d to for d to I-n d to I-n d to hav d to loc d to ref d to sim d to theors gone */ dkstat.c dkstat *dkc, *dkds, *dker, *dkda ) ; *dkc, *dkds, *dker, *dkda ) ; extern int *dkc, *dkds, *dker, *dkda ; if((*dker & 1 ) != 0 ) ss = ss | 010000 ; /* cksum */ if((*dker & 2 ) != 0 ) ss = ss | 010000 ; /* cksum */ if((*dker & 040 ) != 0 ) ss = ss | 01000 ; /* misc */ if((*dker & 0100 ) != 0 ) ss = ss | 01000 ; /* misc */ if((*dker & 0200 ) != 0 ) ss = ss | 01000 ; /* misc */ if((*dker & 0400 ) !=  dclser, p20flg ; if( dclser != 1 ) goto er2 ; syinit.c syinit dclser = 0 ; extern dclser, mtlser, dklser ; dcma common.c _ int *dccs d1; int *dcwc d2; int *dcma d3; dcdspy.c dcdspy case 2: *dcma = n[2] ; printf("dccs = %o dcwc = %o dcma = %o\n", *dccs, *dcwc, *dcma); extern int *dccs, *dcwc, *dcma, *dclast ; dctran.c dctran *dcma = dct[2] ; extern int *dccs, *dcwc, *dcma ; dspydr.c main dcma = 0172412 ; } dcma = &d3 ; extern int *dccs, *d goto ret ; } { deallb( iotp, 1, iot ) ; { deallb(iotp,1,iot); {deallb(iotp,1,iot); { deallb(iotp, 1, iot ) ; { deallb(iotp,1,iot); /* deal iot entry */ { deallb(iotp,1,iot); /* deall iot entry */ { deallb( iotp, 1, iot ) ; if( i != 0 ) { deallb(iotp,1,iot); na = 15; goto ret; } iotp = allocb( 1, iot ) ; iotp = allocb( 1, iot); iotp = allocb(1, iot ) ; iotp = allocb(1, iot ) ; /* alloc io225 c de 225. de 230 h de 230 i de 235 h de 235 w de 301 i de 308, de 308. de 408 s de 408 s de 408 w de 520 i de 520. de 530 o de 530. de a con de a dir de alloc de also de also de also de an ad de and r de and t de and~~ de arbit de arbit de are a de arran de as wi de by pl de by th de capac de chang de conta de conta de conte de corre de fixed de for t de for t de for t de for t de havin de havin de in a de in th de in th de in th de in tu de inacc de in~~~ de is ag de is al de is co de is in deYi @mV `U V `U_j `N5 5-_` @D@-wV `U _j @-wV `U _j pnhdV `U _j RPLV `U _j h  xV pppppppp* _` ?bQ?fQ?hQnQ@TQ_j V `U_j W `U LN_j @M=% _` f "M% _` @&-7 7P7PPP_j -d 7 \ PP P_j cc  xN_` L=% _` f] ) ; bt delb.c deallb if( bt[i] == ba ) bt[i] = -bt[i] ; bt delb.c deallb if( i >(bt[-1] - 1) ) goto allfre /* if past end of table error */ ; bt delb.c deallb blksz = bt[-2] ; bt delb.c deallb if(( ba< bt[-4] ) ||( ba > bt[-5] ) ) bt delb.c deallb while( i < bt[-1] ) if(ba == bt[i++] ) goto releas ; bt delb.c deallb deallb(ba, size, bt) int ba, size, bt[]; { bt endiot.cendiot deallb( iotp[8], fcp[5], bt ) ; bt endiot.cendiot extern int *iot, *bt, fct[] ; bt inb.c initb *(bt-1) = q ;pO_n  :9 cx xhv  71sd { t^ odjx  i:!h $   ?:68$ "  ~hcnt fatal.c fatal chcnt = maxch + 1 ; /* deletes present input line */ chcnt fatal.c fatal extern chcnt, maxch ; chcnt getput.cgetchar else chcnt = -1 ; /* reinit */ chcnt getput.cgetchar chin[chcnt] = chin[chcnt] | 040 ; chcnt getput.cgetchar chin[chcnt] = '\n' ; chcnt getput.cgetchar if((chin[chcnt] >= 0101 ) &&(chin[chcnt] <= 0132 ) ) chcnt getput.cgetchar putchar( chin[chcnt] ) ; chcnt getput.cgetchar chcnt = -1 ; /* init cnt */ chcnt getpd~}|{zyxwvucwc, *dcma, *dclast ; syinit.c syinit dcma = &d3 ; } dcma = 0172412 ; } extern int *dccs, *dcwc, *dcma ; dctran dcbeg.c dcbeg if( dctran( &iotp[2] ) == 0 ) goto que ; dcdspy.c dcdspy flag = dctran( &iotp[2] ) ; dcih.c dcih i = dctran( &dclast[2] ) ; dctran.c dctran dctran( dct ) int dct[] ; { dcwc common.c _ int *dccs d1; int *dcwc d2; int *dcma d3; dcdspy.c dcdspy case 1: *dcwc = n[1] ; printf("dccs = %o dcwc = %o dcma = %o\n", *dccs, *dcwc, *dcma); <= 3 ) ) extern int ef[] ; numbrs.c numbrs ef[1] = 0 ; extern int ef[] ; if( ef[1] == 1 ) /* no line left */ { *amount = 0; goto ret; } if( ef[1]==2 ) i =-1 ; /* decr since error in last num */ if((ef[1]==1) &&(array[i]==0) ) i =-1 ; /* decr again */ while((ef[1]==0) &&(i < max) ) array[i++] = getnum(ef) ; qdspy.c qdspy {n = 0 ; ef[1] = 1 ; { ef[1] = 1 ; /* have blank*/ n= getnc ata buff ata by i ata cont ata due ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata fiyiy9I9)y)v, *mtiv, *dkiv, *clkiv ; dclast common.c_ int *cclast; int *dclast; int *mtlast; int *dklast; dclast dcbeg.c dcbeg dclast = iotp ; dclast dcbeg.c dcbeg extern int *dclast, *sycroq ; dclast dcdspy.cdcdspy if( i >= 1 ) dclast = n[0] ; dclast dcdspy.cdcdspy printf("dclast = %o dclser =%o\n", dclast, dclser ) ; dclast dcdspy.cdcdspy extern int *dccs, *dcwc, *dcma, *dclast ; dclast dcih.c dcih else /* disk */ dkbeg(dclast) ; dclast dcih.c dcih endiot(dclast) ; dclast /* tape */ mtbeg(iotp) ; mtbrc common.c _ int *mts m1; int *mtc m2; int *mtbrc m3; int *mtma m4; mtdspy.c mtdspy case 1: *mtbrc = n[1] ; extern int *mtc, *mts, *mtbrc, *mtma ; printf("mtc= %o mtbrc= %o mtma= %o mts= %o\n",*mtc,*mtbrc,*mtma,*mts); mtih.c mtih ames[5] =(*mtbrc - mtlast[7]) >> 1 ; /* actual words(not bytes)trans*/ extern int *mtlast, *mtc, *mts, *mtbrc, *mtma, *iot ; mtstat.c mtstat extern int *mts, *mtbrc ; if(((*mts&01000 )!=0) &(*mtbrc!=0) ) ss = ss | d~{xur}zwtqtes present input line */ extern chcnt, maxch ; getput.c getchar extern maxch, chcnt ; if( chcnt > maxch ) goto newlin ; maxch = chcnt ; syinit.c syinit extern irc, ircmax, maxch, chcnt, p20flg ; maxch = 0 ; mtbeg dcih.c dcih if((dclast[5]&3) == 1 ) mtbeg(dclast) ;/*tape*/ mtbeg.c mtbeg mtbeg(iotp) int iotp[] ; { mtdspy.c mtdspy flag = mtbeg(iotp) ; snack.c snack if( dev == 1 ) { mtbeg(iotp) ; goto pop ; } /* mag tape */ start.c start if((iotp[5]&3) == 1 ) dklast[9], usn ) ; /* get unique sector number */ dcbeg dcbeg.c dcbeg dcbeg(iotp) int iotp[] ; { dcdspy.c dcdspy flag = dcbeg(iotp) ; dkih.c dkih { if( ackqed == 1 ) /* ack sent */ dcbeg( dklast ) ; } mtih.c mtih dcbeg(mtlast) ; snack.c snack if((*iotp &(3<<8) ) == 0 ) {dcbeg(iotp); goto pop ; } start.c start dcbeg( iotp ) ; dccs common.c _ int *dccs d1; int *dcwc d2; int *dcma d3; dcdspy.c dcdspy case 0: *dccs = n[0] ; printf("dccs = %o dcwc = %o - Nf  _Z `U_N 5NZ `U _N J5@_N[ `U _@A1,_@ @m[ `U _@A1,i@@5@e5@ @m[ `U _@A1,A@5@A1,@5,@ @m[ `U 5 @5,@ @m [ `U   ;&[<[J[ `UFfu  f x9%7DN  72N@ &e  7N@5NBX `U _ @e@e& %-_ @W-wW-wVX `U%_ @e@e& %-~^@5 N rX `U R X `U I@e@e& %-*4@W-wW-wX `U% I laF be re( ihd tr: nt st X `UX `UFf)5 5 K@U55@J@U 55J@U55J@U55J  J @0@U55J@U@55ast = %o \n", dclast ) ; dspydr.c main extern int *dccs, *dcwc, *dcma, *dclast ; dclser common.c _ dclser; mtlser; dklser; dcbeg.c dcbeg dclser = 1 ; /* say dclast awaiting service */ extern dclser ; if( dclser != 0 ) goto que ; dcdspy.c dcdspy if( i == 2 ) dclser = n[1] ; printf("dclast = %o dclser =%o\n", dclast, dclser ) ; extern dclser ; dcih.c dcih dclser = 0 ; /* say dclast has been serviced by int */ dclser = 1 ; /* say needs service */ externed "f arked as arked fr arked fr arked us arked. arly ben arly sea arly, to arly~~~ arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrows a arrows a ars at a ars in s Art art FIG. art arra art file art file art form art from art from art gene art meth art meth art of a art of t art root art suff art syst art, dif art. A art. Co art. In articula articula ar i = getnum(ef) ; getnum.c getnum getnum(ef) int ef[]; { iodspy.c iodspy i = getnum(ef) ; mtdspy.c mtdspy n[i++] = getnum(ef) ; numbrs.c numbrs while((ef[1]==0) &&(i < max) ) array[i++] = getnum(ef) ; qdspy.c qdspy /* have blank*/ n= getnum(ef) ; n = getnum(ef) ; gq dcih.c dcih if(( ndc = gq(sycroq) ) == 0 ) goto st; /*trans on empty*/ dkih.c dkih dklast = gq(dkq) ; /* get top of disk q */ if(( nq = gq(dkq) ) == 0 ) goto sendac ; /* q empty iii9IY9)yiYyy)9IYi)9YIi)9IYi95 W-@?Ne,:fe,: * 5 W-&5 W-@AWpAN?@`eRAWpAfNmeR *  w w Nf * @ =@ =wr w ` @5}}wT w B W- "5 W-@AWpAAmBtC r 49eR  w w "@e 5u@e 57 /4[0  _,P$1 D 5@ A@ A@  _,W-57N N  _,7x 5&557!X5N &5spy printf("dcih returns %d\n", dcih() ) ; dcih dcih.c dcih dcih() { /* data channel interrupt handler */ dcint syinit.csyinit *dciv = &dcint ; dcint syinit.csyinit extern ccint, dcint, dkint, mtint, clkint ; dciv common.c_ int *cciv; int *dciv; int *mtiv; int *dkiv; int *clkiv; dciv syinit.csyinit *dciv = &dcint ; dciv syinit.csyinit cciv[1] = dciv[1] = mtiv[1] = dkiv[1] = clkiv[1] = 0340 ; /* set priority */ dciv syinit.csyinit dciv = 0124 ; dciv syinit.csyinit extern int *cciv, *dciUDX w7vPPE@E? (E p@Ext.$ZFUE ]&&   5  c  (7  E w*  &PC @EE 7H 7BE 6-0U, $( $E U5@ D &5@775@  wD J@ Ex.>6HPe5.e(`D E erea bfdspy.cbfdspy area = iotta ; area bfdspy.cbfdspy area = ackara ; area bfdspy.cbfdspy area = bufara; area bfdspy.cbfdspy if( area == ackara ) area bfdspy.cbfdspy if( area == bufara) area bfdspy.cbfdspy if( area == iotta ) area bfdspy.cbfdspy printf("area(%o) not equal to either bufara(%o)",area,bufara); area bfdspy.cbfdspy extern int *table, *area ; area common.c_ int *table;int *area; area syinit.csyinit area = ackara ; area syinit.csyinit if((op[1] = getchar() ) == '\n') {ef[1] = 1 ; goto badf ; } ef[1] = 0 ; extern int ef[] ; if( ef[1] == 1 ) goto end2 ; getnum.c getnum case 10: /* newline */ ef[1] =1; ef[1] = 0 ; ef[1] = 1 ; ef[1] = 2 ; ef[1] = 2 ; ef[2] = 0 ; ef[2] = i ; ef[2] = i ; getnum(ef) int ef[]; { iodspy.c iodspy if( ef[1] == 2 ) goto getptr ; i = getnum(ef) ; if( ef[1] == 1 ) goto curptr ; if( ef[1] == 2 ) goto per ; if( i == '\n' ) { ef[1] == 1; goto curptr ;  p [?q on, ention: ention;~ ention;~ entions entions, entive p ently be ently be ently oc ently pr entries entries entries entries entries entries entries entries entries entries entries entries entries entries. entries. entries~ entries~ entry 11 entry 11 entry 12 entry 12 entry 12 entry ac entry co entry co entry ha entry in entry in entry in entry is entry is entry ma entry po entry so entry) f entry. entry.~~ entry~~~ entry~~~ entry~~~ entry~~~ entry~~~ ents are ents are ents are ents for ent dspydr.cmain dccs = &d1 ; dccs dspydr.cmain *dkc = *mtc = *dccs = 0200 ; dccs dspydr.cmain extern int *dccs, *dcwc, *dcma, *dclast ; dccs syinit.csyinit dccs = &d1 ; dccs syinit.csyinit *ccs = *dccs = *mts = *dkc = 0 ; /* 4 major channels */ dccs syinit.csyinit dccs = 0172414 ; dccs syinit.csyinit extern int *dccs, *dcwc, *dcma ; dcdspy dcdspy.cdcdspy dcdspy(iotp) int iotp[] ; { dcdspy dspydr.cmain dcdspy(ciotp) ; /* call dc display routine */ dcih dcdspy.cdcdextern int *bt, bufara[], *ackmes, ackara[] ; commd.c commd iotp[8] = allocb( fcp[5], bt ) ; iotp[8] = allocb( fcp[5], bt ) ; if( i != 0) { deallb(fcp[3],fcp[5],bt); na = 15; if( sc[3] > fcp[5]*bt[-2]) if( sc[3] > fcp[5]*bt[-2]) deallb(fcp[3], fcp[5], bt ) ; fcp[3] = allocb(n,bt) ; if( iotp == 0 ) { deallb(fcp[3],fcp[5],bt);na=6;goto ret;} extern int *iot, fct[], *bt, *ciotp ; common.c _ int *bt; delb.c deallb bt[-4],bt[-5]prisam ; mtih.c mtih extern mtq, irc, ircmax ; syinit.c syinit extern irc, ircmax, maxch, chcnt, p20flg ; irc = ircmax = 0 ; ircmax = 1 ; irr ccih.c ccih extern int selmes[], *ciotp, *irr, *iras ; klcs common.c _ int *klcs; syinit.c syinit *tks = *tps = *klcs = 0 ; /* tty and clock */ extern int *klcs ; klcs = 0172540 ; ldunix dspydr.c main ldunix() ; /* no return */ m1 common.c _ int *mts m1; int *mtc m2; int *mtbrc m3; int *mtma m4; m1; m2; m3; m4; m2 common.c _ char int *dkds d9; d8 common.c_ d1; d2; d3; d4; d5; d6; d7; d8; d9; d8 common.c_ int *dkc d4; int *dkwc d5; int *dkma d6; int *dkda d7; int *dker d8; int *dkds d9; d9 common.c_ d1; d2; d3; d4; d5; d6; d7; d8; d9; d9 common.c_ int *dkc d4; int *dkwc d5; int *dkma d6; int *dkda d7; int *dker d8; int *dkds d9; damin commd.c commd i = damin( &sc[2], &fcp[8]) + damin( &sc[4], &fcp[9] ) ; damin commd.c commd i = damin( &sc[4], &iotp[9] ) ; /* disk adr conversion */ damin commd.c commd if( dami   xjd^XBRBLBZ `Ue_zN 5N*Z `U ^Ne l5N@h~z  p .ɉ$m#<.ɁBijkl#Y(ɁJh*Y(  +ɁhZ[\MY(ɁYXWVZ,QQɁ GHIJKLMY( 1 ; iotp[5] = comd << 8 | 2 ; iotp[5] = comd << 8 | 1 ; iotp[5] = comd<< 8 | 2 ; iotp[5] = comd<<8 | 1 ; iotp[5] = comd<<8 | 1 ; /* store comd and tape op */ iotp[5] = comd<<8 | 2 ; iotp[5] = comd<<8 | 2 ; /* store comd and disk op */ iotp[5] = comd<<8 | 1 ; iotp[5] = comd<<8 | 2 ; /*diag*/ printf("comd= %d fc= %d\n",comd,fc) ; comd = 63 & sc[1] ; extern fclen, comd ; printf("unknown command from sel comd = 5_N*Y `U Ne  _@EU=_8Y `UNJY `U 5_50-V-V-V7 V VTnh5 Z EU 5@e  __& -|Ve  _!55 EU 5@e  __50 V V-V7 _U-55 u5 Fh@ 5OX55 u 55<  x^$tt$$$$t[ fclen *(dklast[1] & 037) ] ; i =( dklast[0] &(3<<8) ) >> 8 ; /* dc status */ if( dklser == 1 ) dklast = nq ; if( dktran(&dklast[6]) == 0 ) { e = 301 ; goto er1 ; } if( i == 3 ) endiot( dklast ) ; /* dc half done - release iot entry */ if((dklast[0] & 01400 ) == 0 ) ac[6] = dklast ; /*dc stat not started*/ ldc =(dklast[5] & 0177400 ) >> 8 ; /* last device comd */ printf("from dklast = %o ", dklast ) ; while( i < 10 ) printf(" %o", dklast[i++] ) ; dklser common.c _ & sc[1] ; comd commd.c commd extern fclen, comd ; comd commd.c commd printf("unknown command from sel comd = %o\n", comd ) ; comd commd.c commd switch(comd) { comd common.c_ fclen; fcthrs; comd; chcnt; maxch; comd endiot.cendiot comd =( iotp[5] &(0377<<8) ) >> 8 ; comd endiot.cendiot int comd, ba, *fcp, fc ; comd endiot.cendiot switch(comd) { /* comds that need to deallocate buffers */ commd ccdspy.cccdspy flag = commd( mess, &i ) ; commd ccih.c ccih na = commd( inmess, &linked ) ; como badf ; if( ef[1] == 2 ) goto badf ; if( ef[1] == 2 ) goto badf ; if( ef[1] == 2 ) goto badf; if( ef[1] == 2 ) goto badf; if( ef[1] == 2 ) goto pbi ; if( op[0] == '\n' ) {ef[1] = 1; goto badf; } if(( ef[1] == 1 ) &&( n == 0 ) ) goto pre ; if((ef[1] == 1 ) &&( n == 0 ) )goto dedef ; if((ef[1] == 1) &&( n == 0 ) ) goto aldef ; if((ef[1] == 1) &&( n2 == 0 ) ) goto wrone ; if((ef[1] == 1) &&(n==0) ) goto indef ; if((ef[1] == 2)DW-d<A r5A ruA r5A ruA r 5A r u@t AWt@PAWt@P@]=@Ff @Et5@Et5@Et5@E5@AWpCp`Cp `Amp= Ff)@= 9-= 25 7 u-  A Am  - - @ @m @ =Ff NT[ `U @?z[ `U[ `U=[ `U8[ `U\ `U/&\ `U*T\ `U%\ &5 & 4/e5 5555N&  55 x7-5ww  w- N5 &5& H-eXv-r-el- . $ 5@57 55  -N N5&5 & D0e5 ,5555N&  55  7,5ww  ,,e, h5T#Wp mJ#Au55 @ 5555 Vw- @zEu@u@55B  @  -  -N N5&5 & H-e5 J5% - I_wf) J N  5 @EU=Ne  @EU=w|@Ff)w"@?M@?MM5 @Ff@e55 W-f Nm I% _ @_ 5 7 W-  A Aa1-_ - @ @a @ LLLL   x   LLLL X `Ue_ N 5N0X `U _ Ne  rJ@U55^J@U55 JJ@U55@6J@U 55"J"5@JW-W-W- 5I@U5@U5NX `U @Ff(I-LIU?I-8_,&IE 7xX Et7fXbX\XX `U%TI_FXBXX `U%4X5 @e  __5_  xlU?d7 `W 5PE5Awp< 1 Awp. qNY `U  t&e  7NAWpfe  7f x9%7f x9%7 7777w5 W- A wp 1 vrpljd 7^7ZT7 P7 L7 H7 D7 @7 <67 2-. ;;;_ 57z;v;r; 57`;\;X;  .;*; &; ;;;P;R57;T;V:;:57::: :p:r:t:v:`JD>8 2 ?:?:?:?: ??:?: w -He 7 5uw-%@e5N N 5 u- uNf ewjwd@wZw V P? J-FD>f  [.55 "w-HL e f Hw-.+eN  N 5u- uNf u-ew w@wxw tn? h-db@_ T555 Dw->C@e 5w-$2u-.AWt  = 0100 ; /* select remote bit */ extern int *mtc, *mts ; mtdspy.c mtdspy case 3: *mts = n[3] ; extern int *mtc, *mts, *mtbrc, *mtma ; printf("mtc= %o mtbrc= %o mtma= %o mts= %o\n",*mtc,*mtbrc,*mtma,*mts); mtih.c mtih extern int *mtlast, *mtc, *mts, *mtbrc, *mtma, *iot ; tmpsta = *mts ; mtstat.c mtstat if((*mts & 0100 ) == 0 ) ; /* selr off do nothing */ extern int *mts, *mtbrc ; if(( *mts & 0100 ) == 0 ) ss = ss | 020000 ; /* selr */ if(( *mts & 01000er 523 fer 523, fer 523. fer 523. fer 523. fer and fer and fer dire fer from fer is f fer to a fer to a fer to d fer to f fer to p fer to t fer to t fer to t fer to u fere wit ference ference ference ference ference ferenced ferences ferences ferences ferences ferences ferent f ferent f ferent n ferent p ferent p ferent s ferent u fering a ferred b ferred f ferred f ferred f ferred t ferred t ferred t ferred t ferred t ferred t ferred t ferring ferring~ fers to ffected ffective ffective ffer 523 eady */ /*diag*/ if( p20flg != 1 ) *dkc = *dkc | 0200 ; extern p20flg, dkntf; if( p20flg != 1 ) *dkc = *dkc | 0200 ; /* set ready */ dspydr.c main if( p20flg == 1 ) { if( p20flg == 1 ) { else p20flg = i ; if( p20flg == 0 ) { printf("no unix load\n" ); goto endlin; } printf("p20flg = %d\n", p20flg ) ; if( p20flg == 0 ) { printf("no reboot\n"); goto endlin ; } if( p20flg == 1 ) savpsw() ; if( p20flg == 1 ) savpsw() ; extern p2ccs, *dcwc, *dcma, *dclast ; dcih.c dcih else /* disk */ dkbeg(dclast) ; endiot(dclast) ; if((dclast[5]&3) == 1 ) mtbeg(dclast) ;/*tape*/ dclast = ndc ; /* save last transfer */ dclast[0] = dclast[0] | 3<<8 ; /* dc status to done */ dclast[0] =( dclast[0] & 0377 ) | 2<<8 ; dcold = dclast ; /* save present dclast for starting linked iot */ extern int *dclast, *sycroq, *dccs ; i = dclast[0] & 3 ; i = dctran( &dclast[2] ) ; /*diag*/printf(" new dcliiYYiYiY ccs = ccsr = 0167770 ; ccs = ccsr = &c1 ; *ccs = 0100000 ; extern int *ccs, *cco, *cci ; syinit.c syinit ccs = ccsr = &c1 ; *ccs = *dccs = *mts = *dkc = 0 ; /* 4 major channels */ ccs = ccsr = 0167770 ; ccsr = ccs ; extern int *ccs, *cco, *cci ; ccsr ccih.c ccih extern char *ccsr; while((i@CNff 2%@ ȕxNiled in t iles 204 iles 204, iles 221 iles amon iles and iles and iles and iles and iles and iles and~ iles are iles are iles beco iles begi iles by n iles by s iles by~~ iles cont iles crea iles exis iles expe iles for iles for iles in a iles in a iles in c iles in t iles is e iles is~~ iles of a iles of a iles of~~ iles on~~ iles or i iles such iles them iles them iles they iles to b iles whic iles, and iles, and iles, but iles, dir iles, how iles, so~ iles, the iles, una iles,~~~ iles. Al il e I-node e I-node e I-node e I-node e I-node e I-node e I-numb e I-~~~ e identi e identi e illust e implem e in a c e in a d e in acc e in ano e in a~~ e in ord e in par e in seq e in the e in the e in the e in the e in thi e in tur e inacce e index e index~ e indica e indica e indica e indica e indica e indica e inform e input/ e integr e integr e interr e Invent e into b e invent e invent e involv e in~~~ e is a f e is a p e is aga e is all e is als e is ass e is a~~ e is con e is del e is ext e is extion. ation. ations f ations t ations w ations w ations. ations.~ ationshi ation~~~ ation~~~ ation~~~ ation~~~ ative, a atively atively, atively, ative~~~ atly sim atly~~~ atment g atment o atment o atment~~ ator 234 ator 239 ator 239 ats show attempt~ atum giv atus and at~~~ 3 ault dir ault dir ault dir ault~~~ ault~~~ ault~~~ ause an ause dir ause dir ause it ause mai ause of ause som ause the aution t autiousl availabl ave an~~ ave a~~~ ave I-no ave been ave been ave link ave more ave the  jsr r5,getc; 9:.. swab r0 bis (sp)+,r0 rts r5 getc: mov r1,-(sp) mov (r5)+,r1 dec 2(r1) bge 1f mov r1,r0 add $6,r0 mov r0,0f mov r0,4(r1) mov (r1),r0 sys read; 0:..; 512. bes 2f tst r0 bne 3f 2: mov (sp)+,r1 sec rts r5 3: dec r0 mov r0,2(r1) 1: clr r0 bisb *4(r1),r0 inc 4(r1) mov (sp)+,r1 rts r5 put.s.ci+/ putw/putc -- write words/characters on output file / / fcreat -- create an output file for use by put(w|c) / / calling sequences -- / / mov $filename,r0 / jsr r5,@5W- W-@5N (5W- 5 5W- Nf  Nf  Nf  Nf   Ff @ N (@- Ff BҤ Ff(5 u- -(? (u-wt(@5@ 5N N ew>(w f >@ 5 W-.W-b  8 5`?@ -'ee \w4.@ @N R w'w 'C C5=     C &ZbJkRnDqbrjׯCpG@   =  &   @e W/  @ =   x B@ @ @e=ׯB/  BN f ^ wx&w f&B B5%1 W-8@e=G@4Nf ^ @2Nf ^ @@=  at a k at a p at any at a~~ at FIG at the A~~~ 1 A~~~ 1 a~~~ a~~~ a~~~ a~~~ a~~~ a~~~ a~~~ 1 a~~~ 1 a~~~ 1 a~~~ 1 a~~~ 1 a~~~ 1 a~~~ 1 a~~~ 1 a~~~ 2 a~~~~~ a~~~~~ Backgr a~~~~~ B.2,~~ B.3,.. backup be ano be che be con be con be ded be fun be giv be gre be loc be loc be mor be pas be pre be pro be sep be sha be sha be sho be tak be the be the be tre be und be use be use Becaus Becaus becaus becaus becaus becaus becaus becaus become ion 50 ation 52 ation 52 ation 52 ation 52 ation 52 ation 52 ation 52 ation an ation an ation bi ation bi ation bu ation co ation fo ation in ation in ation in ation is ation is ation is ation of ation of ation of ation of ation of ation of ation of ation of ation of ation of ation of ation of ation of ation on ation on ation po ation po ation po ation po ation po ation po ation sh ation sh ation to ation wa ation wo ation, a ation, a ation, a ation, s ation, t ation, t ation, t ation,~~ ation,~~ ation. an ames, na ames. F ames.~~~ ames~~~ ames~~~~ ame~~~ ame~~~ ame~~~ 1 ame~~~ 1 ame~~~ 1 ame~~~ 2 amined,~ aming co aming fu aming fu aming ma aming of aming of aming sc aming, a aming. aming~~~ ammatica ammatica ammatica ammatica ammatica amming o amodific among fi among se ample in ample, a ample, a ample, i ample, n ample, s ample, t ample, t ample, t amples o ams and ams are ams are ams are ams as p ams beca ams conc ams conc ams deal ams deta ams gain ams in d ams in f ams may ams may ams ma ng may b ng metho ng name ng name ng name ng of a ng of da ng of da ng of di ng of in ng of th ng of th ng on th ng on th ng only ng open ng or ti ng or wr ng or wr ng or wr ng other ng physi ng physi ng point ng point ng previ ng proce ng progr ng progr ng pseud ng rapid ng schem ng servi ng sever ng shown ng simpl ng small ng succe ng symbo ng syste ng syste ng syste ng syste ng syste ng syste ng syste ng syste ng syste ng syste ng syste ng syste ng syste ng syste ng syste ng syste ng syste ng syst When When Word "A" i "defa "ROOT "ROOT (FIG. - 17 - 18 - 19 - 20 - 21 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - 29 - 30 - 31 - 32 1 an 1 ar 1 ar 1 be 1 da 1 I- 1 di 1 I- 1 in 1 in 1 lo 1 st 1 th 1 th 1 tr 1 tr 2 2 2 2 2 da 2 di 2 I- 2 en 2 fi 2 in 2 is 2 nu 2 ow 2 re 2 tr 2 us 256 w 256 w 3 3 3 30 3 ar 3 bl 3 co at"4pscien"zndigit$retrn"cerror"_putcha"putc"flush"2_errno$_getcha"getc"log"lgetw#V fopen"putw# fcreat" 5 e list 5 e list 5 e list 5 e list 5 e list e e list~~ e list~~ e locate e locate e locate e locati e locati e locati e locati e locati e locati e locati e locati e locati e locati e logica e lose m e lost d e lost. e made a e made b e made i e made m e made m e mainta e mainte e mainte e mainte e mainte e mainte e mainte e mainte e mainte e mainte e manner e manner e map 40 e map 40 e map 40 e map 40 e map 40 e map bi e mared e mared e marked e marked e matche e maximu e may ac e may ac e may be e may) sub $512.,save(r3) 1: clr ct br 2b .bss buf: .=.+512. bufe: ct: .=.+2 end: .=.+2 file: .=.+2 count: .=.+2 ind: .=.+2 save: .=.+100. ;z$. & 6 % mlevxxxxprintplaymanualsetupscore/xxxxxxxxseektestinputxxxxxxxxspeakxxxxehpictscaleforeachbookw B:@ 95 5 6`A@ < : 7?? @? 9%5 @V w-~V@@ h.N pw-z@  a .8a :97 a5 @ ;  @_z 7<__ _  5___ | 5< 7  7_ :9w_ _Umcheck.s!/ check -- verify consistency of file system clr r2 mov $argbuf,r3 mov (sp)+,r5 tst (sp)+ 1: dec r5 ble 1f mov (sp)+,r4 cmpb (r4),$'0 blo 2f cmpb (r4),$'9 bhi 2f clr r1 3: movb (r4)+,r0 beq 3f sub $'0,r0 mpy $10.,r1 add r0,r1 br 3b 3: mov r1,(r3)+ br 1b 2: mov r4,r2 br 1b 1: mov $-1,(r3)+ tst r2 bne 1f mov $rf0,0f jsr r5,mesg; ; .even jsr pc,check mov $rk1,0f jsr r5,mesg; <\nRK1:\n\0>; .even jsr pc,check mov $rk2,0f jsr r5,mesg; <\nRK2:\n\0>; .ev&d1 ; extern c1,c2,c3,d1,d2,d3; syinit.c syinit dccs = &d1 ; extern c1, c2, c3, d1, d2, d3 ; d2 common.c _ d1; d2; d3; d4; d5; d6; d7; d8; d9; int *dccs d1; int *dcwc d2; int *dcma d3; dspydr.c main dcwc = &d2 ; extern c1,c2,c3,d1,d2,d3; syinit.c syinit dcwc = &d2 ; extern c1, c2, c3, d1, d2, d3 ; d3 common.c _ d1; d2; d3; d4; d5; d6; d7; d8; d9; int *dccs d1; int *dcwc d2; int *dcma d3; dspydr.c main dcma = &d3 ; extern c1,c2,c3,d1,d2,d3;  alloc alloc alloc Also Altho Altho alway an I- Any a Any~~ and " and a and i and o and t Any f Any n are c are c are n area area arran arran arrow As bl As fi as al As an As se at 40 At FI At th At th be un below bit s block block Buffe block block block block block block block block block branc buffe but n by al by in By se by re Canad Canad Canad Canad Canad Canad Canad Canad t& 6 % Ff07 @e5V `UV `U P=% - jOW z_` 7 r OA1@ T_` -J $O@_, 6 _j * L _j r7V `U _j  %_j _j +_j  ^L_j 5 @e@e& %--l 5-_` W-_` -_` W-_` uW-@ 5 u-@ @mA AaH u-u5 u-@  _ 5% W 7 5-_-@# 5-_@@e@-@e5-jNfZ %7PLJ>-DNf4 %7*&$+-Nf %7 % %0 _B w 5% W  5- -@tpjR _ T5% W >_ 5-(_-@# M 9-  ^ L K J I H G F E D C B A @ ? > = < ; : 9 8 7 6 5 4 3 2 1 0 / . - , + * ) ( ' & % $ # " !     r inters ar inters as inters ca inters co inters ea inters fo inters fr inters in inters in inters in inters in inters in inters in inters in inters is inters of inters pe inters po inters th inters to inters to inters to inters to inters to inters to inters to inters to inters to inters to inters to inters to inters wh inters, a inters, p inters,~~ inters. inters. inters. inters.~~ inters.~~ inters.~~ inters.~~ inters; I inters~~~ inters~~~ inters~~~ inters~~~ inters~~~ inters~~~ inter~~~ inter~~~  w"w "@O'L > x' fj' x5%@e&T' 4%@,u-x8 2eu-|8 2N N  Nf  Vewn!w \!D2GT7"GwL!w :!,G'8 5 7''8 2& 8 5 7&&8 2;p& 4% p'FX& T& 4 4 2 8&4&-$ 7 *& (&$&-#7 & JwvFw w v  7r# r#wp%N r#wp%f 7r#`e &% ron.c _ int *sycroq; int *ackq; int *mtq; int *dkq; mtbeg.c mtbeg extern int *mtq, *mtlast ; if( testq(mtq) == 0 ) goto empty ; pq(mtq,iotp) ; mtih.c mtih extern mtq, irc, ircmax ; if((nq = gq(mtq) ) == 0 ) goto sendac ; qdspy.c qdspy q = mtq ; extern int *sycroq, *ackq, *mtq, *dkq ; syinit.c syinit extern int *sycroq, *ackq, *mtq, *dkq, qa[] ; mtq = initq( &qa[ql*2], ql ) ; mts common.c _ int *mts m1; int *mtc m2; int *mtbrc m3; int *mtma m4; dspydr.c main *mtsirect e direct e direct e direct e direct e direct e direct e direct e direct e direct e direct e direct e direct e direct e direct e direct e direct e direct e direct e each~~ e elimin e embodi e end of e end of e entrie e entry e entry~ e equal e erroro e errors e errors e exampl e except e exerci e extens e file A e file a e file a e file a e file d e file d e file f e file i e file i e file i e file i e file i e file n e file n e file n e file n e file n e file n e file n e file n e file n e file n e  drawba Drawin due to due to due to duplic duplic Each d duplic duplic duplic During during each d each I each f Embodi each~~ easily effect effect effici elimin elimin elimin embodi encoun encoun ending entrie entrie entrie entrie entrie entrie entrie entrie entrie entrie entry entry entry entry entry entry entry entry entry entry entry entry entry) entry. entry~ entry~ errone error Errors error, errors errors errors errors errors made mo e maintai e mainten e mainten e mainten e mainten e mainten e mainten e mainten e mainten e mainten e manner e manner~ e map 402 e map 406 e map 406 e map 406 e map 406 e map bit e mared " e mared a e marked e marked e matches e maximum e may acc e may acc e may be e may be e may be e may loc e may thu e method e modific e modifie e more co e more th e more us e more va e more~~~ e more~~~ e most pa e much of e must be e must be e must pr e name "1 e name "A e name "A e name "U e name (t e nan ind n and ma n and pr n anothe n any di n any ev n any I- N are~~~ n area o n are~~~ n arises n arrang n as I-n n as set n at 205 n at 3B, n at FIG n at FIG n at FIG n attemp n a~~~ n a~~~ 1 n a~~~ 2 n backup n be giv n be sei n become n behalf n bit is n bit is n bit wh n bits 4 n bits f n block n block n block n blocks n but on n by any n change n checki n choosi n common n comput n comput n comput n comput n conjun n conjun n contai n contra n contra n creati n data b n dealin n diagra n differ n  deallb /* incr not in use counter */ niucnt =+1 ; extern niucnt, toterr, rngcnt, frecnt ; syinit.c syinit extern niucnt, toterr, rngcnt, frecnt ; niucnt = toterr = rngcnt = frecnt = 0 ; numbrs ccdspy.c ccdspy numbrs( 3, n, &i ) ; numbrs( 6, n, &i ) ; numbrs( 6, n, &i ) ; numbrs( 6, n, &i ) ; numbrs( 6, n, &i ) ; numbrs( 6, n, &i ) ; numbrs( fclen, n, &i ) ; dcdspy.c dcdspy numbrs(2, n, &i ) ; dkdspy.c dkdspy numbrs(2, n, &i ) ; _commd"L2rsave _fclen _fct _comd L3_printf L5 L6V_fcthrs L7hL8 L9zL10000L10L10001L11_bt _allocb L12 _iot L13H_deallb L148_damin L15L16L17>L18X_ciotp L19(L20L21L22<L23:L24@L25RL26bL27xL28@L29re es to th es to th es to~~~ es which es which es which es which es which es withi es) stor es, and es, and es, and es, and~ es, but es, but es, but es, comp es, dire es, FIG. es, for~ es, howe es, name es, so~~ es, the es, the es, unaf es, user es, viol es, whil es,~~~ 1 es-- to es. A l es. All es. As es. As es. At es. A~~ es. Dir es. Dir es. For es. For es. For es. Fur es. I-l es. In es. Onc es. Suc es. Sys es. The es. The es. The es. The es. Thu es. Thu es.~~~ es.~~W-"XN  @ , `5@-W- @N  W-\ 4  7 W--? 5% @-> f  NP  _@N  5_  W-` @ww bp Nf   @ ,wlw Z*e- v  He-e7w&w  Hww _ 7 @_ 5%/:7 t7%*/07  \5@ % J5%/-ZZ X r~~~ puter~~~ puter~~~ p~~~ 10 qual and qual the que.~~~ quence o quence o quence w quential quently ques of quest in quest is quest is questing quests d quire le quired i quiring quite di quite si r (index r 211 to r 211. r 212 wh r 234 wi r 239 is r 239 to r 523 an r 523 an r 523 is r 523 is r 523, a r 523. r 523. r 523. r 528 of r a diff r a firs r a full r a part r a seco r a sing r a smal r access r admini r all da r all of r all of r also g r always r amy us r and co r and lo r and th r ad=:741EB?<9630/,)&# .+(%"-*'$!     , the a ks, the c ks. An i ks. Fixe ks. Many ks.~~~ 3 ks.~~~ 12 ks.~~~ 19 ks; I-nod ks~~~ 20 kup stora kup stora kup stora kup.~~~ 1 k~~~ 2 k~~~ 2 k~~~ 4 k~~~ 5 k~~~ 5 k~~~ 6 k~~~ 7 k~~~ 8 k~~~ 10 k~~~ 11 k~~~ 14 k~~~ 16 k~~~ 17 direct n direct n direct n direct n direct n direct n direct n direct n direct n disk s n duplic n each 1 n each~~ n end of n entrie n entry n entry n error. n error. n error~ n exampl n FIG. 1 n FIG. 1 n FIG. 1 n FIG. 2 n existi n FIG. 3 n FIG. 3 n FIG. 3 n FIG. 3 n FIG. 3 n FIG. 4 n FIG. 4 n FIG. 4 n FIG. 5 n file i n file l n file l n file l n file l n file l n file l n file l n file l n file l n file l n file l n file l n file n n file.~ n file~~ n file~~ n file~~ n flow c n for ke n free b n free b n just~~ keepin key to key to key~~~ known Large large large large large. large~ large~ last m last m later later~ layout layout layout leads~ least length length length length length length level level levels levels Likewi linear link i link t links links links list 4 list 5 list 5 list 5 list 5 list 5 list 5 list 5 list e list. list~~ list~~ locate locate Locati Locati Locati locati locati locati locati locati locati locati locati e& e@e5EW 25 2 5%W- AWp AmeuN,"f@e@e& e@e5@Ae@%'( h (2 nFf \Wp*ed!Ff7 4 0d!lWped!\p ,"FWpf:Wpf e5_ @V ׭(l18"WpfWpf ec 8"WpfWpf e MDC?002z0+   numbrs(2,n,&i) ; dspydr.c main numbrs( 11, n, &r) ; iodspy.c iodspy numbrs( l, n, &nums ) ; mtdspy.c mtdspy numbrs(1,n,&i) ; numbrs(2, n, &i ) ; numbrs(2,n,&i) ; numbrs.c numbrs numbrs(max,array,amount) int array[],amount[] ; { oldpri common.c _ p20flg; irc; ircmax; oldpri; p20flg common.c _ p20flg; irc; ircmax; oldpri; dcih.c dcih extern dclser, p20flg ; if( p20flg != 1 ) *dccs = *dccs | 0200 ; dkih.c dkih /*diag*/if(p20flg != 1) *dkc = *dkc | 0200 ; /* rlves emselves emselves, emselves, em~~~ 3 em~~~ 9 em~~~ 13 em~~~ 16 em~~~ 18 em~~~~~ en a data en a data en a data en a data en a dire en a dire en a file en a file en a pseu en a user en a user en a user en a user en an exi en be sei en become en by any en change en comput en direct en direct en file i en file l en file l en file l en file l en file l en file l en file l en file l en file l en file l en file l en file l en file.~ en file~~ en file~~ en into t en locate en make i en moment en no d<;:9876543210/.-,+*)('&%$#"!      th ion;~~~ ion;~~~ ional di ional na ional na ional na ional sy ionally ional~~~ ions bet ions for ions of ions of ions to ions und ions wil ions wit ions, an ions. B ions.~~~ ionship ions~~~ ions~~~ ions~~~ ion~~~ ion~~~ ion~~~ 1 ion~~~ 1 ior Art ior art ior art ior art ior art ior art ior art ior art ior art ior art ior art ior art, ior art. ior art. ior art~ ious pro ious ser iously d iously d iously n iously. iously.~ ip among ipal fun ipal wit ipal~~~ iprogram iption iptiota, alpha, lev); remove(); if(v > alpha) { alpha = v; use(pv, m); if(alpha >= beta) break; } } lmp = p2; f1: pvp = pv; return(alpha); } double maxmin(alpha, beta, lev) double alpha, beta; int lev; { int m; register *pv, *p1, *p2; double v, minmax(); if(lev >= xlev) return(maxqui(alpha, beta, lev)); pv = pvp; *pvp++ = 0; p1 = lmp; agen(false); p2 = lmp; m = p2-p1; if(m == 0) { alpha = -1.0e4+lev; goto f1; } p2 = p1; lev++; while(p1 != lmp) { m = *p1++; move( C 4 EC`fC K"e  "@@ b(C C @@ b(Ce  @ v0&0, P &f @ ,ty_qsort"qsortdoneloop$loop12))99ii_attacv _center _wheur _bheur _control _qdepth _mdepth _rand _matflg _bookf _bookp _intrp _moveno _gval _vtabf _fout _vx _vy _vtab ._game _fault _pvalue _abmove _pvbuf _pvp _lmp _sbufp _clktim _mantom _ply _value _evalue _mfmt _debug _deptory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rerenc erformed erformed erformed erformed erformed erformed erformed erformed erformin erical d ering an eriodica eriods f eristics erly acc erly app erly dup ermed a ermed he ermed hi ermine t ermined ermined ermined ermissib ermissio ermissio ermissio ermit ac ermit fi ermit in ermit ra ermits d ermits t ermitted ermitted ermitted ermittin ermittin ermittin ermore, ern in t ern to t ernative ernative ernative ernative erned wi erned wi erned wi erned wi erned wi erned wi ern~~~ 1 ero coun ero dedi ero_`a bU Bh er who c er wishe er wishe er wishe er wishe er wishe er wishe er wishe er withi er's are er's~~~ er's~~~ er) to l er)~~~ er, and er, main er, or s er, the er, ther er,~~~ er,~~~ er,~~~ er. Adv er. As er. Dia er. In er. In er. In er. Thu er. Use er.~~~ er.~~~ 1 er.~~~ 1 er.~~~ 1 er.~~~ 1 ER1" is~ ER1.A.1" era. Th era. Th eral and eral dir eral hie eral hie eral pur eral pur eral tim eral use erally a erally l erally n erally p erally q erally r erally~~ eral~~~ erarchal erarch88Y_printn"`rsave L2$`_putchar L18`rretrn _printf"<`L4L`L5L`L6t`L3DaL8aL9`L10`L11`L12`L13`L14HaL15`L16PaL10000`L10001`L17`L18`L19`L20aL70asswitch psw.o.oJ;+`$_֠_savpsw" *area ; common.c _ int *table;int *area; syinit.c syinit extern int fct[], *ciotp, *table, *area ; table = ackmes ; testq ccbeg.c ccbeg if( testq( ackq ) == 0 ) goto empty ; dcbeg.c dcbeg if( testq(sycroq) != 0 ) goto que ; dkbeg.c dkbeg if( testq(dkq) == 0 ) goto empty ; iras.c iras if( testq( ackq ) == v ) goto prisam ; v = testq( ackq ) ; mtbeg.c mtbeg if( testq(mtq) == 0 ) goto empty ; qdspy.c qdspy n = testq(q) ; qu.c testq testq(qt) int qt[] ; { snack.c snack ifA & 9 &fA @e&7w@&./lib/crt20.o/usr/c/c0/usr/c/c1/usr/bin/nas/tmp/ctm0a%s: c0c1as-a.outa.outmove failed: %s ld-l2/lib/libc.a-l/bin/lddefineincludeCan't creat %s Undefined controlNested 'include'Missing file %sControl syntax%d: Line overflowCan't find %s Try again Fatal error in %s  fw  7 df\w 7 Finb.oiodspy.oMiras.omtbeg.omtdspy.omtih.omtstat.omttran.onumbrs.oqdspy.oqu.osnack.ostart.osyinit.oLcompsyinit.osnack.ostart.osyinit.oiear.oldunix.opsw.oreboot.ocrt20.siear.sa.outf the ll of the ll of the ll of the ll of the ll of the ll of the ll path n ll path n ll path n ll path n ll path n ll path n ll physic ll physic ll pointi ll possib ll unallo llaneous llaneous lled, the lled, the lling fil llocatabl llocatabl llocatabl llocatabl llocatabl llocated llocated llocated llocated llocated llocated llocated llocated llocated, llocated. llocated~ llocating llocation llustrate llustrate llustrate llustrate llustrate llustrate llustrate llustrate llustrate llustrati llustrY `U e l5NY `U @d !EU? Y `Ug ! @ z:@0 Ff) J xNe l @EU=wJDN:  5 @EU=@Ff)5fC5 ^C@?VC@?JCBC5 @Ff@e55 W-f Nm ?% _h@_L5 7 |xW-  A Aa1-P_r -@ @ @a @ ~BvBnB br err 1: mov r1,r3 clr r4 / count entries 2: cmp (r3),ii bne 2f inc r4 add $12.,r3 br 2b 2: cmpb r4,(r2) beq pall jsr r5,mesg; <#\0>; .even err: incb longf+1 jsr r5,mesg ; .even pall: tst longf beq 1f mov r5,-(sp) mov ii,r5 jsr pc,decml mov (sp)+,r5 1: cmp (r1),ii bne 1f tst longf beq 2f jsr pc,pentry jsr r5,mesg <\n\0>; .even 2: add $12.,r1 br 1b 1: tst longf beq ep2 jsr r5,mesg; <\n\0>; .even ep2: inc r2 inc ii cmp ii,maxi ble p2 tst (r1) beq 1f mov (r1),ii " may A.1" the a. A se a. The a. The A.1 is a A.1, A.2 A.1, the A.2, A.3 A.3,..., A.~~~ 12 Abstract ability able 1. able blo able blo able blo able for able spa able spa able to above. absence abular f access I access I access c access d access d access i access t access t access t access t access t access t access t access t access t access t access t access t access t access t access. access. accessib accessib accessin access~~ accommod accompli accompli accordin accordin accordin accordin ac)())99I)()))())9h999I)Y9y9y9y the~ ein, and ein:~~~ eing dea eing sho eing~~~ eir corr eir file eir need eir stor eized fo el file el of in el of in el, each elate th elates t elations eld of t eld. Th eleted a eleted, eletion, elf to~~ elf) is elf-~~~ elf. Th elf. Us elieve t eliminat eliminat eliminat eliminat ell as t ellaneou ellaneou elow.~~~ elow.~~~ els --sy els may els of i els, for els, mai els. Sy elves ar elves st elves st elves, c elves, v ely by t ely cont ely inde ely open ely sepa ely, a b ely, may ely, whi el 7 I- 7 ma 7 me 7 me 7 mo 7 na 7 no 7 oc 7 Ph 7 of 7 sa 7 te 7 to 8 50 8 by 8 co 8 co 8 en 8 fi 8 fi 8 in 8 li 8 ma 8 nu 8 re 8 se 8 sh 8 st 8 un 8 un 8 x 2 9 9 25 9 25 9 FI 9 a 9 ad 9 bu 9 di 9 fi 9 fi 9 in 9 nu 9 ow 9 ro 9 si 9 Th 9 th A dir A lar A lin A plu A use a man A num A sin a use accom Admin admin Advan All d Also An an $$jUTY `U rY `U 5 W- @ mY `U Y `U55 N@e& J%5NY `U Y `U5 W-@ @aY `U Y `UFEt5W-. "@@   !-w-w@ z:@0  N ! !Ff-DU?D-f7 U?|xE5@f E%T J (%@ "82 5=NY `U w ed in op ed in pr ed in pr ed in ta ed in th ed in th ed in th ed in th ed in th ed in th ed in th ed in th ed in th ed in th ed in th ed in th ed into~ ed in~~~ ed in~~~ ed lengt ed lengt ed lengt ed lengt ed locat ed locat ed on a ed on a~ ed on du ed on th ed on th ed on th ed on th ed ones. ed physi ed previ ed separ ed since ed so th ed the~~ ed throu ed to a ed to ac ed to ac ed to as ed to as ed to be ed to be ed to be ed to bu ed to by ed to ch ed to co ed to co ed to cu ed to fi ed to fo ed to It common.c _ fclen; fcthrs; comd; chcnt; maxch; dspydr.c main chcnt = 5 ; extern chcnt, maxch ; fatal.c fatal chcnt = maxch + 1 ; /* deletes present input line */ extern chcnt, maxch ; getput.c getchar else chcnt = -1 ; /* reinit */ chin[chcnt] = chin[chcnt] | 040 ; chin[chcnt] = '\n' ; if((chin[chcnt] >= 0101 ) &&(chin[chcnt] <= 0132 ) ) putchar( chin[chcnt] ) ; chcnt = -1 ; /* init cnt */ chcnt = 0 ; chin[++chcnt] @5W- W-@5N (5W- 5 5W- Nf  Nf  Nf  Nf   Ff @ N (@- Ff BҤ Ff'5 u- -'> 'u-w'@5@ 5N N ewV'wf (=@ 5 W-.W-b  8 5`>@ -&e a num gh all o gh any a gh a~~~ gh buffe gh direc gh direc gh direc gh not s gh the I gh the d gh the I gh the I gher in ght loca ght phys ght phys ght writ gh~~~ 3 gh~~~ 13 gical or gin. In ging.~~~ ginning ginning ginning ginning ginning ginning ginning ginning ginning ginning ginning~ ginning~ gins in gins wit gins~~~ gital co gital co give the given by given di given fi given mo given th given to given wh given. given. gives to giving a giving i gle acce gle dire gle dire gle file g= *tkb & 0177 ; extern maxch, chcnt ; if( chcnt > maxch ) goto newlin ; if( chin[chcnt] == '#' ) {if(chcnt >=1 ) { chcnt=-2; /*decr*/ if( chin[chcnt] == '@' ) { chcnt = -1 ; /* delete line*/ if(( chin[chcnt] == '\n' ) ||( chin[chcnt] == '\r' ) ) maxch = chcnt ; return( chin[chcnt++] ) ; syinit.c syinit chcnt = 5 ; extern irc, ircmax, maxch, chcnt, p20flg ; chin common.c _ char chin[70]; getput.c getchar chin[chcnt] = chin[chcnt] | 040 ; chin[chcnt] may b ing metho ing name ing name ing name ing of a ing of da ing of da ing of di ing of in ing of th ing of th ing on th ing on th ing only ing open ing or ti ing or wr ing or wr ing or wr ing other ing physi ing physi ing point ing point ing previ ing proce ing progr ing progr ing pseud ing rapid ing schem ing servi ing shown ing simpl ing small ing succe ing symbo ing syste ing syste ing syste ing syste ing syste ing syste ing syste ing syste ing syste ing syste ing syste ing syste ing syste ing symd commd.c commd commd(sc,linked) int sc[], *linked ; { d1 common.c_ d1; d2; d3; d4; d5; d6; d7; d8; d9; d1 common.c_ int *dccs d1; int *dcwc d2; int *dcma d3; d1 dspydr.cmain dccs = &d1 ; d1 dspydr.cmain extern c1,c2,c3,d1,d2,d3; d1 syinit.csyinit dccs = &d1 ; d1 syinit.csyinit extern c1, c2, c3, d1, d2, d3 ; d2 common.c_ d1; d2; d3; d4; d5; d6; d7; d8; d9; d2 common.c_ int *dccs d1; int *dcwc d2; int *dcma d3; d2 dspydr.cmain dcwc = &d2 ; d2 dspydr.cmain extern c1,c2k d @95 N f d L@@ 5Ne0 f V w/f W- Nfe( IW-Ne  N7 7W-dA r   9 A r uA rd& V : A rdu@Ff @     xF  $ N , fe( w.f)@   F. bv k nz q~ r Nf w-f3_ -ZT_ 49 7 74extern int *mtlast, *mtc, *mts, *mtbrc, *mtma, *iot ; if( *mtc < 0 ) goto deverr ; if( p20flg != 1 ) *mtc = *mtc | 0200 ; /* mtc ready */ lfunc =(*mtc & 016 ) >> 1 ; mttran.c mttran *mtc = mtreg[0] ; /* function and go */ extern int *mts, *mtc, *mtbrc, *mtma ; if(( *mtc & 0200 ) == 0 ) goto busy /* controller busy */ ; syinit.c syinit extern int *mts, *mtc, *mtbrc, *mtma ; mtc = mtcr= 0172522 ; mtcr = mtc ; mtcr common.c _ char *mtcr m2; char *dkcr d4; char *ccsr c1; mtII9)Iy)III9)99)with on word on, a na on, all on, all on, phys on, rena on, stor on, the on, the on, this on,~~~ 1 on,~~~ 1 on. In on. The on. Thi on. Wor on.~~~ 1 on.~~~ 2 on: tha on;~~~ on;~~~ 2 onal dir onal nam onal nam onal nam onal sys onally a onal~~~~ onceptua oncern i oncern t oncerned oncerned Once~~~ oncerned oncerned oncerned oncerned ond dire ond dire ond dire ond leve ond port ond port ond port ond set ond the ond to I ond user ond user ond user ond user ond user ond user ond, for ondary s on 3 loc 3 rea 3 sam 3 sto 3 wri 30 -~~ 301 is 302 re 303 ex 303~~~ 304 sh 305. 306 an 307 ea 308, t 308. 31 -~~ 32 -~~ 3A and 3A sho 3A, in 3A, it 3A.~~~ 3A.~~~ 3B is 3B, is 3B.~~~ 3C ill 3C is 4 4 4 and 4 bit 4 blo 4 com 4 dat 4 Gen 4 exp 4 is 4 it 4 key 4 lar 4 nee 4 sta 4 the 401 ar 401 be 401. 402 of 402. 403, b 404 co 404. 404. 404~~~ 405 is 406 ar 406 co 406. 406.~~ 407 co 408 wh 408 wi 420.  L% _` @ 7dP7VPRPNP_j  PPP_j cc  x_`  W `U_j "W `U_j L 5-b_` -V@wB>0W `U _j K=% @5O I>W `U _j  5-d-@wPW `U _j  5-a-x->-@wZW `U _j  ^Mp pacm& 4  NM6 B hW~WWWWWW `UW @ W `U-ng~ erating~ eration eration, eration, eration, eration, erations erations erations ercised ere a la ere are ere are ere I-no ere shou ere shou ere to d ere user ere with ereby ma ereby po ered in ered in ered use ered. I erefore erefore erefore, erefore, erein as erein re erein te erein th erein, a erein:~~ erence t erence t erence t erence t erence w erenced~ erences erences erences erences erences erent fi erent fr erent na erent po erent po erent sy erent us erest in erest in erfere w erfeer~~~ her~~~ hes begi hes file hes the hes to c hes to c hes to e hes to l hes to o hes to o hes to r hes to r hese cha hese dir hese spe hese two hese~~~ hese~~~ hes~~~ 1 hether t hey cont hey deal hey do n hey had hey have hey repr he~~~ 2 he~~~ 2 he~~~ 2 he~~~ 3 he~~~ 3 he~~~ 3 he~~~ 4 he~~~ 4 he~~~ 4 he~~~ 4 he~~~ 4 he~~~ 5 he~~~ 5 he~~~ 5 he~~~ 6 he~~~ 6 he~~~ 6 he~~~ 7 he~~~ 7 he~~~ 7 he~~~ 8 he~~~ 8 he~~~ 9 he~~~ 9 he~~~ 10 he~~~ 10 he~~~ 10 he~~~ 11 he~~~ 13 he~~~ 13 ta bl l data bl l data bl l data fi l data fi l datum g l directo l directo l directo l directo l directo l directo l directo l directo l directo l directo l directo l directo l disk fi l file fo l file na l file na l file na l file na l file na l file na l file st l find a l form a~ l form of l form;~~ l functio l handlin l handlin l hierarc l hierarc l illustr l illustr l its dat l linking l linking l locatio l locatio l modern~ l name in l name is l name tr l names w l names~~ l naming l naming l nami name ile name ile name ile name ile name ile name ile name ile name ile name ile name ile name ile name ile name ile name ile name ile name ile name ile name ile name ile nami ile of a ile of a ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile or b ile or d ile or p ile read ile retu ile sepa ile seve ile shar ilies ectories ectories ectories ectories ectories ectories ectories ectories ectories ectories ectories ectories ectories ectories ectories ectories ectories ectories ectories ectories ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 3 ectory 3 ectory a ectory a ectory a ectory a ectory a ectory a ectory a ectory a ectory a ectory a ectory b ectory b ectory b ectory b ectory b ectory b ecto               _value _bkpos _game errorVpmoveXnmoveHbmoveHrmoveqmove<kmovemoveHmovekmovexmoveomoveoomovepmoveq _ char *mtcr m2; char *dkcr d4; char *ccsr c1; dspydr.c main ccs = ccsr = 0167770 ; ccs = ccsr = &c1 ; extern char *ccsr ; syinit.c syinit ccs = ccsr = &c1 ; ccs = ccsr = 0167770 ; ccsr = ccs ; char *mtcr, *dkcr, *ccsr ; cctran ccbeg.c ccbeg if( cctran(mess,len) == 0 ) goto alack ; ccdspy.c ccdspy flag = cctran( mess,6 ) ; cctran.c cctran cctran(mess,len) int mess[],len ; { snack.c snack if( cctran(idx,6) == 0 ) goto ret ; /* busy */ chcnret phigh: mov _reg+12.,r0 / get old stack pter add $2,r0 / get psw word mov (r0),r1 bic $!0340,r1 / have old priority mov r1,_pswold bis $0340,(r0) / set psw priority high ret: jsr pc,resreg / restore regs mov _reg+12.,sp / set stack rti / interrupt return / / / internal sub to store regs ( not sp ) streg: mov r0,_reg mov $_reg+2,r0 mov r1,(r0)+ mov r2,(r0)+ mov r3,(r0)+ mov r4,(r0)+ ii} if(( c[0] = getchar() ) == '\n' ) { ef[1] = 1 ; goto badf ; } if((ef[1]==2) &&( ef[2]!='p') ) goto badf ; extern int *iot, ef[], *ciotp ; mtdspy.c mtdspy n[i++] = getnum(ef) ; ef[1] = 1 ; ef[1] = 0 ; if ( ( ef[1] == 1 ) && ( n[i] == 0 ) ) i =-1 /* decr */; if ( ef[1] == 2 ) goto badf ; if ( ef[1] == 2 ) goto badf ; if ( ef[1] == 2 ) goto badf ; if ( ef[1] == 2 ) goto badf ; while ( ( ef[1] == 0 ) && ( i k d @:5 N f d M@@ 5Ne0 f V w/f W- Nfe( IW-Ne  N7 7W-dA r   9 A r uA rd& V : A rdu@Ff @     xF  $ N , fe( w.f)@   ,/ bv k nz q~ r Nf w.f4_ -BU_ 5: 8 75p[9] ) ; i = damin( &sc[4], &iotp[9] ) ; /* disk adr conversion */ if( damin( &sc[4], &iotp[9] ) != 0 ) /* error in adr */ if( damin(&sc[4],&iotp[9]) != 0 ) if( damin(&sc[4],&iotp[9]) != 0 ) dam.c damin damin(secptr,pdp) int secptr[], pdp[] ; { dkih.c dkih damin( usn, &da ) ; /* map sector num back to disk adr */ damout dam.c damout damout(pdp,secptr) int pdp[], secptr[] ; { dkih.c dkih damout( &dklast[9], &ac[4] ) ; /* disk adr, sel format damout( &0 ) != 0 ) ss = ss | 010000 ; /* pae */ if(( *mts & 0200 ) != 0 ) ss = ss | 01000 ; /* nxm */ if(( *mts & 02000 ) != 0 ) ss = ss | 0100 ; /* eot */ if(( *mts & 020000 ) != 0 ) ss = ss | 010000 ; /* cr */ if(( *mts & 040 ) != 0 ) ss = ss | 020 ; /* bot */ if(( *mts & 0400 ) != 0 ) ss = ss | 01000 ; /* bte */ if(( *mts & 04000 ) != 0 ) ss = ss | 0400 ; /* bgl */ if(( *mts & 040000 ) != 0 ) ss = ss | 040 ; /* eof */ if(((*mts&01000 )!=0) &(*bf _fout _vx _vy _vtab ._game _fault _pvalue _abmove _pvbuf _pvp _lmp _sbufp _clktim _mantom _ply _value _evalue _mfmt _debug _depth _flag _eppos _bkpos _wkpos _edge _pval _dir _board _mbuf ` _sbuf d_use"rsave L2L3L1rretrn _princ""L52L6~_putchar _out L10000ld [ 3?v d .b ; 50xj Y A .4LpO_n  :9 cx xhv  71sd { t^nmnohupnroffodoedoprovpasswdpfeplotprproofpsptiptxrelocrewrmrmdir+] ) ; extern fclen ; commd.c commd while( i < fclen )fcp[i++] = 0 ; extern fclen, comd ; fcp = &fct[ fc*fclen ] ; while( i < fclen ) printf(" %o", fcp[i++] ) ; common.c _ fclen; fcthrs; comd; chcnt; maxch; dkih.c dkih ba = fct[ fc * fclen + 8 ] ; ea = fct[ fc * fclen + 9 ] ; extern fclen ; fcp = &fct[ fclen *(dklast[1] & 037) ] ; endiot.c endiot extern fclen ; fcp = &fct[ fc*fclen ] ; mtih.c mtih extern fclen ; fct[ fc * fclen + 1 ] = 0 ; fct[ spydr.cmain extern int *ciotp ; ciotp dspydr.cmain /*diag*/ printf("ciotp = %o \n", ciotp ) ; ciotp iodspy.ciodspy return(ciotp) ; ciotp iodspy.ciodspy pter = ciotp ; ciotp iodspy.ciodspy extern int *iot, ef[], *ciotp ; ciotp syinit.csyinit ciotp = iot ; ciotp syinit.csyinit extern int fct[], *ciotp, *table, *area ; clkint syinit.csyinit *clkiv = &clkint ; clkint syinit.csyinit extern ccint, dcint, dkint, mtint, clkint ; clkiv common.c_ int *cciv; int *dciv; int *mtiv; int *dkiv; int *c at the b at the c at the I at the I At the o At the o at the d at the d at the f at the s at the t at the u at they at the~~ at the~~ at the~~ at the~~ at this at to pr at volum at when at, dupl at. Use ata arra ata as n ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata blo W-  5@@ @ A Aapvwtwr> KP `  x 7 -~<-Ul-U^-Z-RUH-RU:47 07 ,w&w"BrKN<Qr Rp PbNkn*qbad char -- %c too many squares illegal position only one king each side needs a king black is in check iYYi)ufara[], *ackmes, ackara[] ; bufara bfdspy.cbfdspy area = bufara; bufara bfdspy.cbfdspy if( area == bufara) bufara bfdspy.cbfdspy printf("area(%o) not equal to either bufara(%o)",area,bufara); bufara bfdspy.cbfdspy extern int *bt, bufara[], *ackmes, ackara[] ; bufara common.c_ bufara[1550]; ackara[117]; qa[68]; ef[3]; iotta[150]; bufara syinit.csyinit bt = initb( bufara, bufl, 256 ) ; bufara syinit.csyinit extern int *iot, iotta[], *bt, bufara[], *ackmes, ackara[] ;  n = getnum(ef) ; n = getnum(ef) ; n = getnum(ef) ; n = getnum(ef) ; n = getnum(ef) ; n2 = getnum(ef) ; n2 = getnum(ef) ; ccdspy.c ccdspy i = getnum(ef) ; i = getnum(ef) ; dcdspy.c dcdspy n[i++] = getnum(ef) ; dkdspy.c dkdspy n[i++] = getnum(ef) ; dspydr.c main i = getnum(ef) ; lmax: i = getnum(ef) ; { l = getnum(ef) ; if( ef[1] == 2 ) goto badf ; i = getnum(ef) ; cnt++] ) ; chcnt syinit.csyinit chcnt = 5 ; chcnt syinit.csyinit extern irc, ircmax, maxch, chcnt, p20flg ; chin common.c_ char chin[70]; chin getput.cgetchar chin[chcnt] = chin[chcnt] | 040 ; chin getput.cgetchar chin[chcnt] = '\n' ; chin getput.cgetchar if((chin[chcnt] >= 0101 ) &&(chin[chcnt] <= 0132 ) ) chin getput.cgetchar putchar( chin[chcnt] ) ; chin getput.cgetchar chin[++chcnt] = *tkb & 0177 ; chin getput.cgetchar extern char chin[] ; chin getput.cgetchar if( c 01 ;/*rle*/ mttran.c mttran *mtbrc = mtreg[1] ; extern int *mts, *mtc, *mtbrc, *mtma ; syinit.c syinit extern int *mts, *mtc, *mtbrc, *mtma ; mtbrc = 0172524 ; mtc common.c _ int *mts m1; int *mtc m2; int *mtbrc m3; int *mtma m4; dspydr.c main *dkc = *mtc = *dccs = 0200 ; extern int *mtc, *mts ; mtdspy.c mtdspy case 0: *mtc = n[0] ; extern int *mtc, *mts, *mtbrc, *mtma ; printf("mtc= %o mtbrc= %o mtma= %o mts= %o\n",*mtc,*mtbrc,*mtma,*mts); mtih.c mtih fc * fclen + 2 ] = selsta ; syinit.c syinit extern fclen ; fclen = fcel ; while( i < 32 ) fct[ i++ * fclen ] = 0 ; fct ccdspy.c ccdspy fcp = &fct[ i*fclen ] ; extern int selmes[], fct[], *ccs, *cco, *cci, *cacms, ef[] ; commd.c commd extern int *iot, fct[], *bt, *ciotp ; fcp = &fct[ fc*fclen ] ; common.c _ fct[320]; inmess[10]; selmes[10]; reg[8]; dkih.c dkih ba = fct[ fc * fclen + 8 ] ; ea = fct[ fc * fclen + 9 ] ; extern int fct[], *dktl, *dkq , *dklast ; _-  5-_-@ff %_d % %_ 5 e@-A mjAup@ mX f % _  &=% W _@ @#a    xFXXXXXX$_W _ =% _WuWf_h_-db _-PN _-<: _ _ 5-ly, to rly~~~ rm as a rm a~~~ rm in Ta rm in~~~ rm of an rm of fi rm of~~~ rm. As rm;~~~ rmal dir rmal use rmat A.1 rmat is rmat of rmat of rmat to rmat, du rmat. U rmation rmation rmation rmation rmation rmation rmation rmation rmation rmats sh rmed a " rmed by rmed by rmed by rmed by rmed by rmed her rmed his rmed on rmed on rmed, an rmed~~~ rmine th rmined a rmined l rmined l rming la rming se rming sm rmissibl rmission rmission rmission rmit acc rmit fix rmit ind rmit rap  data f data f data f data f data f data f data f data f data f data f data f data f data l data l data s data w data. data~~ data~~ data~~ datum deal o deal p deal w deal w dealin dealin deal~~ debugg dedica Descri degree deleti denied Descri Descri descri descri descri design Detail desire detail detail detail determ diagra differ differ differ differ Direct Direct Direct Direct differ diffic diffic digita digita Direct Direct Direct Direct Y9i99Y99I_attacv _center _wheur _bheur _control _qdepth _mdepth _rand _matflg _bookf _bookp _intrp _moveno _gval _vtabf _fout _vx _vy  2f 3: add $12.,r1 br 2b 2: jsr pc,pentry1 mov (sp)+,r1 1: rts pc 9: jsr r5,mesg <\0>; .even mov (sp)+,r1 rts pc xit: jsr r5,flush; obuf sys exit decml: mov r4,-(sp) jsr pc,1f mov (sp)+,r4 rts pc 1: clr r4 div $10.,r4 mov r5,-(sp) mov r4,r5 beq 1f jsr pc,1b 1: mov (sp)+,r0 add $'0,r0 jsr r5,putc; obuf rts pc mesg: movb (r5)+,r0 beq 1f jsr r5,putc; obuf br mesg 1: inc r5 bic $1,r5 rts r5 qsort: mov r2,r0 sub r1,r0 cmp r0,r3 ble done mov r5,-(sp) mov r0,r5 c 4 spe 4 thr 4 -~~~ 4A, 4B 4B and 4C sho 5 5 5 a s 5 a s 5 are 5 com 5 com 5 dir 5 lea 5 nam 5 of 5 ope 5 par 5 poi 5 poi 5 sym 5 the 5 the 5 -~~~ 5 show 6 6 6 6 app 6 dir 6 dir 6 dir 6 fil 6 may 6 poi 6 pro 6 rem 6 sig 6 sto 6 sto 6 thr 6 to 6 wit 6 -~~~ 6 show 7 7 7 all 7 and 7 dat 7 dif 7 dir 7 ent 7 exa 7 gen 7 hie 7 is 7 met 7 poi 7 pro 7 suc 7 wit 7 -~~~ d08wv_^BA.-RQ\n.Ja'mgo /X(  4 x r  *$ W 6; A@ t =59:TUlm]meae.s.ch+qdiv = 177300 ac = 177302 mq = 177304 mul = 177306 sc = 177310 sr = 177311 nor = 177312 lsh = 177314 ash = 177316 get.s.ch+/ getw/getc -- get words/characters from input file / fopen -- open a file for use by get(c|w) / / calling sequences -- / / mov $filename,r0 / jsr r5,fopen; ioptr / / on return ioptr buffer is set up or error bit is set if / file could not be opened. / / jsr r5,get(c|w)1; ioptr / / on return char/word is in r0; error bit is / set on error or end of filhhhhhIh9HIh9x))x contai contai contai contai contai contai contai contai contai contai contai contai contai contai contai contai contai contai conten conten contig contig contra conven conven conven conven coordi correc corres corres corres corres creati creati creati curren dapt t Data b data a data b data b data b data b data b data b data b data b data b data b data b data d data f data f data f data f data f data f data f data f data f data f data f data f )99ii))H9Hyyy)y name o name r name, name. named named~ namees names names names names names names names names names names names names names names names names names, names. names~ names~ name~~ name~~ name~~ naming naming naming naming naming naming neames necess necess need f needs. new us new~~~ no int no phy normal normal not a not co not co not lo not pe not pr not se not to novel novel~ now ce now ma now ma now pr number number number ~ and 26B a and 307 e and 3C il and 3C sh and 4C sh and 529. and I-num and a cou and a sep and a spe and all o and alloc and an I- and an en and anew, and anoth and any d and apart and are u and block and block and block and conta and conta and corre and data and data and data and diffi and direc and direc and direc and direc and direc and disk and each and each and each and effic and endin and erron and exten and file and file and fixed and flexi and for w and for w and freed and freed and indic inn d below. d betwee d betwee d betwee d beyond d be~~~ d bit 52 d bit wh d block d block d block. d blocks d by I-n d by a s d by all d by any d by dir d by dir d by eac d by eli d by ind d by pro d by pro d by ref d by the d by the d by the d by the d by the d by the d by the d by the d by the d by the d by the d by~~~ d by~~~ d contai d contai d contai d contai d contai d correc d corres d data b d data b d data b d data b d data f d data f d data f d data f d data f d data w d diffic d direct d dire be next be one a be one o be opene be opene be passe be prepa be provi be provi be searc be seize be self- be separ be share be share be short be store be swapp be taken be the o be the p be treat be under be under be used be used be used Because Because be used. be used. because because because because because because become l becomes becomes becomes becomes~ bed abov bed belo bed for bed for bed in m bed whic bed. Al bed. Co bed. Ea bed. Th bed. Th bed.~~~ been cha been loc beenA  u /  v "9 Qcked to cked.~~~ ckground cking th cks (I-n cks 103~ cks 231 cks 236 cks 236 cks 403, cks acco cks and cks are cks are cks are~ cks are~ cks are~ cks as n cks comp cks cont cks cont cks curr CKS FOR cks impl cks in t cks incr cks incr cks inst cks is~~ cks is~~ cks may cks of 2 cks of a cks of a cks of d cks of f cks of i cks of t cks of t cks of t cks perm cks up t cks whic cks, I-l cks, a l cks, the cks, the cks. An cks. Fi cks. Ma cks.~~~ cks.~~~ cks.~~~ cks; I-n cks~~~ 2 ckup sto ckup stok point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck shoul ck that ck the c ck the c ck the i ck usage ck withi ck, a co ck, and ck. A n ck. For ck.~~~ cked and cked and cked as cked in  if (aflg) { printf("II\n"); nbad = 0; eachi(&pass2); printf("bad: %d\ndup: %d\n", nbad, ndup); } seek(sfo, 0, 3); write(sfo, sblock, 1024); } eachi(f) int (*f)(); { static struct inode buf[16]; int i; struct inode *ip; int pass2(); inumber = 0; for (i=magic2/2; i>0; i--) { seek(sfi, (inumber+32)/16, 3); if (read(sfi,buf,512)!=512) { printf("Read error\n"); exit(); } for(ip=buf; ipw2,w ,@@ @w,w ,HC 7Hw+w +2 b -2wx2wl2 w+w +5 <5% @@ p_@0__H wj+w X+ *5W-AW-Ze W-  @w.+w +5 G G5W-0W-9@owners a owners. ows a da ows a si ows a tr ows as i ows as i ows data ows data ows in a ows the ows the ows the ows the o~~~ 2 o~~~ 3 o~~~ 3 o~~~ 4 o~~~ 5 o~~~ 5 o~~~ 6 o~~~ 6 o~~~ 8 o~~~ 9 o~~~ 9 o~~~ 9 o~~~ 10 o~~~ 10 o~~~ 11 o~~~ 11 o~~~ 12 o~~~ 14 o~~~ 16 o~~~ 17 o~~~ 18 o~~~ 20 o~~~ 20 o~~~ 21 o~~~ 21 o~~~ 21 o~~~ 21 o~~~~~ p 402 of p 404 co p 404 to p 404. p 404. p 404. p 404~~~ p 404~~~ p 406 ar p 406 co p 406, a p 406. p 406.~~ p among p bits cns ed. Mai ed. The ed. The ed. The ed. The ed. The ed. The ed. Thi ed. Thi ed. Use ed. Whe ed.~~~ ed.~~~ ed.~~~ ed.~~~ ed.~~~ ed.~~~ 1 ed.~~~ 1 ed.~~~ 1 ed.~~~ 1 ed.~~~ 1 ed.~~~ 1 ed.~~~ 2 eded for eded to eded.~~~ edetermi edetermi edetermi ediate a edicated edicated edicated edly com edly upd eds the eds the eds. It educe th educes t edures f edure~~~ ed~~~ 2 ed~~~ 2 ed~~~ 2 ed~~~ 3 ed~~~ 3 ed~~~ 3 ed~~~ 6 ed~~~ 11 ed~~~ 13 ed~~~ 18 ee and~~ ee begin ee block ee block ee blu multaneou multaneou multaneou multaneou multiprog mum file mum file~ mum of ei mum size must acce must be e must be g must be p must be t must be u must be~~ must coor must deal must firs must now must prop mutiliate my use th m~~~ 3 m~~~ 6 m~~~ 9 m~~~ 13 m~~~ 16 m~~~ 17 m~~~ 18 m~~~~~ n n n n n n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n/nas"; break; } else { passa: t = copy(argv[i]); if(getsuf(t)=='c') { clist[nc++] = t; t = setsuf(copy(t), 'o'); } if (nodup(llist, t)) llist[nl++] = t; } } if(nc==0) goto nocom; if (pflag==0) { tmp0 = copy("/tmp/ctm0a"); while((c=open(tmp0, 0))>=0) { close(c); tmp0[9]++; } while((creat(tmp0, 0400))<0) tmp0[9]++; } signal(2, &dexit); (tmp1 = copy(tmp0))[8] = '1'; (tmp2 = copy(tmp0))[8] = '2'; (tmp3 = copy(tmp0))[8] = '3'; (tmp4 = copy(tmp0)) o count o create o create o create o curren o data f o data f o data f o data f o data f o data f o data~~ o dedica o direct o direct o direct o distin o each I o end at o errors o figure o file s o file s o files o files o files o find e o find p o fix th o form a o I-list o I-node o I-node o I-numb o gives o hardwa o have I o have m o have t o have~~ o identi o incons o indepe o indica o indica o indica o indire o indire o intere o levels o levels o link t o locate o locate o locate o locate o locat Ff) T(5W-AW-Ze W-  @Ff5 ^E ZE5W-0W-9@5  AWp Ameu@Ff&E55555555555 5W-. W- W-0W-9 $;  _,*;  _,2;  6;  :;  >;  ^@e@e&@e&@e& e@;  B;  @e@e&@e&@e& eD;  5 ion poi ation sho ation sho ation to ation was ation wor ation, a ation, al ation, al ation, st ation, th ation, th ation, th ation,~~~ ation,~~~ ation. T ation. T ation. W ations fo ations to ations wi ations wi ations. ations.~~ ationship ation~~~ ation~~~ ation~~~ ation~~~ ative, a atively c atively, atively, ative~~~ atly simp atly~~~ 1 atment gi atment of atment of atment~~~ ator 234 ator 239 ator 239 ats showi attempt~~ atum givi atus and at~~~ 3 ault dire ault dire ault dire aultmain() { char c; extern fin,fout; fin = open("qwer",0); fout = creat("asdf",0666); while(c = getchar()) { if(c == ' ') putchar('\n'); else putchar(c); } flush(); exit(); } sort f01 f01 sort f11 f11 sort f21 f21 sort f31 f31 sort f41 f41 sort f51 f51 sort f61 f61 sort f71 f71 f("table adr = %o\n", table ) ; if( table == bt ) { printf("table is io buffers\n");goto ret;} if(table == ackmes){printf("table is ack\n"); goto ret ; } if(table == iot ) {printf("table is iot\n"); goto ret ; } printf( "allocb %d units from adr = %o\n", n, ba ) ; printf("area index = %d\n", table[-3] ) ; printf("cacms = %o\n", cacms) ; printf("ciotp = %o\n", ciotp) ; printf("free areas\n"); printf("in use areas\n") ; printf("rng = %d frecnt = %dt ; niucnt = toterr = rngcnt = frecnt = 0 ; tpb common.c _ char *tks 0177560 ; char *tps 0177564 ; int *tkb 0177562 ; int *tpb 0177566 ; getput.c putchar *tpb = ch[i++] ; } *tpb = c | 0200 ; extern char *tps, *tpb ; syinit.c syinit extern int *tks, *tkb, *tps, *tpb ; tpb = 0177566 ; tps common.c _ char *tks 0177560 ; char *tps 0177564 ; int *tkb 0177562 ; int *tpb 0177566 ; getput.c putchar { while( *tps >= 0 ) ; extern char *tps, *tpb ; while( tps[0] >= 0 ) ; snd wh r appara r Art r area 5 r area 5 r areas r areas r areas. r are~~~ r art FI r art ar r art fi r art fi r art ge r art me r art me r art ro r art su r art sy r art, d r art. r art. r art~~~ r as a d r a~~~ r backup r block r block r block r block. r blocks r blocks r blocks r blocks r blocks r blocks r blocks r blocks r blocks r both. r both~~ r by lin r corres r creati r data f r data f r data f r data f r data f r data f r data~~ r data~~ r defaul r defaul r descri r direct r direct r ~@AA,:up,:@0,:^AWpAAmAVCpACmÜVw`\4@AWpAAmAVw`B4@97`84@_@ _ _ _  @@A@@A@@@0,:@p$: _@e7   @ 59 @,:t [RRNJJwH<@@7 >7 5  xPb4 #  x:2*z@ wFw 4  5 5a~~~ 10 a~~~ 11 a~~~ 11 a~~~ 11 a~~~ 12 a~~~ 12 a~~~ 14 a~~~ 14 a~~~ 14 a~~~ 15 a~~~ 16 a~~~ 17 a~~~ 18 a~~~ 19 a~~~ 19 a~~~ 20 a~~~ 20 a~~~ 20 a~~~ 21 a~~~~~ a~~~~~ a~~~~~ b-~~~ 21 backs~~~ backup st backup st backup st bdirector bdirector bdirector be a full be anothe be a~~~ 1 be better be broadl be checke be comple be consid be contai be create be dedica be descri be descri be descri be erroro be exerci be functi be given be given be given be greatl ber root dir root dir root dir root dir ROOT" is ROOT.USE root dir root dir root I-n root~~~ root~~~ root~~~~ roper fo roper na roper na roperly roperly roperly ropriate ropriate ror and ror,~~~ ror. Fu ror.~~~ ror.~~~~ roronous rors in rors in rors in~ rors mus rors now rors occ rors occ rors. T ror~~~ 1 rough 14 rough 18 rough 20 rough 23 rough 24 rough 25 rough a rough al rough an rough a~ rough bu rough di rough di rough di rough th rough th rough th rough~~~ rough~~~ round routine routinepeat- edly. Another frustration was the unreliability of the hardware on which the big operating systems were supposed to run. Conse- quently the "computer utility", in the sense discussed in the middle 60's, has not arrived. It is true that the best modern computation centers now combine efficient batch service with moderately sophisticated interactive computing and with remote access by minicomputers; but the goals are less ambitious than they were in 1966, and ther 5-_06-@_06- 5-_06-@ff .8%_:6` `U%a `U%_:6(a `U5 \e@-A mDAup@ m2 f4a `U% _:6Da `U z=% W _06@ @#̰̾a    x4444444444_06W _:6 =% `_:6WuWf_4_06-><Ra `U_:6-*(ha `U_:6-5 @ 5 www   w-  _`  @ww |x r l5db@wXResign t = %d depth = %d depth = %d Illegal move Black to move White to move resignsaverestorerandrand = %d playresign firstpictinputwinputbinputprincmovenot able to back up incdepth = %d decdepth = %d removenot able to back up / mateno mate matflgmatflg = %d hint %d statd~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=d}z|y~{xwtqnkhebvspmjgdaurolifc`_\YVSPMJ^[XUROLI]ZWTQNKHGDA>;852FC@ach blo each con each dat each dat Each dir Each dir each dir each dir Each I-n Each I-n each I-n each I-n each I-n each I-n each dir Each fil each I-n each fil each I-n each ind each of each of each tim Each use each use each use each~~~ each~~~ ead and ead and ead are~ ead at a ead beyo ead by t ead cont ead from ead in u ead in, ead in,~ ead in. ead in. ead into ead into ead of t ead of~~ ead oper ead or w ead or w ead or~~ ead or~~ ead the ead" fas ead, dat ead/writ eading a eading a eading a )9))9yy))9)n multip n names n nine p n no lon n no phy n not sh n of a h n of a s n of all n of an n of dat n of dir n of fil n of I-n n of ind n of ind n of the n of the n of the n of the n of the n of the n of the n of the n of the n of the n of the n of the n of the n of the n of the n of whi n of~~~ n on dis n on sto n on the n one di n one or n one or n one us n only b n open f n open f n open f n open f n open f n open f n open f n order n order n other n out on n out on n part f n physic n physic n physicdX L!B R9p^ a \][  4 & _l)  j( f  %VU a @|+  I+^XH O S Z KK` ݯlZq? U~ Z))CF)ccG  ԯ Z dire 2 ast modi 3 at a kno 2 at a~~~ 3 at FIG. 2 at file 2 at is, t 5 at locat 2 at the b 2 at the I 2 At the o 2 at the d 4 at the~~ 32 ata bloc 66 ata file 4 ata layo 2 ata stor 3 atable b 2 atable s 4 ata~~~ 5 ata~~~ 1 3 ate dire 2 ate I-no 6 ate the 3 ated and 4 ated by 2 ated dat 2 ated I-n 2 ated for 3 ated fro 6 ated in 5 ated to 2 ated wit 2 ated, an 2 ated~~~ 2 ates tha 3 ate~~~ 1 |w       ww N N ww hw-  7 vrn h2 `\ %d@e&F %7 <5 @ @a@ @a5,@ @a7 eN ww @ N N  7ww 7 7 ww  7~z t p jwfw b@@ @wHw D>C 7&ww met r art met r art roo r art suf r art sys r art, di r art. A r art. I r art~~~ r as a da r a~~~ 9 r backup r block ( r block 2 r block i r block. r blocks r blocks r blocks r blocks r blocks r blocks r blocks r blocks, r blocks. r both. r both~~~ r by link r corresp r creatin r data fi r data fi r data fi r data fi r data fi r data fi r data~~~ r data~~~ r default r default r describ r directl r directo r directo r directo r directo r directo r directo r directo r directo r directo r direct @ @ @e=ׯ/  N f > ww  5%1 W-8@e=G@4Nf > @2Nf > @@=   bkntqr ww A ru@t5@5W- W-@5N 5W- 5 5W- Nf  Nf  Nf  Nf   w_maxply _attab _pvbuf _pvp _ispawn _isknig _isdiag _isrigh _check"rsave L2$_wattack L1<_battack rretrn _agen"@L10000V_bagen L10001^_wagen L3^_gmove"bL5_use L6L7_seek _read L8L9L11L10_move" L4L13_done"L12JL140_bmove L158_wmove _gremove"N_remove as $1.s reloc a.out 60000 mv a.out $1.o ju i< 4_ ^ 5  t i g J *   " Ny {  G1 t  07 ;   y  Q ~ ; 5> Ns ' R q lP- O x vlkL earing~~ early se ears at ears in eas 503 eas as n eas may eas not~ eas rese eas. Sy ease of eases~~~ easily a easing d easing t easons f eassigne east one eat deal eat erro eate a n eate add eated by eated by eated fi eated in eated th eated to eated, I eatedly eatedly eated~~~ eate~~~ eating a eating a eating f eation, eation. eatly si eatly~~~ eatment eatment eatment eatment~ ebugging eby made eby poin ecause a ecause d ecause d ecause i ecause m ecause o ecause s ecause t ecaution ecessarniz record 5 record 5 rect blo rect blo rect err RECT POI rect poi rect poi rect poi rect poi rect poi rect poi rect poi rect poi rect poi rect poi rect poi rect poi rect sto rectly t rectly w rectly~~ rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rect L m >@h~z  p [ 3?v d .b ; 50xj Y A .4 es creat es direc es do no es exist es expec es file es fille es for b es for c es for d es for e es for f es for f es for h es for m es for u es for w es forme es for~~ es for~~ es found es havin es havin es in I- es in a es in ac es in co es in pr es in th es in th es in th es in th es in th es indic es indic es indic es into es into es is ef es is ge es is pe es is to es is~~~ es is~~~ es it th es its p es makin es may b es may b es may b es may h es may r es must es must es must es must es musts b ctories c ctories d ctories i ctories m ctories m ctories m ctories o ctories r ctories t ctories t ctories t ctories w ctories, ctories, ctories, ctories-- ctories. ctories. ctories. ctories. ctories. ctories. ctories. ctories.~ ctories;~ ctories~~ ctories~~ ctory 101 ctory 101 ctory 101 ctory 110 ctory 110 ctory 110 ctory 110 ctory 112 ctory 112 ctory 112 ctory 112 ctory 112 ctory 112 ctory 112 ctory 112 ctory 120 ctory 120 ctory 120 ctory 303 ctory 303 ctory I-n ctory I-n ctory I-n ctory I-cke e checke e class e comple e comple e comple e comput e comput e concer e consid e consis e consis e contai e contai e contai e contai e contai e contai e contai e conten e conten e conten e conten e conten e conten e conten e conten e conten e conten e conten e conten e conven e corres e corres e corres e create e create e creati e creati e curren e curren e curren e curren e curren e curren e curren e curren e curren e curren e data a e data a e data b e data b e data b e data b e data b e data b e da/ ; syinit.c syinit char *mtcr, *dkcr, *ccsr ; dkc=dkcr= 0177404; dkcr = dkc ; dkda common.c _ int *dkc d4; int *dkwc d5; int *dkma d6; int *dkda d7; int *dker d8; int *dkds d9; dkdspy.c dkdspy case 3: *dkda = n[3] ; *dkc, *dkwc, *dkma, *dkda, *dker, *dkds ) ; extern int *dkc, *dkwc, *dkma, *dkda ; dkstat.c dkstat *dkc, *dkds, *dker, *dkda ) ; *dkc, *dkds, *dker, *dkda ) ; unit =( * dkda & 0160000 ) >> 13 ; undL83R_out L84ZL85L86L87L88L89L90L91L92L93_statc L94L95L96L97_score _algin">L98L21:_stdin L99.L100_cooin"pL102^L101lL10009L104L103L10010L105L107L108 L109L106L100112_bagen L100126_wagen L111n_check spsw,_pswtmp _respsw: mov _pswtmp,*$177776 rts pc reboot.s1+ .globl _reboot / / this routine branches into the second instruction / of the rom (read only memory) pdp bootstrap / loader. it does not read the console switches and / boots from disk. / _reboot: mov $177406,r1 jmp *$173104 / rom bootstrap loader zzzz.ss2+..globl _edata,_end .data _edata: .bss _end:  e~~~ 5 e~~~ 5 e~~~ 5 e~~~ 5 e~~~ 6 e~~~ 6 e~~~ 6 e~~~ 6 e~~~ 6 e~~~ 6 e~~~ 6 e~~~ 7 e~~~ 7 e~~~ 7 e~~~ 7 e~~~ 7 e~~~ 7 e~~~ 7 e~~~ 7 e~~~ 7 e~~~ 7 e~~~ 7 e~~~ 8 e~~~ 8 e~~~ 8 e~~~ 8 e~~~ 8 e~~~ 8 e~~~ 8 e~~~ 8 e~~~ 8 e~~~ 9 e~~~ 9 e~~~ 9 e~~~ 9 e~~~ 9 e~~~ 9 e~~~ 10 e~~~ 10 e~~~ 10 e~~~ 10 e~~~ 10 e~~~ 10 e~~~ 10 e~~~ 11 e~~~ 11 e~~~ 11 e~~~ 11 e~~~ 11 e~~~ 12 e~~~ 12 e~~~ 12 e~~~ 12 e~~~ 12 e~~~ 12 e~~~ 13 e~~~ 13n int *ackq, *ackmes, *iot ; gq(ackq) ; if(( idx = testq(ackq)) == 0 ) goto ret ; /* no items in q */ syinit.c syinit ackq = initq( &qa[ql] , ql ) ; extern int *sycroq, *ackq, *mtq, *dkq, qa[] ; allocb allb.c allocb allocb(n,bt) int bt[] ; { bfdspy.c bfdspy ba = allocb(n, table) ; ccbeg.c ccbeg if((ackp = allocb(1,ackmes) ) == 0 ) goto er1 ; commd.c commd iotp[8] = allocb( fcp[5], bt ) ; iotp[8] = allocb( fcp[5], bt ) ; fcp[3] = allocb(n,bt) ; m); v = minmax(beta, alpha, lev); remove(); if(v > alpha) { alpha = v; use(pv, m); if(alpha >= beta) break; } } lmp = p2; f1: pvp = pv; return(alpha); } double minqui(alpha, beta, lev) double alpha, beta; int lev; { double v; int m; register *pv, *p1, *p2; pv = pvp; *pvp++ = 0; m = check(); v = valuep*10 + valueb; if(v= mlev) { if(m) v =+ 1000.0; alpha = v; goto f1; } lev++; p1 = lmp; if(m 421 an 421~~~ 423 is 423 st 423.~~ 424 is 424~~~ 424~~~ 425 co 426 (F 426 co 426 of 426 of 426 of 426 of 4A and 4A sho 4A, I- 4A. A 4B and 4B sho 4C sho 4C) is 4C). 4C)~~~ 5 5 5 5 (FI 5 all 5 arr 5 con 5 dat 5 des 5 fil 5 imp 5 in 5 inv 5 or 5 thr 5 to 5 is a 5 show 5.~~~ 501 an 501 ar 501 il 501 wh 502 ac 502 is 502 of 502. 503 an 503 is 504 an 504 co 505 co 505 co 505 is 505. 506 al 506 is 506 is 506 is ble = ackmes ; if( table == ackmes ) cacms = ba ; /* update current ackmes pter */ if(table == ackmes){printf("table is ack\n"); goto ret ; } extern int *bt, bufara[], *ackmes, ackara[] ; ccbeg.c ccbeg extern int ackq, ackmes ; if((ackp = allocb(1,ackmes) ) == 0 ) goto er1 ; common.c _ int *cacms;int *ackmes; snack.c snack deallb(idx, 1, ackmes ) ; extern int *ackq, *ackmes, *iot ; while( i < ackmes[-2] ) printf(" %o",idx[i++]) ; syinit.c syinit ackmes = initb( ackaointers~ ointers~ ointers~ ointers~ ointers~ ointers~ OINTER~ ointer~~ ointer~~ ointer~~ ointer~~ ointing ointing ointing ointing ointing ointing ointing ointing~ oints to oints to oints to oint~~~ ok ahead okup.~~~ ol bit 4 ol bits olating ole is l ole of I olic fil olic fil olic nam olic nam olic nam olic nam olic nam olic nam olic nam olic nam olic nam olic nam olic nea olidatio olume 50 olume 50 olume 50 olume 50 olume ac olume an olume ar olume at olume co olume in olume of olume so olume sts illus as illus as illus as indic as just~ as listi as may s as neces as neces as neces as neede as not~~ as part As physi as physi as physi as physi as reser As seque as set f as shown as the I as the I as the I as to da as well as will as. Sys ase a us ase of f ase the ases~~~ ashion t ashion. ashion.~ ashion.~ asily an asing da asing th asion ar asons fo ass of f assed be assigned associat associat associat assumed assure t assure t assure t assure t assure t assure~~ ass~~~ ast dire ast dire  ry entry ry entry ry entry ry entry ry entry ry entry ry file ry file ry file ry file ry file ry file ry file ry file ry file ry file ry file ry file ry file ry file ry file ry file ry file ry file. ry file. ry file. ry file; ry files ry files ry files ry files ry files ry files ry files ry files ry files ry files ry files ry files ry for d ry for t ry for~~ ry havin ry I-nod ry I-nod ry I-num ry I-num ry hiera ry hiera ry hiera ry in a ry in di ry in op ry in op ry in th ry in th ry is d nt ny prior ny such ny valid nym dire nym dire nym dire nym entr nym for nym for nym is e nym is p nym, a s nym, the nym. A~ nym. Th ny~~~ 2 ny~~~ 18 ny~~~ 19 ny~~~ 19 nzero~~~ n~~~ 2 n~~~ 3 n~~~ 4 n~~~ 4 n~~~ 5 n~~~ 5 n~~~ 5 n~~~ 6 n~~~ 6 n~~~ 8 n~~~ 8 n~~~ 9 n~~~ 9 n~~~ 9 n~~~ 9 n~~~ 10 n~~~ 11 n~~~ 12 n~~~ 12 n~~~ 13 n~~~ 14 n~~~ 14 n~~~ 15 n~~~ 16 n~~~ 16 n~~~ 17 n~~~ 18 n~~~ 18 n~~~ 18 n~~~ 19 n~~~ 20 n~~~ 20 n~~~~~ n~~~~~  re data re denie re descr re detai re direc re elimi re equal re examp re files re flow re flow re flow re free. re I-nod re gener re invol re is ve re less re lose re lost re made re made re maint re marke re modif re must re must re neede re not c re not g re now c re now m re of a re of di re or pr re parti re perfo re physi re physi re physi re popul re provi re read re read re repea re requi re searc re secon re set t re sever re shoul re shoul re shown re subro re syste re takes re than access access access access access access access access access access access access access accord accord accord accoun accoun action activi actual actual additi additi additi additi addres addres adjunc admini admini admini admini admini agains all da All I- all it all mo all of all of all of all of all of all ph all po all po all~~~ along along also h also~~ altern among amy us an add an add an adj an alt an arr an ent an exa an I-n An ind  - - - - - - - - - - A A A Ad Al Al An As At At Ca Ca Ca Ca Ca Ca Ca Ca Ca Ca Ca Ca Ca Ca Ca Ca FI FI FI FI FI FI FI FI In In Lo No Ph Sy Th Th Th Th Th Wh Wh Wh Wh Wh Wo - 1 - 1 - 1 e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e each~~~ e elimina e embodim e end of e end of e entries e entry i e entry~~ e equal a e erroron e errors e errors. e example e excepti e exercis e extensi e file A. e file an e file as e file at e file da e file da e file fo e file in e file in e file in e  the va the vo the vo the vo their their themse themse themse themse then m There thereb theref theref These these they c they d they h they h they r The~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ This l the~~~ the~~~ the~~~ This a this a this f This g This i This l this l This r this p This~~ this~~ those those throug throug throug throug  in the d in the d in the d in the d in the d in the d in the d in the d in usi d in, an d in,~~~ d in. T d in. T d indexi d indica d indice d indire d into b d into~~ d into~~ d in~~~ d in~~~~ d is inc d is pro d is the d its I- d its I- d its co d its I- d known d length d length d length d length d level d locati d locati d lost f d mainta d mainte d makes d manipu d many o d match d may~~~ d may~~~ d method d more~~ d name, d nonown d not a d obtain d of acc d of dir d of fil d of fil d of the d/ putw/putc -- write words/characters on output file / / fcreat -- create an output file for use by put(w|c) / / calling sequences -- / / mov $filename,r0 / jsr r5,fcreat; ioptr / / on return ioptr is set up for use by put or error / bit is set if file could not be created. / / mov(b) thing,r0 / jsr r5,put(w|c)1; ioptr / / the character or word is written out. / / jsr r5,flush; ioptr / / the buffer is fled. / .globl putc, putw, flush, fcreat fcreat: mov r1,-(sp) mov (r5)+,r1 mov r0,0f sys c cmp r0,$1 beq phigh / here return same priority jmp ret phigh: mov _reg+12.,r0 / get old stack pter add $2,r0 / get psw word mov (r0),r1 bic $!0340,r1 / have old priority mov r1,_pswold bis $0340,(r0) / set psw priority high ret: jsr pc,resreg / restore regs mov _reg+12.,sp / set stack rti / interrupt return / / / internal sub to store regs ( not sp ) streg: mov r0,_reg mov $_reg+2,r0 /* C command */ char *tmp0; char *tmp1; char *tmp2; char *tmp3; char *tmp4; char ts[1000]; char *tsp ts; char *av[50]; char *clist[50]; char *llist[50]; int instring; int pflag; int cflag; int *ibuf; int *ibuf1; int *ibuf2; int *obuf; char *lp; char *line; int lineno; int exfail; struct symtab ( char name[8]; char *value; ) *symtab; int symsiz 200; struct symtab *defloc; struct symtab *incloc; char *stringbuf; char *pass0 "/lib/c0"; char *pass1 "/lib/c1"; char *assem "/bin/as"; char *pref "/lib/crt0.o";  21 lo 21 ma 21 ma 21 ph 21 st 21 su 21 to 210 de 210 is 210 to 210. 211 to 211. 212 wh 21A th 23 are 24 thr 256 wo 25B ar 26A an 26B ar 2A is~ 2A sho 2A, 2B 2B, 2C 2C sho 3 3 3 and 3 det 3 dir 3 dir 3 dir 3 dir 3 dis 3 fou 3 if 3 loc 3 of 3 pse 3 spe 3 sys 3 the 3 whi 3 -~~~ 3A, 3B 3B and 3C sho 4 4 4 4 ana 4 Det 4 app 4 con 4 fil 4 gua 4 I-l 4 los 4 pos 4 pri 4 pro 4 ret 4 spe IYxYYY99YYI(I8Xh9_fault _xlev le. a file. a file. a file. a file. a file. a files a a files a a files a a files b a files f a files s a files t a files, a files, a files. a files. a files. a files. a files. a files. a files.~ a files.~ a files;~ a file~~~ a file~~~ a file~~~ a file~~~ a file~~~ a first u a first u a first~~ a flag in a form of a full pa a full pa a hierarc a hierarc a in mult a is then a known a a known p a known s a large n a large~~ a layout a layout a layout a layout a lengthy a link ma a link FIG. FIG. FIG. FIG. FIG. FIG. FIG. FIG. File File ended entry entry erron examp expec FIG. FIG. FIG. FIGS. file file file file file file file file file, files files Fixed Fixed For e For~~ Free Free Free Gener first first flagg for r found given givin I-nod I-nod I-nod I-nod I-nod I-num If th If th hiera hiera I-lis I-lis I-lis I-lis I-nod I-nod I-nod I-nod grams wh grams wh grams wh grams wh grams wh grams, s grams, t grams~~~ grams~~~ grams~~~ grams~~~ grams~~~ gram~~~ great de greatly greatly~ gree of grity ch grity of grity of grity of ground GS. 15A GS. 19A GS. 1A, GS. 1A, GS. 21A GS. 24 t GS. 26A GS. 2A, GS. 3A, GS. 4A, GS. 7 th GS.~~~ gs are~~ GS. 7~~~ gth data gth I-no gth I-no gth inpu gth of t gth, and gthy pro gth~~~ guarded guish be guish ov guous ar guous li gures, F g~~~ 2 g~~~ 3 g~~~ 3 g~~~ 4 g~~~ 4 g~~~ 5 g~~~ 6  - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 3 - 3 - 3 A d A p A s Adm Alt Alt An As At At Can Can Can Can Can Can Can Can Can Can Can Can Can Can Can Can FIG FIG FIG FIG FIG FIG FIG FIG In Inf Loc No Phy Sys The The The The The Whe Whe Whe Whe Whe Wor  6 iles an 6 ditiona 7 ention 7 set to 6 ted in 6 on poin 6 ile sys 6 dificat 7 entific 7 read i 6 ted by 6 odifica 6 ile siz 6 de~~~ 1 7 ent of 7 point 6 t of th 6 ode map 6 icular 6 depende 7 enerall 7 other 6 t locat 6 o the I 6 hown in 6 default 7 ed~~~ 7 of ind 6 t inven 6 o that 6 hich ma 6 de map 7 ed from 7 necess 6 s~~~ 15 6 o physi 6 he~~~ 2 6 ddition 7 ectory. 7 name o 6 s~~~ 11 6 o data ied, thu ief ield of ield. T ient for ient in ient mai ient ot ient ref ient, fo iented f iented f ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarchy ierarchy ierarchy ierarchy ies (lin ies 102 ies 113 ies 204 ies 306 ies 528 ies a ma ies also ies and ies and ies and ies appe ies are ies are ies are ies are ies are ies are ies are  ies are ies are~ ies as w ies by t ies comp ies cont ies cont ies do n ies havi ies havi ies in p ies indi ies indi ies indi ies is t ies maki ies may ies must ies must ies of~~ ies poin ies poin ies refe ies to a ies to b ies to f ies to~~ ies whic ies, but ies, use ies, whi ies-- to ies. As ies. At ies. Fo ies. I- ies. On ies. Su ies. Th ies. Th ies.~~~ ies.~~~ ies.~~~ ies;~~~ ies~~~ ies~~~ ies~~~ 1 ies~~~ 1 ieval by ieval, d ieve the ieving v iew of t iew take if I-nod If the r If the~ single single single size, so nam so tha so tha so tha so tha some d some r so~~~ space specia specia specia specia specia specia specia specia specia specia spectr starti starti STORAG starti storag storag storag storag storag storag storag storag storag storag storag storag storag storag storag storag storag storag storag storag storag storag storag storag storag storag stored stored stored stored stored stored stored stored stored stored bheur.obook.obplay.odata.odraw.oinit.oinput.omater.oplay.oprinc.osavres.oscore.ostat.ostdin.owheur.owplay.ol.outzatt.oybgen.oxbmove.owctrl.ovqsort.ouwgen.otwmove.oa.outl.outa.outirec ot disti ot gener ot I-nod ot inter OT" is a OT.USER1 ot lost ot permi ot pract ot provi ot set i ot shown ot stric ot to lo otal dir otal num oth entr oth. Ne other di other di other di other er other fa other fi other mi other op other se other us other us other. other. other~~~ other~~~ oth~~~ ot~~~ 2 ot~~~ 3 ot~~~ 5 ot~~~~~ ouble ar ouble ch ough 14B ough 18 ough 20 ough 23 ough 24 ough 25B ough a n ough all ough any ough a~~ ough buf ough dir ough dir ough dir ough not ough the ougical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physicall physical~ physical~ physical~ physical~ physical~ physical~ physical~ pical of pid acces pid acces pid index ping trac place, th placed in placed in placing i ple an ; #b wQp I )IxI 9)IIIr_wplay L47L48,L494L50L51:L52_draw L53@L54_input L55FL56L57NL58L59VL60_princ L61\L62ZL63>L64bL10007NL10008RL65xL66|L67|L68L69L70L71L72L73L74L75L76L77L78L79L80_putchar L81L82 _"e u@ 03";5m@;5 @x< _"e u@ 03";5m@;5@< :e  L= @m; e5  @;4< 5 @;4< ww . !  !  !  J& "C>9 !  !  !  J& u@Juw-~$eN , !  =% e}cacms = %o\n", cacms) ; extern int *iot, iotta[], *ciotp, ef[], *cacms ; ccdspy.c ccdspy extern int selmes[], fct[], *ccs, *cco, *cci, *cacms, ef[] ; common.c _ int *cacms;int *ackmes; ccbeg ccbeg.c ccbeg ccbeg(mess,len,iotp) int mess[] ; { ccdspy.c ccdspy flag = ccbeg(mess,6,iotp) ; ccih.c ccih ccbeg(outmes, 6, 0 ) ; commd.c commd ccbeg( ac, 6, 0 ) ; ccbeg( ac, 6, 0 ) ; ccbeg( ac, 6, 0 ) ; dkih.c dkih ackqed = ccbeg( ac, 6, ac[6] ) ; mtih.c mtih ackqed = ccbeg(a2,bfr+2(r1) blo 2b 3: mov r0,ptr(r1) mov (sp)+,r2 rts pc 1: mov ptr(r1),r0 sub bfr(r1),r0 mov r0,9f mov bfr(r1),0f mov f(r1),r0 sys write; 0:..; 9:.. mov bfr(r1),ptr(r1) rts pc / tab: .byte 16,16,16,16,16,16,16,16 .byte 16,16,16,16,16,16,16,16 .byte 16,16,16,16,16,16,16,16 .byte 16,16,16,16,16,16,16,16 .byte 14,16,16,16,16,16,16,16 .byte 16,16,16,16,16,16,16,16 .byte 16,16,16,16,16,16,16,16 .byte 16,16,16,16,16,16,16,16 .byte 16, 0, 0, 0, 0, 2, 2, 4 .byte 4, 4, 4, 4, 6, 6, 6,10 .bytees a sim es acces es all p es also es among es an in es and a es and d es and d es and d es and I es and e es and e es and f es and i es and s es and t es and t es and~~ es appea es appea es are a es are a es are a es are a es are c es are f es are i es are m es are n es are n es are p es are p es are p es are r es are s es are s es are t es are t es are~~ es are~~ es as ac es as we es at a es becom es begin es begin es by na es by sy es by th es by th es by~~~ es by~~~ es compl es conta es conta es conta locati locati locati locati locati locati locati locati locati locati locati locati locati locati longer made a made a made i made~~ made~~ mainte mainte mainte makes manner manner manner manner map 40 map 40 map 40 map 40 map 40 map 40 map 40 map 40 map 40 map bi map bi marked marked marked marked maximu maximu maximu maximu may ac may ac may al may be may be may be may be may be may be may ha may in may re may si may th memory memory memory  Nf f Z%@ 5 7r5` @ 5 7r5 ww @  5@  @5T fn %N@e&X %5 u-9 N@ @a& 4 N@ @a& 4 N@ @a& 4 N@ @a& 4 ww A 7r@m5W-NE @tE ww @@  | @ W- W-@e w2 . . /dev/vt0cannot open c1 common.c_ c1; c2; c3; c1 common.c_ char *mtcr m2; char *dkcr d4; char *ccsr c1; c1 common.c_ int *ccs c1; int *cco c2; int *cci c3; c1 dspydr.cmain ccs = ccsr = &c1 ; c1 dspydr.cmain extern c1,c2,c3,d1,d2,d3; c1 syinit.csyinit ccs = ccsr = &c1 ; c1 syinit.csyinit extern c1, c2, c3, d1, d2, d3 ; c2 common.c_ c1; c2; c3; c2 common.c_ int *ccs c1; int *cco c2; int *cci c3; c2 dspydr.cmain cco = &c2 ; c2 dspydr.cmain extern c1,c2,c3,d1,d2,d3; c2 syinit.csyinit  system system system system system system system system taken~ techni termed than a than o that a that a that b that f that f that i that i that s that t that t that t that w the the the the the the __ the ac the ad the ad the ar the bl the bl the cl the co the co the co the co the da the da the da the da the da the da the de the di the di the di the di The fi the em The fi The fi the fi the fi the fi the fi the fi the fi the fi  ng dicating dicating dicating dicating dicating~ dicating~ dication, dicator 2 dicator 2 dicator 2 dices int different different different different different different different difficult difficult dificatio dificatio dificatio dificatio dificatio dificatio dified, c dified, t digital c digital c diment diment of diment, a dinate ac ding a da ding an a ding and ding and ding and ding an~~ ding a~~~ ding bit ding bit ding bloc ding disk ding file ding in a ding its ding on t ding or w ding or w ding or w ding othe ding pseu ding succ ding the~ ding thro ding to a ding to p ding to t ding to t ding to t ding to t ding to t ding to~~ ding~~~ ding~~~ 1 ding~~~~~ direct bl direct bl direct po direct po direct po direct po direct po direct po direct po direct po direct po direct po direct po direct po direct st directly directly directly~ directori directori directori directori directori directori directori directori directori directori directori directori directori directori directori directori g. D ring. I Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- ring; an ring~~~ ring~~~ ring~~~ riodical riods fo rior Art rior art rior art rior art rior art rior art rior art rior art rior art rior art rior art rior art rior art rior art rior art rious pr rious se ription ription ription rise in rises.~~ Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- rising a rising a rising t ristics RiFor file for file for file for file for gene for havi for in p for in t for in~~ for keep for late for main for mani for mani for phys for prov for rapi for read for read for sear for some for symb For the for the for the for the for the for the for the for the for the for thes for the~ for this for thos for use for use for use for user for user for usin for whic for writ for writ for writ for. An fore eli fore los fore, fi fore, re fore, th fore. T form as form a~~ form in form in~ form of ng l naming~ l not be l now be~ l number l of indi l of indi l of the l of the l of the l of the l of the l of the l of the l of the~ l of the~ l of the~ l of the~ l order o l path na l path na l path na l path na l path na l path na l physica l physica l physica l pointin l possibl l primari l provisi l purpose l purpose l reading l set of l storage l storage l storage l storage l storage l system l the num l times. l to have l treatme l unalloc l user da l user re l with a l with an l with n  11 th 12 12 12 12 12 co 12 in 12 of 12 op 12 pe 12 pr 12 st 12 sy 12 Th 12 th 12 th 12 us 12 Wh 13 ar 13 bl 13 by 13 FI 13 co 13 FI 13 fi 13 hi 13 is 13 la 13 ob 13 re 13 Th 13 st 13 sy 13 to 13 wi 14 14 14 14 "A 14 al 14 al 14 an 14 ar 14 bl 14 bl 14 bl 14 fi 14 nu 14 Th 14 se 14 th 14 wr 15 15 be 15 bu 15 cu 15 de 15 en 15 fi 15 fl 15 fo 15 mu 15 nu 15 po  1 I-n 1 dir 1 I-n 1 in 1 int 1 loc 1 sto 1 tha 1 the 1 tra 1 tra 1 in F 1, and 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1. FI 1. To 10 10 10 "R 10 8 10 at 10 br 10 de 10 I- 10 di 10 du 10 I- 10 is 10 no 10 nu 10 si 10 th 10 wi 11 11 "d 11 ac 11 an 11 co 11 De 11 di 11 ea 11 fi 11 fi 11 li 11 nu 11 of 11 on 11 sh 11 st 10 r~~~ 11 r~~~ 11 r~~~ 11 r~~~ 12 r~~~ 13 r~~~ 13 r~~~ 13 r~~~ 14 r~~~ 16 r~~~ 16 r~~~ 17 r~~~ 17 r~~~ 18 r~~~ 18 r~~~ 18 r~~~ 19 r~~~ 19 r~~~ 20 r~~~ 20 r~~~ 20 r~~~~~    7 32  xV>JJX  3 7 v_ 0\h V2\ PqP7B ~E4> p;E&7 E x >  |7 |7 :  Z7 P7 e 7  77777 s x j7 <X7 <F3 IyYi L24L25L26ge vo orage wh orage wh orage,~~ orage. orage. orage. orage.~~ orage.~~ orage;~~ ORAGE~~~ orage~~~ orage~~~ orating~ ord 405 ord 407 ord 421~ ord 423 ord 424 ord 424~ ord 425 ord 426 ord 524, ord 524~ ord bloc ord data ord I-no ord phys order of order to order to order~~~ ordinate ording t ording t ording t ording t ords are ords in ords on ords per ords use ords whi ords.~~~ ords~~~ ore comp ore data ore deta ore elim ore lose ore phys ore phys ore seco ore than ore than ore than ore usef org thro 5 he buff 5 e buffe 6 that i 5 ~ 4 5 set of 5 ng the~ 5 he__ 5 e and~~ 6 same f 5 ystems 5 service 5 ndling 5 haring 5 e alloc 6 return 5 ystem i 5 ser.~~~ 5 nding t 5 handlin 5 e___ 6 proper 5 written 5 s. The 5 ndex in 5 h conta 5 ding an 6 possib 5 with~~~ 5 s to re 5 name~~~ 5 grams~~ 5 diagram 6 path n 5 w chart 5 s to fi 5 name "A 5 grams a 5 de~~~ 6 or wri 5 ust be 5 s to da 5 n)Ixyyxxxxxxx9)9I 9IHH Y 2 cess is 12 cess to 3 cessary 2 cessible 2 cetera. 2 ch block 2 ch check 5 ch conta 2 ch data 6 ch direc 2 ch file 2 ch have 2 ch I-nod 6 ch I-nod 2 ch is pe 2 ch is se 4 ch is~~~ 2 ch may b 3 ch of th 2 ch throu 2 ch user 3 ch will 6 chal dir 6 chal fil 6 chal nam 3 chal~~~ 2 changed 2 characte 3 charts s 2 check is 4 check th 5 checked 2 ched in 39 chie-Tho 2 ch~~~ 10 2 ch~~~ 12 2 ciaes must nes whic nes whic nes. As nes.~~~ new data new data new entr new file new file new file new name new user new, sim Newly cr new~~~ next rea ne~~~ 8 ne~~~ 16 ne~~~ 17 nformati nformati nformati nformati nformati nformati nformati nformati nformati nfrequen ng ng a bul ng a dat ng a fal ng a new ng a new ng a non ng a rea ng a sec ng a sma ng a sym ng a wri ng acces ng an ad ng an I- ng an un ng and d ng and f ng and f ng and m ng and t ng and w ng an~~~ ng as sh ng at an ng at an ng a~~~ d with ned with ned with ned with ned, tha ned, the ned,~~~ ned. Th ned. Th ned. Wh ned.~~~ need be need for need for needed f needed t needed.~ needs. nefficie nefit fr nent mod neous ac neous ac neous fi neous st neously neously neously neously neous~~~ ner as a ner iden ner iden ner iden ner prev ner whic neral an neral hi neral hi neral pu neral pu nerally nerally nerally nerally nerally nerally nerally~ ners and ners. W ner~~~ 1 nes for nes for nes for nes for~ nes is g nes may n is~~~ is~~~ is~~~ is~~~~ it app It is it is it is its I- its da its ps its ps itself itself known known known large large large last d layout layout leads leads leads length length less s less~~ level, levels levels levels levels limits linear linkin linkin linkin linkin linkin linkin list ( list ( list ( list i list) list;~ listin locate locate locate locate locate locate locate locate locate locati locati locati locati locati  locati locati logica lookup lose d lose m lost d lost d lost f lost, lost. made i made l made m made m Mainte mainta mainta Mainte Mainte Mainte Mainte mainte mainte mainte mainte mainte mainte mainte mainte mainte mainte mainte mainte mainte mainte mainte make i making manipu manipu manipu manipu many f many o many o many o Many p match matche may be may be may be may be may be may be may be may be may be may be may be may be may be may be   with write writt writt "1" is "A" is "A" is "A" is "A", f "A"~~~ "A.1" "A.1" "curre "defau "free" "full "ROOT" "ROOT. "simpl "USER1 (FIG. (FIG. (FIG. (I-num + 1 in - 17 - - 18 - - 19 - - 20 - - 21 - - 22 - - 23 - - 24 - - 25 - - 26 - - 27 - - 28 - - 29 - - 30 - - 31 - - 32 - -~~~~~ -~~~~~ -~~~~~ -~~~~~ -~~~~~ -~~~~~ -~~~~~ -~~~~~ -~~~~~ -~~~~~ -~~~~~ -~~~~~ -~~~~~ -~~~~~ -~~~~~ -~~~~~ 0 and 0 and 1 an 1 are 1 arr 1 bel 1 dat irect~~ ndividual ndividual ndled by ndling an ndling di ndling is ndling of ndling pr nds at th nds on th nds to fi nds to re nd~~~ 2 nd~~~ 4 nd~~~ 7 nd~~~ 7 nd~~~ 8 nd~~~ 8 nd~~~ 9 nd~~~ 10 nd~~~ 11 nd~~~ 13 nd~~~ 15 nd~~~ 15 nd~~~ 16 nd~~~ 17 nd~~~ 17 nd~~~ 19 nd~~~ 20 nd~~~ 21 nd~~~ 21 ne and on ne anothe ne bit pe ne bit pe ne blocks ne direct ne for ma ne indica ne input/ ne of the ne or mor ne or mor ne or mor ne or mor ne physic ne physic ne point~ ne such b ne the lo ne u sin ated the ated to ated to ated to ated to ated to ated wit ated wit ated, an ated, an ated, I- ated,~~~ ated. A ated. M ated. T ated.~~~ atedly c atedly u ated~~~ ated~~~ ately by ately in ately op ately~~~ ater des ater~~~ ates a s ates tha ates tha ates the ates to ates~~~ ate~~~ ate~~~ 1 ate~~~ 1 ate~~~ 1 ate~~~~~ ath name ath name ath name ath name ath name ath name atical f atical f atical i atical i atically ating a ating a ating a ating an ating an ating an ating de ating fi atil open fil open fil open fil open fil open fil open fil open fil open fil open the open the open the opened a opened a opened f opened, opened. oper for oper nam oper nam operate operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatio operatio operatio operatan while(( i<=(len-1) ) &&( ccs[0] < 0 ) ) *cco = mess[i++] ; cco common.c_ int *ccs c1; int *cco c2; int *cci c3; cco dspydr.cmain cco = 0167772 ; cco dspydr.cmain cco = &c2 ; cco dspydr.cmain extern int *ccs, *cco, *cci ; cco syinit.csyinit cco = &c2 ; cco syinit.csyinit cco = 0167772 ; cco syinit.csyinit extern int *ccs, *cco, *cci ; ccs ccdspy.cccdspy case 0: *ccs = n[0] ; ccs ccdspy.cccdspy /*diag*/printf("(at %o)", Y_ccbeg"rsave L2"L3_printf L4_ackq _testq L5L6._ackmes _allocb L7L8L9TL10~_pq _cctran L1L11 _fatal rretrn  n physic n physic n physic n physic n point n pointe n pointe n pointe n pointe n pointe n pointe n positi n princi n prior n proper n proper n provid n provid n put in n readin n realit n referr n relate n same d n sequen n served n set to n should n shown n some r n starti n storag n system n system n Table n tabula n termed n that f n that v n the ab n the ac n the ar n the bu n the bu n the bu n the co n the co n the cu n the cu n the de n the di n the di n the di n the em n the I- n the I- n the Iated by 4 cated in 4 cated to 3 cates th 2 cate~~~ 2 cating a 7 cating t 2 cating~~ 7 cation 4 10 cation 5 2 cation b 2 cation i 7 cation o 6 cation p 2 cation, 2 cation,~ 3 cations 3 cation~~ 3 cator 23 2 cause di 2 ccess I- 13 ccess to 2 ccess. 2 ccessibl 2 ccomplis 4 ccording 2 ccount f 4 ccurring 3 ce acces 11 ce progr 3 ce to th 2 ceeds th 2 cellaneo 6 cerned w 2 ces for 2 ces may 2 cess I-n e vari ore, fil ore, rea ore, sin ore, the ore. Th ored acc ored at ored at ored at ored at ored beg ored dat ored fil ored in ored in ored in ored in ored in ored on ored on ored on ored. I ored. T ored~~~ ore~~~ ore~~~ ore~~~ ore~~~ 1 oriented oriented ories 20 ories 30 ories al ories an ories an ories an ories ap ories ar ories ar ories ar ories ar ories ar ories ar ories ar ories as ories by ories co ories do ories in ories ma ories ma ories mu ories of ories re ories to ories to oe capac ile conta ile conte ile creat ile data ile data ile data ile data ile data ile data, ile data, ile entri ile forma ile formi ile handl ile has b ile havin ile havin ile in a~ ile in th ile indic ile indic ile indic ile into ile is as ile is de ile is ex ile is ex ile is fi ile is fo ile is op ile is op ile is pr ile is re ile is re ile is se ile is so ile is~~~ ile itsel ile list ile list ile list ile list ile list ile list ile list ile list ile list ile list ile list~ ile list~ ile write, o zero th o zero, t o zero~~~ o, a seco o, thereb o. There o. N + 1 oadly dis oblem of obtained obtains t obtains t obtain~~~ ocatable ocatable ocatable ocatable ocatable ocate I-n ocate I-n ocate roo ocate the ocated I- ocated an ocated an ocated an ocated ar ocated bi ocated da ocated fo ocated fr ocated in ocated in ocated to ocated wi ocated, a ocated,~~ ocated. ocated~~~ ocate~~~ ocating a ocating i ocating t ocating t ocation 4 ocation 4 ocation 4 ocation 4 ocation 4 ocation 5 ocat! "W N   @ &   / e&7 J  j De Ԥ!@eW  8m RW et ZEWue T!eB >5 &     7= ߋpF@E A Ze      @7@ eE "   r t@P ljɋU)$ !                      c cpWm 8m 8oXYZ[\]^_m  `m k Lgjm  rmpsvbehkm   nqtwx{~m  m k #m  Um  m  5m  Em ,m ;,m p _m Z $m 8 m * m    m    m   ,m l  -036"%m   (+.1478m  ';>Am  JDGJM9m  <?Bm  }Em t Hm X 8\m < orm 5P f2um  8 @.m l jm m . m  m  ?m  u m  m 8m  m m m V Nm  &m   m  m  m  D m  ` m  m  "%m  pm 8m A #m S  &m P m G m  5m  @m  yPm  q^m  m  m   m  6"m  m  m } m n m  Zm k m 8m !;m M!m   m 4P m , H봁m 5P im 5m y4 m 5P  m 5m |4m 5P m   $'m 8m a"R*m " -m |"  ),/03m 8m N!069m 8m <?Bm 8m E147m 8m 6:k  D}=@CFm  D258;m  D>m  D"ADGHKm  CmNm " Qm " Tm " :Wm  Zm   ]ILORUm  C~X[^JMm  9PSm  9VY\m  9_`m  9"cm k  9nm g  9qtwxm E  9{~m 9  9m "  9\}m " [ m   9[m   9m   9m   9 m   8& m  8m " m  8m  8Dm  8m  8^m  8m  8m  8m n"  #m  8m  8Dm v 8J-m Yk  m = 8m 9 8  m . 7m * 7m  7Q,m  7%m " (m  7M9<m  7 ?BEHKN:m  7=m " @m  7n\m  7Rm  7wzm " }m " im  7lom 4P rm " um r 7xm ] 7m Q 74m D 7m 4P m 9 7Pm 8 UKm , 7.m  6 m  6m  63m  6m  6@m  6m  6;m  6m 8m }m 8m "T,m  㴑m  & m     m  m z <m \k  q%m l  ;>*-03m I @6m 8m 9<?@m < Cm (l Mm ! oYPm ! o0Sm ! oVm ! o"Bm ! o`EHm K ôkKm ! oNQTWm ~! oXm |! o[m z! o^m w! oadm u! oOgm ! ojm a ômm s! o#Ym q! o,\_bm ! oIehm o! o knZm m! oL]m k! o`m i! ocfilom g! npm d! nsm ! nvm b! nzy|m `! nm ^! n qm \! ntm Z! nCwzm ! n}m X! n,m m" m V! nrm P! num T! nxm R! nL{m .! b/~m +! bm )! bym '! bm %! bm #! bLm Z ô9m ! b0m ! bm ! b]m E! bm ! bm ! bzm ! bm ! bm ! am ! aAm ! am ! atm ! am  am ! am ! am ! am ?! am  am 6! am  am  am  am  am  am  am  am  a m 1! am  a{ m k m  aim  `Gm  Em  Em  Em  Em 8m #Tm  D"m  Dm  D(m  D>m  D m  Dm  Dm  8m  Dm l m  DLm  D9   m  Dm  D m  D m  Dm  DBm k z괁Z!$'*m k ~괁-m l lm  "%(m k , +. m k 1괁P#&),m k 6괁/0m k :괁369m k ?광<m k D괁M258m k G괁;>m k K괁 ADGHKNm k PQm 8m Tm k n촁WZm k r촁]m k 괁ILOm k RUX[m k 괁p ^JMPSVm k 괁3Y\m m _m k v촁7`cfim k 鴁lorm k 鴁uadm k 鴁ygjmm k 鴁psm k 鴁wvm k 鴁bem k 괁hm k z촁C knqtwm  )x{~k k 촁 y|m D,m  m   zm 8m }m 8m m 8m Rm k m 8m 'm 8m @m 8m m 8m m 8m @m 8m   m 8m  m O  m  )m = 賴jm k m . Q m  m 5P ]m =  m  ( <m ! {Jm "m um !k (ﴑ m !k %ﴁ m !k ﴑm !k ﴑm !k ﴁd  m !k ﴑDm !k ﴁ /25!$'m  ( *-036"m !k ﴑv%m !k ﴑ$Am !k ﴑc1Om !k 0km !k 9m !k m 7" zm +" zSm $" z m " z m " z5 m " zm ! zfm 4" z m ! zV m h4P m 5P  m k4P m | 7zm 5P m 8m /5m ^4P  m m m 8m \m > m ! p[m ! p$ m y  m ! pm ! pm ! pm k H촁m k M촁m k P촁m k a촁m k W촁"m k R촁%m yk 9촁m wk 5촁7m uk 0촁cm pk )촁!m kk #촁' m hk 촁#m _k 촁&m ]k 촁6m [k m Yk 봁m k B촁m bk 촁m k \촁!m Uk 봁$m Sk 봁'(+.1m k 봁F47:=m J P)m 5P ,m fk 촁/m ak 촁2m rk -I5m p" 8;>*-m 4m 40m k j촁N3m dk 촁6m r" 9m {k <촁K<m k ?m Wk 봁@m k >촁Cm mk &촁8Fm Mk ~봁uIm Ck k봁LORm *k 5봁UADm ,k =봁Gm .k AOJMm 0k E봁Pm 2k I봁!SVBm 4k N봁&EHKm 6k R봁7NQm :k Z봁!Tm 8k V봁WXm >k b봁o[m <k _봁D ^adgjmm @k g봁]Ym `"m \m Ek n봁_m Gk r봁bem Hk w봁hm 'k 0봁bknZm Jk {봁]`m "k )cfm "k 봁ilopsm "k 봁vym !k 봁|qm !k 봁' twz}m !k 괁 rux{~m !k 괁m k 괁m k 괁m t" #m k 괁m k 괁[m k 괁m k 괁xm k 괁m k 광 m k m k 괁m k 괁<m k 괁lm k 괁m k 괁m k 괁m g"  m k 괁m k 괁m k 괁 m k 괁m k 괁m k m 8m #m i" m k hMm k 괁Gm m m k m괁m k q괁xm k vem k 贁m 4P rm k" m k 촁)m k 촁m k m k 촁m k ,m m 4m k 촁nm k 촑,m b ôm 8 Tm 8m bm k m 5P tm k 촁Gm k m  vm k 贁< m # p m /# r m |m  m 4P  ' m # 2( m # / m #m 0 3 6 9 < ? B E m K# +1 m " K m R# ^ m ?#  J m D# M m 8m I#P m 8m # S m xl Po m "  v m ;# %b m |#  z } m 3#   m l  m "  % m l : m +#m +# ^- m l   m tl _ m (#     m Ul  $! m l  4 m l   m l o# m 3 & m 8m ,# H) m l   2= m ;l  f.^ m Wl  > y |  m ml   m l < m "  m "  m 4P  m 5m 4. m b#  m ^  m c"  m   m d"  m k  m k 봁 m k 봁 m k 봁 m k 봁U k k 봁f k k 봁 k k 봁 m k e촁 m k J촁% m  b m  w m   m a " m .  m  | m  / m # U m  }   m  < m  + m     m |     m u      " % m l  m e  m \ 4 m W   # & m N  m I  m D  m >   m 7 ! m ( $ ' ( + m  g. m  Y1 4 m  7 m  f: m  v= m  ) , m  / m  y2 5 8 m +#m ; m 5P Y> * - m k 촁N 0 3 6 9 < m k |? m M ôD m 4P 9G J M m !m V P S V B E H ) 1P K m m ?N Q T W X [ ^ a m k 贁dd g m k 贁8 j m Y \ _ b e m k 贁h m k 贁k m   9n Z ] ` c f i l m m <o p s m k 贁v y |  m k 贁 q t m k 贁w m # z m # Q} m #  m # a m #  m # r m # :u x { m " x~ m "  m "  m "  m " 5 m "  m " I m "  m "  m "  m " | m "  m " , m "  m " ^ m " d m " 0 m "  m " < m " P m " 0 m k 贑1 m k 贁 m k 贁 m k 贁3 m k  m k 贁f m c"  m 8m y" m R  9 m  洁 m k 贁 m k 贁 m m   m x"m  m k   m l ...es1ds2cs3bs4Atmgm6_s7[fortyaccsno,cratiolibcrefmdec9assallocLs5Vrunsysx#define PLOT 006 /* ack */ #define BEL 007 /* exit plot mode */ #define ESC 033 /* escape */ #define HFWD '9' #define HREV '8' #define FREV '7' #define SO 016 /* shift out - enter greek */ #define SI 017 /* shift in */ #define UP 013 #define DN 012 #define RT ' ' #define LF '\b' int restore(); int svmode, mode[3]; main(argc,argv) int argc; char **argv; { int c, textmode; extern int fin,fout; fin = dup(0); fout = dup(1); if ((signal(2, 1) & 01) == 0) signal(2, &restore); gtty(1, mode); svmode = mode[2]; mode[2] =& 0777757; /* turn off cr-lf */ mode[2] =| 03; /* turn off delays, tabs */ stty(1, mode); textmode = 1; while( (c=getchar()) != '\0' ){ if( c==SO ){ special(); continue; } if (c== PLOT) textmode = 1-textmode; if (c==BEL) textmode = 1; if( c=='\n' && textmode ) putchar(015); /* CR */ if( c!=ESC ){ putchar(c); continue; } putchar(PLOT); c = getchar(); if( c == HREV ) nplot(4,UP); else if( c == HFWD ) nplot(4,DN); else if( c == FREV )  nplot(8,UP); putchar(PLOT); } flush(); restore(); } restore(){ mode[2] = svmode; stty(1, mode); exit(); } int tab[]{ 'A', /* alpha */ 'B', /* beta */ 'D', /* delta */ 'W', /* DELTA */ 'S', /* epsilon */ 'N', /* eta */ '\\', /* gamma */ 'G', /* GAMMA */ 'o', /* infinity - not in M37 */ '^', /* integral */ 'L', /* lambda */ 'E', /* LAMBDA */ 'M', /* mu */ '[', /* nabla (del) */ '_', /* not */ '@', /* nu */ 'C', /* omega */ 'Z', /* OMEGA */ ']', /* partial */ 'U', /* phi */ 'F', /* PHI */ 'V', /* psi */ 'H', /* PSI */ 'J', /* pi */ 'P', /* PI */ 'K', /* rho */ 'Y', /* sigma */ 'R', /* SIGMA */ 'I', /* tau */ 'T', /* theta */ 'O', /* THETA */ 'X', /* xi */ 'Q', /* zeta */ 0 }; int trans[]{ alpha, beta, delta, DELTA, epsilon, eta, gamma, GAMMA, infinity, integral, lambda, LAMBDA, mu, nabla, not, nu, omega, OMEGA, partial, phi, PHI, psi, PSI, pi, PI, rho, sigma, SIGMA, tau, theta, THETA, xi, zeta, 0 }; int alpha[] {LF,'c',RT,RT,'(',LF,0}; int beta[] {'B',LF,LF,DN,DN,'|',RT,RT,UP,UP,0}; int delta[] {'o',UP,UP,'<',DN,DN,0}; int DELTA[] {LF,LF,'/',-3,DN,'-',-4,RT,'-',-3,UP,'\\',LF,LF,0}; int epsilon[] {'<','-',0}; int eta[] {'n',RT,RT,DN,DN,'|',LF,LF,UP,UP,0}; int gamma[] {')',RT,'/',LF,0}; int GAMMA[] {LF,LF,'|',RT,RT,-3,UP,'-',-3,DN,RT,RT,'`',LF,LF,0}; int infinity[] {LF,LF,'c',-4,RT,'o',LF,LF,0}; int integral[] {'|','\'',RT,RT,'`',-3,LF,-6,DN,'\'',LF,'`',RT,RT,-6,UP,0}; int lambda[] {'\\',-4,DN,LF,'\'',DN,LF,'\'',-5,UP,RT,RT,0}; int LAMBDA[] {LF,LF,'/',-4,RT,'\\',LF,LF,0}; int mu[] {'u',LF,LF,',',RT,RT,0}; int nabla[] {LF,LF,'\\',-3,UP,'-',-4,RT,'-',-3,DN,'/',LF,LF,0}; int not[] {'-',-2,RT,UP,',',DN,-2,LF,0}; int nu[] {LF,'(',-3,RT,'/',LF,LF,0}; int omega[] {LF,'u',-3,RT,'u',LF,LF,0}; int OMEGA[] {'O',DN,DN,LF,'-',RT,RT,'-',LF,UP,UP,0}; int partial[] {'o',RT,DN,'`',LF,UP,'`',LF,UP,'`',RT,DN,0}; int phi[] {'o','/',0}; int PHI[] {'o','[',']',0}; int psi[] {'/','-',DN,DN,RT,RT,'\'',-4,LF,'\'',RT,RT,UP,UP,0}; int PSI[] {'[',']','-',DN,DN,RT,RT,'\'',-4,LF,'`',RT,RT,UP,UP,0}; int pi[] {UP,'-',-3,DN,'"',DN,'"',-3,UP,0}; int PI[] {LF,LF,'[',']',-4,RT,'[',']',LF,LF,-3,UP,'-',-3,DN,0}; int rho[] {'o',LF,LF,DN,DN,'|',UP,UP,RT,RT,0}; int sigma[] {'o',DN,RT,RT,'~',UP,LF,LF,0}; int SIGMA[] {'>',-2,DN,'-',-5,UP,'-',-3,DN,0}; int tau[] {'t',DN,RT,RT,'~',LF,LF,LF,'~',RT,UP,0}; int theta[] {'O','-',0}; int THETA[] {'O','=',0}; int xi[] {'c',RT,DN,',',LF,-3,UP,'c',LF,DN,'`',RT,DN,0}; int zeta[] {'c',RT,DN,',',LF,-3,UP,'<',DN,DN,0}; special(){ int c,i,j,t; loop: if( (c=getchar()) == SI ) return; for( i=0; tab[i]!=0; i++) if( c==tab[i] ){ plot(trans[i]); goto loop; } putchar(c); goto loop; } plot(s) int *s; { int i,c; putchar(PLOT); for( i=0; (c=s[i])!=0; i++ ) if( c<0 ) nplot(-c,s[++i]); else putchar(c); putchar(PLOT); putchar(' '); } nplot(n,c) int n,c; { while(n--) putchar(c); } cfiloruadif (cclass(ep, *lp++, 0)) { ep =+ *ep; continue; } return(0); case CDOT|STAR: curlp = lp; while (*lp++); goto star; case CCHR|STAR: curlp = lp; while (*lp++ == *ep); ep++; goto star; case CCL|STAR: case NCCL|STAR: curlp = lp; while (cclass(ep, *lp++, ep[-1]==(CCL|STAR))); ep =+ *ep; goto star; star: do { lp--; if (advance(lp, ep)) return(1); } while (lp > curlp); return(0); default: printf2("RE botch\n"); } } cclass(aset, ac, af) { register chaile; char **aarg; { register char *file, **arg; arg = aarg; file = afile; execv(file, arg); if (errno==ENOEXEC) { arg[0] = file; *--arg = "/bin/sh"; execv(*arg, arg); } if (errno==E2BIG) toolong(); } toolong() { write(2, "Arg list too long\n", 18); exit(); } match(s, p) char *s, *p; { if (*s=='.' && *p!='.') return(0); return(amatch(s, p)); } amatch(as, ap) char *as, *ap; { register char *s, *p; register scc; int c, cc, ok, lc; s = as; p = ap; if (scc = *s++) if ((scc =& 01# /* * grep -- print lines matching (or not matching) a pattern * */ #define CCHR 2 #define CDOT 4 #define CCL 6 #define NCCL 8 #define CDOL 10 #define CEOF 11 #define STAR 01 #define LBSIZE 256 #define ESIZE 256 char ibuf[512]; char expbuf[ESIZE]; int lnum[2]; char linebuf[LBSIZE+1]; int bflag; int nflag; int cflag; int vflag; int nfile; int circf; int blkno; int tln[2]; main(argc, argv) char **argv; { extern fout; fout = dup(1); flush(); while (--argc > 0 && (++argv)[0][0]=='-') switch (argr *set, c; register n; set = aset; if ((c = ac) == 0) return(0); n = *set++; while (--n) if (*set++ == c) return(af); return(!af); } printf2(s, a) { extern fout; flush(); fout = 2; printf(s, a); flush(); exit(2); } succeed(f) { if (cflag) { if (++tln[1]==0) tln[0]++; return; } if (nfile > 1) printf("%s:", f); if (bflag) printf("%l:", blkno); if (nflag) printf("%s:", locv(lnum[0], lnum[1])); printf("%s\n", linebuf); } 77) == 0) scc = 0200; switch (c = *p++) { case '[': ok = 0; lc = 077777; while (cc = *p++) { if (cc==']') { if (ok) return(amatch(s, p)); else return(0); } else if (cc=='-') { if (lc<=scc && scc<=(c = *p++)) ok++; } else if (scc == (lc=cc)) ok++; } return(0); default: if (c!=scc) return(0); case '?': if (scc) return(amatch(s, p)); return(0); case '*': return(umatch(--s, p)); case '\0': return(!scc); } } umatch(s, p) char v[0][1]) { case 'v': vflag++; continue; case 'b': bflag++; continue; case 'c': cflag++; continue; case 'n': nflag++; continue; default: printf2("Unknown flag\n"); continue; } if (argc<=0) exit(2); compile(*argv); nfile = --argc; if (argc<=0) execute(0); else while (--argc >= 0) { argv++; execute(*argv); } flush(); exit(0); } compile(astr) char *astr; { register c; register char *ep, *sp; char *lastep; int cclcnt; ep = expbuf; sp = astr; int offset 0; main(argc, argv) char *argv[]; { extern fin; char line[64]; if (argc<2 || ttyn(0)!='x') { write(1, "goto error\n", 11); seek(0, 0, 2); return; } seek(0, 0, 0); fin = dup(0); loop: if (getlin(line)) { write(1, "label not found\n", 16); return; } if (compar(line, argv[1])) goto loop; seek(0, offset, 0); } getlin(s) char s[]; { int ch, i; i = 0; l: if ((ch=getc())=='\0') return(1); if (ch!=':') { while(ch!='\n' && ch!='\0') ch = getc(); goto l; } while ((ch*s, *p; { if(*p==0) return(1); while(*s) if (amatch(s++,p)) return(1); return(0); } compar(as1, as2) char *as1, *as2; { register char *s1, *s2; s1 = as1; s2 = as2; while (*s1++ == *s2) if (*s2++ == 0) return(0); return (*--s1 - *s2); } cat(as1, as2) char *as1, *as2; { register char *s1, *s2; register int c; s2 = string; s1 = as1; while (c = *s1++) { if (s2 > &ab[STRSIZ]) toolong(); c =& 0177; if (c==0) { *s2++ = '/'; break; } *s2++ = c; } s1 = as2; do {  if (*sp == '^') { circf++; sp++; } for (;;) { if (ep >= &expbuf[ESIZE]) goto cerror; if ((c = *sp++) != '*') lastep = ep; switch (c) { case '\0': *ep++ = CEOF; return; case '.': *ep++ = CDOT; continue; case '*': if (lastep==0) goto defchar; *lastep =| STAR; continue; case '$': if (*sp != '\0') goto defchar; *ep++ = CDOL; continue; case '[': *ep++ = CCL; *ep++ = 0; cclcnt = 1; if ((c = *sp++) == '^') { c = *sp++; ep[-=getc())==' '); while (ch!=' ' && ch!='\n' && ch!='\0') { s[i++] = ch; ch = getc(); } while(ch != '\n') ch = getc(); s[i] = '\0'; return(0); } compar(s1, s2) char s1[], s2[]; { int c, i; i = 0; l: if(s1[i] != s2[i]) return(1); if (s1[i++] == '\0') return(0); goto l; } getc() { offset++; return(getchar()); } if (s2 > &ab[STRSIZ]) toolong(); *s2++ = c = *s1++; } while (c); s1 = string; string = s2; return(s1); } 2] = NCCL; } do { *ep++ = c; cclcnt++; if (c=='\0' || ep >= &expbuf[ESIZE]) goto cerror; } while ((c = *sp++) != ']'); lastep[1] = cclcnt; continue; case '\\': if ((c = *sp++) == '\0') goto cerror; defchar: default: *ep++ = CCHR; *ep++ = c; } } cerror: printf2("RE error\n"); } execute(file) { register char *p1, *p2; register c; int f; char *ebp, *cbp; if (file) { if ((f = open(file, 0)) < 0) { printf2("Can't open %s\n", file); } } el# /* global command -- glob params "*" in params matches r.e ".*" "?" in params matches r.e. "." "[...]" in params matches character class "[...a-z...]" in params matches a through z. perform command with argument list constructed as follows: if param does not contain "*", "[", or "?", use it as is if it does, find all files in current directory which match the param, sort them, and use them prepend the command name with "/bin" or "/usr/bin" as required. */ #def# /* * getty -- adapt to terminal speed on dialup, and call login */ /* * tty flags */ #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 ANYP 0300 /* * Delay algorithms */ #define CR1 010000 #define CR2 020000 #define CR3 030000 #define NL1 000400 #define NL2 001000 #define NL3 001400 #define TAB1 002000 #define TAB2 004000 #define TAB3 006000 #define FF1 040000 #define ERASE '#' #define KILL '@' /* *se f = 0; ebp = ibuf; cbp = ibuf; lnum[0] = 0; lnum[1] = 0; tln[0] = 0; tln[1] = 0; blkno = -1; for (;;) { if ((++lnum[1])==0) lnum[1]++; if((lnum[1]&0377) == 0) flush(); p1 = linebuf; p2 = cbp; for (;;) { if (p2 >= ebp) { if ((c = read(f, ibuf, 512)) <= 0) { close(f); if (cflag) { if (nfile > 1) printf("%s:", file); p1 = locv(tln[0],tln[1]); printf("%s\n", p1); } return; } blkno++; p2 = ibuf; ebp = ibuf+c; } ine E2BIG 7 #define ENOEXEC 8 #define ENOENT 2 #define STRSIZ 522 char ab[STRSIZ]; /* generated characters */ char *ava[200]; /* generated arguments */ char **av &ava[1]; char *string ab; int errno; int ncoll; main(argc, argv) char *argv[]; { register char *cp; if (argc < 3) { write(2, "Arg count\n", 10); return; } argv++; *av++ = *argv; while (--argc >= 2) expand(*++argv); if (ncoll==0) { write(2, "No match\n", 9); return; } execute(ava[1], &ava[1]); cp = cat("/usr/bin/", ava[1]);  speeds */ #define B110 3 #define B150 5 #define B300 7 #define B9600 13 #define SIGINT 2 #define SIGQIT 3 struct sgtty { char sgispd, sgospd; char sgerase, sgkill; int sgflag; } tmode; struct tab { int tname; /* this table name */ int nname; /* successor table name */ int iflags; /* initial flags */ int fflags; /* final flags */ int ispeed; /* input speed */ int ospeed; /* output speed */ char *message; /* login message */ } itab[] { /* table '0'-1-2 300,150,110 */ '0', 1, ANYP+RAW+ if ((c = *p2++) == '\n') break; if(c) if (p1 < &linebuf[LBSIZE-1]) *p1++ = c; } *p1++ = 0; cbp = p2; p1 = linebuf; p2 = expbuf; if (circf) { if (advance(p1, p2)) goto found; goto nfound; } /* fast check for first character */ if (*p2==CCHR) { c = p2[1]; do { if (*p1!=c) continue; if (advance(p1, p2)) goto found; } while (*p1++); goto nfound; } /* regular algorithm */ do { if (advance(p1, p2)) goto found; } while (*p1++); execute(cp+4, &ava[1]); execute(cp, &ava[1]); write(2, "Command not found.\n", 19); } expand(as) char *as; { register char *s, *cs; register int dirf; char **oav; static struct { int ino; char name[16]; } entry; s = cs = as; while (*cs!='*' && *cs!='?' && *cs!='[') { if (*cs++ == 0) { *av++ = cat(s, ""); return; } } for (;;) { if (cs==s) { dirf = open(".", 0); s = ""; break; } if (*--cs == '/') { *cs = 0; dirf = open(s==cs? "/": s, 0); *cs++ = 0200; breNL1+CR1, ANYP+ECHO+CR1, B300, B300, "\n\r\033;\007login: ", 1, 2, ANYP+RAW+NL1+CR1, EVENP+ECHO+FF1+CR2+TAB1+NL1, B150, B150, "\n\r\033:\006\006\017login: ", 2, '0', ANYP+RAW+NL1+CR1, ANYP+ECHO+CRMOD+XTABS+LCASE+CR1, B110, B110, "\n\rlogin: ", /* table '-' -- Console TTY 110 */ '-', '-', ANYP+RAW+NL1+CR1, ANYP+ECHO+CRMOD+XTABS+LCASE+CR1, B110, B110, "\n\rlogin: ", /* table '1' -- 150 */ '1', '1', ANYP+RAW+NL1+CR1, EVENP+ECHO+FF1+CR2+TAB1+NL1, B150, B150, "\n\r\033:\006\006\017login: ",  nfound: if (vflag) succeed(file); continue; found: if (vflag==0) succeed(file); } } advance(alp, aep) { register char *lp, *ep, *curlp; char *nextep; lp = alp; ep = aep; for (;;) switch (*ep++) { case CCHR: if (*ep++ == *lp++) continue; return(0); case CDOT: if (*lp++) continue; return(0); case CDOL: if (*lp==0) continue; return(0); case CEOF: return(1); case CCL: if (cclass(ep, *lp++, 1)) { ep =+ *ep; continue; } return(0); case NCCL: ak; } } if (dirf<0) { write(2, "No directory\n", 13); exit(); } oav = av; while (read(dirf, &entry, 16) == 16) { if (entry.ino==0) continue; if (match(entry.name, cs)) { *av++ = cat(s, entry.name); ncoll++; } } close(dirf); sort(oav); } sort(oav) char **oav; { register char **p1, **p2, **c; p1 = oav; while (p1 < av-1) { p2 = p1; while(++p2 < av) { if (compar(*p1, *p2) > 0) { c = *p1; *p1 = *p2; *p2 = c; } } p1++; } } execute(afile, aarg) char *af /* table '2' -- 9600 */ '2', '2', ANYP+RAW+NL1+CR1, ANYP+XTABS+ECHO+CRMOD+FF1, B9600, B9600, "\n\r\033;login: ", }; #define NITAB sizeof itab/sizeof itab[0] char name[16]; int crmod; int upper; int lower; main(argc, argv) char **argv; { register struct tab *tabp; register tname; /* signal(SIGINT, 1); signal(SIGQIT, 0); */ tname = '0'; if (argc > 1) tname = *argv[1]; for (;;) { for(tabp = itab; tabp < &itab[NITAB]; tabp++) if(tabp->tname == tname) break; if(tabp >= &itab[NITAB])  tabp = itab; tmode.sgispd = tabp->ispeed; tmode.sgospd = tabp->ospeed; tmode.sgflag = tabp->iflags; tmode.sgispd = tabp->ispeed; tmode.sgospd = tabp->ospeed; stty(0, &tmode); puts(tabp->message); stty(0, &tmode); if(getname()) { tmode.sgerase = ERASE; tmode.sgkill = KILL; tmode.sgflag = tabp->fflags; if(crmod) tmode.sgflag =| CRMOD; if(upper) tmode.sgflag =| LCASE; if(lower) tmode.sgflag =& ~LCASE; stty(0, &tmode); execl("/bin/login", "login", name, 0/* find -- find files in a pathname. Use of find is documented in /usr/man/man1/find.1 . In addition, find has a secret first arg "+" which causes each file name to be printed along with a period if the predicates succeed. */ int randlast; char *pathname; int verbose; struct anode { int (*F)(); struct anode *L, *R; } node[100]; int nn; /* number of nodes */ char *fname, *path; int now[2]; int ap, ac; char **av; struct ibuf { int idev; int inum; int iflags; char inl; char iuid; char igid; ch))?1:0); } or(p) struct anode *p; { return(((*p->L->F)(p->L)) || ((*p->R->F)(p->R))?1:0); } not(p) struct anode *p; { return( !((*p->L->F)(p->L))); } glob(p) struct { int f; char *pat; } *p; { return(gmatch(fname,p->pat)); } print() { printf("%s\n",path); return(1); } mtime(p) struct { int f, t, s; } *p; { return(scomp((now[0]-statb.imtime[0])*3/4,p->t,p->s)); } atime(p) struct { int f, t, s; } *p; { return(scomp((now[0]-statb.iatime[0])*3/4,p->t,p->s)); } user(p) struct { int f, u, s; } *p; { ); exit(1); } tname = tabp->nname; } } getname() { register char *np; register c; static cs; crmod = 0; upper = 0; lower = 0; np = name; do { if (read(0, &cs, 1) <= 0) exit(0); if ((c = cs&0177) == 0) return(0); write(1, &cs, 1); if (c>='a' && c <='z') lower++; else if (c>='A' && c<='Z') { upper++; c =+ 'a'-'A'; } else if (c==ERASE) { if (np > name) np--; continue; } else if (c==KILL) { np = name; continue; } *np++ = c; } while (c!='\n' && ar isize0; char *isize; int iaddr[8]; int iatime[2]; int imtime[2]; } statb; main(argc,argv) char *argv[]; { struct anode *exlist; int find(); time(&now); ac = argc; av = argv; ap = 2; pathname = argv[1]; if(compstr(argv[1],"+")==0) { verbose++; ap++; pathname = argv[2]; } else verbose = 0; argv[argc] = 0; if(argc<3) { printf("Insufficient args\n"); exit(9); } if(!(exlist = exp())) { /* parse and compile the arguments */ printf("Odd usage\n"); exit(9); } if(apu,p->s)); } group(p) struct { int f, u; } *p; { return(p->u == statb.igid); } links(p) struct { int f, link, s; } *p; { return(scomp(statb.inl,p->link,p->s)); } size(p) struct { int f, sz, s; } *p; { register int i; i = statb.isize0 << 7; i = i | ((statb.isize>>9) & 0177); return(scomp(i,p->sz,p->s)); } perm(p) struct { int f, per, s; } *p; { int i; i = (p->s=='-') ? p->per : 03777; /* '-' means only arg bits */ return((statb.iflags & i & 017777) == p->per); } type(p) c!='\r' && np <= &name[16]); *--np = 0; if (c == '\r') { write(1, "\n", 1); crmod++; } else write(1, "\r", 1); return(1); } puts(as) char *as; { register char *s; s = as; while (*s) write(1, s++, 1); } tf("Missing conjunction\n"); exit(9); } descend(pathname,'f',find,exlist); /* to find files that match */ } /* compile time functions: priority is exp()per); } exeq(p) struct { int f, com; } *p; { return(doex(p->com)); } ok(p) struct { int f, com; } *p; { char c; int yes; yes = 0; printf("%s ... %s ...? ",av[p->com],path); if((c=getchar())=='y') yes = 1; while(c!='\n') c = getchar(); if(yes) return(doex(p->com)); return(0); } /* support functions */ scomp(a,b,s) char s; { /* funny signed compare */ if(s == '+') return(a > b); if(s == '-') return(a < (b * -1)); return(a == b) struct { int word; }; struct { /*"put stack", currently gathering args*/ int prev; /*previous frame ptr, self-relative*/ int pan; /*argument number of arg being collected*/ int pa0; /*self-relative ptr oo arg0*/ #define pend 6 }; struct { /*"get stack", currently expanding macros*/ int prev; /* prev frame ptr, self-realtive*/ int mframe; /* ptr to macro definition frame*/ int mchar; /* next char relative to def. frame*/ int marg; /* 0 or ptr to next arg char reltive to gf*/ int ga0; /* arg0 "-a")==0) { randlast--; return(mk(&and,p1,e1())); } else if(*na!=0) --ap; return(p1); } struct anode *e2() { /* parse not (!) */ int not(); char *na; if(randlast) { printf("operand follows operand.\n"); exit(9); } randlast++; if(compstr(na=nxtarg(),"!")==0) return(mk(¬,e3(),0)); else if(*na!=0) --ap; return(e3()); } struct anode *e3() { /* parse parens and predicates */ int exeq(), ok(), glob(), mtime(), atime(), user(), group(), size(), perm(), links(), print(), type(); int p; } doex(com) { int ccode; int np, i, c; char *nargv[50], *ncom, *na; ccode = np = 0; while (na=av[com++]) { if(compstr(na,";")==0) break; if(compstr(na,"{}")==0) nargv[np++] = path; else nargv[np++] = na; } nargv[np] = 0; if (np==0) return(9); if(fork()) /*parent*/ wait(&ccode); else { /*child*/ execv(nargv[0], nargv, np); i = 0; ncom = "/usr/bin/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; while(c=nargv[0][i]) { ncom[9+i++] = c; } ncom[9+i] = '\0'; execv(ncom+4, nargv, np); execv(ptr self-rel*/ }; struct { /*"definition stack"*/ int prev; /* prev frame ptr, self-relative*/ int dswitch; /* builtin func code, neg for dead definition*/ int dtext; /* definition text prt rel to df*/ int dident; /* first char of identifier naming def*/ #define dend 6 }; char metas[]; #define lquote metas[0] #define rquote metas[1] #define sharp metas[2] #define colon metas[3] #define semi metas[4] #define comma metas[5] #define dollar metas[6] #define NMETA 7 char one[]; int rescan; int traceflag;1, i; char *a, *b, s; a = nxtarg(); if(compstr(a,"(")==0) { randlast--; p1 = exp(); a = nxtarg(); if(compstr(a,")")!=0) goto err; return(p1); } else if(compstr(a,"-print")==0) { return(mk(&print,0,0)); } b = nxtarg(); s = *b; if(s=='+') b++; if(compstr(a,"-name")==0) return(mk(&glob,b,0)); else if(compstr(a,"-mtime")==0) return(mk(&mtime,atoi(b),s)); else if(compstr(a,"-atime")==0) return(mk(&atime,atoi(b),s)); else if(compstr(a,"-user")==0) { if((i=getunum(b)) == -1) { pncom, nargv, np); exit(9); } return(ccode ? 0:1); } char fin[518]; getunum(s) char *s; { /* find username in /etc/passwd & return num. */ int i; char str[20], *sp, c; i = -1; fin[0] = open("/etc/passwd",0); while(c = getchar()) { if(c=='\n') { sp = str; while((*sp = getchar()) != ':') if(! *sp++) goto RET; *sp = '\0'; if(compstr(str,s)==0) { while((c=getchar()) != ':') if(! c) goto RET; sp = str; while((*sp = getchar()) != ':') sp++; *sp = '\0'; i = atoi(st int trashflag; /* nonzero when dead def'n exist*/ int lp; /* arg collection level (out level)*/ int lg; /*input level (get level) */ int lq; /*quote level*/ int l9; /*apparent call level within arg 9*/ char c; /*current input character*/ char *pf; /*put stack frame ptr*/ char *pe; /*put stack end*/ char *pmax; /*top of put stack*/ char p0[]; /*put stack*/ char *gf; /*get stack frame ptr*/ char *ge; /*get stack end*/ char *gmax; /*get stack limit*/ char g0[]; /*get stack*/ char *df; rintf("Cannot find user \"%s\"\n",b); exit(9); } return(mk(&user,i,s)); } else if(compstr(a,"-group")==0) return(mk(&group,atoi(b),s)); else if(compstr(a,"-size")==0) return(mk(&size,atoi(b),s)); else if(compstr(a,"-links")==0) return(mk(&links,atoi(b),s)); else if(compstr(a,"-perm")==0) { for(i=0; *b ; ++b) { if(*b=='-') continue; i =<< 3; i = i + (*b - '0'); } return(mk(&perm,i,s)); } else if(compstr(a,"-type")==0) { i = s=='d' ? 040000 : s=='b' ? 060000 : r); break; } } } RET: close(fin); fin[0] = 0; return(i); } compstr(s1,s2) char s1[], s2[]; { /* compare strings: */ register char *c1, *c2; c1 = s1; c2 = s2; while(*c1 == *c2) if(*c1++ == '\0') return(0); /* s1 == s2 */ else c2++; return(*c1 > *c2 ? 1 : -1); } int descend(name,goal,func,arg) int (*func)(); char *name, goal; { int dir /* open directory */, offset /* in directory */; int dsize, top; struct { int dinode; char dname[14]; } dentry[32]; register int i, j, k; /*definition stack frame ptr*/ char *de; /*def stack end*/ char *dmax; /*def stack limit*/ char d0[]; /*def stack*/ char dummy[]; /*dummy empty macro*/ s=='c' ? 020000 : 000000; return(mk(&type,i,0)); } else if (compstr(a,"-exec")==0) { i = ap - 1; while(compstr(nxtarg(),";")!=0); return(mk(&exeq,i,0)); } else if (compstr(a,"-ok")==0) { i = ap - 1; while(compstr(nxtarg(),";")!=0); return(mk(&ok,i,0)); } err: printf("Bad option: \"%s\" \"%s\"\n",a,b); exit(9); } struct anode *mk(f,l,r) struct anode *l,*r; { /*make an expression node*/ node[nn].F = f; node[nn].L = l; node[nn].R = r; return(&(node[nn++])); } nxtarg() { /* get n char aname[128]; if(stat(name,&statb)<0) { printf("--bad status %s\n",name); return(0); } /* if((statb.iflags&060000)!=040000){ /*not a directory*/ /* if(goal=='f'||goal=='b') /* search goal for files */ /* (*func)(arg,name); return(1); } else if(goal=='d' || goal=='b') /* search goal is directories */ /* (*func)(arg,name); */ (*func)(arg,name); if((statb.iflags&060000)!=040000) return(1); top = statb.isize; for(offset=0 ; offset < top ; offset =+ 512) { /* each block */ dsize y|z}ext arg from command line */ if(ap>=ac) return(""); return(av[ap++]); } find(exlist,fullname) /* execute predicat list with current file */ struct anode *exlist; char *fullname; { register int i; path = fullname; if(verbose) printf("%s",path); for(i=0;fullname[i];++i) if(fullname[i]=='/') fname = &fullname[i+1]; i = (*exlist->F)(exlist); if(verbose) if(i) printf(".\n"); else printf("\n"); } /* execution time functions */ and(p) struct anode *p; { return(((*p->L->F)(p->L)) && ((*p->R->F)(p->R= 512<(top-offset) ? 512 : (top-offset); if((dir=open(name,0))<0) { printf("--cannot open %s\n",name); return(0); } if(offset) seek(dir,offset,0); if(read(dir,&dentry,dsize)<0) { printf("--cannot read %s\n",name); return(0); } close(dir); for(i = 0; i < (dsize>>4); ++i) { /* each dir. entry */ if(dentry[i].dinode==0 || compstr(dentry[i].dname,".")==0 || compstr(dentry[i].dname,"..")==0) continue; if (dentry[i].dinode == -1) break; for(j=0;aname[j]=name[j];++j); if(aname[j-1]!='/') aname[j++] = '/'; for(k=0; (aname[j++]=dentry[i].dname[k]) && k<13; ++k); aname[j] = '\0'; if(descend(aname,goal,func,arg)==0) printf("--%s\n",name); } } return(1); } gmatch(s, p) /* string match as in glob */ char *s, *p; { if (*s=='.' && *p!='.') return(0); return(amatch(s, p)); } amatch(s, p) char *s, *p; { register int cc, scc, k; int c, lc; scc = *s; lc = 077777; switch (c = *p) { case '[': k = 0; while (cc = *++p) { switch (cc) { case '\n' || buf[i] == ' ' || buf[i] == '\t')if(i++ >= in)goto notas; j = i-1; if(buf[i] == '.'){ i++; if(lookup(as) == 1){ printf("assembler program"); goto outa; } else if(buf[j] == '\n'){ printf("roff, nroff, or eqn input"); goto outa; } } } printf("assembler program"); goto outa; notas: for(i=0; i < in; i++)if(buf[i] <= 0){ printf("data\n"); goto out; } if((mbuf[2] & 00111) != 0) printf("commands"); else printf("probably text"); outa: while(i < in) ifintf("move failed: %s\n", t); cflag++; } } nocom: if (cflag==0 && nl!=0) { i = 0; av[0] = "ld"; av[1] = "-x"; av[2] = "/lib/fr0.o"; j = 3; while(i 0) for(i = 0; i < in; i++) if(buf[i] <= 0){ printf(" with garbage\n"); goto out; } printf("\n"); out: close(ibuf[0]); } lookup(tab) char *tab[]; { char r; int k,j,l; while(buf[i] == ' ' || buf[i] == '\t' || buf[i] == '\n')i++; for(j=0; tab[j] != 0; j++){ l=0; for(k=i; ((r=tab[j][l++]) == buf[k] && r != '\0');k++); if(r == '\0') if(buf[k] == ' ' || buf[k] == '\n' || buf[k] == '196], sbf[1024]; int c; exfail = 0; ibuf = ibuf1 = ib1; ibuf2 = ib2; if (fopen(file, ibuf1)<0) return(file); if (getc(ibuf1) != '#') { close(ibuf1[0]); return(file); } ibuf1[1]++; ibuf1[2]--; obuf = ob; symtab = stab; for (c=0; c<200; c++) { stab[c].name[0] = '\0'; stab[c].value = 0; } defloc = lookup("define", 1); defloc->value = defloc->name; incloc = lookup("include", 1); incloc->value = incloc->name; stringbuf = sbf; line = ln; lineno = 0; tmp = setsuf(copy(file), 'i'); \t' || buf[k] == '{' || buf[k] == '/'){ i=k; return(1); } } return(0); } ccom(){ char cc; while((cc = buf[i]) == ' ' || cc == '\t' || cc == '\n')if(i++ >= in)return(0); if(buf[i] == '/' && buf[i+1] == '*'){ i =+ 2; while(buf[i] != '*' || buf[i+1] != '/'){ if(buf[i] == '\\')i =+ 2; else i++; if(i >= in)return(0); } if((i =+ 2) >= in)return(0); } if(buf[i] == '\n')if(ccom() == 0)return(0); return(1); } ascom(){ while(buf[i] == '/'){ i++; while(buf[i++] != '\n')i if (fcreat(tmp, obuf) < 0) { printf("Can't creat %s\n", tmp); dexit(); } while(getline()) { /* if (ibuf==ibuf2) putc(001, obuf); /*SOH: insert */ if (ln[0] != '#') for (lp=line; *lp!='\0'; lp++) putc(*lp, obuf); putc('\n', obuf); } fflush(obuf); close(obuf[0]); close(ibuf1[0]); return(tmp); } getline() { int c, sc, state; struct symtab *np; char *namep, *filname; if (ibuf==ibuf1) lineno++; lp = line; *lp = '\0'; state = 0; if ((c=getch()) == '#') state = 1; while (int in; int i 0; char buf[512]; int *wd { &buf[0]}; char *fort[]{ "function","subroutine","common","dimension","block","integer", "real","data","double",0}; char *asc[]{ "sys","mov","tst","clr","jmp",0}; char *c[]{ "int","char","float","double","struct","extern",0}; char *as[]{ "globl","byte","even","text","data","bss","comm",0}; int ibuf[260]; main(argc, argv) char **argv; { while(argc > 1) { printf("%s: ", argv[1]); type(argv[1]); argc--; argv++; } } type(file) char *file; { int j,nl; f(i >= in)return(0); while(buf[i] == '\n')if(i++ >= in)return(0); } return(1); } c!='\n' && c!='\0') { if ('a'<=c && c<='z' || 'A'<=c && c<='Z' || c=='_') { namep = lp; sch(c); while ('a'<=(c=getch()) && c<='z' ||'A'<=c && c<='Z' ||'0'<=c && c<='9' ||c=='_') sch(c); sch('\0'); lp--; np = lookup(namep, state); if (state==1) { if (np==defloc) state = 2; else if (np==incloc) state = 3; else { error("Undefined control"); while (c!='\n' && c!='\0') c = getch(); return(c); } } else if (stachar ch; int mbuf[20]; if(stat(file, mbuf) < 0) { printf("cannot stat\n"); return; } switch(mbuf[2]&060000) { case 020000: printf("character"); goto spcl; case 040000: printf("directory\n"); return; case 060000: printf("block"); spcl: printf(" special (%d/%d)\n", (mbuf[6]>>8)&0377, mbuf[6]&0377); return; } ibuf[0] = open(file, 0); if(ibuf[0] < 0) { printf("cannot open\n"); return; } in = read(ibuf[0], buf, 512); switch(*wd) { case 0407: printf("executable\n")te==2) { np->value = stringbuf; while ((c=getch())!='\n' && c!='\0') savch(c); savch('\0'); return(1); } continue; } else if ((sc=c)=='\'' || sc=='"') { sch(sc); filname = lp; instring++; while ((c=getch())!=sc && c!='\n' && c!='\0') { sch(c); if (c=='\\') sch(getch()); } instring = 0; if (state==3) { *lp = '\0'; while ((c=getch())!='\n' && c!='\0'); if (ibuf==ibuf2) error("Nested 'include'"); if (fopen(filname, ibuf2)<0) ; goto out; case 0410: printf("pure executable\n"); goto out; case 0411: printf("separate executable\n"); goto out; case 0177555: printf("archive\n"); goto out; } i = 0; if(ccom() == 0)goto notc; while(buf[i] == '#'){ j = i; while(buf[i++] != '\n'){ if(i - j > 255){ printf("data\n"); goto out; } if(i >= in)goto notc; } if(ccom() == 0)goto notc; } check: if(lookup(c) == 1){ while((ch = buf[i++]) != ';' && ch != '{')if(i >= in)goto notc; printf("c progr/* Fortran command */ char *tmp; char ts[1000]; char *tsp ts; char *av[50]; char *clist[50]; char *llist[50]; int instring; int pflag; int cflag; char *complr; int *ibuf; int *ibuf1; int *ibuf2; int *obuf; char *lp; char *line; int lineno; int exfail; struct symtab { char name[8]; char *value; } *symtab; int symsiz 200; struct symtab *defloc; struct symtab *incloc; char *stringbuf; main(argc, argv) char *argv[]; { char *t; int nc, nl, i, j, c, nxo; int dexit(); complr = "/usr/fort/fc1"; i = nc = n error("Missing file %s", filname); else ibuf = ibuf2; return(c); } } sch(c); c = getch(); } sch('\0'); if (state>1) error("Control syntax"); return(c); } error(s, x) { printf("%d: ", lineno); printf(s, x); putchar('\n'); exfail++; cflag++; } sch(c) { if (lp==line+194) error("Line overflow"); *lp++ = c; if (lp>line+195) lp = line+195; } savch(c) { *stringbuf++ = c; } getch() { static peekc; int c; if (peekc) { c = peekc; peekc = 0; return(c); } loop:am"); goto outa; } nl = 0; while(buf[i] != '('){ if(buf[i] <= 0){ printf("data\n"); goto out; } if(buf[i] == ';'){ i++; goto check; } if(buf[i++] == '\n') if(nl++ > 6)goto notc; if(i >= in)goto notc; } while(buf[i] != ')'){ if(buf[i++] == '\n') if(nl++ > 6)goto notc; if(i >= in)goto notc; } while(buf[i] != '{'){ if(buf[i++] == '\n') if(nl++ > 6)goto notc; if(i >= in)goto notc; } printf("c program"); goto outa; notc: i = 0; while(buf[i] == 'c' || bufl = nxo = 0; while(++i < argc) { if(*argv[i] == '-') switch (argv[i][1]) { default: goto passa; case 'p': pflag++; case 'c': cflag++; break; case '2': complr = "/usr/fort/fc2"; break; } else { passa: t = argv[i]; if(getsuf(t)=='f') { clist[nc++] = t; t = setsuf(copy(t), 'o'); } if (nodup(llist, t)) { llist[nl++] = t; if (getsuf(t)=='o') nxo++; } } } if(nc==0) goto nocom; if ((signal(2, 1) & 01) == 0) sign if ((c=getc1())=='/' && !instring) { if ((peekc=getc1())!='*') return('/'); peekc = 0; for(;;) { c = getc1(); cloop: switch (c) { case '\0': return('\0'); case '*': if ((c=getc1())=='/') goto loop; goto cloop; case '\n': if (ibuf==ibuf1) { putc('\n', obuf); lineno++; } continue; } } } return(c); } getc1() { int c; if ((c = getc(ibuf)) < 0 && ibuf==ibuf2) { close(ibuf2[0]); ibuf = ibuf1; putc('\n', obuf); c = getc1(); }[i] == '#'){ while(buf[i++] != '\n')if(i >= in)goto notfort; } if(lookup(fort) == 1){ printf("fortran"); goto outa; } notfort: i=0; if(ascom() == 0)goto notas; j = i-1; if(buf[i] == '.'){ i++; if(lookup(as) == 1){ printf("assembler program"); goto outa; } else if(buf[j] == '\n'){ printf("roff, nroff, or eqn input"); goto outa; } } while(lookup(asc) == 0){ if(ascom() == 0)goto notas; while(buf[i] != '\n' && buf[i++] != ':') if(i >= in)goto notas; while(buf[i] ==al(2, &dexit); for (i=0; i1) printf("%s:\n", clist[i]); tmp = 0; av[0] = complr; av[1] = expand(clist[i]); if (pflag || exfail) continue; if (av[1] == 0) { cflag++; continue; } av[2] = 0; t = callsys(complr, av); if(tmp) cunlink(tmp); if(t) { cflag++; continue; } av[0] = "as"; av[1] = "-"; av[2] = "f.tmp1"; av[3] = 0; callsys("/bin/as", av); t = setsuf(clist[i], 'o'); cunlink(t); if(link("a.out", t) || cunlink("a.out")) { pr if (c<0) return(0); return(c); } lookup(namep, enterf) char *namep; { char *np, *snp; struct symtab *sp; int i, c; np = namep; i = 0; while (c = *np++) i =+ c; i =% symsiz; sp = &symtab[i]; while (sp->name[0]) { snp = sp; np = namep; while (*snp++ == *np) if (*np++ == '\0' || np==namep+8) { if (!enterf) subst(namep, sp); return(sp); } if (sp++ > &symtab[symsiz]) sp = symtab; } if (enterf) { for (i=0; i<8; i++) if (sp->name[i] = *namep) namep++; while (*namep) namep++; } return(sp); } subst(np, sp) char *np; struct symtab *sp; { char *vp; lp = np; if ((vp = sp->value) == 0) return; sch(' '); while (*vp) sch(*vp++); sch(' '); } getsuf(s) char s[]; { int c; char t, *os; c = 0; os = s; while(t = *s++) if (t=='/') c = 0; else c++; s =- 3; if (c<=14 && c>2 && *s++=='.') return(*s); return(0); } setsuf(s, ch) char s[]; { char *os; os = s; while(*s++); s[-2] = ch; return(os); } callsys(f, v) char f[], *v[]; { intr); setexit(); commands(); unlink(tfname); } commands() { int getfile(), gettty(); register *a1, c; register char *p; int r; for (;;) { if (pflag) { pflag = 0; addr1 = addr2 = dot; goto print; } addr1 = 0; addr2 = 0; do { addr1 = addr2; if ((a1 = address())==0) { c = getchar(); break; } addr2 = a1; if ((c=getchar()) == ';') { c = ','; dot = a1; } } while (c==','); if (addr1==0) addr1 = addr2; switch(c) { case 'a': setdot(); newline(); append(gettt; } if (c!=' ') error; while ((c = getchar()) == ' '); if (c=='\n') error; p1 = file; do { *p1++ = c; } while ((c = getchar()) != '\n'); *p1++ = 0; if (savedfile[0]==0) { p1 = savedfile; p2 = file; while (*p1++ = *p2++); } } exfile() { close(io); io = -1; if (vflag) { putd(); putchar('\n'); } } onintr() { signal(SIGINTR, onintr); putchar('\n'); lastc = '\n'; error; } errfunc() { register c; listf = 0; puts("?"); count[0] = 0; seek(0, 0, 2); pflag = 0; if (globp) int t, status; if ((t=fork())==0) { execv(f, v); printf("Can't find %s\n", f); exit(1); } else if (t == -1) { printf("Try again\n"); return(1); } while(t!=wait(&status)); if ((t=(status&0377)) != 0 && t!=14) { if (t!=2) /* interrupt */ printf("Fatal error in %s\n", f); dexit(); } return((status>>8) & 0377); } copy(s) char s[]; { char *otsp; otsp = tsp; while(*tsp++ = *s++); return(otsp); } nodup(l, s) char **l, s[]; { char *t, *os, c; if (getsuf(s) != 'o') return(1y, addr2); continue; case 'c': delete(); append(gettty, addr1-1); continue; case 'd': delete(); continue; case 'e': setnoaddr(); if ((peekc = getchar()) != ' ') error; savedfile[0] = 0; init(); addr2 = zero; goto caseread; case 'f': setnoaddr(); if ((c = getchar()) != '\n') { peekc = c; savedfile[0] = 0; filename(); } puts(savedfile); continue; case 'g': global(1); continue; case 'i': setdot(); nonzero(); newline(); append(gettty, addr2-1 lastc = '\n'; globp = 0; peekc = lastc; while ((c = getchar()) != '\n' && c != EOF); if (io > 0) { close(io); io = -1; } reset(); } getchar() { if (lastc=peekc) { peekc = 0; return(lastc); } if (globp) { if ((lastc = *globp++) != 0) return(lastc); globp = 0; return(EOF); } if (read(0, &lastc, 1) <= 0) return(lastc = EOF); lastc =& 0177; return(lastc); } gettty() { register c, gf; register char *p; p = linebuf; gf = globp; while ((c = getchar()) != '\n') { if (c==E); os = s; while(t = *l++) { s = os; while(c = *s++) if (c != *t++) break; if (*t++ == '\0') return(0); } return(1); } cunlink(f) char *f; { if (f==0) return(0); return(unlink(f)); } ); continue; case 'k': if ((c = getchar()) < 'a' || c > 'z') error; newline(); setdot(); nonzero(); names[c-'a'] = *addr2 | 01; continue; case 'm': move(0); continue; case '\n': if (addr2==0) addr2 = dot+1; addr1 = addr2; goto print; case 'l': listf++; case 'p': newline(); print: setdot(); nonzero(); a1 = addr1; do puts(getline(*a1++)); while (a1 <= addr2); dot = addr2; listf = 0; continue; case 'q': setnoaddr(); newline(); unlink(tfnameOF) { if (gf) peekc = c; return(c); } if ((c =& 0177) == 0) continue; *p++ = c; if (p >= &linebuf[LBSIZE-2]) error; } *p++ = 0; if (linebuf[0]=='.' && linebuf[1]==0) return(EOF); return(0); } getfile() { register c; register char *lp, *fp; lp = linebuf; fp = nextip; do { if (--ninbuf < 0) { if ((ninbuf = read(io, genbuf, LBSIZE)-1) < 0) return(EOF); fp = genbuf; } if (lp >= &linebuf[LBSIZE]) error; if ((*lp++ = c = *fp++ & 0177) == 0) { lp--; c/* exit -- end runcom */ main() { seek(0, 0, 2); } ); exit(); case 'r': caseread: filename(); if ((io = open(file, 0)) < 0) { lastc = '\n'; error; } setall(); ninbuf = 0; append(getfile, addr2); exfile(); continue; case 's': setdot(); nonzero(); substitute(globp); continue; case 't': move(1); continue; case 'v': global(0); continue; case 'w': setall(); nonzero(); filename(); if ((io = creat(file, 0666)) < 0) error; putfile(); exfile(); continue; case '=': setall(); newline(); count[ontinue; } if (++count[1] == 0) ++count[0]; } while (c != '\n'); *--lp = 0; nextip = fp; return(0); } putfile() { int *a1; register char *fp, *lp; register nib; nib = 512; fp = genbuf; a1 = addr1; do { lp = getline(*a1++); for (;;) { if (--nib < 0) { write(io, genbuf, fp-genbuf); nib = 511; fp = genbuf; } if (++count[1] == 0) ++count[0]; if ((*fp++ = *lp++) == 0) { fp[-1] = '\n'; break; } } } while (a1 <= addr2); write(io, genbuf, fp-genbuf)1] = (addr2-zero)&077777; putd(); putchar('\n'); continue; case '!': unix(); continue; case EOF: return; } error; } } address() { register *a1, minus, c; int n, relerr; minus = 0; a1 = 0; for (;;) { c = getchar(); if ('0'<=c && c<='9') { n = 0; do { n =* 10; n =+ c - '0'; } while ((c = getchar())>='0' && c<='9'); peekc = c; if (a1==0) a1 = zero; if (minus<0) n = -n; a1 =+ n; minus = 0; continue; } relerr = 0; if (a1 || minus) ; } append(f, a) int (*f)(); { register *a1, *a2, *rdot; int nline, tl; struct { int integer; }; nline = 0; dot = a; while ((*f)() == 0) { if (dol >= endcore) { if (sbrk(1024) == -1) error; endcore.integer =+ 1024; } tl = putline(); nline++; a1 = ++dol; a2 = a1+1; rdot = ++dot; while (a1 > rdot) *--a2 = *--a1; *rdot = tl; } return(nline); } unix() { register savint, pid, rpid; int retcode; setnoaddr(); if ((pid = fork()) == 0) { signal(SIGHUP, onhup); signa# /* * Editor */ #define SIGHUP 1 #define SIGINTR 2 #define SIGQUIT 3 #define FNSIZE 64 #define LBSIZE 512 #define ESIZE 128 #define GBSIZE 256 #define NBRA 5 #define EOF -1 #define CBRA 1 #define CCHR 2 #define CDOT 4 #define CCL 6 #define NCCL 8 #define CDOL 10 #define CEOF 11 #define CKET 12 #define STAR 01 #define error goto errlab #define READ 0 #define WRITE 1 int peekc; int lastc; char savedfile[FNSIZE]; char file[FNSIZE]; char linebuf[LBSIZE]; char rhsbuf[LBSIZE/2]; char expbuf[ESIZE+4]; int relerr++; switch(c) { case ' ': case '\t': continue; case '+': minus++; if (a1==0) a1 = dot; continue; case '-': case '^': minus--; if (a1==0) a1 = dot; continue; case '?': case '/': compile(c); a1 = dot; for (;;) { if (c=='/') { a1++; if (a1 > dol) a1 = zero; } else { a1--; if (a1 < zero) a1 = dol; } if (execute(0, a1)) break; if (a1==dot) error; } break; case '$': a1 = doll(SIGQUIT, onquit); execl("/bin/sh", "sh", "-t", 0); exit(); } savint = signal(SIGINTR, 1); while ((rpid = wait(&retcode)) != pid && rpid != -1); signal(SIGINTR, savint); puts("!"); } delete() { register *a1, *a2, *a3; setdot(); newline(); nonzero(); a1 = addr1; a2 = addr2+1; a3 = dol; dol =- a2 - a1; do *a1++ = *a2++; while (a2 <= a3); a1 = addr1; if (a1 > dol) a1 = dol; dot = a1; } getline(tl) { register char *bp, *lp; register nl; lp = linebuf; bp = getblock(tl, READ);  circfl; int *zero; int *dot; int *dol; int *endcore; int *fendcore; int *addr1; int *addr2; char genbuf[LBSIZE]; int count[2]; char *nextip; char *linebp; int ninbuf; int io; int pflag; int onhup; int onquit; int vflag 1; int listf; int col; char *globp; int tfile -1; int tline; char *tfname; char *loc1; char *loc2; char *locs; char ibuff[512]; int iblock -1; char obuff[512]; int oblock -1; int ichanged; int nleft; int errfunc(); int *errlab errfunc; char TMPERR[] "TMP"; int names[26]; char *braslist[NBRA]; break; case '.': a1 = dot; break; case '\'': if ((c = getchar()) < 'a' || c > 'z') error; for (a1=zero; a1<=dol; a1++) if (names[c-'a'] == (*a1|01)) break; break; default: peekc = c; if (a1==0) return(0); a1 =+ minus; if (a1dol) error; return(a1); } if (relerr) error; } } setdot() { if (addr2 == 0) addr1 = addr2 = dot; if (addr1 > addr2) error; } setall() { if (addr2==0) { addr1 = zero+1; addr2 = dol; if (dnl = nleft; tl =& ~0377; while (*lp++ = *bp++) if (--nl == 0) { bp = getblock(tl=+0400, READ); nl = nleft; } return(linebuf); } putline() { register char *bp, *lp; register nl; int tl; lp = linebuf; tl = tline; bp = getblock(tl, WRITE); nl = nleft; tl =& ~0377; while (*bp = *lp++) { if (*bp++ == '\n') { *--bp = 0; linebp = lp; break; } if (--nl == 0) { bp = getblock(tl=+0400, WRITE); nl = nleft; } } nl = tline; tline =+ (((lp-linebuf)+03)>>1)&077776; return; char *braelist[NBRA]; main(argc, argv) char **argv; { register char *p1, *p2; extern int onintr(); onquit = signal(SIGQUIT, 1); onhup = signal(SIGHUP, 1); argv++; if (argc > 1 && **argv=='-') { vflag = 0; /* allow debugging quits? */ if ((*argv)[1]=='q') { signal(SIGQUIT, 0); vflag++; } argv++; argc--; } if (argc>1) { p1 = *argv; p2 = savedfile; while (*p2++ = *p1++); globp = "r"; } fendcore = sbrk(0); init(); if ((signal(SIGINTR, 1) & 01) == 0) signal(SIGINTR, onol==zero) addr1 = zero; } setdot(); } setnoaddr() { if (addr2) error; } nonzero() { if (addr1<=zero || addr2>dol) error; } newline() { register c; if ((c = getchar()) == '\n') return; if (c=='p' || c=='l') { pflag++; if (c=='l') listf++; if (getchar() == '\n') return; } error; } filename() { register char *p1, *p2; register c; count[1] = 0; c = getchar(); if (c=='\n' || c==EOF) { p1 = savedfile; if (*p1==0) error; p2 = file; while (*p2++ = *p1++); return(nl); } getblock(atl, iof) { extern read(), write(); register bno, off; bno = (atl>>8)&0377; off = (atl<<1)&0774; if (bno >= 255) { puts(TMPERR); error; } nleft = 512 - off; if (bno==iblock) { ichanged =| iof; return(ibuff+off); } if (bno==oblock) return(obuff+off); if (iof==READ) { if (ichanged) blkio(iblock, ibuff, write); ichanged = 0; iblock = bno; blkio(bno, ibuff, read); return(ibuff+off); } if (oblock>=0) blkio(oblock, obuff, write); oblock = bno; return(obuff+off); } blkio(b, buf, iofcn) int (*iofcn)(); { seek(tfile, b, 3); if ((*iofcn)(tfile, buf, 512) != 512) { puts(TMPERR); error; } } init() { register char *p; register pid; close(tfile); tline = 0; iblock = -1; oblock = -1; tfname = "/tmp/exxxxx"; ichanged = 0; pid = getpid(); for (p = &tfname[11]; p > &tfname[6];) { *--p = (pid&07) + '0'; pid =>> 3; } close(creat(tfname, 0600)); tfile = open(tfname, 2); brk(fendcore); dot = zero = dol = fendcore; endcore = fendcore - 2; } g switch (c) { case '\\': if ((c = getchar())=='(') { if (nbra >= NBRA) goto cerror; *bracketp++ = nbra; *ep++ = CBRA; *ep++ = nbra++; continue; } if (c == ')') { if (bracketp <= bracket) goto cerror; *ep++ = CKET; *ep++ = *--bracketp; continue; } *ep++ = CCHR; if (c=='\n') goto cerror; *ep++ = c; continue; case '.': *ep++ = CDOT; continue; case '\n': goto cerror; case '*': if (*lastep==CBRA || *lastep==CKET) main(argc, argv) int argc; char *argv[]; { int i; argc--; for(i=1; i<=argc; i++) printf("%s%c", argv[i], i==argc? '\n': ' '); } lobal(k) { register char *gp; register c; register int *a1; char globuf[GBSIZE]; if (globp) error; setall(); nonzero(); if ((c=getchar())=='\n') error; compile(c); gp = globuf; while ((c = getchar()) != '\n') { if (c==EOF) error; if (c=='\\') { c = getchar(); if (c!='\n') *gp++ = '\\'; } *gp++ = c; if (gp >= &globuf[GBSIZE-2]) error; } *gp++ = '\n'; *gp++ = 0; for (a1=zero; a1<=dol; a1++) { *a1 =& ~01; if (a1>=addr1 && a1<=addr2 && execute(0, a1)==k) *a1  error; *lastep =| STAR; continue; case '$': if ((peekc=getchar()) != eof) goto defchar; *ep++ = CDOL; continue; case '[': *ep++ = CCL; *ep++ = 0; cclcnt = 1; if ((c=getchar()) == '^') { c = getchar(); ep[-2] = NCCL; } do { if (c=='\n') goto cerror; *ep++ = c; cclcnt++; if (ep >= &expbuf[ESIZE]) goto cerror; } while ((c = getchar()) != ']'); lastep[1] = cclcnt; continue; defchar: default: *ep++ = CCHR; *ep++ = =| 01; } for (a1=zero; a1<=dol; a1++) { if (*a1 & 01) { *a1 =& ~01; dot = a1; globp = globuf; commands(); a1 = zero; } } } substitute(inglob) { register gsubf, *a1, nl; int getsub(); gsubf = compsub(); for (a1 = addr1; a1 <= addr2; a1++) { if (execute(0, a1)==0) continue; inglob =| 01; dosub(); if (gsubf) { while (*loc2) { if (execute(1)==0) break; dosub(); } } *a1 = putline(); nl = append(getsub, a1); a1 =+ nl; addr2 =+ nl; } if (inglob=c; } } cerror: expbuf[0] = 0; error; } execute(gf, addr) int *addr; { register char *p1, *p2, c; if (gf) { if (circfl) return(0); p1 = linebuf; p2 = genbuf; while (*p1++ = *p2++); locs = p1 = loc2; } else { if (addr==zero) return(0); p1 = getline(*addr); locs = 0; } p2 = expbuf; if (circfl) { loc1 = p1; return(advance(p1, p2)); } /* fast check for first character */ if (*p2==CCHR) { c = p2[1]; do { if (*p1!=c) continue; if (advance(p1, p2)) { lo# /* * incremental dump * dump fisbuodh filesystem * f take output tape from arglist * i from date in /etc/dtab * s specify tape size in feet (feet = blocks/9) * b specify tape size in blocks * u update /etc/dtab to current date * 0 dump from the epoch * d dump specified number of days * h dump specified number of hours * a on incremental dump, dump files even >= MAXSIZE */ char *dargv[] { 0, "i", "/dev/rp0", 0 }; #include "/usr/sys/ino.h" #include "/usr/sys/filsys.h" #define MAXSIZE 1000=0) error; } compsub() { register seof, c; register char *p; int gsubf; if ((seof = getchar()) == '\n') error; compile(seof); p = rhsbuf; for (;;) { c = getchar(); if (c=='\\') c = getchar() | 0200; if (c=='\n') error; if (c==seof) break; *p++ = c; if (p >= &rhsbuf[LBSIZE/2]) error; } *p++ = 0; if ((peekc = getchar()) == 'g') { peekc = 0; newline(); return(1); } newline(); return(0); } getsub() { register char *p1, *p2; p1 = linebuf; if ((p2 = linebp) ==c1 = p1; return(1); } } while (*p1++); return(0); } /* regular algorithm */ do { if (advance(p1, p2)) { loc1 = p1; return(1); } } while (*p1++); return(0); } advance(alp, aep) { register char *lp, *ep, *curlp; char *nextep; lp = alp; ep = aep; for (;;) switch (*ep++) { case CCHR: if (*ep++ == *lp++) continue; return(0); case CDOT: if (*lp++) continue; return(0); case CDOL: if (*lp==0) continue; return(0); case CEOF: loc2 = lp; return(1); ca struct filsys sblock; struct { char name[16]; int date[2]; } dtab[10]; char *dfile "/etc/dtab"; char *ofile; int *talist; int fi; int buf[256]; int dbuf[256]; int ibuf[256]; int vbuf[256]; char *date[2]; char *ddate[2]; int fo -1; int pher; int dflg; int iflg; int cflg; int aflg; char *tsize 19000; char *taddr; main(argc, argv) char **argv; { char *key; int s, i, nfil, nblk, f; register *tap; register struct inode *ip; int ino; ofile = "/dev/mt0"; time(date); if(argc == 1) { argv = dargv; f 0) return(EOF); while (*p1++ = *p2++); linebp = 0; return(0); } dosub() { register char *lp, *sp, *rp; int c; lp = linebuf; sp = genbuf; rp = rhsbuf; while (lp < loc1) *sp++ = *lp++; while (c = *rp++) { if (c=='&') { sp = place(sp, loc1, loc2); continue; } else if (c<0 && (c =& 0177) >='1' && c < NBRA+'1') { sp = place(sp, braslist[c-'1'], braelist[c-'1']); continue; } *sp++ = c&0177; if (sp >= &genbuf[LBSIZE]) error; } lp = loc2; loc2 = sp + linebuf - genbuf; wse CCL: if (cclass(ep, *lp++, 1)) { ep =+ *ep; continue; } return(0); case NCCL: if (cclass(ep, *lp++, 0)) { ep =+ *ep; continue; } return(0); case CBRA: braslist[*ep++] = lp; continue; case CKET: braelist[*ep++] = lp; continue; case CDOT|STAR: curlp = lp; while (*lp++); goto star; case CCHR|STAR: curlp = lp; while (*lp++ == *ep); ep++; goto star; case CCL|STAR: case NCCL|STAR: curlp = lp; while (cclass(ep, *lp++, ep[-1]==(CCL|STAR))); ep =+ *or(argc = 1; dargv[argc]; argc++); } argc--; argv++; key = *argv; while(*key) switch(*key++) { default: printf("bad character in key\n"); exit(); case 'a': /* dump all (even large) */ aflg++; continue; case '-': continue; case 'c': /* increment file name */ cflg++; continue; case 'f': /* file name from arg list */ argc--; argv++; ofile = *argv; continue; case 'i': /* date from date file */ iflg++; continue; case 's': /* tape size */ tsize = number(argv[1]) * hile (*sp++ = *lp++) if (sp >= &genbuf[LBSIZE]) error; lp = linebuf; sp = genbuf; while (*lp++ = *sp++); } place(asp, al1, al2) { register char *sp, *l1, *l2; sp = asp; l1 = al1; l2 = al2; while (l1 < l2) { *sp++ = *l1++; if (sp >= &genbuf[LBSIZE]) error; } return(sp); } move(cflag) { register int *adt, *ad1, *ad2; int getcopy(); setdot(); nonzero(); if ((adt = address())==0) error; newline(); ad1 = addr1; ad2 = addr2; if (cflag) { ad1 = dol; append(getcopy, ad1++); ep; goto star; star: do { lp--; if (lp==locs) break; if (advance(lp, ep)) return(1); } while (lp > curlp); return(0); default: error; } } cclass(aset, ac, af) { register char *set, c; register n; set = aset; if ((c = ac) == 0) return(0); n = *set++; while (--n) if (*set++ == c) return(af); return(!af); } putd() { register r; extern ldivr; count[1] = ldiv(count[0], count[1], 10); count[0] = 0; r = ldivr; if (count[1]) putd(); putchar(r + '0'); } put9; argv++; argc--; continue; case 'b': /* tape size */ tsize = number(argv[1]); argv++; argc--; continue; case 'u': /* rewrite date */ dflg++; continue; case '0': /* dump all */ ddate[0] = ddate[1] = 0; continue; case 'd': /* dump some number of days */ i = 21600; goto sd; case 'h': /* dump some number of hours */ i = 900; goto sd; sd: ddate[0] = date[0]; ddate[1] = date[1]; s = number(argv[1])*4; argv++; argc--; while(s) { if(i > ddate[1]) ddate[ ad2 = dol; } ad2++; if (adt= ad2) { dot = adt++; reverse(ad1, ad2); reverse(ad2, adt); reverse(ad1, adt); } else error; } reverse(aa1, aa2) { register int *a1, *a2, t; a1 = aa1; a2 = aa2; for (;;) { t = *--a2; if (a2 <= a1) return; *a2 = *a1; *a1++ = t; } } getcopy() { if (addr1 > addr2) return(EOF); getline(*addr1++); return(s(as) { register char *sp; sp = as; col = 0; while (*sp) putchar(*sp++); putchar('\n'); } char line[70]; char *linp line; putchar(ac) { register char *lp; register c; lp = linp; c = ac; if (listf) { col++; if (col >= 72) { col = 0; *lp++ = '\\'; *lp++ = '\n'; } if (c=='\t') { c = '>'; goto esc; } if (c=='\b') { c = '<'; esc: *lp++ = '-'; *lp++ = '\b'; *lp++ = c; goto out; } if (c<' ' && c!= '\n') { *lp++ = '\\'; *lp++ = (c>>3)+'0'; *lp0]--; ddate[1] =- i; s--; } continue; } if(argc <= 1) { printf("no file system specified\n"); exit(); } if(iflg) { f = open(dfile, 0); if(f >= 0) { read(f, dtab, sizeof dtab); close(f); for(i=0; i<10; i++) if(equal(dtab[i].name, argv[1])) { ddate[0] = dtab[i].date[0]; ddate[1] = dtab[i].date[1]; } } } printf("%s:\n", argv[1]); fi = open(argv[1], 0); if(fi < 0) { printf("cannot open %s\n", argv[1]); exit(); } printf("incremental dump from\n"); pda0); } compile(aeof) { register eof, c; register char *ep; char *lastep; char bracket[NBRA], *bracketp; int nbra; int cclcnt; ep = expbuf; eof = aeof; bracketp = bracket; nbra = 0; if ((c = getchar()) == eof) { if (*ep==0) error; return; } circfl = 0; if (c=='^') { c = getchar(); circfl++; } if (c=='*') goto cerror; peekc = c; for (;;) { if (ep >= &expbuf[ESIZE]) goto cerror; c = getchar(); if (c==eof) { *ep++ = CEOF; return; } if (c!='*') lastep = ep; ++ = (c&07)+'0'; col =+ 2; goto out; } } *lp++ = c; out: if(c == '\n' || lp >= &line[64]) { linp = line; write(1, line, lp-line); return; } linp = lp; } /* * Get process ID routine if system call is unavailable. getpid() { register f; int b[1]; f = open("/dev/kmem", 0); if(f < 0) return(-1); seek(f, 0140074, 0); read(f, b, 2); seek(f, b[0]+8, 0); read(f, b, 2); close(f); return(b[0]); } */ te(ddate); sync(); bread(1, &sblock); talist = sbrk(size(0, sblock.s_isize*32)*512); tap = talist; if(tap == -1) { printf("No memory\n"); exit(); } nfil = 0; nblk = size(0, sblock.s_isize*32); ino = 0; for(i=0; ii_mode == 0 || ip->i_nlink == 0) { *tap++ = -1; continue; } if(ip->i_mtime[0] < ddate[0]) goto no; if(ip->i_mtime[0] == ddate[0] && ip->i_mtime[1] < ddate[1]) goto no; s = size(ip->i_size0&0377, ip->i_size1) + 1; if (s>MAXSIZE && aflg==0 && iflg!=0) { printf("%l big; not dumped.\n", ino); goto no; } nfil++; nblk =+ s; *tap++ = s; continue; no: *tap++ = 0; } } printf("%l files\n%l blocks\n", nfil, nblk); i = ldiv(0, nblk, ldiv(0, tsize, 10)); printf("%l.%l tapes\n", i/10, i%10); tap = buf; clrbuf(tap); *tap++ = sblock.s_isize; *tap++ = sblock.s_fsize; *tap++ = date[0]; *tap++ = date[1]; *tap++ = ddate[0]; ; while(area > top) { if(sbrk(1024) == -1) { mesg("Out of space\n"); exit(1); } top =+ 1024; } return(p); } mesg(s) char *s; { while(*s) write(2,s++,1); } sort(a,n) /*shellsort CACM #201*/ struct line *a; { struct line w; register int j,m; struct line *ai; register struct line *aim; int k; for(j=1;j<=n;j=* 2) m = 2*j - 1; for(m=/2;m!=0;m=/2) { k = n-m; for(j=1;j<=k;j++) { for(ai = &a[j]; ai > a; ai =- m) { aim = &ai[m]; if(aim->value > ai[0].value || aim->v *tap++ = ddate[1]; *tap++ = tsize; swrite(buf); i = size(0, sblock.s_isize*32); tap = talist; while(i--) { bwrite(tap); tap =+ 256; } tap = talist; for(i=0; iserial > ai[0].serial) break; w.value = ai[0].value; ai[0].value = aim->value; aim->value = w.value; w.serial = ai[0].serial; ai[0].serial = aim->serial; aim->serial = w.serial; } } } } unsort(f, l, b) struct line *f; int *b; { int *a; int i; a = alloc((l+1)*sizeof(a[0])); for(i=1;i<=l;i++) a[f[i].serial] = f[i].value; for(i=1;i<=l;i++) b[i] = a[i]; area = a; } prepare(i, arg) char *arg; { register char *temp; temp = file[i]not create %s\n", dfile); exit(); } } else read(f, dtab, sizeof dtab); for(i=0; i<10; i++) if(dtab[i].name[0] == 0 || equal(dtab[i].name, argv[1])) goto found; printf("%s full\n", dfile); exit(); found: for(s=0; s<15; s++) { dtab[i].name[s] = argv[1][s]; if(argv[1][s] == 0) break; } dtab[i].date[0] = date[0]; dtab[i].date[1] = date[1]; seek(f, 0, 0); write(f, dtab, sizeof dtab); printf("date updated\n"); pdate(date); } pdate(d) int *d; { if(d[0] == 0 && d[1] == 0) printfcts the equivalence classes in file1 together. * Subroutine equiv____ replaces the value of each line in * file0 by the index of the first element of its * matching equivalence in (the reordered) file1. * To save space equiv_____ squeezes file1 into a single * array member______ in which the equivalence classes * are simply concatenated, except that their first * members are flagged by changing sign. * * Next the indices that point into member______ are unsorted_______ into  = area; alloc(sizeof(line)); input(arg); len[i] = (area - temp)/sizeof(line) - 1; alloc(sizeof(line)); sort(file[i], len[i]); } input(arg) { register int h, i; register struct line *p; if(fopen(arg,buf1) == -1) { mesg("Cannot open "); mesg(arg); mesg("\n"); exit(1); } for(i=0; h=readhash(buf1);) { p = alloc(sizeof(line)); p->serial = ++i; p->value = h; } close(buf1->fdes); } equiv(a,n,b,m,c) struct line *a, *b; int *c; { register int i, j; i = j = 1; while(i<=n && j<=m) { i("the epoch\n"); else printf(ctime(d)); } dump(ip, sz) struct inode *ip; { register *p, *q, *r; p = dbuf; q = ip; clrbuf(p); while(q < &ip->i_mtime[2]) *p++ = *q++; swrite(dbuf); if(ip->i_mode & (IFBLK&IFCHR)) { if(sz != 0) printf("special\n"); return; } for(p = &ip->i_addr[0]; p < &ip->i_addr[8]; p++) if(*p) { if(ip->i_mode&ILARG) { bread(*p, ibuf); for(q = &ibuf[0]; q < &ibuf[256]; q++) if(*q) { if(p == &ip->i_addr[7]) { bread(*q, vbuf); for(r = &vbuf[0]; r * array class_____ according to the original order of file0. * * The cleverness lies in routine stone______. This marches * through the lines of file0, developing a vector klist_____ * of "k-candidates". At step i a k-candidate is a matched * pair of lines x,y (x in file0 y in file1) such that * there is a common subsequence of lenght k * between the first i lines of file0 and the first y * lines of file1, but there is no such subsequence for * any smaller y. x is the earliest possible mate f(a[i].value 1 && *argv[1]=='-') { argc--; argv++; } if(argc!=3) { mesg("Arg count\n"); exit(1); } area = top = sbrk(0); buf1 = alloc(sizeof(*bu< &vbuf[256]; r++) if(*r) { if(--sz < 0) goto pe; bread(*r, dbuf); bwrite(dbuf); } continue; } if(--sz < 0) goto pe; bread(*q, dbuf); bwrite(dbuf); } } else { if(--sz < 0) goto pe; bread(*p, dbuf); bwrite(dbuf); } } if(sz) goto pe; return; pe: clrbuf(dbuf); while(--sz >= 0) bwrite(dbuf); pher++; } bread(bno, b) { seek(fi, bno, 3); if(read(fi, b, 512) != 512) { printf("read error %l\n", bno); } } clrbuf(b) intto y * that occurs in such a subsequence. * * Whenever any of the members of the equivalence class of * lines in file1 matable to a line in file0 has serial number * less than the y of some k-candidate, that k-candidate * with the smallest such y is replaced. The new * k-candidate is chained (via pred____) to the current * k-1 candidate so that the actual subsequence can * be recovered. When a member has serial number greater * that the y of all k-candidates, the klist is extended. * At the end, the f1)); prepare(0, argv[1]); prepare(1, argv[2]); member = file[1]; equiv(file[0], len[0], file[1], len[1], member); class = file[0]; unsort(file[0], len[0], class); klist = &class[len[0]+2]; area = &member[len[1]+2]; k = stone(class, len[0], member, klist); J = class; unravel(klist[k]); ixold = klist; ixnew = file[1]; area = &ixnew[len[1]+2]; buf2 = alloc(sizeof(*buf2)); if(check(argv)) mesg("Jackpot\n"); output(argv); } stone(a,n,b,c) int *a; int *b; struct cand **c; { register int  *b; { register i, *p; p = b; i = 256; while(i--) *p++ = 0; } swrite(b) int *b; { register i, s, *p; i = 254; s = taddr; p = b; while(i--) s =+ *p++; *p++ = taddr; *p = 031415 - s; bwrite(b); } bwrite(b) { if(taddr == 0) { if(fo != -1) { printf("change tapes\n"); close(fo); rdline(); } otape(); } wloop: if(write(fo, b, 512) != 512) { printf("write error\n"); rdline(); seek(fo, taddr, 3); goto wloop; } taddr++; if(taddr >= tsize) taddr = 0; } rdline() { ilongest subsequence is pulled out * and placed in the array J by unravel_______. * * With J in hand, the matches there recorded are * check_____ed against reality to assure that no spurious * matches have crept in due to hashing. If they have, * they are broken, and "jackpot " is recorded--a harmless * matter except that a true match for a spuriously * mated line may now be unnecessarily reported as a change. * * Much of the complexity of the program comes simply * from trying to minimize core ui, k,y; int j, l; int skip; k = 0; c[0] = 0; for(i=1; i<=n; i++) { j = a[i]; if(j==0) continue; skip = 0; do { y = b[j]; if(y<0) y = -y; if(skip) continue; l = search(c, k, y); if(l > k) { c[k+1] = newcand(i,y,c[k]); skip = 1; k++; } else if(c[l]->y > y && c[l]->x < i) c[l] = newcand(i,y,c[l-1]); } while(b[++j] > 0); } return(k); } struct cand * newcand(x,y,pred) struct cand *pred; { struct cand *p; p = alloc(sizeof(cand)); p->x = x; p->y = ynt c; loop: c = 0; read(0, &c, 1); if(c == 0) exit(); if(c != '\n') goto loop; } number(s) char *s; { register n, c; n = 0; while(c = *s++) { if(c<'0' || c>'9') continue; n = n*10+c-'0'; } return(n); } size(s0, s1) { register s; extern ldivr; s = ldiv(s0&0377, s1, 512); if(ldivr) s++; return(s); } otape() { register char *p; fo = creat(ofile, 0666); if(fo < 0) { printf("can not open %s\n", ofile); exit(); } if(!cflg) return; p = ofile; while(*p++) ; p[-2]++;tilization and * maximize the range of doable problems by dynamically * allocating what is needed and reusing what is not. * The core requirements for problems larger than somewhat * are (in words) 2*length(file0) + length(file1) + * 3*(number of k-candidates installed), typically about * 6n words for files of length n. There is also space for buf1 * used which could, by moving data underfoot and reallocating * buf1 together with buf2, be completely overlaid. */ struct buf { int fdes; char data[516]; } *; p->pred = pred; return(p); } search(c, k, y) struct cand **c; { register int i, j, l; int t; i = 0; j = k+1; while((l=(i+j)/2) > i) { t = c[l]->y; if(t > y) j = l; else if(t < y) i = l; else return(l); } return(l+1); } unravel(p) struct cand *p; { int i; for(i=0; i<=len[0]; i++) J[i] = 0; while(p) { J[p->x] = p->y; p = p->pred; } } /* check does double duty: 1. ferret out any fortuitous correspondences due to counfounding by hashing (which result in "jackpot") 2. c } equal(a, b) char *a, *b; { while(*a++ == *b) if(*b++ == 0) return(1); return(0); } buf1, *buf2; struct cand { int x; int y; struct cand *pred; } cand; struct line { int serial; int value; } *file[2], line; int len[2]; int *class; /*will be overlaid on file[0]*/ int *member; /*will be overlaid on file[1]*/ struct cand **klist; /*will be overlaid on file[0] after class*/ int *J; /*will be overlaid on class*/ int *ixold; /*will be overlaid on klist*/ int *ixnew; /*will be overlaid on file[1]*/ char *area; char *top; alloc(n) { register char *p; p = area; n = (n+1) & ~1; area =+ nollect random access indexes to the two files */ check(argv) char **argv; { register int i, j; int ctold, ctnew; int jackpot; char c,d; fopen(argv[1],buf1); fopen(argv[2],buf2); j = 1; ctold = ctnew = 0; ixold[0] = ixnew[0] = 0; jackpot = 0; for(i=1;i<=len[0];i++) { if(J[i]==0) { while(getc(buf1)!='\n') ctold++; ixold[i] = ++ctold; continue; } while(jfdes); close(buf2->fdes); return(jackpot); } output(argv) char **argv; { int dir; int m; int i0,i1,j0,j1; extern fout; dir = **argv=='-'; fout = dup(1)#define LCASE 01 #define UCASE 02 #define SWAB 04 #define NERR 010 #define SYNC 020 int cflag; int fflag; int skip; int count; char *string; char *ifile; char *ofile; char *ibuf; char *obuf; char *ibs 512; char *obs 512; char *bs; char *cbs; char *ibc; char *obc; char *cbc; int nifr; int nipr; int nofr; int nopr; int ntrunc; int ibf; int obf; char *op; int nspace; char etoa[] { 0000,0001,0002,0003,0234,0011,0206,0177, 0227,0215,0216,0013,0014,0015,0016,0017, 0020,0021,0022,0023,0235,0205,0010,0207, 0030flag =| UCASE; goto cloop; } if(match("swab")) { cflag =| SWAB; goto cloop; } if(match("noerror")) { cflag =| NERR; goto cloop; } if(match("sync")) { cflag =| SYNC; goto cloop; } } printf("bad arg: %s\n", string); exit(); } if(conv == null && cflag&(LCASE|UCASE)) conv = cnull; if (ifile) ibf = open(ifile, 0); else ibf = dup(0); if(ibf < 0) { printf("cannot open: %s\n", ifile); exit(); } if (ofile) obf = creat(ofile, 0666); else obf; buf1->fdes = open(argv[1],0); buf2->fdes = open(argv[2],0); m = len[0]; J[0] = 0; J[m+1] = len[1]+1; if(dir==0) for(i0=1;i0<=m;i0=i1+1) { while(i0<=m&&J[i0]==J[i0-1]+1) i0++; j0 = J[i0-1]+1; i1 = i0-1; while(i1=1;i0=i1-1) { while(i0>=1&&J[i0]==J[i0+1]-1&&J[i0]!=0) i0--; j0 = J[i0+1]-1; i1 = i0+1; while(i1>1&&J[i1-1]==0) i1--; j1 = J[i1-1]+1; J[i1] = j1; change(i1,i0,j1,j0,dir); ,0031,0222,0217,0034,0035,0036,0037, 0200,0201,0202,0203,0204,0012,0027,0033, 0210,0211,0212,0213,0214,0005,0006,0007, 0220,0221,0026,0223,0224,0225,0226,0004, 0230,0231,0232,0233,0024,0025,0236,0032, 0040,0240,0241,0242,0243,0244,0245,0246, 0247,0250,0133,0056,0074,0050,0053,0041, 0046,0251,0252,0253,0254,0255,0256,0257, 0260,0261,0135,0044,0052,0051,0073,0136, 0055,0057,0262,0263,0264,0265,0266,0267, 0270,0271,0174,0054,0045,0137,0076,0077, 0272,0273,0274,0275,0276,0277,0300,0301, 0302,0140,00 = dup(1); if(obf < 0) { printf("cannot create: %s\n", ofile); exit(); } if (bs) { ibs = obs = bs; if (conv == null) fflag++; } if(ibs == 0 || obs == 0) { printf("counts: cannot be zero\n"); exit(); } ibuf = sbrk(ibs); if (fflag) obuf = ibuf; else obuf = sbrk(obs); if(ibuf == -1 || obuf == -1) { printf("not enough memory\n"); exit(); } ibc = 0; obc = 0; cbc = 0; op = obuf; if ((signal(2, 1) & 01) == 0) signal(2, term); while(skip) { read(ibf, ibuf, ibs); skip-- } if(m==0) change(1,0,1,len[1],dir); flush(); } change(a,b,c,d,dir) { if(a>b&&c>d) return; range(a,b); putchar(a>b?'a':c>d?'d':'c'); if(dir==0) range(c,d); putchar('\n'); if(dir==0) { fetch(ixold,a,b,buf1,"* "); if(a<=b&&c<=d) printf("---\n"); } fetch(ixnew,c,d,buf2,dir==0?". ":""); if(dir!=0&&c<=d) printf(".\n"); } range(a,b) { if(a>b) printf("%d",b); if(a<=b) printf("%d",a); if(aibuf;) *--ip = 0; ibc = read(ibf, ibuf, ibs); } if(ibc == -1) { perror("read"); if((cflag&NERR) == 0) { flsh(); term(); } ibc = 0; for(c=0; cfdes,f[i-1],0); nc = read(lb->fdes,lb->data,f[i]-f[i-1]); printf(pref); for(j=0;jdata[j]); } } 0360,0361,0362,0363, 0134,0237,0123,0124,0125,0126,0127,0130, 0131,0132,0364,0365,0366,0367,0370,0371, 0060,0061,0062,0063,0064,0065,0066,0067, 0070,0071,0372,0373,0374,0375,0376,0377, }; char atoe[] { 0000,0001,0002,0003,0067,0055,0056,0057, 0026,0005,0045,0013,0014,0015,0016,0017, 0020,0021,0022,0023,0074,0075,0062,0046, 0030,0031,0077,0047,0034,0035,0036,0037, 0100,0117,0177,0173,0133,0154,0120,0175, 0115,0135,0134,0116,0153,0140,0113,0141, 0360,0361,0362,0363,0364,0365,0366,0367, 0370,0371,0>>1) & ~1; if(cflag&SWAB && c) do { a = *ip++; ip[-1] = *ip; *ip++ = a; } while(--c); ip = ibuf; if (fflag) { obc = ibc; flsh(); ibc = 0; } goto loop; } c = 0; c =| *ip++; (*conv)(c); goto loop; } flsh() { register c; if(obc) { if(obc == obs) nofr++; else nopr++; c = write(obf, obuf, obc); if(c != obc) { perror("write"); term(); } obc = 0; } } match(s) char *s; { register char *cs; cs = string; while(*cs++ == *s) if(*s++ == '\0') gotochar *dargv[] { 0, "/dev/rk2", "/dev/rp0", 0 }; struct { char *s_isize; char *s_fsize; int s_nfree; int s_free[100]; int s_ninode; int s_inode[100]; char s_flock; char s_ilock; char s_fmod; int time[2]; int pad[50]; } sblock; int fi; main(argc, argv) char **argv; { int i; if(argc <= 1) { for(argc = 1; dargv[argc]; argc++); argv = dargv; } for(i=1; i 1) printf("%s ", argv[i]); dfree(argv[i]); } } dfree(file) char *file; { int i; fi = open(file, 0)172,0136,0114,0176,0156,0157, 0174,0301,0302,0303,0304,0305,0306,0307, 0310,0311,0321,0322,0323,0324,0325,0326, 0327,0330,0331,0342,0343,0344,0345,0346, 0347,0350,0351,0112,0340,0132,0137,0155, 0171,0201,0202,0203,0204,0205,0206,0207, 0210,0211,0221,0222,0223,0224,0225,0226, 0227,0230,0231,0242,0243,0244,0245,0246, 0247,0250,0251,0300,0152,0320,0241,0007, 0040,0041,0042,0043,0044,0025,0006,0027, 0050,0051,0052,0053,0054,0011,0012,0033, 0060,0061,0032,0063,0064,0065,0066,0010, 0070,0071,0072,0073 true; if(*s != '\0') return(0); true: cs--; string = cs; return(1); } number() { register char *cs; register n; cs = string; n = 0; while(*cs >= '0' && *cs <= '9') n = n*10 + *cs++ - '0'; for(;;) switch(*cs++) { case 'k': n =* 1024; continue; case 'w': n =* 2; continue; case 'b': n =* 512; continue; case '*': case 'x': string = cs; n =* number(); case '\0': return(n); } printf("not a number: %s\n", string); exit(); } cnull(cc) { register c; c = cc; if(; if(fi < 0) { printf("cannot open %s\n", file); return; } sync(); bread(1, &sblock); i = 0; while(alloc()) i++; printf("%l\n", i); close(fi); } alloc() { int b, i, buf[256]; i = --sblock.s_nfree; if(i<0 || i>=100) { printf("bad free count\n"); return(0); } b = sblock.s_free[i]; if(b == 0) return(0); if(b=sblock.s_fsize) { printf("bad free block (%l)\n", b); return(0); } if(sblock.s_nfree <= 0) { bread(b, buf); sblock.s_nfree = buf[0]; for(i=0;,0004,0024,0076,0341, 0101,0102,0103,0104,0105,0106,0107,0110, 0111,0121,0122,0123,0124,0125,0126,0127, 0130,0131,0142,0143,0144,0145,0146,0147, 0150,0151,0160,0161,0162,0163,0164,0165, 0166,0167,0170,0200,0212,0213,0214,0215, 0216,0217,0220,0232,0233,0234,0235,0236, 0237,0240,0252,0253,0254,0255,0256,0257, 0260,0261,0262,0263,0264,0265,0266,0267, 0270,0271,0272,0273,0274,0275,0276,0277, 0312,0313,0314,0315,0316,0317,0332,0333, 0334,0335,0336,0337,0352,0353,0354,0355, 0356,0357,0372,0373,0374,03cflag&UCASE && c>='a' && c<='z') c =+ 'A'-'a'; if(cflag&LCASE && c>='A' && c<='Z') c =+ 'a'-'A'; null(c); } null(c) { *op = c; op++; if(++obc >= obs) { flsh(); op = obuf; } } ascii(cc) { register c; c = 0; c =| etoa[cc]; if(cbs == 0) { cnull(c); return; } if(c == ' ') { nspace++; goto out; } while(nspace > 0) { null(' '); nspace--; } cnull(c); out: if(++cbc >= cbs) { null('\n'); cbc = 0; nspace = 0; } } ebcdic(cc) { register c; c = cc; if(cflag&UCASE &&  i<100; i++) sblock.s_free[i] = buf[i+1]; } return(b); } bread(bno, buf) { int n; extern errno; seek(fi, bno, 3); if((n=read(fi, buf, 512)) != 512) { printf("read error %d\n", bno); printf("count = %d; errno = %d\n", n, errno); exit(); } } 75,0376,0377, }; main(argc, argv) int argc; char **argv; { register (*conv)(); register char *ip; register c; int ebcdic(), ascii(), null(), cnull(), term(); int a; conv = null; for(c=1; c= 0) { time(wtmp[1].wtime); wtmp[1].tty = '}'; seek(wf, 0, 2); write(wf, wtmp, 32); } } if (tfailed==0) time(timbuf); cbp = cbuf; ctime(timbuf); write(1, cbuf, 20); tzn = tzname[localtime(timbuf)[8]]; if (tzn) writehtab[i%hshsiz].hflag = FKEYW; } while(!eof) { extdef(); blkend(); } outcode("B", EOF); strflg++; outcode("B", EOF); fflush(obuf); fflush(sbuf); exit(nerror!=0); } /* * Look up the identifier in symbuf in the symbol table. * If it hashes to the same spot as a keyword, try the keyword table * first. An initial "." is ignored in the hash. * Return is a ptr to the symbol table entry. */ lookup() { int ihash; register struct hshtab *rp; register char *sp, *np; ihash = 0; sp = symbuf; inerror); } while (--argc) { argv++; if (**argv=='-') switch ((*argv)[1]) { case 's': sflg++; continue; case 'i': lp = ilist; while (lp < &ilist[NI-1] && (n = number(argv[1]))) { *lp++ = n; argv++; argc--; } *lp++ = -1; continue; default: printf("Bad flag\n"); } check(*argv); } return(nerror); } check(file) char *file; { register i, j; fi = open(file, 0); if(fi < 0) { printf("cannot open %s\n", file); return; } headpr = 0; printf("%s:\n", fil(1, tzn, 3); write(1, cbuf+19, 6); } gtime() { register int i; register int y, t; int d, h, m; extern int *localtime(); int nt[2]; t = gpair(); if(t<1 || t>12) goto bad; d = gpair(); if(d<1 || d>31) goto bad; h = gpair(); if(h == 24) { h = 0; d++; } m = gpair(); if(m<0 || m>59) goto bad; y = gpair(); if (y<0) { time(nt); y = localtime(nt)[5]; } if (*cbp == 'p') h =+ 12; if (h<0 || h>23) goto bad; timbuf[0] = 0; timbuf[1] = 0; y =+ 1900; for(i=1970; ihflag&FKEYW) if (findkw()) return(KEYW); while (*(np = rp->name)) { for (sp=symbuf; sp= &hshtab[hshsiz]) rp = hshtab; } if(++hshused >= hshsiz) { error("Symbol table overflow"); exit(1); } rp->hclass = 0; rp->htype = 0; rp->hoffset = 0; rp->dimp = 0; rp->hflag =| xdflg; sp = symbuf; for (e); sync(); bread(1, &sblock, 512); nfiles = sblock.s_isize*16; if (lasts < nfiles) { if ((sbrk(nfiles - lasts)) == -1) { printf("Not enough core\n"); exit(04); } lasts = nfiles; } for (i=0; i= 3) gdadd(1); while(--t) gdadd(dmsize[t-1]); gdadd(d-1); gmdadd(24, h); gmdadd(60, m); gmdadd(60, 0); return(0); bad: return(1); } gdadd(n) { register char *t; t = timbuf[1]+n; if(t < timbuf[1]) timbuf[0]++; timbuf[1] = t; } gmdadd(m, n) { register int t1; timbuf[0] =* m; t1 = timbuf[1]; while(--m) gdadd(t1); gdadd(n); } gpair() { register int c, d; register char *cp; cp = cbp; if(*cp == 0) return(-1); c = (*cp+np=rp->name; spkwname); kp++) { p1 = wp; while (*p1 == *p2++) if (*p1++ == '\0') { cval = kp->kwval; return(1); } } return(0); } /* * Return the next symbol from the input. * peeksym is ailes; j++) { ino++; pass2(&inode[j]); } } } pass1(aip) struct inode *aip; { register doff; register struct inode *ip; register struct dir *dp; int i; ip = aip; if((ip->i_mode&IALLOC) == 0) return; if((ip->i_mode&IFMT) != IFDIR) return; doff = 0; while (dp = dread(ip, doff)) { doff =+ 16; if (dp->ino==0) continue; for (i=0; ilist[i] != -1; i++) if (ilist[i]==dp->ino) printf("%5l arg; %l/%.14s\n", dp->ino, ino, dp->name); ecount[dp->ino]++; } } pass2(aip) { registe+ - '0') * 10; if (c<0 || c>100) return(-1); if(*cp == 0) return(-1); if ((d = *cp++ - '0') < 0 || d > 9) return(-1); cbp = cp; return (c+d); }  pushed-back symbol, peekc is a pushed-back * character (after peeksym). * mosflg means that the next symbol, if an identifier, * is a member of structure or a structure tag, and it * gets a "." prepended to it to distinguish * it from other identifiers. */ symbol() { register c; register char *sp; if (peeksym>=0) { c = peeksym; peeksym = -1; if (c==NAME) mosflg = 0; return(c); } if (peekc) { c = peekc; peekc = 0; } else if (eof) return(EOF); else c = getchar(); loop: r struct inode *ip; register i; ip = aip; i = ino; if ((ip->i_mode&IALLOC)==0 && ecount[i]==0) return; if (ip->i_nlink==ecount[i] && ip->i_nlink!=0) return; if (headpr==0) { printf("entries link cnt\n"); headpr++; } printf("%l %d %d\n", ino, ecount[i]&0377, ip->i_nlink&0377); } dread(aip, aoff) { register b, off; register struct inode *ip; static ibuf[256]; static char buf[512]; off = aoff; ip = aip; if ((off&0777)==0) { if (off==0177000) { printf("Monstrous directory %l\   #&),/25!$'*switch(ctab[c]) { case INSERT: /* ignore newlines */ inhdr = 1; c = getchar(); goto loop; case NEWLN: if (!inhdr) line++; inhdr = 0; case SPACE: c = getchar(); goto loop; case EOF: eof++; return(0); case PLUS: return(subseq(c,PLUS,INCBEF)); case MINUS: return(subseq(c,subseq('>',MINUS,ARROW),DECBEF)); case ASSIGN: if (subseq(' ',0,1)) return(ASSIGN); c = symbol(); if (c>=PLUS && c<=EXOR) { if (spnextchar() != ' ' && (c==MINUS || c==AND || c==TIMES)) { n", ino); return(0); } if ((ip->i_mode&ILARG)==0) { if (off>=010000 || (b = ip->i_addr[off>>9])==0) return(0); bread(b, buf, 512); } else { if (off==0) { if (ip->i_addr[0]==0) return(0); bread(ip->i_addr[0], ibuf, 512); } if ((b = ibuf[(off>>9)&0177])==0) return(0); bread(b, buf, 512); } } return(&buf[off&0777]); } bread(bno, buf, cnt) { seek(fi, bno, 3); if(read(fi, buf, cnt) != cnt) { printf("read error %d\n", bno); exit(); } } bwrite(bno, buf)# /* C compiler * * * * Called from cc: * c0 source temp1 temp2 [ profileflag ] * temp1 contains some ascii text and the binary expression * trees. Each tree is introduced by the # character. * Strings are put on temp2, which cc tacks onto * temp1 for assembly. */ #include "c0h.c" int isn 1; int stflg 1; int peeksym -1; int line 1; int debug 0; int dimp 0; struct tname funcblk { NAME, 0, 0, REG, 0, 0 }; int *treespace { osspace }; struct kwtab { char *kwname; int kwval; } kwtab[] { "int", error("Warning: assignment operator assumed"); nerror--; } return(c+ASPLUS-PLUS); } if (c==ASSIGN) return(EQUAL); peeksym = c; return(ASSIGN); case LESS: if (subseq(c,0,1)) return(LSHIFT); return(subseq('=',LESS,LESSEQ)); case GREAT: if (subseq(c,0,1)) return(RSHIFT); return(subseq('=',GREAT,GREATEQ)); case EXCLA: return(subseq('=',EXCLA,NEQUAL)); case DIVIDE: if (subseq('*',1,0)) return(DIVIDE); while ((c = spnextchar()) != EOF) { peekc = 0; if (c=='*')  { seek(fi, bno, 3); if(write(fi, buf, 512) != 512) { printf("write error %d\n", bno); exit(); } } number(as) char *as; { register n, c; register char *s; s = as; n = 0; while ((c = *s++) >= '0' && c <= '9') { n = n*10+c-'0'; } return(n); }  INT, "char", CHAR, "float", FLOAT, "double", DOUBLE, "struct", STRUCT, "long", LONG, "auto", AUTO, "extern", EXTERN, "static", STATIC, "register", REG, "goto", GOTO, "return", RETURN, "if", IF, "while", WHILE, "else", ELSE, "switch", SWITCH, "case", CASE, "break", BREAK, "continue", CONTIN, "do", DO, "default", DEFAULT, "for", FOR, "sizeof", SIZEOF, 0, 0, }; main(argc, argv) char *argv[]; { extern fin; register char *sp; register i; register struct kwtab *ip; if(arg{ if (spnextchar() == '/') { peekc = 0; c = getchar(); goto loop; } } } eof++; error("Nonterminated comment"); return(0); case PERIOD: case DIGIT: peekc = c; if ((c=getnum(c=='0'?8:10)) == FCON) cval = isn++; return(c); case DQUOTE: return(getstr()); case SQUOTE: return(getcc()); case LETTER: sp = symbuf; if (mosflg) { *sp++ = '.'; mosflg = 0; } while(ctab[c]==LETTER || ctab[c]==DIGIT) { if (sp 1) { cbp = argv[1]; if(gtime()) { write(1, "bad conversion\n", 15); exit(); } if (*cbp != 's') { /* convert to Greenwich time, on assumption of Standard time. */ dpadd(timbuf, timezone);c<3) { error("Arg count"); exit(1); } if((fin=open(argv[1],0))<0) { error("Can't find %s", argv[1]); exit(1); } if (fcreat(argv[2], obuf)<0 || fcreat(argv[3], sbuf)<0) { error("Can't create temp"); exit(1); } if (argc>4) proflg++; /* * The hash table locations of the keywords * are marked; if an identifier hashes to one of * these locations, it is looked up in in the keyword * table first. */ for (ip=kwtab; (sp = ip->kwname); ip++) { i = 0; while (*sp) i =+ *sp++; hs); } while(sp= 0) { nchstr++; if (sp >= &savstr[STRSIZ]) { sp = savstr; error("String too long"); } *sp++ = c; } strptr = sp; cval = isn++; return(STRING); } /* * Write out a string, either in-line * or in the string temp file labelled by * lab. */ putstr(lab) { register char *sp; if (lab) { strflg++; outcode("BN(opdope[o]>>9) & 077; if ((o==COMMA || o==COLON) && initflg) p = 05; opon1: ps = *pp; if (p>ps || p==ps && (opdope[o]&RASSOC)!=0) { switch (o) { case INCAFT: case DECAFT: p = 37; break; case LPARN: case LBRACK: case CALL: p = 04; } if (op >= &opst[SSIZE-1]) { error("expression overflow"); exit(1); } *++op = o; *++pp = p; goto advanc; } --pp; switch (os = *op--) { case SEOF: peeksym = o; build(0); /* flush conversions */ return(*--cp); case CALL: i*wheel4; wheel5 = *wheel5; wheel6 = *wheel6; random = 0; i = 27; while (i--){ random = random + ((temp & cage[i]) != 0); } random =% 26; /* now we have a random number to use to encrypt the input it is done in such a way that the process is its own inverse. */ if ( precious=='\n' || precious==' ') crypt = precious; else{ crypt = ('a' + 'z' - precious + random)%0400; if (crypt >= 'a' && crypt <= 'z' && precious > 'z') crypt =+ 26; if (crypt > 'z' && precious >= 'a' & precious <= 'zB", LABEL, lab, BDATA); } else outcode("B", BDATA); for (sp = savstr; sp= 0) if(cc++ < NCPW) *ccp++ = c; if(cc>NCPW) error("Long character constant"); return(CON); } /* * Read a character inf (o!=RPARN) goto syntax; build(os); goto advanc; case MCALL: *cp++ = block(0,0,0,0); /* 0 arg call */ os = CALL; break; case INCBEF: case INCAFT: case DECBEF: case DECAFT: *cp++ = block(1, CON, INT, 0, 1); break; case LPARN: if (o!=RPARN) goto syntax; goto advanc; case LBRACK: if (o!=RBRACK) goto syntax; build(LBRACK); goto advanc; } build(os); goto opon1; syntax: error("Expression syntax"); errflush(o); return(0); } /* * Generate a tree node for a name.') crypt =- 26; if (crypt == '\n' || crypt == ' ') crypt = precious; } putchar(crypt); } flush(); return; } char ibuf[512]; char obuf[512]; char *ibufp; int icnt; int ocnt; getchar() { if(icnt == 0) { icnt = read(0, ibuf, 512); if(icnt <= 0) return(-1); ibufp = ibuf; } icnt --; return(*ibufp++ & 0377); } putchar(c) { obuf[ocnt++] = c; if(ocnt >= 512) flush(); } flush() { if(ocnt > 0) write(1, obuf, ocnt); ocnt = 0; }  a string or character constant, * detecting the end of the string. * It implements the escape sequences. */ mapch(ac) { register int a, c, n; static mpeek; c = ac; if (a = mpeek) mpeek = 0; else a = getchar(); loop: if (a==c) return(-1); switch(a) { case '\n': case '\0': error("Nonterminated string"); peekc = a; return(-1); case '\\': switch (a=getchar()) { case 't': return('\t'); case 'n': return('\n'); case 'b': return('\b'); case '0': case '1': case '2' * All the relevant info from the symbol table is * copied out, including the name if it's an external. * This is because the symbol table is gone in the next * pass, so a ptr isn't sufficient. */ copname(acs) struct hshtab *acs; { register struct hshtab *cs; register struct tname *tp; register char *cp1; int i; char *cp2; cs = acs; tp = gblock(sizeof(*tp)/NCPW); tp->op = NAME; tp->type = cs->htype; tp->dimp = cs->hdimp; if ((tp->class = cs->hclass)==0) tp->class = STATIC; tp->offset = 0#define ANY -1 #define LIST -2 #define RANGE -3 #define EOF -4 char *crontab "/usr/lib/crontab"; char *crontmp "/tmp/crontmp"; char *aend; char *itime[2]; int *loct; int *localtime(); int reset(); int flag; main() { register i, t; register char *cp; extern char end[]; setuid(1); itime[0] = fork(); if(itime[0]) exit(); setexit(); signal(1, reset); time(itime); while(*localtime(itime)) if(itime[1]-- == 0) itime[0]--; loop: init(); for(i=60; i; i--) { loct = localtime(itime); for(cp =: case '3': case '4': case '5': case '6': case '7': n = 0; c = 0; while (++c<=3 && '0'<=a && a<='7') { n =<< 3; n =+ a-'0'; a = getchar(); } mpeek = a; return(n); case 'r': return('\r'); case '\n': if (!inhdr) line++; inhdr = 0; a = getchar(); goto loop; } } return(a); } /* * Read an expression and return a pointer to its tree. * It's the classical bottom-up, priority-driven scheme. * The initflg prevents the parse from going past * "," or ":; tp->nloc = cs->hoffset; if (cs->hclass==EXTERN) { gblock((ncps-NCPW)/NCPW); cp1 = tp->nname; cp2 = cs->name; i = ncps; do { *cp1++ = *cp2++; } while (--i); } if (cs->hflag&FFIELD) tp->class = FMOS; return(tp); }  end; *cp != EOF;) { flag = 0; cp = cmp(cp, loct[1]); /* minute */ cp = cmp(cp, loct[2]); /* hour */ cp = cmp(cp, loct[3]); /* day */ cp = cmp(cp, loct[4]); /* month */ cp = cmp(cp, loct[6]); /* day of week */ if(flag == 0) { slp(); ex(cp); } while(*cp++ != 0) ; } t = itime[1] + 60; if(t < itime[1]) itime[0]++; itime[1] = t; } slp(); goto loop; } cmp(p, v) char *p; { register char *cp; cp = p; switch(*cp++) { case ANY: return(cp); case LIST: " because those delimitesrs are special * in initializer (and some other) expressions. */ tree() { #define SEOF 200 #define SSIZE 20 int *op, opst[SSIZE], *pp, prst[SSIZE]; register int andflg, o; register struct hshtab *cs; int p, ps, os; space = treespace; op = opst; pp = prst; cp = cmst; *op = SEOF; *pp = 06; andflg = 0; advanc: switch (o=symbol()) { case NAME: cs = csym; if (cs->hclass==0 && cs->htype==0) if(nextchar()=='(') { /* set function */ cs->hclass = EXTERN; /* This routine is an exact implementation of Boris Hagelin's cryptographic machine. See U. S. Patent #2,089,603. */ int cagetable[] { 0, 1, 1, 2, 2, 3, 4, 4, 5, 6, 8, 8, 9, 10, 12, 16, 16, 17, 18, 20, 24, 32, 32, 33, 34, 36, 40, 48}; int warr1[52]; int warr2[50]; int warr3[46]; int warr4[42]; int warr5[38]; int warr6[34]; int *wheel1 warr1; int *wheel2 warr2; int *wheel3 warr3; int *wheel4 warr4; int *wheel5 warr5; int *wheel6 warr6; char key[130]; int xxx; /* subroutine to manufacture a wheel */ setwhile(*cp != LIST) if(*cp++ == v) { while(*cp++ != LIST) ; return(cp); } flag++; return(cp+1); case RANGE: if(*cp > v || cp[1] < v) flag++; return(cp+2); } if(cp[-1] != v) flag++; return(cp); } slp() { register i; int t[2]; time(t); i = itime[1] - t[1]; if(i > 0) sleep(i); } ex(s) char *s; { register i; if(fork()) { wait(); return; } for(i=0; s[i]; i++); close(0); creat(crontmp, 0600); write(0, s, i); close(0); open(crontmp, 0); unlink(crontmp); cs->htype = FUNC; } else if (initflg) cs->hclass = EXTERN; else { /* set label */ cs->htype = ARRAY; if (cs->hoffset==0) cs->hoffset = isn++; } *cp++ = copname(cs); goto tand; case FCON: if (!initflg) outcode("BBNB1N1N1N1N0B", DATA,LABEL, cval, WDATA, fcval, PROG); case CON: case SFCON: *cp++ = block(1,o,(o==CON?INT:DOUBLE),0,cval); goto tand; /* fake a static char array */ case STRING: putstr(cval); *cp++ = block(3, NAME, ARRAY+CHAR,0,STATIC,0,cup(list,n) int list[]; {int *lp; lp = list; while(--n){ *lp = lp+2; lp[1] = getbit(); if(xxx) putchar(lp[1]+'0'); lp = lp + 2; } *lp = list; lp[1] = getbit(); if(xxx){ putchar(lp[1]+'0'); putchar('\n'); } } /* subroutine to return the next bit from the main routines argument */ getbit(){ static i,j; int b; b = (key[j] >> i) & 1; if (i++ > 5) { j++; i = 0; } return (b); } main(ncooky,cookyp) int ncooky; char *cookyp[]; { char *ip, *jp; int temp; int random; i if(fork()) exit(); execl("/bin/sh", "sh", "-t", 0); exit(); } init() { int ib[259], t[10]; register i, c; register char *cp; char *ocp; int n; extern char end[]; if(fopen(crontab, ib) < 0) { write(1, "cannot open table\n", 18); exit(); } cp = end; if(aend == 0) aend = cp; loop: ocp = cp; if(cp+100 > aend) { aend =+ 512; brk(aend); } for(i=0;; i++) { do c = getc(ib); while(c == ' ' || c == '\t'); if(c <= 0 || c == '\n') goto ignore; if(i == 5) break; if(c ==val); tand: if(cp>=cmst+cmsiz) { error("Expression overflow"); exit(1); } if (andflg) goto syntax; andflg = 1; goto advanc; case INCBEF: case DECBEF: if (andflg) o =+ 2; goto oponst; case COMPL: case EXCLA: case SIZEOF: if (andflg) goto syntax; goto oponst; case MINUS: if (!andflg) { if ((peeksym=symbol())==FCON) { fcval = - fcval; goto advanc; } if (peeksym==SFCON) { fcval = - fcval; cval =^ 0100000; goto advanc; } o = NEG; nt i,j; int precious; int crypt; int cage[27]; xxx = 0; /* copy input key and pad with clever junk */ jp = key; *jp++ = 004; *jp++ = 034; if(ncooky > 1){ while (*jp++ = *cookyp[1]++); jp--; } ip = key; while (jp < key+128) { *jp = jp[-1] ^ *ip++; jp++; } /* manufacture six wheels of various length */ setup(wheel1,26); setup(wheel2,25); setup(wheel3,23); setup(wheel4,21); setup(wheel5,19); setup(wheel6,17); /* set up the cage bars from the key area */ jp = key; i = 27;  '*') { *cp++ = ANY; continue; } n = 0; while(c >= '0' && c <= '9') { n = n*10 + c-'0'; c = getc(ib); } if(n < 0 || n > 100) goto ignore; if(c == ',') goto list; if(c == '-') goto range; if(c != '\t' && c != ' ') goto ignore; *cp++ = n; continue; list: *cp++ = LIST; *cp++ = n; list1: n = 0; c = getc(ib); while(c >= '0' && c <= '9') { n = n*10 + c-'0'; c = getc(ib); } if(n < 0 || n > 100) goto ignore; *cp++ = n; if(c == ',') goto li} andflg = 0; goto oponst; case AND: case TIMES: if (andflg) andflg = 0; else if(o==AND) o = AMPER; else o = STAR; goto oponst; case LPARN: if (andflg) { o = symbol(); if (o==RPARN) o = MCALL; else { peeksym = o; o = CALL; andflg = 0; } } goto oponst; case RBRACK: case RPARN: if (!andflg) goto syntax; goto oponst; case DOT: case ARROW: mosflg++; break; } /* binaries */ if (!andflg) goto syntax; andflg = 0; oponst: p = while (i--){ cage[i] = cagetable[*jp++ % 28]; if(xxx && (cage[i] != 0)){ putchar( cage[i]/8 + '0'); putchar( cage[i]%8 + '0'); putchar(' '); } } if(xxx) putchar('\n'); /* the internal settings are now complete it's time to turn the crank, running the cage bars against the wheel lugs. */ while ((precious = getchar()) >=0){ temp = 040*wheel1[1] + 020*wheel2[1] + 010*wheel3[1] + 004*wheel4[1] + 002*wheel5[1] + 001*wheel6[1]; wheel1 = *wheel1; wheel2 = *wheel2; wheel3 = *wheel3; wheel4 = st1; if(c != '\t' && c != ' ') goto ignore; *cp++ = LIST; continue; range: *cp++ = RANGE; *cp++ = n; n = 0; c = getc(ib); while(c >= '0' && c <= '9') { n = n*10 + c-'0'; c = getc(ib); } if(n < 0 || n > 100) goto ignore; if(c != '\t' && c != ' ') goto ignore; *cp++ = n; } while(c != '\n') { if(c <= 0) goto ignore; if(c == '%') c = '\n'; *cp++ = c; c = getc(ib); } *cp++ = '\n'; *cp++ = 0; goto loop; ignore: cp = ocp; while(c != '\n') { if(c <= 0) { close(ib[0]); *cp++ = EOF; *cp++ = EOF; aend = cp; brk(aend); return; } c = getc(ib); } goto loop; } e if(fopen(s, b) == -1) { printf("Can't open %s\n", s); exit(1); } } g", 0100077, 0005500, SINGLE, "adc", 0100077, 0005600, SINGLE, "sbc", 0100077, 0005700, SINGLE, "tst", 0100077, 0006000, SINGLE, "ror", 0100077, 0006100, SINGLE, "rol", 0100077, 0006200, SINGLE, "asr", 0100077, 0006300, SINGLE, "asl", 0000077, 0000100, SINGLE, "jmp", 0000077, 0000300, SINGLE, "swab", 0000077, 0170100, SINGLW, "ldfps", 0000077, 0170200, SINGLW, "stfps", 0000077, 0170300, SINGLW, "stst", 0000077, 0170400, SINGLW, "clrf", 0000077, 0170500, SINGLW, "tstf", 0000077, 0170600, SINGL/* * cp oldfile newfile */ main(argc,argv) char **argv; { static int buf[256]; int fold, fnew, n; register char *p1, *p2, *bp; int mode; if(argc != 3) { write(1, "Usage: cp oldfile newfile\n", 26); exit(1); } if((fold = open(argv[1], 0)) < 0) { write(1, "Cannot open old file.\n", 22); exit(1); } fstat(fold, buf); mode = buf[2]; /* is target a directory? */ if (stat(argv[2], buf+50)>=0 && (buf[52]&060000)==040000) { p1 = argv[1]; p2 = argv[2]; bp = buf+100; while(*bp++ = *p2++int ibuf1[259]; int ibuf2[259]; int eflg; int lflg 1; int line[2] {0, 1}; int chr[2] { -1, -1}; main(argc, argv) char **argv; { register c1, c2; char *arg; if(argc < 3) goto narg; arg = argv[1]; if(arg[0] == '-' && arg[1] == 's') { lflg--; argv++; argc--; } arg = argv[1]; if(arg[0] == '-' && arg[1] == 'l') { lflg++; argv++; argc--; } if(argc < 3) goto narg; arg = argv[1]; if( arg[0]=='-' && arg[1]==0 ) ibuf1[0] = dup(0); else if(fopen(arg, ibuf1) < 0) goto barg; arg = argW, "absf", 0000077, 0170700, SINGLW, "negf", 0000077, 0006700, SINGLW, "sxt", 0000077, 0006600, SINGLW, "mtpi", 0000077, 0106600, SINGLW, "mtpd", 0000077, 0006500, SINGLW, "mfpi", 0000077, 0106500, SINGLW, "mfpd", 0000777, 0070000, MULDIV, "mul", 0000777, 0071000, MULDIV, "div", 0000777, 0072000, MULDIV, "ash", 0000777, 0073000, MULDIV, "ashc", 0000377, 0000400, BRANCH, "br", 0000377, 0001000, BRANCH, "bne", 0000377, 0001400, BRANCH, "beq", 0000377, 0002000, BRANCH, "bge", 0000377, 0002400, B); bp[-1] = '/'; p2 = bp; while(*bp = *p1++) if(*bp++ == '/') bp = p2; argv[2] = buf+100; } if (stat(argv[2], buf+50) >= 0) { if (buf[0]==buf[50] && buf[1]==buf[51]) { write(1, "Copying file to itself.\n", 24); exit(1); } } if ((fnew = creat(argv[2], mode)) < 0) { write(1, "Can't create new file.\n", 23); exit(1); } while(n = read(fold, buf, 512)) { if(n < 0) { write(1, "Read error\n", 11); exit(1); } else if(write(fnew, buf, n) != n){ write(1, "Write error.\nv[2]; if(fopen(arg, ibuf2) < 0) goto barg; loop: if (++chr[1]==0) chr[0]++; c1 = getc(ibuf1); c2 = getc(ibuf2); if(c1 == c2) { if (c1 == '\n') if (++line[1]==0) line[0]++; if(c1 == -1) { if(eflg) exit(1); exit(0); } goto loop; } if(lflg == 0) exit(1); if(c1 == -1) { arg = argv[1]; goto earg; } if(c2 == -1) goto earg; if(lflg == 1) { printf("%s %s differ: char %s, line ", argv[1], arg, locv(chr[0], chr[1])); printf("%s\n", locv(line[0], line[1])); exiRANCH, "blt", 0000377, 0003000, BRANCH, "bgt", 0000377, 0003400, BRANCH, "ble", 0000377, 0100000, BRANCH, "bpl", 0000377, 0100400, BRANCH, "bmi", 0000377, 0101000, BRANCH, "bhi", 0000377, 0101400, BRANCH, "blos", 0000377, 0102000, BRANCH, "bvc", 0000377, 0102400, BRANCH, "bvs", 0000377, 0103000, BRANCH, "bhis", 0000377, 0103400, BRANCH, "blo", 0000000, 0000000, NOADDR, "halt", 0000000, 0000001, NOADDR, "wait", 0000000, 0000002, NOADDR, "rti", 0000000, 0000004, NOADDR, "iot", 0000000, 0000005,", 13); exit(1); } } exit(0); } t(1); } eflg = 1; printf("%5s %3o %3o\n", locv(chr[0], chr[1]), c1, c2); goto loop; narg: printf("arg count\n"); exit(2); barg: printf("cannot open %s\n", arg); exit(2); earg: printf("EOF on %s\n", arg); exit(1); } putchar(c) { write(1, &c, 1); }  NOADDR, "reset", 0000377, 0171000, FLTREV, "mulf", 0000377, 0171400, FLTREV, "modf", 0000377, 0172000, FLTREV, "addf", 0000377, 0172400, FLTREV, "movf", 0000377, 0173000, FLTREV, "subf", 0000377, 0173400, FLTREV, "cmpf", 0000377, 0174000, FLTNOR, "movf", 0000377, 0174400, FLTREV, "divf", 0000377, 0175000, FLTNOR, "movei", 0000377, 0175400, FLTNOR, "movfi", 0000377, 0176000, FLTNOR, "movfo", 0000377, 0176400, FLTREV, "movie", 0000377, 0177000, FLTREV, "movif", 0000377, 0177400, FLTREV, "movof"#define LB 250 int one; int two; int three; char *ldr[3]; char ib1[518]; char ib2[518]; main(argc,argv) char *argv[]; { extern fout; int l; char lb1[LB],lb2[80]; ldr[0] = ""; ldr[1] = "\t"; ldr[2] = "\t\t"; if(argc > 1) { if(*argv[1] == '-' && argv[1][1] != 0) { l = 1; while(*++argv[1]) { switch(*argv[1]) { case'1': if(!one) { one = 1; ldr[1][0] = ldr[2][l--] = '\0'; } break; case '2': if(!two) { two = 1; ldr[2][l--] = '\0'; main(argc, argv) char **argv; { register i, m; register char *c; int count; if(argc < 3) { printf("arg count\n"); exit(1); } c = argv[1]; m = 0; for(m=0; *c; c++) { if(*c < '0' || *c > '7') { printf("bad mode\n"); exit(1); } m = (m<<3) | *c - '0'; } for(i=2; i=0) { if(*buf == '\n' || i > LB-2) { *buf = '\0'; return(0); } i++; buf++; } return(-1); } wr(str,n) char *str; { switch(n) { c# /* * C debugger -- part 2 */ char ssymbol[]; int dotinc; int dot; psymoff(v, lim) { register char *w; w = vallook(v); if (w > lim) { printf("%.1o", v); return; } printf("%.8s", ssymbol); if (w) printf("+%d", w); } #define ISP 1 #define DOUBLE 0 #define SINGLE 1 #define SINGLW 2 #define MULDIV 4 #define BRANCH 5 #define NOADDR 6 #define FLTREV 7 #define FLTNOR 8 #define SPECL1 9 #define SPECL2 10 #define SPECL3 11 #define SPECL4 12 #define SPECL5 13 #define SPECL6 14 #define SPECL7 15 #dtty", 0, "33", 0, "nice", 0, "sleep", 0, "sync", 1, "kill", 0, "switch", 0, "39", 0, "40", 0, "dup", 0, "pipe", 1, "times", 4, "profil", 0, "45", 0, "setgid", 0, "getgid", 2, "signal", 0, "49", 0, "50", 0, "51", 0, "52", 0, "53", 0, "54", 0, "55", 0, "56", 0, "57", 0, "58", 0, "59", 0, "60", 0, "61", 0, "62", 0, "63", }; char *regname[] { "r0", "r1", "r2", "r3", "r4", "r5", "sp", "pc"}; printins(f) { register ins, w; register struct optab *p; dotinc = 2; ins = cget(dot,ase 1: if(one) return; break; case 2: if(two) return; break; case 3: if(three) return; } printf("%s%s\n",ldr[n-1],str); } copy(ibuf,lbuf,n) { do { wr(lbuf,n); } while(rd(ibuf,lbuf) >= 0); flush(); exit(); } compare(a,b) char *a,*b; { register char *ra,*rb; ra = --a; rb = --b; while(*++ra == *++rb) if(*ra == '\0') return(0); if(*ra < *rb) return(1); return(2); } fexit() { flush(); exit(); } openfil(s,b) char *s; int *b; { if(s[0]=='-' && s[1]==0) b[0] = 0; elsefine SPECL8 18 #define SPECL9 19 struct optab { int mask; int val; int itype; char *iname; } optab[] { 0107777, 0010000, DOUBLE, "mov", 0107777, 0020000, DOUBLE, "cmp", 0107777, 0030000, DOUBLE, "bit", 0107777, 0040000, DOUBLE, "bic", 0107777, 0050000, DOUBLE, "bis", 0007777, 0060000, DOUBLE, "add", 0007777, 0160000, DOUBLE, "su", 0100077, 0005000, SINGLE, "clr", 0100077, 0005100, SINGLE, "com", 0100077, 0005200, SINGLE, "inc", 0100077, 0005300, SINGLE, "dec", 0100077, 0005400, SINGLE, "ne ISP); if (vallook(dot)==0) printf("%.8s:", ssymbol); printf("\t"); for (p=optab;; p++) if ((ins & ~p->mask) == p->val) break; printf("%s", p->iname); switch (p->itype) { /* rts */ case SPECL2: ins =& 07; case SINGLE: if (ins < 0) printf("b"); case SINGLW: printf("\t"); paddr(ins); return; case FLTREV: ins =& 0377; case MULDIV: ins = ((ins>>6)&07) | ((ins<<6)&07700); goto doub; case FLTNOR: ins =& 0377; /* jsr, xor */ case SPECL1: ins =& 0777; goto doub;  case DOUBLE: if (ins<0) printf("b"); doub: printf("\t"); paddr(ins>>6); printf(","); paddr(ins); return; case NOADDR: return; /* sob */ case SPECL8: printf("\t"); paddr((ins>>6)&07); printf(","); ins = - (ins&077); goto bran; case BRANCH: printf("\t"); bran: ins =& 0377; if (ins&0200) ins =| 0177400; ins = dot + (ins<<1) + 2; psymoff(ins, 010000); return; /* emt */ case SPECL4: ins =& 0377; /* mark */ case SPECL7: ins =& 077; /* spl */ case SPE", "Memory fault", "Bad system call", "", "", "", }; main(argc, argv) char **argv; { int onintr(); if (argc>1) symfil = argv[1]; if (argc>2) corfil = argv[2]; fcore = open(corfil, 0); if ((fsym = open(symfil, 0)) < 0) { printf("%s not found\n", symfil); return; } read(fsym, regbuf, 020); if (regbuf[0]==0411) /* I/D separated */ idsep++; else if (regbuf[0]!=0410 && regbuf[0]!=0407) { /* magic */ printf("Bad format: %s\n", symfil); return; } symoff = regbuf[1] + regbuf[2]; s (donef) return(adrflg); else lastop = *lp++; } goto loop; case ' ': case '\t': lp++; goto loop; case '[': lp++; t1 = ssymval; t2 = tdot; if (expr() == 0) tdot = 0; ssymval = cget(t1 + (tdot<<1), DSP); tdot = t2; if (*lp == ']') lp++; goto loop; } } symcollect(c) { register char *p; p = tsym; if (c) *p++ = c; while (symchar(1)) { if (p < &tsym[8]) *p++ = *lp; lp++; } while (p < &tsym[8]) *p++ = 0; } symchar(dig) { if (*lp>='a'&&*lp<='z' || CL9: ins =& 07; printf("\t%d", ins); return; /* sys */ case SPECL5: printf("\t%s", systab[ins =& 077].sname); if (ins==0 && f==0) { /* indir */ w = dot; dot = cget(dot+2, ISP); printf(" {"); printins(1); printf("}"); dotinc = 4; dot = w; return; } w = systab[ins].argc; while (w--) { printf("; "); psymoff(cget(dot+dotinc, ISP), 010000); dotinc =+ 2; } return; default: printf("\t%.1o", ins); } } paddr(aa) { register a, r; a = aa; r = a&07; a =ymlen = regbuf[4]; if (regbuf[7] != 1) symoff =<< 1; symoff =+ 020; seek(fsym, symoff, 0); symcor = read(fsym, symbuf, sizeof symbuf); if (symcor>0) symoff =+ symcor; symcor =>> 1; read(fcore, regbuf, 1024); signo = regbuf[0].u_arg[0]&017; regbuf->u_tsize =<< 6; regbuf->u_dsize =<< 6; regbuf->u_ssize =<< 6; rtsize = (regbuf->u_tsize+017777) & ~017777; if (symlook("csv\0\0\0\0")) loccsv = ssymval; if (symlook("savr5\0\0\0")) locsr5 = ssymval; setstack(); signal(SIGINS, onintr); setex*lp=='_') return(1); if (dig && *lp>='0' && *lp<='9') return(1); return(0); } error() { errflg++; reset(); } printtrace() { int tpc, tr5, narg, argp, i; if (modifier=='r') { printregs(); return; } if (modifier=='f' || modifier=='d') { printfregs(); return; } tpc = uregs[pc]; tr5 = uregs[r5]; if (locsr5) if (narg = get(locsr5, DSP)) { tr5 = narg; } callev = 0; while (errflg == 0) { narg = findroutine(tpc, tr5); printf("%2d: %.8s(", callev, ssymbol); if (--narg >= 0) & 070; if (r==7 && a&020) { if (a&010) printf("*"); if (a&040) psymoff(cget(dot+dotinc, ISP)+dot+dotinc+2, 010000); else { printf("$"); psymoff(cget(dot+dotinc, ISP), 010000); } dotinc =+ 2; return; } r = regname[r]; switch (a) { /* r */ case 000: printf("%s", r); return; /* (r) */ case 010: printf("(%s)", r); return; /* *(r)+ */ case 030: printf("*"); /* (r)+ */ case 020: printf("(%s)+", r); return; /* *-(r) */ case 050: printf("*"); /* -(r) */ cit(); signal(SIGINT, onintr); loop: if (errflg) { printf("?\n"); errflg = 0; } lp = line; while ((*lp = getchar()) != '\n') if (*lp++ == '\0') { if (pid) ptrace(EXIT, pid, 0, 0); return; } lp = line; command(); goto loop; } command() { register n; adrflg = expr(); if (errflg) return; n = getcnt(); if (lastcom=='$') lastcom = '/'; if (*lp == '\n') { if (!adrflg) dot =+ dotinc; } else lastcom = *lp++; modifier = 0; if (*lp != '\n') modifier = *lp++; if (lastc printf("%.1o", get(tr5+4, DSP)); argp = tr5+4; while(--narg >= 0) printf(",%.1o", get(argp =+ 2, DSP)); printf(")\n"); tpc = get(tr5+2, DSP); if (callev < 50) { entpt[callev] = ssymval; callist[callev++] = tr5; } if ((tr5 = get(tr5, DSP)) == 0) break; } } setstack() { register int tpc, tr5, i; tpc = uregs[pc]; tr5 = uregs[r5]; if (locsr5) if (i = get(locsr5, DSP)) { tr5 = i; } callev = 0; while (errflg == 0) { findroutine(tpc, tr5); tpc = get(tr5+2, DSP); iase 040: printf("-(%s)", r); return; /* *x(r) */ case 070: printf("*"); /* x(r) */ case 060: psymoff(cget(dot+dotinc, ISP), 010000); dotinc =+ 2; printf("(%s)", r); return; } } om=='%' && modifier=='r') { runcom(); return; } if (*lp != '\n') { errflg++; return; } if (adrflg) dot = tdot; while(n) { scommand(n); if (errflg) return; if (--n) dot =+ dotinc; } } scommand(n) { register w, c; double fw; struct { int i[4]; }; int onintr(); switch(lastcom) { case '/': w = cget(dot, DSP); if (modifier) lastype = modifier; switch(lastype) { case 'o': printf("%.1o\n", w); dotinc = 2; return; case 'i': printf("%d\n", w); dotincf (callev >= 50) break; entpt[callev] = ssymval; callist[callev++] = tr5; if ((tr5 = get(tr5, DSP)) == 0) break; } errflg = 0; } printfregs() { register i; double f; printf("fpsr %.1o\n", regbuf[0].fpsr); for (i=0; i<6; i++) { if (regbuf[0].fpsr&0200) /* long mode */ f = regbuf[0].lfr[frnames[i]]; else f = regbuf[0].sfr[frnames[i]]; printf("fr%d %e\n", i, f); } } printregs() { register struct reglist *p; register char *v, *d; for (p=reglist; p < ®list[9]; p++) { pr_beQTWZ]`cfRUX[^adghknqtwz}il = 2; return; case 'f': fw = 0; fw.i[0] = w; fw.i[1] = cget(dot+2, DSP); printf("%e\n", fw); dotinc = 4; return; case 'd': fw.i[0] = w; fw.i[1] = cget(dot+2, DSP); fw.i[2] = cget(dot+4, DSP); fw.i[3] = cget(dot+6, DSP); printf("%e\n", fw); dotinc = 8; return; } errflg++; return; case '\\': printf("%.1o\n", cget(dot, DSP)&0377); dotinc = 1; return; case '=': printf("%.1o\n", dot); return; case '\'': printc(cget(dot, DSP) & 0377); if (nintf("%s %.1o", p->rname, v=uregs[p->roffs]); d = vallook(v); if (d < 010000) { printf(" %.8s", ssymbol); if (d) printf("+%.1o", d); } printf("\n"); } } findroutine(rpc, rr5) { register callpt, inst, narg; callpt = get(rr5+2, DSP); if ((inst=get(callpt-4, ISP)) == 04737) /* jsr pc,*$... */ narg = 1; else if ((inst&~077)==04700) /* jsr pc,... */ narg = 0; else { errflg++; return(0); } inst = vallook((inst==04767?callpt:0) + get(callpt-2, ISP)); if (inst) { ssymbol[0] =# /* C debugger */ #include "/usr/sys/param.h" #include "/usr/sys/user.h" #define DSP 0 #define ISP 1 #define NBKP 10 #define SYMSIZ 12*400 #define BADJST 01 int fcore; int errno; int fsym; int symoff; char *lp; int errflg; int symlen; int symct; int symcor; int symbuf[SYMSIZ]; int *symptr; struct { int loc; int ins; int count; int flag; } bkptl[NBKP]; int lastbp; char symbol[8]; int symflg; int symval; char tsym[8]; char fsymbol[10]; char ssymbol[8]; int ssymflg; int ssymval; int signo; char line<=1) putchar('\n'); dotinc = 1; return; case '"': w = cget(dot, DSP); while(c = cget(w++, DSP)&0377) printc(c); putchar('\n'); return; case '&': psymoff(cget(dot, DSP), 0100000); printf("\n"); return; case '$': printf("%s\n", signals[signo]); printtrace(); return; case '?': printins(0); printf("\n"); return; case '%': runcom(); signal(SIGINT, onintr); return; } errflg++; } getcnt() { register t1, t2; if (*lp != ',') return(1); lp++; t1 = tdot;  '?'; ssymbol[1] = 0; ssymval = 0; } inst = get(callpt, ISP); if (inst == 05726) /* tst (sp)+ */ return(narg+1); if (inst == 022626) /* cmp (sp)+,(sp)+ */ return(narg+2); if (inst == 062706) /* add $n,sp */ return(narg+get(callpt+2, ISP)/2); return(narg); } runcom() { int stat; register w, i; switch(modifier) { /* delete breakpoint */ case 'd': if (adrflg==0) error(); for (w=0; w'~') printf("\\%o", c); else printf("%c", c); } expr() { int i, t1, t2, donef, lastop, b; tdot = 0; adrflg = 0; lastop = '+'; ssymval = 0; donef = 0; loop: fsymbol[0] = 0; if (symchar(0)) { adrflg++; symcollect('_'); if (*lp++==':' && symchar(0)) { for (i=0; i<8; i++) fsymbol[i if (lastbp==bkptl[w].loc) { ptrace(WUREGS,pid,2*(512+ps),uregs[ps]&~020); lastbp = 0; } else { ptrace(WUSER,pid,bkptl[w].loc,bkptl[w].ins); } bkptl[w].loc = 0; bkptl[w].flag = 0; return; } } error(); /* set breakpoint */ case 'b': if (adrflg==0) error(); for (w=0; w='0' && *lp<='9') { adrflg++; ssymval = 0; if (*lp == '0') b = 8; else b = 10; while (*lp>='0' && *lp<='9') { ssymval =* b; ssymval =+ *lp++ -'0'; } goto loop; } switch (*lp) { default: donef++; case '+': case '-': switch(lastop) { case '+': tdot =+ ssymval; goto op; case '-': tdot =- ssymval; op: ifrn; } error(); /* run program */ case 'r': lastbp = 0; if (pid) { ptrace(EXIT, pid, 0, 0); pid = 0; } if ((pid = fork())==0) { ptrace(SETTRC, 0, 0, 0); signal(SIGINT, 0); signal(SIGINS, 0); doexec(); printf("Can't execute %s\n", symfil); exit(0); } bpwait(0); setbp(1); ptrace(WUREGS, pid, 2*(512+ps), 0170000); case 'c': if (pid==0) error(); setbp(0); if (lastbp) { w = lastbp; ptrace(CONTIN, pid, 0, 0); bpwait(1); ptrace(WUSER, pid, w, 03); ptrace(WUREGS, pid, 2*(512+ps), uregs[ps]&~020); lastbp = 0; } ptrace(CONTIN, pid, 0, 0); bpwait(1); w = uregs[pc]-2; for (i=0; i= NBKP) { printf("%s\n", signals[signo]); return; } lastbp = w; ptrace(WUSER, pid, w, bkptl[i].ins); ptrace(WUREGS, pid, 2*(512+pc), w); ptrace(WUREGS, pid, 2*(512+ps), uregs[ps]|020); printf("Breakpoint: "); psymoff(w, 0777); printf("\n"); return; } error(); } doexec() { exter>u_dsize + regbuf->u_ssize; else errflg++; seek(fcore, addr+1024, 0); if (read(fcore, &w, 2) < 2) errflg++; return(w); } symset() { symct = symlen; symptr = symbuf; seek(fsym, symoff, 0); } symget() { register int *p, *q; if ((symct =- 12) < 0) return(0); if (symptr < &symbuf[symcor]) { p = symptr; for (q=symbol; q <= &symval;) *q++ = *p++; symptr = p; return(1); } return(read(fsym, symbol, 12) == 12); } savsym(skip) { register int ch; register char *p, *q; p = symbol; qsr/c/c1"; if (argv[i][2]=='2') pass2 = "/usr/c/c2"; break; } else { passa: t = argv[i]; if(getsuf(t)=='c') { clist[nc++] = t; t = setsuf(t, 'o'); } if (nodup(llist, t)) { llist[nl++] = t; if (getsuf(t)=='o') nxo++; } } } if(nc==0) goto nocom; if (pflag==0) { tmp0 = copy("/tmp/ctm0a"); while((c=open(tmp0, 0))>=0) { close(c); tmp0[9]++; } while((creat(tmp0, 0400))<0) tmp0[9]++; } if ((signal(2, 1) & 01) == 0) signal(2, &dexn _exectrap; char *argl[32]; register char *p, **ap; register c; _exectrap++; ap = argl; *ap++ = symfil; p = lp; do { while (*p==' ') p++; if (*p=='\n' || *p=='\0') break; *ap++ = p; while (*p!=' ' && *p!='\n') p++; c = *p; *p++ = '\0'; } while (c != '\n'); *ap++ = 0; execv(symfil, argl); } setbp(runflag) { register w, i1, l; int i2; for (w=0; w1) printf("%s:\n", clist[i]); av[0] = "c0"; if (pflag) tmp4 = setsuf(clist[i], 'i'); av[1] = expand(clist[i]); if (pflag || exfail) continue; if (av[1] == 0) { cflag++; continue; } av[2] = tmp1; av[3] = tmp2; if (proflag) { av[4] = "-P"; av[5] = 0; { /* jsr r5,... */ i2 = ptrace(RUSER, pid, l+2, 0); if (loccsv == i2+l+4) { /* jsr r5,csv */ l =+ 4; bkptl[w].loc = l; bkptl[w].flag =| BADJST; i1 = ptrace(RUSER, pid, l, 0); } } bkptl[w].ins = i1; ptrace(WUSER, pid, l, 03); if (errno) { printf("Can't set breakpoint "); psymoff(bkptl[w].loc); printf("\n"); } } } } bpwait(f) { extern int onintr(); register w; int stat; loop: signal(SIGINT, 1); while ((w = wait(&stat))!=pid && w != -1); / copy and execute DEC loaders core = 24. prs = 177550 mov $dldr,r0 mov $[core*2048.]-300,r1 mov r1,r2 1: mov (r0)+,(r1)+ cmp r0,$end blo 1b jmp (r2) dldr: 10706 24646 10705 62705 114 5001 13716 177570 6016 103402 5016 404 241 6116 1001 10116 5000 4715 105303 1374 4715 4767 74 10402 162702 4 22702 2 1441 4767 54 61604 10401 4715 2004 105700 1753 0 751 110321 770 16703 150 105213 105713 100376 116303 2 60300 42703 177400 5302 207 12667 44 4715} else av[4] = 0; if (callsys(pass0, av)) { cflag++; continue; } av[0] = "c1"; av[1] = tmp1; av[2] = tmp2; if (sflag) tmp3 = setsuf(clist[i], 's'); av[3] = tmp3; if (oflag) av[3] = tmp5; av[4] = 0; if(callsys(pass1, av)) { cflag++; continue; } if (oflag) { av[0] = "c2"; av[1] = tmp5; av[2] = tmp3; av[3] = 0; callsys(pass2, av); unlink(tmp5); } if (sflag) continue; av[0] = "as"; av[1] = "-"; av[2] = tmp3; av[3] = 0; cunlink(tmp1) signal(SIGINT, onintr); if (w == -1) { ptrace(EXIT, pid, 0, 0); pid = 0; printf("Wait error\n"); reset(); } if ((stat & 0377) != 0177) { if (signo = stat&0177) printf("%s\n", signals[signo]); printf("Process terminated.\n"); if (pid == w) { pid = 0; reset(); } goto loop; } signo = stat>>8; collinfo(); if (signo!=SIGTRC) { printf("%s\n", signals[signo]); reset(); } } collinfo() { register i; for (i=0; i<9; i++) uregs[reglist[i].roffs] = ptrace(RUREGS, pid,  10304 4715 303 50304 16707 26 4767 177752 4715 105700 1342 6204 103002 0 677 6304 114 0 . = dldr-500+744 16701 26 12702 352 5211 105711 100376 116162 2 [core*2048.]-400 5267 177756 765 prs end: ; cunlink(tmp2); cunlink(tmp4); callsys("/bin/as", av); t = setsuf(clist[i], 'o'); cunlink(t); if(link("a.out", t) || cunlink("a.out")) { printf("move failed: %s\n", t); cflag++; } } nocom: if (cflag==0 && nl!=0) { i = 0; av[0] = "ld"; av[1] = "-X"; av[2] = pref; j = 3; while(i=2 && symflg<=4) { ssymval = symval; return(1); } /* auto, arg */ if (symflg==1) { for (i=0; i>8)&0377 | (w1<<8); } errflg = errno; return(w); } w = 0; if (idsep==0&&addru_tsize || idsep&&space==ISP) { seek(fsym, addr+020, 0); if (read(fsym, &w, 2) != 2) errflg++; return(w); } if (addr < rtsize+regbuf->u_dsize) { if (idsep==0) addr =- rtsize; } else if (-addr < regbuf->u_ssize) addr =+ regbuf- break; case 'p': proflag++; pref = "/lib/mcrt0.o"; break; case 'P': pflag++; case 'c': cflag++; break; case 'f': pref = "/lib/fcrt0.o"; pass0 = "/lib/fc0"; pass1 = "/lib/fc1"; break; case '2': if(argv[i][2] == '\0') pref = "/lib/crt2.o"; else { pref = "/lib/crt20.o"; f20 = 1; } break; case 't': if (argv[i][2]=='0') pass0 = "/usr/c/c0"; if (argv[i][2]=='1') pass1 = "/uwhile ('a'<=(c=getch()) && c<='z' ||'A'<=c && c<='Z' ||'0'<=c && c<='9' ||c=='_') sch(c); sch('\0'); lp--; if (state>3) { if (flslvl==0 &&(state+!lookup(namep,-1)->name[0])==5) trulvl++; else flslvl++; out: while (c!='\n' && c!= '\0') c = getch(); return(c); } if (state!=2 || flslvl==0) { ungetc(c); np = lookup(namep, state); c = getch(); } if (state==1) { if (np==defloc) state = 2; else if (np==incloc) state = 3; else if (np==ifnloc) state = 4; else if (np==ifdloc) state = 5; else if (np==eifloc) { if (flslvl) --flslvl; else if (trulvl) --trulvl; else error("If-less endif"); goto out; } else { error("Undefined control"); while (c!='\n' && c!='\0') c = getch(); return(c); } } else if (state==2) { if (flslvl) goto out; np->value = stringbuf; savch(c); while ((c=getch())!='\n' && c!=(t=fork())==0) { execv(f, v); printf("Can't find %s\n", f); exit(1); } else if (t == -1) { printf("Try again\n"); return(1); } while(t!=wait(&status)); if ((t=(status&0377)) != 0 && t!=14) { if (t!=2) /* interrupt */ printf("Fatal error in %s\n", f); dexit(); } return((status>>8) & 0377); } copy(as) char as[]; { register char *otsp, *s; otsp = tsp; s = as; while(*tsp++ = *s++); return(otsp); } nodup(l, os) char **l, *os; { register char *t, *s; register int c; s = os# /* C compiler * * */ #include "c0h.c" /* * Process a single external definition */ extdef() { register o, elsize; int type, sclass; register struct hshtab *ds; if(((o=symbol())==EOF) || o==SEMI) return; peeksym = o; type = INT; sclass = EXTERN; xdflg = FNDEL; if ((elsize = getkeywords(&sclass, &type)) == -1 && peeksym!=NAME) goto syntax; if (type==STRUCT) blkhed(); do { defsym = 0; decl1(EXTERN, type, 0, elsize); if ((ds=defsym)==0) return; funcsym = ds; ds->hflag =| '\0') savch(c); savch('\0'); return(1); } continue; } else if ((sc=c)=='\'' || sc=='"') { sch(sc); filname = lp; instring++; while ((c=getch())!=sc && c!='\n' && c!='\0') { sch(c); if (c=='\\') sch(getch()); } instring = 0; if (flslvl) goto out; if (state==3) { if (flslvl) goto out; *lp = '\0'; while ((c=getch())!='\n' && c!='\0'); if (ibuf==ibuf2) error("Nested 'include'"); if (fopen(filname, ibuf2)<0) error("M; if (getsuf(s) != 'o') return(1); while(t = *l++) { while(c = *s++) if (c != *t++) break; if (*t=='\0' && c=='\0') return(0); s = os; } return(1); } cunlink(f) char *f; { if (f==0) return(0); return(unlink(f)); } expdef(proto) char *proto; { char buffer[100], *parg[20], *pval[20], name[20], *cspace, *wp; char protcop[100], *pr; int narg, k, i, c; pr = protcop; while (*pr++ = *proto++); proto= protcop; for (narg=0; (parg[narg] = token(&proto)) != 0; narg++) ; /* now scan input FNDEL; outcode("BS", SYMDEF, ds->name); xdflg = 0; if ((ds->type&XTYPE)==FUNC) { if ((peeksym=symbol())==LBRACE || peeksym==KEYW) { funcblk.type = decref(ds->type); cfunc(ds->name); return; } } else cinit(ds); } while ((o=symbol())==COMMA); if (o==SEMI) return; syntax: if (o==RBRACE) { error("Too many }'s"); peeksym = 0; return; } error("External definition syntax"); errflush(o); statement(0); } /* * Process a function definition. */ cfunc(cs) char *cs; { regissing file %s", filname); else ibuf = ibuf2; return(c); } } sch(c); c = getch(); } sch('\0'); if (state>1) error("Control syntax"); return(c); } insym(sp, namep) struct symtab **sp; char *namep; { register struct symtab *np; *sp = np = lookup(namep, 1); np->value = np->name; } error(s, x) { printf("%d: ", lineno); printf(s, x); putchar('\n'); exfail++; cflag++; } sch(c) { register char *rlp; rlp = lp; if (rlp==line+194) error("Line overflow"); *rlp++ = c; if */ cspace = buffer; while ((c=getch()) == ' '); if (c != '(') { error("defined function requires arguments"); return; } ungetc(c); for(k=0; pval[k] = coptok(&cspace); k++); if (k!=narg) { error("define argument mismatch"); return; } while (c= *proto++) { if (!letter(c)) backsch(c); else { wp = name; *wp++ = c; while (letnum(*proto)) *wp++ = *proto++; *wp = 0; for (k=0; ktype; /* * If it's an array, find the number of elements. * "bas(rlp>line+195) rlp = line+195; lp = rlp; } savch(c) { *stringbuf++ = c; if (stringbuf-sbf < SBSIZE) return; error("Too much defining"); dexit(); } getch() { register int c; loop: if ((c=getc1())=='/' && !instring) { if ((c=getc1())!='*') { ungetc(c); return('/'); } for(;;) { c = getc1(); cloop: switch (c) { case '\0': return('\0'); case '*': if ((c=getc1())=='/') goto loop; goto cloop; case '\n': if (ibuf==ibuf1) { putc('\n', obuf);ssp&0377])==0) nel = 1; basetype = decref(basetype); } realwidth = width = length(ds) / nel; /* * Pretend a structure is kind of an array of integers. * This is a kludge. */ if (basetype==STRUCT) { nel =* realwidth/2; width = 2; } if ((peeksym=symbol())==COMMA || peeksym==SEMI) { outcode("BSN",CSPACE,ds->name,(nel*width+ALIGN)&~ALIGN); return; } ninit = 0; outcode("BBS",  lineno++; } continue; } } } return(c); } char pushbuff[300]; char *pushp pushbuff; ungetc(c) { *++pushp = c; } getc1() { register c; if (*pushp !=0) return(*pushp--); depth=0; if ((c = getc(ibuf)) < 0 && ibuf==ibuf2) { close(ibuf2[0]); ibuf = ibuf1; putc('\n', obuf); lineno++; c = getc1(); } if (c<0) return(0); return(c); } lookup(namep, enterf) char *namep; { register char *np, *snp; register struct symtab *sp; int i, c, around; np = namep; around = i =  return(0); while (((stc = getch()) != ',' && stc != ')') || paren > 0) { if (stc == '"' || stc == '\'') { stop = stc; if (stop == '\'') *(*cpp)++ = '\''; while ( (stc = getch()) != stop) { if (stc == '\n') { error ("non-terminated string"); break; } if (stc == '\\') if ((stc= getch()) != stop && stc != '\\') *(*cpp)++ = '\\'; *(*cpp)++ = stc; } if (stop == '\'') *(*cpp)++ = '\''; } eDATA, NLABEL, ds->name); if ((o=symbol())==LBRACE) { do ninit = cinit1(ds, basetype, width, ninit, nel); while ((o=symbol())==COMMA); if (o!=RBRACE) peeksym = o; } else { peeksym = o; ninit = cinit1(ds, basetype, width, 0, nel); } /* * Above we pretended that a structure was a bunch of integers. * Readjust in accordance with reality. * First round up partial initializations. */ if (basetype==STRUCT) { if (o = 2*ninit % realwidth) outcode("BN", SSPACE, realwidth-o); ninit 0; while (c = *np++) i =+ c; i =% symsiz; sp = &symtab[i]; while (sp->name[0]) { snp = sp; np = namep; while (*snp++ == *np) if (*np++ == '\0' || np==namep+8) { if (!enterf) subst(namep, sp); return(sp); } if (++sp >= &symtab[symsiz]) if (around++) { error("too many defines"); dexit(); } else sp = symtab; } if (enterf>0) { snp = namep; for (np = &sp->name[0]; np < &sp->name[8];) if (*np++ = *snp) snp++; } return(sp); } char revbuff[200lse if (stc == '\\') { stc = getch(); if (stc != '"' && stc != '\\') *(*cpp)++ = '\\'; *(*cpp)++ = stc; } else { *(*cpp)++ = stc; if (stc == '(') paren++; if (stc == ')') paren--; } } *(*cpp)++ = 0; ungetc(stc); return(val); } letter(c) { if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c == '_')) return (1); else return(0); } letnum(c) { if (letter(c) || (c >= '0' && c <= '9')) return(1); else return(0= (2*ninit+realwidth-2) / realwidth; nel =/ realwidth/2; } /* * If there are too few initializers, allocate * more storage. * If there are too many initializers, extend * the declared size for benefit of "sizeof" */ if (ninitnel) { if ((ds->type&XTYPE)==ARRAY) dimtab[ds->ssp&0377] = ninit; nel = ninit; } /* * If it's not an array, only one initializer is allowed. */ if (ninit>1 && (ds->type&XTYPE)!=ARRAY) er]; char *bp; backsch(c) { if (bp-revbuff > 200) error("Excessive define looping", bp--); *bp++ = c; } subst(np, sp) char *np; struct symtab *sp; { register char *vp; lp = np; bp = revbuff; if (depth++>100) { error("define recursion loop\n"); return; } if ((vp = sp->value) == 0) return; /* arrange that define unix unix still has no effect, avoiding rescanning */ if (streq(sp->name,sp->value)) { while (*vp) sch(*vp++); return; } backsch(' '); if (*vp == '(') expdef(vp)); } streq(s,t) char *s, *t; { int c; while ( (c= *s++) == *t++) if (c==0) return(1); return(0); } ror("Too many initializers"); if (((nel&width)&ALIGN)) outcode("B", EVEN); } /* * Process a single expression in a sequence of initializers * for an external. Mainly, it's for checking * type compatibility. */ cinit1(ds, type, awidth, aninit, nel) struct hshtab *ds; { float sf; register struct tnode *s; register width, ninit; width = awidth; ninit = aninit; if ((peeksym=symbol())==STRING && type==CHAR) { peeksym = -1; if (ninit) bxdec(); putstr(0); if (nel>nchstr) { strflg++; ; else while (*vp) backsch(*vp++); backsch(' '); while (bp>revbuff) ungetc(*--bp); } getsuf(as) char as[]; { register int c; register char *s; register int t; s = as; c = 0; while(t = *s++) if (t=='/') c = 0; else c++; s =- 3; if (c<=14 && c>2 && *s++=='.') return(*s); return(0); } setsuf(as, ch) char as[]; { register char *s, *s1; s = s1 = copy(as); while(*s) if (*s++ == '/') s1 = s; s[-1] = ch; return(s1); } callsys(f, v) char f[], *v[]; { int t, status; if ( outcode("BN", SSPACE, nel-nchstr); strflg = 0; nchstr = nel; } return(nchstr); } if (peeksym==RBRACE) return(ninit); initflg++; s = tree(); initflg = 0; switch(width) { case 1: if (s->op != CON) goto bad; outcode("B1N0", BDATA, s->value); break; case 2: if (s->op==CON) { outcode("B1N0", WDATA, s->value); break; } if (s->op==FCON || s->op==SFCON) { if (type==STRUCT) { ninit =+ 3; goto prflt; } goto bad; } rcexpr(block(1,INIT,0,0,s)); break;  case 4: sf = fcval; outcode("B1N1N0", WDATA, sf); goto flt; case 8: prflt: outcode("B1N1N1N1N0", WDATA, fcval); flt: if (s->op==FCON || s->op==SFCON) break; default: bad: bxdec(); } return(++ninit); } bxdec() { error("Inconsistent external initialization"); } /* * Process one statement in a function. */ statement(d) { register o, o1, o2; int o3, o4; struct tnode *np; stmt: switch(o=symbol()) { case EOF: error("Unexpected EOF"); case SEMI: return; case LBRACE: iock(1,CBRANCH,tree(),brklab,0)); if ((o=symbol()) != SEMI) return(o); } if ((peeksym=symbol()) == RPARN) { /* incr part */ peeksym = -1; statement(0); branch(contlab); return(0); } l = contlab; contlab = isn++; st = tree(); sline = line; if ((o=symbol()) != RPARN) return(o); ss = treespace; treespace = space; statement(0); sline1 = line; line = sline; label(contlab); rcexpr(st); line = sline1; treespace = ss; branch(l); return(0); } /* * A parenthesized expression, * as as atan.s; mv a.out atan.o as crypt.s; mv a.out crypt.o as dpadd.s; mv a.out dpadd.o as ecvt.s; mv a.out ecvt.o as exp.s; mv a.out exp.o as floor.s; mv a.out floor.o as fmod.s; mv a.out fmod.o as fp?.s; mv a.out fp.o : as fakfp.s: mv a.out fp.o as gamma.s; mv a.out gamma.o as get.s; mv a.out get.o as ldiv.s; mv a.out ldiv.o as log.s; mv a.out log.o as mesg.s; mv a.out mesg.o as pow.s; mv a.out pow.o as put.s; mv a.out put.o as rand.s; mv a.out rand.o as savr5.s; mv a.out savr5.o as sin.s; mv a.out sin.o as f (d) { if (proflg) outcode("BN", PROFIL, isn++); outcode("BN", SAVE, blkhed()); } while (!eof) { if ((o=symbol())==RBRACE) return; peeksym = o; statement(0); } error("Missing '}'"); return; case KEYW: switch(cval) { case GOTO: if (o1 = simplegoto()) branch(o1); else dogoto(); goto semi; case RETURN: doret(); goto semi; case IF: np = pexpr(); o2 = 0; if ((o1=symbol())==KEYW) switch (cval) { case GOTO: if (o2=simplegoto()) after "if". */ pexpr() { register o, t; if ((o=symbol())!=LPARN) goto syntax; t = tree(); if ((o=symbol())!=RPARN) goto syntax; return(t); syntax: error("Statement syntax"); errflush(o); return(0); } /* * The switch stateent, which involves collecting the * constants and labels for the cases. */ pswitch() { register struct swtab *cswp, *sswp; int dl, swlab; cswp = sswp = swp; if (swp==0) cswp = swp = swtab; branch(swlab=isn++); dl = deflab; deflab = 0; statement(0); branch(brklsqrt.s; mv a.out sqrt.o as switch.s; mv a.out switch.o as ttyn.s; mv a.out ttyn.o ar r /lib/liba.a rm *.o  goto simpif; cbranch(np, o2=isn++, 0); dogoto(); label(o2); goto hardif; case RETURN: if (nextchar()==';') { o2 = retlab; goto simpif; } cbranch(np, o1=isn++, 0); doret(); label(o1); o2++; goto hardif; case BREAK: o2 = brklab; goto simpif; case CONTIN: o2 = contlab; simpif: chconbrk(o2); cbranch(np, o2, 1); hardif: if ((o=symbol())!=SEMI) goto syntax; if ((o1=symbol())==KEYW && cval==ELSE) gotab); label(swlab); if (deflab==0) deflab = brklab; outcode("BNN", SWIT, deflab, line); for (; cswp < swp; cswp++) outcode("NN", cswp->swlab, cswp->swval); outcode("0"); label(brklab); deflab = dl; swp = sswp; } /* * blkhed is called at the start of each function. * It reads the declarations at the start; * then assigns storage locations for the * parameters (which have been linked into a list, * in order of appearance). * This list is necessary because in * f(a, b) float b; int a; ... *char dayw[] { " S M Tu W Th F S" }; char *smon[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", }; char string[432]; main(argc, argv) char *argv[]; { register y, i, j; int m; if(argc < 2) { printf("usage: cal [month] year\n"); exit(); } if(argc == 2) goto xlong; /* * print out just month */ m = number(argv[1]); if(m<1 || m>12) goto badarg; y = number(argv[2]); if(y<1 || y>9999) goto badarg; printf(" %s %l\n", smon[m-1], y); printfo stmt; peeksym = o1; return; } peeksym = o1; cbranch(np, o1=isn++, 0); statement(0); if ((o=symbol())==KEYW && cval==ELSE) { o2 = isn++; branch(o2); label(o1); statement(0); label(o2); return; } peeksym = o; label(o1); return; case WHILE: o1 = contlab; o2 = brklab; label(contlab = isn++); cbranch(pexpr(), brklab=isn++, 0); statement(0); branch(contlab); label(brklab); contlab = o1; brklab = o2; return; case BREAK the names are seen before the types. * Also, the routine adjusts structures involved * in some kind of forward-referencing. */ blkhed() { register pl; register struct hshtab *cs; autolen = 6; declist(0); pl = 4; while(paraml) { parame->hoffset = 0; cs = paraml; paraml = paraml->hoffset; if (cs->htype==FLOAT) cs->htype = DOUBLE; cs->hoffset = pl; cs->hclass = AUTO; if ((cs->htype&XTYPE) == ARRAY) { cs->htype =- (ARRAY-PTR); /* set ptr */ cs->ssp++; /* pop dims */ } pl =("%s\n", dayw); cal(m, y, string, 24); for(i=0; i<6*24; i=+24) pstr(string+i, 24); exit(); /* * print out complete year */ xlong: y = number(argv[1]); if(y<1 || y>9999) goto badarg; printf("\n\n\n"); printf(" %l\n", y); printf("\n"); for(i=0; i<12; i=+3) { for(j=0; j<6*72; j++) string[j] = '\0'; printf(" %s", smon[i]); printf(" %s", smon[i+1]); printf(" %s\n", smon[i+2]); printf("%s %s %s\n", dayw, dayw, dayw); cal(i+1, y, string, 72); cal(i+2, y, string+2: chconbrk(brklab); branch(brklab); goto semi; case CONTIN: chconbrk(contlab); branch(contlab); goto semi; case DO: o1 = contlab; o2 = brklab; contlab = isn++; brklab = isn++; label(o3 = isn++); statement(0); label(contlab); contlab = o1; if ((o=symbol())==KEYW && cval==WHILE) { cbranch(tree(), o3, 1); label(brklab); brklab = o2; goto semi; } goto syntax; case CASE: o1 = conexp(); if ((o=symbol())!=COLON) goto syntax; i+ rlength(cs); } for (cs=hshtab; csname[0] == '\0') continue; /* check tagged structure */ if (cs->hclass>KEYWC && (cs->htype&TYPE)==RSTRUCT) { cs->lenp = dimtab[cs->lenp&0377]->lenp; cs->htype = cs->htype&~TYPE | STRUCT; } if (cs->hclass == STRTAG && dimtab[cs->lenp&0377]==0) error("Undefined structure: %.8s", cs->name); if (cs->hclass == ARG) error("Not an argument: %.8s", cs->name); if (stflg) prste(cs); } space = treespace; outcode("BN3, 72); cal(i+3, y, string+46, 72); for(j=0; j<6*72; j=+72) pstr(string+j, 72); } printf("\n\n\n"); exit(); badarg: printf("Bad argument\n"); } number(str) char *str; { register n, c; register char *s; n = 0; s = str; while(c = *s++) { if(c<'0' || c>'9') return(0); n = n*10 + c-'0'; } return(n); } pstr(str, n) char *str; { register i; register char *s; s = str; i = n; while(i--) if(*s++ == '\0') s[-1] = ' '; i = n+1; while(i--) if(*--s != ' ') break; s[1] = '\f (swp==0) { error("Case not in switch"); goto stmt; } if(swp>=swtab+swsiz) { error("Switch table overflow"); } else { swp->swlab = isn; (swp++)->swval = o1; label(isn++); } goto stmt; case SWITCH: o1 = brklab; brklab = isn++; np = pexpr(); chkw(np, -1); rcexpr(block(1,RFORCE,0,0,np)); pswitch(); brklab = o1; return; case DEFAULT: if (swp==0) error("Default not in switch"); if ((o=symbol())!=COLON) goto syntax; label(defla", SETREG, regvar); return(autolen); } /* * After a function definition, delete local * symbols. * Also complain about undefineds. */ blkend() { register struct hshtab *cs; for (cs=hshtab; csname[0]) { if (cs->hclass==0 && (cs->hflag&FNUND)==0) { error("%.8s undefined", cs->name); cs->hflag =| FNUND; } if((cs->hflag&FNDEL)==0) { cs->name[0] = '\0'; hshused--; cs->hflag =& ~(FNUND|FFIELD); } } } } /* * write out special definitio0'; printf("%s\n", str); } char mon[] { 0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, }; cal(m, y, p, w) char *p; { register d, i; register char *s; s = p; d = jan1(y); mon[2] = 29; mon[9] = 30; switch((jan1(y+1)+7-d)%7) { /* * non-leap year */ case 1: mon[2] = 28; break; /* * 1752 */ default: mon[9] = 19; break; /* * leap year */ case 2: ; } for(i=1; ihclass>0) { error("Redefinition"); goto stmt; } o1->hclass = STATIC; o1->htype = ARRAY; if (o1->hoffset==0) o1->hoffset = isn++; label(o1->hoffset); ns of local symbols for * benefit of the debugger. None of these are used * by the assembler except to save them. */ prste(acs) { register struct hshtab *cs; register nkind; cs = acs; switch (cs->hclass) { case REG: nkind = RNAME; break; case AUTO: nkind = ANAME; break; case STATIC: nkind = SNAME; break; default: return; } outcode("BSN", nkind, cs->name, cs->hoffset); } /* * In case of error, skip to the next * statement delimiter. */ errflush(ao) { register o; o = ao=+ 11; mon[m] =+ 11; } if(i > 9) *s = i/10+'0'; s++; *s++ = i%10+'0'; s++; if(++d == 7) { d = 0; s = p+w; p = s; } } } /* * return day of the week * of jan 1 of given year */ jan1(yr) { register y, d; /* * normal gregorian calendar * one extra day per four years */ y = yr; d = 4+y+(y+3)/4; /* * julian calendar * regular gregorian * less three days per 400 */ if(y > 1800) { d =- (y-1701)/100; d =+ (y-1601)/400; } /* * great calendar changeover instant  goto stmt; } } peeksym = o; rcexpr(tree()); semi: if ((o=symbol())==SEMI) return; syntax: error("Statement syntax"); errflush(o); } /* * Process a for statement. */ forstmt() { register int l, o, sline; int sline1, *ss; struct tnode *st; if ((o=symbol()) != LPARN) return(o); if ((o=symbol()) != SEMI) { /* init part */ peeksym = o; rcexpr(tree()); if ((o=symbol()) != SEMI) return(o); } label(contlab); if ((o=symbol()) != SEMI) { /* test part */ peeksym = o; rcexpr(bl; while(o>RBRACE) /* ; { } */ o = symbol(); peeksym = o; }  */ if(y > 1752) d =+ 3; return(d%7); } int chtab[]{ 00000, /* */ 03004, /* ! */ 02404, /* " */ 02040, /* sharp */ 02042, /* $ */ 02104, /* % */ 00001, /* & */ 03002, /* ' */ 02201, /* ( */ 02202, /* ) */ 02102, /* * */ 00005, /* + */ 02044, /* , */ 00002, /* - */ 02041, /* . */ 00014, /* / */ 00004, /* 0 */ 00010, /* 1 */ 00020, /* 2 */ 00040, /* 3 */ 00100, /* 4 */ 00200, /* 5 */ 00400, /* 6 */ 01000, /* 7 */ 02000, /* 8 */ 04000, /* 9 */ 02200, /* : */ 02402, /* ; */ 02401, /* < */ 02204, /* = */ 02400, /* > */ 03000, /* ? */ 02100, /* at */op() { double ltod(); register i; register struct tbuf *tp; register struct ubuf *up; if (ibuf.fill1||ibuf.fill2) return; ibuf.time = ltod(&ibuf.time)/60.; if(ibuf.tty == '|') { dtime = ibuf.time; return; } if(ibuf.tty == '}') { if(dtime == 0.) return; for(tp = tbuf; tp < &tbuf[TSIZE]; tp++) tp->ttime =+ ibuf.time-dtime; dtime = 0.; return; } if (lastime>ibuf.time || lastime+(1.5*day) midnight) { upall(1); print(); newday(); for (up=ubuf; up < &ubuf[USIZE]; up++) up->utime = 0.0; } if (ibuf.tty == '~') { ibuf.name[0] = '\0'; upall(0); return; } if ((i = ibuf.tty) >= 'a') i =- 'a' - '9'; i =- '0'; if (i<0 || i>=TSIZE) i = TSIZE-1; tp = &tbuf[i]; update(tp, 0); } print() { int i; float ttime, t; ttime = 0.0; for (i=0; i0.0) ttime =+ t; if (pflag && ubuf[i].utimemov $buf,r1 3: jsr r5,getc; proto bes 1f movb r0,(r1)+ cmp r0,$'\n bne 3b clrb -(r1) sys unlink; buf br 2b 1: mov proto,r0 sys close sys unlink; dbuf+2 br loop / list of special characters / switchout sptab: 'L; literal 'B; binary 'F; form 'U; loop1 / unlink on second pass 0; 0 literal: jmp loop1 form: clrb -(r1) mov $buf+1,r0 jsr r5,fopen; insert bes loop1 mov $14,r0 jsr r5,putc; print br 1f binary: clrb -(r1) mov $buf+1,r0 jsr r5,fopen; insert bes loop1 1: jsr r5,getc__________________________"); puts("________________\n"); spp = sp; while(*spp++); spp--; l = spp - sp; putchar('/'); puts(sp); i = 49 - l; while(--i>0) putchar(' '); puts("|\n"); j = 0; spp = sp; while (j++<12) { putchar('|'); i = 0; spp = sp; while (i<48) { c = *spp++ - 040; i++; if (c>='a'-040) c = c - 040; if (i>l) c = 0; if (c<0 | c>137) c = 0; if ((chtab[c]>>(j-1))&1) puts("[]"); else putchar(j>3?'0'+j-3:' '); } puts("|\n"); } putchar('|') > 0.0) { printf("\t%-8.8s%6.2f\n", ubuf[i].name, ubuf[i].utime/60.); } } if (ttime > 0.0) { pdate(); printf("\ttotal%9.2f\n", ttime/60.); } } upall(f) { register struct tbuf *tp; for (tp=tbuf; tp < &tbuf[TSIZE]; tp++) update(tp, f); } update(tp, f) struct tbuf *tp; { int i, j; struct ubuf *up; double t, t1; if (f) t = midnight; else t = ibuf.time; if (tp->userp) { t1 = t - tp->ttime; if (t1>0.0 && t1 < 1.5*day) tp->userp->utime =+ t1; } tp->ttime = t; if (f) ; insert bes 1f jsr r5,putc; print br 1b 1: jsr r5,flush; print mov insert,r0 sys close br loop1 aclose: mov $9.,r1 1: mov r1,r0 sys close dec r1 bge 1b rts r5 lpr: lock: lpd: .even .bss ch: .=.+2 dfi: .=.+2 dbuf: .=.+18. print: .=.+518. proto: .=.+518. insert: .=.+518. buf: .=.+400. sleep = 35. signal = 48. ; puts("____________"); puts("____________________________________"); puts("|\n"); puts("\n\n\n\n"); } puts(ss) char *ss; { int i; char t; i = 0; while(t = *ss++) { if(t >= 'a' && t <= 'z') t =+ 'A'-'a'; putchar(t); } }  return; if (ibuf.name[0]=='\0') { tp->userp = 0; return; } for (up=ubuf; up < &ubuf[USIZE]; up++) { if (up->name[0] == '\0') break; for (j=0; j<8 && up->name[j]==ibuf.name[j]; j++); if (j>=8) break; } for (j=0; j<8; j++) up->name[j] = ibuf.name[j]; tp->userp = up; } among(i) { register j, k; register char *p; if (pcount==0) return(1); for (j=0; jc04.c7c20.ctable.iDc12.cc05.c3c2h.cc00.o5c21.cc01.oc02.oc03.oc04.oc05.oc10.oc11.oc12.oc13.olse break; } } return(0); } newday() { if(midnight == 0.) midnight = 240.; while (midnight <= ibuf.time) midnight =+ day; } pdate() { register days, mons, yrs; double year, tim; if (byday==0) return; yrs = 2; tim = 0.0; for(;;) { year = 365. * day; if(yrs%4 == 0) year =+ day; if(tim+year > midnight) break; yrs++; tim =+ year; } days = (midnight-tim-720.)/day; montab[1] = 28; if(yrs%4 == 0) montab[1]++; for (mons=0; montab[mons]<=days; mons++) days =- montab[c1t.otable.oc0t.oc20.oc21.ol.outa.outl.outa.outc20.oc21.ol.outa.outc04.oc0t.oc10.oc11.oc12.o runc13.oc1t.otable.otprint.cc20.oc21.oa.out# /* * acct [ -w wtmp ] [ -d ] [ -p people ] */ #define TSIZE 30 #define USIZE 200 struct { char name[8]; char tty; char fill1; float time; int fill2; } ibuf; struct ubuf { char name[8]; float utime; } ubuf[USIZE]; struct tbuf { struct ubuf *userp; float ttime; } tbuf[TSIZE]; char *wtmp; int pflag, byday; double dtime; double midnight; double lastime; double day 1440.; int pcount; char **pptr; int montab[] { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 31, 28, 31, 30, 31, 30, 31, 31, 3mons]; mons =% 12; printf("%s %2d", monasc[mons], days+1); } / assure fake printf (no floating) .globl fltused; fltused = 0 / convert stream to number; result is type. / value in cval or fcval fpp = 1 .globl _getnum .globl _peekc .globl _getchar .globl _cval .globl _fcval .globl _error _getnum: .if fpp movif $10.,fr3 clrf fr0 .endif clr nfract clr totdig clr decpt clr _cval mov 2(sp),base mov r2,-(sp) 1: jsr r5,getdig br 2f .if fpp mulf fr3,fr0 movif r0,fr1 addf fr1,fr0 .endif inc nfract br 1b 2: tst decpt bne 1f clr nfract cmp r0,$'. b0, 31, 30, 31 }; char *monasc[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; main(argc, argv) char **argv; { int c, fl; register i; register char *ip; extern fin; int f; wtmp = "/usr/adm/wtmp"; while (--argc > 0 && **++argv == '-') switch(*++*argv) { case 'd': byday++; continue; case 'w': if (--argc>0) wtmp = *++argv; continue; case 'p': pflag++; continue; } pcount = argc; pptr = argv; if (fopen(wtmp, &fin) < 0) { p/ lpd -- Line Printer daemon .globl fopen, getc .globl fcreat, putc, flush .globl switch sys signal; 1; 1 sys signal; 2; 1 sys signal; 3; 1 / ignore quit,intr,hup sys stat; lock; buf bec 2f sys creat; lock; 0 bes 2f sys open; lpd; 0 bes 3f mov r0,r1 1: mov r1,r0 sys read; dbuf; 16. bes 3f tst r0 beq 3f tst dbuf beq 1b cmp dbuf+2,$"df bne 1b sys fork br retry sys exit 3: sys unlink; lock 2: sys exit / get line printer retry: jsr r5,aclose mov $lpr,r0 jsr r5,fcreat; print bes ne 1f mov pc,decpt br 1b 1: tst totdig beq 1f cmp r0,$'e bne 1f clr -(sp) clr _cval mov pc,decpt clr _cval mov $10.,base jsr pc,_getchar cmp r0,$'+ beq 2f cmp r0,$'- bne 3f inc (sp) br 2f 3: mov r0,_peekc 2: jsr r5,getdig br 2f br 2b 2: tst (sp)+ beq 2f neg _cval 2: sub _cval,nfract 1: mov r0,_peekc tst totdig bne 1f mov $39.,r0 / "." operator 9: mov (sp)+,r2 rts pc 1: tst decpt bne 1f mov $21.,r0 / fixed constant br 9b 1: .if fpp movif $1,fr2 mov nfract,r2 mov r2,rintf("No %s\n", wtmp); return; } for(;;) { ip = &ibuf; for (i=0; i<16; i++) { if ((c=getc(&fin)) < 0) goto brk; *ip++ = c; } fl = 0; for (i=0; i<8; i++) { c = ibuf.name[i]; if ('0'<=c&&c<='9'||'a'<=c&&c<='z'||'A'<=c&&c<='Z') { if (fl) goto skip; continue; } if (c==' ' || c=='\0') { fl++; ibuf.name[i] = '\0'; } else goto skip; } loop(); skip:; } brk: ibuf.name[0] = '\0'; ibuf.tty = '~'; time(&ibuf.time); loop(); print(); } loerror sys chdir; lpd bes error sys open; lpd; 0 bes error mov r0,dfi br loop done: sys unlink; lock sys exit error: jsr r5,aclose mov $10.,r0 sys sleep sys stat; lock; buf bes done / die if lock is gone br retry / look in directory for work loop: mov dfi,r0 sys seek; 0; 0 1: mov dfi,r0 sys read; dbuf; 16. bes error tst r0 beq done / only non-error return tst dbuf beq 1b mov $dbuf+2,r0 cmp (r0),$"df / look for daemon file bne 1b / found prototype file jsr r5,fopen; proto -(sp) beq 2f bgt 1f neg r2 1: mulf fr3,fr2 sob r2,1b 2: tst (sp)+ ble 1f divf fr2,fr0 br 2f 1: mulf fr2,fr0 2: mov $_fcval,r0 movf fr0,(r0) tst (r0)+ tst (r0)+ bne 1f tst (r0)+ bne 1f tst (r0)+ bne 1f mov $24.,r0 mov _fcval,_cval br 9b 1: mov $23.,r0 br 9b .endif .if 1-fpp mov $fperr,-(sp) jsr pc,_error tst (sp)+ mov $21.,r0 br 9b fperr: ; .even .endif getdig: mov _peekc,r0 beq 1f clr _peekc br 2f 1: jsr pc,_getchar 2: sub $'0,r0 cmp r0,$9. bhi 1f inc totdig mov _cval,r1 mul base,r1 add r0,r1 mov r1,_cval tst (r5)+ rts r5 1: add $'0,r0 rts r5 .bss base: .=.+2 nfract: .=.+2 decpt: .=.+2 totdig: .=.+2 (sp) jsr pc,preposterous / / find free list index and link block to that entry / inc stats+2 mov frlist(r0),w(r1) clr r(r1) sub $hblk,r1 mov r1,frlist(r0) clr r1 /self-defense mov (sp)+,r0 rts pc / / / jsr pc,collect / / coalesce free storage by rejoining paired blocks / on the free list. / zero is returned in r0 if no paired blocks were found. / collect: mov r1,-(sp) mov r2,-(sp) mov r3,-(sp) mov r4,-(sp) clr useful inc stats+4. clr r0 /start with smallest blocks /r0 contains frlist i b1e: .=.+numb2 w1: .=.+numb2 u1: .=.+numb2 b1: .=. + [512.*numb] flag: .=.+2 stats: .=.+24. /alloc/release/collect/get/put/seek/copy useful: .=.+2 afi: .=.+2 afout: .=.+2 asmem: .=.+2 nchar: .=.+2 / / hblk: .=.+2 /must remain here - pointer to free header frlist: .=hblk+34. frend: asmdisc:.=.+2 headers: .=hblk+hsz headend: .text / kill process mov (sp)+,r4 tst (sp)+ loop: dec r4 ble done mov (sp)+,r5 clr r3 cmpb (r5),$'- bne 1f inc r5 clr signo 1: movb (r5)+,r0 beq 1f sub $'0,r0 cmp r0,$9 bhi error mul $10.,r3 add r0,r3 br 1b 1: tst signo bne 1f tst r3 ble error cmp r3,$12. bgt error mov r3,signo br loop 1: mov r3,r0 sys 37.; signo: 9. / kill bec loop mov r3,r0 jsr pc,decml mov $1,r0 sys write; m1; em1-m1 br loop error: mov $1,r0 sys write; m2; em2-m2 br loop done: sys exit decml: mov r0ndex loop1: mov $frlist,r1 add r0,r1 / / try next list member at this level / loop2: mov (r1),r3 beq advance /list is empty add $hblk,r3 tst (r3) /W beq advance /only one list element / / calculate address of buddy / mov a(r3),r4 sub $hsz,r4 mov exp2(r0),r2 xor r2,r4 1: add $hsz,r4 / / and search for him / loop3: cmp a(r3),r4 beq coal mov r3,r2 mov w(r3),r3 tst r3 beq nocoal add $hblk,r3 br loop3 / / have found a pair; remove both blocks from list, / coalesce them, and put them on next h,r1 clr r0 div $10.,r0 mov r1,-(sp) tst r0 beq 1f jsr pc,decml 1: mov (sp)+,r0 add $'0,r0 mov r0,ch mov $1,r0 sys write; ch; 1 rts pc m1: <: not found\n> em1: m2: em2: .bss ch: .=.+2 igher list / coal: mov $1,useful mov w(r3),w(r2) /remove him from list mov (r1),r2 add $hblk,r2 mov r3,r4 mov w(r2),w(r1) /remove other one cmp a(r2),a(r4) bhi 1f mov r2,-(sp) mov r4,r2 mov (sp)+,r4 1: mov hblk,(r2) clr r(r2) mov $hsz,a(r2) mov $hsz,l(r2) sub $hblk,r2 mov r2,hblk add exp2(r0),l(r4) /L clr r(r4) mov frlist+2(r0),w(r4) sub $hblk,r4 mov r4,frlist+2(r0) br loop2 / / no buddy found, try next block on this list / nocoal: mov (r1),r1 add $hblk,r1 br loop2 / / advance to nex.globl b1 .globl hblk .globl headers .globl initl .globl asmem .globl b1s .globl b1e .globl w1 .globl stats .globl lookchar .globl flush .globl fsfile .globl seekchar .globl backspace .globl alterchar .globl zero .globl getchar .globl putchar .globl copy .globl rewind .globl create .globl allocate .globl release .globl collect .globl w,r,a,l .globl getword .globl putword .globl backword .globl alterword / / / routine to read next character from string / pointer to by r1; character returned in r0 / c-bit sett free list / advance: tst (r0)+ cmp r0,$frend-frlist blo loop1 mov useful,r0 / / do we have enough headers to continue? / tst garbage beq 1f mov $1,r0 sys write; 4f; 5f-4f 4 / 4: 5: .even / / / restore registers and return / 1: inc garbage mov (sp)+,r4 mov (sp)+,r3 mov (sp)+,r2 mov (sp)+,r1 rts pc / garbage:.=.+2 / / routine to find integer part of log2(x) / / jsr pc,log2 / / r0 = log2(r0) / log2: mov $15.,-(sp) tst r0 bne 1f clr (sp) br 2f 1: asl r0 bcs 2f dec (sp if character not availiable (eof) / / mov ...,r1 / jsr pc,getchar / movb r0,... / getchar: jsr pc,lookchar bes 1f inc r(r1) tst r0 /clears c-bit 1: rts pc / / / routine to read a string backwards / the read pointer is decremented before reading / / mov ...,r1 / jsr pc,backspace / mov r0,... / backspace: cmp a(r1),r(r1) bhis nochc dec r(r1) jsr pc,lookchar rts pc nochc: clr r0 sec rts pc / / / routine to put a word onto the string / / mov ...,r1 / mov ...,r0 / jsr pc,putword / putword: mov r0,-.globl b1 .globl log2 .globl frlist .globl stats .globl b1s .globl b1e .globl w1 / here to allocate a new block / / / mov ...,r0 / jsr pc,allocate / mov r1,... / / requested size in bytes in r0 / pointer to header of allocated block returned in r1 / r0 is preserved / / convert to words, adjust for header, round up / to a power of two / / each block has a four-word header / W - write ptr (also used as link ptr in frlist) / R - read ptr / A - pointer to head of data / L - ptr to (end+1) of data hsz=6144. ) br 1b 2: mov (sp)+,r0 rts pc / 0 exp2: 1;2;4;10;20;40;100;200;400;1000;2000;4000; 10000;20000;40000;100000 / / routine to discover whether r1 points to / a plausible header - to avoid ruination. / / r1 is preserved and r0 gets a suitable index for frlist / / jsr pc,preposterous / preposterous: cmp r1,$headers bhis 9f; 4; 9: cmp r1,$headend blo 9f; 4; 9: cmp a(r1),$hsz /A bhis 9f; 4; 9: cmp l(r1),$hsz+datasz /L blos 9f; 4; 9: mov l(r1),r0 /L sub a(r1),r0 /A mov r0,-(sp) jsr pc,log2 asl(sp) sub $hblk,r0 jsr pc,putchar swab r0 jsr pc,putchar mov (sp)+,r0 rts pc / / / routine to get a word from the string / / mov ...,r1 / jsr pc,getword / mov r0,... / getword: jsr pc,lookchar bes 1f movb r0,nchar inc r(r1) jsr pc,lookchar bes 1f movb r0,nchar+1 inc r(r1) mov nchar,r0 add $hblk,r0 1: rts pc / / / routine to alter the word pointed to by r(r1) / by replacing the word there with r0 / / mov wd,r0 / mov ...,r1 / jsr pc,alterword / alterword: mov r0,-(sp) sub $hblk,r0 jsr pc,altdatasz = 32768. numb=4. numb2=2*numb w=0 r=2 a=4 l=6 / allocate: clr garbage mov r0,-(sp) mov r2,-(sp) mov r3,-(sp) inc stats bne 9f; inc stats; 9: cmp r0,$datasz blo 9f; 4; 9: dec r0 bmi 1f jsr pc,log2 inc r0 1: asl r0 mov r0,-(sp) add $2,r0 cmp r0,$frend-frlist+2 blo zzz 4 / / look on free list for block of required size / zzz: mov (sp),r0 tst frlist(r0) beq xxx / / found it, allocate and return / mov frlist(r0),r1 add $hblk,r1 mov (r1),frlist(r0) mov a(r1),r0 mov r0,w(r1) /W mo r0 cmp exp2(r0),(sp) beq 9f; 4; 9: add $2,r0 cmp r0,$frend-frlist+2 blo 9f; 4; 9: sub $2,r0 mov r0,(sp) mov frlist(r0),r0 1: beq 1f add $hblk,r0 cmp r0,r1 bne 9f; 4; 9: mov (r0),r0 br 1b 1: mov (sp)+,r0 rts pc / / / whead: inc stats+22. mov r0,-(sp) mov afout,r0 sys seek; 0; 0 sys write; hblk; hsz mov (sp)+,r0 rts pc / / initl: clr hblk mov r0,-(sp) mov r2,-(sp) sys open;almem; 1 /open for write bec 2f sys creat;almem; 666 bes err2 inc hblk 2: mov r0,afout sys open; almem; 0 erchar swab r0 jsr pc,alterchar mov (sp)+,r0 rts pc / / / routine to get words backwards from string / / mov ...,r1 / jsr pc,backword / mov r0,... / backword: cmp a(r1),r(r1) bhis nochw dec r(r1) jsr pc,lookchar movb r0,nchar+1 cmp a(r1),r(r1) bhis nochw dec r(r1) jsr pc,lookchar movb r0,nchar mov nchar,r0 add $hblk,r0 rts pc / nochw: clr r0 sec rts pc / / / routine to copy the contents of one string / to another. / / mov source,r0 / mov dest,r1 / jsr pc,copy / mov r1,... / / on return, v r0,r(r1) /R tst (sp)+ mov (sp)+,r3 mov (sp)+,r2 mov (sp)+,r0 / jsr pc,whead rts pc / / no block of required size / look for larger block / xxx: tst hblk beq www tst (r0)+ cmp r0,$frend-frlist bhis www tst frlist(r0) bne yyy br xxx / / there are no larger blocks; must garbage collect / www: jsr pc,collect tst r0 bne zzz / / out of space / mov $1,r0 sys write; 1f; 2f-1f jmp interrupt 1: 2: .even / / split larger block into two smaller pieces and / link together as small/open for read bes err2 mov r0,afi br 1f / err2: mov $1,r0 sys write; 4f; 5f-4f 4 .data 4: 5: almem: .even .text / 1: tst hblk bgt 1f sys read; hblk; hsz /r0 already afi mov asmdisc,asmem add $hblk,asmem br 2f 1: mov $headers,r2 mov r2,r0 sub $hblk,r0 mov r0,hblk 1: add $8,r0 mov r0,(r2) add $8,r2 cmp r2,$headend-8. blo 1b clr -8(r2) mov $frlist,r0 1: clr (r0)+ cmp r0,$frend blo 1b mov hblk,r2 add $hblk,r2 mov (r2),hblk clr w(r2) mov r1 points to the new string and should / be saved. r0 is preserved. / copy: inc stats+12. mov r0,-(sp) mov r1,-(sp) mov r2,-(sp) mov r3,-(sp) mov w(r0),r2 sub a(r0),r2 /W-A (old) mov l(r1),r3 sub a(r1),r3 /L-A (new) cmp r2,r3 blos 1f mov r2,r0 jsr pc,allocate mov 4(sp),r0 /new jsr pc,swap jsr pc,release mov r0,r1 mov 0(sp),r0 /old 1: mov a(r1),w(r1) /rewind w pointer cmp r2,$512. blos copy1 /is a short string / jsr pc,flush jsr pc,reset / mov a(r0),-(sp) 4: mov (sp),0f mov afi,r0er blocks in the free list. / yyy: mov hblk,r3 /get free header block beq www /should never get this mov frlist(r0),r1 add $hblk,r1 mov w(r1),frlist(r0) mov r3,w(r1) add $hblk,r3 mov exp2-2(r0),r2 add a(r1),r2 mov w(r3),hblk mov l(r1),l(r3) mov r2,l(r1) /L mov r2,a(r3) clr w(r3) /W' mov r1,r2 sub $hblk,r2 mov r2,frlist-2(r0) br zzz / / / here to release a block / / mov ...,r1 / jsr pc,release / / pointer to block in r1 / release: / / discover that this is a plausible pointer / mov r0,-$hsz,a(r2) mov $hsz+datasz,l(r2) mov $datasz,r0 jsr pc,log2 asl r0 cmp r0,$frend-frlist blo 9f; 4; 9: sub $hblk,r2 mov r2,frlist(r0) / / install plausible pointers to make octal dumps look nice / mov $hblk,r1 1: mov (r1),r1 tst r1 beq 1f add $hblk,r1 mov $hsz,a(r1) mov $hsz,l(r1) mov $hsz,r(r1) br 1b 1: mov afout,r0 sys write;hblk;hsz jsr pc,reset mov $4,r0 jsr pc,allocate mov r1,asmem mov r1,asmdisc sub $hblk,asmdisc 2: mov (sp)+,r2 mov (sp)+,r0 rts pc / / .bss / b1s: .=.+numb2 sys seek;0:.. ;0 /set input pointer cmp r2,$512. blos 2f mov $512.,r3 /# output this time mov r3,0f mov r3,3f add r3,(sp) sub r3,r2 /# left to output br 1f 2: mov r2,0f mov r2,3f mov r2,r3 clr r2 1: mov afi,r0 sys read;b1;0:.. bes bad cmp r0,r3 bne bad mov afout,r0 mov (r1),0f add r3,(r1) sys seek;0:.. ;0 sys write;b1;3:.. bes bad tst r2 bgt 4b tst (sp)+ / / fix up read ptr of new string / copy2: mov 6(sp),r0 /restore r0 mov r(r0),r2 sub a(r0),r2 add a(r1),r2 mov r2,r(r1) / / restore and return / mov (sp)+,r3 mov (sp)+,r2 mov (sp)+,r1 mov (sp)+,r0 rts pc / bad: mov $1,r0 sys write;1f;2f-1f 4 1: 2: .even / swap: mov w(r1),-(sp) mov w(r0),w(r1) mov (sp),w(r0) mov r(r1),(sp) mov r(r0),r(r1) mov (sp),r(r0) mov a(r1),(sp) mov a(r0),a(r1) mov (sp),a(r0) mov l(r1),(sp) mov l(r0),l(r1) mov (sp)+,l(r0) rts pc / / copy a short string / copy1: mov r(r0),-(sp) mov a(r0),r(r0) mov nchar,-(sp) mov r0,r2 /old mov r1,r3 /new 1: mov r2,r1 jsr pc,r3,r1 ashc $9.,r1 bic $777,r1 add $b1,r1 jsr pc,clean 2: inc r3 br 1b 1: mov (sp)+,r3 mov (sp)+,r2 mov (sp)+,r1 rts pc / / reset: mov r3,-(sp) mov r2,-(sp) clr r3 1: cmp r3,$numb bge 1f mov r3,r2 asl r2 mov $-1.,w1(r2) clr b1s(r2) clr b1e(r2) clr u1(r2) inc r3 br 1b 1: clr flag mov (sp)+,r2 mov (sp)+,r3 rts pc / / / routine to read from disc to a buffer / wcing the buffer if necessary / / mov disc addr,r0 / mov buffer addr,r2 / jsr pc,getb / / on return r0 = addr of byte in bufferf movb r0,r2 mov 4(sp),r1 jsr pc,getchar bes 4f cmpb r0,r2 beq 2b 4: tst (sp)+ 4: mov (sp),r1 add $2,r(r1) br 3b 2: tst (sp)+ mov 2(sp),r1 cmp r(r1),w(r1) bne 4b mov (sp)+,r1 jsr pc,getword tst (sp)+ rts pc 1: mov (sp)+,r1 mov (sp)+,r0 sec rts pc / / / tfoput / / jsr r5,tfoput / tfoput: mov r0,ch mov $1,r0 sys write; ch; 1 rts r5 / / / tfiget / / jsr r5,tfiget / tfiget: clr r0 sys read; ch; 1 bes 1f tst r0 beq 1f movb ch,r0 rts r5 1: jsr r5,flushb tst argf beq 1f mov opogetchar bes 1f mov r3,r1 jsr pc,putchar br 1b 1: mov r2,r0 mov (sp)+,nchar mov (sp)+,r(r0) mov r3,r1 br copy2 / / / / / / routine to rewind read pointer of string / pointed to by r1 / / mov ...,r1 / jsr pc,rewind / rewind: mov a(r1),r(r1) rts pc / / / routine to rewind write pointer of string / pointed to by r1 / / mov ...,r1 / jsr pc,create / create: mov a(r1),w(r1) mov a(r1),r(r1) rts pc / / / routine to zero a string / / mov ...,r1 / jsr pc,zero / zero: mov r0,-(sp) .if testing jsr pc,pr / getb: mov r3,-(sp) mov r1,-(sp) mov r0,-(sp) mov r2,r3 asr r3 mov r3,r1 ashc $9.,r1 bic $777,r1 add $b1,r1 tst w1(r2) / w ble 1f jsr pc,clean 1: mov (sp),r0 bic $777,r0 /get lowest multiple of 512. mov r0,0f mov r0,b1s(r2) /set start mov afi,r0 sys seek;0:..;0 mov r1,0f sys read;0:..;512. mov b1s(r2),b1e(r2) add $512.,b1e(r2) / set end clr w1(r2) /clear w mov (sp)+,r0 sub b1s(r2),r0 add r1,r0 / set r0=byte addr in buffer mov (sp)+,r1 mov (sp)+,r3 rts pc / / / routine to inter,r1 jsr pc,pop 1: mov $5,tflag jmp interrupt / / putc / jsr r5,putc / putc: mov r1,-(sp) mov r2,-(sp) mov $rfo+2,r1 mov r1,r2 add (r1),r2 movb r0,2(r2) inc (r1) cmp (r1),$512. bge 1f mov (sp)+,r2 mov (sp)+,r1 rts r5 1: mov (sp)+,r2 mov (sp)+,r1 / / / flush output buffer to output file. / flushb: mov r1,-(sp) mov r0,-(sp) mov $rfo,r1 mov (r1)+,r0 mov (r1),0f+2 beq 1f clr (r1)+ mov r1,0f sys write; 0:..;.. 1: mov (sp)+,r0 mov (sp)+,r1 rts r5 relarg: mov $arg,r2 1: mov (r2)+eposterous .endif mov a(r1),w(r1) clrb r0 1: cmp w(r1),l(r1) bhis 1f jsr pc,putchar br 1b 1: mov a(r1),w(r1) mov (sp)+,r0 rts pc / / / / routine to move the read pointer of a string to the / relative position indicated by r0. the string is / extended if necessary - there is no error return. / / mov position,r0 / mov ...,r1 / jsr pc,seekchar / seekchar: mov r1,-(sp) mov r0,-(sp) .if testing jsr pc,preposterous .endif inc stats+10. 1: mov (sp),r0 add a(r1),r0 cmp r0,l(r1) bhi 3f mov r0,r(rwc a buffer / / mov buffer addr,r2 / mov buffer addr+6,r1 beginning of buffer / jsr pc,clean / clean: inc stats+24. mov r0,-(sp) mov b1s(r2),0f mov afout,r0 sys seek;0:..;0 mov r1,0f sys write;0:..;512. clr w1(r2) /clear w mov (sp)+,r0 rts pc / / / routine to get buffer addr of byte whose disc / addr is in r0 - also returns addr of write / flag for buffer in r2 / / mov disc addr,r0 / jsr pc,bufchar / mov (r0),r0 for read / inc (r2) for write must inc w / / c-bit set if char not in either buffer /,r1 beq 2f jsr pc,release br 1b 2: cmp r2,$arge blt 1b rts pc / relcurl: mov curly,r1 jsr pc,rewind 1: jsr pc,getword bes 1f mov r0,r1 jsr pc,release mov curly,r1 br 1b 1: jsr pc,release rts pc / int: inc iflag rti / interrupt: jsr pc,relarg tst opointer beq 2f 1: mov opointer,r1 jsr pc,rewind 1: jsr pc,getword bes 1f mov r0,r1 jsr pc,release mov opointer,r1 br 1b 1: mov opointer,r1 jsr pc,release tst ipointer beq 2f mov ipointer,r1 jsr pc,release tst curly beq 2f jsr p1) cmp r0,w(r1) blo 1f mov r0,w(r1) br 1f 3: mov (sp),r0 jsr pc,allocate mov 2(sp),r0 jsr pc,copy jsr pc,swap jsr pc,release mov 2(sp),r1 br 1b 1: mov (sp)+,r0 mov (sp)+,r1 rts pc / / / routine to move read pointer of string to end of string / / mov ...,r1 / jsr pc,fsfile / fsfile: mov r0,-(sp) .if testing jsr pc,preposterous .endif inc stats+10. mov w(r1),r(r1) mov (sp)+,r0 rts pc / / / routine to place the character in r0 at the current / position of the read pointer - the read poin bufchar: mov r1,-(sp) mov r3,-(sp) clr r3 1: mov r3,r2 asl r2 cmp r0,b1s(r2) blo 2f cmp r0,b1e(r2) bhis 2f sub b1s(r2),r0 mov r3,r1 ashc $9.,r1 bic $777,r1 add r1,r0 add $b1,r0 mov (sp)+,r3 mov (sp)+,r1 clc rts pc 2: inc r3 cmp r3,$numb blt 1b mov (sp)+,r3 mov (sp)+,r1 sec rts pc / / / routine to get a buffer / / mov disc addr,r0 / jsr pc,getbuf / mov (r0),r0 (for read) / inc (r2) must inc w for w / getbuf: mov r4,-(sp) mov r3,-(sp) mov $2,r3 clr r2 mov $1,r4 1: cmp r4,$nuc,relcurl tst scr beq 2f mov scr,r1 jsr pc,release 2: jsr pc,flush jsr pc,whead sys exit letter: .=.+2 arg: .=.+20. arge: 0 argf: .=.+2 switch: .=.+2 curly: .=.+2 curlyf: .=.+2 ch: .=.+2 opointer: .=.+2 ipointer: .=.+2 scr: .=.+2 iflag: 0 tflag: 0 end: ter / is not moved. / / movb ch,r0 / mov ...,r1 / jsr pc,alterchar / mov r1,... / alterchar: mov r2,-(sp) mov r1,-(sp) mov r0,nchar .if testing jsr pc,preposterous .endif inc stats+8. 1: cmp r(r1),l(r1) /W,L blo 3f mov l(r1),r0 inc r0 sub a(r1),r0 /W-A+1 jsr pc,allocate mov (sp),r0 jsr pc,copy jsr pc,swap jsr pc,release mov (sp),r1 3: mov r(r1),r0 jsr pc,bufchar bec 2f jsr pc,getbuf 2: movb nchar,(r0) mov $1,w1(r2) mov nchar,r0 /to preserve r0 for user inc r(r1) cmp r(r1),w(r1) blmb bge 1f cmp u1(r3),u1(r2) bhis 2f mov r3,r2 2: inc r4 add $2.,r3 br 1b 1: mov r2,r3 jsr pc,getb add $stats+14.,r3 inc (r3) mov (sp)+,r3 mov (sp)+,r4 rts pc / / / this routine renumbers the time used cell u1(r2) / of the buffers when the clock overflows / fixct: mov r1,-(sp) mov r3,-(sp) mov $numb,r1 mov $numb,flag 2: mov r1,u1(r2) dec r1 bge 1f mov (sp)+,r3 mov (sp)+,r1 rts pc 1: clr r2 mov $2,r3 1: cmp r3,$numb2 bge 2b cmp u1(r3),u1(r2) blo 2f mov r3,r2 2: add $2,r3 br 1b/ esub / r1 = pointer to input string / esub: mov r1,-(sp) tst switch beq 1f mov opointer,r1 jsr pc,putword 1: tst iflag beq 1f mov $2,tflag jmp interrupt 1: inc switch mov $10.,r0 jsr pc,allocate mov r1,r0 mov opointer,r1 jsr pc,putword mov (sp)+,r1 jsr pc,scan tst iflag beq 1f mov $3,tflag jmp interrupt 1: mov r2,-(sp) mov r1,r0 mov ipointer,r1 jsr pc,putword mov opointer,r1 jsr pc,pop bec 9f; 4; 9: mov r0,-(sp) /last output mov asmem,r1 jsr pc,getsp bes 2f 5: clr curlyf os 3f mov r(r1),w(r1) 3: mov (sp)+,r1 mov (sp)+,r2 rts pc / / / routine to look at next character from string / pointed to by r1; character returned in r0 / c-bit set if character not available (end of file) / r1 is preserved / / mov ...,r1 / jsr pc,lookchar / movb r0,... / lookchar: mov r2,-(sp) inc stats+6. .if testing jsr pc,preposterous .endif cmp w(r1),r(r1) /W,R blos noch mov r(r1),r0 jsr pc,bufchar bec 2f jsr pc,getbuf / 2: inc flag bne 2f jsr pc,fixct br 1f 2: mov flag,u1(r2) 1:  mov (sp),r1 mov r0,r2 jsr pc,release 6: mov opointer,r1 jsr pc,pop bec 4f clr switch 4: mov r2,r1 jsr pc,rewind tst (sp)+ mov (sp)+,r2 rts pc / not in memory 2: mov curly,r1 jsr pc,getsp bes 2f br 5b 2: mov (sp),r1 jsr pc,rewind mov $'\[,r0 1: jsr r5,tfoput jsr pc,getchar bec 1b mov $'\],r0 jsr r5,tfoput mov $10.,r0 jsr pc,allocate mov r1,r2 mov (sp),r0 tst curlyf beq 1f clr curlyf mov curly,r1 jsr pc,addentry br 2f 1: mov asmem,r1 jsr pc,whead jsr pc,addentry 2: mov r mov (sp)+,r2 movb (r0),r0 tst r0 /clears c-bit rts pc / noch: mov (sp)+,r2 clr r0 sec rts pc / / / routine to put a character into the string / pointed to by r1; character in r0 / r0 is preserved; r1 points to the string / after return and must be saved. / / movb ch,r0 / mov ...,r1 / jsr pc,putchar / mov r1,... / putchar: mov r2,-(sp) mov r1,-(sp) mov r0,nchar .if testing jsr pc,preposterous .endif inc stats+8. 1: cmp w(r1),l(r1) /W,L blo 3f mov w(r1),r0 inc r0 sub a(r1),r0 /W-A+1 jsr rti = 2 / accept / r1 = header of where to put it / accept: mov r0,-(sp) movb $':,r0 jsr r5,tfoput movb $' ,r0 jsr r5,tfoput 2: jsr r5,tfiget cmpb r0,$'\n beq 1f jsr pc,putchar br 2b 1: jsr pc,putchar jsr r5,tfiget cmpb r0,$'\n beq 1f jsr pc,putchar br 2b 1: mov (sp)+,r0 rts pc / / / routine to get the last word from the string / r1=header addr / pop: jsr pc,fsfile jsr pc,backword bes 1f sub $2,w(r1) 1: rts pc / / / routine to add an entry to assoc mem or curly / r1 = header / r0 = he2,r1 jsr pc,accept br 6b / / / earg / r0 = number in ascii / earg: tst iflag beq 1f mov $4,tflag jmp interrupt 1: mov r1,-(sp) inc argf sub $'0,r0 asl r0 mov arg(r0),r1 beq 5f 4: mov (sp),r0 mov r1,(sp) mov ipointer,r1 jsr pc,putword mov opointer,r1 jsr pc,pop bec 3f clr switch 3: mov (sp)+,r1 jsr pc,rewind jsr pc,scan mov r0,-(sp) mov ipointer,r1 jsr pc,pop bec 9f; 4; 9: mov r0,r1 clr argf clr curlyf mov (sp)+,r0 rts pc 5: mov r0,-(sp) mov $'\[,r0 jsr r5,tfoput mov (sp),pc,allocate mov (sp),r0 jsr pc,copy jsr pc,swap jsr pc,release mov (sp),r1 3: mov w(r1),r0 jsr pc,bufchar bec 2f jsr pc,getbuf 2: movb nchar,(r0) mov $1,w1(r2) mov nchar,r0 /to preserve r0 for user inc w(r1) inc flag bne 2f jsr pc,fixct br 1f 2: mov flag,u1(r2) 1: mov (sp)+,r1 mov (sp)+,r2 rts pc / / / routine to flush contents of all buffers. / / jsr pc,flush / flush: mov r1,-(sp) mov r2,-(sp) mov r3,-(sp) clr r3 1: cmp r3,$numb bhis 1f mov r3,r2 asl r2 tst w1(r2) ble 2f mov ader of string name / r2 = header of string / addentry: jsr pc,putword mov r2,r0 jsr pc,putword rts pc / / / routine to find the string pointed to by r0 / in either memory or curly / r1 = where to look / / returns error set if string not there / returns r1 = header of string if there / getsp: mov r0,-(sp) mov r1,-(sp) jsr pc,rewind /memory 3: mov 2(sp),r1 jsr pc,rewind /output mov (sp),r1 jsr pc,getword bes 1f mov r0,r1 mov r0,-(sp) jsr pc,rewind /string 2: mov (sp),r1 jsr pc,getchar bes 2r0 asr r0 add $'0,r0 jsr r5,tfoput mov $'\],r0 jsr r5,tfoput mov $10.,r0 jsr pc,allocate mov (sp)+,r0 mov r1,arg(r0) jsr pc,accept br 4b / scan / r1 = pointer to input header / r0 = pointer to output header / switch = 0 real output / not 0 output to r0 scan: mov r0,-(sp) mov r1,-(sp) 1: mov (sp),r1 jsr pc,getchar bes 5f cmpb r0,$'\\ beq 3f cmpb r0,$'\[ beq 4f cmpb r0,$'\{ beq 4f cmpb r0,$'\] beq 1f cmpb r0,$'\} beq 7f cmpb r0,$'\n bne 6f jsr pc,lookchar bes 5f movb $'\n,r0 6: tst switch beq 2f mov 2(sp),r1 jsr pc,putchar br 1b 2: jsr r5,putc br 1b 3: jsr pc,getchar br 6b / have [ or { 4: mov r(r1),-(sp) jsr rti = 2 .globl rm .globl ck .globl loop .globl oct .globl argc .globl arg .globl tfiget .globl asmem .globl qflag .globl vflag .globl getspq .globl q .globl ask .globl getword .globl r .globl w .globl output .globl buffer .globl bufend .globl fv .globl getsp .globl release .globl nothere .globl getn .globl getchar .globl rewind .globl iflag .globl inter / output buffer / r2 = last char in buffer + 1 / r2 returned at beginning of buffer / output: sub $buffer,r2 blos 1f mov r2,0f mov $1,r0 sys write; buf: .=.+2 buffer: .=.+512. bufend: .=.+2 argc = buffer + 20. arg = buffer + 256. fv: .=.+2 .text pc,getchar bes 1f cmpb r0,$'0 blt 4f cmpb r0,$'9 bgt 4f jsr pc,getchar cmpb r0,$'\] beq 3f cmpb r0,$'\} beq 3f 4: mov (sp)+,r(r1) mov 2(sp),r0 jsr pc,esub mov r1,(sp) mov r0,2(sp) br 1b / have arg 3: tst switch beq 2f mov opointer,r1 mov 4(sp),r0 jsr pc,putword mov 2(sp),r1 2: mov (sp)+,r(r1) jsr pc,getchar inc r(r1) /skip ] jsr pc,earg br 1b 5: tst argf bne 1f mov ipointer,r1 jsr pc,pop bes 1f mov r0,(sp) br 1b 7: inc curlyf 1: mov (sp)+,r1 mov (sp)+,r0 rts pc fer; 0:.. mov $buffer,r2 1: rts pc / / / routine to find the string pointed to by r0 / in either memory or curly / r1 = where to look / / returns error set if string not there / returns r1 = header of string if there getsp: mov r0,-(sp) mov asmem,r1 jsr pc,rewind /memory 3: jsr pc,getword bes 1f mov r0,r1 jsr pc,rewind mov (sp),r2 2: jsr pc,getchar bes 2f tstb (r2) beq 4f cmpb r0,(r2)+ beq 2b 4: mov asmem,r1 add $2,r(r1) br 3b 2: tstb (r2) bne 4b mov r1,r2 mov asmem,r1 jsr pc,getword  signal = 48. testing = 0 / form letter generator / command sequence / form proto arg1 arg2... / where proto is letter rfo: sys signal; 2; int mov $-1,buf mov (sp)+,r2 /arg count tst (sp)+ /skip first arg sub $2,r2 bge 2f mov $default,-(sp) 2: mov (sp)+,letter 1: sys stat; otfil; buf bec 2f sys creat; otfil; 666 bec cont 2: cmpb $'z,otfil+4 beq err3 incb otfil+4 br 1b err3: mov $1,r0 sys write; mes3; 24. sys exit mes3: otfil: default: . tst (sp)+ rts pc 1: mov (sp)+,r0 sec rts pc / / finds header of string with name same as that pointed to by r0 / taking into account ? and * getspq: mov r0,-(sp) mov asmem,r1 tst qflag bgt 1f jsr pc,rewind 1: jsr pc,getword bes 1f mov r0,r1 jsr pc,rewind mov (sp),r2 2: cmpb (r2),$'* bne 3f clr strflg mov $2,qflag inc r2 tstb (r2) beq 6f mov r2,ch 3: jsr pc,getchar bes 2f tstb (r2) bne 3f cmp $2,qflag bne 4f mov ch,r2 3: cmpb (r2),$'? bne 3f inc r2 tst qflag bne 2b mov $/ / ed: mov (sp)+,r3 ble error econ: sys stat; ftemp; buffer bec 2f sys creat; ftemp; 666 mov r0,tmpw sys open; ftemp; 0 mov r0,tmpr br 1f 2: cmpb $'z,ftemp+9. bne 2f mov $1,r0 sys write; erm; 23. jmp loop 2: incb ftemp+9. br econ 1: mov (sp),r0 jsr pc,getspq bes 3f mov r0,r4 mov r2,r1 jsr pc,rewind mov $buffer,r2 1: jsr pc,getchar bes 1f movb r0,(r2)+ br 1b 1: movb $'\n,(r2)+ jsr pc,output mov r4,r1 jsr pc,rewind 2: mov $buffer,r2 1: jsr pc,getchar bes 1f movb r0,(r2)+ ceven cont: mov r0,rfo clr rfo+2 jsr pc,initl / set up argument list / mov $arg,r3 mov $10.,r0 jsr pc,allocate mov r1,(r3)+ 1: dec r2 blt 1f mov $10.,r0 jsr pc,allocate mov r1,(r3)+ mov (sp)+,r4 2: movb (r4)+,r0 beq 1b jsr pc,putchar br 2b 1: sys time ashc $-7,r0 div $675.,r0 mov $daytab,r2 sub $1461.,r0 1: sub (r2)+,r0 bge 1b add -(r2),r0 mov r0,-(sp) mov arg,r1 mov montab-daytab(r2),r2 1: movb (r2)+,r0 beq 1f jsr pc,putchar br 1b 1: movb $' ,r0 jsr pc,putchar clr r0 m1,qflag br 2b 3: cmpb r0,(r2)+ bne 5f inc strflg br 2b 5: cmp $2,qflag bne 4f tst strflg bne 4f dec r2 br 2b 4: mov asmem,r1 add $2,r(r1) br 1b 2: tstb (r2) bne 4b 6: mov r1,r2 mov asmem,r1 jsr pc,getword tst (sp)+ rts pc 1: mov $-1.,qflag mov (sp)+,r0 sec rts pc / / tfiget / jsr r5,tfiget / tfiget: clr r0 sys read; ch; 1 bes 1f tst iflag beq 9f; jmp loop; 9: tst r0 beq 1f movb ch,r0 rts pc 1: jmp q / / routine to print file name and error message / r2 = next free byte in bmp r2,$bufend blo 1b mov tmpw,r0 sys write; buffer; 512. br 2b 1: sub $buffer,r2 beq 4f mov r2,0f mov tmpw,r0 sys write; buffer; 0:.. 4: tst iflag beq 1f mov tmpw,r0 sys close mov tmpr,r0 sys close sys unlink; ftemp jmp loop 1: mov tmpw,r0 sys close sys fork br 5f mov r1,-(sp) sys wait sys signal; 2; inter mov (sp)+,r1 mov a(r1),w(r1) 2: mov tmpr,r0 sys read; buffer; 512. tst r0 beq 2f add $buffer,r0 mov r0,bufend mov $buffer,r2 1: movb (r2)+,r0 jsr pc,putchar cmp r2,bufeov (sp),r1 inc r1 div $10.,r0 mov r1,(sp) mov arg,r1 tst r0 beq 1f add $'0,r0 jsr pc,putchar 1: mov (sp)+,r0 add $'0,r0 jsr pc,putchar jmp loop daytab: 31.; 28.; 31.; 30.; 31.; 30.; 31.; 31.; 30.; 31.; 30.; 999. montab: m1; m2; m3; m4; m5; m6; m7; m8; m9; m10; m11; m12 m1: m2: m3: m4: m5: m6: m7: m8: m9: m10: m11: m12: buf: .=.+34. .=rfo+516. loop: mov $10.,uffer / nothere: mov $buffer,r2 1: tstb (r1) beq 1f movb (r1)+,(r2)+ br 1b 1: sub $buffer,r2 mov r2,0f mov $1,r0 sys write; buffer; 0:.. mov $1,r0 sys write; err4; 16. rts pc / / / routine to put characters from string in buffer / r1 = header of string / on return r2 = next free byte in buffer / getn: mov $buffer,r2 jsr pc,rewind 1: jsr pc,getchar bes 1f movb r0,(r2)+ cmp r2,$bufend bhis 1f br 1b 1: rts pc / ask: mov r2,-(sp) mov r0,r1 jsr pc,getn movb $' ,(r2)+ jsr pc,output jsr pnd blo 1b br 2b 2: mov tmpr,r0 sys close sys unlink; ftemp tst iflag beq 1f jmp loop 1: tst qflag bgt 1f tst (sp)+ dec r3 bgt 1f jmp loop 1: jmp econ jmp loop 3: mov (sp),r2 mov $2,r0 jsr pc,allocate 1: tstb (r2) beq 1f movb (r2)+,r0 jsr pc,putchar br 1b 1: mov r1,r0 mov asmem,r1 jsr pc,putword mov $2,r0 jsr pc,allocate mov r1,r0 mov asmem,r1 jsr pc,putword mov r0,r1 br 4b 5: mov $2,r0 1: sys close inc r0 cmp r0,$10. blo 1b sys exec; edd; eda sys exit eda: edd; ftemp;r0 jsr pc,allocate mov r1,opointer jsr pc,allocate mov r1,ipointer jsr pc,allocate mov r1,curly mov $10.,r0 jsr pc,allocate mov r1,scr mov letter,r3 movb $'\{,r0 jsr pc,putchar 1: movb (r3)+,r0 beq 1f jsr pc,putchar br 1b 1: movb $'\},r0 jsr pc,putchar clr switch tst iflag beq 1f mov $1,tflag jmp interrupt 1: jsr pc,scan movb $'\n,r0 jsr r5,putc jsr r5,flushb mov scr,r1 jsr pc,release jsr pc,relarg mov opointer,r1 jsr pc,release mov ipointer,r1 jsr pc,release jsr pc,rec,tfiget cmpb $'\n,r0 bne 1f 2: mov asmem,r1 add $2,r(r1) mov (sp)+,r2 sec rts pc 1: cmpb r0,$'y beq 4f cmpb r0,$'q beq 3f 1: tst iflag bne 2b jsr pc,tfiget cmpb $'\n,r0 bne 1b br 2b 4: tst iflag bne 2b jsr pc,tfiget cmpb $'\n,r0 bne 1b mov asmem,r1 mov (sp)+,r2 clc rts pc 3: tst iflag bne 2b jsr pc,tfiget cmpb $'\n,r0 bne 1b mov (sp)+,r2 jmp loop inter: inc iflag rti / to remove an entry from asmem - r points to name ptr / rm: mov r3,-(sp) mov asmem,r1 mov r(r1),r3 su 0 edd: .even ftemp: erm: .even tmpw: .=.+2 tmpr: .=.+2 / / remove a 'file' from memory / remove: mov (sp)+,r3 bgt 5f mov $1,vflag mov asmem,r1 jsr pc,rewind mov r(r1),-(sp) 4: tst iflag beq 1f jmp loop 1: jsr pc,getword bes 4f mov r0,r2 jsr pc,ask bec 1f mov r(r1),(sp) br 4b 1: jsr pc,getword br 2f 5: mov (sp),r0 jsr pc,getspq bec 2f tst qflag blt 6f mov (sp),r1 jsr pc,nothere br 3f 2: mov r0,r1 jsr pc,release mov r2,r1 jlcurl jsr pc,flush jsr pc,whead .if testing 4 .endif sys exit b $4,r(r1) mov r(r1),r2 mov r2,-(sp) 1: mov r3,r(r1) jsr pc,getword bes 1f mov r(r1),r3 mov r2,r(r1) jsr pc,alterword mov r(r1),r2 br 1b 1: mov r2,w(r1) mov (sp)+,r(r1) mov (sp)+,r3 rts pc / / check that header pointed to by r2 released / ck: mov r2,-(sp) mov l(r2),r0 sub a(r2),r0 sub $hblk,r2 jsr pc,log2 asl r0 mov r0,ch mov frlist(r0),r0 1: beq 1f cmp r2,r0 beq 2f add $hblk,r0 mov (r0),r0 br 1b 2: mov ch,r0 inc freeb(r0) mov (sp)+,r2 rts pc 1: mov (sp)+,r2 sec rts pc octsr pc,release jsr pc,rm 3: tst vflag bne 3f tst iflag beq 1f jmp loop 1: tst qflag bgt 5b 6: tst (sp)+ dec r3 bgt 5b jmp loop 3: mov asmem,r1 mov (sp),r(r1) br 4b 4: tst (sp)+ jmp loop / / rename a 'file' / rename: mov (sp)+,r3 bne 1f jmp error 1: sub $2,r3 blt 1f 5: mov (sp),r0 jsr pc,getsp bes 4f tst (sp)+ sub $4,r(r1) mov (sp),r0 mov r2,-(sp) mov r(r1),-(sp) jsr pc,getsp bes 3f mov r2,-(sp) mov r0,r1 jsr pc,release jsr pc,rm mov (sp)+,r0 mov (sp)+,r(r1) jsr pc,alter : mov r1,-(sp) mov r0,r1 clr r0 div $8.,r0 mov r1,-(sp) add $'0,(sp) tst r0 beq 1f jsr r5,oct 1: movb (sp)+,ch mov $1,r0 sys write; ch; 1 mov (sp)+,r1 rts r5 decml: mov r1,-(sp) mov r0,r1 clr r0 div $10.,r0 mov r1,-(sp) add $'0,(sp) tst r0 beq 1f jsr r5,decml 1: movb (sp)+,ch mov $1,r0 sys write; ch; 1 mov (sp)+,r1 rts r5 / / iflag: 0 qflag: 0 vflag: 0 .data err4: < not in memory.\n> err1: end1: .even .bss freeh: .=.+2 freeb: .=.+32. freen: ch: .=.+2 strflgword mov (sp)+,r1 jsr pc,release br 5f 3: mov (sp)+,r(r1) mov (sp)+,r1 jsr pc,release mov $2,r0 jsr pc,allocate mov (sp)+,r2 2: movb (r2)+,r0 beq 2f jsr pc,putchar br 2b 2: mov r1,r0 mov asmem,r1 jsr pc,alterword 5: tst iflag beq 2f jmp loop 2: tst r3 beq 2f sub $2,r3 bge 5b 1: tst (sp)+ jmp error 2: jmp loop 4: mov (sp)+,r1 jsr pc,nothere tst (sp)+ br 5b / / list contents of asmem / list: mov $buffer,r2 movb $'\n,(r2)+ jsr pc,output mov (sp)+,r3 beq 1f mov $1,vflag 5: tst iflag beq 2f jmp loop 2: mov (sp),r0 jsr pc,getspq bes 4f mov r2,r1 br 3f 1: mov asmem,r1 jsr pc,fsfile sub $2,r(r1) 2: tst iflag bne 2f jsr pc,backword bes 2f mov r0,r1 3: jsr pc,getn movb $'\n,(r2)+ jsr pc,output tst vflag bne 1f mov asmem,r1 sub $2,r(r1) br 2b 1: tst qflag bgt 5b 4: tst (sp)+ dec r3 bgt 5b 2: mov $buffer,r2 movb $'\n,(r2)+ jsr pc,output jmp loop / / list a 'file / listf: mov (sp)+,r3 bgt 4f jmp error 4: mov (sp),r0 jsr pc,getspq bes 3f mov r0,r4 \0> c2: c3: c4: c5: c6: c7: c8: err: endt: .even jtable: list; listf; ed; remove; rename; fin; q; memck; spi: .=.+2 sv: .=.+2 4 bne 1b mov $buf+2,r2 2: tstb (r2)+ bne 2b movb $' ,-(r2) sub $buf+1,r2 mov r2,0f 2: mov $1,r0 sys write; buf+2; 0:.. clr r0 sys read; ch; 1 cmpb ch,$'\n beq 1b clr r0 sys read; ch1; 1 cmpb ch1,$'\n beq 3f 4: clr r0 sys read; ch; 1 cmpb ch,$'\n beq 2b br 4b 3: cmpb ch,$'x beq done cmpb ch,$'y bne 2b sys unlink; obuf bes error br 1b done: sys exit error: mov $1,r0 sys write; mes; 2 sys exit dot: <.\0> mes: .bss obuf: .=.+100. stbuf: .=.+40. buf: .=.+18. ch: .=.+1 mov r2,r1 jsr pc,rewind mov $buffer,r2 movb $'\n,(r2)+ 1: jsr pc,getchar bes 1f movb r0,(r2)+ cmp r2,$bufend blo 1b jsr pc,output br 1b 1: mov r4,r1 jsr pc,rewind movb $':,(r2)+ cmp r2,$bufend blo 2f jsr pc,output 2: movb $'\n,(r2)+ 1: tst iflag beq 2f jmp loop 2: cmp r2,$bufend blo 2f jsr pc,output 2: jsr pc,getchar bes 1f movb r0,(r2)+ br 1b 1: jsr pc,output 3: tst qflag bgt 4b tst (sp)+ dec r3 bgt 4b mov $buffer,r2 movb $'\n,(r2)+ jsr pc,output jmp loop / fin: jsr p9...as11.sas12.sas13.sas14.sas15.sas16.sas17.sas18.sas19.sas21.sas22.sas23.sas24.sas25.sas26.sas27.sas28.sas29.sruna.outl.out ch1: .=.+1 c,flush jsr pc,whead 4 q: jsr pc,flush jsr pc,whead sys exit memck: mov (sp)+,r3 2: ble 2f mov (sp)+,r1 cmpb (r1),$'p bne 1f bis $1,vflag br 3f 1: cmpb (r1),$'f bne 3f bis $2,vflag 3: dec r3 br 2b 2: clr freeh mov $freeb,r2 1: clr (r2)+ cmp r2,$freen blo 1b mov $headers,r2 2: cmp l(r2),$hsz beq 6f jsr pc,ck bec 1f cmp r2,asmem beq 1f mov asmem,r1 jsr pc,rewind clr r3 4: inc r3 jsr pc,getword bes 5f cmp r0,r2 bne 4b 6: inc freeh 1: cont: add $8.,r2 cmp r2,$headend-4 bl/ dusg -- summarize disk usage .globl putc, flush, _end mov $1,obuf mov (sp)+,r5 tst (sp)+ 1: dec r5 bgt 2f tstb buf1 beq 3f jsr r5,flush; obuf sys exit 3: mov $dot,r0 br 3f 2: mov (sp)+,r0 3: cmpb (r0),$'- bne 2f cmpb 1(r0),$'a bne 3f inc aflg br 1b 3: cmpb 1(r0),$'s bne 1b dec aflg br 1b 2: mov $buf1,r1 2: movb (r0)+,(r1)+ bne 2b dec r1 clr buf3+10. mov $_end,iptr mov $_end,brk sys break; _end jsr pc,tree tst aflg bpl 1b jsr r5,name br 1b tree: sys stat; buf1; buf2 b/ hash routine for diff / effectively spreads the string out into 7-bit / bytes, then sums the result 1's-complement / by 16-bit bytes and adds 1 to avoid zero answer / r4 hash accumulator / r3 current offset / r2 first time flag .globl _readhash .globl getc .data _readhash: mov 2(sp),0f mov r5,-(sp) mov r4,-(sp) mov r3,-(sp) mov r2,-(sp) mov $1,r4 mov r4,r2 clr r3 1: jsr r5,getc; 0: 0 bes 2f clr r2 cmp r0,$'\n beq 1f ashc $-16.,r0 ashc r3,r0 add r0,r4 adc r4 add r1,r4 adc r4 add $7,r3o 2b mov asmem,r1 jsr pc,rewind 4: jsr pc,getword bes 4f tst r(r0) beq 2f mov r0,r2 jsr pc,ck bes 4b 2: sub $hblk,r0 jsr r5,oct mov $1,r0 sys write; re; 24. cmp vflag,$1 beq 4b bit $1,r3 beq 2f jsr pc,getword mov r0,r1 jsr pc,release br 3f 2: jsr pc,backword add $4,r(r1) mov r0,r1 jsr pc,release 3: jsr pc,rm clr r3 br 4b 4: mov freeh,r0 jsr r5,decml mov $1,r0 sys write; frh; 14. mov $freeb,r2 mov $1,r3 6: cmp r2,$freen bhis 6f mov (r2)+,r0 beq 3f jsr r5,decml mov $1,res 1f bic $!60000,buf2+4 bit $20000,buf2+4 beq 2f 1: clr r4 rts pc 2: mov $_end,r2 mov buf2+2,r3 1: cmp r2,iptr bhis 1f cmp r3,(r2)+ bne 1b clr r4 jsr r5,cname rts pc 1: cmp r2,brk blo 1f add $512.,brk sys break; brk: .. 1: mov r3,(r2)+ mov r2,iptr cmp $40000,buf2+4 beq 1f jsr pc,gsize jsr r5,cname rts pc 1: jsr pc,gsize mov r4,r3 sys open; buf1; 0 bec 1f rts pc 1: mov r0,-(sp) mov r1,-(sp) 1: mov 2(sp),r0 sys read; buf3; 16. bes 1f tst r0 beq 1f tst buf3 beq 1b cmp b cmp r3,$16. blt 1b sub $16.,r3 br 1b 2: tst r2 bne 2f mov $2,r0 sys write; 3f; 4f-3f 2: clr r4 1: mov r4,r0 mov (sp)+,r2 mov (sp)+,r3 mov (sp)+,r4 mov (sp)+,r5 rts pc 3: 4: .even 0 sys write; frb; 18. mov r3,r0 jsr r5,decml mov $1,r0 sys write; lf; 1. 3: asl r3 br 6b 6: mov $1,r0 sys write; lf; 1. jmp loop 5: mov r2,r0 sub $hblk,r0 jsr r5,oct mov $1,r0 sys write; un; 26. tst vflag beq 1b mov r2,r1 cmp vflag,$2 beq 3f jsr pc,rewind mov $buffer,r2 2: jsr pc,getchar bes 2f movb r0,(r2)+ cmp r2,$buffer+80. blo 2b jsr pc,output br 2b 2: movb $'\n,(r2)+ jsr pc,output mov r1,r2 cmp vflag,$1 bne 3f jmp cont 3: jsr pc,release jmp cont / interrupt: 4 / un:uf3+2,$".\0 beq 1b cmp buf3+2,$".. bne 2f tst buf3+4 beq 1b 2: mov $buf3+2,r2 mov (sp),r1 movb $'/,(r1)+ cmpb -2(r1),$'/ bne 2f dec r1 2: movb (r2)+,(r1)+ bne 2b dec r1 mov r3,-(sp) jsr pc,tree mov r4,r3 add (sp)+,r3 br 1b 1: mov (sp)+,r1 clrb (r1) mov (sp)+,r0 sys close mov r3,r4 tst aflg bmi 1f jsr r5,name 1: rts pc cname: tst aflg bgt name rts r5 name: jsr pc,pnum mov $011,r0 jsr pc,pchar mov $buf1,r2 1: movb (r2)+,r0 beq 1f jsr pc,pchar br 1b 1: mov $'\n,r0 jsr!$'(+.147:=),/2 < header not accounted for\n> re: < part of asmem released\n> lf: <\n> frh: < free headers\n > frb: < free blocks size > endc: .even  pc,pchar rts r5 gsize: mov r5,-(sp) mov buf2+10.,r5 / size movb buf2+9.,r4 add $511.,r5 adc r4 alsc $-9,r4 cmp r5,$8. blo 1f mov r5,-(sp) add $255.,r5 alsc $-8,r4 add (sp)+,r5 1: mov r5,r4 mov (sp)+,r5 rts pc pnum: mov r4,-(sp) mov r5,-(sp) mov r4,r5 jsr pc,1f mov (sp)+,r5 mov (sp)+,r4 rts pc 1: clr r4 dvd $10.,r4 mov r5,-(sp) mov r4,r5 beq 1f jsr pc,1b 1: mov (sp)+,r0 add $'0,r0 jsr pc,pchar rts pc pchar: jsr r5,putc; obuf rts pc dot: <.\0> .bss iptr: .=.+2 buf1:/ / / here to allocate a new block / / mov ...,r0 / jsr pc,allocate / mov r1,... / / requested size in bytes in r0 / pointer to header of allocated block returned in r1 / r0 is preserved / / convert to words, adjust for header, round up / to a power of two / / each block has a four-word header / W - write ptr (also used as link ptr in frlist) / R - read ptr / A - pointer to head of data / L - ptr to (end+1) of data w=0 r=2 a=4 l=6 / allocate: clr garbage mov r0,-(sp) mov r2,-(sp) tst stats bne 1f signal = 48. testing = 0 / / command interpreter for form letter editor / / / command: sys signal; 2; inter jsr pc,initl mov sp,spi loop: mov spi,sp mov $buffer,r2 clr r4 clr iflag 1: jsr pc,tfiget cmpb $' ,r0 beq 1f cmpb $'\n,r0 bne 2f clrb (r2) br 4f 2: movb r0,(r2)+ br 1b 1: clrb (r2) mov $argc,r3 3: mov $arg,r2 2: jsr pc,tfiget cmpb $' ,r0 beq 1f cmpb $'\n,r0 beq 1f movb r0,(r2)+ br 2b 1: clrb (r2)+ inc r4 1: movb -(r2),sv cmp r2,$arg blos 1f movb -(r2),-(sp) movb sv,1(s .=.+100. buf2: .=.+40. buf3: .=.+18. aflg: .=.+2 obuf: .=.+520. jsr pc,init 1: inc stats bne 9f; inc stats; 9: cmp r0,$strend-strbuf blos 9f; 4; 9: 1: cmp $8.,r0 blo 2f mov $3.,r0 br 1f 2: sub $1,r0 bmi 1f jsr pc,log2 add $1,r0 1: asl r0 /bite to word mov r0,-(sp) add $2,r0 cmp r0,$frend-frlist+2 blo zzz jmp err / / look on free list for block of required size / zzz: mov (sp),r0 tst frlist(r0) beq xxx / / found it, allocate and return / mov frlist(r0),r1 mov (r1),frlist(r0) mov a(r1),r0 mov r0,w(r1) /W mov r0,r(r1) /R tst (sp)+ mov (sp)+,r2p) cmp r2,$arg bhi 1b mov sp,(r3)+ br 2f 1: clrb -(sp) movb sv,1(sp) mov sp,(r3) add $1,(r3)+ 2: cmpb r0,$'\n bne 3b 1: mov -(r3),-(sp) cmp r3,$argc bhi 1b 4: mov r4,-(sp) 3: clr r0 mov $tabl,r4 2: mov (r4)+,r1 cmp r4,$tend bhi error add $2,r0 mov $buffer,r2 1: cmpb (r1)+,(r2)+ bne 2b tstb (r1) bne 1b tstb (r2) bne 2b sub $2,r0 add $jtable,r0 clr vflag clr qflag jmp *(r0) / error: mov $1,r0 sys write; err; 2 br loop / / tabl: c1; c2; c3; c4; c5; c6; c7; c8; tend: 0 c1: 2: .even / / split larger block into two smaller pieces and / link together as smaller blocks in the free list. / yyy: mov frlist(r0),r1 mov (r1),frlist(r0) mov hdrptr,r2 bne 1f mov r0,-(sp) jsr pc,morehd tst r0 bne out mov (sp)+,r0 mov hdrptr,r2 1: mov (r2),hdrptr clr (r2) mov r2,(r1) mov r1,hdrptr(r0) mov l(r1),l(r2) mov l(r1),r0 sub a(r1),r0 asr r0 add a(r1),r0 mov r0,l(r1) mov r0,a(r2) br zzz / / / here to release a block / / mov ...,r1 / jsr pc,release / / pointer to block in r1 / release: / / discover that this is a plausible pointe2) blo 1f cmp (r2),lhblock beq 2f add $2,r2 br 1b 1: sub $2,r2 2: mov (r2),r2 add $1024.,r2 cmp r1,r2 blo 9f;4;9: mov $block,r2 1: cmp a(r1),(r2) blo 1f cmp (r2),lblock beq 2f add $2,r2 br 1b 1: sub $2,r2 2: cmp l(r1),(r2) bhis 9f;4;9: mov (r2),r2 add $10000,r2 cmp a(r1),r2 blo 9f;4;9: cmp l(r1),r2 blos 9f;4;9: mov (sp)+,r2 mov l(r1),r0 /L sub a(r1),r0 /A mov r0,-(sp) jsr pc,log2 asl r0 cmp exp2(r0),(sp) beq 9f; 4; 9: add $2,r0 cmp r0,$frend-frlist+2 blo 9f; 4; 9: sub jsr pc,lookchar / movb r0,... / lookchar: .if testing jsr pc,plausible inc stats+6. .endif cmp w(r1),r(r1) blos noch movb *r(r1),r0 clc rts pc / plausible: cmp r1,$headers bhis 9f; 4; 9: cmp r1,$headend blo 9f; 4; 9: rts pc / / / / routine to move the read pointer of a string to a / specified point. If the string is not long enough, / the string is extended / / mov position,r0 / mov ...,r1 / jsr pc,seekchar / seekchar: mov r1,-(sp) mov r0,-(sp) .if testing jsr pc,plausible inc stats+10.r / mov r0,-(sp) jsr pc,preposterous / / find free list index and link block to that entry / inc stats+2 mov frlist(r0),(r1) clr r(r1) mov r1,frlist(r0) clr r1 /self-defense mov (sp)+,r0 rts pc / / / jsr pc,collect / / coalesce free storage by rejoining paired blocks / on the free list. / zero is returned in r0 if no paired blocks were found. / collect: mov r1,-(sp) mov r2,-(sp) mov r3,-(sp) mov r4,-(sp) clr useful inc stats+4. clr r0 /start with smallest blocks /r0 contains frlist ind $2,r0 mov r0,(sp) mov frlist(r0),r0 1: beq 1f cmp r0,r1 bne 9f; 4; 9: mov (r0),r0 br 1b 1: mov (sp)+,r0 rts pc / / / routine to initialize storage area, headers and / free list upon first call to allocate a block. / The entire storage area is formed into a single block. / init: mov r0,-(sp) mov r1,-(sp) / / form all the headers into a single list. / mov $headers,r0 mov r0,hdrptr 1: add $8,r0 mov r0,-8(r0) cmp r0,$headend-8 blos 1b clr -8(r0) mov $frlist,r0 1: clr (r0)+ cmp r0,$frend blo 1 .endif 1: mov (sp),r0 add a(r1),r0 cmp r0,l(r1) bhi 3f mov r0,r(r1) cmp r0,w(r1) blo 1f mov r0,w(r1) br 1f 3: mov (sp),r0 jsr pc,allocate mov 2(sp),r0 jsr pc,move jsr pc,swap jsr pc,release mov 2(sp),r1 br 1b 1: mov (sp)+,r0 mov (sp)+,r1 rts pc / / / routine to move read pointer of string to end of string / / mov ...,r1 / jsr pc,fsfile / fsfile: .if testing jsr pc,plausible inc stats+10. .endif mov w(r1),r(r1) rts pc / / / routine to read a string backwards / the read pointer is ex loop1: mov $frlist,r1 add r0,r1 / / try next list member at this level / loop2: mov (r1),r3 beq advance /list is empty tst *(r1) /W beq advance /only one list element / / calculate address of buddy / mov a(r3),r4 mov $block,r2 1: cmp r4,(r2) blo 1f cmp r2,lblock beq 2f add $2,r2 br 1b 1: sub $2,r2 2: mov (r2),beg sub beg,r4 bit exp2(r0),r4 beq 2f bic exp2(r0),r4 br 1f 2: bis exp2(r0),r4 1: add beg,r4 / / and search for him / loop3: tst 0(r3) beq nocoal mov (r3),r2 cmp a(r2),r4 bb / mov hdrptr,r1 mov (r1),hdrptr clr w(r1) mov $strbuf,r0 mov r0,a(r1) mov $strend-strbuf,r0 jsr pc,log2 asl r0 cmp r0,$frend-frlist blo 9f; 4; 9: mov r1,frlist(r0) mov exp2(r0),r0 add $strbuf,r0 mov r0,l(r1) mov $hdrptr,r1 1: mov (r1),r1 tst r1 beq 1f mov $strbuf,a(r1) mov $strbuf,l(r1) br 1b 1: mov $end,brk add $2,nblock mov $strbuf,block mov $strbuf,lblock mov $headers,hblock add $2,nhdr mov $headers,lhblock mov (sp)+,r1 mov (sp)+,r0 rts pc / / .bss nhdr: .=.+2 lhblock: .=.decremented before reading / / mov ...,r1 / jsr pc,backspace / mov r0,... / backspace: .if testing jsr pc,plausible inc stats+6. .endif cmp a(r1),r(r1) bhis noch dec r(r1) movb *r(r1),r0 clc rts pc / / / / / routine to put a character into the string / pointed to by r1; character in r0 / r0 and r1 are preserved. / / movb ch,r0 / mov ...,r1 / jsr pc,putchar / putchar: mov r1,-(sp) mov r0,-(sp) .if testing jsr pc,plausible inc stats+8. .endif 1: cmp w(r1),l(r1) blt 3f mov w(r1),r0 inc r0 eq coal mov (r3),r3 br loop3 / / have found a pair; remove both blocks from list, / coalesce them, and put them on next higher list / coal: inc useful mov (r3),r4 mov (r4),(r3) /remove him from list mov (r1),r2 mov (r2),(r1) /remove the other one cmp a(r2),a(r4) bgt 1f mov r2,-(sp) mov r4,r2 mov (sp)+,r4 1: add exp2(r0),l(r4) clr r(r4) mov frlist+2(r0),(r4) mov r4,frlist+2(r0) mov hdrptr,(r2) mov r2,hdrptr clr r(r2) mov beg,a(r2) mov beg,l(r2) br loop2 / / no buddy found, try next block +2 hblock: .=.+20. hblkend: stats: .=.+16. useful: .=.+2 beg: .=.+2 lblock: .=.+2 nblock: .=.+2 block: .=.+40. blkend: brk: .=.+2 hdrptr: .=.+2 /do not move me frlist: .=hdrptr+32. frend: headers:.=hdrptr+1024. headend: strbuf: .=.+10000 strend: end: signal = 48. sub a(r1),r0 /W-A+1 jsr pc,allocate mov 2(sp),r0 /r1 jsr pc,move jsr pc,swap jsr pc,release mov 2(sp),r1 /r1 cmp w(r1),l(r1) blt 3f jmp err / 3: movb (sp),*w(r1) inc w(r1) mov (sp)+,r0 tst (sp)+ rts pc / / swap: mov w(r1),-(sp) mov w(r0),w(r1) mov (sp),w(r0) mov r(r1),(sp) mov r(r0),r(r1) mov (sp),r(r0) mov a(r1),(sp) mov a(r0),a(r1) mov (sp),a(r0) mov l(r1),(sp) mov l(r0),l(r1) mov (sp)+,l(r0) rts pc / / / routine to alter a character in the string / pointed to by r1; character ion this list / nocoal: mov (r1),r1 br loop2 / / advance to next free list / advance: tst (r0)+ cmp r0,$frend-frlist blo loop1 mov useful,r0 / / do we have enough headers to continue? / cmp garbage,$2 blo 1f mov $1,r0 sys write; 4f; 5f-4f jmp reset / 4: 5: .even / / / restore registers and return / 1: inc garbage mov (sp)+,r4 mov (sp)+,r3 mov (sp)+,r2 mov (sp)+,r1 rts pc / .bss garbage: .=.+2 .text / / routine to get more space for strings / moresp: mov r8;>*-0369<?n r0 / r0 and r1 are preserved. / / movb ch,r0 / mov ...,r1 / jsr pc,alterchar / alterchar: mov r1,-(sp) mov r0,-(sp) .if testing jsr pc,preposterous inc stats+8. .endif 1: cmp r(r1),l(r1) blt 3f mov l(r1),r0 inc r0 sub a(r1),r0 /W-A+1 jsr pc,allocate mov 2(sp),r0 /r1 jsr pc,move jsr pc,swap jsr pc,release mov 2(sp),r1 /r1 cmp r(r1),l(r1) blt 3f jmp err / 3: movb (sp),*r(r1) inc r(r1) cmp r(r1),w(r1) ble 1f mov r(r1),w(r1) 1: mov (sp)+,r0 tst (sp)+ rts pc / / / routine to move the 2,-(sp) mov r1,-(sp) mov brk,r1 mov $block,r2 add nblock,r2 cmp r2,$blkend bhis rout mov r1,(r2) mov r1,lblock add $2,nblock add $10000,r1 mov r1,9f sys break;9:.. bes 2f mov hdrptr,r2 bne 1f jsr pc,morehd tst r0 beq 2f mov hdrptr,r2 1: mov (r2),hdrptr mov brk,a(r2) mov r1,brk mov r1,l(r2) clr r(r2) mov $10000,r0 jsr pc,log2 asl r0 mov frlist(r0),w(r2) mov r2,frlist(r0) clr r0 mov (sp)+,r1 mov (sp)+,r2 rts pc 2: mov $1,r0 mov (sp)+,r1 mov (sp)+,r2 rts pc / / routine to g.globl getchar .globl stats .globl lookchar .globl fsfile .globl seekchar .globl backspace .globl putchar .globl alterchar .globl move .globl rewind .globl create .globl zero .globl allocate .globl release .globl collect .globl getword, putword .globl length, position .globl w, r, a, l / testing = 0 / / / routine to return the length of a string / / mov ...,r1 / jsr pc,length / mov r0,... / length: mov w(r1),r0 sub a(r1),r0 rts pc / / / routine to return the read pointer position / / mov ...,r1 / jsr pc,contents of one string / to another. / / mov source,r0 / mov dest,r1 / jsr pc,move / / on return, r1 points to the new string and should / be saved. r0 is preserved. / move: mov r3,-(sp) mov r2,-(sp) mov r1,-(sp) mov r0,-(sp) mov w(r0),r2 sub a(r0),r2 /W-A mov l(r1),r3 sub a(r1),r3 /L-A cmp r2,r3 ble 1f mov r2,r0 jsr pc,allocate mov 2(sp),r0 /r1 jsr pc,swap jsr pc,release mov r0,r1 mov 0(sp),r0 /r0 / 1: mov a(r0),(r0) mov a(r1),(r1) 1: dec r2 blt 1f movb *(r0),*(r1) inc (r0) inc (r1) et move space for headers / morehd: mov r2,-(sp) mov brk,r0 mov $hblock,r2 add nhdr,r2 cmp r2,$hblkend bhis rout mov r0,(r2) mov r0,lhblock add $2,nhdr add $1024.,r0 mov r0,9f sys break;9:.. bes 2f mov brk,r2 mov r2,hdrptr mov r0,brk sub $8,r0 1: add $8,r2 mov r2,-8(r2) cmp r2,r0 blos 1b clr -8(r2) clr r0 mov (sp)+,r2 rts pc 2: mov $1,r0 mov (sp)+,r2 rts pc rout: mov $1,r0 sys write; 4f; 5f-4f jmp reset / 4: 5: .even / / routine to findposition / mov r0,... / position: mov r(r1),r0 sub a(r1),r0 rts pc / / / / / routine to get a word from the string / mov ...,r1 / jsr pc,getword / mov r0,... / getword: jsr pc,getchar bes noch movb r0,nchar jsr pc,getchar bec 2f dec r(r1) br noch 2: movb r0,nchar+1 mov nchar,r0 tst r0 /tst clears c-bit rts pc / / / routine to put a word onto the string / mov ...,r1 / mov ...,r0 / jsr pc,putword / putword: jsr pc,putchar swab r0 jsr pc,putchar swab r0 rts pc / .bss nchar: .=.+2 .text / / / br 1b / / fix up read ptr of new string / 1: mov r(r0),r2 sub a(r0),r2 add a(r1),r2 mov r2,r(r1) / / restore and return / mov (sp)+,r0 mov (sp)+,r1 mov (sp)+,r2 mov (sp)+,r3 rts pc / / / routine to rewind read pointer of string / pointed to by r1 / / mov ...,r1 / jsr pc,rewind / rewind: .if testing jsr pc,plausible inc stats+10. .endif mov a(r1),r(r1) rts pc / / routine to rewind write pointer of string / pointed to by r1 / / mov ...,r1 / jsr pc,create / create: .if testing jsr pc,plausible integer part of log2(x) / / jsr pc,log2 / / r0 = log2(r0) / log2: mov r0,-(sp) bge 9f; 4; 9: mov $15.,r0 1: rol (sp) bmi 1f sob r0,1b 1: dec r0 tst (sp)+ rts pc / 0 /Don't move me, I'm exp(-1) exp2: 1;2;4;10;20;40;100;200;400;1000;2000;4000; 10000;20000;40000;100000 / / routine to discover whether r1 points to / a plausible header - to avoid ruination. / / r1 is preserved and r0 gets a suitable index for frlist / / jsr pc,preposterous / preposterous: mov r2,-(sp) mov $hblock,r2 1: cmp r1,(r / routine to read next character from string / pointed to by r1; character returned in r0 / c-bit set if character not available (end of file) / r1 is preserved / / mov ...,r1 / jsr pc,getchar / movb r0,... / getchar: jsr pc,lookchar bec 2f rts pc 2: inc r(r1) tst r0 /tst clears c-bit rts pc / noch: clr r0 sec rts pc / / routine to look at next character from string / pointed to by r1; character returned in r0 / c-bit set if character not available (end of file) / r1 is preserved / / mov ...,r1 / inc stats+10. .endif mov a(r1),w(r1) mov a(r1),r(r1) rts pc / / / routine to zero a string / / mov ...,r1 / jsr pc,zero / zero: mov r0,-(sp) .if testing jsr pc,preposterous .endif mov a(r1),r0 1: cmp r0,l(r1) bhis 1f clrb (r0)+ br 1b 1: mov (sp)+,r0 rts pc / / CFILORUADGJMvcarry 2: jsr pc,alterchar br 1b / 1: tst divcarry beq 1f mov $1.,r0 jsr pc,alterchar 1: jsr pc,fsfile 1: jsr pc,backspace bes 1f bne 1f mov r(r1),w(r1) br 1b 1: / / change sign of result if necessary / tst divsign bpl 1f jsr pc,chsign 1: mov dividend,r1 jsr pc,fsfile 1: jsr pc,backspace bes 1f bne 1f mov r(r1),w(r1) br 1b 1: bugout: tst remsign bpl 1f mov dividend,r1 jsr pc,chsign / / clean up junk, restore registers, and return / 1: mov divisor,r1 jsr pc,release mov (sp)+,r1 mackspace bes 2f beq 2b inc r(r1) 2: mov r(r1),w(r1) / / strip leading 99's / jsr pc,fsfile jsr pc,backspace cmpb r0,$-1 bne 1f 2: jsr pc,backspace bes 2f cmpb r0,$99. beq 2b jsr pc,getchar 2: mov $-1,r0 jsr pc,alterchar mov r(r1),w(r1) / / restore and return / 1: mov (sp)+,r1 mov (sp)+,r2 mov (sp)+,r3 mov (sp)+,r5 mov (sp)+,r4 mov (sp)+,r0 rts pc / .bss carry: .=.+2 .text / / / routine to change the sign of the centennial number / pointed to by r1. / negative numbers are stored in 100'/ / / routine to divide the two centennial numbers pointed / to by r2 (the divisor) and r3 (the dividend). / A pointer to the result is returned in r1. All other / registers are preserved. If the divisor is zero, zero / is returned and the carry bit is set. / Remainder is returned in r4 and has the sign / of the dividend. / / / mov divisor,r2 / mov dividend,r3 / jsr pc,div3 / mov r1,result / mov r4,remainder / / div3: mov r5,-(sp) mov r3,-(sp) /dividend mov r2,-(sp) /divisor mov r0,-(sp) tst -(sp) /rov (sp)+,r0 mov (sp)+,r2 mov (sp)+,r3 mov dividend,r4 mov (sp)+,r5 clc rts pc / / / / .bss divisor: .=.+2 dividend: .=.+2 divxyz: .=.+2 divoffset:.=.+2 divcarry: .=.+2 divsign: .=.+2 trial: .=.+2 remsign: .=.+2 magic: .=.+2 .text / / / / routine to exponentiate the two centennial numbers / pointed to by r2 (the base) and r3 (the exponent). / A pointer to the result is returned in r1. / / mov base,r2 / mov exp,r3 / jsr pc,exp3 / mov r1,... / / / save registers / exp3: mov r3,-(sp) /exponent mov r2,-(s complement form with / -1 as the high order digit; the second digit is not 99. / / mov ...,r1 / jsr pc,chsign / chsign: mov r1,-(sp) mov r0,-(sp) jsr pc,rewind clr chcarry / 1: jsr pc,lookchar bes 1f negb r0 sub chcarry,r0 mov $1,chcarry add $100.,r0 cmpb $100.,r0 bgt 2f sub $100.,r0 clr chcarry 2: jsr pc,alterchar br 1b / 1: clr r0 sub chcarry,r0 beq 2f jsr pc,putchar jsr pc,fsfile jsr pc,backspace jsr pc,backspace cmp r0,$99. bne 1f mov r(r1),w(r1) mov $-1,r0 jsr pc,putchar esult / / allocate space for result; allocate temps if necessary / clr r0 jsr pc,allocate mov r1,0(sp) /result / / / check for divisor zero / mov 4(sp),r2 /divisor mov w(r2),r0 sub a(r2),r0 bne 1f jmp eh 1: / / compute sign of result and make arguments positive / clr divsign mov r2,r1 jsr pc,length jsr pc,allocate mov r1,divisor mov r2,r0 jsr pc,move jsr pc,fsfile jsr pc,backspace bpl 1f 2: jsr pc,chsign mov r1,divisor com divsign 1: clr remsign mov r3,r1 jsr pc,length jsr pc,allocasp) /base mov r0,-(sp) / / 1: mov $1,r0 jsr pc,allocate mov r1,-(sp) /accumulated result mov $1,r0 jsr pc,putchar / mov r2,r1 jsr pc,length jsr pc,allocate mov r1,-(sp) /powers of the base mov r2,r0 jsr pc,move / mov r3,r1 jsr pc,length jsr pc,allocate mov r1,-(sp) /exponent mov r3,r0 jsr pc,move jsr pc,fsfile clr exptemp jsr pc,backspace bpl 1f inc exptemp jsr pc,chsign / 1: mov 0(sp),r1 jsr pc,length beq 1f mov sqtemp,r2 mov 0(sp),r3 jsr pc,div3 mov r1,0(sp) mov r3,r1 jsr br 1f / 2: jsr pc,fsfile jsr pc,backspace bne 1f mov r(r1),w(r1) / 1: mov (sp)+,r0 mov (sp)+,r1 rts pc / .bss chcarry: .=.+2 .text / / / / / routine to multiply the two centennial numbers / pointed to by r2 and r3. / a pointer to the result is returned in r1 / r2 and r3 are preserved / / mov ptr1,r2 / mov ptr2,r3 / jsr pc,mul3 / mov r1,... / / save registers and make space for temps / mul3: mov r5,-(sp) mov r3,-(sp) /arg2 mov r2,-(sp) /arg1 mov r0,-(sp) tst -(sp) /result tst -(sp) /arg1 tst te mov r1,dividend mov r3,r0 jsr pc,move jsr pc,fsfile jsr pc,backspace bpl 1f 2: jsr pc,chsign mov r1,dividend com divsign com remsign 1: / / / find out how many digits in the quotient result / 1: mov dividend,r2 mov divisor,r3 mov w(r2),r0 sub a(r2),r0 add a(r3),r0 sub w(r3),r0 jlo bugout mov r0,divoffset mov 0(sp),r1 /result inc r0 jsr pc,seekchar clr r0 mov dividend,r1 jsr pc,putchar / / load r5 with binary divisor for finding / trial quotient digits. If leading digit of / divisopc,release mov r4,r1 jsr pc,length jsr pc,release tst r0 beq 2f / / / mov 2(sp),r2 mov 4(sp),r3 jsr pc,mul3 mov r1,4(sp) mov r3,r1 jsr pc,release 2: mov 2(sp),r3 mov r3,r1 jsr pc,length jsr pc,allocate mov r1,r2 mov r3,r0 jsr pc,move jsr pc,mul3 mov r1,2(sp) mov r3,r1 jsr pc,release mov r2,r1 jsr pc,release br 1b 1: tst exptemp beq 1f mov 10(sp),r1 jsr pc,length bne 2f jmp eh 2: cmp r0,$1 blos 2f mov 4(sp),r1 jsr pc,create br 1f 2: jsr pc,rewind jsr pc,getchar cmp r0,$-(sp) /arg2 tst -(sp) /carry / / compute sign of result and make args positive / clr outsign mov r2,r1 jsr pc,fsfile jsr pc,backspace bmi 2f mov r2,4(sp) /arg1 br 1f 2: jsr pc,length jsr pc,allocate mov r1,4(sp) mov r2,r0 jsr pc,move jsr pc,chsign com outsign 1: mov r3,r1 jsr pc,fsfile jsr pc,backspace bmi 2f mov r3,2(sp) /arg2 br 1f 2: mov r3,r1 jsr pc,length jsr pc,allocate mov r1,2(sp) mov r3,r0 jsr pc,move jsr pc,chsign com outsign 1: / / compute the length of the result ar is <10, it is scaled / clr magic mov divisor,r1 jsr pc,fsfile jsr pc,backspace mov r0,r5 cmp r5,$10. bge 2f inc magic 2: mpy $100.,r5 jsr pc,backspace add r0,r5 tst magic beq 2f mov r5,r4 mpy $100.,r4 jsr pc,backspace add r0,r5 adc r4 asl r5 rol r4 dvd $25.,r4 mov r4,r5 2: / / compute trial quotient digit / 1: mov dividend,r1 jsr pc,fsfile jsr pc,backspace bec 9f; 4; 9: mov r0,r3 mpy $100.,r3 mov r3,r2 jsr pc,backspace add r0,r2 mpy $100.,r2 jsr pc,backspace add r0,r3 ad1 bgt 2f mov 4(sp),r1 jsr pc,create jsr pc,putchar br 1f 2: mov 4(sp),r1 jsr pc,create 1: mov (sp)+,r1 jsr pc,release mov (sp)+,r1 jsr pc,release mov (sp)+,r1 / mov (sp)+,r0 mov (sp)+,r2 mov (sp)+,r3 rts pc / .bss exptemp: .=.+2 .text / nd / allocate space for it / mov w(r2),r0 sub a(r2),r0 add w(r3),r0 sub a(r3),r0 jsr pc,allocate jsr pc,zero mov r1,6(sp) /result clr offset mov 2(sp),r1 /arg2 jsr pc,rewind / / work on next digit of arg2, starting over on arg1 / 1: mov 4(sp),r1 /arg1 jsr pc,rewind mov 2(sp),r1 /arg2 jsr pc,getchar bes 3f mov r0,r2 mov 6(sp),r1 /result jsr pc,rewind add offset,r(r1) clr 0(sp) /carry / / work on next digit of arg3 / form the product of the two digits, / add to what is already there and adc r2 tst divoffset bne 2f add $1,r3 adc r2 2: / tst magic beq 3f ashc $3,r2 3: mov r5,r0 tst divoffset beq 2f inc r0 2: dvd r0,r2 mov r2,trial / / / multiply divisor by trial digit / mov divisor,r1 jsr pc,rewind jsr pc,length inc r0 mov divxyz,r1 jsr pc,rewind clr -(sp) 2: mov divisor,r1 jsr pc,getchar bes 2f mov r0,r3 mpy trial,r3 add (sp),r3 /carry clr r2 dvd $100.,r2 mov r2,(sp) /carry mov r3,r0 mov divxyz,r1 jsr pc,alterchar br 2b 2: mov divxyz,r1 mov (sp)+,r0 jsr pSVBEHKNQTWX[d in old carry / to generate new dit and new carry. / 2: mov 4(sp),r1 /arg1 jsr pc,getchar bes 2f mov r0,r3 mpy r2,r3 add (sp),r3 /carry mov 6(sp),r1 /result jsr pc,lookchar add r0,r3 mov r3,r1 clr r0 dvd $100.,r0 mov r0,(sp) /carry mov r1,r0 mov 6(sp),r1 /result jsr pc,alterchar br 2b / 2: inc offset tst (sp) /carry beq 1b mov 6(sp),r1 /result jsr pc,lookchar add (sp),r0 /carry jsr pc,alterchar br 1b / 3: / / change sign of result if necessary / tst outsign bpl 1f mov 6(sp),rc,alterchar 3: / / and subtract from dividend / jsr pc,rewind mov divoffset,r0 mov dividend,r1 jsr pc,seekchar clr -(sp) / 2: mov dividend,r1 jsr pc,lookchar bes 2f mov r0,r2 / mov divxyz,r1 jsr pc,getchar sub r0,r2 sub (sp),r2 clr (sp) mov r2,r0 bpl 3f add $100.,r0 mov $1.,(sp) 3: mov dividend,r1 jsr pc,alterchar br 2b / / put away the quotient digit / 2: mov (sp)+,divcarry mov 0(sp),r1 /result jsr pc,backspace mov trial,r0 jsr pc,alterchar jsr pc,backspace / / and go for another d/ / / routine to add the two centennial numbers / pointed to by r2 and r3. / a pointer to the result is returned in r1 / r2 and r3 are preserved / / mov ptr1,r2 / mov ptr2,r3 / jsr pc,add3 / mov r1,... / add3: mov r0,-(sp) mov r4,-(sp) mov r5,-(sp) mov r3,-(sp) mov r2,-(sp) / / allocate a new string whose length is / the max of the two addends. / mov w(r2),r0 sub a(r2),r0 mov w(r3),r4 sub a(r3),r4 cmp r0,r4 bgt 1f mov r4,r0 1: mov r0,r4 jsr pc,allocate mov r1,-(sp) / / get everything ready / m1 /result jsr pc,chsign / / release dregs if necessary / 1: cmp 2(sp),14(sp) beq 1f mov 2(sp),r1 jsr pc,release 1: cmp 4(sp),12(sp) beq 1f mov 4(sp),r1 jsr pc,release 1: / / restore registers and return / tst (sp)+ tst (sp)+ tst (sp)+ mov (sp)+,r1 mov (sp)+,r0 mov (sp)+,r2 mov (sp)+,r3 mov (sp)+,r5 rts pc / .bss outsign: .=.+2 offset: .=.+2 k: .=.+2 kptr: .=.+2 .text / sqrt: mov r4,-(sp) mov r3,-(sp) mov r2,-(sp) mov r0,-(sp) / / check for zero or negative / mov w(r1),r2 sub a(r1),r2igit / dec divoffset bmi 1f mov dividend,r1 dec w(r1) cmp w(r1),a(r1) bhis 9f; 4; 9: jmp 1b / / fix up the result / 1: tst divcarry beq 1f mov trial,r0 dec r0 jsr pc,alterchar mov dividend,r1 mov $-1,r0 jsr pc,alterchar mov divisor,r2 mov dividend,r3 jsr pc,add3 mov r1,-(sp) mov r3,r1 jsr pc,release mov (sp)+,dividend 1: mov 0(sp),r1 /result jsr pc,rewind clr divcarry 1: jsr pc,lookchar bes 1f bic $!377,r0 add divcarry,r0 clr divcarry cmp r0,$100. blt 2f sub $100.,r0 inc diov 2(sp),r1 jsr pc,rewind mov 4(sp),r1 jsr pc,rewind clr carry / / now add them / 2: dec r4 blt 3f mov 2(sp),r1 /r2 jsr pc,getchar mov r0,r5 mov 4(sp),r1 /r3 jsr pc,getchar add r5,r0 add carry,r0 clr carry cmp r0,$100. blt 1f sub $100.,r0 mov $1,carry 1: tstb r0 bpl 1f add $100.,r0 mov $-1,carry 1: mov (sp),r1 /r1 jsr pc,putchar br 2b / / perhaps there is an extra digit / 3: mov carry,r0 beq 2f mov (sp),r1 /r1 jsr pc,putchar / / strip leading zeros / 2: jsr pc,fsfile 2: jsr pc,b / / look at the top one or two digits / mov r1,r3 jsr pc,fsfile jsr pc,backspace mov r0,r4 bit $1,r2 bne 2f mov r4,r1 mul $100.,r1 mov r1,r4 mov r3,r1 jsr pc,backspace add r0,r4 2: / / allocate space for result / inc r2 asr r2 mov r2,r0 jsr pc,allocate jsr pc,zero mov r2,r0 jsr pc,seekchar mov r1,r2 / / get high order digit of arg and square root it / mov $1,r0 2: sub r0,r4 blt 2f add $2,r0 br 2b 2: inc r0 asr r0 mov r0,r4 mov r2,r1 jsr pc,fsfile jsr pc,backspace cmp r4,$100.  blt 1f sub $100.,r4 mov r4,r0 jsr pc,alterchar mov $1,r0 jsr pc,putchar br 2f 1: mov r4,r0 jsr pc,alterchar 2: mov r1,-(sp) mov r3,-(sp) / / get successive approx. from Newton / 1: mov (sp),r3 /arg mov 2(sp),r2 /approx jsr pc,div3 mov r1,r3 jsr pc,add3 mov r1,-(sp) mov r3,r1 jsr pc,release mov r4,r1 jsr pc,release mov (sp)+,r1 mov sqtemp,r2 mov r1,r3 jsr pc,div3 mov r1,-(sp) mov r3,r1 jsr pc,release mov r4,r1 jsr pc,release mov (sp)+,r3 mov 2(sp),r1 jsr pc,length jsr pc,alln bne 1b clrb (r1)+ / sys fork br 9f sys wait mov $1,r0 sys write; screamer; 2 rts pc 9: sys exec; 6f; 8f sys exit .data 8: 6f; 7f; field; 0 6: 7: <-c\0> screamer: .even .bss field: .=.+70. .text / / / case d for duplicate / case144: cmp r5,$pdl jeq eh clr r0 jsr pc,allocate mov -2(r5),r0 jsr pc,move jsr pc,push jmp loop / / / case z for stack size / case172: clr r0 jsr pc,allocate mov r5,r3 sub $pdl,r3 asr r3 2: beq 2f clr r2 dvd $100.,r2 mov r3,r0 jsr pc,putcarray / case073: tst sfree bne 1f jsr pc,sinit 1: jsr pc,pop jes eh jsr pc,scalint jsr pc,fsfile jsr pc,backspace tst r0 jmi eh1 / neg. index jsr pc,length cmp r0,$2 jhi eh1 jsr pc,fsfile clr r3 cmp r0,$1 blo 1f beq 2f jsr pc,backspace mov r0,r3 mul $100.,r3 2: jsr pc,backspace add r0,r3 cmp r3,$2048. jhis eh1 / index too high asl r3 1: jsr pc,release jsr pc,readc asl r0 mov stable(r0),r1 beq 1f mov 2(r1),r1 jsr pc,length sub $2,r0 cmp r3,r0 bhi 1f / element not here movocate mov 2(sp),r0 jsr pc,move jsr pc,chsign mov r1,r2 jsr pc,add3 jsr pc,fsfile jsr pc,backspace jsr pc,release mov r2,r1 jsr pc,release tst r0 bpl 2f / / loop if new < old mov 2(sp),r1 jsr pc,release mov r3,2(sp) br 1b / 2: mov r3,r1 jsr pc,release mov (sp)+,r1 jsr pc,release mov (sp)+,r1 mov (sp)+,r0 mov (sp)+,r2 mov (sp)+,r3 mov (sp)+,r4 rts pc har mov r2,r3 br 2b 2: clr r0 jsr pc,putchar jsr pc,push jmp loop / / / case c for flush / case143: 2: jsr pc,pop jes loop jsr pc,release br 2b / / case s for save / case163: tst sfree bne 1f jsr pc,sinit 1: jsr pc,readc cmp r5,$pdl bne 2f movb $'s,ch jmp eh 2: clr r2 cmpb r0,$128. / check for array blo 1f inc r2 1: asl r0 mov stable(r0),r1 beq 2f mov r1,r0 mov 2(r0),r1 tst r2 beq 4f mov r1,-(sp) / have array - release elements jsr pc,rewind 1: mov (sp),r1 3: jsr pc,getword  r3,r0 jsr pc,seekchar jsr pc,getword tst r0 beq 1f mov r0,r1 mov r1,-(sp) jsr pc,length jsr pc,allocate mov (sp)+,r0 jsr pc,move jsr pc,push jmp loop 1: clr r0 jsr pc,allocate jsr pc,putword jsr pc,push jmp loop / / / case L for load / case114: jsr pc,readc clr r2 cmp r0,$128. / check for array blo 1f inc r2 1: asl r0 mov stable(r0),r1 beq 4f mov (r1),stable(r0) mov sfree,(r1) mov r1,sfree mov 2(r1),r1 tst r2 beq 2f mov r1,-(sp) / have array - assume a throw away jsr pc,rewadgjmY\_behknZ]`cfilopsvy|qtwz}rux{~bes 1f tst r0 beq 3b mov r0,r1 jsr pc,release br 1b 1: mov (sp)+,r1 4: jsr pc,release jsr pc,pop mov r1,2(r0) jbr loop 2: mov sfree,stable(r0) mov stable(r0),r0 mov (r0),sfree beq symout clr (r0) jsr pc,pop mov r1,2(r0) jmp loop / symout: mov $1,r0 sys write; 7f; 8f-7f jmp reset / 7: 8: .even / / sinit: mov $sfree+4,r0 1: mov r0,-4(r0) clr -2(r0) add $4,r0 cmp r0,$sfend blos 1b clr sfend-4 rts pc / / .bss sfree: .=.+512. sfend: .text / / / case S for sind 1: mov (sp),r1 3: jsr pc,getword bes 1f tst r0 beq 3b mov r0,r1 jsr pc,release br 1b 1: mov (sp)+,r1 2: jsr pc,push jbr loop 4: movb $'L,ch jbr eh / / / case - for subtract / case055: jsr pc,in055 jmp loop / in055: jsr pc,pop jes eh jsr pc,fsfile jsr pc,backspace mov r0,savk dec w(r1) jsr pc,chsign mov savk,r0 jsr pc,putchar jsr pc,push br in053 / / / case + for add / case053: jsr pc,in053 jmp loop / in053: jsr pc,eqk mov $add3,r0 jsr pc,binop jsr pc,pop mov savk,r0 jsr.globl log2 .globl getchar .globl lookchar .globl fsfile .globl seekchar .globl backspace .globl putchar .globl alterchar .globl move .globl rewind .globl create .globl zero .globl allocate .globl release .globl collect .globl w, r, a, l / cmp (sp)+,$2 blo 1f tst (sp)+ mov (sp)+,0f cmpb *0f,$'- beq 8f sys 0; 9f .data 9: sys open; 0:.=.+2; 0 .text bec 2f mov $1,r0 sys write; 4f; 5f-4f sys exit / 4: 5: .even / 2: mov r0,source 1: sys signal; 2; 1 ror r0 bcs 1f sys signal; 2; ave / case123: tst sfree bne 1f jsr pc,sinit 1: jsr pc,readc cmp r5,$pdl bne 2f movb $'S,ch jbr eh 2: clr r3 cmp r0,$128. / check for array blo 1f inc r3 1: asl r0 mov stable(r0),r1 beq 2f mov sfree,r2 mov (r2),sfree beq symout mov stable(r0),(r2) mov r2,stable(r0) jsr pc,pop tst r3 beq 1f jsr pc,length / to make auto arrays work cmp r0,$1 bhi 1f jsr pc,zero 1: mov r1,2(r2) jbr loop 2: mov sfree,stable(r0) mov stable(r0),r2 mov (r2),sfree beq symout clr (r2) jsr pc,pop ts pc,putchar jsr pc,push rts pc / / / case * for multiply / case052: jsr pc,pop jes eh mov r1,-(sp) jsr pc,pop jec 1f mov (sp)+,r1 jsr pc,push jbr eh 1: jsr pc,fsfile jsr pc,backspace mov r0,savk2 dec w(r1) mov r1,r2 mov (sp)+,r1 jsr pc,fsfile jsr pc,backspace mov r0,savk1 dec w(r1) mov r1,r3 mov $mul3,r0 jsr pc,binop jsr pc,pop cmp savk1,savk2 blo 1f mov savk1,r2 br 2f 1: mov savk2,r2 2: cmp r2,k bhis 1f mov k,r2 1: add savk2,savk1 cmp r2,savk1 bhis 1f mov r2,-(sp) neg rcase177 1: 8: clr delflag mov $pdl,r5 / mov $10.,r0 jsr pc,log2 mov r0,log10 mov $1,r0 jsr pc,allocate mov r1,scalptr clr r0 jsr pc,putchar clr r0 jsr pc,allocate mov r1,basptr mov $10.,r0 jsr pc,putchar mov $1,r0 jsr pc,allocate mov r1,inbas mov $10.,r0 jsr pc,putchar mov $1,r0 jsr pc,allocate mov $10.,r0 jsr pc,putchar mov r1,tenptr clr r0 jsr pc,allocate mov r1,chptr clr r0 jsr pc,allocate mov r1,strptr mov $1,r0 jsr pc,allocate mov $2,r0 jsr pc,putchar mov r1,sqtemp t r3 beq 1f jsr pc,length cmp r0,$1 bhi 1f jsr pc,zero 1: mov r1,2(r2) jbr loop / / / case l for load / case154: jsr pc,in154 jmp loop / in154: jsr pc,readc clr r2 cmp r0,$128. / check for array blo 1f inc r2 1: asl r0 mov stable(r0),r1 beq 1f mov 2(r1),r1 mov r1,-(sp) jsr pc,length jsr pc,allocate tst r2 beq 2f mov r1,-(sp) / have array - copy elements mov 2(sp),r1 jsr pc,rewind 3: mov 2(sp),r1 jsr pc,getword bes 3f tst r0 beq 4f mov r0,-(sp) mov r0,r1 jsr pc,length jsr p2 add savk1,r2 jsr pc,removc mov (sp)+,r0 2: jsr pc,putchar jsr pc,push jmp loop 1: mov savk1,r0 br 2b / / r1 = string / r2 = count / result returned in r1 (old r1 released) / removc: mov r1,-(sp) jsr pc,rewind 1: cmp r2,$1 blos 1f jsr pc,getchar sub $2,r2 br 1b 1: mov $2,r0 jsr pc,allocate mov r1,-(sp) 1: mov 2(sp),r1 jsr pc,getchar bes 1f mov (sp),r1 jsr pc,putchar mov r1,(sp) br 1b 1: cmp r2,$1 bne 1f mov (sp),r3 mov tenptr,r2 jsr pc,div3 mov r1,(sp) mov r3,r1 jsr pc,releclr r0 jsr pc,allocate mov r1,divxyz loop: tst delflag bne in177 mov sp,errstack jsr pc,readc mov $casetab,r1 1: tst (r1)+ beq 2f cmp r0,(r1)+ bne 1b jmp *-4(r1) 2: jmp eh / / / case for new line (which is special for apl box) / case012: br loop / / / case q for quit / case161: cmp readptr,$readstack+2 blos 1f mov *readptr,r1 beq 2f jsr pc,release 2: sub $2,readptr mov *readptr,r1 beq 2f jsr pc,release 2: sub $2,readptr jmp loop 1: sys exit / / / case Q for controlled quit / case121:c,allocate mov (sp)+,r0 jsr pc,move mov r1,r0 mov (sp),r1 jsr pc,putword br 3b 4: clr r0 mov (sp),r1 jsr pc,putword br 3b 3: mov (sp)+,r1 jsr pc,push tst (sp)+ rts pc 2: mov (sp)+,r0 jsr pc,move jsr pc,push rts pc 1: clr r0 jsr pc,allocate jsr pc,putword jsr pc,push rts pc / / case : for save array / case072: tst sfree bne 1f jsr pc,sinit 1: jsr pc,pop jes eh jsr pc,scalint jsr pc,fsfile jsr pc,backspace tst r0 jmi eh1 / neg. index jsr pc,length cmp r0,$2 jhi eh1 / index ase mov r4,r1 jsr pc,release 1: mov 2(sp),r1 jsr pc,release mov (sp)+,r1 tst (sp)+ rts pc / / case / for divide / case057: jsr pc,dscale mov $div3,r0 jsr pc,binop mov r4,r1 jsr pc,release jsr pc,pop mov savk,r0 jsr pc,putchar jsr pc,push jmp loop / / dscale: jsr pc,pop jes eh mov r1,-(sp) jsr pc,pop bec 1f mov (sp)+,r1 jsr pc,push jmp eh 1: mov r1,-(sp) jsr pc,fsfile jsr pc,backspace mov r0,savk1 dec w(r1) jsr pc,rewind mov 2(sp),r1 jsr pc,fsfile jsr pc,backspace mov r0,sa jsr pc,pop jes eh jsr pc,length cmp r0,$2 jhi eh1 jsr pc,rewind jsr pc,getchar jmi eh1 jsr pc,release 1: cmp readptr,$readstack jlos eh mov *readptr,r1 beq 2f jsr pc,release 2: sub $2,readptr sob r0,1b jbr loop / / / case of delete character / case177: sys signal; 2; case177 mov $1,delflag mov r0,-(sp) mov 2(sp),r0 cmp -6(r0),$sys+read bne 1f sub $6,2(sp) clr delflag 1: mov (sp)+,r0 2 /rti / in177: mov $' ,ch mov $1,r0 sys write; 1f; 1 clr delflag jmp eh / .bss delflag: .=too high jsr pc,fsfile clr r3 cmp r0,$1 blo 1f beq 2f jsr pc,backspace mov r0,r3 mul $100.,r3 2: jsr pc,backspace add r0,r3 cmp r3,$2048. jhis eh1 / index too high asl r3 1: jsr pc,release jsr pc,readc cmp r5,$pdl bne 2f movb $':,ch jmp eh 2: asl r0 mov stable(r0),r1 beq 2f mov r1,-(sp) mov 2(r1),r1 mov l(r1),r0 sub a(r1),r0 sub $2,r0 cmp r3,r0 blos 1f mov r1,-(sp) / need more space mov r3,r0 add $2,r0 jsr pc,allocate jsr pc,zero mov (sp)+,r0 jsr pc,move mov r1,-(sp) movk2 dec w(r1) mov k,r2 sub savk1,r2 add savk2,r2 mov k,savk mov (sp)+,r1 tst r2 bmi 1f jsr pc,add0 br 2f 1: neg r2 jsr pc,removc 2: mov r1,r3 mov (sp)+,r2 rts pc / / / case % for remaindering / case045: jsr pc,dscale mov $div3,r0 jsr pc,binop jsr pc,pop jsr pc,release mov r4,r1 mov savk1,r0 add k,r0 jsr pc,putchar jsr pc,push jmp loop / / binop: jsr pc,(r0) jsr pc,push mov r2,r1 jsr pc,release mov r3,r1 jsr pc,release rts pc / eqk: jsr pc,pop jes eh mov r1,-(sp) jsr pc,p.+2 .text 1: <\n> .even / / / case digit / case060: movb r0,savec jsr pc,readin jsr pc,push br loop / / / case _ for negative numbers / case137: jsr pc,readin jsr pc,fsfile jsr pc,backspace mov r0,savk dec w(r1) jsr pc,chsign mov savk,r0 jsr pc,putchar jsr pc,push jbr loop / / / case screamer / case041: jsr pc,in041 jbr loop / in041: jsr pc,readc cmp r0,$'< jeq in74a cmp r0,$'= jeq in75a cmp r0,$'> jeq in76a / mov $field,r1 movb r0,(r1)+ 1: jsr pc,readc movb r0,(r1)+ cmpb r0,$'\v r0,r1 jsr pc,release mov (sp)+,r1 1: mov r1,-(sp) mov r3,r0 jsr pc,seekchar jsr pc,getword bes 1f sub $2,r(r1) tst r0 beq 1f mov r0,r1 jsr pc,release 1: jsr pc,pop jes eh mov r1,r0 mov (sp)+,r1 jsr pc,alterchar swab r0 jsr pc,alterchar mov (sp)+,r0 mov r1,2(r0) jmp loop 2: mov sfree,stable(r0) mov stable(r0),r0 mov (r0),sfree jeq symout clr (r0) mov r0,-(sp) mov r3,r0 add $2,r0 jsr pc,allocate jsr pc,zero sub $2,r0 jsr pc,seekchar mov r1,-(sp) br 1b / / case ; for load op bec 1f mov (sp)+,r1 jsr pc,push jbr eh 1: mov r1,-(sp) mov 2(sp),r1 jsr pc,fsfile jsr pc,backspace mov r0,savk1 dec w(r1) mov (sp),r1 jsr pc,fsfile jsr pc,backspace mov r0,savk2 dec w(r1) cmp r0,savk1 beq 1f blo 2f mov savk2,savk mov r0,r2 sub savk1,r2 mov 2(sp),r1 jsr pc,add0 mov r1,2(sp) br 4f 2: mov savk1,r2 sub savk2,r2 mov (sp),r1 jsr pc,add0 mov r1,(sp) 1: mov savk1,savk 4: mov 2(sp),r3 mov (sp)+,r2 tst (sp)+ rts pc .bss savk1: .=.+2 savk2: .=.+2 savk: .=.+2 .text / / / r2 = count / r1 = ptr / returns ptr in r1 add0: mov r1,-(sp) jsr pc,length jsr pc,allocate clr r0 1: cmp r2,$1 blos 1f jsr pc,putchar sub $2,r2 br 1b 1: mov r1,-(sp) mov 2(sp),r1 jsr pc,rewind 1: jsr pc,getchar bes 1f mov (sp),r1 jsr pc,putchar mov r1,(sp) mov 2(sp),r1 br 1b 1: cmp r2,$1 bne 1f mov (sp),r3 mov tenptr,r2 jsr pc,mul3 mov r1,(sp) mov r3,r1 jsr pc,release 1: mov 2(sp),r1 jsr pc,release mov (sp)+,r1 tst (sp)+ rts pc / case i for input base / case151: jsr p pc,push jmp case057 / .bss sav: .=.+2 negexp: .=.+2 .text / / case v for square root / case166: jsr pc,pop jes eh / jsr pc,fsfile jsr pc,backspace mov r0,savk dec w(r1) mov w(r1),r2 sub a(r1),r2 tst r2 beq sqz jsr pc,backspace tst r0 jmi eh1 mov k,r2 asl r2 sub savk,r2 beq 1f blo 2f jsr pc,add0 br 1f 2: neg r2 jsr pc,removc 1: jsr pc,sqrt mov k,r0 jsr pc,putchar jsr pc,push jmp loop / / sqz: mov savk,r0 jsr pc,putchar jsr pc,push jmp loop .bss sqtemp: .=.+2 .text / / / case lease mov (sp)+,r2 mov (sp)+,r3 jsr pc,div3 mov r1,-(sp) mov r2,r1 jsr pc,release mov r3,r1 jsr pc,release mov r4,r1 jsr pc,release mov (sp)+,r1 rts pc / / routine to read another character from the input / stream. If the caller does not want the character, / it is to be placed in the cell savec. / The routine exits to the system on end of file. / Character is returned in r0. / / jsr pc,readc / movb r0,... / / readc: tst savec beq 1f movb savec,r0 bic $177400,r0 clr savec rts pc 1: tst *c,in151 jmp loop / in151: jsr pc,pop jes eh jsr pc,scalint mov r1,-(sp) mov inbas,r1 mov (sp)+,inbas jsr pc,release rts pc case111: mov inbas,r1 jsr pc,length inc r0 jsr pc,allocate mov inbas,r0 jsr pc,move clr r0 jsr pc,putchar /scale jsr pc,push jmp loop / .bss inbas: .=.+2 .data / / / case o for output base / case157: jsr pc,in157 jmp loop / in157: jsr pc,pop jes eh jsr pc,scalint mov r1,-(sp) jsr pc,length jsr pc,allocate mov (sp),r0 jsr pc,move jsr pc,fsfile jsr pc,length[ for subroutine definition / case133: clr -(sp) clr r0 jsr pc,allocate jsr pc,push 1: jsr pc,readc cmp r0,$'] bne 3f tst (sp) beq 1f dec (sp) br 2f 3: cmp r0,$'[ bne 2f inc (sp) 2: jsr pc,putchar br 1b / 1: tst (sp)+ jmp loop / / / case x for execute top of stack / case170: jsr pc,in170 jmp loop / in170: jsr pc,pop jes eh mov r1,-(sp) tst *readptr beq 1f mov *readptr,r1 cmp r(r1),w(r1) bne 1f jsr pc,release br 2f 1: add $2,readptr cmp readptr,$readtop bhis 1f 2: mov (sp)+,r1 readptr bne 1f 2: mov source,r0 sys read; ch; 1 bes eof tst r0 beq eof movb ch,r0 bic $177400,r0 rts pc 1: mov r1,-(sp) mov *readptr,r1 jsr pc,getchar bes eof1 bic $177400,r0 mov r0,ch mov (sp)+,r1 rts pc / eof: tst source beq 1f clr source br 2b 1: sys exit / eof1: mov *readptr,r1 beq 2f jsr pc,release 2: sub $2,readptr mov (sp)+,r1 jmp readc / / / case p for print / case160: cmp r5,$pdl jeq eh jsr pc,in160 jmp loop / / in160: / mov $1,r0 / sys write; sphdr; 4 br 1f / sphdr: 1: cmp r0,$1 beq 1f jsr pc,backspace bpl 2f jsr pc,chsign jsr pc,length br 1b 2: clr sav mov r0,-(sp) 2: jsr pc,backspace bes 2f mov (sp),r2 clr r3 mul $100.,r2 add r0,r3 mov r3,(sp) tst sav beq 3f mov r2,r0 clr r3 mov sav,r2 mul $100.,r2 mov r3,sav add r0,sav br 2b 3: mov r2,sav br 2b 2: mov (sp)+,r0 tst sav beq 2f mov sav,r0 jsr pc,log2 add $16.,r0 mov r0,logo br 3f 1: jsr pc,backspace 2: tst r0 bpl 1f mov $15.,logo br 3f 1: jsr pc,log2 mov r0,logo 3: jsr pc,rel mov r1,*readptr beq 2f jsr pc,rewind rts pc 2: jsr pc,readc cmp r0,$'\n beq 3f mov r0,savec 3: rts pc 1: nderr: mov $1,r0 sys write; 1f; 2f-1f jmp reset 1: 2: .even / .data readptr: readstack .bss readstack: .=.+100. readtop: .text / / case ? for apl box function / case077: add $2,readptr cmp readptr,$readtop bhis nderr clr *readptr in077: mov source,-(sp) clr source jsr pc,readc cmp r0,$'! bne 1f jsr pc,in041 mov (sp)+,source br in077 1: mov r0,savec clr r0 jsr < > .even / 1: cmp r5,$pdl bne 1f mov $1,r0 sys write; qm; 1 mov $1,r0 sys write; nl; 1 rts pc / / do the conversion / 1: mov -2(r5),r1 jsr pc,printf rts pc / / / case f for print the stack / case146: mov r5,-(sp) 1: cmp r5,$pdl beq 2f 1: jsr pc,in160 jsr pc,pop cmp r5,$pdl bne 1b 2: mov $stable-2,r2 1: tst (r2)+ cmp r2,$stable+254. bhi 1f / mov (r2),r3 beq 1b movb $'0,7f+3 mov r2,r0 sub $stable,r0 asr r0 movb r0,7f+1 3: mov $1,r0 sys write; 7f; 8f-7f .data 7: <" (0)"> 8: .ease mov basptr,r1 jsr pc,release mov (sp),basptr / / set field widths for output / and set output digit handling routines / mov (sp),r1 mov $bigout,outdit jsr pc,length cmp r0,$1. bne 2f jsr pc,fsfile jsr pc,backspace cmp r0,$16. bhi 2f mov $hexout,outdit 2: jsr pc,length jsr pc,allocate mov (sp),r0 jsr pc,move clr (sp) jsr pc,fsfile jsr pc,backspace bpl 2f add $1.,(sp) jsr pc,chsign 2: mov r1,r2 mov $1,r0 jsr pc,allocate mov $-1,r0 jsr pc,putchar mov r1,r3 jsr pc,add3 jsr pc pc,allocate 2: jsr pc,readc jsr pc,putchar 1: jsr pc,readc jsr pc,putchar cmp r0,$'\\ beq 2b cmp r0,$'\n bne 1b mov (sp)+,source mov r1,*readptr jmp loop / / / case < for conditional execution / case074: jsr pc,in074 ble neg074 jmp aff074 / / / case !< for conditional execution / in74a: jsr pc,in074 bgt inneg jmp inaff / in074: jsr pc,in055 /go subtract jsr pc,pop jsr pc,length tst r0 beq 1f jsr pc,fsfile jsr pc,backspace jsr pc,backspace tst r0 1: rts pc / aff074: jsr pc,releaseven .text mov 2(r3),r1 jsr pc,printf tst (r3) beq 1b incb 7b+3 mov (r3),r3 br 3b 1: mov (sp)+,r5 jbr loop / / / routine to convert to decimal and print the / top element of the stack. / / jsr pc,printf / / printf: mov r4,-(sp) mov r3,-(sp) mov r2,-(sp) mov r1,-(sp) mov r0,-(sp) clr -(sp) jsr pc,rewind 2: jsr pc,getchar bes 2f cmp r0,$143 blos 2b cmp r0,$-1 beq 2b bis $1,(sp) br 2b 2: tst (sp)+ beq 2f jsr pc,length mov r0,0f mov a(r1),3f mov $1,r0 sys 0; 9f .data 9: sys write,length asl r0 add r0,(sp) jsr pc,fsfile jsr pc,backspace cmp r0,$9. blos 2f add $1,(sp) 2: jsr pc,release mov r2,r1 jsr pc,release mov r3,r1 jsr pc,release mov (sp)+,fw mov fw,fw1 dec fw1 cmp outdit,$hexout bne 2f mov $1,fw clr fw1 2: mov $70.,ll cmp fw,$70. blo 9f; rts pc; 9: mov $70.,r1 clr r0 dvd fw,r0 mov r0,r1 mpy fw,r1 mov r1,ll rts pc case117: mov basptr,r1 jsr pc,length inc r0 jsr pc,allocate mov basptr,r0 jsr pc,move clr r0 jsr pc,putchar /scale jsr pc,push je jsr pc,in154 /load from register jmp case170 / neg074: jsr pc,release jsr pc,readc jmp loop / / / case = for conditional execution / case075: jsr pc,in074 beq aff074 jmp neg074 / / / case != for conditional execution / in75a: jsr pc,in074 bne inaff jmp inneg / / / case > for conditional execution / case076: jsr pc,in074 bge neg074 jmp aff074 / / / case !> for conditional execution / in76a: jsr pc,in074 blt inneg jmp inaff / inaff: jsr pc,release jsr pc,in154 jsr pc,in170 rts pc / inne; 3:.=.+2; 0:.=.+2 .text jbr prout 2: jsr pc,fsfile jsr pc,backspace bec 1f mov $1,r0 sys write; asczero; 1 jbr prout 1: jsr pc,length mov r1,-(sp) jsr pc,allocate mov (sp),r0 mov r1,(sp) jsr pc,move mov ll,count / inc count jsr pc,fsfile jsr pc,backspace mov r0,savk dec w(r1) jsr pc,backspace cmpb r0,$-1 bne 2f mov basptr,r1 jsr pc,fsfile jsr pc,backspace cmp r0,$-1 beq 2f mov (sp),r1 jsr pc,chsign mov $'-,ch jsr pc,wrchar br 1f 2: / mov $' ,ch / jsr pc,wrchar 1: mov strptr,mp loop / .data fw: 1 /field width for digits fw1: 0 ll: 70. /line length .text / / / case k for skale factor / case153: jsr pc,pop jes eh jsr pc,scalint mov w(r1),r0 sub a(r1),r0 cmp r0,$1 jhi eh1 jsr pc,rewind jsr pc,getchar jmi eh1 mov r0,k mov r1,-(sp) mov scalptr,r1 jsr pc,release mov (sp)+,scalptr jmp loop / case113: mov scalptr,r1 jsr pc,length inc r0 jsr pc,allocate mov scalptr,r0 jsr pc,move clr r0 jsr pc,putchar jsr pc,push jmp loop scalint: jsr pc,fsfile jsr pc,bacg: jsr pc,release jsr pc,readc rts pc / err: mov $1,r0 sys write; 1f; 2f-1f jmp reset 1: ; 2: .even / eh1: jsr pc,release eh: movb ch,1f+2 mov $1,r0 sys write; 1f; 2f-1f mov $readstack,readptr mov errstack,sp jmp loop .data 1: <( ) ?\n> 2: .even .text / / / routine to read and convert a number from the / input stream. Numbers beginnig with 0 are / converted as octal. Routine converts / up to next nonnumeric. / / readin: clr dp clr dpt clr r0 jsr pc,allocate mov r1,-(sp) r1 jsr pc,create mov basptr,r1 jsr pc,length cmp r0,$1 jlo dingout bne 1f jsr pc,rewind jsr pc,getchar cmp r0,$1. jeq unout cmp r0,$-1 jeq dingout cmp r0,$10. jeq tenout 1: mov log10,r1 mul savk,r1 clr r0 div logo,r0 mov r0,dout clr ct 1: mov (sp),r3 mov savk,r2 jsr pc,getdec mov r1,decimal clr dflg mov (sp),r1 mov savk,r2 jsr pc,removc mov r1,(sp) 1: mov (sp),r3 mov basptr,r2 jsr pc,div3 mov r1,r2 mov (sp),r1 jsr pc,release mov r2,(sp) mov r4,r1 jsr pc,*outdit mov (spkspace dec w(r1) mov r0,r2 jsr pc,removc rts pc / / case ^ for exponentiation / case136: jsr pc,pop jes eh jsr pc,scalint jsr pc,fsfile jsr pc,backspace tst r0 bge 1f inc negexp jsr pc,chsign 1: jsr pc,length cmp r0,$3 jhis eh1 mov r1,r3 jsr pc,pop jes eh jsr pc,fsfile jsr pc,backspace mov r0,savk dec w(r1) mov r1,r2 jsr pc,exp3 mov r1,-(sp) mov r2,r1 jsr pc,release mov r3,r1 jsr pc,rewind jsr pc,getchar mov r0,-(sp) jsr pc,getchar bes 2f mov r0,r1 mul $100.,r1 add (sp)+mov strptr,r1 jsr pc,create jsr pc,readc 1: cmpb ch,$'0 blt 3f cmpb ch,$'9 bgt 3f mov ch,r0 sub $'0,r0 4: tst dp beq 8f cmp dpt,$99. beq 5f inc dpt 8: mov chptr,r1 jsr pc,create tst r0 beq 2f jsr pc,putchar 2: mov r1,chptr mov (sp),r3 mov inbas,r2 jsr pc,mul3 mov r1,(sp) mov r3,r1 jsr pc,release mov (sp),r3 mov chptr,r2 jsr pc,add3 mov r1,(sp) mov r3,r1 jsr pc,release 5: jsr pc,readc mov r0,ch br 1b 3: cmpb ch,$'A blt 1f cmpb ch,$'F bgt 1f mov ch,r0 sub $67,r0 br 4b 1),r1 jsr pc,length bne 1b / mov strptr,r1 jsr pc,fsfile 1: jsr pc,backspace bes 1f mov r0,ch jsr pc,wrchar br 1b 1: mov (sp)+,r1 jsr pc,release tst savk bne 1f mov decimal,r1 jsr pc,release br prout 1: mov dot,ch jsr pc,wrchar mov strptr,r1 jsr pc,create mov decimal,-(sp) inc dflg 1: mov (sp),r3 mov basptr,r2 jsr pc,mul3 mov r1,(sp) mov r3,r1 jsr pc,release mov (sp),r3 mov savk,r2 jsr pc,getdec mov r1,(sp) mov r3,r1 mov savk,r2 jsr pc,removc jsr pc,*outdit mov strptr,r1 ,r1 br 3f 2: mov (sp)+,r1 3: mul savk,r1 mov r1,r2 mov r3,r1 jsr pc,release tst negexp bne 4f cmp k,savk blo 1f mov k,r3 br 2f 1: mov savk,r3 2: cmp r3,r2 bhis 4f sub r3,r2 mov (sp)+,r1 mov r3,-(sp) jsr pc,removc mov (sp)+,r0 jsr pc,putchar jsr pc,push br 3f 4: mov (sp)+,r1 mov r2,r0 jsr pc,putchar jsr pc,push 3: tst negexp jeq loop clr negexp jsr pc,pop mov r1,-(sp) mov $2,r0 jsr pc,allocate mov $1,r0 jsr pc,putchar clr r0 jsr pc,putchar jsr pc,push mov (sp)+,r1 jsr: cmpb ch,$134 /backslash bne 1f jsr pc,readc br 5b 1: cmpb ch,$'. bne 1f tst dp bne 1f inc dp clr dpt br 5b 1: mov r0,savec / / scale up or down 2: tst dp bne 1f mov (sp)+,r1 clr r0 jsr pc,putchar rts pc 1: mov (sp),r1 jsr pc,scale mov dpt,r0 jsr pc,putchar tst (sp)+ rts pc / .bss dp: .=.+2 dpt: .=.+2 .text / scale: mov dpt,r2 jsr pc,add0 mov r1,-(sp) mov $1,r0 jsr pc,allocate mov dpt,r0 jsr pc,putchar mov r1,r3 mov inbas,r2 jsr pc,exp3 mov r1,-(sp) mov r3,r1 jsr pc,re inc ct cmp ct,dout blo 1b mov (sp)+,r1 jsr pc,release mov strptr,r1 jsr pc,rewind 1: jsr pc,getchar bes 1f mov r0,ch jsr pc,wrchar br 1b 1: / / cleanup, print new line and return / prout: mov $1,r0 sys write; nl; 1 mov (sp)+,r0 mov (sp)+,r1 mov (sp)+,r2 mov (sp)+,r3 mov (sp)+,r4 rts pc / / / / r2 = count / r3 = pointer (not released) / .bss dflg: .=.+2 dout: .=.+2 logo: .=.+2 log10: .=.+2 decimal: .=.+2 .text getdec: mov r3,-(sp) mov r3,r1 jsr pc,rewind jsr pc,length jsr pc,allocate  mov r1,-(sp) 1: cmp r2,$1 blt 1f mov 2(sp),r1 jsr pc,getchar mov (sp),r1 jsr pc,putchar mov r1,(sp) sub $2,r2 br 1b 1: tst r2 beq 1f mov tenptr,r2 mov (sp),r3 jsr pc,mul3 mov r1,(sp) mov r3,r1 jsr pc,length jsr pc,release mov r0,r3 jsr pc,allocate mov r1,-(sp) mov 2(sp),r1 jsr pc,rewind 2: tst r3 beq 2f jsr pc,getchar mov (sp),r1 jsr pc,putchar mov r1,(sp) dec r3 mov 2(sp),r1 br 2b 2: clr r0 mov (sp),r1 jsr pc,putchar mov 2(sp),r1 jsr pc,release mov (sp),r3 mov tenptrlemented stuff / junk: movb r0,1f mov $1,r0 sys write; 1f; 2f-1f jmp loop .data 1: <0 not in switch.\n> 2: .even .text / / / / routine to place one word onto the pushdown list / Error exit to system on overflow. / / push: mov r1,(r5)+ cmp r5,$pdltop bhis pdlout rts pc / pdlout: mov $1,r0 sys write; 1f; 2f-1f jmp reset 1: 2: .even / / / routine to remove one word from the pushdown list / carry bit set on empty stack / / / jsr pc,pop / pop: cmp r5,$pdl bhi 1f clr r1 sec rt000; single; 100077; 005100; single; 100077; 005200; single; 100077; 005300; single; 100077; 005400; single; 100077; 005500; single; 100077; 005600; single; 100077; 005700; single; 100077; 006000; single; 100077; 006100; single; 100077; 006200; single; 100077; 006300; single; 000077; 000100; single; 000077; 000300; single; 000077,r2 jsr pc,div3 mov r1,(sp) mov r3,r1 jsr pc,release mov r4,r1 jsr pc,release mov (sp)+,r1 tst (sp)+ mov (sp)+,r3 rts pc 1: mov (sp)+,r1 mov (sp)+,r3 rts pc tenout: mov savk,ct mov $2,r0 jsr pc,allocate mov r1,-(sp) mov 2(sp),r1 jsr pc,fsfile jsr pc,backspace mov r0,r3 clr r2 dvd $10.,r2 beq 1f 3: add $60,r2 mov r2,r0 mov (sp),r1 jsr pc,putchar mov r1,(sp) 1: mov (sp),r1 add $60,r3 mov r3,r0 jsr pc,putchar mov 2(sp),r1 1: jsr pc,backspace bec 2f mov (sp),r1 jsr pc,lengts pc 1: mov -(r5),r1 clc rts pc / / / / .data outdit: hexout .bss source: .=.+2 savec: .=.+2 ch: .=.+2 .text nl: <\n> asczero: <0> qm: .even / .bss chptr: .=.+2 strptr: .=.+2 basptr: .=.+2 scalptr: .=.+2 errstack:.=.+2 / stable: .=.+512. .text casetab: case012; 012 /nl loop; 040 /sp case041; 041 /! case045; 045 /% case052; 052 /* case053; 053 /+ case055; 055 /- case060; 056 /. case057; 057 // case060; 060 /0 case060; 061 /1 case060; 062 /2 case060; 063 /3 case060; 064 /4 case060; ; 170100; singlw; 000077; 170200; singlw; 000077; 170300; singlw; 000077; 170400; singlw; 000077; 170500; singlw; 000077; 170600; singlw; 000077; 170700; singlw; 000077; 006700; singlw; 000077; 006600; singlw; 000077; 106600; singlw; 000077; 006500; singlw; 000077; 106500; singlw; 000777; 070000; muldiv; 000777; 071000; muldiv; 000777; 07200h cmp r0,ct beq 4f blo 5f sub ct,r0 mov r0,ct 1: jsr pc,getchar mov r0,ch jsr pc,wrchar dec ct bne 1b jsr pc,getchar bes 6f jsr pc,backspace 4: movb dot,ch jsr pc,wrchar 1: jsr pc,getchar bes 1f mov r0,ch jsr pc,wrchar br 1b 5: sub r0,ct movb dot,ch jsr pc,wrchar mov $60,ch 5: jsr pc,wrchar dec ct bne 5b br 1b 1: 6: mov (sp)+,r1 jsr pc,release mov (sp)+,r1 jsr pc,release jbr prout 2: mov r0,r3 clr r2 dvd $10.,r2 br 3b dot: <.> .even ct: .=.+2 / / dingout: clr -(sp) br065 /5 case060; 066 /6 case060; 067 /7 case060; 070 /8 case060; 071 /9 case072; 072 /: case073; 073 /; case074; 074 /< case075; 075 /= case076; 076 /> case077; 077 /? case060; 101 /A case060; 102 /B case060; 103 /C case060; 104 /D case060; 105 /E case060; 106 /F case111; 111 /I case113; 113 /K case114; 114 /L case117; 117 /O case120; 120 /P case121; 121 /Q case123; 123 /S case166; 126 /V case170; 130 /X case172; 132 /Z case133; 133 /[ case136; 136 /^ case137; 137 /_ case143; 10; muldiv; 000777; 073000; muldiv; 000377; 000400; branch; 000377; 001000; branch; 000377; 001400; branch; 000377; 002000; branch; 000377; 002400; branch; 000377; 003000; branch; 000377; 003400; branch; 000377; 100000; branch; 000377; 100400; branch; 000377; 101000; branch; 000377; 101400; branch; 000377; 102000; branch; 000377; 1f unout: mov $1,-(sp) 1: mov 2(sp),r1 mov savk,r2 jsr pc,removc mov r1,2(sp) mov strptr,r1 jsr pc,create mov $-1,r0 jsr pc,putchar mov r1,r3 1: mov 2(sp),r1 jsr pc,length beq 1f mov r1,r2 jsr pc,add3 mov r1,2(sp) mov r2,r1 jsr pc,release mov $1,r0 tst (sp) beq 2f mov $'1,ch jsr pc,wrchar br 1b 2: tst delflag jne in177 sys write; ding; 3 br 1b 1: tst (sp)+ mov (sp)+,r1 jsr pc,release jmp prout / ding: < > / sp5: <\\\n > minus: <-> one: <1> .ev43 /c case144; 144 /d case146; 146 /f case151; 151 /i case153; 153 /k case154; 154 /l case157; 157 /o case160; 160 /p case161; 161 /q case163; 163 /s case166; 166 /v case170; 170 /x case172; 172 /z 0;0 / .bss pdl: .=.+100. pdltop: .text reset: clr r0 sys seek; 0; 2 1: clr r0 sys read; rathole; 1 bes 1f tst r0 beq 1f cmpb rathole,$'q bne 1b 1: sys exit .bss rathole: .=.+2 .text  102400; branch; 000377; 103000; branch; 000377; 103400; branch; 000000; 000000; noaddr; 000000; 000001; noaddr; 000000; 000002; noaddr; 000000; 000004; noaddr; 000000; 000005; noaddr; 000377; 171000; fltrev; 000377; 171400; fltrev; 000377; 172000; fltrev; 000377; 172400; fltrev; 000377; 173000; fltrev; 000377; 173400; fltrev; 000377; 17en .bss count: .=.+2 .text / bigout: mov r1,-(sp) /big digit tst dflg beq 1f clr r0 jsr pc,allocate mov r1,tptr 1: mov strptr,r1 jsr pc,length add fw,r0 dec r0 mov r0,-(sp) /end of field clr -(sp) /negative mov 4(sp),r1 jsr pc,length bne 2f mov $'0,r0 tst dflg beq 3f mov tptr,r1 jsr pc,putchar mov r1,tptr br 1f 3: mov strptr,r1 jsr pc,putchar br 1f 2: mov 4(sp),r1 /digit jsr pc,fsfile jsr pc,backspace bpl 2f mov $1,(sp) /negative jsr pc,chsign 2: mov 4(sp),r3 /digit mov r3/ db4 -- debugger maxsym = 24000. core: a.out: .even zero: 0 .bss regbuf: .=.+1024. sigp = regbuf+310 txtsiz = regbuf+322 datsiz = regbuf+324 stksiz = regbuf+326 rtxtsiz: .=.+2 .data objmagic: 407 nobjmagic: 410 namsiz: nambuf incdot: 2 nlcom: '/ .bss starmod:.=.+2 symbol: .=.+10. getoff: .=.+2 namstrt: .=.+2 bytemod: .=.+2 savsp: .=.+2 error: .=.+2 ttyfin: .=.+2 dbfin: .=.+2 symfin: .=.+2 curfin: .=.+2 dbfout: .=.+2 ch: .=.+2 lastop: .=.+2 addres: .=.+2 taddr: .=.+2 adrflg: .=4000; fltnor; 000377; 174400; fltrev; 000377; 175000; fltnor; 000377; 175400; fltnor; 000377; 176000; fltnor; 000377; 176400; fltrev; 000377; 177000; fltrev; 000377; 177400; fltrev; 000000; 170000; noaddr; 000000; 170001; noaddr; 000000; 170002; noaddr; 000000; 170011; noaddr; 000000; 170012; noaddr; 000777; 004000; specl1; 000777; 074000; specl1,r1 jsr pc,length beq 1f mov tenptr,r2 jsr pc,div3 mov r1,4(sp) /digit mov r3,r1 jsr pc,release mov r4,r1 jsr pc,rewind jsr pc,getchar jsr pc,release add $'0,r0 tst dflg beq 3f mov tptr,r1 jsr pc,putchar mov r1,tptr br 2b 3: mov strptr,r1 jsr pc,putchar br 2b 1: tst dflg beq 4f mov tptr,r1 jsr pc,length cmp r0,fw1 bhis 2f mov fw1,r1 sub r0,r1 mov r1,-(sp) mov strptr,r1 3: mov $'0,r0 jsr pc,putchar dec (sp) bne 3b tst (sp)+ 2: mov tptr,r1 jsr pc,fsfile 2: mov tptr,r1 j.+2 fpsr: .=.+2 och: .=.+2 dot: .=.+2 count: .=.+2 syscnt: .=.+2 temp: .=.+2 temp1: .=.+2 obuf: .=.+8. inbuf: .=.+128. nambuf: .=.+20 ; 000007; 000200; specl2; 000017; 000240; specl3; 000017; 000260; specl3; 000377; 104000; specl4; 000377; 104400; specl5; 000077; 006400; specl7; 000777; 077000; specl8; 000007; 000230; specl9; 177777; 000000; specl6; fltrev: bic $!377,(sp) muldiv: jsr pc,psp mov (sp)+,r0 asl r0 asl r0 swab r0 aslb r0 aslb r0 aslb r0 aslb r0 asr r0 asr r0 asr r0 asr r0 bic $!7707,r0 sr pc,backspace bes 2f mov strptr,r1 jsr pc,putchar br 2b 2: mov tptr,r1 jsr pc,release br 1f 4: mov strptr,r1 jsr pc,length cmp r0,2(sp) /end of field bhis 1f mov $'0,r0 jsr pc,putchar br 1b 1: tst (sp) /negative beq 1f mov $'-,r0 mov strptr,r1 dec w(r1) jsr pc,putchar 1: mov strptr,r1 mov $' ,r0 jsr pc,putchar tst (sp)+ tst (sp)+ mov (sp)+,r1 jsr pc,release rts pc / .bss tptr: .=.+2 tenptr: .=.+2 .text / / / hexout: mov r1,-(sp) jsr pc,rewind jsr pc,getchar cmp r0,$16. blmov r0,-(sp) br fltnor1 fltnor: bic $!377,(sp) br 1f double: tst (sp) bge 1f jsr pc,pb 1: jsr pc,psp mov (sp),r0 fltnor1: als $-6,r0 jsr r5,decodadr; dot add r0,incdot add dot,r0 mov r0,temp jsr pc,pcom mov (sp)+,r0 jsr r5,decodadr; temp add r0,incdot rts pc single: tst (sp) bge singlw jsr pc,pb singlw: jsr pc,psp mov (sp)+,r0 jsr r5,decodadr; dot add r0,incdot rts pc specl8: / sob jsr pc,psp mov (sp),r3 als $-6,r3 jsr pc,preg jsr pc,pcom mov (sp)+,r0 bic $!77,r0 neg r0o 1f jmp err 1: add $60,r0 cmp r0,$'9 blos 2f add $'A-'9-1,r0 2: mov strptr,r1 jsr pc,putchar mov (sp)+,r1 jsr pc,release rts pc / / wrchar: tst delflag jne in177 mov $1,r0 tst count bne 7f sys write; sp5; 2 mov ll,count mov $1,r0 7: dec count sys write; ch; 1 rts pc / / / case P for print an ascii string / / case120: jsr pc,pop jes eh jsr pc,length mov r0,0f mov a(r1),3f mov $1,r0 sys 0; 9f jsr pc,release jmp loop .data 9: sys write; 3:.=.+2; 0:.=.+2 .text / / / here for unimp/ db3 -- debugger psym: mov $2,incdot jsr pc,prints jsr pc,pnl rts pc prints: mov r0,-(sp) mov $optab,r1 1: mov (sp),r0 bic (r1)+,r0 cmp (r1)+,r0 bne 2f mov (r1)+,-(sp) jsr pc,string jmp *(sp)+ 2: add $8.,r1 br 1b optab: 107777; 010000; double; 107777; 020000; double; 107777; 030000; double; 107777; 040000; double; 107777; 050000; double; 007777; 060000; double; 007777; 160000; double; 100077; 005 br 1f branch: jsr pc,psp mov (sp)+,r0 bic $!377,r0 bit $200,r0 beq 1f bis $177400,r0 1: inc r0 asl r0 add dot,r0 jsr pc,pname rts pc noaddr: tst (sp)+ rts pc specl1: / jsr jsr pc,psp mov (sp),r3 als $-6,r3 jsr pc,preg jsr pc,pcom mov (sp)+,r0 jsr r5,decodadr; dot add r0,incdot rts pc specl2: / rts jsr pc,psp mov (sp)+,r3 jsr pc,preg rts pc specl3: / opr jsr pc,psp mov (sp)+,r2 mov $3f,r1 1: bit $17,r2 beq 1f bit $10,r2 beq 2f movb (r1),r0 jsr pc,putc 2: inc r1 asl r2 br 1b 1: rts pc 3: specl7: / mark bic $!77,(sp) br specl4 specl9: / spl bic $!7,(sp) br specl4 specl4: / emt jsr pc,psp mov (sp)+,r0 bic $!377,r0 8: jsr pc,printo rts pc specl5: / sys jsr pc,psp mov (sp)+,r2 bic $!377,r2 mov r2,r0 asl r2 asl r2 cmp r2,$esystab-systab bhis 8b mov systab(r2),r1 jsr pc,string mov systab+2(r2),-(sp) mov dot,temp1 1: dec (sp) bge 2f tst (sp)+ rts pc 2: jsr r5,mesg; <;\0> add $2,temp1 add $2,incdot jsr r5,get; temp1 jsr pc,pname br 1f mov $1,0f+2 br 2f 1: mov $2,0f+2 2: sys write; 0:0; 2 bes 3b rts r5 decodadr: mov r0,r3 mov r3,-(sp) bic $!10,(sp) bic $!7,r0 cmp r0,$7 beq pcadr 7: mov r3,r0 asr r0 asr r0 asr r0 bic $!6,r0 jmp *1f(r0) 1: simp incr decr indx simp: tst (sp) beq 1f jsr pc,plp 1: jsr pc,preg tst (sp)+ beq 9f jsr pc,prp br 9f incr: tst (sp)+ beq 1f jsr pc,pstar 1: jsr pc,plp jsr pc,preg jsr r5,mesg; <)+\0>; .even br 9f decr: tst (sp)+ beq 1f jsr pc,pstar 1: jsr r5,mesg; <-(\0>; (r4)+,r0 mov addres,-(sp) mov adrflg,-(sp) jsr pc,readexp mov addres,count mov (sp)+,adrflg mov (sp)+,addres tst error bne errexit 2: movb (r4),r0 jsr pc,command tst error beq loop errexit: sys signal; 2; errexit mov savsp,sp jsr r5,mesg; ; .even br loop fnfnd: jsr r5,mesg; ; .even ex: sys exit readlin: mov $inbuf,r4 1: mov ttyfin,r0 sys read; ch; 1 tst r0 beq ex cmpb ch,$'\n beq 1f movb ch,(r4)+ br 1b 1: clrb (r4) mov $inbuf,r4 rts pc switch: m 1b systab: 1f; 0; .data; 1:; .text 1f; 0; .data; 1:; .text 1f; 0; .data; 1:; .text 1f; 2; .data; 1:; .text 1f; 2; .data; 1:; .text 1f; 2; .data; 1:; .text 1f; 0; .data; 1:; .text 1f; 0; .data; 1:; .text 1f; 2; .data; 1:; .text 1f; 2; .data; 1:; .text 1f; 1; .data; 1:; .text 1f; 2; .data; 1:; .text 1f; 1; .data; 1:; .text 1f; 0; .data; 1:; .text 1f; 1; .data; 1:; .t .even jsr pc,preg jsr pc,prp br 9f indx: tst (sp)+ beq 1f jsr pc,pstar 1: jsr pc,get1 jsr pc,pname jsr pc,plp jsr pc,preg jsr pc,prp br 5f pcadr: mov r3,r0 bit $20,r3 beq 7b tst (sp)+ beq 1f jsr pc,pstar 1: bit $40,r3 bne 6f jsr r5,mesg; <$\0> jsr pc,get1 jsr pc,pname br 5f 6: jsr pc,get1 add $2,r0 add r1,r0 mov $3,r1 jsr pc,pname br 5f 9: tst (r5)+ clr r0 rts r5 5: mov $2,r0 rts r5 preg: mov r3,r0 bic $!7,r0 asl r0 mov regtab(r0),obuf mov $1,r0 sys write; obuf; ov (r5)+,r1 2: cmp r0,(r1)+ bne 1f tst (sp)+ jmp *(r1) 1: tst (r1)+ bne 2b rts r5 readexp: mov $'+,lastop clr addres clr starmod clr taddr clr adrflg nextxp: movb (r4)+,r0 cmp r0,$'0 blt 1f cmp r0,$'9 ble numin cmp r0,$'a blt 1f cmp r0,$'z bgt 1f jmp letin 1: cmp r0,$'a-40 blt 1f cmp r0,$'z-40 ble letin 1: jsr r5,switch; expsw tstb -(r4) tst starmod beq 1f mov dot,taddr br operand 1: rts pc expsw: '+; opex '-; opex ' ; nextxp '.; letin '_; letin '^; circumf '*; starext 1f; 2; .data; 1:; .text 1f; 2; .data; 1:; .text 1f; 1; .data; 1:; .text 1f; 2; .data; 1:; .text 1f; 2; .data; 1:; .text 1f; 2; .data; 1:; .text 1f; 2; .data; 1:; .text 1f; 1; .data; 1:; .text 1f; 0; .data; 1:; .text 1f; 0; .data; 1:; .text 1f; 0; .data; 1:; .text 1f; 1; .data; 1:; .text 1f; 1; .data; 1:; .text 1f; 1; .data; 1:; .text 1f; 1; .data; 1:; .text 12 rts pc regtab: "r0 "r1 "r2 "r3 "r4 "r5 "sp "pc pname: mov r5,-(sp) mov r3,-(sp) mov r1,-(sp) jsr pc,lookupv tst r2 beq 5f cmp (sp),$1 bne 1f tst r3 bne 5f 1: mov r2,r1 mov $8,-(sp) mov r0,r5 1: movb (r1)+,r0 beq 1f jsr pc,putc dec (sp) bne 1b 1: tst (sp)+ cmp 12(r2),r5 beq 1f blt 2f jsr r5,mesg; <-\0> br 3f 2: jsr r5,mesg; <+\0> 3: mov r3,r0 5: jsr pc,printo 1: tst (sp)+ mov (sp)+,r3 mov (sp)+,r5 rts pc get1: mov *(r5)+,r1 add $2,r1 mov r1,temp jsr r5,get; te -1; 0 star: mov pc,starmod br nextxp operand: inc adrflg tst starmod beq 1f clr starmod bis bytemod,error jsr r5,get; taddr tst error bne 1f mov r0,taddr 1: cmp lastop,$'+ beq 1f sub taddr,addres br 2f 1: add taddr,addres 2: mov $'+,lastop br nextxp circumf: mov dot,taddr dec taddr tst bytemod bne operand dec taddr br operand numin: clr r1 clr r3 1: sub $'0,r0 asl r1 asl r1 asl r1 mpy $10.,r3 bis r0,r1 add r0,r3 movb (r4)+,r0 cmp r0,$'0 blo 1f cmp r0,$'9 blos 1b 1f; 1; .data; 1:; .text 1f; 1; .data; 1:; .text 1f; 1; .data; 1:; .text 1f; 1; .data; 1:; .text 1f; 0; .data; 1:; .text 1f; 0; .data; 1:; .text 1f; 0; .data; 1:; .text 1f; 0; .data; 1:; .text 1f; 0; .data; 1:; .text 1f; 0; .data; 1:; .text esystab: .data .even .text specl6: / unknown jsr pc,psp mov (sp)+,r0 jsr pc,printo rts pc mp rts pc : cmp r0,$'. bne 1f mov r3,r1 inc r4 1: mov r1,taddr dec r4 br operand letin: dec r4 mov $nambuf,namstrt letin1: mov $symbol,r1 clr (r1)+ clr (r1)+ clr (r1)+ clr (r1) mov $symbol,r1 mov $8.,-(sp) br 2f 1: tstb (r4)+ cmpb (r4),$'. beq 2f cmpb (r4),$'0 blo 3f cmpb (r4),$'9 blos 2f cmpb (r4),$'A blo 3f cmpb (r4),$'Z blos 2f cmpb (r4),$'_ beq 2f cmpb (r4),$'a blo 3f cmpb (r4),$'z bhi 3f 2: dec (sp) blt 1b movb (r4),(r1)+ br 1b 3: tst (sp)+ jsr pc,lookupn tst error bne / db2 -- debugger lookupn: cmp symbol,$'. bne 1f mov dot,taddr rts pc 1: tst error beq 1f rts pc 1: mov r2,-(sp) mov namstrt,r1 mov namsiz,r2 jsr pc,1f mov (sp)+,r2 rts pc 1: mov $symbol,r0 cmp (r0)+,(r1)+ bne 2f cmp (r0)+,(r1)+ bne 3f cmp (r0)+,(r1)+ bne 4f cmp (r0)+,(r1)+ bne 5f tst (r1)+ mov (r1)+,taddr rts pc 2: tst (r1)+ 3: tst (r1)+ 4: tst (r1)+ 5: cmp (r1)+,(r1)+ cmp r1,r2 blo 1b inc error clr taddr rts pc lookupv: mov r5,-(sp) mov $nambuf,r5 clr r2 mov $1777771f cmpb (r4),$'; beq 2f 1: jmp operand 2: tstb (r4)+ mov r1,namstrt br letin1 opex: mov r0,lastop jmp nextxp command: jsr r5,switch; comsw inc error rts pc comsw: '/; slash '\\; bslash '?; quest '\0; newln '^; circumf '=; equal ':; colon '!; excla ''; squote '"; dquote '$; dolr '&; amper '%; ex '`; grave -1; 0 dolr: mov sigp,r1 bic $!17,r1 asl r1 mov traptab(r1),r1 jsr pc,string jsr pc,pnl mov $doltab,r5 1: mov (r5)+,r1 beq 1f jsr pc,*(r5)+ br 1b .if fpp 1: mov (r,r3 1: cmp r5,namsiz bhis 4f mov 12(r5),r1 sub r0,r1 neg r1 blt 3f cmp r1,r3 bhi 3f cmp r1,$4000 bhis 3f cmp r2,r5 bhi 3f mov r1,r3 mov r5,r2 3: add $14,r5 br 1b 4: mov (sp)+,r5 rts pc get: mov *(r5)+,r0 jsr r5,remap tst error bne 2f mov r0,0f mov curfin,r0 sys seek; 0:0; 0 bec 1f 2: inc error rts r5 1: mov curfin,r0 sys read; temp; 2 bes 2b tst r0 beq 2b mov temp,r0 rts r5 remap: mov dbfin,curfin cmp getoff,$1024. bne 1f cmp r0,txtsiz bhis 2f add $20,r0 mov symfi/ db1 -- debugger fpp = 0 eae = 0 ldfps = 170100^tst db: mov sp,r5 mov (r5)+,r4 tst (r5)+ cmp r4,$2 blt 1f mov (r5),dbfile mov (r5),odbfil mov (r5)+,namfil cmp r4,$2 beq 1f mov (r5)+,namfil 1: sys open; dbfile: core; 0 bec 9f jmp fnfnd 9: mov r0,dbfin clr dbfout sys open; odbfil:core; 1 bes 1f mov r0,dbfout 1: sys open; namfil: a.out; 0 bes 1f mov r0,r1 mov r0,symfin sys read; nambuf; 20 cmp nambuf,nobjmagic beq 2f cmp nambuf,objmagic bne 1f 2: mov nambuf+2,r0 / text add nam5)+,r1 beq 1f ldfps fpsr jsr pc,*(r5)+ br 1b 1: mov (r5)+,r1 jsr pc,*(r5)+ .endif 1: rts pc traptab: 1f; .data; 1:; .text 1f; .data; 1:; .text 1f; .data; 1:; .text 1f; .data; 1:; .text 1f; .data; 1:; .text 1f; .data; 1:; .text 1f; .data; 1:; .text 1f; .data; 1:; .text 1f; .data; 1:; .text 1f; .data; 1:; .text 1f; .data; 1:; .text 1f; .data; 1:; .text 1f; .data; 1:; .text 1f; .data; 1:; .text 1f; .data; 1:; .text 1f; .data; 1:; .text locps: regbuf+1776 locpc: regbuf+1774 locr0: regbuf+1772 locr1: regbuf+1766 locr2: regbuf+1750 locr3: regbuf+1752 locr4: regbuf+1754 locsp: regbuf+1764 locr5: regbuf+1756 locfpsr: regbuf+4 locfr0: regbuf+6 locfr4: regbuf+16 locfr5: regbuf+26 locfr1: regbuf+36 locfr2: regbuf+46 locfr3: regbuf+56 doltab: 1f; prgreg; locsp; .data; 1:; .text 1f; proct; locps; . inc r5 bic $1,r5 rts r5 pnl: jsr r5,mesg; <\n\0> rts pc psp: jsr r5,mesg; < \0> rts pc pstar: jsr r5,mesg; <*\0> rts pc plp: jsr r5,mesg; <(\0> rts pc prp: jsr r5,mesg; <)\0> rts pc pb: jsr r5,mesg; rts pc pcom: jsr r5,mesg; <,\0> rts pc put: mov *(r5)+,r0 jsr r5,remap tst error bne 2f cmp curfin,dbfin bne 2f mov r0,0f mov dbfout,r0 bne 1f 2: tst (r5)+ 3: inc error rts r5 1: tst error bne 3b sys seek; 0:0; 0 bes 2b mov (r5)+,0f mov dbfout,r0 tst bytemod beqr4,$2 / arg count beq 9f / not core image cmp r4,$4 / no-core image flag beq 9f mov $1024.,getoff mov dbfin,r0 sys seek; 0; 0 mov dbfin,r0 sys read; regbuf; 1024. mov txtsiz,r0 ash $6,r0 mov r0,txtsiz add $17777,r0 bic $17777,r0 mov r0,rtxtsiz mov datsiz,r0 ash $6,r0 mov r0,datsiz mov stksiz,r0 ash $6,r0 mov r0,stksiz mov *locfpsr,r0 bic $!200,r0 mov r0,fpsr br loop 9: loop: clr error jsr pc,readlin jsr pc,readexp tst error bne errexit mov $1,count cmpb r0,$', bne 2f movbdata; 1:; .text 1f; prgreg; locpc; .data; 1:; .text 1f; prgreg; locr0; .data; 1:; .text 1f; prgreg; locr1; .data; 1:; .text 1f; prgreg; locr2; .data; 1:; .text 1f; prgreg; locr3; .data; 1:; .text 1f; prgreg; locr4; .data; 1:; .text 1f; prgreg; locr5; .data; 1:; .text 0 .if fpp 1f; prfreg; locfr0; .data; 1:; .text 1f; prfreg; locfr1; .data; 1:; .text 1f; prfreg; locfr2; .data; 1:; .text 1f; prfreg; locfr3; .data; 1:<fr3 \0>; .text 1f; prfreg; locfr4; .data; 1:; .text 1f; prfreg; locfr5; .data; 1:; .text 0 1f; proct; locfpsr; .data; 1:; .text .endif .data .even .text .if fpp prfreg: mov *(r5)+,r4 movf (r4),fr0 cfcc beq 1f jsr pc,string jsr pc,printf jsr pc,pnl 1: rts pc .endif prgreg: jsr pc,string mov *(r5)+,r4 mov (r4),r0 jsr pc,printo mov (r4),r0 jsr pc,lookupv tst r2 beq 1f jsr r5,mesg; < \0>; .even mov (r4),r0 jsr pc,pname 1: jsr pc,pnl rts pc proct: jsr pc,s error mov r0,-(sp) mov 0b,0f sys seek; 0:..; 3 mov (sp)+,r0 sys write; buf; 512. bes error sys exit error: mov $1,r0 sys write; 1f; 2f-1f sys exit 1: 2: filsys: .even .bss buf: .=.+512. ,$obuf+512. blo 1f mov $1,r0 sys write; obuf; 512. mov $obuf,r2 1: rts pc .bss ibuf: .=.+512. obuf: .=.+512. fin: .=.+2 .text tring mov *(r5)+,r4 mov (r4),r0 jsr pc,printo jsr pc,pnl rts pc string: movb (r1)+,r0 beq 1f jsr pc,putc br string 1: rts pc putc: mov r0,och mov $1,r0 sys write; och; 1 rts pc equal: jsr r5,coleq; printo rts pc amper: clr bytemod mov $2,incdot jsr r5,cycle; asymp rts pc asymp: jsr pc,pname jsr pc,pnl rts pc bslash: inc bytemod mov $1,incdot br 1f slash: clr bytemod mov $2,incdot 1: jsr r5,cycle; octp rts pc grave: clr bytemod mov $2,incdot jsr r5,cycle; decp rts pc/ chown -- change owner .globl fopen, getc, mesg mov sp,r5 mov (r5),r4 cmp r4,$3 bge 1f jsr r5,mesg; ; .even 1: add $4,r5 mov (r5),r3 cmpb (r3),$'0 blt 1f cmpb (r3),$'9 bgt 1f jsr r5,cvnum; geta br do 1: mov $uids,r0 jsr r5,fopen; ubuf bec 1f jsr r5,mesg; ; .even sys exit 1: mov r3,r2 2: jsr r5,getc; ubuf bcc 3f who: jsr r5,mesg; ; .even sys exit 3: cmp r0,$': beq 3f cmpb (r2)+,r0 beq 2b 2: jsr r5,getc; ubuf bcs who  quest: clr bytemod jsr r5,cycle; psym rts pc decp: jsr pc,printd jsr r5,mesg; <.\n\0>; .even rts pc octp: jsr pc,printo jsr pc,pnl rts pc newln: tst adrflg bne 1f add incdot,dot 1: mov nlcom,r0 jmp command excla: tst adrflg bne 1f 2: inc error rts pc 1: bit $1,dot beq 1f tst bytemod beq 2b 1: jsr r5,put; dot; addres rts pc squote: inc bytemod mov $1,incdot br 2f dquote: clr bytemod mov $2,incdot 2: jsr r5,cycle; ascp rts pc ascp: mov r0,-(sp) jsr pc,ascp1 mov (sp)+,cmp r0,$'\n bne 2b br 1b 3: tstb (r2) bne 2b 3: jsr r5,getc; ubuf cmpb r0,$': bne 3b jsr r5,cvnum; getc do: sub $2,r4 mov r1,0f+2 tst (r5)+ 1: mov (r5),0f mov (r5)+,9f sys stat; 9:..; statb movb statb+8,0f+3 sys chown; 0:..; 0 bec 2f mov 0b,r0 mov r0,0f clr 0f+2 3: tstb (r0)+ beq 3f inc 0f+2 br 3b 3: mov $1,r0 sys write; 0:..; .. jsr r5,mesg; ; .even 2: dec r4 bgt 1b sys exit cvnum: clr r1 1: jsr r5,*(r5); ubuf bcs 1f sub $'0,r0 cmp r0,$9. bhi 1f mpy $10.,r1 add/ / / bas0 -- basic scope = 1 .globl main .globl sin, cos, log, exp, atan, pow, sqrt .globl rand, srand .globl fptrap .globl fopen, getc indir = 0 /for indirect sys calls. (not in as) one = 40200 main: mov $1,prfile /initial print file sys signal; 4; fptrap setd sys time mov r1,r0 mov r0,randx jsr pc,srand sys signal; 2; intrup mov sp,gsp clr seeka mov $'a,r1 1: movb r1,tmpf+8 sys stat; tmpf; line bes 1f inc r1 cmp r1,$'z blos 1b br 2f 1: sys creat; tmpf; 600 bes 2f mov r0,tfo syr0 tst bytemod bne 1f swab r0 jsr pc,ascp1 1: cmp count,$1 bgt 1f jsr pc,pnl 1: rts pc ascp1: bic $!377,r0 cmp r0,$'\n beq 2f cmp r0,$011 beq 2f cmp r0,$40 blo 1f cmp r0,$177 bhis 1f 2: jsr pc,putc rts pc 1: mov r0,r1 jsr r5,mesg; <\\\0> clr r0 alsc $10.,r0 add $'0,r0 jsr pc,putc clr r0 alsc $3,r0 add $'0,r0 jsr pc,putc clr r0 alsc $3,r0 add $'0,r0 jsr pc,putc rts pc colon: jsr r5,coleq; pname rts pc coleq: jsr pc,setadr mov addres,r0 jsr pc,*(r5)+ jsr pc,pnl rts  r0,r1 br 1b 1: tst (r5)+ rts r5 geta: movb (r3)+,r0 tst (r5)+ rts r5 uids: .bss statb: .=.+36. ubuf: .=.+518. s open; tmpf; 0 bec 1f 2: mov $3f,r0 jsr pc,print sys exit 3: ; .even 1: mov r0,tfi mov gsp,sp cmp (sp),$2 /is there a file argument blt noarg mov 4(sp),r0 mov $argname,r1 1: movb (r0)+,(r1)+ bne 1b aftered: / after edit mov $argname,r0 jsr r5,fopen; iobuf bes 1f noarg: jsr pc,isymtab br loop 1: mov $1f,r0 jsr pc,print br loop 1: ; .even intrup: sys signal; 2; intrup mov $'\n,r0 jsr r5,xputc jsr r5,error ; .even loop: mov gsp,sr5 cycle: mov r0,nlcom jsr pc,setadr mov addres,dot tst bytemod bne 1f bic $1,dot 1: jsr r5,get; dot tst error bne 1f tst bytemod beq 2f bic $!377,r0 2: jsr pc,*(r5) tst error bne 1f dec count ble 1f add incdot,dot br 1b 1: tst (r5)+ rts r5 setadr: tst adrflg bne 1f mov dot,addres 1: rts pc .if fpp printf: ldfps $200 / round+double mov r4,-(sp) mov r3,-(sp) movif $10.,r3 movif $1,r2 clr r4 tstf r0 cfcc beq 2f bge 1f negf r0 mov $'-,r0 jsr pc,putc 1: cmpf r3,r0 cf/ chgrp -- change group .globl fopen, getc, mesg mov sp,r5 mov (r5),r4 cmp r4,$3 bge 1f jsr r5,mesg; ; .even 1: add $4,r5 mov (r5),r3 cmpb (r3),$'0 blt 1f cmpb (r3),$'9 bgt 1f jsr r5,cvnum; geta br do 1: mov $uids,r0 jsr r5,fopen; ubuf bec 1f jsr r5,mesg; ; .even sys exit 1: mov r3,r2 2: jsr r5,getc; ubuf bcc 3f who: jsr r5,mesg; ; .even sys exit 3: cmp r0,$': beq 3f cmpb (r2)+,r0 beq 2b 2: jsr r5,getc; ubuf bcs who p clr lineno jsr pc,rdline mov $line,r3 1: movb (r3),r0 jsr pc,digit br 1f jsr r5,atoi cmp r0,$' / beq 3f cmp r0,$' /tab bne 1f 3: mov $lintab,r3 mov r1,r0 bgt 2f jsr pc,serror 2: cmp r0,(r3) beq 2f tst (r3) beq 2f add $6,r3 br 2b 2: cmp r3,$elintab-12. blo 2f jsr r5,error ; .even 2: mov r0,(r3)+ mov seeka,(r3)+ mov tfo,r0 mov seeka,seekx sys indir; sysseek mov $line,r0 jsr pc,size inc r0 add r0,seeka mov r0,wlen mov tfo,r0 mov $line,wbuf sys indicc bgt 1f inc r4 divf r3,r0 br 1b 1: cmpf r2,r0 cfcc ble 2f dec r4 mulf r3,r0 br 1b 2: modf r2,r0 movfi r1,r0 add $'0,r0 jsr pc,putc mov $'.,r0 jsr pc,putc mov $8.,r3 1: modf r3,r0 movfi r1,r0 add $'0,r0 jsr pc,putc dec r3 bgt 1b mov $'E,r0 jsr pc,putc mov r4,r0 mov (sp)+,r3 mov (sp)+,r4 br printd .endif printd: mov r1,-(sp) mov r0,r1 bpl 1f neg r1 mov $'-,r0 jsr pc,putc 1: jsr pc,1f mov (sp)+,r1 rts pc 1: clr r0 dvd $10.,r0 mov r1,-(sp) mov r0,r1 beq 1f jsr pc,cmp r0,$'\n bne 2b br 1b 3: tstb (r2) bne 2b 3: jsr r5,getc; ubuf cmpb r0,$': bne 3b jsr r5,cvnum; getc do: sub $2,r4 swab r1 mov r1,0f+2 tst (r5)+ 1: mov (r5),0f mov (r5)+,9f sys stat; 9:..; statb movb statb+7,0f+2 sys chown; 0:..; 0 bec 2f mov 0b,r0 mov r0,0f clr 0f+2 3: tstb (r0)+ beq 3f inc 0f+2 br 3b 3: mov $1,r0 sys write; 0:..; .. jsr r5,mesg; ; .even 2: dec r4 bgt 1b sys exit cvnum: clr r1 1: jsr r5,*(r5); ubuf bcs 1f sub $'0,r0 cmp r0,$9. bhi 1f mpy $10r;syswrit br loop 1: mov $line,r3 jsr pc,singstat br loop nextc: movb (r3)+,r0 rts r5 size: clr -(sp) 1: inc (sp) cmpb (r0),$'\n beq 1f cmpb (r0),$0 beq 1f inc r0 br 1b 1: mov (sp)+,r0 rts pc rdline: / read input (file or tty) to carr. ret. mov $line,r1 1: jsr r5,getc; iobuf bes 2f tst r0 beq 2f cmp r1,$line+99. bhis 2f / bad check, but a check movb r0,(r1)+ cmpb r0,$'\n bne 1b clrb (r1) rts pc 2: mov fi,r0 beq 1f sys close clr fi br 1b 1: jmp _done error: tst fi b1b 1: mov (sp)+,r0 add $'0,r0 jsr pc,putc rts pc .,r1 add r0,r1 br 1b 1: tst (r5)+ rts r5 geta: movb (r3)+,r0 tst (r5)+ rts r5 uids: .bss statb: .=.+36. ubuf: .=.+518. eq 1f sys close clr fi 1: tst lineno beq 1f jsr pc,nextlin br 1f mov $line,r0 jsr pc,print 1: mov r5,r0 jsr pc,print jmp loop serror: dec r3 tst fi beq 1f sys close clr fi 1: mov $line,r1 1: cmp r1,r3 bne 2f mov $'_,r0 jsr r5,xputc mov $10,r0 jsr r5,xputc 2: movb (r1),r0 jsr r5,xputc cmpb (r1)+,$'\n bne 1b jmp loop print: mov r0,wbuf jsr pc,size mov r0,wlen mov prfile,r0 sys indir; syswrit rts pc digit: cmp r0,$'0 blo 1f cmp r0,$'9 bhi 1f add $2,(sp) 1: rts pc al/ clri -- clear inode cmp (sp)+,$2 blt error beq 1f mov 4(sp),fs1 mov 4(sp),fs2 1: tst (sp)+ mov (sp)+,r0 clr r5 1: movb (r0)+,r1 beq 1f mpy $10.,r5 sub $'0,r1 cmp r1,$10. bhis error add r1,r5 br 1b 1: add $31.,r5 mov r5,r0 als $-4,r0 mov r0,0f sys open; fs1: filsys; 0 bes error mov r0,-(sp) sys seek; 0:..; 3 mov (sp),r0 sys read; buf; 512. mov (sp)+,r0 sys close mov r5,r0 als $5,r0 bic $!777,r0 add $buf,r0 mov $16.,r5 1: clr (r0)+ sob r5,1b sys open; fs2: filsys; 1 bes/ cat -- concatinate files mov (sp)+,r5 tst (sp)+ mov $obuf,r2 cmp r5,$1 beq 3f loop: dec r5 ble done mov (sp)+,r0 cmpb (r0),$'- bne 2f clr fin br 3f 2: mov r0,0f sys open; 0:..; 0 bes loop mov r0,fin 3: mov fin,r0 sys read; ibuf; 512. bes 3f mov r0,r4 beq 3f mov $ibuf,r3 4: movb (r3)+,r0 jsr pc,putc dec r4 bne 4b br 3b 3: mov fin,r0 beq loop sys close br loop done: sub $obuf,r2 beq 1f mov r2,0f mov $1,r0 sys write; obuf; 0:.. 1: sys exit putc: movb r0,(r2)+ cmp r2pha: cmp r0,$'a blo 1f cmp r0,$'z bhi 1f add $2,(sp) 1: cmp r0,$'A blo 1f cmp r0,$'Z bhi 1f add $2,(sp) 1: rts pc name: mov $nameb,r1 clr (r1) clr 2(r1) 1: cmp r1,$nameb+4 bhis 2f movb r0,(r1)+ 2: movb (r3)+,r0 jsr pc,alpha br 2f br 1b 2: jsr pc,digit br 2f br 1b 2: mov $resnam,r1 1: cmp nameb,(r1) bne 2f cmp nameb+2,2(r1) bne 2f sub $resnam,r1 asr r1 add $2,(sp) rts pc 2: add $4,r1 cmp r1,$eresnam blo 1b mov $symtab,r1 1: tst (r1) beq 1f cmp nameb,(r1) bne 2f cmp nameb+2,2(r1) bne 2f rts pc 2: add $14.,r1 br 1b 1: cmp r1,$esymtab-28. blo 1f jsr r5,error ; .even 1: mov nameb,(r1) mov nameb+2,2(r1) clr 4(r1) clr 14.(r1) rts pc skip: cmp r0,$' / beq 1f cmp r0,$' / tab bne 2f 1: movb (r3)+,r0 br skip 2: rts pc xputc: .if scope / for plotting tstb drflg beq 1f jsr pc,drput rts r5 1: .endif mov r0,ch mov $1,r0 sys write; ch; 1 rts r5 nextlin: clr -(sp) mov $lintab,r1 1: tst (r1) beq 1f cmp lineno,(r1) bhi(r0)+ br 1b 1: sys unlink; tmpf sys wait jmp aftered / start over newpr: sys exec; ed; edarg sys exit ed: ; .even ednm: <-\n> .even edarg: ednm; argname; 0 stcomment: /comment line cmp r0,$'\n beq 1f movb (r3)+,r0 br stcomment 1: rts pc stgoto: jsr pc,expr mov $_goto,(r4)+ rts pc streturn: cmp r0,$'\n beq 1f jsr pc,expr cmp r0,$'\n bne joe br 2f 1: clrf r0 jsr pc,const 2: mov $_return,(r4)+ rts pc joe: jsr pc,serror stfor: mov r4,-(sp) jsr pc,e2 mov r4,-(sp) cm cmpf $one,r0 cfcc bne 1f mov $_con1,(r4)+ br 2f 1: movfi r0,r0 movif r0,r1 cmpf r0,r1 cfcc bne 1f mov $_intcon,(r4)+ mov r0,(r4)+ br 2f 1: mov $_const,(r4)+ movf r0,(r4)+ 2: movf (sp)+,r1 mov (sp)+,r0 rts pc rlist: clr -(sp) cmpb (r3),$') bne 1f movb (r3)+,r0 br 2f 1: inc (sp) jsr pc,expr cmp r0,$', beq 1b 2: mov (r5)+,(r4)+ mov (sp)+,(r4)+ rts r5 / / / bas3 -- execution execute: mov $estack,r3 mov r3,sstack jmp *(r4)+ _if: tstf (r3)+ cfcc beq _tra tst (r4)+ jmp *( 2f mov (sp),r0 beq 3f cmp (r0),(r1) blos 2f 3: mov r1,(sp) 2: add $6,r1 br 1b 1: mov (sp)+,r1 beq 1f mov (r1)+,lineno mov (r1)+,seekx mov tfi,r0 sys indir; sysseek mov tfi,r0 sys read; line; 100. add $2,(sp) 1: rts pc getloc: mov $lintab,r1 1: tst (r1) beq 1f cmp r0,(r1) beq 2f add $6,r1 br 1b 1: jsr r5,error argname: vt: .even pname: <\0\0\0\0\0\0> .even resnam: / prompt is like print without \n (cr) / comment; mv a.out exit.o as ffltpr.s; mv a.out ffltpr.o as fltpr.s; mv a.out fltpr.o as fork.s; mv a.out fork.o as fstat.s; mv a.out fstat.o as getc.s; mv a.out getc.o as getchr.s; mv a.out getchr.o as getcsw.s; mv a.out getcsw.o as getgid.s; mv a.out getgid.o as getpid.s; mv a.out getpid.o as getuid.s; mv a.out getuid.o as gtty.s; mv a.out gtty.o as hmul.s; mv a.out hmul.o as kill.s; mv a.out kill.o as ladd.s; mv a.out ladd.o as ldfps.s; mv a.out ldfps.o as link.s; mv a.out link.o as locv.s; mv a.out locv.o as lt / 4096 movfi r0,r0 mov r0,-(sp) jsr pc,drput mov (sp)+,r0 swab r0 drput: movb r0,ch mov drfo,r0 bne 1f sys open; vt; 1 bec 2f 4 2: mov r0,drfo 1: sys write; ch; 1 rts pc .endif / bas4 -- old library routines atoi: clr r1 jsr r5,nextc clr -(sp) cmp r0,$'- bne 2f inc (sp) 1: jsr r5,nextc 2: sub $'0,r0 cmp r0,$9 bhi 1f mpy $10.,r1 bcs 3f / >32k add r0,r1 bcs 3f / >32k br 1b 1: add $'0,r0 tst (sp)+ beq 1f neg r1 1: rts r5 3: tst (sp)+ mov $'.,r0 / faking overflow br 1b  .if scope / for plotting .endif eresnam: symtnam: esymtnam: / indirect sys calls: sysseek: sys seek; seekx: 0; 0 syswrit: sys write; wbuf: 0; wlen: 0 sysread: sys read; rbuf: 0; rlen: 0 sysopen: sys open; ofile: 0 ; omode: 0 syscreat: sys creat; cfile: 0; cmode: 0 .bss drx: .=.+8 dry: .=.+8 drfo: .=.+2 ch: .=.+2 drflg: .=.+2 randx: .=.+2 gsp: .=.+2 forp: .=.+2 exprloc:.=.+2 sstack: .=od.s; mv a.out ltod.o cc -c -O *.c ar r /lib/libc.a rm *.o ldfps = 170100^tst stfps = 170200^tst atof: stfps -(sp) ldfps $200 movf fr1,-(sp) mov r1,-(sp) mov r2,-(sp) clr -(sp) clrf fr0 clr r2 jsr r5,*(r5) cmpb r0,$'- bne 2f inc (sp) 1: jsr r5,*(r5) 2: sub $'0,r0 cmp r0,$9. bhi 2f jsr pc,dig br 1b inc r2 br 1b 2: cmpb r0,$'.-'0 bne 2f 1: jsr r5,*(r5) sub $'0,r0 cmp r0,$9. bhi 2f jsr pc,dig dec r2 br 1b 2: cmpb r0,$'e-'0 bne 1f jsr r5,atoi sub $'0,r0 add r1,r2 1: movf $one,fr1 mov r2,-(sp) beq 2f bgt 1f neg r2 1: cmp r2,$38..+2 sublev: .=.+2 val: .=.+2 splimit: .=.+2 / statement size limit iflev: .=.+20. / nested if compile stack: 10 deep ifp: .=.+2 / current pointer to iflev line: .=.+100. prfile: .=.+2 / output from _list or _save tfi: .=.+2 / input file func: .=.+2 / alternate functions, eg: _list or _save seeka: .=.+2 / seek offset 1 lineno: .=.+2 nameb: .=.+4 tfo: .=.+2 symtab: .=.+2800.; esymtab: / symbol=7wds; symtab for 200 space: .=.+8000.; espace: / code space exline: .=.+1000.; eexline: / line execute sp/ unix DEC-tape time/mtrack track formatter nword = 256. nblock = 578. endz = 7200. ps = 177776 tcst = 177340 tccm = 177342 tcwc = 177344 tcba = 177346 tcdt = 177350 mov r5,savr5 mov sp,savsp jsr pc,4(r5) ; .even jsr pc,2(r5) mov r0,-(sp) mov $'\n,r0 jsr pc,(r5) cmp (sp)+,$'y beq 1f rts pc 1: clr r0 mov $cobtab,r1 1: jsr pc,bcomobv mov r2,(r1)+ inc r0 cmp r0,$512. bne 1b mov $buffer,r0 1: mov $-1,(r0)+ cmp r0,$buffer+nword+nword blo 1b mov savr5,r5 blos 1f clrf fr0 tst (sp)+ bmi out movf $huge,fr0 br out 1: mulf $ten,fr1 sob r2,1b 2: tst (sp)+ bge 1f divf fr1,fr0 br 2f 1: mulf fr1,fr0 cfcc bvc 2f movf $huge,fr0 2: out: tst (sp)+ beq 1f negf fr0 1: add $'0,r0 mov (sp)+,r2 mov (sp)+,r1 movf (sp)+,fr1 ldfps (sp)+ tst (r5)+ rts r5 dig: cmpf $big,fr0 cfcc blt 1f mulf $ten,fr0 movif r0,fr1 addf fr1,fr0 rts pc 1: add $2,(sp) rts pc one = 40200 ten = 41040 big = 56200 huge = 77777 .globl _ndigits .globl ecvt .globl fcvt ace lintab: .=.+1800.; elintab: / 3wds per statement = 300 stmts stack: .=.+800.; estack: iobuf: fi: .=.+518. / should be aquired??  jsr pc,2(r5) mov $340,ps mov $tcdt,r5 mov $13,tccm jsr pc,flag / 8Kch for end zone mov $endz,r4 1: jsr r0,mtrack; 101101 dec r4 bne 1b / foreward guard mov $199.,r4 1: jsr r0,mtrack; 10101 dec r4 bne 1b / blocks mov $nblock,r3 1: jsr r0,mtrack; 10101 jsr r0,mtrack; 10110 jsr r0,mtrack; 11010 jsr r0,mtrack; 01000 jsr r0,mtrack; 01000 jsr r0,mtrack; 01000 jsr r0,mtrack; 01000 mov $nword-4,r4 2: jsr r0,mtrack; 111000 dec r4 bne 2b jsr r0,mtrack; 111011 jsr r0,mtrack; 111011 jsr r0,mtrack; 111011 jsr r0,mtrack; 111011 jsr r0,mtrack; 101001 jsr r0,mtrack; 100101 jsr r0,mtrack; 10101 dec r3 bne 1b / rear guard mov $199.,r4 1: jsr r0,mtrack; 10101 dec r4 bne 1b / rear end zone mov $endz,r4 1: jsr r0,mtrack; 10010 dec r4 bne 1b clr tccm / end of mtrack pass / go back 12 blocks mov $12.,r0 mov $4002,tccm 1: incb tccm jsr pc,flag dec r0 bne 1b / put comobv(nblock-1) in everything / up to end zone mov $nblock-1,r0 mov r0,bn jsr pc,comobv mov $17,tccm / rp03 disk driver rpda = 176724 mov dska,r1 clr r0 div $10.,r0 mov r1,-(sp) mov r0,r1 clr r0 div $20.,r0 bisb r1,1(sp) mov $rpda,r1 mov (sp)+,(r1) mov r0,-(r1) mov ba,-(r1) mov wc,-(r1) mov $iocom,-(r1) 1: tstb (r1) bpl 1b rts pc / ar -- archive/library mov (sp)+,r0 sub $2,r0 ble userr tst (sp)+ mov (sp)+,r1 clr r2 1: tstb (r1) beq 1f cmpb (r1),$'v bne 2f inc r1 incb vflg br 1b 2: tst r2 bne userr movb (r1)+,r2 br 1b 1: tst r2 beq userr mov $arglst,r1 1: mov (sp)+,(r1)+ dec r0 bgt 1b clr (r1)+ mov $swlst,r1 1: cmp r2,(r1)+ beq 1f tst (r1)+ bne 1b br userr 1: jmp *(r1) swlst: 'r; comr 'u; comu 'd; comd 'x; comx 't; comt 0; 0 userr: jsr r5,diag .even putc: movb r0,ch mov jsr pc,flag 1: movb r1,tcst mov r0,(r5) jsr pc,flag1 br 1b / reverse pass put in / foreward and reverse / block numbers mov $4017,tccm jsr pc,flag 1: mov $nword+3.,r4 2: clrb tcst clr (r5) jsr pc,flag dec r4 bne 2b clrb tcst clr (r5) mov bn,r0 jsr pc,comobv jsr pc,flag movb r1,tcst mov r0,(r5) jsr pc,flag dec bn blt check clrb tcst clr (r5) jsr pc,flag clrb tcst clr (r5) jsr pc,flag clrb tcst mov bn,(r5) jsr pc,flag clrb tcst clr (r5) jsr pc,flag clrb tcst clr (r5) jmts = 172520 mtc = 172522 mtbrc = 172524 mtcma = 172526 tread: 1: mov ba,mtma cmp mtapa,tapa beq 1f bhi 2f jsr pc,rrec br 1b 2: jsr pc,rew br 1b 1: mov wc,r1 1: jsr pc,rrec add $256.,r1 bmi 1b rts pc rrec: mov $mts,r0 bit $2,(r0)+ / rewind status bne rrec tstb (r0)+ / cu ready bpl rrec inc r0 mov $-512.,(r0)+ / byte count mov mtma,(r0) / bus address mov $mtc,r0 mov $60003,(r0) / read 800bpi 1: tstb (r0) bpl 1b tst (r0)+ bpl 1f mov $-1,(r0) mov $60013,-(r0) / backspace br$1,r0 sys write; ch; 1 rts r5 print: movb (r1)+,r0 beq 1f jsr r5,putc br print 1: rts r5 diag: mov r5,r1 jsr r5,print tst tfo beq 1f sys unlink; tfil 1: sys exit getaf: mov arglst,0f sys open; 0:..; 0 bes 1f mov r0,afi sys read; buf; 2 cmp buf,magic bne magerr tst (r5)+ 1: rts r5 magerr: mov arglst,r1 jsr r5,print jsr r5,diag < -- not in archive format\n\0> .even mktmp: sys stat; tfil; buf bes 1f incb tfil+8 cmpb tfil+8,$'z blo mktmp br tferr 1: sys signal; 2; 1 ror sr pc,flag br 1b / foreward pass / confirm block numbers / write all 1's in data check: clrb tcst clr (r5) jsr pc,flag1 br check clr r4 1: mov $3,tccm jsr pc,flag cmp (r5),r4 bne error1 mov $-nword,tcwc mov $buffer,tcba mov $15,tccm jsr pc,flag inc r4 cmp r4,$nblock bne 1b mov $3,tccm jsr pc,flag1 br error2 / reverse pass / confirm block numbers / read data and compare / to all 1's 1: mov $4003,tccm jsr pc,flag dec r4 cmp r4,(r5) bne error3 mov $-nword,tcwc mov $buffer,tcba  rrec 1: add $512.,mtma inc mtapa rts pc rew: mov $60017,*$mtc clr mtapa rts pc mtapa: 0 mtma: 0 r0 bcs 1f sys signal; 2; done 1: sys creat; tfil; 600 bes tferr mov r0,tfo sys open; tfil; 0 bes tferr mov r0,tfi rts r5 tferr: jsr r5,diag .even getdir: mov afi,r0 sys read; dir; 16. cmp r0,$16. bne 1f jsr r5,mvname tst (r5)+ 1: rts r5 mvname: mov name,rname mov name+2,rname+2 mov name+4,rname+4 mov name+6,rname+6 rts r5 skip: mov size,r0 inc r0 bic $1,r0 mov r0,0f mov afi,r0 sys seek; 0:..; 1 rts r5 trim: mov r0,r2 1: tstb (r0) beq 1f cm mov $4005,tccm jsr pc,compare jsr pc,flag tst r4 bne 1b mov $4003,tccm jsr pc,flag1 br error4 jsr pc,compare mov savr5,r5 mov savsp,sp rts pc error1: mov $1,r0 br 1f error2: mov $1,r0 br 1f error3: mov $3,r0 br 1f error4: mov $4,r0 br 1f error5: mov $5,r0 br 1f error6: mov $6,r0 br 1f error7: mov $7,r0 1: mov $1,tccm mov savr5,r5 mov savsp,sp jsr pc,4(r5) ; .even rts pc compare: mov r0,-(sp) mov $buffer,r0 1: cmp (r0)+,$-1 bne error5 cmp r0,$buffer+nwo/ write rk wblk: iocom = 3 pb (r0)+,$'/ beq trim br 1b 1: rts r5 match: mov $arglst+2,r1 1: mov (r1)+,r0 beq 1f cmp r0,$-1 beq 1b jsr r5,trim mov $name,r0 2: cmp r0,$name+8. beq 2f cmpb (r0),(r2)+ bne 1b tstb (r0)+ bne 2b 2: cmp (r5)+,-(r1) 1: rts r5 mvfil: mov (r1),9f mov (r1),0f sys stat; 0:..; buf bes operr sys open; 9:..; 0 bes operr mov r0,fio mov (r1),r0 mov $-1,(r1) jsr r5,trim mov $name,r0 1: cmp r0,$name+8. beq 1f movb (r2)+,(r0)+ bne 1b 1: mov buf+32.,mtim mov buf+34.,mtim+2 movb buf+7.rd+nword blo 1b mov (sp)+,r0 rts pc mtrack: mov (r0)+,(r5) jsr pc,flag rts r0 flag: bit $100200,tccm beq flag blt error6 rts pc flag1: bit $100200,tccm beq flag1 bge 1f tst tcst bge error7 add $2,(sp) 1: rts pc comobv: mov r0,r4 bic $!777,r0 asl r0 mov cobtab(r0),r0 swab r0 clr r1 ror r0 rol r1 asl r0 asl r0 rol r1 swab r4 bic $177401,r4 bis cobtab(r4),r0 rts pc bcomobv: mov r0,r2 bic $!70,r2 mov r0,r3 mov $6.,r4 1: asr r3 dec r4 bne 1b bic $!7,r3 bis r3,r2 movhtcs1 = 172440 htba = 172444 htfc = 172446 htcs2 = 172450 htds = 172452 httc = 172472 P800 = 1300 P1600 = 2300 PIP = 20000 MOL = 10000 ERR = 40000 REV = 33 READ = 71 REW = 7 tread: 1: mov ba,mtma cmp mtapa,tapa beq 1f bhi 2f jsr pc,rrec br 1b 2: jsr pc,rew br 1b 1: mov wc,r1 1: jsr pc,rrec add $256.,r1 bmi 1b rts pc rrec: mov $htds,r0 tstb (r0) bpl rrec bit $PIP,(r0) bne rrec bit $MOL,(r0) beq rrec mov $htfc,r0 mov $-512.,(r0) mov mtma,-(r0) mov $-256.,-(r0) mov $READ,-(r0) 1,ouid movb buf+4.,mode mov buf+10.,size mov tfo,r0 sys write; dir; 16. mov size,r2 1: mov fio,r0 sys read; buf; 512. sub r0,r2 mov r0,0f beq 1f mov tfo,r0 sys write; buf; 0:.. br 1b 1: tst r2 bne phserr bit $1,size beq 1f mov tfo,r0 sys seek; 1; 1 1: mov fio,r0 sys close jsr r5,mvname rts r5 operr: mov 9b,r1 jsr r5,print jsr r5,diag < -- cannot open\n\0> .even phserr: mov 9b,r1 jsr r5,print jsr r5,diag < -- phase error\n\0> .even copyfl: mov tfo,r0 sys write; dir; 16. r0,r3 mov $6.,r4 1: asl r3 dec r4 bne 1b bic $!700,r3 bis r3,r2 com r2 bic $!777,r2 rts pc bn: .=.+2 savr5: .=.+2 savsp: .=.+2 cobtab: .=.+1024. buffer: .=.+nword+nword : tstb (r0) bpl 1b bit $ERR,*$htds bpl 1f mov $-1,*$htfc mov $REV,(r0) br rrec 1: add $512.,mtma inc mtapa rts pc rew: clr *$htcs2 mov $P800,*$httc mov $REW,*$htcs1 clr mtapa rts pc mtapa: 0 mtma: 0  mov size,r1 mov $rname,9b 1: mov r1,0f beq 1f cmp r1,$512. blo 2f mov $512.,0f 2: mov afi,r0 sys read; buf; 0:.. sub r0,r1 mov r0,0f beq phserr mov tfo,r0 sys write; buf; 0:.. br 1b 1: bit $1,size beq 1f mov afi,r0 sys seek; 1; 1 mov tfo,r0 sys seek; 1; 1 1: rts r5 xtract: / movb mode,0f sys creat; rname; 0:666 bes noxerr mov r0,fio mov size,r1 mov $rname,9b 1: mov r1,0f beq 1f cmp r1,$512. blo 2f mov $512.,0f 2: mov afi,r0 sys read; buf; 0:.. sub r0,r1 mov r0,0f beq pchdir /usr/sys; pwd; time sh run chdir /usr/source/as; pwd; time sh run chdir /usr/source/c; pwd; time sh run chdir /usr/source/cref; pwd; time sh run chdir /usr/source/fort; pwd; time sh run chdir /usr/source/iolib; pwd; time sh run chdir /usr/source/m6; pwd; time sh run chdir /usr/source/mdec; pwd; time sh run chdir /usr/source/rat; pwd; time sh run chdir /usr/source/s1; pwd; time sh run chdir /usr/source/s2; pwd; time sh run chdir /usr/source/s3; pwd; time sh run chdir /usr/source/s4; pwd; time sh run c/ rp04 disk driver hpcs1 = 176700 hpda = 176706 hpcs2 = 176710 hpof = 176732 hpca = 176734 fmt22 = 010000 preset = 021 clear = 040 first = .+2 / dirty, but i need the space tst $0 bne 1f mov $clear,*$hpcs2 mov $preset,*$hpcs1 mov $fmt22,*$hpof inc first 1: mov dska,r1 clr r0 div $22.,r0 mov r1,-(sp) mov r0,r1 clr r0 div $19.,r0 bisb r1,1(sp) mov r0,*$hpca mov $hpda,r1 mov (sp)+,(r1) mov ba,-(r1) mov wc,-(r1) mov $iocom,-(r1) 1: tstb (r1) bpl 1b rts pc hserr mov fio,r0 sys write; buf; 0:.. br 1b 1: mov fio,r0 sys close bit $1,size beq 1f mov afi,r0 sys seek; 1; 1 1: mov r0,-(sp) mov r1,-(sp) mov mtim+2,r1 mov mtim,r0 / sys mdate mov (sp)+,r1 mov (sp)+,r1 rts r5 noxerr: mov $rname,r1 jsr r5,print jsr r5,diag < -- cannot create\n\0> .even table: mov $rname,r1 jsr r5,print mov $'\n,r0 jsr r5,putc rts r5 mesg: mov r1,-(sp) mov (r5)+,r0 tstb vflg beq 1f jsr r5,putc mov $' ,r0 jsr r5,putc mov $rname,r1 jsr r5,print mov $'hdir /usr/source/s5; pwd; time sh run chdir /usr/source/s7; pwd; time sh run chdir /usr/source/salloc; pwd; time sh run chdir /usr/source/sno; pwd; time sh run chdir /usr/source/tmg; pwd; time sh run chdir /usr/source/yacc; pwd; time sh run  !\n,r0 jsr r5,putc 1: mov (sp)+,r1 rts r5 oldnew: sys stat; rname; buf bes 1f cmp buf+32.,mtim blo 1f bhi 2f cmp buf+34.,mtim+2 blos 1f 2: tst (r5)+ mov $rname,tname mov $tname,r1 1: rts r5 comr: jsr r5,mktmp jsr r5,getaf br copfl 1: jsr r5,getdir br copfl jsr r5,match br 2f jsr r5,mesg; 'r jsr r5,skip jsr r5,mvfil br 1b 2: jsr r5,copyfl jsr r5,mesg; 'c br 1b comu: jsr r5,mktmp jsr r5,getaf br noaf 1: jsr r5,getdir br copfl tst arglst+2 beq 2f jsr r5,match br 3f  mov $-1,(r1) 2: jsr r5,oldnew br 3f jsr r5,mesg; 'r jsr r5,skip jsr r5,mvfil br 1b 3: jsr r5,copyfl jsr r5,mesg; 'c br 1b comd: jsr r5,mktmp jsr r5,getaf br noaf 1: jsr r5,getdir br 1f jsr r5,match br 2f mov $-1,(r1) jsr r5,skip jsr r5,mesg; 'd br 1b 2: jsr r5,copyfl jsr r5,mesg; 'c br 1b 1: jsr r5,nfound br copfl noaf: jsr r5,diag .even crterr: jsr r5,diag .even copfl: mov $arglst,r1 mov (r1)+,0f 1: tst (r1)#include "sno.h" /* * Snobol III */ int freesize; struct node *freespace &end; struct node *freelist 0; int *fault -1; mes(s) { sysput(strstr(s)); } init(s, t) { register struct node *a, *b; a = strstr(s); b = look(a); delete(a); b->typ = t; return(b); } main(argc, argv) char *argv[]; { extern fin, fout; register struct node *a, *b, *c; if(argc > 1) { fin = open(argv[1], 0); if(fin < 0) { mes("cannot open input"); exit(); } } fout = dup(1); lookf = init("f", 0); looks =ry) { int n, sign; register struct node *m, *p, *q; n = binary; p = alloc(); q = alloc(); sign = 1; if (binary<0) { sign = -1; n = -binary; } p->p2 = q; loop: q->ch = n%10+'0'; n = n / 10; if (n==0) { if (sign<0) { m = alloc(); m->p1 = q; q = m; q->ch = '-'; } p->p1 = q; return(p); } m = alloc(); m->p1 = q; q = m; goto loop; } add(string1, string2) { return(binstr(strbin(string1) + strbin(string2))); } sub(string1, string2) { return(binstr(strbin(string1) - strb+ beq 1f cmp -2(r1),$-1 beq 1b tst -(r1) jsr r5,mvfil jsr r5,mesg; 'a br 1b 1: sys signal; 2; 1 / no interrupts during copy back sys creat; 0:..; 666 bes crterr mov r0,afo sys write; magic; 2 1: mov tfi,r0 sys read; buf; 512. mov r0,0f beq done mov afo,r0 sys write; buf; 0:.. br 1b done: jsr r5,diag <\0> .even comx: jsr r5,getaf br noaf 1: jsr r5,getdir br 1f tst arglst+2 beq 3f jsr r5,match br 2f mov $-1,(r1) 3: jsr r5,xtract jsr r5,mesg; 'x br 1b 2: jsr r5,skip br init("s", 0); lookend = init("end", 0); lookstart = init("start", 0); lookdef = init("define", 0); lookret = init("return", 0); lookfret = init("freturn", 0); init("syspit", 3); init("syspot", 4); a = c = compile(); while (lookend->typ != 2) { a->p1 = b = compile(); a = b; } cfail = 1; a->p1 = 0; if (lookstart->typ == 2) c = lookstart->p2; while (c=execute(c)); flush(); } syspit() { extern fin; register struct node *b, *c, *d; int a; if ((a=getchar())=='\n') return(0); b = c =in(string2))); } mult(string1, string2) { return(binstr(strbin(string1) * strbin(string2))); } div(string1, string2) { return(binstr(strbin(string1) / strbin(string2))); } cat(string1, string2) struct node *string1, *string2; { register struct node *a, *b; if (string1==0) return(copy(string2)); if (string2==0) return(copy(string1)); a = copy(string1); b = copy(string2); a->p2->p1 = b->p1; a->p2 = b->p2; free(b); return(a); } dcat(a,b) struct node *a, *b; { register struct node *c; c  1b 1: jsr r5,nfound br done comt: jsr r5,getaf br noaf 1: jsr r5,getdir br 1f tst arglst+2 beq 2f jsr r5,match br 3f mov $-1,(r1) 2: jsr r5,table 3: jsr r5,skip br 1b 1: jsr r5,nfound br done nfound: mov $arglst+2,r2 1: mov (r2)+,r1 beq 1f cmp r1,$-1 beq 1b mov $-1,-(r2) jsr r5,print mov $notfnd,r1 jsr r5,print br 1b 1: rts r5 notfnd: < -- not found\n\0> .even tfil: .even magic: -147. .bss afi: .=.+2 afo: .=.+2 tfi: .=.+2 tfo: .=.+2 fio: .=.+2 rname: .= alloc(); while(a != '\n') { c->p1 = d = alloc(); c = d; l: c->ch = a; if(a == '\0') { if(fin) { close(fin); fin = 0; a = getchar(); goto l; } rfail = 1; break; } a = getchar(); } b->p2 = c; if(rfail) { delete(b); b = 0; } return(b); } syspot(string) struct node *string; { register struct node *a, *b, *s; s = string; if (s!=0) { a = s; b = s->p2; while(a != b) { a = a->p1; putchar(a->ch); } } putchar('\n'); } strstr(s) char s[]; { int= cat(a,b); delete(a); delete(b); return(c); } delete(string) struct node *string; { register struct node *a, *b, *c; if (string==0) return; a = string; b = string->p2; while(a != b) { c = a->p1; free(a); a = c; } free(a); } sysput(string) { syspot(string); delete(string); } dump() { dump1(namelist); } dump1(base) struct node *base; { register struct node *b, *c, *e; struct node *d; while (base) { b = base->p1; c = binstr(b->typ); d = strstr(" "); e = dcat(c, d); sys.+9. ch: .=.+1 vflg: .=.+1 .even tname: .=.+2 dir: name: .=.+8. mtim: .=.+4 ouid: .=.+1 mode: .=.+1 size: .=.+2 arglst: .=.+200. buf: .=.+512.  c; register struct node *e, *f, *d; d = f = alloc(); while ((c = *s++)!='\0') { (e=alloc())->ch = c; f->p1 = e; f = e; } d->p2 = e; return(d); } class(c) { switch (c) { case ')': return(1); case '(': return(2); case '\t': case ' ': return(3); case '+': return(4); case '-': return(5); case '*': return(6); case '/': return(7); case '$': return(8); case '"': case '\'': return(9); case '=': return(10); case ',': return(11); } return(0); } alloc() { register put(cat(e, b->p1)); delete(e); if (b->typ==1) { c = strstr(" "); sysput(cat(c, b->p2)); delete(c); } base = base->p2; } } writes(s) { sysput(dcat(binstr(lc),dcat(strstr("\t"),strstr(s)))); flush(); if (cfail) { dump(); flush(); exit(); } while(getc()); while (compile()); flush(); exit(); } getc() { register struct node *a; static struct node *line; static linflg; while (line==0) { line = syspit(); if(rfail) { cfail++; writes("eof on input"); } lc++; }_...runl.outy.tab.cne1.one2.one3.one4.one5.one6.onelex.one.gne.hne1.c~ne2.c}ne3.c|ne4.c{ne5.czne6.cynelex.ca.outa.outvnroff1.sunroff2.stnroff3.ssnroff4.srnroff5.sqnroff8.spti.soroff1.snroff2.sstruct node *f; register int i; extern fout; if (freelist==0) { if (--freesize < 20) { if ((i=sbrk(1200)) == -1) { flush(); write (fout, "Out of free space\n", 18); exit(); } freesize =+ 200; } return(freespace++); } f = freelist; freelist = freelist->p1; return(f); } free(pointer) struct node *pointer; { pointer->p1 = freelist; freelist = pointer; } nfree() { register int i; register struct node *a; i = freesize; a = freelist; while(a) { a = a->p1; i++; }  if (linflg) { line = 0; linflg = 0; return(0); } a = line->p1; if (a==line->p2) { free(line); linflg++; } else line->p1 = a->p1; return(a); } mroff3.slroff4.skroff5.sjroff7.siroff8.ssufrcgsuftab.stcatsim.strctroff1.stroff2.stroff3.stroff4.stroff5.stroff6.stroff6atroff8.sxxxxxreturn(i); } look(string) struct node *string; { register struct node *i, *j, *k; k = 0; i = namelist; while (i) { j = i->p1; if (equal(j->p1, string) == 0) return(j); i = (k=i)->p2; } i = alloc(); i->p2 = 0; if (k) k->p2 = i; else namelist = i; j = alloc(); i->p1 = j; j->p1 = copy(string); j->p2 = 0; j->typ = 0; return(j); } copy(string) struct node *string; { register struct node *j, *l, *m; struct node *i, *k; if (string == 0) return(0); i = l = alloc(); j = string;b...abort.sabs.salloc.satof.satoi.ccerror.schdir.schmod.s chown.s close.s creat.s crt0.s csv.sctime.cdup.serrlst.cexecl.sexecv.sexit.sfcrt0.sffltpr.sfltpr.sfork.sfstat.sgetc.sgetchr.sgetcsw.sgetgid.sgetpid.sgetpw.cstruct node { struct node *p1; struct node *p2; char typ; char ch; }; int freesize; struct node *lookf; struct node *looks; struct node *lookend; struct node *lookstart; struct node *lookdef; struct node *lookret; struct node *lookfret; int cfail; int rfail; struct node *freelist; struct node *namelist; int lc; struct node *schar;  k = string->p2; while(j != k) { m = alloc(); m->ch = (j=j->p1)->ch; l->p1 = m; l = m; } i->p2 = l; return(i); } equal(string1, string2) struct node *string1, *string2; { register struct node *i, *j, *k; struct node *l; int n, m; if (string1==0) { if (string2==0) return(0); return(-1); } if (string2==0) return(1); i = string1; j = string1->p2; k = string2; l = string2->p2; for(;;) { m = (i=i->p1)->ch; n = (k=k->p1)->ch; if (m>n) return(1); if (mp1; q = s->p2; sign = 1; if (class(p->ch)==5) { /* minus */ sign = -1; if (p==q) return(0); p = p->p1; } loop: m = p->ch - '0'; if (m>9 | m<0) writes("bad integer string"); n = n * 10 + m; if (p==q) return(n*sign); p = p->p1; goto loop; } binstr(binagetcsw.ogetgid.ogetpid.ogetuid.ogtty.ohmul.okill.oladd.oldfps.olink.olocv.oltod.oatoi.octime.oerrlst.ogetpw.ounlink.sabs.owait.swrite.salloc.oatof.ocerror.ochdir.ochmod.ochown.oclose.ocreat.ocsv.odup.oexecl.oexecv.oexit.offltpr.ofltpr.ofork.ofstat.ogetc.ogetchr.ogetcsw.ogetgid.ogetpid.ogetuid.ogtty.ohmul.okill.oladd.oldfps.olink.olocv.oltod.omakdir.omcount.omdate.omknod.omount.onargs.onice.onlist.oopen.opipe.oprintf.oprof.optrace.o@dc3.s?dc4.s>dc5.s=diff2.sOrun;dsw.s:du.sfactor.s8fed1.s7fed2.s6fed3.s5form1.s4form2.s3form3.s2form4.s1form5.s0form6.s/kill.scdb1.o1cpall.ccdb2.o+lpd.s*ac.c)bcd.c(cal.cbanner.cbc.y%cc.ca.out#cdb1.c"cdb2.ccheck.cldfps = 170100^tst stfps = 170200^tst / ftoa -- basic g fp conversion .globl _ndigit .globl ecvt .globl fcvt / ecvt converts fr0 into decimal / the string of converted digits is pointed to by r0. / the number of digits are specified by _ndigit / r2 contains the decimal point / r1 contains the sign .globl _ecvt, _fcvt _ecvt: mov r5,-(sp) mov sp,r5 mov r2,-(sp) movf 4(r5),fr0 mov 14(r5),_ndigit jsr pc,ecvt br 1f _fcvt: mov r5,-(sp) mov sp,r5 mov r2,-(sp) movf 4(r5),fr0 mov 14(r5),_ndigit jsputc.oputchr.oread.oreset.osbrk.oseek.osetgid.osetuid.osignal.osleep.ostat.ostime.ostty.osync.otime.otimes.oumount.ounlink.owait.owrite.ocrt0.ofcrt0.omcrt0.oatoi.octime.oerrlst.ogetpw.omon.operror.oqsort.orin.o chmod.ccmp.ccol.ccomm.ccp.ccron.ccrypt.ccu.cdate.cdcheck.cdd.cdf.cdiff1.cdpr.cdump.cecho.ced.cexit.cfc.cfget.c file.c find.cfsend.c getty.cglob.cgoto.cgrep.cgsi.chcatsim.chyphen.cibm.cicheck.cr pc,fcvt 1: mov r2,*16(r5) mov r1,*20(r5) mov (sp)+,r2 mov (sp)+,r5 rts pc fcvt: clr eflag br 1f ecvt: mov $1,eflag 1: stfps -(sp) ldfps $200 movf fr0,-(sp) movf fr1,-(sp) mov r3,-(sp) mov $buf,r1 clr r2 clr sign tstf fr0 cfcc beq zer bgt 1f inc sign negf fr0 1: modf $one,fr0 tstf fr1 cfcc beq lss gtr: movf fr0,-(sp) movf fr1,fr0 1: mov $buftop,r3 1: modf tenth,fr0 movf fr0,fr2 movf fr1,fr0 addf $epsilon,fr2 modf $ten,fr2 movfi fr3,r0 add $'0,r0 movb r0,-(r3) inc r2 c...patan.sa.out'runatan.ocrypt.odpadd.ojcrypt.sidpadd.shecvt.sgexp.sffakfp.s-floor.s,fmod.s+fp1.s*fp2.s)fp3.s(fpx.s'gamma.secvt.oexp.o$get.sfloor.o"ldiv.s!log.s mesg.spow.sput.srand.ssavr5.sfmod.oif.cind.cinit.cjsts.cld.cln.clogin.clpr.cls.cbob.y tstf fr0 cfcc bne 1b / mov $buf,r1 1: movb (r3)+,(r1)+ cmp r3,$buftop blo 1b / movf (sp)+,fr0 br pad zer: inc r2 br pad lss: dec r2 modf $ten,fr0 tstf fr1 cfcc beq lss inc r2 jsr pc,digit1 pad: jsr pc,digit br out br pad digit: cmp r1,$buftop bhis 1f add $2,(sp) modf $ten,fr0 digit1: movfi fr1,r0 add $'0,r0 movb r0,(r1)+ 1: rts pc / out: mov $buf,r0 add _ndigit,r0 tst eflag bne 1f add r2,r0 1: cmp r0,$buf blo outout movb (r0),r3 add $5,r3 movb r3,(r0) 1: cmpb (rfp.osin.ssqrt.sswitch.sttyn.sgamma.oget.oldiv.olog.omesg.opow.oput.orand.osavr5.osin.osqrt.oswitch.ottyn.ottyn.o/ fakefp -- fake floating point simulator .globl fptrap fptrap: sub $2,(sp) mov r0,-(sp) sys signal; 4; 0 mov (sp)+,r0 2 / rti 0),$'9 ble 1f movb $'0,(r0) cmp r0,$buf blos 2f incb -(r0) br 1b 2: movb $'1,(r0) inc r2 1: outout: mov sign,r1 mov _ndigit,r0 tst eflag bne 1f add r2,r0 1: clrb buf(r0) mov $buf,r0 mov (sp)+,r3 movf (sp)+,fr1 movf (sp)+,fr0 ldfps (sp)+ rts pc epsilon = 037114 one = 40200 ten = 41040 .data tenth: 037314; 146314; 146314; 146315 _ndigit:10. .bss buf: .=.+40. buftop: sign: .=.+2 eflag: .=.+2 .text d...runpasswd.cmail.cmesg.cmkdir.smkfs.cmknod.cmount.cmv.cncheck.cnewgrp.c#tbl.cnice.cunits.cnm.cnohup.cl.outod.copr.ctty.sa.outa.outpfe.sa.outpinhead.hplot.cpr.cprof.cps.cpti.s.globl exp, _exp / ldfps = 170100^tst stfps = 170200^tst ldexp = 176400^movif stexp = 175000^movfi / / exp accepts its argument and returns its result / in fr0. The carry bit is set if the result overflows. / The coefficients are #1067 from Hart & Cheney. / / movf arg,fr0 / jsr pc,exp / movf fr0,result / _exp: mov r5,-(sp) mov sp,r5 mov 4(r5),fr0 jsr pc,exp mov (sp)+,r5 rts pc exp: stfps -(sp) ldfps $200 /di mode movf fr2,-(sp) movf fr1,-(sp) tstf fr0 cfcc bne 1f movf $one,fr0 /exp(0) clc / C library -- signed dp add / dpadd(l, i) / int l[2]; / l =+ i; .globl _dpadd _dpadd: mov r5,-(sp) mov sp,r5 mov 4(r5),r0 tst 6(r5) sxt r1 add r1,(r0)+ add 6(r5),(r0) adc -(r0) mov (sp)+,r5 rts pc ptx.cpwd.cquiz.cquot.crc.creloc.crestor.crew.srm.crmdir.ssa.csh.csize.csleep.csort.cspeak.cspeak.vspell.cspell1.cspell2.cspell3.cspline.csplit.cstrip.sstty.csu.csum.ssync.ctbl.ctee.ctekstare.ctime.s br out 1: modf log2e,fr0 /exp(x) = 2^(x*log2(e)) cfcc bmi 2f movfi fr1,-(sp) /save integer part subf $half,fr0 br 3f 2: movfi fr1,-(sp) dec (sp) addf $half,fr0 3: movf fr0,fr1 / -.5 < x < +.5 mulf fr1,fr1 /arg**2 / movf P2,fr2 mulf fr1,fr2 addf P1,fr2 mulf fr1,fr2 addf P0,fr2 mulf fr2,fr0 /xP(x**2) / movf fr1,fr2 addf Q1,fr2 mulf fr1,fr2 addf Q0,fr2 /Q(x**2) / movf fr2,fr1 subf fr0,fr1 addf fr2,fr0 divf fr1,fr0 /(Q+xP)/(Q-xP) mulf sqrt2,fr0 / stexp fr0,-(sp) add (sp)+,(sp) / crypt -- password incoding / mov $key,r0 / jsr pc,crypt .globl crypt, _crypt .globl savr5 _crypt: mov r5,-(sp) mov sp,r5 mov r5,savr5 mov 4(r5),r0 jsr pc,crypt clr savr5 mov (sp)+,r5 rts pc crypt: mov r1,-(sp) mov r2,-(sp) mov r3,-(sp) mov r4,-(sp) mov r5,-(sp) mov r0,r1 mov $key,r0 movb $004,(r0)+ movb $034,(r0)+ 1: cmp r0,$key+64. bhis 1f movb (r1)+,(r0)+ bne 1b 1: dec r0 / / / fill out key space with clever junk / mov $key,r1 1: movb -1(r0),r2 movb (r1)+,r3 xor r3,r2 movtp1.stp2.s~tp3.s}tp4.s|tr.ctss.stty.sytypo.cxumount.cwuniq.cvupdate.suusort.ctwall.cswc.crwho.cqwrite.s/ cmp (sp),$177 ble 2f tst (sp)+ movf big,fr0 /overflow sec br 1f 2: cmp (sp),$-177 bge 2f tst (sp)+ clrf fr0 /underflow clc br 1f 2: ldexp (sp)+,fr0 clc 1: out: movf (sp)+,fr1 movf (sp)+,fr2 ldfps (sp)+ rts pc / / .data P0: 42675; 36404; 77563; 46675 P1: 41241; 116724; 114237; 60333 P2: 36675; 27102; 125560; 136652 Q0: 43210; 100661; 76072; 62453 Q1: 42151; 27450; 75350; 112503 log2e: 40270; 125073; 24534; 13761 sqrt2: 40265; 02363; 31771; 157144 half = 40000 one = b r2,(r0)+ cmp r0,$key+128. blo 1b / / / establish wheel codes and cage codes / mov $wheelcode,r4 mov $cagecode,r5 mov $256.,-(sp) 2: clr r2 clr (r4) mov $wheeldiv,r3 3: clr r0 mov (sp),r1 div (r3)+,r0 add r1,r2 bic $40,r2 bis shift(r2),(r4) cmp r3,$wheeldiv+6. bhis 4f bis shift+4(r2),(r5) 4: cmp r3,$wheeldiv+10. blo 3b sub $2,(sp) tst (r4)+ tst (r5)+ cmp r4,$wheelcode+256. blo 2b tst (sp)+ / .data shift: 1;2;4;10;20;40;100;200;400;1000;2000;4000;10000;20000;40000;100000 1;2 wheelde...^ar.scol.cl.outed.oa.outa.outa.outas17.sas18.sas19.sas21.sas22.sas23.sas24.sas25.sas26.sas27.sas28.sas29.sKbas.sJcat.sIchgrp.sHchown.sGclri.sFdb1.sEdb2.sDdb3.sCdb4.sBdc1.sAdc2.s40200 / big: 77777; 177777; 177777; 177777 / / P0 = .15139 06799 05433 89158 94328 d4 / P1 = .20202 06565 12869 27227 886 d2 / P2 = .23093 34775 37502 33624 d-1 / / Q0 = .43682 11662 72755 84984 96814 d4 / Q1 = .23318 42114 27481 62379 0295 d3 / Q2 = .1 d1 / / log2e = 1.44269 50408 88963 40735 99246 / sqrt2 = 1.41421 35623 73095 04880 16887 iv: 32.; 18.; 10.; 6.; 4. .bss cagecode: .=.+256. wheelcode: .=.+256. .text / / / make the internal settings of the machine / both the lugs on the 128 cage bars and the lugs / on the 16 wheels are set from the expanded key / mov $key,r0 mov $cage,r2 mov $wheel,r3 1: movb (r0)+,r1 bic $!177,r1 asl r1 mov cagecode(r1),(r2)+ mov wheelcode(r1),(r3)+ cmp r0,$key+128. blo 1b / / / now spin the cage against the wheel to produce output. / mov $word,r4 mov $wheel+128.,r3 3: mov -(r3),r2 mov $cage,r0 clr r5 1: bit r2,(r0)+ beq 2f incb r5 2: cmp r0,$cage+256. blo 1b / / we have a piece of output from current wheel / it needs to be folded to remove lingering hopes of / inverting the function / mov r4,-(sp) clr r4 div $26.+26.+10.,r4 add $'0,r5 cmp r5,$'9 blos 1f add $'A-'9-1,r5 cmp r5,$'Z blos 1f add $'a-'Z-1,r5 1: mov (sp)+,r4 movb r5,(r4)+ cmp r4,$word+8. blo 3b / mov (sp)+,r5 mov (sp)+,r4 mov (sp)+,r3 mov (sp)+,r2 mov (sp)+,r1 mov $word,r0 rts pc .bss key: .=.+128. word: .=.+3r5 rts pc atan: jsr r0,save tstf fr0 cfcc blt 1f jsr pc,satan br ret 1: negf fr0 jsr pc,satan negf fr0 br ret / atan2: jsr r0,save clr -(sp) tstf fr0 cfcc bge 1f inc (sp) negf fr0 1: tstf fr1 cfcc beq 2f bgt 1f add $2,(sp) negf fr1 1: divf fr1,fr0 jsr pc,satan br 1f 2: movf pi2,fr0 1: bit $2,(sp) beq 1f negf fr0 addf pi2,fr0 addf pi2,fr0 1: bit $1,(sp)+ beq 1f negf fr0 1: ret: ldfps (sp)+ movf (sp)+,fr3 movf (sp)+,fr2 movf (sp)+,fr1 mov (sp)+,r0 rts pc save: movf ttyf,r0 sys write; endmsg; eendmsg-endmsg sys exit unknown: mov $"??,ubuf br 6b mshproc: sys exec; msh; mshp sys exit .data nlflg: 1 .text mshp: msh minust 0 msh: minust: <-t\0> argm: eargm: film: efilm: .data < > / is ltty -1 ltty: .=.+1 .text excl: qnl: <...\n> .data ttyx: ttyno = .-2 .text utmp: endmsg: eendmsg: errmsg: < not logged in.\n> eerrmsg: mesg: <\nMessage from > emesg: dnymes2. cage: .=.+256. wheel: .=.+256.  fr1,-(sp) movf fr2,-(sp) movf fr3,-(sp) stfps -(sp) ldfps $40200 / DP, no interrupt jmp (r0) satan: cmpf sq2m1,fr0 cfcc bge arctan cmpf sq2p1,fr0 cfcc bgt 1f movf one,fr1 divf fr0,fr1 movf fr1,fr0 jsr pc,arctan negf fr0 addf pi2,fr0 rts pc 1: movf fr0,fr1 subf one,fr0 addf one,fr1 divf fr1,fr0 jsr pc,arctan addf pi4,fr0 rts pc arctan: mov $p4p,r0 mov $4,-(sp) movf fr0,fr3 mulf fr3,fr3 movf *(r0)+,fr1 1: mulf fr3,fr1 addf *(r0)+,fr1 dec (sp) bne 1b mov $4,(sp) movf fr3,: ednymes: .even .bss ttyf: .=.+2 ubuf: .=.+16. statbuf:.=.+40. ch: .=.+2 ufil: .=.+2 signal = 48. .globl release .globl discard .globl iget,succ discard: jsr pc,iget mov (r0),r1 jsr pc,release jmp succ fr2 br 2f 1: mulf fr3,fr2 2: addf *(r0)+,fr2 dec (sp) bne 1b tst (sp)+ divf fr2,fr1 mulf fr1,fr0 rts pc .data p4p: p4;p3;p2;p1;p0 q3;q2;q1;p0 one: 40200;0;0;0 pi2: 40311;7732;121041;64302 pi4: 40111;7732;121041;64302 sq2p1: 40432 101171 114774 167461 sq2m1: 37724 11714 147747 74621 p4: 37442 145026 75504 15621 p3: 40725 21566 115517 50305 p2: 41443 160206 172714 25441 p1: 41632 172223 76027 56645 p0: 41462 25125 6152 126064 q3: 41170 10112 141724 64324 q2: 41573 537/* * who */ int fout; int buf[256]; main(argc, argv) char **argv; { char *s, *cbuf; int n, fi, i; int tty; struct { char name[8]; char tty; char pad1; int time[2]; char pad2[2]; } *p; s = "/etc/utmp"; if(argc == 2) s = argv[1]; fi = open(s, 0); if(fi < 0) { write("cannot open wtmp\n", 17); exit(); } fout = dup(1); close(1); if (argc==3) tty = ttyn(0); loop: n = read(fi, buf, 512); if(n == 0) { flush(); if (argc==3) write(fout, "Nobody.\n", 8); exit(); } p =i = r3 .globl putcall,iget,kput,putdec .globl generate,succ .globl decimal decimal: mov $1f+1,r0 jsr pc,putcall jsr pc,iget mov (r0),r0 jsr pc,kput jmp succ 1: mov (i),r0 jsr pc,putdec jmp generate 76 25372 71522 q1: 41670 123114 51576 75020 / one = 1.00000 00000 00000 00000 d0 / sq2p1=2.41421 35623 73095 04880 d0 / sq2m1= .41421 35623 73095 04880 d0 / pi2 = 1.57079 63267 94896 61923 d0 / p4 = .15897 40288 48230 7048 d0 / p3 = .66605 79017 00926 2658 d1 / p2 = .40969 26483 21022 5637 d2 / p1 = .77477 68771 92042 0862 d2 / p0 = .44541 34005 92906 8032 d2 / q4 = .10000 00000 00000 0000 d1 / q3 = .15503 97755 14219 8753 d2 / q2 = .62835 93051 10323 7683 d2 / q1 = .92324 80107 23009 7484 d2 / q0 =  &buf; for(p = &buf; (n =- 16)>=0; p++) { if (argc==3 && tty!=p->tty) continue; if(p->name[0] == '\0' && argc==1) continue; for(i=0; i<8; i++) { if(p->name[i] == '\0') p->name[i] = ' '; putchar(p->name[i]); } for(i=0; i<3; i++) putchar("tty"[i]); putchar(p->tty); cbuf = ctime(p->time); for(i=3; i<16; i++) putchar(cbuf[i]); putchar('\n'); if (argc==3) { flush(); exit(); } } goto loop; } f = r5 .globl j .globl classtab,jget .globl ctest .globl putcstr .globl succ ctest: inc ctestc mov r0,-(sp) jsr pc,jget asl r0 bit *(sp)+,classtab(r0) clc beq 1f asr r0 jsr pc,putcstr inc j(f) sec 1: rts pc .data ctestc: 0 .44541 34005 92906 8044 d2 /* wc line and word count */ int buf[259]; int wordct[2]; int twordct[2]; int linect[2]; int tlinect[2]; main(argc,argv) char **argv; { int i, token; register char *p1, *p2; register int c; i = 1; do { if(argc<=1) buf[0] = 0; else if(fopen(argv[i],buf)<0) { diag(argv[i]); diag(": cannot open\n"); continue; } p1 = 0; p2 = 0; linect[0] = linect[1] = 0; wordct[0] = wordct[1] = 0; token = 0; for(;;) { if(p1 >= p2) { p1 = &buf[1]; c = read(buf[0], p1, 512); if(c # include "ciodec.c" ceof (fn) int fn; { struct fileps *fp; fp = &IEH3fpts[fn]; if (fp->wrflag > 0 && fp->eoferr == 2) return(1); else return(0); } cerr (fn) int fn; { struct fileps *fp; fp = &IEH3fpts[fn]; if (fp->eoferr == 0) fp->eoferr = 1; if (fp->wrflag > 0 && fp->eoferr == 3) return(1); else return(0); } / write -- write to another user .globl ttyn cmp (sp)+,$2 beq 1f bgt 2f mov $1,r0 sys write; argm; eargm-argm sys exit 2: movb *4(sp),ltty 1: tst (sp)+ mov (sp)+,r5 sys open; utmp; 0 bec 1f mov $1,r0 sys write; film; efilm-film sys exit 1: mov r0,ufil 1: mov ufil,r0 sys read; ubuf; 16. tst r0 bne 2f jmp 8f 2: tstb ltty beq 2f cmpb ltty,8.+ubuf bne 1b 2: mov $ubuf,r3 mov r5,r4 mov $9.,r2 2: dec r2 beq 2f cmpb (r4)+,(r3)+ beq 2b tstb -1(r4) bne 1b cmpb $' ,-1(r3) bne 1b 2:<= 0) break; p2 = p1+c; } c = 0; c =| *p1++; if(' ' 20) return; fp = &IEH3fpts[fn]; if (fp->nchars > 0 || fp->wrflag == 3) switch (fp->wrflag) { case 3: seek(fn,0,2); case 2: write (fn, fp->buff, fp->nchars); break; case 1: seek(fn, -(fp->nchars), 1); } fp -> nchars = fp->eoferr = 0; fp -> wrflag = 0; if ( IEH3olbf[fn] != 0 && fp->bsize >4) free(IEH3olbf[fn]); IEH3olbf[fn] = 0; close (fn); } char *IEH3olbf[10] {0,0,0,0,0,0,0,0,0,0};  movb 8.+ubuf,ttyno sys open; ttyx; 1 bes 3f sys stat; ttyx; statbuf bes 3f bit $2,statbuf+4 bne 2f 3: mov $1,r0 sys write; dnymes; ednymes-dnymes sys exit 2: mov r0,ttyf clr r0 jsr pc,ttyn mov r0,r3 mov statbuf,r4 mov ufil,r0 sys seek; 0; 0 1: mov ufil,r0 sys read; ubuf; 16. tst r0 beq unknown cmp r3,ubuf+8. bne 1b mov $ubuf,r0 mov $8.,r1 1: cmpb $' ,(r0)+ beq 1f dec r1 bne 1b 1: neg r1 add $8,r1 mov r1,0f 6: mov ttyf,r0 sys write; mesg; emesg-mesg mov ttyf,r0 sys 0; 5f  } while(++i 2) { printf("%7s ",locv(tlinect[0],tlinect[1])); printf("%7s ",locv(twordct[0],twordct[1])); printf("total\n"); } } diag(s) char *s; { while(*s) write(2,s++,1); } ldfps = 170100^tst stfps = 170200^tst / .globl atan, _atan .globl atan2, _atan2 / / floating-point arctangent / / atan replaces the value in fr0 by its arctangent / in the range [-pi/2,pi/2]. / / atan2 places in fr0 the arctangent of fr0/fr1 / in the range [-pi,pi]. / / there are no error exits / / coefficients are #5076 from Hart & Cheney. / / _atan: mov r5,-(sp) mov sp,r5 movf 4(r5),fr0 jsr pc,atan br 1f _atan2: mov r5,-(sp) mov sp,r5 movf 4(r5),fr0 movf 12.(r5),fr1 jsr pc,atan2 1: mov (sp)+,.data 5: sys write; ubuf; 0:2 .text mov ttyf,r0 sys write; qnl; 4 sys signal; 2; 9f 7: clr r0 sys read; ch; 1 tst r0 beq 9f tst nlflg beq 1f cmp ch,$'! bne 1f sys fork br mshproc sys wait mov $1,r0 sys write; excl; 2 br 7b 1: clr nlflg cmp ch,$'\n bne 1f inc nlflg 1: mov ttyf,r0 sys write; ch; 1 br 7b 8: movb (r5)+,ch beq 8f mov $1,r0 sys write; ch; 1 br 8b 8: tstb ltty beq 8f mov $1,r0 sys write; ltty-1; 2 8: mov $1,r0 sys write; errmsg; eerrmsg-errmsg sys exit 9: movchar mesg[3000]; int msize; struct { char name[8]; char tty[2]; int time[2]; int junk; } utmp[50]; main(argc, argv) char *argv[]; { register i, *p; int f; f = open("/etc/utmp", 0); if(f < 0) { printf("utmp?\n"); exit(); } read(f, utmp, sizeof utmp); close(f); f = 0; if(argc >= 2) { f = open(argv[1], 0); if(f < 0) { printf("%s?\n", argv[1]); exit(); } } while((i = read(f, &mesg[msize], sizeof mesg - msize)) > 0) msize =+ i; close(f); for(i=0; itty[0] == 0) continue; sleep(1); sendmes(p->tty[0]); } } sendmes(tty) { register i; register char *s; i = fork(); if(i == -1) { printf("try again\n"); return; } if(i) return; s = "/dev/ttyx"; s[8] = tty; i = open(s, 1); if(i < 0) { printf("cannot open tty%c\n", tty); exit(); } close(1); dup(i); printf("Broadcast Message ...\n\n"); write(1, mesg, msize); exit(); } !mflg) { ibuf[0] = -1; sort(); close(0); } for(a = mflg?0:eargc; a+N < nfiles; a=+N) { newfile(); merge(a, a+N); } if(a != nfiles) { oldfile(); merge(a, nfiles); } error = 0; term(); } sort() { register char *cp; register *lp, c; int done; int i; int f; done = 0; i = 0; do { cp = tspace; lp = lspace; while(lp < lspace+nlines && cp < tspace+ntext) { *lp++ = cp; while((*cp++ = c = getc(ibuf)) != '\n') { if(c >= 0) continue; cp--; close(ibuf[0]); if(i = *++s; if(tabchar == 0) s--; break; case 'r': p->rflg = -1; break; default: p->m[k] = number(&s); if(*s == '.') s++; p->n[k] = number(&s); s--; } } } number(ppa) char **ppa; { int n; register char *pa; pa = *ppa; n = 0; while(digit(*pa)) n = n*10 + *pa++ - '0'; *ppa = pa; return(n); } blank(c) { if(c==' ' || c=='\t') return(1); return(0); } int (*qscmp)(); int qses; qsort(a, n, es, fc) char *a; int n, es; int (*fc)(); { qscmp = fc; qses = es; qs1(a, filoruadgjmpsvbehk< eargc) { if((f = setfil(i++)) == 0) ibuf[0] = 0; else if(fopen(f, ibuf) < 0) cant(f); } else break; } if(c < 0) { done++; lp--; break; } } qsort(lspace, lp-lspace, 2, cmp); if(done == 0 || nfiles != eargc) newfile(); else oldfile(); while(lp > lspace) { cp = *--lp; if(*cp) do putc(*cp, obuf); while(*cp++ != '\n'); } fflush(obuf); close(obuf[0]); } while(done == 0); } struct merg { char l[L]; int b[259]; }; mergea+n*es); } qs1(a, l) char *a, *l; { register char *i, *j, *es; char **k; char *lp, *hp; int n, c; es = qses; start: if((n=l-a) <= es) return; n = ((n/(2*es))*es) & 077777; hp = lp = a+n; i = a; j = l-es; for(;;) { if(i < lp) { if((c = (*qscmp)(i, lp)) == 0) { qsexc(i, lp =- es); continue; } if(c < 0) { i =+ es; continue; } } loop: if(j > hp) { if((c = (*qscmp)(hp, j)) == 0) { qsexc(hp =+ es, j); goto loop; } if(c > 0) { if(i == lp)#define L 512 #define N 7 #define C 20 #define MEM (16*2048) #define NF 10 int ibuf[259]; int obuf[259]; char *file; char *filep; int nfiles; int nlines; int ntext; int *lspace; char *tspace; int cmp(); int term(); int mflg; char *outfil; char tabchar; int eargc; char **eargv; char fold[128] { 0000,0001,0002,0003,0004,0005,0006,0007, 0010,0011,0012,0013,0014,0015,0016,0017, 0020,0021,0022,0023,0024,0025,0026,0027, 0030,0031,0032,0033,0034,0035,0036,0037, 0040,0041,0042,0043,0044,0045,0046,0047, 00(a, b) { register struct merg *p; register char *cp; register i; struct { int *ip;}; int f; int j; int k,l,c; p = lspace; j = 0; for(i=a; ib[0] = dup(0); else if(fopen(f, p->b) < 0) cant(f); ibuf[j] = p; if(!rline(p)) j++; p++; } do { i = j; qsort(ibuf, i, 2, cmp); l = 0; while(i--) { cp = ibuf[i]; if(*cp == '\0') { l = 1; if(rline(ibuf[i])) { k = i; while(++k < j) ibuf[k-1] = ibuf[k]; j--;  { qstexc(i, hp =+ es, j); i = lp =+ es; goto loop; } qsexc(i, j); j =- es; i =+ es; continue; } j =- es; goto loop; } if(i == lp) { for(k=lp+2; k<=hp;) *(*k++)='\0'; if(lp-a >= l-hp) { qs1(hp+es, l); l = lp; } else { qs1(a, lp); a = hp+es; } goto start; } qstexc(j, lp =- es, i); j = hp =- es; } } qsexc(i, j) char *i, *j; { register char *ri, *rj, c; int n; n = qses; ri = i; rj = j; do { c = *ri; *ri++ = *r50,0051,0052,0053,0054,0055,0056,0057, 0060,0061,0062,0063,0064,0065,0066,0067, 0070,0071,0072,0073,0074,0075,0076,0077, 0100,0101,0102,0103,0104,0105,0106,0107, 0110,0111,0112,0113,0114,0115,0116,0117, 0120,0121,0122,0123,0124,0125,0126,0127, 0130,0131,0132,0133,0134,0134,0136,0137, 0140,0101,0102,0103,0104,0105,0106,0107, 0110,0111,0112,0113,0114,0115,0116,0117, 0120,0121,0122,0123,0124,0125,0126,0127, 0130,0131,0132,0173,0174,0175,0176,0177 }; char nofold[128]; char dict[128] { 1,1,1,1,1,1,1,1 } } } } while(l); i = j; if(i > 0) for(;;) { cp = ibuf[i-1]; if(i == 1 || cmp(&ibuf[i-1], &ibuf[i-2])) do putc(*cp, obuf); while(*cp++ != '\n'); if(rline(ibuf[i-1])) { i--; if(i == 0) break; } cp = &ibuf[i]; while (--cp.ip > ibuf && cmp(cp.ip, cp.ip-1) < 0) { p = *cp.ip; *cp.ip = *(cp.ip-1); *(cp.ip-1) = p; } } p = lspace; for(i=a; ib[0]); p++; if(i >= eargc) close(creat(setfil(i))); } fflush(obuf); close(obuf[0]); } rlj; *rj++ = c; } while(--n); } qstexc(i, j, k) char *i, *j, *k; { register char *ri, *rj, *rk; char c; int n; n = qses; ri = i; rj = j; rk = k; do { c = *ri; *ri++ = *rk; *rk++ = *rj; *rj++ = c; } while(--n); } ,1,0,0,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1, 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1, 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1 }; char nodict[128] { 1 }; struct field { char *code; char *ignore; int nflg; int rflg; int bflg; char *m[2]; char *n[2]; } fields[NF]; int proto[9] { &fold, &nodict, 0, 1, 0, 0,-1, 0,0 }; int nfields; int error 1; main(argc, argv) char **aine(mp) struct merg *mp; { register char *cp; register *bp, c; bp = mp->b; cp = mp->l; do { c = getc(bp); if(c < 0) return(1); *cp++ = c; } while(c != '\n'); *cp = '\0'; return(0); } newfile() { if(fcreat(setfil(nfiles), obuf) < 0) { mess("Can't create temp\n"); term(); } nfiles++; } char * setfil(i) { if(i < eargc) if(eargv[i][0] == '-' && eargv[i][1] == '\0') return(0); else return(eargv[i]); i =- eargc; filep[0] = i/26 + 'a'; filep[1] = i%26 + 'a'; return(file) sys fork br 1f sys exit 1: clr r0 sys close mov $1,r0 sys close mov $2,r0 sys close 1: sys sync mov $30.,r0 sys sleep br 1b sleep = 35. sync = 36. rgv; { register a, i; char *arg; register int *p; int *q; for(a=0; a<128; a++) nofold[a] = a; nodict[127] = 1; copyproto(); eargv = argv; while (--argc > 0) { if(**++argv == '-') for(arg = *argv;;) { switch(*++arg) { case '\0': if(arg[-1] == '-') eargv[eargc++] = "-"; break; case 'm': mflg++; continue; case 'o': if(--argc > 0) outfil = *++argv; continue; default: field(++*argv,1); break; } break; } else if (**argv == '+') { ; } oldfile() { if(outfil) { if(fcreat(outfil, obuf) < 0) { mess("Can't create output\n"); term(); } } else obuf[0] = 1; } cant(f) { mess("Can't open "); mess(f); mess("\n"); term(); } term() { register i; if(nfiles == eargc) nfiles++; for(i=eargc; i 1) { if(*argv[1] == '-') { if(argv[1][1] <= '9') fields = conv(&argv[1][1]); else mode = argv[1][1]; argc--; argv++; goto loop; } if(*argv[1] == '+') { letters = conv(&argv[1][1]); argc--; argv++; goto loop; } f = open(argv[1], 0); if(f < 0) { printf("cannot open %s\n", argv[1]); exit(); } fin =  if(++nfields>=NF) { mess("Too many keys\n"); exit(1); } copyproto(); field(++*argv,0); } else eargv[eargc++] = *argv; } q = &fields[0]; for(a=1; a<=nfields; a++) { p = &fields[a]; for(i=0; i<5; i++) /*sensitive to sizeof(proto)*/ if(p[i] != proto[i]) goto next; for(i=0; i<5; i++) p[i] = q[i]; next: ; } if(eargc == 0) eargv[eargc++] = "-"; a = MEM; i = lspace = sbrk(0); while(brk(a) == -1) a =- 512; brk(a =- 512); /* for recursion */ a =- i; nlines = ((auct field *fp; char *pp; { register i; register char *p; p = pp; if( (i=fp->m[j]) < 0) return(-1); while(i-- > 0) { if(tabchar != 0) { while(*p != tabchar) if(*p != '\n') p++; else goto ret; p++; } else { while(blank(*p)) p++; while(!blank(*p)) if(*p != '\n') p++; else goto ret; } } if(fp->bflg) while(blank(*p)) p++; i = fp->n[j]; while(i-- > 0) { if(*p != '\n') p++; else goto ret; } ret: return(p); } digit(c) { return(c <= '9' &&f; } else fin = dup(0); if(argc > 2) { f = creat(argv[2], 0666); if(f < 0) { printf("cannot create %s\n", argv[2]); exit(); } fout = f; } else fout = dup(1); close(0); close(1); gline(b1); l1: linec++; if(gline(b2)) { pline(b1); flush(); exit(); } if(equal(b1, b2)) goto l1; pline(b1); linec = 0; l2: linec++; if(gline(b1)) { pline(b2); flush(); exit(); } if(equal(b1, b2)) goto l2; pline(b2); linec = 0; goto l1; } gline(buf) char buf[]; { int c; while((c = -L)>>1) & 077777; nlines =/ 5; ntext = nlines*8; tspace = lspace+nlines; file = "/usr/tmp/stmXaa"; loop: filep = file; while(*filep != 'X') filep++; for(*filep = 'a';;(*filep)++) { if(stat(file, lspace) < 0) { a = creat(file, 0600); if(a >= 0) break; } if(*filep == 'z') { if(file[1] != 't') { file = "/tmp/stmXaa"; goto loop; } mess("Cannot locate temp\n"); exit(1); } } close(a); filep++; if ((signal(2, 1) & 01) == 0) signal(2, term); nfiles = eargc; if( c >= '0'); } mess(s) char *s; { while(*s) write(2, s++, 1); } copyproto() { register int i, *p, *q; p = proto; q = &fields[nfields]; for(i=0; icode = nofold; break; case 'b': p->bflg++; break; case 'd': p->ignore = dict; break; case 'n': p->nflg++; break; case 't': tabchar getchar()) != '\n') { if(c == '\0') return(1); *buf++ = c; } *buf = 0; return(0); } pline(buf) char buf[]; { int c; switch(mode) { case 'u': if(uniq) {; uniq = 0; return; } break; case 'd': if(uniq) break; return; case 'c': printf("%4d ", linec); } uniq = 0; while((c = *buf++) != 0) putchar(c); putchar('\n'); } equal(b1, b2) char b1[], b2[]; { int c; b1 = skip(b1); b2 = skip(b2); while((c = *b1++) != 0) if(c != *b2++) return(0); if(*b2 != 0) return(0);  uniq++; return(1); } char * skip(s) char *s; { int nf, nl; nf = nl = 0; while(nf++ < fields) { while(*s==' ' || *s=='\t') s++; while( !(*s==' ' || *s=='\t') ) if(*s == 0) return(s); else s++; } while(nl++ < letters) if(*s == 0) return(s); else s++; return(s); } conv(s) char *s; { int d, n; n = 0; for(;;) { d = *s++ - '0'; if(0>d || d>9) break; n = n*10 + d; } return(n); }  27*wd[k] + wd[l]; if(inctab[tab2[c]] > junk) tab2[c]++; } if(file[2]) close(file[2]); } flsh(0,0); close(file[0]); sw = fork(); if(sw == 0){execl("/usr/bin/usort","usort","-o",name[2],name[0],0); err("sort"); } if(sw == -1)err("fork"); er = wait(); if(er != sw)err("probs"); file[0] = creat(name[0],0666); if(file[0] < 0)err("creat tmp"); file[1] = open("/usr/lib/w2006",0); if(file[1] < 0)err("open w2006"); ptr[1] = 1; for(k=0;((c = w2006[k] = get(1)) != '\n');k++) if(c == -1) ter char c; j = -1; do{ if(( c = nwd[++j] = get(wfile)) == -1)return(0); wd[j] = c - 0140; } while(c != '\n'); wd[j] = '\0'; return(j); } conf(n,width,cbuf) char cbuf[]; { register i,a; i = width; while(i--)cbuf[i] = ' '; cbuf[(a = n/10)?conf(a,--width,cbuf):--width] = n%10 + '0'; return(++width); } rand(){ static gorp; gorp = (gorp + 625) & 077777; return(gorp); } #define NMOUNT 16 #define NAMSIZ 32 struct mtab { char file[NAMSIZ]; char spec[NAMSIZ]; } mtab[NMOUNT]; main(argc, argv) char **argv; { register struct mtab *mp; register char *p1, *p2; int mf; sync(); mf = open("/etc/mtab", 0); read(mf, mtab, NMOUNT*2*NAMSIZ); if(argc != 2) { printf("arg count\n"); return; } if (umount(argv[1]) < 0) { perror("umount"); return; } p1 = argv[1]; while(*p1++) ; p1--; while(*--p1 == '/') *p1 = '\0'; while(p1 > argv[1] && *--p1 != '/') ; if(*p1break; file[2] = open(name[2],0); if(file[2] < 0)err("open tmp"); ptr[2] = 1; while(ptr[2]){ l=0; for(k=0;((c = wd[k] = get(2)) != '\n');k++) if(c == -1)goto done; for(i=0; i<=k;i++){ if(wd[i] < w2006[l]){ put(0,wd,k); break; } if(wd[i] > w2006[l]){ for(l=0;((c = w2006[l] = get(1)) != '\n');l++) if(c == -1){ put(0,wd,k); for(k=0;((c = wd[k] =get(2))!= -1);k++){ put(0,wd,k); k = -1; } goto done; } i = -1; l=0; continue; .globl jget,iget .globl succ .globl create,rewind,putchar,getchar,allocate .globl smark .globl rewcstr,putcstr,getcstr,size / currnet string manipulations / keep a initial fragment handy for quick access /go to allocator for the rest smark: jsr pc,jget clr cstrw jmp succ rewcstr: clr cstrr rts pc putcstr: mov cstrw,r1 inc cstrw cmp r1,$cstrt /is it quick access? bge 1f movb r0,cstrb(r1) /yes, stash the char rts pc 1: bne 1f mov r0,-(sp) /first char to allocator mov symp,r1 bne 2f mov $64 == '/') p1++; argv[1] = p1; for (mp = mtab; mp < &mtab[NMOUNT]; mp++) { p1 = argv[1]; p2 = &mp->spec[0]; while (*p1++ == *p2) if (*p2++ == 0) { for (p1 = mp->file; p1 < &mp->file[NAMSIZ*2];) *p1++ = 0; mp = &mtab[NMOUNT]; while ((--mp)->file[0] == 0); mf = creat("/etc/mtab", 0644); write(mf, mtab, (mp-mtab+1)*2*NAMSIZ); return; } } printf("%s not in mount table\n", argv[1]); }  } l++; } } done: close(file[2]); unlink(name[2]); flsh(0,0); close(file[1]); close(file[0]); ptr[1] = 1; file[1] = open(name[0],0); if(file[1] < 0)err("open tmp "); file[0] = creat(name[1],0666); if(file[0] < 0)err("create tmp"); while((j = nwdval(1)) != 0){ wtot = 0; flg = 0; k = -1; l = 0; m = 1; while(m <= j){ tot = 0; c = wd[k++]*27 + wd[l++]; tot =+ (logtab[tab2[c]]+logtab[tab2[wd[k]*27+wd[l]]]); tot =>> 1; c = c*27 + wd[m++]; tot =- logtab[tab3[c] & 0377],r0 jsr pc,allocate mov r1,symp 2: jsr pc,create mov (sp)+,r0 1: mov symp,r1 jsr pc,putchar rts pc getcstr: mov cstrr,r1 cmp r1,cstrw blt 1f clr r0 /end of string rts pc 1: inc cstrr cmp r1,$cstrt bge 1f movb cstrb(r1),r0 rts pc 1: bne 1f mov symp,r1 jsr pc,rewind 1: mov symp,r1 jsr pc,getchar rts pc size: jsr pc,iget mov cstrw,(r0) jmp succ cstrt = 16 /top of quick access current string .data symp: 0 /pointer to dynamicallly allocated current string cstrw: 0 /current string wry|z; if(tot > wtot) wtot = tot; } if(wtot < 0) wtot = 0; t = conf(wtot,2,number); put(0,number,2); put(0,nwd,j); } flsh(0,0); close(file[1]); close(file[0]); sw = fork(); if(sw == 0){execl("/bin/sort","sort","+0nr", "+1","-o",name[1],name[1] ,0); err("sort"); } if(sw == -1)err("fork"); er = wait(); if(er != sw)err("prob"); sw = fork(); if(sw == 0){ if(npr) { execl("/bin/cat","cat",name[1],0); } else { i = 0 ; while((c = "Possible typo's in "[i++])!=0) ite pointer .bss cstrr: .=.+2 /read pointer cstrb: .=.+cstrt /base of quick access fragment char number[3]; int eflg; char w2006[100]; flg 0; char realwd[100]; char *wd {&realwd[1]}; char *fptr; char *ffptr &ffbuf; char ffbuf[36]; int neng; int npr; int table[2]; /*keep these four cards in order*/ int tab1[26]; int tab2[730]; char tab3[19684]; int logtab[256]; float inctab[256]; char nwd[100]; int tot; int wtot; char *buf[3]; file[3]; ptr[3]; char *name[3]; bsp[768]; main(argc,argv) int argc; char *argv[]; { char let,lt; auto arg,t,sw,i,j,salt,er,c; register k,l,m; double junk; int unl(); i *ffptr++ = c; i = 0; while((c = fptr[i++]) != 0) *ffptr++ = c; *ffptr = 0; execl("/bin/pr","pr","-3", "-h", ffbuf,name[1],0); err("pr"); } } if(sw == -1)err("fork"); er = wait(); if(er != sw)err("prob"); unl(); } unl() { register j; j = 2; while(j--)unlink(name[j]); exit(); } err(c) char c[];{ register j; printf("cannot %s\n",c); unl(); } get(ifile) int ifile;{ static char *ibuf[10]; if(--ptr[ifile]){ return(*ibuf[ifile]++ & 0377);} if(ptr[ifile] = reaint dflag 0; int sflag 0; int cflag 0; int save 0; char code[256]; char squeez[256]; char vect[256]; struct string { int last, max, rep; char *p; } string1, string2; int inbuf[259]; main(argc,argv) char **argv; { int i, j; int c, d; char *compl; extern fout; string1.last = string2.last = 0; string1.max = string2.max = 0; string1.rep = string2.rep = 0; string1.p = string2.p = ""; if(--argc>0) { argv++; if(*argv[0]=='-'&&argv[0][1]!=0) { while(*++argv[0]) switch(*argv[0]) { case 'c'nt ii; double log(), exp(), pow(); nice(-20); inctab[0] = 1; logtab[0] = -10; for(ii=1; ii<256; ii++){ inctab[ii] = exp(-ii/30.497); logtab[ii] = log(30.*pow(1.0333,ii+0.) - 30.) + .5; } logtab[1] = -10; number[2] = ' '; buf[0] = bsp; buf[1] = bsp + 0400; buf[2] = bsp + 01000; ptr[0] = 0; ptr[1] = 0; ptr[2] = 1; arg = 1; while(argc>1 && argv[arg][0] == '-') { switch(argv[arg][1]) { default: printf("Unrecognizable argument: %c\n",argv[arg][1]); exit(); case 0: case 'n': d(file[ifile],buf[ifile],512)){ if(ptr[ifile] < 0)goto prob; ibuf[ifile] = buf[ifile]; return(*ibuf[ifile]++ & 0377); } ptr[ifile] = 1; return(-1); prob: ptr[ifile] = 1; printf("read error\n"); return(-1); } put(ofile,s,optr) char s[]; { register i; while(optr-- >= 0) buf[ofile][(ptr[ofile] < 512)?ptr[ofile]++:flsh(ofile,1)] = *s++; return; } flsh(ofile,i){ register error; error = write(file[ofile],buf[ofile],ptr[ofile]); if(error < 0)goto prob; ptr[ofile] = i; return(0); prob: : cflag++; continue; case 'd': dflag++; continue; case 's': sflag++; continue; } argc--; argv++; } } if(argc>0) string1.p = argv[0]; if(argc>1) string2.p = argv[1]; for(i=0; i<256; i++) code[i] = vect[i] = 0; if(cflag) { while(c = next(&string1)) vect[c&0377] = 1; j = 0; for(i=1; i<256; i++) if(vect[i]==0) vect[j++] = i; vect[j] = 0; compl = vect; } for(i=0; i<256; i++) squeez[i] = 0; for(;;){ if(cflag) c = *compl++; else c =  neng++; break; case '1': npr++; } arg++; --argc; } if(!neng) { salt = open("/usr/lib/salt",0); er = read(salt,table,21200); if(er != 21200)err("read salt"); close(salt); } if((signal(2,1) & 1) != 1) signal(2,unl); name[0] = "/usr/tmp/ttmpa1"; name[1] = "/usr/tmp/ttmpa2"; name[2] = "/usr/tmp/ttmpa3"; while((file[0] = open(name[0],1)) > 0){ close(file[0]); for(j=0; j < 3; j++)name[j][13]++; if(name[0][13] == 'z')err("creat tmp file"); } file[0] = creat(name[0],066printf("write error on t.%d\n",file[ofile]); unl(); } wdval(wfile) int wfile; { static let,wflg; register j; beg: j = -1; if(wflg == 1){wflg = 0; goto st; } while((let = get(wfile)) != '\n'){ st: switch(let){ case -1: return(0); case '%': if(j != -1)break; goto ret; case '-': if((let = get(wfile)) == '\n'){ while((let = get(wfile)) == '\n')if(let == -1)return(0); goto st; } else {wflg = 1; goto ret; } case '\'': if(eflg != 1){ if(j < 1)goto beg; next(&string1); if(c==0) break; d = next(&string2); if(d==0) d = c; code[c&0377] = d; squeez[d&0377] = 1; } while(d = next(&string2)) squeez[d&0377] = 1; squeez[0] = 1; for(i=0;i<256;i++) { if(code[i]==0) code[i] = i; else if(dflag) code[i] = 0; } inbuf[0] = 0; fout = dup(1); close(1); while((c=getc(inbuf)) >=0 ) { if(c == 0) continue; if(c = code[c&0377]&0377) if(!sflag || c!=save || !squeez[c&0377]) putchar(save = c); } flush(); } next(s) struct string *s; { int a,6); fptr = argv[arg]; if(argc == 1) {argc = 2; arg = 0;} while(--argc){ if(arg == 0){ file[2] = 0; }else{ file[2] = open(argv[arg++],0); if(file[2] < 0)err("open input file"); } eflg = 1; while((j = wdval(2)) != 0){ put(0,nwd,j); k = -1; l = 0; m = 1; if(inctab[table[0]] > (junk=rand()/32768.)) table[0]++; while(m <= j){ c = 27*wd[k++] + wd[l++]; if(inctab[tab2[c]] > junk) tab2[c]++; c = 27*c + wd[m++]; if(inctab[tab3[c]] > junk) tab3[c]++; } c =else break; } case '.': if(eflg == 1){ while((let = get(wfile)) != '\n')if(let == -1)return(0); goto beg; } else goto ret; default: eflg = 0; if(let < 'A')goto ret; if(let <= 'Z'){ wd[++j] = let - 0100; nwd[j] = let + ' '; break; } if(let < 'a' || let > 'z')goto ret; wd[++j] = let - 0140; nwd[j] = let; } eflg = 0; } eflg = 1; ret: if(j < 1)goto beg; nwd[++j] = '\n'; wd[j] = 0; return(j); } nwdval(wfile) int wfile;{ register j; regis b, c, n; int base; if(--s->rep > 0) return(s->last); if(s->last < s->max) return(++s->last); if(*s->p=='[') { nextc(s); s->last = a = nextc(s); s->max = 0; switch(nextc(s)) { case '-': b = nextc(s); if(bp++!=']') goto error; s->max = b; return(a); case '*': base = (*s->p=='0')?8:10; n = 0; while((c = *s->p)>='0' && c<'0'+base) { n = base*n + c - '0'; s->p++; } if(*s->p++!=']') goto error; if(n==0) n = 1000; s->rep = n; return(a); default: error: write(1,"Bad string\n",11); exit(); } } return(nextc(s)); } nextc(s) struct string *s; { int c, i, n; c = *s->p++; if(c=='\\') { i = n = 0; while(i<3 && (c = *s->p)>='0' && c<='7') { n = n*8 + c - '0'; i++; s->p++; } if(i>0) c = n; else c = *s->p++; } if(c==0) *--s->p = 0; return(c&0377); } r0 sys read; tapeb; 512. bes phserr cmp r0,$512. bne phserr jsr pc,twrite sub $512.,r2 sbc mss br 3b 3: mov r2,0f beq 3f mov r3,r0 sys 0; 9f .data 9: sys read; tapeb; 0:.. .text bes phserr cmp r0,0b bne phserr jsr pc,twrite 3: mov r3,r0 sys read; tapeb; 512. bes phserr tst r0 bne phserr mov r3,r0 sys close 2: jmp update1 phserr: mov r1,-(sp) mov $name,r1 jsr pc,pstr jsr r5,mesg < -- Phase error\n\0>; .even mov (sp)+,r1 clr time0(r1) / time beq 2b sys close br 2b bitmap:/ tap4 -- dec-tape lod/dmp .data tc: tcx: mt: mtx: <0\0> tboot: mboot: .even .bss dir: . = .+[mdirent*dirsiz] tapeb: map: .=.+4096. emap: ch: .=.+1 flc: .=.+1 flf: .=.+1 fli: .=.+1 flm: .=.+1 flu: .=.+1 flv: .=.+1 flw: .=.+1 .even command:.=.+2 sum: .=.+2 size: .=.+2 nentr: .=.+2 nused: .=.+2 nfree: .=.+2 lused: .=.+2 catlb: .=.+20. narg: .=.+2 rnarg: .=.+2 parg: .=.+2 fio: .=.+2 mss: .=.+2 ndirent:.=.+2 ndentd8:.=.+2 edir: .=.+2 rseeka: . mov $map,r0 1: clr (r0)+ cmp r0,$emap blo 1b mov $dir,r1 1: tst (r1) beq 2f bit $100000,mode(r1) bne 2f tst size1(r1) bne 3f tstb size0(r1) beq 2f 3: jsr pc,setmap 2: add $dirsiz,r1 cmp r1,edir blo 1b rts pc setmap: movb size0(r1),r2 mov size1(r1),r3 add $511.,r3 adc r2 ashc $-9.,r2 mov tapea(r1),r2 1: jsr pc,bitcalc bitb (sp),map(r0) bne maperr bisb (sp)+,map(r0) inc r2 sob r3,1b rts pc bitcalc: mov (sp),-(sp) cmp r2,tapsiz bhis maperr mov r2,r0 bic $!7,r0 mov r0,-(s/ tap2 -- dec-tape lod/dmp pstr: movb (r1)+,r0 beq 1f jsr pc,putc br pstr 1: rts pc mesg: movb (r5)+,r0 beq 1f jsr pc,putc br mesg 1: inc r5 bic $1,r5 rts r5 putc: movb r0,ch mov $1,r0 sys write; ch; 1 rts pc getc: clr r0 sys read; ch; 1 movb ch,r0 rts pc clrdir: mov $dir,r1 mov ndirent,r2 1: jsr pc,clrent sob r2,1b rts pc clrent: mov r1,-(sp) add $dirsiz,(sp) 1: clr (r1)+ cmp r1,(sp) blo 1b tst (sp)+ rts pc rddir: clr sum jsr pc,clrdir clr r0 jsr pc,rseek jsr pc,=.+2 wseeka: .=.+2 tapsiz: .=.+2 name: .=.+32. name1: .=.+32. statb: .=.+40. smdate = 30. p) mov $1,r0 als (sp)+,r0 mov r0,2(sp) mov r2,r0 ash $-3,r0 bic $160000,r0 rts pc maperr: jsr r5,mesg ; .even jmp done usage: jsr pc,bitmap mov $dir,r2 1: tst (r2) beq 2f inc nentr 2: add $dirsiz,r2 cmp r2,edir blo 1b mov ndentd8,r2 inc r2 mov tapsiz,r3 dec r3 sub ndentd8,r3 1: jsr pc,bitcalc bitb (sp)+,map(r0) beq 2f inc nused mov r2,lused br 3f 2: inc nfree tstb flm bne 1f 3: inc r2 sob r3,1b 1: mov nentr,r0 jsr r5,numb; 4 jsr r5,mesg < entries\tread mov tapeb+510.,r0 beq 1f tstb flm beq 1f mov r0,ndirent 1: mov $dir,r1 mov ndirent,r2 1: bit $7,r2 bne 2f jsr pc,tread mov $tapeb,r3 2: mov r1,-(sp) mov r3,-(sp) mov $32.,r0 clr -(sp) 2: add (r3)+,(sp) sob r0,2b bis (sp),sum tst (sp)+ bne 2f mov (sp),r3 tst (r3) beq 2f mov r3,0f jsr pc,9f .data 9: jsr r5,encode; 0:.. rts pc .text add $32.,r3 mov r1,-(sp) add $dirsiz,(sp) tst (r1)+ / namep 9: mov (r3)+,(r1)+ cmp r1,(sp) blo 9b tst (sp)+ 2: mov (sp)+,r3 add $64.,r3 n\0>; .even mov nused,r0 jsr r5,numb; 4 jsr r5,mesg < used\n\0>; .even tstb flm bne 1f mov nfree,r0 jsr r5,numb; 4 jsr r5,mesg < free\n\0>; .even 1: mov lused,r0 jsr r5,numb; 4 jsr r5,mesg < last\n\0>; .even rts pc taboc: tstb flv beq 4f mov mode(r1),r0 mov r0,-(sp) ash $-6,r0 bit $40,r0 jsr pc,pmod mov (sp),r0 ash $-3,r0 bit $200,r0 jsr pc,pmod mov (sp)+,r0 bit $1000,r0 jsr pc,pmod clr r0 bisb uid(r1),r0 jsr r5,numb; 4 clr r0 bisb gid(r1),r0 jsr r5,numb; 4 mov tapea( mov (sp)+,r1 bic $100000,mode(r1) add $dirsiz,r1 sob r2,1b tst sum beq 1f jsr r5,mesg ; .even tstb fli bne 1f jmp done 1: jsr pc,bitmap rts pc wrdir: clr r0 jsr pc,wseek tstb flm bne 1f sys open; tboot; 0 bes 3f br 2f 1: sys open; mboot; 0 bes 3f 2: mov r0,r1 sys read; tapeb; 512. mov r1,r0 sys close mov ndirent,tapeb+510. 3: jsr pc,twrite mov $dir,r1 mov ndirent,r2 1: bit $7,r2 bne 2f mov $256.,r0 mov $tapeb,r3 3: clr (r3)+ sob r0,3b mov $tapeb/ tap3 -- dec-tape lod/dmp gettape: mov $dir,r1 clr -(sp) 1: tst (r1) beq 2f jsr r5,decode; name cmp rnarg,$2 ble 4f mov $name,r2 mov *parg,r3 3: tstb (r3) beq 3f cmpb (r2)+,(r3)+ beq 3b br 2f 3: tstb (r2) beq 4f cmpb (r2),$'/ bne 2f 4: mov r1,-(sp) jsr pc,*(r5) mov (sp)+,r1 inc (sp) 2: add $dirsiz,r1 cmp r1,edir blo 1b tst (sp)+ bne 2f cmp rnarg,$2 ble 2f mov *parg,r1 jsr pc,pstr jsr r5,mesg < not found\n\0>; .even 2: dec narg add $2,parg cmp narg,$2 bgt gettape tst r1),r0 jsr r5,numb; 5 mov size1(r1),r0 jsr r5,numbx; 9. mov r1,-(sp) add $time0,(sp) jsr pc,_localtime mov r0,(sp) mov 10.(r0),r0 jsr r5,numb; 3 mov $'/,r0 jsr pc,putc mov (sp),r0 mov 8.(r0),r0 inc r0 jsr r5,numb; 2 mov $'/,r0 jsr pc,putc mov (sp),r0 mov 6(r0),r0 jsr r5,numb; 2 mov (sp),r0 mov 4(r0),r0 jsr r5,numb; 3 mov $':,r0 jsr pc,putc mov (sp)+,r0 mov 2(r0),r0 jsr r5,numb; 2 mov $' ,r0 jsr pc,putc 4: mov $name,r1 jsr pc,pstr jsr r5,mesg <\n\0> rts pc pmod: beq 1f ,r3 2: mov r3,-(sp) tst (r1) beq 2f mov r3,0f jsr pc,9f .data 9: jsr r5,decode; 0:.. rts pc .text 2: add $32.,r3 mov r1,-(sp) add $dirsiz,(sp) tst (r1)+ 9: mov (r1)+,(r3)+ cmp r1,(sp) blo 9b tst (sp)+ mov (sp)+,r3 clr -(sp) mov $31.,r0 2: sub (r3)+,(sp) sob r0,2b mov (sp)+,(r3)+ dec r2 bit $7,r2 bne 1b jsr pc,twrite tst r2 bne 1b rts pc tread: mov fio,r0 sys read; tapeb; 512. bes trderr cmp r0,$512. bne trderr 1: inc rseeka rts pc trderr: jsr r5,mesg ; .even tstb fli beq 1f mov $tapeb,r0 2: clr (r0)+ cmp r0,$tapeb+512. blo 2b br 1b 1: jmp done twrite: mov fio,r0 sys write; tapeb; 512. bes twrerr cmp r0,$512. bne twrerr inc wseeka rts pc twrerr: jsr r5,mesg ; .even jmp done rseek: mov r0,rseeka mov r0,0f mov fio,r0 sys 0; 9f .data 9: sys seek; 0:..; 3 .text bes seekerr rts pc wseek: mov r0,-(sp) sub wseeka,r0 bge 1f neg r0 1: cmp r0,$25. / longest write seek ble 1f mov (sp),0f beq 2f dec sr pc,numb1 1: mov (sp)+,r0 add $'0,r0 movb r0,(r2)+ rts pc update: jsr pc,bitmap mov $dir,r1 1: tst (r1) beq 2f bit $100000,mode(r1) beq 2f tstb size0(r1) bne 9f tst size1(r1) beq 2f 9: mov ndentd8,-(sp) inc (sp) movb size0(r1),r2 mov size1(r1),r3 add $511.,r3 adc r2 ashc $-9,r2 mov r3,size 3: mov (sp),r2 mov size,r3 4: jsr pc,bitcalc inc r2 bitb (sp)+,map(r0) bne 4f sob r3,4b mov (sp)+,tapea(r1) jsr pc,setmap br 2f 4: inc (sp) br 3b 2: add $dirsiz,r1 cmp r1,edir blo 1err mov r0,r2 2: tst mss bne 3f cmp r3,$512. blo 2f 3: jsr pc,tread mov r2,r0 sys write; tapeb; 512. bes crterr1 cmp r0,$512. bne crterr1 sub r0,r3 sbc mss br 2b 2: mov r3,0f beq 2f jsr pc,tread mov r2,r0 sys 0; 9f .data 9: sys write; tapeb; 0:.. .text bes crterr1 cmp r0,0b bne crterr1 2: mov r2,r0 sys close movb gid(r1),0f+1 movb uid(r1),0f sys 0; 9f .data 9: sys chown; name; 0:.. .text mov time0(r1),r0 mov r1,-(sp) mov time1(r1),r1 / sys 0; 9f .data 9: sys smdate; name .te0f 2: mov fio,r0 sys 0; 9f .data 9: sys seek; 0:..; 3 .text mov fio,r0 sys read; wseeka; 1 1: mov (sp),wseeka mov (sp)+,0f mov fio,r0 sys 0; 9f .data 9: sys seek; 0:..; 3 .text bes seekerr rts pc seekerr: jsr r5,mesg ; .even jmp done verify: movb (r5)+,0f inc r5 tstb flw bne 1f tstb flv beq 2f 1: jsr pc,9f .data 9: jsr r5,mesg 0:; .even rts pc .text mov r1,-(sp) mov $name,r1 jsr pc,pstr mov (sp)+,r1 tstb flw beq 1f jsr r5,mesg < \0> jsr pc,getcb jsr pc,wrdir update1: mov $dir,r1 clr -(sp) mov $-1,-(sp) 1: tst (r1) beq 2f bit $100000,mode(r1) beq 2f cmp tapea(r1),(sp) bhis 2f mov tapea(r1),(sp) mov r1,2(sp) 2: add $dirsiz,r1 cmp r1,edir blo 1b tst (sp)+ mov (sp)+,r1 bne 1f rts pc 1: bic $100000,mode(r1) movb size0(r1),mss mov size1(r1),r2 bne 4f tst mss beq update1 4: jsr r5,decode; name mov tapea(r1),r0 jsr pc,wseek clr r3 sys open; name; 0 bes phserr mov r0,r3 3: tst mss bne 4f cmp r2,$512. blo 3f 4: mov r3,xt mov (sp)+,r1 1: rts pc crterr1: clr r0 mov r1,-(sp) clr r1 / sys smdate; name mov (sp)+,r1 mov r2,r0 sys close crterr: mov $name,r1 jsr pc,pstr jsr r5,mesg < -- create error\n\0>; .even rts pc  cmp r0,$'x bne 3f jsr pc,getc jmp done 3: cmp r0,$'\n beq 3f cmp r0,$'y bne 4f jsr pc,getc cmp r0,$'\n beq 2f 4: jsr pc,getc cmp r0,$'\n bne 4b br 1b 1: jsr r5,mesg <\n\0> 2: tst (r5)+ 3: rts r5 getfiles: cmp narg,$2 bne 1f mov $".\0,name jsr pc,callout 1: cmp narg,$2 ble 1f dec narg mov *parg,r1 add $2,parg mov $name,r2 2: movb (r1)+,(r2)+ bne 2b jsr pc,callout br 1b 1: rts pc expand: sys open; name; 0 bes fserr mov r0,-(sp) 1: mov (sp),r0 sys read; catlb; 16. bes fserr tst r0 beq 1f tst catlb beq 1b mov $name,r0 mov $catlb+2,r1 cmpb (r1),$'. beq 1b 2: tstb (r0)+ bne 2b dec r0 mov r0,-(sp) cmpb -1(r0),$'/ beq 2f movb $'/,(r0)+ 2: movb (r1)+,(r0)+ bne 2b jsr pc,callout clrb *(sp)+ br 1b 1: mov (sp)+,r0 sys close rts pc fserr: mov $name,r1 jsr pc,pstr jsr r5,mesg < -- Cannot open file\n\0>; .even jmp done callout: sys stat; name; statb bes fserr mov statb+4,r0 bic $!60000,r0 beq 1f cmp r0,$40000 beq expand rts pc 1: mov $dir,r1v r0,-(sp) mov r4,r0 add $513.,r0 cmp r0,sp bhis 2f bic $777,r0 cmp r0,0f beq 1f mov r0,0f sys break; 0:.. bes 2f 1: mov (sp)+,r0 rts pc 2: jsr r5,mesg ; .even jmp done  } out[p++] = in[r++]; } stash(p); } } stash(p) { int k; int i; int d; d = t ? 10 : p; for(i=0; i; .even jmp done 4: jsr r5,verify; 'a rts pc jsr r5,encode; name br 2f 3: jsr r5,decode; name1 mov $name,r2 mov $name1,r3 3: cmpb (r2)+,(r3) bne 2b tstb (r3)+ bne 3b tst (sp)+ tstb flu beq 3f cmp time0(r1),statb+32. blo 3f bhi 1f cmp time1(r1),statb+34. bhis 1f 3: jsr r5,verify; 'r rts pc 2: mov statb+4,mode(r1) bis $10/ time -- prints out system times times = 43. cmp (sp),$1 bgt 1f sys exit 1: sys time mov r1,ltbuf jsr pc,execarg sys time sub ltbuf,r1 sys times; ltbuf mov r1,r0 mul $60.,r0 mov r0,ltbuf mov r1,ltbuf+2 jsr r5,mesg; <\nreal\0>; .even mov $ltbuf,r2 jsr r5,ptime jsr r5,mesg; ; .even jsr r5,ptime jsr r5,mesg; ; .even jsr r5,ptime sys exit execarg: sys fork br newproc bec 2f jsr r5,mesg; ; .even sys exit 2: mov r0,r2 sys signal; 2; 1 2: sys wait main() { sync(); } 0000,mode(r1) movb statb+7,uid(r1) movb statb+8,gid(r1) tstb flf beq 2f clrb statb+9. clr statb+10. 2: movb statb+9.,size0(r1) mov statb+10.,size1(r1) mov statb+32.,time0(r1) mov statb+34.,time1(r1) 1: rts pc cmp r0,r2 bne 2b bit $377,r1 beq 1f jsr r5,mesg; ; .even clr r0 sys seek; 0; 2 1: rts pc newproc: tst (sp)+ mov (sp)+,r0 tst (sp)+ mov $ibuf,r1 mov $end,r2 1: mov (sp)+,r3 mov r2,(r1)+ 2: movb (r3)+,(r2)+ bne 2b dec r0 cmp r0,$1 bgt 1b clr (r1)+ mov $end,r1 sys exec; end; ibuf cmp $8,r0 beq rcom mov $end-10.,r0 mov $"x/,(r0)+ mov $"us,(r0)+ mov $"r/,(r0)+ mov $"bi,(r0)+ mov $"n/,(r0)+ mov $end-5,r1 sys exec; end-5; ibuf cmp $8,r0 beq rco/ sum -- check sum file mov (sp)+,r3 tst (sp)+ loop: dec r3 bgt 1f sys exit 1: clr bcnt mov (sp)+,0f sys open; 0:..; 0 bec 3f mov $1,r0 sys write; 1f; 2f-1f br loop 1: 2: .even 3: mov r0,r1 clr r5 1: mov r1,r0 sys read; buf; 512. bes err tst r0 beq print inc bcnt mov $buf,r2 2: movb (r2)+,r4 add r4,r5 adc r5 sob r0,2b br 1b err: mov $1,r0 sys write; 1f; 2 print: jsr pc,decml mov $1,r0 sys write; bl; 1 mov bcnt,r5 jsr pc,decml mov $1,r0 sys write; nl; 1 mov r1,r0/ tap1 -- dec-disk lod/dmp .globl _localtime, _end namep = 0 mode = 2 uid = 4; gid = 5 size0 = 7 size1 = 8 time0 = 10. time1 = 12. tapea = 14. dirsiz = 16. mdirent = 496. mov (sp),rnarg mov (sp)+,narg mov $cmr,command incb flu tst (sp)+ cmp narg,$2 bge 1f mov $2,narg br 3f 1: mov (sp)+,r0 mov sp,parg 1: movb (r0)+,r1 beq 3f mov $swtab,r2 2: cmp r1,(r2)+ beq 2f tst (r2)+ bne 2b br useerr 2: jsr pc,*(r2)+ br 1b 3: jsr pc,optap mov $_end,r4 / string pointer jsr pc,setb jmp *command m mov $end-9,r1 sys exec; end-9.; ibuf cmp $8,r0 bne 1f rcom: mov r1,ibuf mov $shname+5,ibuf-2 sys exec ; shname ; ibuf-2 1: jsr r5,mesg; ; .even clr r0 sys seek; 0; 2 sys exit printd: mov $tbuf+4,r4 jsr r5,tdiv; 10. jsr r5,tdiv; 10. jsr r5,tdiv; 10. jsr r5,tdiv; 10. 1: cmpb (r4),$'0 bne 1f movb $' ,(r4)+ cmp r4,$tbuf+3 bne 1b 1: mov $2,r0 sys write; tbuf; 4 rts pc ptime: mov (r2)+,r0 mov (r2)+,r1 div $3600.,r0 mov r0,-(sp) clr r0 div $60.,r0 mov r1,c sys close br loop 1: nl: <\n> bl: < > .even decml: mov r0,-(sp) mov r1,-(sp) mov r5,r1 jsr pc,1f mov (sp)+,r1 mov (sp)+,r0 rts pc 1: clr r0 dvd $10.,r0 mov r1,-(sp) mov r0,r1 beq 1f jsr pc,1b 1: mov (sp)+,ch add $'0,ch mov $1,r0 sys write; ch; 1 rts pc .bss ch: .=.+2 bcnt: .=.+2 buf: .=.+512. optap: tstb flm bne 2f mov $578.,tapsiz mov $192.,ndirent sys open; tc; 2 br 3f 2: mov $-1,tapsiz mov $mdirent,ndirent cmp command,$cmr beq 2f sys open; mt; 0 br 3f 2: sys open; mt; 1 3: bes 1f mov r0,fio mov ndirent,r1 ash $-3,r1 mov r1,ndentd8 mov ndirent,r1 mul $dirsiz,r1 add $dir,r1 mov r1,edir rts pc 1: jsr r5,mesg ; .even jmp done setcom: cmp command,$cmr bne useerr mov (r5)+,command rts r5 noflag: mov (r5)+,r0 beq 1f tstb (r0) beq noflag br ulicks mov $tbuf+9.,r4 jsr r5,tdiv; 10. jsr r5,tdiv; 6. movb $':,-(r4) mov (sp)+,r0 jsr r5,tdiv; 10. jsr r5,tdiv; 6. movb $':,-(r4) jsr r5,tdiv; 10. jsr r5,tdiv; 10. jsr r5,tdiv; 10. 1: cmpb (r4),$'0 beq 2f cmpb (r4),$': bne 1f 2: movb $' ,(r4)+ cmp r4,$tbuf+8. bne 1b 1: mov $2,r0 sys write; tbuf; 9. jsr r5,mesg; <.\0>; .even mov clicks,r1 clr r0 div $6,r0 add $'0,r0 mov r0,ch mov $2,r0 sys write; ch; 1 jsr r5,mesg; <\n\0>; .even rts r5 tdiv: mov r1,-(sp) mov r0,r1 clr r0 d/* su -- become super-user */ char password[100]; char pwbuf[100]; int ttybuf[3]; main() { register char *p, *q; extern fin; if(getpw(0, pwbuf)) goto badpw; (&fin)[1] = 0; p = pwbuf; while(*p != ':') if(*p++ == '\0') goto badpw; if(*++p == ':') goto ok; gtty(0, ttybuf); ttybuf[2] =& ~010; stty(0, ttybuf); printf("password: "); q = password; while((*q = getchar()) != '\n') if(*q++ == '\0') return; *q = '\0'; ttybuf[2] =| 010; stty(0, ttybuf); printf("\n"); q = crypt(passwordseerr 1: rts r5 useerr: jsr r5,mesg ; .even jmp done swtab: '0; dcof '1; dcof '2; dcof '3; dcof '4; dcof '5; dcof '6; dcof '7; dcof 'c; dcc 'd; dcd 'f; dcf 'i; dci 'm; dcm 'r; dcr 't; dct 'u; dcu 'v; dcv 'w; dcw 'x; dcx 0; 0 dcof: movb r1,tcx movb r1,mtx rts pc dcc: incb flc rts pc dcf: incb flf rts pc dcd: jsr r5,setcom; cmd rts pc dci: incb fli rts pc dcm: incb flm rts pc dcu: incb flu jsr r5,setcom; cmr rts pc dcr: clrb flu jsr r5,setcoiv (r5)+,r0 add $'0,r1 movb r1,-(r4) mov (sp)+,r1 rts r5 mesg: movb (r5)+,ch beq 2f mov $2,r0 sys write; ch; 1 br mesg 2: inc r5 bic $1,r5 rts r5 ch: .=.+1 .even .bss clicks: .=.+2 .=.+2 ibuf: .=.+50. tbuf: .=.+10. ltbuf: .=.+16. end: .=.+1000. .data shname: .even ); while(*q++ == *p++); if(*--q == '\0' && *--p == ':') goto ok; goto error; badpw: printf("bad password file\n"); ok: setuid(0); execl("/bin/sh", "-", 0); printf("cannot execute shell\n"); error: printf("sorry\n"); } m; cmr rts pc dct: jsr r5,setcom; cmt rts pc dcv: incb flv rts pc dcw: incb flw rts pc dcx: jsr r5,setcom; cmx rts pc cmd: jsr r5,noflag; flm; flc; flf; 0 cmp narg,$2 bgt 1f jmp useerr 1: jsr pc,rddir jsr r5,gettape; delete jsr pc,wrdir br check cmr: jsr r5,noflag; 0 tstb flc bne 1f tstb flm bne 1f jsr pc,rddir br 2f 1: jsr pc,clrdir 2: jsr pc,getfiles jsr pc,update br check cmt: jsr r5,noflag; flc; flf; flw; 0 jsr pc,rddir tstb flv beq 1f jsr r5,mesg < mode uidf = r5 i = r3 .globl x,k .globl ktab,ktat .globl putcall,obuild .globl errcom,succ,generate .globl rewcstr,getcstr .globl scopy scopy: mov $2f+1,r0 jsr pc,putcall jsr pc,rewcstr mov k(f),r2 neg r2 add $2,r2 1: jsr pc,getcstr tst r0 beq 1f movb r0,ktab(r2) inc r2 cmp r2,$ktat blt 1b jsr r0,errcom ;.even 1: clrb ktab(r2) bic $1,r2 neg r2 mov r2,k(f) jmp succ 2: mov i,r0 jsr pc,obuild jmp generate # /* * set teletype modes */ /* * tty flags */ #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 ANYP 0300 /* * Delay algorithms */ #define CR0 0 #define CR1 010000 #define CR2 020000 #define CR3 030000 #define NL0 0 #define NL1 000400 #define NL2 001000 #define NL3 001400 #define TAB0 0 #define TAB1 002000 #define TAB2 004000 #define TAB3 006000 #define FF0 0 #define FF1 040000 #define BS0 0 #define BS1 gid tapa size date time name\n\0>; .even 1: jsr r5,gettape; taboc br check1 cmx: jsr r5,noflag; flc; flf; 0 jsr pc,rddir jsr r5,gettape; xtract br done check: check1: jsr pc,usage done: jsr r5,mesg ; .even sys exit encode: mov r2,-(sp) mov r4,(r1) mov (r5)+,r2 1: movb (r2),(r4)+ jsr pc,setb tstb (r2)+ bne 1b mov (sp)+,r2 rts r5 decode: mov r2,-(sp) mov r1,-(sp) mov (r1),r1 mov (r5)+,r2 1: movb (r1)+,(r2)+ bne 1b mov (sp)+,r1 mov (sp)+,r2 rts r5 setb: moint open[9] { 1 }; int n 1; int t 0; char in[512]; char out[512]; main(argc,argv) char **argv; { int register r,w,p; struct { int x1[2], type, x2[15]; } buf; fstat(1,&buf); t = (buf.type&060000)==020000; while(argc-->1) { open[n++] = creat(argv[1],0666); if(stat(argv[1],&buf)>=0) if((buf.type&060000)==020000) t++; argv++; } r = w = 0; for(;;) { for(p=0;p<512;) { if(r>=w) { if(t>0&&p>0) break; w = read(0,in,512); r = 0; if(w<=0) { stash(p); return; } 0100000 #define ALL 0177400 struct { char *string; int speed; } speeds[] { "0", (0<<8)|0, "50", (1<<8)|1, "75", (2<<8)|2, "110", (3<<8)|3, "134", (4<<8)|4, "134.5",(4<<8)|4, "150", (5<<8)|5, "200", (6<<8)|6, "300", (7<<8)|7, "600", (8<<8)|8, "1200", (9<<8)|9, "1800", (10<<8)|10, "2400", (11<<8)|11, "4800", (12<<8)|12, "9600", (13<<8)|13, "exta", (14<<8)|14, "extb", (15<<8)|15, 0, }; struct { char *string; int set; int reset; } modes[] { "even", EVENP, 0, "-even", 0, EVENP, "odd", ODDP, 0, "-odd", 0, ODDP, "raw", RAW, 0, "-raw", 0, RAW, "cooked", 0, RAW, "-nl", CRMOD, 0, "nl", 0, CRMOD, "echo", ECHO, 0, "-echo", 0, ECHO, "LCASE", LCASE, 0, "lcase", LCASE, 0, "-LCASE", 0, LCASE, "-lcase", 0, LCASE, "-tabs", XTABS, 0, "tabs", 0, XTABS, "hup", HUPCL, 0, "-hup", 0, HUPCL, "cr0", CR0, CR3, "cr1", CR1, CR3, "cr2", CR2, CR3, "cr3", CR3, CR3, "tab0", TAB0, TAB3, "tab1", TAB1, TAB3, "tab2", TAB2, TAB3, "tab3", TAB3, 0 / same mode as before bec 1f jsr r5,mesg; ; .even jmp unloop 1: mov r0,fo sys open; s.tmp; 0 bec 1f jsr r5,mesg; ; .even sys exit 1: mov r0,fi 1: mov fi,r0 sys read; buf; 512. mov r0,0f beq 1f mov fo,r0 sys write; buf; 0:.. br 1b 1: mov fi,r0 sys close mov fo,r0 sys close jmp unloop mesg: movb (r5)+,ch beq 1f mov $1,r0 sys write; ch; 1 br mesg 1: inc r5 bic $1,r5 mov r4,r1 1: movb (r1)+,ch beq 1f mov $1,r0 sys write; ch; #define L 512 #define N 7 #define C 20 #define MEM (16*2048) #define NF 10 int ibuf[259]; int obuf[259]; char *file; char *filep; int nfiles; int nlines; int ntext; int *lspace; char *tspace; int cmp(); int term(); int mflg; char *outfil; char tabchar; int eargc; char **eargv; char fold[128] { 0000,0001,0002,0003,0004,0005,0006,0007, 0010,0011,0012,0013,0014,0015,0016,0017, 0020,0021,0022,0023,0024,0025,0026,0027, 0030,0031,0032,0033,0034,0035,0036,0037, 0040,0041,0042,0043,0044,0045,0046,0047, 00 TAB3, "nl0", NL0, NL3, "nl1", NL1, NL3, "nl2", NL2, NL3, "nl3", NL3, NL3, "ff0", FF0, FF1, "ff1", FF1, FF1, "bs0", BS0, BS1, "bs1", BS1, BS1, "33", CR1, ALL, "tty33", CR1, ALL, "37", FF1+CR2+TAB1+NL1, ALL, "tty37", FF1+CR2+TAB1+NL1, ALL, "05", NL2, ALL, "vt05", NL2, ALL, "tn", CR1, ALL, "tn300", CR1, ALL, "ti", CR2, ALL, "ti700", CR2, ALL, "tek", FF1, ALL, 0, }; char *arg; int mode[3]; struct { char lobyte, hibyte; }; main(argc, argv) char *arg1 br 1b 1: mov $1,r0 sys write; qnl; 1 rts r5 s.tmp: qnl: <\n> .even magic: 407 magic1: 410 magic2: 411 .bss fi: .=.+2 fo: .=.+2 argc: .=.+2 buf: .=.+512. ch: .=.+2 50,0051,0052,0053,0054,0055,0056,0057, 0060,0061,0062,0063,0064,0065,0066,0067, 0070,0071,0072,0073,0074,0075,0076,0077, 0100,0101,0102,0103,0104,0105,0106,0107, 0110,0111,0112,0113,0114,0115,0116,0117, 0120,0121,0122,0123,0124,0125,0126,0127, 0130,0131,0132,0133,0134,0134,0136,0137, 0140,0101,0102,0103,0104,0105,0106,0107, 0110,0111,0112,0113,0114,0115,0116,0117, 0120,0121,0122,0123,0124,0125,0126,0127, 0130,0131,0132,0173,0174,0175,0176,0177 }; char nofold[128]; char dict[128] { 1,1,1,1,1,1,1,1v[]; { int i; gtty(1, mode); if(argc == 1) { prmodes(); exit(0); } while(--argc > 0) { arg = *++argv; if (eq("ek")) mode[1] = '#@'; if (eq("erase")) { mode[1].lobyte = **++argv; argc--; } if (eq("kill")) { mode[1].hibyte = **++argv; argc--; } for(i=0; speeds[i].string; i++) if(eq(speeds[i].string)) mode[0] = speeds[i].speed; for(i=0; modes[i].string; i++) if(eq(modes[i].string)) { mode[2] =& ~modes[i].reset; mode[2] =| modes[i].set; } if(arg) int count 1000; int fnumber; int ibuf[259]; int obuf[259]; char fname[100]; char *ifil; char *ofil; main(argc, argv) char *argv[]; { register i, c, f; for(i=1; i 0) { if(**++argv == '-') for(arg = *argv;;) { switch(*++arg) { case '\0': if(arg[-1] == '-') eargv[eargc++] = "-"; break; case 'm': mflg++; continue; case 'o': if(--argc > 0) outfil = *++argv; continue; default: field(++*argv,1); break; } break; } else if (**argv == '+') { ]; if(m & 0200) printf("even "); if(m & 0100) printf("odd "); if(m & 040) printf("raw "); if(m & 020) printf("-nl "); if(m & 010) printf("echo "); if(m & 04) printf("lcase "); if(m & 02) printf("-tabs "); if(m & 01) printf("hup "); delay(m>>8, "nl"); delay(m>>10, "tab"); delay(m>>12, "cr"); delay((m>>14)&1, "ff"); delay((m>>15)&1, "bs"); printf("\n"); } delay(m, s) char *s; { if(m =& 3) printf("%s%d ", s, m); } int speed[] { 0,50,75,110,134,150,200,300,600,1200,1800,2400,4800,9600,0,0 } } while(c != '\n'); fflush(obuf); close(obuf[0]); goto loop; } number(str) char *str; { register n; register char *s; n = 0; for(s = str; *s; s++) if(*s>='0' && *s<='9') n = n*10 + *s-'0'; return(n); }  if(++nfields>=NF) { mess("Too many keys\n"); exit(1); } copyproto(); field(++*argv,0); } else eargv[eargc++] = *argv; } q = &fields[0]; for(a=1; a<=nfields; a++) { p = &fields[a]; for(i=0; i<5; i++) /*sensitive to sizeof(proto)*/ if(p[i] != proto[i]) goto next; for(i=0; i<5; i++) p[i] = q[i]; next: ; } if(eargc == 0) eargv[eargc++] = "-"; a = MEM; i = lspace = sbrk(0); while(brk(a) == -1) a =- 512; brk(a =- 512); /* for recursion */ a =- i; nlines = ((a; prspeed(c, s) { printf("%s%d baud\n", c, speed[s]); } putchar(c) { write(2, &c, 1); } .globl getword .globl putword .globl lookword .globl alterword .globl alterchar .globl putchar .globl lookchar .globl w, r, a, l / / routine to put a word onto the string / mov ...,r1 / mov ...,r0 / jsr pc,putword putword: jsr pc,putchar swab r0 jsr pc,putchar swab r0 rts pc / / / routine to look at a word from the string / mov ...,r1 / jsr pc,lookword / mov r0,... lookword: jsr pc,lookchar bes 1f movb r0,nchar inc r(r1) jsr pc,lookchar bes 1f movb r0,nchar+1 dec r(r1) mov nchar,r0 1: rts pc /-L)>>1) & 077777; nlines =/ 5; ntext = nlines*8; tspace = lspace+nlines; file = "/usr/tmp/stmXaa"; loop: filep = file; while(*filep != 'X') filep++; for(*filep = 'a';;(*filep)++) { if(stat(file, lspace) < 0) { a = creat(file, 0600); if(a >= 0) break; } if(*filep == 'z') { if(file[1] != 't') { file = "/tmp/stmXaa"; goto loop; } mess("Cannot locate temp\n"); exit(1); } } close(a); filep++; if ((signal(2, 1) & 01) == 0) signal(2, term); nfiles = eargc; if(/ strip -- strip relocation and symbols mov (sp)+,argc tst (sp)+ br loop unloop: sys unlink; s.tmp loop: dec argc bgt 1f sys exit 1: mov (sp)+,r4 mov r4,0f sys open; 0:..; 0 bec 1f jsr r5,mesg; ; .even br loop 1: mov r0,fi mov $'a,r1 1: movb r1,s.tmp+8 sys stat; s.tmp; buf bec 2f sys creat; s.tmp; 400 bec 1f 2: inc r1 cmp r1,$'z blos 1b jsr r5,mesg; ; .even sys exit 1: mov r0,fo clr buf mov fi,r0 sys read; buf; 512. mov r0,r3 cmp / / routine to get a word from the strng / getword: jsr pc,lookword bes 1f add $2,r(r1) 1: rts pc / / / routine to alter a word in the string / alterword: jsr pc,alterchar swab r0 jsr pc,alterchar swab r0 rts pc nchar: .=.+2 !mflg) { ibuf[0] = -1; sort(); close(0); } for(a = mflg?0:eargc; a+N < nfiles; a=+N) { newfile(); merge(a, a+N); } if(a != nfiles) { oldfile(); merge(a, nfiles); } error = 0; term(); } sort() { register char *cp; register *lp, c; int done; int i; int f; done = 0; i = 0; do { cp = tspace; lp = lspace; while(lp < lspace+nlines && cp < tspace+ntext) { *lp++ = cp; while((*cp++ = c = getc(ibuf)) != '\n') { if(c >= 0) continue; cp--; close(ibuf[0]); if(i  buf,magic beq 1f cmp buf,magic1 beq 1f cmp buf,magic2 beq 1f jsr r5,mesg; ; .even br unloop 1: mov buf+2,r2 add buf+4,r2 add $20,r2 clr r1 clr buf+10 mov $1,buf+16 / no reloc bits flag 1: mov r2,0f sub r1,0f cmp 0f,r3 blos 2f mov r3,0f 2: mov fo,r0 sys write; buf; 0:.. add 0b,r1 cmp r1,r2 bhis 1f mov fi,r0 sys read; buf; 512. mov r0,r3 bne 1b jsr r5,mesg; ; .even 1: mov fo,r0 sys close mov fi,r0 sys close mov r4,0f sys creat; 0:..;< eargc) { if((f = setfil(i++)) == 0) ibuf[0] = 0; else if(fopen(f, ibuf) < 0) cant(f); } else break; } if(c < 0) { done++; lp--; break; } } qsort(lspace, lp-lspace, 2, cmp); if(done == 0 || nfiles != eargc) newfile(); else oldfile(); while(lp > lspace) { cp = *--lp; do putc(*cp, obuf); while(*cp++ != '\n'); } fflush(obuf); close(obuf[0]); } while(done == 0); } struct merg { char l[L]; int b[259]; }; merge(a, b) { register struct merg *p; register char *cp; register i; struct { int *ip;}; int f; int j; p = lspace; j = 0; for(i=a; ib[0] = dup(0); else if(fopen(f, p->b) < 0) cant(f); ibuf[j] = p; if(!rline(p)) j++; p++; } i = j; qsort(ibuf, i, 2, cmp); if(i > 0) for(;;) { cp = ibuf[i-1]; do putc(*cp, obuf); while(*cp++ != '\n'); if(rline(ibuf[i-1])) { i--; if(i == 0) break; } cp = &ibuf[i]; while (--cp.ip > ibuf && cmp(cp.ip,ields[nfields]; for(i=0; icode = nofold; break; case 'b': p->bflg++; break; case 'd': p->ignore = dict; break; case 'n': p->nflg++; break; case 't': tabchar = *++s; if(tabchar == 0) s--; break; case 'r': p->rflg = -1; break; default: p->m[k] = number(&s); if(*; char *args[ARGSIZ]; int trebuf[TRESIZ]; main(c, av) int c; char **av; { register f; register char *acname, **v; for(f=2; f<15; f++) close(f); if((f=dup(1)) != 2) close(f); dolc = getpid(); for(f=4; f>=0; f--) { dolc = ldiv(0, dolc, 10); pidp[f] = ldivr+'0'; } v = av; acname = "/usr/adm/sha"; promp = "% "; if(((uid = getuid())&0377) == 0) promp = "# "; acctf = open(acname, 1); if(c > 1) { promp = 0; if (*v[1]=='-') { **v = '-'; if (v[1][1]=='c' && c>2) arginp = v[2];  cp.ip-1) < 0) { p = *cp.ip; *cp.ip = *(cp.ip-1); *(cp.ip-1) = p; } } p = lspace; for(i=a; ib[0]); p++; if(i >= eargc) close(creat(setfil(i))); } fflush(obuf); close(obuf[0]); } rline(mp) struct merg *mp; { register char *cp; register *bp, c; bp = mp->b; cp = mp->l; do { c = getc(bp); if(c < 0) return(1); *cp++ = c; } while(c != '\n'); return(0); } newfile() { if(fcreat(setfil(nfiles), obuf) < 0) { mess("Can't create temp\n"); term(); }s == '.') s++; p->n[k] = number(&s); s--; } } } number(ppa) char **ppa; { int n; register char *pa; pa = *ppa; n = 0; while(digit(*pa)) n = n*10 + *pa++ - '0'; *ppa = pa; return(n); } blank(c) { if(c==' ' || c=='\t') return(1); return(0); }  else if (v[1][1]=='t') onelflg = 2; } else { close(0); f = open(v[1], 0); if(f < 0) { prs(v[1]); err(": cannot open"); } } } if(**v == '-') { setintr++; signal(QUIT, 1); signal(INTR, 1); } dolv = v+1; dolc = c-1; loop: if(promp != 0) prs(promp); peekc = getc(); main1(); goto loop; } main1() { register char c, *cp; register *t; argp = args; eargp = args+ARGSIZ-5; linep = line; elinep = line+LINSIZ-5; error = 0; gflg = 0; do { cp = linep; word(); nfiles++; } char * setfil(i) { if(i < eargc) if(eargv[i][0] == '-' && eargv[i][1] == '\0') return(0); else return(eargv[i]); i =- eargc; filep[0] = i/26 + 'a'; filep[1] = i%26 + 'a'; return(file); } oldfile() { if(outfil) { if(fcreat(outfil, obuf) < 0) { mess("Can't create output\n"); term(); } } else obuf[0] = 1; } cant(f) { mess("Can't open "); mess(f); mess("\n"); term(); } term() { register i; if(nfiles == eargc) nfiles++; for(i=eargc; i'9') { printf("bad character\n"); exit(); } n = n*10 + c - '0'; } sleep(n); }  } while(*cp != '\n'); treep = trebuf; treeend = &trebuf[TRESIZ]; if(gflg == 0) { if(error == 0) { setexit(); if (error) return; t = syntax(args, argp); } if(error != 0) err("syntax error"); else execute(t); } } word() { register char c, c1; *argp++ = linep; loop: switch(c = getc()) { case ' ': case '\t': goto loop; case '\'': case '"': c1 = c; while((c=readc()) != c1) { if(c == '\n') { error++; peekc = c; return; } *linep++ = c|QUOTE; }nk(setfil(i)); exit(error); } cmp(i, j) int *i, *j; { register char *pa, *pb; char *code, *ignore; int a, b; int k; char *la, *lb; register int sa; int sb; char *ipa, *ipb, *jpa, *jpb; struct field *fp; for(k = nfields>0; k<=nfields; k++) { fp = &fields[k]; pa = *i; pb = *j; if(k) { la = skip(pa, fp, 1); pa = skip(pa, fp, 0); lb = skip(pb, fp, 1); pb = skip(pb, fp, 0); } else { la = -1; lb = -1; } if(fp->nflg) { while(blank(*pa)) pa++; while(blank(*pb))/* size -- determine object size */ main(argc, argv) char **argv; { int buf[010], f, ac, sum; ac = argc; if (ac==1) { *argv = "a.out"; ac++; --argv; } while(--ac) { ++argv; if((f=open(*argv, 0))<0) { printf("%s not found\n", *argv); continue; } read(f, buf, 0020); if(buf[0]!=0411 && buf[0]!=0410 && buf[0]!=0407) { printf("Bad format: %s\n", *argv); close(f); continue; } if (argc>2) printf("%s: ", *argv); printf("%l+%l+%l=", buf[1],buf[2],buf[3]); sum = buf[ goto pack; case '&': case ';': case '<': case '>': case '(': case ')': case '|': case '^': case '\n': *linep++ = c; *linep++ = '\0'; return; } peekc = c; pack: for(;;) { c = getc(); if(any(c, " '\"\t;&<>()|^\n")) { peekc = c; if(any(c, "\"'")) goto loop; *linep++ = '\0'; return; } *linep++ = c; } } tree(n) int n; { register *t; t = treep; treep =+ n; if (treep>treeend) { prs("Command line overflow\n"); error++; reset(); } return(t); } getc() {  pb++; sa = sb = fp->rflg; if(*pa == '-') { pa++; sa = -sa; } if(*pb == '-') { pb++; sb = -sb; } if(sa != sb) sa = 0; for(ipa = pa; ipa pa && ipb > pb) if(b = *--ipb - *--ipa) a = b; while(ipa > pa) if(*--ipa != '0') return(sa ? -sa : sb); while(ipb > pb) if(*--ipb != '0') return(sa ? sa : sb); if(a1]+buf[2]+buf[3]; printf("%l (%o)\n", sum, sum); close(f); } }  register char c; if(peekc) { c = peekc; peekc = 0; return(c); } if(argp > eargp) { argp =- 10; while((c=getc()) != '\n'); argp =+ 10; err("Too many args"); gflg++; return(c); } if(linep > elinep) { linep =- 10; while((c=getc()) != '\n'); linep =+ 10; err("Too many characters"); gflg++; return(c); } getd: if(dolp) { c = *dolp++; if(c != '\0') return(c); dolp = 0; } c = readc(); if(c == '\\') { c = readc(); if(c == '\n') return(' '); return(c|QUOTE);) return(a*sa); if(*(pa=jpa) == '.') pa++; if(*(pb=jpb) == '.') pb++; while(pacode; ignore = fp->ignore; loop: while(*pa<0 || ignore[*pa]) pa++; while(*pb<0 || ignore[*pb]) pb++; if(pa>=la || *pa=='\n') if(pb } if(c == '$') { c = readc(); if(c>='0' && c<='9') { if(c-'0' < dolc) dolp = dolv[c-'0']; goto getd; } if(c == '$') { dolp = pidp; goto getd; } } return(c&0177); } readc() { char cc; register c; if (arginp) { if (arginp == 1) exit(); if ((c = *arginp++) == 0) { arginp = 1; c = '\n'; } return(c); } if (onelflg==1) exit(); if(read(0, &cc, 1) != 1) exit(); if (cc=='\n' && onelflg) onelflg--; return(cc); } /* * syntax * empty * syn1 */ syntaxrflg); else continue; if(pb>=lb || *pb=='\n') return(-fp->rflg); if((sa = code[*pb++]-code[*pa++]) == 0) goto loop; return(sa*fp->rflg); } pa = *i; pb = *j; while(*pa != '\n') { if(*pa == *pb) { pa++; pb++; continue; } if(*pb == '\n') return(-1); return(*pb - *pa); } return(*pb != '\n'); } skip(pp, fp, j) struct field *fp; char *pp; { register i; register char *p; p = pp; if( (i=fp->m[j]) < 0) return(-1); while(i-- > 0) { i# /* */ #define INTR 2 #define QUIT 3 #define LINSIZ 1000 #define ARGSIZ 50 #define TRESIZ 100 #define QUOTE 0200 #define FAND 1 #define FCAT 2 #define FPIN 4 #define FPOU 8 #define FPAR 16 #define FINT 32 #define FPRS 64 #define TCOM 1 #define TPAR 2 #define TFIL 3 #define TLST 4 #define DTYP 0 #define DLEF 1 #define DRIT 2 #define DFLG 3 #define DSPR 4 #define DCOM 5 #define ENOMEM 12 #define ENOEXEC 8 char *dolp; char pidp[6]; int ldivr; char **dolv; int dolc; char *promp; char *linep; char *elinep; (p1, p2) char **p1, **p2; { while(p1 != p2) { if(any(**p1, ";&\n")) p1++; else return(syn1(p1, p2)); } return(0); } /* * syn1 * syn2 * syn2 & syntax * syn2 ; syntax */ syn1(p1, p2) char **p1, **p2; { register char **p; register *t, *t1; int l; l = 0; for(p=p1; p!=p2; p++) switch(**p) { case '(': l++; continue; case ')': l--; if(l < 0) error++; continue; case '&': case ';': case '\n': if(l == 0) { l = **p; t = tree(4); t[DTYP] = TLST; t[DLEF] = synf(tabchar != 0) { while(*p != tabchar) if(*p != '\n') p++; else goto ret; p++; } else { while(blank(*p)) p++; while(!blank(*p)) if(*p != '\n') p++; else goto ret; } } if(fp->bflg) while(blank(*p)) p++; i = fp->n[j]; while(i-- > 0) { if(*p != '\n') p++; else goto ret; } ret: return(p); } digit(c) { return(c <= '9' && c >= '0'); } mess(s) char *s; { while(*s) write(2, s++, 1); } copyproto() { register int i, *p, *q; p = proto; q = &fchar **argp; char **eargp; int *treep; int *treeend; char peekc; char gflg; char error; char acctf; char uid; char setintr; char *arginp; int onelflg; char *mesg[] { 0, "Hangup", 0, "Quit", "Illegal instruction", "Trace/BPT trap", "IOT trap", "EMT trap", "Floating exception", "Killed", "Bus error", "Memory fault", "Bad system call", 0, "Sig 14", "Sig 15", "Sig 16", "Sig 17", "Sig 18", "Sig 19", }; struct stime { int proct[2]; int cputim[2]; int systim[2]; } timeb; char line[LINSIZ]2(p1, p); t[DFLG] = 0; if(l == '&') { t1 = t[DLEF]; t1[DFLG] =| FAND|FPRS|FINT; } t[DRIT] = syntax(p+1, p2); return(t); } } if(l == 0) return(syn2(p1, p2)); error++; } /* * syn2 * syn3 * syn3 | syn2 */ syn2(p1, p2) char **p1, **p2; { register char **p; register int l, *t; l = 0; for(p=p1; p!=p2; p++) switch(**p) { case '(': l++; continue; case ')': l--; continue; case '|': case '^': if(l == 0) { t = tree(4); t[DTYP] = TFIL; t[DLEF] = syn3(p1, p); t[DRIT] = syn2(p+1, p2); t[DFLG] = 0; return(t); } } return(syn3(p1, p2)); } /* * syn3 * ( syn1 ) [ < in ] [ > out ] * word word* [ < in ] [ > out ] */ syn3(p1, p2) char **p1, **p2; { register char **p; char **lp, **rp; register *t; int n, l, i, o, c, flg; flg = 0; if(**p2 == ')') flg =| FPAR; lp = 0; rp = 0; i = 0; o = 0; n = 0; l = 0; for(p=p1; p!=p2; p++) switch(c = **p) { case '(': if(l == 0) { if(lp != 0) error++; lp = p+1; } l++; continueRS)); execute(t1, pf1, pv); t1 = t[DRIT]; t1[DFLG] =| FPIN | (f&(FPOU|FINT|FAND|FPRS)); execute(t1, pv, pf2); return; case TLST: f = t[DFLG]&FINT; if(t1 = t[DLEF]) t1[DFLG] =| f; execute(t1); if(t1 = t[DRIT]) t1[DFLG] =| f; execute(t1); return; } } texec(f, at) int *at; { extern errno; register int *t; t = at; execv(f, t+DCOM); if (errno==ENOEXEC) { if (*linep) t[DCOM] = linep; t[DSPR] = "/bin/sh"; execv(t[DSPR], t+DSPR); prs("No shell!\n"); exit(); } if case 't': tflg++; break; case 's': sflg++; aflg++; break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': thres = argv[0][i]-'0'; break; case 'v': vflg++; break; case 'u': uflg++; break; case 'm': mflg++; break; } } fout = dup(1); if (argc<2) acct("/usr/adm/sha"); else while (--argc) acct(*++argv); if (uflg) { flush(); return; } /* * cleanup pass * put junk togethe; case ')': l--; if(l == 0) rp = p; continue; case '>': p++; if(p!=p2 && **p=='>') flg =| FCAT; else p--; case '<': if(l == 0) { p++; if(p == p2) { error++; p--; } if(any(**p, "<>(")) error++; if(c == '<') { if(i != 0) error++; i = *p; continue; } if(o != 0) error++; o = *p; } continue; default: if(l == 0) p1[n++] = *p; } if(lp != 0) { if(n != 0) error++; t = tree(5); t[DTYP] = TPAR; t[DSPR] = syn1(lp (errno==ENOMEM) { prs(t[DCOM]); err(": too large"); exit(); } } err(s) char *s; { prs(s); prs("\n"); if(promp == 0) { seek(0, 0, 2); exit(); } } prs(as) char *as; { register char *s; s = as; while(*s) putc(*s++); } putc(c) { write(2, &c, 1); } prn(n) int n; { register a; if(a=ldiv(0,n,10)) prn(a); putc(lrem(0,n,10)+'0'); } any(c, as) int c; char *as; { register char *s; s = as; while(*s) if(*s++ == c) return(1); return(0); } equal(as1, as2) char *as1, *as2; { r */ if (vflg) strip(); if(!aflg) for (i=0; i= 0) { seek(i, 0, 2); goto f1; } } i = creat(t[DRIT], 0666); if(i < 0) { prs(t[DRIT]); err(": cannot create" , m; { if(jflg) printf("%9.2f", a/(n*60.)); else printf("%9.2f", a/3600.); if(cflg) { if(a == m) printf("%7s", ""); else printf("%6.2f%%", 100.*a/m); } } acct(f) char *f; { int ff, i, j; float x; struct ftab fbuf; register char *cp; register int c; extern double ltod(); if (sflg && sname) { printf("Only 1 file with -s\n"); exit(); } if (sflg) sname = f; if ((ff=open(f, 0))<0) { printf("Can't open %s\n", f); return; } while (read(ff, &fbuf, sizeof(fbuf))==sizeof(fbuf))); exit(); } f1: close(1); dup(i); close(i); } if((f&FPIN) != 0) { close(0); dup(pf1[0]); close(pf1[0]); close(pf1[1]); } if((f&FPOU) != 0) { close(1); dup(pf2[1]); close(pf2[0]); close(pf2[1]); } if((f&FINT)!=0 && t[DLEF]==0 && (f&FPIN)==0) { close(0); open("/dev/null", 0); } if((f&FINT) == 0 && setintr) { signal(INTR, 0); signal(QUIT, 0); } if(t[DTYP] == TPAR) { if(t1 = t[DSPR]) t1[DFLG] =| f&FINT; execute(t1); exit(); #define size 2000 /* interpret command time accounting */ int lflg; int cflg; int jflg; int nflg; int aflg; int rflg; int tflg; int vflg; int uflg; int thres 1; int sflg; int bflg; int mflg; int fout; struct user { int ncomm; int fill; float fctime; } user[256]; struct tab { char name[8]; int count; float realt; float cput; float syst; } tab[size]; struct ftab { char fname[14]; char shf; char uid; int fdatet[2]; int frealt[2]; int fcput[2]; int fsyst[2]; }; float treal; float tcpu; float t { for (cp = fbuf.name; cp < &fbuf.name[8]; cp++) { c = *cp & 0377; if (c && (c < ' ' || c >= 0200)) *cp = '?'; } if (uflg) { printdate(fbuf.fdatet); printf(" %3d %.8s\n", fbuf.uid, fbuf.name); continue; } if (fbuf.shf==0) { c = fbuf.uid&0377; user[c].ncomm++; user[c].fctime =+ (ltod(fbuf.fcput)+ltod(fbuf.fsyst))/60; } ncom =+ 1.0; i = enter(&fbuf); tab[i].count++; x = ltod(fbuf.frealt); x =* 60.; tab[i].realt =+ x; treal =+ x; x = ltod(fbuf.fcput);  } close(acctf); gflg = 0; scan(t, &tglob); if(gflg) { t[DSPR] = "/etc/glob"; execv(t[DSPR], t+DSPR); prs("glob: cannot execute\n"); exit(); } scan(t, &trim); *linep = 0; texec(t[DCOM], t); cp1 = linep; cp2 = "/usr/bin/"; while(*cp1 = *cp2++) cp1++; cp2 = t[DCOM]; while(*cp1++ = *cp2++); texec(linep+4, t); texec(linep, t); prs(t[DCOM]); err(": not found"); exit(); case TFIL: f = t[DFLG]; pipe(pv); t1 = t[DLEF]; t1[DFLG] =| FPOU | (f&(FPIN|FINT|FPsys; int junkp -1; char *sname; float ncom; main(argc, argv) char **argv; { int i, j, k; extern tcmp(), ncmp(), bcmp(); extern float sum(); float ft; init(); if (argc>1) if (argv[1][0]=='-') { argv++; argc--; for(i=1; argv[0][i]; i++) switch(argv[0][i]) { case 'b': bflg++; break; case 'l': lflg++; break; case 'c': cflg++; break; case 'j': jflg++; break; case 'n': nflg++; break; case 'a': aflg++; break; case 'r': rflg++; break; tab[i].cput =+ x; tcpu =+ x; x = ltod(fbuf.fsyst); tab[i].syst =+ x; tsys =+ x; } close(ff); } ncmp(p1, p2) struct tab *p1, *p2; { if(p1->count == p2->count) return(tcmp(p1, p2)); if(rflg) return(p1->count - p2->count); return(p2->count - p1->count); } bcmp(p1, p2) struct tab *p1, *p2; { float f1, f2; float sum(); f1 = sum(p1)/p1->count; f2 = sum(p2)/p2->count; if(f1 < f2) { if(rflg) return(-1); return(1); } if(f1 > f2) { if(rflg) return(1); return(-1); } return(0); } tcmp(p1, p2) struct tab *p1, *p2; { extern float sum(); float f1, f2; f1 = sum(p1); f2 = sum(p2); if(f1 < f2) { if(rflg) return(-1); return(1); } if(f1 > f2) { if(rflg) return(1); return(-1); } return(0); } float sum(p) struct tab *p; { if(p->name[0] == 0) return(0.0); return( p->cput+ p->syst); } init() { struct tab tbuf; int i, j, f; if ((f=open("/usr/adm/sht", 0))<0) goto gshm; while (read(f, &tbuf, sizeof(tbuf)) == sizeof(tbuf)) { i = enter(&tbuf); ncom if(stat(arg, buf)) { printf("%s: non existent\n", arg); return; } if((buf->mode & 060000) == 040000) { if(rflg) { i = fork(); if(i == -1) { printf("%s: try again\n", arg); return; } if(i) { while(wait() != i); return; } if(chdir(arg)) { printf("%s: cannot chdir\n", arg); exit(); } p = 0; execl("/etc/glob", "glob", "rm", "-r", fflg? "-f": "*", fflg? "*": p, 0); printf("%s: no glob\n", arg); exit(); } printf("%s: directory\n", arg);  i++) { if(i >= isize) break; dread(i+2, buf); for(ip = &buf[0]; ip < &buf[256]; ip++) { sz = *tap++; if(sz == 0) continue; dealoc(ip); if(sz == -1) { for(p = ip; p < &ip->i_mtime[2]; ) *p++ = 0; continue; } sread(dbuf, 0); q = dbuf; for(p = ip; p < &ip->i_mtime[2]; ) *p++ = *q++; restor(ip, sz-1); } dwrite(i+2, buf); } dwrite(1, &sblock); com = 0; for(; i < isize; i++) for(l = 0; l < 16; l++) { sz = *tap++; if(sz != 0 && sz != -1)  =+ tbuf.count; tab[i].count = tbuf.count; treal =+ tbuf.realt; tab[i].realt = tbuf.realt; tcpu =+ tbuf.cput; tab[i].cput = tbuf.cput; tsys =+ tbuf.syst; tab[i].syst = tbuf.syst; } close(f); gshm: if ((f=open("/usr/adm/shm", 0)) < 0) return; read(f, user, sizeof(user)); close(f); } enter(fbuf) struct ftab *fbuf; { int i, j; i = 0; for (j=0; j<8; j++) { i = i*7 + fbuf->fname[j]; } if(i < 0) i = -i; for (i=%size; tab[i].name[0]; i = (i+1)%size) { for (j=0; j<8; j++) if (return; } if(!fflg) { if((getuid()&0377) == buf->uid) b = 0200; else b = 2; if((buf->mode & b) == 0 && ttyn(0) != 'x') { printf("%s: %o mode ", arg, buf->mode); i = b = getchar(); i = b; while(b != '\n' && b != '\0') b = getchar(); if(i != 'y') return; } } if(unlink(arg)) printf("%s: not removed\n", arg); } putchar(c) { write(1, &c, 1); } getchar() { char c; if(read(0, &c, 1) != 1) return(0); return(c); }  com++; } if(com) printf("%l files not restored - small ilist\n", com); exit(); case 'x': i = 0; tap = ilist; while(argc > 1) { i++; sz = number(argv[1]); argv++; argc--; if(sz <= 0 || sz >=isize*16) { printf("%l not in range\n", sz); continue; } if(talist[sz-1] == 0) { printf("%l not dumped\n", sz); continue; } if(talist[sz-1] == -1) { printf("%l does not exist\n", sz); continue; } *tap++ = sz; } if(i != 0 && ilist[0] == 0) exit(); tap = talist; for(itab[i].name[j]!=fbuf->fname[j]) goto no; goto yes; no:; } for (j=0; j<8; j++) tab[i].name[j] = fbuf->fname[j]; yes: return(i); } strip() { int i, j, k, c; j = enter("**junk**"); for (i = 0; i tapx: mtx: .even .bss word: .=.+2 =1; i<=isize*16; i++) { if(ilist[0] != 0) { for(sz=0; ilist[sz]; sz++) if(ilist[sz] == i) goto yes; sz = *tap++; no: if(sz == -1) sz = 0; while(sz--) tread(dbuf, 1); continue; } yes: sz = *tap++; if(sz == 0 || sz == -1) continue; fo = dwait(i); if(fo < 0) goto no; sz--; sread(buf, 0); ip = buf; while(sz--) { tread(dbuf, 0); com = 512; if(ip->i_size0 == 0 && ip->i_size1 < 512) com = ip->i_size1; write(fo, dbuf, com); if(com > ip-hile (c && c!='\n') c = getchar(); } } } printdate(tvec) int tvec[2]; { int *lt; int *localtime(); lt = localtime(tvec); printf("%3d %c%c%c %d", lt[7], pair(lt[2]), pair(lt[1]), pair(lt[0]), lt[6]); } pair(n) { return(n/10+'0' | (n%10+'0')<<8); }    #&)>i_size1) ip->i_size0--; ip->i_size1 =- com; } close(fo); chmod(file, ip->i_mode); chown(file, ip->i_uid); } exit(); } } dealoc(p) struct inode *p; { register struct inode *ip; register i, j; int k; int xbuf[256], ybuf[256]; ip = p; if(ip->i_mode & (IFCHR&IFBLK)) return; for(i=7; i>=0; i--) if(ip->i_addr[i]) { if(ip->i_mode&ILARG) { dread(ip->i_addr[i], xbuf); for(j=255; j>=0; j--) if(xbuf[j]) { if(i == 7) { dread(xbuf[j], ybuf); for(k=255; k>=0; k--) / rmdir -- unlink directory mov (sp)+,r5 tst (sp)+ loop: dec r5 ble done mov (sp)+,r1 mov $name,r2 clr r0 1: inc r0 movb (r1)+,(r2)+ bne 1b dec r2 dec r0 mov r0,size cmp r2,$name beq error sys stat; name; stbuf bes error bic $!60000,stbuf+4 cmp $40000,stbuf+4 bne error cmpb -1(r2),$'. bne 1f cmp r2,$name+1 beq error cmpb -2(r2),$'/ beq error cmpb -2(r2),$'. bne 1f cmp r2,$name+2 beq error cmpb -3(r2),$'/ beq error 1: sys open; name; 0 bes error mov r0,r1 1: mov r1,r0 s# /* * restore from incremental dumps */ char *dargv[] { 0, "t", 0 }; char *ifile; char *ofile; #include "/usr/sys/ino.h" #include "/usr/sys/filsys.h" struct filsys sblock; int isize; int *talist; int fi; int buf[256]; int dbuf[256]; int cbuf[256]; char *date[2]; char *ddate[2]; int fo; int pher; char *tsize 15000; int iflg; int wflg; int cflg; char file[10]; int ilist[100]; main(argc, argv) char **argv; { char *key; register *tap, *p; register struct inode *ip; int i, com, sz, *q, l; ifile = if(ybuf[k]) free(ybuf[k]); } free(xbuf[j]); } } free(ip->i_addr[i]); } } restor(p, sz) struct inode *p; { register struct inode *ip; register i, j; int xbuf[256]; ip = p; if(ip->i_mode & (IFCHR&IFBLK)) return; for(i=0; i<8; i++) ip->i_addr[i] = 0; if(sz <= 8) { for(i=0; ii_addr[i] = rcop(); ip->i_mode =& ~ILARG; return; } for(i=0; i<256; i++) xbuf[i] = 0; for(j=0; sz >= 256; j++) { if(j <= 7) ip->i_addr[j] = alloc(); if(j >= 7) xbys read; stbuf; 16. bes 1f tst r0 beq 1f tst stbuf beq 1b cmpb stbuf+2,$'. bne error1 tstb stbuf+3 beq 1b cmpb stbuf+3,$'. bne error1 tstb stbuf+4 beq 1b error1: jsr pc,prname mov r1,r0 sys close mov $1,r0 sys write; mes1; emes1-mes1 br loop 1: mov r1,r0 sys close movb $'/,(r2)+ movb $'.,(r2)+ movb $'.,(r2)+ clrb (r2) sys unlink; name clrb -(r2) sys unlink; name clrb -2(r2) sys unlink; name br loop error: jsr pc,prname mov $1,r0 sys write; mes2; emes2-mes2 br loop prna "/dev/mt0"; if(argc == 1) { argv = dargv; for(argc = 1; dargv[argc]; argc++); } argc--; argv++; key = *argv; while(*key) switch(*key++) { default: printf("bad character in key\n"); exit(); case 't': case 'r': case 'x': com = key[-1]; continue; case 'i': iflg++; continue; case '-': continue; case 'c': cflg++; continue; case 'f': argv++; argc--; ifile = *argv; continue; case 'w': wflg++; continue; } otape(); sread(buf, 0); tap = buf; isize = *tapuf[j-7] = alloc(); for(i=0; i<256; i++) dbuf[i] = rcop(); if(j < 7) dwrite(ip->i_addr[j], dbuf); else dwrite(xbuf[j-7], dbuf); sz =- 256; } if(sz) { if(j <= 7) ip->i_addr[j] = alloc(); if(j >= 7) xbuf[j-7] = alloc(); for(i=0; ii_addr[j], dbuf); else dwrite(xbuf[j-7], dbuf); } if(j >= 7) dwrite(ip->i_addr[7], xbuf); ip->i_mode =| ILARG; } rcop() { register b; b = alloc(); treme: mov $1,r0 sys write; name; size:.. rts pc done: sys exit mes1: < -- directory not empty\n> emes1: mes2: < ?\n> emes2: .even .bss name: .=.+40. stbuf: .=.+40. ++; *tap++; /* fsize */ date[0] = *tap++; date[1] = *tap++; ddate[0] = *tap++; ddate[1] = *tap++; tsize = *tap++; i = size(0, isize*32); talist = sbrk(i*512); tap = talist; while(i--) { tread(tap, 0); tap =+ 256; } switch(com) { case 't': l = 0; com = 0; pdate(ddate); pdate(date); tap = talist; for(i=0; i 0) { arg = *++argv; if(arg[0] == '-') { if(arg[1] == 'f') { fflg++; continue; } if(arg[1] == 'r') { rflg++; continue; } } rm(arg, fflg, rflg); } } struct stbuf { int dev; int inum; int mode; char nlink; char uid; char gid; char siz0; char siz1; int addr[8]; int adate[2]; int mdate[2]; }; rm(arg, fflg, rflg) char arg[]; { char *p; int buf[20]; int i, b;  l =+ 10; } if(l > 60) { printf("\n"); l = 0; } else printf(","); com = 0; } else if(com == 0) com = i+1; } if(com) printf("%l-\n", com); printf("\n"); exit(); case 'r': if(argc <= 1) { printf("no filesystem name\n"); exit(); } ofile = argv[1]; fo = open(ofile, 2); if(fo < 0) { printf("can not open %s\n", ofile); exit(); } printf("last chance before scribbling on %s\n", ofile); getchar(); dread(1, &sblock); tap = talist; for(i=0; i= tsize) { pta = 1; ata = 0; close(fi); otape(); ctflg++; } if(flag) return; if(ctflg) { printf("change tapes\n"); if(ctflg > 1) printf("skip %d tapes\n", ctflg-1); while((c = getchar()) != '\n') if(c == 0) exit(); ctflg = 0; } ata++; if(iflg) for(; pta != ata; ata++) read(fi, b, 512); if(pta != ata) { seek(fi, pta-ata, 4); ata = pta; } if(read(fi, b, 512) != 512) { printf("tape read error %l\n", ata-1); if(!iflg) exit(); for(c=0; c<256; c++) b[c] = 0; } } number(s) char *s; { register n, c; n = 0; while(c = *s++) { if(c<'0' || c>'9') continue; n = n*10+c-'0'; } return(n); } size(s0, s1) { register s; extern ldivr; s = ldiv(s0&0377, s1, 512); if(ldivr) s++; return(s); } otape() { register char *p; fi = open(ifile, 0); if(fi < 0) { printf("can not opn",s); av[0] = ratfor; av[1] = s; av[2] = 0; if( (t=fork())==0 ){ close(1); fout = creat("ratjunk", 0666); execv(ratfor, av); fout = 2; error("can't ratfor\n"); exit(1); } while( t!=wait(&status) ); if( (t=(status&0377)) != 0 && t!=14 ) dexit(1); t = (status>>8) & 0377; if( t ) return(++cflag); splitup(); nerr=0; for(i=0; i='a' && c<='z') || (c>='A' && c<='Z') || (c>='0' && c<='9') ); } endcard(s) char *s; { if( *s==0 ) return(1); while( *s==' ' || *s=='\t' ) s++; if( *s!='e' || *(s+1)!='n' || *(s+2)!='d' || *(s+3)!='\n' ) return(0); return(1); } error(s1, s2){ fout = 1; printf(s1,s2); putchar('\n'); flush(1); cflag++; } en %s\n", ifile); exit(); } if(!cflg) return; p = ifile; while(*p++) ; p[-2]++; } dwait(ino) { register i; dconv(ino, file); loop: if(wflg) { printf("%s ", file); i = getchar(); if(i == 'x') exit(); if(i == '\n') return(-1); if(i != 'y') goto flush; i = getchar(); if(i != '\n') { flush: while((i=getchar()) != '\n') if(i == '\0') exit(); goto loop; } } i = creat(file, 0666); return(i); } dconv(n, p) char *p; { register i; if(i = ldiv(0, n, 10)) for(i=0; i=100) { printf("bad freeblock\n"); exit(); } b = sblock.s_free[i]; if(b == 0) { printf("out of freelist\n"); exit(); } if(sblock.s_nfree <= 0) { dread(b, cbuf); sblock.s_nfree = cbuf[0]; for(i=0; i<100; i++) sblock.s_free[i] = cbuf[i+1]; } return(b); } free(in) { register i; if(sblock.s_nfree >= 100) { cbuf[0] = sblock.s_nfree; for(i=0; ias", av); t = setsuf(s, 'o'); if( move("a.out", t) ) return(++cflag); return(0); } getsuf(s) char s[]; { int c; char t, *os; c = 0; os = s; while(t = *s++) if (t=='/') c = 0; else c++; s =- 3; if (c<=14 && c>2 && *s++=='.') return(*s); return(0); } setsuf(s, ch) char s[]; { char *os; os = s; while(*s++); s[-2] = ch; return(os); } move(s,t) char *s, *t; { cunlink(t); if(link(s, t) || cunlink(s)) { printf("move failed: %s\n", t); return(1); } return(0); } callsys(f,+.1478;>ADGJ<100; i++) cbuf[i+1] = sblock.s_free[i]; sblock.s_nfree = 0; dwrite(in, cbuf); } sblock.s_free[sblock.s_nfree++] = in; }  v) char f[], *v[]; { int i, t, status; if(dflag){ for(i=0; v[i]; i++) printf("%s ", v[i]); putchar('\n'); } if ((t=fork())==0) { execv(f, v); printf("Can't find %s\n", f); exit(1); } else if (t == -1) { printf("Try again\n"); return(1); } while(t!=wait(&status)); if ((t=(status&0377)) != 0 && t!=14) { if (t!=2) /* interrupt */ printf("Fatal error in %s\n", f); dexit(); } t = (status>>8) & 0377; if(dflag && status != 0) printf("status = %d\n", t); return(t); } c#define NF 10 #define NL 200 #define NC 200 #define SL 100 #define NA 10 int tflag; int xx[NL]; char score[NL]; int rights; int wrongs; int guesses; int buf[259]; int nl 0; int na NA; int inc; int ptr 0; int nc 0; char line[150]; char response[100]; char *tmp[NF]; int select[NF]; readline() { char *t; loop: for(t=line;(*t=getc(buf))!=-1;t++) { nc++; if(*t==' '&&(t==line||t[-1]==' ')) t--; if(*t=='\n') { if(t[-1]=='\\') /*inexact test*/ continue; while(t>line&&t[-1]==' ') *--t = '/25!$'*-036"opy(s) char s[]; { char *otsp; otsp = tsp; while(*tsp++ = *s++); return(otsp); } nodup(l, s) char **l, s[]; { char *t, *os, c; if (getsuf(s) != 'o') return(1); os = s; while(t = *l++) { s = os; while(c = *s++) if (c != *t++) break; if (*t++ == '\0') return(0); } return(1); } llenter(t) char *t; { if (nodup(llist, t)) { llist[nl++] = t; if (getsuf(t)=='o') nxo++; } } cunlink(f) char *f; { if( dflag ) printf("unlink %s\n", f); if (f==0) return(0); return(unlink\n'; *++t = 0; return(1); } if(t-line>=NC) { printf("Too hard for me\n"); do { *line = getc(buf); if(*line==0377) return(0); } while(*line!='\n'); goto loop; } } return(0); } char *eu; char *ev; cmp(u,v) { int x; eu = u; ev = v; x = disj(1); if(x!=1) return(x); return(eat(1,0)); } disj(s) { int t, x; char *u; u = eu; t = 0; for(;;) { x = string(s); if(x>1) return(x); switch(*ev) { case 0: case ']': case '}': return(t|x&s); case '|': /* Ratfor-Fortran command */ extern int fin, fout; char ts[1000]; char *tsp ts; char *av[50]; char *rlist[50]; int nr 0; char *llist[50]; int nl 0; int nxo 0; int bdcount 0; /* count block data files generated */ int rflag; int dflag 0; int vflag 1; int fflag; int cflag; char *complr "/usr/fort/fc1"; char *ratfor "/usr/lib/ratfor"; main(argc, argv) char *argv[]; { char *t; int i, j, c; int dexit(); for(i=0; ++i < argc; ) { if(*argv[i] == '-') switch (argv[i][1]) { default: goto passa; (f)); } splitup(){ char in[200], fname[20]; int buf[259]; int i,fd,c; if( (fin=open("ratjunk", 0)) < 0) error("can't open ratjunk\n"); while( gets(in) ){ getname(in, fname); savename(fname); if( (fd = fcreat(fname, buf)) < 0) error("can't open %s", fname); puts(in,buf); while( ! endcard(in) ){ gets(in); puts(in,buf); } fflush(buf); close(fd); } close(fin); } gets(s) char *s; { int c; while( (*s++=c=getchar()) != '\n' && c != '\0' ); *s = '\0'; return(c); } puts(s,b)  ev++; t =| s; s = 0; continue; } if(s) eu = u; if(string(0)>1) return(2); switch(*ev) { case 0: case ']': return(0); case '}': return(1); case '|': ev++; continue; default: return(2); } } } string(s) { int x; for(;;) { switch(*ev) { case 0: case '|': case ']': case '}': return(1); case '\\': ev++; if(*ev==0) return(2); if(*ev=='\n') { ev++; continue; } default: if(eat(s,*ev)==1) continue; return(0); cas case 'd': dflag = 1; break; case 'v': vflag = 0; break; case 'r': rflag = fflag = cflag = 1; break; case 'f': fflag = 1; break; case 'c': cflag = 1; break; case '2': complr = "/usr/fort/fc2"; break; } else { passa: t = argv[i]; if( (c=getsuf(t))=='r' ) ratcomp(t); else if( c=='f') { fortcomp(t); llenter(setsuf(copy(t),'o')); } else llenter(copy(t)); } } if(rflag) dexit(); if ((schar *s; int *b; { while( *s ) putc(*s++, b); } savename(s) char *s; { rlist[nr++] = copy(s); } getname(s,f) char *s,*f; { int i,j,c; loop: while( *s == ' ' || *s == '\t' ) s++; if( compar(s,"subroutine") ){ s =+ 10; goto bot; } else if( compar( s,"function") ){ s =+ 8; goto bot; } else if( compar(s,"real") ){ s =+ 4; goto loop; } else if( compar(s,"integer") ){ s =+ 7; goto loop; } else if( compar(s,"logical") ){ s =+ 7; goto loop; } else if( compar(s,"double") ){ s =+ 6; goto loop; } ee '[': ev++; x = disj(s); if(*ev!=']' || x>1) return(2); ev++; if(s==0) continue; if(x==0) return(0); continue; case '{': ev++; x = disj(s); if(*ev!='}'||x>1) return(2); ev++; continue; } } } eat(s,c) char c; { if(*ev!=c) return(2); if(s==0) { ev++; return(1); } if(fold(*eu)!=fold(c)) return(0); eu++; ev++; return(1); } fold(c) char c; { if(c<'A'||c>'Z') return(c); return(c|040); } publish(t) char *t; { ev = t; pub1(1); } pub1ignal(2, 1) & 01) == 0) signal(2, &dexit); if(dflag) printf("cflag=%d, nl=%d\n", cflag, nl); if (cflag==0 && nl!=0) { i = 0; av[0] = "ld"; av[1] = "-x"; av[2] = "/lib/fr0.o"; j = 3; while(i1) badinfo(); if(x==0) continue; p[i] = j; goto uloop; } return(0); uloop: ; } return(1); } find(u,m) char *u[]; { int n; while(readline()){ n = segment(line,tmp); if(perm(u,m,tmp+1ot)) < 0) prname(); if((file = open(root,0)) < 0) prname(); loop: if((n = read(file,&y,16)) < 16) prname(); if(y.jnum == 0) goto loop; if((n = stat(y.name,&x)) < 0) prname(); if(x.devn != i) goto loop; x.i[0] =& 060000; if(x.i[0] != 040000) goto loop; if(y.name[0]=='.')if(((y.name[1]=='.') && (y.name[2]==0)) || (y.name[1] == 0)) goto pr; cat(); pr: write(1,root,1); prname(); } prname() { if(off<0)off=0; name[off] = '\n'; write(1,name,off+1); exit(); } cat() { int i, j; i = -1; while(yile(++i=NL) { printf("I've forgotten some of it\n"); break; } } } talloc() { int i; for(i=0;i1&&*argv[1]=='-') { switch(argv[1][1]) { case 'i': i.name[++i] != 0); if((off+i+2) > 511) prname(); for(j=off+1; j>=0; --j) name[j+i+1] = name[j]; off=i+off+1; name[i] = root[0]; for(--i; i>=0; --i) name[i] = y.name[i]; } f = r5 g = r4 .globl g1 .globl pbundle,iget .globl succ .globl bundle,reduce reduce: jsr pc,iget mov (r0),r1 mov g,r0 asl r1 sub r1,r0 br 1f br 1f bundle: mov f,r0 add $g1,r0 1: jsr pc,pbundle tst r0 beq 1f mov r0,(g)+ 1: jmp succ f(argc>2) info = argv[2]; argc =- 2; argv =+ 2; goto loop; case 't': tflag = 1; argc--; argv++; goto loop; } } if(fopen(info,buf)== -1) { printf("No info\n"); exit(); } talloc(); if(argc<=2) instruct(info); signal(2,done); argv[argc] = 0; if(find(&argv[1],argc-1)==0) dunno(); close(buf[0]); if(fopen(tmp[0],buf)== -1) dunno(); readindex(); if(!tflag || na>nl) na = nl; for(;;) { i = next(); seek(buf[0],xx[i],0); read(buf[0],line,xx[i+1]-xx[i]); s/* permuted title index */ char *tfil "/tmp/p.tmp"; char *sw[] { "a", "an", "and", "as", "for", "is", "of", "on", "or", "the", "to", "up", 0}; char line[200]; int ch; int ptflg; int llen 72; main(argc, argv) int argc; char *argv[]; { extern fin, fout; extern onintr(); int f; if(argc>1 && *argv[1]=='-') { llen = 100; ptflg++; argc--; argv++; } if(argc<2) { printf("arg count\n"); exit(); } fin = open(argv[1]); if(fin < 0) { printf("%s: cannot open\n", argv[1]); exit();CFILOPSVYegment(line,tmp); if(*tmp[select[0]] == '\0' || *tmp[select[1]] == '\0') { score[i] = 1; continue; } publish(tmp[select[0]]); printf("\n"); for(count=0;;count++) { if(query(response)==0) { publish(tmp[select[1]]); printf("\n"); if(count==0) wrongs++; score[i] = tflag?-1:1; break; } x = cmp(response,tmp[select[1]]); if(x>1) badinfo(); if(x==1) { printf("Right!\n"); if(count==0) rights++; if(++score[i]>=1 && nar&&t[-1]==' ') *--t = '\n'; break; } } *t = 0; return(t-r); } next() { int flag; inc = inc*3125&077777; ptr = (inc>>2)%na; flag = 0; while(score[ptr]>0) if(++ptr>=na) { ptr = 0; if(flag) done(); flag = 1; } return(ptr); } done() { fin < 0) { printf("cannot reopen %s\n", tfil); exit(); } if (argc>=3) f = creat(argv[2], 0666); else f = dup(1); if(f < 0) { printf("%s: cannot open\n", argv[2]); exit(); } fout = f; pass2(); flush(); onintr(); } onintr() { unlink(tfil); exit(); } pass1() { int n, c, i, ll, j, k, cc, ccc; loop: if ((c=getchar())=='\0') return; n = 0; i = 0; while(c!='\n' && c!='\0') { if(c == '(') c = 0177; if(c==' ' || c=='\t') { i++; c = getchar(); continue; } if(i) {  int iflags; char inl; char iuid; char igid; char isize0; int isize; int iaddr[8]; char *ictime[2]; char *imtime[2]; int fill; }; int obuf[259]; main(argc, argv) char **argv; { struct proc *p; int n, b; int i, c, mtty; char *ap; int uid, puid; obuf[0] = 1; if (argc>1) { ap = argv[1]; while (*ap) switch (*ap++) { case 'a': aflg++; break; case 't': tflg++; break; case 'x': xflg++; break; case 'l': lflg++; break; case 'k': kflg++; break; }  printf("\nRights %d, wrongs %d, ", rights, wrongs); if(guesses) printf("extra guesses %d, ", guesses); printf("score %d%%\n",100*rights/(rights+wrongs)); exit(); } instruct(info) { char *t; int i, n; printf("Subjects:\n\n"); while(readline()) { printf("-"); n = segment(line,tmp); for(i=1;i2? argv[2]:"/unix", nl); if (nl[0].type==0) { printf("No namelist\n"); return; } coref = "/dev/mem"; if(kflg) coref = "/usr/sys/core"; if ((mem = open(coref, 0)) < 0) { printf("No mem\n"); done(); } seek(mem, nl[1].value, 0); read(mem, &nl[1].value, 2); seek(mem, nl[0].value, 0); read(mem, proc, sizeof proc); getdev(); mtty = ttyn(0); uid = geblish(tmp[1]); printf(" "); publish(tmp[2]); printf("\nasks you a "); publish(tmp[1]); printf(" and you answer the "); publish(tmp[2]); printf("\n quiz "); publish(tmp[2]); printf(" "); publish(tmp[1]); printf("\nworks the other way around\n"); printf("\nType empty line to get correct answer.\n"); exit(); } badinfo(){ printf("Bad info %s\n",line); } dunno() { printf("I don't know about that\n"); exit(); }  if (c) goto l1; goto loop; } pass2() { int i, n, c, tilde, llen2, nbfore, nafter; llen2 = llen/2+6; loop: if ((c=getchar())=='\0') return; n = nbfore = nafter = 0; tilde = -1; while(c!='\n' && c!='\0') { if(c == 0177) c = '('; if (n<=llen) line[n] = c; if (c=='~') tilde = n; if (tilde>=0) nafter++; else nbfore++; n++; c = getchar(); } if (tilde<0) tilde = n++; nafter--; if (nbfore>llen2) { i = tilde; while (nbfore > llen2) while(line[--i]!=' ' && i>=0) nbfore--; iftuid() & 0377; if(lflg) printf("TTY F S UID PID PRI ADDR SZ WCHAN COMMAND\n"); else printf("TTY PID COMMAND\n"); for (i=0; i= llen-llen2) { i = tilde; while(nafter-- >= llen-llen2) while(line[++i]!=' ' && i=n) goto l1; line[tilde] = 0200; nafter++; tilde = i; } l1: if(!ptflg) { for(i=llen-llen2-nafter; i>=8; i =- 8) putchar('\t'); while(--i>=0) putchar(' '); } else printf(".xx \""); i = tilde; while (++i>3); if (proc[i].p_wchan) printf("%7o", proc[i].p_wchan); else printf(" "); } if (proc[i].p_stat==5) printf(" "); else prcom(i); printf("\n"); } done(); } getdev() { register struct { int dir_ino; char dir_n[14]; } *p; register i, c; int f; char dbuf[512]; int sbuf[20]; f = open("/dev"); if(f < 0) { printf("cannot open /dev\n"); done(); } swap = -1; c = 0; loop: i = read(f, dbuf, 512); if(i <= 0) { close(f); if(swap < 0) { printf("no swap device\n"); done(); } ndev = c; return; } while(i < 512) dbuf[i++] = 0; for(p  fstat(pf, buf); read(pf, &lowpc, 2); read(pf, &highpc, 2); read(pf, &ncount, 2); bufs = buf->size/2 - 3*(ncount+1); read(pf, cbuf, ncount*6); lowpc = (lowpc>>1) & 077777; highpc = (highpc>>1) & 077777; npe = nl; initf(nf); for (nname = 0; symsiz > 0; symsiz =- 12) { for(i=0; i<12; i++) buf->fname[i] = getc(ibuf); if ((buf->flag | aflg) != 042) continue; buf->fvalue = (buf->fvalue>>1) & 077777; npe->value = buf->fvalue; for (i=0; i<8; i++) npe->name[i] = buf->fname[i]; npe++; UX[^adghknqt= dbuf; p < dbuf+512; p++) { if(p->dir_ino == 0) continue; if(p->dir_n[0] == 't' && p->dir_n[1] == 't' && p->dir_n[2] == 'y' && p->dir_n[4] == 0 && p->dir_n[3] != 0) { if(stat(p->dir_n, sbuf) < 0) continue; devc[c] = p->dir_n[3]; devl[c] = sbuf->iaddr[0]; c++; continue; } if(swap >= 0) continue; if(stat(p->dir_n, sbuf) < 0) continue; if((sbuf->iflags & 060000) != 060000) continue; if(sbuf->iaddr[0] == nl[1].value) swap = open(p->dir_n, 0);  nname++; } if (nname == 0) { printf("No symbols: %s\n", namfil); done(); } npe->value = 077777; npe++; for (cp = cbuf; cp < &cbuf[ncount]; cp++) for (np = nl; np < npe; np++) if (cp->cvalue-8 == np->value<<1) { np->ncall[0] = cp->cncall[0]; np->ncall[1] = cp->cncall[1]; break; } qsort(nl, nname, 18, &valcmp); scale = (highpc-lowpc)/(bufs+0.0); initf(pf); for (i=0; (j = getc(ibuf)) != -1; i++) { ccnt.fname[0] = j; ccnt.fname[1] = getc(ibuf); if (ccnt == 0) continu# /* * print file with headings * 2+head+2+page[56]+5 */ int ncol 1; char *header; int col; int icol; int file; char *bufp; #define BUFS 5120 char buffer[BUFS]; #define FF 014 int line; char *colp[72]; int nofile; char isclosed[10]; int peekc; int fpage; int page; int colw; int nspace; int width 72; int length 66; int plength 61; int margin 10; int ntflg; int mflg; int tabc; char *tty; int mode; struct inode { int dev; int inum; int flags; char nlink; char uid; char gid; char siz0; int size; } goto loop; } setup(p, s) char *p, *s; { while (*p++ = *s++); } prcom(i) { int baddr, laddr, mf; register int *ip; register char *cp, *cp1; int c, nbad; baddr = 0; laddr = 0; if (proc[i].p_flag&SLOAD) { laddr = proc[i].p_addr; mf = mem; } else { baddr = proc[i].p_addr; mf = swap; } laddr =+ proc[i].p_size - 8; baddr =+ laddr>>3; laddr = (laddr&07)<<6; seek(mf, baddr, 3); seek(mf, laddr, 1); if (read(mf, stbuf, 512) != 512) return(0); for (ip = &stbuf[256]; ip > &stbuf[0];) {e; time = ccnt; if (ccnt<0) time =+ 65536.; totime =+ time; if(time > maxtime) maxtime = time; pcl = lowpc + scale*i - 1; pch = lowpc + scale*(i+1) - 1; for (j=0; j= nl[j+1].value) continue; overlap=(min(pch,nl[j+1].value)-max(pcl,nl[j].value)); nl[j].time =+ overlap*time/scale; } } if (totime==0.0) { printf("No time accumulated\n"); done(); } if(!vflg) goto print; vf = open("/dev/vt0", 1); if(vf < 0) int ptr[8]; int atime[2]; int mtime[2]; }; main(argc, argv) char **argv; { int nfdone; int onintr(); extern fout; tty = "/dev/ttyx"; fout = dup(1); close(1); if ((signal(2, 1) & 01) == 0) signal(2, onintr); fixtty(); for (nfdone=0; argc>1; argc--) { argv++; if (**argv == '-') { switch (*++*argv) { case 'h': if (argc>=2) { header = *++argv; argc--; } continue; case 't': ntflg++; continue; case 'l': length = getn(++*argv); continue;  if (*--ip == -1) { cp = ip+1; if (*cp==0) cp++; nbad = 0; for (cp1 = cp; cp1 < &stbuf[256]; cp1++) { c = *cp1; if (c==0) *cp1 = ' '; else if (c < ' ' || c > 0176) { if (++nbad >= 5) { *cp1++ = ' '; break; } *cp1 = '?'; } } while (*--cp1==' ') *cp1 = 0; printf(lflg?" %.16s":" %.64s", cp); return(1); } } return(0); } done() { fflush(obuf); exit(); } putchar(c) { putc(c, obuf); }  { printf("Cannot open vt\n"); done(); } obuf[0] = vf; vtch(1); vtch(1); vtch(3); point(-2048., -2048.); point(-2048., 2048.); vtch(3); point(0., -2048.); point(0., 2048.); for(j=0; j<9; j++) { vtch(3); point(-2048., 2048. - j*512.); point(0., 2048. - j*512.); } lastx = 0.; lasty = 2048.; scale = 4096./(i+2); seek(pf, 6*(ncount+1), 0); initf(pf); lastsx = 0.0; while((j = getc(ibuf)) != -1) { ccnt.fname[0] = j; ccnt.fname[1] = getc(ibuf); time = ccnt; if(ccnt < 0) timecase 'w': width = getn(++*argv); continue; case 's': if (*++*argv) tabc = **argv; else tabc = '\t'; continue; case 'm': mflg++; continue; default: ncol = getn(*argv); continue; } } else if (**argv == '+') { fpage = getn(++*argv); } else { print(*argv, argv); nfdone++; if (mflg) break; } } if (nfdone==0) print(0); flush(); onintr(); } onintr() { chmod(tty, mode); exit(0); } fixtty() { struct inode sbuf; extern fou_beQTWZ]`cf =+ 65536.; vtch(3); point(lastsx, lasty); lastsx =- 2000.*time/totime; point(lastsx, lasty-scale); if (ccnt!=0 || lastx!=0.0) { vtch(3); point(lastx, lasty); lastx = -time*2000./maxtime; point(lastx, lasty); } lasty =- scale; } scale = 4096./(highpc-lowpc); lastx = 50.; for(np = nl; npvalue < lowpc) continue; if(np->value >= highpc) continue; time = np->time/totime; lasty = 2048. - (np->value - lowpc)*scale; vtch(3); point(0., lasty); t; tty[8] = ttyn(fout); fstat(fout, &sbuf); mode = sbuf.flags&0777; chmod(tty, 0600); } print(fp, argp) char *fp; char **argp; { struct inode sbuf; register int sncol, sheader; register char *cbuf; extern fout; if (ntflg) margin = 0; else margin = 10; if (length <= margin) length = 66; if (width <= 0) width = 72; if (ncol>72 || ncol>width) { write(2, "Very funny.\n", 12); exit(); } if (mflg) { mopen(argp); ncol = nofile; } colw = width/ncol; sncol = ncol; sheader = head/* * Print execution profile */ struct nl { char name[8]; int value; float time; int ncall[2]; }; struct nl nl[600]; struct fnl { char fname[8]; int flag; int fvalue; }; struct cnt { int cvalue; int cncall[2]; } cbuf[200]; struct inode { int idev; int inum; int flags; char nlink; char uid; char gid; char size0; int size; int ptr[8]; int ctime[2]; int mtime[2]; int fill; }; int ibuf[259]; int obuf[259]; int buf[17]; int i; int j; int highpc; int lowpc; int ccnt; int pcl; int pchpoint(50., lasty); vtch(3); point(lastx-50., lasty); point(lastx, lasty); vtch(9); point(lastx+10., lasty+60.); vtch(1); vtch(3); for(j=0; j<8; j++) if(np->name[j] != '_') vtch(np->name[j]); vtch(0); lastx =+ 500.; if(lastx > 2000.) lastx = 50.; } done(); print: printf(" name %%time #call ms/call\n"); if (!lflg) qsort(nl, nname, 18, &timcmp); for (np = nl; nptime/totime; printf("%8.8s%6.1f", np->name, 100*time); fnc = ltod(np->ncaller; plength = length-5; if (ntflg) plength = length; if (--ncol<0) ncol = 0; if (mflg) fp = 0; if (fp) { file = open(fp, 0); if (file<0) return; fstat(file, &sbuf); } else { file = 0; time(sbuf.mtime); } if (header == 0) header = fp; cbuf = ctime(sbuf.mtime); cbuf[16] = '\0'; cbuf[24] = '\0'; page = 1; icol = 0; colp[ncol] = bufp = buffer; if (mflg==0) nexbuf(); while (mflg&&nofile || (!mflg)&&tpgetc(ncol)>0) { if (mflg==0) { colp[ncol]--; if (colp[ncol] < buff; int bufs; int nname; double time; double totime; double maxtime; double scale; double lastx; double lasty; struct nl *np; struct nl *npe; int aflg; int vflg; int lflg; int symoff; int symsiz; int vf; int etext; int ncount; main(argc, argv) char **argv; { char *namfil; int timcmp(), valcmp(); int nf, pf, overlap; double fnc, ltod(), lastsx; struct cnt *cp; obuf[0] = 1; argv++; namfil = "a.out"; while (argc>1) { if (**argv == '-') { if (*++*argv == 'l') lflg++; if (**argv == 'a') ); if (fnc != 0.0) { printf("%6s", locv(np->ncall[0], np->ncall[1])); printf(" %7.2f\n", np->time/(fnc*.06)); } else printf("\n"); } done(); } min(a, b) { if (ab) return(a); return(b); } valcmp(p1, p2) struct nl *p1, *p2; { return(p1->value - p2->value); } timcmp(p1, p2) struct nl *p1, *p2; { float d; d = p2->time - p1->time; if (d > 0.0) return(1); if (d < 0.0) return(-1); return(0); } vtch(c) int c; { putchar(c&0377); }er) colp[ncol] = &buffer[BUFS]; } line = 0; if (ntflg==0) { puts("\n\n"); puts(cbuf+4); puts(" "); puts(cbuf+20); puts(" "); puts(header); puts(" Page "); putd(page); puts("\n\n\n"); } putpage(); if (ntflg==0) while(line 2047.) xy = 2047.; if(xy < -2048.) xy = -2048.; ixy = xy; vtch(ixy.b1); vtch(ixy.b2); } done() { fflush(obuf); exit(); } initf(f) { ibuf[0] = f; ibuf[1] = 0; ibuf[2] = 0; ibuf[3] = 0; } ); if (++nofile>=10) { write(2, "Too many args.\n", 15); exit(); } } } putpage() { register int lastcol, i, c; int j; if (ncol==0) { while (line512) n = 512; if ((n = read(file, rbufp, n)) <= 0) *rbufp = 0376; else { rbufp =+ n; / print last floating error stst = 170300^tst stst r1 cmp r1,$14 blos 1f clr r1 1: bic $1,r1 mov mesg(r1),r1 1: movb (r1)+,ch beq 1f mov $1,r0 sys write; ch; 1 br 1b 1: sys exit mesg: 1f 2f 3f 4f 5f 6f 7f 8f 1: 2: 3: 4: 5: 6: 7: 8: .even .bss ch: .=.+2 = addr[0]; a[1] = addr[1]; for(i=0; i= &buffer[BUFS]) rbufp = buffer; *rbufp = 0375; } bufp = rbufp; } tpgetc(ai) { register char **p; register int c, i; i = ai; if (mflg) { if ((c = getc(&buffer[2*259*i])) < 0) { if (isclosed[i]==0) { isclosed[i] = 1; if (--nofile <= 0) return(0); } return('\n'); } if (c==FF && ncol>0) c = '\n'; return(c); } loop: c = **(p = &colp[i]) & 0377; if (c == 0375) { nexbuf(); c = **p & 0377; } if (c == 0376) return(0); (*p)++; if (*p >= &buffer[B/ tape boot program to load and transfer / to a 'tp' entry / entry is made by jsr pc,*$0 / so return can be rts pc / jsr pc,(r5) is putc / jsr pc,2(r5) is getc / jsr pc,4(r5) is mesg core = 24. .. = [core*2048.]-512. start: mov $..,sp mov sp,r1 cmp pc,r1 bhis 2f clr r0 cmp (r0),$407 bne 1f mov $20,r0 1: mov (r0)+,(r1)+ cmp r1,$core*2048. blo 1b jmp (sp) 2: mov $trvect,r5 mov $name,r4 jsr pc,rew mov $'=,r0 jsr pc,(r5) 2: mov r4,r1 1: jsr pc,getc cmp r0,$'\n beq 1f cmp r0,$'@ beq 2b ; putchar(' '); } line(a, w, n) int w[]; { int i, f, c; f = 1; for(c=1; c; c=+c) { if((c&conv) == 0) continue; if(f) { puta(a); f = 0; } else for(i=0; i<8; i++) putchar(' '); for(i=0; i= ' ') icol++; return(c); } puts(as) char *as; { register int c; register char *s; if ((s=as)==0) return; while (c = *s++) put(c); } putd(an)  movb r0,(r1)+ cmp r0,$'# bne 1b sub $2,r1 cmp r1,r4 blo 2b br 1b 1: clrb (r1) cmp r1,r4 blos start mov $1,tapa mov $-6144.,wc jsr pc,tread clr r1 1: mov r1,r2 mov r4,r0 2: cmpb (r0)+,(r1) bne 2f tstb (r1)+ bne 2b br 1f 2: mov r2,r1 add $64.,r1 cmp r1,$12288. blo 1b jsr pc,rew br start 1: mov 44.(r2),tapa mov 38.(r2),r0 inc r0 clc ror r0 neg r0 mov r0,wc clr r0 1: clr (r0)+ cmp r0,sp blo 1b jsr pc,tread jsr pc,rew br callout tapa: 0 wc: 0 ba: 0 name = ..-32. e(5); putc(n); putchar(' '); putc(n>>8); break; case 040: pre(7); putn(n&0377, 8, 3); putchar(' '); putn((n>>8)&0377, 8, 3); break; } } getw() { int b1, b2; b1 = getc(); if(b1 == -1) { eof = 1; return(0); } b2 = getc(); if(b2 == -1) b2 = 0; return(b1|(b2<<8)); } getc() { if(gidx >= gcnt) { gcnt = read(fi, gbuf, 512); if(gcnt <= 0) return(-1); gidx = 0; } if(++addr[1] >= basem) { addr[0]++; addr[1] = 0; } return(gbuf[gidx++]&0377); } putc(c) { c =& 037{ register int a, n; n = an; if (a = n/10) putd(a); put(n%10 + '0'); } put(ac) { register int ns, c; c = ac; if (tabc) { putcp(c); if (c=='\n') line++; return; } switch (c) { case ' ': nspace++; col++; return; case '\n': col = 0; nspace = 0; line++; break; case 010: case 033: if (--col<0) col = 0; if (--nspace<0) nspace = 0; } while(nspace) { if (nspace>2 && col > (ns=((col-nspace)|07))) { nspace = col-ns-1; putcp('\t'); } else { nspace--i = r3 f = r5 .globl x,j .globl succ,fail .globl ctest,iget .globl any any: mov j(f),-(sp) jsr pc,iget jsr pc,ctest bcs 1f mov (sp)+,j(f) jmp fail 1: tst (sp)+ jmp succ 7; if(c>037 && c<0177 && c!='\\') { putchar(' '); putchar(c); return; } putchar('\\'); switch(c) { case '\0': putchar('0'); break; case '\n': putchar('n'); break; case '\\': putchar('\\'); break; case '\t': putchar('t'); break; default: putchar('?'); } } putn(n, b, c) { if(!c) return; putn(ldiv(0,n,b),b,c-1); if((n=lrem(0,n,b)) > 9) putchar(n-10+'a'); else putchar(n+'0'); } pre(n) { int i; for(i=n; i= ' ') col++; putcp(c); } getn(ap) char *ap; { register int n, c; register char *p; p = ap; n = 0; while ((c = *p++) >= '0' && c <= '9') n = n*10 + c - '0'; return(n); } putcp(c) { if (page >= fpage) putchar(c); } /* * opr -- off line print dispatcher * chooses spooling routine appropriate * to destination * * last entry in table isdefault */ char *code[] { "-lp", "/lib/lpr", /* line printer */ 0 }; main(argc, argv) char **argv; { int i, j; argv[argc] = 0; for(i=0; code[i]; i=+2) if(argc > 1) for(j=0; code[i][j]==argv[1][j]; j++) if(code[i][j] == 0) execv(code[i+1], &argv[1]); execv(code[i-1], argv); write(2, "can't start daemon\n", 19); } ; int a[2], d, i, j, b; p = s; while(*p++); i = p-s-1; b = 0; if(i > 0) if(p[-2] == 'b') { i--; b++; p--; } if(i > 0) if(p[-2] == '.') { i--; base = 10; basem = 1000; } a[0] = 0; for(j=0; i-j>3; j++) { d = s[j]; if(d>='0' && d<='9') a[0] = a[0]*base + d-'0'; } a[1] = 0; for(; i-j>0; j++) { d = s[j]; if(d>='0' && d<='9') a[1] = a[1]*base + d-'0'; } if(b) { i = a[0]*basem+a[1]; a[0] = 0; a[1] = 0; while(i--) { a[1] =+ 512; while(a[1] >= base.globl succ,fail,iget .globl seekchar,getword,alterword .globl sprv,update .globl .l,.u,.p,.t,.st, / infix = .st: jsr pc,sprv mov (sp)+,(sp) mov (sp)+,(sp) / update .u: jsr pc,update br 9f / pop stack .p: jsr pc,sprv cmp (sp)+,(sp)+ br 9f / test stack .t: jsr pc,sprv mov (sp)+,(sp)+ bne 9f jmp fail / load named value / rvalue into (sp), lvalue into 2(sp) .l: jsr pc,iget mov r0,-(sp) mov (r0),-(sp) br 9f / update a stored value, used by all assignments update: cmp 2+2(sp),$-1 beq 1f mov 0{~jmpsvy|m) { a[1] =- basem; a[0]++; } } } i = 0; while(a[0] > addr[0]+1) { addr[1] =+ 512; while(addr[1] >= basem) { addr[1] =- basem; addr[0]++; } i++; } seek(fi, i, 3); while(a[0]!=addr[0] || a[1]!=addr[1]) if(getc() == -1) break; } putop(n) { char *p; int i, c; p = getop(n); for(i=0; (c = *p++) != '\0'; i++) putchar(c); for(; i<4; i++) putchar(' '); } getop(n) { switch(n&0170000) { case 0000000: switch(n&0177000) { case 0004000: return("jsr"); cas+2(sp),*2+2(sp) rts pc 1: mov 4+2(sp),r1 mov 6+2(sp),r0 jsr pc,seekchar mov 0+2(sp),r0 jsr pc,alterword / make sp hold a simple rv (forget it might be a table value) sprv: mov (sp)+,r0 cmp $-1,2(sp) bne 1f mov (sp)+,(sp) mov (sp)+,(sp) 1: mov r0,pc 9: jmp succ int word[16]; char gbuf[512]; int fi; int conv; int base 010; int basem 01000; int max; int gidx; int gcnt; int eof; int addr[2]; int from[2]; int key; int flag; int nword 8; main(argc, argv) char **argv; { extern fout; int f, k, w, i, a[2]; char *p; fout = dup(1); argv++; if(argc > 1) { p = *argv; if(*p == '-') { while((i = *p++) != '\0') { switch(i) { case 'o': conv =| 001; f = 6; break; case 'd': conv =| 002; f = 5; break; case 'a': conv =e 0077000: return("sob"); } switch(n&0177400) { case 0000400: return("br"); case 0001000: return("bne"); case 0001400: return("beq"); case 0002000: return("bge"); case 0002400: return("blt"); case 0003000: return("bgt"); case 0003400: return("ble"); } switch(n&0177700) { case 0000100: return("jmp"); case 0000300: return("swab"); case 0005000: return("clr"); case 0005100: return("com"); case 0005200: return("inc"); case 0.globl succ .globl putcstr,iget .globl append append: jsr pc,iget mov r0,-(sp) 1: movb *(sp),r0 beq 1f jsr pc,putcstr inc (sp) br 1b 1: tst (sp)+ jmp succ | 004; f = 4; break; case 'h': conv =| 010; f = 4; break; case 'c': conv =| 020; f = 5; break; case 'b': conv =| 040; f = 7; break; } if(f > max) max = f; } argc--; argv++; } } if(!conv) { max = 6; conv = 1; } if(argc > 1) if(**argv != '+') { fi = open(*argv, 0); if(fi < 0) { printf("cannot open %s\n", *argv); goto done; } argv++; argc--; } if(argc > 1) offset(*argv); loop: f = 1; a[0] 005300: return("dec"); case 0005400: return("neg"); case 0005500: return("adc"); case 0005600: return("sbc"); case 0005700: return("tst"); case 0006000: return("ror"); case 0006100: return("rol"); case 0006200: return("asr"); case 0006300: return("asl"); case 0006400: return("mark"); case 0006500: return("mfpi"); case 0006600: return("mtpi"); case 0006700: return("sxt"); } switch(n&0177740) { case 0000240: return("flag");  } switch(n&0177770) { case 0000200: return("rts"); case 0000230: return("spl"); } switch(n&0177777) { case 0000000: return("halt"); case 0000001: return("wait"); case 0000002: return("rti"); case 0000003: return("bpt"); case 0000004: return("iot"); case 0000005: return("rset"); case 0000006: return("rtt"); } break; case 0010000: return("mov "); case 0020000: return("cmp"); case 0030000: return("bit"); case 0040000: return("bit(); } nlp = sbrk(12*n); read(fi, nlp, n*12); if (pflg==0) qsort(nlp, n, 12, compare); fout = dup(1); close(1); for(i=0; ityp&040)==0) goto out; if(cflg) { if(nlp->name[0] != '_') goto out; for(j=0; j<7; j++) nlp->name[j] = nlp->name[j+1]; nlp->name[7] = '\0'; } j = nlp->typ&037; if(j > 4) j = 1; if(j==0 && nlp->val) j = 5; if(uflg && j!=0) goto out; if(!uflg) { if(j==0) printf(" "); else printo(nlp->val); int gbuf[259]; int pbuf[259]; int ttyb[3]; char name[10]; char passwd[10]; char space[1000]; int peek; int pwdflg; main(argc, argv) char *argv[]; { register id; register char *p, *q; if(argc < 2) { printf("usage: newgrp groupname\n"); done(); } if(fopen("/etc/group", gbuf) < 0) { printf("cannot open group file\n"); done(); } do { field(name, gbuf); p = name; q = argv[1]; while(*p == *q++) if(*p++ == 0 || p >= name+8) goto l1; } while(skip(gbuf)); printf("%s: not a valid groic"); case 0050000: return("bis"); case 0060000: return("add"); case 0070000: switch(n&0177000) { case 0070000: return("mul"); case 0071000: return("div"); case 0072000: return("ash"); case 0073000: return("ashc"); case 0074000: return("xor"); } break; case 0100000: switch(n&0177400) { case 0100000: return("bpl"); case 0100400: return("bmi"); case 0101000: return("bhi"); case 0101400: return("blos"); case 0102000: return("bvc"printf("%c ", (nlp->typ&040? "UATDBC":"uatdbc")[j]); } printf("%.8s\n", nlp); out: nlp++; } flush(); } compare(p1, p2) struct nl *p1, *p2; { int a, i; a = 0; if(nflg) { if(p1->val > p2->val) { a = 1; goto out; } if(p1->val < p2->val) { a = -1; goto out; } } for(i=0; i<8; i++) if(p1->name[i] != p2->name[i]) { if(p1->name[i] > p2->name[i]) a = 1; else a = -1; goto out; } out: return(a*rflg); } printo(v) { int i; printf("%c", v<0?'1':'0'); for(i=0; i<5; i++up name\n", argv[1]); done(); l1: if(fopen("/etc/passwd", pbuf) < 0) { printf("cannot open password file\n"); done(); } p = space; id = getuid() & 0377; do { field(p, pbuf); field(name, pbuf); if(value(pbuf) == id) { if(name[0] == 0) pwdflg++; while(*p++) ; } } while(skip(pbuf)); *p = 0; field(passwd, gbuf); id = value(gbuf); if(id == 1) { pwdflg = 0; goto l2; } do { p = space; field(name, gbuf); while(*p) { q = name; while(*p == *q++) { if(*p++ == 0)); case 0102400: return("bvs"); case 0103000: return("bhis"); case 0103400: return("blo"); case 0104000: return("emt"); case 0104400: return("sys"); } switch(n&0177700) { case 0105000: return("clrb"); case 0105100: return("comb"); case 0105200: return("incb"); case 0105300: return("decb"); case 0105400: return("negb"); case 0105500: return("adcb"); case 0105600: return("sbcb"); case 0105700: return("tstb"); case 0106000: ) { printf("%c", ((v>>12)&7)+'0'); v =<<3; } }  goto l2; } while(*p++) ; } } while(peek == ','); goto no; l2: if(pwdflg && passwd[0]) { printf("password: "); gtty(0, pbuf); pbuf[3] = pbuf[2]; pbuf[2] =& ~010; stty(0, pbuf); read(0, gbuf, 512); pbuf[2] = pbuf[3]; stty(0, pbuf); printf("\n"); p = name; q = gbuf; while(p < name+8) { if(*q == '\n') break; *p++ = *q++; } *p = 0; p = crypt(name); q = passwd; while(q < passwd+8) if(*p++ != *q++) goto no; } if(setgid(id) < 0) { perror("setg return("rorb"); case 0106100: return("rolb"); case 0106200: return("asrb"); case 0106300: return("aslb"); case 0106500: return("mfpd"); case 0106600: return("mfpd"); } break; case 0110000: return("movb"); case 0120000: return("cmpb"); case 0130000: return("bitb"); case 0140000: return("bicb"); case 0150000: return("bisb"); case 0160000: return("sub"); case 0170000: switch(n&01777000) { case 0:0; } break; } return("???"); } / read and echo character from tty. / perform normal cr/lf uc/lc mapping. tks = 177560 tkb = 177562 getc: tstb *$tks bge getc mov tkb,r0 bic $!177,r0 cmp r0,$'A blo 1f cmp r0,$'Z bhi 1f add $'a-'A,r0 1: cmp r0,$'\r bne putc mov $'\n,r0 / put a character on the tty. / also performs delay. tps = 177564 tpb = 177566 putc: cmp r0,$'\n bne 1f mov $'\r,r0 jsr pc,(r5) mov $'\n,r0 1: tstb tps bpl 1b mov r0,tpb rts pc / write a string to tty / jsr pc, mesg; ; .even mesg: movb *(sp),id"); goto no; } done(); no: printf("Sorry\n"); done(); } skip(buf) { while(peek > 0) { if(peek == '\n') { peek = 1; return(1); } peek = getc(buf); } return(0); } field(cp, buf) { register c; register char *p, *q; p = cp; q = p+8; while((c = getc(buf)) != '\n') { if(c == ',' || c == ':' || c <= 0) break; if(p < q) *p++ = c; } *p = 0; peek = c; } value(buf) { register n, c; n = 0; while((c = getc(buf)) >= '0' && c <= '9') n = n*10 + c-'0'; peek = c; return/* nohup */ char *args[100]; char string[10000]; main(argc, argv) int argc; char *argv[]; { int i; char **argp, *strp, *p; if(argc < 2) { printf("arg count\n"); exit(); } argc--; argv++; argp = args; strp = string; for (i=0; i<9; i++) *strp++ = "/usr/bin/"[i]; for(i=0; i 1 && argv[1][0] == '-') { nicarg = atoi(&argv[1][1]); argc--; argv++; } if(argc < 2) { printf("usage: nice [ -n ] command\n"); exit(1); } argc--; argv++; argp = args; strp = string; for (i=0; i<9; i++) *strp++ = "/usr/bin/"[i]; for(i=0; i 0 && *argv[1] == '-') { argv++; while (*++*argv) switch (**argv) { case 'n': nflg++; continue; case 'c': cflg++; continue; case 'g': gflg++; continue; case 'u': uflg++; continue; case 'r': rflg = -1; continue; case 'p': pflg ++; cnicarg); execv(string+9, args); execv(string+4, args); execv(string, args); printf("%s not found\n", string+9); exit(1); } # char *dargv[] { "/dev/rrk2", "/dev/rrp0", 0 }; #define NINODE 16*16 #include "/usr/sys/ino.h" #include "/usr/sys/filsys.h" struct filsys sblock; struct inode inode[NINODE]; int sflg; int aflg; #define NI 20 #define NDIRS 787 int ilist[NI] { -1}; int fi; struct htab { int hino; int hpino; char hname[14]; } htab[NDIRS]; int nhent 10; int (*pass[])() { pass1, pass2, pass3 }; char *lasts; int ino; int nerror; int nffil; int fout; int nfiles; struct dir { int ino; char name[14]; }; main(argc, argontinue; default: continue; } argc--; } if (argc==0) fi = open("a.out", 0); else fi = open(*++argv, 0); if(fi < 0) { printf("cannot open input\n"); exit(); } read(fi, buf, 020); if(buf[0]!=0407 && buf[0]!=0410 && buf[0]!=0411) { printf("bad format\n"); exit(); } seek(fi, buf[1], 1); /* text */ seek(fi, buf[2], 1); /* data */ if(buf[7] != 1) { seek(fi, buf[1], 1); seek(fi, buf[2], 1); /* reloc */ } n = ldiv(0, buf[4], 12); if(n == 0) { printf("no name list\n"); ex...+lib,source%runv) char **argv; { register char **p; register int n, *lp; nffil = dup(1); if (argc == 1) { for (p = dargv; *p;) check(*p++); return(nerror); } while (--argc) { argv++; if (**argv=='-') switch ((*argv)[1]) { case 's': sflg++; continue; case 'a': aflg++; continue; case 'i': lp = ilist; while (lp < &ilist[NI-1] && (n = number(argv[1]))) { *lp++ = n; argv++; argc--; } *lp++ = -1; continue; default: printf2("Bad flag\n"); } check(*argv);  } return(nerror); } check(file) char *file; { register i, j, pno; fi = open(file, 0); if (fi < 0) { printf2("cannot open %s\n", file); return; } printf2("%s:\n", file); sync(); bread(1, &sblock, 512); nfiles = sblock.s_isize*16; for (i=0; i= 0){ write(1,"main(argc, argv) int argc; char **argv; { int m, a, b; if(argc != 5) { printf("arg count\n"); goto usage; } if(*argv[2] == 'b') m = 0160666; else if(*argv[2] == 'c') m = 0120666; else goto usage; a = number(argv[3]); if(a < 0) goto usage; b = number(argv[4]); if(b < 0) goto usage; if(mknod(argv[1], m, (a<<8)|b) < 0) perror("mknod"); exit(); usage: printf("usage: mknod name b/c major minor\n"); } number(s) char *s; { int n, c; n = 0; while(c = *s++) { if(c<'0' || c>'9') j]); } } } flush(); fout = 1; } pass1(ip) { if ((ip->i_mode&IALLOC)==0 || (ip->i_mode&IFMT)!=IFDIR) return; lookup(ino, 1); } pass2(ip) struct inode *ip; { register doff; register struct htab *hp; register struct dir *dp; int i; if ((ip->i_mode&IALLOC)==0 || (ip->i_mode&IFMT)!=IFDIR) return; doff = 0; while (dp = dread(ip, doff)) { doff =+ 16; if (dp->ino==0) continue; if ((hp = lookup(dp->ino, 0)) == 0) continue; if (dotname(dp)) continue; hp->hpino = ino; for (Directory target exists.\n",25); exit(); } argp1 = argp[1]; argp2 = argp[2]; while(*argp1 == *argp2){ argp1++; if(*argp2++ == 0){ write(1,"???\n",4); exit(); } } while(*argp1)if(*argp1++ == '/'){ write(1,"Directory rename only\n",22); exit(); } while(*argp2)if(*argp2++ == '/'){ write(1,"Directory rename only\n",22); exit(); } if(*--argp1 == '.'){ write(1,"values of B will give rise to dom!\n",37); exit(); } }else{ /* the source is a file. */ setuid(getuid()); if(sta return(-1); n = n*10 + c-'0'; } return(n); } i=0; i<14; i++) hp->hname[i] = dp->name[i]; } } pass3(ip) struct inode *ip; { register doff; register struct dir *dp; register int *ilp; if ((ip->i_mode&IALLOC)==0 || (ip->i_mode&IFMT)!=IFDIR) return; doff = 0; while (dp = dread(ip, doff)) { doff =+ 16; if (dp->ino==0) continue; if (aflg==0 && dotname(dp)) continue; for (ilp=ilist; *ilp >= 0; ilp++) if (*ilp == dp->ino) break; if (ilp > ilist && *ilp!=dp->ino) continue; printf("%d ", dp->ino); pname(ino, 0); prit(argp4, &stbuf[2]) >= 0){ if((stbuf[2].imode & 060000) == 040000){ argp2 = strbuf; while(*argp2++ = *argp4++); argp2[-1] = '/'; argp4 = argp[1]; argp1 = argp[1]; while(*argp4) if(*argp4++ == '/') argp1 = argp4; while(*argp2++ = *argp1++); argp4 = strbuf; } if(stat(argp4, &stbuf[2]) >= 0){ if((stbuf[0]==stbuf[2]) && (stbuf[1]==stbuf[3])){ write(1,"Files are identical.\n",21); exit(); } if((getuid()&0377) == stbuf[2].uid) b = 0200; else if((getgintf("/%.14s\n", dp->name); } } dotname(adp) { register struct dir *dp; dp = adp; if (dp->name[0]=='.') if (dp->name[1]==0 || dp->name[1]=='.' && dp->name[2]==0) return(1); return(0); } pname(i, lev) { register struct htab *hp; if (i==1) return; if ((hp = lookup(i, 0)) == 0) { printf("???"); return; } if (lev > 10) { printf("..."); return; } pname(hp->hpino, ++lev); printf("/%.14s", hp->hname); } lookup(i, ef) { register struct htab *hp; for (hp = &htab[i%NDIRS]; hp->hino;d()&0377) == stbuf[2].gid) b = 020; else b = 02; if((stbuf[2].imode & b) == 0) { printf("%s: %o mode ", argp4, stbuf[2].imode & 07777); i = b = getchar(); while(b != '\n' && b != '\0') b = getchar(); if(i != 'y') exit(); } if(unlink(argp4) < 0){ write(1,"Cannot remove target file.\n",27); exit(); } } } } if(link(argp3, argp4) < 0){ i = fork(); if(i == -1){ write(1,"Try again.\n",11); exit(); } if(i){ while(wait(&status) != i); }else{ # struct { char *s_isize; char *s_fsize; int s_nfree; int s_free[100]; int s_ninode; int s_inode[100]; char s_flock; char s_ilock; char s_fmod; int s_time[2]; } filsys; struct inode { int i_number; int i_mode; char i_nlink; char i_uid; char i_gid; char i_size0; char *i_size1; int i_addr[8]; int i_time[4]; }; /* modes */ #define IALLOC 0100000 #define IFMT 060000 #define IFDIR 040000 #define IFCHR 020000 #define IFBLK 060000 #define ILARG 010000 #define ISUID 04000 #define ISGID 02000) { if (hp->hino==i) return(hp); if (++hp >= &htab[NDIRS]) hp = htab; } if (ef==0) return(0); if (++nhent >= NDIRS) { printf2("Out of core-- increase NDIRS\n"); flush(); exit(1); } hp->hino = i; return(hp); } dread(aip, aoff) { register b, off; register struct inode *ip; static ibuf[256]; static char buf[512]; off = aoff; ip = aip; if ((off&0777)==0) { if (off==0177000) { printf2("Monstrous directory %l\n", ino); return(0); } if ((ip->i_mode&ILARG)==0) { if (o p = place; p1 = p; while(*p++ = *argp3++); p2 = p; while(*p++ = *argp4++); execl("/bin/cp","cp", p1, p2, 0); write(1, "no cp\n", 6); exit(1); } if((status & 0377) != 0){ write(1,"?\n", 2); exit(); } if(status != 0) exit(); } if(unlink(argp3) < 0){ write(1,"Cannot unlink source file.\n",27); exit(); } } putchar(c) { write(1, &c, 1); } getchar() { char c; if(read(0, &c, 1) != 1) return(0); return(c); }  #define IREAD 0400 #define IWRITE 0200 #define IEXEC 0100 int utime[2]; int fin; int fsi; int fso; char *charp; int buf[256]; char string[50]; char *fsys; char *proto; int f_n 1; int f_m 1; main(argc, argv) char **argv; { int f, n; /* * open relevent files */ time(utime); if(argc != 3) { printf("arg count\n"); exit(); } fsys = argv[1]; for(n=0; f=fsys[n+1]; n++) if(fsys[n] == 'r') { if(f == 'k') { f_n = 24; f_m = 3; } if(f == 'p') { f_n = 10; f_m = 4; } } proto = aff>=010000 || (b = ip->i_addr[off>>9])==0) return(0); bread(b, buf, 512); } else { if (off==0) { if (ip->i_addr[0]==0) return(0); bread(ip->i_addr[0], ibuf, 512); } if ((b = ibuf[(off>>9)&0177])==0) return(0); bread(b, buf, 512); } } return(&buf[off&0777]); } bread(bno, buf, cnt) { seek(fi, bno, 3); if (read(fi, buf, cnt) != cnt) { printf2("read error %d\n", bno); exit(); } } bwrite(bno, buf) { seek(fi, bno, 3); if (write(fi, buf, 512) != 512) { print#define NMOUNT 16 #define NAMSIZ 32 struct mtab { char file[NAMSIZ]; char spec[NAMSIZ]; } mtab[NMOUNT]; main(argc, argv) char **argv; { register int ro; register struct mtab *mp; register char *np; int n, mf; mf = open("/etc/mtab", 0); read(mf, mtab, NMOUNT*2*NAMSIZ); if (argc==1) { for (mp = mtab; mp < &mtab[NMOUNT]; mp++) if (mp->file[0]) printf("%s on %s\n", mp->spec, mp->file); return; } if(argc < 3) { printf("arg count\n"); return; } ro = 0; if(argc > 3) ro++; if(mounrgv[2]; fso = creat(fsys, 0666); if(fso < 0) { printf("%s: cannot create\n", fsys); exit(); } fsi = open(fsys, 0); if(fsi < 0) { printf("%s: cannot open\n", fsys); exit(); } fin = open(proto, 0); if(fin < 0) { n = 0; for(f=0; proto[f]; f++) { if(proto[f]<'0' || proto[f]>'9') { printf("%s: cannot open\n", proto); exit(); } n = n*10 + proto[f]-'0'; } filsys.s_fsize = n; filsys.s_isize = ldiv(0, n, 43+ldiv(0, n, 1000)); printf("isize = %d\n", filsys.s_isize); if(ff2("write error %d\n", bno); exit(); } } number(as) char *as; { register n, c; register char *s; s = as; n = 0; while ((c = *s++) >= '0' && c <= '9') { n = n*10+c-'0'; } return(n); } printf2(s, a1, a2) { extern fout; flush(); fout = 2; printf(s, a1, a2); fout = nffil; flush(); } t(argv[1], argv[2], ro) < 0) { perror("mount"); return; } np = argv[1]; while(*np++) ; np--; while(*--np == '/') *np = '\0'; while(np > argv[1] && *--np != '/') ; if(*np == '/') np++; argv[1] = np; for (mp = mtab; mp < &mtab[NMOUNT]; mp++) { if (mp->file[0] == 0) { for (np = mp->spec; np < &mp->spec[NAMSIZ-1];) if ((*np++ = *argv[1]++) == 0) argv[1]--; for (np = mp->file; np < &mp->file[NAMSIZ-1];) if ((*np++ = *argv[2]++) == 0) argv[2]--; mp = &mtab[NMOUNT]_n != 1) printf("free list %d/%d\n", f_m, f_n); charp = "d--777 0 0 $ "; goto f3; } /* * get name of boot load program * and read onto block 0 */ getstr(); f = open(string, 0); if(f < 0) { printf("%s: cannot open init\n", string); goto f2; } read(f, buf, 020); if(buf[0] != 0407) { printf("%s: bad format\n", string); goto f1; } n = buf[1]+buf[2]; if(n > 512) { printf("%s: too big\n", string); goto f1; } read(f, buf, n); wtfs(0, buf); f1: close(f); /* * get tota/* mv [-d] file1 file2 unlink file2 link file1 file2 unlink file1 */ int stbuf[42]; struct sbuf { int dev; int inum; int imode; char nlink; char uid; char gid; char siz0; char siz1; int addr[8]; int adate[2]; int mdate[2]; }; char strbuf[70]; main(argc,argv) int argc; char *argv[]; { char **argp; char *argp1, *argp2, *argp3, *argp4; char *p, *p1, *p2; char place[100]; int i; int status; int b; argp = argv; /* check for correct number of arguments */ if(argc != 3){ write(1,"Usage: mv name1 name2\n",22);; while ((--mp)->file[0] == 0); mf = creat("/etc/mtab", 0644); write(mf, mtab, (mp-mtab+1)*2*NAMSIZ); return; } } } l disk size * and inode block size */ f2: filsys.s_fsize = getnum(); filsys.s_isize = getnum(); f3: if(filsys.s_isize > filsys.s_fsize || filsys.s_fsize-filsys.s_isize-2 < filsys.s_isize) { printf("%l/%l: bad ratio\n", filsys.s_fsize, filsys.s_isize); exit(); } bflist(); /* * initialize files */ for(n=0; n<256; n++) buf[n] = 0; for(n=0; n!=filsys.s_isize; n++) wtfs(n+2, buf); cfile(0); /* * write out super block */ for(n=0; n<256; n++) buf[n] = 0; filsys.s_time[0] = utime[0]; filsys.s_time[1] = utime[1]; wtfs(1, &filsys); } cfile(par) struct inode *par; { struct inode in; int db[256], ib[256]; int dbc, ibc; static ino; int i, f, *p1, *p2; /* * get mode, uid and gid */ getstr(); in.i_mode = IALLOC; in.i_mode =| gmode(string[0], "bcd", IFBLK, IFCHR, IFDIR); in.i_mode =| gmode(string[1], "u", ISUID); in.i_mode =| gmode(string[2], "g", ISGID); for(i=3; i<6; i++) { if(string[i]<'0' || string[i]>'7') { printf("%c/%s: bad digit\n", string[i], stri { *s++ = *str; if(*str != '\0') str++; } *adbc =+ 7; if(*adbc >= 256) newblk(adbc, db, aibc, ib); } newblk(adbc, db, aibc, ib) int *adbc, *db, *aibc, *ib; { int bno, i; bno = alloc(); wtfs(bno, db); for(i=0; i<256; i++) db[i] = 0; *adbc = 0; ib[*aibc] = bno; (*aibc)++; if(*aibc >= 256) { printf("indirect block full\n"); exit(); } } getch() { if(charp) return(*charp++); return(getchar()); } bflist() { char flg[100], adr[100]; register i, j; char *low, *high; if(f_n ># /* mail command usage mail prints your mail mail people sends standard input to people */ #define SIGINT 2 struct utmp { char name[8]; char tty; char pad1; int ltime[2]; int pad2; }; struct passwd { char *pw_name; char *pw_passwd; int pw_uid; int pw_gid; char *pw_gecos; char *pw_dir; char *pw_shell; }; char lettmp[] "/tmp/maxxxxx"; char preptmp[] "/tmp/mbxxxxx"; int pwfil; main(argc, argv) char **argv; { register me; extern fout; register struct passwd *p; register char *cp; sng); exit(); } in.i_mode =| (string[i]-'0')<<(15-3*i); } in.i_uid = getnum(); in.i_gid = getnum(); /* * general initialization prior to * switching on format */ ino++; in.i_number = ino; if(ldiv(0, ino, 16) > filsys.s_isize) { printf("too many inodes\n"); exit(); } in.i_nlink = 1; in.i_size0 = 0; in.i_size1 = 0; for(i=0; i<8; i++) in.i_addr[i] = 0; for(i=0; i<256; i++) { db[i] = 0; ib[i] = 0; } if(par == 0) { par = ∈ in.i_nlink--; } dbc = 0; ibc = 0; switch 100) f_n = 100; for(i=0; i= low+f_n; i =- f_n) for(j=0; j= low; i--) free(i); } tatic struct utmp ubuf; int uf; maketemp(); if (argc==1 || argc==2 && argv[1][0]=='-') { printmail(argc, argv); delexit(); } signal(SIGINT, delexit); fout = creat(lettmp, 0600); if (((me=ttyn(1))!='x' || (me=ttyn(2))!='x') && (uf = open("/etc/utmp", 0)) > 0) { while (read(uf, &ubuf, sizeof ubuf) == sizeof ubuf) if (ubuf.tty == me) { ubuf.name[8] = ' '; close(uf); for (cp=ubuf.name; *cp++!=' ';); *--cp = 0; bulkmail(argc, argv, ubuf.name); } } me = getuid() & 0377;(in.i_mode&IFMT) { case 0: /* * regular file * contents is a file name */ getstr(); f = open(string, 0); if(f < 0) { printf("%s: cannot open\n", string); break; } while((i=read(f, db, 512)) > 0) { in.i_size1 =+ i; newblk(&dbc, db, &ibc, ib); } close(f); break; case IFBLK: case IFCHR: /* * special file * content is maj/min types */ in.i_addr[0] = getnum()<<8; in.i_addr[0] =| getnum(); break; case IFDIR: /* * directory * put in extra lin/ makdir -- make a directory sys getuid mov r0,uid mov sp,r5 tst (r5)+ loop: tst (r5)+ dec (sp) bgt 1f sys exit 1: mov (r5),r0 mov $buf1,r1 mov $buf2,r2 clr r3 1: movb (r0)+,r4 beq 2f movb r4,(r1)+ movb r4,(r2)+ cmpb r4,$'/ bne 1b mov r2,r3 br 1b 2: movb $'/,(r1)+ movb $'.,(r1)+ clrb (r1) mov $dot,dir tst r3 beq 1f mov $buf2,dir clrb (r3) cmp r3,$buf2+1 beq 1f clrb -(r3) / ??? 1: tstb uid beq 2f sys stat; dir:..; stbuf / status of parent dir bes error mov stbuf+4,r0 c setpw(); for (;;) if ((p = getpwent()) && p->pw_uid == me) bulkmail(argc, argv, p->pw_name); fout = 1; printf("Who are you?\n"); delexit(); } printmail(argc, argv) char **argv; { extern fin, fout; register n, c, f; if (fopen(".mail", &fin)>=0 && (c = getchar())) { do { putchar(c); } while (c = getchar()); close(fin); c = 'y'; if (argc<2) { if (ttyn(0)!='x') { printf("Save?"); fin = 0; c = getchar(); } } else c = argv[1][1]; if (c=='y') { prepend(".maiks * call recursively until * name of "$" found */ par->i_nlink++; entry(par->i_number, "..", &dbc, db, &ibc, ib); in.i_nlink++; entry(in.i_number, ".", &dbc, db, &ibc, ib); in.i_size1 = 32; for(;;) { getstr(); if(string[0]=='$' && string[1]=='\0') break; entry(ino+1, string, &dbc, db, &ibc, ib); in.i_size1 =+ 16; cfile(&in); } break; } if(dbc != 0) newblk(&dbc, db, &ibc, ib); if(ibc > 8) { in.i_mode =| ILARG; dbc = alloc(); wtfs(dbc, ib); in.i_addr[mpb uid,stbuf+7 bne 1f ash $-6,r0 1: ror r0 ror r0 bcc error / no write permission in parent 2: mov (r5),0f sys makdir; 0:..; 140777; 0 bes error / prob already exists mov (r5),0f sys chown; 0:..; uid:.. mov (r5),0f sys link; 0:..; buf1 bes error movb $'.,(r1)+ clrb (r1) mov dir,0f sys link; 0:..; buf1 bec loop error: mov (r5),r0 mov r0,0f clr 0f+2 1: tstb (r0)+ beq 1f inc 0f+2 br 1b 1: mov $1,r0 sys write; 0:..; .. mov $1,r0 sys write; ques; 3 br loop dot: <.\0> ques: < l", "mbox"); printf("Saved mail in 'mbox'\n"); } close(creat(".mail")); } else printf("No mail.\n"); } bulkmail(argc, argv, from) char **argv, *from; { extern fin, fout; int tbuf[2]; register c; fin = 0; (&fin)[1] = 0; time(tbuf); printf("From %s %s", from, ctime(tbuf)); while (c = getchar()) putchar(c); putchar('\n'); flush(); close(fout); while (--argc > 0) sendto(*++argv); delexit(); } sendto(person) char *person; { static saved; extern fout; extern fin; register struct 0] = dbc; } else for(i=0; i .even .bss buf1: .=.+100. buf2: .=.+100. stbuf: .=.+40. passwd *p; setpw(); while (p = getpwent()) { if (equal(p->pw_name, person)) { if (prepend(lettmp, cat(p->pw_dir, "/.mail"))==0) break; return; } } fout = 1; flush(); printf("Can't send to %s.\n", person); if (ttyn(0)!='x' && saved==0) { unlink("dead.letter"); saved++; printf("Letter saved in 'dead.letter'\n"); prepend(lettmp, "dead.letter"); } } prepend(from, to) char *from, *to; { extern int fin, fout; fcreat(preptmp, &fout); fopen(from, &fin); while (putchar(getchar())etnum() { int n, i; getstr(); n = 0; i = 0; for(i=0; string[i]!='\0'; i++) { if(string[i]<'0' || string[i]>'9') { printf("%s: bad number\n", string); exit(); } n = n*10 + string[i] - '0'; } return(n); } getstr() { int i, c; loop: switch(c=getch()) { case ' ': case '\t': case '\n': goto loop; case '\0': printf("EOF\n"); exit(); case ':': while(getch() != '\n'); goto loop; } i = 0; do { string[i++] = c; c = getch(); } while(c!=' '&&c!='\t'&&c!='\n'&&c!='\0')/* * mesg -- set current tty to accept or * forbid write permission. * * mesg [y] [n] * y allow messages * n forbid messages */ int sbuf[40]; main(argc, argv) char *argv[]; { register char *tty; tty = "/dev/ttyx"; tty[8] = ttyn(1); if(stat(tty, sbuf) < 0) { write(2, "cannot stat\n", 12); exit(1); } if(argc < 2) { if(sbuf[2] & 02) goto no; goto yes; } if(*argv[1] == 'y') goto yes; no: if(chmod(tty, 0600) < 0) goto bad; goto was; yes: if(chmod(tty, 0622) < 0) goto bad); close(fin); fopen(to, &fin); while (putchar(getchar())); close(fin); flush(); close(fout); if (fcreat(to, &fout) < 0) { fout = 1; return(0); } fopen(preptmp, &fin); while(putchar(getchar())); flush(); close(fout); close(fin); fout = 1; return(1); } setpw() { extern fin; if (pwfil == 0) { fopen("/etc/passwd", &fin); pwfil = fin; } else fin = pwfil; (&fin)[1] = 0; seek(fin, 0, 0); } getpwent() { register char *p; register c; static struct passwd passwd; static char line; string[i] = '\0'; } rdfs(bno, bf) { int n; seek(fsi, bno, 3); n = read(fsi, bf, 512); if(n != 512) { printf("read error: %l\n", bno); exit(); } } wtfs(bno, bf) { int n; seek(fso, bno, 3); n = write(fso, bf, 512); if(n != 512) { printf("write error: %l\n", bno); exit(); } } alloc() { int bno, i; filsys.s_nfree--; bno = filsys.s_free[filsys.s_nfree]; filsys.s_free[filsys.s_nfree] = 0; if(bno == 0) { printf("out of free space\n"); exit(); } if(filsys.s_nfree <= 0) { rdfs; was: if(sbuf[2] & 02) write(2, "was y\n", 6); else write(2, "was n\n", 6); exit(0); bad: write(2, "cannot change mode\n", 19); exit(1); } [100]; extern fin; p = line; while((c=getchar()) != '\n') { if(c <= 0) return(0); if(p < line+98) *p++ = c; } *p = 0; p = line; passwd.pw_name = p; p = pwskip(p); passwd.pw_passwd = p; p = pwskip(p); passwd.pw_uid = atoi(p); p = pwskip(p); passwd.pw_gid = atoi(p); p = pwskip(p); passwd.pw_gecos = p; p = pwskip(p); passwd.pw_dir = p; p = pwskip(p); passwd.pw_shell = p; return(&passwd); } pwskip(ap) char *ap; { register char *p; p = ap; while(*p != ':') { if(*p == 0) r(bno, buf); filsys.s_nfree = buf[0]; for(i=0; i<100; i++) filsys.s_free[i] = buf[i+1]; } return(bno); } free(bno) { int i; if(filsys.s_nfree >= 100) { buf[0] = filsys.s_nfree; for(i=0; i<100; i++) buf[i+1] = filsys.s_free[i]; wtfs(bno, buf); filsys.s_nfree = 0; } filsys.s_free[filsys.s_nfree] = bno; filsys.s_nfree++; } entry(ino, str, adbc, db, aibc, ib) char *str; int *adbc, *db, *aibc, *ib; { char *s; int i; db[*adbc] = ino; (*adbc)++; s = &db[*adbc]; for(i=0; i<14; i++)eturn(p); p++; } *p++ = 0; return(p); } delexit() { unlink(lettmp); unlink(preptmp); exit(0); } maketemp() { int i, pid, d; pid = getpid(); for (i=11; i>=7; --i) { d = (pid&07) + '0'; lettmp[i] = d; preptmp[i] = d; pid =>> 3; } } equal(as1, as2) { register char *s1, *s2; s1 = as1; s2 = as2; while (*s1++ == *s2) if (*s2++ == 0) return(1); return(0); } cat(ap1, ap2) char *ap1, *ap2; { register char *p1, *p2; static char fn[32]; p1 = ap1; p2 = fn; while (*p2++ = *p1++); p2--; p1 = ap2; while (*p2++ = *p1++); return(fn); } $2 ); conout( $$, $2 ); bundle( $1, "s.", $3, $2, " " ); } | '~' LETTER '=' e ={ bundle($4,"S",$2); } ; EQOP : EQPL ={ $$ = "+"; } | EQMI ={ $$ = "-"; } | EQMUL ={ $$ = "*"; } | EQDIV ={ $$ = "/"; } | EQREM ={ $$ = "%%"; } | EQEXP ={ $$ = "^"; } ; fprefix : _FOR '(' e ';' ={ $$ = $3; } ; BLEV : ={ --bindx; } ; slist : stat | slist tail stat ={ bundle( $1, $3 ); } ; tail : '\n' | ';' ; re : e EQ e = bundle( $1, $3, "=" ); | e '<' e = bundle( *letr[26] { "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" } ; char *dot { "." }; yylex(){ int c,ch; restart: c = getc(); peekc = -1; while( c == ' ' || c == '\t' ) c = getc(); if( c<= 'z' && c >= 'a' ) { /* look ahead to look for reserved words */ peekc = getc(); if( peekc >= 'a' && peekc <= 'z' ){ /* must be reserved word */ if( c=='i' && peekc=='f' ){ c=_IF; goto skip; } if( c=='w' && peekc=='h' ){ c=_WHIL...y.tab.c!runlex.cl.outr1.or.gr.hr1.cr2.cr2.olex.oa.outa.outa.out $1, $3, ">" ); | e '>' e = bundle( $1, $3, "<" ); | e NE e = bundle( $1, $3, "!=" ); | e GE e = bundle( $1, $3, "!>" ); | e LE e = bundle( $1, $3, "!<" ); | e = bundle( $1, " 0!=" ); ; e : e '+' e = bundle( $1, $3, "+" ); | e '-' e = bundle( $1, $3, "-" ); | '-' e %prec UMINUS = bundle( " 0", $2, "-" ); | e '*' e = bundle( $1, $3, "*" ); | e '/' e = bundle( $1, $3, "/" ); | e '%' e = bundle( $1, $3, "%%" ); | e '^' e = bundle( $1, $3, "^" ); | LETTER '[' eE; goto skip; } if( c=='f' && peekc=='o' ){ c=_FOR; goto skip; } if( c=='s' && peekc=='q' ){ c=SQRT; goto skip; } if( c=='r' && peekc=='e' ){ c=_RETURN; goto skip; } if( c=='b' && peekc=='r' ){ c=_BREAK; goto skip; } if( c=='d' && peekc=='e' ){ c=_DEFINE; goto skip; } if( c=='s' && peekc=='c' ){ c= SCALE; goto skip; } if( c=='b' && peekc=='a' ){ c=BASE; goto skip; } if( c=='o' && peekc=='b' ){ c=OBASE; goto skip; } if( c=='d' && peekc=='i' ){ c=FFF; goto...`sno.hasno1.c'sno2.cGsno3.c/sno4.chrunl.outsno1.osno2.osno3.osno4.oa.out ']' ={ bundle($3, ";", geta($1)); } | LETTER INCR = bundle( "l", $1, "d1+s", $1 ); | INCR LETTER = bundle( "l", $2, "1+ds", $2 ); | DECR LETTER = bundle( "l", $2, "1-ds", $2 ); | LETTER DECR = bundle( "l", $1, "d1-s", $1 ); | LETTER '[' e ']' INCR = bundle($3,";",geta($1),"d1+",$3,":",geta($1)); | INCR LETTER '[' e ']' = bundle($4,";",geta($2),"1+d",$4,":",geta($2)); | LETTER '[' e ']' DECR = bundle($3,";",geta($1),"d1-",$3,":",geta($1)); | DECR LETTER '[' e ']' = bundle($4,"; skip; } if( c=='a' && peekc=='u' ){ c=_AUTO; goto skip; } if( c == 'q' && peekc == 'u')getout(); /* could not be found */ return( error ); skip: /* skip over rest of word */ peekc = -1; while( (ch = getc()) >= 'a' && ch <= 'z' ); peekc = ch; return( c ); } /* usual case; just one single letter */ yylval = letr[c-'a']; return( LETTER ); } if( c>= '0' && c <= '9' || c>= 'A' && c<= 'F' ){ yylval = c; return( DIGIT ); } switch( ",geta($2),"1-d",$4,":",geta($2)); | SCALE INCR = bundle("Kd1+k"); | INCR SCALE = bundle("K1+dk"); | SCALE DECR = bundle("Kd1-k"); | DECR SCALE = bundle("K1-dk"); | BASE INCR = bundle("Id1+i"); | INCR BASE = bundle("I1+di"); | BASE DECR = bundle("Id1-i"); | DECR BASE = bundle("I1-di"); | OBASE INCR = bundle("Od1+o"); | INCR OBASE = bundle("O1+do"); | OBASE DECR = bundle("Od1-o"); | DECR OBASE = bundle("O1-do"); | LETTER '(' cargs ')' = bundle( $3, "l", getf($1), "x" )c ){ case '.': return( DOT ); case '=': switch( peekc = getc() ){ case '=': c=EQ; goto gotit; case '+': c=EQPL; goto gotit; case '-': c=EQMI; goto gotit; case '*': c=EQMUL; goto gotit; case '/': c=EQDIV; goto gotit; case '%': c=EQREM; goto gotit; case '^': c=EQEXP; goto gotit; default: return( '=' ); gotit: peekc = -1; return(c); } case '+': return( cpeek( '+', INCR, '+' ) ); case '-': return( cpee%right '=' %left '+' '-' %left '*' '/' '%' %right '^' %left UMINUS %term LETTER DIGIT SQRT _IF FFF EQ %term _WHILE _FOR NE LE GE INCR DECR %term _RETURN _BREAK _DEFINE BASE OBASE SCALE %term EQPL EQMI EQMUL EQDIV EQREM EQEXP %term _AUTO DOT %term QSTR %{ char cary[1000], *cp { cary }; char string[1000], *str {string}; int crs '0'; int rcrs '0'; /* reset crs */ int bindx 0; int lev 0; int bstack[10] { 0 }; char *numb[15] { " 0", " 1", " 2", " 3", " 4", " 5", " 6", " 7", " 8", " 9", " 10", " 11", " ; | LETTER '(' ')' = bundle( "l", getf($1), "x" ); | cons ={ bundle( " ", $1 ); } | DOT cons ={ bundle( " .", $2 ); } | cons DOT cons ={ bundle( " ", $1, ".", $3 ); } | cons DOT ={ bundle( " ", $1, "." ); } | DOT ={ $$ = "l."; } | LETTER = { bundle( "l", $1 ); } | LETTER '=' e ={ bundle( $3, "ds", $1 ); } | LETTER EQOP e %prec '=' ={ bundle( "l", $1, $3, $2, "ds", $1 ); } | '(' e ')' = { $$ = $2; } | '?' ={ bundle( "?" ); } | SQRT '(' e ')' ={ bundle( $3, "v" k( '-', DECR, '-' ) ); case '<': return( cpeek( '=', LE, '<' ) ); case '>': return( cpeek( '=', GE, '>' ) ); case '!': return( cpeek( '=', NE, '!' ) ); case '/': if((peekc = getc()) == '*'){ peekc = -1; while((getc() != '*') || ((peekc = getc()) != '/')); peekc = -1; goto restart; } else return(c); case '"': yylval = str; while((c=getc()) != '"')*str++ = c; *str++ = '\0'; return(QSTR); default: return( c ); } } cpeek( c, yes, n12", " 13", " 14" }; int *pre, *post; %} %% start : | start stat tail = output( $2 ); | start def dargs ')' '{' dlist slist '}' ={ bundle( pre, $7, post ); conout( $$, $2 ); rcrs = crs; output( "" ); lev = bindx = 0; } ; dlist : tail | dlist _AUTO dlets tail ; stat : e ={ bundle( $1, "ps." ); } | ={ bundle( "" ); } | QSTR ={ bundle("[",$1,"]P");} | LETTER '=' e ={ bundle( $3, "s", $1 ); } | LETTER '[' e ']' '=' e ={ bundle( $6, $3, ":", geta($1)); } | LETT); } | '~' LETTER ={ bundle("L",$2); } | SCALE e = bundle($2,"dk"); | SCALE '=' e = bundle($3,"dk"); | SCALE EQOP e %prec '=' = bundle("K",$3,$2,"dk"); | BASE e = bundle($2,"di"); | BASE '=' e = bundle($3,"di"); | BASE EQOP e %prec '=' = bundle("I",$3,$2,"di"); | OBASE e = bundle($2,"do"); | OBASE '=' e = bundle($3,"do"); | OBASE EQOP e %prec '=' = bundle("O",$3,$2,"do"); | SCALE = bundle("K"); | BASE = bundle("I"); | OBASE = bundle("O"); ; cargs : eora | cargo ){ if( (peekc=getc()) != c ) return( no ); else { peekc = -1; return( yes ); } } getc(){ int ch; loop: ch = (peekc < 0) ? getchar() : peekc; peekc = -1; if(ch != '\0')return(ch); if(++ifile > sargc){ if(ifile >= sargc+2)getout(); fin = dup(0); goto loop; } close(fin); if((fin = open(sargv[ifile],0)) >= 0)goto loop; yyerror("cannot open input file"); } # define b_sp_max 1500 int b_space [ b_sp_max ]; int * b_sp_nxt { b_space }; bdebug 0; bundle(a){ int i, *p, *q; ER EQOP e ={ bundle( "l", $1, $3, $2, "s", $1 ); } | LETTER '[' e ']' EQOP e ={ bundle($3, ";", geta($1), $6, $5, $3, ":", geta($1));} | _BREAK ={ bundle( numb[lev-bstack[bindx-1]], "Q" ); } | _RETURN '(' e ')' = bundle( $3, post, numb[lev], "Q" ); | _RETURN '(' ')' = bundle( "0", post, numb[lev], "Q" ); | SCALE e = bundle( $2, "k" ); | SCALE '=' e = bundle( $3, "k"); | SCALE EQOP e = bundle("K",$3,$2,"k"); | BASE e = bundle( $2, "i" ); | BASE '=' e = bundle($3, "i"); | BASs ',' eora = bundle( $1, $3 ); ; eora: e | LETTER '[' ']' =bundle("l",geta($1)); ; cons : constant ={ *cp++ = '\0'; } constant: '_' ={ $$ = cp; *cp++ = '_'; } | DIGIT ={ $$ = cp; *cp++ = $1; } | constant DIGIT ={ *cp++ = $2; } ; CRS : ={ $$ = cp; *cp++ = crs++; *cp++ = '\0'; bstack[bindx++] = lev++; } ; def : _DEFINE LETTER '(' ={ $$ = getf($2); pre = ""; post = ""; lev = 1; bstack[bindx=0] = 0; } ; dargs : | lora ={ pp( $1 ); } | dargs ',' lora = i = nargs(); q = b_sp_nxt; if( bdebug ) printf("bundle %d elements at %o\n", i, q ); for( p = &a; i-->0; ++p ){ if( b_sp_nxt >= & b_space[b_sp_max] ) yyerror( "bundling space exceeded" ); * b_sp_nxt++ = *p; } * b_sp_nxt++ = 0; yyval = q; return( q ); } routput(p) int *p; { if( bdebug ) printf("routput(%o)\n", p ); if( p >= &b_space[0] && p < &b_space[b_sp_max]){ /* part of a bundle */ while( *p != 0 ) routput( *p++ ); } else printf( p ); /* character strinE EQOP e = bundle("I",$3,$2,"i"); | OBASE e = bundle( $2, "o" ); | OBASE '=' e = bundle($3,"o"); | OBASE EQOP e = bundle("O",$3,$2,"o"); | '{' slist '}' ={ $$ = $2; } | FFF ={ bundle("f"); } | error ={ bundle("c"); } | _IF CRS BLEV '(' re ')' stat ={ conout( $7, $2 ); bundle( $5, $2, " " ); } | _WHILE CRS '(' re ')' stat BLEV ={ bundle( $6, $4, $2 ); conout( $$, $2 ); bundle( $4, $2, " " ); } | fprefix CRS re ';' e ')' stat BLEV ={ bundle( $7, $5, "s.", $3, { pp( $3 ); } ; dlets : lora ={ tp($1); } | dlets ',' lora ={ tp($3); } ; lora : LETTER | LETTER '[' ']' ={ $$ = geta($1); } ; %% # define error 256 int peekc -1; int sargc; int ifile; char **sargv; extern int fin; char *funtab[26]{ 01,02,03,04,05,06,07,010,011,012,013,014,015,016,017, 020,021,022,023,024,025,026,027,030,031,032 }; char *atab[26]{ 0241,0242,0243,0244,0245,0246,0247,0250,0251,0252,0253, 0254,0255,0256,0257,0260,0261,0262,0263,0264,0265,0266, 0267,0270,0271,0272}; charg */ } output( p ) int *p; { routput( p ); b_sp_nxt = & b_space[0]; printf( "\n" ); cp = cary; str = string; crs = rcrs; } conout( p, s ) int *p; char *s; { printf("["); routput( p ); printf("]s%s\n", s ); lev--; str = string; } yyerror( s ) char *s; { printf("c[%s]pc\n", s ); cp = cary; crs = rcrs; bindx = 0; lev = 0; b_sp_nxt = &b_space[0]; str = string; } pp( s ) char *s; { /* puts the relevant stuff on pre and post for the letter s */ bundle( "S", s, pre ); pre = yyval; bundle( post, "L", s, "s." ); post = yyval; } tp( s ) char *s; { /* same as pp, but for temps */ bundle( "0S", s, pre ); pre = yyval; bundle( post, "L", s, "s." ); post = yyval; } yyinit(argc,argv) int argc; char *argv[];{ int (*getout)(); signal( 2, getout ); /* ignore all interrupts */ sargv=argv; sargc= -- argc; if(sargc == 0)fin=dup(0); else if((fin = open(sargv[1],0)) < 0) yyerror("cannot open input file"); ifile = 1; } getout(){ printf("q"); ex for (i=0; i < argc; i++) { if ((ep = gstat(*++argv, 1))==0) continue; ep->namep = *argv; ep->lflags =| ISARG; } qsort(&end, lastp - &end, sizeof *lastp, compar); slastp = lastp; for (ep = &end; eplflags&DIR && dflg==0 || fflg) { if (argc>1) printf("\n%s:\n", ep->namep); lastp = slastp; readdir(ep->namep); if (fflg==0) qsort(slastp,lastp - slastp,sizeof *lastp,compar); if (statreq) printf("total %d\n", tblocks); for (ep1=slastp; ep1lflags = statb.iflags; rep->luid = statb.iuid; rep->lgid = statb.igid; rep->lnl = statb.inl; rep->lsize0 = statb.isize0; rep->lsize = statb.isize; if (rep->lflags & (BLK|CHR) && lflg) rep->lsize = statb.iaddr[0]; rep->lmtime[0] = statb.imtime[0]; rep->lmtime[1it(); } getf(p) char *p;{ return(&funtab[*p -0141]); } geta(p) char *p;{ return(&atab[*p - 0141]); } main(argc, argv) char **argv; { int p[2]; if (argc > 1 && *argv[1] == '-') { if(argv[1][1] == 'd'){ yyinit(--argc, ++argv); yyparse(); exit(); } if(argv[1][1] != 'l'){ printf("unrecognizable argument\n"); exit(); } argv[1] = "/usr/lib/lib.b"; } pipe(p); if (fork()==0) { close(1); dup(p[1]); close(p[0]); close(p[1]); yyinit(argc, argv); yyparse(); exit(); } cp; ep1++) pentry(ep1); } else pentry(ep); } flush(); } pentry(ap) struct lbuf *ap; { struct { char dminor, dmajor;}; register t; register struct lbuf *p; register char *cp; p = ap; if (p->lnum == -1) return; if (iflg) printf("%5d ", p->lnum); if (lflg) { pmode(p->lflags); printf("%2d ", p->lnl); t = p->luid; if(gflg) t = p->lgid; t =& 0377; if (getname(t, tbuf)==0) printf("%-6.6s", tbuf); else printf("%-6d", t); if (p->lflags & (BLK|CHR)) printf("%3d,%3d] = statb.imtime[1]; if(uflg) { rep->lmtime[0] = statb.iatime[0]; rep->lmtime[1] = statb.iatime[1]; } tblocks =+ nblock(statb.isize0, statb.isize); } return(rep); } compar(ap1, ap2) struct lbuf *ap1, *ap2; { register struct lbuf *p1, *p2; register int i; int j; struct { char *charp;}; p1 = ap1; p2 = ap2; if (dflg==0) { if ((p1->lflags&(DIR|ISARG)) == (DIR|ISARG)) { if ((p2->lflags&(DIR|ISARG)) != (DIR|ISARG)) return(1); } else { if ((p2->lflags&(DIR|ISARG)) == (DIR|ISARGlose(0); dup(p[0]); close(p[0]); close(p[1]); execl("/bin/dc", "dc", "-", 0); } ", p->lsize.dmajor&0377, p->lsize.dminor&0377); else printf("%7s", locv(p->lsize0, p->lsize)); cp = ctime(p->lmtime); if(p->lmtime[0] < year) printf(" %-7.7s %-4.4s ", cp+4, cp+20); else printf(" %-12.12s ", cp+4); } else if (sflg) printf("%4d ", nblock(p->lsize0, p->lsize)); if (p->lflags&ISARG) printf("%s\n", p->namep); else printf("%.14s\n", p->lname); } getname(uid, buf) int uid; char buf[]; { int j, c, n, i; if (uid==lastuid) return(0); inf.fdes = uidfil; seek(inf)) return(-1); } } if (tflg) { i = 0; if (p2->lmtime[0] > p1->lmtime[0]) i++; else if (p2->lmtime[0] < p1->lmtime[0]) i--; else if (p2->lmtime[1] > p1->lmtime[1]) i++; else if (p2->lmtime[1] < p1->lmtime[1]) i--; return(i*rflg); } if (p1->lflags&ISARG) p1 = p1->namep; else p1 = p1->lname; if (p2->lflags&ISARG) p2 = p2->namep; else p2 = p2->lname; for (;;) if ((j = *p1.charp++ - *p2.charp++) || p1.charp[-1]==0) return(rflg*j); return(0); } .fdes, 0, 0); inf.nleft = 0; lastuid = -1; do { i = 0; j = 0; n = 0; while((c=getc(&inf)) != '\n') { if (c<0) return(-1); if (c==':') { j++; c = '0'; } if (j==0) buf[i++] = c; if (j==2) n = n*10 + c - '0'; } } while (n != uid); buf[i++] = '\0'; lastuid = uid; return(0); } nblock(size0, size) char *size0, *size; { register int n; n = ldiv(size0, size, 512); if (size&0777) n++; if (n>8) n =+ (n+255)/256; return(n); } int m0[] { 3, DIR, 'd', BLK, /* * dpr -- off line print via dataphone daemon to GCOS * normally invoked through opr */ char tfname[] "/usr/lpd/tfaXXXXX"; char cfname[] "/usr/lpd/cfaXXXXX"; char lfname[] "/usr/lpd/lfaXXXXX"; char dfname[] "/usr/lpd/dfaXXXXX"; int nact; int tff; int mailflg; char person[10]; int inchar; int maxrec 1000; main(argc, argv) int argc; char *argv[]; { register char *arg; int c, f, flag; int out(); pidfn(); if((signal(1, 1) & 01) == 0) signal(1, out); if((signal(2, 1) & 01) == 0) signal(2, out)# /* * list file or directory */ struct { int fdes; int nleft; char *nextc; char buff[512]; } inf; struct ibuf { int idev; int inum; int iflags; char inl; char iuid; char igid; char isize0; int isize; int iaddr[8]; char *iatime[2]; char *imtime[2]; }; struct lbuf { char lname[15]; int lnum; int lflags; char lnl; char luid; char lgid; char lsize0; int lsize; char *lmtime[2]; }; struct lbufx { char *namep; }; int aflg, dflg, lflg, sflg, tflg, uflg, iflg, fflg, gflg; int fout; i'b', CHR, 'c', '-'}; int m1[] { 1, ROWN, 'r', '-' }; int m2[] { 1, WOWN, 'w', '-' }; int m3[] { 2, SUID, 's', XOWN, 'x', '-' }; int m4[] { 1, RGRP, 'r', '-' }; int m5[] { 1, WGRP, 'w', '-' }; int m6[] { 2, SGID, 's', XGRP, 'x', '-' }; int m7[] { 1, ROTH, 'r', '-' }; int m8[] { 1, WOTH, 'w', '-' }; int m9[] { 1, XOTH, 'x', '-' }; int m10[] { 1, STXT, 't', ' ' }; int *m[] { m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10}; pmode(aflag) { register int **mp; flags = aflag; for (mp = &m[0]; mp < &m[11];) sel; if((signal(3, 1) & 01) == 0) signal(3, out); flag = 0; tff = nfile(tfname); while (argc>1 && (arg = argv[1])[0]=='-') { switch (arg[1]) { case 'c': flag = '+'; break; case 'r': flag = '-'; break; case 'm': mailflg = 1; break; } argc--; argv++; } ident(); if(argc == 1) copy(0); while(--argc) { arg = *++argv; if(flag == '+') goto cf; if(*arg == '/' && flag != '-') { card('F', arg); nact++; continue; } if(link(arg, lfname) < 0) goto cf;nt rflg 1; char *year; int flags; int uidfil -1; int lastuid -1; char tbuf[16]; int tblocks; int statreq; struct lbuf *lastp &end; struct lbuf *rlastp &end; char *dotp "."; #define IFMT 060000 #define DIR 0100000 #define CHR 020000 #define BLK 040000 #define ISARG 01000 #define LARGE 010000 #define STXT 010000 #define SUID 04000 #define SGID 02000 #define ROWN 0400 #define WOWN 0200 #define XOWN 0100 #define RGRP 040 #define WGRP 020 #define XGRP 010 #define ROTH 04 #define WOTH 02 #define XOTH 01 #define ect(*mp++); } select(pairp) int *pairp; { register int n, *ap; ap = pairp; n = *ap++; while (--n>=0 && (flags&*ap++)==0) ap++; putchar(*ap); } makename(dir, file) char *dir, *file; { static char dfile[100]; register char *dp, *fp; register int i; dp = dfile; fp = dir; while (*fp) *dp++ = *fp++; *dp++ = '/'; fp = file; for (i=0; i<14; i++) *dp++ = *fp++; *dp = 0; return(dfile); } readdir(dir) char *dir; { static struct { int dinode; char dname[14]; } dentry; register char *p card('F', lfname); card('U', lfname); lfname[inchar]++; nact++; goto df; cf: f = open(arg, 0); if(f < 0) { printf("Cannot open %s\n", arg); continue; } copy(f); close(f); df: if(flag == '-') { f = unlink(arg); if(f < 0) printf("Cannot remove %s\n", arg); } } if(nact) { tfname[inchar]--; f = link(tfname, dfname); if(f < 0) { printf("Cannot rename %s\n", dfname); tfname[inchar]++; out(); } unlink(tfname); execl("/etc/lpd", "lpd", 0); dfnamRSTXT 01000 main(argc, argv) char **argv; { int i, j; extern struct lbuf end; register struct lbuf *ep, *ep1; register struct lbuf *slastp; struct lbuf lb; int t; int compar(); fout = dup(1); time(lb.lmtime); year = lb.lmtime[0] - 245; /* 6 months ago */ if (--argc > 0 && *argv[1] == '-') { argv++; while (*++*argv) switch (**argv) { case 'a': aflg++; continue; case 's': sflg++; statreq++; continue; case 'd': dflg++; continue; case 'g': gflg++; continue;; register int j; register struct lbuf *ep; if (fopen(dir, &inf) < 0) { printf("%s unreadable\n", dir); return; } tblocks = 0; for(;;) { p = &dentry; for (j=0; j<16; j++) *p++ = getc(&inf); if (dentry.dinode==0 || aflg==0 && dentry.dname[0]=='.') continue; if (dentry.dinode == -1) break; ep = gstat(makename(dir, dentry.dname), 0); if (ep->lnum != -1) ep->lnum = dentry.dinode; for (j=0; j<14; j++) ep->lname[j] = dentry.dname[j]; } close(inf.fdes); } gstat(file, ae[inchar]++; } out(); } copy(f) int f; { int ff, i, nr, nc; static int buf[256]; card('F', cfname); card('U', cfname); ff = nfile(cfname); nc = 0; nr = 0; while((i = read(f, buf, 512)) > 0) { write(ff, buf, i); nc =+ i; if(nc >= 512) { nc =- 512; nr++; if(nr > maxrec) { printf("Copy file is too large\n"); break; } } } close(ff); nact++; } card(c, s) int c; char s[]; { char *p1, *p2; static char buf[512]; int col; p1 = buf; p2 = s; col = 0; *p1++ = c; whil case 'l': lflg++; statreq++; continue; case 'r': rflg = -1; continue; case 't': tflg++; statreq++; continue; case 'u': uflg++; continue; case 'i': iflg++; continue; case 'f': fflg++; continue; default: continue; } argc--; } if (fflg) { aflg++; lflg = 0; sflg = 0; tflg = 0; statreq = 0; } if(lflg) { t = "/etc/passwd"; if(gflg) t = "/etc/group"; uidfil = open(t, 0); } if (argc==0) { argc++; argv = &dotp - 1; }rgfl) char *file; { struct ibuf statb; register struct lbuf *rep; if (lastp+1 >= rlastp) { sbrk(512); rlastp.idev =+ 512; } rep = lastp; lastp++; rep->lflags = 0; rep->lnum = 0; if (argfl || statreq) { if (stat(file, &statb)<0) { printf("%s not found\n", file); statb.inum = -1; statb.isize0 = 0; statb.isize = 0; statb.iflags = 0; if (argfl) { lastp--; return(0); } } rep->lnum = statb.inum; statb.iflags =& ~DIR; if ((statb.iflags&IFMT) == 060000) { state((c = *p2++) != '\0') { *p1++ = c; col++; } *p1++ = '\n'; write(tff, buf, col+2); } ident() { int c, n; register char *b1p, *pp, *b2p; static char b1[100], b2[100]; b1p = b1; if(getpw(getuid(), b1p)) { b1p = "pdp::::m0000,m000:"; } n = 0; b2p = b2; while(*b2p++ = "$ ident "[n++]); b2p--; n = 5; while(--n) while(*b1p++ != ':'); while((*b2p++ = *b1p++) != ':'); b2p[-1] = ','; b1p = b1; pp = person; while((c = *b1p++) != ':') { *b2p++ = c; *pp++ = c; } *b2p++ = 0; *pp++ = 0; card('L', b2); if (mailflg) card('M', person); } pidfn() { register i, j, c; int p; p = getpid(); i = 0; while(tfname[i] != 'X') i++; i =+ 4; for(j=0; j<5; j++) { c = (p%10) + '0'; p =/ 10; tfname[i] = c; cfname[i] = c; lfname[i] = c; dfname[i] = c; i--; } inchar = i; } nfile(name) char *name; { register f; f = creat(name, 0666); if(f < 0) { printf("Cannot create %s\n", name); out(); } name[inchar]++; return(f); } out() { register i; signal(1, 1); signal(1, 2# /* * ln target [ new name ] */ struct ibuf { int inum; int iflags; char inl; char iuid; int isize; int iaddr[8]; char *ictime[2]; char *imtime[2]; int fill; }; #define DIR 040000 #define FMT 060000 main(argc, argv) char **argv; { static struct ibuf statb; register char *np; if (argc<2) { write(1, "Usage: ln target [ newname ]\n", 29); exit(1); } if (argc==2) { np = argv[1]; while(*np++); while (*--np!='/' && np>argv[1]); np++; argv[2] = np; } stat(argv[1], &statb); if  case 'X': Xflag++; continue; case 'r': rflag++; arflag++; continue; case 's': sflag++; xflag++; continue; case 'n': nflag++; continue; case 'd': dflag++; continue; case 'i': iflag++; continue; } load1arg(ap); close(infil); } middle(); setupout(); p = argv+1; libp = liblist; for (c=1; cbno = -1; libp++; return; } mget(&archdr, sizeof archdr); if (load1(1, nbno, noff + (sizeof archdr) / 2)) { libp->bno = nbno; libp->off = noff; libp++; } noff =+ (archdr.asize + sizeof archdr)>>1; nbno # /* * login [ name ] */ struct { char name[8]; char tty; char ifill; int time[2]; int ufill; } utmp; struct { int speeds; char erase, kill; int tflags; } ttyb; struct { int junk[5]; int size; int more[12]; } statb; char *ttyx; #define ECHO 010 main(argc, argv) char **argv; { char pbuf[128]; register char *namep, *np; char pwbuf[9]; int t, sflags, f, c, uid, gid; signal(3, 1); signal(2, 1); nice(0); ttyx = "/dev/ttyx"; if ((utmp.tty=ttyn(0)) == 'x') { write(1, "Sorry.\n", 7);    "% #&=+ (noff >> 8) & 0377; noff =& 0377; } } load1(libflg, bno, off) { register struct symbol *sp, **hp, ***cp; struct symbol *ssymp; int ndef, nloc; readhdr(bno, off); ctrel = tsize; cdrel =+ dsize; cbrel =+ bsize; ndef = 0; nloc = sizeof cursym; cp = local; ssymp = symp; if ((filhdr.relflg&RELFLG)==1) { error(0, "No relocation bits"); return(0); } off =+ (sizeof filhdr)/2 + filhdr.tsize + filhdr.dsize; dseek(&text, bno, off, filhdr.ssize); while (text.size > 0) { mget(&cursym, sizeo exit(); } ttyx[8] = utmp.tty; gtty(0, &ttyb); ttyb.erase = '#'; ttyb.kill = '@'; stty(0, &ttyb); loop: namep = utmp.name; if (argc>1) { np = argv[1]; while (namepstype != EXTERN+UNDEF) continue; if (cursym.stype == EXTERN+UNDEF) { if (cursym.svalue > sp->svalue) sp->svalue = cursym.svalue; continue; } if (sp->svalue != 0 && cursym.stype == EXTERN+TEXT) continue; ndef++; sp->stype = cursym.stype; s{ sflags = ttyb.tflags; ttyb.tflags =& ~ ECHO; stty(0, &ttyb); write(1, "Password: ", 10); namep = pwbuf; while ((c=getchar()) != '\n') { if (c <= 0) exit(); if (namepsvalue = cursym.svalue; } if (libflg==0 || ndef) { tsize =+ filhdr.tsize; dsize =+ filhdr.dsize; bsize =+ filhdr.bsize; ssize =+ nloc; return(1); } /* * No symbols defined by this library member. * Rip out the hash table entries and reset the symbol table. */ symp = ssymp; while (cp > local) **--cp = 0; return(0); } middle() { register struct symbol *sp; register t, csize; int nund, corigin; p_etext = *slookup("_etext"); p_edata = *slookup("_edata"); p_end = *slookup("_end");p != ':') gid = gid*10 + *np++ - '0'; np++; np = colon(np); namep = np; np = colon(np); if (chdir(namep)<0) { write(1, "No directory\n", 13); goto loop; } time(utmp.time); if ((f = open("/etc/utmp", 1)) >= 0) { t = utmp.tty; if (t>='a') t =- 'a' - (10+'0'); seek(f, (t-'0')*16, 0); write(f, &utmp, 16); close(f); } if ((f = open("/usr/adm/wtmp", 1)) >= 0) { seek(f, 0, 2); write(f, &utmp, 16); close(f); } if ((f = open("/etc/motd", 0)) >= 0) { while(read(f, &t, 1) > 0)  *libp { &liblist[0] }; struct symbol { char sname[8]; char stype; char spad; int svalue; }; struct symbol cursym; struct symbol symtab[NSYM]; struct symbol *hshtab[NSYM+2]; struct symbol *symp { symtab }; struct symbol **local[NSYMPR]; struct symbol *p_etext; struct symbol *p_edata; struct symbol *p_end; int xflag; /* discard local symbols */ int Xflag; /* discard locals starting with 'L' */ int rflag; /* preserve relocation bits, don't define common */ int arflag; /* original copy of rflag */ i /* * If there are any undefined symbols, save the relocation bits. */ if (rflag==0) for (sp=symtab; spstype==EXTERN+UNDEF && sp->svalue==0 && sp!=p_end && sp!=p_edata && sp!=p_etext) { rflag++; dflag = 0; nflag = 0; iflag = 0; sflag = 0; break; } /* * Assign common locations. */ csize = 0; if (dflag || rflag==0) { for (sp=symtab; spstype==EXTERN+UNDEF && (t=sp->svalue)!=0) { t = (t+1) & ~01; sp->svalue = csize; sp->s write(1, &t, 1); close(f); } if(stat(".mail", &statb) >= 0 && statb.size) write(1, "You have mail.\n", 15); chown(ttyx, uid); setgid(gid); setuid(uid); if (*np == '\0') np = "/bin/sh"; execl(np, "-", 0); write(1, "No shell.\n", 9); exit(); bad: write(1, "Login incorrect.\n", 17); goto loop; } getpwentry(name, buf) char *name, *buf; { extern fin; int fi, r, c; register char *gnp, *rnp; fi = fin; r = 1; if((fin = open("/etc/passwd", 0)) < 0) goto ret; loop: gnp = name; rnp = buf;nt sflag; /* discard all symbols */ int nflag; /* pure procedure */ int dflag; /* define common even with rflag */ int iflag; /* I/D space separated */ int infil; char *filname; int tsize; int dsize; int bsize; int ssize; int nsym; int torigin; int dorigin; int borigin; int ctrel; int cdrel; int cbrel; int errlev; int delarg 4; char tfname[] "/tmp/lxyyyyy"; int toutb[259]; int doutb[259]; int troutb[259]; int droutb[259]; int soutb[259]; struct symbol **lookup(); struct symbol **slookup(); main(atype = EXTERN+COMM; csize =+ t; } if (p_etext && p_etext->stype==EXTERN+UNDEF) { p_etext->stype = EXTERN+TEXT; p_etext->svalue = tsize; } if (p_edata && p_edata->stype==EXTERN+UNDEF) { p_edata->stype = EXTERN+DATA; p_edata->svalue = dsize; } if (p_end && p_end->stype==EXTERN+UNDEF) { p_end->stype = EXTERN+BSS; p_end->svalue = bsize; } } /* * Now set symbols to their final value */ if (nflag || iflag) tsize = (tsize + 077) & ~077; dorigin = tsize; if (nflag) dor while((c=getchar()) != '\n') { if(c <= 0) goto ret; *rnp++ = c; } *rnp++ = '\0'; rnp = buf; while (*gnp++ == *rnp++); if ((*--gnp!=' ' && gnp= argc) error(1, "Bad 'use'"); if (*(hp = slookup(*p++)) == 0) { *hp = symp; enter(); } continue; case 'l': break; case 'x': xflag++; continue; igin = (tsize+017777) & ~017777; if (iflag) dorigin = 0; corigin = dorigin + dsize; borigin = corigin + csize; nund = 0; for (sp=symtab; spstype) { case EXTERN+UNDEF: errlev =| 01; if (arflag==0 && sp->svalue==0) { if (nund==0) printf("Undefined:\n"); nund++; printf("%.8s\n", sp->sname); } continue; case EXTERN+ABS: default: continue; case EXTERN+TEXT: sp->svalue =+ torigin; continue; case EXTERN+DATA: sp->svalue =+ dorigin; continue; case EXTERN+BSS: sp->svalue =+ borigin; continue; case EXTERN+COMM: sp->stype = EXTERN+BSS; sp->svalue =+ corigin; continue; } if (sflag || xflag) ssize = 0; bsize =+ csize; nsym = ssize / (sizeof cursym); } setupout() { register char *p; register pid; if ((toutb[0] = creat("l.out", 0666)) < 0) error(1, "Can't create l.out"); pid = getpid(); for (p = &tfname[12]; p > &tfname[7];) { *--p = (pid&07) + '0'; pid =>> 3; } tcreat(doutb, 'a'); if (sflag==0 || xflag==0) tcreat(so copy(troutb, 'c'); copy(droutb, 'd'); } if (sflag==0) { if (xflag==0) copy(soutb, 'b'); for (p=symtab; p < symp;) putw(*p++, toutb); } fflush(toutb); close(toutb[0]); unlink("a.out"); link("l.out", "a.out"); delarg = errlev; delexit(); } delexit() { register c; unlink("l.out"); for (c = 'a'; c <= 'd'; c++) { tfname[6] = c; unlink(tfname); } if (delarg==0) chmod("a.out", 0777); exit(delarg); } copy(buf, c) int *buf; { register f, *p, n; fflush(buf); close(buf[0]); tf r) { register int *clp, *lp; register sn; lp = alp; sn = (r>>4) & 07777; for (clp=local; clp 1) { n =>> 1; p = doutb; do putw(*p++, toutb); while (--n); } close(f); } mkfsym(s) char *s; { if (sflag || xflag) return; cp8c(s, cursym.sname); cursym.stype = 037; cursym.svalue = torigin; mput(soutb, &cursym, sizeof cursym); } mget(aloc, an) int *aloc; { register *loc, n; register *p; n = an; n =>> 1; loc = aloc; if ((text.nibuf =- n) >= 0) { if ((text.size =- n) > 0) { p = text.ptr; do *loc++} cp8c(from, to) char *from, *to; { register char *f, *t, *te; f = from; t = to; te = t+8; while ((*t++ = *f++) && t= acp && *--cp != '/'); mkfsym(++cp); load2(0, 0); return; } for (lp = libp; lp->bno != -1; lp++) { dseek(&text, lp->bno, lp->off, sizeof archdr); mget(&archdr, sizeof archdr); mkfsym(archdr.aname); load2(lp->bno, lp->off + (sizeof archdr) / 2); } libp = ++lp; } load2(bno, off) { register struct  = *p++; while (--n); text.ptr = p; return; } else text.size =+ n; } text.nibuf =+ n; do { *loc++ = get(&text); } while (--n); } mput(buf, aloc, an) int *aloc; { register *loc; register n; loc = aloc; n = an>>1; do { putw(*loc++, buf); } while (--n); } dseek(asp, ab, o, s) { register struct stream *sp; register struct page *p; register b; int n; sp = asp; b = ab + ((o>>8) & 0377); o =& 0377; --sp->pno->nuser; if ((p = &page[0])->bno!=b && (p = &page[1])->bno!=b) if!$'(+.147:=),/258symbol *sp; register int *lp, symno; readhdr(bno, off); ctrel = torigin; cdrel =+ dorigin; cbrel =+ borigin; /* * Reread the symbol table, recording the numbering * of symbols for fixing external references. */ lp = local; symno = -1; off =+ (sizeof filhdr)/2; dseek(&text, bno, off+filhdr.tsize+filhdr.dsize, filhdr.ssize); while (text.size > 0) { symno++; mget(&cursym, sizeof cursym); symreloc(); if ((cursym.stype&EXTERN) == 0) { if (!sflag&&!xflag&&(!Xflag||cursym.sname[0]!='L'))  (p->nuser==0 || (p = &page[0])->nuser==0) { if (page[0].nuser==0 && page[1].nuser==0) if (page[0].bno < page[1].bno) p = &page[0]; p->bno = b; seek(infil, b, 3); if ((n = read(infil, p->buff, 512)>>1) < 0) n = 0; p->nibuf = n; } else error(1, "No pages"); ++p->nuser; sp->bno = b; sp->pno = p; sp->ptr = p->buff + o; if (s != -1) sp->size = (s>>1) & 077777; if ((sp->nibuf = p->nibuf-o) <= 0) sp->size = 0; } get(asp) struct stream *asp; { register struct stream *sp/ / c code tables-- compile to register / .globl _regtab .data _regtab=. 106.; cr106 30.; cr70 31.; cr70 32.; cr32 33.; cr32 37.; cr37 38.; cr37 98.; cr100 99.; cr100 80.; cr80 40.; cr40 41.; cr40 / - like + 42.; cr42 43.; cr43 44.; cr43 45.; cr45 46.; cr40 55.; cr40 48.; cr40 49.; cr49 70.; cr70 71.; cr70 72.; cr72 73.; cr73 74.; cr74 75.; cr75 76.; cr72 78.; cr70 85.; cr70 79.; cr79 102.; cr102 51.; cr51 52.; cr52 56.; cr56 57.; cr57 58.; cr58 59.; cr59 91.; cr91  mput(soutb, &cursym, sizeof cursym); continue; } if ((sp = *lookup()) == 0) error(1, "internal error: symbol not found"); if (cursym.stype == EXTERN+UNDEF) { if (lp >= &local[NSYMPR]) error(1, "Local symbol overflow"); *lp++ = symno; *lp++ = sp; continue; } if (cursym.stype!=sp->stype || cursym.svalue!=sp->svalue) { printf("%.8s: ", cursym.sname); error(0, "Multiply defined"); } } dseek(&text, bno, off, filhdr.tsize); dseek(&reloc, bno, off+(filhdr.tsize+filhdr.; sp = asp; if (--sp->nibuf < 0) { dseek(sp, sp->bno+1, 0, -1); --sp->nibuf; } if (--sp->size <= 0) { if (sp->size < 0) error(1, premeof); ++fpage.nuser; --sp->pno->nuser; sp->pno = &fpage; } return(*sp->ptr++); } getfile(acp) char *acp; { register char *cp; register c; cp = acp; archdr.aname[0] = '\0'; if (cp[0]=='-' && cp[1]=='l') { if ((c = cp[2]) == '\0') c = 'a'; cp = "/lib/lib?.a"; cp[8] = c; } filname = cp; if ((infil = open(cp, 0)) < 0) error(1, "cannot ope82.; cr82 83.; cr82 84.; cr82 86.; cr86 87.; cr86 88.; cr86 0 .text / goto cr102: %a,n jmp A1 %n*,n F* jmp #1(R) / call cr100: %a,n jsr pc,IA1 %n*,n F* jsr pc,#1(R) %n,n F jsr pc,(R) / addressible cr106: %z,n clr R %zf,n clrf R %a,n %ad,n movB1 A1,R %af,n movof A1,R %n*,n %nd*,n F* movB1 #1(R),R %nf*,n F* movof #1(R),R %al,n mov A1+,R+ mov A1,R %nl*,n F* mov #1+2(R),R+ mov #1(R),R / ++,-- postfix cr32: %a,1 movB1 A1',R I'B1 A1 %aw,n mov A1',R I A2,A1 %e*,1 F1*dsize)/2, filhdr.tsize); load2td(lp, ctrel, toutb, troutb); dseek(&text, bno, off+(filhdr.tsize/2), filhdr.dsize); dseek(&reloc, bno, off+filhdr.tsize+(filhdr.dsize/2), filhdr.dsize); load2td(lp, cdrel, doutb, droutb); torigin =+ filhdr.tsize; dorigin =+ filhdr.dsize; borigin =+ filhdr.bsize; } load2td(lp, creloc, b1, b2) int *lp; { register r, t; register struct symbol *sp; for (;;) { /* * The pickup code is copied from "get" for speed. */ if (--text.size <= 0) { if (text.size < 0) n"); page[0].bno = page[1].bno = -1; page[0].nuser = page[1].nuser = 0; text.pno = reloc.pno = &fpage; fpage.nuser = 2; dseek(&text, 0, 0, 2); if (text.size <= 0) error(1, premeof); return(get(&text) == ARCMAGIC); } struct symbol **lookup() { int i; register struct symbol **hp; register char *cp, *cp1; i = 0; for (cp=cursym.sname; cp < &cursym.sname[8];) i = (i<<1) + *cp++; for (hp = &hshtab[(i&077777)%NSYM+2]; *hp!=0;) { cp1 = (*hp)->sname; for (cp=cursym.sname; cp < &cursym.sname[8] movB1 #1(R1),R I'B1 #1(R1) %n*,1 F* movB1 #1(R),-(sp) I'B1 #1(R) movB1 (sp)+,R %ew*,n F1* mov #1(R1),R I A2,#1(R1) %nw*,n F* mov #1(R),-(sp) I A2,#1(R) mov (sp)+,R %al,1 F I $1,A1+ V A1 %el*,1 F1* mov #1+2(R1),R+ mov #1(R1),R I $1,#1+2(R1) V #1(R1) %nl*,1 F* mov #1+2(R),-(sp) mov #1(R),-(sp) add $1,#1+2(R) V #1(R) mov (sp)+,R mov (sp)+,R+ / - unary, ~ cr37: %n,n %nf,n F IBF R %nl,n F I R I R+ V R / = cr80: %a,n %ad,nf S movB1 R,A1 %af,nf S movfo R,A1 %nd*,af break; text.size++; t = get(&text); } else if (--text.nibuf < 0) { text.nibuf++; text.size++; t = get(&text); } else t = *text.ptr++; if (--reloc.size <= 0) { if (reloc.size < 0) error(1, "Relocation error"); reloc.size++; r = get(&reloc); } else if (--reloc.nibuf < 0) { reloc.nibuf++; reloc.size++; r = get(&reloc); } else r = *reloc.ptr++; switch (r&016) { case RTEXT: t =+ ctrel; break; case RDATA: t =+ cdrel; break; case RBSS: ;) if (*cp++ != *cp1++) goto no; break; no: if (++hp >= &hshtab[NSYM+2]) hp = hshtab; } return(hp); } struct symbol **slookup(s) char *s; { cp8c(s, cursym.sname); cursym.stype = EXTERN+UNDEF; cursym.svalue = 0; return(lookup()); } enter() { register struct symbol *sp; if ((sp=symp) >= &symtab[NSYM]) error(1, "Symbol table overflow"); cp8c(cursym.sname, sp->sname); sp->stype = cursym.stype; sp->svalue = cursym.svalue; symp++; return(sp); } symreloc() { switch (cursym.s F* S movf R,#1(R) %n*,a F* movB1 A2,#1(R) movB1 #1(R),R %nf*,af F* S movfo R,#1(R) %n*,e F* S1 movB1 R1,#1(R) movB1 R1,R %ed*,nf S F1* movf R,#1(R1) %ef*,nf S F1* movfo R,#1(R1) %n*,n %nd*,nf FS* S movB1 R,*(sp)+ %nf*,nf FS* S movfo R,*(sp)+ / +, -, |, &~, << cr40: %n,z F %n,1 F I' R %[add1:] %n,aw %nf,ad F IB2 A2,R %[add2:] %n,ew* %nf,ed* F S1* IB2 #2(R1),R %[add3:] %n,e %nf,ef F S1 IBF R1,R %[add4:] %n,nw* %nf,nd* SS* F IB2 *(sp)+,R %[add5:] %n,n %nf,n t =+ cbrel; break; case REXT: sp = lookloc(lp, r); if (sp->stype==EXTERN+UNDEF) { r = (r&01) + ((nsym+(sp-symtab))<<4) + REXT; break; } t =+ sp->svalue; r = (r&01) + ((sp->stype-(EXTERN+ABS))<<1); break; } if (r&01) t =- creloc; putw(t, b1); if (rflag) putw(r, b2); } } finishout() { register n, *p; if (nflag||iflag) { n = torigin; while (n&077) { n =+ 2; putw(0, toutb); if (rflag) putw(0, troutb); } } copy(doutb, 'a'); if (rflag) { type) { case TEXT: case EXTERN+TEXT: cursym.svalue =+ ctrel; return; case DATA: case EXTERN+DATA: cursym.svalue =+ cdrel; return; case BSS: case EXTERN+BSS: cursym.svalue =+ cbrel; return; case EXTERN+UNDEF: return; } if (cursym.stype&EXTERN) cursym.stype = EXTERN+ABS; } error(n, s) char *s; { if (filname) { printf("%s", filname); if (archdr.aname[0]) printf("(%.8s)", archdr.aname); printf(": "); } printf("%s\n", s); if (n) delexit(); errlev = 2; } lookloc(alp,f SS F IBF (sp)+,R %nl,c F I A2,R+ V R %nl,al F I A2,R I A2+,R+ V R %nl,el F S1 I R1+,R+ V R I R1,R %nl,nl SS F I (sp)+,R I (sp)+,R+ V R / ^ -- xor cr49: %n,e % [add3] %n,n FS S xor R,(sp) mov (sp)+,R / >> (all complicated cases taken care of by << -) cr45: %n,1 F asr R / * -- R must be odd on integers cr42: %n,aw %nf,ad % [add1] %n,ew* %nf,ed* % [add2] %n,e %nf,ef % [add3] %n,n %nf,nf % [add5] / / R must be odd on integers cr43: %n,aw F T sxt R- div A2,R- %n,ew* F T sxt R- S1* div #2(R1),R- %n,e F T sxt R- S1 div R1,R- %n,n SS F T sxt R- div (sp)+,R- %nf,ad % [add1] %nf,ed* % [add2] %nf,ef % [add3] %nf,nf % [add5] / =+, =-, =|, =&~ cr70: %[addq1:] %aw,aw I A2,A1' mov A1,R %[addq1a:] %a,aw %ad,ad movB1 A1',R IBF A2,R movB1 R,A1 %[addq2:] %aw,nw* S* I #2(R),A1' mov A1,R %[addq3:] %aw,n S I R,A1' mov A1,R %[addq4:] %ew*,nw* S* F1* I #2(R),#1(R1) mov #1(R1),R %[addq4a:] %ad,ef movf A1',R S1 IBF R1,R movf R,A1 %[addq5:] %a,n,2+#1(R) V #1(R) %[move15:] %al,nl S I R,A1 I R+,A1+ V A1 %nl*,aw F* mov A2,#1+2(R) sxt #1(R) %[move16:] %el*,nl S F1* I R+,#1+2(R1) V #1(R1) I R,#1(R1) %nl*,n SS F* mov (sp)+,#1+2(R) sxt #1(R) %[move17:] %nl*,nl SS F* I (sp)+,#1(R) I (sp)+,#1+2(R) V #1(R) / =| and =& ~ ci78: %a,a % [move3] %a,n % [move5] %n*,a % [move6] %n*,e* % [move7] %n*,e % [move8] %e*,n* % [move9] %e*,n % [move10] %n*,n* % [move11] %n*,n % [move12] %al,c % [move13a] %al,al % [move13] %al,nl* % [mse all files and * check switches for magic values */ setexit(); signal(1, reset); for(i=0; i<10; i++) close(i); switch(getcsw()) { case single: error: termall(); i = fork(); if(i == 0) { open(ctty, 2); dup(0); execl(shell, minus, 0); exit(); } while(wait() != i); case reboot: termall(); execl(init, minus, 0); reset(); } /* * open and merge in init file */ fi = open(ifile, 0); q = &itab[0]; while(rline()) { if(line.flag == '0') continue; for(all) %ad,nf SS movB1 A1',R IBF (sp)+,R movB1 R,A1 %[addq6:] %af,nf SS movof A1',R IBF (sp)+,R movfo R,A1 %[addq7:] %ew*,n S F1* I R,#1(R1) mov #1(R1),R %[addq8:] %nw*,n SS F* I (sp)+,#1(R) mov #1(R),R %[addq9:] %n*,n FS* SS movB1 *2(sp),R IBF (sp)+,R movB1 R,*(sp)+ %[addq9a:] %nd*,nf SS F* movB1 #1(R),R IBF (sp)+,R movB1 R,#1(R) %[addq10:] %nf*,nf SS F* movof #1(R),R1 IBF (sp)+,R1 movfo R1,#1(R) movf R1,R / =*, =<< (for integer multiply, R must be odd) cr72: %a,aw %ad,ad %ove14] %al,nl % [move15] %nl*,c % [move14a] %el*,nl % [move16] %nl*,nl % [move17] / =+ ci70: %n*,z %a,z %a,1 I'B1 A1 %aw,aw % [move3] %aw,nw* % [move4] %aw,n % [move5] %n*,1 % [move2] %ew*,nw* % [move9] %a,nw* S* movB1 A1',R1 I #2(R),R1 movB1 R1,A1 %a,n S movB1 A1',R1 I R,R1 movB1 R1,A1 %ew*,n % [move10] %nw*,n % [move12] %n*,n SS F* movB1 #1(R),R1 I (sp)+,R1 movB1 R1,#1(R) %al,c % [move13a] %al,al % [move13] %al,nl* % [move14] %al,nl % [move15] %nl*,c % [move14a] %el*,nl if(p->line==line.line || p->line==0) { if(p >= q) { i = p->pid; p->pid = q->pid; q->pid = i; p->line = q->line; p->comn = q->comn; q->line = line.line; q->coms[0] = line.comn; q++; } break; } } close(fi); if(q == &itab[0]) goto error; for(; q < &itab[tabsize]; q++) term(q); for(all) if(p->line != 0 && p->pid == 0) dfork(p); for(ever) { i = wait(); for(all) if(p->pid == i) { rmut(p); dfork(p); } } } termall() { reg [addq1a] %af,nf % [addq6] %ad,ef % [addq4a] %a,n %ad,nf % [addq5] %n*,n % [addq9] %nd*,nf % [addq9a] %nf*,nf % [addq10] / =/ ; R must be odd on integers cr73: %a,aw movB1 A1',R sxt R- divBF A2,R- movB1 R-,A1 %a,n SS movB1 A1',R sxt R- div (sp)+,R- movB1 R-,A1 %e*,n SS F1* movB1 #1(R1),R sxt R- div (sp)+,R- movB1 R-,#1(R1) %n*,n FS* SS movB1 *2(sp),R sxt R- div (sp)+,R- movB1 R-,*(sp)+ %ad,ad % [addq1a] %ad,ef % [addq4a] %ad,nf % [addq5] %af,nf % [addq6] %nd*,nf % [addq9 % [move16] %nl*,nl % [move17] / =>> (all harder cases handled by =<< -) ci75: %a,1 asrB1 A1 %n*,1 F* asrB1 #1(R) / =<< ci76: %a,1 aslB1 A1 %n*,1 F* aslB1 #1(R) %r,aw ash A2,A1 %r,nw* S* ash #2(R),A1 %r,n S ash R,A1 / =<< for longs ci92: %al,aw F ashc A2,R mov R,A1 mov R+,A1+ %al,n SS F ashc (sp)+,R mov R,A1 mov R+,A1+ %nl*,n FS* SS mov 2(sp),R mov 2(R),R+ mov (R),R ashc (sp)+,R mov R,*(sp) mov (sp)+,R mov R+,2(R) / / c code tables-- set condition codes / .globl _ccister struct tab *p; for(all) term(p); } term(ap) struct tab *ap; { register struct tab *p; p = ap; if(p->pid != 0) { rmut(p); kill(p->pid, 9); } p->pid = 0; p->line = 0; } rline() { static char c[4]; if(read(fi, c, 4) != 4 || c[3] != '\n') return(0); line.flag = c[0]; line.line = c[1]; line.comn = c[2]; return(1); } dfork(ap) struct tab *ap; { register i; register char *tty; register struct tab *p; p = ap; i = fork(); if(i == 0) { signal(1, 0); tty = "/dev/ttyx"; ttya] %nf*,nf % [addq10] / =mod; R must be odd on integers cr74: %a,aw movB1 A1',R sxt R- div A2,R- movB1 R,A1 %a,n SS movB1 A1',R sxt R- div (sp)+,R- movB1 R,A1 %e*,n SS F1* movB1 #1(R1),R sxt R- div (sp)+,R- movB1 R,#1(R1) %n*,n FS* SS movB1 *2(sp),R sxt R- div (sp)+,R- mov R,*(sp)+ / =^ -- =xor cr79: %aw,n % [addq3] %ab,n SS movb A1',R xor R,(sp) mov (sp)+,R movb R,A1 %n*,n FS* movB1 *(sp),-(sp) S xor R,(sp) movB1 (sp)+,R movB1 R,*(sp)+ / =>> (all complicated cases dtab .data _cctab=. 106.; cc60 28.; rest 55.; rest 34.; rest 35.; rest 36.; rest 37.; rest 40.; rest 41.; rest 42.; rest 43.; rest 45.; rest 46.; rest 81.; cc81 / & as in "if ((a&b)==0)" 48.; rest 60.; cc60 61.; cc60 62.; cc60 63.; cc60 64.; cc60 65.; cc60 66.; cc60 67.; cc60 68.; cc60 69.; cc60 72.; rest 73.; rest 79.; rest 0 .text / relationals cc60: %a,z %ad,zf % [move1] %af,z movof A1,R %n*,z %nd*,zf % [move2] %nf*,z F* movof #1(R),R %n,z %nf,zf FC %aw,aw %ab,ab % [8] = p->line; chown(tty, 0); chmod(tty, 0622); open(tty, 2); dup(0); execl("etc/getty", minus, p->coms, 0); exit(); } p->pid = i; } rmut(p) struct tab *p; { register i, f; static char zero[16]; f = open(utmp, 1); if(f >= 0) { i = p->line; if(i >= 'a') i =+ '0' + 10 - 'a'; seek(f, (i-'0')*16, 0); write(f, zero, 16); close(f); } f = open(wtmpf, 1); if (f >= 0) { wtmp.tty = p->line; time(wtmp.time); seek(f, 0, 2); write(f, &wtmp, 16); close(f); } } one by =<< -) cr75: %a,1 asrB1 A1' movB1 A1,R %n*,1 F* asrB1 #1(R) movB1 #1(R),R / << for longs cr91: %nl,aw % [add1] %nl,ew* % [add2] %nl,e % [add3] %nl,nw* % [add4] %nl,n % [add5] / int -> float cr51: %aw,n movif A1,R %nw*,n F* movif #1(R),R %n,n F movif R,R / float, double -> int cr52: %nf,n F movfi R,R / double (float) to long cr56: %nf,n F setl movfi R,-(sp) mov (sp)+,R mov (sp)+,R+ seti / long to double cr57: %al,n setl movif A1,R seti %nl*,n F* setl movif #1(R),R [move3] %nw*,aw %nb*,ab % [move6] %n,aw %nf,ad % [add1] %nw*,ew* %nb*,eb* % [move7] %nw*,e % [move8] %n,ew* %nf,ed* % [add2] %n,e %nf,ef % [add3] %nw*,nw* %nb*,nb* % [move11] %nw*,n % [move12] %n,n %nf,nf % [add5] / & as in "if ((a&b) ==0)" cc81: %a,a % [move3] %n*,a % [move6] %n,a % [add1] %n,e % [add3] %n,n % [add5] / set codes right rest: %n,n %nf,nf H / / c code tables-- expression to -(sp) / .globl _sptab .data _sptab=. 106.; cs106 40.; cs40 41.; cs40 55.; cs40 48.; cs40 58.; c...run m6.hm61.cm62.cm63.cm64.c m65.cm66.cm67.cl.outm61.om62.om63.om64.om65.om66.om67.oa.out seti %nl,n FS setl movif (sp)+,R seti / integer to long cr58: %n,n F1! sxt R / long to integer cr59: %al,n mov A1+,R %nl*,n F* mov #1+2(R),R %nl,n F mov R+,R / *, /, remainder for longs. cr82: %nl,nl SS FS jsr pc,I add $10,sp / =*, =/, =rem for longs / Operands of the form &x op y, so stack space is known. cr86: %n,nl SS FS jsr pc,I add $6,sp / / c code tables -- compile for side effects. / Also set condition codes properly (except for ++, --) / .globl _efftab .data _efftab=. s58 56.; cs56 0 .text / name cs106: %z,n %zf,n clrB1 -(sp) %aw,n mov A1,-(sp) %nw*,n F* mov #1(R),-(sp) %al,n mov A1+,-(sp) mov A1,-(sp) / +, -, |, &~ cs40: %n,1 FS I' (sp) %n,aw FS I A2,(sp) %n,nw* FS S* I #2(R),(sp) %n,n FS S I R,(sp) / integer to long cs58: %n,n FS sxt -(sp) / float to long cs56: %nf,n F setl movfi R,-(sp) seti /* if command */ int ap; int ac; char **av; main(argc, argv) char *argv[]; { argv[argc] = 0; ac = argc; av = argv; ap = 1; if (argc<2) return; if (exp()) if(doex(0)) { write(1, "no command\n", 11); seek(0, 0, 2); } } char *nxtarg() { if (ap>ac) return(0*ap++); return(av[ap++]); } exp(s) { int p1; p1 = e1(); if (eq(nxtarg(), "-o")) return(p1 | exp()); ap--; return(p1); } e1() { int p1; p1 = e2(); if (eq(nxtarg(), "-a")) return (p1 & e1()); ap--; return(p1); } e2() { if (30.; ci70 31.; ci70 32.; ci70 33.; ci70 80.; ci80 70.; ci70 71.; ci70 / - like + 78.; ci78 85.; ci78 75.; ci75 76.; ci76 92.; ci92 0 .text / = ci80: %[move1:] %a,z %ad,zf I'B1 A1 %[move2:] %n*,z %nd*,zf F* I'B1 #1(R) %[move3:] %a,aw %ab,a IBE A2,A1 %[move4:] %ab,n* %a,nw* S* IBE #2(R),A1 %[move5:] %a,n S IB1 R,A1 %[move6:] %n*,aw %nb*,a F* IBE A2,#1(R) %[move7:] %n*,ew* %nb*,e* F* S1* IBE #2(R1),#1(R) %[move8:] %n*,e F* S1 IB1 R1,#1(R) %[move9:] %e*,nw* %eb*,n* S* F1* #define tabsize 20 #define all p = &itab[0]; p < &itab[20]; p++ #define ever ;; #define single 0173030 #define reboot 0173040 char shell[] "/bin/sh"; char minus[] "-"; char runc[] "/etc/rc"; char init[] "/etc/init"; char ifile[] "/etc/ttys"; char utmp[] "/etc/utmp"; char wtmpf[] "/usr/adm/wtmp"; char ctty[] "/dev/tty8"; int fi; struct { int flag; int line; char coms[2]; } line; struct tab { int pid; int line; int comn; } itab[tabsize]; struct { char name[8]; char tty; char fill; int time[2]; inteq(nxtarg(), "!")) return(!e3()); ap--; return(e3()); } e3() { int p1, ccode; register char *a; ccode = 0; if ((a=nxtarg())==0) goto err; if(eq(a, "(")) { p1 = exp(); if(!eq(nxtarg(), ")")) goto err; return(p1); } if(eq(a, "-r")) return(tio(nxtarg(), 0)); if(eq(a, "-w")) return(tio(nxtarg(), 1)); if(eq(a, "-c")) return(tcreat(nxtarg())); if(eq(a, "{")) { /* execute a command for exit code */ if(fork()) /*parent*/ wait(&ccode); else { /*child*/ doex(1); goto err; } IBE #2(R),#1(R1) %[move10:] %e*,n S F1* IB1 R,#1(R1) %[move11:] %n*,nw* %nb*,n* FS* S* IBE #2(R),*(sp)+ %[move12:] %n*,n FS* S IB1 R,*(sp)+ %al,z clr A1 clr A1+ %al,aw mov A2,A1+ sxt A1 %al,nw* mov #2(R),A1+ sxt A1 %al,n S mov R,A1+ sxt A1 %al,nf S setl movfi R,A1 seti %el*,nf S F1* setl movfi R,#1(R1) seti %[move13a:] %al,c I A2,A1+ V A1 %[move13:] %al,al I A2,A1 I A2+,A1+ V A1 %[move14:] %al,nl* S* I #2(R),A1 I #2+2(R),A1+ V A1 %[move14a:] %nl*,c F* I A2 wfill; } wtmp; main() { register i; register struct tab *p, *q; int reset(); /* * if not single user, * run shell sequence */ if(getcsw() != single) { i = fork(); if(i == 0) { open("/", 0); dup(0); dup(0); execl(shell, shell, runc, 0); exit(); } while(wait() != i); close(creat(utmp, 0644)); if ((i = open(wtmpf, 1)) >= 0) { seek(i, 0, 2); wtmp.tty = '~'; time(wtmp.time); write(i, &wtmp, 16); close(i); } } /* * main loop for hangup signal * clo while((a=nxtarg()) && (!eq(a,"}"))); return(ccode? 0 : 1); } p1 = nxtarg(); if (p1==0) goto err; if(eq(p1, "=")) return(eq(a, nxtarg())); if(eq(p1, "!=")) return(!eq(a, nxtarg())); err: write(1, "if error\n", 9); exit(9); } tio(a, f) { a = open(a, f); if (a>=0) { close(a); return(1); } return(0); } tcreat(a) { return(1); } eq(a, b) char *a, *b; { register int i; i = 0; l: if(a[i] != b[i]) return(0); if(a[i++] == '\0') return(1); goto l; } doex(earg) { register int np, i, c; char *nargv[50], *ncom, *na; np = 0; while (na=nxtarg()) { if(earg && eq(na,"}")) break; nargv[np++] = na; } if(earg && (!eq(na, "}"))) return(9); nargv[np] = 0; if (np==0) return(earg); execv(nargv[0], nargv, np); i = 0; ncom = "/usr/bin/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; while(c=nargv[0][i]) { ncom[9+i++] = c; } ncom[9+i] = '\0'; execv(ncom+4, nargv, np); execv(ncom, nargv, np); return(1); } arge)"); } } return; } for(i=0; i<8; i++) { if (ip->i_addr[i] != 0) chk(ip->i_addr[i], "data (small)"); } } chk(ab, s) char *ab; { register char *b; register n, m; b = ab; if (ino) nused++; if (b=sblock.s_fsize) { printf("%l bad; inode=%l, class=%s\n", b, ino, s); return(1); } m = 1 << (b&017); n = (b>>4) & 07777; if (bmap[n]&m) { printf("%l dup; inode=%l, class=%s\n", b, ino, s); ndup++; } bmap[n] =| m; for (n=0; blist[n] != -1; n++) if (b == / C library -- stat / error = stat(string, statbuf); / int statbuf[18] or / char statbuf[36] / as appropriate .globl _stat, cerror _stat: mov r5,-(sp) mov sp,r5 mov 4(r5),0f mov 6(r5),0f+2 sys 0; 9f bec 1f jmp cerror 1: clr r0 mov (sp)+,r5 rts pc .data 9: sys stat; 0:..; .. FILORUADGJblist[n]) printf("%l arg; inode=%l, class=%s\n", b, ino, s); return(0); } alloc() { register b, i; int buf[256]; i = --sblock.s_nfree; if (i<0 || i>=100) { printf("bad freeblock\n"); return(0); } b = sblock.s_free[i]; if (b == 0) return(0); if (sblock.s_nfree <= 0) { bread(b, buf, 512); sblock.s_nfree = buf[0]; for(i=0; i<100; i++) sblock.s_free[i] = buf[i+1]; } return(b); } bread(bno, buf, cnt) int *buf; { register *ip; seek(fi, bno, 3); if (read(fi, buf, cnt) != cnt) { %term LCURL RCURL LPAR RPAR SCOL DIGITS %term XIF XELSE XFOR XWHILE XBREAK NEXT %term OLDDO NEWDO %term XGOK XDEFINE XINCLUDE %term REPEAT UNTIL %% statl : statl stat | ; stat : if stat ={ outcont($1); } | ifelse stat ={ outcont($1+1); } | while stat ={ whilestat($1); } | for stat ={ forstat($1); } | repeat stat UNTIL ={ untils($1); } | XBREAK ={ breakcode($1); } | NEXT ={ nextcode($1); } | newdo stat ={ dostat($1); } | OLDDO ={ docode(0,$1); } | XGOK ={ gokcode($1); } | SCOL | LCURL stat# char *dargv[] { "/dev/rrk2", "/dev/rrp0", 0 }; #define NINODE 16*16 #define NB 10 #include "/usr/sys/ino.h" #include "/usr/sys/filsys.h" struct inode inode[NINODE]; struct filsys sblock; int sflg; int fi; int nifiles; int nfile; int nspcl; int nlarg; int nvlarg; int nindir; int nvindir; int ndir; int nused; int nfree; int ino; int ndup; int blist[10] { -1}; int nerror; int bmap[4096]; main(argc, argv) char **argv; { register char **p; register int n, *lp; if (argc == 1) { for (p = dargv; *p; printf("read error %d\n", bno); if (sflg) { printf("No update\n"); sflg = 0; } for (ip = buf; ip < &buf[256];) *ip++ = 0; } } free(in) { register i; int buf[256]; if (sblock.s_nfree >= 100) { buf[0] = sblock.s_nfree; for(i=0; i<100; i++) buf[i+1] = sblock.s_free[i]; sblock.s_nfree = 0; bwrite(in, buf); } sblock.s_free[sblock.s_nfree++] = in; } bwrite(bno, buf) { seek(fi, bno, 3); if (write(fi, buf, 512) != 512) printf("write error %d\n", bno); } number(as) char *asl RCURL | label stat | error ={ errcode($1); yyclearin; } ; label : DIGITS ={ outcode($1); outcode("\t"); } ; if : XIF ={ ifcode($1); } ; ifelse : if stat XELSE ={ outgoto($1+1); outcont($1); } ; while : XWHILE ={ whilecode($1); } ; for : XFOR ={ forcode($1); } ; repeat : REPEAT ={ repcode($1); } ; newdo : NEWDO ={ docode(1,$1); } ; %% ) check(*p++); return(nerror); } while (--argc) { argv++; if (**argv=='-') switch ((*argv)[1]) { case 's': sflg++; continue; case 'b': lp = blist; while (lp < &blist[NB-1] && (n = number(argv[1]))) { *lp++ = n; argv++; argc--; } *lp++ = -1; continue; default: printf("Bad flag\n"); } check(*argv); } return(nerror); } check(file) char *file; { register *ip, i, j; fi = open(file, sflg?2:0); if (fi < 0) { printf("cannot open %s\n", file); ner; { register n, c; register char *s; s = as; n = 0; while ((c = *s++) >= '0' && c <= '9') { n = n*10+c-'0'; } return(n); } makefree() { register i; sblock.s_nfree = 0; sblock.s_ninode = 0; sblock.s_flock = 0; sblock.s_ilock = 0; sblock.s_fmod = 0; free(0); for(i=sblock.s_fsize-1; i>=sblock.s_isize+2; i--) { if ((bmap[(i>>4)&07777] & (1<<(i&017)))==0) free(i); } bwrite(1, &sblock); close(fi); sync(); return; } .globl _sleep sleep = 35. _sleep: mov r5,-(sp) mov sp,r5 mov 4(r5),r0 sys sleep mov (sp)+,r5 rts pc ror =| 04; return; } printf("%s:\n", file); nfile = 0; nspcl = 0; nlarg = 0; nvlarg = 0; nindir = 0; nvindir = 0; ndir = 0; nused = 0; nfree = 0; ndup = 0; for (ip = bmap; ip < &bmap[4096];) *ip++ = 0; sync(); bread(1, &sblock, 512); nifiles = sblock.s_isize*16; for(i=0; ino < nifiles; i =+ NINODE/16) { bread(i+2, inode, sizeof inode); for(j=0; ji_mode&IALLOC) == 0) return; if ((ip->i_mode&IFCHR&IFBLK) != 0) { nspcl++; return; } if ((ip->i_mode&IFMT) == IFDIR) ndir++; else nfile++; if ((ip->i_mode&ILARG) != 0) { nlarg++; for(i=0; i<7; i++) if (ip->i_addr[i] != 0) { nindi/ C library -- stty / error = stty(filep, ttyvec); / filep is descriptor of open tty / ttyvec[0, 1, 2] correspond to args of stty .globl _stty, cerror _stty: mov r5,-(sp) mov sp,r5 mov 4(r5),r0 mov 6(r5),0f sys 0; 9f bec 1f jmp cerror 1: clr r0 mov (sp)+,r5 rts pc .data 9: sys stty; 0:.. 0; br 1f; NSIG=NSIG+1 mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1 mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1 mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1 mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1 mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1 mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1 mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1 mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1 mov r0,-(sp); mov dvect+[NSIG*2],r++; if (chk(ip->i_addr[i], "indirect")) continue; bread(ip->i_addr[i], buf, 512); for(j=0; j<256; j++) if (buf[j] != 0) chk(buf[j], "data (large)"); } if (ip->i_addr[7]) { nvlarg++; if (chk(ip->i_addr[7], "indirect")) return; bread(ip->i_addr[7], buf, 512); for(i=0; i<256; i++) if (buf[i] != 0) { nvindir++; if (chk(buf[i], "2nd indirect")) continue; bread(buf[i], vbuf, 512); for(j=0; j<256; j++) if (vbuf[j]) chk(vbuf[j], "data (very l.globl _stime, cerror _stime: mov r5,-(sp) mov sp,r5 mov 4(sp),r1 mov (r1)+,r0 mov (r1),r1 sys stime bec 1f jmp cerror 1: clr r0 mov (sp)+,r5 rts pc r0; br 1f; NSIG=NSIG+1 mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1 mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1 mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1 mov r0,-(sp); mov dvect+[NSIG*2],r0; br 1f; NSIG=NSIG+1 1: mov r1,-(sp) mov r2,-(sp) mov r3,-(sp) mov r4,-(sp) jsr pc,(r0) mov (sp)+,r4 mov (sp)+,r3 mov (sp)+,r2 mov (sp)+,r1 mov (sp)+,r0 rtt .data 9: sys signal; 0:..; .. .bss dvect: .=.+[NSIG*2] / C library -- setuid / error = setuid(uid); .globl _setuid, cerror _setuid: mov r5,-(sp) mov sp,r5 mov 4(r5),r0 sys setuid bec 1f jmp cerror 1: clr r0 mov (sp)+,r5 rts pc / C library -- read / nread = read(file, buffer, count); / / nread ==0 means eof; nread == -1 means error .globl _read, cerror _read: mov r5,-(sp) mov sp,r5 mov 4(r5),r0 mov 6(r5),0f mov 8(r5),0f+2 sys 0; 9f bec 1f jmp cerror 1: mov (sp)+,r5 rts pc .data 9: sys read; 0:..; .. +,r5 rts pc / C library -- setgid / error = setgid(uid); setgid = 46. .globl _setgid, cerror _setgid: mov r5,-(sp) mov sp,r5 mov 4(r5),r0 sys setgid bec 1f jmp cerror 1: clr r0 mov (sp)+,r5 rts pc  int (*qscmp)(); int qses; qsort(a, n, es, fc) char *a; int n, es; int (*fc)(); { qscmp = fc; qses = es; qs1(a, a+n*es); } qs1(a, l) char *a, *l; { register char *i, *j, *es; char *lp, *hp; int n, c; es = qses; start: if((n=l-a) <= es) return; n = ((n/(2*es))*es) & 077777; hp = lp = a+n; i = a; j = l-es; for(;;) { if(i < lp) { if((c = (*qscmp)(i, lp)) == 0) { qsexc(i, lp =- es); continue; } if(c < 0) { i =+ es; continue; } } loop: if(j > hp) { if/ ptrace -- C library / result = ptrace(req, pid, addr, data); ptrace = 26. indir = 0 .globl _ptrace .globl cerror, _errno _ptrace: mov r5,-(sp) mov sp,r5 mov 4.(r5),0f+4 mov 6.(r5),0f+0 mov 8.(r5),0f+2 mov 10.(r5),r0 clr _errno sys indir; 9f bec 1f jmp cerror 1: mov (sp)+,r5 rts pc .data 9: sys ptrace; 0: .=.+6 / C library -- seek / error = seek(file, offset, ptr); .globl _seek, cerror _seek: mov r5,-(sp) mov sp,r5 mov 4(r5),r0 mov 6(r5),0f mov 8(r5),0f+2 sys 0; 9f bec 1f jmp cerror 1: clr r0 mov (sp)+,r5 rts pc .data 9: sys seek; 0:..; .. ((c = (*qscmp)(hp, j)) == 0) { qsexc(hp =+ es, j); goto loop; } if(c > 0) { if(i == lp) { qstexc(i, hp =+ es, j); i = lp =+ es; goto loop; } qsexc(i, j); j =- es; i =+ es; continue; } j =- es; goto loop; } if(i == lp) { if(lp-a >= l-hp) { qs1(hp+es, l); l = lp; } else { qs1(a, lp); a = hp+es; } goto start; } qstexc(j, lp =- es, i); j = hp =- es; } } qsexc(i, j) char *i, *j; { register char *ri, *rj, c;/ profil .globl _profil _profil: mov r5,-(sp) mov sp,r5 mov 4(r5),0f mov 6(r5),0f+2 mov 10(r5),0f+4 mov 12(r5),0f+6 sys 0; 9f mov (sp)+,r5 rts pc .data 9: sys 44.; 0:..; ..; ..; .. /old = sbrk(increment); / /sbrk gets increment more core, and returns a pointer / to the beginning of the new core area / .globl _sbrk,_end, cerror _sbrk: mov r5,-(sp) mov sp,r5 mov nd,0f add 4(r5),0f sys 0; 9f bec 1f jmp cerror 1: mov nd,r0 add 4(r5),nd mov (sp)+,r5 rts pc .globl _brk / brk(value) / as described in man2. / returns 0 for ok, -1 for error. _brk: mov r5,-(sp) mov sp,r5 mov 4(r5),0f sys 0; 9f bec 1f jmp cerror 1: mov 4(r5),nd clr r0 mov (sp)+,r5 rts pc .data 9: sys br int n; n = qses; ri = i; rj = j; do { c = *ri; *ri++ = *rj; *rj++ = c; } while(--n); } qstexc(i, j, k) char *i, *j, *k; { register char *ri, *rj, *rk; char c; int n; n = qses; ri = i; rj = j; rk = k; do { c = *ri; *ri++ = *rk; *rk++ = *rj; *rj++ = c; } while(--n); } / C library -- printf .globl _printf .globl pfloat .globl pscien .globl _putchar .globl csv .globl cret _printf: jsr r5,csv sub $126.,sp mov 4(r5),formp / format mov r5,r4 add $6,r4 / arglist loop: movb *formp,r0 beq 1f inc formp cmp r0,$'% beq 2f 3: mov r0,(sp) jsr pc,*$_putchar br loop 1: jmp cret 2: clr rjust clr ndigit cmpb *formp,$'- bne 2f inc formp inc rjust 2: jsr r3,gnum mov r1,width clr ndfnd cmp r0,$'. bne 1f jsr r3,gnum mov r1,ndigit 1: mov sp,r3 add $4,r3 meak; 0:.. nd: _end / C library -- putchar .globl _putchar,_flush .globl _fout _putchar: mov r5,-(sp) mov sp,r5 mov _fout+4,r0 bne 1f jsr pc,fl mov _fout+4,r0 1: movb 4(r5),(r0)+ beq 1f inc _fout+4 dec _fout+2 bgt 1f jsr pc,fl 1: mov 4(r5),r0 mov (sp)+,r5 rts pc _flush: mov r5,-(sp) mov sp,r5 jsr pc,fl mov (sp)+,r5 rts pc fl: mov _fout+4,r0 beq 1f sub $_fout+6,r0 mov r0,0f mov _fout,r0 bne 2f inc r0 2: sys 0; 9f .data 9: sys write; _fout+6; 0:.. .text 1: mov $_fout+6,_fout+4 mov $512.,_fout+ov $swtab,r1 1: mov (r1)+,r2 beq 3b cmp r0,(r1)+ bne 1b jmp (r2) .data swtab: decimal; 'd octal; 'o hex; 'x float; 'f scien; 'e charac; 'c string; 's logical; 'l remote; 'r 0; 0 .text decimal: mov (r4)+,r1 bge 1f neg r1 movb $'-,(r3)+ br 1f logical: mov (r4)+,r1 1: jsr pc,1f br prbuf 1: clr r0 div $10.,r0 mov r1,-(sp) mov r0,r1 beq 1f jsr pc,1b 1: mov (sp)+,r0 add $'0,r0 movb r0,(r3)+ rts pc charac: movb (r4)+,(r3)+ bne 1f dec r3 1: movb (r4)+,(r3)+ bne prbrin() { double d; register n, c, f; d = 0.; f = 0; n = 0; loop: c = getchar(); if(c == '\0') exit(); if(c == '-') { f++; goto loop; } if(c == '.') { n++; goto loop; } if(c>='0' && c<='9') { if(n) n++; d = d*10.+c-'0'; goto loop; } if(f) d = -d; for(f=1; f; 9:.even; .text _exit: mov r5,-(sp) mov sp,r5 clr -(sp) jsr pc,_monitor tst (sp)+ mov 4(r5),r0 sys exit eprol: /* * Print the error indicated * in the cerror cell. */ int errno; int sys_nerr; char *sys_errlist[]; perror(s) char *s; { register char *c; register n; c = "Unknown error"; if(errno < sys_nerr) c = sys_errlist[errno]; n = strlen(s); if(n) { write(2, s, n); write(2, ": ", 2); } write(2, c, strlen(c)); write(2, "\n", 1); } /* * Return the number of bytes in a string */ strlen(str) char *str; { register char *s; s = str; while(*s++) ; return(s-str-1); } / C library -- mount / error = mount(dev, file, flag) .globl _mount, cerror _mount: mov r5,-(sp) mov sp,r5 mov 4(sp),0f mov 6(sp),0f+2 mov 8(sp),0f+4 sys 0; 9f bec 1f jmp cerror 1: clr r0 mov (sp)+,r5 rts pc .data 9: sys mount; 0:..; ..; .. / count subroutine calls during profiling .globl mcount .comm countbase,2 mcount: mov (r0),r1 bne 1f mov countbase,r1 beq 2f add $6,countbase mov (sp),(r1)+ mov r1,(r0) 1: inc 2(r1) bne 2f inc (r1) 2: rts pc / C library -- open / file = open(string, mode) / / file == -1 means error .globl _open, cerror _open: mov r5,-(sp) mov sp,r5 mov 4(r5),0f mov 6(r5),0f+2 sys 0; 9f bec 1f jmp cerror 1: mov (sp)+,r5 rts pc .data 9: sys open; 0:..; .. monitor(lowpc, highpc, buf, bufsiz, cntsiz) char *lowpc, *highpc; int *buf, bufsiz; { register char *o; static *sbuf, ssiz; if (lowpc == 0) { profil(0, 0, 0, 0); o = creat("mon.out", 0666); write(o, sbuf, ssiz<<1); close(o); return; } if (nargs() <= 4) cntsiz = 0; ssiz = bufsiz; buf[0] = lowpc; buf[1] = highpc; buf[2] = cntsiz; sbuf = buf; buf =+ 3*(cntsiz+1); bufsiz =- 3*(cntsiz+1); if (bufsiz<=0) return; o = ((highpc - lowpc)>>1) & 077777; if(bufsiz < o) o = ldiv(bufsiz, 0,/ C library -- makdir / error = makdir(string); .globl _makdir, cerror _makdir: mov r5,-(sp) mov sp,r5 mov 4(r5),0f sys 0; 9f bec 1f jmp cerror 1: clr r0 mov (sp)+,r5 rts pc .data 9: sys makdir; 0:.. / nlist -- extract values from name list / / nlist(file, list); / .globl _nlist _nlist: mov r5,-(sp) mov sp,r5 mov 4(r5),0f mov 6(r5),r1 mov r2,-(sp) mov r1,r0 1: tst (r0) beq 1f add $8.,r0 clr (r0)+ clr (r0)+ / initialize to undefined br 1b 1: sys 0; 9f .data 9: sys open; 0:..; 0 .text bes done mov r0,r2 sys read; buf; 20 cmp r0,$20 bne cdone mov buf+4,count / assume older a.out mov buf+2,0f cmp buf,$405 beq 1f mov buf+8.,count / now assume newer mov buf+2,r0 / txt add  o<<1); else o = 077777; profil(buf, bufsiz<<1, lowpc, o<<1); } / C library / return floating-point from long integer / d = ltod(l) .globl _ltod _ltod: mov r5,-(sp) mov sp,r5 setl movif *4(r5),fr0 seti mov (sp)+,r5 rts pc / return long integer from floating / dtol(d, l) .globl _dtol _dtol: mov r5,-(sp) mov sp,r5 setl movf 4(r5),fr0 movfi fr0,*12.(r5) seti mov (sp)+,r5 rts pc buf+4,r0 / data cmp buf+16,$1 / relocation? beq 4f asl r0 / txt+data reloc 4: add $20,r0 / header mov r0,0f cmp buf,$411 beq 1f cmp buf,$410 beq 1f cmp buf,$407 bne cdone 1: mov r2,r0 sys 0; 9f .data 9: sys seek; 0:..; 0 .text 1: sub $12.,count blt cdone mov r2,r0 sys read; buf; 12. cmp r0,$12. bne cdone mov r1,r0 2: tst (r0) beq 1b cmp (r0),buf bne 1f cmp 2(r0),buf+2 bne 1f cmp 4(r0),buf+4 bne 1f cmp 6(r0),buf+6 bne 1f mov buf+8.,8.(r0) mov buf+10.,10.(r0) 1: a/ C library -- mknod / error = mknod(string, mode, major.minor); .globl _mknod, cerror mknod = 14. _mknod: mov r5,-(sp) mov sp,r5 mov 4(r5),0f mov 6(r5),0f+2 mov 8(r5),0f+4 sys 0; 9f bec 1f jmp cerror 1: clr r0 mov (sp)+,r5 rts pc .data 9: sys mknod; 0:..; ..; .. / C library -- long output conversion .globl _locv _locv: mov r5,-(sp) mov sp,r5 mov r4,-(sp) mov r3,-(sp) mov r2,-(sp) mov $buf,r4 mov 6(r5),r3 mov 4(r5),r2 bpl 1f neg r2 neg r3 sbc r2 movb $'-,(r4)+ 1: jsr pc,1f clrb (r4)+ mov $buf,r0 mov (sp)+,r2 mov (sp)+,r3 mov (sp)+,r4 mov (sp)+,r5 rts pc 1: jsr pc,divid add $'0,r1 mov r1,-(sp) ashc $0,r2 beq 1f jsr pc,1b 1: movb (sp)+,(r4)+ rts pc divid: clr r1 mov $32.,r0 1: ashc $1,r2 rol r1 cmp r1,$10. blo 2f sub $10.,r1 indd $12.,r0 br 2b cdone: mov r2,r0 sys close done: mov (sp)+,r2 mov (sp)+,r5 rts pc .bss buf: .=.+20 count: .=.+2 .globl getchar .globl lookchar .globl w, r, a, l / / / routine to read next character from string / pointer to by r1; character returned in r0 / c-bit set if character not availiable (eof) / / mov ...,r1 / jsr pc,getchar / movb r0,... / getchar: jsr pc,lookchar bes 1f inc r(r1) tst r0 1: rts pc c r3 2: sob r0,1b rts pc .bss buf: .=.+12. / C library-- nice / error = nice(hownice) .globl _nice, cerror _nice: mov r5,-(sp) mov sp,r5 mov 4(sp),r0 sys nice bec 1f jmp cerror 1: clr r0 mov (sp)+,r5 rts pc / C library-- mdate .globl _mdate, cerror _mdate: mov r5,-(sp) mov sp,r5 mov 4(r5),0f mov 6(r5),r1 mov (r1)+,r0 mov (r1),r1 sys 0; 9f bec 1f jmp cerror 1: clr r0 mov (sp)+,r5 rts pc .data 9: sys mdate; 0:.. / C library -- link / error = link(old-file, new-file); / .globl _link, cerror _link: mov r5,-(sp) mov sp,r5 mov 4(r5),0f mov 6(r5),0f+2 sys 0; 9f bec 1f jmp cerror 1: clr r0 mov (sp)+,r5 rts pc .data 9: sys link; 0:..; .. / C library -- nargs / WARNING: this routine does not work / with user I&D space separate. / Moreover, due to a design botch in / the 11/45, it cannot be made to work / by adding mfpi instructions. .globl _nargs _nargs: mov r5,-(sp) mov 2(r5),r1 / pc of caller of caller mov sp,r5 clr r0 cmp -4(r1),jsrsd bne 8f mov $2,r0 8: cmp (r1),tsti bne 1f add $2,r0 br 2f 1: cmp (r1),cmpi bne 1f add $4,r0 br 2f 1: cmp (r1),addi bne 1f add 2(r1),r0 br 2f 1: cmp (r1),jmpi bne 1f add 2(r1),r1 add/ C runtime startoff including monitoring cbufs = 150. .globl _monitor .globl _sbrk .globl _main .globl _exit .globl _etext .comm countbase,2 .comm savr5,2 start: setd mov sp,r0 mov (r0),-(sp) tst (r0)+ mov r0,2(sp) mov $_etext,r1 sub $eprol,r1 add $7,r1 ash $-3,r1 bic $!17777,r1 mov $cbufs,-(sp) add $3*[cbufs+1],r1 mov r1,-(sp) asl r1 mov r1,-(sp) jsr pc,_sbrk tst (sp)+ cmp r0,$-1 beq 9f mov r0,-(sp) add $6,r0 mov r0,countbase mov $_etext,-(sp) mov $eprol,-(sp) jsr pc,_monitorldfps = 170100^tst / / ldfps(number); .globl _ldfps _ldfps: mov r5,-(sp) mov sp,r5 ldfps 4(r5) mov (sp)+,r5 rts pc / C routine-- long integer subtract and add / ladd/lsub (a, b, c); / int a[2], b[2], c[2]; / a = b +- c; .globl _lsub .globl _ladd .globl csv .globl cret _lsub: jsr r5,csv mov 6(r5),r2 mov (r2)+,r0 mov (r2),r1 mov 10(r5),r2 sub (r2)+,r0 sub (r2),r1 sbc r0 mov 4(r5),r2 mov r0,(r2)+ mov r1,(r2) jmp cret _ladd: jsr r5,csv mov 6(r5),r2 mov (r2)+,r0 mov (r2),r1 mov 10(r5),r2 add (r2)+,r0 add (r2),r1 adc r0 mov 4(r5),r2 mov r0,(r2)+ mov r1,(r2) jmp cret / C library -- getuid / uid = getuid(); / .globl _getuid _getuid: mov r5,-(sp) mov sp,r5 sys getuid mov (sp)+,r5 rts pc  dec 2(r1) 1: mov 4(r1),r0 movb (r0)+,-(sp) 3: movb (r0)+,1(sp) mov r0,4(r1) mov (sp)+,r0 mov (sp)+,r5 rts pc _getc: mov r5,-(sp) mov sp,r5 mov 4(r5),r1 dec 2(r1) bge 1f jsr pc,fill 1: clr r0 bisb *4(r1),r0 inc 4(r1) mov (sp)+,r5 rts pc fill: mov r1,r0 add $6,r0 mov r0,0f mov r0,4(r1) mov (r1),r0 sys 0; 9f .data 9: sys read; 0:..; 512. .text bes badret dec r0 bmi badret mov r0,2(r1) rts pc badret: jmp cerror / C library -- kill .globl _kill, cerror kill = 37. indir = 0 _kill: mov r5,-(sp) mov sp,r5 mov 4(sp),r0 mov 6(sp),8f sys indir; 9f bec 1f jmp cerror 1: clr r0 mov (sp)+,r5 rts pc .data 9: sys kill; 8:.. getpw(uid, buf) int uid; char buf[]; { auto pbuf[259]; static pwf; register n, c; register char *bp; if(pwf == 0) pwf = open("/etc/passwd", 0); if(pwf < 0) return(1); seek(pwf, 0, 0); pbuf[0] = pwf; pbuf[1] = 0; pbuf[2] = 0; uid =& 0377; for (;;) { bp = buf; while((c=getc(pbuf)) != '\n') { if(c <= 0) return(1); *bp++ = c; } *bp++ = '\0'; bp = buf; n = 3; while(--n) while((c = *bp++) != ':') if(c == '\n') return(1); while((c = *bp++) != ':') { if(c<'0' / C library -- fstat / error = fstat(file, statbuf); / int statbuf[17] or / char statbuf[34] / as appropriate .globl _fstat, cerror _fstat: mov r5,-(sp) mov sp,r5 mov 4(r5),r0 mov 6(r5),0f sys 0; 9f bec 1f jmp cerror 1: clr r0 mov (sp)+,r5 rts pc .data 9: sys fstat; 0:.. #include "r.h" char outbuf[80]; int outp 0; int cont 0; outcode(p) char *p; { int i,j,c,c1; char *q; if( p == 0 ){ outbuf[outp] = '\0'; printf("%s\n", outbuf); outp = cont = 0; return; } while( (c = *p++) ){ c1 = *p; switch(c){ case '"': case '\'': for( q=p; *q != c; q++ ); outnum(q-p); ptc('h'); while( p != q ) ptc(*p++); p++; break; case '>': if( c1=='=' ){ pts(".ge."); p++; } else pts(".gt."); break; case '<': if( c1=='=' ){ pts(".|| c>'9') continue; n = n*10+c-'0'; } if(n == uid) return(0); } return(1); } / C library -- fork / pid = fork(); / / pid == 0 in child process; pid == -1 means error return / in child, parents id is in par_uid if needed .globl _fork, cerror, _par_uid _fork: mov r5,-(sp) mov sp,r5 sys fork br 1f bec 2f jmp cerror 1: mov r0,_par_uid clr r0 2: mov (sp)+,r5 rts pc .bss _par_uid: .=.+2 le."); p++; } else if( c1=='>' ){ pts(".ne."); p++; } else pts(".lt."); break; case '=': if( c1=='=' ){ pts(".eq."); p++; } else ptc('='); break; case '!': if( c1=='=' ){ pts(".ne."); p++; } else pts(".not."); break; case '&': if( c1=='&' ) p++; pts(".and."); break; case '|': if( c1=='|' ) p++; pts(".or."); break; case '\t': tabs(); break; case '\n': ptc(' '); break; default: ptc(c); break; } } } / getpid -- get process ID getpid = 20. .globl _getpid _getpid: mov r5,-(sp) mov sp,r5 sys getpid mov (sp)+,r5 rts pc / C library-- floating output .globl pfloat .globl pscien .globl fltused .globl _ndigit .globl ecvt .globl fcvt fltused: / force loading pfloat: mov r0,_ndigit tst r2 bne 1f mov $6,_ndigit 1: movf (r4)+,fr0 jsr pc,fcvt tst r1 beq 1f movb $'-,(r3)+ 1: tst r2 bgt 1f movb $'0,(r3)+ 1: mov r2,r1 ble 1f 2: movb (r0)+,(r3)+ sob r1,2b 1: mov _ndigit,r1 beq 1f movb $'.,(r3)+ 1: neg r2 ble 1f 2: dec r1 blt 1f movb $'0,(r3)+ sob r2,2b 1: tst r1 ble 2f 1: movb (r0)+,(r3)+ sob r1,1b 2:  ptc(c) char c; { if( outp > 71 ) contcard(); outbuf[outp++] = c; } pts(s) char *s; { while(*s) ptc(*s++); } int contfld 0; contcard(){ outbuf[outp] = '\0'; printf("%s\n", outbuf); for( outp=0; outp 0 ) outnum(n); outcode("\tcontinue"); outcode/ C library -- getgid / gid = getgid(); / getgid = 47. .globl _getgid _getgid: mov r5,-(sp) mov sp,r5 sys getgid mov (sp)+,r5 rts pc  rts pc pscien: mov r0,_ndigit tst r2 bne 1f mov $6,_ndigit 1: movf (r4)+,fr0 jsr pc,ecvt tst r1 beq 1f movb $'-,(r3)+ 1: movb (r0)+,(r3)+ movb $'.,(r3)+ mov _ndigit,r1 dec r1 ble 1f 2: movb (r0)+,(r3)+ sob r1,2b 1: movb $'e,(r3)+ dec r2 mov r2,r1 bge 1f movb $'-,(r3)+ neg r1 br 2f 1: movb $'+,(r3)+ 2: clr r0 div $10.,r0 add $'0,r0 movb r0,(r3)+ add $'0,r1 movb r1,(r3)+ rts pc (0); } outgoto(n) int n; { outcode("\tgoto "); outnum(n); outcode(0); } / C library - getcsw / csw = getcsw(); .globl _getcsw _getcsw: mov r5,-(sp) mov sp,r5 sys 38. mov (sp)+,r5 rts pc / C library-- fake floating output .globl pfloat .globl pscien pfloat: pscien: add $8,r4 movb $'?,(r3)+ rts pc .globl _hmul _hmul: mov 2(sp),r0 mul 4(sp),r0 rts pc / getchar() -- get a character from input file fin .globl _getchar .comm _errno,2 .comm _fin,518. _getchar: mov r5,-(sp) mov sp,r5 dec _fin+2 bge 1f mov $_fin+6,_fin+4 mov _fin,r0 sys read; _fin+6; 512. bes badret tst r0 beq badret dec r0 mov r0,_fin+2 1: clr r0 bisb *_fin+4,r0 inc _fin+4 mov (sp)+,r5 rts pc badret: mov r0,_errno clr r0 clr _fin+2 mov (sp)+,r5 rts pc / C runtime startoff / with floating point interpreter .globl savr5 .globl fptrap .globl _exit .globl _main start: sys signal; 4; fptrap setd mov sp,r0 mov (r0),-(sp) tst (r0)+ mov r0,2(sp) jsr pc,_main mov r0,(sp) jsr pc,*$_exit sys exit .bss savr5: .=.+2 / C library -- gtty / error = gtty(filep, ttyvec); / filep is descriptor of open tty / ttyvec[0, 1, 2] correspond to args of gtty .globl _gtty, cerror _gtty: mov r5,-(sp) mov sp,r5 mov 4(r5),r0 mov 6(r5),0f sys 0; 9f bec 1f jmp cerror 1: clr r0 mov (sp)+,r5 rts pc .data 9: sys gtty; 0:.. / getw/getc -- get words/characters from input file / fopen -- open a file for use by get(c|w) indir = 0 .globl _getc, _getw, _fopen .globl cerror .comm _errno,2 _fopen: mov r5,-(sp) mov sp,r5 mov 4(r5),0f sys 0; 9f .data 9: sys open; 0:..; 0 .text bes badret mov 6(r5),r1 mov r0,(r1)+ clr (r1)+ clr r0 mov (sp)+,r5 rts pc _getw: clr _errno mov r5,-(sp) mov sp,r5 mov 4(r5),r1 sub $2,2(r1) bge 1f cmp 2(r1),$-1 blt 2f movb *4(r1),-(sp) jsr pc,fill mov 4(r1),r0 br 3f 2: jsr pc,fill / C library -- exit / exit(code) / code is return in r0 to system .globl _exit _exit: mov r5,-(sp) mov sp,r5 mov 4(r5),r0 sys exit / C library -- execv / execv(file, argv); / / where argv is a vector argv[0] ... argv[x], 0 / last vector element must be 0 / / The _exectrap flags is used by the debugger and causes / a trace trap on the first instruction of the executed instruction / to give a chance to set breakpoints. .globl _execv, cerror .comm __exectrap,2 rtt = 6 _execv: mov r5,-(sp) mov sp,r5 mov 4(r5),0f mov 6(r5),0f+2 tst __exectrap beq 1f mov $170020,-(sp) / t-bit mov $1f,-(sp) rtt 1: sys 0; 9f jmp cerror .data 9:  difference between * Greenwich and local standard time (measured in seconds). * In places like Michigan "daylight" must * be initialized to 0 to prevent the conversion * to daylight time. * There is a table which accounts for the peculiarities * undergone by daylight time in 1974-1975. * * The routine does not work * in Saudi Arabia which runs on Solar time. * * asctime(tvec)) * where tvec is produced by localtime * returns a ptr to a character string * that has the ascii time in the form * / C register save and restore -- version 12/74 .globl csv .globl cret csv: mov r5,r0 mov sp,r5 mov r4,-(sp) mov r3,-(sp) mov r2,-(sp) tst -(sp) jmp (r0) cret: mov r5,r1 mov -(r1),r4 mov -(r1),r3 mov -(r1),r2 mov r5,sp mov (sp)+,r5 rts pc sys exec; 0:..; .. Thu Jan 01 00:00:00 1970n0\\ * 01234567890123456789012345 * 0 1 2 * * ctime(t) just calls localtime, then asctime. */ char cbuf[26]; int dmsize[12] { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; int timezone 5*60*60; int tzname[] { "EST", "EDT", }; int daylight 1; /* Allow daylight conversion */ /* * The following table is used for 1974 and 1975 and * gives the day number of the first day after the Sunday of the * change. */ struct { int daylb; int dayle; } daytab[] { / C runtime startoff .globl savr5 .globl _exit .globl _main start: setd mov sp,r0 mov (r0),-(sp) tst (r0)+ mov r0,2(sp) jsr pc,_main mov r0,(sp) jsr pc,*$_exit sys exit .bss savr5: .=.+2 / C library -- execl / execl(file, arg1, arg2, ... , 0); / .globl _execl, cerror _execl: mov r5,-(sp) mov sp,r5 mov 4(r5),0f mov r5,r0 add $6,r0 mov r0,0f+2 sys 0; 9f jmp cerror .data 9: sys exec; 0:..; ..  5, 333, /* 1974: Jan 6 - last Sun. in Nov */ 58, 303, /* 1975: Last Sun. in Feb - last Sun in Oct */ }; #define SEC 0 #define MIN 1 #define HOUR 2 #define MDAY 3 #define MON 4 #define YEAR 5 #define WDAY 6 #define YDAY 7 #define ISDAY 8 ctime(at) int *at; { return(asctime(localtime(at))); } localtime(tim) int tim[]; { register int *t, *ct, dayno; int daylbegin, daylend; int copyt[2]; t = copyt; t[0] = tim[0]; t[1] = tim[1]; dpadd(t, -timezone); ct = gmtime(t); dayno = ct[YDAY]; daylbegin = / C library -- creat / file = creat(string, mode); / / file == -1 if error .globl _creat, cerror _creat: mov r5,-(sp) mov sp,r5 mov 4(r5),0f mov 6(r5),0f+2 sys 0; 9f bec 1f jmp cerror 1: mov (sp)+,r5 rts pc .data 9: sys creat; 0:..; .. char *sys_errlist[] { "Error 0", "Not super-user", "No such file or directory", "No such process", "Interrupted system call", "I/O error", "No such device or address", "Arg list too long", "Exec format error", "Bad file number", "No children", "No more processes", "Not enough core", "Permission denied", "Error 14", "Block device required", "Mount device busy", "File exists", "Cross-device link", "No such device", "Not a directory", "Is a directory", "Invalid argument", "File table ov119; /* last Sun in Apr */ daylend = 303; /* Last Sun in Oct */ if (ct[YEAR]==74 || ct[YEAR]==75) { daylbegin = daytab[ct[YEAR]-74].daylb; daylend = daytab[ct[YEAR]-74].dayle; } daylbegin = sunday(ct, daylbegin); daylend = sunday(ct, daylend); if (daylight && (dayno>daylbegin || (dayno==daylbegin && ct[HOUR]>=2)) && (dayno= 58) d =+ dysize(t[YEAR]) - 365; return(d - (d - t[YDAY] + t[WDAY] + 700) % 7); } gmtime(tim) int tim[]; { register int d0, d1; register *tp; static xtime[9]; extern int ldivr; /* * break initial number into * multiples of 8 hours. * (28800 = 60*60*8) */ d0 = ldiv(tim[0], tim[1], 28800); d1 = ldivr; tp = &xtime[0]; /* * generate hou/ C library -- chown / error = chown(string, owner); .globl _chown, cerror _chown: mov r5,-(sp) mov sp,r5 mov 4(r5),0f mov 6(r5),0f+2 sys 0; 9f bec 1f jmp cerror 1: clr r0 mov (sp)+,r5 rts pc .data 9: sys chown; 0:..; .. / C library -- dup / f = dup(of) / f == -1 for error dup = 41. .globl _dup, cerror _dup: mov r5,-(sp) mov sp,r5 mov 4(r5),r0 sys dup bec 1f jmp cerror 1: mov (sp)+,r5 rts pc rs:minutes:seconds */ *tp++ = d1%60; d1 =/ 60; *tp++ = d1%60; d1 =/ 60; d1 =+ (d0%3)*8; d0 =/ 3; *tp++ = d1; /* * d0 is the day number. * generate day of the week. */ xtime[WDAY] = (d0+4)%7; /* * year number */ for(d1=70; d0 >= dysize(d1); d1++) d0 =- dysize(d1); xtime[YEAR] = d1; xtime[YDAY] = d0; /* * generate month */ if (dysize(d1)==366) dmsize[1] = 29; for(d1=0; d0 >= dmsize[d1]; d1++) d0 =- dmsize[d1]; dmsize[1] = 28; *tp++ = d0+1; *tp++ = d1; xtime[ISDA/ C library -- chmod / error = chmod(string, mode); .globl _chmod, cerror _chmod: mov r5,-(sp) mov sp,r5 mov 4(r5),0f mov 6(r5),0f+2 sys 0; 9f bec 1f jmp cerror 1: clr r0 mov (sp)+,r5 rts pc .data 9: sys chmod; 0:..; .. Y] = 0; return(xtime); } asctime(t) int *t; { register char *cp, *ncp; register int *tp; cp = cbuf; for (ncp = "Day Mon 00 00:00:00 1900\n"; *cp++ = *ncp++;); ncp = &"SunMonTueWedThuFriSat"[3*t[6]]; cp = cbuf; *cp++ = *ncp++; *cp++ = *ncp++; *cp++ = *ncp++; cp++; tp = &t[4]; ncp = &"JanFebMarAprMayJunJulAugSepOctNovDec"[(*tp)*3]; *cp++ = *ncp++; *cp++ = *ncp++; *cp++ = *ncp++; cp = ct_numb(cp, *--tp); cp = ct_numb(cp, *--tp+100); cp = ct_numb(cp, *--tp+100); cp = ct_numb(cp, *--tp+100)/ C library -- chdir / error = chdir(string); .globl _chdir, cerror _chdir: mov r5,-(sp) mov sp,r5 mov 4(r5),0f sys 0; 9f bec 1f jmp cerror 1: clr r0 mov (sp)+,r5 rts pc .data 9: sys chdir; 0:.. # /* * This routine converts time as follows. * The epoch is 0000 Jan 1 1970 GMT. * The argument time is in seconds since then. * The localtime(t) entry returns a pointer to an array * containing * seconds (0-59) * minutes (0-59) * hours (0-23) * day of month (1-31) * month (0-11) * year-1970 * weekday (0-6, Sun is 0) * day of the year * daylight savings flag * * The routine corrects for daylight saving * time and will work in any time zone provided * "timezone" is adjusted to the; cp =+ 2; cp = ct_numb(cp, t[YEAR]); return(cbuf); } dysize(y) { if((y%4) == 0) return(366); return(365); } ct_numb(acp, n) { register char *cp; cp = acp; cp++; if (n>=10) *cp++ = (n/10)%10 + '0'; else *cp++ = ' '; *cp++ = n%10 + '0'; return(cp); } / C return sequence which / sets errno, returns -1. .globl cerror .comm _errno,2 cerror: mov r0,_errno mov $-1,r0 mov r5,sp mov (sp)+,r5 rts pc atoi(ap) char *ap; { register n, c; register char *p; int f; p = ap; n = 0; f = 0; loop: while(*p == ' ' || *p == ' ') p++; if(*p == '-') { f++; p++; goto loop; } while(*p >= '0' && *p <= '9') n = n*10 + *p++ - '0'; if(f) n = -n; return(n); } add r3,r0 cmp r2,r0 jlo L7 mov r4,r0 asl r0 add r3,r0 mov r0,_allocp cmp r2,r0 jlos L13 mov (r3),*_allocp L13:mov _allocp,r0 bis $1,r0 mov r0,(r3) mov r3,r0 add $2,r0 L11: mov (sp)+,r2 mov (sp)+,r3 mov (sp)+,r4 mov (sp)+,r5 rts pc .globl _free .text _free: mov r5,-(sp) mov sp,r5 mov 4(r5),r0 add $177776,r0 mov r0,_allocp bic $!177776,*_allocp mov (sp)+,r5 rts pc .bss t: .=.+2 ldfps = 170100^tst stfps = 170200^tst / .globl sin, _sin .globl cos, _cos / / floating point sin/cos / replaces the value in fr0 by its sin/cos / there are no error exits / coefficients are #3370 from Hart & Cheney / _sin: mov r5,-(sp) mov sp,r5 movf 4(r5),fr0 jsr pc,sin br 1f _cos: mov r5,-(sp) mov sp,r5 movf 4(r5),fr0 jsr pc,cos 1: mov (sp)+,r5 rts pc cos: absf fr0 mov $1,-(sp) br 1f sin: clr -(sp) 1: stfps -(sp) ldfps $200 movf fr1,-(sp) movf fr2,-(sp) mov r0,-(sp) / / quadrant redu/ C library -- ascii to floating / f = atof(p) / char *p; ldfps = 170100^tst stfps = 170200^tst .globl _atof .globl csv, cret _atof: jsr r5,csv stfps -(sp) ldfps $200 movf fr1,-(sp) clr -(sp) clrf fr0 clr r2 mov 4(r5),r3 1: movb (r3)+,r0 cmp $' ,r0 beq 1b cmpb r0,$'- bne 2f inc (sp) 1: movb (r3)+,r0 2: sub $'0,r0 cmp r0,$9. bhi 2f jsr pc,digit br 1b inc r2 br 1b 2: cmpb r0,$'.-'0 bne 2f 1: movb (r3)+,r0 sub $'0,r0 cmp r0,$9. bhi 2f jsr pc,digit dec r2 br 1b 2: cmpb r0,/ abs - int absolute value. / fabs - floating abs .globl _abs _abs: mov 2(sp),r0 bge 1f neg r0 1: rts pc .globl _fabs _fabs: movf 2(sp),fr0 absf fr0 rts pc ction - arg = (2/J)x / -1 < arg < 1 / movf fr0,-(sp) absf fr0 modf frpi2,fr0 modf $fourth,fr1 mulf $four,fr1 movfi fr1,r0 add 34(sp),r0 movf $one,fr1 inc r0 ror r0 bcs 1f subf $one,fr0 1: ror r0 bcc 1f negf fr0 1: tstf (sp)+ cfcc bpl 1f negf fr0 1: movf fr0,fr1 mulf fr0,fr1 /arg^2 / movf p4,fr2 mulf fr1,fr2 addf p3,fr2 mulf fr1,fr2 addf p2,fr2 mulf fr1,fr2 addf p1,fr2 mulf fr1,fr2 addf p0,fr2 mulf fr2,fr0 / zP(z^2) / movf fr1,fr2 addf q3,fr2 mulf fr1,fr2 addf q2,fr2 $'E-'0 beq 3f cmpb r0,$'e-'0 bne 1f 3: clr r4 clr r1 cmpb (r3),$'- bne 3f inc r4 inc r3 3: movb (r3)+,r0 sub $'0,r0 cmp r0,$9. bhi 3f mul $10.,r1 add r0,r1 br 3b 3: tst r4 bne 3f neg r1 3: sub r1,r2 1: movf $one,fr1 mov r2,-(sp) beq 2f bgt 1f neg r2 1: cmp r2,$38. blos 1f clrf fr0 tst (sp)+ bmi out movf $huge,fr0 br out 1: mulf $ten,fr1 sob r2,1b 2: tst (sp)+ bge 1f divf fr1,fr0 br 2f 1: mulf fr1,fr0 cfcc bvc 2f movf $huge,fr0 2: out: tst (sp)+ beq 1f negf fr0 1:/ C library -- abort .globl _abort iot = 4 _abort: mov r5,-(sp) mov sp,r5 iot mov (sp)+,r5 rts pc mulf fr1,fr2 addf q1,fr2 mulf fr1,fr2 addf q0,fr2 / Q(z^2) / divf fr2,fr0 / zP(z^2)/Q(z^2) / mov (sp)+,r0 movf (sp)+,fr2 movf (sp)+,fr1 ldfps (sp)+ tst (sp)+ / clc /tst clears carry rts pc / fourth = 37600 one = 40200 four = 40600 / .data frpi2: 40042;174603; 67116; 42025 / p0: 046117;031130;175220;165273 p1: 145626;154170;031651;104637 p2: 044726;162341;133224;052302 p3: 143530;056427;005061;125021 p4: 042021;174005;170441;175607 q0: 046003;163716;123445;167144 q1: 044707;047147;032436;120046  movf (sp)+,fr1 ldfps (sp)+ jmp cret / / digit: cmpf $big,fr0 cfcc blt 1f mulf $ten,fr0 movif r0,fr1 addf fr1,fr0 rts pc 1: add $2,(sp) rts pc / / one = 40200 ten = 41040 big = 56200 huge = 77777 / return name of current tty .globl ttyn, _ttyn _ttyn: mov r5,-(sp) mov sp,r5 mov 4(r5),r0 jsr pc,1f mov (sp)+,r5 rts pc ttyn: clr r0 1: mov $'x,name tst -(sp) sys fstat; buf bes er1 mov buf+2,(sp) sys open; dev; 0 bes er1 mov r0,r1 1: mov r1,r0 sys read; buf; 16. bes er cmp r0,$16. bne er mov $buf,r0 cmp (r0)+,(sp) bne 1b cmp (r0)+,$"tt bne 1b cmpb (r0)+,$'y bne 1b tstb (r0)+ beq 1b cmpb (r0),$'\0 bne 1b movb -(r0),name er: mov r1,r0 sys close er1: tst (sp)+ movb naq2: 043423;156142;064161;007314 q3: 042004;123513;026637;160477 / /p0 = .13578 84097 87737 56690 92680 d8 /p1 = -.49429 08100 90284 41611 58627 d7 /p2 = .44010 30535 37526 65019 44918 d6 /p3 = -.13847 27249 98245 28730 54457 d5 /p4 = .14596 88406 66576 87222 26959 d3 /q0 = .86445 58652 92253 44299 15149 d7 /q1 = .40817 92252 34329 97493 95779 d6 /q2 = .94630 96101 53820 81805 71257 d4 /q3 = .13265 34908 78613 63589 11494 d3 /q4 = .1 d1 / storage allocator for use with C / / / / hand-tooled from C compilation to modify save-return / so that it can be called from within the C save / when running with coroutines / /# //* / * C storage allocator / * (circular first fit strategy) / */ /#define BLOK 512 /#define BUSY 01 / /char *allocs[2] { /*initial empty arena*/ / &allocs[1], / &allocs[0] /}; /struct { int word; }; /char **allocp &allocs[1]; /*current search pointer*/ /char **alloct &allocs[1]; /*top of arena (last cell)*/ / /alloc(nbytes) /me,r0 rts pc .data dev: .even .bss buf: .=.+40. name: .=.+2 .A..any.sappend.sarith.sbundle.schar.scopy.s{cstr.smctest.sldecmal.skdiscd.semit.send.sf.sfind.sgetnam.signore.sinc.sinfix.sjget.slvrv.smult.soctal.sparams.spush.sputcal.sputdec.sputoct.spx.sreln.sshift.s{ / register int nwords; / register char **p, **q; / static char **t; / / allocs[0].word =| BUSY; /*static initialization*/ / allocs[1].word =| BUSY; / / nwords = (nbytes+(2*sizeof(p)-1))/sizeof(p); / for(p=allocp;;) { / do { / if((p->word&BUSY)==0) { / while(((q = *p)->word&BUSY)==0) / *p = *q; / if(q >= &p[nwords]) / goto found; / } / q = p; / p = p->word & ~BUSY; / } while(q>=allocp || pword =| BUSY; / alloct = (*t = &t[BLOK]-1); / *alloct = allocs; / alloct->word =| BUSY; / } /found: / allocp = &p[nwords]; / if(q>allocp) / *allocp = *p; / *p = allocp.word|BUSY; / return(p+1); /} / /free(p) /char **p; /{ / allocp = p-1; / allocp->word =& ~BUSY; /} .globl _allocs .data _allocs=. 2+_allocs _allocs .globl _allocp .data _allocp=. 2+_allocs .globl _alloct .data _alloct=. 2+_allocs .globl _alloc .globl _sbrk .text _alloc: mov r5,-(sp) mov sp,r5 mov r4,-(sp) mov r3,-(sp) mov r2,-(sp)ldfps = 170100^tst stfps = 170200^tst / / sqrt replaces the f.p. number in fr0 by its / square root. newton's method / .globl sqrt, _sqrt / / _sqrt: mov r5,-(sp) mov sp,r5 movf 4(r5),fr0 jsr pc,sqrt mov (sp)+,r5 rts pc sqrt: tstf fr0 cfcc bne 1f clc rts pc /sqrt(0) 1: bgt 1f clrf fr0 sec rts pc / sqrt(-a) 1: mov r0,-(sp) stfps -(sp) mov (sp),r0 bic $!200,r0 / retain mode ldfps r0 movf fr1,-(sp) movf fr2,-(sp) / movf fr0,fr1 movf fr0,-(sp) asr (sp) add $20100,(sp) movf (sp)+,fpush.oputcal.oputdec.oputoct.opx.oreln.oshift.ostack.ostring.otable.otq.otrace.otrans.otx.ounary.ounary.o bis $1,_allocs bis $1,2+_allocs mov 4(r5),r4 add $3,r4 asr r4 mov _allocp,r3 jbr L6 L7:mov r3,r2 mov (r3),r3 bic $!177776,r3 cmp r2,_allocp jhis L6 cmp r3,_allocp jlo L6 mov $2000,-(sp) jsr pc,*$_sbrk tst (sp)+ mov r0,t mov r0,*_alloct cmp $177777,r0 jeq L11 mov _alloct,r0 add $2,r0 cmp t,r0 jeq L12 bis $1,*_alloct L12:mov t,r0 add $1776,r0 mov r0,*t mov r0,_alloct mov $_allocs,*_alloct bis $1,*_alloct L6:bit $1,(r3) jeq L8 jbr L7 L20001:mov (r2),(r3) L8:mov (r3),r2 bit $1,(r2) jeq L20001 mov r4,r0 asl r0 r0 /initial guess mov $4,r0 1: movf fr1,fr2 divf fr0,fr2 addf fr2,fr0 mulf $half,fr0 / x = (x+a/x)/2 sob r0,1b 2: movf (sp)+,fr2 movf (sp)+,fr1 ldfps (sp)+ mov (sp)+,r0 clc rts pc / half = 40000 / savr5 - for as progs that call c-callable entries .globl savr5 .bss savr5: .=.+2 / random fixed point number generator .globl rand, srand .globl _rand, _srand _srand: mov 2(sp),ranx rts pc srand: mov r0,ranx rts pc _rand: rand: mov r1,-(sp) mov ranx,r1 mpy $13077.,r1 add $6925.,r1 mov r1,r0 mov r0,ranx bic $100000,r0 mov (sp)+,r1 rts pc .data ranx: 1 di mode movf fr2,-(sp) movf fr1,-(sp) / stexp fr0,-(sp) /scale ldexp $0,fr0 cmpf sqrt2o2,fr0 cfcc blt 1f ldexp $1,fr0 dec (sp) 1: movf fr0,fr1 /(1/2)^(1/2) < x < 2^(1/2) subf $one,fr0 addf $one,fr1 divf fr1,fr0 /z = (x-1)/(x+1) movf fr0,fr1 mulf fr0,fr1 /z^2 / movf p3,fr2 mulf fr1,fr2 addf p2,fr2 mulf fr1,fr2 addf p1,fr2 mulf fr1,fr2 addf p0,fr2 mulf fr2,fr0 /zP(z) / movf fr1,fr2 addf q2,fr2 mulf fr1,fr2 addf q1,fr2 mulf fr1,fr2 addf q0,fr2 /Q(z) / divf fr2,fr0 /zP(z)/Q(zput lines */ for (nlin=0; gets(cstore) && !match(cstore, ".TE"); nlin++) { if (cstore[0] == '.' && letter(cstore[1])) { instead[nlin] = cstore; while (*cstore) cstore++; } else instead[nlin] = 0; for (icol = 0; icol MAXCHS) cstore = cspace = getvec(MAXCHS+100); } /* find longest command string */ for (icol=maxchnge=0; icolmaxchnge) maxchnge = slen(style[icol]); /* set tab stops *; 9f .data 9: sys creat; 0:..; 666 .text bes 1f mov r0,(r1)+ 2: clr (r1)+ clr (r1)+ mov (sp)+,r1 rts r5 1: mov $-1,(r1)+ mov (sp)+,r1 sec rts r5 .data putw: mov (r5),8f mov (r5)+,9f mov r0,-(sp) jsr r5,putc; 8:.. mov (sp)+,r0 swab r0 jsr r5,putc; 9:.. rts r5 .text putc: mov r1,-(sp) mov (r5)+,r1 1: dec 2(r1) bge 1f mov r0,-(sp) jsr pc,fl mov (sp)+,r0 br 1b 1: movb r0,*4(r1) inc 4(r1) mov (sp)+,r1 rts r5 flush: mov r0,-(sp) mov r1,-(sp) mov (r5)+,r1 jsr pc,fl mov (sp)+, 50062 264 d2 /p2 = -.96376 90933 68686 59324 d1 /p3 = .42108 73712 17979 7145 d0 / /q0 = -.12006 95897 79605 25471 7525 d2 /q1 = .19480 96607 00889 73051 623 d2 /q2 = -.89111 09027 93783 12337 d1 /q3 = .1 d1 / / printf(".nr 49 0\n"); for (icol = 0; icol0 ? sep[icol-1] : 0); printf(".nr %2d 0\n", icol+50); for (ilin=0; ilin < nlin; ilin++) { if (icol>0 && dwide[icol-1]>0 && tabentry[ilin][icol]==0) { printf(".nr 48 \\n(%2d+\\w'%s'+%dn\n", icol+48, tabentry[ilin][icol-1], sep[icol-1]); printf(".if \\n(48-\\n(%2d .nr %2d \\n(48\n", icol+50,icol+50); } if ( !span(style[icol],ilin) && /* not part of span */ (dwide[icol] == 0 || tabentry[ilin][icol+1]!=r1 mov (sp)+,r0 rts r5 fl: mov r1,r0 add $6,r0 mov r0,-(sp) mov r0,0f mov 4(r1),0f+2 beq 1f sub (sp),0f+2 mov (r1),r0 sys 0; 9f .data 9: sys write; 0:..; .. .text 1: mov (sp)+,4(r1) mov $512.,2(r1) rts pc / C library-- long divide/remainder .globl _ldiv, _ldivr .globl _lrem _ldiv: mov 2(sp),r0 mov 4(sp),r1 div 6(sp),r0 mov r1,_ldivr rts pc _lrem: mov 2(sp),r0 mov 4(sp),r1 div 6(sp),r0 mov r1,r0 rts pc .bss _ldivr: .=.+2  0) /* not a double item */ && (!span(style[icol+1],ilin) || icol==ncol)) { printf(".nr 47 \\n(%2d+\\w'%s'+%dn\n", icol+49,tabentry[ilin][icol], ct); printf(".if \\n(47-\\n(%2d .nr %2d \\n(47\n", icol+50,icol+50); } } /* clean up spanned headings */ for(ilin=0; ilin1) { argc--; argv++; if (match(*argv, "-ms")) *argv = "/usr/lib/tmac.s"; cin = copen(*argv, 'r'); if (cin < 0) { printf(2,"where is input file %s\n",*argv); cexit(); } } while (gets(line)) if (match(line, ".TS")) tableput(); else puts(line); if (argc <= 1) break; } cexit(); } # define MAXCOL 35 # define MAX { switch ( ylet(style[icol],ilin)) { default: case 'L': case 'l': format = "%s@"; break; case 'R': case 'r': format= "@%s"; break; case 'n': case 'N': if (!dwide[icol] || tabentry[ilin][icol+1] != 0) { format=dwide[icol]? "@%s" : "%s@"; break; } case 'c': case 'C': format = "@%s@"; break; case 's': case 'S': format= ""; break; } if (! (dwide [icol-1]>0 && tabentry[ilin][icol] == 0 )) printf(format, tabentry[ilin][icol]); .globl mesg / usage: / jsr r5,mesg / / .even / ... / / string is output onto $1 / mesg: mov r0,-(sp) mov r5,r0 mov r5,0f 1: tstb (r5)+ bne 1b sub r5,r0 com r0 mov r0,0f+2 mov $1,r0 sys 0; 9f .data 9: sys write; 0:..; .. .text inc r5 bic $1,r5 mov (sp)+,r0 rts r5 LIN 220 # define ONELINE 250 char *tabentry[MAXLIN][MAXCOL]; char extra[MAXCHS]; char *cspace, *cstore; char *exstore extra; int sep[MAXCOL], dwide[MAXCOL]; char *instead[MAXLIN]; int newtab[MAXLIN]; char *style[MAXCOL]; tableput() { /* read input, write output, make tables on the way */ char st[ONELINE], *format; int ilin, nlin, icol, ncol, k, ch, ws, cs, ns; int maxchnge, ct; printf(".TS\n"); /* get command line */ cstore = cspace; exstore = extra; ncol = 0; for (ilin=0; ilin0; k--) printf(" "); } printf("\n"); } printf(".fc\n"); printf(".TE\n"); } match (s1, s2) char *s1, *s2; { while (*s1 == *s2) if (*s1++ == '\0') return(1); else *s2++; return(0); } slen(str) char *str; { int k; for (k=0; *str++ != '\0'; k++); return(k); } space(ch) { switch (ch) { case ' ': case '\t': return(1); } return(0); } letter (ch) { if (ch >= 'a' && ch <= 'z') return(1); if (ch >= 'A' && ch <= 'Z') re.globl log, _log ldfps = 170100^tst stfps = 170200^tst ldexp = 176400^movif stexp = 175000^movfi / / log accepts its argument and returns its result / in fr0. The carry bit is set if the argument is / zero or negative. / The coefficients are #2705 from Hart & Cheney. / / movf arg,fr0 / jsr pc,log / movf fr0,... / _log: mov r5,-(sp) mov sp,r5 movf 4(r5),fr0 jsr pc,log mov (sp)+,r5 rts pc log: tstf fr0 cfcc bgt 1f movf $bigneg,fr0 /return -(big) on error sec rts pc 1: stfps -(sp) ldfps $200 /=0; gets (st); for (k=0; k= '0' && *str <= '9'; str++) k = k*10 + *str - '0'; return(k); } broken(str, nlin) { switch(ylet(str,nlin)) { case 'n': case 'N': return(1); } return(0); } ylet (str, k) char *str; { k++; while (*str &&k--) str++; return(*--str); } span(str, k) { switch(ylet(str,k)) { case 's': case 'S': return(1); } return(0); } maknew(str) char *str; { /* make two numerical fields */ int point; char *p, *q; p = str; for (point=0; *str; str++) if (*str=='.') point=1; if (!point && *(str-1)== '$') return(0); for(; str>p; str--) if ( (point && *str == '.') || (!point && digit(*(str-1)) ) ) break; if (!point && p==str) /* not numerical, don't split */ return(0); p= str; q = exstore; while (*exstore++ = *str++); *p = 0; return(q); } digit(x) { return(x>= '0' && x<= '9'); } settab(ncol, ilin) { int k, icol; printf(".ta "); for (icol = 0; icolhptr) { hptr = params->hptr; hsiz = params->hsiz; symt = params->symt; ssiz = params->ssiz; curb = params->curb; nsym = params->nsym; } symbol[length] = '\0'; /*printf("ssiz = %d; nsym = %d; %s\n", ssiz, nsym, symbol);/*DEBUG*/ sp =amma function is / approximated directly by the asymptotic series. / asymptotic: movf fr0,-(sp) movf fr0,fr1 jsr pc,log subf $half,fr1 mulf fr1,fr0 subf (sp),fr0 addf goobie,fr0 / movf $one,fr1 divf (sp)+,fr1 movf fr0,-(sp) movf fr1,-(sp) mulf fr1,fr1 / mov r0,-(sp) mov $p5p,r0 mov $5,-(sp) movf *(r0)+,fr0 1: mulf fr1,fr0 addf *(r0)+,fr0 dec (sp) bne 1b tst (sp)+ mov (sp)+,r0 mulf (sp)+,fr0 addf (sp)+,fr0 br ret / / here on negative / the negative gamma is computed / in terms of th if ((dwide[icol] == 0 || tabentry[ilin][icol+1] != 0) && !span(style[icol+1],ilin)) printf("\\n(%du ",icol+50); printf("\n"); }  symbol; i = length; h = 1; while(i--) h =* *sp++; if(h == 0100000) { h = 1; } else { h = h<0?(-h)%hsiz:h%hsiz; } if(h == 0) h++; /* printf("%s %d\n",symbol,h); /*DEBUG*/ while((p = &symt[hptr[h]]) > symt) { j = length + 2; sp = symbol; while(--j) { if(*p++ != *sp++) goto no; } return(*p); no: h = (h + h)%hsiz; } if(install) { if(++nsym >= hsiz) { printf("Too many symbols in ignore/only file.\n"); dexit(); } hptr[h] = curb; length++; if((curb + length) >= e pos gamma. / negative: absf fr0 movf fr0,fr1 mulf pi,fr0 jsr pc,sin negf fr0 cfcc beq erret bgt 1f inc signgam absf fr0 1: mov signgam,-(sp) mulf fr1,fr0 divf pi,fr0 jsr pc,log movf fr0,-(sp) movf fr1,fr0 jsr pc,gamma addf (sp)+,fr0 negf fr0 mov (sp)+,signgam br ret / / control comes here for arguments less than 8. / if the argument is 23 then the argument / is reduced in range by the formula / gamma(x+1) = x*gamma(x) / r/ getw/getc -- get words/characters from input file / fopen -- open a file for use by get(c|w) / / calling sequences -- / / mov $filename,r0 / jsr r5,fopen; ioptr / / on return ioptr buffer is set up or error bit is set if / file could not be opened. / / jsr r5,get(c|w)1; ioptr / / on return char/word is in r0; error bit is / set on error or end of file. / / ioptr is the address of a 518-byte buffer / whose layout is as follows: / / ioptr: .=.+2 / file descriptor / .=.+2 / charactssiz) { printf("i/o file too big; ssiz = %d\n", ssiz); dexit(); } while(length--) symt[curb++] = *symbol++; symt[curb++] = install; params->curb = curb; params->nsym = nsym; } return(0); } conf(n,width,buf) char *buf; { auto i,a; i = width; while(i--) buf[i] = ' '; buf[(a = n/10)?conf(a,--width,buf):--width] = n%10 + '0'; return(++width); } comp(a,b) char *a; char *b; { a--; b--; while(*++a == *++b) if(*a == '\0') return(1); return(0); } hyphen() { /* printf("hyphegular: subf $two,fr0 cfcc bge 1f addf $two,fr0 movf fr0,-(sp) addf $one,fr0 movf fr0,-(sp) addf $one,fr0 jsr pc,regular divf (sp)+,fr0 divf (sp)+,fr0 rts pc 1: cmpf $one,fr0 cfcc bgt 1f addf $one,fr0 movf fr0,-(sp) subf $two,fr0 jsr pc,1b mulf (sp)+,fr0 rts pc 1: movf fr2,-(sp) mov r0,-(sp) mov $p4p,r0 mov $6,-(sp) movf fr0,fr2 movf *(r0)+,fr0 1: mulf fr2,fr0 addf *(r0)+,fr0 dec (sp) bne 1b mov $7,(sp) movf fr2,fr1 br 2f 1: mulf fr2,fr1 2: addf *(r0)+,fr1 dec (sp) bne +2 / pointer to next character (reset if no. chars=0) / .=.+512. / the buffer .globl getc,getw,fopen fopen: mov r1,-(sp) mov (r5)+,r1 mov r0,0f sys 0; 9f .data 9: sys open; 0:..; 0 .text bes 1f mov r0,(r1)+ clr (r1)+ mov (sp)+,r1 rts r5 1: mov $-1,(r1) mov (sp)+,r1 sec rts r5 .data getw: mov (r5),9f mov (r5)+,8f jsr r5,getc; 8:.. bec 1f rts r5 1: mov r0,-(sp) jsr r5,getc; 9:.. swab r0 bis (sp)+,r0 rts r5 .text getc: mov r1,-(sp) mov (r5)+,r1 dec 2(r1) bge 1f mov en\n"); /*DEBUG*/ if(gch[fl] == 0) flag[++fl] = &hyp1; return(1); } hyp1() { /* printf("hyp1 c = %o\n",c); /*DEBUG*/ if(c != '\n') { fl--; return(0); } else { l =- 2; flag[fl] = &hyp2; hsw = 1; return(1); } } hyp2() { /* printf("hyp2 c = %o l = %d\n",c,l); /*DEBUG*/ if(hsw && (tab[2].cl[c] == 0)) { l--; if(c == 3) pno(); if(c == '\n') tlno++; return(1); } hsw = 0; if(tab[cs].cl[c]) { line[l] = '\n'; out(); fl--; return(0); } return(1); } pno() { if(flag[fl] != &1b tst (sp)+ mov (sp)+,r0 divf fr1,fr0 movf (sp)+,fr2 rts pc / .data p4p: p6;p5;p4;p3;p2;p1;p0 q6;q5;q4;q3;q2;q1;q0 / p6 = -.67449 50724 59252 89918 d1 / p5 = -.50108 69375 29709 53015 d2 / p4 = -.43933 04440 60025 67613 d3 / p3 = -.20085 27401 30727 91214 d4 / p2 = -.87627 10297 85214 89560 d4 / p1 = -.20886 86178 92698 87364 d5 / p0 = -.42353 68950 97440 89647 d5 / q7 = 1.0 d0 / q6 = -.23081 55152 45801 24562 d2 / q5 = +.18949 82341 57028 01641 d3 / q4 = -.49902 85266 21439 04834 d3 / q3 = -.15286r1,r0 add $6,r0 mov r0,0f mov r0,4(r1) mov (r1),r0 sys 0; 9f .data 9: sys read; 0:..; 512. .text bes 2f tst r0 bne 3f 2: mov (sp)+,r1 sec rts r5 3: dec r0 mov r0,2(r1) 1: clr r0 bisb *4(r1),r0 inc 4(r1) mov (sp)+,r1 rts r5 pno) { flag[++fl] = &pno; pn = 0; return(1); } if(c == '\n') { fl--; out(); return(1); } pn = pn*10 + c - '0'; return(1); }  07273 77952 20248 d4 / q2 = +.99403 07415 08277 09015 d4 / q1 = -.29803 85330 92566 49932 d4 / q0 = -.42353 68950 97440 90010 d5 p1: 143643 26671 36161 72154 p2: 143410 165327 54121 172630 p3: 142773 10340 74264 152066 p4: 142333 125113 176657 75740 p5: 141510 67515 65111 24263 p6: 140727 153242 163350 32217 p0: 144045 70660 101665 164444 q1: 143072 43052 50302 136745 q2: 43433 50472 145404 175462 q3: 142677 11556 144553 154177 q4: 142371 101646 141245 11264 q5: # # include "econs.h" # include "ecmn.h" # define SKIP 0 # define COLLECT 1 # define SKIP2 2 char mone -1; int tlno 1; coll() { cs = COLLECT; temp[t1].beg = &line[l]; return; } save() { extern only; char *pt1,*pt2,cbuf[30]; int a,tt,val; cs = SKIP; line[l] = '\0'; temp[t1].ct = &line[l] - temp[t1].beg; if(!count) if(temp[t1].ct == 1) goto no; pt1 = temp[t1].beg-1; pt2 = cbuf-1; while(*++pt2 = *++pt1) if(*pt2 >= 'A' && *pt2 <= 'Z') *pt2 =| 040; if(count) goto yes; val = search(c 42075 77614 43022 27573 q6: 141270 123404 76130 12650 q0: 144045 70660 101665 164444 p5p: s5;s4;s3;s2;s1;s0 / / s5 = -.16334 36431 d-2 / s4 = +.83645 87892 2 d-3 / s3 = -.59518 96861 197 d-3 / s2 = +.79365 05764 93454 d-3 / s1 = -.27777 77777 35865 004 d-2 / s0 = +.83333 33333 33331 01837 d-1 / goobie = 0.91893 85332 04672 74178 d0 s5: 135726 14410 15074 17706 s4: 35533 42714 111634 76770 s3: 135434 3200 171173 156141 s2: 35520 6375 12373 111437 s1: 136066 5540 132625 63540buf,temp[t1].ct,&itab,0); if(!val == !only) goto yes; no: line[l] = c; return(0); yes: if(count == 0) { tt = t1; while(tt) if(comp(temp[t1].beg,temp[--tt].beg)) goto no; } temp[t1++].term = c; return(1); } out() { auto i,ct,t2; char *b,*e; if(cs == COLLECT) save(); ct = t1; while(ct--) temp[ct].beg[temp[ct].ct] = temp[ct].term; t2 = t1 - 1; while(t1--) { /*printf("t1 = %d beg = %o ct = %d\n",t1,temp[t1].beg,temp[t1].ct); /* DEBUG */ if((ct = temp[t1].ct) >= 15) { ct = 15; }.globl gamma, _gamma, signgam, _signgam .globl log, sin half = 040000 one = 40200 two = 40400 eight = 41000 large = 77777 ldfps = 170100^tst stfps = 170200^tst / / gamma computes the log of the abs of the gamma function. / gamma accepts its argument and returns its result / in fr0. The carry bit is set if the result is / too large to represent. / The sign of the gamma function is / returned in the globl cell signgam. / / The coefficients for expansion around zero / are #5243 from Hart & Cheney; for expansi s0: 37252 125252 125252 125047 goobie: 40153 37616 41445 172645 pi: 40511 7732 121041 64302 .bss _signgam: signgam:.=.+2  put(temp[t1].beg,ct); if(count) { put("\n", 1); continue; } put("\t",1); if(!page) { put(curf,curfl); conf(lno,4,curs); put(curs,4); } else { conf(pn,4,curs); put(curs,4); } if(word == 0) { put("\t",1); if(t1 >= 1) b = temp[t1-1].beg; else b = line; if(t2 > t1) e = temp[t1+1].beg + temp[t1+1].ct; else e = &line[l]; /*printf("e = %o b = %o\n",e,b); /*DEBUG*/ put(b,e-b); } put("\n",1); } t1 = 0; l = -1; lno =+ tlno; tlno = 1; on / around infinity they are #5404. / / movf arg,fr0 / jsr pc,gamma / movf fr0,... / _gamma: mov r5,-(sp) mov sp,r5 movf 4(r5),fr0 jsr pc,gamma mov (sp)+,r5 rts pc gamma: stfps -(sp) ldfps $200 clr signgam movf fr1,-(sp) tstf fr0 cfcc ble negative cmpf $eight,fr0 cfcc blt asymptotic jsr pc,regular / lret: jsr pc,log bec ret 4 ret: movf (sp)+,fr1 ldfps (sp)+ clc rts pc / erret: movf $large,fr0 movf (sp)+,fr1 ldfps (sp)+ sec rts pc / / here for positive x > 8 / the log of the g/ fpx -- floating point simulation .data reenter: 1 .bss asign: .=.+2 areg: .=.+8 aexp: .=.+2 bsign: .=.+2 breg: .=.+8 bexp: .=.+2 fpsr: .=.+2 trapins: .=.+2 ac0: .=.+8. ac1: .=.+8. ac2: .=.+8. ac3: .=.+8. ac4: .=.+8. ac5: .=.+8. sr0: .=.+2 sr1: .=.+2 .=.+2 .=.+2 .=.+2 .=.+2 ssp: .=.+2 spc: .=.+2 sps: .=.+2 pctmp: .=.+8 / fp3 -- floating simulation i.addx: jsr pc,setab br 1f i.subx: jsr pc,setab neg bsign 1: tst bsign beq reta tst asign beq retb mov areg+8,r1 sub breg+8,r1 blt 1f beq 2f cmp r1,$56. bge reta mov $breg,r0 br 4f 1: neg r1 cmp r1,$56. bge retb mov $areg,r0 4: mov r1,-(sp) mov (r0)+,r1 mov (r0)+,r2 mov (r0)+,r3 mov (r0)+,r4 add (sp),(r0) 1: clc ror r1 ror r2 ror r3 ror r4 dec (sp) bgt 1b mov r4,-(r0) mov r3,-(r0) mov r2,-(r0) mov r1,-(r0) tst (sp)+ 2: mov $areg+8,r1 movt (r2) bge 1f tst (r3) bge 1f cmp (r2),(r3) bgt 4f blt 3f 1: cmp (r2)+,(r3)+ bgt 3f blt 4f cmp (r2)+,(r3)+ bne 1f bit $m.ext,fpsr beq 2f cmp (r2)+,(r3)+ bne 1f cmp (r2)+,(r3)+ beq 2f 1: bhi 3f 4: mov $1,(r5) rts pc 3: mov $-1,(r5) rts pc 2: clr (r5) rts pc i.ldcyx: mov (r3)+,(r2)+ mov (r3)+,(r2)+ bit $m.ext,fpsr bne 1f mov (r3)+,(r2)+ mov (r3)+,(r2)+ rts pc 1: clr (r2)+ clr (r2)+ rts pc i.stcxy: mov (r2)+,(r3)+ mov (r2)+,(r3)+ bit $m.ext,fpsr bne 1f clr (r3)+ clr (rbadins: inc trapins br ret sret: mov $fpsr,r0 bic $17,(r0) tst (r5) bpl 1f bis $10,(r0) br ret 1: bne ret bis $4,(r0) ret: mov $sr1,r0 mov (r0)+,r1 mov (r0)+,r2 mov (r0)+,r3 mov (r0)+,r4 mov (r0)+,r5 mov (r0)+,sp mov sr0,r0 mov sps,-(sp) mov spc,-(sp) tst trapins bne 1f inc reenter rti 1: bpt freg: mov r5,r2 bic $!300,r2 asr r2 asr r2 asr r2 add $ac0,r2 rts pc fsrc: mov r5,r3 bic $!7,r3 / register asl r3 add $sr0,r3 mov r5,r0 bic $!70,r0 / mode asr r0 asr r0  $breg+8,r2 mov $4,r0 cmp asign,bsign bne 4f clc 1: adc -(r1) bcs 3f add -(r2),(r1) 2: dec r0 bne 1b br 5f 3: add -(r2),(r1) sec br 2b br 5f 4: clc 1: sbc -(r1) bcs 3f sub -(r2),(r1) 2: dec r0 bne 1b br 5f 3: sub -(r2),(r1) sec br 2b saret: mov $areg,r1 5: tst (r1) bge 3f mov $areg+8,r1 mov $4,r0 clc 1: adc -(r1) bcs 2f neg (r1) 2: dec r0 bne 1b neg -(r1) 3: jsr pc,norm br reta retb: mov $bsign,r1 mov $asign,r2 mov $6,r0 1: mov (r1)+,(r2)+ dec r0 bne 1b reta: 3)+ 1: rts pc i.ldcjx: mov $asign,r0 mov $1,(r0)+ mov (r3)+,(r0)+ bit $m.lngi,fpsr beq 1f mov (r3)+,(r0)+ clr (r0)+ clr (r0)+ mov $32.-8,(r0)+ jmp saret 1: clr (r0)+ clr (r0)+ clr (r0)+ mov $16.-8,(r0) jmp saret i.stcxj: mov r3,r5 mov $asign,r0 jsr pc,seta mov $areg,r0 mov (r0)+,r1 mov (r0)+,r2 mov (r0)+,r3 mov aexp,r0 1: cmp r0,$48.-8 bge 1f clc ror r1 ror r2 ror r3 inc r0 br 1b 1: bgt xoflo tst r1 bne xoflo 1: bit $m.lngi,fpsr beq 1f tst asign bge 2f neg r3 adc rjmp *1f(r0) .data 1: mod0 mod1 mod2 mod3 mod4 mod5 mod6 mod7 .text mod24f: mov $4,r0 bit $m.ext,fpsr beq 1f add $4,r0 1: rts pc mod24d: mov $8,r0 bit $m.ext,fpsr beq 1f sub $4,r0 1: rts pc mod242: mov $2,r0 rts pc mod24i: mov $2,r0 bit $m.lngi,fpsr beq 1f add $2,r0 1: rts pc mod0: jmp *(r1)+ mod0f: sub $sr0,r3 / get fp ac cmp r3,$6*2 bhis badi1 asl r3 asl r3 add $ac0,r3 tst (r1)+ rts r1 mod0ra: bit $m.lngi,fpsr bne badi1 mod0r: cmp r3,$ssp bhis badi1 mod0rxmov r5,r2 mov $asign,r0 tst (r0) beq unflo mov aexp,r1 cmp r1,$177 bgt ovflo cmp r1,$-177 blt unflo add $200,r1 swab r1 clc ror r1 tst (r0)+ bge 1f bis $100000,r1 1: bic $!177,(r0) bis (r0)+,r1 mov r1,(r2)+ mov (r0)+,(r2)+ bit $m.ext,fpsr beq 1f mov (r0)+,(r2)+ mov (r0)+,(r2)+ 1: rts pc unflo: clr (r2)+ clr (r2)+ bit $m.ext,fpsr beq 1f clr (r2)+ clr (r2)+ 1: rts pc ovflo: bis $2,fpsr / set v-bit (overflow) jmp ret i.mulx: jsr pc,i.mul br saret i.modx: jsr pc,i.mul 2 bcs 2f neg r2 2: mov r2,(r5) mov r3,2(r5) rts pc 1: tst r2 bne xoflo tst asign bge 2f neg r3 2: mov r3,(r5) rts pc xoflo: bis $1,fpsr / set fixed overflow (carry) jmp ret i.ldexp: mov $asign,r0 jsr pc,seta mov (r3),aexp jsr pc,reta jmp sret i.stexp: mov $asign,r0 jsr pc,seta mov aexp,(r3) mov r3,r5 jmp sret i.ldfps: mov (r3),fpsr jmp ret i.stfps: mov fpsr,(r3) jmp ret : tst (r1)+ rts r1 mod1: cmp r3,$spc beq badi1 mov (r3),r3 br check mod2: mov (r3),-(sp) jsr pc,*2(r1) cmp r3,$spc bne 1f mov $2,r0 mov *(r3),pctmp mov $pctmp,(sp) 1: add r0,(r3) mov (sp)+,r3 br check mod3: mov *(r3),-(sp) add $2,(r3) mov (sp)+,r3 br check mod4: cmp r3,$spc / test pc beq badi1 jsr pc,*2(r1) sub r0,(r3) mov (r3),r3 br check mod5: cmp r3,$spc beq badi1 sub $2,(r3) mov *(r3),r3 br check mod6: mov *spc,-(sp) add $2,spc add (r3),(sp) mov (sp)+,r3 br chejsr pc,norm mov $asign,r0 mov $bsign,r1 mov $6,r2 1: mov (r0)+,(r1)+ dec r2 bne 1b clr r0 / count mov $200,r1 / bit clr r2 / reg offset 1: cmp r0,aexp bge 2f / in fraction bic r1,areg(r2) br 3f 2: bic r1,breg(r2) 3: inc r0 clc ror r1 bne 1b mov $100000,r1 add $2,r2 cmp r2,$8 blt 1b jsr pc,norm jsr pc,reta cmp r5,$ac1 beq 1f cmp r5,$ac3 beq 1f bit $200,breg bne 2f clr bsign 2: add $8,r5 jsr pc,retb sub $8,r5 1: rts pc i.divx: jsr pc,setab tst bsign beq ovflo sub be  ck mod7: jsr r1,mod6; ..; .. mov (r3),r3 br check badi1: jmp badins check: bit $1,r3 bne badi1 cmp (r1)+,(r1)+ rts r1 setab: mov $asign,r0 jsr pc,seta mov r3,r2 mov $bsign,r0 seta: clr (r0) mov (r2)+,r1 mov r1,-(sp) beq 1f blt 2f inc (r0)+ br 3f 2: dec (r0)+ 3: bic $!177,r1 bis $200,r1 br 2f 1: clr (r0)+ 2: mov r1,(r0)+ mov (r2)+,(r0)+ bit $m.ext,fpsr beq 2f mov (r2)+,(r0)+ mov (r2)+,(r0)+ br 3f 2: clr (r0)+ clr (r0)+ 3: mov (sp)+,r1 asl r1 clrb r1 swab r1 sub $200xp,aexp jsr pc,xorsign mov r5,-(sp) mov $areg,r0 mov (r0),r1 clr (r0)+ mov (r0),r2 clr (r0)+ mov (r0),r3 clr (r0)+ mov (r0),r4 clr (r0)+ mov $areg,r5 mov $400,-(sp) 1: mov $breg,r0 cmp (r0)+,r1 blt 2f bgt 3f cmp (r0)+,r2 blo 2f bhi 3f cmp (r0)+,r3 blo 2f bhi 3f cmp (r0)+,r4 bhi 3f 2: mov $breg,r0 sub (r0)+,r1 clr -(sp) sub (r0)+,r2 adc (sp) clr -(sp) sub (r0)+,r3 adc (sp) sub (r0)+,r4 sbc r3 adc (sp) sub (sp)+,r2 adc (sp) sub (sp)+,r1 bis (sp),(r5) 3: asl r4 rol r3 / fp1 -- floating point simulator rti = 2 bpt = 3 m.ext = 200 / long mode bit m.lngi = 100 / long integer mode .globl fptrap .globl ac0, ac1, ac2, ac3 fptrap: dec reenter bge 1f 4 / reentered! 1: mov (sp)+,spc mov (sp)+,sps mov r0,sr0 mov $sr1,r0 mov r1,(r0)+ mov r2,(r0)+ mov r3,(r0)+ mov r4,(r0)+ mov r5,(r0)+ mov sp,(r0)+ sub $8,sp / room for double push mov (r0),r5 / pc clr trapins mov -(r5),r5 / trapped instruction mov r5,r4 bic $7777,r4 cmp r4,$170000 beq 1f jmp badins 1: ,r1 mov r1,(r0)+ / exp rts pc norm: mov $areg,r0 mov (r0)+,r1 mov r1,-(sp) mov (r0)+,r2 bis r2,(sp) mov (r0)+,r3 bis r3,(sp) mov (r0)+,r4 bis r4,(sp)+ bne 1f clr asign rts pc 1: bit $!377,r1 beq 1f clc ror r1 ror r2 ror r3 ror r4 inc (r0) br 1b 1: bit $200,r1 bne 1f asl r4 rol r3 rol r2 rol r1 dec (r0) br 1b 1: mov r4,-(r0) mov r3,-(r0) mov r2,-(r0) mov r1,-(r0) rts pc  rol r2 rol r1 clc ror (sp) bne 1b mov $100000,(sp) add $2,r5 cmp r5,$areg+8 blo 1b tst (sp)+ mov (sp)+,r5 jmp saret i.mul: jsr pc,setab add bexp,aexp dec aexp jsr pc,xorsign mov r5,-(sp) mov $breg+4,r5 bit $m.ext,fpsr beq 1f add $4,r5 1: clr r0 clr r1 clr r2 clr r3 clr r4 1: asl r0 bne 2f inc r0 tst -(r5) 2: cmp r0,$400 bne 2f cmp r5,$breg bhi 2f mov $areg,r0 mov r1,(r0)+ mov r2,(r0)+ mov r3,(r0)+ mov r4,(r0)+ mov (sp)+,r5 rts pc 2: clc ror r1 ror r2 ror r3 ro bic $100000,fpsr / clear fp error bic $170000,r5 mov r5,r4 bit $7000,r4 bne class3 bit $700,r4 bne class2 cmp r4,$12 blos 1f jmp badins 1: asl r4 jmp *1f(r4) .data 1: i.cfcc / 170000 i.setf / 170001 i.seti / 170002 badins badins badins badins badins badins i.setd / 170011 i.setl / 170012 .text class2: cmp r5,$400 bge 1f jsr r1,fsrc; mod0rx; mod242 br 2f 1: jsr r1,fsrc; mod0f; mod24f 2: mov r3,r5 asl r4 asl r4 clrb r4 swab r4 asl r4 jsr pc,*1f(r4) jmp sret .data/ C floating mod / fmod(a,b) returns a number n such that / i*b + n is a and 0 <= n < b .globl _fmod _fmod: mov r5,-(sp) mov sp,r5 movf 4(r5),fr0 divf 12.(r5),fr0 modf $one,fr0 mulf 12.(r5),fr1 movf 4(r5),fr0 subf fr1,fr0 mov (sp)+,r5 rts pc one = 40200 r r4 bit r0,(r5) beq 1b mov r0,-(sp) mov $areg,r0 add (r0)+,r1 clr -(sp) add (r0)+,r2 adc (sp) clr -(sp) add (r0)+,r3 adc (sp) add (r0)+,r4 adc r3 adc (sp) add (sp)+,r2 adc (sp) add (sp)+,r1 mov (sp)+,r0 br 1b xorsign: cmp asign,bsign beq 1f mov $-1,asign rts pc 1: mov $1,asign rts pc  1: badins / 1700xx i.ldfps / 1701xx i.stfps / 1702xx badins / 1703xx - stst i.clrx / 1704xx i.tstx / 1705xx i.absx / 1706xx i.negx / 1707xx .text class3: cmp r5,$5000 blt 1f mov r5,r2 clrb r2 cmp r2,$6400 blt 2f sub $1400,r2 2: cmp r2,$5000 bne 2f jsr r1,fsrc; mod0rx; mod242 br 3f 2: cmp r2,$5400 bne 2f jsr r1,fsrc; mod0ra; mod24i br 3f 2: jsr r1,fsrc; mod0f; mod24d br 3f 1: jsr r1,fsrc; mod0f; mod24f 3: jsr pc,freg mov r2,r5 clrb r4 swab r4 asl r4 jsr pc,*1f(r4) .globl _floor, _ceil .globl floor, ceil one = 40200 _floor: mov r5,-(sp) mov sp,r5 movf 4(r5),fr0 jsr pc,floor br 1f _ceil: mov r5,-(sp) mov sp,r5 movf 4(r5),fr0 jsr pc,ceil 1: mov (sp)+,r5 rts pc floor: tstf fr0 cfcc bge 1f modf $one,fr0 cfcc beq 2f subf $one,fr1 br 2f 1: modf $one,fr0 2: movf fr1,fr0 rts pc ceil: negf fr0 jsr pc,floor negf fr0 rts pc / fp2 -- floating point simulation i.ldx: mov (r3)+,(r2)+ mov (r3)+,(r2)+ bit $m.ext,fpsr beq 1f mov (r3)+,(r2)+ mov (r3)+,(r2)+ rts pc 1: clr (r2)+ clr (r2)+ rts pc i.stx: mov (r2)+,(r3)+ mov (r2)+,(r3)+ bit $m.ext,fpsr beq 1f mov (r2)+,(r3)+ mov (r2)+,(r3)+ 1: rts pc i.clrx: clr (r3)+ clr (r3)+ bit $m.ext,fpsr beq 1f clr (r3)+ clr (r3)+ 1: rts pc i.negx: tst (r3) beq 1f add $100000,(r3) 1: rts pc i.absx: bic $!77777,(r3) rts pc i.tstx: rts pc i.cmpx: mov $areg,r5 tsbr sret .data 1: badins / 1700xx badins / 1704xx i.mulx / 1710xx i.modx / 1714xx i.addx / 1720xx i.ldx / 1724xx i.subx / 1730xx i.cmpx / 1734xx i.stx / 1740xx i.divx / 1744xx i.stexp / 1750xx i.stcxj / 1754xx i.stcxy / 1760xx i.ldexp / 1764xx i.ldcjx / 1770xx i.ldcyx / 1774xx .text i.cfcc: mov fpsr,r0 bic $!17,r0 mov r0,sps br ret i.setf: bic $m.ext,fpsr br ret i.setd: bis $m.ext,fpsr br ret i.seti: bic $m.lngi,fpsr br ret i.setl: bis $m.lngi,fpsr br ret / / / f45 -- constant pool .globl constn .globl evalcon .globl error .globl perror .globl code .globl getcon .globl setln .globl getln .globl xbuf .globl symbuf .globl negflg constn: jsr r5,setln mov $xbuf+518.,r3 / pool max pointer mov $ibuf+518.,r4 / pool pointer pointer 1: jsr r5,getln br 1f cmp r0,$'c bne 1b jsr r5,packcon mov r2,-(r4) / put p ptr in p p ptr cmp r3,r4 blo 1b jsr r5,error; 99. jsr r5,perror 1: mov $xbuf+518.,r2 1: cmp r2,r3 bhis 1f mov $ibuf+518.,r1 2: cmp r1,r4 blo 2f cmp -(r1),r2 bne 2b mov r1,r0 sub $ibuf+516.,r0 asr r0 neg r0 jsr r5,code ; .even r0 br 2b 2: mov (r2)+,r0 jsr r5,code < %o\n\0>; .even r0 br 1b 1: rts r5 packcon: mov $line,r1 jsr r5,evalcon mov r1,-(sp) mov r3,-(sp) sub r2,(sp) asr (sp) mov r2,-(sp) mov $xbuf+518.,r2 1: mov (sp),r3 mov r2,r1 tst (r2)+ mov 2(sp),r0 2: cmp (r1)+,(r3)+ bne 1b dec r0 bgt 2b tst -(r2) mov (sp)+,r3 asl (sp) add r2,(sp) cmp (sp),r3 blos 1f mov (sp),r3 / eureka 1:  { int hsiz; int ssiz; int nsym; int curb; int *hptr; char *symt; }; struct htab itab; int ipsp[PTRI]; char issp[CHARI]; int ib1[259]; char *ibuf; char *ibuf1; char mone; int order; int ssw; int type; char *utmp; r0,$6. / / blo 1f cmp r0,$8. / * bhi 1f jsr r5,block; e8a br 2b e8a: jsr r5,getsym e8: jsr r5,e9 cmp r0,$4 / ** bne 1f jsr r5,block; e9a 1: rts r5 e9a: jsr r5,getsym e9: cmp r0,$2 / constant beq 3f / (e2) cmp r0,$32. / ( bne 1f jsr r5,e2 br 2f e10: jsr r5,e1 2: cmp r0,$34. / ) beq 2f jsr r5,error; 29. rts r5 2: jsr r5,getsym rts r5 1: tst r0 beq e11 / unknown jsr r5,error; 30. rts r5 / name e11: mov r3,r2 jsr r5,getsym cmp r0,$32. / ( bne 1f jsr r5,appl jsr r5,blotst (sp)+ mov (sp)+,r1 rts r5 evalcon: cmpb efno,$5 bne 2f movb efno+1,r0 mov r3,r2 br 1f 2: jsr r5,getcon tst negflg beq 2f negf fr0 negf fr1 2: mov r3,r2 mov efno,r0 mov r0,r1 clrb r0 swab r0 bic $!7,r1 cmpb r1,$realcon beq 3f cmpb r1,$cplxcon beq 2f setl movfi r0,symbuf+1 seti mov $symbuf+5,r1 sub r0,r1 br 1f 2: mov $symbuf+1,r1 movf fr1,symbuf+1 cmp r0,$8 beq 2f movf fr0,symbuf+9. br 1f 2: movf fr0,symbuf+5 br 1f 3: movf fr0,symbuf+1 mov $symbuf+1,r1 1: movb (r1)+char buf[100]; main(argc, argv) char **argv; { register i; register char *c1, *c2; if(argc < 3) { write(2, "arg count\n", 10); exit(); } argc--; c1 = buf; c2 = argv[argc]; while(*c1++ = *c2++); c1[-1] = '/'; *c1++ = '.'; *c1 = '\0'; for(i=1; iint bne 4f movb $1,2(r2) 4: mov r3,temp mov conu,4(r2) inc conu jsr r5,ptemp; 'c; temp; symbuf jsr r,(r3)+ dec r0 bgt 1b bit $1,r3 beq 1f clrb (r3)+ 1: rts r5 / / / f31 - pass3 dispatcher / / main scan loop for pass3 / picks up executable statements / .globl pass3 .globl ifstmt .globl isagn .globl signon .globl signoff .globl getline .globl lookup .globl sasgn .globl error .globl perror .globl doend .globl sform .globl sdata .globl sdo .globl sassi .globl scall .globl scont .globl sretu .globl sgoto .globl sif .globl spaus .globl sstop .globl sread .globl sprin .globl swrit .globl srewi .globl sback .globl sendf .globl blocks .globl blockp .globl code .globl p5,getsym rts r5 appl: clr functn bit $70,symtab(r2) / class bne 1f bis $30,symtab(r2) jsr r5,funimpl 1: mov r2,r3 jsr r5,declimpl mov symtab(r2),r0 bic $!70,r0 / class again cmp r0,$20 / array beq 1f cmp r0,$30 / funct beq 2f jsr r5,error; 33. bic $70,symtab(r2) br appl 1: mov $32.,r0 rts r5 2: mov $34.,r0 rts r5 block: mov blockp,r3 add $6,blockp mov r0,(r3)+ mov r2,(r3)+ mov r3,-(sp) jsr r5,*(r5)+ mov r2,*(sp) mov (sp)+,r2 sub $4,r2 rts r5 / / / f46 -- constant evaluation .globl getcon .globl dope .globl code getcon: mov r0,-(sp) mov r2,-(sp) clr r2 / dec . counter clrf fr0 movif $10.,fr1 clr -(sp) / - flag cmpb (r1)+,$'+ beq 1f cmpb -(r1),$'- bne 1f inc r1 inc (sp) 1: movb (r1)+,r0 sub $'0,r0 cmp r0,$9 blos 2f cmp r0,$'.-'0 bne 1f dec r2 br 1b 2: tst r2 beq 2f dec r2 2: mulf fr1,fr0 movif r0,fr2 addf fr2,fr0 br 1b 1: tst r2 bne 1f dec r2 1: cmp r0,$'e-'0 beq 2f cmp r0,$'d-'0 bne 1f 2: mov r3,-(sp) temp .globl dotabp pass3: jsr r5,signon; 3 br 2f scan3: jsr r5,getline 2: mov $blocks,blockp mov $line,r1 mov r1,r2 jsr r5,lookup; fmttab br 2f mov r0,-(sp) jsr r5,isagn br 1f mov (sp)+,r0 jsr r5,*fmtlst(r0) br scan3 1: tst (sp)+ 2: mov efno,r0 beq 1f jsr r5,ptemp; 's; efno; line jsr r5,code <.%d:\n\0>; .even r0 1: jsr r5,isagn br 1f mov r1,r2 jsr r5,lookup; stmtab br 2f mov r2,r1 jsr r5,*sublst(r0) br 3f 1: jsr r5,sasgn br 3f 2: jsr r5,error; 101. 3: cmp progt,$6 b/ / / f33 -- do, etal .globl sdo .globl dobeg .globl doend .globl getlab .globl e2 .globl error .globl lvalue .globl rvalue .globl code .globl convrt .globl dou .globl dotabp .globl edotab .globl dotab sdo: jsr r5,getlab br 9f jsr r5,dobeg cmp r0,$40. bne 9f rts r5 7: tst (sp)+ 8: tst (sp)+ 9: jsr r5,error; 42. rts r5 dobeg: mov dotabp,r2 cmp r2,$edotab blo 1f jsr r5,error; 44. rts r5 1: mov dou,dotab(r2) inc dou mov r0,dotab+2(r2) add $4,dotabp jsr r5,e2 cmp r0,$38. / = bne 9bclr r3 clr -(sp) cmpb (r1),$'- bne 3f inc r1 inc (sp) br 2f 3: cmpb (r1),$'+ bne 2f inc r1 2: movb (r1)+,r0 sub $'0,r0 cmp r0,$9 bhi 2f mpy $10.,r3 add r0,r3 br 2b 2: tst (sp)+ beq 2f neg r3 2: add r3,r2 mov (sp)+,r3 1: movf fr1,fr2 add $1,r2 beq 1f blt 2f clr -(sp) br 3f 2: mov pc,-(sp) neg r2 3: sub $1,r2 ble 2f mulf fr1,fr2 br 3b 2: tst (sp)+ bne 2f mulf fr2,fr0 br 1f 2: divf fr2,fr0 1: tst (sp)+ beq 1f negf fr0 1: cmpb -(r1),$', bne 1f movf fr0,-(sp) inc r1 ne 1f jsr r5,error; 50. / execut in block data 1: jsr r5,perror mov efno,r0 beq scan3 jsr r5,doend br scan3 ifstmt: mov $blocks,blockp jsr r5,isagn br 1f mov r1,r2 jsr r5,lookup; stmtab1 br 2f mov r2,r1 cmp r0,$4 / don't allow end beq 2f jmp *sublst1(r0) 1: jmp sasgn 2: jsr r5,error; 101. rts r5 send: tst dotabp beq 1f clr r0 jsr r5,doend br send 1: tst progt bne 1f jsr r5,sstop br 2f 1: cmp progt,$6 / block data beq 2f jsr r5,sretu 2: jsr r5,perror jsr r5,signoff; 3  mov r2,-(sp) jsr r5,lvalue mov r3,-(sp) bic $!7,r3 cmp r3,$1 / integer bne 7b jsr r5,e2 cmp r0,$36. / , bne 7b jsr r5,rvalue mov (sp),r2 jsr r5,convrt mov (sp),r3 clrb r3 swab r3 jsr r5,code < gas%d\n goto; 2f\n\0>; .even r3 mov dotabp,r2 mov dotab-4(r2),r0 jsr r5,code ; .even r0 mov (sp)+,r3 mov (sp)+,r2 mov r0,-(sp) mov r3,-(sp) jsr r5,lvalue jsr r5,e2 mov r0,-(sp) jsr r5,rvalue mov 2(sp),r2 jsr r5,convrt cmp (sp)+,$36. / , bne 1f jsr r5,e2 mov r0,-(sjsr r5,getcon movf (sp)+,fr1 / a,b -> r1,r0 1: mov (sp)+,r2 mov (sp)+,r0 rts r5 dope: cmp progt,$6 / test "block data" bne 1f rts r5 1: clr r3 1: cmp r3,symtp bhis 1f mov symtab(r3),r0 bic $!70,r0 cmp r0,$20 bne 2f mov symtab+2(r3),r0 beq 2f mov (r0)+,r1 mov r1,r2 asl r2 add r0,r2 mov (r2),r0 jsr r5,code ; .even r0 r1 3: dec r1 blt 3f mov -(r2),r0 bge 4f jsr r5,code <..; \0>; .even br 3b 4: jsr r5,code <%d.; \0>; .even r0 br 3b 3: mov symtab(r3),rsublst: sdo sublst1: sif sendf send sassi scall scont sretu sgoto spaus sstop sread sprin swrit srewi sback fmtlst: sform sdata stmtab: stmtab1: / keep in this spot!!! <\0> fmttab: <\0> .even p) jsr r5,rvalue mov 2(sp),r2 jsr r5,convrt mov (sp)+,r0 jsr r5,code < do2\0>; .even br 2f 1: jsr r5,code < do1\0>; .even 2: mov (sp)+,r3 clrb r3 swab r3 mov (sp)+,r2 jsr r5,code <%d; o%d\n2:\n\0>; .even r3 r2 rts r5 doend: tst r0 bne 1f jsr pc,gen rts r5 1: clr r2 1: cmp r2,dotabp bhis 1f add $4,r2 cmp r0,dotab-2(r2) bne 1b jsr pc,gen br doend 1: rts r5 gen: mov r0,-(sp) mov dotabp,r2 cmp r0,dotab-2(r2) beq 1f jsr r5,error; 43. 1: mov dotab-4(r2),r0 sub $4,dotab2 clrb r2 swab r2 jsr r5,code <%d.\n\0>; .even r2 2: add $8,r3 br 1b 1: rts r5 / / / f32 -- expression to tree .globl e1 .globl e2 .globl e11 .globl error .globl getsym .globl blockp .globl blocks .globl declimpl .globl conu .globl ptemp .globl functn .globl funimpl / e1: e2[,e1] / e2: e2[.or.e3] / e3: e3[.and.e4] / e4: [.not.]e5 / e5: e6[.rel.e6] / e6: [+-]e7[+-e6] / e7: e7[*/e8] / e8: e9[**e9] / e9: constant / name[(e1)] / (e2) e1: jsr r5,e2 cmp r0,$36. / , bne 1f jsr r5,block; e1 rts r5 e2: jsr r5,e3 2: cmp r0,$30. / or bne 1f jsr r5,block; e3 br 2b e3: jsr r5,p jsr r5,code < goto; t%d\no%d:\n\0>; .even r0 r0 mov (sp)+,r0 rts pc int count; int page; struct { char *beg; int ct; char term; } temp[30]; int pn; int word; int hsw; int t1; int level; int hlevel; int dlevel; int xtrn; int tp[2]; struct { int cl[NUMC]; } tab[NUMS]; int coll(); int save(); int out(); int hyphen(); int hyp1(); int hyp2(); int pno(); int error(); char line[300]; int l; int lno; char c; int cursl; char curs[9]; int curfl; char curf[10]; int usw; int xsw; int only; int cross; int file; int cs; int (*flag[8])(); int fl; char gch[8]; struct htabe4 2: cmp r0,$28. / and bne 1f jsr r5,block; e4 br 2b e4: jsr r5,getsym cmp r0,$26. / not bne e5 clr r2 jsr r5,block; e5a rts r5 e5a: jsr r5,getsym e5: jsr r5,e6 cmp r0,$14. / .lt. blo 1f cmp r0,$24. / .ge. bhi 1f jsr r5,block; e6a rts r5 e6a: jsr r5,getsym e6: cmp r0,$12. / + beq e6a cmp r0,$10. / - bne 2f clr r2 jsr r5,block; e7a br 3f 2: jsr r5,e7 3: cmp r0,$10. / - blo 1f cmp r0,$12. / + bhi 1f jsr r5,block; e7a br 3b e7a: jsr r5,getsym e7: jsr r5,e8 2: cmp / / / f34 -- if statement .globl sif .globl e2 .globl error .globl rvalue .globl code .globl ifstmt .globl iserror .globl getsym .globl geti .globl genop .globl getlab .globl newline sif: jsr r5,e2 / expression jsr r5,iserror br 9f cmp r0,$34. / ) bne 9f jsr r5,rvalue mov $"if,r0 jsr r5,genop bic $!7,r3 cmp r3,$3 / logical bne 1f jsr r5,code <; 1f\n\0>; .even jsr r5,ifstmt jsr r5,code <1:\n\0>; .even rts r5 1: mov $3,-(sp) 1: jsr r5,getlab br 8f jsr r5,code <; .%d\0>; .even r0 dec (sp) beq 1f jsr r5,getsym cmp r0,$36. beq 1b 8: tst (sp)+ br 9f 1: tst (sp)+ jsr r5,newline jsr r5,getsym cmp r0,$40. bne 9f rts r5 9: jsr r5,error; 40. rts r5 n br arydope 1: cmp (r2),$34. / array appl bne 1f jsr r5,funcappl mov (sp)+,r2 mov 2(r2),r3 movb symtab+1(r3),r0 jsr r5,code <%d.\n\0>; .even r0 mov symtab(r3),r3 rts r5 1: cmp (r2),$2 bne 1f movb 3(r2),r3 mov 4(r2),r2 jsr r5,code < rval%d; c%d\n\0>; .even r3 r2 mov (sp)+,r2 mov 2(r2),r3 rts r5 1: cmp (r2),$24. / arith or relat bhi 1f mov 2(r2),r2 bne 3f mov (sp),r2 sub $10.,(r2) / - bin -> - unary mov 4(r2),r2 jsr r5,rvalue br 2f 3: jsr r5,rvalue mov (sp),r2 mov r/ / / f37 -- goto statements of all kinds .globl sgoto .globl intexp .globl e2 .globl code .globl getsym .globl error .globl getlab .globl rvalue .globl convrt .globl chrtab sgoto: movb (r1),r0 cmpb chrtab(r0),$4 / test digit bne 1f / not constant jsr r5,getlab br 8f jsr r5,code < goto; .%d\n\0>; .even r0 br 9f 1: cmpb (r1),$'( beq 1f jsr r5,intexp cmp r0,$36. / , beq 2f jsr r5,code < agoto\n\0>; .even br 9f 2: jsr r5,code < cagoto\n\0>; .even cmpb (r1)+,$'( bne 8f / syn/ / / f35 -- assignment statement .globl sasgn .globl sassi .globl error .globl e2 .globl lvalue .globl rvalue .globl code .globl convrt .globl geti .globl getsym .globl getlab .globl genop .globl newline .globl name sasgn: jsr r5,e2 cmp r0,$38. / = bne 9f mov r2,-(sp) jsr r5,e2 cmp r0,$40. / =| bne 8f tst *(sp) bne 1f / too hard for simple as jsr r5,rvalue mov (sp)+,r2 mov 2(r2),r2 mov r2,-(sp) mov symtab(r2),r2 jsr r5,convrt mov r2,r3 bis $7,r3 mov $"mv,r0 jsr r5,genop mov (sp3,-(sp) mov 4(r2),r2 jsr r5,type cmp *2(sp),$4 / ** bne 3f mov r3,r2 bic $!7,r2 cmp r2,$1 / ** integer bne 3f mov 2(sp),r2 sub $2,(r2) / pr -> pi mov 4(r2),r2 jsr r5,rvalue mov $intcon,r2 jsr r5,convrt mov (sp)+,r3 br 2f 3: mov (sp),r2 jsr pc,maxtyp mov (sp)+,r3 mov r2,-(sp) jsr r5,convrt mov 2(sp),r2 mov 4(r2),r2 jsr r5,rvalue mov (sp)+,r2 jsr r5,convrt mov r2,r3 br 2f 1: cmp (r2),$30. / and or not bhi 1f mov 2(r2),r2 beq 3f jsr r5,rvalue mov $logcon,r2 jsr r5,convrttax jsr pc,stmlist br 9f 1: mov r1,r4 1: movb (r1)+,r0 beq 8f cmp r0,$') bne 1b cmpb (r1)+,$', bne 8f jsr r5,intexp mov r1,-(sp) jsr r5,code < cgoto\n\0>; .even mov r4,r1 tstb (r1)+ jsr pc,stmlist mov (sp)+,r1 9: tstb (r1) beq 1f 8: jsr r5,error; 35. 1: rts r5 stmlist: jsr r5,getlab br 9f jsr r5,code < .%d\n\0>; .even r0 movb (r1)+,r0 cmp r0,$', beq stmlist cmp r0,$') bne 8f jsr r5,code < 0\n\0>; .even rts pc 8: jsr r5,error; 35. 9: rts pc intexp: jsr r5,e2 mov r)+,r3 jsr r5,name rts r5 1: mov r2,r3 mov (sp)+,r2 mov r3,-(sp) jsr r5,lvalue mov (sp)+,r2 mov r3,-(sp) jsr r5,rvalue 1: mov (sp)+,r2 jsr r5,convrt mov r2,r3 bis $7,r3 / type 'g' mov $"as,r0 jsr r5,genop jsr r5,newline rts r5 sassi: jsr r5,getlab br 9f mov r0,-(sp) cmpb (r1)+,$'t bne 8f cmpb (r1)+,$'o bne 8f jsr r5,e2 cmp r0,$40. / =| bne 8f jsr r5,lvalue mov (sp)+,r0 mov r3,-(sp) jsr r5,code < lval; .%d\n\0>; .even r0 mov $int2con,r3 br 1b 8: tst (sp)+ 9: jsr r5 3: mov (sp),r2 mov 4(r2),r2 jsr r5,rvalue mov $logcon,r2 jsr r5,convrt 2: mov (sp)+,r2 mov (r2),r0 cmp r0,$4 bhis 2f add $10.,(r2) / back to binary tst r0 beq 2f sub $8,(r2) / back to pr 2: mov optab(r0),r0 jsr r5,genop jsr r5,newline cmp (r2),$14. / relat blo 2f mov $logcon,r3 2: rts r5 1: jsr r5,error; 54. mov (sp)+,r2 rts r5 pbit: tstb symtab(r3) bge 1f jsr r5,code 1: rts r5 funcappl: mov r2,-(sp) mov functn,r3 jsr r5,code < stsp; ft+%d.\n\0>; .even r3 mov0,-(sp) jsr r5,rvalue mov $intcon,r2 jsr r5,convrt mov (sp)+,r0 rts r5 ,error; 39. rts r5  r3,-(sp) add $2,r3 mov r3,functn clr -(sp) / nargs 1: mov 4(r2),r2 beq 2f inc (sp) cmp (r2),$36. / , bne 1f mov r2,-(sp) mov 2(r2),r2 mov 6(sp),r3 jsr r5,fapp1 mov (sp)+,r2 br 1b 1: mov 4(sp),r3 jsr r5,fapp1 2: mov (sp)+,r0 / nargs mov (sp)+,r2 mov (sp)+,r3 mov 2(r3),r3 jsr r5,code < call\0>; .even jsr r5,pbit jsr r5,code <; %n.; ft+%d.; %d.; \0>; .even r3 r2 r0 cmp functn,functm ble 1f mov functn,functm 1: mov r2,functn rts r5 fapp1: mov 2(r3),r3 / fetch out func/ / / f38 -- wierdo statements .globl sstop .globl scall .globl spaus .globl sretu .globl scont .globl iserror .globl ptemp .globl code .globl geti .globl getsym .globl error .globl declimpl .globl e11 .globl funcappl sstop: clr r0 tstb (r1) beq 1f jsr r5,getsym cmp r0,$2. / const bne 7f cmp r3,$intcon bne 7f jsr r5,geti 1: jsr r5,code < stop; %d\n\0>; .even r0 br 8f spaus: jsr r5,getsym cmp r0,$2 bne 7f cmp r3,$intcon bne 7f jsr r5,geti jsr r5,code < paus; %d\n\0>; .even r0?BE147:=@CFtion name mov symtab+2(r3),r3 / arg conversion bne 2f tst (r2) beq 1f cmp (r2),$32. beq 4f cmp (r2),$42. / lv if funct or name or arry app beq 1f cmp (r2),$2 / lv if const bne 2f mov 4(r2),r3 jsr r5,code < lval; c%d\n\0> r3 br 3f 2: mov r3,-(sp) jsr r5,rvalue mov (sp)+,r2 beq 2f jsr r5,convrt 2: mov functn,r3 jsr r5,code < stsp; ft+%d.\n\0>; .even r3 add $2,functn rts r5 1: clr (r2) / turn func/array names into lvs 4: jsr r5,lvalue 3: mov functn,r3 jsr r5,code < sts br 8f sretu: tst progt bne 1f jsr r5,error; 37. / return in main br sstop 1: jsr r5,code < retrn\n\0>; .even 8: scont: tstb (r1) bne 7f rts r5 7: jsr r5,error; 38. rts r5 iserror: cmp errp,$errb bne 1f tst (r5)+ 1: rts r5 scall: jsr r5,getsym tst r0 bne 7b bit $70,symtab(r3) bne 1f bis $30,symtab(r3) 1: jsr r5,declimpl jsr r5,e11 cmp r0,$40. bne 7b cmp (r2),$34. beq 1f cmp (r2),$42. bne 7b 1: jsr r5,funcappl jsr r5,code <0\n\0>; .even br 8b / / / f36 -- expression code generation .globl lvalue .globl rvalue .globl convrt .globl type .globl funcappl .globl name .globl error .globl lookup .globl code .globl iserror .globl genop .globl typ .globl newline .globl functn .globl size lvalue: jsr r5,iserror rts r5 tst (r2) bne 1f mov 2(r2),r3 jsr r5,code < lval>; .even br name 1: mov r2,-(sp) cmp (r2),$32. / array appl bne 1f jsr r5,aryappl dec r0 bne 2f / dim =| 1 tstb symtab(r3) blt 2f / p-bit, not simple mov $"al,r0 brt; ft+%d.\n\0>; .even r3 add $2,functn rts r5 aryappl: mov r2,-(sp) clr -(sp) / arg count 2: inc (sp) mov 4(r2),r2 cmp (r2),$36. / , bne 2f mov r2,-(sp) mov 2(r2),r2 jsr r5,rvalue mov $intcon,r2 jsr r5,convrt mov (sp)+,r2 br 2b 2: jsr r5,rvalue mov $intcon,r2 jsr r5,convrt mov (sp)+,r0 mov (sp)+,r2 mov 2(r2),r3 cmp r0,*symtab+2(r3) beq 1f jsr r5,error; 53. / dimension mismatch 1: rts r5 / converts stack from type in r3 to type in r2 convrt: mov r2,-(sp) mov r3,-(sp) bic $![/ / / f39 -- i/o statements .globl sread .globl swrit .globl sprin .globl sback .globl srewi .globl sendf .globl getsym .globl error .globl geticon .globl e2 .globl lvalue .globl rvalue .globl iserror .globl convrt .globl code .globl chrtab .globl blocks .globl blockp .globl doend .globl genop .globl levzer .globl dobeg .globl intexp .globl ptemp .globl blocks .globl blockp .globl intexp .globl newline .globl nelem sprin: mov $8.,-(sp) jsr r5,getfmt br 9f cmp r0,$36. / , beq 1f cmp r0,$40. /  simpary 2: jsr r5,code < alval\0>; .even arydope: jsr r5,pbit mov symtab+2(r3),r2 mov (r2)+,r0 asl r0 add r0,r2 mov (r2),r0 jsr r5,code <; d%d\0>; .even r0 br 2f 1: jsr r5,error; 54. mov (sp)+,r2 rts r5 simpary: mov r3,-(sp) mov symtab(r3),r3 bis $7,r3 jsr r5,genop mov (sp)+,r3 jsr r5,size jsr r5,code <; %d.\0>; .even r0 br 2f name: mov r2,-(sp) jsr r5,pbit 2: jsr r5,code <; \0>; .even bit $100,symtab(r3) / common beq 1f mov symtab+4(r3),r2 jsr r5,code <%n+\0>; 377\<8+7],r2 bic $![377\<8+7],r3 cmp r2,r3 beq 1f jsr r5,code < \0>; .even jsr pc,2f mov r2,r3 jsr pc,2f jsr r5,code <\n\0>; .even 1: mov (sp)+,r3 mov (sp)+,r2 rts r5 2: mov r2,-(sp) mov r3,r2 clrb r3 swab r3 bic $!7,r2 movb typ(r2),r2 jsr r5,code <%c%d\0>; .even r2 r3 mov (sp)+,r2 rts pc type: cmp (r2),$32. beq 2f cmp (r2),$34. beq 2f tst (r2) bne 1f 2: mov 2(r2),r3 mov symtab(r3),r3 rts r5 1: cmp (r2),$2 bne 1f mov 2(r2),r3 rts r5 1: cmp (r2),$14. blo 1f mov =| bne 8f clrb (r1) 1: mov $34.,r0 / simulate ) br 2f sread: mov $2,-(sp) br 1f swrit: clr -(sp) 1: cmpb (r1)+,$'( bne 8f jsr r5,intexp mov $blocks,blockp cmp r0,$34. / ), implies unformatted beq 2f cmp r0,$36. / , bne 8f jsr r5,getfmt br 9f add $4,(sp) cmp r0,$34. / ) bne 8f 2: mov (sp),r0 mov iotype(r0),r0 jsr r5,code < %s\n\0>; .even r0 1: tstb (r1) beq 9f 1: jsr r5,list cmp r0,$40. / |= beq 9f 8: jsr r5,error; 41. 9: jsr r5,code < endio\n\0>; .even ts.even r2 1: movb symtab(r3),r2 bic $!70,r2 cmp r2,$30 / external bne 1f jsr r5,code <%n.\n\0>; .even r3 br 2f 1: jsr r5,code <%n_\n\0>; .even r3 2: mov symtab(r3),r3 mov (sp)+,r2 rts r5 rvalue: jsr r5,iserror rts r5 mov r2,-(sp) tst (r2) bne 1f mov 2(r2),r3 movb symtab+1(r3),r2 jsr r5,code < rval%d>; .even r2 mov (sp)+,r2 br name 1: cmp (r2),$32. bne 1f jsr r5,aryappl dec r0 bne 3f tstb symtab(r3) blt 3f mov $"ar,r0 br simpary 3: jsr r5,code < arval\0>; .eve$logcon,r3 rts r5 1: mov r2,-(sp) mov 2(r2),r2 bne 1f mov (sp),r2 mov 4(r2),r2 jsr r5,type br 2f 1: jsr r5,type mov (sp),r2 mov r3,-(sp) mov 4(r2),r2 jsr r5,type mov (sp)+,r2 jsr pc,maxtyp mov r2,r3 2: mov (sp)+,r2 rts r5 maxtyp: mov r2,r0 cmp r2,r3 bhis 2f mov r3,r2 2: clrb r2 bic $!7,r0 bic $!7,r3 cmp r0,r3 bhis 2f mov r3,r0 2: bis r0,r2 rts pc optab: t (sp)+ rts r5 iotype: 1f 2f 3f 4f 5f 1: 2: 3: 4: 5: .even getfmt: movb (r1),r0 cmpb chrtab(r0),$4 / digit beq 1f jsr r5,e2 jsr r5,iserror rts r5 mov r0,-(sp) jsr r5,lvalue mov $blocks,blockp br 8f 1: jsr r5,geticon br 8f mov r0,temp jsr r5,ptemp; 'i; temp; line / register use of format jsr r5,code < lval; .%d\n\0>; .even r0 jsr r5,getsym mov r0,-(sp) 8: mov (sp)+,r0 tst (r5)+ rts r5 list: jsr r5,lstitm cmp r0,$36. / , beq list rts r5 lstitm: mov $blocks,blockp cmpb (r1),$'( / test for sublist beq 1f jsr r5,e2 jsr r5,iserror rts r5 mov r0,-(sp) clr -(sp) tst (r2) bne 2f / test for name mov 2(r2),r3 mov symtab(r3),r0 bic $!70,r0 cmp r0,$20 / test for short list bne 2f mov pc,(sp) mov symtab+2(r3),r3 mov (r3)+,-(sp) asl (sp) add (sp)+,r3 mov (r3),r3 jsr r5,code < slist1; d%d\n2:\0>; .even r3 2: jsr r5,lvalue tst (sp) beq 3f jsr r5,code < slist3\n\0>; .even 3: mov $"io,r0 jsr r5,/ / / f22 -- allocate common .globl calloc .globl entry .globl declimpl .globl size .globl getc .globl getw .globl xbuf .globl code .globl typ calloc: clr r3 1: cmp r3,symtp bhis 1f mov symtab(r3),r0 bic $!70,r0 / class cmp r0,$40 / common block bne 3f mov r3,-(sp) mov symtab+2(r3),r3 clr r2 / byte offset 2: tst r3 beq 2f jsr r5,declimpl mov symtab+4(r3),-(sp) mov 2(sp),symtab+4(r3) mov r2,symtab+6(r3) jsr r5,size add r0,r2 mov (sp)+,r3 br 2b 2: mov (sp)+,r3 clr symtab+2(r3) mo for already allocated bne 1b / yes mov symtab(r3),r0 bic $!70,r0 cmp r0,$10 / test class=simple beq 2f cmp r0,$20 / test array bne 1b / no, not a variable 2: bit $200,symtab(r3) / test parameter bne 1b tst eqvtab+2(r3) / test for equivalence bne 2f / yes bit $100,symtab(r3) / test common bne 1b / yes, nothing to do mov nxtaloc,symtab+6(r3) / offset jsr r5,size / get byte count add r0,nxtaloc inc eqvtab(r3) / mark allocated br 1b 2: clr r4 / common variable of group mgenop tst (sp)+ beq 2f jsr r5,code <\n slist2; 2b\0>; .even 2: jsr r5,newline mov (sp)+,r0 rts r5 1: inc r1 jsr r5,levzer; '= br 1f / yes, implied do jsr r5,list jsr r5,chkel jsr r5,getsym rts r5 1: cmp r1,r0 bhis 8f cmpb -(r0),$', / look backwards bne 1b mov r0,-(sp) mov r1,-(sp) movb $'),(r0) / fake!! mov r0,r1 inc r1 clr r0 jsr r5,dobeg / get do jsr r5,chkel mov (sp)+,r0 mov r1,-(sp) mov r0,r1 jsr r5,list jsr r5,chkel clr r0 jsr r5,doend mov (sp)+,r1 movb $',,*(v r2,symtab+6(r3) / common block size 3: add $8,r3 br 1b 1: rts r5 entry: mov progt,r0 jmp *1f(r0) 1: main subr funct blocd main: jsr r5,code ; .even rts r5 subr: funct: jsr r5,code <%n.: %n_\n\0>; .even 8 8 clr r3 1: cmp r3,symtp bhis 1f mov symtab+2(r3),r0 beq 2f mov (r0)+,r1 / num dims asl r1 add r0,r1 / ptr to last dim mov r3,-(sp) mov (r1),-(sp) / dope id clr r2 / dope offset 3: add $2,r2 mov -(r1),r3 cmp r0,r1 bhi 3f neg r3 / adjustable dimension ov $77777,r1 / infinity to smallest offset mov r3,r5 2: cmp eqvtab+4(r3),r1 bgt 3f mov eqvtab+4(r3),r1 / replace smallest offset 3: bit $100,symtab(r3) / test common beq 3f mov r3,r4 / yes 3: mov eqvtab+2(r3),r3 / next group member cmp r3,r5 bne 2b tst r4 bne 2f / *there was a common in group / equivalence group w/o common sub nxtaloc,r1 / get -(group offset) 3: inc eqvtab(r3) / mark allocated mov eqvtab+4(r3),r2 sub r1,r2 / compute offset mov r2,symtab+6(r3) / enter offsetsp)+ / unfake!! jsr r5,getsym rts r5 chkel: cmp r0,$34. / ) beq 1f 8: jsr r5,error; 41. 1: rts r5 sback: mov $bksp,r2 br 1f srewi: mov $rewi,r2 br 1f sendf: mov $enfl,r2 1: mov r2,-(sp) jsr r5,intexp mov (sp),r2 jsr r5,code < %s\n\0>; .even r2 cmp r0,$40. / =| beq 9f 8: jsr r5,error; 41. 9: tst (sp)+ rts r5 bksp: rewi: enfl: ble 3b mov r0,-(sp) jsr r5,declimpl mov symtab(r3),r0 clrb r0 swab r0 jsr r5,code < rval%dp; %n_\n\0>; .even r0 r3 mov symtab(r3),r3 bic $![377\<8+7],r3 cmp r3,$2\<8+1 / is it i*2 beq 4f bic $!7,r3 movb typ(r3),r3 jsr r5,code < %c%di2\n\0>; .even r3 r0 4: mov 2(sp),r0 jsr r5,code < stst; d%d+%d.\n\0>; .even r0 r2 mov (sp)+,r0 br 3b 3: tst (sp)+ mov (sp)+,r3 2: add $8,r3 br 1b 1: blocd: rts r5  jsr r5,size add r0,r2 / highest loc of variable cmp r2,r4 ble 4f mov r2,r4 / extends storage 4: mov eqvtab+2(r3),r3 / next of group cmp r3,r5 bne 3b mov r4,nxtaloc / account for space br 1b / done! 2: / equivalence group w/ common mov symtab+6(r4),r1 / actual common offset sub eqvtab+4(r4),r1 / virtual common offset 2: inc eqvtab(r3) / mark allocated bit $100,symtab(r3) / is variable already in common beq 3f / *no cmp symtab+4(r4),symtab+4(r3) beq 4f jsr r5,error; 25. / <...0ecmn.h_econs.hl.outind0.oLind0.c%ind1.cind2.cind1.oind2.oa.out/ / / f23 -- do equivalence statements .globl equiv .globl getsym .globl consub .globl eqvtab .globl error .globl declimpl .globl perror .globl setln .globl getln / equivalence statements, part 1 / destroys all registers equiv: jsr r5,setln 1: jsr r5,getln rts r5 cmp r0,$'e bne 1b mov $line+11.,r1 mov r5,-(sp) 2: / start equivalence group cmpb (r1)+,$'( / check ( bne 9f / syntax error jsr r5,getsym tst r0 bne 9f / not identifier mov r3,r5 jsr r5,equset movb (r1)+,r2 clr r4 / different blocks equiv. 4: mov r1,r0 add eqvtab+4(r3),r0 cmp r0,symtab+6(r3) beq 4f / ok jsr r5,error; 27. / same variable, different offsets br 4f 3: bis $100,symtab(r3) / mark common now mov symtab+4(r4),symtab+4(r3)/ get right common block mov r1,r0 add eqvtab+4(r3),r0 bge 3f jsr r5,error; 26. / block extended leftward clr r0 3: mov r0,symtab+6(r3) / get proper offset mov r0,-(sp) jsr r5,size / see if size is extended add (sp)+,r0 mov symtab+4(r3),r2 / common block cmp symtab+/ / / idint fortran function .globl idint. .globl retrn .globl temp idint.: temp .+2 setd setl movf *2(r3),r0 movfi r0,temp jmp retrn offset cmp r2,$', beq 3f cmp r2,$'( / subscripted vble bne 9f / syntax error jsr r5,consub / get subscript mov r0,r4 cmpb (r1)+,$', bne 9f 3: / rest of group jsr r5,getsym / next ident tst r0 bne 9f / syntax jsr r5,equset clr r0 mov r3,r2 cmpb (r1),$'( / subscript? bne 4f inc r1 jsr r5,consub 4: mov eqvtab+2(r2),r2 cmp r2,r5 beq 5f / already in same group cmp r2,r3 bne 4b / not yet in different group sub r4,r0 / adjust offsets sub eqvtab+4(r5),r0 / left vble's of6(r2),r0 bge 4f / ok mov r0,symtab+6(r2) / extend size 4: mov eqvtab+2(r3),r3 cmp r3,r5 bne 2b jmp 1b / / / catch runtime errors: / if (ierror(errno)) goto place / on call, returns 0 / on occurrence of error, returns non-zero .globl ierror. .globl erret .globl rerr .globl retrn ierror.:zero .+2 mov 2(r3),r0 mov 2(r0),r1 mov $errbuf,r0 1: cmp r0,cerrp blo 2f cmp cerrp,$eerbuf blo 3f jsr r5,rerr; 120. 3: add $8,cerrp br 1f 2: cmp r1,(r0) beq 1f add $8,r0 br 1b 1: mov r1,(r0)+ mov r3,(r0)+ mov 2(sp),(r0)+ mov 4(sp),(r0)+ jmp retrn .data erret: jmp 9f .text 9: mov $errbuf,r0 cmp (r0)fset add eqvtab+4(r3),r0 / new vble's offset 4: sub r0,eqvtab+4(r2) mov eqvtab+2(r2),r2 cmp r2,r3 bne 4b mov eqvtab+2(r3),r0 / link up groups mov eqvtab+2(r5),eqvtab+2(r3) mov r0,eqvtab+2(r5) / link groups br 6f 5: / here already in same group cmp r0,r4 / offset must be same beq 6f jsr r5,error; 23. / inconsistency! 6: movb (r1)+,r0 cmp r0,$', beq 3b cmp r0,$') bne 9f movb (r1)+,r0 bne 3f jsr r5,perror mov (sp)+,r5 br 1b 3: cmp r0,$', beq 2b 9: jsr r5,error; 24. / equivalchdir tab cc mtab.c a.out atable atab a.out ctable ctab a.out etable etab cmp atab /usr/lib/atab cp atab /usr/lib/atab cmp ctab /usr/lib/ctab cp ctab /usr/lib/ctab cmp etab /usr/lib/etab cp etab /usr/lib/etab rm a.out atab ctab etab chdir ../src cc -s -O upost.c cmp a.out /usr/bin/upost cp a.out /usr/bin/upost cc -s -O crpost.c cmp a.out /usr/bin/crpost cp a.out /usr/bin/crpost cc -s -O dr.c acts.c put.c cmp a.out /usr/bin/cref cp a.out /usr/bin/cref rm a.out *.o chdir ../index cc -s -O ind?.c cmp a.out /,r1 beq 1f add $8,r0 cmp r0,cerrp blo 1b rts pc 1: add $8,r0 mov -(r0),-(sp) mov -(r0),-(sp) mov $one,-(sp) mov -(r0),r3 jmp retrn .data one: 77777; 177777 zero: 0; 0 cerrp: errbuf .bss errbuf: .=.+50 eerbuf: ence syntax jsr r5,perror mov (sp)+,r5 br 1b / initialize member of equivalence group equset: jsr r5,declimpl / declare if necessary mov symtab(r3),r0 bit $200,r0 / test parameter bne 2f bic $!70,r0 cmp r0,$10 / simple beq 1f cmp r0,$20 / array beq 1f 2: jsr r5,error; 31. / non-equivalencable variable 1: tst eqvtab+2(r3) / see if mentioned yet bne 1f mov r3,eqvtab+2(r3) / points to itself 1: rts r5 usr/bin/index cp a.out /usr/bin/index rm a.out *.o / / / f21 -- storage allocation / .globl pass2 .globl signon .globl signoff .globl calloc .globl salloc .globl equiv .globl entry pass2: jsr r5,signon; 2 mov $errb,errp jsr r5,calloc jsr r5,equiv jsr r5,salloc jsr r5,entry jsr r5,signoff; 2 / / / f24 -- allocate storage for non-common variables / called after common and equivalence have been done .globl salloc .globl eqvtab .globl error .globl declimpl .globl size .globl perror / destroys all registers salloc: mov r5,-(sp) clr r3 / loop over symbol table br 2f 1: add $8.,r3 / next variable 2: cmp r3,symtp blo 2f mov (sp)+,r5 mov $line,r1 jsr r5,perror / flush errors rts r5 2: bit $70,symtab(r3) beq 1b / unclassed jsr r5,declimpl / just in case tst eqvtab(r3) / test/ / / ifix & int fortran functions .globl ifix. .globl int. .globl lval .globl r4i4 .globl gas4 .globl rval4p .globl retrn .globl temp int.: ifix.: temp lval; temp rval4p; 2 r4i4 gas4 retrn / / / f11 -- fortran command / .globl pass1 .globl fptrap .globl getline .globl flush .globl perror .globl lookup .globl getype .globl ssubr .globl sfunc .globl sbloc .globl sextr .globl sdime .globl scomm .globl sequi .globl sdata .globl sform .globl simpl .globl stype .globl isagn .globl ptemp .globl funok .globl signoff .globl fopen .globl fcreat .globl lookid .globl tfil1, tfil2 .globl tfildiag pass1: sys signal; 4; fptrap cmp (sp)+,$2 bge 1f 2: mov $1,r0 sys write; mes2; emes2-mes2 clr r0 sy1 points just beyond ( sdime1: bit $70,symtab(r3) / class beq 1f jsr r5,error; 6. / already classed 1: mov r3,-(sp) bic $70,symtab(r3) bis $20,symtab(r3) / set as array clr -(sp) / marker 1: jsr r5,getsym cmp r0,$2 / constant bne 2f cmp r3,$intcon / integer*4 bne 3f jsr r5,geti tst r0 ble 3f mov r0,-(sp) br 4f 2: tst r0 bne 3f / identifer tstb symtab(r3) bge 3f / not parameter neg r3 mov r3,-(sp) mov sp,r0 2: tst (r0)+ bne 2b mov (r0),r0 tstb symtab(r0) bge 3f / array not a/ / / f17 -- implicit statement .globl simpl .globl getype .globl chrtab .globl error simpl: jsr r5,getype br 9f mov r2,r1 mov r0,-(sp) movb (r1)+,r0 cmp r0,$'( beq 1f cmpb r0,$'/ bne 8f 1: movb (r1)+,r0 cmpb chrtab(r0),$2 bne 8f cmpb r0,$'a blo 2f sub $6,r0 / map 'a into 'Z+1 2: movb (r1)+,r2 cmpb r2,$'- bne 2f movb (r1)+,r2 cmpb chrtab(r2),$2 bne 8f cmp r2,$'a blo 3f sub $6,r2 / map 'a into 'Z+1 br 3f 2: mov r0,r2 dec r1 3: cmp r0,r2 bhi 8f asl r0 asl r2 3: mov (sp),s seek; 0; 2 mov $-1,r0 / bad status sys exit 1: tst (sp)+ mov (sp)+,r0 jsr r5,fopen; ibuf bcs 2b mov $tfil1,r0 jsr r5,fcreat; obuf bcs 2f mov $tfil2,r0 jsr r5,fcreat; tbuf bcc 1f 2: jmp tfildiag 1: / data segment initialization mov $2,nxtaloc mov $errb,errp mov $esymtab,esymp mov $namebuf,namep movb $'_,symbuf-1 jsr r5,lookid; blankc bis $40,symtab(r3) mov $imptab,r3 1: mov $realcon,r0 / real*4 cmp r3,$imptab+[2*['i-'a]] blo 2f cmp r3,$imptab+[2*['n-'a]] bhi 2f mov $intcon,r0 param 4: jsr r5,getsym cmp r0,$36. / , beq 1b cmp r0,$34. / ) beq 1f 3: jsr r5,error; 7. 1: mov esymp,r0 clr r2 mov dimu,-(r0) inc dimu / unique number 1: inc r2 mov (sp)+,-(r0) bne 1b dec r2 mov r2,(r0) mov r0,esymp mov (sp)+,r3 mov r0,symtab+2(r3) rts r5 imptab-[2*'A](r0) add $2,r0 cmp r0,r2 blos 3b movb (r1)+,r0 cmp r0,$', beq 1b tst (sp)+ cmp r0,$') beq 1f cmp r0,$'/ bne 9f 1: tstb (r1) bne simpl rts r5 8: tst (sp)+ 9: jsr r5,error; 16. / implicit syntax error rts r5  / integer*4 2: mov r0,[2*26.](r3) / lower case mov r0,(r3)+ / upper case cmp r3,$imptab+[2*26.] blo 1b / call pass1 / main scan loop for pass1 / picks up non executable statements / scan1: jsr r5,getline mov $line,r1 jsr r5,isagn br 2f mov r1,r2 jsr r5,lookup; stmtab br 1f mov r2,r1 jsr r5,*sublst(r0) mov pc,funok jsr r5,perror br scan1 1: jsr r5,getype br 2f mov r2,r1 jsr r5,stype jsr r5,perror mov pc,funok br scan1 2: jsr r5,ptemp; 'l; efno; line jsr r5,flush; tbuf jsr / / / f14 -- common statement / .globl scomm .globl getsym .globl sdime1 .globl error .globl getid .globl lookid scomm: mov r5,-(sp) jsr r5,getsym cmp r0,$6 / / for named common beq ncom 3: tst r0 bne 9f mov r3,-(sp) clr r5 br 2f ncom: cmpb (r1),$'/ bne 3f inc r1 jsr r5,getsym br 3b 3: jsr r5,getid br 9f / not identifier jsr r5,lookid; symbuf-1 bis $40,symtab(r3) / set named common mov r3,r5 jsr r5,getsym cmp r0,$6 / / bne 9f 1: jsr r5,getsym tst r0 bne 9f mov r3,-(sp) 2: / / / isign fortran function .globl isign. .globl retrn .globl rerr .globl temp isign.: temp .+2 setd setl cmp *2(sp),$2 bne 2f movif *2(r3),r0 absf r0 movif *4(r3),r1 cfcc bge 1f negf r0 1: movfi r0,temp jmp retrn 2: jsr r5,rerr; 10. r5,signoff; 1 sublst: ssubr sfunc sbloc sextr sdime scomm sequi sdata sform simpl stmtab: <\0> .even mes2: emes2: blankc: <_\n\0> .even  jsr r5,getsym cmp r0,$32. / ( bne 2f mov (sp),r3 jsr r5,sdime1 jsr r5,getsym 2: mov (sp)+,r3 bit $300,symtab(r3) / test param/common beq 2f jsr r5,error; 9. / not commonable or already commoned br 3f 2: mov r0,-(sp) mov symtab+4(r5),r0 beq 2f mov r3,symtab+4(r0) / next ptr of old last block 2: mov (sp)+,r0 mov r3,symtab+4(r5) / new last ptr of head block tst symtab+2(r5) bne 3f mov r3,symtab+2(r5) / first ptr if first block 3: bis $100,symtab(r3) cmp r0,$36. / , beq 1b cmp r0,$6 /skip collect save skip2 cont coll save out egobl hyphen pno skip//pno; skip/ /out; skip/a/coll; skip/b/coll; skip/c/coll; skip/d/coll; skip/e/coll; skip/f/coll; skip/g/coll; skip/h/coll; skip/i/coll; skip/j/coll; skip/k/coll; skip/l/coll; skip/m/coll; skip/n/coll; skip/o/coll; skip/p/coll; skip/q/coll; skip/r/coll; skip/s/coll; skip/t/coll; skip/u/coll; skip/v/coll; skip/w/coll; skip/x/coll; skip/y/coll; skip/z/coll; skip/A/coll; skip/B/coll; skip/C/coll; skip/D/coll; skip/E/coll; skip/F/coll; skip/G/col/ / / f12 -- type statements and type getter subroutine / / .globl stype .globl getype .globl typtab .globl sfunc1 .globl lookup .globl getsym .globl error .globl sdime1 stype: mov r0,-(sp) mov r1,r2 jsr r5,lookup; funtab br 1f mov r2,r1 mov (sp)+,r0 jmp sfunc1 1: jsr r5,getsym tst r0 bne 3f / junk error if not identifier mov symtab(r3),r0 bic $![377\<8+7],r0 / size,type beq 2f cmp r0,(sp) / redefined, but same beq 2f jsr r5,error; 3. 2: bic $377\<8+7,symtab(r3) bis (sp),symtab(r3)  another / beq ncom cmp r0,$40. / =| beq 8f 9: jsr r5, error; 10. / common syntax error 8: mov (sp)+,r5 rts r5 l; skip/H/coll; skip/I/coll; skip/J/coll; skip/K/coll; skip/L/coll; skip/M/coll; skip/N/coll; skip/O/coll; skip/P/coll; skip/Q/coll; skip/R/coll; skip/S/coll; skip/T/coll; skip/U/coll; skip/V/coll; skip/W/coll; skip/X/coll; skip/Y/coll; skip/Z/coll; collect/'/cont; collect/-/hyphen; collect/ /out; collect/a/cont; collect/b/cont; collect/c/cont; collect/d/cont; collect/e/cont; collect/f/cont; collect/g/cont; collect/h/cont; collect/i/cont; collect/j/cont; collect/k/cont; collect/l/cont; collect/m/cont; colle/ set in type and size mov r3,-(sp) jsr r5,getsym cmp r0,$32. / ( for dimension bne 2f mov (sp),r3 jsr r5,sdime1 jsr r5,getsym 2: tst (sp)+ cmp r0,$36. / , for another list element beq 1b cmp r0,$40. / eos beq 1f 3: jsr r5,error; 2. / junk 1: tst (sp)+ rts r5 funtab: <\0> getype: mov r1,r2 jsr r5,lookup; typtab br 1f mov tvaltab(r0),r0 tst (r5)+ 1: rts r5 tvaltab: log1con logcon int1con int2con intcon dcplxcon dblcon cplxcon dblcon realcon typtab: <\0> sr r5,getsym tst r0 beq 3f tst (sp)+ br 2b 3: bis $200,symtab(r3) / param mov (sp),symtab+6(r3) / param number jsr r5,getsym cmp r0,$36. / , beq 1b tst (sp)+ cmp r0,$34. / ) bne 2b jsr r5,getsym cmp r0,$40. bne 2b rts r5 sbloc: mov $6,progt jsr r5,getsym tst funok beq 1f jsr r5,error; 11. 1: cmp r0,$40. beq 1f jsr r5,error; 13. 1: rts r5 .data funok: 0 ct/T/cont; collect/U/cont; collect/V/cont; collect/W/cont; collect/X/cont; collect/Y/cont; collect/Z/cont; skip2/a/coll; skip2/b/coll; skip2/c/coll; skip2/d/coll; skip2/e/coll; skip2/f/coll; skip2/g/coll; skip2/h/coll; skip2/i/coll; skip2/j/coll; skip2/k/coll; skip2/l/coll; skip2/m/coll; skip2/n/coll; skip2/o/coll; skip2/p/coll; skip2/q/coll; skip2/r/coll; skip2/s/coll; skip2/t/coll; skip2/u/coll; skip2/v/coll; skip2/w/coll; skip2/x/coll; skip2/y/coll; skip2/z/coll; skip2/A/coll; skip2/B/coll; skip2/C/coll;/ / / f13 -- dimension and array declarator / / dimension / / .globl sdime .globl sdime1 .globl getsym .globl error .globl geti .globl dimu sdime: jsr r5,getsym tst r0 bne 3f / junk error mov r3,-(sp) jsr r5,getsym mov (sp)+,r3 cmp r0,$32. / ( beq 2f jsr r5,error; 4. / no ( in dimension rts r5 2: jsr r5,sdime1 jsr r5,getsym cmp r0,$36. / , beq sdime cmp r0,$40. beq 1f 3: jsr r5,error; 5. 1: rts r5 / get dimension info and store in / symbol table entry / r3 points at symbol table / r/ / / f16 -- extrn, equiv, data .globl sextr .globl sequi .globl getsym .globl putc .globl error .globl ptemp sextr: jsr r5,getsym tst r0 bne 1f bit $70,symtab(r3) beq 2f jsr r5,error; 14. 2: bis $30,symtab(r3) jsr r5,getsym cmp r0,$36. / , beq sextr cmp r0,$40. / eos beq 2f 1: jsr r5,error; 15. 2: rts r5 sequi: jsr r5,ptemp; 'e; efno; line rts r5  skip2/D/coll; skip2/E/coll; skip2/F/coll; skip2/G/coll; skip2/H/coll; skip2/I/coll; skip2/J/coll; skip2/K/coll; skip2/L/coll; skip2/M/coll; skip2/N/coll; skip2/O/coll; skip2/P/coll; skip2/Q/coll; skip2/R/coll; skip2/S/coll; skip2/T/coll; skip2/U/coll; skip2/V/coll; skip2/W/coll; skip2/X/coll; skip2/Y/coll; skip2/Z/coll; / example of UNIX fortran / calling interface to machine code / this example is a function that / returns the single precision / sum of all of its single precision arguments. / for example: / f = sum(1.,2.,3.) / sets f to 6. .globl sum. / defination of entry .globl retrn / reference of return sum.: / entry point value / location of return value .+2 / pointer to execution code setf / no d/f i/l modes guaranteed mov *2(sp),r0 / arg count mov r3,r1 / r3 points to arg list tst (rbin/goto cp a.out /bin/goto cc -s -O grep.c cmp a.out /usr/bin/grep cp a.out /usr/bin/grep cc -s -O gsi.c cmp a.out /usr/bin/gsi cp a.out /usr/bin/gsi cc -s -O icheck.c cmp a.out /bin/icheck cp a.out /bin/icheck cc -s -O if.c cmp a.out /bin/if cp a.out /bin/if cc -s -n -O init.c cmp a.out /etc/init cp a.out /etc/init as kill.s strip a.out cmp a.out /bin/kill cp a.out /bin/kill cc -s -n -O ld.c cmp a.out /bin/ld cp a.out /bin/ld cc -s -O ln.c cmp a.out /bin/ln cp a.out /bin/ln cc -s -O login.c cmp aQ.[..Wplot.sVrio.sUopenrw.sTnice.sSctime.sRsetfil.sQgetarg.sPrand.sa.outuio.sctime.ogetarg.onice.orand.osetfil.ouio.o1)+ / zeroth arg is old r3 clrf fr0 / start of actual function 1: addf *(r1)+,fr0 / add in each argument sob r0,1b / for each argument movf fr0,value / make returned value available jmp retrn / actual return .bss value: .=.+4 / space for return value / synopsis: / 1. save registers r3, sp / 2. arg list (pointers to values) / begins at 2(r3) / 3. entry name is name of function / followed by "." / 4. first word after entry point is / location of return value. this is / true f.out /bin/login cp a.out /bin/login as lpd.s ld -s a.out -l cmp a.out /etc/lpd cp a.out /etc/lpd cc -s -O lpr.c cmp a.out /lib/lpr cp a.out /lib/lpr cc -s -n -O ls.c cmp a.out /bin/ls cp a.out /bin/ls rm a.out R.[..ccos.fcsqrt.fabs.saimag.stanh.fcsin.faint.salog.salog10.samax0.samax1.samin0.samin1.samod.sclog.fatan.satan2.scabs.scexp.scmplx.sconjg.scos.sdble.sdim.sdimag.sexp.sfloat.sXiabs.sidim.s=idint.sor both functions and subroutines / 5. second word after entry point is / pointer to pdp-11 code body / 6. return is expedited by a jump to / the globl routine "retrn" /*int mbuf[1024]; /*INSTR*/ int psw 1; int initf 1; main(argc, argv) char *argv[]; { auto f,fct,file; if(argc < 2) { printf("Usage: cpost [-d] file1 file2 ...\n"); exit(); } if(*argv[1] == '-') { fct = argv[1][1] - '0'; if((fct < 1) || (fct > 9)) { printf("-d: 0 < d < 10\n"); exit(); } argv++; argc--; } else { fct = 1; } f = 0; while(++f < argc) { file = open(argv[f], 0); edl(file, fct); close(file); psw = 0; } flsh(0); exit(); } int lno 1; edl(file) { aut>ierr.sDifix.sLisign.sTmod.sreal.ssign.ssin.ssngl.ssqrt.sdcsqrt.fdcsin.fdccos.fYdclog.ff.tmp1abs.oaimag.oaint.oalog.oalog10.oamax0.oamax1.oamin0.oamin1.oamod.oatan.oatan2.ocabs.ocexp.occos.ocmplx.oclog.oconjg.occ -s -f -O ac.c cmp a.out /usr/bin/ac cp a.out /usr/bin/ac as ar.s strip a.out cmp a.out /bin/ar cp a.out /bin/ar cc -s -O banner.c cmp a.out /usr/bin/banner cp a.out /usr/bin/banner as bas.s ld -s -n a.out -l cmp a.out /bin/bas cp a.out /bin/bas yacc bc.y cc -s -O y.tab.c -ly cmp a.out /usr/bin/bc cp a.out /usr/bin/bc rm y.tab.c cc -s -O bcd.c cmp a.out /usr/bin/bcd cp a.out /usr/bin/bcd cc -s -O cal.c cmp a.out /usr/bin/cal cp a.out /usr/bin/cal as cat.s strip a.out cmp a.out /bin/cat cp a.out /bio t,l; char static buf[20],fld[20],line[200]; char c; field: t = -1; while(((buf[++t] = get(file)) != '\t') && (buf[t] != -1)) if(buf[t] == '\0') goto done; if((c = buf[t]) == -1) c = ' '; buf[t] = '\0'; if(comp(buf,fld)) { lno++; goto junk; } else { if(lno == 0) { put(0,line,++l); } l = copy(buf,line); copy(buf,fld); line[--l] = c; lno = 0; goto fill; } fill: while((line[++l] = get(file)) != '\n') { if(line[l] == -1) line[l] = ' '; if(line[l] == '\0') goto done; } cos.odble.ocsin.ocsqrt.odim.odccos.odclog.odcsin.odcsqrt.odimag.oexp.ofloat.oiabs.oidim.oidint.oierr.oifix.oisign.omod.oreal.osign.osin.osngl.osqrt.oa.outtanh.on/cat cc -s -n -O cc.c cmp a.out /bin/cc cp a.out /bin/cc cc -s -f -O cdb?.c cmp a.out /bin/cdb cp a.out /bin/cdb rm cdb?.o as chgrp.s ld -s a.out -l cmp a.out /bin/chgrp cp a.out /bin/chgrp cc -s -O chmod.c cmp a.out /bin/chmod cp a.out /bin/chmod as chown.s ld -s a.out -l cmp a.out /bin/chown cp a.out /bin/chown as clri.s strip a.out cmp a.out /bin/clri cp a.out /bin/clri cc -s -O cmp.c cmp a.out /bin/cmp cp a.out /bin/cmp cc -s -O col.c cmp a.out /usr/bin/col cp a.out /usr/bin/col cc -s -O comm.goto field; junk: while((*line = get(file)) != '\n') if(*line == '\0') goto done; goto field; done: if(lno == 0) put(0,line,++l); lno = 1; return(0); } gfld(file, buf) char *buf; { char c; buf--; while(*++buf = get(file)) { if((*buf == '\t') || (*buf == '\n')) { c = *buf; *buf = '\0'; return(c); } else { continue; } } return('\0'); } copy(a, b) char *a,*b; { char *c; b--; c = --a; while(*++b = *++a); return(a - c); } comp(a, b) char *a, *b; { /* printf("cS.[..rh.sr0.srg.srf.sre.sa.outrc.sra.srb.sr8.sr9.sr7.sr6.sr5.sr4.sr3.sr2.sr1.srd.srx.sr1.or2.or3.or4.or5.or6.or7.or8.or9.ora.oc cmp a.out /usr/bin/comm cp a.out /usr/bin/comm cc -s -O cp.c cmp a.out /bin/cp cp a.out /bin/cp cc -s -O cpall.c cmp a.out /usr/bin/cpall cp a.out /usr/bin/cpall cc -s -O cron.c cmp a.out /etc/cron cp a.out /etc/cron cc -s -O crypt.c cmp a.out /usr/bin/crypt cp a.out /usr/bin/crypt cc -s -O date.c cmp a.out /bin/date cp a.out /bin/date as db?.s strip a.out cmp a.out /bin/db cp a.out /bin/db as dc?.s strip a.out cmp a.out /bin/dc cp a.out /bin/dc cc -s -O dcheck.c cmp a.out /bin/dcheck cp a.out /biomp: %s %s\n",a,b); /*DEBUG*/ a--; b--; while(*++a == *++b) { if(*a == '\0') return(1); } return(0); } char buf[512]; int nread 1; get(ifile) int ifile; { char static *ibuf; if(--nread){ return(*ibuf++); } if(nread = read(ifile,buf,512)){ if(nread < 0)goto err; ibuf = buf; return(*ibuf++); } nread = 1; return(0); err: nread = 1; printf("read error\n"); return(0); } int tp[1] 1; int optr[4]; char bsp[512]; char *obuf[1] bsp; int nflush; put(fil,string,n) char *string;rb.orc.ord.ore.orf.org.orh.orx.on/dcheck cc -s -O dd.c cmp a.out /bin/dd cp a.out /bin/dd cc -s -O df.c cmp a.out /bin/df cp a.out /bin/df cc -c -O diff1.c as diff2.s cc -s diff1.o a.out cmp a.out /usr/bin/diff cp a.out /usr/bin/diff rm diff1.o as dsw.s strip a.out cmp a.out /bin/dsw cp a.out /bin/dsw as du.s ld -s a.out -l cmp a.out /bin/du cp a.out /bin/du cc -s -O dump.c cmp a.out /bin/dump cp a.out /bin/dump cc -s -O echo.c cmp a.out /bin/echo cp a.out /bin/echo cc -s -n -O ed.c cmp a.out /bin/ed cp a.out /bin/ed cc -s -O exi { int i; char *o; /*printf("%d %c %d\n",fil,*string,n);/*DEBUG*/ string--; if((i = optr[fil] + n - 512) >= 0) { n =- i; o = &obuf[fil][optr[fil]] -1; while(--n >= 0) *++o = *++string; optr[fil] = 512; flsh(fil); n = i; } o = &obuf[fil][optr[fil]] - 1; optr[fil] =+ n; while(--n >= 0) { *++o = *++string; } return(0); } flsh(fil) { extern tp[]; if(optr[fil] <= 0) return(optr[fil]); nflush++; if(write(tp[fil],obuf[fil],optr[fil]) != optr[fil]) return(-1); optr[fil] = 0/ / / mod fortran function .globl mod. .globl retrn .globl temp one = 40200 .globl rerr mod.: temp .+2 setd setl cmp *2(sp),$2 bne 1f movif *2(r3),r0 movf r0,r2 movif *4(r3),r1 divf r1,r2 modf $one,r2 mulf r1,r3 subf r3,r0 movfi r0,temp jmp retrn 1: jsr r5,rerr; 11. t.c cmp a.out /bin/exit cp a.out /bin/exit cc -s -O fc.c cmp a.out /bin/fc cp a.out /bin/fc as fed?.s form[56].s strip a.out cmp a.out /usr/bin/fed cp a.out /usr/bin/fed cc -s -O file.c cmp a.out /bin/file cp a.out /bin/file cc -s -O find.c cmp a.out /usr/bin/find cp a.out /usr/bin/find as form?.s strip a.out cmp a.out /usr/bin/form cp a.out /usr/bin/form cc -s -n -O getty.c cmp a.out /etc/getty cp a.out /etc/getty cc -s -n -O glob.c cmp a.out /etc/glob cp a.out /etc/glob cc -s -O goto.c cmp a.out /; return(0); } U.[..io1.sio2.sio3.sio4.sio5.sio6.siox.sio7.sa.outio.oV.[..l.outfxx.sfxh.sfxg.sfxf.sfx7.sfx8.sfx1.ofxe.sfxd.sfxc.sfxb.sfx6.sfx5.sfx4.sfx3.sfx2.sfx1.sfxa.sfhd.sfx9.sfx2.ofxi.sfx3.ofx4.ofx5.ofx6.ofx7.ofx8.ofx9.oturn(0); } flsh(fil) { extern tp[],utmp; if(optr[fil] <= 0) return(optr[fil]); if(bct[fil]++ >= 128 && utmp == 0) { printf("Wraparound temp file %d\n",fil); dexit(); } nflush++; if(write(tp[fil],obuf[fil],optr[fil]) != optr[fil]) return(-1); optr[fil] = 0; return(0); } # define NUMA 14 # define NUMC 128 # define NUMS 3 # define SIZA 8 # define SIZC 2 # define SIZS 8 # define PTRI 509 # define CHARI 4000 # define PTRX 5147 # define CHARX 40000 # define CONT 0 # define COLL 1 # define SAVE 2 # define OUT 3 # define EGOBL 4 # define SHARP 5 # define PNO 6 # define SKIP 0 # define COLLECT 1 # define SKIP2 2 #define CREATC 0644 fxa.ofxb.ofxc.ofxd.ofxe.ofxf.ofxg.ofxh.ofxi.ofxx.oa.outfxi.oa.out# include "../mcons.h" struct { int cl[NUMC]; }tab[NUMS]; char state[NUMS][SIZS]; char class[NUMC][SIZC]; char act[NUMA][SIZA]; char def[NUMS][SIZA]; char temp[SIZA]; char *st[NUMS]; char *df[NUMS]; char *cl[NUMC]; char *ac[NUMA]; int t1; int t2; main(argc,argv) char **argv; { extern fin; char fl,nlfl,c,bfl,fo,brk; int cs,ca,cc,i,j,cd; if(argc != 3) { printf("Usage: mtab input output\n"); exit(); } if((fo = creat(argv[2],0644)) < 0) { printf("Output file.\n"); exit(); } if((fin = oW.[..l.out/f46.s.f45.sf44.sf43.sf42.sf41.of47.sf41.sf42.of43.of44.of45.of46.of47.oa.outf47.oa.outpen(argv[1],0)) < 0) { printf("Input file.\n"); exit(); } nlfl = 1; i = -1; while(brk = rword()) { switch (brk) { case '\n': if(nlfl) { move(temp,state[++i]); st[i] = &state[i]; } else { move(temp,def[i]); df[i] = &def[i]; nlfl = 1; } continue; case ' ': if(nlfl) { move(temp,state[++i]); st[i] = &state[i]; nlfl = 0; } else { error(7); } continue; } } i = 128; while(--i) { class[i][0] = i; class[i][1] =# # include "../mcons.h" # include "../ccmn.h" /*int mbuf[1024]; /*INSTR*/ /*int tbuf[36]; /*INSTR*/ int (*acts[])() {0, &coll, &save, &out, &asym, &asw, &csym, &csw, &incl, &decl, &sk2, &sk, &tabs, &semi }; char *tmp[5] {"/tmp/crt0a", "/tmp/crt1a", "/tmp/crt2a", "/tmp/crt3a", "/tmp/crt4a" }; char *ignonl "/usr/lib/aign"; char *gtab "/usr/lib/atab"; main(argc,argv) char *argv[]; { auto i,j,tm1,tm2,tm3; char *fn,*av[8]; /* extern etext; /*INSTR*/ /*X.[..l.out;f39.s:f38.s9f37.s8f36.s7f35.s6f34.s5f33.s4f32.sf31.o2f31.sf32.of33.of34.of35.of36.of37.of38.of39.oa.outf39.oa.out '\0'; cl[i] = &class[i]; } cl[0] = &class[0]; bfl = nlfl = 0; t1 = 0; t2 = -1; while(c = getchar()) { switch(c) { default: if(t1 >= NUMA) error(4); bfl = nlfl = 0; act[t1][++t2<8?t2:7] = c; continue; case '\n': if(nlfl) break; nlfl = 1; case ' ': if(bfl) continue; bfl = 1; act[t1][++t2<8?t2:7] = '\0'; ac[t1] = &act[t1]; t1++; t2 = -1; continue; } break; } if(c == '\0') exit(); i = -1; while(++i < NUMS) { if(df[i]) { c monitor(&main,&etext,&mbuf,1024); /*INSTR*/ if(argc < 2) { printf("Usage: cref [-aceilosux] file1 ...\n"); exit(); } lbuf[4] = '\t'; if(*argv[1] == '-') { j = flags(argv); argv =+ j; argc =- j; } init(); i = 0; while(++i < argc) { curs[0] = '_'; curs[1] = '\t'; curs[4] = '\t'; cursl = 2; if(fopen(argv[i],ibuf1) < 0) { printf("Can't open %s\n",argv[i]); dexit(); } ibuf = ibuf1; curf[0] = '\t'; curfl = 1; while((curf[curfl] = *argv[i]++) != 0 && curfl <= 8) Y.[..l.outBf24.sAf23.s@f22.s?f21.sf21.of22.of23.of24.oa.outf24.oa.outd = find(ac,df[i],NUMA); j = -1; while(++j < NUMC) tab[i].cl[j] = cd; } } fl = 0; i = -1; while(c = getchar()) { switch(c) { case '\\': temp[++i] = getchar(); continue; case '\n': if(fl != 1) continue; default: temp[++i] = c; continue; case '/': temp[++i] = '\0'; i = -1; switch(fl) { case 0: cs = find(st,temp,NUMS); fl = 1; continue; case 1: cc = find(cl,temp,NUMC); fl = 2; continue; def if(curf[curfl++] == '/') curfl = 1; curf[curfl++] = '\t'; if(curfl == 10) curf[9] = -1; /* printf("%s %d\n",curf,curfl);/*DEBUG*/ lno = 1; driver(); close(file); } for(j = 0; j < 4;) { flsh(j,0); close(tp[j++]); } /* monitor(0); /*INSTR*/ /* dexit(); /*INSTR*/ /* times(tbuf); /*INSTR*/ /* tm1 = tbuf[15]/6; /*INSTR*/ /* tm2 = tbuf[19]/6; /*INSTR*/ /* tm3 = tbuf[23]/6; /*INSTR*/ /* printf("Prep: %d %d %d\n",tm1,tm2,tm3); /*INSTR*/ if(utmp) exit(); fn = "/bin/sort"; av[0] = "sortZ.[..l.outf11.oKf17.sJf16.sIf15.sHf14.sGf13.sFf12.sEf11.sf12.of13.of14.of15.of16.of17.oa.outf17.oa.outault: error(1); } case ';': if(fl != 2) error(2); temp[++i] = '\0'; i = -1; ca = find(ac,temp,NUMA); /*printf("%o %o %o\n",cs,cc,ca); /*DEBUG*/ tab[cs].cl[cc] = ca; fl = 0; continue; } } i = -1; while(++i < NUMS) write(fo,tab[i].cl,256); } error(a) { printf("Error %d\n",a); exit(); } find(a,b,c) char (*a[])[]; char b[]; int c; { int i,j; /* printf("%s\n",b); /*DEBUG*/ i = -1; while(++i < c) { /* printf(" %s\n",a[i]); /*DEBUG*/ j = 0; "; av[1] = "-a"; av[3] = "-o"; av[5] = 0; for(i = 0; i < 4; i++) { av[4] = av[2] = tmp[i]; callsys(fn,av); if(utmp) break; } /* times(tbuf); /*INSTR*/ /* tm1 = tbuf[27]/6; /*INSTR*/ /* tm2 = tbuf[31]/6; /*INSTR*/ /* tm3 = tbuf[35]/6; /*INSTR*/ /* printf("Sort: %d %d %d\n",tm1,tm2,tm3); /*INSTR*/ if(usw) { fn = "/usr/bin/upost"; av[0] = "upost"; i = 0; } else { fn = "/usr/bin/crpost"; av[0] = "crpost"; av[1] = cross? "-4x": "-3"; i = 1; } j = -1; while(++j < 4) { av[++i] =[...Zf1Yf2Xf3Wf4VfxUioa.outSrtRrt1Qrt2runl.outNsum.sf.tmp1fpl.out/* printf("b = %c\ta = %c\n",b[0],(*a[i])[0]); /*DEBUG*/ while(b[j] == (*a[i])[j]) { if(b[j] == '\0') goto found; j++; } } found: return(i); } rword() { char c; int ct; ct = -1; while(c = getchar()) { switch(c) { default: temp[++ct] = c; continue; case '\n': if(ct == -1) return('\0'); case ' ': temp[++ct] = '\0'; return(c); } } } move(a,b) char *a; char *b; { while((*b++ = *a++) != '\0'); return; }  tmp[j]; if(utmp) break; } av[++i] = 0; callsys(fn,av); /* times(tbuf); /*INSTR*/ /* tm1 = tbuf[27]/6 - tm1; /*INSTR*/ /* tm2 = tbuf[31]/6 - tm2; /*INSTR*/ /* tm3 = tbuf[35]/6 - tm3; /*INSTR*/ /* printf("Post: %d %d %d\n",tm1,tm2,tm3); /*INSTR*/ dexit(); } driver() { auto p; top: l = -1; while((c = line[++l] = getc(ibuf)) != -1) { if(l >= 131) { printf("Line too long: %d %s\n",lno,curf); dexit(); } if(c & 0200) { printf("Illegal character: %o line %d\n",c,lno); dexit(); int bct[4]; int optr[4]; char bsp[2048]; char *obuf[4] {bsp, bsp + 512, bsp + 1024, bsp + 1536 }; int nflush; put(fil,string,n) char *string; { extern utmp; int i; char *o; /*printf("%d %c %d\n",fil,*string,n);/*DEBUG*/ string--; if((i = optr[fil] + n - 512) >= 0) { n =- i; o = &obuf[fil][optr[fil]] -1; while(--n >= 0) *++o = *++string; optr[fil] = 512; flsh(fil); n = i; } o = &obuf[fil][optr[fil]] - 1; optr[fil] =+ n; while(--n >= 0) { *++o = *++string; } re# define NUMA 14 # define NUMC 128 # define NUMS 3 # define SIZA 8 # define SIZC 2 # define SIZS 8 # define PTRI 509 # define CHARI 4000 # define PTRX 509 # define CHARX 4000 # define CONT 1 # define COLL 2 # define SAVE 3 # define OUT 4 # define ASYM 5 # define ASW 6 # define CSYM 7 # define CSW 8 # define INCL 9 # define DECL 10 # define SK2 11 # define SK 12 # define TABS 13 # define SEMI 14 # define SHARP 15 # define SKIP 0 # define COLLECT 1 # define SKIP2 2 #define CREATC 0644 } if(fl) { if((*flag[fl])()) continue; } /*printf("cs = %d cc = %c ca = %d\n",cs,c,tab[cs].cl[c]); /*DEBUG*/ if(p = tab[cs].cl[c]) (*acts[p])(); continue; } if(ibuf == ibuf1) return; ibuf = ibuf1; goto top; } init() { int b[3]; auto fi,i; extern coll(),save(),out(),asym(),asw(),csym(),csw(); extern incl(),decl(),sk(),sk2(); extern dexit(); ibuf1 = &ib1; ibuf2 = &ib2; xtab.hptr = &xpsp; xtab.symt = &xssp; xtab.hsiz = PTRX; xtab.ssiz = CHARX; xtab.nsym = 0; xtab.curb = 1; itab.hptr = &ipsp; itab.symt = &issp; itab.hsiz = PTRI; itab.ssiz = CHARI; itab.nsym = 0; itab.curb = 1; if((fi = open(gtab,0)) < 0) { printf("Cannot open grammar table; see lem\n"); dexit(); } i = -1; while(++i < NUMS) if(read(fi,tab[i].cl,256) < 256) { printf("Bad grammar table.\n"); dexit(); } close(fi); if((fi = open(ignonl,0)) < 0) { printf("Cannot open ignore/only file: %s\n",ignonl); dexit(); } if((read(fi,b,6) == 6) && (b[0] == 0100200)) { if(read(fi,itab/*int mbuf[1024]; /*INSTR*/ int ig 100; int esw; int initf 1; char ssp[270]; char *sym[9] {ssp, ssp + 30, ssp + 60, ssp + 90, ssp + 120, ssp + 150, ssp + 180, ssp + 210, ssp + 240, ssp + 270 }; main(argc, argv) char *argv[]; { auto f,fct,file,i; if(argc < 2) { printf("Usage: crpost [-d] file1 file2 ...\n"); exit(); } if(*argv[1] == '-') { if(argv[1][1] == 'E') { fct = 3; esw = 1; goto on; } fct = argv[1][1] - '0'; if((fct < 1) || (fct > 9)) { printf("-d: 0struct tempent { char *beg; int ct; char term; } temp[30]; char lbuf[5]; int cflag; int t1; int level; int hlevel; int dlevel; int xtrn; int tp[5]; struct { int cl[NUMC]; } tab[NUMS]; int coll(); int save(); int out(); int asym(); int asw(); int csym(); int csw(); int incl(); int decl(); int sk2(); int sk(); int tabs(); int semi(); char line[132]; int l; int lno; char c; int cursl; char curs[9]; int curfl; char curf[10]; int usw; int xsw; int only; int cross; int file; int cs; int (*flag[8].hptr,b[1]) < b[1]) { printf("Cannot read ignore/only file: %s\n",ignonl); dexit(); } if(read(fi,itab.symt,b[2]) < b[2]) { printf("Cannot read ignore/only file: %s\n",ignonl); dexit(); } close(fi); } else { close(fi); compile(); } if((signal(1,1) & 1) == 0) signal(1,&dexit); if((signal(2,1) & 1) == 0) signal(2,&dexit); if((signal(3,1) & 1) == 0) signal(3,&dexit); /* signal(4,&dexit); signal(5,&dexit); signal(6,&dexit); signal(7,&dexit); signal(8,&dexit); signal(10,&dexit); < d < 10\n"); exit(); } if(argv[1][2] == 'x') { ig = fct-1; } on: argv++; argc--; } else { fct = 3; } f = 0; while(++f < argc) { file = open(argv[f], 0); edf(file, fct); close(file); } flsh(0); exit(); } int lno 1; edf(file, fct) { auto i,j,l; extern lno,etext; char brk,*buf,bufsp[150],line[150]; char extern *sym[]; /* monitor(&main,&etext,&mbuf,1024); /*INSTR*/ for(i = 0; i < fct; i++) *sym[i] = 0200; fields: l = -1; buf = &bufsp; for(i = 0; i < fct; ++i) {)(); int fl; char gch[8]; struct htab { int hsiz; int ssiz; int nsym; int curb; int *hptr; char *symt; }; struct htab itab; struct htab xtab; int ipsp[PTRI]; char issp[CHARI]; int xpsp[PTRX]; char xssp[CHARX]; int ib1[259]; int ib2[259]; char *ibuf; char *ibuf1; char *ibuf2; char mone; int order; int ssw; int type; char *utmp;  signal(11,&dexit); signal(12,&dexit); */ if(utmp == 0) { while((tp[4] = creat(tmp[4],0)) < 0) tmp[4][9]++; close(tp[4]); tmp[0][9] = tmp[4][9]; tmp[1][9] = tmp[4][9]; tmp[2][9] = tmp[4][9]; tmp[3][9] = tmp[4][9]; tp[0] = creat(tmp[0],CREATC); tp[1] = creat(tmp[1],CREATC); tp[2] = creat(tmp[2],CREATC); tp[3] = creat(tmp[3],CREATC); } else { if((tp[0] = creat(utmp,CREATC)) < 0) { printf("Can't create user's temp file.\n"); exit(); } } return; } error(a) { printf("Erro buf--; swt: switch(*++buf = get(file)) { default: if(esw && *buf >= 'A' && *buf <= 'Z' && i == 0) *buf =| 040; goto swt; case -1: *buf = ' '; case '\t': if(i == ig) continue; brk = *buf; *buf = '\0'; buf = &bufsp; if(comp(buf, sym[i])) { if(esw && i == 0) { line[0] = line[1] = '\t'; l = 1; goto rest; } line[++l] = '\t'; continue; } else { copy(buf, sym[i]); l =+ copy(buf, &line[++l]); line[--skip collect save skip2 sk cont coll save out asym agobl csym cgobl incl decl sk2 sk tab semi collect/\;/semi; collect/_/cont; collect/{/incl; collect/}/decl; collect/'/cgobl; collect/\\/cgobl; collect/"/cgobl; collect/a/cont; collect/b/cont; collect/c/cont; collect/d/cont; collect/e/cont; collect/f/cont; collect/g/cont; collect/h/cont; collect/i/cont; collect/j/cont; collect/k/cont; collect/l/cont; collect/m/cont; collect/n/cont; collect/o/cont; collect/p/cont; collect/q/cont; collect/r/cont; collect/s/cr %d\n",a); dexit(); } dexit() { extern nflush; /* printf("nflush = %d\n",nflush); /*DEBUG*/ if(tp[0] > 0 && utmp == 0) { unlink(tmp[0]); unlink(tmp[1]); unlink(tmp[2]); unlink(tmp[3]); unlink(tmp[4]); } exit(); } callsys(f,v) char f[],*v[]; { int t,status,i; if((t = fork()) == 0) { execv(f,v); printf("Can't find %s\n",f); exit(1); } else { if(t == -1) { printf("Try again\n"); return(1); } } while(t != wait(&status)); /* printf("Status = %o, %s\n",status,f); /*DEBUGl] = brk; if(l < 8 && esw && i == 0) line[++l] = '\t'; j = i; while(++j < fct) *sym[j] = 0200; continue; } case '\n': lno++; brk = *buf; *buf = '\0'; buf = &bufsp; if(comp(buf, sym[i])) { goto fields; } else { copy(buf, sym[i]); l =+ copy(buf, &line[++l]); line[--l] = '\n'; j = i; while(++j < fct) *sym[j] = 0; goto out; } case '\0': goto fexit; } } rest: while((line[++l] = get(file)) != ont; collect/t/cont; collect/u/cont; collect/v/cont; collect/w/cont; collect/x/cont; collect/y/cont; collect/z/cont; collect/A/cont; collect/B/cont; collect/C/cont; collect/D/cont; collect/E/cont; collect/F/cont; collect/G/cont; collect/H/cont; collect/I/cont; collect/J/cont; collect/K/cont; collect/L/cont; collect/M/cont; collect/N/cont; collect/O/cont; collect/P/cont; collect/Q/cont; collect/R/cont; collect/S/cont; collect/T/cont; collect/U/cont; collect/V/cont; collect/W/cont; collect/X/cont; collect/Y/c*/ if((t = (status & 0377)) != 0) { if(t != 2) { printf("Fatal error in %s\n",f); printf("t = %d\n",t); } dexit(); } return((status>>8) & 0377); } flags(argv) char *argv[]; { int j,xx; char *ap; j = 1; ap = argv[1]; while(*++ap != '\0') { switch(*ap) { default: printf("Unrecognized flag: %c\n",*ap); dexit(); case '1': /* Symbol first */ order = 1; continue; case '2': /* Current file first */ order = 2; continue; case '3': /* Current symbol fir'\n') if(line[l] == '\0') goto fexit; lno++; out: if(*line != '\t') { put(0,"\n",1); lno++; } put(0,line,++l); goto fields; fexit: /* monitor(0); /*INSTR*/ return(0); } copy(a, b) char *a,*b; { char *c; b--; c = --a; while(*++b = *++a); return(a - c); } comp(a, b) char *a, *b; { /* printf("comp: %s %s\n",a,b); /*DEBUG*/ a--; b--; while(*++a == *++b) { if(*a == '\0') return(1); } return(0); } char buf[512]; int nread 1; get(ifile) int ifile; { char static *ibuf; if(-ont; collect/Z/cont; collect/1/cont; collect/2/cont; collect/3/cont; collect/4/cont; collect/5/cont; collect/6/cont; collect/7/cont; collect/8/cont; collect/9/cont; collect/0/cont; collect/ /out; skip/\;/semi; skip/_/coll; skip/ /tab; skip/{/incl; skip/}/decl; skip/*/cgobl; skip/'/cgobl; skip/"/cgobl; skip/\\/cgobl; skip/ /out; skip/1/sk2; skip/2/sk2; skip/3/sk2; skip/4/sk2; skip/5/sk2; skip/6/sk2; skip/7/sk2; skip/8/sk2; skip/9/sk2; skip/0/sk2; skip/a/coll; skip/b/coll; skip/c/coll; skip/d/coll; skip/e/colst */ order = 3; continue; case 'a': /* Assembler */ cflag = 0; continue; case 'c': /* C */ gtab = "/usr/lib/ctab"; if(!xx) ignonl = "/usr/lib/cign"; cflag = 1; continue; case 'e': /* English */ gtab = "/usr/lib/etab"; if(!xx) ignonl = "/usr/lib/eign"; continue; case 'i': /* Ignore file */ if(!xx) { xx = 1; only = 0; ignonl = argv[++j]; } continue; case 'l': /* Line numbers in col. 3 */ cross = 0; co-nread){ return(*ibuf++); } if(nread = read(ifile,buf,512)){ if(nread < 0)goto err; ibuf = buf; return(*ibuf++); } nread = 1; return(0); err: nread = 1; printf("read error\n"); return(0); } int tp[1] 1; int optr[4]; char bsp[512]; char *obuf[1] bsp; int nflush; put(fil,string,n) char *string; { int i; char *o; /*printf("%d %c %d\n",fil,*string,n);/*DEBUG*/ string--; if((i = optr[fil] + n - 512) >= 0) { n =- i; o = &obuf[fil][optr[fil]] -1; while(--n >= 0) *++o = *+l; skip/f/coll; skip/g/coll; skip/h/coll; skip/i/coll; skip/j/coll; skip/k/coll; skip/l/coll; skip/m/coll; skip/n/coll; skip/o/coll; skip/p/coll; skip/q/coll; skip/r/coll; skip/s/coll; skip/t/coll; skip/u/coll; skip/v/coll; skip/w/coll; skip/x/coll; skip/y/coll; skip/z/coll; skip/A/coll; skip/B/coll; skip/C/coll; skip/D/coll; skip/E/coll; skip/F/coll; skip/G/coll; skip/H/coll; skip/I/coll; skip/J/coll; skip/K/coll; skip/L/coll; skip/M/coll; skip/N/coll; skip/O/coll; skip/P/coll; skip/Q/coll; skip/R/coll; skntinue; case 'o': /* Only file */ if(!xx) { xx = 1; only = 1; ignonl = argv[++j]; } continue; case 's': /* Symbols in col. 3 */ cross = 1; continue; case 't': utmp = argv[++j]; tmp[0] = argv[j]; continue; case 'u': /* Unique symbols only */ usw = 1; continue; case 'x': /* C externals */ xsw = 1; gtab = "/usr/lib/ctab"; if(!xx) ignonl = "/usr/lib/cign"; cflag = 1; continue; } } return(j); } compile() { +string; optr[fil] = 512; flsh(fil); n = i; } o = &obuf[fil][optr[fil]] - 1; optr[fil] =+ n; while(--n >= 0) { *++o = *++string; } return(0); } flsh(fil) { extern tp[]; if(optr[fil] <= 0) return(optr[fil]); nflush++; if(write(tp[fil],obuf[fil],optr[fil]) != optr[fil]) return(-1); optr[fil] = 0; return(0); } ip/S/coll; skip/T/coll; skip/U/coll; skip/V/coll; skip/W/coll; skip/X/coll; skip/Y/coll; skip/Z/coll; skip2/{/incl; skip2/}/decl; skip2/a/cont; skip2/b/cont; skip2/c/cont; skip2/d/cont; skip2/e/cont; skip2/f/cont; skip2/g/cont; skip2/h/cont; skip2/i/cont; skip2/j/cont; skip2/k/cont; skip2/l/cont; skip2/m/cont; skip2/n/cont; skip2/o/cont; skip2/p/cont; skip2/q/cont; skip2/r/cont; skip2/s/cont; skip2/t/cont; skip2/u/cont; skip2/v/cont; skip2/w/cont; skip2/x/cont; skip2/y/cont; skip2/z/cont; skip2/A/cont; skipchar buf[40],*b; int i,v; fopen(ignonl,ibuf1); b = buf - 1; while((*++b = getc(ibuf1)) != -1) { if(*b == '\n') { *b = '\0'; search(buf,b - buf,&itab,1); b = buf - 1; } else { if(*b == '\t') { v = 0; while((i = getc(ibuf1)) != -1) { if(i == '\n') break; v = v*10 + (i - '0'); } search(buf,b - buf,&itab,v); b = buf - 1; } else { if((b - buf) > 39) { printf("Ignore/only symbol too long"); dexit(); } } } } close(ibuf1); return; } / reset 5 rts pc 2/B/cont; skip2/C/cont; skip2/D/cont; skip2/E/cont; skip2/F/cont; skip2/G/cont; skip2/H/cont; skip2/I/cont; skip2/J/cont; skip2/K/cont; skip2/L/cont; skip2/M/cont; skip2/N/cont; skip2/O/cont; skip2/P/cont; skip2/Q/cont; skip2/R/cont; skip2/S/cont; skip2/T/cont; skip2/U/cont; skip2/V/cont; skip2/W/cont; skip2/X/cont; skip2/Y/cont; skip2/Z/cont; skip2/1/cont; skip2/2/cont; skip2/3/cont; skip2/4/cont; skip2/5/cont; skip2/6/cont; skip2/7/cont; skip2/8/cont; skip2/9/cont; skip2/0/cont; skip2/./cont; skip2/ /out; 00+'t,'a,'t /-TATE .byte 6,200+'t,'o,'r,200+'a,'t /-TOR-ATE .byte 5,'e,'n,200+'a,'t /EN-ATE .byte 4,200+'m,'a,'t /-MATE .byte 5,200+'h,'o,'u,'s /-HOUSE .byte 5,200+'c,'l,'o,'s /-CLOSE .byte 4,'i,200+'o,'s /I-OSE .byte 4,200+'w,'i,'s /-WISE .byte 5,'a,'s,200+'u,'r /AS-URE .byte 40+4,200+'s,'u,'r /-SURE .byte 6,200+'f,'i,'g,200+'u,'r /-FIG-URE .byte 40+3,200+'t,'r /-TRE .byte 5,200+'s,'t,'o,'r /-STORE .byte 4,200+'f,'o,'r /-FORE .byte 5,200+'w,'h,'e,'r /-WHERE .byte 3,200+'d,'r /-DRE .byte 3,200+'c,'r /-CRE .'r,'g /-BURGH .byte 4,200+'v,'i,'c /-VICH .byte 3,200+'n,'a /-NAH .byte 3,200+'l,'a /-LAH .byte 4,200+'m,'i,200+'a /-MI-AH .byte 0 sufi: .byte 3,200+'t,'r /-TRI .byte 3,200+'c,'h /-CHI .byte 200+3,'i,'f /IF-I .byte 200+3,'e,'d /ED-I .byte 5,200+'a,'s,'c,'i /-ASCII .byte 0 sufk: .byte 4,200+'w,'o,'r /-WORK .byte 4,200+'m,'a,'r /-MARK .byte 4,200+'b,'o,'o /-BOOK .byte 4,200+'w,'a,'l /-WALK .byte 5,200+'c,'r,'a,'c /-CRACK .byte 4,200+'b,'a,'c /-BACK .byte 0 sufl: .byte 3,200+'f,'u /-FUL .byte 5,'s,200+'w,'e,'lbyte 3,200+'b,'r /-BRE .byte 5,200+'s,'c,'o,'p /-SCOPE .byte 4,'y,200+'o,'n /Y-ONE .byte 5,200+'s,'t,'o,'n /-STONE .byte 5,200+'p,'h,'o,'n /-PHONE .byte 4,200+'g,'o,'n /-GONE .byte 4,'e,200+'o,'n /E-ONE .byte 40+4,200+'e,'n,'n /-ENNE .byte 40+5,'a,200+'r,'i,'n /A-RINE .byte 5,200+'c,'l,'i,'n /-CLINE .byte 4,200+'l,'i,'n /-LINE .byte 4,200+'s,'o,'m /-SOME .byte 4,200+'c,'o,'m /-COME .byte 4,200+'t,'i,'m /-TIME .byte 3,200+'z,'l /-ZLE .byte 3,200+'t,'l /-TLE .byte 3,200+'s,'l /-SLE .byte 3,200+'p,'l /-PLE .by /S-WELL .byte 4,200+'t,'e,'l /-TELL .byte 5,200+'s,'h,'e,'l /-SHELL .byte 5,200+'s,'t,'a,'l /-STALL .byte 4,200+'s,'t,'a /-STAL .byte 4,200+'b,'a,'l /-BALL .byte 3,'v,200+'e /V-EL .byte 3,'u,200+'e /U-EL .byte 3,'k,200+'e /K-EL .byte 4,'t,'h,200+'e /TH-EL .byte 5,'t,'c,'h,200+'e /TCH-EL .byte 3,'a,200+'e /A-EL .byte 140+4,200+'q,'u,'a //QUAL .byte 40+3,'u,200+'a /U-AL .byte 3,200+'t,'a /-TAL .byte 4,'u,'r,200+'a /UR-AL .byte 40+5,'g,200+'o,200+'n,'a /G-O-NAL .byte 4,'o,'n,200+'a /ON-AL .byte 3,200+'n,'a /-/ suftab - suffix table suftab: sufa+20 0 sufc+20 sufd+20 sufe+20 suff+20 sufg+20 sufh+20 sufi+20 0 sufk+20 sufl+20 sufm+20 sufn+20 sufo+20 sufp+20 0 sufr+20 sufs+20 suft+20 0 0 0 0 sufy+20 0 sufa: .byte 2,200+'t /-TA .byte 2,200+'s /-SA .byte 3,200+'t,'r /-TRA .byte 3,200+'d,'r /-DRA .byte 3,200+'b,'r /-BRA .byte 2,200+'p /-PA .byte 2,200+'n /-NA .byte 2,200+'m /-MA .byte 3,200+'p,'l /-PLA .byte 2,200+'l /-LA .byte 2,200+'k /-Kte 5,200+'v,'i,'l,'l /-VILLE .byte 4,'c,'k,200+'l /CK-LE .byte 3,200+'k,'l /-KLE .byte 3,200+'g,'l /-GLE .byte 3,200+'f,'l /-FLE .byte 3,200+'d,'l /-DLE .byte 3,200+'c,'l /-CLE .byte 5,200+'p,'a,200+'b,'l /-PA-BLE .byte 5,'f,'a,200+'b,'l /FA-BLE .byte 5,200+'c,'a,200+'b,'l /-CA-BLE .byte 6,200+'s,'t,'a,'b,'l /-STABLE .byte 4,200+'a,'b,'l /-ABLE .byte 3,200+'b,'l /-BLE .byte 4,200+'d,'a,'l /-DALE .byte 4,200+'m,'a,'l /-MALE .byte 4,200+'s,'a,'l /-SALE .byte 4,200+'l,'i,'k /-LIKE .byte 340+5,'g,200+'u,'a,'g /NAL .byte 4,200+'t,'i,'a /-TIAL .byte 4,200+'s,'i,'a /-SIAL .byte 40+5,200+'t,'r,'i,200+'a /-TRI-AL .byte 4,'r,'i,200+'a /RI-AL .byte 4,200+'n,'i,200+'a /-NI-AL .byte 4,200+'d,'i,200+'a /-DI-AL .byte 4,200+'c,'i,'a /-CIAL .byte 3,200+'g,'a /-GAL .byte 4,200+'m,'e,'a /-MEAL /.byte 40+4,200+'r,'e,200+'a /-RE-AL .byte 40+4,200+'r,'e,'a /-REAL .byte 6,'c,200+'t,'i,200+'c,'a /C-TI-CAL .byte 5,200+'s,'i,200+'c,'a /-SI-CAL .byte 4,200+'i,200+'c,'a /-I-CAL .byte 3,200+'c,'a /-CAL .byte 3,200+'b,'a /-BAL .byte 6,200A .byte 3,200+'t,'h /-THA .byte 3,200+'s,'h /-SHA .byte 2,200+'g /-GA .byte 2,200+'d /-DA .byte 2,200+'c /-CA .byte 2,200+'b /-BA .byte 0 sufc: .byte 4,'e,'t,200+'i /ET-IC .byte 7,'a,'l,200+'i,'s,200+'t,'i /AL-IS-TIC .byte 4,'s,200+'t,'i /S-TIC .byte 4,'p,200+'t,'i /P-TIC .byte 5,200+'l,'y,'t,200+'i /-LYT-IC .byte 4,'o,'t,200+'i /OT-IC .byte 5,'a,'n,200+'t,'i /AN-TIC .byte 4,'n,200+'t,'i /N-TIC .byte 4,'c,200+'t,'i /C-TIC .byte 4,'a,'t,200+'i /AT-IC .byte 4,'h,200+'n,'i /H-NIC .byte 3,'n,200+'i /N-IC .byte -G/UAGE .byte 5,200+'r,'i,'a,'g /-RIAGE .byte 5,'e,'r,200+'a,'g /ER-AGE .byte 4,'m,200+'a,'g /M-AGE .byte 4,'k,200+'a,'g /K-AGE .byte 4,'d,200+'a,'g /D-AGE .byte 4,200+'w,'i,'f /-WIFE .byte 5,200+'k,'n,'i,'f /-KNYFE .byte 3,200+'s,'e /-SEE .byte 4,200+'f,'r,'e /-FREE .byte 340+2,'e /EE .byte 4,200+'w,'i,'d /-WIDE .byte 4,200+'t,'i,'d /-TIDE .byte 4,200+'s,'i,'d /-SIDE .byte 6,200+'q,'u,'e,'n,'c /-QUENCE .byte 7,200+'f,'l,'u,200+'e,'n,'c /-FLU-ENCE .byte 40+6,'e,'s,200+'e,'n,'c /ES-ENCE .byte 6,'e,'r,200+'e,+'n,'o,200+'m,'i,200+'a /-NO-MI-AL .byte 0 sufm: .byte 3,200+'n,'u /-NUM .byte 5,'o,200+'r,'i,200+'u /O-RI-UM .byte 40+3,'i,200+'u /I-UM .byte 40+3,'e,200+'u /E-UM .byte 5,'i,'v,200+'i,'s /IV-ISM .byte 4,200+'t,'i,'s /-TISM .byte 5,'i,200+'m,'i,'s /I-MISM .byte 5,'a,'l,200+'i,'s /AL-ISM .byte 40+4,'e,200+'i,'s /E-ISM .byte 40+4,'a,200+'i,'s /A-ISM .byte 4,200+'r,'o,'o /-ROOM .byte 3,200+'d,'o /-DOM .byte 3,200+'h,'a /-HAM .byte 6,200+'a,200+'r,'i,'t,'h /-A-RITHM .byte 5,200+'r,'i,'t,'h /-RITHM .byte 0 sufn:3,'m,200+'i /M-IC .byte 4,'l,200+'l,'i /L-LIC .byte 4,'b,200+'l,'i /B-LIC .byte 4,200+'c,'l,'i /-CLIC .byte 3,'l,200+'i /L-IC .byte 3,'h,200+'i /H-IC .byte 3,'f,200+'i /F-IC .byte 3,'d,200+'i /D-IC .byte 3,200+'b,'i /-BIC .byte 3,'a,200+'i /A-IC .byte 3,200+'m,'a /-MAC .byte 3,'i,200+'a /I-AC .byte 0 sufd: .byte 4,200+'w,'o,'r /-WORD .byte 4,200+'l,'o,'r /-LORD .byte 4,200+'f,'o,'r /-FORD .byte 4,200+'y,'a,'r /-YARD .byte 4,200+'w,'a,'r /-WARD .byte 5,200+'g,'u,'a,'r /-GUARD .byte 4,200+'t,'a,'r /-TARD .byt'n,'c /ER-ENCE .byte 5,'i,200+'e,'n,'c /I-ENCE .byte 40+5,200+'s,'a,'n,'c /-SANCE .byte 6,'e,'r,200+'a,'n,'c /ER-ANCE .byte 6,'a,'r,200+'a,'n,'c /AR-ANCE .byte 5,200+'n,'a,'n,'c /-NANCE .byte 7,200+'b,'a,'l,200+'a,'n,'c /-BAL-ANCE .byte 5,'i,200+'a,'n,'c /I-ANCE .byte 7,200+'j,'u,'s,200+'t,'i,'c /-JUS-TICE .byte 5,200+'s,'t,'i,'c /-STICE .byte 5,200+'p,'i,'e,'c /-PIECE .byte 5,200+'p,'l,'a,'c /-PLACE .byte 340+1 //E .byte 0 suff: .byte 5,200+'p,'r,'o,'o /-PROOF .byte 4,200+'s,'e,'l /-SELF .byte 3,200+'r,'i  .byte 4,200+'t,'o,'w /-TOWN .byte 4,200+'d,'o,'w /-DOWN .byte 4,200+'t,'u,'r /-TURN .byte 5,200+'s,'p,'o,'o /-SPOON .byte 4,200+'n,'o,'o /-NOON .byte 4,200+'m,'o,'o /-MOON .byte 11,'a,'l,200+'i,200+'z,'a,200+'t,'i,'o /AL-I-ZA-TION .byte 7,200+'i,200+'z,'a,200+'t,'i,'o /-I-ZA-TION .byte 7,'l,200+'i,200+'a,200+'t,'i,'o /L-I-A-TION .byte 4,200+'t,'i,'o /-TION .byte 40+5,'s,200+'s,'i,'o /S-SION .byte 4,200+'s,'i,'o /-SION .byte 4,'n,200+'i,'o /N-ION .byte 4,200+'g,'i,'o /-GION .byte 4,200+'c,'i,'o /-CION .bytee 5,200+'b,'o,'a,'r /-BOARD .byte 4,200+'n,'a,'r /-NARD .byte 5,200+'l,'i,'a,'r /-LIARD .byte 4,200+'i,'a,'r /-IARD .byte 4,200+'g,'a,'r /-GARD .byte 4,200+'b,'a,'r /-BARD .byte 3,200+'r,'o /-ROD .byte 4,200+'w,'o,'o /-WOOD .byte 4,200+'h,'o,'o /-HOOD .byte 4,200+'m,'o,'n /-MOND .byte 4,200+'t,'e,'n /-TEND .byte 5,200+'s,'t,'a,'n /-STAND .byte 4,200+'l,'a,'n /-LAND .byte 4,200+'h,'a,'n /-HAND .byte 4,200+'h,'o,'l /-HOLD .byte 4,200+'f,'o,'l /-FOLD .byte 5,200+'f,'i,'e,'l /-FIELD .byte 3,200+'v,'i /-VID .byt/-RIF .byte 40+4,200+'l,'i,'e /-LIEF .byte 0 sufg: .byte 3,200+'l,'o /-LOG .byte 4,200+'l,'o,'n /-LONG .byte 5,'t,200+'t,'i,'n /T-TING .byte 6,200+'s,'t,'r,'i,'n / -STRING .byte 5,'r,200+'r,'i,'n /R-RING .byte 5,'p,200+'p,'i,'n /P-PING .byte 5,'n,200+'n,'i,'n /N-NING .byte 5,'m,200+'m,'i,'n /M-MING .byte 5,'l,200+'l,'i,'n / L-LING .byte 5,200+'z,'l,'i,'n /-ZLING .byte 5,200+'t,'l,'i,'n /-TLING .byte 40+5,'s,200+'l,'i,'n /S-LING .byte 5,'r,200+'l,'i,'n /R-LING .byte 5,200+'p,'l,'i,'n /-PLING .byte 6,'n,200+' 3,200+'c,'o /-CON .byte 3,200+'t,'o /-TON .byte 3,200+'s,'o /-SON .byte 3,200+'r,'i /-RIN .byte 3,200+'p,'i /-PIN .byte 3,200+'n,'i /-NIN .byte 3,200+'m,'i /-MIN .byte 3,200+'l,'i /-LIN .byte 3,200+'k,'i /-KIN .byte 5,200+'s,'t,'e,'i /-STEIN .byte 4,200+'t,'a,'i /-TAIN .byte 5,'g,'h,'t,200+'e /GHT-EN .byte 5,200+'w,'o,'m,200+'e /-WOM-EN .byte 3,200+'m,'e /-MEN .byte 4,'o,200+'k,'e /O-KEN .byte 3,'k,200+'e /K-EN .byte 4,200+'t,'e,'e /-TEEN .byte 4,200+'s,'e,'e /-SEEN .byte 40+3,200+'s,'a /-SAN .byte 5,200+'e 3,200+'c,'i /-CID .byte 4,200+'s,'a,'i /-SAID .byte 4,200+'m,'a,'i /-MAID .byte 4,'t,200+'t,'e /T-TED .byte 3,'t,200+'e /T-ED .byte 4,200+'d,'r,'e /-DRED .byte 4,200+'c,'r,'e /-CRED .byte 4,200+'b,'r,'e /-BRED .byte 5,'v,200+'e,'l,'e /V-ELED .byte 100+4,'a,'l,200+'e /AL/ED .byte 140+3,200+'e,'e //EED .byte 40+5,'e,'d,200+'d,'e /ED-DED .byte 4,'d,200+'d,'e /D-DED .byte 40+4,'e,'d,200+'e /ED-ED .byte 3,'d,200+'e /D-ED .byte 5,200+'d,'u,'c,'e /-DUCED .byte 300+2,'e /E/D .byte 5,200+'s,'t,'e,'a /-STEAD .byte k,'l,'i,'n /N-KLING .byte 5,'k,200+'l,'i,'n /K-LING .byte 5,200+'g,'l,'i,'n /-GLING .byte 5,200+'f,'l,'i,'n /-FLING .byte 5,200+'d,'l,'i,'n /-DLING .byte 5,200+'c,'l,'i,'n /-CLING .byte 5,200+'b,'l,'i,'n /-BLING .byte 6,'y,200+'t,'h,'i,'n /Y-THING .byte 7,'e,'e,'t,'h,200+'i,'n /EETH-ING .byte 6,'e,200+'t,'h,'i,'n /E-THING .byte 5,'g,200+'g,'i,'n /G-GING .byte 5,'d,200+'d,'i,'n /D-DING .byte 5,'b,200+'b,'i,'n /B-BING .byte 3,200+'i,'n /-ING .byte 0 sufh: .byte 5,200+'m,'o,'u,'t /-MOUTH .byte 5,200+'w,'o,'r,'w,'o,'m,200+'a /-WOM-AN .byte 3,200+'m,'a /-MAN .byte 4,200+'t,'i,'a /-TIAN .byte 4,200+'s,'i,'a /-SIAN .byte 40+4,'e,200+'i,'a /E-IAN .byte 4,200+'c,'i,'a /-CIAN .byte 300+3,'i,'a /IA/N .byte 5,200+'c,'l,'e,'a /-CLEAN .byte 4,200+'m,'e,'a /-MEAN .byte 40+3,'e,200+'a /E-AN .byte 0 sufo: .byte 5,200+'m,'a,'c,200+'r /-MAC-RO .byte 0 sufp: .byte 5,200+'g,'r,'o,'u /-GROUP .byte 2,200+'u /-UP .byte 4,200+'s,'h,'i /-SHIP .byte 4,200+'k,'e,'e /-KEEP .byte 0 sufr: .byte 4,200+'z,'a,'r /-ZARR .byte 300+2,'r /R/R .by4,200+'h,'e,'a /-HEAD .byte 0 sufe: .byte 5,'a,'r,200+'i,'z /AR-IZE .byte 5,'a,'n,200+'i,'z /AN-IZE .byte 5,'a,'l,200+'i,'z /AL-IZE .byte 6,200+'a,'r,'d,200+'i,'z /-ARD-IZE .byte 5,200+'s,'e,'l,'v /-SELVE .byte 5,200+'k,'n,'i,'v /-KNIVE .byte 5,200+'l,'i,'e,'v /-LIEVE .byte 100+3,200+'q,'u //QUE .byte 7,'o,'n,200+'t,'i,'n,200+'u /ON-TIN-UE .byte 3,200+'n,'u /-NUE .byte 3,200+'d,'u /-DUE .byte 300+2,'u /U/E .byte 300+5,'q,'u,'a,'t / QUAT/E .byte 4,'u,200+'a,'t /U-ATE .byte 5,200+'s,'t,'a,'t /-STATE .byte 4,2t /-WORTH .byte 4,200+'w,'i,'t /-WITH .byte 5,'t,200+'t,'i,'s /T-TISH .byte 5,'e,200+'t,'i,'s /E-TISH .byte 5,'p,200+'p,'i,'s /P-PISH .byte 5,'r,200+'n,'i,'s /R-NISH .byte 5,'n,200+'n,'i,'s /N-NISH .byte 5,200+'p,'l,'i,'s /-PLISH .byte 5,200+'g,'u,'i,'s / -GUISH .byte 5,200+'g,'l,'i,'s / -GLISH .byte 5,'b,200+'l,'i,'s / B-LISH .byte 5,'g,200+'g,'i,'s /G-GISH .byte 5,'d,200+'d,'i,'s /D-DISH .byte 3,200+'i,'s /-ISH .byte 5,200+'g,'r,'a,'p /-GRAPH .byte 7,200+'b,'o,'r,200+'o,'u,'g /-BOR-OUGH .byte 5,200+'b,'u,te 3,200+'t,'o /-TOR .byte 40+3,200+'s,'o /-SOR .byte 40+4,200+'r,'i,200+'o /-RI-OR .byte 4,'i,'z,200+'e /IZ-ER .byte 5,200+'c,'o,'v,200+'e /-COV-ER .byte 4,'o,200+'v,'e /O-VER .byte 4,200+'e,'v,200+'e /-EV-ER .byte 8.,200+'c,'o,'m,200+'p,'u,'t,200+'e /-COM-PUT-ER .byte 40+5,'u,'s,200+'t,'e /US-TER .byte 5,'o,'s,'t,200+'e /OST-ER .byte 40+5,200+'a,'c,200+'t,'e /-AC-TER .byte 6,200+'w,'r,'i,'t,200+'e /-WRIT-ER .byte 40+5,'i,'s,200+'t,'e /IS-TER .byte 40+5,'e,'s,200+'t,'e /ES-TER .byte 40+5,'a,'s,200+'t,'e /AS-TER .byte 4,200+'s,'t,'e /-STER .byte 5,'a,'r,200+'t,'e /AR-TER .byte 4,'r,'t,200+'e /RT-ER .byte 40+5,'m,200+'e,200+'t,'e /M-E-TER .byte 5,200+'w,'a,200+'t,'e /-WA-TER .byte 3,'r,200+'e /R-ER .byte 4,'o,'p,200+'e /OP-ER .byte 5,200+'p,'a,200+'p,'e /-PA-PER .byte 4,'w,'n,200+'e /WN-ER .byte 40+4,'s,200+'n,'e /S-NER .byte 4,'o,'n,200+'e /ON-ER .byte 4,'r,'m,200+'e /RM-ER .byte 3,200+'m,'e /-MER .byte 4,'l,'l,200+'e /LL-ER .byte 5,'d,200+'d,'l,'e /D-DLER .byte 4,200+'b,'l,'e /-BLER .byte 3,'k,200+'e /K-ER .byte 0 .even 20 .byte 000,000,000,000,360,000,000,000,000,000,160,000,000 .byte 100,000,040,005,120,000,000,100,000,000,060,000,140 .byte 140,040,100,001,240,041,000,242,000,002,140,000,100 .byte 240,000,120,002,200,000,000,320,007,000,240,000,340 .byte 101,021,041,020,040,005,042,121,002,021,201,000,020 .byte 160,000,100,000,140,000,000,160,006,000,220,000,140 .byte 140,000,020,001,020,000,000,100,001,000,300,000,000 .byte 000,000,000,000,000,000,000,000,000,000,000,000,000 .byte 106,041,040,147,040,000,063,041,001,102byte 5,'n,200+'t,'h,'e /N-THER .byte 6,200+'f,'a,200+'t,'h,'e /-FA-THER .byte 6,'e,'i,200+'t,'h,'e /EI-THER .byte 4,'t,'h,200+'e /TH-ER .byte 4,'s,'h,200+'e /SH-ER .byte 4,200+'p,'h,'e /-PHER .byte 4,'c,'h,200+'e /CH-ER .byte 4,'d,'g,200+'e /DG-ER .byte 4,'r,'d,200+'e /RD-ER .byte 6,'o,'u,'n,'d,200+'e /OUND-ER .byte 4,'l,'d,200+'e /LD-ER .byte 4,'i,'d,200+'e /ID-ER .byte 5,200+'d,'u,'c,200+'e /-DUC-ER .byte 4,'n,'c,200+'e /NC-ER .byte 100+2, 200+'e / /ER .byte 3,200+'s,'a /-SAR .byte 40+6,'a,'c,200+'u,200+'cc -s -O sno?.c cmp a.out /usr/bin/sno cp a.out /usr/bin/sno rm *.o a.out ,160,002,002 .byte 300,000,040,017,140,017,000,240,000,000,140,000,120 bxxh: .byte 005,150,153,062,062,246,152,127,146,203,310,017,206 .byte 100,000,120,000,140,000,000,100,000,000,120,000,060 .byte 100,000,040,000,060,000,000,060,000,000,220,000,040 .byte 100,000,120,000,200,000,000,100,000,000,140,000,060 .byte 043,142,046,140,062,147,210,131,046,106,246,017,111 .byte 060,000,020,000,060,000,000,040,000,000,100,000,000 .byte 060,000,040,000,040,000,000,040,000,000,100,000,040 .byte 100,000,100,000,100,00l,'a /AC-U-LAR .byte 40+6,'e,'c,200+'u,200+'l,'a /EC-U-LAR .byte 40+6,'i,'c,200+'u,200+'l,'a /IC-U-LAR .byte 40+6,'e,'g,200+'u,200+'l,'a /EG-U-LAR .byte 0 sufs: .byte 40+4,'u,200+'o,'u /U-OUS .byte 5,200+'t,'i,'o,'u /-TIOUS .byte 5,200+'g,'i,'o,'u /-GIOUS .byte 5,200+'c,'i,'o,'u /-CIOUS .byte 40+4,'i,200+'o,'u /I-OUS .byte 5,200+'g,'e,'o,'u /-GEOUS .byte 5,200+'c,'e,'o,'u /-CEOUS .byte 4,'e,200+'o,'u /E-OUS .byte 140+2,200+'u //US .byte 4,200+'n,'e,'s /-NESS .byte 4,200+'l,'e,'s /-LESS .byte 140+2,200+'s /// / / roff5 -- runoff slow: 1 pto: 9999. po: 0 ls: 1 ls1: 1 pn: 1 ma1: 2 ma2: 2 ma3: 1 ma4: 3 ll: 65. llh: 65. hx: 1 pl: 66. ad: 1 fi: 1 cc: '. ohc: 200 hyf: 1 hypedf: 0 obufp: obuf thresh: 240 tabc: ' tabtab: .byte 8.,16.,24.,32.,40.,48.,56.,64.,72.,0 suffil: ones: fives: ttyx: bfn: .even ofile: -1 nextb: 4 ilistp: ilist .bss old: .=.+2 stop: .=.+2 garb: .=.+2 bname: nextf: .=.+20. nx: .=.+2 ibf: .=.+2 ibf1: .=.+2 skp: .=.+2 ip: .=.+2 il0,000,040,000,000,100,000,140 .byte 066,045,145,140,000,070,377,030,130,103,003,017,006 .byte 040,000,040,000,020,000,000,040,000,000,100,000,000 .byte 200,000,020,000,140,000,000,120,000,000,120,000,040 .byte 120,000,040,000,060,000,000,060,000,000,160,000,040 .byte 120,000,040,000,120,000,000,040,000,000,160,000,040 .byte 120,000,020,000,140,000,000,120,000,000,140,000,040 .byte 051,126,150,140,060,210,146,006,006,165,003,017,244 .byte 120,000,040,000,160,000,000,140,000,000,060,000,140 .byte 000,000,000,SS .byte 40+5,'p,200+'o,200+'l,'i /P-O-LIS .byte 140+2,200+'i //IS .byte 100+3,200+'x,'e /X/ES .byte 100+3,200+'s,'e /S/ES .byte 100+4,'s,'h,200+'e /SH/ES .byte 100+4,'c,'h,200+'e /CH/ES .byte 300+1 //S .byte 0 suft: .byte 6,'i,'o,'n,200+'i,'s /ION-IST .byte 5,'i,'n,200+'i,'s /IN-IST .byte 5,'a,'l,200+'i,'s /AL-IST .byte 6,'l,200+'o,200+'g,'i,'s /L-O-GIST .byte 5,'h,'t,200+'e,'s /HT-EST .byte 4,'i,200+'e,'s /I-EST .byte 5,'g,200+'g,'e,'s /G-GEST .byte 4,'g,200+'e,'s /G-EST .byte 5,'d,200+'d,'e,'s /D-DEST .bist: .=.+8. iliste: .=.+2 column: .=.+2 ocol: .=.+2 nspace: .=.+2 fac: .=.+2 fmq: .=.+2 nhl: .=.+2 nel: .=.+2 jfomod: .=.+2 wordp: .=.+2 nlflg: .=.+2 /tottext: .=.+2 /totcon: .=.+2 spaceflg: .=.+2 ch: .=.+2 linep: .=.+2 undflg: .=.+2 wordend: .=.+2 maxdig: .=.+2 maxloc: .=.+2 totout: .=.+2 hstart: .=.+2 nhstart: .=.+2 nhyph: .=.+2 argc: .=.+2 argp: .=.+2 ibufp: .=.+2 eibuf: .=.+2 wne: .=.+2 nl: .=.+2 bl: .=.+2 nc: .=.+2 ne: .=.+2 lnumber: .=.+2 numbmod: .=.+2 skip: .=.+2 nwd: .=.+2 ulstate: .=.+2 ulc: .=.+2000,000,000,000,000,000,000,000,000,000 .byte 140,000,140,000,060,000,000,100,000,000,140,000,020 .byte 120,000,020,000,060,000,000,060,000,000,060,000,040 .byte 140,000,020,000,100,000,000,140,000,000,140,000,020 .byte 070,125,051,162,120,105,126,104,006,044,000,017,052 .byte 140,000,020,000,140,000,000,060,000,000,060,000,040 .byte 020,000,000,000,020,000,000,000,000,000,000,000,060 .byte 140,000,160,000,200,000,000,140,000,000,000,000,240 .byte 065,042,060,200,000,210,222,146,006,204,220,012,003 .byte 24yte 4,'d,200+'e,'s /D-EST .byte 4,200+'c,'a,'s /-CAST .byte 5,200+'h,'e,'a,'r /-HEART .byte 4,200+'f,'o,'o /-FOOT .byte 3,'i,200+'o /I-OT .byte 5,200+'f,'r,'o,'n /-FRONT .byte 5,200+'p,'r,'i,'n /-PRINT .byte 4,200+'m,'e,'n /-MENT .byte 5,200+'c,'i,'e,'n /-CIENT .byte 4,'i,200+'a,'n /I-ANT .byte 6,200+'w,'r,'i,'g,'h /-WRIGHT .byte 6,200+'b,'r,'i,'g,'h /-BRIGHT .byte 6,200+'f,'l,'i,'g,'h /-FLIGHT .byte 6,200+'w,'e,'i,'g,'h /-WEIGHT .byte 5,200+'s,'h,'i,'f /-SHIFT .byte 5,200+'c,'r,'a,'f /-CRAFT .byte 40+4,'d, bsc: .=.+2 nsp: .=.+2 nn: .=.+2 ro: .=.+2 pfrom: .=.+2 ni: .=.+2 onesp: .=.+2 fivesp: .=.+2 ul: .=.+2 ce: .=.+2 in: .=.+2 un: .=.+2 wch: .=.+2 suff: .=.+2 sufb: .=.+20. sufbuf: .=.+512. suftab: .=.+[2*26.] ifile: .=.+2 char: .=.+2 nfile: .=.+2 ehead: .=.+2 ohead: .=.+2 efoot: .=.+2 ofoot: .=.+2 trtab: .=.+128. word: .=.+200. stbuf: linsiz = 500. line: .=.+linsiz end: 0,000,020,000,120,000,000,200,000,000,200,000,240 xhx: .byte 032,146,042,107,076,102,042,146,202,050,006,000,051 .byte 036,377,057,013,057,366,377,057,001,377,057,000,040 .byte 037,377,020,000,100,022,377,057,362,116,100,000,017 .byte 057,377,057,031,137,363,377,037,362,270,077,000,117 .byte 074,142,012,236,076,125,063,165,341,046,047,000,024 .byte 020,017,075,377,040,001,377,017,001,204,020,000,040 .byte 057,017,057,340,140,362,314,117,003,302,100,000,057 .byte 057,357,077,017,100,366,314,057,342,346,037,'g,200+'e /DG-ET .byte 4,200+'g,'o,'a /-GOAT .byte 4,200+'c,'o,'a /-COAT .byte 4,200+'b,'o,'a /-BOAT .byte 4,200+'w,'h,'a /-WHAT .byte 4,200+'c,'u,'i /-CUIT .byte 0 sufy: .byte 40+4,'e,'s,200+'t /ES-TY .byte 40+5,'q,'u,'i,200+'t /QUI-TY .byte 4,200+'t,'i,200+'t /-TI-TY .byte 40+5,'o,'s,200+'i,200+'t /OS-I-TY .byte 4,200+'s,'i,200+'t /-SI-TY .byte 5,'i,'n,200+'i,200+'t /IN-I-TY .byte 4,'n,'i,200+'t /NI-TY .byte 40+10,'f,'a,200+'b,'i,'l,200+'i,200+'t /FA-BIL-I-TY .byte 10,200+'c,'a,200+'b,'i,'l,200+'i,200+'t 000,060 .byte 252,145,072,157,377,165,063,066,164,050,363,000,362 .byte 000,000,020,000,020,000,000,017,000,000,020,000,000 .byte 117,017,237,377,200,354,125,110,004,257,000,000,300 .byte 057,367,054,357,157,216,314,114,217,353,053,000,057 .byte 077,213,077,077,177,317,377,114,377,352,077,000,076 .byte 077,213,077,077,157,177,377,054,377,352,117,000,075 .byte 125,230,065,216,057,066,063,047,345,126,011,000,033 .byte 057,377,051,360,120,361,273,056,001,256,057,000,060 .byte 000,000,000,000,000,000,000,000,00/-CA-BIL-I-TY .byte 10,200+'p,'a,200+'b,'i,'l,200+'i,200+'t /-PA-BIL-I-TY .byte 6,200+'b,'i,'l,200+'i,200+'t /-BIL-I-TY .byte 3,'i,200+'t /I-TY .byte 4,200+'b,'u,'r /-BUR-Y .byte 4,200+'t,'o,200+'r /-TO-RY .byte 5,200+'q,'u,'a,'r /-QUAR-Y .byte 40+4,'u,200+'a,'r /U-ARY .byte 7,200+'m,'e,'n,200+'t,'a,200+'r /-MEN-TA-RY .byte 6,'i,'o,'n,200+'a,'r /ION-ARY .byte 4,'i,200+'a,'r /I-ARY .byte 4,'n,200+'o,200+'m /N-O-MY .byte 3,200+'p,'l /-PLY .byte 4,'g,200+'g,'l /G-GLY .byte 5,200+'p,'a,200+'b,'l /-PA-BLY .byte / / / hyp4 -- digram tables bxh: .byte 060,000,040,000,040,000,000,040,000,000,040,000,040 hxx: .byte 006,042,041,123,021,024,063,042,002,043,021,001,022 .byte 140,000,200,003,260,006,000,160,007,000,140,000,320 .byte 220,000,160,005,240,010,000,100,006,000,200,000,320 .byte 240,000,120,003,140,000,000,240,010,000,220,000,160 .byte 042,023,041,040,040,022,043,041,030,064,021,000,041 .byte 100,000,140,000,220,006,000,140,003,000,200,000,000 .byte 200,000,120,002,220,010,000,160,006,000,140,000,320 .byte 00,000,000,000,000 .byte 076,310,056,310,137,174,273,055,335,266,033,000,155 .byte 077,157,057,360,057,063,042,024,077,206,020,000,040 .byte 057,037,077,360,100,365,377,037,362,176,050,000,026 .byte 167,146,042,112,077,110,062,254,366,052,377,000,163 .byte 060,000,040,000,120,000,377,060,012,000,037,000,257 .byte 037,232,157,361,040,003,125,010,001,256,000,000,340 .byte 377,377,377,377,377,377,377,377,377,377,377,017,277 .byte 253,315,257,216,377,206,146,306,371,126,232,000,004 .byte 057,012,100,360,160,360,5,'f,'a,200+'b,'l /FA-BLY .byte 5,200+'c,'a,200+'b,'l /-CA-BLY .byte 4,200+'a,'b,'l /-ABLY .byte 3,200+'b,'l /-BLY .byte 2,200+'l /-LY .byte 3,200+'s,'k /-SKY .byte 40+6,'g,200+'r,'a,200+'p,'h /G-RA-PHY .byte 4,'l,200+'o,200+'g /L-O-GY .byte 2,200+'f /-FY .byte 3,200+'n,'e /-NEY .byte 3,200+'l,'e /-LEY .byte 4,'c,'k,200+'e /CK-EY .byte 3,200+'k,'e /-KEY .byte 4,200+'b,'o,'d /-BODY .byte 5,200+'s,'t,'u,'d /-STUDY .byte 340+4,'e,'e,'d /EEDY .byte 2,200+'b /-BY .byte 3,200+'w,'a /-WAY .byte 3,200+'d,'a /-DAY .20,000,020,000,020,000,000,020,000,000,020,000,000 .byte 043,163,065,044,022,043,104,042,061,146,061,000,007 .byte 100,000,140,000,040,000,000,100,000,000,120,000,000 .byte 140,000,040,011,060,004,001,120,003,000,140,000,040 .byte 200,000,100,000,140,000,000,140,000,000,140,000,240 .byte 200,000,140,000,160,000,000,220,000,000,140,000,240 .byte 200,000,140,000,160,000,000,220,000,000,060,000,240 .byte 021,043,041,121,040,023,042,003,142,042,061,001,022 .byte 120,000,140,010,140,010,000,140,002,000,120,000,1000,040,000,017,157,000,176 xxh: .byte 045,150,154,162,042,246,210,147,152,103,230,017,206 .byte 100,000,040,000,140,000,000,100,000,021,120,017,060 .byte 100,000,040,002,140,320,000,060,000,001,220,017,040 .byte 100,001,120,001,241,000,000,100,000,020,140,017,060 .byte 023,162,046,142,022,207,210,131,052,106,250,017,110 .byte 060,000,042,000,160,000,000,040,000,212,100,017,000 .byte 140,000,040,002,140,000,000,120,000,040,120,017,040 .byte 100,000,100,000,140,001,021,140,000,046,100,017,140 .byte 066,045,025,201,020,130,146,030,130,103,025,017,006 .byte 100,000,040,000,020,000,000,040,000,000,200,017,000 .byte 200,000,020,001,140,000,000,140,000,000,120,017,040 .byte 120,026,042,020,140,161,042,143,000,022,162,017,040 .byte 121,042,060,020,140,200,000,123,000,021,220,017,041 .byte 121,042,060,120,140,200,000,123,000,021,160,017,041 .byte 051,126,150,141,060,210,146,066,026,165,026,017,247 .byte 120,000,040,003,160,000,000,140,000,021,100,017,140 .byte 000,000,000,000,200,000,000,000,000,000,000,017,000 .bytp r3,r1 ble 2f tstb -(r3) bpl 2b 1: mov r0,hstart dec hstart bitb $100,-1(r1) bne 2b jsr r5,checkvow bne 4f bisb $200,(r0) br 2b 2: bitb $40,-(r1) beq suffix br 4f 3: tst (sp)+ 4: rts r5 rdsuf: mov r0,-(sp) mov suff,nfile mov 4(sp),r1 jsr pc,rdsufb mov $sufb,r2 movb r0,(r2)+ mov r0,r3 bic $!17,r3 1: dec r3 blt 1f inc r1 jsr pc,rdsufb movb r0,(r2)+ br 1b 1: mov $sufb,r1 mov (sp)+,r0 rts pc eadout: tst hx bne 0f tst (r5)+ rts r5 0: clr -(sp) mov *(r5),r2 mov ibf1,nfile jsr r5,headseg; width mov r0,-(sp) jsr r5,headseg; width mov r0,-(sp) jsr r5,headseg; width mov r0,-(sp) mov po,r0 jsr pc,space tst numbmod beq 1f mov $5,r0 add ni,r0 mov r0,6(sp) 1: mov *(r5)+,r2 jsr r5,headseg; putchar mov llh,r0 add 6(sp),r0 sub 2(sp),r0 asr r0 sub 4(sp),r0 bge 1f clr r0 1: mov r0,-(sp) jsr pc,space jsr r5,headseg; putchar mov llh,r0 sub (sp)+,r0 sub (sp)+,r0 sub (sp)+,r0 e 141,023,122,040,160,143,042,142,000,047,143,017,020 .byte 120,000,040,006,140,060,000,141,000,026,100,017,040 .byte 140,000,020,007,100,000,000,140,000,001,140,017,020 .byte 110,125,051,162,120,125,127,104,006,104,000,017,052 .byte 140,000,040,000,160,000,000,140,000,000,060,017,000 .byte 040,005,020,000,040,313,231,030,000,140,000,017,056 .byte 140,000,160,000,200,000,000,140,000,000,000,017,240 .byte 065,042,060,040,000,206,231,146,006,224,220,017,004 .byte 240,000,020,000,140,000,000,220,000,000,200,01sub (sp)+,r0 add (sp)+,r0 jsr pc,space jsr r5,headseg; putchar jsr pc,newline rts r5 headseg: clr -(sp) 1: mov r1,-(sp) mov r2,r1 inc r2 jsr pc,rdsufb mov (sp)+,r1 tstb r0 beq 1f cmp r0,$'% beq 2f jsr pc,*(r5) add r1,(sp) br 1b 2: mov pn,r0 clr r1 tst ro beq 2f mov $ones,onesp mov $fives,fivesp jsr pc,roman add r1,(sp) br 1b 2: jsr pc,decml add r1,(sp) br 1b 1: mov (sp)+,r0 tst (r5)+ rts r5 space: jsr r5,nlines; putchar rts pc nlines: mov r0,-(sp) 1: dec (sp) blt 1f 7,141 .even / / / roff4 -- runoff text: / inc tottext clr ulstate clr wch clr wne tst ce bne nofill tst fi beq nofill jsr pc,getchar 2: mov r0,ch cmp $' ,r0 bne 2f jsr pc,rbreak 1: jsr pc,getchar cmp $' ,r0 bne 2b inc un br 1b 2: cmp r0,$'\n bne 2f jsr pc,rbreak clr ch jsr pc,nline br 4f 2: tst wch bne 3f jsr pc,getword br 4f 3: jsr pc,movword bne 2b jsr pc,adjust br 2b 4: dec ul bge 1f clr ul 1: rts pc nofill: jsr pc,rbreak 1: jsr pc,gettchar cmp r0,$'\n beq 1f jsr pc,width  mov $' ,r0 jsr pc,*(r5) br 1b 1: cmp (r5)+,(sp)+ rts r5 decimal: jsr pc,decml tst (r5)+ rts r5 decml: mov r2,-(sp) mov r3,-(sp) jsr pc,decml1 mov (sp)+,r3 mov (sp)+,r2 rts pc decml1: mov r1,-(sp) clr r2 mov r0,r3 dvd $10.,r2 mov r3,-(sp) mov r2,r0 beq 1f jsr pc,decml mov r1,2(sp) 1: mov (sp)+,r0 add $'0,r0 jsr pc,*(r5) add (sp)+,r1 rts pc roman: mov r2,-(sp) mov r3,-(sp) jsr pc,roman1 mov (sp)+,r3 mov (sp)+,r2 rts pc roman1: clr r2 mov r0,r3 bne .+4 rts pc mov r1,-/ / / hyp1 -- driver hyphen: tst hypedf bne 3f tst hyf beq 3f inc hypedf mov wordp,r0 clr nhyph 1: jsr pc,punct bne 1f inc r0 br 1b 1: jsr pc,alph bne 3f 1: inc r0 jsr pc,alph beq 1b dec r0 mov r0,hstart 1: inc r0 tstb (r0) beq 2f jsr pc,punct bne 3f br 1b 2: jsr r5,suffix jsr r5,digram 3: rts pc punct: tst old bne 4f cmpb (r0),$010 beq 0f movb (r0),r2 jsr pc,alph2 beq 0f sez rts pc 0: clz rts pc 4: mov $3f,r2 1: cmpb (r0),(r2)+ beq 2f tstb (r2) bne 1b clz 2 add r1,ne jsr pc,storeline br 1b 1: tst ce ble 2f dec ce mov nel,r0 asr r0 bpl 1f clr r0 1: add r0,un tst numbmod beq 2f add $2,un 2: clr fac clr fmq mov $1000,nwd mov $' ,r0 jsr pc,storeline jsr pc,rbreak dec ul bpl 2f clr ul 2: rts pc adjust: mov r2,-(sp) mov r3,-(sp) clr r2 clr r3 tst ad beq 1f mov nwd,r0 dec r0 ble 1f mov nel,r3 ble 1f dvd r0,r2 1: mov r3,fac mov r2,fmq mov (sp)+,r3 mov (sp)+,r2 jsr pc,rbreak rts pc fill: mov fmq,r0 1: inc r0 dec nc cmpb ((sp) dvd $10.,r2 mov r3,-(sp) mov r2,r0 inc onesp inc fivesp jsr pc,roman mov r1,2(sp) dec onesp dec fivesp clr r2 mov (sp)+,r3 dvd $5.,r2 cmp r3,$4 bne 1f movb *onesp,r0 jsr pc,*(r5) add r1,(sp) tst r2 beq 2f inc onesp movb *onesp,r0 dec onesp br 3f 2: movb *fivesp,r0 3: jsr pc,*(r5) add (sp)+,r1 rts pc 1: tst r2 beq 2f movb *fivesp,r0 jsr pc,*(r5) add r1,(sp) 2: dec r3 blt 1f movb *onesp,r0 jsr pc,*(r5) add r1,(sp) br 2b 1: mov (sp)+,r1 rts pc : rts pc 3: < .,()"\'`\0> /should be more .even maplow: cmp r2,$'a bhis 1f add $'a-'A,r2 1: rts pc vowel: cmp r2,$'a beq 1f cmp r2,$'e beq 1f cmp r2,$'i beq 1f cmp r2,$'o beq 1f cmp r2,$'u beq 1f cmp r2,$'y 1: rts pc checkvow: mov r0,-(sp) 1: movb -(r0),r2 jsr pc,vowel beq 1f jsr pc,alph beq 1b mov (sp)+,r0 clz rts r5 1: mov (sp)+,r0 sez rts r5 / hyp2 -- suffix and digram digram: mov hstart,r0 1: jsr pc,alph bne 3f jsr pc,vowel beq 1f dec r0 br 1b 1: mov r0,hstart 1:r2)+,$' beq 1b dec r2 bit $1,totout beq 2f inc fac cmp fac,nwd blt 1f inc r0 br 1f 2: dec fac bmi 1f inc r0 1: jsr pc,space movb (r2),r0 rts pc movword: mov wch,wordend mov wordp,r4 add r4,wordend tst nwd bne 2f 1: movb (r4)+,r0 cmp r0,$' bne 1f dec wch jsr pc,width sub r1,wne br 1b 1: dec r4 2: cmp wne,nel ble 1f cmp nel,$4 ble 1f mov ls,r0 add nl,r0 cmp r0,bl bgt 2f mov ls,r0 asl r0 add nl,r0 cmp r0,bl bgt 1f 2: jsr pc,hyphen 1: clr nhyph mov wch,-(sp) 1: mo  movb -(r0),r2 jsr pc,alph2 bne 3f jsr pc,vowel bne 1b clr maxdig mov r0,nhstart 1: mov $1,r3 movb -1(r0),r2 jsr pc,alph2 beq 2f movb (r0),r2 mov $'a,r1 jsr r5,dilook; bxh br 4f 2: movb -2(r0),r2 mov $xxh,0f jsr pc,alph2 beq 2f mov $bxxh,0f 2: movb -1(r0),r1 movb (r0),r2 jsr r5,dilook; 0:xxh 4: movb (r0)+,r1 movb (r0),r2 jsr r5,dilook; xhx movb (r0),r1 movb 1(r0),r2 jsr r5,dilook; hxx cmp r3,maxdig blos 2f mov r3,maxdig mov r0,maxloc 2: cmp r0,hstart blo 1b mov nhstart,hsvb (r4)+,r0 cmp r0,$'- bne 2f movb (r4),r2 jsr pc,alph2 bne 2f bisb $200,(r4) 2: tst r0 bpl 2f bic $!177,r0 mov r4,r3 sub $4,r3 cmp r3,$word blo 2f movb (r3),r2 bic $!177,r2 jsr pc,alph2 beq 3f cmp nel,$2 ble 2f 3: mov r0,-(sp) clr r0 jsr pc,storeline mov (sp)+,r0 inc nhyph 2: jsr pc,width sub r1,wne jsr pc,storeline dec wch bne 1b tst nel blt 1f inc nwd tst (sp)+ clz rts pc 1: mov linep,r3 1: tst nhyph bne 2f tst nwd beq 3f cmp wch,(sp) beq 4f 2: movb -(r3),r0 bn/ / /roff3 -- runoff skipcont: jsr pc,getchar mov r0,r2 jsr pc,alph2 beq skipcont 1: cmp $' ,r0 bne 1f jsr pc,getchar br 1b 1: mov r0,ch rts pc rbreak: tst nc ble 4f clrb *linep inc totout mov ls,r0 dec r0 jsr r5,nlines; nline tst pl beq 4f cmp nl,bl bne 1f 3: jsr pc,eject 1: tst nl bne 3f mov ma1,r0 jsr r5,nlines; newline bit $1,pn bne 1f jsr r5,headout; ehead br 2f 1: jsr r5,headout; ohead 2: mov ma2,r0 jsr r5,nlines; newline dec skip bge 3b 3: mov po,r0 jsr pc,spactart cmp maxdig,thresh blo digram bisb $200,*maxloc inc nhyph / mov maxdig,*octbufp / inc octcnt / add $2,octbufp br digram 3: rts r5 dilook: mov r4,-(sp) bic $!177,r2 bic $!177,r1 jsr pc,maplow sub $'a,r2 cmp r2,$'z-'a bhi 3f mov r2,r4 mov r1,r2 jsr pc,maplow sub $'a,r2 cmp r2,$'z-'a bhi 3f mov r3,-(sp) mov r2,r3 mpy $13.,r3 clr r2 clc ror r4 adc r2 add r3,r4 add (r5)+,r4 movb (r4),r4 tst r2 bne 1f asr r4 asr r4 asr r4 asr r4 1: bic $!17,r4 mov r4,r3 mpy (sp)+,r3 br e 2f dec nhyph bne 5f tst nwd beq 6f 5: tst nel ble 2f 6: cmpb -1(r3),$'- beq 3f movb $'-,(r3) dec nel inc ne br 3f 2: dec nc tstb (r3) beq 1b jsr pc,width sub r1,ne add r1,nel inc wch dec r4 add r1,wne br 1b 3: inc nwd 4: mov r4,wordp bicb $!177,(r4) cmp r4,$word bge 4f 4 4: tst (sp)+ sez rts pc topbot: mov pl,r0 bne 1f clr bl rts pc 1: sub ma3,r0 sub ma4,r0 sub hx,r0 mov r0,bl mov ma1,r0 add ma2,r0 add hx,r0 cmp r0,bl blt 1f mov $2,r0 mov r0,ma1 mov r0,ma2 e jsr pc,donum mov un,r0 jsr pc,space jsr pc,jfo mov $line,r2 1: movb (r2)+,r0 cmp $' ,r0 bne 2f jsr pc,fill tst nc bne 1b br 3f 2: jsr pc,putchar dec nc bgt 1b 3: jsr pc,newline clr nwd clr ne mov in,un 4: jsr pc,setnel rts pc jfo: tst jfomod beq 1f mov fac,r0 add fmq,r0 beq 1f clr fac clr fmq mov nel,r0 cmp jfomod,$1 bne 2f asr r0 2: jsr pc,space 1: rts pc donum: tst numbmod beq 2f dec nn blt 1f mov $5,r0 add ni,r0 jsr pc,space rts pc 1: clr r0 cmp lnumber,$104f 3: clr r3 tst (r5)+ 4: mov (sp)+,r4 rts r5 suffix: mov hstart,r0 jsr pc,alph bne 4f jsr pc,maplow sub $'a,r2 asl r2 mov suftab(r2),-(sp) bic $!37777,(sp) beq 3f 1: mov hstart,r0 mov (sp),r1 jsr pc,rdsuf movb (r1),r3 beq 3f bic $!17,r3 add r3,(sp) add r1,r3 2: movb -(r3),r2 cmp r3,r1 ble 2f bic $!177,r2 mov r2,-(sp) movb -(r0),r2 jsr pc,maplow cmp r2,(sp)+ bne 1b br 2b 2: mov hstart,r0 tst (sp)+ movb (r1),r3 bic $!17,r3 add r1,r3 bitb $200,(r1)+ bne 1f 2: dec r0 cmmov r0,ma3 mov r0,ma4 mov $66.,pl br topbot 1: cmp nl,bl ble 1f mov bl,nl 1: rts pc width: cmp r0,ohc beq 2f tst r0 beq 2f cmp r0,$0177 beq 2f cmp r0,$010 bne 1f mov $-1,r1 rts pc 1: cmp $' ,r0 bgt 2f mov $1,r1 rts pc 2: clr r1 rts pc headin: jsr pc,skipcont mov nextb,r1 mov r1,*(r5)+ jsr pc,gettchar cmp r0,$'\n beq 2f mov r0,r2 1: jsr pc,gettchar cmp r0,$'\n beq 2f cmp r0,r2 bne 3f clr r0 3: jsr pc,wbf br 1b 2: clr r0 jsr pc,wbf mov r1,nextb mov ll,llh rts r5 h0. bge 1f inc r0 cmp lnumber,$10. bge 1f inc r0 1: add ni,r0 jsr pc,space mov lnumber,r0 jsr r5,decimal; putchar mov $2,r0 jsr pc,space inc lnumber 2: rts pc newline: mov $'\n,r0 jsr pc,putchar inc nl rts pc nline: mov nl,r0 beq 1f cmp r0,bl beq 1f jsr pc,newline 1: rts pc number: jsr pc,skipcont number1: mov r1,-(sp) mov r3,-(sp) clr r3 clr -(sp) clr -(sp) 1: jsr pc,getchar cmp r0,$'+ beq 2f cmp r0,$'- beq 2f sub $'0,r0 cmp r0,$9. bhi 3f inc (sp) mpy $10.,r3 add r0,r3 br 1b 2: mov r0,2(sp) br 1b 3: add $'0,r0 mov r0,ch mov (sp)+,r0 bne 1f mov $1,r3 mov r3,r0 1: mov (r5)+,r0 beq 1f mov (r0),r0 1: mov (sp)+,r1 cmp r1,$'- bne 1f sub r3,r0 br 2f 1: cmp r1,$'+ bne 1f add r3,r0 br 2f 1: mov r3,r0 2: mov (sp)+,r3 mov (sp)+,r1 rts r5 eject: tst pl beq 1f tst nl beq 1f mov pl,r0 sub nl,r0 sub ma4,r0 sub hx,r0 jsr r5,nlines; newline bit $1,pn bne 2f jsr r5,headout; efoot br 3f 2: jsr r5,headout; ofoot 3: cmp numbmod,$1 bne 3f mov $1c caseli: jsr r5,number; 0 mov r0,-(sp) 1: dec (sp) blt 1f jsr pc,flushi clr nlflg jsr pc,text br 1b 1: tst (sp)+ rts pc casell: jsr r5,number; ll jsr pc,min mov r0,ll rts pc casels: jsr pc,rbreak jsr pc,skipcont jsr pc,getchar cmp r0,$'\n bne 1f mov ls1,ls rts pc 1: mov r0,ch jsr r5,number1; ls dec r0 jsr pc,min inc r0 mov r0,ls mov r0,ls1 rts pc casena: jsr pc,rbreak clr ad rts pc casene: jsr r5,number; 0 jsr pc,min jsr pc,need rts pc casenf: jsr pc,rbreak clr f/ / / roff1 -- text formatter .globl ttyn nop = 000240 signal = 48. ibuf: /init code in ibuf+obuf cmp sp,$end bhi 1f jsr r5,string; emes1 sys exit 1: clr r0 jsr pc,mesg sys signal; 1; place sys signal; 2; place jsr pc,makebf sys open; suffil; 0 bes 1f mov r0,suff sys seek; 20; 0 bes 1f mov suff,r0 sys read; suftab; 2*26. 1: clr r0 mov (sp)+,argc dec argc bne 1f jmp place 1: tst (sp)+ mov (sp),r4 cmpb (r4)+,$'+ bne 2f jsr r5,pnum; pfrom br 3f 2: cmpb -1(r4),$'- bne 2f cmpb,lnumber 3: mov ma4,r0 jsr r5,nlines; newline clr nl inc pn 1: cmp pn,pto ble 1f jsr pc,flush jmp place 1: istop: tst stop beq 2f cmp pn,pfrom blo 2f jsr pc,flush / mov sp,r1 / sys signal; 2; 1f clr r0 sys read; garb; 1 1: / mov r1,sp / sys signal; 2; place 2: rts pc storeline: cmp linep,$line+linsiz bhis 1f movb r0,*linep inc linep jsr pc,width add r1,ne sub r1,nel inc nc 1: rts pc getword: mov $word,r2 clr wne clr wch clr nhyph clr hypedf mov $word,wordp clr -(sp) 1: jsi rts pc casepa: casebp: jsr pc,rbreak jsr pc,eject jsr pc,skipcont tst nlflg bne 1f jsr r5,number; pn jsr pc,min mov r0,pn 1: rts pc casebl: jsr pc,rbreak jsr r5,number; 0 jsr pc,min mov r0,-(sp) jsr pc,need2 1: dec (sp) blt 1f mov $' ,r0 jsr pc,storeline jsr pc,rbreak br 1b 1: tst (sp)+ rts pc casepl: jsr r5,number; pl mov r0,pl jsr pc,topbot rts pc casesk: jsr r5,number; 0 jsr pc,min mov r0,skip rts pc casesp: jsr pc,rbreak jsr r5,number; 0 jsr r5,nlines; nline rts (r4),$'s bne 0f inc stop br 3f 0: cmpb (r4),$'h bne 0f clr slow br 3f 0: jsr r5,pnum; pto 3: dec argc bgt 1b 2: mov $nop,get1a mov $ibuf,ibufp mov $ibuf,eibuf mov sp,argp jsr pc,topbot clr r0 1: movb r0,trtab(r0) inc r0 cmp r0,$128. bne 1b jsr pc,rbreak jsr pc,istop jmp loop makebf: sys stat; bfn; stbuf bec 2f sys creat; bfn; 400 bec 1f 2: incb bfn+8 cmpb bfn+8,$'z blos makebf jmp place 1: mov r0,ibf sys write; sufbuf;128. sys open; bfn;0 mov r0,ibf1 rts pc string: movr pc,gettchar cmp r0,$'\n beq 3f cmp r0,ohc bne 2f inc hypedf br 1b 2: cmp $' ,r0 bne 2f jsr pc,storeword br 1b 2: mov r0,-(sp) mov $' ,r0 jsr pc,storeword tst spaceflg beq 2f jsr pc,storeword clr spaceflg 2: mov (sp)+,r0 2: jsr pc,storeword bisb (sp),-1(r2) /add in hyphen clr (sp) jsr pc,gettchar cmp r0,ohc bne 1f inc hypedf jsr pc,gettchar mov $200,(sp) 1: cmp $' ,r0 beq 1f cmp $'\n,r0 bne 2b cmpb -1(r2),$'. bne 1f inc spaceflg 1: add $2,2(sp) 1: clrb (r2)+ 3: tst (sp) pc casess: jsr pc,rbreak mov $1,ls rts pc casetr: jsr pc,skipcont 1: jsr pc,getchar cmp r0,$'\n beq 1f mov r0,r1 jsr pc,getchar cmp r0,$'\n bne 2f mov $' ,r0 2: movb r0,trtab(r1) br 1b 1: rts pc caseta: mov $tabtab,r1 1: jsr r5,number; 0 jsr pc,min dec r0 ble 1f movb r0,(r1)+ br 1b 1: clrb (r1)+ rts pc caseti: jsr pc,rbreak jsr r5,number; in jsr pc,min mov r0,un rts pc caseul: jsr r5,number; 0 jsr pc,min mov r0,ul rts pc caseun: jsr r5,number; 0 sub in,r0 neg r0 j (r5)+,r1 mov r1,r2 mov r1,0f 1: tstb (r1)+ bne 1b sub r2,r1 mov r1,1f mov $1,r0 sys write; 0:..; 1:.. rts r5 emes1: xxx: .even obuf=ibuf+512. .=ibuf+1024. loop: clr nlflg jsr pc,getchar cmpb r0,cc beq 2f movb r0,ch jsr pc,text br loop 2: jsr pc,control jsr pc,flushi br loop mesg: tst r0 bne setsame jsr pc,ttyn movb r0,ttyx+8. sys stat; ttyx; stbuf mov stbuf+4,0f mov 0f,1f bic $22,0f sys chmod; ttyx; 0:.. rts pc setsame: sys chmod; ttyx; 1:.. rts pc pn+ mov $word,wordp tst nc bne 1f jsr pc,setnel 1: rts pc setnel: mov $line,linep mov ll,nel sub un,nel clr ne clr fac clr fmq rts pc storeword: jsr pc,width add r1,wne inc wch movb r0,(r2)+ rts pc need: mov r0,r3 mpy ls,r3 mov r3,r0 need2: add nl,r0 cmp r0,bl ble 1f jsr pc,eject 1: rts pc min: tst r0 bge 1f clr r0 1: rts pc getname: mov r1,-(sp) mov r2,-(sp) mov (r5)+,r1 mov $18.,r2 1: jsr pc,getchar cmp r0,$041 blt 2f cmp r0,$0176 ble 4f 2: mov r0,ch 3: clrb (r1)sr pc,min mov r0,un rts pc casehx: tst hx beq 1f clr hx br 2f 1: inc hx 2: jsr pc,topbot rts pc casehe: jsr r5,headin; ehead mov ehead,ohead rts pc casefo: jsr r5,headin; efoot mov efoot,ofoot rts pc caseeh: jsr r5,headin; ehead rts pc caseoh: jsr r5,headin; ohead rts pc caseef: jsr r5,headin; efoot rts pc caseof: jsr r5,headin; ofoot rts pc casem1: jsr r5,number; ma1 jsr pc,min mov r0,ma1 br 1f casem2: jsr r5,number; ma2 jsr pc,min mov r0,ma2 br 1f casem3: jsr r5,nuum: mov r4,ibufp mov $37777,eibuf jsr r5,number1; 0 mov r0,*(r5)+ clr ch rts r5 flushi: clr ch tst nlflg bne 1f jsr pc,getchar br flushi 1: rts pc gettchar: tst ul ble getchar tst ulstate beq 3f tst bsc bgt 1f tst ulc bgt 2f clr ulstate br 3f 1: dec bsc mov $010,r0 rts pc 2: dec ulc mov $'_,r0 rts pc 3: jsr pc,getchar cmp r0,$'0 blt 1f cmp r0,$'9 ble 2f cmp r0,$'A blt 1f cmp r0,$'Z ble 2f cmp r0,$'a blt 1f cmp r0,$'z ble 2f 1: tst ulc bgt 3f rts pc 3: mov $1,ul+ mov (sp)+,r2 mov (sp)+,r1 rts r5 4: movb r0,(r1)+ dec r2 beq 3b br 1b copyb: mov (r1),r1 jsr pc,flushi clr nlflg mov $1,-(sp) 1: jsr pc,getchar cmp r0,$'\n bne 2f mov $1,(sp) clr nlflg br 4f 2: cmp r0,$'. bne 9f cmp (sp),$1 bgt 3f blt 9f inc (sp) br 4f 3: dec r1 clr r0 inc (sp) br 4f 9: clr (sp) 4: tst skp bne 5f jsr pc,wbf 5: cmp (sp),$3 bne 1b tst (sp)+ tst skp bne 6f mov r1,nextb 6: rts pc popi: cmp ilistp,$ilist beq 1f sub $2,ilistp mov *ilistp,ip 1: rts pmber; ma3 jsr pc,min mov r0,ma3 br 1f casem4: jsr r5,number; ma4 jsr pc,min mov r0,ma4 1: jsr pc,topbot rts pc casehc: jsr pc,skipcont jsr pc,getchar cmp r0,$'\n bne 1f movb $200,r0 1: mov r0,ohc rts pc casetc: jsr pc,skipcont jsr pc,getchar cmp r0,$'\n bne 1f mov $' ,r0 1: mov r0,tabc rts pc casehy: jsr r5,number; 0 mov r0,hyf rts pc casen1: jsr pc,rbreak mov $1,numbmod br 1f casen2: jsr pc,rbreak mov $2,numbmod 1: clr nn jsr r5,number; 0 tst r0 ble 1f mov r0,lnumberstate mov r0,ch br gettchar 2: inc bsc inc ulc rts pc getchar: mov ch,r0 beq 1f clr ch rts pc 1: tst nlflg beq 1f mov $'\n,r0 rts pc 1: jsr pc,get1 cmp r0,$'\\ bne 2f jsr pc,get1 jsr r5,switch; esctab br 3f 2: cmp r0,$033 /prefix bne 3f jsr pc,get1 jsr r5,switch; pfxtab 3: cmp r0,$'\n bne 3f inc nlflg clr column 3: mov r1,-(sp) jsr pc,width add r1,column mov (sp)+,r1 rts pc esctab: .byte 'd, 032 /hlf (down) .byte 'u, 035 /hlr (up) .byte 'r, 036 /flr (reverse) c wbf: mov r0,char mov r1,offb mov ibf,r0 sys seek; offb:..;0 mov ibf,r0 sys write; char;1 inc r1 cmp ibf1,ofile bne 1f mov $-1,ofile 1: rts pc rbf: mov ip,r1 mov ibf1,nfile jsr pc,rdsufb tstb r0 bne 2f jsr pc,popi rts pc 2: inc ip rts pc alph: movb (r0),r2 alph2: cmp r2,$'A blo 1f cmp r2,$'Z blos 2f cmp r2,$'a blo 1f cmp r2,$'z bhi 1f 2: sez rts pc 1: clz rts pc rdsufb: mov r1,-(sp) bic $77,r1 cmp r1,sufoff bne 1f cmp nfile,ofile beq 2f 1: mov r1,sufoff mov nfile rts pc 1: clr numbmod rts pc casenn: jsr r5,number; 0 jsr pc,min mov r0,nn rts pc caseni: jsr r5,number; ni jsr pc,min mov r0,ni rts pc casejo: jsr r5,number; 0 mov r0,jfomod rts pc casear: clr ro rts pc casero: inc ro rts pc casenx: jsr pc,skipcont jsr r5,getname; nextf inc nx jsr pc,nextfile inc nlflg clr ip mov $ilist,ilistp rts pc casepo: jsr pc,rbreak jsr r5,number; po jsr pc,min mov r0,po rts pc casede: tst ip bne 5f jsr pc,skipcont jsr r5,getname; bname cl .byte 'x, 016 /SO (extra chars) .byte 'y, 017 /SI (normal characters) .byte 'l, 0177 /delete .byte 't, 011 /hor tab .byte 'a, 0100 /at sign .byte 'n, 043 /number sign .byte '\\, 134 /backslash .byte 0, 0 pfxtab: .byte '7, 036 /flr .byte '8, 035 /hlr .byte '9, 032 /hlf .byte '4, 030 /brs .byte '3, 031 /rrs .byte '1, 026 /set hor tabs .byte '2, 027 /clr hor tabs .byte 0,0 pfxtab1: switch: mov r1,-(sp) mov (r5)+,r1 1: cmpb (r1)+,r0 beq 1f tstb (r,ofile mov nfile,r0 sys seek; sufoff: -1; 0 mov nfile,r0 sys read; sufbuf; 512. 2: mov (sp),r0 bic $!77,r0 movb sufbuf(r0),r0 mov (sp)+,r1 rts pc r skp mov $contab,r1 clr -(sp) 1: mov (r1)+,(sp) beq 2f bic $100000,(sp) cmp bname,(sp) bne 3f 2: bis $100000,bname mov nextb,(r1) mov bname,-(r1) br 4f 3: cmp (r1)+,$-1 bne 1b inc skp 4: tst (r1)+ jsr pc,copyb tst (sp)+ 5: rts pc caseig: inc skp jsr pc,copyb rts pc casemk: jsr pc,rbreak mov $002,r0 /stx jsr pc,putchar rts pc 1)+ bne 1b cmp r1,$pfxtab ble 0f cmp r1,$pfxtab1 bgt 0f mov $037,r0 0: mov (sp)+,r1 rts r5 1: movb (r1)+,r0 mov (sp)+,r1 rts r5 get1: tst nspace ble 1f dec nspace mov tabc,r0 rts pc 1: mov r1,-(sp) 4: tst ip beq 5f jsr pc,rbf br 6f 5: tst nx bne 0f mov ibufp,r1 cmp r1,eibuf bne 3f 0: mov ifile,r0 bne 2f 1: jsr pc,nextfile 2: clr nx sys read; ibuf; 512. bes done tst r0 beq 1b mov $ibuf,r1 add r1,r0 mov r0,eibuf 3: movb (r1)+,r0 mov r1,ibufp 1: cmp r0,$011 /tab bne 6f/ / / roff2 -- runoff casead: jsr pc,rbreak inc ad rts pc rts pc casebr: jsr pc,rbreak rts pc casecc: jsr pc,skipcont jsr pc,getchar cmp r0,$'\n beq 1f movb r0,cc 1: mov r0,ch rts pc casece: jsr pc,rbreak jsr r5,number; 0 jsr pc,min mov r0,ce jsr pc,need rts pc caseds: jsr pc,rbreak mov $2,ls rts pc casefi: jsr pc,rbreak inc fi rts pc casein: jsr pc,rbreak jsr r5,number; in jsr pc,min mov r0,in mov r0,un rts pc caseix: jsr r5,number; in jsr pc,min mov r0,in rts p   #&), mov (sp)+,r1 mov $tabtab,r0 inc nspace 1: tstb (r0) beq get1 cmpb column,(r0)+ bge 1b movb -(r0),nspace sub column,nspace br get1 6: get1a: br 7f tst r0 beq 4b 7: mov (sp)+,r1 rts pc nextfile: mov ifile,r0 beq 1f sys close 1: tst nx beq 2f mov $nextf,0f br 3f 2: dec argc blt done mov *argp,0f add $2,argp 3: sys open; 0:..; 0 bes done mov r0,ifile rts pc done: jsr pc,rbreak jsr pc,eject jsr pc,flush place: sys signal; 2; 1 mov $1,r0 jsr pc,mesg sys unlink; bfn sys exit rts pc putchar: cmp pn,pfrom blt 2f clr pfrom bic $!177,r0 beq 2f movb trtab(r0),r0 cmp r0,$' bne 1f inc nsp 2: rts pc 1: cmp r0,$'\n bne 1f clr nsp clr ocol br 2f 1: tst nsp beq 2f tst slow bne 4f jsr pc,dsp cmp nsp,r1 blt 4f mov $011,3f+2 cmp r1,$1 bgt 8f mov $040,3f+2 dec nsp br 9f 8: sub r1,nsp 9: mov r0,-(sp) 3: mov $011,r0 jsr pc,pchar1 mov (sp)+,r0 br 1b 4: mov r0,-(sp) mov $' ,r0 jsr pc,pchar1 mov (sp)+,r0 dec nsp bne 4b 2: cmp r0,$026 blt 2f cmp r0,$0ip/p/coll; skip/q/coll; skip/r/coll; skip/s/coll; skip/t/coll; skip/u/coll; skip/v/coll; skip/w/coll; skip/x/coll; skip/y/coll; skip/z/coll; skip/A/coll; skip/B/coll; skip/C/coll; skip/D/coll; skip/E/coll; skip/F/coll; skip/G/coll; skip/H/coll; skip/I/coll; skip/J/coll; skip/K/coll; skip/L/coll; skip/M/coll; skip/N/coll; skip/O/coll; skip/P/coll; skip/Q/coll; skip/R/coll; skip/S/coll; skip/T/coll; skip/U/coll; skip/V/coll; skip/W/coll; skip/X/coll; skip/Y/coll; skip/Z/coll; skip/0/sk2; skip/1/sk2; skip/2/skaxdig: .=.+2 maxloc: .=.+2 hstart: .=.+2 nhstart: .=.+2 nhyph: .=.+2 argc: .=.+2 argp: .=.+2 ibufp: .=.+2 xbufp: .=.+2 xbuf: .=.+514. eibuf: .=.+2 xeibuf: .=.+2 ulstate: .=.+2 ulc: .=.+2 bsc: .=.+2 nsp: .=.+2 ro: .=.+2 pfrom: .=.+2 onesp: .=.+2 fivesp: .=.+2 suff: .=.+2 sufb: .=.+20. sufbuf: .=.+128. suftab: .=2*26.+. ifile: .=.+2 char: .=.+2 nfile: .=.+2 headp: .=.+2 trtab: .=.+128. blocksize: .=.+2 enda: .=.+2 ybuf: cbuf: .=.+34. ilist: stk: .=.+60. end: 37 beq 3f bgt 2f mov r0,-(sp) jsr r5, switch; unpfx cmp (sp)+,r0 beq 2f mov r0,-(sp) mov $033,r0 /prefix jsr pc,pchar1 dec ocol mov (sp)+,r0 2: pchar1: cmp r0,$011 bne 1f jsr pc,dsp br 2f 1: jsr pc,width 2: add r1,ocol movb r0,*obufp inc obufp cmp obufp,$obuf+128. beq flush 3: rts pc dsp: clr r1 1: add $8.,r1 cmp ocol,r1 bgt 1b sub ocol,r1 bne 2f mov $8.,r1 2: rts pc unpfx: .byte 032, '9 .byte 035, '8 .byte 036, '7 .byte 031, '3 .byte 030, '4 .byte 026, '12; skip/3/sk2; skip/4/sk2; skip/5/sk2; skip/6/sk2; skip/7/sk2; skip/8/sk2; skip/9/sk2; skip2/a/cont; skip2/b/cont; skip2/c/cont; skip2/d/cont; skip2/e/cont; skip2/f/cont; skip2/g/cont; skip2/h/cont; skip2/i/cont; skip2/j/cont; skip2/k/cont; skip2/l/cont; skip2/m/cont; skip2/n/cont; skip2/o/cont; skip2/p/cont; skip2/q/cont; skip2/r/cont; skip2/s/cont; skip2/t/cont; skip2/u/cont; skip2/v/cont; skip2/w/cont; skip2/x/cont; skip2/y/cont; skip2/z/cont; skip2/A/cont; skip2/B/cont; skip2/C/cont; skip2/D/cont; skip2(+.1478;> .byte 027, '2 .byte 0,0 flush: mov obufp,r0 sub $obuf,r0 mov r0,0f mov $1,r0 sys write; obuf; 0:0 mov $obuf,obufp rts pc control: jsr pc,getchar mov r0,-(sp) jsr pc,getchar swab r0 bis (sp),r0 mov $contab,r1 1: mov (r1)+,(sp) bic $100000,(sp) cmp r0,(sp) bne 4f mov (r1),(sp) tst -(r1) bpl 3f jsr pc,flushi cmp ilistp,$iliste bgt 5f mov ip,*ilistp add $2,ilistp mov (sp),ip br 5f 3: jmp *(sp)+ 4: cmp (r1)+,$-1 bne 1b 5: tst (sp)+ rts pc contab: ; casead ;/E/cont; skip2/F/cont; skip2/G/cont; skip2/H/cont; skip2/I/cont; skip2/J/cont; skip2/K/cont; skip2/L/cont; skip2/M/cont; skip2/N/cont; skip2/O/cont; skip2/P/cont; skip2/Q/cont; skip2/R/cont; skip2/S/cont; skip2/T/cont; skip2/U/cont; skip2/V/cont; skip2/W/cont; skip2/X/cont; skip2/Y/cont; skip2/Z/cont; skip2/0/cont; skip2/1/cont; skip2/2/cont; skip2/3/cont; skip2/4/cont; skip2/5/cont; skip2/6/cont; skip2/7/cont; skip2/8/cont; skip2/9/cont; skip2/ /out; skip2/\//agobl; / / / hyp1 -- driver hyphen: tst hypedf bne 3f tst hyf beq 3f inc hypedf mov wordp,r0 clr nhyph 1: jsr pc,punct bne 1f inc r0 br 1b 1: jsr pc,alph bne 3f mov r0,wordstart 1: inc r0 jsr pc,alph beq 1b dec r0 mov r0,hstart 1: inc r0 tstb (r0) beq 2f jsr pc,punct bne 3f br 1b 2: mov hstart,wordend jsr pc,exword beq 0f jsr r5,suffix tst exf bne 0f jsr r5,digram 0: bit $4,hyf beq 0f mov wordend,r0 bicb $!177,-1(r0) 0: mov wordstart,r0 bicb $!177,1(r0) bit $10,hyf beq 3f  casebp
; casebr ; casecc ; casece ; caseds ; casefi ; casein ; caseix

  • ; caseli ; casell ; casels ; casena ; casene ; casenf ; casepa ; casebl ; casepl ; casesk ; casesp ; casess ; caseta ; caseti ; casetr
      ; caseul ; caseun ; casehe ; casehx ; casefo ; caseeh ; caseoh ; caseef ; caseof ;/ / / nroff8 .data nexth: hbuf outid: 1 init: 1 slow: 1 nflush: 0 nev: 2 ev: 0 nextb: .=.+2 evp: elist pto: 9999. po: 0 po1: 0 npn: 0 pl: 66. obufp: obuf wbufp: wbuf thresh: 240 suffil: ones: fives: cones: cfives: ttyx: tmfile: bfn: bfn1: /indf: .even ttyid: 0 ttyod: 2 ilistp: frame: stk nxf: stk+12. dolc: 020 tch: 024 ifp: ifl namesiz = 88. bname: nextf: nextf1: .=nextf+namesiz ename: . bicb $!177,2(r0) 3: rts pc casehw: jsr pc,skipcont bne 2f mov nexth,r1 cmp r1,$ehbuf-2 bhis 3f 1: jsr pc,getchar bmi 1f cmpb r0,$' / beq 4f cmpb r0,$012 beq 1f movb r0,(r1)+ cmp r1,$ehbuf-2 blo 1b br 3f 1: clrb (r1)+ mov r1,nexth clrb (r1)+ 2: rts pc 3: jsr r5,string;hmess clrb *nexth br 2b 4: jsr pc,1b br casehw hmess: .even exword: clr exf clr -(sp) mov r1,-(sp) mov r2,-(sp) mov r3,-(sp) mov r4,-(sp) mov $hbuf,r2 mov hstart,r0 cmpb (r0) casem1 ; casem2 ; casem3 ; casem4 ; casehc ; casehy ; casen1 ; casen2 ; casenn ; caseni ; casejo ; casear ; casero ; casenx ; casepo ; casede ; caseig ; casetc ; casemk bnames: .=.+100. -1; -1 =.+2 fc: 004 block: /environment block totout: .=.+2 ls: 1 ls1: 1 ll: 65. ll1: 65. llh: 65. llh1: 65. ad: 1 nms: 1 ndf: 1 fi: 1 cc: '. c2: '' ohc: 200 hyf: 1 hypedf: 0 un1: -1 tabc: 014 dotc: '. numc: 034 tabtab: 8.;16.;24.;32.;40.;48.;56.;64.;72. 80.;88.;96.;104.;112.;120.;128.;136.;144.;152.;160. .=.+44. .even etabtab: fac: .=.+2 fmq: .=.+2 ne: .=.+2 nel: .=.+2 lastl: 0 jfomod: .=.+2 wordp: .=.+2 spaceflg: .=.+2 linep: .=.+2 wordend: .=.+2 wordstart: .=.+2 wne: .=.+2 nc: .=.+2 nb: .=.+2 lnumber: .=.+2+,(r0)+ 0: mov r2,8(sp) mov wordstart,r1 tstb (r2) beq 4f 1: movb (r2)+,r4 cmpb r4,$'- beq 1b movb (r1)+,r3 / tstb r3 / bne 2f cmp r1,r0 blo 2f tstb r4 beq 3f 2: tstb r4 bne 2f / tstb (r1) tstb -1(r0) bne 2f cmpb r3,$'s beq 3f 2: tstb r4 beq 0b / tstb r3 / beq 2f cmp r1,r0 bhis 2f cmpb r4,r3 beq 1b 2: tstb (r2)+ bne 2b br 0b 3: mov wordstart,r1 mov 8(sp),r2 clr 8(sp) inc exf 1: tstb (r1)+ cmpb (r2)+,$'- bne 0f bisb $200,-1(r1) tstb (r2)+ 0: tstb (r2) bne 1b 4: mov (sp)skip collect save skip2 sk cont coll save out asym agobl csym cgobl incl decl sk2 sk collect/'/agobl; collect/"/agobl; collect/ /should be more .even maplow: cmp r2,$'a bhis 1f add $'a-'A,r2 1: rts pc vowel: cmpb r2,$'a beq 1f cmpb r2,$'e beq 1f cmpb r2,$'i beq 1f cmpb r2,$'o beq 1f cmpb r2,$'u beq 1f cmpb r2,$'y beq 1f cmpb r2,$'A beq 1f cmllect/u/cont; collect/v/cont; collect/w/cont; collect/x/cont; collect/y/cont; collect/z/cont; collect/A/cont; collect/B/cont; collect/C/cont; collect/D/cont; collect/E/cont; collect/F/cont; collect/G/cont; collect/H/cont; collect/I/cont; collect/J/cont; collect/K/cont; collect/L/cont; collect/M/cont; collect/N/cont; collect/O/cont; collect/P/cont; collect/Q/cont; collect/R/cont; collect/S/cont; collect/T/cont; collect/U/cont; collect/V/cont; collect/W/cont; collect/X/cont; collect/Y/cont; collect/Z/cont; cod: .=.+2 raw: .=.+2 raw1: .=.+2 xpc: .=.+2 copyf: .=.+2 aplnk: .=.+2 apptr: .=.+2 app: .=.+2 blist: .=.+512. eblist: .=.+2 diflg: .=.+2 ditf: .=.+2 first: .=.+2 macerr: .=.+2 numerr: .=.+2 newptr: .=.+2 oldptr: .=.+2 rbuf: .=.+256. wbuf: .=.+256. wbufe: .=.+2 mflg: .=.+2 iflg: .=.+2 pendnf: .=.+2 over: .=.+2 temp: .=.+2 nfo: .=.+2 ds: .=.+2 markline: .=.+2 litlev: .=.+2 lit: .=.+2 ioff: .=.+2 ifl: .=.+8. ifle: .=.+2 offl: .=.+10. noset: .=.+2 quote: .=.+2 x.5: .=.+2 /index: .=.+2 stdi: .=.+2 /indid: .=.+2 spb r2,$'E beq 1f cmpb r2,$'I beq 1f cmpb r2,$'O beq 1f cmpb r2,$'U beq 1f cmpb r2,$'Y 1: rts pc checkvow: mov r0,-(sp) 1: movb -(r0),r2 jsr pc,vowel beq 1f jsr pc,alph beq 1b mov (sp)+,r0 clz rts r5 1: mov (sp)+,r0 sez rts r5 / hyp2 -- suffix and digram digram: mov hstart,r0 1: jsr pc,alph bne 3f jsr pc,vowel beq 1f dec r0 br 1b 1: mov r0,hstart 1: movb -(r0),r2 jsr pc,alph2 bne 3f jsr pc,vowel bne 1b clr maxdig mov r0,nhstart 1: mov $1,r3 movb -1(r0),r2 jsr pc,alphllect/1/cont; collect/2/cont; collect/3/cont; collect/4/cont; collect/5/cont; collect/6/cont; collect/7/cont; collect/8/cont; collect/9/cont; collect/0/cont; collect/./cont; collect/_/cont; collect/ /out; skip/'/agobl; skip/"/agobl; skip/ / .even /numb: / mov r2,-(sp) / mov r3,-(sp) / mov *(r5)+,r3 / mov r0,r1 / jsr pc,numb1 / r5,checkvow bne 4f bisb $200,(r0) br 2b 2: bitb $40,-(r1) bne 4f jsr pc,exword bne suffix br 4f / beq suffix / br 4f 3: tst (sp)+ 4: rts r5 rdsuf: mov r0,-(sp) mov suff,nfile mov 4(sp),r1 jsr pc,rdsufb mov $sufb,r2 movb r0,(r2)+ mov r0,r3 bic $!17,r3 1: dec r3 blt 1f inc r1 jsr pc,rdsufb movb r0,(r2)+ br 1b 1: mov $sufb,r1 mov (sp)+,r0 rts pc 77,r0 cmp r0,ohc beq 2f tst r0 beq 2f cmp r0,$0177 beq 2f cmp r0,$010 bne 1f mov $-1,r1 br 3f 1: cmp $' ,r0 bgt 2f mov $1,r1 br 3f 2: clr r1 3: mov (sp)+,r0 rts pc setwd: mov column,-(sp) clr column mov r2,-(sp) clr -(sp) jsr pc,*(r5) mov r0,r2 1: jsr pc,*(r5) bmi 0f cmpb r0,r2 beq 2f 0: tst nlflg bne 2f jsr pc,width add r1,(sp) br 1b 2: mov (sp)+,r0 jsr pc,setn0 mov (sp)+,r2 mov (sp)+,column tst (r5)+ rts r5 header: /headin: clr nls jsr pc,skipcont mov $'',r2 tst  mov (sp)+,r3 / mov (sp)+,r2 / rts r5 /numb1: / clr r2 / dvd $10.,r2 / mov r3,-(sp) / mov r2,r3 / beq 1f / jsr pc,numb1 /1: / add $'0,(sp) / mov (sp)+,char / mov r1,r0 / sys write; char; 1 / rts pc setstr: clr -(sp) clr -(sp) 0: jsr pc,get1 bmi 3f bic $!177,r0 cmpb r0,$'\\ bne 1f 4: jsr pc,get1 jsr r5,switch;esctab cmpb r0,dolc bne 2f jsr pc,seta br 0b 2: cmpb r0,numc bne 1f clr r1 jsr pc,setn br 0b 1: tst 2(sp) bne 5f bic $!177,r0 cmpb r0,$'( bne 1f inc 2(sp) jsr pc,get1 bic $!17DGJM9<?BEHKN:=@CFILop beq 1f jsr pc,wbfl 1: jsr pc,alloc bne 0f rts pc 0: mov nextb,r1 2: mov r1,headp jsr pc,getchar bmi 3f cmpb r0,$'\n beq 2f mov r0,r2 1: jsr pc,getchar bmi 3f cmpb r0,$'\n beq 2f 0: cmpb r0,r2 bne 3f mov $004,r0 3: jsr pc,wbf br 1b 2: mov $004,r0 jsr pc,wbf mov $004,r0 jsr pc,wbf clr r0 jsr pc,wbt /headout: clr -(sp) mov headp,r2 jsr r5,headseg; width mov r0,-(sp) jsr r5,headseg; width mov r0,-(sp) jsr r5,headseg; width mov r0,-(sp) tst op bne 1f mov po,r0 jsr pc,sp7,r0 cmpb r0,$'\\ beq 4b 5: mov r0,-(sp) jsr pc,get1 bic $!177,r0 swab r0 bis (sp)+,r0 1: mov $contab,r1 1: mov (r1)+,(sp) bic $100000,(sp) cmp r0,(sp) beq 2f cmp (r1)+,$-1 bne 1b br 3f 2: mov (r1),(sp) tst -(r1) bpl 3f clr *nxf jsr pc,pushi mov (sp),ip 3: cmp (sp)+,(sp)+ rts pc copys: inc copyf jsr pc,skipcont bne 2f jsr pc,getchar bmi 0f cmpb r0,$'" bne 0f 1: jsr pc,getchar tst nlflg bne 2f 0: jsr pc,wbf br 1b 2: clr r0 jsr pc,wbt clr copyf rts pc setrpt: inc copy/ / / nroff4 text: inc nflush cmp nl,$-1 bne 0f jsr pc,newln1 rts pc 0: clr ulstate jsr pc,setnel tst ce bne nofill tst fi beq nofill tst pendw bne 7f tst pendt bne 8f inc pendt tst x bne 0f 1: jsr pc,getchar bmi 1f cmpb r0,$' / beq 3f cmpb r0,tabc bne 1f 3: inc x br 1b 1: tst nlflg bne 6f mov r0,ch tst x beq 2f 0: jsr pc,rbreak tst nc bne 5f tst wch bne 5f add x,un clr x jsr pc,setnel tst trap bne 5f 2: tst x bne 0b tst nlflg beq 2f 6: clr nflush clr x clr ace 1: mov headp,r2 jsr r5,headseg; putchar mov llh,r0 add 6(sp),r0 sub 2(sp),r0 asr r0 sub 4(sp),r0 mov r0,-(sp) tst 4(sp) bne 1f tst 2(sp) beq 2f 1: jsr pc,space 2: jsr r5,headseg; putchar mov llh,r0 sub (sp)+,r0 sub (sp)+,r0 sub (sp)+,r0 sub (sp)+,r0 add (sp)+,r0 tst -10(sp) beq 1f jsr pc,space jsr r5,headseg; putchar 1: jsr pc,newline cmp nl,hnl ble 0f mov nl,hnl 0: mov headp,r0 jsr pc,free rts pc headseg: clr -(sp) 1: mov r1,-(sp) mov r2,r1 jsr pc,rbf0 jsr pc,incofff inc raw1 jsr pc,get1 dec copyf dec raw1 mov r0,r1 jsr pc,get1 cmpb r0,$006 beq 1f 0: movb r0,rchar movb r1,nspace cmpb r1,$377 bne 1f clr nspace 1: rts pc setfield: clr npad mov r1,-(sp) mov r2,-(sp) mov r3,-(sp) mov r4,-(sp) clr r4 clr -(sp) jsr pc,width sub r1,column /start mov column,-(sp) mov $tabtab,r0 1: tst (r0) beq 4f cmp (sp),(r0)+ bge 1b mov -(r0),2(sp) sub (sp),2(sp) /h mov $fbuf,r2 1: jsr pc,getch1 bmi 0f cmpb r0,padc bne 2f jsr pc,width sub r1,column inpendt clr ch mov $1,r0 jsr pc,casesp1 rts pc 8: tst x bne 0b 2: tst spread bne 1f tst pendw bne 0f tst wch bne 3f 0: 7: jsr pc,getword br 4f 3: jsr pc,movword bne 2b tst nlflg beq 1f clr pendt 1: jsr pc,adjust tst trap beq 2b tst nlflg beq 5f 4: clr pendt tst pendw bne 5f dec ul bge 5f clr ul 5: clr nflush rts pc nofill: tst pendnf bne 1f clr over jsr pc,rbreak tst trap bne 3f tst nlflg bne 6b clr fac clr fmq mov $1000,nwd 1: jsr pc,gettchar bmi 0f cmpb r0,$'\ mov r1,r2 mov (sp)+,r1 tst r0 beq 1f bmi 0f cmpb r0,$004 beq 1f cmpb r0,$'% beq 2f 0: jsr pc,*(r5) add r1,(sp) br 1b 2: mov $'%,r0 jsr pc,findr mov [flist-vlist](r1),nform mov pn,r0 clr r1 jsr pc,fnumb add r1,(sp) br 1b 1: mov (sp)+,r0 tst (r5)+ rts r5 space: jsr r5,nlines;putchar rts pc nlines: mov r0,-(sp) 1: dec (sp) blt 1f mov $' ,r0 jsr pc,*(r5) br 1b 1: cmp (r5)+,(sp)+ rts r5 decimal: jsr pc,decml tst (r5)+ rts r5 decml: mov r2,-(sp) mov r3,-(sp) jsr pc,decmc npad mov r2,-(sp) add $2,r2 2: cmpb r0,fc beq 3f cmpb r0,$'\n bne 0f mov $012,r4 clr nlflg br 3f 0: movb r0,(r2)+ cmp r2,$efbuf-6 blo 1b 3: tst npad bne 0f inc npad mov r2,-(sp) add $3,r2 0: movb r4,(r2)+ clrb (r2)+ jsr pc,width sub r1,column mov npad,r1 asl r1 add sp,r1 mov (r1),-(sp) sub column,(r1) /-s mov (sp)+,column add 2(r1),(r1) /h-s mov (r1),r1 mov r1,r2 sxt r0 div npad,r0 mov $014,r3 /unpaddable sp tst r2 bpl 1f neg r0 neg r1 mov $010,r3 1: mov (sp)+,r2 mon beq 1f cmpb r0,ohc beq 1b cmpb r0,$005 beq 4f 0: jsr pc,storeline br 1b 1: tst ce ble 2f dec ce mov nel,r0 asr r0 bpl 1f clr r0 1: add r0,un 2: tst nc bne 0f mov $037,r0 jsr pc,storeline 0: jsr pc,rbreak dec ul bpl 3f clr ul 3: clr nflush clr pendnf rts pc 4: inc pendnf clr nflush jsr pc,flushi rts pc adjust: mov r2,-(sp) mov r3,-(sp) clr r2 clr r3 tst ad beq 1f mov nwd,r0 dec r0 ble 1f mov nel,r3 ble 1f dvd r0,r2 1: mov r3,fac mov r2,fmq mov (sp)+,r3 mov (spl1 mov (sp)+,r3 mov (sp)+,r2 rts pc decml1: mov r1,-(sp) clr r2 mov r0,r3 dvd $10.,r2 mov r3,-(sp) mov r2,r0 beq 1f jsr pc,decml1 mov r1,2(sp) 1: mov (sp)+,r0 add $'0,r0 jsr pc,*(r5) add (sp)+,r1 rts pc roman0: jsr pc,roman tst (r5)+ rts r5 roman: tst r0 beq decml mov r2,-(sp) mov r3,-(sp) cmp ro,$2 bne 1f mov $cones,onesp mov $cfives,fivesp br 2f 1: mov $ones,onesp mov $fives,fivesp 2: jsr pc,roman1 mov (sp)+,r3 mov (sp)+,r2 rts pc roman1: clr r2 mov r0,r3 bne .+4 rvb $006,(r2)+ movb r0,(r2)+ movb r3,(r2) tst r1 beq 0f incb -1(r2) dec r1 0: tstb -(r2) bne 0f movb $377,(r2) 0: dec npad bgt 1b mov $fbuf,cp 4: cmp (sp)+,(sp)+ mov (sp)+,r4 mov (sp)+,r3 mov (sp)+,r2 mov (sp)+,r1 rts pc )+,r2 mov $-1,lastl jsr pc,rbreak1 clr spread rts pc fill: mov fmq,r0 1: inc r0 dec nc cmpb (r2)+,$' beq 1b dec r2 bit $1,totout beq 2f inc fac cmp fac,nwd blt 1f inc r0 br 1f 2: dec fac bmi 1f inc r0 1: jsr pc,space movb (r2),r0 rts pc movword: mov wordp,r4 tst nwd bne 2f 1: movb (r4)+,r0 cmp r0,$' bne 1f dec wch jsr pc,width sub r1,wne br 1b 1: dec r4 2: cmp wne,nel ble 1f tst nwd beq 2f cmp nel,$4 blt 1f cmp wch,$5 /don't do 4 char words ble 1f 2: bit $2,hyfts pc mov r1,-(sp) dvd $10.,r2 mov r3,-(sp) mov r2,r0 inc onesp inc fivesp jsr pc,roman1 mov r1,2(sp) dec onesp dec fivesp clr r2 mov (sp)+,r3 dvd $5.,r2 cmp r3,$4 bne 1f movb *onesp,r0 jsr pc,*(r5) add r1,(sp) tst r2 beq 2f inc onesp movb *onesp,r0 dec onesp br 3f 2: movb *fivesp,r0 3: jsr pc,*(r5) add (sp)+,r1 rts pc 1: tst r2 beq 2f movb *fivesp,r0 jsr pc,*(r5) add r1,(sp) 2: dec r3 blt 1f movb *onesp,r0 jsr pc,*(r5) add r1,(sp) br 2b 1: mov (sp)+,r1 rts pc abc0:PSVY\_beQTWZ]`cfRUX[^adgh/ / / nroff3 skipcont: / mov r2,-(sp) 0: jsr pc,getchar / mov r0,r2 / jsr pc,alph2 / beq 0b 1: cmp $' ,r0 bne 1f jsr pc,getchar br 1b 1: / mov (sp)+,r2 mov r0,ch tst nlflg rts pc rbreak: jsr pc,rbreak1 clr totout rts pc rbreak1: clr trap tst nb beq 1f rts pc 1: cmp nl,$-1 bne 1f jsr pc,newln1 rts pc 1: tst nc bne 1f tst pendw bne 4f tst wch beq 4f jsr pc,setnel jsr pc,movword nop 1: clrb *linep clr nls inc totout tst lastl bmi 1f mov ne,lastl br 0f 1: mov ll,lastl 0:  bmi 2b cmpb $' ,r0 beq 1f cmpb $'\n,r0 bne 2b cmpb -1(r2),$'. beq 0f cmpb -1(r2),$'! beq 0f cmpb -1(r2),$'? bne 1f 0: inc spaceflg 1: add $2,4(sp) clrb (r2)+ 3: clr pendw cmp (sp)+,(sp)+ mov $word,wordp jsr pc,setnel / jsr pc,wordout rts pc 6: tst (sp)+ tst (sp)+ beq 7f mov r2,pendw 0: clr nflush jsr pc,flushi rts pc 7: clr wch br 0b setnel: tst nc bne 2f mov $line,linep mov ll,nel tst un1 blt 1f mov un1,un mov $-1,un1 1: sub un,nel clr ne clr fac clr fmq 2: rts pcov r0,ch 3: mov (sp)+,r0 mov (sp)+,r1 tst pc rts pc 4: jsr pc,atoi1 beq 3b add r0,(sp) br 1b 5: jsr pc,atoi1 beq 3b sub r0,(sp) br 1b atoi1: clr -(sp) mov r3,-(sp) clr -(sp) clr r3 jsr pc,getchar cmp r0,$'- bne 2f inc (sp) 1: jsr pc,getchar 2: sub $'0,r0 cmp r0,$9 bhi 1f inc 4(sp) mpy $10.,r3 add r0,r3 br 1b 1: add $'0,r0 mov r0,ch bne 0f mov $' ,ch 0: tst (sp)+ beq 1f neg r3 1: mov r3,r0 mov (sp)+,r3 tst (sp)+ rts pc findt: mov r0,-(sp) mov $-1,-(sp) mov $nlist,rtst op bne 0f mov po,r0 jsr pc,space 0: jsr pc,donum mov un,r0 jsr pc,space jsr pc,jfo mov $line,r2 1: movb (r2)+,r0 cmp $' ,r0 bne 2f jsr pc,fill tst nc bne 1b br 3f 2: jsr pc,putchar dec nc bgt 1b 3: clr nwd clr ne mov in,un jsr pc,setnel jsr pc,newline cmp nl,hnl ble 0f mov nl,hnl 0: tst trap bne 3f mov ls,r2 dec r2 clr r0 jsr pc,findt cmp r1,r2 bgt 1f mov r1,r0 jsr r5,nlines; newline br 3f 1: mov r2,r0 jsr r5,nlines;newline 3: / clr pendb clr spread rts pc 4: js storeword: cmp r2,$eword bhis 1f jsr pc,width add r1,wne inc wch movb r0,(r2)+ rts pc 1: tst over bne 2f jsr r5,stringfl; wordmes 2: inc over rts pc wordmes: .even need: need2: mov r0,-(sp) clr r0 jsr pc,findt cmp (sp)+,r1 ble 1f / mov ilistp,r0 / jsr pc,eject mov r1,r0 clr nls jsr r5,nlines;newline 1: rts pc min: tst r0 bge 1f clr r0 1: rts pc getname: mov r1,-(sp) mov r2,-(sp) mov (r5),r1 mov $namesiz,r2 1: jsr pc,getchar tst nlflg bne 2f cmp r0,$1 1: tst [mlist-nlist](r1) bne 3f 2: tst (r1)+ cmp r1,$nliste ble 1b br 8f 3: mov (r1),r0 tst 2(sp) bmi 6f /- traps beq 4f /all traps tst (r1) /+ traps bmi 2b 4: tst (r1) bpl 5f mov pl,r0 inc r0 add (r1),r0 5: sub nl,r0 ble 2b cmp r0,(sp) bhis 2b mov r0,(sp) br 2b 6: tst (r1) bpl 2b br 4b 8: mov (sp),r1 bpl 9f mov pl,r1 sub nl,r1 9: cmp (sp)+,(sp)+ rts pc findr: mov $rlist,r1 1: tst (r1) beq 2f cmp (r1)+,r0 beq 3f cmp r1,$rliste blos 1b tst numerr bne 0f jsr r5,strr pc,setnel rts pc jfo: tst jfomod beq 1f mov fac,r0 add fmq,r0 beq 1f clr fac clr fmq mov nel,r0 cmp jfomod,$1 bne 2f asr r0 2: jsr pc,space 1: rts pc donum: tst numbmod beq 2f dec nn blt 1f 0: mov $3,r0 add nms,r0 add ni,r0 jsr pc,space rts pc 1: mov lnumber,r1 sxt r0 mov ndf,-(sp) dvd (sp)+,r0 tst r1 beq 1f inc lnumber br 0b 1: clr r0 cmp lnumber,$100. bge 1f inc r0 cmp lnumber,$10. bge 1f inc r0 1: add ni,r0 jsr pc,space mov lnumber,r0 jsr r5,decimal; putchar 040 beq 2f cmp r0,$0176 blos 4f 2: mov r0,ch 3: clrb (r1)+ mov (sp)+,r2 mov (sp)+,r1 tstb *(r5)+ rts r5 4: movb r0,(r1)+ dec r2 beq 3b br 1b copyb: inc copyf jsr pc,flushi clr nlflg clr -(sp) mov $1,-(sp) 1: jsr pc,getchar bmi 9f cmpb r0,$'\n bne 2f mov $1,(sp) clr nlflg br 4f 2: cmpb r0,$'. bne 9f cmp (sp),$1 bgt 3f blt 9f inc (sp) br 4f 3: tst skp bne 0f jsr pc,wbfl mov 2(sp),r1 clr r0 jsr pc,wbt 0: inc (sp) br 5f 9: clr (sp) 4: mov r1,2(sp) tst skp bne 5f jsringfl; 9f 0: inc numerr / clr r1 / rts pc cmp numerr,$1 jeq edone jmp done2 2: mov r0,(r1) br 4f 3: tst -(r1) 4: add $[vlist-rlist],r1 rts pc 9: .even setn0: clr -(sp) clr -(sp) mov $1,nform jbr setn1 setn: mov r1,-(sp) clr -(sp) clr temp jsr pc,get1 cmpb r0,$'+ bne 1f inc (sp) 0: jsr pc,get1 1: cmpb r0,$'\\ bne 1f 3: jsr pc,get1 jsr r5,switch;esctab cmpb r0,dolc bne 1f jsr pc,seta br 0b 1: tst temp bne 2f bic $!177,r0 cmpb r0,$'( bne 1f i mov nms,r0 jsr pc,space inc lnumber 2: rts pc newline: mov $'\n,r0 jsr pc,putchar tst op beq 1f inc dnl rts pc 1: tst x.5 beq 1f mov $032,r0 jsr pc,putchar 1: inc nl cmp nl,pl blo 3f newln1: clr nl clr hnl clr ejf mov $ilist,ejl tst donef beq 2f tst nc bne 1f tst wch bne 1f jmp done1 1: tst ndone jne done1 inc ndone clr donef cmp frame,$stk bne 2f inc nflush 2: inc pn tst npn beq 1f mov npn,pn clr npn 1: cmp pn,pto ble 2f jsr pc,flush jmp place 2: tst stop beq  pc,wbf 5: cmp (sp),$3 bne 1b cmp (sp)+,(sp)+ 6: clr copyf rts pc allocmes: .even alloc: mov r1,-(sp) clr nextb mov $blist,r1 1: tst (r1)+ beq 3f cmp r1,$eblist blo 1b 2: mov (sp)+,r1 tst nextb rts pc 3: mov $-1,-(r1) jsr pc,offset cmp r1,first blo 2b mov r1,nextb br 2b free: mov r1,-(sp) mov r0,r1 beq 2f 1: jsr pc,blistptr tst (r1) beq 2f cmp (r1),$-1 bne 3f clr (r1) 2: mov (sp)+,r1 rts pc 3: mov (r1),-(sp) clr (r1) mov (sp)+,r1 br 1b onc temp jsr pc,get1 2: bic $!177,r0 cmpb r0,$'\\ beq 3b mov r0,-(sp) jsr pc,get1 bic $!177,r0 swab r0 bis (sp)+,r0 1: cmpb 2(sp),$372 beq 5f /exit if called by \k clr nform cmp r0,$".v bne 0f mov ls,r0 br setn1 0: cmp r0,$".p bne 0f mov pl,r0 br setn1 0: cmp r0,$".t bne 0f clr r0 jsr pc,findt mov r1,r0 br setn1 0: cmp r0,$".o bne 0f mov po,r0 br setn1 0: cmp r0,$".l bne 0f mov ll,r0 br setn1 0: cmp r0,$".i bne 0f mov in,r0 br setn1 0: cmp r0,$".$ bne 0f mov *frame,r02f cmp pn,pfrom blo 2f jsr pc,flush / mov sp,r1 / sys signal; 2; 1f mov ttyid,r0 sys read; char; 1 1: / mov r1,sp / sys signal; 2; place 2: / cmp numbmod,$1 / bne 3f / mov $1,lnumber 3: clr trap jsr pc,findnl tst r1 beq 4f mov [mlist-nlist](r1),r0 mov frame,-(sp) jsr pc,cont1 cmp (sp)+,frame beq 4f inc trap / inc nlflg rts pc 4: tst ejf beq 5f cmp ilistp,ejl beq newline 5: rts pc findnl: mov $nlist,r1 1: mov (r1),r0 tst r0 bpl 2f add pl,r0 inc r0 2: cmp nl,r0 beq 4f 3: tst (r1ffset: sub $blist,r1 ash $7,r1 add first,r1 rts pc blistptr: mov r0,-(sp) clr r0 sub first,r1 ashc $-7,r0 bic $1,r1 add $blist,r1 mov (sp)+,r0 rts pc wbt: jsr pc,wbf jsr pc,wbfl rts pc wbf: tst woff bne 0f mov r1,woff mov $wbuf,wbufp 0: mov r0,*wbufp add $2,wbufp add $2,r1 bit $377,r1 bne 2f sub $2,r1 jsr pc,blistptr cmp (r1),$-1 bne 1f jsr pc,wbfl jsr pc,alloc bne 0f jsr r5,stringfl;allocmes jmp done 0: mov nextb,(r1) 1: mov (r1),r1 2: cmp wbufp,$wbufe bhis wbfl rts  br setn1 0: cmp r0,$".x bne 0f mov evp,r0 br setn1 0: cmp r0,$".c bne 0f mov iline,r0 br setn1 0: cmp r0,$".h bne 0f mov hnl,r0 br setn1 0: cmp r0,$".n bne 0f mov lastl,r0 br setn1 0: jsr pc,findr tst r1 beq 5f tst (sp) beq 1f add [inclist-vlist](r1),(r1) 1: mov (r1),r0 mov [flist-vlist](r1),nform setn1: mov r4,-(sp) mov $cbuf,r4 tst r0 bge 1f movb $'-,(r4)+ neg r0 1: jsr r5,fnumb0;wrc clrb (r4) mov (sp)+,r4 mov $cbuf,cp 5: tst (sp)+ mov (sp)+,r1 rts pc wrc: cmp r4,$)+ cmp r1,$nliste bne 1b clr r1 rts pc 4: tst [mlist-nlist](r1) beq 3b rts pc number: jsr pc,skipcont number1: clr -(sp) mov r1,-(sp) mov r3,-(sp) clr r3 clr -(sp) 1: jsr pc,getchar cmp r0,$'+ beq 2f cmp r0,$'- beq 2f mov r0,ch 1: jsr pc,atoi beq 3f mov r0,r3 inc 6(sp) br 3f 2: mov r0,(sp) br 1b 3: tst 6(sp) bne 1f mov $1,r3 1: mov (r5)+,r0 beq 1f mov (r0),r0 1: mov (sp)+,r1 cmp r1,$'- bne 1f sub r3,r0 br 2f 1: cmp r1,$'+ bne 1f add r3,r0 br 2f 1: mov r3,r0 2: movpc wbfl: tst woff beq 0f mov wbufp,9f sub $wbuf,9f beq 0f mov ibf,r0 sys 0;7f .data 7: sys seek; woff:..;0 .text mov ibf,r0 sys 0;7f .data 7: sys write; wbuf; 9:.. .text clr woff mov $-1,roff 0: rts pc rbf: mov ip,r1 jsr pc,rbf0 bne 0f tst app bne 1f jsr pc,popi rts pc 0: jsr pc,incoff 1: mov r1,ip rts pc rbf0: mov r1,-(sp) bic $377,r1 cmp r1,roff beq 1f mov r1,roff mov ibf1,r0 sys 0;7f .data 7: sys seek; roff:-1 ;0 .text mov ibf1,r0 sys read;rbuf;256. tst r0 bne 1f tst (sstk bhis 1f movb r0,(r4)+ 1: rts pc seta: jsr pc,get1 cmp r0,$'\\ bne 1f jsr pc,get1 jsr r5,switch;esctab cmp r0,numc bne 1f clr r1 jsr pc,setn br seta 1: sub $060,r0 ble 2f cmp r0,$9. bgt 2f cmp r0,*frame bgt 2f asl r0 add frame,r0 add $stksiz-2,r0 mov (r0),ap 2: rts pc stksiz = 16. pushi: clr r0 mov enda,-(sp) sub $stksiz,(sp) cmp nxf,(sp)+ blo 0f jsr pc,setbrk beq 2f br pushi 0: mov nxf,r0 tst (r0)+ /nargs mov frame,(r0)+ mov ip,(r0)+ mov nspace,(r0)+ clr nspace  (sp)+,r3 mov (sp)+,r1 tst (sp)+ rts r5 eject: / tst ejf / bne 2f inc ejf mov r0,ejl tst trap bne 2f jsr pc,newline 2: rts pc storeline: cmp linep,$line+linsiz bhis 1f movb r0,*linep inc linep jsr pc,width add r1,ne sub r1,nel inc nc rts pc 1: tst over bne 2f jsr r5,stringfl; linemes 2: inc over rts pc linemes: .even getword: clr -(sp) clr -(sp) mov pendw,r2 bne 5f mov $word,r2 clr over clr wne clr wch clr nhyph clr hypedf mov $word,wordp 1: jsr pc,p)+ sez rts pc 1: mov (sp),r0 bic $!377,r0 mov (sp)+,r1 mov rbuf(r0),r0 rts pc incoff: add $2,r1 bit $377,r1 bne 1f sub $2,r1 jsr pc,blistptr mov (r1),r1 beq 5f cmp $-1,r1 beq 5f 1: rts pc 5: jsr r5,stringfl; badmes jmp place badmes: .even alph: movb (r0),r2 alph2: cmp r2,$'A blo 1f cmp r2,$'Z blos 2f cmp r2,$'a blo 1f cmp r2,$'z bhi 1f 2: sez rts pc 1: clz rts pc rdsufb: mov r1,-(sp) bic $177,r1 cmp r1,sufoff beq 2f mov r1,sufoff mov suf mov rchar,(r0)+ clr rchar mov pendt,(r0)+ mov ap,(r0)+ mov ch,(r0)+ clr ch clr ap clr pendt mov nxf,frame tst *nxf bne 1f add $stksiz,nxf br 2f 1: mov r1,nxf 2: tst r0 rts pc popi: cmp frame,$stk beq 1f mov frame,r0 mov r0,nxf clr (r0)+ mov (r0)+,frame mov (r0)+,ip mov (r0)+,nspace mov (r0)+,rchar mov (r0)+,pendt mov (r0)+,ap mov (r0)+,r0 / cmp frame,litlev / bhis 1f / clr lit 1: rts pc setbrk: tst noset bne 2f mov enda,-(sp) add $516.,(sp) bic $777,(sp) mov (sp)+,0f sygettchar bmi 4f cmpb r0,$'\n bne 0f clr wne clr wch br 3f 0: cmpb r0,ohc bne 2f inc hypedf br 1b 2: cmpb $' ,r0 bne 2f jsr pc,storeword br 1b 2: 4: mov r0,-(sp) mov $' ,r0 / bis chbits,r0 jsr pc,storeword tst spaceflg beq 2f jsr pc,storeword clr spaceflg 2: mov (sp)+,r0 2: tst r0 bmi 0f cmpb r0,$005 beq 6f 0: inc 2(sp) jsr pc,storeword bisb (sp),-1(r2) /add in hyphen clr (sp) 5: jsr pc,gettchar bmi 1f cmpb r0,ohc bne 1f inc hypedf jsr pc,gettchar mov $200,(sp) 1: tst r0f,r0 sys 0;7f .data 7: sys seek; sufoff: -1; 0 .text mov suff,r0 sys read; sufbuf; 128. 2: mov (sp),r0 bic $!177,r0 movb sufbuf(r0),r0 mov (sp)+,r1 rts pc atoi: jsr pc,atoi1 bne 1f rts pc 1: mov r1,-(sp) mov r0,-(sp) 1: jsr pc,getchar cmp r0,$'+ beq 4f cmp r0,$'- beq 5f 2: cmp r0,$'* bne 2f jsr pc,atoi1 beq 3f mov r0,r1 mpy (sp),r1 mov r1,(sp) br 1b 2: cmp r0,$'\/ bne 2f jsr pc,atoi1 beq 3f mov r0,-(sp) mov 2(sp),r1 sxt r0 dvd (sp),r0 mov r0,2(sp) tst (sp)+ br 1b 2: ms 0;7f .data 7: sys break; 0:.. .text bes 1f mov 0b,enda sub $2,enda clz rts pc 1: inc noset 2: sez rts pc collect: inc copyf jsr pc,skipcont clr *nxf mov nxf,r2 add $stksiz,r2 mov r2,r1 add $18.,r1 mov r1,-(sp) mov nxf,-(sp) cmp r1,enda blo 1f jsr pc,setbrk beq 7f 1: clr quote cmp r2,2(sp) beq 9f jsr pc,skipcont tst nlflg bne 9f mov r1,(r2)+ jsr pc,getchar cmp r0,$'" bne 3f inc quote 2: jsr pc,getchar 3: tst nlflg bne 8f tst quote bne 4f cmp r0,$' / beq 8f br 5f 4:  cmp r0,$'" bne 5f jsr pc,getchar cmpb r0,$'" bne 8f 5: movb r0,(r1)+ mov enda,-(sp) sub $4,(sp) cmp r1,(sp)+ blo 2b jsr pc,setbrk beq 6f br 2b 8: mov r0,ch 6: clrb (r1)+ tst nlflg bne 9f tst noset beq 1b 9: mov (sp),nxf sub nxf,r2 sub $stksiz,r2 asr r2 mov r2,*nxf bit $1,r1 beq 7f inc r1 7: clr copyf cmp (sp)+,(sp)+ rts pc ar tst nlflg bne 1f cmpb r0,$'+ bne 0f inc (sp) br 2f 0: cmpb r0,$'- beq 2f cmpb r0,$'0 blo 1b cmpb r0,$'9 bhi 1b 2: mov r0,ch jsr pc,atoi beq 1f jsr pc,min dec r0 ble 1f cmp r1,$tabtab beq 0f tst (sp) bne 3f cmp r0,-2(r1) bgt 0f 3: add -2(r1),r0 0: clr (sp) mov r0,(r1)+ cmp r1,$etabtab blo 1b tst -(r1) 1: tst (sp)+ clr (r1) rts pc caseti: jsr r5,number; in jsr pc,min mov r0,-(sp) jsr pc,rbreak mov (sp)+,un1 jsr pc,setnel rts pc caseul: jsr r5,number; 0 jsr pc,mineq 1f jsr pc,free 1: rts pc caseda: inc app casedi: / inc lgf clr ditf jsr pc,skipcont jsr r5,getname; bname beq 1f tst op bne 3f inc diflg jsr pc,finds beq 3f mov r1,op jsr pc,clrold / mov blss,sblss / mov alss,salss / clr blss / clr alss clr dnl br 3f 1: tst op beq 3f clr r0 jsr pc,pchar1 jsr pc,wbfl / mov sblss,blss / mov salss,alss clr op 3: clr app clr diflg rts pc caseev: jsr pc,skipcont tst nlflg beq 2f cmp evp,$elist ble 5f 1: sub $2,evp mov *evp,-(sp) br 3f 2: jsnqtwz}ilorux{~jmpsvy| mov r0,ul rts pc casetl: jsr pc,header rts pc caselt: jsr pc,skipcont tst nlflg beq 1f mov llh1,r0 br 2f 1: jsr r5,number1; llh jsr pc,min 2: mov llh,llh1 mov r0,llh rts pc casehc: jsr pc,skipcont jsr pc,getchar cmp r0,$'\n bne 1f movb $200,r0 1: mov r0,ohc rts pc casetc: jsr pc,skipcont jsr pc,getchar cmp r0,$'\n bne 1f mov $014,r0 1: mov r0,tabc rts pc caselc: jsr pc,skipcont jsr pc,getchar cmp r0,$'\n bne 1f mov $'.,r0 1: mov r0,dotc rts pc casenc: jsr pc,skipcr pc,atoi beq 6f cmp r0,nev bgt 6f tst r0 blt 6f cmp evp,$eliste bgt 6f mov r0,-(sp) mov ev,*evp add $2,evp 3: cmp (sp),ev beq 4f mov $1024.,r3 mpy ev,r3 mov r3,8f mov $1024.,r3 mpy (sp),r3 mov r3,9f mov ibf,r0 sys 0;7f .data 7: sys seek; 8:.. ; 0 .text mov ibf,r0 sys write; block; 1024. mov ibf1,r0 sys 0;7f .data 7: sys seek; 9:.. ; 0 .text mov blocksize,0f mov ibf1,r0 sys 0;7f .data 7: sys read; block; 0:.. .text 4: mov (sp)+,ev 5: rts pc 6: jsr r5,string;9f rts pc 9: .even caseif: clr -(sp) jsr pc,skipcont jsr pc,getchar cmp r0,$'! bne 1f inc (sp) br 2f 1: mov r0,ch 2: jsr pc,atoi beq 1f tst r0 bgt 5f /true br 6f /false 1: jsr pc,getchar cmp r0,$'e bne 1f bit $1,pn bne 6f br 5f 1: cmp r0,$'o bne 1f bit $1,pn beq 6f br 5f 1: cmpb r0,$'n beq 5f 1: tst (sp)+ rts pc 5: tst (sp) bne 1b 2: clr column jsr pc,getchar bmi 0f cmpb r0,$' / beq 2b 0: mov r0,ch inc nflush br 1b 6: tst (sp) beq 1b br 2b casewh: clr -(sp) js mov r0,c2 2: mov r0,ch tst (sp)+ rts pc casece: jsr r5,number; 0 jsr pc,min mov r0,-(sp) jsr pc,rbreak mov (sp)+,ce rts pc casefi: jsr pc,rbreak inc fi rts pc casein: jsr pc,skipcont tst nlflg beq 1f mov in1,r0 br 2f 1: jsr r5,number1; in jsr pc,min 2: mov r0,-(sp) jsr pc,rbreak mov in,in1 mov (sp)+,in tst nc bne 1f mov in,un jsr pc,setnel 1: rts pc caseli: jsr r5,number; 0 jsr pc,min mov r0,lit mov frame,litlev cmp nl,$-1 bne 0f jsr pc,newln1 0: rts pc casell: jsnt jsr r5,3f; nms jsr pc,skipcont jsr r5,3f; ni rts pc 3: tst nlflg bne 4f jsr pc,atoi beq 4f jsr pc,min mov r0,*(r5) 4: tst (r5)+ rts r5 casenn: jsr r5,number; 0 jsr pc,min mov r0,nn rts pc casear: clr ro rts pc caseroc: mov $2,ro rts pc casero: mov $1,ro rts pc casenx: jsr pc,skipcont jsr r5,getname; nextf inc nx jsr pc,nextfile inc nlflg clr ip clr ap clr nspace clr pendt mov $ilist,ilistp rts pc casepo: jsr pc,skipcont tst nlflg beq 1f mov po1,r0 br 2f 1: jsr r pc,skipcont jsr pc,getchar cmp r0,$'x bne 1f mov $-1,r0 jsr pc,findt add nl,r1 sub dnl,r1 mov r1,r0 br 2f 1: mov r0,ch jsr pc,atoi beq 4f 2: mov r0,(sp) jsr pc,skipcont jsr r5,getname; bname tstb bname bne 1f clr bname 1: mov (sp),r0 jsr pc,findn tst r1 beq 1f mov bname,[mlist-nlist](r1) br 4f 1: mov $mlist,r1 2: tst (r1)+ beq 3f cmp r1,$mliste bgt 4f br 2b 3: mov bname,-2(r1) mov (sp),[nlist-mlist-2](r1) 4: tst (sp)+ rts pc findn: mov $nlist,r1 1: cmp (r1),r0 beq 3f r pc,skipcont tst nlflg beq 1f mov ll1,r0 br 2f 1: jsr r5,number1; ll jsr pc,min 2: mov ll,ll1 mov r0,ll 2: jsr pc,setnel rts pc casels: jsr pc,skipcont tst nlflg beq 1f mov ls1,r0 br 2f 1: jsr r5,number1; ls dec r0 jsr pc,min inc r0 2: mov r0,-(sp) / jsr pc,rbreak mov ls,ls1 mov (sp)+,ls rts pc casens: inc nls rts pc casers: clr nls rts pc casena: clr ad rts pc casene: jsr r5,number; 0 jsr pc,min jsr pc,need2 rts pc casenf: jsr pc,rbreak clr fi rts pc casepn: jsrr5,number1; po jsr pc,min 2: mov r0,-(sp) / jsr pc,rbreak mov po,po1 mov (sp)+,po rts pc caseig: inc skp jsr pc,copyb rts pc casern: / inc lgf jsr pc,skipcont jsr r5,getname;bname beq 2f jsr pc,findmn beq 2f mov oldptr,-(sp) / inc lgf jsr pc,skipcont jsr r5,getname;bname beq 1f jsr pc,findmn jsr pc,clrold mov (sp),r1 tst -(r1) mov (r1),(sp) bic $77777,(sp) mov bname,(r1) bis (sp),(r1) 1: tst (sp)+ 2: rts pc caserm: / inc lgf jsr pc,skipcont jsr r5,getname;bname beq 1f jsr p2: tst (r1)+ cmp r1,$nliste bne 1b clr r1 rts pc 3: tst [mlist-nlist](r1) beq 2b rts pc findm: mov $mlist,r1 1: cmp (r1),bname beq 3f 2: tst (r1)+ cmp r1,$mliste bne 1b clr r1 rts pc 3: sub $[mlist-nlist],r1 rts pc casech: clr -(sp) jsr pc,skipcont jsr pc,atoi beq 2f jsr pc,findn br 3f 2: jsr r5,getname; bname tstb bname beq 1f jsr pc,findm 3: tst r1 beq 1f mov r1,(sp) jsr pc,skipcont jsr pc,atoi beq 2f mov r0,*(sp) 1: tst (sp)+ rts pc 2: jsr pc,getchar tst nlflg bn pc,skipcont bne 1f jsr r5,number1; pn jsr pc,min mov r0,npn 1: rts pc casebp: mov ilistp,-(sp) clr -(sp) jsr pc,skipcont bne 1f jsr r5,number1; pn jsr pc,min mov r0,(sp) 1: jsr pc,rbreak mov (sp)+,r0 beq 0f mov r0,npn 0: bne 2f tst nls bne 3f 2: mov (sp),r0 jsr pc,eject 3: tst (sp)+ rts pc casepl: jsr pc,skipcont tst nlflg bne 1f jsr r5,number1; pl mov r0,pl rts pc 1: mov $66.,pl rts pc casesp: mov pc,-(sp) br 0f casesp1: clr -(sp) 0: mov r0,-(sp) tst nb bne 0f jsr pc,findmn jsr pc,clrold 1: rts pc caseas: inc app caseds: inc ds br casede caseam: inc app casede: tst op beq 1f jsr pc,wbfl 1: / inc lgf jsr pc,skipcont jsr r5,getname; bname bne 1f clr r1 br 6f 1: clr skp jsr pc,finds beq 7f tst ds beq 0f tst skp bne 5f jsr pc,copys br 5f 0: jsr pc,copyb 5: jsr pc,wbfl jsr pc,clrold tst newptr beq 0f bis $100000,bname mov bname,*newptr 0: mov r1,-(sp) mov apptr,r1 beq 0f mov $004,r0 jsr pc,wbt 0: mov (sp)+,r1 6: clr app clr ds rts pce 1b mov *(sp),r0 beq 1b bgt 0f add pl,r0 inc r0 0: sub nl,r0 ble 1b dec r0 ble 1b cmp dnl,r0 bge 0f mov dnl,r0 0: sub r0,*(sp) br 1b casemk: jsr pc,skipcont beq 1f mov nl,markline rts pc 1: jsr r5,getname; bname mov bname,r0 beq 2f jsr pc,findr beq 2f mov nl,(r1) 2: rts pc casetm: inc copyf jsr pc,skipcont mov $bname,r1 1: jsr pc,getchar bmi 1b movb r0,(r1)+ tst nlflg bne 2f cmp r1,$ename blo 1b movb $'\n,-1(r1) 2: clrb (r1) jsr r5,stringfl; bname clr copyf rts pc c,rbreak 0: tst nls bne 2f clr r0 jsr pc,findt tst nb bne 1f tst trap bne 2f 1: tst 2(sp) beq 1f jsr r5,number;0 mov r0,(sp) 1: cmp r1,(sp) bge 1f mov r1,(sp) 1: mov (sp),r0 ble 3f jsr r5,nlines; newline 2: cmp (sp)+,(sp)+ rts pc 3: add nl,r0 cmp (sp)+,(sp)+ br casert1 casert: mov markline,r2 jsr pc,skipcont bne 0f jsr r5,number1;nl casert1: mov r0,r2 0: tst r2 blt 2f cmp r2,nl bge 2f mov nl,r1 mov r2,nl sub r2,r1 mov r1,r2 1: mov $036,r0 jsr pc,putchar dec r2 bgt 1b 7: tst macerr bne 0f jsr r5,stringfl; 8f 0: inc macerr cmp macerr,$1 jeq edone jmp done2 / br 6b 8: .even findmn: mov $contab,r1 1: mov (r1)+,r0 bic $100000,r0 cmp bname,r0 beq 2f cmp (r1)+,$-1 bne 1b clr r1 2: mov r1,oldptr rts pc finds: jsr pc,findmn clr newptr clr apptr clr aplnk tst app beq 0f tst oldptr bne 5f 0: mov $contab,r1 1: tst (r1)+ beq 2f cmp (r1)+,$-1 bne 1b 1: inc skp clr r1 rts pc 2: jsr pc,alloc beq 1b tst oldptr b caserd: jsr pc,skipcont jsr r5,getname; bname tst iflg bne 1f tst quiet bne 2f tstb bname beq 5f jsr r5,string; bname jsr r5,string; 3f 1: jsr pc,collect inc tty jsr pc,pushi beq 6f mov $-1,ip rts pc 2: bic $10,ttym mov ttyid,r0 sys stty; ttys jsr pc,flush 5: jsr r5,string;4f br 1b 6: jmp rdtty2 3: <: \0> 4: <\0> /bell .even caseaf: jsr pc,skipcont bne 3f jsr r5,getname;bname mov bname,r0 beq 3f jsr pc,findr jsr pc,skipcont jsr pc,getchar mov $4f,r2 1: cmpb r0,(r2)+ beq mov $015,r0 jsr pc,putchar 2: rts pc casesv: clr r0 jsr pc,findt jsr r5,number; 0 cmp r1,r0 bge 1f mov r0,sv rts pc 1: jsr r5,nlines; newline rts pc caseos: tst sv beq 2f clr r0 jsr pc,findt cmp r1,sv bge 1f rts pc 1: mov sv,r0 clr sv jsr r5,nlines; newline 2: rts pc casetr: jsr pc,skipcont 1: jsr pc,getchar cmp r0,$'\n beq 1f mov r0,r1 jsr pc,getchar cmp r0,$'\n bne 2f mov $' ,r0 2: movb r0,trtab(r1) br 1b 1: rts pc caseta: clr -(sp) mov $tabtab,r1 1: jsr pc,getchne 3f 4: tst -(r1) bis $100000,bname mov bname,(r1)+ mov nextb,(r1) br 6f 3: tst diflg bne 4b mov nextb,(r1) tst -(r1) mov r1,newptr br 6f 5: tst -(r1) bmi 1f clr app br 0b 1: tst (r1)+ clr oldptr mov ip,-(sp) mov (r1),ip 1: jsr pc,rbf tst r0 bne 1b mov ip,r1 mov r1,apptr tst diflg bne 0f jsr pc,incoff 0: mov r1,nextb mov (sp)+,ip 6: clr app mov nextb,r1 rts pc clrold: mov oldptr,r0 beq 1f mov (r0),-(sp) clr (r0) tst -(r0) bmi 0f clr (sp) 0: clr (r0) mov (sp)+,r0 b 2f inc r2 tstb (r2) bne 1b 2: movb (r2),[flist-vlist](r1) 3: rts pc 4: .byte '1,1 .byte 'i,2 .byte 'I,3 .byte 'a,4 .byte 'A,5 .byte 0,0 casenr: jsr pc,skipcont bne 5f jsr r5,getname; bname mov bname,r0 jsr pc,findr mov r1,0f beq 5f jsr pc,skipcont bne 5f jmp 7f .data 7: jsr r5,number1; 0:.. jmp 8f .text 8: bne 1f clr r0 1: mov r0,*0b jsr pc,skipcont bne 5f jsr pc,atoi beq 5f mov r0,[inclist-vlist](r1) 5: rts pc casefl: jsr pc,rbreak jsr pc,flush rts pc casexh: / tst x.5 / bne 1f inc x.5 rts pc /1: / clr x.5 / rts pc caseso: jsr pc,skipcont tst nlflg bne 1f jsr r5,getname; nextf tstb nextf beq 1f sys open; nextf; 0 bes 1f mov ifp,r1 cmp r1,$ifle bhi 1f mov r0,-(sp) jsr pc,flushi mov ifile,(r1) mov (sp)+,ifile mov ioff,[offl-ifl](r1) add $2,ifp clr ioff inc nx inc nflush tst (r1) bne 1f jsr pc,savebuf 1: rts pc caseeo: clr r0 br 1f caseec: jsr pc,skipcont jsr pc,getchar cmpb r0,$'\n bne 1f movb $'\\,r0 1: movb r0,eschar movb r0,eschar+1 rts p sys creat; 9:bfn; 600 bec 1f 2: incb bfn1+3 cmpb bfn1+3,$'z blos 0b jmp place 1: mov r0,ibf mov $blockend,r0 sub $block,r0 cmp r0,$1024. blos 1f 4 1: mov r0,blocksize clr -(sp) 2: mov ibf,r0 sys write; block; 1024. inc (sp) cmp (sp),nev ble 2b mov (sp)+,r3 mpy $1024.,r3 mov r3,nextb mov r3,first mov ibf,r0 sys close sys open; 7:bfn; 2 jes place mov r0,ibf mov r0,ibf1 cmp $bfn1,7b beq 1f sys unlink; bfn 1: rts pc ctime: sys time sub $18000.,r1 /5hrs for est sbc r0 ashc br 1b 2: cmpb r0,$026 /font indicator bne 2f jsr pc,get1 br 1b 2: cmpb r0,$027 /point size bne 2f jsr pc,eatps br 1b 2: cmpb r0,$021 /spead line bne 2f tst copyf bne 2f inc spread br 1b 2: cmpb r0,$006 /repeat bne 2f jsr pc,setrpt br 1b 2: cmp r0,$'\n bne 3f inc nlflg clr column tst ip bne 3f inc iline 3: mov (sp)+,r1 tst r0 rts pc eatps: jsr pc,get1 cmpb r0,$'+ beq 0f cmpb r0,$'- beq 0f sub $'0,r0 ble 1f cmp r0,$3 bgt 1f 0: jsr pc,get1 1: rts pc .data esctab: .bytec casest: 4 caseem: clr em jsr pc,skipcont bne 1f jsr r5,getname;bname beq 1f mov bname,em 1: rts pc casefc: mov $4,fc mov $' ,padc jsr pc,skipcont bne 1f jsr pc,getchar bmi 1f movb r0,fc jsr pc,skipcont bne 1f mov ch,r0 bmi 1f cmpb r0,fc beq 1f movb r0,padc 1: rts pc casepi: tst toolate bne 1f jsr pc,skipcont jsr r5,getname;bname beq 1f sys 42. /pipe jes place mov r0,pipin mov r1,outid sys fork br 2f jes place mov $1,r0 sys close mov pipin,r0 sys close 1: inc too $-2,r0 div $21600.,r0 inc r0 mov r0,dy / mov r1,fd add $3,r0 mov r0,r1 sxt r0 div $7,r0 inc r1 mov r1,dw 3: mov yr,r1 sxt r0 div $4,r0 mov $28.,ms+2 tst r1 bne 0f mov $29.,ms+2 0: clr r0 1: cmp dy,ms(r0) ble 2f sub ms(r0),dy tst (r0)+ cmp r0,$24. blt 1b inc yr mov yr,r1 br 3b 2: asr r0 inc r0 mov r0,mo rts pc ms: 31.;28.;31.;30.;31.;30.;31.;31.;30.;31.;30.;31. pnum: clr -(sp) clr r3 1: movb (r4)+,r0 sub $'0,r0 cmp r0,$9 bhi 1f inc (sp) mpy $10.,r3 add r0,r3 br 1b 1: '*, 025 /text string .byte 'n, 034 /number char .byte '$, 020 /dollar char eschar: .byte '\\, 134 /backslash .byte 'e, 013 /printable escape char .byte 'f, 026 /font indicator .byte 's, 027 /point size .byte '&, 037 /filler .byte 't, 011 /hor tab .byte '!, 024 /transparent char .byte 'p, 021 /spread line .byte 'c, 005 /interrupted text .byte 'k, 372 /mk hor / 014 hidden tab replacement character .byte ' , 014 /\(space) .byte 'x, 016 /SO (extra chars) .byte 'y, 017 /SI (normal characters) .byte 'late rts pc 2: clr r0 sys close mov pipin,r0 sys 41. /dup mov outid,r0 sys close sys exec;bname;args jsr r5,string;9f sys exit args: bname;0 9: .even  mov r3,r0 tst (sp)+ beq 2f mov r0,*(r5)+ 1: rts r5 2: tst (r5)+ br 1b emes1: .even obuf=ibuf+512. .=ibuf+1024. .text loop: clr nlflg clr nflush clr nb mov ilistp,r1 jsr pc,getch1 mov r0,ch cmp ilistp,r1 beq 1f tst ejf beq 1f cmp ilistp,ejl bhi 1f mov ilistp,ejl inc nflush jsr pc,newline br loop 1: jsr pc,getchar tst pendt bne 0f tst lit ble 1f cmp frame,litlev bhi 1f dec lit br 0f 1: cmpb r0,cc beq 3f cmpb r0,c2 beq 2f cmpb r0,tch beq 4f cmpb r0l, 0177 /delete .byte 'd, 032 /hlf (down) .byte 'u, 035 /hlr (up) .byte 'r, 036 /flr (reverse) .byte 'a, 001 /leader char .byte ':, 003 /lem char .byte '?, 002 /raw trans .byte '", 376 /comment .byte 'w, 030 /width size char .byte 0, 0 .text pfxtab: .byte '7, 036 /flr .byte '8, 035 /hlr .byte '9, 032 /hlf .byte '1, 026 /set hor tabs .byte '2, 027 /clr hor tabs .byte 0,0 pfxtab1: switch: mov r1,-(sp) mov (r5)+,r1 1: cmpb (r1)+,r0 beq 1f tstb (r1)+ bne 1b cmp r1,$pfxtab b,$002 beq 6f 0: movb r0,ch jsr pc,text br loop 4: inc tflg inc copyf 0: jsr pc,getchar mov r0,r5 jsr pc,putchar cmp r5,$'\n bne 0b clr tflg clr copyf br loop 2: inc nb 3: jsr pc,control 5: jsr pc,flushi br loop 6: inc raw jsr pc,get1 movb r0,xpc clr nlflg 0: jsr pc,get1 cmpb r0,xpc beq 7f jsr pc,pchar2 br 0b 7: clr raw jbr loop mesg: tst r0 bne setsame sys stat; ttyx; stbuf mov stbuf+4,0f mov 0f,1f bic $22,0f sys 0;7f .data 7: sys chmod; ttyx; 0:.. .text rts pc setsame:le 0f cmp r1,$pfxtab1 bgt 0f mov $037,r0 0: mov (sp)+,r1 rts r5 1: movb (r1)+,r0 mov (sp)+,r1 rts r5 get1: tst nspace ble 1f dec nspace mov rchar,r0 rts pc 1: mov r1,-(sp) 4: tst cp beq 2f movb *cp,r0 bne 1f clr cp br 4b 1: inc cp br 8f 2: tst ap beq 2f movb *ap,r0 bne 1f clr ap br 4b 1: inc ap br 8f 2: cmp $-1,ip bne 1f jsr pc,rdtty br 8f 1: tst ip beq 5f jsr pc,rbf br 8f 5: tst donef beq 0f jmp done 0: tst nx bne 0f 3: mov ibufp,r1 cmp r1,eibuf bne 3f cmp r1/ / / nroff1 -- text formatter / rts = 104000 signal = 48. nop = 000240 jmp ibuf .data ibuf: /init code in ibuf+obuf cmp sp,$end bhi 1f jsr r5,string; emes1 sys exit 1: clr r0 jsr pc,ttyn cmpb r0,$'x bne 0f inc iflg mov $1,r0 jsr pc,ttyn 0: movb r0,ttyx+8 clr r0 jsr pc,mesg sys open; ttyx; 2 bes 0f mov r0,ttyid mov r0,ttyod 0: mov ttyid,r0 sys gtty; ttys sys signal; 1; place sys signal; 2; place bit $1,r0 beq 0f sys signal; 2; 1 /no deletes sys signal; 3; 1 /no quits sys sig sys 0;7f .data 7: sys chmod; ttyx; 1:.. .text rts pc stringfl: jsr pc,flush string: mov r0,-(sp) mov r1,-(sp) mov r2,-(sp) mov (r5)+,r1 mov r1,r2 mov r1,9f 1: tstb (r1)+ bne 1b dec r1 sub r2,r1 mov r1,1f mov ttyod,r0 cmp r0,ibf beq 2f 0: sys 0;7f .data 7: sys write; 9:..; 1:.. .text bes 2f 1: mov (sp)+,r2 mov (sp)+,r1 mov (sp)+,r0 rts r5 2: sys creat; tmfile; 666 bes 1b mov r0,ttyod br 0b flushi: tst nflush bne 1f clr ch tst nlflg bne 1f tst donef beq 2f cmp $ilist,ilis,$-1 beq 3f 0: tst nfo bne 2f 1: jsr pc,nextfile bne 3b 2: clr nx mov ifile,r0 sys read; ibuf; 512. bes 1b tst r0 beq 1b mov $ibuf,r1 add r1,r0 mov r0,eibuf 3: movb (r1)+,r0 bic $!377,r0 inc ioff mov r1,ibufp tst raw bne 6f cmpb r0,$040 bhis 8f mov r0,-(sp) mov cbits,r0 mov cbits+2,r1 ashc (sp),r0 bmi 0f clr (sp) 0: mov (sp)+,r0 8: tst raw1 bne 6f cmp r0,$004 beq 4b tst copyf bne 6f cmpb r0,$011 /tab bne 0f mov tabc,rchar br 1f 0: cmpb r0,$001 bne 6f mov dotc,rchar nal; 1; 1 /allow hangup 0: mov $'%,rlist mov $"nl,rlist+2 mov $"dn,rlist+4 mov $"yr,rlist+6 mov $"mo,rlist+8. mov $"dy,rlist+10. mov $"dw,rlist+12. mov $"hp,rlist+14. mov sp,r0 jsr pc,makebf sys open; suffil; 0 bes 1f mov r0,suff sys seek; 20; 0 bes 1f mov suff,r0 sys read; suftab; 2*26. 1: clr r0 mov (sp)+,argc dec argc ble 4f 1: tst (sp)+ mov (sp),r4 cmpb (r4)+,$'+ bne 2f jsr r5,pnum; pfrom br 3f 2: cmpb -1(r4),$'- bne 2f tstb (r4) beq 4f cmpb (r4),$'m bne 0f mov $nextf1,tp beq 1f 2: jsr pc,getchar br flushi 1: rts pc gettchar: tst ul ble getchar tst ulstate beq 3f tst bsc bgt 1f tst ulc bgt 2f clr ulstate br 3f 1: dec bsc mov $010,r0 rts pc 2: dec ulc mov $'_,r0 rts pc 3: jsr pc,getchar cmp r0,$016 beq 4f cmp r0,$017 beq 4f cmp r0,$'0 blt 1f cmp r0,$'9 ble 2f cmp r0,$'A blt 1f cmp r0,$'Z ble 2f cmp r0,$'a blt 1f cmp r0,$'z ble 2f 1: tst ulc ble 4f 3: mov $1,ulstate mov r0,ch br gettchar 2: inc bsc inc ulc 4: tst r0 rts pc rtn1: cmpb r0,fc beq 6f cmpb r0,padc beq 6f mov (sp)+,r1 mov $tabtab,r0 inc nspace 1: tst (r0) jeq get1 cmp column,(r0)+ bge 1b mov -(r0),nspace sub column,nspace jbr get1 6: /get1a: br 7f tst init bne 7f tst r0 jeq 4b 7: mov (sp)+,r1 tst r0 rts pc cbits: 040743;20 /001,007-012,033 (soh,bel,bs,tab,nl,so,si,esc) /cbits: 041743;20 /001,006-012,033 (soh,ack,bel,bs,tab,nl,so,si,esc) edone: mov $stk,frame clr ip done: clr app clr ds mov em,r0 beq 0f clr em mov pc,donef mov frame,-(sp)r0 tstb (r4)+ 8: movb (r4)+,(r0)+ bne 8b inc nx inc mflg br 3f 0: cmpb (r4),$'r bne 0f tstb (r4)+ movb (r4)+,r0 beq 3f jsr pc,findr mov r1,-(sp) mov r4,ibufp mov $-1,eibuf jsr pc,atoi mov (sp)+,r1 mov r0,(r1) clr ch br 3f 0: cmpb (r4),$'s bne 0f inc stop br 3f 0: cmpb (r4),$'o bne 0f inc old br 3f 0: cmpb (r4),$'i bne 0f inc stdi br 3f 0: cmpb (r4),$'q bne 0f inc quiet br 3f 0: cmpb (r4),$'h bne 0f clr slow br 3f 0: cmpb (r4),$'n bne 0f inc r4 jsr r5,pnum; npn brch: mov ch,r0 clr ch tst r0 rts pc getchar: mov r1,-(sp) 1: jsr pc,getch1 bmi 2f cmpb r0,fc bne 2f tst copyf bne 2f jsr pc,setfield br 1b 2: mov (sp)+,r1 tst r0 rts pc getch1: tst ch bne rtnch mov r1,-(sp) 1: jsr pc,getch0 bmi 2f tst copyf bne 2f cmpb r0,$030 /\w bne 2f jsr r5,setwd;getch0 br 1b 2: jsr pc,width add r1,column mov (sp)+,r1 tst r0 rts pc getch0: tst ch bne rtnch 1: tst nlflg beq 1f mov $'\n,r0 rts pc 1: mov r1,-(sp) 1: jsr pc,get1 cmpb r0,eschar bne  jsr pc,cont1 cmp (sp)+,frame bne 1f 0: tst nfo beq 3f clr op clr mflg tst woff beq 0f clr r0 jsr pc,wbt 0: clr pendnf tst pendw beq 0f clr *pendw clr pendw 0: cmp $1,donef beq done1 mov $1,donef clr ip mov $ilist,ilistp jsr pc,rbreak inc nflush mov $ilist,r0 jsr pc,eject 1: mov ssp,sp jmp loop done1: / tst pendb / bne 0b tst nl beq 1f jsr pc,newline br 1b 1: 3: done2: jsr pc,flush place: sys signal; 2; 1 tst quiet beq 1f bis $10,ttym mov ttyid,r0 sys stty; ttys 1: mov 3f 0: jsr r5,pnum; pto 3: dec argc bgt 1b 2: 4: / tst index / beq 1f / sys creat; indf; 666 / mov r0,indid 1: / mov $nop,get1a clr init mov $ibuf,ibufp mov $ibuf,eibuf mov sp,argp clr r0 1: movb r0,trtab(r0) inc r0 cmp r0,$128. bne 1b movb $040,trtab+014 mov sp,ssp mov $70.,vlist+6 jsr pc,ctime mov $-1,nl mov $end,enda clr ioff jmp loop makebf: tst (r0)+ mov (r0),r0 cmpb (r0),$'a bne 0f mov $bfn1,r0 mov r0,7f mov r0,8f mov r0,9f / mov r0,place1 0: sys stat; 8:bfn; stbuf bec 2f2f jsr pc,get1 jsr r5,switch; esctab cmpb r0,$'\n bne 3f / clr column br 1b 2: cmp r0,$033 /prefix bne 3f jsr pc,get1 jsr r5,switch; pfxtab 3: cmpb r0,$376 /comment bne 2f 0: jsr pc,get1 bmi 0b cmpb r0,$012 bne 0b 2: cmpb numc,r0 bne 2f clr r1 jsr pc,setn br 1b 2: cmpb r0,$372 /mark hor place bne 2f tst copyf bne 2f mov r0,r1 jsr pc,setn jsr pc,findr jeq 1b mov column,(r1) jbr 1b 2: cmpb r0,$025 /text string bne 2f jsr pc,setstr br 1b 2: cmpb dolc,r0 bne 2f jsr pc,seta  $1,r0 jsr pc,mesg mov outid,r0 sys close sys wait sys exit nextfile: mov ifile,r0 beq 1f sys close 1: tst nx beq 2f mov $nextf,r0 br 3f 2: cmp ifp,$ifl beq 1f jsr pc,popf bne nextfile tst pc rts pc 1: dec argc blt 4f mov *argp,r0 add $2,argp 3: mov r0,5f cmpb (r0)+,$'- bne 0f tstb (r0) bne 0f clr r0 br 1f 0: sys 0;7f .data 7: sys open; 5:..; 0 .text bec 1f sub mflg,nfo jgt done jsr r5,string; omes mov 5b,8f jmp 7f .data 7: jsr r5,string; 8:.. jmp 6f .text 6: jsr r5,string; 9f jbr done 1: clr iline inc nfo mov r0,ifile clr ioff rts pc 4: sub mflg,nfo beq 0f tst stdi jeq done 0: clr iline clr mflg inc nfo clr stdi clr ifile clr ioff rts pc omes: 9: <\n\0> .even popf: clr -(sp) mov ifp,r1 cmp r1,$ifl beq 1f sub $2,ifp mov -(r1),ifile mov [offl-ifl](r1),ioff mov ioff,0f bic $777,0f mov ifile,r0 beq 4f sys 0;7f .data 7: sys seek; 0:..; 0 .text bes 2f mov ifile,r0 sys read; ibuf; 512. bes 2f add $ibuf,r0 mov r0,eibuf sub  ; caseroc ; casenx ; caseso ; casepo ; casede ; caseds ; caseam ; caseas ; caseda ; casedi ; caserm ; casern ; caseig ; casetc ; caseec ; caseeo ; caselc ; casenc ; caseev ; caseif ; casewh ; casech ; caserd ; casetm ; casenr ; casemk ; casert ; casest ; casefl ; done ; casexh ; caseem ; casefc ; caseaf ; casepi ; casehw bnames: .=.+512. -1; -1 .text  ) { globfont(); goto beg; } else return( icntrl[type] ); } getstr(s,c) char *s, c; { for (sp=0; c!=' ' && c!='\t' && c!='\n' && c!='{' && c!='}' && c!='"' && c!='~' && c!='^' && c!=righteq; ) { if(c == '\\') if((c = getc()) != '"')s[sp++] = '\\'; s[sp++] = c; if( sp>=SSIZE ) error(FATAL,"token %.20s... too long",s); c = getc(); } if( c=='{' || c=='}' || c=='"' || c=='~' || c=='^' || c=='\t' || c==righteq ) peek = c; s[sp]='\0'; yylval = s; } lookup(str,tbl) char *str; char *tioff,0b mov $ibuf,ibufp mov ifile,r0 jsr pc,ttyn cmpb r0,$'x bne 1f sub 0b,ibufp cmp ibufp,eibuf blo 1f 2: inc (sp) 1: tst (sp)+ rts pc 4: jsr pc,restbuf br 1b savebuf: mov $ibuf,r0 mov $xbuf,r1 mov ibufp,xbufp mov eibuf,xeibuf 1: mov (r0)+,(r1)+ cmp r0,eibuf blo 1b rts pc restbuf: mov $xbuf,r0 mov $ibuf,r1 mov xbufp,ibufp mov xeibuf,eibuf 1: mov (r0)+,(r1)+ cmp r1,eibuf blo 1b rts pc putchar: bic $!377,r0 beq 2f tstb r0 bmi pchar2 cmpb r0,$013 /\e bne 0f tst op bne 0bl[]; { register i,j, r; for(i=0; tbl[i]!=0; i++){ /* table of tbl wds */ for( j=0; (r=tbl[i][j])==str[j] && r!='\0'; j++); if( r == str[j] ) return(i); } return( -1 ); } cstr(s,quote) char *s; int quote; { int del,c,i; while((del=getc()) == ' ' || del == '\t' || del == '\n'); if(quote) for(i=0; (c=getc()) != del;) s[i++] = c; else { s[0] = del; for(i=1; (c=getc())!=' ' && c!= '\t' && c!='\n';) s[i++]=c; } s[i] = '\0'; return(s); } define() { char *alloc(); int i, c; whilef movb eschar,r0 br putchar 0: movb trtab(r0),r0 cmp r0,$' bne 1f inc nsp 2: rts pc 1: cmp r0,$'\n bne 1f clr nsp clr ocol br pchar1 1: mov $011,-(sp) 1: tst nsp beq 2f tst slow bne 4f tst op bne 4f jsr pc,dsp cmp nsp,r1 blt 4f mov $011,(sp) cmp r1,$1 bgt 8f mov $040,(sp) dec nsp br 9f 8: sub r1,nsp 9: mov r0,-(sp) 3: mov 2(sp),r0 jsr pc,pchar1 mov (sp)+,r0 br 1b 4: mov r0,-(sp) mov $' ,r0 jsr pc,pchar1 mov (sp)+,r0 dec nsp bne 4b 2: tst (sp)+ cmp r0,$026 blt 2f # #include "ne.h" #include "y.tab.c" char *cntrl[] { "sup", "super", "sub", ".EN", "sum", "from", "to", "hat", "dot", "dotdot", "bar", "tilde", "under", "prod", "int", "integral", "union", "inter", "pile", "lpile", "cpile", "rpile", "over", "sqrt", "above", "size", "font", "roman", "italic", "bold", "left", "right", "delim", "DELIM", "DEFINE","define", ".gsize", ".GSIZE", "gsize", "GSIZE", "gfont", "GFONT", "HAT", "DOT", "DOTDOT", "BAR", "TILDE", "UNDER", "PROD", "INT", "INTEGRAL", "UNION", "I( (c=getc())==' ' || c=='\n' ); getstr(token,c); if((i = lookup(token,nptr)) >= 0){ yyval = i; free(sptr[yyval]); } else { yyval = ptr++; for(i=0; token[i] != '\0'; i++); nptr[yyval] = alloc(i+1); for(i=0; nptr[yyval][i]=token[i]; i++); } if(dbg)printf(".\tdefine %s\n",nptr[yyval]); cstr(token,1); for(i=0; token[i] != '\0'; i++); sptr[yyval] = alloc(i+1); for(i=0; sptr[yyval][i] = token[i]; i++); if(dbg)printf(".\tname %s defined as %s\n",nptr[yyval],sptr[yyval]); } delim() { char *scmp r0,$037 beq 3f bgt 2f mov r0,-(sp) jsr r5, switch; unpfx cmp (sp)+,r0 beq 2f mov r0,-(sp) mov $033,r0 /prefix jsr pc,pchar1 dec ocol mov (sp)+,r0 2: pchar1: cmp r0,$011 bne 1f jsr pc,dsp br 2f 1: jsr pc,width 2: add r1,ocol pchar2: tst op beq 1f mov op,r1 jsr pc,wbf mov r1,op br 3f 1: tst tflg bne 1f cmp pn,pfrom blt 3f clr pfrom 1: movb r0,*obufp inc obufp cmp obufp,$obuf+512. beq flush 3: rts pc dsp: clr r1 1: add $8.,r1 cmp ocol,r1 bgt 1b sub ocol,r1 bne 2f mNTER", "SUM", "FROM", "TO", "SUP", "SUPER", "SUB", "PILE", "LPILE", "CPILE", "RPILE", "OVER", "SQRT", "ABOVE", "SIZE", "FONT", "ROMAN", "ITALIC", "BOLD", "LEFT", "RIGHT", "up", "UP", "down", "DOWN", "fwd", "FWD", "back", "BACK", "mark", "MARK", "lineup", "LINEUP", "matrix", "lcol", "ccol", "rcol", "col", 0}; int icntrl[]{ SUPER, SUPER, SUB, 0, /* EOF */ SUM, FROM, TO, HAT, DOT, DOTDOT, BAR, TILDE, UNDER, PROD, INT, INT, UNION, INTER, PILE, LPILE, CPILE, RPILE, OVER, SQRT, ABOVE, SIZE, FONT; yyval = eqnreg = 0; cstr(token,0); lefteq = token[0]; righteq = token[1]; if( (lefteq == 'o' && righteq == 'f') || (lefteq == 'O' && righteq == 'F') ) lefteq = righteq = '\0'; } globsize() { extern int gsize; int c; while( (c=getc())==' ' || c=='\n' ); getstr(token,c); gsize = numb(token); yyval = eqnreg = 0; } globfont() { extern int gfont; while( (gfont=getc())==' ' || gfont=='\n' ); yyval = eqnreg = 0; } ov $8.,r1 2: rts pc unpfx: .byte 032, '9 .byte 035, '8 .byte 036, '7 .byte 031, '3 .byte 030, '4 .byte 026, '1 .byte 027, '2 .byte 0,0 flush: mov obufp,r0 sub $obuf,r0 mov r0,0f mov outid,r0 sys 0;7f .data 7: sys write; obuf; 0:0 .text jes place inc toolate mov $obuf,obufp rts pc rdtty: / mov sp,r1 / sys signal; 2; rdtty1 clr r0 sys read; char; 1 tst r0 bne 2f rdtty1: / mov r1,sp jsr pc,popi rdtty2: clr tty tst quiet beq 0f bis $10,ttym mov ttyid,r0 sys stty; , ROMAN, ITALIC, BOLD, LEFT, RIGHT, DELIM, DELIM, DEFINE, DEFINE, GSIZE, GSIZE, GSIZE, GSIZE, GFONT, GFONT, HAT, DOT, DOTDOT, BAR, TILDE, UNDER, PROD, INT, INT, UNION, INTER, SUM, FROM, TO, SUPER, SUPER, SUB, PILE, LPILE, CPILE, RPILE, OVER, SQRT, ABOVE, SIZE, FONT, ROMAN, ITALIC, BOLD, LEFT, RIGHT, UP, UP, DOWN, DOWN, FWD, FWD, BACK, BACK, MARK, MARK, LINEUP, LINEUP, MATRIX, LCOL, CCOL, RCOL, COL, 0}; int peek -1; #define SSIZE 400 char token[SSIZE]; int sp; int speek[10]; char *swt[10]; int#include "ne.h" column(type, p1, p2) int type, p1, p2; { int i, n; lp[p1] = ct - p1 - 1; if( dbg ){ printf(".\t%c column of", type); for( i=p1+1; i= 0){ lastchar = (peek<0) ? *swt[sw]++ : peek; peek = -1; if(lastchar != '\0')return(lastchar); peek = speek[sw--]; return(' '); } lastchar = (peek<0) ? getchar() : peek; if( lastchar=='\n' ) linect++; peek = -1; if( lastchar!= '\0' ) return(lastchar); if( ++ifile > svargc ){ peek = '\0'; return('\0'); } close(fin); linect = 1; if( (fin=open(svargv[ifile],0)) >= 0 ) goto loop; error(FATAL,"can't open file %s\n", svargv[ifile]); } yylex(){ in} for( k=1; k<=nrow; k++ ) { hb = b = 0; j = p1 + k; for( i=0; i .even cont1: mov r0,-(sp) mov pc,r2 br 0f control: jsr pc,getchar mov r0,-(sp) jsr pc,getchar cmpb r0,$'\n beq 8f cmpb r0,$' / bne 9f 8: mov r0,ch clr r0 9: swab r0 bis (sp),r0 clr r2 0: mov $contab,r1 1: mov (r1)+,(sp) bic $100000,(sp) cmp r0,(sp) bne 4f mov (r1),(sp) tst -(r1) bpl 3f clr *nxf tst r2 bne 2f jsr pc,collect 2: jsr pc,flushi jsr pc,pushi beq 5f mov (sp),ip br 5f 3: jmp *(sp)+ 4: cmp (r1)+,$-1 t c, type; beg: while( (c=getc())==' ' || c=='\n'); yylval=c; switch(c){ case '\0': return('\0'); case '~': return(SPACE); case '^': return(THIN); case '\t': return(TAB); case '{': return(MQ); case '}': return(MQ1); case '"': for(sp=0; (c=getc())!='"'; ){ if(c !='\\')token[sp++]=c; else { if((c=getc())!= '"')token[sp++]='\\'; token[sp++] = c; } if( sp>=SSIZE ) error(FATAL,"quoted string %.20s... too long", token); } token[sp]='\0'; yylval= &token[0]; returyyval] = eht[val[0]]; ebase[yyval] = ebase[val[0]]; ewid[yyval] = w + 2 * (ncol-1); /* 2 = width(space) */ if(dbg)printf(".\tmatrix S%d: r=%d, c=%d, h=%d, b=%d, w=%d\n", yyval,nrow,ncol,eht[yyval],ebase[yyval], ewid[yyval]); printf(".ds %d \"", yyval); for( i=0; i; casead ; casebp ; casepn
      ; casebr ; casecc ; casec2 ; casece ; casefi ; casein
    • ; caseli ; casell ; casels ; casens ; casers ; casena ; casene ; casenf ; casepl ; casesp ; casesv ; casesv ; caseos ; caseta ; caseti ; casetr
        ; caseul ; casetl ; caselt ; casehc ; casehy ; casenh ; casenm ; casenp ; casenn ; casear ; caseron(QTEXT); } if( c==righteq ) return('\0'); getstr(token, c); if((type = lookup(token,nptr)) >= 0){ if(sw >= 9) error(FATAL,"definitions nested > 9", sw); swt[++sw] = sptr[type]; speek[sw] = peek; peek = -1; goto beg; } type = lookup(token,cntrl); if( type < 0 ) return(CONTIG); if( icntrl[type]==DEFINE ) { define(); goto beg; } else if( icntrl[type]==DELIM ) { delim(); goto beg; } else if( icntrl[type]==GSIZE ){ globsize(); goto beg; } else if( icntrl[type]==GFONT#include "ne.h" int markpos; mark(n) int n; { if( n ) markpos = ewid[n]; else { yyval = oalloc(); printf(".ds %d \"\n", yyval); ebase[yyval] = ewid[yyval] = markpos = 0; eht[yyval] = 2; } if(dbg)printf(".\tmark %d as %d\n", n, markpos); } lineup(n) int n; { if( n ) { printf(".ds %d \"", n); fwd(markpos-ewid[n]); printf("\\*(%d\n", n); ewid[n] = markpos; } else { yyval = oalloc(); printf(".ds %d \"", yyval); fwd(markpos); printf("\n"); ebase[yyval] = 0; eht[yyval] = 2; ewid[yyval] = markpos; } if(dbg)printf(".\tlineup %d at %d\n", n, markpos); } # include "ne.h" char *res[] { ">=", "<=", "!=", "+-", "==", "cdot", "CDOT", "times", "TIMES", "SIGMA", "pi", "PI", "alpha", "beta", "gamma", "GAMMA", "delta", "epsilon", "omega", "DELTA", "LAMBDA", "PHI", "OMEGA", "lambda", "mu", "nu", "theta", "rho", "sigma", "tau", "phi", "INF", "INFINITY", "inf", "infinity", "partial", "PARTIAL", "zeta", "eta", "iota", "kappa", "xi", "omicron", "upsilon", "chi", "psi", "THETA", "XI", "UPSILON", "PSI", "del", "DEL", "nothing", "NOTHING", "approx", "APPROX(1); up(2); } down(n+1); fwd(1); } diacrit(p1,type) int p1,type; { int c,t; c = oalloc(); switch(type){ case 'H': printf(".ds %d ^\n",c); ewid[c] = 1; break; case 'T': printf(".ds %d ~\n",c); ewid[c] = 1; break; case 'D': printf(".ds %d ", c); up(2); putchar('.'); down(2); putchar('\n'); ewid[c] = 1; break; case 'U': printf(".ds %d ", c); up(2); printf(".."); down(2); putchar('\n'); ewid[c] = 2; break; case 'B': printf(".ds %d# include "ne.h" # define SIGPIPE 13 /* nroff has stopped reading */ int ESC 033; int HREV '8'; int HFWD '9'; int SI 017; int SO 016; int ESCOUT 033; int HFWDOUT '9'; int HREVOUT '8'; int BKSPOUT '\b'; int FWDOUT '~'; char in[400]; /* input buffer */ int exit(); main(argc,argv) int argc; char *argv[];{ int i, type; flush(); first = 0; lefteq = righteq = '\0'; signal(SIGPIPE, &exit); setfile(argc,argv); while( (type=getline(in)) != '\0' ){ eqline = linect; if( in[0]=='.' && in[1]=='E' && in[2]=", 0}; char *restran[] { ">\b_", "<\b_", "/\b=", "+\b_", "=\b_", "8.9", "8.9", "x", "x", "R", "J", "P", "A", "B", "\\e", "G", "D", "S", "C", "W", "E", "F", "Z", "L", "M", "@", "T", "K", "Y", "I", "U", "o", "o", "o", "o", "]", "]", "Q", "N", "i", "k", "X", "o", "u", "X", "V", "O", "X", "U", "H", "[", "[", "", "", "~\b=", "~\b=", 0}; int csp; int psp; #define CSSIZE 400 char cs[420]; text(t,p1) int t; char *p1; { in ", c); up(eht[p1]); line(ewid[p1]); down(eht[p1]); putchar('\n'); ewid[c] = ewid[p1]; break; case 'N': printf(".ds %d ", c); down(ebase[p1]); line(ewid[p1]); up(ebase[p1]); putchar('\n'); ewid[c] = ewid[p1]; break; } yyval = oalloc(); printf(".ds %d \\*(%d", yyval, p1); back((ewid[p1]+ewid[c])/2); printf("\\*(%d", c); fwd(abs(ewid[p1]-ewid[c])/2); putchar('\n'); ewid[yyval] = max(ewid[p1], ewid[c]); ebase[yyval] = ebase[p1]; eht[yyval] = eht[p1]; if( typ='Q' ){ for( i=11; i<100; used[i++]=0 ); printf(".tr ~\n"); printf("%s",in); init(); yyparse(); if( eqnreg>0 ) printf(".ne %d\n.rs\n'sp %d\n\\*(%d\n'sp %d\n", (eqnht+1)/2, (eqnht-eqnbase-2)/2,eqnreg,eqnbase/2); printf(".EN"); if( lastchar == '\0' ){ putchar('\n'); break; } if( putchar(lastchar) != '\n' ) while( putchar(getc()) != '\n' ); flush(); } else if( type != lefteq ) printf("%s",in); else inline(); } putchar('\0'); flush(); exit(); }t i,j,c; int w; yyval = oalloc(); ebase[yyval] = 0; eht[yyval] = 2; /* ht in 1/2 spaces */ if( t=='q' ) j = p1; else if ( t == '~' ) j = &"~"; else if ( t == '^' ) j = &""; else if ( t == '\t' ) j = &"\\t"; else if( (i=lookup(p1,res))>=0 ) j = restran[i]; else { for( csp=psp=0; (c=p1[psp++])!='\0'; ){ trans(c,p1); if( csp>CSSIZE ) error(FATAL,"converted token %.20s... too long",p1); } cs[csp] = '\0'; j = cs; } ewid[yyval] = width(j); if(dbg)printf(".\t%ctext: S%d <- e != 'N' ) eht[yyval]++; if(dbg)printf(".\t%c diacrit: S%d <- %d; h=%d,b=%d,w=%d\n", type, yyval, p1, eht[yyval], ebase[yyval], ewid[yyval]); ofree(p1); ofree(c); } move(dir, amt, p) int dir, amt; char *p; { yyval = p; printf(".ds %d ", yyval); if( dir==0 ) fwd(amt); else if( dir==1 ) up(amt); else if( dir==2 ) back(amt); else if( dir==3 ) down(amt); printf("\\*(%d\n", p); if( dir==1 ) ebase[yyval] =- amt; else if( dir==3 ) ebase[yyval] =+ amt; if(dbg)printf(".\tmove %d dir %d amt %d; h getline(s) char *s; { char c; while((*s++=c=getc())!='\n' && c!='\0' && c!=lefteq ); if( c==lefteq ) s--; *s++ = '\0'; return(c); } inline() { int i,j,ds[20],t; i = -1; do{ if( i>=17 ){ while((j=getline(in))!='\n' && j!='\0'); error(!FATAL,"missing right delim (?) at %.20s",in); break; } ds[++i] = oalloc(); printf(".ds %d \"%s\n", ds[i], in); init(); yyparse(); if( eqnreg > 0 ) ds[++i] = eqnreg; } while( (t=getline(in)) == lefteq ); ds[++i] = oalloc(); printf(".ds %s; b=%d,h=%d,w=%d\n", t, yyval, j, ebase[yyval], eht[yyval], ewid[yyval]); printf(".ds %d \"%s\n",yyval,j); } width(s) char *s; { int c,w; w = 0; while( (c = *s++) != '\0' ){ if( c == '\b' || c == 033 ) w--; else if ( c == '\\' && *s == '\\' ); else if ( c == '\\' && *s == 'e' ); else if ( c >= 040 ) w++; } return(w); } trans(c,p1) int c; char *p1; { switch( c){ case '>': case '<': case '=': if( p1[psp]=='=' ){ /* look ahead for == <= >= */ cs[csp++] = c; cs[csp++] = '\b'; cs=%d b=%d\n", p,dir,amt,eht[yyval],ebase[yyval]); } %d \"%s", ds[i], in); for( j=0; j<=i; j++){ printf("\\*(%d", ds[j]); ofree(ds[j]); } putchar('\n'); flush(); } putout(p1) int p1; { if(dbg)printf(".\tanswer <- S%d\n",p1); eqnht = eht[p1]; eqnbase = ebase[p1]; eqnreg = p1; } abs(v) int v; { return( v>0 ? v : -v ); } max(i,j) int i,j; { return( i>j ? i : j ); } oalloc(){ int i; for( i=11; i<100; i++) if( used[i]++ == 0 ) return(i); error( FATAL, "no strings left", i); } ofree(n) int n; { used[n] = 0; } setfile(argc, argv) int argc; [csp++] = '_'; psp++; } else cs[csp++] = c; break; case '\\': /* troff - pass 2 or 3 more chars */ cs[csp++] = c; cs[csp++] = c = p1[psp++]; cs[csp++] = p1[psp++]; if( c=='(' ) cs[csp++] = p1[psp++]; break; default: cs[csp++] = c; break; } } char *argv[]; { svargc = --argc; svargv = argv; while( svargc > 0 && svargv[1][0] == '-'){ switch( svargv[1][1] ){ case 'd': lefteq=svargv[1][2]; righteq=svargv[1][3]; break; case 's': break; case 'f': break; default: dbg = 1; ESCOUT = 'E'; HFWDOUT = 'F'; HREVOUT = 'R'; BKSPOUT = 'B'; FWDOUT = 'S'; } svargc--; svargv++; } if( svargc == 0 ) fin = dup(0); else if( (fin = open(svargv[1], 0)) < 0) error( FATAL,"can't open file %s", argv[1]); ptr = 0; fout = dup(1);# include "ne.h" fromto(p1,p2,p3) int p1,p2,p3; { int w,h,b,h1,b1; yyval = oalloc(); h1 = eht[yyval] = eht[p1]; b1 = ebase[p1]; b = 0; w = ewid[p1]; if( p2>0 ){ w = max(w, ewid[p2]); eht[yyval] =+ eht[p2]; b = eht[p2]; } if( p3>0 ){ w = max(w, ewid[p3]); eht[yyval] =+ eht[p3]; } ewid[yyval] = w; printf(".ds %d ", yyval); /* bottom of middle box */ if( p2>0 ){ down(eht[p2]-ebase[p2]+b1); fwd((w-ewid[p2])/2); printf("\\*(%d", p2); back((w+ewid[p2])/2); up(eht[p2]-ebase[p2]+b1# include "ne.h" boverb(p1,p2) int p1,p2; { int h,b,w,treg; yyval = oalloc(); eht[yyval] = eht[p1] + eht[p2] ; ebase[yyval] = eht[p2] - 1; ewid[yyval] = w = max(ewid[p1],ewid[p2]); if(dbg)printf(".\tb:bob: S%d <- S%d over S%d; b=%d,h=%d,w=%d\n", yyval, p1, p2, ebase[yyval], eht[yyval], ewid[yyval]); printf(".ds %d ", yyval); down(eht[p2]-ebase[p2]-1); fwd((ewid[yyval]-ewid[p2])/2); printf("\\*(%d", p2); back((ewid[yyval]+ewid[p2])/2); up(eht[p2]-ebase[p2]+ebase[p1]); fwd((ewid[yyval]-ewid[p1 ifile = 1; linect = 1; } yyerror(){;} int gsize 10; int gfont 'I'; init(){ ct = 0; first++; } error(fatal, s1, s2) int fatal; char *s1, *s2; { int sfout; printf("NEQN ERROR HERE"); flush(fout); sfout = fout; fout = 2; if( fatal>0 ) printf("fatal error: "); printf(s1,s2); printf(" file %s, between lines %d and %d\n", svargv[ifile], eqline, linect); flush(2); fout = sfout; if( fatal > 0 ) exit(1); } down(n) int n; { int c; if( n<= 0 ) c = HREVOUT; else c = HFWDOUT; n = abs(); } fwd((w-ewid[p1])/2); printf("\\*(%d", p1); fwd((1+w-ewid[p1])/2); if( p3>0 ){ up(h1-b1+ebase[p3]); back((w+ewid[p3])/2); printf("\\*(%d", p3); fwd((w-ewid[p3])/2); down(h1-b1+ebase[p3]); } putchar('\n'); ebase[yyval] = b + b1; if(dbg)printf(".\tfrom to: S%d <- %d f %d t %d; h=%d b=%d,w=%d\n", yyval,p1,p2,p3,eht[yyval], ebase[yyval], ewid[yyval]); ofree(p1); if( p2>0 ) ofree(p2); if( p3>0 ) ofree(p3); } paren(leftc,p1,rightc) int p1, leftc, rightc; { int n,h1,b1; yyval = oallo])/2); printf("\\*(%d", p1); back((ewid[yyval]+ewid[p1])/2); down(ebase[p1]); line(ewid[yyval]); down(1); putchar('\n'); ofree(p1); ofree(p2); } bshiftb(p1,dir,p2) int p1,dir,p2; { int shval, d1, h1, b1,h2,b2; yyval = oalloc(); ewid[yyval] = ewid[p1] + ewid[p2]; h1 = eht[p1]; b1 = ebase[p1]; h2 = eht[p2]; b2 = ebase[p2]; printf(".ds %d \"\\*(%d", yyval, p1); if( dir > 0 ){ /* subscript */ shval = h2-b2-1; if( shval < b1 ) shval = b1; down(shval); printf("\\*(%d", p2); up(shval);n); while( n-- > 0 ){ putchar(ESCOUT); putchar(c); } } up(n) int n; { int c; if( n<= 0 ) c = HFWDOUT; else c = HREVOUT; n = abs(n); while( n-- > 0 ){ putchar(ESCOUT); putchar(HREVOUT); } } fwd(n) int n; { int c,i; c = n<0 ? BKSPOUT : FWDOUT; n = abs(n); while( n-- > 0 ) putchar(c); } back(n) int n; { int c,i; c = n>0 ? BKSPOUT : FWDOUT; n = abs(n); while( n-- > 0 ) putchar(c); } line(n) int n; { while( n-- > 0 ) putchar('_'); } c(); h1 = eht[p1]; ebase[yyval] = b1 = ebase[p1]; n = max(b1+1, h1-b1-1); eht[yyval] = 2*n; if( eht[yyval] > h1 ) ++ebase[yyval]; printf(".ds %d ", yyval); brack(n,'|'); printf("\\*(%d", p1); if( rightc ) brack(n,'|'); putchar('\n'); ewid[yyval] = ewid[p1] + 1 + (rightc ? 1 : 0); if(dbg)printf(".\tcurly: h=%d b=%d n=%d w=%d l=%c,r=%c\n", eht[yyval],ebase[yyval],n,ewid[yyval],leftc,rightc); ofree(p1); } brack(n,c) int n,c; { int j; down(n-1); for( j=0; j < n; j++ ){ putchar(c); back ebase[yyval] = max(b1, h2-1); eht[yyval] = h1 + max(0,h2-b1-1); } else { /* superscript */ ebase[yyval] = b1; shval = b2+1; if( shval+h2 < h1-b1 ) shval = h1-b1-h2; up(shval); printf("\\*(%d", p2); down(shval); eht[yyval] = max(h1, b1+1+h2); } putchar('\n'); if(dbg)printf(".\tb:b shift b: S%d <- S%d vert %d S%d vert %d; b=%d,h=%d,w=%d\n", yyval,p1,shval,p2,-shval,ebase[yyval],eht[yyval],ewid[yyval]); ofree(p1); ofree(p2); } eqnbox(p1,p2) int p1,p2; { int b,h; if( p1==0 ){  yyval = p2; return; } yyval = oalloc(); b = max(ebase[p1], ebase[p2]); eht[yyval] = h = b + max(eht[p1]-ebase[p1], eht[p2]-ebase[p2]); ebase[yyval] = b; ewid[yyval] = ewid[p1] + ewid[p2]; if(dbg)printf(".\te:eb: S%d <- S%d S%d; b=%d,h=%d,w=%d\n", yyval,p1,p2,b,h,ewid[yyval]); printf(".ds %d \\*(%d\\*(%d\n", yyval, p1, p2); ofree(p1); ofree(p2); } size(p1,p2) int p1,p2; { yyval = p2; } numb(p1) char *p1; { int i, n, c; for(i=n=0; (c=p1[i++])!='\0'; ) if( c>='0' && c<='9' ) n = n*10 +stchar; /* last character read by lex */ #define FATAL 1 int ESC; int HREV; int HFWD; int SI; int SO; / tape boot program to load and transfer / to a 'tp' entry / entry is made by jsr pc,*$0 / so return can be rts pc / jsr pc,(r5) is putc / jsr pc,2(r5) is getc / jsr pc,4(r5) is mesg core = 24. .mt. = 0 .. = [core*2048.]-512. start: mov $..,sp mov $name,r4 mov sp,r1 cmp pc,r1 bhis 2f clr r0 cmp (r0),$407 bne 1f mov $20,r0 1: mov (r0)+,(r1)+ cmp r1,$end blo 1b jmp (sp) 2: jsr pc,rew mov $tvec,r5 mov $'=,r0 jsr pc,(r5) 2: mov r4,r1 1: jsr pc,2(r5) cmp r0,$'\n beq 1f cmp r0,$'@ beq 2b c-'0'; if(dbg)printf(".\tnumb: %s %d\n",p1,n); return( n ); } font(p1,p2) int p1,p2; { yyval = p2; } shift(p1) int p1; { yyval = p1; if(dbg)printf(".\tshift: %d\n",yyval); } sqrt(p2) int p2; { int nps, h, i; yyval = oalloc(); h = eht[p2]; eht[yyval] = h+1; nps = h-1; ebase[yyval] = ebase[p2]; ewid[yyval] = ewid[p2] + 2; if(dbg)printf(".\tsqrt: S%d <- S%d;b=%d,h=%d,w=%d\n", yyval,p2,ebase[yyval],eht[yyval],ewid[yyval]); printf(".ds %d \\e|", yyval); for( i=2; i<=nps; i++ ){ back(1); \{# # int fromflg 0; \} %term CONTIG QTEXT SPACE THIN TAB %term UP DOWN BACK FWD %term MATRIX LCOL CCOL RCOL COL %term MARK LINEUP %term SUM INT PROD UNION INTER %term LPILE PILE CPILE RPILE ABOVE %term DEFINE DELIM GSIZE GFONT %right FROM TO %left OVER SQRT %right SUPER SUB %right SIZE FONT ROMAN ITALIC BOLD %left MQ MQ1 %left LEFT RIGHT %right DOT DOTDOT HAT TILDE BAR UNDER %% stuff : eqn ={ putout($1); } | error ={ error(!FATAL, "syntax error in equation %d", first); } | ={ eqnreg = 0; } ; eqn  movb r0,(r1)+ cmp r0,$'# bne 1b sub $2,r1 cmp r1,r4 blo 2b br 1b 1: clrb (r1) cmp r1,r4 blos start mov $1,tapa mov $-6144.,wc jsr pc,taper clr r1 1: mov r1,r2 mov r4,r0 2: cmpb (r0)+,(r1) bne 2f tstb (r1)+ bne 2b br 1f 2: mov r2,r1 add $64.,r1 cmp r1,$12288. blo 1b jsr pc,rew br start 1: mov 44.(r2),tapa mov 38.(r2),r0 inc r0 clc ror r0 neg r0 mov r0,wc clr r0 1: clr (r0)+ cmp r0,sp blo 1b jsr pc,taper jsr pc,rew clr r0 cmp (r0),$407 / unix a.out? bne 2f 1: mov up(1); putchar('|'); } up(2); line(ewid[p2]); back(ewid[p2]); down(h); printf("\\*(%d\n", p2); ofree(p2); } lpile(type,p1,p2) int type,p1,p2; { int w,bi,hi,i,gap,h,b,j, nlist, nlist2, mid; yyval = oalloc(); gap = type == '-' ? 0 : 1; nlist = p2 - p1; nlist2 = (nlist+1)/2; mid = p1 + nlist2 -1; h = b = w = 0; for( i=p1; imid; i-- ) b =+ eht[lp[i]] + gap; ebase[y: box ={ if(dbg)printf(".\teqn: S%d\n",$1); } | eqn box ={ eqnbox($1,$2); } | eqn MARK ={ mark($1); } | MARK ={ mark(0); } | eqn LINEUP ={ lineup($1); } | LINEUP ={ lineup(0); } ; matrix : MATRIX ={ $$ = ct; } ; collist : column | collist column ; column : lcol MQ list MQ1 ={ column('L',$1,$3); } | ccol MQ list MQ1 ={ column('C',$1,$3); } | rcol MQ list MQ1 ={ column('R',$1,$3); } | col MQ list MQ1 ={ column('-',$1,$3); } ; lcol : LCOL ={ $$ = ct++; } ; ccol : CCOL ={ $$ = ct++; } ; rcol : R20(r0),(r0)+ cmp r0,sp blo 1b 2: jsr pc,*$0 br start .if .mt. mts = 172520 mtc = 172522 mtbrc = 172524 mtcma = 172526 taper: clr mtma cmp mtapa,tapa beq 1f bhi 2f jsr pc,rrec br taper 2: jsr pc,rew br taper 1: mov wc,r1 1: jsr pc,rrec add $256.,r1 bmi 1b rts pc rrec: bit $2,*$mts bne rrec tstb *$mtc bge rrec mov $-512.,*$mtbrc mov mtma,*$mtcma mov $60003,*$mtc 1: tstb *$mtc bge 1b tst *$mtc bge 1f mov $-1,*$mtbrc mov $60013,*$mtc br rrec 1: add $512.,mtma inc mtapa rts pyval] = (nlist%2) ? b + ebase[lp[mid]] : b - gap -1; if(dbg){ printf(".\tS%d <- %c pile of:", yyval, type); for( i=p1; i=p1; i--){ hi = eht[lp[i]]; bi = ebase[lp[i]]; switch(type){ case 'L': up(bi); printf("\\*(%d", lp[i]); back(ewid[lp[i]]); up(hi-bi+gap); printf("\\\n"); COL ={ $$ = ct++; } ; col : COL ={ $$ = ct++; } ; sbox : super box %prec SUPER ={ $$ = $2; } | %prec SUB ={ $$ = 0; } ; box : box OVER box ={ boverb($1,$3); } | size box %prec SIZE ={ size($1,$2); } | font box %prec FONT ={ font($1,$2); } | SQRT box ={ sqrt($2); } | lpile MQ list MQ1 %prec LPILE ={ lpile('L', $1, ct); ct=$1; } | cpile MQ list MQ1 %prec CPILE ={ lpile('C', $1, ct); ct=$1; } | rpile MQ list MQ1 %prec RPILE ={ lpile('R', $1, ct); ct=$1; } | pile MQ list MQ1 %prec PILE c rew: mov $60017,*$mtc clr mtapa rts pc .endif .if .mt.-1 tcdt = 177350 tccm = 177342 taper: mov $tcdt,r0 mov $tccm,r1 for: mov $3,(r1) / rbn for 1: tstb (r1) bge 1b tst (r1) blt rev cmp tapa,(r0) beq rd bgt for rev: mov $4003,(r1) / rbn bac 1: tstb (r1) bge 1b tst (r1) blt for mov (r0),r2 add $5,r2 cmp tapa,r2 blt rev br for rd: clr -(r0) / bus addr mov wc,-(r0) / wc mov $5,-(r0) / read 1: tstb (r1) bge 1b tst (r1) blt taper rts pc rew: mov $4003,tccm rts pc continue; case 'R': up(bi); back(ewid[lp[i]]); printf("\\*(%d", lp[i]); up(hi-bi+gap); printf("\\\n"); continue; case 'C': case '-': up(bi); fwd((ewid[yyval]-ewid[lp[i]])/2); printf("\\*(%d", lp[i]); back((ewid[yyval]+ewid[lp[i]])/2); up(hi-bi+gap); printf("\\\n"); continue; } } down(eht[yyval]-ebase[yyval]+gap); if( type!='R' ) fwd(ewid[yyval]); putchar('\n'); for( i=p1; i h2 ) subsh = b1-b2; supsh = b3 + 1; if( supsh+h3 < h1-b1 ) supsh = h1-b1-h3; eht[yyval] = h1 + max(0,h3-1) + max(0,h2-b1-d1); ebase[yyval] = b1+max(0,h2-b1-d1); ewid[yyval] = ewid[p1] + max(ewid[p2], ewid[p3]); printf(".ds %d \\*(%d", yyval, p1); down(subsh); printf("\\*(%d", p2); back(ewid[p2]); up(subsh+supsh); printf("\\*(%d", p3); dow | fwd box ={ move(0,$1,$2); } | up box ={ move(1,$1,$2); } | back box ={ move(2,$1,$2); } | down box ={ move(3,$1,$2); } | matrix MQ collist MQ1 ={ matrix($1,$3); } ; fwd : FWD text ={ $$ = numb($1); } ; up : UP text ={ $$ = numb($1); } ; back : BACK text ={ $$ = numb($1); } ; down : DOWN text ={ $$ = numb($1); } ; diacrit : HAT ={ $$ = 'H'; } | BAR ={ $$ = 'B'; } | UNDER ={ $$ = 'N'; } /* under bar */ | DOT ={ $$ = 'D'; } | TILDE ={ $$ = 'T'; } | DOTDOT ={ $$ = 'U'; } /* umlaut = double dot *ic $1,(sp) rts pc end: tapa: .=.+2 mtapa: .=.+2 mtma: .=.+2 wc: .=.+2 name: .=.+32. n(supsh); if(ewid[p3] < ewid[p2] ) fwd(ewid[p2]-ewid[p3]); putchar('\n'); if(dbg)printf(".\tshift2 s%d <- %d %d %d",yyval,p1,p2,p3); if(dbg)printf(" h=%d,b=%d,w=%d\n", eht[yyval],ebase[yyval],ewid[yyval]); ofree(p1); ofree(p2); ofree(p3); } / ; from : FROM ; to : TO ; left : LEFT text ={ $$ = $2->c1; } | LEFT MQ ={ $$ = '{'; } ; right : RIGHT text ={ $$ = $2->c1; } | RIGHT MQ1 ={ $$ = '}'; } | ={ $$ = 0; } ; list : eqn ={ lp[ct++] = $1; } | list ABOVE eqn ={ lp[ct++] = $3; } ; lpile : LPILE ={ $$=ct; } ; cpile : CPILE ={ $$=ct; } ; pile : PILE ={ $$=ct; } ; rpile : RPILE ={ $$=ct; } ; size : SIZE text ; font : ROMAN | ITALIC | BOLD | FONT text ; sub : SUB ={ shift(1); } ; super : SUPER ={ shift(-1); } ; pbox : MQ eqn / format RK03/05 disk packs rkda = 177412 jsr pc,4(r5) ; .even jsr pc,2(r5) mov r0,-(sp) mov $'\n,r0 jsr pc,(r5) cmp (sp)+,$'y beq 1f rts pc 1: mov $203.*2,r4 clr r3 1: mov $rkda+2,r0 mov r3,-(r0) mov $buf,-(r0) mov $-12.*256.,-(r0) mov $6003,-(r0) 2: tstb (r0) bge 2b tst (r0) blt 1f add $20,r3 dec r4 bne 1b rts pc 1: jsr pc,4(r5) ; .even rts pc buf: .=.+2 # int dbg; int ct; int lp[40]; char used[100]; /* available registers */ int ps; /* dflt init pt size */ int ft; /* dflt font */ int first; extern int fout, fin; int ifile; int linect; /* line number in file */ int eqline; /* line where eqn started */ int svargc; char **svargv; int eht[100]; int ebase[100]; int ewid[100]; struct { char c1; char c2; }; int yyval; int *yypv; int yylval; int tht[30]; int tbase[30]; int ptr; char *nptr[50]; char *sptr[50]; int eqnreg, eqnht, eqnbase; int lefteq, righteq; int laMQ1 ={ $$ = $2; } | QTEXT ={ text('q',$1); } | CONTIG ={ text('c',$1); } | SPACE ={ text('~', $1); } | THIN ={ text('^', $1); } | TAB ={ text('\t', $1); } | SUM ={ text('c', "SIGMA"); } | PROD ={ text('c', "PI"); } | INT ={ text('c', "^"); } | UNION ={ text('c' ,"U"); } | INTER ={ text('c', "A"); } ; text : CONTIG | QTEXT | SPACE ={ $$ = & "\\|\\|"; } | THIN ={ $$ = & "\\|"; } ; %% / disk boot program to load and transfer / to a unix entry / entry is made by jsr pc,*$0 / so return can be rts pc core = 24. .. = [core*2048.]-512. start: mov $..,sp mov sp,r1 cmp pc,r1 bhis 2f reset clr r0 cmp (r0),$407 bne 1f mov $20,r0 1: mov (r0)+,(r1)+ cmp r1,$end blo 1b jmp (sp) 2: mov $inod,r0 1: clr (r0)+ cmp r0,sp blo 1b jsr pc,getc cmp r0,$'k bne 3f mov $rkblk,r0 br 1f 3: cmp r0,$'p bne 2b mov $rpblk,r0 1: mov r0,rxblk mov $'\n,r0 jsr pc,putc mov $names,r1 1: mov r1,r2 2: jsr pc,getc cmp r0,$'\n beq 1f cmp r0,$'/ beq 3f movb r0,(r2)+ br 2b 3: cmp r1,r2 beq 2b add $14.,r1 br 1b 1: mov $names,r1 mov $1,r0 1: clr bno jsr pc,iget tst (r1) beq 1f 2: jsr pc,rmblk br start mov $buf,r2 3: mov r1,r3 mov r2,r4 add $16.,r2 tst (r4)+ beq 5f 4: cmpb (r3)+,(r4)+ bne 5f cmp r4,r2 blo 4b mov -16.(r2),r0 add $14.,r1 br 1b 5: cmp r2,$buf+512. blo 3b br 2b 1: clr r1 1: jsr pc,rmblk br 1f mov $buf,r2 2: mov (r2)+,(r1)+ cmp r2,$buf+512. blo 2 26); goto out; } while((c = read(tbuf[0], tbuf+1, 512)) > 0) write(pbuf[0], tbuf+1, c); unlink(tfile); exit(0); } putc(c, tbuf); } ill: write(2, "Password file illformed\n", 24); out: unlink(tfile); bex: exit(1); } ck numbers / write all 1's in data check: clrb tcst clr (r5) jsr pc,flag1 br check clr r4 1: mov $3,tccm jsr pc,flag cmp (r5),r4 bne error1 mov $-nword,tcwc mov $buffer,tcba mov $15,tccm jsr pc,flag inc r4 cmp r4,$nblock bne 1b mov $3,tccm jsr pc,flag1 br error2 / reverse pass / confirm block numbers / read data and compare / to all 1's 1: mov $4003,tccm jsr pc,flag dec r4 cmp r4,(r5) bne error3 mov $-nword,tcwc mov $buffer,tcba mov $4005,tccm jsr pc,compare jsr pc,flag tsb br 1b 1: clr r0 cmp (r0),$407 bne 2f 1: mov 20(r0),(r0)+ cmp r0,sp blo 1b 2: jsr pc,*$0 br start iget: add $31.,r0 mov r0,r5 ash $-4.,r0 jsr pc,rblk bic $!17,r5 ash $5.,r5 add $buf,r5 mov $inod,r4 1: mov (r5)+,(r4)+ cmp r4,$addr+16. blo 1b rts pc rmblk: add $2,(sp) mov bno,r0 inc bno bit $LRG,mode bne 1f asl r0 mov addr(r0),r0 bne rblk 2: sub $2,(sp) rts pc 1: clr -(sp) movb r0,(sp) clrb r0 swab r0 asl r0 mov addr(r0),r0 beq 2b jsr pc,rblk mov (sp)+,r0 asl r0 mo/ copy mag tape to disk / load with proper tape and disk drivers jsr pc,rew 2: jsr pc,4(r5) .even jsr pc,numb mov r0,dska jsr pc,4(r5) .even jsr pc,numb mov r0,tapa jsr pc,4(r5) .even jsr pc,numb mov r0,r2 1: jsr pc,tread jsr pc,wblk inc tapa inc dska dec r2 bne 1b jsr pc,rew rts pc numb: clr r1 1: jsr pc,2(r5) cmp r0,$'\n beq 1f sub $'0,r0 cmp r0,$9 bhi 2f mul $10.,r1 add r0,r1 br 1b 1: mov r1,r0 rts pc 2: jsr pc,4t r4 bne 1b mov $4003,tccm jsr pc,flag1 br error4 jsr pc,compare jmp start error1: mov $1,r0 br 1f error2: mov $1,r0 br 1f error3: mov $3,r0 br 1f error4: mov $4,r0 br 1f error5: mov $5,r0 br 1f error6: mov $6,r0 br 1f error7: mov $7,r0 1: add $'0,r0 movb r0,0f mov tcst,-(sp) mov tccm,-(sp) mov $1,tccm mov savr5,r5 jsr pc,4(r5) 0: .even mov (sp)+,r1 mov (sp)+,r0 0 rts pc compare: mov r0,-(sp) mov $buffer,r0 1: cmp (r0)+,$-1 bv buf(r0),r0 beq 2b rblk: mov r1,-(sp) mov r0,r1 clr r0 jmp *rxblk rpda = 176724 rpblk: div $10.,r0 mov r1,-(sp) mov r0,r1 clr r0 div $20.,r0 bisb r1,1(sp) mov $rpda,r1 mov (sp)+,(r1) br 1f rkda = 177412 rkblk: div $12.,r0 ash $4.,r0 bis r1,r0 mov $rkda+2,r1 1: mov r0,-(r1) mov $buf,-(r1) mov $-256.,-(r1) mov $5,-(r1) 1: tstb (r1) bge 1b mov (sp)+,r1 rts pc tks = 177560 tkb = 177562 getc: mov $tks,r0 inc (r0) 1: tstb (r0) bge 1b mov tkb,r0 bic $!177,r0 cmp r0,$'A blo 1(r5) .even tst (sp)+ rts pc ba: buf wc: -256. .bss buf: .=.+512. dska: .=.+2 tapa: .=.+2 .text ne error5 cmp r0,$buffer+nword+nword blo 1b mov (sp)+,r0 rts pc mtrack: mov (r0)+,(r5) jsr pc,flag rts r0 flag: bit $100200,tccm beq flag blt error6 rts pc flag1: bit $100200,tccm beq flag1 bge 1f tst tcst bge error7 add $2,(sp) 1: rts pc comobv: mov r0,r4 bic $!777,r0 asl r0 mov cobtab(r0),r0 swab r0 clr r1 ror r0 rol r1 asl r0 asl r0 rol r1 swab r4 bic $177401,r4 bis cobtab(r4),r0 rts pc bcomobv: mov r0,r2 bic $!70,r2 mov r0,r3 mov $6.,r4 1: asr r3 dec r4 bne 1f cmp r0,$'Z bhi 1f add $40,r0 1: cmp r0,$'\r bne putc mov $'\n,r0 tps = 177564 tpb = 177566 putc: tstb tps bge putc cmp r0,$'\n bne 1f mov $'\r,r0 jsr pc,putc mov $'\n+200,r0 jsr pc,putc clr r0 jsr pc,putc mov $'\n,r0 rts pc 1: mov r0,tpb rts pc end: inod = ..-1024. mode = inod addr = inod+8. buf = inod+32. bno = buf+514. rxblk = bno+2 names = rxblk+2 LRG = 10000 reset = 5 ...$dldr.sdtf.smcopy.srkf.stboot.suboot.sfsboot.smboot.sJrun]hp.s[ht.sbreset.s"rhp.srk.sWrp.srrk.sIrrp.stc.sPtcf.sXtm.stpboot.stty.swhp.sYwrk.s|wrp.smaka.outb bic $!7,r3 bis r3,r2 mov r0,r3 mov $6.,r4 1: asl r3 dec r4 bne 1b bic $!700,r3 bis r3,r2 com r2 bic $!777,r2 rts pc bn: .=.+2 savr5: .=.+2 savsp: .=.+2 cobtab: .=.+1024. buffer: .=.+nword+nword /* * enter a password in the password file * this program should be suid with owner * with an owner with write permission on /etc/passwd */ char *tfile { "/tmp/ptmp" }; char *pfile { "/etc/passwd" }; int tbuf[259]; int pbuf[259]; main(argc, argv) char *argv[]; { register u, c; register char *p; if(argc != 3) { write(2, "Usage: passwd user password\n", 28); goto bex; } signal(1, 1); signal(2, 1); signal(3, 1); if(stat(tfile, tbuf+20) >= 0) { write(2, "Temporary file busy -- try again\n",/ unix DEC-tape time/mtrack track formatter nword = 256. nblock = 578. endz = 7200. ps = 177776 tcst = 177340 tccm = 177342 tcwc = 177344 tcba = 177346 tcdt = 177350 mov r5,savr5 mov sp,savsp start: mov savr5,r5 mov savsp,sp jsr pc,4(r5) .even clr r0 mov $cobtab,r1 1: jsr pc,bcomobv mov r2,(r1)+ inc r0 cmp r0,$512. bne 1b mov $buffer,r0 1: mov $-1,(r0)+ cmp r0,$buffer+nword+nword blo 1b mov savr5,r5 jsr pc,2(r5) mov $340,ps mov $tcdt,r5 mov cc -s -O mail.c cmp a.out /bin/mail cp a.out /bin/mail cc -s -O mesg.c cmp a.out /usr/bin/mesg cp a.out /usr/bin/mesg as mkdir.s strip a.out cmp a.out /bin/mkdir cp a.out /bin/mkdir cc -s -O mkfs.c cmp a.out /etc/mkfs cp a.out /etc/mkfs cc -s -O mknod.c cmp a.out /etc/mknod cp a.out /etc/mknod cc -s -O mount.c cmp a.out /etc/mount cp a.out /etc/mount cc -s -O mv.c cmp a.out /bin/mv cp a.out /bin/mv cc -s -O ncheck.c cmp a.out /bin/ncheck cp a.out /bin/ncheck cc -s -O newgrp.c cmp a.out /bin/newgrp c 33); goto bex; } tbuf[0] = creat(tfile, 0600); if(tbuf[0] < 0) { write(2, "Cannot create temporary file\n", 29); goto bex; } pbuf[0] = open(pfile, 0); if(pbuf[0] < 0) { write(2, "Cannot open /etc/passwd\n", 24); goto out; } goto l1; /* * skip to beginning of next line */ skip: while(c != '\n') { if(c < 0) goto ill; c = getc(pbuf); putc(c, tbuf); } /* * compare user names */ l1: c = getc(pbuf); putc(c, tbuf); if(c < 0) { write(2, "User name not found in password fil$13,tccm jsr pc,flag / 8Kch for end zone mov $endz,r4 1: jsr r0,mtrack; 101101 dec r4 bne 1b / foreward guard mov $199.,r4 1: jsr r0,mtrack; 10101 dec r4 bne 1b / blocks mov $nblock,r3 1: jsr r0,mtrack; 10101 jsr r0,mtrack; 10110 jsr r0,mtrack; 11010 jsr r0,mtrack; 01000 jsr r0,mtrack; 01000 jsr r0,mtrack; 01000 jsr r0,mtrack; 01000 mov $nword-4,r4 2: jsr r0,mtrack; 111000 dec r4 bne 2b jsr r0,mtrack; 111011 jsr r0,mtrack; 111011 jsr r0,mtrack; 111011 jsr r0,mtrack; 111011 jsp a.out /bin/newgrp cc -s -O nice.c cmp a.out /usr/bin/nice cp a.out /usr/bin/nice cc -s -O nm.c cmp a.out /bin/nm cp a.out /bin/nm cc -s -O nohup.c cmp a.out /usr/bin/nohup cp a.out /usr/bin/nohup cc -s -O od.c cmp a.out /bin/od cp a.out /bin/od cc -s -O opr.c cmp a.out /bin/opr cp a.out /bin/opr cc -s -O passwd.c cmp a.out /bin/passwd cp a.out /bin/passwd as pfe.s strip a.out cmp a.out /usr/bin/pfe cp a.out /usr/bin/pfe cc -s -O pr.c cmp a.out /bin/pr cp a.out /bin/pr cc -s -f -O prof.c cmp a.oute\n", 37); goto out; } p = argv[1]; while(c != ':') { if(*p++ != c) goto skip; c = getc(pbuf); putc(c, tbuf); } if(*p) goto skip; /* * skip old password */ do { c = getc(pbuf); if(c < 0) goto ill; } while(c != ':'); /* * copy in new password */ p = argv[2]; for(c=0; c<9; c++) if(*p++ == 0) break; *--p = 0; if(p != argv[2]) p = crypt(argv[2]); while(*p) putc(*p++, tbuf); putc(':', tbuf); /* * validate uid */ u = 0; do { c = getc(pbuf); putc(c, tbuf); r r0,mtrack; 101001 jsr r0,mtrack; 100101 jsr r0,mtrack; 10101 dec r3 bne 1b / rear guard mov $199.,r4 1: jsr r0,mtrack; 10101 dec r4 bne 1b / rear end zone mov $endz,r4 1: jsr r0,mtrack; 10010 dec r4 bne 1b clr tccm / end of mtrack pass / go back 12 blocks mov $12.,r0 mov $4002,tccm 1: incb tccm jsr pc,flag dec r0 bne 1b / put comobv(nblock-1) in everything / up to end zone mov $nblock-1,r0 mov r0,bn jsr pc,comobv mov $17,tccm jsr pc,flag 1: movb r1,tcst mov r0,(r5) jsr p /usr/bin/prof cp a.out /usr/bin/prof cc -s -O ps.c cmp a.out /bin/ps cp a.out /bin/ps cc -s -O ptx.c cmp a.out /usr/bin/ptx cp a.out /usr/bin/ptx cc -s -O pwd.c cmp a.out /usr/bin/pwd cp a.out /usr/bin/pwd cc -s -O quiz.c cmp a.out /usr/bin/quiz cp a.out /usr/bin/quiz cc -s -O rc.c cmp a.out /usr/bin/rc cp a.out /usr/bin/rc cc -s -O restor.c cmp a.out /bin/restor cp a.out /bin/restor as rew.s strip a.out cmp a.out /bin/rew cp a.out /bin/rew cc -s -O rm.c cmp a.out /bin/rm cp a.out /bin/rm as rmdir if(c >= '0' && c <= '9') u = u*10 + c-'0'; if(c < 0) goto ill; } while(c != ':'); c = getuid() & 0377; if(c != 0 && c != u) { write(2, "Permission denied\n", 18); goto out; } /* * copy out and back */ for(;;) { c = getc(pbuf); if(c < 0) { fflush(tbuf); close(pbuf[0]); close(tbuf[0]); tbuf[0] = open(tfile, 0); if(tbuf[0] < 0) { write(2, "Urk\n", 4); goto out; } pbuf[0] = creat(pfile, 0644); if(pbuf[0] < 0) { write(2, "Cannot create /etc/passwd\n",c,flag1 br 1b / reverse pass put in / foreward and reverse / block numbers mov $4017,tccm jsr pc,flag 1: mov $nword+3.,r4 2: clrb tcst clr (r5) jsr pc,flag dec r4 bne 2b clrb tcst clr (r5) mov bn,r0 jsr pc,comobv jsr pc,flag movb r1,tcst mov r0,(r5) jsr pc,flag dec bn blt check clrb tcst clr (r5) jsr pc,flag clrb tcst clr (r5) jsr pc,flag clrb tcst mov bn,(r5) jsr pc,flag clrb tcst clr (r5) jsr pc,flag clrb tcst clr (r5) jsr pc,flag br 1b / foreward pass / confirm blo.s strip a.out cmp a.out /bin/rmdir cp a.out /bin/rmdir cc -s -f -O sa.c cmp a.out /usr/bin/sa cp a.out /usr/bin/sa cc -s -n -O sh.c cmp a.out /bin/sh cp a.out /bin/sh cc -s -O size.c cmp a.out /bin/size cp a.out /bin/size cc -s -O sleep.c cmp a.out /usr/bin/sleep cp a.out /usr/bin/sleep cc -s -O sort.c cmp a.out /bin/sort cp a.out /bin/sort cc -s -O split.c cmp a.out /usr/bin/split cp a.out /usr/bin/split as strip.s strip a.out cmp a.out /bin/strip cp a.out /bin/strip cc -s -O stty.c cmp a.out /bin/stty cp a.out /bin/stty cc -s -O su.c cmp a.out /bin/su cp a.out /bin/su as sum.s strip a.out cmp a.out /bin/sum cp a.out /bin/sum cc -s -O sync.c cmp a.out /bin/sync cp a.out /bin/sync cc -s -O tbl.c -lp cmp a.out /usr/bin/tbl cp a.out /usr/bin/tbl cc -s -O tee.c cmp a.out /usr/bin/tee cp a.out /usr/bin/tee as time.s strip a.out cmp a.out /bin/time cp a.out /bin/time as tp?.s ld a.out -lc -l cmp a.out /bin/tp cp a.out /bin/tp cc -s -O tr.c cmp a.out /usr/bin/tr cp a.out /usr/bin/tr as tty.s ld -s i = dfile(temp[t1].beg); if((ct = temp[t1].ct) >= 8) { ct = 8; *curf = -1; } else { *curf = '\t'; } put(i,temp[t1].beg,ct); put(i,curf,curfl); if(cross) put(i,curs,cursl); conf(lno,4,lbuf); put(i,lbuf,5); break; case 2: i = dfile(curf+1); put(i,curf+1,curfl-1); if(cross) put(i,curs,cursl); else { conf(lno,4,lbuf); put(i,lbuf,5); } if((ct = temp[t1].ct) >= 8) { put(i,temp[t1].beg,8); put(i,&mone,1); : h = (h + h)%hsiz; } if(install) { if(++nsym >= hsiz) { printf("Too many symbols.\n"); dexit(); } hptr[h] = curb; length++; if((curb + length) >= ssiz) { printf("Too many characters in symbols.\n"); dexit(); } while(length--) symt[curb++] = *symbol++; symt[curb++] = install; params->curb = curb; params->nsym = nsym; } return(0); } conf(n,width,buf) char *buf; { auto i,a; i = width; while(i--) buf[i] = ' '; buf[(a = n/10)?conf(a,--width,buf):--width] = n%1 a.out -l cmp a.out /bin/tty cp a.out /bin/tty cc -s -f -O typo.c cmp a.out /usr/bin/typo cp a.out /usr/bin/typo cc -s -O umount.c cmp a.out /etc/umount cp a.out /etc/umount cc -s -O uniq.c cmp a.out /bin/uniq cp a.out /bin/uniq cc -s -f -O units.c cmp a.out /usr/bin/units cp a.out /usr/bin/units as update.s strip a.out cmp a.out /etc/update cp a.out /etc/update cc -s -O usort.c cmp a.out /usr/bin/usort cp a.out /usr/bin/usort cc -s -O wall.c cmp a.out /etc/wall cp a.out /etc/wall cc -s -O wc.c cmp } else { put(i,temp[t1].beg,ct); put(i,"\t",1); } if(cross) { conf(lno,4,lbuf); put(i,lbuf,5); } break; case 3: i = dfile(curs); put(i,curs,cursl); if((ct = temp[t1].ct) >= 8) { put(i,temp[t1].beg,8); *curf = -1; } else { put(i,temp[t1].beg,ct); *curf = '\t'; } put(i,curf,curfl); conf(lno,4,lbuf); put(i,lbuf,5); } put(i,line,l + 1); } t1 = 0; l = -1; lno++; cs = SKIP; return; } asym() { int i; char *p0 + '0'; return(++width); } comp(a,b) char *a; char *b; { a--; b--; while(*++a == *++b) if(*a == '\0') return(1); return(0); } semi() { if(cs == COLLECT) save(); if(only) return; xtrn = 0; if(!level) { ssw = 0; if(!type) { hlevel = 0; curs[0] = '_'; curs[1] = '\t'; cursl = 2; } type = 0; } cs = SKIP; } wspace() { if(c == ' ' || c == '\t') return(1); sav1(); fl--; return(0); } a.out /usr/bin/wc cp a.out /usr/bin/wc cc -s -O who.c cmp a.out /bin/who cp a.out /bin/who as write.s ld -s a.out -l cmp a.out /bin/write cp a.out /bin/write rm a.out ; if(cs == COLLECT) { if(cross) { p = temp[t1].beg; cursl = &line[l] - p; cursl = cursl>8?8:cursl; i = -1; while(++i < cursl) curs[i] = *p++; if(cursl < 8) curs[cursl++] = '\t'; else curs[cursl++] = -1; } save(); } cs = SKIP; } asw() { switch(gch[fl]) { case 0: if(cs == COLLECT) save(); cs = SKIP; flag[++fl] = &asw; gch[fl] = c; return(1); case '\'': if(c == '\\') { gch[fl] = c; return(1); } break; case '"': gch[fl] = '/ C library -- write / nwritten = write(file, buffer, count); / / nwritten == -1 means error .globl _write, cerror _write: mov r5,-(sp) mov sp,r5 mov 4(r5),r0 mov 6(r5),0f mov 8(r5),0f+2 sys 0; 9f bec 1f jmp cerror 1: mov (sp)+,r5 rts pc .data 9: sys write; 0:..; .. ...acts.cdr.oacrpost.c`dr.cl.outacts.oput.o\put.cPupost.ca.outa.out\''; if(c == '\\') { flag[++fl] = &asw; gch[fl] = c; return(1); } return(1); case '<': if(c == '\n') out(); if(c == '\\') { flag[++fl] = &asw; gch[fl] = c; return(1); } if(c != '>') return(1); break; case '/': if(c != '\n') return(1); case '\\': if(c == '\n') out(); } fl--; return(1); } csw() { if(cs == COLLECT) save(); switch(gch[fl]) { case 0: if(c == '*') if(line[l - 1] != '/') return(1); gch[++fl] = c; flag[fl/ C library -- wait / pid = wait(); / or, / pid = wait(&status); / / pid == -1 if error / status indicates fate of process, if given .globl _wait, _nargs, cerror _wait: mov r5,-(sp) mov sp,r5 jsr pc,_nargs mov r0,-(sp) sys wait bec 1f tst (sp)+ jmp cerror 1: tst (sp)+ beq 2f mov r1,*4(r5) / status return 2: mov (sp)+,r5 rts pc    ] = &csw; return(1); case '*': if(c == '\n') out(); if(c == '/' && line[l - 1] == '*') break; return(1); case '\'': case '"': if(c == gch[fl]) break; if(c == '\\') { gch[++fl] = c; flag[fl] = &csw; } return(1); case '\\': break; } fl--; return(1); } incl() { /* printf("incl: l = %d hl = %d dl = %d\n",level,hlevel,dlevel);/*DEBUG*/ if(cs == COLLECT) save(); if(hlevel) { hlevel = 0; level++; } else { dlevel++; } cs = SKIP; } decl() { /*int optr; char obuf[512]; int nflush; put(string,n) char *string; { extern utmp; int i; char *o; /*printf("%d %c %d\n",fil,*string,n);/*DEBUG*/ string--; if((i = optr + n - 512) >= 0) { n =- i; o = &obuf[optr] -1; while(--n >= 0) *++o = *++string; optr = 512; flsh(1); n = i; } o = &obuf[optr] - 1; optr =+ n; while(--n >= 0) { *++o = *++string; } return(0); } flsh(fil) { extern tp[],utmp; if(optr <= 0) return(optr); nflush++; if(write(tp[0],obuf,optr) != optr) re# # include "../mcons.h" # include "../ccmn.h" # define SKIP 0 # define COLLECT 1 # define SKIP2 2 int cross 1; int order 1; char mone -1; coll() { cs = COLLECT; temp[t1].beg = &line[l]; return; } save() { extern wspace(); line[l] = '\0'; temp[t1].ct = &line[l] - temp[t1].beg; temp[t1].term = c; if((c == ' ' || c == '\t') && cflag) { gch[++fl] = mone; flag[fl] = &wspace; } else { sav1(); } return; } sav1() { extern only; struct tempent *ptr; int a,tt,val; if(cflag && c == '(' &&  printf("decl: l = %d hl = %d dl = %d\n",level,hlevel,dlevel);/*DEBUG*/ if(cs == COLLECT) save(); cs = SKIP; if(dlevel) { dlevel--; return; } if(--level > 0) return; curs[0] = '_'; curs[1] = '\t'; cursl = 2; level = 0; return; } csym() { int i; char *p; /* printf("csym: l = %d hl = %d dl = %d\n",level,hlevel,dlevel);/*DEBUG*/ p = temp[t1].beg; if(cs == COLLECT && level == 0) { if(cross) { cursl = temp[t1].ct; cursl = cursl>8?8:cursl; i = -1; while(++i < cursl) curs[i] =turn(-1); optr = 0; return(0); } level == 0) csym(); cs = SKIP; ptr = &temp[t1]; val = search(ptr->beg,ptr->ct,&itab,0); if(xsw) { switch(val) { case 0: if((!level&&!hlevel)||(c == '(')||xtrn || ssw) { search(ptr->beg,ptr->ct,&xtab,1); goto yes; } else { if(search(ptr->beg,ptr->ct,&xtab,0)) goto yes; } goto no; case 1: goto no; case 2: xtrn = 1; goto no; case 3: if(hlevel) type = 1; if(!level&&!hlevel) ssw = 1; goto no; case 4: if(hlevel) type = 1; goto no;  *p++; if(cursl < 8) curs[cursl++] = '\t'; else curs[cursl++] = -1; } hlevel = 1; } cs = SKIP; } dfile(a) char *a; { if(*a < 'c') return(0); if(*a < 'h') return(1); if(*a < 'r') return(2); return(3); } sk2() { cs = SKIP2; } sk() { cs = SKIP; } tabs() { if(l == 0) l = -1; } search(symbol,length,params,install) char *symbol; int length; struct htab *params; int install; { char *sp,*p; static int curb,*hptr,hsiz,nsym,ssiz; static char *symt; auto h,i,j,k; if(hptr !=/ C library -- unlink / error = unlink(string); / .globl _unlink, cerror _unlink: mov r5,-(sp) mov sp,r5 mov 4(r5),0f sys 0; 9f bec 1f jmp cerror 1: clr r0 mov (sp)+,r5 rts pc .data 9: sys unlink; 0:..  } } if(hlevel && (val == 4 || val == 3)) type = 1; if(!val == !only) goto yes; no: *(ptr->beg + ptr->ct) = ptr->term; return(0); yes: tt = t1; while(tt) if(comp(ptr->beg,temp[--tt].beg)) goto no; t1++; return(1); } out() { auto i,ct; if(cs == COLLECT) save(); ct = t1; while(ct--) temp[ct].beg[temp[ct].ct] = temp[ct].term; while(t1--) { /*printf("t1 = %d beg = %d ct = %d\n",t1,temp[t1].beg,temp[t1].ct); /* DEBUG */ switch(order) { case 1: if(utmp) i = 0; else  params->hptr) { hptr = params->hptr; hsiz = params->hsiz; symt = params->symt; ssiz = params->ssiz; curb = params->curb; nsym = params->nsym; } symbol[length] = '\0'; sp = symbol; i = length; h = 1; while(i--) h =* *sp++; if(h == 0100000) { h = 1; } else { h = h<0?(-h)%hsiz:h%hsiz; } if(h == 0) h++; /* printf("%s %d\n",symbol,h); /*DEBUG*/ while((p = &symt[hptr[h]]) > symt) { j = length + 2; sp = symbol; while(--j) { if(*p++ != *sp++) goto no; } return(*p); no/ C library -- umount/ .globl _umount .globl cerror indir = 0 .comm _errno,2 _umount: mov r5,-(sp) mov sp,r5 mov 4(sp),0f sys indir; 9f bec 1f jmp cerror 1: clr r0 mov (sp)+,r5 rts pc .data 9: sys umount; 0:.. / C library -- times .globl _times times = 43. _times: mov r5,-(sp) mov sp,r5 mov 4(r5),0f sys 0; 9f mov (sp)+,r5 rts pc .data 9: sys times; 0:.. / / / conjg fortran function .globl conjg. .globl rval8p .globl retrn .globl temp conjg.: temp rval8p; 2 .+2 setf movf (sp)+,r0 movf r0,temp movf (sp)+,r0 negf r0 movf r0,temp+4 jmp retrn / / / alog10 & dlog10 fortran functions .globl dlog10. .globl alog10. .globl log .globl retrn .globl rerr .globl temp dlog10.:temp .+2 setd br 1f alog10.:temp .+2 setf 1: movf *2(r3),r0 jsr pc,log bes 1f mulf const,r0 movf r0,temp jmp retrn 1: jsr r5,rerr; 1 const: 37736;55730;124467;24146  function dccos(z1) double complex dccos, z1, z2 double precision dummy(2), a, b, c, d equivalence (a,z2,dummy(1)), (b,dummy(2)) z2 = z1 c = dexp(b) d = 1.0d0/c b = dsin(a)*(d-c)/2.0d0 a = dcos(a)*(c+d)/2.0d0 dccos = z2 return end / / / cmplx fortran function .globl cmplx. .globl dcmplx. .globl retrn .globl temp .globl rerr dcmplx.:temp .+2 setd br 1f cmplx.: temp .+2 setf 1: cmp *2(sp),$2 bne 1f mov r3,r1 tst (r1)+ movf *(r1)+,r0 movf *(r1)+,r1 mov $temp,r1 movf r0,(r1)+ movf r1,(r1)+ jmp retrn 1: jsr r5,rerr; 6. / / / alog & log fortran functions .globl alog. .globl dlog. .globl log .globl retrn .globl rerr .globl temp dlog.: temp .+2 setd br 1f alog.: temp .+2 setf 1: seti movf *2(r3),r0 jsr pc,log bes 1f movf r0,temp jmp retrn 1: jsr r5,rerr; 1  function dcsin(z1) double complex dcsin, z1, z2 double precision dummy(2), a, b, c, d equivalence (a,z2,dummy(1)), (b,dummy(2)) z2 = z1 c = dexp(b) d = 1.0d0/c b = dcos(a)*(c-d)/2.0d0 a = dsin(a)*(c+d)/2.0d0 dcsin = z2 return end / / / cexp fortran function .globl cexp. .globl rval8p .globl retrn .globl temp .globl rerr .globl exp .globl sin .globl cos cexp.: temp rval8p; 2 .+2 setf movf (sp)+,r0 jsr pc,exp bes 1f movf r0,temp movf (sp),r0 jsr pc,sin mulf temp,r0 movf r0,temp+4 movf (sp)+,r0 jsr pc,cos mulf temp,r0 movf r0,temp jmp retrn 1: jsr r5,rerr; 5. / / / dble fortran function .globl dble. .globl rval4p .globl lval .globl r4r8 .globl gas8 .globl retrn .globl temp dble.: temp lval; temp rval4p; 2 r4r8 gas8 retrn  function dcsqrt(z1) double complex dcsqrt, z1, z2 double precision dummy(2), a, b, c equivalence (a,z2,dummy(1)), (b,dummy(2)) z2 = z1 c = dcabs(z2) c = dsqrt(c) b = datan2(b, a)/2.0d0 a = c*dcos(b) b = c*dsin(b) dcsqrt = z2 return end / / / cabs fortran function .globl cabs. .globl dcabs. .globl sqrt .globl retrn .globl rerr .globl temp dcabs.: temp .+2 setd br 1f cabs.: temp .+2 setf 1: mov 2(r3),r1 movf (r1)+,r0 movf (r1)+,r1 jsr pc,hypot bes 1f movf r0,temp jmp retrn 1: jsr r5,rerr; 4 hypot: movf fr1,-(sp) absf fr0 absf fr1 cmpf fr0,fr1 cfcc bne 1f movf $one,fr0 br 3f 1: blt 2f movf fr0,-(sp) movf fr1,fr0 movf (sp)+,fr1 2: divf fr1,fr0 mulf fr0,fr0 3: addf $one,fr0 jsr pc,sqrt mulf fr1,fr0 cfcc mov/ / / min1, amin1 & dmin1 fortran functions .globl amin1. .globl dmin1. .globl min1. .globl retrn .globl temp min1.: temp .+2 setl setf mov pc,r2 br 2f dmin1.: temp .+2 setd br 1f amin1.: temp .+2 setf 1: clr r2 2: mov *2(sp),r0 / arg count mov r3,r1 tst (r1)+ / argpp movf *(r1)+,r1 br 2f 1: movf *(r1)+,r0 cmpf r0,r1 cfcc bge 2f movf r0,r1 2: dec r0 bgt 1b tst r2 bne 1f movf r1,temp br 2f 1: movfi r1,temp 2: jmp retrn / / / float fortran function .globl float. .globl rval4p .globl lval .globl gas4 .globl i4r4 .globl retrn .globl temp float.: temp lval; temp rval4p; 2 i4r4 gas4 retrn f (sp)+,fr1 rts pc one = 40200 / / / exp & dexp fortran functions .globl exp. .globl dexp. .globl exp .globl retrn .globl rerr .globl temp dexp.: temp .+2 setd br 1f exp.: temp .+2 setf 1: seti movf *2(r3),r0 jsr pc,exp bes 1f movf r0,temp jmp retrn 1: jsr r5,rerr; 8. / / / dimag fortran function .globl dimag. .globl rval16p .globl retrn .globl temp dimag.: temp rval16p; 2 .+2 setd tstf (sp)+ movf (sp)+,r0 movf r0,temp jmp retrn / / / atan2 & datan2 fortran functions .globl atan2. .globl datan2. .globl retrn .globl rerr .globl temp .globl atan2 datan2.: temp .+2 setd br 1f atan2.: temp .+2 setf 1: cmp *2(sp),$2 bne 1f movf *2(r3),r0 movf *4(r3),r1 jsr pc,atan2 movf r0,temp jmp retrn 1: jsr r5,rerr; 3 / / / aimag fortran function .globl aimag. .globl rval8p .globl retrn .globl temp aimag.: temp rval8p; 2 .+2 setf tstf (sp)+ movf (sp)+,r0 movf r0,temp jmp retrn / / / dim fortran function .globl dim. .globl retrn .globl temp .globl rerr / dim.: temp .+2 setf cmp *2(sp),$2 bne 2f movf *2(r3),r0 subf *4(r3),r0 cfcc bge 1f clrf r0 1: movf r0,temp jmp retrn 2: jsr r5,rerr; 7. / / / max1, amax1 & dmax1 fortran functions .globl amax1. .globl dmax1. .globl max1. .globl retrn .globl temp max1.: temp .+2 setl setf mov pc,r2 / integer flag br 2f dmax1.: temp .+2 setd br 1f amax1.: temp .+2 setf 1: clr r2 / integer flag 2: mov *2(sp),r0 / arg count mov r3,r1 tst (r1)+ / argpp movf *(r1)+,r1 br 2f 1: movf *(r1)+,r0 cmpf r0,r1 cfcc ble 2f movf r0,r1 2: dec r0 bgt 1b tst r2 bne 1f movf r1,temp br 2f 1: movfi r1,temp 2: jmp retrn / / / abs & dabs fortran functions .globl abs. .globl dabs. .globl retrn .globl temp dabs.: temp .+2 setd br 1f abs.: temp .+2 setf 1: movf *2(r3),r0 absf r0 movf r0,temp jmp retrn / / / cos & dcos fortran functions .globl cos. .globl dcos. .globl cos .globl retrn .globl temp dcos.: temp .+2 setd br 1f cos.: temp .+2 setf 1: movf *2(r3),r0 jsr pc,cos movf r0,temp jmp retrn / / / max0 & amax0 fortran functions .globl amax0. .globl max0. .globl retrn .globl temp max0.: temp .+2 mov pc,r2 br 1f amax0.: temp .+2 clr r2 1: setf setl mov *2(sp),r0 / arg count mov r3,r1 tst (r1)+ / argpp movif *(r1)+,r1 br 2f 1: movif *(r1)+,r0 cmpf r0,r1 cfcc ble 2f movf r0,r1 2: dec r0 bgt 1b tst r2 bne 1f movf r1,temp br 2f 1: movfi r1,temp 2: jmp retrn / fortran to UNIX IO / .globl read. .globl write. .globl seek. .globl seek0. .globl open. .globl creat. .globl close. .globl errno. indir = 0 / integer function read(f, a, n) / integer f, n / logical*1 a(n) / same as C read.: temp rval4p; 2 / f i4i2 lvalp; 4 / a rval4p; 6 / n i4i2 .+2 mov (sp)+,9f+4 mov (sp)+,9f+2 mov (sp)+,r0 sys indir; 9f br ret .data 9: sys read; ..; .. .text / integer function read(f, a, n) / integer f, n / logical*1 a(n) / same as C write.: temp rval4p; 2 / f i4i2 lvalp; 4 / a rval4p; 6 / n i4i2 .+2 mov (sp)+,9f+4 mov (sp)+,9f+2 mov (sp)+,r0 sys indir; 9f br ret .data 9: sys write; ..; .. .text / integer function seek(f, o, b) / integer f, o, b / same as C seek.: temp rval4p; 2 / f i4i2 rval4p; 4 / o i4i2 rval4p; 6 / b i4i2 .+2 mov (sp)+,9f+4 mov (sp)+,9f+2 mov (sp)+,r0 sys indir; 9f br ret / integer function seek0(f, n) / integer f, n / same as seek(f, n, 0) / but with 24 bit `n' seek0.: temp rval4p; 2 / f i4i2 rval4p; 4 / n .+2 / rk05 disk driver rkda = 177412 mov dska,r1 clr r0 div $12.,r0 ash $4.,r0 bis r1,r0 mov $rkda,r1 mov r0,(r1) mov ba,-(r1) mov wc,-(r1) mov $iocom,-(r1) 1: tstb (r1) bpl 1b rts pc ,r4 1: mov (r5)+,(r4)+ cmp r4,$addr+16. blo 1b rts pc / routine to read in block / number specified by bno / after applying file system / mapping algorithm in inode. / bno is incremented, success / return is a skip, error (eof) / is direct return. rmblk: add $2,(sp) mov bno,r0 inc bno bit $LRG,mode bne 1f asl r0 mov addr(r0),r0 bne rblka 2: sub $2,(sp) rts pc / large algorithm / huge algorithm is not implemented 1: clr -(sp) movb r0,(sp) clrb r0 swab r0 asl r0 mov addr(r0),r0 beq 2b j mov (sp)+,r0 mov (sp),r1 bic $!777,(sp) ashc $-9.,r0 mov r1,9f+2 mov $3,9f+4 mov 2(sp),r0 sys indir; 9f / to block mov (sp)+,9f+2 mov $1,9f+4 mov (sp)+,r0 sys indir; 9f / to byte within block br ret .data 9: sys seek; ..; .. .text / integer function open(a, m) / logical*1 a(n) / integer m / same as C, name is ` ' terminated open.: temp lvalp; 2 / a rval4p; 4 / m i4i2 .+2 mov (sp)+,9f+4 mov (sp)+,r0 mov r0,9f+2 1: cmpb (r0)+,$' / bne 1b clrb -(r0) sys indir; 9f br ret .data 9: / / / atan & datan fortran functions .globl atan. .globl datan. .globl atan .globl retrn .globl temp datan.: temp .+2 setd br 1f atan.: temp .+2 setf 1: movf *2(r3),r0 jsr pc,atan movf r0,temp jmp retrn sr pc,rblka mov (sp)+,r0 asl r0 mov buf(r0),r0 beq 2b rblka: mov r0,dska br rblk ba: buf wc: -256. .bss end: inod = ..-1024. mode = inod addr = inod+8. buf = inod+32. bno = buf+514. dska = bno+2 names = dska+2 LRG = 10000 .text sys open; ..; .. .text / integer function creat(a, m) / logical*1 a(n) / integer m / same as C, name is ` ' terminated creat.: temp lvalp; 2 / a rval4p; 4 / m i4i2 .+2 mov (sp)+,9f+4 mov (sp)+,r0 mov r0,9f+2 1: cmpb (r0)+,$' / bne 1b clrb -(r0) sys indir; 9f br ret .data 9: sys creat; ..; .. .text / integer function close(f) / integer f / same as C close.: temp rval4p; 2 / f i4i2 .+2 mov (sp)+,r0 sys close ret: bec 1f mov r0,error mov $-1,r0 1: mov r0,temp+2 sxt temp jmp ret/ / / min0 & amin0 fortran functions .globl amin0. .globl min0. .globl retrn .globl temp min0.: temp .+2 mov pc,r2 br 1f amin0.: temp .+2 clr r2 1: setf setl mov *2(sp),r0 / arg count mov r3,r1 tst (r1)+ / argpp movif *(r1)+,r1 br 2f 1: movif *(r1)+,r0 cmpf r0,r1 cfcc bge 2f movf r0,r1 2: dec r0 bgt 1b tst r2 bne 1f movf r1,temp br 2f 1: movfi r1,temp 2: jmp retrn / / / idim fortran function .globl idim. .globl retrn .globl rerr .globl temp idim.: temp .+2 setd setl cmp *2(sp),$2 bne 2f movif *2(r3),r0 movif *4(r3),r1 subf r1,r0 cfcc bge 1f clrf r0 1: movfi r0,temp jmp retrn 2: jsr r5,rerr; 9. rn / error = errno / returns last error number errno.: temp .+2 mov error,r0 br ret .globl temp .globl retrn .globl rval4p .globl lvalp .globl i4i2 .bss error: .=.+2  function clog(z1) complex clog, z1, z2 dimension dummy(2) equivalence (a,z2,dummy(1)), (b,dummy(2)) z2 = z1 c = cabs(z2) b = atan2(b, a) a = alog(c) clog = z2 return end / / / amod & dmod fortran functions .globl amod. .globl dmod. .globl retrn one = 40200 .globl temp .globl rerr dmod.: temp .+2 setd br 1f amod.: temp .+2 setf 1: cmp *2(sp),$2 bne 1f movf *2(r3),r0 movf r0,r2 movf *4(r3),r1 divf r1,r2 modf $one,r2 mulf r1,r3 subf r3,r0 movf r0,temp jmp retrn 1: jsr r5,rerr; 2 # define PL 102 # define ESC 033 # define SI 017 # define SO 016 # define LINELN 800 char *page[PL]; char lbuff [LINELN], *line; main () { int c, i, j, ll, cp, mustwr; extern int fin, fout; fin = dup(0); fout = dup(1); for (ll=0; ll0) switch (c = getchar()) { case '\n': store (ll%PL); if (++ll >= mustwr) if (page[ll%PL] != 0) { printf ("%s\n",page[ll%PL]); mustwr++; free (page[ll%PL]); .globl length .globl position .globl w, r, a, l / / / routine to return the length of a string / / mov ...,r1 / jsr pc,length / mov r0,... / length: mov w(r1),r0 sub a(r1),r0 rts pc / / / routine to return the read pointer position / / mov ...,r1 / jsr pc,position / mov r0,... / position: mov r(r1),r0 sub a(r1),r0 rts pc .globl rewind .globl create .globl fsfile .globl w, r, a, l / / / routine to rewind read pointer of string / pointed to by r1 / / mov ...,r1 / jsr pc,rewind / rewind: mov a(r1),r(r1) rts pc / / routine to rewind write pointer of string / pointed to by r1 / / mov ...,r1 / jsr pc,create / create: mov a(r1),w(r1) mov a(r1),r(r1) rts pc / / / routine to copy read pointer of string to end of string / / mov ...,r1 / jsr pc,fsfile / fsfile: mov w(r1),r(r1) rts pc  page[ll%PL]=0; } fetch (ll%PL); cp = 0; continue; case '\0': continue; case ESC: c = getchar(); if (c == '7') { store(ll%PL); ll--; fetch (ll%PL); } else { outc (ESC, &line); outc (c, &line ); } continue; case '\r': line = lbuff; continue; case '\t': outc (' ', &line); cp = line-lbuff; while (cp++%8) outc(' ', &line); continue; default: outc(c, &line); } for (i=0; i0 || *(*lp) == '\b' || *(*lp) == ESC || **lp == SI || **lp == SO) { switch (*(*lp)) { case '\b': j++; (*lp)++; break; case '\0': *(*lp)++ = ' '; j--; break; case ESC: /* 'escape' */ (*lp) =+ 2; break; case SI: case SO: (*lp)++; break; default: (*lp)++; j--; break; } } if (c != ' ' || *(*lp) == '\0') *(*lp) = c; (*lp)++; } store (ll) { if (page[ll clr (r0)+ cmp r0,sp blo 2b / prompt / read in path name / breaking on '/' into 14 ch names mov $trvect,r5 mov $'@,r0 jsr pc,(r5) mov $names,r2 1: mov r2,r1 2: jsr pc,getc cmp r0,$'\n beq 1f cmp r0,$'/ beq 3f movb r0,(r1)+ br 2b 3: cmp r2,r1 beq 2b add $14.,r2 br 1b 1: / start of path name decoding / start with first name and root ino mov $names,r2 mov $1,r0 / get next inode 1: clr bno jsr pc,iget tst (r2) beq 1f / read next directory looking for next name 2: jsr pc,rmblk  function tanh(a) b = exp(a) c = 1.0/b tanh = (b-c)/(b+c) return end ] != 0) free (page[ll]); page[ll] = alloc ( leng (lbuff) + 2); copy (page[ll],lbuff); } fetch(ll) { int i; for (i=0; i < LINELN; i++) lbuff[i] = '\0'; copy (line=lbuff, page[ll]); } copy (s,t) char *s, *t; { if (t == 0) return (*s=0); while (*s++ = *t++); } leng (s) char *s; { int l; for (l=0; s[l]; l++); return (l); }  br start mov $buf,r1 3: mov r2,r3 mov r1,r4 add $16.,r1 tst (r4)+ beq 5f 4: cmpb (r3)+,(r4)+ bne 5f cmp r4,r1 blo 4b mov -16.(r1),r0 add $14.,r2 br 1b 5: cmp r1,$buf+512. blo 3b br 2b / last entry was found / read into 0. 1: clr r2 1: jsr pc,rmblk br callout mov $buf,r1 2: mov (r1)+,(r2)+ cmp r1,$buf+512. blo 2b br 1b / subroutine will read in inode / number specified in r0 iget: add $31.,r0 mov r0,r5 ash $-4.,r0 jsr pc,rblka bic $!17,r5 ash $5.,r5 add $buf,r5 mov $inod/ / / aint fortran function .globl aint. .globl temp one = 40200 .globl retrn aint.: temp .+2 setf movf *2(r3),r0 modf $one,r0 movf r1,temp jmp retrn  function csqrt(z1) complex csqrt, z1, z2 dimension dummy(2) equivalence (a,z2,dummy(1)), (b,dummy(2)) z2 = z1 c = cabs(z2) c = sqrt(c) b = atan2(b, a)/2.0 a = c*cos(b) b = c*sin(b) csqrt = z2 return end  jsr pc,compar bge one br zero bhis one br zero igt4: jsr pc,compar bgt one br zero bhi one br zero one: mov $1,(sp) jmp *(r4)+ zero: clr (sp) jmp *(r4)+ compar: mov (sp)+,r0 mov (sp)+,r1 mov (sp)+,r2 cmp (sp)+,r1 beq 1f jmp (r0) 1: cmp (sp),r2 jmp 4(r0) lor2: bis (sp)+,(sp) jmp *(r4)+ lan2: tst (sp)+ bne 1f clr (sp) 1: jmp *(r4)+ lnt2: tst (sp) beq one br zero ieq2: leq2: cmp (sp)+,(sp) beq one br zero ilt2: cmp (sp)+,(sp) bgt one br zero ile2: cmp (sp)+,(sp) r0 movfi fr0,-(sp) jmp *(r4)+  function ccos(z1) complex ccos, z1, z2 dimension dummy(2) equivalence (a,z2,dummy(1)), (b,dummy(2)) z2 = z1 c = exp(b) d = 1.0/c b = sin(a)*(d-c)/2.0 a = cos(a)*(c+d)/2.0 ccos = z2 return end bge one br zero igt2: cmp (sp)+,(sp) blt one br zero ige2: cmp (sp)+,(sp) ble one br zero ine2: lne2: cmp (sp)+,(sp) bne one br zero leq1: cmpb (sp)+,(sp) beq one br zero lne1: cmpb (sp)+,(sp) bne one br zero / / / r7 -- fortran runtime achk = 1 / 1 to check array bounds .globl lvalp .globl rval1p .globl rval2p .globl rval4p .globl rval8p .globl alval .globl alvalp .globl arval .globl arvalp .globl rerr lvalp: mov r3,r0 add (r4)+,r0 mov (r0)+,-(sp) jmp *(r4)+ rval1p: mov r3,r0 add (r4)+,r0 movb *(r0)+,-(sp) jmp *(r4)+ rval2p: mov r3,r0 add (r4)+,r0 mov *(r0)+,-(sp) jmp *(r4)+ rval4p: mov r3,r0 add (r4)+,r0 mov (r0),r0 cmp (r0)+,(r0)+ mov -(r0),-(sp) mov -(r0),-(sp) jmp *(r4)+ rval8p: / / / rtx -- last routine .globl ecore .bss ecore: / / / r3 -- comparisons .globl lif2 .globl lif1 .globl rif4 .globl iif2 .globl iif4 .globl rif8 lif2: lif1: tst (sp)+ bne 1f mov (r4),r4 jmp *(r4)+ 1: tst (r4)+ jmp *(r4)+ rif8: setd tstf (sp)+ cfcc br 2f iif4: rif4: mov (sp)+,r0 mov (sp)+,r1 tst r0 bne 2f tst r1 cln br 2f iif2: tst (sp)+ 2: bmi 1f beq 2f tst (r4)+ 2: tst (r4)+ 1: mov (r4),r4 jmp *(r4)+ setd mov r3,r0 add (r4)+,r0 movf *(r0)+,fr0 movf fr0,-(sp) jmp *(r4)+ alval: jsr r5,getsub; 1 mov (r4)+,-(sp) add r1,(sp) jmp *(r4)+ arvalp: jsr r5,getsub; 0 mov r3,r2 add (r4)+,r2 mov (r2),r2 br 1f arval: jsr r5,getsub; 1 mov (r4)+,r2 1: add r2,r1 mov -(r0),r2 asr r2 bcc 1f movb (r1),-(sp) jmp *(r4)+ 1: add (r0),r1 1: mov -(r1),-(sp) sob r2,1b jmp *(r4)+ getsub: tst (sp)+ mov (r4)+,r0 mov (r0)+,r2 clr r1 tst (r0)+ 1: tst (sp)+ dec (sp) add (sp)+,r1 mpy (r0)+,r1 sob r/ / / rd -- short list I/O do loop .globl slist1 .globl slist2 .globl slist3 .globl temp slist1: mov (r4)+,r0 mov (r0)+,r2 mov $1,r1 1: mpy (r0)+,r1 sob r2,1b mov $temp,r2 mov r1,(r2)+ clr (r2)+ mov (r0)+,(r2)+ jmp *(r4)+ slist2: mov (r4)+,r0 dec temp ble 1f mov r0,r4 1: jmp *(r4)+ slist3: mov $temp+2,r0 add (r0)+,(sp) add (r0),-(r0) jmp *(r4)+ / / / r4 -- short integer arithmetic .globl iad2 .globl isb2 .globl imp2 .globl idv2 .globl i2i4 .globl i1i4 .globl i4i2 .globl i4i1 .globl ing2 .globl rval2 .globl rval1 .globl l2l1 iad2: add (sp)+,(sp) jmp *(r4)+ isb2: sub (sp)+,(sp) jmp *(r4)+ imp2: mov (sp)+,r1 mul (sp)+,r1 mov r1,-(sp) jmp *(r4)+ idv2: mov 2(sp),r1 sxt r0 div (sp)+,r0 mov r0,(sp) jmp *(r4)+ i4i2: i4i1: tst (sp)+ jmp *(r4)+ i2i4: i1i4: tst (sp) sxt -(sp) jmp *(r4)+ ing2: neg (sp) jmp *(r4)+ rval2: mov *(r42,1b tst (r5)+ beq 2f mov r1,-(sp) mov -2(r4),r0 mov (r0)+,r2 inc r2 mov $1,r1 1: mpy (r0)+,r1 sob r2,1b .if achk cmp r1,(sp) bhi 1f jsr r5,rerr; 15. .endif 1: mov (sp)+,r1 2: jmp (r5) alvalp: jsr r5,getsub; 0 mov r3,r0 add (r4)+,r0 mov (r0),-(sp) add r1,(sp) jmp *(r4)+ / / / r1 -- fortran runtime .globl gas1 .globl gas2 .globl gas4 .globl gas8 .globl stop .globl lval .globl rval4 .globl rval8 .globl do1 .globl do12 .globl do14 .globl do2 .globl do22 .globl do24 .globl goto .globl cgoto .globl cagoto .globl agoto .globl rerr gas8: mov 8.(sp),r0 mov (sp)+,(r0)+ mov (sp)+,(r0)+ br 1f gas1: movb (sp)+,*(sp)+ jmp *(r4)+ gas2: mov (sp)+,*(sp)+ jmp *(r4)+ gas4: mov 4(sp),r0 1: mov (sp)+,(r0)+ mov (sp)+,(r0) tst (sp)+ jmp *(r4)+ stop: sys exit lval: mov (r)+,-(sp) jmp *(r4)+ rval1: movb *(r4)+,r0 mov r0,-(sp) l2l1: jmp *(r4)+ / / one = 40200 / r9 -- fortran runtime -- real**integer .globl ipi4 .globl rpi4 .globl rpi8 .globl rerr ipi4: setf setl movif 4(sp),fr0 movf fr0,4(sp) jsr r5,1f movfi fr1,-(sp) jmp *(r4)+ rpi4: setf br 2f rpi8: setd 2: jsr r5,1f movf fr1,-(sp) jmp *(r4)+ 1: cmp (sp)+,(sp)+ / jsr + msp of i4 mov (sp)+,r0 movf $one,fr1 movf (sp)+,fr0 tst r0 bgt 1f cfcc beq 9f tst r0 beq 3f divf fr0,fr1 movf fr1,fr0 neg r0 movf $one,fr1 1: asr r0 bcc 2f mulf fr0,fr1 2: tst r0 beq 3f m4)+,-(sp) jmp *(r4)+ rval8: mov (r4)+,r0 add $8.,r0 mov -(r0),-(sp) mov -(r0),-(sp) mov -(r0),-(sp) mov -(r0),-(sp) jmp *(r4)+ rval4: mov (r4)+,r0 mov 2(r0),-(sp) mov (r0),-(sp) jmp *(r4)+ do22: mov (sp)+,r1 br 1f do12: mov $1,r1 1: mov (sp)+,r2 mov (sp)+,r0 add r1,(r0) cmp (r0),r2 bgt goto tst (r4)+ jmp *(r4)+ do24: do2: mov (sp)+,r2 mov (sp)+,r1 br 1f do14: do1: clr r2 mov $1,r1 1: mov 4(sp),r0 add r1,2(r0) adc r2 add r2,(r0) cmp (r0)+,(sp)+ bgt 1f blt 2f cmp (r0),/ / / r5 -- long integer arithmetic .globl iad4 .globl isb4 .globl imp4 .globl idv4 .globl ing4 .globl rerr iad4: jsr pc,load addf fr0,fr1 br store isb4: jsr pc,load subf fr0,fr1 br store imp4: jsr pc,load mulf fr0,fr1 br store idv4: jsr pc,load divf fr0,fr1 store: movfi fr1,-(sp) jmp *(r4)+ load: mov (sp)+,r0 setd setl movif (sp)+,fr0 movif (sp)+,fr1 jmp (r0) ing4: neg (sp) neg 2(sp) sbc (sp) jmp *(r4)+ ulf fr0,fr0 br 1b 3: jmp (r5) 9: jsr r5, rerr; 17. (sp) bhi 1f 2: cmp (sp)+,(sp)+ tst (r4)+ jmp *(r4)+ 1: cmp (sp)+,(sp)+ goto: mov (r4),r4 jmp *(r4)+ cgoto: tst (sp)+ mov (sp)+,r0 asl r0 add r4,r0 1: tst (r4)+ beq gotoe cmp r0,r4 bne 1b mov -(r0),r4 jmp *(r4)+ cagoto: tst (sp)+ mov (sp)+,r0 1: tst (r4) beq gotoe cmp r0,(r4)+ bne 1b mov r0,r4 jmp *(r4)+ agoto: tst (sp)+ mov (sp)+,r4 jmp *(r4)+ gotoe: jsr r5,rerr; 14. / / / r6 -- real arithmetic .globl rad4 .globl rad8 .globl rsb4 .globl rsb8 .globl rmp4 .globl rmp8 .globl rdv4 .globl rdv8 .globl rng4 .globl rng8 .globl r4r8 .globl r8r4 .globl i4r4 .globl i2r4 .globl r4i4 .globl r8i2 .globl i2r8 .globl r4i2 .globl i4r8 .globl r8i4 .globl rerr rad8: setd br 1f rad4: setf 1: movf (sp)+,fr0 addf (sp)+,fr0 br store rsb8: setd br 1f rsb4: setf 1: movf (sp)+,fr0 negf fr0 addf (sp)+,fr0 br store rmp8: setd br 1f rmp4: setf 1: movf (sp)+,fr0 mulf (sp)+,fr0/ / / r8 - fortran runtime -- powers of integers .globl ipi2 ipi2: tst (sp)+ mov (sp)+,r0 bge 1f clr (sp) jmp *(r4)+ 1: mov (sp)+,r1 mov r3,-(sp) mov $1,r3 1: tst r0 beq 1f asr r0 bcc 2f mpy r1,r3 2: mpy r1,r1 br 1b 1: mov r3,r1 mov (sp)+,r3 mov r1,-(sp) jmp *(r4)+ / / / r2 -- comparison of 4-byte integers .globl ilt4 .globl ile4 .globl ieq4 .globl ine4 .globl ige4 .globl igt4 .globl lan2 .globl lor2 .globl lnt2 .globl ieq2 .globl ile2 .globl igt2 .globl ige2 .globl leq2 .globl ine2 .globl ilt2 .globl lne2 .globl leq1 .globl lne1 ilt4: jsr pc,compar blt one br zero blo one br zero ile4: jsr pc,compar ble one br zero blos one br zero ieq4: jsr pc,compar beq one br zero beq one br zero ine4: jsr pc,compar bne one br zero bne one br zero ige4:  br store rdv8: setd br 1f rdv4: setf 1: movf (sp)+,fr1 movf (sp)+,fr0 divf fr1,fr0 store: movf fr0,-(sp) jmp *(r4)+ rng8: setd br 1f rng4: setf 1: negf (sp) jmp *(r4)+ r8r4: setd br 1f r4r8: setf 1: movf (sp)+,fr0 movfo fr0,-(sp) jmp *(r4)+ i2r8: seti br 1f i4r8: setl 1: setd br 2f i2r4: seti br 1f i4r4: setl 1: setf 2: movif (sp)+,fr0 movf fr0,-(sp) jmp *(r4)+ r8i2: seti br 1f r8i4: setl 1: setd br 2f r4i2: seti br 1f r4i4: setl 1: setf 2: movf (sp)+,f/ / / rb -- funct/subr stuff .globl call .globl callp .globl retrn .globl stsp callp: mov (r4)+,r0 add r3,r0 mov (r0),r0 br 1f call: mov (r4)+,r0 1: mov r3,-(sp) mov (r4)+,r3 mov r4,-(sp) mov r0,r4 mov (r4)+,-(sp) / lv of funct jmp *(r4)+ retrn: mov r3,r0 mov (sp)+,r1 / lv of funct mov (sp)+,r4 mov (sp)+,r3 mov (r0),sp tst (r4)+ / arg count mov (r4)+,r0 / return byte count inc r0 bic $1,r0 add r0,r1 1: sub $2,r0 blt 1f mov -(r1),-(sp) br 1b 1: jmp *(r4)+ stsp: mov sp,*(r4)+ jmp *(r4)+ as suftab.s strip a.out cmp a.out /usr/lib/suftab cp a.out /usr/lib/suftab as roff?.s ld -s a.out -l cmp a.out /usr/bin/roff cp a.out /usr/bin/roff as nroff[1-5].s roff7.s nroff8.s ld -s -n a.out cmp a.out /usr/bin/nroff cp a.out /usr/bin/nroff yacc ne.g cc -s -O -n ne*.c -ly cmp a.out /usr/bin/neqn cp a.out /usr/bin/neqn rm y.tab.c *.o a.out  dec (sp) asl (sp) asl (sp) asl (sp) cmp (sp),(r4)+ .if achk bhis 9b .endif add (r4)+,(sp) movf *(sp)+,fr0 movf fr0,-(sp) jmp *(r4)+ gar16: setd tst (sp)+ dec (sp) mov (sp)+,r0 asl r0 asl r0 asl r0 asl r0 cmp r0,(r4)+ .if achk bhis 9b .endif add (r4)+,r0 movf (r0)+,fr0 movf (r0)+,fr1 movf fr1,-(sp) movf fr0,-(sp) jmp *(r4)+ / / / ra -- fortran runtime -- real ** real .globl rpr4 .globl rpr8 .globl log .globl exp .globl rerr rpr8: setd br 1f rpr4: setf 1: seti movf (sp)+,fr1 movf (sp)+,fr0 cfcc beq 3f / 0**x movf fr1,-(sp) jsr pc,log bes error mulf (sp)+,fr0 jsr pc,exp bes error 2: movf fr0,-(sp) jmp *(r4)+ 3: tstf r1 cfcc bgt 2b error: jsr r5,rerr; 17. / / / re -- comparison of 8-byte quantities .globl rle8 .globl rlt8 .globl req8 .globl rne8 .globl rge8 .globl rgt8 rlt8: jsr pc,compar blt one br zero rle8: jsr pc,compar ble one br zero req8: jsr pc,compar beq one br zero rne8: jsr pc,compar bne one br zero rge8: jsr pc,compar bge one br zero rgt8: jsr pc,compar bgt one br zero one: mov $1,-(sp) jmp *(r4)+ zero: clr -(sp) jmp *(r4)+ compar: setd mov (sp)+,r0 movf (sp)+,fr0 cmpf (sp)+,fr0 cfcc jmp (r0) / / / Fortran binary I/O .globl iowu .globl ioru .globl rewi .globl enfl iowu: tst (sp)+ mov (sp)+,r1 / unit number jsr r5,setio; 42 1: jsr r5,getitm br 1f movb ilen,r1 mov ilval,r2 2: movb (r2)+,r0 jsr r5,fputc sob r1,2b br 1b 1: jsr r5,fflush jmp *(r4)+ ioru: tst (sp)+ mov (sp)+,r1 / unit number jsr r5,setio; 41 clr nlflg mov pc,binflg 1: jsr r5,getitm br 1f movb ilen,r1 mov ilval,r2 2: jsr r5,fgetc movb r0,(r2)+ sob r1,2b br 1b 1: jmp *(r4)+ rewi: enfl: tst (sp)+ mov/ / / rc -- complex arithmetic .globl c8c16 .globl c16c8 .globl i4c8 .globl r4c8 .globl r8c8 .globl i4c16 .globl r4c16 .globl r8c16 .globl cad8 .globl csb8 .globl cmp8 .globl cdv8 .globl cng8 .globl cad16 .globl csb16 .globl cmp16 .globl cdv16 .globl cng16 .globl rval16 .globl rval16p .globl gas16 .globl ceq8 .globl cne8 .globl ceq16 .globl cne16 .globl cpi8 .globl cpi16 one = 040200 a = r2 b = r3 c = r4 d = r5 e = r0 f = r1 gas16: mov 16.(sp),r0 setd movf (sp)+,a movf (sp)+,b tst (sp)+ movf a,(/ / / rf -- real comparisons .globl rlt4 .globl rle4 .globl req4 .globl rne4 .globl rge4 .globl rgt4 rlt4: jsr pc,compar blt one br zero rle4: jsr pc,compar ble one br zero req4: jsr pc,compar beq one br zero rne4: jsr pc,compar bne one br zero rge4: jsr pc,compar bge one br zero rgt4: jsr pc,compar bgt one br zero one: mov $1,-(sp) jmp *(r4)+ zero: clr -(sp) jmp *(r4)+ compar: mov (sp)+,r0 setf movf (sp)+,r0 cmpf (sp)+,r0 cfcc jmp (r0)  (sp)+,r1 / unit number jsr r5,chkunit clrb utable(r1) asl r1 mov *btable(r1),r0 cmp r0,$1 bhi 1f sys seek; 0; 0 jmp *(r4)+ 1: sys close jmp *(r4)+ r0)+ movf b,(r0)+ jmp *(r4)+ rval16p: mov r3,r0 add (r4)+,r0 mov (r0),r0 br 1f rval16: mov (r4)+,r0 1: setd movf (r0)+,a movf (r0)+,b movf b,-(sp) movf a,-(sp) jmp *(r4)+ cad16: setd br 1f cad8: setf 1: jsr pc,garg addf a,e addf b,f br sarg csb16: setd br 1f csb8: setf 1: jsr pc,garg subf a,e negf e subf b,f negf f br sarg cmp16: setd br 1f cmp8: setf 1: jsr pc,garg mulf a,e mulf b,f subf f,e mulf d,a mulf c,b movf a,f addf b,f sarg: movf f,-(sp) movf e,-(s/ / / rg -- assignments .globl gmv1 .globl gmv2 .globl gmv4 .globl gmv8 .globl gmv16 .globl stst gmv1: movb (sp)+,*(r4)+ jmp *(r4)+ gmv2: stst: mov (sp)+,*(r4)+ jmp *(r4)+ gmv4: mov (r4)+,r0 mov (sp)+,(r0)+ mov (sp)+,(r0)+ jmp *(r4)+ gmv8: setd movf (sp)+,fr0 movf fr0,*(r4)+ jmp *(r4)+ gmv16: setd mov (r4)+,r0 movf (sp)+,fr0 movf fr0,(r0)+ movf (sp)+,fr0 movf fr0,(r0)+ jmp *(r4)+ .globl gmv1p .globl gmv2p .globl gmv4p .globl gmv8p .globl gmv16p gmv1p: mov (r4)+,r0 add r3,r0 mo/ / / iox -- io variables .globl _nocr .globl utable .globl btable .globl ftable .globl _end .globl formp bufp: _end filnam: ; .even .bss gflg: .=.+2 formp: .=.+2 rdflg: .=.+2 nflg: .=.+2 unit: .=.+2 buffer: .=.+2 slcnt: .=.+2 itype: .=.+1 ilen: .=.+1 ilval: .=.+2 width: .=.+2 twidth: .=.+2 ndig: .=.+2 pbuf: .=.+10 ppar: .=.+2 llp: .=.+2 llpcnt: .=.+2 itmflg: .=.+2 nspace: .=.+2 gcflg: .=.+2 binflg: .=.+2 utable: .=.+20. btable: .=.+40. ftable: .=.+2. rep: .=.+2 scale: .=.+2 itmfnd: .=.+2p) jmp *(r4)+ cdv16: setd br 1f cdv8: setf 1: divide: jsr pc,garg absf e absf f cmpf e,f cfcc blt 1f / algorithm #1 |c| > |d| movf d,e divf c,e / r = d/c movf d,f mulf e,f addf c,f / x = c+rd movf f,c movf a,f mulf e,f negf f addf b,f mulf b,e addf a,e divf c,e divf c,f br sarg / algorithm #2 |c| < |d| 1: movf c,e divf d,e / r = c/d movf c,f mulf e,f addf d,f / x = d+rc movf f,c movf b,f mulf e,f subf a,f mulf a,e addf b,e divf c,e divf c,f br sarg cng16: svb (sp)+,*(r0)+ jmp *(r4)+ gmv2p: mov (r4)+,r0 add r3,r0 mov (sp)+,*(r0)+ jmp *(r4)+ gmv4p: mov (r4)+,r0 add r3,r0 mov (r0),r0 mov (sp)+,(r0)+ mov (sp)+,(r0)+ jmp *(r4)+ gmv8p: setd mov (r4)+,r0 add r3,r0 movf (sp)+,fr0 movf fr0,*(r0)+ jmp *(r4)+ gmv16p: setd mov (r4)+,r0 add r3,r0 mov (r0),r0 movf (sp)+,fr0 movf fr0,(r0)+ movf (sp)+,fr0 movf fr0,(r0)+ jmp *(r4)+  ngflg: .=.+2 nlflg: .=.+2 _nocr: .=.+2 etd br 1f cng8: setf 1: movf (sp)+,a negf a negf (sp) movf a,-(sp) jmp *(r4)+ / setup the following registers / (a,bi) +o (c,di) -> (e+fi) / a,b,c,d are input / e,f are output and also contain / c,d on input garg: mov (sp)+,r0 movf (sp)+,e movf e,c movf (sp)+,f movf f,d movf (sp)+,a movf (sp)+,b jmp (r0) i4c8: setf br 1f i4c16: setd 1: setl movif (sp)+,fr0 br 2f r4c8: setf br 1f r8c16: setd 1: movf (sp)+,fr0 br 2f r4c16: setd br 1f r8c8: setf 1: movof (sp)+,fr0 2: cl/ / .globl main .globl temp .globl rerr .globl fptrap .comm erret,2 .comm argp,2 ldfps = 170100^tst sys signal; 4; fptrap ldfps $5400 mov sp,argp mov $main,r4 jmp *(r4)+ rerr: mov (r5)+,r1 tst erret beq 1f jsr pc,erret 1: mov $temp,r2 jsr r5,1f movb $'\n,(r2)+ sub $mesg,r2 mov r2,0f mov $2,r0 sys write; mesg; 0:.. sys exit 1: clr r0 div $10.,r0 mov r1,-(sp) mov r0,r1 beq 1f jsr r5,1b 1: mov (sp)+,r0 add $'0,r0 movb r0,(r2)+ rts r5 mesg: temp: .=.+16. / / / io6 -- input conversions /.globl aicv /.globl gicv / /.globl ilval /.globl width /.globl ilen /.globl fgetc /.globl itype /.globl nlflg /.globl gcflg aicv: mov ilval,r1 movb width,r2 movb ilen,r0 mov r0,-(sp) 1: cmp r2,(sp) ble 1f jsr r5,fgetc dec r2 br 1b 1: tst r2 ble 1f jsr r5,fgetc movb r0,(r1)+ dec r2 dec (sp) br 1b 1: tst (sp) ble 1f movb $' ,(r1)+ dec (sp) br 1b 1: tst (sp)+ rts r5 licv: mov width,twidth setd seti clrf fr0 1: jsr r5,fgetcn cmp r0,$'t beq 2f crf -(sp) movf fr0,-(sp) jmp *(r4)+ c16c8: setd br 1f c8c16: setf 1: movf (sp)+,r0 movf (sp)+,r1 movfo r1,-(sp) movfo r0,-(sp) jmp *(r4)+ ceq16: setd br 1f ceq8: setf 1: mov $1,r1 br 2f cne16: setd br 1f cne8: setf 1: clr r1 2: jsr pc,garg cmpf c,a cfcc bne 1f cmpf d,b cfcc beq 2f 1: inc r1 bic $2,r1 2: mov r1,-(sp) jmp *(r4)+ cpi8: setf br 1f cpi16: setd 1: clr r0 tst (sp)+ mov (sp)+,r1 bge 1f inc r0 neg r1 1: movf (sp)+,fr0 movf fr0,fr4 movf (sp)+,fr0 movf / / / rh -- simple array l/r values achk = 1 / 1 to check array bounds .globl gal1 .globl gal2 .globl gal4 .globl gal8 .globl gal16 .globl gar1 .globl gar2 .globl gar4 .globl gar8 .globl gar16 .globl rerr gal1: tst (sp)+ dec (sp) br 1f gal2: tst (sp)+ dec (sp) asl (sp) br 1f gal4: tst (sp)+ dec (sp) asl (sp) asl (sp) br 1f gal8: tst (sp)+ dec (sp) asl (sp) asl (sp) asl (sp) br 1f gal16: tst (sp)+ dec (sp) asl (sp) asl (sp) asl (sp) asl (sp) 1: cmp (sp),(r4)+ .if achk bhis mp r0,$'T beq 2f cmp r0,$'1 beq 2f cmp r0,$', beq 1f br 1b 2: movif $1,fr0 br 1b 1: br storin iicv: clr ndig ficv: eicv: dicv: mov width,twidth br 1f gicv: mov $16383.,twidth clr ndig mov pc,gcflg br 2f 1: clr gcflg 2: jsr r5,gatof storin: cmpb itype,$'r beq 1f cmpb ilen,$1 beq 3f cmpb ilen,$4 bne 2f setl 2: movfi fr0,*ilval rts r5 3: movfi fr0,r0 movb r0,*ilval rts r5 1: cmpb ilen,$8. beq 2f setf 2: movf fr0,*ilval rts r5 gatof: setd seti movif $10.,fr3 clr r2 clfr0,fr5 movf $one,fr0 clrf fr1 1: dec r1 bmi 1f movf fr0,fr2 movf fr1,fr3 mulf fr4,fr0 mulf fr4,fr1 mulf fr5,fr2 mulf fr5,fr3 subf fr3,fr0 addf fr2,fr1 br 1b 1: tst r0 beq 1f clrf -(sp) movf $one,fr2 movf fr2,-(sp) movf fr1,-(sp) movf fr0,-(sp) jmp divide 1: movf fr1,-(sp) movf fr0,-(sp) jmp *(r4)+ 9f .endif add (r4)+,(sp) jmp *(r4)+ 9: jsr r5,rerr; 15. 4 gar1: tst (sp)+ dec (sp) cmp (sp),(r4)+ .if achk bhis 9b .endif add (r4)+,(sp) movb *(sp)+,r0 mov r0,-(sp) jmp *(r4)+ gar2: tst (sp)+ dec (sp) asl (sp) cmp (sp),(r4)+ .if achk bhis 9b .endif add (r4)+,(sp) mov *(sp)+,-(sp) jmp *(r4)+ gar4: tst (sp)+ dec (sp) mov (sp)+,r0 asl r0 asl r0 cmp r0,(r4)+ .if achk bhis 9b .endif add (r4)+,r0 cmp (r0)+,(r0)+ mov -(r0),-(sp) mov -(r0),-(sp) jmp *(r4)+ gar8: setd tst (sp)+rf fr0 clr -(sp) 1: jsr r5,fgetcn cmp $' ,r0 bne 1f tst nlflg beq 1b tst (sp)+ rts r5 1: cmp r0,$'+ beq 1f cmp r0,$'- bne 2f inc (sp) 1: jsr r5,fgetcn 2: cmp $' ,r0 bne 3f tst gcflg bne 3f mov $'0,r0 3: sub $'0,r0 cmp r0,$9. bhi 2f mulf fr3,fr0 movif r0,fr1 addf fr1,fr0 dec r1 br 1b 2: add $'0,r0 cmp r0,$'. bne 1f inc r2 clr r1 br 1b 1: mov r3,-(sp) clr r3 cmp r0,$'d beq 3f cmp r0,$'+ beq 3f cmp r0,$'- beq 3f cmp r0,$'e bne 2f 3: jsr r5,atoi 2: tst r2 bne 1f mov ndig,r1 neg r1 1: movf fr3,fr2 add r3,r1 mov (sp)+,r3 tst r1 beq 1f bpl 3f neg r1 mov pc,-(sp) br 2f 3: clr -(sp) 2: dec r1 ble 2f mulf fr3,fr2 br 2b 2: tst (sp)+ bne 2f mulf fr2,fr0 br 1f 2: divf fr2,fr0 1: tst (sp)+ beq 1f negf r0 1: cmp r0,$', beq 1f cmp $' ,r0 beq 1f jsr r5,rerr; 110. 1: rts r5 atoi: clr -(sp) cmp r0,$'+ beq 1f cmp r0,$'- beq 3f jsr r5,fgetcn cmp r0,$'+ beq 1f cmp r0,$'- bne 2f 3: inc (sp) 1: jsr r5,fgetcn 2: sub $'0,r0 cmp r0,$'9. bhi 2f f *ilval,r0 br 2f 3: movb *ilval,r0 movif r0,fr0 br 2f 1: cmpb ilen,$4 bne 1f movof *ilval,r0 br 2f 1: movf *ilval,r0 2: cfcc bge 1f absf r0 mov $1,nflg 1: rts r5 / / / io2 -- format cracker .globl iowf .globl iowp .globl iorf iowp: mov (sp)+,formp mov $6,r1 br 1f iowf: mov (sp)+,formp tst (sp)+ mov (sp)+,r1 1: jsr r5,setio; 2 / write clr rdflg br 1f iorf: mov (sp)+,formp tst (sp)+ mov (sp)+,r1 jsr r5,setio; 1 / read mov pc,rdflg 1: clr binflg clr slcnt clr itmfnd clr scale clr itmflg mov $pbuf,ppar mov $-1,llpcnt jsr r5,fmtchr mov formp,llp cmp r0,$'( beq crack jsr r5,rerr; 106. sys exit crack: clr ngflg mov $1,rep item: jsr r5,mpy $10.,r3 add r0,r3 br 1b 2: add $'0,r0 tst (sp)+ beq 1f neg r3 1: rts r5 fgetcn: tst twidth bgt 1f mov $',,r0 rts r5 1: jsr r5,fgetc dec twidth rts r5 / / / io3 -- Fortran I/O .globl getbuf .globl chkunit .globl creatf .globl openf setio: mov r1,unit jsr r5,chkunit movb utable(r1),r0 beq 1f bpl 2f mov r1,r0 asl r0 mov btable(r0),r0 mov r0,r2 br 4f 2: cmp (r5),r0 beq 3f jsr r5,rerr; 101. / inconsistent use of unit sys exit 1: mov r1,-(sp) clr r0 dvd $10.,r0 swab r1 bis r1,r0 add $"00,r0 mov r0,filnam+4 mov (sp)+,r1 jsr r5,getbuf mov $filnam,r0 4: movb (r5),utable(r1) bit $1,(r5) bne 2f jsr r5,creatf br 3f 2: jsr r5,openf fmtchr cmp $' ,r0 beq item cmp $'\t,r0 beq item jsr r5,switch; mswitch jsr r5,rerr; 105. sys exit mswitch: 'a; afmt 'f; ffmt 'e; efmt 'g; gfmt 'd; dfmt 'i; ifmt 'l; lfmt 'h; hfmt 'x; xfmt 'p; scal '-; minus '0; numb '1; numb '2; numb '3; numb '4; numb '5; numb '6; numb '7; numb '8; numb '9; numb ',; crack '/; slash '(; lpar '); rpar '"; quote ' ; item 0; 0 minus: jsr r5,gnum neg r0 br 1f numb: dec formp jsr r5,gnum 1: mov r0,rep br item scal: mov rep,scale br c/ / / io5 -- more conversions /.globl hocv /.globl qocv /.globl xocv /.globl aocv /.globl locv / /.globl fmtchr /.globl fputcc /.globl rep /.globl formp /.globl spaces /.globl ilen /.globl width /.globl ilval .globl rerr hocv: jsr r5,fmtchr tst r0 beq 2f jsr r5,fputcc dec rep bgt hocv rts r5 2: jsr r5,rerr; 111. sys exit qocv: mov formp,-(sp) 1: jsr r5,fmtchr tst r0 beq 2f cmp r0,$'" beq 2f jsr r5,fputcc br 1b 2: dec rep ble 1f mov (sp),formp br 1b 1: tst (sp)+ rts r5 xocv: mov 3: tst (r5)+ asl r1 mov btable(r1),buffer rts r5 getbuf: mov $utable,r0 mov $btable,r2 1: tstb (r0)+ beq 2f tst (r2)+ br 3f 2: tst (r2)+ beq 3f mov -(r2),r0 clr (r2) mov r0,r2 br 2f 3: cmp r0,$utable+20. blo 1b mov bufp,r2 add $134.,bufp mov bufp,0f sys break; 0:.. 2: mov r1,r0 asl r0 mov r2,btable(r0) mov r2,buffer rts r5 chkunit: cmp r1,$20. blo 1f jsr r5,rerr; 100. / illegal unit number sys exit 1: rts r5 creatf: cmp unit,$6 bne 2f mov $1,r0 br 1f 2: mov r0,0f syrack elist: tst _nocr beq 1f tst rdflg bne 1f jsr r5,eorec1 br 2f 1: jsr r5,eorec 2: jmp *(r4)+ slash: jsr r5,eorec br crack rpar: mov ppar,r0 cmp r0,$pbuf / see if outer parens blos 2f dec -2(r0) ble 1f / no repeats left mov -4(r0),formp / reset scan br crack 1: sub $4,ppar br crack / pop parens 2: jsr r5,getitm br elist tst itmfnd bne 1f jsr r5,rerr; 107. sys exit 1: jsr r5,eorec inc itmflg mov llpcnt,r1 bpl 1f mov llp,formp jmp crack 1: mov llp,r2 mov r2,formp mov$1,r1 jsr r5,spaces rts r5 aocv: movb ilen,r1 sub width,r1 neg r1 bpl 1f clr r1 1: jsr r5,spaces mov ilval,r2 mov width,r1 cmpb r1,ilen ble 2f movb ilen,r1 2: movb (r2)+,r0 jsr r5,fputcc dec r1 bgt 2b rts r5 locv: mov width,r1 dec r1 jsr r5,spaces mov $'f,r0 movb ilen,r1 mov ilval,r2 2: tstb (r2)+ bne 1f dec r1 bgt 2b br 2f 1: mov $'t,r0 2: jsr r5,fputcc rts r5 s creat; 0:..; 666 bec 1f jsr r5,rerr; 102. / create error sys exit 1: mov r2,-(sp) mov r0,(r2)+ clr (r2)+ clr (r2)+ mov r2,-(r2) mov (sp)+,r2 rts r5 openf: cmp unit,$5 bne 2f clr r0 br 1f 2: mov r0,0f sys open; 0:..; 0 bec 1f jsr r5,rerr; 103. / open error sys exit 1: mov r2,-(sp) mov r0,(r2)+ clr (r2)+ clr (r2)+ mov (sp)+,r2 rts r5 fputc: mov r1,-(sp) mov buffer,r1 dec 2(r1) bge 1f mov r0,-(sp) jsr pc,flush1 dec 2(r1) mov (sp)+,r0 1: movb r0,*4(r1) inc 4(r1) mov (sp ppar,r0 mov r2,(r0)+ mov r1,(r0)+ mov r0,ppar jbr crack1 lpar: mov ppar,r0 cmp r0,$pbuf+10 blo 1f jsr r5,rerr; 108. sys exit 1: mov formp,(r0)+ mov rep,(r0)+ mov r0,ppar cmp r0,$pbuf+4 bhi 1f mov formp,llp mov rep,llpcnt 1: jmp crack quote: inc ngflg mov $44,-(sp) br 3f hfmt: inc ngflg mov $40,-(sp) br 3f xfmt: inc ngflg mov $34,-(sp) br 3f afmt: mov $30,-(sp) br 1f ifmt: clr -(sp) br 1f lfmt: mov $4,-(sp) 1: jsr r5,gnum mov r0,width br 2f ffmt: mov $10,-(sp) br 1/ / / io4 -- numeric output conversion qicv: hicv: jsr r5,rerr; 999. sys exit xicv: jsr r5,fgetc rts r5 gocv: mov pc,gflg jsr r5,getarg mov ndig,_ndigit jsr pc,ecvt tst r2 bmi eocv cmp r2,ndig bgt eocv sub r2,ndig sub $4,width jsr r5,focv add $4,width add $4,nspace rts r5 eocv: mov $'e,-(sp) br 1f docv: mov $'d,-(sp) 1: tst gflg bne 1f jsr r5,getarg 1: mov ndig,r1 add $6,r1 add nflg,r1 sub width,r1 bge 2f sub r1,nspace 2: tst nflg beq 2f mov $'-,r0 jsr r5,fputcc 2: m)+,r1 rts r5 fflush: mov r1,-(sp) mov buffer,r1 jsr pc,flush1 mov (sp)+,r1 rts r5 flush1: mov r1,r0 add $6,r0 mov r0,-(sp) mov r0,0f neg r0 add 4(r1),r0 bhis 1f mov r0,0f+2 mov (r1),r0 sys write; 0:..; .. 1: mov (sp)+,4(r1) mov $128.,2(r1) rts pc fgetc: tst nlflg bne 4f mov r1,-(sp) mov buffer,r1 dec 2(r1) bge 1f mov r1,r0 add $6,r0 mov r0,0f mov r0,4(r1) mov (r1),r0 sys read; 0:..; 128. bes 2f tst r0 bne 3f 2: jsr r5,rerr; 104. / EOF on input sys exit 3: dec r0 movf dfmt: mov $14,-(sp) br 1f gfmt: mov $20,-(sp) br 1f efmt: mov $24,-(sp) 1: jsr r5,gnum mov r0,width 4: jsr r5,fmtchr cmp r0,$' / beq 4b cmp r0,$'. bne err1 jsr r5,gnum mov r0,ndig 2: inc itmfnd 3: add $cvsw,(sp) tst rdflg beq 1f add $2,(sp) 1: mov *(sp)+,-(sp) 1: tst ngflg bne 2f jsr r5,getitm br 1f 2: clr gflg jsr r5,*(sp) dec rep bgt 1b tst (sp)+ br crack1 1: tst (sp)+ jmp elist cvsw: iocv; iicv / 0 locv; licv / 4 focv; ficv / 10 docv; dicv / 14 gocv; gicv / 20ov ndig,r1 mov scale,r0 bgt 2f add r0,r1 br 3f 2: inc r1 3: mov r1,_ndigit jsr pc,ecvt mov r0,r1 mov r2,-(sp) mov scale,r2 sub r2,(sp) tst r2 bgt 2f mov $'0,r0 jsr r5,fputcc br 3f 2: movb (r1)+,r0 dec _ndigit jsr r5,fputcc sob r2,2b 3: mov $'.,r0 jsr r5,fputcc neg r2 ble 2f 3: mov $'0,r0 jsr r5,fputcc sob r2,3b 2: mov _ndigit,r2 ble 2f 3: movb (r1)+,r0 jsr r5,fputcc sob r2,3b 2: mov 2(sp),r0 jsr r5,fputcc mov (sp)+,r1 bge 2f mov $'-,r0 jsr r5,fputcc neg r1 br 3f 2: m r0,2(r1) 1: clr r0 bisb *4(r1),r0 inc 4(r1) mov (sp)+,r1 tst binflg bne 1f cmp r0,$'\n bne 1f 4: mov pc,nlflg mov $' ,r0 1: rts r5 gnum: mov r1,-(sp) clr r1 1: jsr r5,fmtchr cmp r0,$' / beq 1b sub $'0,r0 cmp r0,$9. bhi 1f mpy $10.,r1 add r0,r1 br 1b 1: mov r1,r0 mov (sp)+,r1 dec formp rts r5 switch: mov (r5)+,r1 1: tst (r1) beq 1f cmp r0,(r1)+ bne 1b tst (sp)+ jmp *(r1) 1: rts r5 fmtchr: movb *formp,r0 inc formp rts r5 getitm: tst itmflg bne 1f mov r5,-(sp) jmp eocv; eicv / 24 aocv; aicv / 30 xocv; xicv / 34 hocv; hicv / 40 qocv; qicv / 44 crack1: jmp crack err1: jsr r5,rerr; 109. sys exit ov $'+,r0 jsr r5,fputcc 3: clr r0 div $10.,r0 add $'0,r0 jsr r5,fputcc mov r1,r0 add $'0,r0 jsr r5,fputcc tst (sp)+ rts r5 iocv: clr -(sp) clr ndig br 1f focv: mov $1,-(sp) 1: clr -(sp) tst gflg bne 1f jsr r5,getarg tst 2(sp) beq 1f mov scale,(sp) 1: mov ndig,_ndigit add (sp)+,_ndigit jsr pc,fcvt mov r0,r1 tst (sp) beq 1f tst gflg bne 1f add scale,r2 1: mov ndig,r0 add (sp),r0 add nflg,r0 tst r2 ble 1f add r2,r0 br 2f 1: inc r0 2: sub width,r0 bge 1f sub r0,nspace  *(r4)+ 1: clr itmflg tst (r5)+ rts r5 / just a fake, there's no carriage control fputcc: cmp $' ,r0 bne 1f inc nspace rts r5 1: mov r0,-(sp) 1: dec nspace blt 1f mov $' ,r0 jsr r5,fputc br 1b 1: clr nspace mov (sp)+,r0 beq 1f jsr r5,fputc 1: rts r5 eorec: mov unit,r0 bitb $1,utable(r0) bne 1f clr nspace mov $'\n,r0 jsr r5,fputc eorec1: clr r0 jsr r5,fputcc / cmp unit,$6 / tty output / bne 2f jsr r5,fflush 2: rts r5 1: tst nlflg bne 1f jsr r5,fgetc br 1b 1: clr nlflg r/ / / io1 -- I/O operators .globl rerr .globl endio .globl rio4 .globl rio8 .globl iio2 .globl iio4 .globl lio2 .globl lio1 .globl cio8 .globl cio16 .globl ecvt .globl fcvt .globl _ndigit endio: mov (sp)+,r5 rts r5 cio8: tst slcnt bne 2f inc slcnt tst -(r4) br rio4 2: clr slcnt mov ilval,-(sp) add $4,(sp) br rio4 cio16: tst slcnt bne 2f inc slcnt tst -(r4) br rio8 2: clr slcnt mov ilval,-(sp) add $8,(sp) br rio8 rio8: mov $8.\<8+'r,r0 br 1f rio4: mov $4\<8+'r,r0 br 1f iio4:1: tst nflg beq 1f mov $'-,r0 jsr r5,fputcc 1: tst r2 bgt 1f mov $'0,r0 jsr r5,fputcc br 2f 1: movb (r1)+,r0 jsr r5,fputcc sob r2,1b 2: tst (sp)+ beq 1f mov $'.,r0 jsr r5,fputcc 1: mov ndig,-(sp) ble 1f tst r2 bge 1f neg r2 2: mov $'0,r0 jsr r5,fputcc dec ndig ble 1f sob r2,2b 1: mov ndig,r2 ble 2f 1: movb (r1)+,r0 jsr r5,fputcc sob r2,1b 2: mov (sp)+,ndig rts r5 getarg: clr nflg setd cmpb itype,$'r beq 1f seti cmpb ilen,$4 bne 2f setl 2: cmpb ilen,$1 beq 3f movits r5 spaces: add r1,nspace rts r5  mov $4\<8+'i,r0 br 1f iio2: mov $2\<8+'i,r0 br 1f lio2: mov $2\<8+'l,r0 br 1f lio1: mov $1\<8+'l,r0 1: mov r0,itype mov (sp)+,ilval mov (sp)+,r5 tst (r5)+ rts r5 / / / quicker sort / mov $base,r1 / mov $base+[n*width],r2 / mov $width,r3 / jsr pc,qsort / r0,r1,r2,r3,r4 are used .globl qsort .globl compare qsort: mov r5,-(sp) mov r4,-(sp) bit $1,r3 bne 1f bit $1,r1 bne 1f cmp r3,$2 bne 2f mov $exch1,exchange br 3f 2: mov r3,r5 clc ror r5 mov r5,width mov $exchw,exchange br 3f 1: mov $exchb,exchange 3: jsr pc,qs1 mov (sp)+,r4 mov (sp)+,r5 rts pc qs1: mov r1,r5 neg r5 add r2,r5 bgt 1f rts pc 1: clr r4 dvd r3,r4 asr r4 mpy r3,r4 mov rmtp .globl namebuf .globl enamebuf .globl namep .globl symbuf .globl esymbuf .globl ch .globl ch1 .globl progt .globl holquo .globl nxtaloc .globl imptab .globl nerror .globl temp .globl functm .globl edata .globl dsize 5,r4 add r1,r4 mov r1,-(sp) mov r2,-(sp) loop: cmp r1,r4 bhis loop1 mov r1,r0 jsr pc,compare bgt loop1 add r3,r1 br loop loop1: cmp r2,r4 blos 1f sub r3,r2 mov r2,r0 jsr pc,compare bge loop1 jsr pc,*exchange cmp r1,r4 bne loop mov r2,r4 br loop 1: cmp r1,r4 beq 1f jsr pc,*exchange mov r1,r4 br loop1 1: mov (sp)+,r2 mov r4,-(sp) mov r4,r1 add r3,r1 mov r2,r0 sub r1,r0 sub 2(sp),r4 cmp r0,r4 blo 1f mov (sp)+,r0 mov (sp)+,r4 mov r1,-(sp) mov r2,-(sp) mov r0,r2 mov/ / / fxa -- genop -- output a typed operator .globl genop .globl newline .globl code .globl typ genop: mov r1,-(sp) mov r3,-(sp) bic $!7,r3 movb typ(r3),r1 mov (sp),r3 clrb r3 swab r3 jsr r5,code < %c%c%d\0>; .even r1 r0 r3 mov (sp)+,r3 mov (sp)+,r1 rts r5 newline: jsr r5,code <\n\0>; .even rts r5 typ: / / / fx4 -- get symbol .globl getsym .globl getid .globl lookid .globl chrtab .globl lookup .globl error .globl geti .globl holround / getsym returns the next basic symbol / 0 name (symbol table entry in r3) / 2 number (type in r3) / 4 ** / 6 / / 8 * / 10 - / 12 + / 14 .lt. / 16 .le. / 18 .eq. / 20 .ne. / 22 .gt. / 24 .ge. / 26 .not. / 28 .and. / 30 .or. / 32 ( / 34 ) / 36 , / 38 = / 40 =| / getsym: mov r2,-(sp) mov r1,r2 jsr r5,lookup; bastab br 1f mov r2,r1 cmp r0,$4 bhis 2f asr r0 add $'0 r4,r1 1: jsr pc,qs1 mov (sp)+,r2 mov (sp)+,r1 br qs1 exchb: mov r1,-(sp) mov r2,-(sp) mov r3,r5 1: movb (r1),r0 movb (r2),(r1)+ movb r0,(r2)+ sob r5,1b mov (sp)+,r2 mov (sp)+,r1 rts pc exchw: mov r1,-(sp) mov r2,-(sp) mov width,r5 1: mov (r1),r0 mov (r2),(r1)+ mov r0,(r2)+ sob r5,1b mov (sp)+,r2 mov (sp)+,r1 rts pc exch1: mov (r1),r0 mov (r2),(r1) mov r0,(r2) rts pc .bss exchange: .=.+2 width: .=.+2 / / / fx1 -- utility .globl lookup / lookup / lookup string pointed at by r2 / in table pointed at by arg1 / r0 returns symbol number*2 / r2 is advanced by matched string / registers used: r0,r2 lookup: mov r1,-(sp) clr r0 mov r2,-(sp) mov (r5)+,r1 1: mov (sp),r2 tstb (r1) beq 1f 2: cmpb (r2)+,(r1)+ bne 2f tstb (r1) bne 2b asl r0 cmp (r5)+,(sp)+ mov (sp)+,r1 rts r5 2: tstb (r1)+ bne 2b inc r0 br 1b 1: mov (sp)+,r2 mov (sp)+,r1 rts r5 ,r0 movb r0,symbuf movb $12,symbuf+1 clrb symbuf+2 mov $logcon,r3 / logical*2 mov $2,r0 2: cmp r0,$32. bne 2f / check for possible complex constant mov r1,-(sp) movb -2(r1),r0 movb chrtab(r0),r0 beq 4f cmp r0,$4 blos 3f 4: jsr r5,srconst br 3f mov r3,r2 cmpb (r1)+,$', bne 3f jsr r5,srconst br 3f cmp r3,r2 bhis 4f mov r2,r3 4: cmpb (r1)+,$') bne 3f mov (sp)+,r1 mov $symbuf,r2 4: movb (r1)+,(r2) cmpb (r2)+,$') bne 4b clrb -(r2) mov $2,r0 br 2f 3: mov (sp)+,r1 mov $32.,r.globl zero .globl putchar .globl w, r, a, l / / / routine to zero a string / / mov ...,r1 / jsr pc,zero / zero: mov r0,-(sp) mov a(r1),w(r1) clrb r0 1: cmp w(r1),l(r1) bhis 1f jsr pc,putchar br 1b 1: mov a(r1),w(r1) mov (sp)+,r0 rts pc / / / fx2 -- error setting and printing .globl error .globl perror .globl tput .globl tdecml error: inc nerror mov r0,-(sp) mov r2,-(sp) mov (r5)+,r0 mov $errb,r2 1: cmp r2,errp bhis 1f cmp r0,(r2)+ beq 2f tst (r2)+ br 1b 1: cmp r2,$eerrb bhis 2f mov r0,(r2)+ mov r1,(r2) dec (r2)+ / r1 is often 1 too far mov r2,errp 2: mov (sp)+,r2 mov (sp)+,r0 rts r5 perror: cmp errp,$errb beq 1f mov r1,-(sp) mov r2,-(sp) mov ifno,r0 jsr r5,tdecml mov $'\t,r0 jsr r5,tput mov $line,r1 2: 0 2: mov (sp)+,r2 rts r5 1: clr lstchr cmp r1,$line blos 1f movb -1(r1),lstchr 1: mov $symbuf,r2 movb (r1)+,r0 movb r0,(r2)+ bic $!177,r0 movb chrtab(r0),r0 jmp *1f(r0) 1: eos let num per eos: mov $40.,r0 tstb -(r1) beq 2b jsr r5,error; 8. br 2b let: dec r1 jsr r5,getid br .+2 / cannot happen jsr r5,lookid; symbuf mov (sp)+,r2 clr r0 rts r5 num: mov $intcon,r3 / integer*4 jsr r5,numst cmpb (r1),$'. bne 2f mov r2,-(sp) mov r1,r2 jsr r5,lookup; bastab br 1f mov (sp)+/ / / fx9 -- code / jsr r5,code; ; .even / arg1 / arg2 / ... / / args specified by % in string. / %s: string / %d: decimal number / %o: octal number / %c: character / / args are addresses / or registers r0-r4 .globl code .globl putc .globl getname code: mov r4,-(sp) mov r3,-(sp) mov r2,-(sp) mov r1,-(sp) mov r0,-(sp) mov r5,r4 1: tstb (r5)+ bne 1b inc r5 bic $1,r5 1: movb (r4)+,r0 beq 1f cmp r0,$'% beq 2f jsr r5,putc; obuf br 1b 2: movb (r4)+,r0 beq 1f cmpmovb (r1),r0 beq 2f jsr r5,tput mov $errb+2,r2 3: cmp r1,(r2)+ bne 4f mov $1,r0 sys write; mes2; 2 / bs, _ br 3f 4: cmp r2,errp blo 3b 3: inc r1 br 2b 2: mov $errb,r1 2: mov $1,r0 sys write; mes1; 4 3: sys open; errfil; 0 bec 3f mov (r1)+,r0 tst (r1)+ jsr r5,tdecml cmp r1,errp bhis 2f mov $',,r0 jsr r5,tput br 3b 3: mov r0,-(sp) mov (r1)+,r2 tst (r1)+ 3: dec r2 ble 3f 4: mov (sp),r0 sys read; ich; 1 bes 4f tst r0 beq 4f cmpb ich,$'\n bne 4b br 3b 3: mov (sp),r0 sys re,r2 br 3f 1: mov (sp)+,r2 movb (r1)+,(r2)+ br 1f 2: cmpb (r1),$'h / hollerith const? bne 2f mov lstchr,r0 cmpb chrtab(r0),$2 / letter? beq 2f / not h, then cmp r0,$'* beq 2f / e.g. real*4 h... clrb (r2) jsr r5,geti mov $symbuf,r2 inc r1 mov holround,-(sp) dec (sp) clr -(sp) 4: movb (r1)+,(r2)+ bne 5f jsr r5,error; 55. br 6f 5: inc (sp) dec r0 bgt 4b 6: bit (sp),2(sp) beq 6f movb $' ,(r2)+ inc (sp) br 6b 6: mov (sp)+,r3 tst (sp)+ swab r3 clrb r3 bis $5,r3 mov $2,r0  r0,$'s beq cstr cmp r0,$'c beq cchr cmp r0,$'d beq cdec cmp r0,$'o beq coct cmp r0,$'n beq cnam jsr r5,putc; obuf br 1b cnam: jsr pc,cget mov r1,r3 jsr r5,getname mov $symbuf,r1 br 2f cstr: jsr pc,cget 2: movb (r1)+,r0 beq 1b cmp r0,$'\n beq 2b jsr r5,putc; obuf br 2b cchr: jsr pc,cget mov r1,r0 jsr r5,putc; obuf mov r1,r0 clrb r0 swab r0 beq 1b jsr r5,putc; obuf br 1b coct: jsr pc,cget mov $8.,r2 br 2f cdec: jsr pc,cget mov $10.,r2 2: jsr pc,2f br 1b 2: clr r0 dvd ad; ich; 1 bes 4f tst r0 beq 4f movb ich,r0 cmp r0,$'\n beq 3f jsr r5,tput br 3b 4: mov $1,r0 sys write; mes3; 18. 3: mov (sp)+,r0 sys close cmp r1,$errp blo 2b 2: mov $'\n,r0 jsr r5,tput mov $errb,errp mov (sp)+,r2 mov (sp)+,r1 1: rts r5 mes1: <\n** > mes2: .byte 010, '_ mes3: errfil: .even .bss ich: .=.+2 mov (sp)+,r2 rts r5 .bss lstchr: .=.+2 .text per: jsr r5,isnum br eos 1: mov $realcon,r3 / real*4 jsr r5,numst 2: jsr r5,expon 3: clrb (r2) mov $2,r0 mov (sp)+,r2 rts r5 isnum: movb (r1),r0 cmpb chrtab(r0),$4 bne 1f tst (r5)+ 1: rts r5 numst: jsr r5,isnum br 1b inc r1 movb r0,(r2)+ br numst expon: cmpb (r1)+,$'e beq 1f cmpb -1(r1),$'d beq 1f 2: dec r1 rts r5 1: cmpb (r1),$'+ beq 1f cmpb (r1),$'- beq 1f jsr r5,isnum br 2b 1: mov $realcon,r3 / real*4 cmpb -(r1),$'e br2,r0 mov r1,-(sp) mov r0,r1 beq 2f jsr pc,2b 2: mov (sp)+,r0 add $'0,r0 jsr r5,putc; obuf rts pc 1: mov (sp)+,r0 mov (sp)+,r1 mov (sp)+,r2 mov (sp)+,r3 mov (sp)+,r4 rts r5 cget: mov (r5)+,r1 cmp r1,$4 blos 1f rts pc 1: asl r1 add $2,r1 add sp,r1 mov (r1),r1 rts pc / / / fx3 -- get integer .globl geti .globl ptemp .globl putc .globl putw geti: mov r1,-(sp) mov r3,-(sp) clr r3 mov $symbuf,r0 1: movb (r0)+,r1 sub $'0,r1 cmp r1,$9 bhi 1f mpy $10.,r3 add r1,r3 br 1b 1: mov r3,r0 mov (sp)+,r3 mov (sp)+,r1 rts r5 ptemp: mov r0,-(sp) mov r1,-(sp) mov (r5)+,r0 / character jsr r5,putc; tbuf mov *(r5)+,r0 / word jsr r5,putw; tbuf mov ifno,r0 jsr r5,putw; tbuf mov (r5)+,r1 / string 1: movb (r1),r0 jsr r5,putc; tbuf tstb (r1)+ bne 1b mov (sp)+eq 1f mov $dblcon,r3 / real*8 1: movb (r1)+,(r2)+ movb (r1)+,(r2)+ jsr r5,numst rts r5 getid: mov r0,-(sp) mov r2,-(sp) movb (r1),r0 cmpb chrtab(r0),$2 bne 3f tst (r5)+ mov $symbuf,r2 1: movb (r1)+,r0 movb r0,(r2)+ movb chrtab(r0),r0 cmp r0,$2 beq 1b cmp r0,$4 beq 1b dec r1 clrb (r2) movb $12,-(r2) 3: mov (sp)+,r2 mov (sp)+,r0 rts r5 lookid: mov r0,-(sp) mov r2,-(sp) 2: mov (r5),r2 jsr r5,lookup; namebuf br 1f asl r0 asl r0 mov r0,r3 mov (sp)+,r2 mov (sp)+,r0 tst (r5)+/ / / fhd -- data segment header / symsize = 1600. linsize = 800. namsize = 1200. smblsize = 399. intcon = 4\<8+1 / type of integer constant realcon = 4\<8+2 logcon = 2\<8+3 / type of logical constant log1con = 1\<8+3 int1con = 1\<8+1 int2con = 2\<8+1 dblcon = 10\<8+2 dcplxcon = 20\<8+4 cplxcon = 10\<8+4 .globl data .globl ibuf .globl obuf .globl tbuf .globl line .globl eline .globl ifno .globl efno .globl errp .globl errb .globl eerrb .globl symtab .globl esymtab .globl esymp .globl sy,r1 mov (sp)+,r0 rts r5  rts r5 1: mov namep,r0 add $8.,symtp 1: movb (r2)+,(r0)+ bne 1b mov r0,namep cmp r0,$enamebuf bhis 1f mov symtp,r0 add $symtab,r0 cmp r0,esymp blo 2b 1: mov $1,r0 sys write; ovfl; eovfl-ovfl clr r0 sys seek; 0; 2 mov $-1,r0 sys exit ovfl: eovfl: .even srconst: cmpb (r1)+,$'+ beq 1f cmpb -(r1),$'- bne 1f inc r1 1: jsr r5,getsym cmp r0,$2 bne 1f clrb r3 add r3,r3 bisb $cplxcon,r3 tst (r5)+ 1: rts r5 chrtab: .byte 0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,6,0 .byte 4,4,4,4,4,4,4,4 .byte 4,4,0,0,0,0,0,0 .byte 0,2,2,2,2,2,2,2 .byte 2,2,2,2,2,2,2,2 .byte 2,2,2,2,2,2,2,2 .byte 2,2,2,0,0,0,0,0 .byte 0,2,2,2,2,2,2,2 .byte 2,2,2,2,2,2,2,2 .byte 2,2,2,2,2,2,2,2 .byte 2,2,2,0,0,0,0,0 bastab: <.false.\0> <.true.\0> <**\0> <*\0> <-\0> <+\0> <.lt.\0> <.le.\0> <.eq.\0> <.ne.\0> <.gt.\0> <.ge.\0> <.not.\0> <.and.\0> <.or.\0> <(\0> <)\0> <,\0> </ / / xe -- temp file junk .globl tfildiag .globl tfil1, tfil2 tfildiag: mov $1,r0 sys write; mes1; emes1-mes1 clr r0 sys seek; 0; 2 mov $-1,r0 / failure return sys exit mes1: emes1: tfil1: tfil2: beq 1b cmp r0,$4 bne 3b 2: cmp r0,$'\n bne 2f inc nlflg 2: rts pc 1: mov $4,r0 rts pc .data nlflg: 1 .text mes: emes: .bss lino: .=.+2 =\0> <\0> .globl alterchar .globl plausible .globl stats .globl allocate, release .globl copy .globl bufchar, getbuf .globl swap .globl w, r, a, l .globl w1, flag, u1, fixct / / routine to rewrite the character pointer to by / read pointer. The read pointer is advanced. / the string is extended if necessary. / there is no error return. / / movb ch,r0 / mov ...,r1 / jsr pc,alterchar / mov r1,... / alterchar: mov r2,-(sp) mov r1,-(sp) mov r0,nchar jsr pc,plausible inc stats+8. 1: cmp r(r1),l(r1) /W,L blt 3f mov/ / / fx7 -- passes advancement .globl signon .globl signoff .globl pass2 .globl pass3 .globl pass4 signon: tst (r5)+ rts r5 signoff: mov (r5)+,r0 tst (sp)+ dec r0 asl r0 jmp *passtab(r0) passtab: pass2 pass3 pass4 .data / / / fx5 -- declare implicit .globl declimpl .globl getname declimpl: bit $7,symtab(r3) bne 1f / already declared jsr r5,getname movb symbuf,r0 cmp r0,$'a blo 2f sub $6,r0 / map 'a -> 'Z+1 2: asl r0 bis imptab-[2*'A](r0),symtab(r3) 1: bit $70,symtab(r3) / class bne 1f bis $10,symtab(r3) / simple 1: rts r5 getname: mov r3,-(sp) clr r3 mov $namebuf,r0 1: cmp r3,(sp) bhis 1f 2: tstb (r0)+ bne 2b add $8,r3 br 1b 1: mov $symbuf,r3 2: movb (r0)+,(r3)+ bne 2b mov (sp)+,r3 rts r5 l(r1),r0 inc r0 sub a(r1),r0 /W-A+1 jsr pc,allocate mov (sp),r0 jsr pc,copy jsr pc,swap jsr pc,release mov (sp),r1 / 3: mov r(r1),r0 jsr pc,bufchar bec 2f jsr pc,getbuf 2: movb nchar,(r0) mov nchar,r0 /to preserve r0 for user inc r(r1) mov $1,w1(r2) cmp r(r1),w(r1) ble 3f mov r(r1),w(r1) 3: inc flag bne 1f jsr pc,fixct br 2f 1: mov flag,u1(r2) 2: mov (sp)+,r1 mov (sp)+,r2 rts pc / nchar: .=.+2 / / / fxf -- format statements .globl sform .globl sdata .globl ptemp .globl error sform: cmp progt,$6 / block data bne 1f jsr r5,error; 50. 1: jsr r5,ptemp; 'f; efno; line rts r5 sdata: jsr r5,ptemp; 'd; efno; line rts r5  / / / fx8 -- read source line .globl getline .globl isagn .globl levzer .globl error .globl getc .globl chrtab getline: mov r3,-(sp) clr holquo clr r3 / line number clr line mov $line,r1 1: jsr pc,get sub $'0,r0 cmp r0,$9 bhi 1f mpy $10.,r3 add r0,r3 br 1b 1: add $'0,r0 movb r0,ch mov r3,efno 1: mov lino, ifno inc ifno jsr pc,get cmp r0,$'\n / nl beq 1f cmp r0,$'' beq 2f cmp r0,$'" bne 3f 2: mov r0,holquo add $4,r1 / room for h count mov r1,-(sp) 2: jsr pc,get cmp r0,$'\n/ / / fxg -- declare implicit functions .globl funimpl .globl getname .globl lookup funimpl: bit $7,symtab(r3) bne 1f jsr r5,getname mov r2,-(sp) mov $symbuf,r2 jsr r5,lookup; funtab br 2f cmpb (r2),$'\n bne 2f asr r0 movb funtabt(r0),r0 mov r0,-(sp) bic $!17,r0 bis typtab(r0),symtab(r3) mov (sp)+,r0 asr r0 asr r0 asr r0 asr r0 bic $!17,r0 mov typtab(r0),symtab+2(r3) / save argument conversion 2: / in dimension pointer mov (sp)+,r2 1: rts r5 typtab: intcon realcon dblcon / / / fx6 -- teletype .globl tput .globl tdecml tdecml: mov r1,-(sp) jsr r5,td mov (sp)+,r1 rts r5 td: mov r0,r1 clr r0 dvd $10.,r0 mov r1,-(sp) tst r0 beq 1f jsr r5,td 1: mov (sp)+,r0 add $'0,r0 tput: movb r0,ch+1 mov $1,r0 sys write; ch+1; 1 rts r5  beq 4f cmp r0,holquo beq 2f bis $200,r0 movb r0,(r1)+ cmp r1,$eline-1 blo 2b 4: tst (sp)+ br err1 2: mov (sp)+,r3 mov r1,-(sp) sub r3,r1 movb $'h,-(r3) clr r0 div $10.,r0 add $'0,r1 movb r1,-(r3) mov r0,r1 clr r0 div $10.,r0 add $'0,r1 movb r1,-(r3) add $'0,r0 movb r0,-(r3) mov (sp)+,r1 clr holquo br 1b 3: cmp r0,$'h bne 2f clr r3 / quote count mov r1,-(sp) 3: cmp r1,$line blos 4f movb -(r1),r0 cmpb chrtab(r0),$4 / digit? beq 3b cmpb chrtab(r0),$2 / test letter beq 3f cplxcon dcplxcon funtab: <\0> / function type xy / x = arg types / y = result type / 0 = integer / 2 = real / 4 = double / 6 = complex / 8 = doublecomplex funtabt: .byte 2\<4+2 / tanh .byte 2\<4+2 / sqrt .byte 4\<4+2 / sngl .byte 2\<4+2 / sin .byte 2\<4+2 / sign .byte 6\<4+2 / real .byte 0\<4+0 / mod .byte 2\<4+0 / min1 ./ / / fxc -- size of array .globl size .globl nelem .globl error size: movb symtab+1(r3),r0 jsr r5,nelem inc r0 bic $1,r0 / round to 0 mod 2 rts r5 nelem: mov r1,-(sp) mov r0,r1 mov symtab(r3),r0 bic $!70,r0 cmp r0,$20 bne 1f mov symtab+2(r3),r0 mov (r0)+,-(sp) 2: mpy (r0)+,r1 dec (sp) bgt 2b tst (sp)+ 1: mov r1,r0 mov (sp)+,r1 rts r5 er; '= br 1f br 3f 1: mov r0,-(sp) jsr r5,levzer; ', br 4f jsr r5,levzer; '( br 1f tst (sp)+ 2: rts r5 1: cmp (sp)+,r0 blt 2b mov r1,-(sp) mov r0,r1 inc r1 jsr r5,levzer; ') br 1f 1: mov (sp)+,r1 cmpb 1(r0),$'= bne 3f rts r5 levzer: mov r1,r0 clr -(sp) 1: tst (sp) bne 2f cmpb (r0),(r5) beq 1f 2: cmpb (r0),$'( bne 2f inc (sp) 2: cmpb (r0),$') bne 2f dec (sp) blt 5f 2: tstb (r0)+ bne 1b 5: tst (r5)+ 1: 4: tst (sp)+ 3: tst (r5)+ rts r5 get: movb ch,r0 beq 1f clrbbyte 0\<4+0 / min0 .byte 2\<4+0 / max1 .byte 0\<4+0 / max0 .byte 0\<4+0 / isign .byte 2\<4+0 / int .byte 2\<4+0 / ifix .byte 4\<4+0 / idint .byte 0\<4+0 / idim .byte 0\<4+0 / iabs .byte 0\<4+2 / float .byte 2\<4+2 / exp .byte 4\<4+4 / dsqrt .byte 4\<4+4 / dsin .byte 4\<4+4 / dsign .byte 8\<4+4 / dreal .byte 4\<4+4 / dmod .byte 4\<4+4 / dmin1 .byte 4\<4+4 / dmax1 .byte 4\<4+4 / dlog10 .byte 4\<4+4 / dlog .byte 8\<4+4 / dimag .byte 2\<4+2 / dim .byte 4\<4+4 / dexp / / / xd -- tmp file 2 handl .globl setln .globl getln .globl tfil2 .globl tfildiag .globl fopen .globl getc .globl getw .globl xbuf setln: mov $tfil2,r0 jsr r5,fopen; xbuf bcc 1f jmp tfildiag 1: rts r5 getln: jsr r5,getc; xbuf bcs 3f mov r0,-(sp) jsr r5,getw; xbuf mov r0,efno jsr r5, getw; xbuf mov r0,ifno mov $line,r1 1: jsr r5,getc; xbuf bcs 1f tst r0 beq 1f bic $200,r0 movb r0,(r1)+ br 1b 1: clrb (r1)+ mov (sp)+,r0 tst (r5)+ rts r5 3: mov xbuf,r0 sys close rts r5  ch rts pc 1: jsr pc,get1 cmp r0,$'\n bne 2f jsr pc,get1 cmp r0,$'& beq 1b movb r0,ch1 mov $'\n,r0 2: tst holquo bne 1f cmp $' ,r0 beq 1b cmp $'\t,r0 beq 1b 1: cmp r0,$4 / test EOT bne 1f mov $1,r0 sys write; mes; emes-mes mov $1,r0 / syntax errors detected sys exit 1: rts pc get1: movb ch1,r0 beq 1f clrb ch1 br 2f 1: jsr r5,getc; ibuf bcs 1f bic $!177,r0 beq 1b cmp r0,$'\n bne 2f inc lino 2: tst nlflg beq 2f clr nlflg cmp r0,$'c bne 2f 3: jsr pc,get1 cmp r0,$'\n  .byte 8\<4+8 / dcsqrt .byte 8\<4+8 / dcsin .byte 4\<4+4 / dcos .byte 8\<4+8 / dconjg .byte 4\<4+8 / dcmplx .byte 8\<4+8 / dclog .byte 8\<4+8 / dcexp .byte 8\<4+8 / dccos .byte 8\<4+4 / dcabs .byte 2\<4+4 / dble .byte 4\<4+4 / datan2 .byte 4\<4+4 / datan .byte 4\<4+4 / dabs .byte 6\<4+6 / csqrt .byte 6\<4+6 / csin .byte 2\<4+2 / cos .byte 6\<4+6 / conjg .byte 2\<4+6 / cmplx .byte 6\<4+6 / clog .byte 6\<4+6 / cexp .byte 6\<4+6 / ccos .byte 6\<4+2 / cabs .byte 2\<4+2 / atan2 .byte 2\<4+2 / atan .byte 2\<4+2 / amod .byte 2\<4+2 / amin1 .byte 0\<4+2 / amin0 .byte 2\<4+2 / amax1 .byte 0\<4+2 / amax0 .byte 2\<4+2 / alog10 .byte 2\<4+2 / alog .byte 2\<4+2 / aint .byte 6\<4+2 / aimag .byte 2\<4+2 / abs .globl backspace .globl lookchar .globl w, r, a, l / / routine to read a string backwards / the read pointer is decremented before reading / / mov ...,r1 / jsr pc,backspace / mov r0,... / backspace: cmp a(r1),r(r1) bhis nochc dec r(r1) jsr pc,lookchar rts pc nochc: clr r0 sec rts pc v $contab,r5 jsr r5,perror 1: jmp dloop dodata: cmp progt,$6 beq 1f / block data mov $dattab,r3 cmp r3,r4 bne 2f / is data mov nxtaloc,r0 jsr r5,code <.=.+%d.\n.text\n\0>; .even r0 rts r5 2: jsr r5,onedata sub nxtaloc,r1 neg r1 blt 9b jsr r5,code <.=.+%d.\n.text\n\0>; .even r1 1: rts r5 onedata: clr r1 2: mov 2(r3),r0 sub r1,r0 bmi 9f beq 3f jsr r5,code <.=.+%d.\n\0>; .even r0 add r0,r1 3: mov 4(r3),r0 add r0,r1 asr r0 mov r0,-(sp) mov 6(r3),r2 3: mov (r2)+,r0 / / / fxh -- array constant offset .globl consub .globl getsym .globl geti .globl error .globl geticon / turn constant subscripts into offset. / in: r3 -> symtab / r1 -> just beyond ( / out:r0 has offset consub: mov symtab(r3),r0 bic $!70,r0 cmp r0,$20 / test class == array beq 1f jsr r5,error; 17. clr r0 rts r5 1: mov r5,-(sp) mov r4,-(sp) mov r3,-(sp) mov r2,-(sp) clr r4 / accumulated offset mov symtab+2(r3),r2 / ptr to declarator mov (r2)+,-(sp) / dimensionality mov $1,r5 / pro/ / / f41 -- everything else .globl pass4 .globl signon .globl flush .globl dope .globl formts .globl globls .globl constn .globl fopen .globl bsss .globl tfil2 pass4: setd jsr r5,signon; 4 mov ibuf,r0 sys close jsr r5,flush; obuf jsr r5,flush; tbuf jsr r5,dope jsr r5,formts jsr r5,constn jsr r5,bsss jsr r5,globls / uses r4 from bsss jsr r5,flush; obuf sys unlink; tfil2 clr r0 tst nerror beq 1f sys seek; 0; 2 mov $1,r0 / syntax errors 1: sys exit  jsr r5,code <%o\n\0>; .even r0 dec (sp) bne 3b tst (sp)+ add $8.,r3 cmp r3,r4 bhis 1f cmp (r3),-8(r3) / any more in this block beq 2b 1: rts r5 9: clr line jsr r5,error; 32. / overlapping data init jsr r5,perror rts r5 / comparison routine for qsort compare: cmp (r0),(r4) bne 1f cmp 2(r0),2(r4) 1: rts pc d of declarators 1: jsr r5,geticon br 9f cmp r0,(r2) bgt 3f dec r0 bge 2f 3: jsr r5,error; 19. / out of range clr r0 2: mov r5,-(sp) mpy r0,r5 add r5,r4 mov (sp)+,r5 mpy (r2)+,r5 jsr r5,getsym cmp r0,$36. / comma bne 1f dec (sp) bgt 1b jsr r5,error; 18. / wrong subscript count br 1b 1: cmp r0,$34. / ) beq 1f 9: jsr r5,error; 20. clr r0 1: cmp (sp)+,$1 beq 1f jsr r5,error; 18. / subscript count 1: mov (sp)+,r2 mov (sp)+,r3 movb symtab+1(r3),r5 mpy r4,r5 mov r5,r0 mov (sp)+/ / / f47 -- analysis of data statements .globl cdata .globl dodata .globl onedata .globl compare .globl code .globl getcon .globl error .globl getsym .globl consub .globl size .globl geti .globl setln .globl getln .globl declimpl .globl evalcon .globl dattab .globl contab .globl efno .globl perror .globl qsort .globl negflg .globl repfact .globl geti .globl holround cdata: mov r5,-(sp) jsr r5,setln mov $dattab,r4 mov $contab,r5 dloop: jsr r5,getln br 2f br 1f 2: mov r4,-(sp) mov $dattab,r1 mcc -s -O m6?.c cmp a.out /usr/bin/m6 cp a.out /usr/bin/m6 rm a.out *.o ,r4 mov (sp)+,r5 rts r5 ov r4,r2 mov $8.,r3 jsr pc,qsort mov (sp)+,r4 mov (sp)+,r5 rts r5 1: cmp r0,$'d bne dloop mov $line+4,r1 / loop per specification-set 1: clr repfact mov r1,r2 2: jsr r5,getsym cmp r0,$40. / =| bne 3f 8: jmp 8f 9: jmp 9f 3: cmp r0,$6 / / bne 2b mov r1,-(sp) mov r2,r1 mov (sp)+,r2 / loop per specification 2: cmp r4,r5 blo 3f jmp 7f 3: jsr r5,getsym tst r0 bne 8b bit $70,symtab(r3) / test classed bne 3f jsr r5,declimpl 3: mov symtab(r3),r0 mov r0,holquo / temp storage incb / / / 42 -- definition .globl bsss .globl code .globl size .globl declimpl .globl cdata .globl dodata .globl dattab bsss: jsr r5,cdata cmp progt,$6 / test block common bne 1f rts r5 1: jsr r5,code <.bss\n\0>; .even mov functm,r3 beq 1f jsr r5,code ; .even r3 1: cmp r4,$dattab / any data? beq 1f jsr r5,code <.data\n\0>; .even 1: jsr r5,code ; .even clr r3 1: cmp r3,symtp bhis pass2 bit $70,symtab(r3) / test classed bne 2f jsr r5,declimpl 2: mo/ / / fxx -- data segment definition .data .globl holround holround: 4 .bss / pass 1 .globl dimu dimu: .=.+2 / pass 2 .globl eqvtab / pass 3 stuff .globl conu .globl dou .globl blockp .globl dotabp .globl dotab .globl edotab .globl functn .globl blocks conu: .=.+2 dou: .=.+2 blockp: .=.+2 dotabp: .=.+2 dotab: .=.+60. edotab: functn: .=.+2 / pass 4 .globl negflg .globl repfact .globl contab .globl dattab negflg: .=.+2 repfact:.=.+2 / general buffer xbufsiz = 2200. .globl xbuf xbuf: .=.+xbufsholquo+1 / round size bicb $1,holquo+1 bit $200,r0 / test parameter bne 9b bic $!70,r0 cmp r0,$10 / simple beq 3f cmp r0,$20 / array bne 9b 3: bit $100,symtab(r3) / test common beq 3f cmp progt,$6 / test block data bne 9b mov symtab+4(r3),(r4)+ / common block br 4f 3: cmp progt,$6 / test block data beq 9b clr (r4)+ tst symtab+6(r3) / test allocated bne 4f mov nxtaloc,symtab+6(r3) jsr r5,size add r0,nxtaloc 4: clr (r4) / offset slot cmpb (r1),$'( / test subscript bne 3fv symtab(r3),r0 mov symtab+6(r3),r2 bic $!70,r0 / class cmp r0,$10 / simple beq 1f cmp r0,$20 / array beq 1f cmp r0,$30 / extrn bne 2f bit $200,symtab(r3) / param beq 2f jsr r5,code <%n. = %d.\n\0>; .even r3 r2 2: cmp r0,$40 / common block bne 2f mov symtab+6(r3),r2 / size beq 2f jsr r5,code <.comm %n,%d.\n\0>; .even r3 r2 2: add $8,r3 br 1b 1: bit $300,symtab(r3) beq 1f jsr r5,code <%n_ = %d.\n\0>; .even r3 r2 br 2b 1: tst r2 bne 1f jsr r5,size mov niz eqvtab = xbuf+518. / for pass 2 blocks = xbuf / for pass 3 dattab = xbuf+518. / for pass 4 contab = xbuf+xbufsiz / for all passes data: ibuf: .=.+518. obuf: .=.+518. tbuf: .=.+518. line: .=.+linsize eline: .=.+4 ifno: .=.+2 efno: .=.+2 errp: .=.+2 / init(errb) errb: .=.+12. eerrb: / size 0 mod 4 symtab: .=.+symsize esymtab: esymp: .=.+2 / init(esymtab) symtp: .=.+2 namebuf:.=.+namsize enamebuf: namep: .=.+2 / init(namebuf) .=.+40 /fake .=.+1 / make odd symbuf: .=.+smblsize / in inc r1 jsr r5,consub bic $70,holquo bis $10,holquo / array -> scalar mov r0,(r4) 3: movb symtab+1(r3),r0 / width of item inc r0 bic $1,r0 mov r0,holround add symtab+6(r3),(r4)+ tst repfact beq 3f dec repfact movb efno+1,r3 mov r3,(r4)+ mov r5,(r4)+ br 4f 3: mov r1,-(sp) mov r2,r1 mov (sp)+,r2 5: jsr r5,getsym cmp r0,$2 / constant beq 3f cmp r0,$10. / - bne 8f inc negflg jsr r5,getsym cmp r0,$2 / constant bne 8f 3: cmpb (r1)+,$'* bne 3f cmp r3,$intcon bne 8f jsr r5,gextaloc,r2 mov r2,symtab+6(r3) add r0,nxtaloc 1: jsr r5,code <%n_ = base+%d.\n\0>; .even r3 r2 br 2b pass2: jsr r5,dodata rts r5 it(<_>) esymbuf: ch: .=.+1 ch1: .=.+1 progt: .=.+2 holquo: .=.+2 nxtaloc:.=.+2 imptab: .=.+[26.*2*2] / 26 letters, 2 alphabets, 2 bytes nerror: .=.+2 temp: .=.+2 functm: .=.+2 edata: dsize =.-data ti dec r0 bmi 8f mov r0,repfact br 5b 3: dec r1 mov r1,-(sp) mov r2,-(sp) mov r3,efno clrb r3 swab r3 mov r3,(r4)+ sub r3,r5 mov r5,(r4)+ / ptr to const mov r5,r3 mov $symbuf,r1 jsr r5,evalcon clr negflg mov (sp)+,r1 mov (sp)+,r2 / note r1 <=> r2 4: cmpb efno+1,holquo+1 / compare sizes blt 9f / constant too small beq 3f bicb $!77,holquo cmp holquo,$int2con+10 / simple int*2? bne 4f sub $2,-4(r4) / reduce const length cmpb efno,$5 beq 3f / hollerith, OK add $2,-2(r4) / g/ / / f43 -- output globals and bdata bss's .globl globls .globl code .globl dattab .globl onedata .globl error .globl perror globls: mov progt,r0 jmp *1f(r0) 1: 1f 2f 3f 4f 1: jsr r5,code <.globl main\n\0>; .even rts r5 2: 3: jsr r5,code <.globl %n.\n\0>; .even 8 rts r5 4: 1: clr r3 1: cmp r3,symtp blo 2f rts r5 2: mov symtab(r3),r0 bic $!270,r0 cmp r0,$40 / common block bne 2f mov symtab+6(r3),r2 beq 2f mov $dattab,r1 3: cmp r1,r4 bhis 3f cmp (r1),r3 beq 4f add $8.,r1...patablefctable]mtab.catabctabMetablea.outetabctaba.outetabetabet least sig. br 3f 4: bit $20,holquo / test array beq 9f cmpb efno,$5 / test hollerith bne 9f 3: cmpb (r1),$'/ beq 3f cmpb (r1)+,$', bne 8f tst repfact bne 4f cmpb (r2)+,$', bne 8f 4: jmp 2b 3: cmpb (r2)+,$'/ bne 8f tstb (r2) beq 1f cmpb (r2),$', bne 3f inc r2 3: mov r2,r1 tst repfact bne 8f jmp 1b 7: jsr r5,error; 28. / data table overflow br 2f 8: jsr r5,error; 21. / data syntax error br 2f 9: jsr r5,error; 22. / data semantic error 2: mov $dattab,r4 / reset ptrs mo br 3b 3: jsr r5,code <.bss\n.globl %n\n%n: .=.+%d.\n.text\n\0>; .even r3 r3 r2 br 2f 4: jsr r5,code <.data\n.globl %n\n%n:\n\0>; .even r3 r3 mov r2,-(sp) mov r3,-(sp) mov r1,r3 jsr r5,onedata mov (sp)+,r3 mov (sp)+,r2 sub r1,r2 bge 9f jsr r5,error; 22. / data overrun jsr r5,perror 9: jsr r5,code <.=.+%d.\n.text\n\0>; .even r2 2: add $8,r3 br 1b / / / f44 -- formats .globl formts .globl strout .globl setln .globl getln .globl code .globl error .globl perror .globl putc .globl xbuf formts: jsr r5,setln mov $2,r3 clr xbuf+518. / pick up zero efn formats 1: jsr r5,getln br 1f cmp r0,$'s beq 2f cmp r0,$'f bne 1b mov efno,r0 jsr r5,code <.%d: <\0>; .even r0 mov $line+6,r1 jsr r5,strout mov efno,r0 neg r0 br 3f 2: mov efno,r0 3: clr r2 2: cmp r2,r3 bhis 2f cmp r0,xbuf+518.(r2) beq 3f neg r0 cmp r0,xbuf+518.(r2) beq 3f / / / real & dreal fortran function .globl real. .globl dreal. .globl retrn .globl temp dreal.: temp .+2 setd br 1f real.: temp .+2 setf 1: movf *2(r3),r0 movf r0,temp jmp retrn <=13) binop(n); else { switch(n) { case 20: doif(); return; case 21: define(); return; case 22: copy(); return; case 23: meta(); return; case 24: size(); return; case 25: substr(); return; case 26: case 27: go(n); return; case 28: remove(1); return; case 29: dnl(); return; case 32: quote(); return; case 33: result(finddef(1)->dswitch); return; case 34: list(); return; case 35: add $2,r2 neg r0 br 2b 3: jsr r5,error; 51. jsr r5,perror 2: mov r0,xbuf+518.(r3) add $2,r3 br 1b 1: jsr r5,code < .even\n>; .even jsr r5,setln 1: jsr r5,getln br 1f cmp r0,$'r beq 2f cmp r0,$'i bne 1b mov efno,r0 neg r0 br 3f 2: mov efno,r0 3: mov $2,r2 / not zero 2: cmp r2,r3 bhis 2f cmp r0,xbuf+518.(r2) beq 1b add $2,r2 br 2b 2: jsr r5,error; 52. jsr r5,perror br 1b 1: rts r5 strout: movb (r1)+,r0 beq 3f cmp r0,$'> beq 4f cmp r0,$'\\ bne 5f 4: mov r0,-(sp) mov / / / sign & dsign fortran functions .globl sign. .globl dsign. .globl retrn .globl temp .globl rerr dsign.: temp .+2 setd br 1f sign.: temp .+2 setf 1: cmp *2(sp),$2 bne 2f movf *2(r3),r0 absf r0 tstf *4(r3) cfcc bge 1f negf r0 1: movf r0,temp jmp retrn 2: jsr r5,rerr; 12. traceflag = comp(arg(1),one); return; } } } $'\\,r0 jsr r5,putc; obuf mov (sp)+,r0 5: jsr r5,putc; obuf br strout 3: jsr r5,code <\\0\>\n\0>; .even rts r5 / / / sin & dsin fortran functions .globl sin. .globl dsin. .globl sin .globl retrn .globl temp dsin.: temp .+2 setd br 1f sin.: temp .+2 setf 1: movf *2(r3),r0 jsr pc,sin movf r0,temp jmp retrn # #include "m6.h" char * finddef(n) { char *p; if((p = lookup(arg(n)))==0) if((p = lookup(""))==0) diag("Software error"); return(p); } char * lookup(s) { char *dt; dt = df; while(dt>d0) { if(dt->dswitch>=0 && comp(s,&dt->dident)) return(dt); dt =+ dt->prev; } return(0); } comp(s,t) char *s, *t; { for(;*s++ == *t;t++) if(*t==0) return(1); return(0); } remove(n) { char *p; if(p = lookup(arg(n))) if(p>d0+2) { trashflag++; p->dswitch = -1; } } trash() { char *p,*q,*r; i/ / / PDP-11 assembler pass 0 indir = 0 jmp start go: jsr pc,assem movb pof,r0 sys write; outbuf; 512. movb pof,r0 sys close movb fbfil,r0 sys close tstb errflg bne aexit jsr r5,fcreat; a.tmp3 mov r0,r1 mov symend,0f sub $usymtab,0f sys indir; 9f .data 9: sys write; usymtab; 0:.. .text mov r1,r0 sys close sys exec; 2f; 1f mov $2f,r0 jsr r5,filerr; "?\n aexit: sys unlink; a.tmp1 sys unlink; a.tmp2 sys unlink; a.tmp3 sys exit .data 1: 2f a.tmp1 a.tmp2 a.tmp3 unglob: 3f 0 ./ / / sngl fortran function .globl sngl. .globl rval8p .globl lval .globl r8r4 .globl gas4 .globl retrn .globl temp sngl.: temp lval; temp rval8p; 2 r8r4 gas4 retrn f(lg>0) return; while(df->dswitch<0) { de = df; df =+ df->prev; trashflag--; } if(trashflag<=0) return; de = (de+1)&0177776; revptr(de,df,&p,&q); q = p; for(;p->word!=0;p=+r->word) { r = p; if(p->dswitch>=0) { r = q; q = move(p,q,p->word); } } q->word = 0; revptr(d0,d0+2,&df,&de); } revptr(p,q,np,nq) char *p, *q, **np, **nq; { int t; p->word = 0; while((t = q->word)!=0) { q->word = p-q; p = q; q =+ t; if(qdmax) diag("Software error"); } *np = p; *text 2: fpass2: 3: <-g\0> .even filerr: mov r4,-(sp) mov r0,r4 mov r4,0f clr r0 1: tstb (r4)+ beq 1f inc r0 br 1b 1: mov r0,1f mov $1,r0 sys indir; 9f .data 9: sys write; 0:0; 1:0 .text mov r5,0f mov $1,r0 sys indir; 9f .data 9: sys write; 0:0; 2 .text tst (r5)+ mov (sp)+,r4 rts r5 fcreat: mov r4,-(sp) mov (r5)+,r4 mov r4,0f 1: sys indir; 9f .data 9: sys stat; 0:..; outbuf .text bec 2f mov r4,0f sys indir; 9f .data 9: sys creat; 0:..; 444 .text bes 2f mov / / / sqrt & dsqrt fortran functions .globl sqrt. .globl dsqrt. .globl sqrt .globl retrn .globl rerr .globl temp dsqrt.: temp .+2 setd br 1f sqrt.: temp .+2 setf 1: movf *2(r3),r0 jsr pc,sqrt bes 1f movf r0,temp jmp retrn 1: jsr r5,rerr; 13. nq = q; } char * move(from,to,count) char *from, *to; { while(count-->0) *to++ = *from++; return(to); } (sp)+,r4 rts r5 2: incb 9.(r4) cmpb 9.(r4),$'z blos 1b mov r4,r0 jsr r5,filerr; "?\n sys exit cc -c -O c0[012345].c cc -c -O c1[0123].c as c1t.s; mv a.out c1t.o cc cvopt.c a.out table.s table.i as table.i; mv a.out table.o cc -c -O c2[01].c ed c0t.s g/fpp =/s/1/0/ w q as c0t.s; mv a.out c0t.o cc -s -n c0?.o cmp a.out /lib/c0 cp a.out /lib/c0 ed c0t.s g/fpp =/s/0/1/ w q as c0t.s; mv a.out c0t.o cc -f -s -n c0?.o cmp a.out /lib/fc0 cp a.out /lib/fc0 cc -s -n c1?.o table.o cmp a.out /lib/c1 cp a.out /lib/c1 cc -f -s -n c1?.o table.o cmp a.out /lib/fc1 cp a.out /lib/fc1 cc -s -n c2?.o cmp a.out /li/ read rk rblk: iocom = 5 b/c2 cp a.out /lib/c2 rm *.o table.i a.out # include "r.h" char *keyword []{ "do", "DO", /* have to be first */ "if", "IF", "else", "ELSE", "for", "FOR", "repeat", "REPEAT", "until", "UNTIL", "while", "WHILE", "break", "BREAK", "next", "NEXT", "define", "DEFINE", "include", "INCLUDE", 0}; #include "y.tab.c" int keytran[]{ 0, 0, XIF, XIF, XELSE, XELSE, XFOR, XFOR, REPEAT, REPEAT, UNTIL, UNTIL, XWHILE, XWHILE, XBREAK, XBREAK, NEXT, NEXT, XDEFINE, XDEFINE, XINCLUDE, XINCLUDE, 0}; int svargc; char **svargv; int infile 0; int .globl backword .globl lookchar .globl w, r, a, l / / / routine to get words backwards from string / / mov ...,r1 / jsr pc,backword / mov r0,... / backword: cmp a(r1),r(r1) bhis nochw dec r(r1) jsr pc,lookchar movb r0,nchar+1 cmp a(r1),r(r1) bhis nochw dec r(r1) jsr pc,lookchar movb r0,nchar mov nchar,r0 rts pc / nochw: clr r0 sec rts pc / nchar: .=.+2 # #include "m6.h" define() { remove(1); newdef(decbin(3)); setdef(arg(1),arg(2)); } newdef(n) { pushdef(); de = &df[df->dtext = dend]; if((df->dswitch = n)<0) trashflag++; } setdef(s1,s2) { copydef(s1); df->dtext = de -df; copydef(s2); } copydef(s) char *s; { while(*de++ = *s++) if(de>dmax) diag("Definition table overflow"); } char * arg(n) { char *p; p = &gf->ga0; while(--n>=0 && p->word!=0) p =+ p->word; return(p->word!=0?p+2:p); } function(n) { if(n==0) ; else if(1<=n && nfd 0; int ninclude 0; int filestack[10]; int linect[10]; main(argc,argv) int argc; char **argv; { contfld = errorflag = 0; if(argc>1 && argv[1][0]=='-'){ if(argv[1][1]=='6') contfld=6; argc--; argv++; } svargc = argc; svargv = argv; filestack[0] = infile = fd = ninclude = linect[0] = 0; if(--svargc>0) if( (fd = filestack[0] = copen(svargv[++infile],'r')) < 0 ) { error("can't open %s", svargv[infile]); cexit(1); } yyparse(); cexit(errorflag); } int peek -1; int nextchar '\n'; getc(){ nextchar = (peek<0) ? gchar(): peek; peek = -1; return(nextchar); } int gcp 0; char gcbuf[300]; int apos -1; gchar(){ extern int linect[], nnames; extern char *names[], *nameptr[]; int c,i,atype,t; if( c=gcbuf[gcp++] ) return(c); loop: for(gcp=0; (c=gcbuf[gcp]=cgetc(fd))!='\0' ; gcp++ ){ if( gcbuf[0]== '%' ){ while(putchar(cgetc(fd))!='\n'); gcp = -1; ++linect[ninclude]; continue; } if( (atype=alphanum(c)) && apos < 0 ){ apos = gcp; continue; } if( !atype ) r( i=0; nameptr[index][i]=str[i]; i++ ); } / hpwrite wblk: iocom = 61  if( apos >= 0 ){ gcbuf[gcp] = '\0'; if( nnames>0 && (t=lookup(&gcbuf[apos],names))>=0){ for(i=0;gcbuf[apos++]=nameptr[t][i];i++); gcp = apos-1; } apos = -1; gcbuf[gcp] = c; } if( c < ' ' && (c!='\n' && c!='\t') ) /* strip crap */ c = gcbuf[gcp] = ' '; if( c=='#' ){ gcbuf[gcp] = '\n'; while( (c=cgetc(fd))!='\n' && c!='\0'); } if( c=='"' || c=='\'' ){ while( (gcbuf[++gcp]=t=cgetc(fd)) != c ) if( t=='\n' ) { error("unbalanced quote"); gcbuf[...Cruntab<indexsrc^mcons.hdccmn.h# #include "m6.h" main(argc,argv) char **argv; { extern fin; int t; gf = ge = g0; pf = pe = p0; t = g0; gmax =+ t-10; t = d0; dmax =+ t-10; t = p0; pmax =+ t-10; revptr(d0,d0+2,&df,&de); if(argc>1) { fin = open(argv[1],0); control(); close(fin); } fin = dup(0); control(); } diag(m) { printf("%s\n",m); iot(); } /* abort */ int iot 4; gcp] = c; gcbuf[++gcp] = c = '\n'; goto newline; } continue; } newline: if( c=='\n' ){ gcbuf[gcp+1] = '\0'; gcp = 1; ++linect[ninclude]; return(gcbuf[0]); } } if(ninclude){ cclose(filestack[ninclude--]); fd = filestack[ninclude]; goto loop; } cclose(filestack[ninclude]); if(--svargc>0){ if( (fd = filestack[ninclude] = copen(svargv[++infile],'r')) < 0) { error("can't open %s", svargv[infile]); cexit(1); } linect[0] = 0; goto loop; } return(0); } ...`alloc.cZcalloc.cocclose.cnceof.ccerror.cycexit.cbcflush.cNcfree.cxcgetc.cwciodec.cvclenf.cucopen.ctcputc.cscwrd.cddummy.srftoa.cagetch.cqgets.c^getvec.cpmakbuf.comaktab.cnnexch.cmnodig.clprintf.ckputch.cjputs.c]relvec.cirevput.chscan1.cgscan2.c#define PSIZE 1000 #define GSIZE 2000 #define DSIZE 5000 int pmax PSIZE; char p0[PSIZE]; int gmax GSIZE; char g0[GSIZE]; int dmax DSIZE; char d0[DSIZE] { 0,0, 8,0, 0,0, 6,0, 0,0, /*null*/ 12,0, 35,0, 11,0, 't','r','a','c','e',0, 12,0, 23,0, 10,0, 'w','a','r','n',0,0, 12,0, 22,0, 10,0, 'c','o','p','y',0,0, 12,0, 32,0, 11,0, 'q','u','o','t','e',0, 14,0, 33,0, 12,0, 's','e','r','i','a','l',0,0, 12,0, 34,0, 10,0, 'l','i','s','t',0,0, 12,0, 24,0, 10,0, 's','i','z','e',0,0, 14,0, 25,0, 12,0, 's',' inclstat(){ int i,c; char fname[100]; while( (c=getc())==' ' || c=='\t' ); peek = c; for(i=0; (fname[i]=c=getc())!='\n' && c!=';' && c!=' ' && c!='\t'; i++); fname[i] = '\0'; if( (fd = copen(fname,'r')) < 0 ) { error("can't open %s", fname); cexit(1); } else { filestack[++ninclude] = fd; linect[ninclude] = 0; } } lookup(string,tbl) char *string; char *tbl[]; { register i,j, r; for(i=0; tbl[i]!=0; i++){ for( j=0; (r=tbl[i][j])==string[j] && r!='\0'; j++); if( r == string[j] ) refscan3.c\system.c[tmpnam.ceunget.ccunprnt.s_wdleng.cruna.out@iehzap.calloc.ocalloc.occlose.oceof.ocerror.ocexit.ocflush.ocfree.ocgetc.ociodec.oclenf.ocopen.ocputc.ocwrd.odummy.oftoa.ogetch.ogets.ogetvec.oiehzap.omakbuf.omaktab.onexch.ou','b','s','t','r',0,0, 10,0, 26,0, 8,0, 'g','o',0,0, 12,0, 27,0, 10,0, 'g','o','b','k',0,0, 10,0, 28,0, 9,0, 'd','e','l',0, 10,0, 29,0, 9,0, 'd','n','l',0, 10,0, 7,0, 9,0, 's','e','q',0, 10,0, 8,0, 9,0, 's','n','e',0, 10,0, 9,0, 9,0, 'a','d','d',0, 10,0, 10,0, 9,0, 's','u','b',0, 10,0, 11,0, 9,0, 'm','p','y',0, 10,0, 12,0, 9,0, 'd','i','v',0, 10,0, 13,0, 9,0, 'e','x','p',0, 10,0, 1,0, 8,0, 'g','t',0,0, 10,0, 2,0, 8,0, 'e','q',0,0, 10,0, 3,0, 8,0, 'g','e',0,0, 10,0, 4,0, 8turn(i); } return( -1 ); } char str[200]; int strp; int nstr; yylex(){ int c, type; top: while( (c=getc())==' ' || c=='\n' || c=='\t' ); yylval = c; switch(c){ case '\0': return('\0'); case ';': return(SCOL); case'{': return(LCURL); case '}': return(RCURL); } peek = c; nstr = getstr(str); yylval = &str[0]; if( alldigits(str) ) return(DIGITS); type = lookup(str,keyword); if( keytran[type]==XDEFINE ) { defstat(); goto top; } else if( keytran[type]==XINCLUDE ) { inclstat(nodig.oprintf.oputch.oputs.orelvec.orevput.oscan1.oscan2.oscan3.osystem.otmpnam.ounget.ounprnt.owdleng.o,0, 'l','t',0,0, 10,0, 5,0, 8,0, 'n','e',0,0, 10,0, 6,0, 8,0, 'l', 'e',0,0, 10,0, 21,0, 9,0, 'd','e','f',0, 10,0, 20,0, 8,0, 'i','f',0, 0,0 }; int dummy[] { 0, 0, 6, '$0', 0 }; char metas[] { '<', '>', '#', ':', ';', ',', '$' }; int rescan 1; int traceflag 0; int trashflag 0; char one[] { '1',0 }; ); goto top; } else if( type > 1 ) return(keytran[type]); else if( type < 0 ) return(XGOK); while( (c=getc())==' ' || c=='\t' || c=='\n' ); peek = c; if( c>='a' && c<='z' || c>='A' && c<='Z' ) return(NEWDO); else return(OLDDO); } getstr(s) char *s; { int c, sp; for (sp=0; (c=s[sp++]=getc())!=' ' && c!='\t' && c!='\n' && c!='{' && c!='}' && c!=';' && c!='(' && c!=')' ; ) if( c=='\'' || c=='"' ) while( (s[sp++]=getc())!=c ); peek = c; s[--sp]='\0'; return(sp); } alldigits(s) c# #include "m6.h" control() { while(1) { get(); if(c==0 && lg>0) { popget(); trash(); rescan = 1; } else { if(!rescan) put(); else if(lq>0) { if(c==lquote) { lq++; put(); } else if(c==rquote || c==0) { lq--; if(lq>0 || l9>0) put (rquote); } else put(); } else if(l9>0) if(c==colon||c==0||c==semi) if(--l9<=0) endcall(); else put(); else { if(c==sharp) l9++; else if(c==lquote) lq++; put(); IEH3err (message, a, b, c, d, e) char message[]; { extern int cgoof; printf("ERROR "); printf(message, a, b, c, d, e); cputc('\n'); cexit(cgoof); } cgoof 127; har *s; { int c; if( *s == '\0' ) return(0); while( (c = *s++) != '\0' ) if( c<'0' || c>'9' ) return(0); return(1); } int dbg 0; yyerror(){;} alphanum(c) int c; { if(c>='0' && c<='9') return(1); if(c>='a' && c<='z') return(1); if(c>='A' && c<='Z') return(1); return(0); } #define MAXNAMES 100 char *names[MAXNAMES]; char *nameptr[MAXNAMES]; int nnames 0; defstat(){ int c,i,index; extern int peek,nstr; extern char str[]; char *getvec(); while( (c=getc())==' ' || c=='\t' ); peek = c; } else { if(c==sharp) begincall(); else if(c==lquote) lq++; else if(lp>0) { if(c==colon||c==0||c==semi) endcall(); else if(c==comma) newarg(); else put(); } else if(c==0) return; /* lg=lp=lq=0 */ else put(); } } } } endcall() { char *pt, *p; rescan = c!=semi; newarg(); pushget(); pt = &pf->pa0; ge = move(pt,&gf->ga0,pe-pt); if(ge>gmax) diag("Call stack overflow"); if(traceflag) dotrace(); p = finddef(0); setscan(p); popput(); lp--; function(          for(nstr=0; c=getc(); nstr++ ){ if(c==' ' || c=='\t' || c=='\n') break; str[nstr] = c; } peek = c; str[nstr] = '\0'; if( (index=lookup(str,names)) >= 0 ) nameptr[index] = 0; else if( (index = nnames++)>=MAXNAMES-1 ){ error("too many defined names"); cexit(1); } names[index] = getvec(nstr+1); for( i=0; names[index][i]=str[i]; i++ ); while( (c=getc())==' ' || c=='\t' ); peek = c; for( i=0; (c=getc())!='\n' && c!='\0'; i++ ) str[i] = c; str[i] = '\0'; nameptr[index] = getvec(i+1); fop->dswitch); } begincall() { lp++; pushput(); pe = pf+pend; pf->pan = pf->pa0 = 0; } newarg() { char *p; if(++pf->pan>=9) if(c==comma) l9++; *pe++ = 0; pe = (pe+1)&0177776; p = &pf->pa0; while(p->word!=0) p =+ p->word; p->word = pe - p; *pe++ = *pe++ = 0; } setscan(p) char *p; { gf->mchar = (gf->mframe = p)->dtext; gf->marg = 0; } / / / a6 -- pdp-11 assembler pass 2 opline: mov r4,r0 jsr r5,betwen; 0; 177 br 2f cmp r4,$5 beq opeof cmp r4,$'< bne xpr jmp opl17 xxpr: tst (sp)+ xpr: jsr pc,expres jsr pc,outw rts pc 2: movb (r4),r0 cmp r0,$24 /reg beq xpr cmp r0,$33 /est text beq xpr cmp r0,$34 / est data beq xpr jsr r5,betwen; 5; 36 br xpr mov 2(r4),-(sp) mov r0,-(sp) jsr pc,readop mov (sp)+,r0 asl r0 mov $adrbuf,r5 clr swapf mov $-1,rlimit jmp *1f-10.(r0) 1: opl5 opl6 opl7 opl10 opl11 opl12 opl13 opl14 opl15 opl16 opl17 opl20 opl21 opl22 opl23 xxpr opl25 opl26 opl27 opl30 opl31 opl32 xxpr xxpr opl35 opl36 opeof: mov $1,line mov $20,-(sp) mov $argb,r1 1: jsr pc,getw tst r4 bmi 1f movb r4,(r1)+ dec (sp) bgt 1b tstb -(r1) br 1b 1: movb $'\n,(r1)+ clrb (r1)+ tst (sp)+ rts pc opl30: / mpy, dvd etc inc swapf mov $1000,rlimit br opl13 opl14: / flop freg,fsrc inc swapf opl5: / flop src,freg mov $400,rlimit /double opl13: jsr pc,addres op2a: mov r2,-(sp) 2 rts pc alp: jsr pc,readop jsr pc,expres jsr pc,checkrp jsr pc,checkreg cmp r4,$'+ beq 1f tst (sp)+ beq 2f bis $70,r2 clr (r5)+ clr (r5)+ mov xsymbol,(r5)+ rts pc 2: bis $10,r2 rts pc 1: jsr pc,readop bis $20,r2 bis (sp)+,r2 rts pc amin: jsr pc,readop cmp r4,$'( beq 1f mov r4,savop mov $'-,r4 br getx 1: jsr pc,readop jsr pc,expres jsr pc,checkrp jsr pc,checkreg bis (sp)+,r2 bis $40,r2 rts pc adoll: jsr pc,readop jsr pc,expres mov r2,(r5)+ mov r3,(r5)+ mov xsymbol,(r         ! $ ' * -    " %  jsr pc,readop op2b: jsr pc,addres tst swapf beq 1f mov (sp),r0 mov r2,(sp) mov r0,r2 1: swab (sp) asr (sp) asr (sp) cmp (sp),rlimit blo 1f jsr r5,error; 'x 1: bis (sp)+,r2 bis (sp)+,r2 clr r3 jsr pc,outw mov $adrbuf,r1 1: cmp r1,r5 bhis 1f mov (r1)+,r2 mov (r1)+,r3 mov (r1)+,xsymbol jsr pc,outw br 1b 1: rts pc opl15: / single operand clr -(sp) br op2b opl12: / movf mov $400,rlimit jsr pc,addres cmp r2,$4 / see if source is fregister blo 1f inc swapf br op2a 1: mov $175)+ mov (sp)+,r2 bis $27,r2 rts pc astar: tst (sp) beq 1f jsr r5,error; '* 1: mov $10,(sp) jsr pc,readop jmp 4b errora: jsr r5,error; 'a rts pc checkreg: cmp r2,$7 bhi 1f cmp r1,$1 blos 2f cmp r3,$5 blo 1f 2: rts pc 1: jsr pc,errora clr r2 clr r3 rts pc errore: jsr r5,error; 'e rts pc checkrp: cmp r4,$') beq 1f jsr r5,error; ') rts pc 1: jsr pc,readop rts pc setbr: mov brtabp,r1 cmp r1,$brlen blt 1f mov $2,r2 rts pc 1: inc brtabp clr -(sp) sub dot,r0 ble 1f sub # include "dextern" output(){ /* print the output for the states */ int i, j, k, c; settab(); arrset("yyact"); for( i=0; i0 && c>4])&(1<<(k&017))) != 0 ) { if( temp1[k] == 0 ) temp1[k] = c; else if( temp1[k]<0 ){ /* reduce/reduce conflict */ settty(); printf("\n%d: reduce/reduce conflict (red'ns %d and %d ) on %s", i, -temp1[k], lastrc,expres jsr pc,checkreg swab r2 asr r2 asr r2 bis r2,(sp) jsr pc,readop jsr pc,expres tstb passno beq 3f sub dot,r2 neg r2 mov r2,r0 jsr r5,betwen; -2; 175 br 2f add $4,r2 br 1f /branch opl6: jsr pc,expres tstb passno beq 3f dobranch: sub dot,r2 mov r2,r0 jsr r5,betwen; -254.; 256. br 2f 1: bit $1,r2 bne 2f cmp r3,dot-2 / same relocation as . bne 2f asr r2 dec r2 bic $177400,r2 3: bis (sp)+,r2 clr r3 jsr pc,outw rts pc 2: jsr r5,error; 'b clr r2 br 3b /jsr opl7: js/* fake portable I/O routines, for those sites so backward as to not have the port. library */ int cin, cout; extern int fin, fout; copen( s, c ) char *s; { int f; if( c == 'r' ){ fin = f = open( s, 0 ); } else if( c == 'a' ){ f = open( s, 1 ); seek( f, 0, 2 ); } else { /* c == w */ f = creat( s, 0666 ); } return( f ); } cflush(x){ /* fake! sets file to x */ flush(); fout = x; } system(){ error( "The function \"system\" is called" ); } ccled, symnam(k) ); if( -temp1[k] > lastred ) temp1[k] = -lastred; ++zzrrconf; settab(); } else { /* potential shift/reduce conflict */ switch( precftn( lastred, k ) ) { case 0: /* precedence does not apply */ settty(); printf("\n%d: shift/reduce conflict (shift %d, red'n %d) on %s", i, temp1[k], lastred, symnam(k) ); ++zzsrconf; settab(); r pc,expres jsr pc,checkreg jmp op2a / rts opl10: jsr pc,expres jsr pc,checkreg br 1f / sys, emt etc opl11: jsr pc,expres cmp r2,$64. bhis 0f cmp r3,$1 ble 1f 0: jsr pc,errora 1: bis (sp)+,r2 jsr pc,outw rts pc / .byte opl16: jsr pc,expres jsr pc,outb cmp r4,$', bne 1f jsr pc,readop br opl16 1: tst (sp)+ rts pc / < (.ascii) opl17: jsr pc,getw mov $1,r3 mov r4,r2 bmi 2f bic $!377,r2 jsr pc,outb br opl17 2: jsr pc,getw rts pc /.even opl20: bit $1,dot beq 1f cmp dot-2,$4 ose(i){ close(i); } cexit(i){ flush(); exit(); }  break; case 1: /* reduce */ temp1[k] = -lastred; break; case 2: /* error, binary operator */ temp1[k] = ERRCODE; break; case 3: /* shift ... leave the entry alone */ break; } } } } } } wract(i); } settab(); arrdone(); /* now, output the pointers to the action array */ /* also output the info about  beq 2f / bss mode clr r2 clr r3 jsr pc,outb br 1f 2: inc dot 1: tst (sp)+ rts pc opl21: /if jsr pc,expres opl22: oplret: tst (sp)+ rts pc /.globl opl23: cmp r4,$200 blo 1f bisb $40,(r4) jsr pc,readop cmp r4,$', bne 1f jsr pc,readop br opl23 1: tst (sp)+ rts pc / .text, .data, .bss opl25: opl26: opl27: inc dot bic $1,dot mov r0,-(sp) mov dot-2,r1 asl r1 mov dot,savdot-4(r1) tstb passno beq 1f jsr r5,flush; txtp jsr r5,flush; relp mov (sp),r2 add $txtseek-[2*25],r2 mov r2main( argc, argv ) int argc; char *argv[]; { yyinit( argc, argv ); if( yyparse() ) return; yyaccpt(); } reductions */ prred(); } prred(){ /* print the information about the actions and the reductions */ int index, i; arrset("yypact"); index = 1; /* position in the output table */ for( i=0; i0 ){ /* the state is real */ temp1[i] = index; arrval( index ); index =+ tystate[i]; } else { arrval( temp1[-tystate[i]] ); } } arrdone(); arrset("yyr1"); for( i=1; i j ){ /etx jmp astar getx: jsr pc,expres cmp r4,$'( bne 2f jsr pc,readop mov r2,(r5)+ mov r3,(r5)+ mov xsymbol,(r5)+ jsr pc,expres jsr pc,checkreg jsr pc,checkrp bis $60,r2 bis (sp)+,r2 rts pc 2: cmp r3,$24 bne 1f jsr pc,checkreg bis (sp)+,r2 rts pc 1: mov r3,-(sp) bic $40,r3 mov (sp)+,r3 bis $100000,r3 sub dot,r2 sub $4,r2 cmp r5,$adrbuf beq 1f sub $2,r2 1: mov r2,(r5)+ / index mov r3,(r5)+ / index reloc. mov xsymbol,(r5)+ / index global mov $67,r2 / address mode bis (sp)+,r/ hpread rblk: iocom = 71 * no actions */ return(0); } j =- off; for( k=0; k= actsiz ) error("action table overflow"); if( k+l >= memact ) memact = k+l; amem[k+l] = p[off+l];  } } if( pkdebug ){ for( k=0; kpitem) ) < NTBASE ) goto standard; if( p0 == 0 ) p0 = p1; else if( p0 != p1 ) goto standard; } /* now, all items have dots before p0 */ if( cdebug ){ settty(); printf("state %d, pre-nonterminal %s\n",i,nontrst[p0-NTBASE].name); } for( j=0; j times ){ best = cbest; times = count; } } /* best is now the default entry */ zzgobest =+ (times-1)*2; cdebug )printf("states %d and %d have equal positions\n",i,j); q1 = pstate[j+1]; for( q0=pstate[j]; q0pitem) != p0 ) goto nextj; } /* we have a match with state j ! */ tystate[i] = -j; zzacsave =+ tystate[j]; zznsave++; wrstate(i); return; nextj: ; } standard: tystate[i] = 2; wrstate(i); size = 0; for( p0=1; p0<=nterms; ++p0 ) if( (p1=temp1[p0])!=0 ) { arrval( TESTACT+trmsent *prdptr[]; /* pointers to descriptions of productions */ extern int prdlim; /* the number of productions allowed */ extern int levprd[] ; /* contains production levels to break conflicts */ /* last two bits code associativity: 0 = no definition 1 = left associative 2 = binary 3 = right associative bit 04 is 1 if the production has an action the high 13 bits have the production level */ extern int nterms ; /* number of terminals */ extern int nerrors; /* number settab(); for( j=0; j<=nstate; ++j ){ if( tystate[j] != 0 && tystate[j]!=best ){ arrval( j ); arrval( tystate[j] ); offset =+ 2; zzgoent =+ 2; } } /* now, the default */ zzgoent =+ 2; arrval( -1 ); arrval( best ); offset =+ 2; } arrdone(); arrset("yypgo"); for( i=1; i<=nnonter; ++i ) arrval( temp2[i] ); arrdone(); } int g2debug 0; go2gen(c){ /* output the gotos for nonterminal c */ int i, work, cc; struct[p0].value ); if( p1 < 0 ) arrval( REDUCACT - p1 ); else if( p1 == ACCEPTCODE ) arrval( ACCEPTACT ); else if( p1 == ERRCODE ) arrval( ERRACT ); else arrval( SHIFTACT + p1 ); size =+ 2; } if( lastred ) arrval( REDUCACT + lastred ); else arrval( ERRACT ); tystate[i] = size+1; /* store entry size in tystate */ zzacent =+ (size+1); return; } wrstate(i){ /* writes state i */ int j0,j1,s; struct item *pp, *qq; settty(); printf("\ns of errors */ extern int fatfl; /* if on, error is fatal */ /* the ascii representations of the terminals */ extern int extval; /* start of output values */ extern struct sxxx1 {char *name; int value;} trmset[]; extern char cnames[]; extern int cnamsz; extern char *cnamp; extern int maxtmp ; /* the size of the temp arrays */ /* temporary vectors, indexable by states, terms, or nterms */ extern int temp1[]; extern int temp2[]; extern int trmlev[]; /* vector with the precedence of the terminals */ /* t item *p, *q; /* first, find nonterminals with gotos on c */ aryfil( temp1, nnonter+1, 0 ); temp1[c] = 1; work = 1; while( work ){ work = 0; for( i=0; i= 0 ){ /* cc is a nonterminal */ if( temp1[cc] != 0 ){ /* cc has a goto on c */ cc = *prdptr[i]-NTBASE; /* thus, the left side of production i does too */ if( temp1[cc] == 0 ){ work = 1; temp1[cc] = 1; } } tate %d\n",i); qq = pstate[i+1]; for( pp=pstate[i]; pp0 ){ /* shift, error, or accept */ if( j1 == ACCEPTCODE ) printf( "accept" ); else if( j1 == ERRCODE ) printThe levels are the same as for levprd, but bit 04 is always 0 */ /* the ascii representations of the nonterminals */ extern struct sxxx2 { char *name; } nontrst[]; extern int indgo[]; /* index to the stored goto table */ extern int ***pres; /* vector of pointers to the productions yielding each nonterminal */ extern struct looksets **pfirst; /* vector of pointers to first sets for each nonterminal */ extern int *pempty ; /* table of nonterminals nontrivially deriving e */ extern int nnonter ; /* the numb } } } /* now, we have temp1[c] = 1 if a goto on c in closure of cc */ if( g2debug ){ settty(); printf("%s: gotos on ", nontrst[c].name ); for( i=0; i<=nnonter; ++i ) if( temp1[i]) printf("%s ", nontrst[i].name); printf("\n"); } /* now, go through and put gotos into tystate */ aryfil( tystate, nstate, 0 ); settty(); printf("\nnonterminal %s\n", nontrst[c].name ); for( i=0; ipitem) >= NTBASE ){ if( temp1[cc =- NTBASE] ){ /* goto on c is possible */ tystate[i] = amem[indgo[i]+c]; break; } } } if( tystate[i] ) printf("\t%d\t%d\n", i, tystate[i]); } } precftn(r,t){ /* decide a shift/reduce conflict by precedence. Returns 0 if action is 'do nothing',1 if action is reduce, 2 if the action is 'error,binary operator' and 3 if the action is 'reduce'. */ int lp,lt; lp = levprd[r]; lt = trmlev[t]; if ((lt==0)+ .   # & ) , truct {int **ppi;} ; extern int ntlim ; /* maximum number of nonterminals */ extern int tlim ; /* maximum number of terminals */ extern int lineno; /* current line number */ extern int peekc; /* look-ahead character */ extern int tstates[]; extern int ntstates[]; extern int mstates[]; extern struct looksets clset; extern struct looksets lkst[]; extern int nlset; /* next lookahead set index */ extern int lsetsz; /* number of lookahead sets */ extern struct wset { int *pitem, flag, ws[ _tbitset ]; } wsets[||((lp&03)==0))return(0); if((lt>>3) == (lp>>3)){ return(lt&03); } if((lt>>3) > (lp>>3)) return(3); return(1); } int cdebug 0; /* debug for common states */ wract(i){ /* output state i */ /* temp1 has the actions, lastred the default */ int p, p0, p1, size; int ntimes, tred, count, j; struct item *q0, *q1; /* find the best choice for lastred */ lastred = 0; ntimes = 0; for( j=1; j<=nterms; ++j ){ if( temp1[j] >= 0 ) continue; if( temp1[j]+lastred == 0 ) continue; /* co# /* MANIFEST CONSTANT DEFINITIONS */ # define NTBASE 010000 /* internal codes for error and accept actions */ # define ERRCODE 8190 # define ACCEPTCODE 8191 # define errfileno 1 /* file number for erros and reduction message */ # define _tbitset 6 /* 16*_tbitset - 1 >= _nterms */ extern int tbitset; /* number of wds of lookahead vector */ extern int nolook; /* flag to turn off lookahed computations */ struct looksets { int lset[ _tbitset ]; } ; struct item { int *pitem; struct looksets *lo]; extern int cwset; extern int wssize; extern int numbval; /* the value of an input number */ extern int rflag; /* ratfor flag */ extern int oflag; /* optimization flag */ extern int ndefout; /* number of defined symbols output */ extern int machine; # define UNIX 1 # define GCOS 2 # define IBM 3 unt the number of appearances of temp1[j] */ count = 0; tred = -temp1[j]; for( p=1; p<=nterms; ++p ){ if( temp1[p]+tred == 0 ) ++count; } if( count >ntimes ){ lastred = tred; ntimes = count; } } /* clear out entries in temp1 which equal lastred */ for( p=1; p<= nterms; ++p ) if( temp1[p]+lastred == 0 )temp1[p]=0; /* write out the state */ /* first, check for equality with another state */ /* see if there is a nonterminal with all dots ok; } ; /* output actions */ # define ERRACT 0 # define TESTACT 4096 # define SHIFTACT 8192 # define REDUCACT 12288 # define ACCEPTACT 16384 # define _REGISTER register extern int nstate ; /* number of states */ extern struct item *pstate[]; /* pointers to the descriptions of the states */ extern int apstate[]; /* index to actions in amem by state */ extern int actsiz; /* size of the action table array */ extern int tystate[]; /* contains type information about the states */ /* 0 = simple state,chdir lib cc -c -O *.c ar r /lib/liby.a *.o rm *.o chdir ../source cc -s -O y?.c cmp a.out /usr/bin/yacc cp a.out /usr/bin/yacc rm a.out *.o # define _actsize 1500 # define _memsize 3500 # define _nstates 400 # define _nterms 95 # define _nprod 250 # define _nnonterm 100 # define _tempsize 400 # define _cnamsz 2000 # define _lsetsize 200 # define _wsetsize 150 # define _tbitset 6 int tbitset; /* size of lookahed sets */ int nolook 0; /* flag to suppress lookahead computations */ struct looksets { int lset[ _tbitset ]; } ; struct item { int *pitem; } ; /* this file contains the definitions for most externally known data */ int nstate 0; /* 4 7 : = @ C F 2 5 8 ; > A D G H tack); if (stack == 0) { list->typ = 0; return(comp); } if (op1 == 6) { if (op != 5) writes("too many ('s"); goto l1; } if (op1 == 7) c = alloc(); list->typ = op1; list->p2 = c->p1; list->p1 = c; list = c; goto l6; } match(start, m) struct node *m; { register struct node *list, *comp, *term; struct node *a; int b, bal; term = bal = 0; list = alloc(); m->p2 = list; comp = start; if (!comp) comp = compon(); goto l2; l3: list->p1 = a = alloc(); list = a; l2: switch (compnumber of states */ struct item *pstate[_nstates]; /* pointers to the descriptions of the states */ int apstate[_nstates]; /* index to the actions for the states */ int tystate[_nstates]; /* contains type information about the states */ int stsize _nstates; /* maximum number of states, at present */ int memsiz _memsize; /* maximum size for productions and states */ int mem0[_memsize] ; /* production storage */ int *mem mem0; int amem[_actsize]; /* action table storage */ int actsiz _actsize; /* action tabl#include "sno.h" compon() { register struct node *a, *b; register int c; static next; if (next == 0) schar = getc(); else next = 0; if (schar == 0) { (a=alloc())->typ = 0; return(a); } switch (class(schar->ch)) { case 1: schar->typ = 5; return(schar); case 2: schar->typ = 16; return(schar); case 3: a = schar; for(;;) { schar = getc(); if (schar == 0) { a->typ = 0; return(a); } if (class(schar->ch) != 3) break; free(schar); } next = 1; a->t->typ) { case 7: free(comp); comp = compon(); goto l2; case 12: case 14: case 15: case 16: term = 0; comp = expr(comp, 6, list); list->typ = 1; goto l3; case 1: free(comp); comp = compon(); bal = 0; if (comp->typ == 16) { bal = 1; free(comp); comp = compon(); } a = alloc(); b = comp->typ; if (b == 2 | b == 5 | b == 10 | b == 1) a->p1 = 0; else { comp = expr(comp, 11, a); a->p1 = a->p2; } if (comp->typ != 2) { a->p2 = 0; } else { free(comp);e size */ int memact 0; /* next free action table position */ int nprod 1; /* number of productions */ int *prdptr[_nprod]; /* pointers to descriptions of productions */ int prdlim _nprod ; /* the maximum number of productions */ /* levprd - productions levels to break conflicts */ int levprd[_nprod] {0,0}; /* last two bits code associativity: 0 = no definition 1 = left associative 2 = binary 3 = right associative bit 04 is 1 if the production has an action the higyp = 7; return(a); case 4: schar->typ = 8; return(schar); case 5: schar->typ = 9; return(schar); case 6: a = schar; schar = getc(); if (class(schar->ch) == 3) a->typ = 10; else a->typ = 1; next = 1; return(a); case 7: a = schar; schar = getc(); if (class(schar->ch) == 3) a->typ = 11; else a->typ = 2; next = 1; return(a); case 8: schar->typ = 12; return(schar); case 9: c = schar->ch; a = getc(); if(a == 0) goto lerr; b = schar; if(a->ch = comp = expr(0, 6, a); } if (bal) { if (comp->typ != 5) goto merr; free(comp); comp = compon(); } b = comp->typ; if (b != 1 & b != 10) goto merr; list->p2 = a; list->typ = 2; a->typ = bal; free(comp); comp = compon(); if(bal) term = 0; else term = list; goto l3; } if(term) term->typ = 3; list->typ = 0; return(comp); merr: writes("unrecognized component in match"); } compile() { register struct node *b, *comp; struct node *r, *l, *xs, *xf, *g; regih 13 bits have the production level */ int nterms 0; /* number of terminals */ int tlim _nterms ; /* the maximum number of terminals */ /* the ascii representations of the terminals */ int extval 0; /* start of output values */ struct sxxx1 {char *name; int value;} trmset[_nterms]; char cnames[_cnamsz]; int cnamsz _cnamsz; char *cnamp; int maxtmp _tempsize; /* the size of the temp1 array */ int temp1[_tempsize]; /* temporary storage, indexed by terms + nterms or states */ int temp2[_nnonterm]; /* temp= c) { free(schar); a->typ = 15; a->p1 = 0; return(a); } b->p1 = a; for(;;) { schar = getc(); if (schar == 0) lerr: writes("illegal literal string"); if(schar->ch == c) break; a->p1 = schar; a = schar; } b->p2 = a; schar->typ = 15; schar->p1 = b; return(schar); case 10: schar->typ = 3; return(schar); case 11: schar->typ = 4; return(schar); } b = alloc(); b->p1 = a = schar; schar = getc(); while(schar!=0 & !class(schar->ch)) { a->p1 = ster int a; int m, t, as; m = l = as = xs = xf = t = 0; comp = compon(); a = comp->typ; if (a == 14) { l = comp->p1; free(comp); comp = compon(); a = comp->typ; } if (a != 7) writes("no space beginning statement"); free(comp); if (l == lookdef) goto def; comp = expr(0, 11, r=alloc()); a = comp->typ; if (a == 0) goto asmble; if (a == 2) goto xfer; if (a == 3) goto assig; m = alloc(); comp = match(comp, m); a = comp->typ; if (a == 0) goto asmble; if (a == 2) goto xferorary storage indexed by nonterminals */ int trmlev[_nterms]; /* vector with the precedence of the terminals */ /* The levels are the same as for levprd, but bit 04 is always 0 */ /* the ascii representations of the nonterminals */ struct sxxx2 { char *name; } nontrst[_nnonterm]; int ntlim _nnonterm ; /* limit to the number of nonterminals */ int indgo[_nstates]; /* index to the stored goto table */ int ***pres; /* vector of pointers to the productions yielding each nonterminal */ struct looksets **pfirsschar; a = schar; schar = getc(); } b->p2 = a; next = 1; a = look(b); delete(b); b = alloc(); b->typ = 14; b->p1 = a; return(b); } nscomp() { register struct node *c; while((c=compon())->typ == 7) free(c); return(c); } push(stack) { register struct node *a; (a=alloc())->p2 = stack; return(a); } pop(stack) struct node *stack; { register struct node *a, *s; s = stack; if (s == 0) writes("pop"); a = s->p2; free(s); return(a); } expr(start, eof, e) struct node *e; { register; if (a == 3) goto assig; writes("unrecognized component in match"); assig: free(comp); comp = expr(0, 6, as=alloc()); a = comp->typ; if (a == 0) goto asmble; if (a == 2) goto xfer; writes("unrecognized component in assignment"); xfer: free(comp); comp = compon(); a = comp->typ; if (a == 16) goto xboth; if (a == 0) { if (xs!=0 | xf!=0) goto asmble; goto xerr; } if (a != 14) goto xerr; b = comp->p1; free(comp); if (b == looks) goto xsuc; if (b == lookf) goto xfail; t; /* vector of pointers to first sets for each nonterminal */ int *pempty 0 ; /* table of nonterminals nontrivially deriving e */ int nnonter -1; /* the number of nonterminals */ int lastred 0; /* the number of the last reduction of a state */ int ftable; /* y.tab.c file */ int foutput; /* y.output file */ int arrndx; /* used in the output of arrays on y.tab.c */ int zzcwset 0; int zzpairs 0; int zzgoent 0; int zzgobest 0; int zzacent 0; int zzacsave 0; int zznsave 0; int zzclose 0; int zzsrconf 0; int z struct node *stack, *list, *comp; int operand, op, space, op1; struct node *a, *b, *c; int d; list = alloc(); e->p2 = list; stack = push(0); stack->typ = eof; operand = 0; space = start; l1: if (space) { comp = space; space = 0; } else comp = compon(); l3: op = comp->typ; switch (op) { case 7: space = 1; free(comp); comp = compon(); goto l3; case 10: if (space == 0) { comp->typ = 1; goto l3; } case 11: if (space == 0) { comp->typ = 2; goto l3; } casexerr: writes("unrecognized component in goto"); xboth: free(comp); xs = alloc(); xf = alloc(); comp = expr(0, 6, xs); if (comp->typ != 5) goto xerr; xf->p2 = xs->p2; comp = compon(); if (comp->typ != 0) goto xerr; goto asmble; xsuc: if(xs) goto xerr; comp = compon(); if (comp->typ != 16) goto xerr; comp = expr(0, 6, xs=alloc()); if (comp->typ != 5) goto xerr; goto xfer; xfail: if (xf) goto xerr; comp = compon(); if (comp->typ != 16) goto xerr; comp = expr(0, 6, xf=alloc(zrrconf 0; char *ctokn; int lineno 1; /* current input line number */ int peekc -1; /* look-ahead character */ int tstates[ _nterms ]; /* states generated by terminal gotos */ int ntstates[ _nnonterm ]; /* states generated by nonterminal gotos */ int mstates[ _nstates ]; /* chain of overflows of term/nonterm generation lists */ struct looksets clset; struct looksets lkst [ _lsetsize ]; int nlset 0; /* next lookahead set index */ int lsetsz _lsetsize; /* number of lookahead sets */ struct wset { int *pite 8: case 9: if (operand == 0) writes("no operand preceding operator"); operand = 0; goto l5; case 14: case 15: if (operand == 0) { operand = 1; goto l5; } if (space == 0) goto l7; goto l4; case 12: if (operand == 0) goto l5; if (space) goto l4; l7: writes("illegal juxtaposition of operands"); case 16: if (operand == 0) goto l5; if (space) goto l4; b = compon(); op = comp->typ = 13; if (b->typ == 5) { comp->p1 = 0; goto l10; } comp->p1 )); if (comp->typ != 5) goto xerr; goto xfer; asmble: if(l) { if (l->typ) writes("name doubly defined"); l->p2 = comp; l->typ = 2; /* type label;*/ } comp->p2 = r; if (m) { t++; r->p1 = m; r = m; } if (as) { t =+ 2; r->p1 = as; r = as; } (g=alloc())->p1 = 0; if (xs) { g->p1 = xs->p2; free(xs); } g->p2 = 0; if (xf) { g->p2 = xf->p2; free(xf); } r->p1 = g; comp->typ = t; comp->ch = lc; return(comp); def: r = nscomp(); if (r->typ != 14) goto derr; l = r-m, flag, ws[_tbitset]; } wsets[ _wsetsize ]; int cwset; int wssize _wsetsize; int numbval; /* the value of an input number */ int rflag 0; /* ratfor flag */ int oflag 0; /* optimization flag */ int ndefout 3; /* number of defined symbols output */ int nerrors 0; /* number of errors */ int fatfl 1; /* if on, error is fatal */ int machine; /* has a number describing the machine */ = a = alloc(); b = expr(b, 6, a); while((d=b->typ) == 4) { a->p1 = b; a = b; b = expr(0, 6, a); } if (d != 5) writes("error in function"); a->p1 = 0; l10: free(b); goto l6; l4: space = comp; op = 7; operand = 0; goto l6; } if (operand==0) writes("no operand at end of expression"); l5: space = 0; l6: op1 = stack->typ; if (op > op1) { stack = push(stack); if (op == 16) op = 6; stack->typ = op; stack->p1 = comp; goto l1; } c = stack->p1; stack = pop(s>p1; if (l->typ) writes("name doubly defined"); l->typ = 5; /*type function;*/ a = r; l->p2 = a; r = nscomp(); l = r; a->p1 = l; if (r->typ == 0) goto d4; if (r->typ != 16) goto derr; d2: r = nscomp(); if (r->typ != 14) goto derr; a->p2 = r; r->typ = 0; a = r; r = nscomp(); if (r->typ == 4) { free(r); goto d2; } if (r->typ != 5) goto derr; free(r); if ((r=compon())->typ != 0) goto derr; free(r); d4: r = compile(); a->p2 = 0; l->p1 = r; l->p2 = 0; return(r); derr: writes("illegal component in define"); }  ; p = prdptr[-*p]; q = chcopy( sarr, nontrst[*p-NTBASE].name ); q = chcopy( q, " : " ); for(;;){ *q++ = ++p==(pp->pitem) ? '_' : ' '; if((i = *p) <= 0) break; q = chcopy( q, symnam(i) ); } *q = '\0' ; return( sarr ); } char *symnam(i){ /* return a pointer to the name of symbol i */ char *cp; cp = (i>=NTBASE) ? nontrst[i-NTBASE].name : trmset[i].name ; if( *cp == ' ' ) ++cp; return( cp ); } summary(){ /* output the summary on the tty */ int i, s, *pn; if( !rflag ){ settab(yyinit(){} N Q T W Z ] I L O R U X [ ); printf("\nint nterms %d;",nterms); printf("\nint nnonter %d;", nnonter); printf("\nint nstate %d;", nstate); printf("\nchar *yysterm[] {"); for (i=1;i<=nterms;i++) if( trmset[i].value >= 0400 ) printf("\n\"%s\",",symnam(i)); printf( "\n0 };\n" ); printf("\nchar *yysnter[] {"); for (i=0;igrammar rules, term=>token, etc. *** handle # define, #ifdef, etc., in yacc actions, %{ %} ; printf("%d/%d grammar rules, %d/%d states\n", nprod, prdlim, nstate, stsize ); printf("%d shift/reduce, %d reduce/reduce conflicts reported\n", zzsrconf, zzrrconf ); pn = pstate[nstate+1]; printf("%d/%d working sets used\n", zzcwset, wssize ); printf("memory: states,etc. %d/%d, parser %d/%d\n", pn-mem0, memsiz, memact, actsiz ); printf("%d/%d distinct lookahead sets\n", nlset, lsetsz ); printf("%d extra closures\n", zzclose - 2*nstate ); printf("%d action entries\n", zzacent ); pr,...$dextern&y0.c(y1.cKy2.c1y3.c#y4.cy5.cl.outy0.oy1.oy2.oy3.oy4.oy5.oa.out */ /* new features to be added *** reductions by single productions ( by request ) *** follow sets for start symbol *** option to only do slr(1) *** easily changed array names on output *** allocate core, rather than predefined *** input controlled by a grammar *** support multiple choices for conflicts *** better conflict diagnostics */ main(argc,argv) int argc; char *argv[]; { auto int n; whereami(); setup(argc,argv); /* initialize and read productions */ intf("%d action entries saved through merging %d states\n",zzacsave,zznsave); printf("%d goto entries\n", zzgoent ); printf("%d entries saved by goto default\n", zzgobest ); if( zzsrconf!=0 || zzrrconf!=0 ){ cflush( errfileno ); cout = errfileno; printf("\nconflicts: "); if( zzsrconf )printf( "%d shift/reduce" , zzsrconf ); if( zzsrconf && zzrrconf )printf( ", " ); if( zzrrconf )printf( "%d reduce/reduce" , zzrrconf ); printf( "\n" ); } } error(s,a1){ /* write out erV Y \ _ ` c f i l tbitset = (nterms+16)/16; cpres(); /* make table of which productions yield a given nonterminal */ cempty(); /* make a table of which nonterminals can match the empty string */ cpfir(); /* make a table of e free first lists */ stagen(); /* generate the states */ output(); /* write the states and the tables */ go2out(); summary(); windup(); } whereami(){ /* sets the variable machine to UNIX, GCOS, or IBM */ int i; i = 1; i = i << 30; if( i == 0 ) { machine = UNIX; returnror comment */ int c; ++nerrors; cflush( errfileno ); cout = errfileno; /* set output to tty */ printf("\n fatal error: "); printf(s,a1); printf(", line %d\n", lineno ); if( !fatfl ) return; summary(); cexit(1); } arrset(s) char s[]; { printf("\nint %s[] {0", s ); arrndx = 1; } arrval(n){ printf(",%d",n); if( (++arrndx%10) == 0 ) printf("\n"); } arrdone(){ printf(",-1};\n"); } copy(v) char *v; { /* copy ctokn to v */ char *p; p=ctokn; while( *v++ = *p++ ); } compare(vint nofloat; int peekc; int obuf[259]; int tabflg; int labno 1; main(argc, argv) char **argv; { /* A1 -> A A2 B A O B1 C B2 D BE L BF P C1 E C2 F F G H H R I R1 J S K I M M N * +1 S +2 C +4 1 +8 z -> 4 c 10 a 14 e 20 n 63 * +0100 */ auto c,snlflg,nlflg,t,smode,m,ssmode; extern fin; smode = nlflg = snlflg = ssmode = 0; if (argc>1) if ((fin = open(argv[1], 0)) < 0) { putchar('?\n'); return; } ; } i = i << 4; if( i == 0 ){ machine = IBM; return; } machine = GCOS; } windup(){ /* no errors, do the optimization if appropriate */ char *cp; int i; cflush(1); if( !oflag ) cexit(0); for( i=3; i<10; ++i ) cclose(i); switch( machine ){ case GCOS: if( rflag ){ if( foutput<0 ) system( "./yopt -r" ); else system( "./yopt -rv" ); } else { if( foutput<0 ) system( "./yopt" ); else system( "./yopt -v" ); } cexit(0); /* t) char *v; { /* compare ctokn with v */ char *p; for( p=ctokn; ; ++p ){ if( *p != *v++ ) return( 0 ); if( *p == 0 ) return(1); } } int *yalloc(n){ /* allocate n+1 words from vector mem */ int *omem; omem = mem; mem =+ n+1; if(mem-mem0 >= memsiz) error("memory overflow"); return(omem); } aryfil( v, n, c ) int *v,n,c; { /* set elements 0 through n-1 to c */ int i; for( i=0; i2) if ((obuf[0] = creat(argv[2], 0666)) < 0) { putchar('?\n'); return; } loop: c = getc(); if (c!='\n' && c!='\t') nlflg = 0; if (ssmode!=0 && c!='%') { ssmode = 0; printf(".data\nL%d:<", labno++); } switch(c) { case '\0': printf(".text; 0\n"); fflush(obuf); return; case ':': if (!smode) printf("=.+2; 0"); else putchar(':'); goto loop; case 'A': if ((c=getc())=='1' || c=='2') { putchar(c+'A'-'1'); goto loop; } putchar('O'); peekerminate */ case UNIX: cp = "/usr/yacc/yopti"; if( rflag ) execl( cp, cp, (foutput<0)?"-r":"-rv", 0 ); else if( foutput<0 ) execl( cp, cp, 0 ); else execl( cp, cp, "-v", 0 ); error( "optimization execl call fails" ); case IBM: if( rflag ){ if( foutput<0 ) system( "MH2019.yaccopt -r" ); else system( "MH2019.yaccopt -rv" ); } else { if( foutput<0 ) system( "MH2019.yaccopt" ); else system( "MH2019.yaccopt -v" ); } cexit(0); } }  b */ /* return 1 if c is not a subset of b, 0 otherwise */ _REGISTER int i, x, sub; sub = 0; for( i=0; ilset; if( pp == 0 ) printf("\tNULL"); else { printf(" { " ); for( j=1; j<=nterms; ++j ){ if( (pp[j>>4]>>(j&017) )&01 != 0 ) printf( "%s ", symnam(j) ); } printf( "}" ); } } c = c; goto loop; case 'B': switch (getc()) { case '1': putchar('C'); goto loop; case '2': putchar('D'); goto loop; case 'E': putchar('L'); goto loop; case 'F': putchar('P'); goto loop; } putchar('?'); goto loop; case 'C': putchar(getc()+'E'-'1'); goto loop; case 'F': putchar('G'); goto subtre; case 'R': if ((c=getc()) == '1') putchar('J'); else { putchar('I'); peekc = c; } goto loop; case 'H': putchar('H'); goto subtre; cassettty() /* sets the output file to y.output */ { cflush( foutput ); /* a bit of a cheat */ cout = foutput; } settab(){ /* sets the output file to y.tab.c */ cflush( ftable ); cout = ftable; } char *chcopy( p, q ) char *p, *q; { /* copies string q into p, returning next free char ptr */ while( *p = *q++ ) ++p; return( p ); } char *writem(pp) struct item *pp; { /* creates output string for item pointed to by pp */ int i,*p; static char sarr[100]; char *q; for( p=pp->pitem; *p>0 ; ++p )extern int yyline; /* input line number */ yyerror(s) char *s; { extern int yychar; extern char *yysterm[]; printf("\n%s", s ); if( yyline ) printf(", line %d,", yyline ); printf(" on input: "); if( yychar >= 0400 ) printf("%s\n", yysterm[yychar-0400] ); else switch ( yychar ) { case '\t': printf( "\\t\n" ); return; case '\n': printf( "\\n\n" ); return; case '\0': printf( "$end\n" ); return; default: printf( "%c\n" , yychar ); return; } } e 'I': putchar('M'); goto loop; case 'S': putchar('K'); subtre: snlflg = 1; t = 'A'; l1: switch (c=getc()) { case '*': t++; goto l1; case 'S': t =+ 2; goto l1; case 'C': t =+ 4; goto l1; case '1': t =+ 8; goto l1; case '2': t =+ 16; goto l1; } peekc = c; putchar(t); goto loop; case '#': if(getc()=='1') putchar('#'); else putchar('"'); goto loop; case '%': if (smode) printf(".text;"); if (ssmode==0) { if ((peekc=getc())=='[') { peekc = 0; printf(".data;"); while((c=getc())!=']') putchar(c); getc(); printf(";.text;"); goto loop; } } loop1: switch (c=getc()) { case ' ': case '\t': goto loop1; case 'a': m = 16; t = flag(); goto pf; case ',': putchar(';'); goto loop1; case 'i': m = 12; t = flag(); goto pf; case 'z': m = 4; t = flag(); goto pf; case 'r': m = 9; t = flag(); goto pf; case '1': m = 5; t = flag(); goto p if (stack->typ) writes("illegal function"); a1 = stack->p1; if (a1->typ!=5) writes("illegal function"); a1 = a1->p2; op = a1->p1; a3base = a3 = alloc(); a3->p2 = op->p2; op->p2 = 0; a1 = a1->p2; a2 = list->p2; f1: if (a1!=0 & a2!=0) goto f2; if (a1!=a2) writes("parameters do not match"); op = op->p1; goto f3; f2: a3->p1 = a4 = alloc(); a3 = a4; a3->p2 = and(a1); assign(a1->p1, eval(a2->p2, 1));/* recursive */ a1 = a1->p2; a2 = a2->p1; goto f1; f3: oe h k n q t w x { ~ y |  f; case 'c': t = 0; m = 8; goto pf; case 'e': t = flag(); m = 20; goto pf; case 'n': t = flag(); m = 63; pf: if ((c=getc())=='*') m =+ 0100; else peekc = c; printf(".byte %o,%o", m, t); goto loop1; case '[': printf("L%d=", labno++); while ((c=getc())!=']') putchar(c); ssmode = 0; smode = 0; goto loop; case '\n': printf("\nL%d\n", labno); ssmode = 1; nlflg = 1; smode = 1; goto loop; } putchar(c); goto loop1; casep = execute(op); /* recursive */ if (op) goto f3; a1 = stack->p1->p2; op = a1->p1; a3 = a3base; stack->p1 = op->p2; stack->typ = 1; op->p2 = a3->p2; f4: a4 = a3->p1; free(a3); a3 = a4; a1 = a1->p2; if (a1 == 0) goto advanc; assign(a1->p1, a3->p2); goto f4; case 11: case 10: case 9: case 8: case 7: a1 = and(stack); stack = pop(stack); a2 = and(stack); a3 = doop(op, a2, a1); delete(a1); delete(a2); stack->p1 = a3; stack->typ = 1; goto advanc; case 15:# include "dextern" cpres(){ /* conpute an array with the beginnings of productions yielding given nonterminals The array pres points to these lists */ int i,j,c; pres = yalloc(nnonter+1); for(i=0;i<=nnonter;i++){ c = i+NTBASE; pres[i] = mem; fatfl = 0; /* make undefined symbols nonfatal */ for(j=0;j\n.text\n"); smode = 0; goto loop; } if (!snlflg) printf("\\n"); snlflg = 0; printf(">\n<"); nlflg = 1; goto loop; case 'X': case 'Y': case 'T': snlflg++; } putchar(c); goto loop; } getc() { auto t, ifcnt; ifcnt = 0; gc: if (peekc) { t a1 = copy(list->p2); a2 = 1; goto l3; case 14: a1 = list->p2; a2 = 0; l3: stack = push(stack); stack->p1 = a1; stack->typ = a2; goto advanc; } } doop(op, arg1, arg2) { register int a1, a2; a1 = arg1; a2 = arg2; switch (op) { case 11: return(div(a1, a2)); case 10: return(mult(a1, a2)); case 8: return(add(a1, a2)); case 9: return(sub(a1, a2)); case 7: return(cat(a1, a2)); } return(0); } execute(e) struct node *e; { register struct node *r, *b, *c; struct node *ummary(); cexit(1); } } int indebug 0; cpfir() { /* compute an array with the first of nonterminals */ int i, ch, **s, **t, changes, *p; pfirst = yalloc(nnonter+1); for (i=0;i<=nnonter;i++) { aryfil( wsets[i].ws, tbitset, 0 ); t = pres[i+1]; for( s=pres[i]; s 0 ; ++p ) { if( ch < NTBASE ) { wsets[i].ws[ch>>4] =| (1 << (ch&017) ); break; } else if( !pempty[ch-NTBASE] = peekc; peekc = 0; } else t = getchar(); if (t==0) return(0); if (t=='{') { ifcnt++; t = getchar(); } if (t=='}') { t = getc(); if (--ifcnt==0) if (t=='\n') t = getc(); } if (ifcnt && nofloat) goto gc; return(t); } flag() { register c, f; f = 0; l1: switch(c=getc()) { case 'w': f = 1; goto l1; case 'i': f = 2; goto l1; case 'b': f = 3; goto l1; case 'f': f = 4; goto l1; case 'd': f = 5; goto l1; case 's': f = 6; goto l1; case 'l': m, *ca, *d, *a; r = e->p2; lc = e->ch; switch (e->typ) { case 0: /* r g */ a = r->p1; delete(eval(r->p2, 1)); goto xsuc; case 1: /* r m g */ m = r->p1; a = m->p1; b = eval(r->p2, 1); c = search(m, b); delete(b); if (c == 0) goto xfail; free(c); goto xsuc; case 2: /* r a g */ ca = r->p1; a = ca->p1; b = eval(r->p2, 0); assign(b, eval(ca->p2, 1)); goto xsuc; case 3: /* r m a g */ m = r->p1; ca = m->p1; a = ca->p1; b = eval(r->p2, 0); d = search(m, b->p2 ) break; } } } /* now, reflect transitivity */ changes = 1; while( changes ){ changes = 0; for( i=0; i<=nnonter; ++i ){ t = pres[i+1]; for( s=pres[i]; s= 0; ++p ) { changes =| union( wsets[i].ws, wsets[i].ws, wsets[ch].ws ); if( !pempty[ch] ) break; } } } } for( i=0; i<=nnonter; i++ ) pfirst[i] = flset( wsets[i].ws ); if( !indebug ) return; settty(); f f = 8; goto l1; case 'p': f =+ 16; goto l1; } peekc = c; return(f); } putchar(c) { if (tabflg) { tabflg = 0; printf(">;.byte %o;<", c+0200); } else putc(c, obuf); } ); if (d == 0) goto xfail; c = eval(ca->p2, 1); if (d->p1 == 0) { free(d); assign(b, cat(c, b->p2)); delete(c); goto xsuc; } if (d->p2 == b->p2->p2) { assign(b, c); free(d); goto xsuc; } (r=alloc())->p1 = d->p2->p1; r->p2 = b->p2->p2; assign(b, cat(c, r)); free(d); free(r); delete(c); goto xsuc; } xsuc: if (rfail) goto xfail; b = a->p1; goto xboth; xfail: rfail = 0; b = a->p2; xboth: if (b == 0) { return(e->p1); } b = eval(b, 0); if (b == lookror( i=0; i<=nnonter; i++ ){ printf( "\n%s: ", nontrst[i].name ); prlook( pfirst[i] ); printf( " %d\n", pempty[i] ); } } state(c){ /* sorts last state,and sees if it equals earlier ones. returns state number */ int s,size1,size2; _REGISTER i; struct item *p1, *p2, *k, *l, *q1, *q2; p1 = pstate[nstate]; p2 = pstate[nstate+1]; if(p1==p2) return(0); /* null state */ /* sort the items */ for(k=p2-1;k>p1;k--) { /* make k the biggest */ for(l=k-1;l>=p1;--l)if( l->pitem > k->pitem ){ r u a d g j m p s et) return(0); if (b == lookfret) { rfail = 1; return(0); } if (b->typ!=2) writes("attempt to transfer to non-label"); return(b->p2); } assign(adr, val) struct node *adr, *val; { register struct node *a, *addr, *value; addr = adr; value = val; if (rfail == 1) { delete(value); return; } switch (addr->typ) { default: writes("attempt to make an illegal assignment"); case 0: addr->typ = 1; case 1: delete(addr->p2); addr->p2 = value; return; case 4: sysput(value); return s = k->pitem; k->pitem = l->pitem; l->pitem = s; s = k->look; k->look = l->look; l->look = s; } } size1 = p2 - p1; /* size of state */ for( i= (c>=NTBASE)?ntstates[c-NTBASE]:tstates[c]; i != 0; i = mstates[i] ) { /* get ith state */ q1 = pstate[i]; q2 = pstate[i+1]; size2 = q2 - q1; if (size1 != size2) continue; k=p1; for(l=q1;lpitem != k->pitem ) break; ++k; } if (l != q2) continue; /* found it */ pstate[nstate+1] = pstate[nstate]; /* d#include "sno.h" /* * sno4 */ and(ptr) struct node *ptr; { register struct node *a, *p; p = ptr; a = p->p1; if (p->typ == 0) { switch (a->typ) { case0: case 0: a->typ = 1; case 1: goto l1; case 3: flush(); return(syspit()); case 5: a = a->p2->p1; goto l1; case 6: return(binstr(nfree())); } writes("attempt to take an illegal value"); goto case0; l1: a = copy(a->p2); } return(a); } eval(e, t) struct node *e; { struct node *list, *a2, *a3, *a4, *a3base; ; case 5: a = addr->p2->p1; delete(a->p2); a->p2 = value; return; } } elete last state */ /* fix up lookaheads */ k=p1; for( l=q1; llook->lset, k->look->lset ) ) { tystate[i] = 1; /* register the new set */ l->look = flset( &clset ); } ++k; } return (i); } /* state is new */ pstate[nstate+2] = p2; if(nstate+1 >= stsize) error("too many states"); if( c >= NTBASE ){ mstates[ nstate ] = ntstates[ c-NTBASE ]; ntstates[ c-NTBASE ] = nstate; } else { mstates[ nstate ] = tstates[ c ]; tstates[ c ] register struct node *a1, *stack, *op; if (rfail == 1) return(0); stack = 0; list = e; goto l1; advanc: list = list->p1; l1: op = list->typ; switch (op) { default: case 0: if (t == 1) { a1 = and(stack); goto e1; } if (stack->typ == 1) writes("attempt to store in a value"); a1 = stack->p1; e1: stack = pop(stack); if (stack) writes("phase error"); return(a1); case 12: a1 = and(stack); stack->p1 = look(a1); delete(a1); stack->typ = 0; goto advanc; case 13: yyaccpt(){}  = nstate; } tystate[nstate]=1; return(nstate++); } int pidebug 0; /* debugging flag for putitem */ putitem ( ptr, lptr ) int *ptr; struct looksets *lptr;{ int *jip, k; struct item *i, *j; if( pidebug ) { settty(); printf("putitem(%s), state %d\n", writem(&ptr), nstate ); } /* see if it's there */ j = pstate[nstate+1]; for( i=pstate[nstate]; ipitem == ptr) { error("yacc error--duplicate item"); } /* not there */ j->pitem = ptr; j->look = flset( lptr ); pstate[nstate+1] = ++j; jip = j; if(jip-mem0 >= memsiz) error("out of state space"); } cempty(){ /* mark nonterminals which derive the empty string */ int i, *p; /* set pempty to 0 */ pempty = yalloc( nnonter ); aryfil( pempty, nnonter+1, 0 ); for( i=1; i= s ) { for( p= &yyact[ yypact[*ps+1] ] ; (*p>>12) == 1 ; p =+ 2 ) /* search ps actions */ if( *p == 4352 ) goto found; /* the current ps has no shift onn "op as long as we keep finding nontrivial empty nonterminals */ again: for( i=1; i=NTBASE && pempty[*p-NTBASE]!=0 ; ++p ) ; if( *p < 0 ){ /* we have a nontrivially empty nonterminal */ pempty[*prdptr[i]-NTBASE] = 1; goto again; /* got one ... try for another */ } } } } int gsdebug 0; stagen(){ /* generate the states */ int i, j, k, c; /* initialts[k].ws, clset.lset ) ) wsets[k].flag = work = 1; goto nexts; } } /* not there; make a new entry */ if( cwset+1 >= wssize ) error( "working set overflow" ); wsets[cwset].pitem = *s; wsets[cwset].flag = 1; if( nolook ){ cwset++; goto nexts; } work = 1; for( k=0; k zzcwset ) zzcwset = cwset; if( !cldebug ) return; settty(); printf("\nState %d, nolook = %d\n", i, nolook ); for( j=0; jlset; v = lkst[i].lset; w = & v[tbitset]; while( v= lsetsz )error("too many lookahead sets"); for( j=0; jlset[j]; } return( & lkst[nlset++]); } /* * Header for object code improver */ #define JBR 1 #define CBR 2 #define JMP 3 #define LABEL 4 #define DLABEL 5 #define EROU 7 #define JSW 9 #define MOV 10 #define CLR 11 #define COM 12 #define INC 13 #define DEC 14 #define NEG 15 #define TST 16 #define ASR 17 #define ASL 18 #define SXT 19 #define CMP 20 #define ADD 21 #define SUB 22 #define BIT 23 #define BIC 24 #define BIS 25 #define MUL 26 #define DIV 27 #define ASH 28 #define XOR 29 #define TEXT 30 #define DATA 31 #define BSS 32 #define EVEN 33 #dSE+nterms] = state(c); } if( gsdebug ){ settty(); printf( "%d: ", i ); for( j=1; j<=nterms; ++j ){ if( temp1[j] != 0 ) printf( "%s %d, ", symnam(j), temp1[j]); } for( j=1; j<=nnonter; ++j ){ if( temp1[j+nterms] ) printf( "%s %d, ", nontrst[j].name, temp1[j+nterms] ); } printf("\n"); } apstate[i] = apack( &temp1[0], nterms ); indgo[i] = apack( &temp1[nterms+1], nnonter-1 ) - 1; goto more; /* we have done one goto; do so# define _maxdepth 150 /* parser for yacc output */ extern int yyval; /* defined in the table file */ extern int yylval; /* defined in the table file */ extern int *yypv; /* defined in the table file */ int yydebug 0; /* 1 for debugging */ int yyv[_maxdepth]; /* where the values are stored */ int yystate 0; /* current parser state */ int yychar -1; /* current input token number */ int yynerrs 0; /* number of errors */ int yyerrflag 0; /* error recovery flag */ yyparse() { extern int yygo[], yypgoefine MOVF 34 #define MOVOF 35 #define MOVFO 36 #define ADDF 37 #define SUBF 38 #define DIVF 39 #define MULF 40 #define CLRF 41 #define CMPF 42 #define NEGF 43 #define TSTF 44 #define CFCC 45 #define SOB 46 #define JSR 47 #define END 48 #define JEQ 0 #define JNE 1 #define JLE 2 #define JGE 3 #define JLT 4 #define JGT 5 #define JLO 6 #define JHI 7 #define JLOS 8 #define JHIS 9 #define BYTE 100 struct node { char op; char subop; struct node *forw; struct node *back; struct node *ref; int labno; charme more */ } /* no more to do... stop */ } int cldebug 0; /* debugging flag for closure */ closure(i){ /* generate the closure of state i */ int c, ch, work; _REGISTER j, k; int *pi; int **s, **t; struct item *q; _REGISTER struct item *p; ++zzclose; /* first, copy kernel of state i to wsets */ cwset = 0; q = pstate[i+1]; for( p=pstate[i]; ppitem; wsets[cwset].flag = 1; /* this item must get closed */ for( k=0; klook->lset[k]; ++cwset; } /* now, go through the loop, closing each item */ work = 1; while( work ){ work = 0; for( j=0; j>12 ) { /* switch on operation */ case 1: /* skip on test */ if( yydebug && (yychar<0) ){ yychar = yylex(); printf( "character %d read\n", yychar ); } if( n != ( (yychar<0) ? ( yychar=yylex() ) : yychar ) ) ++p; goto actn; /* get next action */ case 2: /* shift */ yystate=n; yyval=yylval; yychar= -1; if( yyerrfine RT2 11 #define FREG 5 #define NREG 5 #define LABHS 127 #define OPHS 57 struct optab *ophash[OPHS]; struct { char lbyte; };  /* find items involving c */ for( k=j; k0 ){ if( ch < NTBASE ){ /* terminal symbol */ clset.lset[ch>>4] =| (1<<(ch&017)); break; } /* nonterminal symbol */ union( clset.lset, clset.lset, pfirst[ch-NTBASE] ); if( !pempty[ch-NTBASE] ) break; lag ) --yyerrflag; goto stack; /* stack new state */ case 3: /* reduce */ if( yydebug ) printf("reduce %d\n",n); ps =- yyr2[n]; yypv =- yyr2[n]; yyval=yypv[1]; yyactr(n); /* consult goto table to find next state */ for( p= &yygo[yypgo[yyr1[n]]]; *p != *ps && *p >= 0 ; p =+ 2 ) ; yystate = p[1]; goto stack; /* stack new state and value */ case 4: /* accept */ return(0); case 0: /* error ... attempt to resume parsing */ / tmg tables and global definitions / in addition to these definitions each routine / follows the convention / f = stack frame pointer during parse and translation / g = stack frame end during parse / i = interprested instruction counter during parse and translation .globl tables .globl x,si,j,k,n,g1,env .globl ek,ek.fs,ep,ep.fs,fs .globl lptr,sptr,rptr .globl outb,outt,outw .globl stkt,stkb,stke .globl ktat,ktab .globl input,cfile,lfile,dfile,ofile / parse stack frame layout / 0 is previous frame pointer / return address in (sp) x = 2. /exit bit, nonzero at end of rule si = 4. / save location for instruction counter j = 6. / input cursor counts characters k = 8. / ktable water mark, last use location relative to base n = 10. /address of ignored character class env = 12. / frame pointer for static environment g1 = 14. / frame length during parse /symbol table entry layout /word 0 is for customer lptr=2. /index of next entry on tree to left rptr=4. /index of next entry to right sptr=6. /first character of  case CBR: case CFCC: ccloc[0] = 0; continue; case JBR: redunbr(p); default: clearreg(); } } } jumpsw() { register struct node *p, *p1; register t; int nj; t = 0; nj = 0; for (p=first.forw; p!=0; p = p->forw) p->refc = ++t; for (p=first.forw; p!=0; p = p1) { p1 = p->forw; if (p->op == CBR && p1->op==JBR && p->ref && p1->ref && abs(p->refc - p->ref->refc) > abs(p1->refc - p1->ref->refc)) { p->subop = revbr[p->subop]; t = p1->ref; p1->ref = p->ref; p->ref = t; ]; for (p1 = rt1; *p1++ = *p2++;); if (regs[RT2][0]) { p1 = rt2; *p1++ = ','; for (p2 = regs[RT2]; *p1++ = *p2++;); } else rt2[0] = 0; if (r>=0) { rt1[0] = 'r'; rt1[1] = r + '0'; rt1[2] = 0; nsaddr++; } if (r1>=0) { rt2[1] = 'r'; rt2[2] = r1 + '0'; rt2[3] = 0; nsaddr++; } p->code = copy(rt1, rt2); } } movedat() { register struct node *p1, *p2; struct node *p3; register seg; struct node data; struct node *datp; if (first.forw == 0) return; datp string in this entry /next char is in 7, etc / translation frame layout / used as ek(f), ep(f), etc / x and si have same meaning as in parse stack frame / return address in (sp) ek = 0 / k environment, frame where bunlde address is in si ep = 6 / p environment, frame where si points to parameter list fs = 10 / frame size ek.fs = ek+fs / k environment in next frame ep.fs = ep+fs / p env in next frame .data tables = . /marks break between routines and tables outt = 64. / output buffer top stkt = 800. / t = p1->labno; p1->labno = p->labno; p->labno = t; nrevbr++; nj++; } } return(nj); } addsob() { register struct node *p, *p1; for (p = &first; (p1 = p->forw)!=0; p = p1) { if (p->op==DEC && isreg(p->code)>=0 && p1->combop==(CBR|JNE<<8)) { if (p->refc < p1->ref->refc) continue; if (p->refc - p1->ref->refc > 50) continue; p->labno = p1->labno; p->combop = SOB; p1->forw->back = p; p->forw = p1->forw; nsob++; } } } abs(x) { return(x<0? -x: x); } equop= &data; for (p1 = first.forw; p1!=0; p1 = p1->forw) { if (p1->op == DATA) { p2 = p1->forw; while (p2 && p2->op!=TEXT) p2 = p2->forw; if (p2==0) break; p3 = p1->back; p1->back->forw = p2->forw; p2->forw->back = p3; p2->forw = 0; datp->forw = p1; p1->back = datp; p1 = p3; datp = p2; } } if (data.forw) { datp->forw = first.forw; first.forw->back = datp; data.forw->back = &first; first.forw = data.forw; } seg = -1; for (p1 = first.forw; p1!=0; p1 = p1-stack top for (f), not for (sp) ktat = 1200. / k table top input: -1 / stream number of input cfile: 1 / stream number of current output lfile: 1 / last current output dfile: 2 / diagnostic file ofile: 1 /output file outw: 0 / output write pointer, number of chars in buffer .bss outb: .=.+outt /output buffer ktab: . = .+ktat / contains translation rules that have been bundled stkb: . = .+stkt / stack, (f) ponts into this stke = . /stack end (ap1, p2) struct node *ap1, *p2; { register char *cp1, *cp2; register struct node *p1; p1 = ap1; if (p1->combop != p2->combop) return(0); if (p1->op>0 && p1->opcode; cp2 = p2->code; if (cp1==0 && cp2==0) return(1); if (cp1==0 || cp2==0) return(0); while (*cp1 == *cp2++) if (*cp1++ == 0) return(1); return(0); } decref(ap) { register struct node *p; p = ap; if (--p->refc <= 0) { nrlab++; p->back->forw = p->forw; p->forw->back = p->back; } } nonl>forw) { if (p1->op==TEXT||p1->op==DATA||p1->op==BSS) { if (p1->op == seg || p1->forw&&p1->forw->op==seg) { p1->back->forw = p1->forw; p1->forw->back = p1->back; p1 = p1->back; continue; } seg = p1->op; } } } redunbr(ap) struct node *ap; { register struct node *p, *p1; register char *ap1; char *ap2; if ((p1 = p->ref) == 0) return; p1 = nonlab(p1); if (p1->op==TST) { singop(p1); savereg(RT2, "$0"); } else if (p1->op==CMP) dualop(p1); else return; if (p1->for ab(ap) struct node *ap; { register struct node *p; p = ap; while (p && p->op==LABEL) p = p->forw; return(p); } alloc(an) { register int n; register char *p; n = an; n++; n =& ~01; if (lasta+n >= lastr) { if (sbrk(2000) == -1) { write(2, "Optimizer: out of space\n", 14); exit(1); } lastr =+ 2000; } p = lasta; lasta =+ n; return(p); } clearreg() { register int i; for (i=0; i<2*NREG; i++) regs[i][0] = '\0'; conloc[0] = 0; ccloc[0] = 0; } savereg(ai, as) char *as; { regiw->op!=CBR) return; ap1 = findcon(RT1); ap2 = findcon(RT2); p1 = p1->forw; if (compare(p1->subop, ap1, ap2)) { nredunj++; nchange++; decref(p->ref); p->ref = p1->ref; p->labno = p1->labno; p->ref->refc++; } } findcon(i) { register char *p; register r; p = regs[i]; if (*p=='$') return(p); if ((r = isreg(p)) >= 0) return(regs[r]); if (equstr(p, conloc)) return(conval); return(p); } compare(op, acp1, acp2) char *acp1, *acp2; { register char *cp1, *cp2; register n1; int n2;# /* * C object code improver-- second part */ #include "c2h.c" rmove() { register struct node *p; register char *cp; register int r; int r1, flt; for (p=first.forw; p!=0; p = p->forw) { if (debug) { for (r=0; r<2*NREG; r++) if (regs[r][0]) printf("%d: %s\n", r, regs[r]); printf("-\n"); } flt = 0; switch (p->op) { case MOVF: case MOVFO: case MOVOF: flt = NREG; case MOV: if (p->subop==BYTE) goto badmov; dualop(p); if ((r = findrand(regs[RT1], flt)) >= 0) { if (r =ster char *p, *s, *sp; sp = p = regs[ai]; s = as; if (source(s)) return; while (*p++ = *s) { if (s[0]=='(' && s[1]=='r' && s[2]<'5') { *sp = 0; return; } if (*s++ == ',') break; } *--p = '\0'; } dest(as, flt) char *as; { register char *s; register int i; s = as; if ((i = isreg(s)) >= 0) regs[i+flt][0] = 0; while ((i = findrand(s, flt)) >= 0) regs[i][0] = 0; while (*s) { if ((*s=='(' && (*(s+1)!='r' || *(s+2)!='5')) || *s++=='*') { for (i=flt; i= '0' && *cp2 <= '7') { n1 =<< 3; n1 =+ *cp2++ - '0'; } n2 = n1; n1 = 0; while (*cp1 >= '0' && *cp1 <= '7') { n1 =<< 3; n1 =+ *cp1++ - '0'; } if (*cp1=='+') cp1++; if (*cp2=='+') cp2++; do { if (*cp1++ != *cp2) return(0); } while (*cp2++); cp1 = n1; cp2 = n2; switch(op) { case JEQ: return(cp1 == cp2); case JNE: return(cp1 != cp2); case JLE: return(cp1= flt+isreg(regs[RT2]) && p->forw->op!=CBR) { p->forw->back = p->back; p->back->forw = p->forw; redunm++; continue; } } repladdr(p, 0, flt); r = isreg(regs[RT1]); r1 = isreg(regs[RT2]); dest(regs[RT2], flt); if (r >= 0) if (r1 >= 0) savereg(r1+flt, regs[r+flt]); else savereg(r+flt, regs[RT2]); else if (r1 >= 0) savereg(r1+flt, regs[RT1]); else setcon(regs[RT1], regs[RT2]); source(regs[RT1]); setcc(regs[RT2]); continue; case ADDF: case SUBf (regs[i][0] != '$') regs[i][0] = 0; conloc[0] = 0; } return; } } } singop(ap) struct node *ap; { register char *p1, *p2; p1 = ap->code; p2 = regs[RT1]; while (*p2++ = *p1++); regs[RT2][0] = 0; } dualop(ap) struct node *ap; { register char *p1, *p2; register struct node *p; p = ap; p1 = p->code; p2 = regs[RT1]; while (*p1 && *p1!=',') *p2++ = *p1++; *p2++ = 0; p2 = regs[RT2]; *p2 = 0; if (*p1++ !=',') return; while (*p2++ = *p1++); } findrand(as, flt) char *as; {.i <= cp2.i); case JGE: return(cp1.i >= cp2.i); case JLT: return(cp1.i < cp2.i); case JGT: return(cp1.i > cp2.i); case JLO: return(cp1 < cp2); case JHI: return(cp1 > cp2); case JLOS: return(cp1 <= cp2); case JHIS: return(cp1 >= cp2); } return(0); } setcon(ar1, ar2) char *ar1, *ar2; { register char *cl, *cv, *p; cl = ar2; cv = ar1; if (*cv != '$') return; if (!natural(cl)) return; p = conloc; while (*p++ = *cl++); p = conval; while (*p++ = *cv++); } equstr(ap1, ap2) chaF: case DIVF: case MULF: flt = NREG; case ADD: case SUB: case BIC: case BIS: case MUL: case DIV: case ASH: badmov: dualop(p); repladdr(p, 0, flt); source(regs[RT1]); dest(regs[RT2], flt); if (p->op==DIV && (r = isreg(regs[RT2])>=0)) regs[r+1][0] = 0; ccloc[0] = 0; continue; case CLRF: case NEGF: flt = NREG; case CLR: case COM: case INC: case DEC: case NEG: case ASR: case ASL: case SXT: singop(p); dest(regs[RT1], flt); if (p->op==CLR && flt==0) if ((r = is register int i; for (i = flt; i='0' && s[1]<='4' && s[2]==0) return(s[1]-'0'); return(-1); } check() { register struct node *p, *lp; lp = &first; for (p=first.forw; p!=0; p = p->forw) { if (p->back != lp) abort(); lp = p; } } source(ap) char *ap; { register char *p1, *p2; p1 = ap; p2 = p1; if (*p1==0) return(0); while (*p2++); ifr *ap1, *ap2; { char *p1, *p2; p1 = ap1; p2 = ap2; do { if (*p1++ != *p2) return(0); } while (*p2++); return(1); } setcc(ap) char *ap; { register char *p, *p1; p = ap; if (!natural(p)) { ccloc[0] = 0; return; } p1 = ccloc; while (*p1++ = *p++); } natural(ap) char *ap; { register char *p; p = ap; if (*p=='*' || *p=='(' || *p=='-'&&*(p+1)=='(') return(0); while (*p++); p--; if (*--p == '+' || *p ==')' && *--p != '5') return(0); return(1); } reg(regs[RT1])) >= 0) savereg(r, "$0"); else setcon("$0", regs[RT1]); setcc(regs[RT1]); continue; case TSTF: flt = NREG; case TST: singop(p); repladdr(p, 0, flt); source(regs[RT1]); if (equstr(regs[RT1], ccloc)) { p->back->forw = p->forw; p->forw->back = p->back; p = p->back; nrtst++; nchange++; } continue; case CMPF: flt = NREG; case CMP: case BIT: dualop(p); source(regs[RT1]); source(regs[RT2]); repladdr(p, 1, flt); ccloc[0] = 0; continue; (*p1=='-' && *(p1+1)=='(' || *p1=='*' && *(p1+1)=='-' && *(p1+2)=='(' || *(p2-2)=='+') { while (*p1 && *p1++!='r'); if (*p1>='0' && *p1<='4') regs[*p1 - '0'][0] = 0; return(1); } return(0); } repladdr(p, f, flt) struct node *p; { register r; int r1; register char *p1, *p2; static char rt1[50], rt2[50]; if (f) r1 = findrand(regs[RT2], flt); else r1 = -1; r = findrand(regs[RT1], flt); if (r1 >= NREG) r1 =- NREG; if (r >= NREG) r =- NREG; if (r>=0 || r1>=0) { p2 = regs[RT1 1 ..1 ..1:begin: ignore blanks pr1: comment salt;pr1 parse first salt;pr2 diag error pr2: comment salt;pr2 parse line salt;pr2 diag error salt;pr2 putcharcl 1 parse last .3=. <1 \0>;.even .2=. .tx;.3 .tp;.byte 1,0; 1 .tn .1=. fref 1 trans;1 .2 .4=. .tp;.byte 2,0; .txs;': 1 .tp;.byte 1,0; first: parse .1 getfref line 1 trans;1 .4 .1=. 1 .2=. 2 .3=. 1 .txs;'; .5=. ;.even .4=. .tn .tx;.5 .tp;.byte 2,0; .tp;.byte 1,0; 1 .tn error: smark ignore none any .1 string .2 scopy .pxs;'; alt;..3 trans;1 .3 go0>;.even .10=. .tp;.byte 1,0;nil nil .tn 1 .tx;.11 specparg: number salt;..46 charcl salt;..47 .pxs;'< alt;..57 longlit goto;..50 ..57:.pxs;'* alt;..56 trans;1 .1 goto;..51 ..56:.pxs;'( .pxs;') alt;..55 trans;1 .3 goto;..52 ..55:push .5 dtt ndt sndt .l;dtt .l;.6 .st .p prule .pxs;') oldtab dtt ifelem alt;..54 trans;1 .7 goto;..53 ..54:trans;1 .10 ..53: ..52: ..51: ..50: ..47: ..46: 1 succ .1=. 1 iseasy: .l;easy .l;.1 .st 1 .p .1=. 0 ishard: .l;easy .l;.1 .st 1 .p .1=. 2 noelem: .l;easy .l;.1 .st 1 .p .1e 1,0; .tn 1 .tp;.byte 2,0; .3=. .tp;.byte 1,0; .tn 1 .tp;.byte 2,0; .5=. <.l;\0>;.even .4=. .tx;.5 1 .tp;.byte 1,0; prime: lv alt;..135 suffix alt;done trans;1 .1 goto;..126 ..135:prefix alt;..134 lv trans;1 .2 goto;..127 ..134:.pxs;'( alt;..133 expr .pxs;') goto;..130 ..133:unary alt;..132 prime trans;1 .3 goto;..131 ..132:remote number trans;1 .4 ..131: ..130: ..127: ..126: 1 succ .2=. <.l;\0>;.even .1=. .tx;.2 1 .tp;.byte 1,0; .4=. <.rv\0>;.even .3=. .tp;.byte 1,0; .tn 1 .tx;.4 .6=. <.f\0>;.even .5=. .to;..2 ..3:null ..2: 1 trans;1 .4 .1=. .tp;.byte 2,0; .tn .tp;.byte 1,0; 1 .tn line: labels charcl alt;..7 .pxs;'; goto;..4 ..7:statement salt;..5 numbers salt;..6 trule .pxs;'; ..6: ..5: ..4: 1 trans;1 .1 .1=. .tp;.byte 2,0; .tn 1 .tp;.byte 1,0; numbers: number .pxs;'; numbers alt;done 1 trans;1 .1 .1=. .tp;.byte 2,0; .tn 1 .tp;.byte 1,0; labels: label labels alt;done 1 trans;1 .1 .1=. .tp;.byte 1,0; 1 .txs;': label: name .pxs;': 1 trans;1 .1 .2=. <.pn:1 .pxs;12\0>;.even .3=. <.tn:1 .txs;12\0>;.even .1=. 2 ifelem: .l;easy .l;.1 .ne 1 .t .2=. 1 ifeasy: .l;easy .l;.2 .eq 1 .t .2=. ;.even .1=. gpar;1 .tq;1 .tx;.2 1 .tp;.byte 1,0; .4=. <.px\0>;.even .3=. gpar;1 .tq;1 .tx;.4 1 .tp;.byte 1,0; .6=. <.pn\0>;.even .5=. gpar;1 .tq;1 1 .tx;.6 .10=. <.t\0>;.even .7=. 1 .tx;.10 .12=. <.p\0>;.even .11=. 1 .tx;.12 .13=. gpar;1 .tp;.byte 2,0; .tn .tq;1 1 .tp;.byte 1,0; special: .pxs;'= alt;..70 rname salt;..60 remote trule ..60: trans;1 .1 goto;..61 ..70:.pxs;'< alt;..67 literal trans;1 .3 goto;..62 ..67:tp;.byte 2,0; .tn .tp;.byte 1,0; .tn 1 .tx;.6 lv: rname alt;..141 trans;1 .1 goto;..136 ..141:.pxs;'( alt;..140 lv .pxs;') goto;..137 ..140:.pxs;'* prime trans;1 .3 ..137: ..136: lv1: .pxs;'[ alt;done bundle expr .pxs;'] trans;1 .5 1 salt;lv1 .2=. <.u\0>;.even .1=. .tp;.byte 1,0; .tn 1 .tx;.2 .4=. <.st\0>;.even .3=. 1 .tx;.4 assign: .pxs;'= ignore none infix alt;..143 trans;1 .1 goto;..142 ..143:trans;1 .3 ..142: 1 succ .2=. 1 .pxs;'+ .1=. .pxs;'+ 1 not .2 .4=. <.a\0>;.even .3=. 1 .tx;.4 .6=. <.s\0>;.even=. .tx;.2 .tn .tx;.3 1 .tn last: 1 trans;1 .1 .1=. ;.even .2=. 4 comment: .px;.1 co1: ignore .2 .pxs;'* ignore none .pxs;'/ 1 alt;co1 .1=. 0 .2=. gpar;1 .tp;.byte 2,0; 1 .tp;.byte 1,0; .3=. gpar;1 1 generate .4=. gpar;1 .tp;.byte 2,0;nil .tn 1 .tp;.byte 1,0;q1 .5=. 1 .tp;.byte 1,0;xbit .7=. <1 succ\0>;.even .6=. .tp;.byte 1,0;nil .tn 1 .tx;.7 statement: .l;csym .l;.1 .st .p oldtab dtt oldtab pat proc alt;..11 plst tlst .pxs;') trans;1 .2 goto;..10 ..11:trans;1 .3 noelem ..10: stt1: bundle frag alt;.pxs;'* alt;..66 trans;1 .5 goto;..63 ..66:.pxs;'[ expr .pxs;'? alt;..65 trans;1 .7 goto;..64 ..65:trans;1 .11 ..64: .pxs;'] trans;1 .13 ..63: ..62: ..61: 1 succ .2=. <[-\0>;.even .3=. <\\<1]\0>;.even .1=. .tx;.2 .tp;.byte 1,0; 1 .tx;.3 rname: name alt;..72 tabval pat npa alt;done goto;..71 ..72:.pxs;'$ number ..71: 1 trans;1 .1 .2=. ;.even .1=. .tx;.2 .tp;.byte 2,0; .tn 1 .tp;.byte 1,0; trule: oldtab ptt tbody salt;..73 .pxs;'( number salt;..74 tra ..74: .pxs;') tbody trans;1 .1 ..73: 1 succ tra .5=. 1 .tx;.6 .10=. <.m\0>;.even .7=. 1 .tx;.10 .12=. <.q\0>;.even .11=. 1 .tx;.12 .14=. <.r\0>;.even .13=. 1 .tx;.14 .16=. <.o\0>;.even .15=. 1 .tx;.16 .20=. <.x\0>;.even .17=. 1 .tx;.20 .22=. <.n\0>;.even .21=. 1 .tx;.22 .23=. <==\0>;.even .25=. <.eq\0>;.even .24=. 1 .tx;.25 .26=. ;.even .30=. <.ne\0>;.even .27=. 1 .tx;.30 .31=. <<=\0>;.even .33=. <.le\0>;.even .32=. 1 .tx;.33 .34=. <\>=\0>;.even .36=. <.ge\0>;.even .35=. 1 .tx;.36 .37=. <<<\0>;.even .41=. <.sl\0>;.even .40=. 1 .tx;.41 .43=. <.lt\0..15 trans;1 .4 salt;stt1 goto;..12 ..15:.pxs;'; ifelem alt;..14 trans;1 .5 goto;..13 ..14:trans;1 .6 ..13: ..12: 1 succ .1=. ;.even proc: smark ignore none 1 .px;.1 .1=. 1 octal npa .3=. ;.even .2=. .tx;.3 .tp;.byte 1,0; 1 .tn plst: list pident alt;null remote .1 1 trans;1 .2 pident: ident 1 newtab pat npa .1=. 0 .2=. name .l;i .ia 1 .p .3=. 1 octal i .5=. ;.even .4=. .tx;.5 .tp;.byte 1,0; .tn .tp;.byte 2,0; 1 .tn tlst: .pxs;'; alt;null .l;i .l;.1 .st .p list .2 remote .3 1: list tident 1 octal npt tident: ident 1 newtab ptt npt .2=. <1 generate\0>;.even .1=. 1 .tx;.2 tbody: .pxs;'{ .pxs;'} alt;..76 trans;1 .1 goto;..75 ..76:trb ..75: 1 succ .1=. xbit 1 .tp;.byte 1,0; .2=. .tp;.byte 2,0; .tn 1 .tp;.byte 1,0; trb: telem .pxs;'} alt;..100 trans;1 .1 goto;..77 ..100:trb trans;1 .2 ..77: 1 succ .2=. <.tx\0>;.even .1=. .tx;.2 1 .tp;.byte 1,0; .4=. <.tn\0>;.even .3=. 1 .tx;.4 .6=. <.tq;\0>;.even .5=. .tx;.6 1 .tp;.byte 1,0; telem: .pxs;'< alt;..110 literal trans;1 .1 goto;..10>;.even .42=. 1 .tx;.43 .44=. <\>\0>;.even .45=. <\>\0>;.even .47=. <.sr\0>;.even .46=. 1 .tx;.47 .51=. <.gt\0>;.even .50=. 1 .tx;.51 infix: smark ignore none .pxs;'+ alt;..201 not .1 trans;1 .3 goto;..144 ..201:.pxs;'- alt;..200 trans;1 .5 goto;..145 ..200:.pxs;'* alt;..177 trans;1 .7 goto;..146 ..177:.pxs;'/ alt;..176 trans;1 .11 goto;..147 ..176:.pxs;'% alt;..175 trans;1 .13 goto;..150 ..175:.pxs;'| alt;..174 trans;1 .15 goto;..151 ..174:.pxs;'^ alt;..173 trans;1 .17 goto;..152 ..173:.pxs;'& alt;..172 t trans;1 .4 .1=. gpar;1 1 .tp;.byte 1,0;nil q1 .2=. gpar;1 1 .tp;.byte 1,0; frag: prule alt;..17 trans;1 .1 goto;..16 ..17:labels noelem trans;1 .2 ..16: 1 succ .2=. ;.even .1=. gpar;2 .tp;.byte 3,0;nil nil .tn .tx;.2 .tp;.byte 2,0; .tn .tp;.byte 1,0;q2 q1 .tn .tp;.byte 2,0; 1 .txs;': .5=. ;.even .4=. .tn .tx;.5 1 .tp;.byte 1,0; .6=. ;.even .3=. gpar;2 .tp;.byte 4,0;.4 q1 .tn .tx;.6 .tp;.byte 3,0; .tn .tp;.byte 1,0; .txs;': .tp;.byte 2,0;q2 q1 .tn .tp;.byte 3,0; 1 .txs;': prule: 1 ..110:.pxs;'* alt;..107 trans;1 .3 goto;..102 ..107:.pxs;'$ alt;..106 number trans;1 .5 goto;..103 ..106:number alt;..105 tdot trans;1 tpt goto;..104 ..105:name te1 salt;done te2 salt;done ..104: ..103: ..102: ..101: 1 succ te1: tabval dtt ndt tdot 1 trans;1 tpt .2=. <.tq;\0>;.even .1=. .tx;.2 1 .tp;.byte 1,0; te2: tabval ptt npt 1 trans;1 .1 .1=. 1 .txs;'0 .2=. .tp;.byte 2,0; .txs;'; 1 .tp;.byte 1,0; tdot: .pxs;'. alt;..112 number goto;..111 ..112:trans;1 .1 ..111: .pxs;'( alt;..114 list targ .pxs;') rans;1 .21 goto;..153 ..172:.px;.23 alt;..171 trans;1 .24 goto;..154 ..171:.px;.26 alt;..170 trans;1 .27 goto;..155 ..170:.px;.31 alt;..167 trans;1 .32 goto;..156 ..167:.px;.34 alt;..166 trans;1 .35 goto;..157 ..166:.px;.37 alt;..165 trans;1 .40 goto;..160 ..165:.pxs;'< alt;..164 trans;1 .42 goto;..161 ..164:.px;.44 .px;.45 alt;..163 trans;1 .46 goto;..162 ..163:trans;1 .50 ..162: ..161: ..160: ..157: ..156: ..155: ..154: ..153: ..152: ..151: ..150: ..147: ..146: ..145: ..144: 1 succ .2=. <.lv\0>;.even .1=..l;sndt .l;ndt .st .p disj .pxs;'| alt;..23 .l;ndt .l;sndt .st .p fref ifeasy alt;..21 prule trans;1 .1 goto;..20 ..21:prule fref trans;1 .3 ..20: noelem goto;..22 ..23: ..22: 1 succ .1=. gpar;2 .tp;.byte 2,0;q2 nil .tn 1 .tp;.byte 1,0;nil q1 disj: pelem pdot disj alt;..25 trans;1 .1 ifelem alt;done ishard goto;..24 ..25: ..24: 1 succ .1=. gpar;2 .tp;.byte 1,0;q1 1 .tq;2 .2=. 1 .3=. gpar;2 1 generate pelem: pprim alt;..31 trans;1 .1 iseasy goto;..26 ..31:.pxs;'( push .2 sndt prule alt;..30 .pxs;') goto;..goto;..113 ..114:null ..113: 1 trans;1 .2 targ: name salt;..115 remote tbody ..115: 1 succ .1=. <.tp;.byte \0>;.even tpt: .tx;.1 .tp;.byte 2,0; .txs;', 1 .tp;.byte 1,0; .1=. .txs;'; 1 .tp;.byte 1,0; literal: shortlit salt;..116 remote longlit trans;1 .1 ..116: 1 succ .1=. <\>\0>;.even .3=. ;.even .2=. .tx;.3 1 .tp;.byte 1,0; shortlit: ignore none smark any litch .px;.1 scopy 1 trans;1 .2 .1=. <\>\0>;.even .3=. <\\\0>;.even .4=. <\>\0>;.even .2=. .tx;.3 1 .tx;.4 .5=. <\>\0>;.even .7=. <\\0\0>;.even 1 .tx;.2 .3=. <++\0>;.even .5=. <.ib\0>;.even .4=. 1 .tx;.5 .6=. <--\0>;.even .10=. <.db\0>;.even .7=. 1 .tx;.10 prefix: smark ignore none .pxs;'& alt;..205 trans;1 .1 goto;..202 ..205:.px;.3 alt;..204 trans;1 .4 goto;..203 ..204:.px;.6 trans;1 .7 ..203: ..202: 1 succ .1=. <++\0>;.even .3=. <.ia\0>;.even .2=. 1 .tx;.3 .4=. <--\0>;.even .6=. <.da\0>;.even .5=. 1 .tx;.6 suffix: smark ignore none .px;.1 alt;..207 trans;1 .2 goto;..206 ..207:.px;.4 trans;1 .5 ..206: 1 succ .2=. <.nt\0>;.even .1=. 1 .tx;.2 .427 ..30:.pxs;') trans;1 .3 noelem ..27: ..26: 1 succ .1=. gpar;1 .tq;1 .tp;.byte 2,0; .tn 1 .tp;.byte 1,0; .2=. gpar;1 .tq;1 1 .tp;.byte 1,0; .4=. ;.even .3=. 1 .tx;.4 .5=. <\\\0>;.even .7=. ;.even .6=. 1 .tx;.7 .10=. gpar;1 .tp;.byte 3,0;nil .tn .tq;1 .tp;.byte 2,0; 1 .tp;.byte 1,0; pprim: special salt;..32 rname .pxs;': alt;..37 fail goto;..33 ..37:spdot salt;..34 ..34: ignore none .pxs;'( alt;..36 ignore blanks list parg .pxs;') trans;1 .1 goto;..35 ..36:trans;1 .2 ..35: ..33: ..32: .p .10=. <\>;.even\0>;.even .6=. .txs;'< .tp;.byte 2,0; .tp;.byte 1,0; .tx;.7 1 .tx;.10 longlit: ignore none .px;.1 alt;..120 trans;1 .2 goto;..117 ..120:null ..117: litb .px;.5 1 trans;1 .6 .1=. <\\\0>;.even .3=. <\\\\\0>;.even .2=. .tp;.byte 2,0; .tx;.3 1 .tp;.byte 1,0; litb: smark string litch scopy .px;.1 alt;done litb 1 trans;1 .2 expr: assignment salt;..121 rv ..121: 1 succ .1=. .tp;.byte 3,0; .tn .tp;.byte 1,0; .tn 1 .tp;.byte 2,0; assignment: lv assign expr 1 trans;1 .1 .1=. .tp;.byte 3,0; .tn .tp=. <.ng\0>;.even .3=. 1 .tx;.4 .6=. <.cm\0>;.even .5=. 1 .tx;.6 unary: .pxs;'! alt;..213 trans;1 .1 goto;..210 ..213:.pxs;'- alt;..212 trans;1 .3 goto;..211 ..212:.pxs;'~ trans;1 .5 ..211: ..210: 1 succ charcl: .pxs;'! alt;..215 ccla cclb goto;..214 ..215:ccla ..214: 1 octal classmask .1=. <<<\0>;.even .2=. 1 .4=. <<<\0>;.even ccla: .px;.1 .l;classmask .l;.2 .l;nclass .ia .sl .st .p .l;classmask .t alt;cherr ccl1: cclc .px;.4 1 salt;ccl1 .1=. <\>\0>;.even cclc: ignore none ccl3: .px;.1 salt;ccl4 ccle 1 xs;'/ alt;..41 trans;1 .3 goto;..40 ..41:.px;.5 alt;..43 trans;1 .6 ..40: rname trans;1 .10 goto;..42 ..43: ..42: 1 succ .2=. 0 pdot: .pxs;'. alt;done ignore none ident salt;alias .l;dtt .t salt;..44 table dtt .l;ndt .l;.2 .st .p ..44: .l;ndt .ia 1 .p .1=. 1 any letter spdot: .pxs;'. ignore none not .1 alias: 1 newtab dtt ndt parg: rname salt;..45 remote specparg ..45: 1 succ .2=. <\\n\\0\0>;.even .1=. 1 .tx;.2 .4=. <1 succ\0>;.even .3=. 1 .tx;.4 .5=. 3 .6=. 0 .7=. 1 .tp;.byte 1,0;nil xbit .11=. <1 succ\;.byte 1,0; .tn 1 .tp;.byte 2,0; .2=. .tp;.byte 2,0; .tn 1 .tp;.byte 1,0; rv: prime rv1: bundle infix alt;..125 prime trans;1 .1 salt;rv1 goto;..122 ..125:rva alt;..124 trans;1 .2 goto;..123 ..124: ..123: ..122: 1 succ .2=. <.t;alt;\0>;.even .3=. ;.even .1=. .tx;.2 .tp;.byte 2,0; .tn .tp;.byte 4,0; .tn .tx;.3 .tp;.byte 1,0; .tn .tp;.byte 2,0; .txs;': .tp;.byte 3,0; .tn .tp;.byte 1,0; 1 .txs;': rva: .pxs;'? rv .pxs;': rv fref fref 1 trans;1 .1 .1=. .tp;.byte 2,0; .tn 1 .tp;.byte 1,0; .2=. .tp;.bytsalt;ccl3 .1=. <\>\0>;.even .3=. <\>\0>;.even .2=. 1 .px;.3 ccl4: .px;.1 salt;..216 cclx fail ..216: not .2 salt;..217 ccle ..217: 1 succ .1=. 2 ccle: char n .l;.1 .l;n .m .l;classes .lv .a .rv .l;classmask .o .u 1 .p cclb: zeron ccl5: .l;classes .lv .l;n .a .rv .l;classmask .x .u .p testn 1 salt;ccl5 cclx: .l;nclass .da .p zeron ccl6: .l;classes .lv .l;n .a .rv .l;classmask .cm .n .u .p testn 1 salt;ccl6 .3=. ;.even .2=. 1 .tx;.3 .1=. 1 trans;1 .2 cherr: 1 diag .1 .1=. 0 zeron: .l;n .l;.1 .st 1 .p .1=. 2 .2=. 400 testn: .l;n .l;.1 .a .u .l;.2 .lt 1 .t .1=. 0 .4=. <.globl classtab\0>;.even .5=. ;.even .3=. .tn .tx;.4 .tn .tx;.5 1 .tn .2=. 1 trans;1 .3 .7=. .tp;.byte 1,0; 1 .tn .6=. octal w 1 trans;1 .7 putcharcl: zeron .l;classes .l;.1 .st .p parse .2 ptc1: .l;w .l;classes .lv .l;n .a .rv .st .p parse .6 bundle testn 1 salt;ptc1 classmask: 0 nclass: 0 classes: cl1: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 cl2: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 cl3: 0 0 0 0 0 0 0 0 0 0 0 0 0  "bit", BIT, "bic", BIC, "bis", BIS, "mul", MUL, "ash", ASH, "xor", XOR, ".text",TEXT, ".data",DATA, ".bss", BSS, ".even",EVEN, "movf", MOVF, "movof",MOVOF, "movfo",MOVFO, "addf", ADDF, "subf", SUBF, "divf", DIVF, "mulf", MULF, "clrf", CLRF, "cmpf", CMPF, "negf", NEGF, "tstf", TSTF, "cfcc", CFCC, "sob", SOB, "jsr", JSR, ".end", END, 0, 0}; char revbr[] { JNE, JEQ, JGT, JLT, JGE, JLE, JHIS, JLOS, JHI, JLO }; int isn 20000; main(argc, argv) char **argv; { register int niter, maxit printf("\n"); continue; case JSW: printf("L%d\n", t->labno); continue; case SOB: printf("sob %s,L%d\n", t->code, t->labno); continue; case 0: if (t->code) printf("%s", t->code); printf("\n"); continue; } } /* * Notice addresses of the form * $xx,xx(r) * and replace them with (pc),xx(r) * -- Thanx and a tip of the Hatlo hat to Bliss-11. */ reducelit(at) struct node *at; { register char *c1, *c2; char *c2s; register struct node *t; t = at; if (*t->code != '$') re0 0 0 cl4: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 cl5: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 cl6: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 cl7: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 cl8: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 done: 1 succ .1=. .txs;'. 1 .tp;.byte 1,0; create: .l;csym .ia .p getcsym: octal csym 1 trans;1 .1 .2=. <..\0>;.even .1=. .tx;.2 1 .tp;.byte 1,0; fref: .l;fsym .ia .p getfref: octal fsym 1 trans;1 .1 .1=. 1 not: params .1 [-1\<1] alt;done 1 fail .1=. 1 .2=. .tp;.byte 2,0; .tn 1 .tp;.byte 1,0; list: params .1 [-1\<1er, isend; extern end; extern fin, fout; int nflag; if (argc>1 && argv[1][0]=='+') { argc--; argv++; debug++; } if (argc>1 && argv[1][0]=='-') { argc--; argv++; nflag++; } if (argc>1) { if ((fin = open(argv[1], 0)) < 0) { printf("C2: can't find %s\n", argv[1]); exit(1); } } else fin = dup(0); if (argc>2) { if ((fout = creat(argv[2], 0666)) < 0) { fout = 1; printf("C2: can't create %s\n", argv[2]); exit(1); } } else fout = dup(1); lasta = firstr = lastr = sturn; c1 = t->code; while (*c1 != ',') if (*c1++ == '\0') return; c2s = c1; c1++; if (*c1=='*') c1++; c2 = t->code+1; while (*c1++ == *c2++); if (*--c1!='(' || *--c2!=',') return; t->code = copy("(pc)", c2s); nlit++; } copy(ap) char *ap; { register char *p, *np; char *onp; register n; int na; na = nargs(); p = ap; n = 0; if (*p==0) return(0); do n++; while (*p++); if (na>1) { p = (&ap)[1]; while (*p++) n++; } onp = np = alloc(n); p = ap; while (*np++ = *p++); ] list1: bundle .pxs;', alt;done [-1\<1] trans;1 .2 1 salt;list1 .1=. 1 remote: params .1 create 1 parse rem1 [-1\<1] .1=. 1 .3=. <=.\0>;.even .2=. .tp;.byte 2,0; .tx;.3 .tn .tp;.byte 1,0; 1 .tn rem1: params .1 getcsym [-1\<1] 1 trans;1 .2 number: smark ignore none any digit string digit 1 scopy name: ident 1 scopy ident: smark ignore none any letter 1 string alpha .1=. 1 .3=. 0 oldtab: params .1 .l;[-1\<1] .t alt;done discard [-1\<1] .l;[-1\<1] .l;.3 .st 1 .p .1=. 2 .3=. 0 newtab: params .1 .l;[-2\<brk(2); maxiter = 0; opsetup(); do { isend = input(); movedat(); niter = 0; do { refcount(); do { iterate(); clearreg(); niter++; } while (nchange); comjump(); rmove(); } while (nchange || jumpsw()); addsob(); output(); if (niter > maxiter) maxiter = niter; lasta = firstr; } while (isend); flush(); fout = 2; if (nflag) { printf("%d iterations\n", maxiter); printf("%d jumps to jumps\n", nbrbr); printf("%d inst. after jumps\n", iaftbr); printf("%dif (na>1) { p = (&ap)[1]; np--; while (*np++ = *p++); } return(onp); } opsetup() { register struct optab *optp, **ophp; register char *p; for (optp = optab; p = optp->opstring; optp++) { ophp = &ophash[(((p[0]<<3)+(p[1]<<1)+p[2])&077777) % OPHS]; while (*ophp++) if (ophp > &ophash[OPHS]) ophp = ophash; *--ophp = optp; } } oplook() { register struct optab *optp; register char *lp, *op; static char tmpop[32]; struct optab **ophp; op = tmpop; for (lp = line; *lp && *lp!=' ' &1] .t salt;..220 table [-2\<1] .l;[-1\<1] .l;.3 .st .p ..220: enter [-2\<1] i .l;[-2\<1] .l;i .f .l;[-1\<1] .ia .st 1 .p .1=. 2 tabval: params .1 .l;[-2\<1] .t find [-2\<1] i .l;i .l;[-1\<1] .l;[-2\<1] .l;i .f .s .st .p 1 octal i null: 1 trans;1 nil .1=. <1 \0>;.even xbit: 1 .tx;.1 q1: 1 .tq;1 q2: 1 .tq;2 nil: 1 generate blanks: 10 digit: 20 letter: 40 alpha: 100 litch: 200 none: 400 csym: 0 fsym: 0 easy: 0 w: 0 n: 0 dtt: 0 ndt: 0 sndt: 0 pat: 0 npa: 0 ptt: 0 npt: 0 i: 0 .globl classtab classtab: 0 207 2 jumps to .+2\n", njp1); printf("%d redundant labels\n", nrlab); printf("%d cross-jumps\n", nxjump); printf("%d code motions\n", ncmot); printf("%d branches reversed\n", nrevbr); printf("%d redundant moves\n", redunm); printf("%d simplified addresses\n", nsaddr); printf("%d loops inverted\n", loopiv); printf("%d redundant jumps\n", nredunj); printf("%d common seqs before jmp's\n", ncomj); printf("%d skips over jumps\n", nskip); printf("%d sob's added\n", nsob); printf("%d redundant t& *lp!='\t';) *op++ = *lp++; *op++ = 0; while (*lp=='\t' || *lp==' ') lp++; curlp = lp; ophp = &ophash[(((tmpop[0]<<3)+(tmpop[1]<<1)+tmpop[2])&077777) % OPHS]; while (optp = *ophp) { op = optp->opstring; lp = tmpop; while (*lp == *op++) if (*lp++ == 0) return(optp->opcode); if (*lp++=='b' && *lp++==0 && *--op==0) return(optp->opcode + (BYTE<<8)); ophp++; if (ophp >= &ophash[OPHS]) ophp = ophash; } if (line[0]=='L') { lp = &line[1]; while (*lp) if (*lp<'0' || *lp++>07 207 207 207 207 207 207 217 217 207 207 207 207 207 207 207 207 207 207 207 207 207 207 207 207 207 207 207 207 207 217 207 207 207 207 207 207 207 207 207 203 207 207 207 207 207 327 327 327 327 327 327 327 327 327 327 207 205 207 207 7 207 207 347 347 347 347 347 347 347 347 347 347 347 347 347 347 347 347 347 347 347 347 347 347 347 347 347 347 207 7 207 207 207 207 347 347 347 347 347 347 347 347 347 347 347 347 347 347 347 347 347 347 347 347 347 347 347 347 347 347 207 207 207 207 207 .pn:1 .pxs;12st's\n", nrtst); printf("%d literals eliminated\n", nlit); printf("%dK core\n", ((lastr+01777)>>10)&077); flush(); } exit(0); } input() { register struct node *p, *lastp; register int op; lastp = &first; for (;;) { op = getline(); switch (op.op) { case LABEL: p = alloc(sizeof first); if (line[0] == 'L') { p->combop = LABEL; p->labno = getnum(line+1); p->code = 0; } else { p->combop = DLABEL; p->labno = 0; p->code = copy(line); } break; case JB'9') return(0); curlp = line; return(JSW); } curlp = line; return(0); } refcount() { register struct node *p, *lp; static struct node *labhash[LABHS]; register struct node **hp; for (hp = labhash; hp < &labhash[LABHS];) *hp++ = 0; for (p = first.forw; p!=0; p = p->forw) if (p->op==LABEL) { labhash[p->labno % LABHS] = p; p->refc = 0; } for (p = first.forw; p!=0; p = p->forw) { if (p->op==JBR || p->op==CBR || p->op==JSW) { p->ref = 0; lp = labhash[p->labno % LABHS]; i .tn:1 .txs;12 R: case CBR: case JMP: case JSW: p = alloc(sizeof first); p->combop = op; if (*curlp=='L' && (p->labno = getnum(curlp+1))) p->code = 0; else { p->labno = 0; p->code = copy(curlp); } break; default: p = alloc(sizeof first); p->combop = op; p->labno = 0; p->code = copy(curlp); break; } p->forw = 0; p->back = lastp; lastp->forw = p; lastp = p; p->ref = 0; if (op==EROU) return(1); if (op==END) return(0); } } getline() { register chaf (lp==0 || p->labno!=lp->labno) for (lp = first.forw; lp!=0; lp = lp->forw) { if (lp->op==LABEL && p->labno==lp->labno) break; } if (lp) { hp = nonlab(lp)->back; if (hp!=lp) { p->labno = hp->labno; lp = hp; } p->ref = lp; lp->refc++; } } } for (p = first.forw; p!=0; p = p->forw) if (p->op==LABEL && p->refc==0 && (lp = nonlab(p))->op && lp->op!=JSW) decref(p); } iterate() { register struct node *p, *rp, *p1; nchange = 0; for (p = first.forw r *lp; register c; lp = line; while (c = getchar()) { if (c==':') { *lp++ = 0; return(LABEL); } if (c=='\n') { *lp++ = 0; return(oplook()); } *lp++ = c; } *lp++ = 0; return(END); } getnum(ap) char *ap; { register char *p; register n, c; p = ap; n = 0; while ((c = *p++) >= '0' && c <= '9') n = n*10 + c - '0'; if (*--p != 0) return(0); return(n); } output() { register struct node *t; register struct optab *op; register int byte; t = &first; while (t = t->forw) ; p!=0; p = p->forw) { if ((p->op==JBR||p->op==CBR||p->op==JSW) && p->ref) { rp = nonlab(p->ref); if (rp->op==JBR && rp->labno && p!=rp) { nbrbr++; p->labno = rp->labno; decref(p->ref); rp->ref->refc++; p->ref = rp->ref; nchange++; } } if (p->op==CBR && (p1 = p->forw)->op==JBR) { rp = p->ref; do rp = rp->back; while (rp->op==LABEL); if (rp==p1) { decref(p->ref); p->ref = p1->ref; p->labno = p1->labno; p1->forw->back = p; p->forw = p1# /* * C object code improver */ #include "c2h.c" struct optab optab[] { "jbr", JBR, "jeq", CBR | JEQ<<8, "jne", CBR | JNE<<8, "jle", CBR | JLE<<8, "jge", CBR | JGE<<8, "jlt", CBR | JLT<<8, "jgt", CBR | JGT<<8, "jlo", CBR | JLO<<8, "jhi", CBR | JHI<<8, "jlos", CBR | JLOS<<8, "jhis", CBR | JHIS<<8, "jmp", JMP, ".globl",EROU, "mov", MOV, "clr", CLR, "com", COM, "inc", INC, "dec", DEC, "neg", NEG, "tst", TST, "asr", ASR, "asl", ASL, "sxt", SXT, "cmp", CMP, "add", ADD, "sub", SUB,switch (t->op) { case END: return; case LABEL: printf("L%d:", t->labno); continue; case DLABEL: printf("%s:", t->code); continue; default: if ((byte = t->subop) == BYTE) t->subop = 0; for (op = optab; op->opstring!=0; op++) if (op->opcode == t->combop) { printf("%s", op->opstring); if (byte==BYTE) printf("b"); break; } if (t->code) { reducelit(t); printf("\t%s\n", t->code); } else if (t->op==JBR || t->op==CBR) printf("\tL%d\n", t->labno); else ->forw; p->subop = revbr[p->subop]; nchange++; nskip++; } } if (p->op==JBR || p->op==JMP) { while (p->forw && p->forw->op!=LABEL && p->forw->op!=EROU && p->forw->op!=END) { nchange++; iaftbr++; if (p->forw->ref) decref(p->forw->ref); p->forw = p->forw->forw; p->forw->back = p; } rp = p->forw; while (rp && rp->op==LABEL) { if (p->ref == rp) { p->back->forw = p->forw; p->forw->back = p->back; p = p->back; decref(rp); nchange++; njp1++; break; } rp = rp->forw; } xjump(p); p = codemove(p); } } } xjump(ap) { register int *p1, *p2, *p3; int nxj; nxj = 0; p1 = ap; if ((p2 = p1->ref)==0) return(0); for (;;) { while ((p1 = p1->back) && p1->op==LABEL); while ((p2 = p2->back) && p2->op==LABEL); if (!equop(p1, p2) || p1==p2) return(nxj); p3 = insertl(p2); p1->combop = JBR; p1->ref = p3; p1->labno = p3->labno; p1->code = 0; nxj++; nxjump++; nchange++; } } insertl(ap) s; 1f; 1f; .text; 1:; .data 38.; 1f; 1f; .text; 1:; .data 98.; 1f; 1f; .text; 1:<*$\0>; .data 99.; 1b+2; 1b+2 91.; 1f; 1f; .text; 1: ; .data 92.; 1b; 1b 82.; 1f; 1f; .text; 1:; .data 83.; 1f; 1f; .text; 1:; .data 84.; 1f; 1f; .text; 1:; .data 86.; 1f; 1f; .text; 1:; .data 87.; 1f; 1f; .text; 1:; .data 88.; 1f; 1f; .text; 1:; .data 0 .data _branchtab: 60.; 0f; 1f; .text; 0:; 1:; .data 61.; 1b; 0b 62.; 2f; 5b(ptt) ( tbody | <(> (number|tra) <)> tbody = { 2 * 1 } ); tra: list(tident) octal(npt); tident: ident newtab(ptt,npt); tbody: <{> ( <}> = { <1 generate> } | trb); trb: telem ( <}> = { xbit 1 } | trb = { 2 * 1 } ); telem: <<> literal = { <.tx> 1 } | <*> = {<.tn>} | <$> number = { <.tq;> 1 } | number tdot = tpt | name te1\done te2\done; te1: tabval(dtt,ndt) tdot = tpt; te2: tabval(ptt,npt) = {<.tq;>1}; tdot: (<.> number | ={<0>}) ( <(> list(targ) <)> | null) = { 2 <;> 1 }; targ: namtruct node *ap; { register struct node *lp, *op; op = ap; if (op->op == LABEL) { op->refc++; return(op); } if (op->back->op == LABEL) { op = op->back; op->refc++; return(op); } lp = alloc(sizeof first); lp->combop = LABEL; lp->labno = isn++; lp->ref = 0; lp->code = 0; lp->refc = 1; lp->back = op->back; lp->forw = op; op->back->forw = lp; op->back = lp; return(lp); } codemove(ap) struct node *ap; { register struct node *p1, *p2, *p3; struct node *t, *tl; int n; p1 = ap; if f; .text; 2:; 5:; .data 63.; 3f; 4f; .text; 3:; 4:; .data 64.; 4b; 3b 65.; 5b; 2b 66.; 6f; 9f; .text; 6:; 9:; .data 67.; 7f; 8f; .text; 7:; 8:; .data 68.; 8b; 7b 69.; 9b; 6b 260.; 0b; 1b 261.; 1b; 0b 262.; 2b; 5b 263.; 3b; 4b 264.; 4b; 3b 265.; 5b; 2b 266.; 0b; 1b 267.; 7f; 8f; .text; 7:; 8:; .data 268.; 8b; 7b 269.; 1b; 0b 0 e|remote(tbody); tpt: { <.tp;.byte > 2 <,> 1 }; literal: ( shortlit | remote(longlit) = { <;> 1} ); shortlit: ignore(none) smark any(litch) <>> scopy = { 1 }; longlit: ignore(none) (<>> = { <\> <>> } | null) litb <>> = { <<> 2 1 <\0> <>;.even> }; litb: smark string(litch) scopy <\>/done litb = { 2 <\\> 1 }; expr: assignment | rv ; assignment: lv assign expr = { 3 * 1 * 2 }; rv: prime rv1: bundle ( infix prime = { 3 * 1 * 2 }\rv1 | rva = { 2 * 1 } | () ); rva: rv <:> rv fref fref =(p1->op!=JBR || (p2 = p1->ref)==0) return(p1); while (p2->op == LABEL) if ((p2 = p2->back) == 0) return(p1); if (p2->op!=JBR && p2->op!=JMP) goto ivloop; p2 = p2->forw; p3 = p1->ref; while (p3) { if (p3->op==JBR || p3->op==JMP) { if (p1==p3) return(p1); ncmot++; nchange++; p1->back->forw = p2; p1->forw->back = p3; p2->back->forw = p3->forw; p3->forw->back = p2->back; p2->back = p1->back; p3->forw = p1->forw; decref(p1->ref); return(p2); } else p3 = p  { <.t;alt;> 2 * 4 * 1 * 2 <:> 3 * 1 <:> }; prime: lv suffix/done = { 2 * 1 } | prefix lv = { 1 * 2 } | <(> expr <)> | unary prime = { 1 * 2 } | remote(number) = { <.l;> 1 }; lv: ( rname = { <.l;> 1 } | <(> lv <)> | <*> prime = { 1 * <.rv> } ) lv1: <[>/done bundle expr <]> = { 2 * 1 * <.f> }\lv1; assign: <=> ignore(none) ( infix = { 1 * <.u> } | = { <.st> } ); infix: smark ignore(none) ( <+> not((<+> not((<+>)) )) = {<.a>} | <-> = {<.s>} | <*> = {<.m>} | = {<.q>} | <%> = {<.r3->forw; } return(p1); ivloop: if (p1->forw->op!=LABEL) return(p1); p3 = p2 = p2->forw; n = 16; do { if ((p3 = p3->forw) == 0 || p3==p1 || --n==0) return(p1); } while (p3->op!=CBR || p3->labno!=p1->forw->labno); do if ((p1 = p1->back) == 0) return(ap); while (p1!=p3); p1 = ap; tl = insertl(p1); p3->subop = revbr[p3->subop]; decref(p3->ref); p2->back->forw = p1; p3->forw->back = p1; p1->back->forw = p2; p1->forw->back = p3; t = p1->back; p1->back = p2->back; p2->back = t; t begin: ignore(blanks) pr1: comment\pr1 parse(first)\pr2 diag(error) pr2: comment\pr2 parse(line)\pr2 diag(error)\pr2 putcharcl parse(last); first: parse(( fref = {<1 > 1 *})) getfref line = { 2<:> 1 }; error: smark ignore(none) any(!<<>>) string(!<<;>>) scopy ( <;> = {<;>} | null ) = { * 2 1 * }; line: labels ( charcl <;> | statement | numbers | trule <;> ) = { 2 * 1 * }; numbers: number <;> numbers/done = { 2 * 1 }; labels: label labels/done = { 2 * 1 }; label: name <:> = { 1 <>} | <|> = {<.o>} | <^> = {<.x>} | <&> = {<.n>} | <==> = {<.eq>} | = {<.ne>} | <<=> = {<.le>} | <>=> = {<.ge>} | <<<> = {<.sl>} | <<> = {<.lt>} | <>> ( <>> = {<.sr>} | = {<.gt>} ) ); prefix: smark ignore(none) ( <&> = {<.lv>} | <++> = {<.ib>} | <--> = {<.db>} ); suffix: smark ignore(none) ( <++> = {<.ia>} | <--> = {<.da>} ); unary: ( = {<.nt>} | <-> = {<.ng>} | <~> = {<.cm>} ); charcl: ( ccla cclb | ccla ) octal(classmask); ccla: (<<<>) [classmask = 1<forw; p1->forw = p3->forw; p3->forw = t; p2 = insertl(p1->forw); p3->labno = p2->labno; p3->ref = p2; decref(tl); if (tl->refc<=0) nrlab--; loopiv++; nchange++; return(p3); } comjump() { register struct node *p1, *p2, *p3; for (p1 = first.forw; p1!=0; p1 = p1->forw) if (p1->op==JBR && (p2 = p1->ref) && p2->refc > 1) for (p3 = p1->forw; p3!=0; p3 = p3->forw) if (p3->op==JBR && p3->ref == p2) backjmp(p1, p3); } backjmp(ap1, ap2) struct node *ap1, *ap2; { register struct n:> }; last: = { <.pn:1 .pxs;12> * <.tn:1 .txs;12> * }; comment: co1: ignore(!<<*>>) <*> ignore(none) /co1; statement: [csym=0] oldtab(dtt) oldtab(pat) ( proc plst tlst <)> = (1){2 1 } | = (1){} noelem ) stt1: bundle ( frag = (1){ 2(nil) * 1(q1) }\stt1 | <;> ( ifelem = { 1(xbit) } | ={ 1(nil) * <1 succ> } ) ); proc: smark ignore(none) ; plst: list(pident)/null remote((octal(npa))) = { 1 * }; pident: ident newtab(pat,npa); tlst: <;>/null [i=0] list((name [i++])) remlassmask?]/cherr ccl1: cclc <<<>\ccl1; cclc: ignore(none) ccl3: <>>\ccl4 ccle\ccl3; ccl4: (<>> | cclx fail) (not((<>>)) | ccle); ccle: char(n) [*(2*n+&classes) =| classmask]; cclb: zeron ccl5: [*(&classes+n) =^ classmask] testn\ccl5; cclx: [nclass--] zeron ccl6: [*(&classes+n) =& ~classmask] testn\ccl6; cherr: diag(( ={} )); zeron: [n=0]; testn: [(n=+2)<400?]; putcharcl: zeron [classes=0] parse(( = { * <.globl classtab> * * } )) ptc1: [w = *(&classes+n)] parse((octal(ode *p1, *p2, *p3; p1 = ap1; p2 = ap2; for(;;) { while ((p1 = p1->back) && p1->op==LABEL); p2 = p2->back; if (equop(p1, p2)) { p3 = insertl(p1); p2->back->forw = p2->forw; p2->forw->back = p2->back; p2 = p2->forw; decref(p2->ref); p2->labno = p3->labno; p2->ref = p3; nchange++; ncomj++; } else return; } } ote((octal(i))) = { 1 * 2 * }; frag: prule = (1){ 1(nil,q1) } | labels noelem = (1){ 1 }; /*in sequel q2 is where to go on fail,q1 is exit bit*/ prule: [sndt=ndt] disj ( <|> [ndt=sndt] fref ( ifeasy prule = (2){3(nil,nil)*2* 1(q2,q1)*2<:>} | prule fref = (2){4({*1},q1)*3* 1<:>2(q2,q1)*3<:>} ) noelem | () ); disj: pelem pdot ( disj = (2){2(q2,nil) * 1(nil,q1)} ifelem/done ishard | () ); pelem: pprim = (2){1(q1)$2} iseasy | <(> push(1,sndt) ( prule <)> w) = {1*})) bundle testn\ptc1; classmask: 0; nclass: 0; classes: cl1: 0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0; cl2: 0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0; cl3: 0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0; cl4: 0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0; cl5: 0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0; cl6: 0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0; cl7: 0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0; cl8: 0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0; done: ; create: [csym++] getcsym: octal(csym) = {<.> 1}; fref: [fsym++] getfref: octal(fsym) = { <..> 1 }; not: params(1) $1/done fail; / C operator tables .globl fltused; fltused=. .globl _instab .globl _branchtab .data _instab: 80.; 1f; 2f; .text; 1:; 2:; .data 60.; 1f; 2f; .text; 1: ; 2: ; .data 106.; 1b; 2b 61.; 1b; 2b 62.; 1b; 2b 63.; 1b; 2b 64.; 1b; 2b 65.; 1b; 2b 66.; 1b; 2b 67.; 1b; 2b 68.; 1b; 2b 69.; 1b; 2b 40.; 1f; 3f; .text; 1:; .data 70.; 1b; 3f 41.; 2f; 4f; .text; 2:; .data 71.; 2b; 4f 30.; 1b; 3f; .text; 3:; .data 31.; 2b; 4f; .text; 4:; .data 32.; 1 | <)> = (2){} noelem ); pprim: ( special | rname ( <:> fail | (spdot|()) ignore(none) ( <(> ignore(blanks) list(parg) <)> = (1){$1 2 * 1} | = (1){$1 1} ))) ( ( = {} | <\>={}) rname = (1){3(nil)*$1 2 1} | () ); pdot: <.>/done ignore(none) ident\alias ([dtt?] | table(dtt) [ndt=0]) [ndt++]; spdot: <.> ignore(none) not(( any(letter) )) alias: newtab(dtt,ndt); parg: rname | remote(specparg); specparg: number | charcl | <<> longlit | <*> = { <\n\0> } | <(> ( <)> = {<1 slist: params(1) $1 list1: bundle <,>/done $1 = { 2 * 1 }\list1; remote: params(1) create parse(rem1,$1); rem1: params(1) getcsym $1 = { 2 <=.> * 1 * }; number: smark ignore(none) any(digit) string(digit) scopy; name: ident scopy; ident: smark ignore(none) any(letter) string(alpha); oldtab: params(1) [$1?]/done discard($1) [$1=0]; newtab: params(2) ([$2?] | table($2) [$1=0]) enter($2,i) [$2[i] = $1++]; tabval: params(2) [$2?] find($2,i) [i=$1-$2[i]] octal(i); null: = nil; xbit: {<1 >}; q1: { $1 };b; 3b 33.; 2b; 4b 42.; 5f; 5f; .text; 5:; .data 72.; 5b; 5b 43.; 6f; 6f; .text; 6:; .data 73.; 6b; 6b 44.; 5b; 6b 74.; 5b; 6b 45.; 5f; 6f; .text; 6:; .data 75.; 5f; 6b 46.; 5f; 6f; .text; 5:; 6:; .data 76.; 5b; 6b 47.; 5f; 5f; .text; 5:; 6:; .data 55.; 5b; 6b 85.; 5b; 6b 81.; 5f; 6f; .text; 5:; 6:; .data 48.; 5f; 6f; .text; 5:; 6:; .data 78.; 5b; 6b 49.; 5f; 5f; .text; 5:; .data 79.; 5b; 5b 37.ucc>} | push(3,dtt,ndt,sndt) [dtt=0] prule <)> oldtab(dtt) ( ifelem = {1(nil,xbit) } | = {1(nil,nil)*<1 succ>} ) ); iseasy: [easy = 1]; ishard: [easy = 0]; noelem: [easy = 2]; ifelem: [easy!=2?]; ifeasy: [easy==1?]; special: <=> (rname | remote(trule)) = (1){ $1 1 } | <<> literal = (1){ $1 <.px> 1 } | <*> = (1){ $1 <.pn> } | <[> expr ( = {<.t>} | = {<.p>} ) <]> = (1){ 2 * $1 1 }; rname: ( name tabval(pat,npa)/done | <$> number ) = { <[-> 1 <\<1]> }; trule: oldta q2: { $2 }; nil: {}; blanks: << >>; digit: <<0123456789>>; letter: <> <>; alpha: <<0123456789>> <> <>; litch: !<<\>>>; none: <<>>; csym: 0; fsym: 0; easy: 0; w: 0; n: 0; dtt: 0; /*delivered translation table*/ ndt: 0; /*numb of delivered translations*/ sndt: 0; /*saved ndt at beginning of disjunctive term*/ pat: 0; /*parsing rule parameter table*/ npa: 0; /*number of parsing rule params*/ ptt: 0; /*table of params of translation*/ npt: 0; /*number of params of translation*/ i: 0; FFS 21 #define SOFFS 22 /* Flag bits */ #define BINARY 01 #define LVALUE 02 #define RELAT 04 #define ASSGOP 010 #define LWORD 020 #define RWORD 040 #define COMMUTE 0100 #define RASSOC 0200 #define LEAF 0400 #define CNVRT 01000 E) { t = t1; p2->type = INT; /* no int cv for struct */ t2 = INT; } else cvn = cvtab[lintyp(t1)][lintyp(t2)]; leftc = (cvn>>4)&017; cvn =& 017; t = leftc? t2:t1; if (dope&ASSGOP) { t = t1; if (op==ASSIGN && (cvn==ITP||cvn==PTI)) cvn = leftc = 0; if (leftc) cvn = leftc; leftc = 0; } else if (op==COLON && t1>=PTR && t1==t2) cvn = 0; else if (dope&RELAT) { if (op>=LESSEQ && (t1>=PTR || t2>=PTR)) op =+ LESSEQP-LESSEQ; if (cvn==PTI) cvn = 0; } if (cvn==PTI) { cvn = 0;/* * C pass 2 header */ #define swsiz 200 #define ossiz 500 struct tnode { int op; int type; int degree; struct tnode *tr1, *tr2; }; struct bnode { int bop; struct tnode *btree; int lbl; int cond; }; struct tname { int nop; int ntype; int elsize; char class; char regno; int offset; int nloc; }; /* * for field selections */ struct tsel { int op; int type; int degree; struct tnode *tr1; char flen; char bitoffs; }; struct tconst { int cop; int ctype; int cdeg; int value; };          if (op==MINUS) { t = INT; pcvn++; } else { if (t1!=t2 || t1!=(PTR+CHAR)) cvn = XX; } } if (cvn) { t1 = plength(p1); t2 = plength(p2); if (cvn==XX || (cvn==PTI&&t1!=t2)) error("Illegal conversion"); else if (leftc) p1 = convert(p1, t, cvn, t2); else p2 = convert(p2, t, cvn, t1); } if (dope&RELAT) t = INT; if (fold(op, p1, p2)==0) *cp++ = block(2,op,t,(p1->dimp==0? p2:p1)->dimp,p1,p2); if (pcvn && t1!=(PTR+CHAR)) { p1 = *--cp; *cp++ = convert(p1, 0, PTI, plstruct optab { char tabdeg1; char tabtyp1; char tabdeg2; char tabtyp2; char *tabstring; }; struct table { int tabop; struct optab *tabp; }; struct instab { int iop; char *str1; char *str2; }; struct swtab { int swlab; int swval; }; char maprel[]; char notrel[]; int nreg; int isn; int namsiz; int line; char ascbuf[518]; int nerror; struct table cctab[]; struct table efftab[]; struct table regtab[]; struct table sptab[]; struct table lsptab[]; struct instab instab[]; struct instab branchtab[];# /* * C compiler * * */ #include "c0h.c" /* * Called from tree, this routine takes the top 1, 2, or 3 * operands on the expression stack, makes a new node with * the operator op, and puts it on the stack. * Essentially all the work is in inserting * appropriate conversions. */ build(op) { register int t1; int t2, t3, t; struct tnode *p3, *disarray(); register struct tnode *p1, *p2; int d, dope, leftc, cvn, pcvn; /* * a[i] => *(a+i) */ if (op==LBRACK) { build(PLUS); op = STAR; }ength(p1->tr1)); } } /* * Generate the appropirate conversion operator. * For pointer <=> integer this is a multiplication * or division, otherwise a special operator. */ convert(p, t, cvn, len) struct tnode *p; { register int n; switch(cvn) { case PTI: case ITP: if (len==1) return(p); return(block(2, (cvn==PTI?DIVIDE:TIMES), t, 0, p, block(1, CON, 0, 0, len))); case ITF: n = ITOF; break; case FTI: n = FTOI; break; case ITL: n = ITOL; break; case LTI: n = LTOI; bre int opdope[]; char *opntab[]; int nstack; int nfloat; int *spacep; int treespace[ossiz]; int eolflg; struct tconst czero, cone, fczero; /* operators */ #define EOF 0 #define SEMI 1 #define LBRACE 2 #define RBRACE 3 #define LBRACK 4 #define RBRACK 5 #define LPARN 6 #define RPARN 7 #define COLON 8 #define COMMA 9 #define FSEL 10 #define KEYW 19 #define NAME 20 #define CON 21 #define STRING 22 #define FCON 23 #define SFCON 24 #define AUTOI 27 #define AUTOD 28 #define INCBEF 30 #define DECBEF 31 #define IN dope = opdope[op]; if ((dope&BINARY)!=0) { p2 = chkfun(disarray(*--cp)); t2 = p2->type; } p1 = *--cp; /* * sizeof gets turned into a number here. * Bug: sizeof(structure-member-array) is 2 because * the array has been turned into a ptr already. */ if (op==SIZEOF) { t1 = length(p1); p1->op = CON; p1->type = INT; p1->dimp = 0; p1->value = t1; *cp++ = p1; return; } if (op!=AMPER) { p1 = disarray(p1); if (op!=CALL) p1 = chkfun(p1); } t1 = p1->type; pcvn = 0; t = INTak; case FTL: n = FTOL; break; case LTF: n = LTOF; break; } return(block(1, n, t, 0, p)); } /* * Traverse an expression tree, adjust things * so the types of things in it are consistent * with the view that its top node has * type at. * Used with structure references. */ setype(ap, at, adimptr) struct tnode *ap; { register struct tnode *p; register t, dimptr; p = ap; t = at; dimptr = adimptr; p->type = t; if (dimptr != -1) p->dimp = dimptr; switch(p->op) { case AMPER: setypCAFT 32 #define DECAFT 33 #define EXCLA 34 #define AMPER 35 #define STAR 36 #define NEG 37 #define COMPL 38 #define DOT 39 #define PLUS 40 #define MINUS 41 #define TIMES 42 #define DIVIDE 43 #define MOD 44 #define RSHIFT 45 #define LSHIFT 46 #define AND 47 #define NAND 55 #define OR 48 #define EXOR 49 #define ARROW 50 #define ITOF 51 #define FTOI 52 #define LOGAND 53 #define LOGOR 54 #define FTOL 56 #define LTOF 57 #define ITOL 58 #define LTOI 59 #define EQUAL 60 #define NEQUAL 61 #define LESSEQ 62 #defin; switch (op) { /* end of expression */ case 0: *cp++ = p1; return; /* no-conversion operators */ case QUEST: if (p2->op!=COLON) error("Illegal conditional"); t = t2; case COMMA: case LOGAND: case LOGOR: *cp++ = block(2, op, t, 0, p1, p2); return; case CALL: if ((t1&XTYPE) != FUNC) error("Call of non-function"); *cp++ = block(2,CALL,decref(t1),p1->dimp,p1,p2); return; case STAR: if (p1->op==AMPER ) { *cp++ = p1->tr1; return; } if ((t1&XTYPE) == FUNC) erre(p->tr1, decref(t), dimptr); return; case STAR: setype(p->tr1, incref(t), dimptr); return; case PLUS: case MINUS: setype(p->tr1, t, dimptr); } } /* * A mention of a function name is turned into * a pointer to that function. */ chkfun(ap) struct tnode *ap; { register struct tnode *p; register int t; p = ap; if (((t = p->type)&XTYPE)==FUNC) return(block(1,AMPER,incref(t),p->dimp,p)); return(p); } /* * A mention of an array is turned into * a pointer to the base of the array. */ e LESS 63 #define GREATEQ 64 #define GREAT 65 #define LESSEQP 66 #define LESSP 67 #define GREATQP 68 #define GREATP 69 #define ASPLUS 70 #define ASMINUS 71 #define ASTIMES 72 #define ASDIV 73 #define ASMOD 74 #define ASRSH 75 #define ASLSH 76 #define ASSAND 77 #define ASOR 78 #define ASXOR 79 #define ASSIGN 80 #define TAND 81 #define LTIMES 82 #define LDIV 83 #define LMOD 84 #define ASSNAND 85 #define LASTIMES 86 #define LASDIV 87 #define LASMOD 88 #define QUEST 90 #define LLSHIFT 91 #define ASLSHL 92 #deor("Illegal indirection"); *cp++ = block(1,STAR,decref(t1),p1->dimp,p1); return; case AMPER: if (p1->op==STAR) { p1->tr1->dimp = p1->dimp; p1->tr1->type = incref(t1); *cp++ = p1->tr1; return; } if (p1->op==NAME) { *cp++ = block(1,op,incref(t1),p1->dimp,p1); return; } error("Illegal lvalue"); break; /* * a->b goes to (*a).b */ case ARROW: *cp++ = p1; chkw(p1, -1); p1->type = PTR+STRUCT; build(STAR); p1 = *--cp; /* * In a.b, a fairly complicated processstruct tnode *disarray(ap) struct tnode *ap; { register int t; register struct tnode *p; p = ap; /* check array & not MOS */ if (((t = p->type)&XTYPE)!=ARRAY || p->op==NAME&&p->class==MOS) return(p); p->ssp++; *cp++ = p; setype(p, decref(t), -1); build(AMPER); return(*--cp); } /* * make sure that p is a ptr to a node * with type int or char or 'okt.' * okt might be nonexistent or 'long' * (e.g. for <<). */ chkw(p, okt) struct tnode *p; { register int t; if ((t=p->type)>CHAR && top!=NAME || (p2->class!=MOS && p2->class!=FMOS)) error("Illegal structure ref"); *cp++ = p1; t = t2; if ((t&XTYPE) == ARRAY) { t = decref(t); p2->ssp++; } setype(p1, t, p2->dimp); build(AMPER); *cp++ = block(1,CON,NOTYPE,0,p2->nloc); build(PLUS); if ((t2&XTYPE) != ARRAY)  t!=okt) error("Integer operand required"); return; } /* *'linearize' a type for looking up in the * conversion table */ lintyp(t) { switch(t) { case INT: case CHAR: return(0); case FLOAT: case DOUBLE: return(1); case LONG: return(2); default: return(3); } } /* * Report an error. */ error(s, p1, p2, p3, p4, p5, p6) { nerror++; printf("%d: ", line); printf(s, p1, p2, p3, p4, p5, p6); printf("\n"); } /* * Generate a node in an expression tree, * setting the operator, type,WIT 213 #define EXPR 214 #define SNAME 215 #define RNAME 216 #define ANAME 217 #define NULL 218 /* * types */ #define INT 0 #define CHAR 1 #define FLOAT 2 #define DOUBLE 3 #define STRUCT 4 #define RSTRUCT 5 #define LONG 6 #define TYLEN 2 #define TYPE 07 #define XTYPE (03<<3) #define PTR 010 #define FUNC 020 #define ARRAY 030 /* storage classes */ #define KEYWC 1 #define MOS 10 #define AUTO 11 #define EXTERN 12 #define STATIC 13 #define REG 14 #define STRTAG 15 #define ARG 16 #define OFFS 20 #define XO build(STAR); if (p2->class == FMOS) *cp++ = block(2, FSEL, t, 0, *--cp, p2->dimp); return; } if ((dope&LVALUE)!=0) chklval(p1); if ((dope&LWORD)!=0) chkw(p1, LONG); if ((dope&RWORD)!=0) chkw(p2, LONG); if ((dope&BINARY)==0) { if (op==ITOF) t1 = DOUBLE; else if (op==FTOI) t1 = INT; if (!fold(op, p1, 0)) *cp++ = block(1,op,t1,p1->dimp,p1); return; } cvn = 0; if (t1==STRUCT || t2==STRUCT) { error("Unimplemented structure operation"); t1 = t2 = INT; } if (t2==NOTYP degree (unused in this pass) * and the operands. */ block(an, op, t, d, p1,p2,p3) int *p1, *p2, *p3; { register int *ap, *p, n; int *oldp; n = an+3; p = gblock(n); oldp = p; ap = &op; do { *p++ = *ap++; } while (--n); return(oldp); } /* * Assign an unitialized block for use in the * expression tree. */ gblock(n) { register int *p; p = space; if ((space =+ n) >= &osspace[OSSIZ]) { error("Expression overflow"); exit(1); } return(p); } /* * Check that a tree can be used as an lvalue. */ chklval(ap) struct tnode *ap; { register struct tnode *p; p = ap; if (p->op!=NAME && p->op!=STAR) error("Lvalue required"); } /* * reduce some forms of `constant op constant' * to a constant. More of this is done in the next pass * but this is used to allow constant expressions * to be used in switches and array bounds. */ fold(op, ap1, ap2) struct tnode *ap1, *ap2; { register struct tnode *p1; register int v1, v2; p1 = ap1; if (p1->op!=CON || (ap2!=0 && ap2->op!=CON)) return(0)the object * whose tree node is acs. */ length(acs) struct tnode *acs; { register t, n; register struct tnode *cs; cs = acs; t = cs->type; n = 1; while ((t&XTYPE) == ARRAY) { t = decref(t); n = dimtab[cs->ssp&0377]; } if ((t&~TYPE)==FUNC) return(0); if (t>=PTR) return(2*n); switch(t&TYPE) { case INT: return(2*n); case CHAR: return(n); case FLOAT: case LONG: return(4*n); case DOUBLE: return(8*n); case STRUCT: return(n * dimtab[cs->lenp&0377]); case RSTRUCT: error int op; int type; int dimp; int class; int offset; char nname[ncps]; }; struct tconst { int op; int type; int dimp; int value; }; struct hshtab { char hclass; char hflag; int htype; int hdimp; int hoffset; char name[ncps]; }; struct { char hclass; char hflag; int htype; char flen; /* Field length */ char bitoffs; /* Offset of field */ }; struct swtab { int swlab; int swval; }; struct bnode { int bop; struct tnode *btree; int lbl; int cond; }; char cvtab[4][4]; char savstr[S; v1 = p1->value; v2 = ap2->value; switch (op) { case PLUS: v1 =+ v2; break; case MINUS: v1 =- v2; break; case TIMES: v1 =* v2; break; case DIVIDE: v1 =/ v2; break; case MOD: v1 =% v2; break; case AND: v1 =& v2; break; case OR: v1 =| v2; break; case EXOR: v1 =^ v2; break; case NEG: v1 = - v1; break; case COMPL: v1 = ~ v1; break; case LSHIFT: v1 =<< v2; break; case RSHIFT: v1 =>> v2; break; default: return(0); } p1->value = v1; ("Bad structure"); return(0); } error("Compiler error (length)"); } /* * The number of bytes in an object, rounded up to a word. */ rlength(cs) struct tnode *cs; { return((length(cs)+ALIGN) & ~ALIGN); } /* * After an "if (...) goto", look to see if the transfer * is to a simple label. */ simplegoto() { register struct hshtab *csp; if ((peeksym=symbol())==NAME && nextchar()==';') { csp = csym; if (csp->hclass==0 && csp->htype==0) { csp->htype = ARRAY; if (csp->hoffset==0) csp->hoTRSIZ]; char *strptr; int opdope[]; char ctab[]; char symbuf[ncps+2]; int hshused; struct hshtab hshtab[hshsiz]; int *space; int *cp; int cmst[cmsiz]; int isn; struct swtab swtab[swsiz]; struct swtab *swp; int contlab; int brklab; int retlab; int deflab; int nauto; int autolen; int peeksym; int peekc; int eof; int line; int osspace[OSSIZ]; int *treespace; struct hshtab *defsym; struct hshtab *funcsym; int xdflg; int proflg; int stflg; struct hshtab *csym; int cval; double fcval; int nchstr; int nerror; stru *cp++ = p1; return(1); } /* * Compile an expression expected to have constant value, * for example an array bound or a case value. */ conexp() { register struct tnode *t; initflg++; if (t = tree()) if (t->op != CON) error("Constant required"); initflg--; return(t->value); } ffset = isn++; } if ((csp->hclass==0||csp->hclass==STATIC) && csp->htype==ARRAY) { peeksym = -1; return(csp->hoffset); } } return(0); } /* * Return the next non-white-space character */ nextchar() { while (spnextchar()==' ') peekc = 0; return(peekc); } /* * Return the next character, translating all white space * to blank and handling line-ends. */ spnextchar() { register c; if ((c = peekc)==0) c = getchar(); if (c=='\t') c = ' '; else if (c=='\n') { c = ' '; if (inct hshtab *paraml; struct hshtab *parame; int strflg; int mosflg; int initflg; int inhdr; int dimtab[dimsiz]; char obuf[518]; char sbuf[518]; int dimp; int regvar; int bitoffs; struct tname funcblk; /* operators */ #define EOF 0 #define SEMI 1 #define LBRACE 2 #define RBRACE 3 #define LBRACK 4 #define RBRACK 5 #define LPARN 6 #define RPARN 7 #define COLON 8 #define COMMA 9 #define FSEL 10 #define KEYW 19 #define NAME 20 #define CON 21 #define STRING 22 #define FCON 23 #define SFCON 24 #define SIZEOF 91        hdr==0) line++; inhdr = 0; } else if (c=='\001') { /* SOH, insert marker */ inhdr++; c = ' '; } peekc = c; return(c); } /* * is a break or continue legal? */ chconbrk(l) { if (l==0) error("Break/continue error"); } /* * The goto statement. */ dogoto() { register struct tnode *np; *cp++ = tree(); build(STAR); chkw(np = *--cp, -1); rcexpr(block(1,JUMP,0,0,np)); } /* * The return statement, which has to convert * the returned object to the function's type. */ doret() { register #define INCBEF 30 #define DECBEF 31 #define INCAFT 32 #define DECAFT 33 #define EXCLA 34 #define AMPER 35 #define STAR 36 #define NEG 37 #define COMPL 38 #define DOT 39 #define PLUS 40 #define MINUS 41 #define TIMES 42 #define DIVIDE 43 #define MOD 44 #define RSHIFT 45 #define LSHIFT 46 #define AND 47 #define OR 48 #define EXOR 49 #define ARROW 50 #define ITOF 51 #define FTOI 52 #define LOGAND 53 #define LOGOR 54 #define FTOL 56 #define LTOF 57 #define ITOL 58 #define LTOI 59 #define EQUAL 60 #define NEQ# /* * C compiler * * */ #include "c0h.c" /* * Reduce the degree-of-reference by one. * e.g. turn "ptr-to-int" into "int". */ decref(at) { register t; t = at; if ((t & ~TYPE) == 0) { error("Illegal indirection"); return(t); } return((t>>TYLEN) & ~TYPE | t&TYPE); } /* * Increase the degree of reference by * one; e.g. turn "int" to "ptr-to-int". */ incref(t) { return(((t&~TYPE)<tr2; build(RFORCE); rcexpr(*--cp); } branch(retlab); } /* * write out a character to the usual output * or to the string file */ putchar(c) { write(1, &c, 1); } outcode(s, a) char *s; { register char *sp; register *ap, *bufp; int n; char *np; bufp = obuf; if (strflg) bufp = sbuf; ap = &a; for (;;) switch(*s++) { case 'B': putw(*ap++ | (0376<<8), bufp); cUAL 61 #define LESSEQ 62 #define LESS 63 #define GREATEQ 64 #define GREAT 65 #define LESSEQP 66 #define LESSP 67 #define GREATQP 68 #define GREATP 69 #define ASPLUS 70 #define ASMINUS 71 #define ASTIMES 72 #define ASDIV 73 #define ASMOD 74 #define ASRSH 75 #define ASLSH 76 #define ASSAND 77 #define ASOR 78 #define ASXOR 79 #define ASSIGN 80 #define QUEST 90 #define CALL 100 #define MCALL 101 #define JUMP 102 #define CBRANCH 103 #define INIT 104 #define SETREG 105 #define RFORCE 110 #define BRANCH 111 #defo together with the cond. */ cbranch(tree, lbl, cond) struct tnode *tree; { rcexpr(block(1,CBRANCH,tree,lbl,cond)); } /* * Write out a tree. */ rcexpr(tree) struct tnode *tree; { treeout(tree); outcode("BN", EXPR, line); } treeout(atree) struct tnode *atree; { register struct tnode *tree; if ((tree = atree) == 0) return; switch(tree->op) { case 0: outcode("B", NULL); return; case NAME: outcode("BNN", NAME, tree->class, tree->type); if (tree->class==EXTERN) outcode("S", tree->nnontinue; case 'N': putw(*ap++, bufp); continue; case 'S': np = *ap++; n = ncps; while (n-- && *np) { putc(*np++, bufp); } putc(0, bufp); continue; case '1': putw(1, bufp); continue; case '0': putw(0, bufp); continue; case '\0': return; } error("Botch in outcode"); } ine LABEL 112 #define NLABEL 113 #define RLABEL 114 /* types */ #define INT 0 #define CHAR 1 #define FLOAT 2 #define DOUBLE 3 #define STRUCT 4 #define RSTRUCT 5 #define LONG 6 #define NOTYPE 7 /* used internally */ #define ALIGN 01 #define TYPE 07 #define TYLEN 2 #define XTYPE (03<<3) #define PTR 010 #define FUNC 020 #define ARRAY 030 /* storage classes */ #define KEYWC 1 #define MOS 10 #define AUTO 11 #define EXTERN 12 #define STATIC 13 #define REG 14 #define STRTAG 15 #define ARG 16 #define ARG1 17ame); else outcode("N", tree->nloc); return; case CON: case FCON: case SFCON: outcode("BNN", tree->op, tree->type, tree->value); return; case FSEL: treeout(tree->tr1); outcode("BNN", tree->op, tree->type, tree->tr2); return; case CBRANCH: treeout(tree->btree); outcode("BNN", tree->op, tree->lbl, tree->cond); return; default: treeout(tree->tr1); if (opdope[tree->op]&BINARY) treeout(tree->tr2); outcode("BN", tree->op, tree->type); return; } } /* * Generate a bran        #define FMOS 18 /* keywords */ #define GOTO 20 #define RETURN 21 #define IF 22 #define WHILE 23 #define ELSE 24 #define SWITCH 25 #define CASE 26 #define BREAK 27 #define CONTIN 28 #define DO 29 #define DEFAULT 30 #define FOR 31 /* characters */ #define INSERT 119 #define PERIOD 120 #define SQUOTE 121 #define DQUOTE 122 #define LETTER 123 #define DIGIT 124 #define NEWLN 125 #define SPACE 126 #define UNKN 127 /* * Special operators in intermediate code */ #define BDATA 200 #define WDATA 201 #definech */ branch(lab) { outcode("BN", BRANCH, lab); } /* * Generate a label */ label(l) { outcode("BN", LABEL, l); } /* * ap is a tree node whose type * is some kind of pointer; return the size of the object * to which the pointer points. */ plength(ap) struct tname *ap; { register t, l; register struct tname *p; p = ap; if (p==0 || ((t=p->type)&~TYPE) == 0) /* not a reference */ return(1); p->type = decref(t); l = length(p); p->type = t; return(l); } /* * return the number of bytes in # /* C compiler-- pass 1 header */ /* parameters */ #define ncps 8 #define hshsiz 200 #define cmsiz 40 #define swsiz 200 #define OSSIZ 500 #define dimsiz 100 #define NBPW 16 #define NBPC 8 #define NCPW 2 #define STRSIZ 256 struct tnode { int op; int type; int dimp; struct tnode *tr1, *tr2; }; struct { int op; int type; char ssp; /* subscript list */ char lenp; /* structure length */ }; struct tname { int op; int type; int dimp; int class; int offset; int nloc; }; struct txname {  PROG 202 #define DATA 203 #define BSS 204 #define CSPACE 205 #define SSPACE 206 #define SYMDEF 207 #define SAVE 208 #define RETRN 209 #define EVEN 210 #define PROFIL 212 #define SWIT 213 #define EXPR 214 #define SNAME 215 #define RNAME 216 #define ANAME 217 #define NULL 218 /* Flag bits */ #define BINARY 01 #define LVALUE 02 #define RELAT 04 #define ASSGOP 010 #define LWORD 020 #define RWORD 040 #define COMMUTE 0100 #define RASSOC 0200 #define LEAF 0400 /* * Conversion codes */ #define ITF 1 #define ITL 2 #define LTF 3 #define ITP 4 #define PTI 5 #define FTI 6 #define LTI 7 #define FTL 8 #define XX 15 /* * symbol table flags */ #define FNDEL 01 #define FNUND 02 #define FKEYW 04 #define FFIELD 020 nerating * the converted int in a register by * movf double,fr0; movfi fr0,int . */ if(opdope[p1->op]&CNVRT && (opdope[p2->op]&CNVRT)==0) { tree->tr1 = p1->tr1; if (opt = match(tree, table, nrleft)) return(opt); tree->tr1 = p1; } else if (opdope[p2->op]&CNVRT && (opdope[p1->op]&CNVRT)==0) { tree->tr2 = p2->tr1; if (opt = match(tree, table, nrleft)) return(opt); tree->tr2 = p2; } t2 = p2->type; d2 = dcalc(p2, nrleft); } for (; table->op!=op; table++) if (table /* * Longs need special treatment. */ case ASLSH: case LSHIFT: if (tree->type==LONG) { if (tree->tr2->op==ITOL) tree->tr2 = tree->tr2->tr1; if (tree->op==ASLSH) tree->op = ASLSHL; else tree->op = LLSHIFT; } break; /* * Try to change * and / to shifts. */ case TIMES: case DIVIDE: case ASTIMES: case ASDIV: tree = pow2(tree); } /* * Try to find postfix ++ and -- operators that can be * pulled out and done after the rest of the expression */ if (table!=cctIEHzap(s) { write(2,s,6); write(2,": argument count wrong\n",23); write(2,"That's all, folks\n",18); exit(); } ->op==0) return(0); for (opt = table->tabp; opt->tabdeg1!=0; opt++) { if (d1 > (opt->tabdeg1&077) || (opt->tabdeg1 >= 0100 && (p1->op != STAR))) continue; if (notcompat(p1, opt->tabtyp1, op)) { continue; } if ((opdope[op]&BINARY)!=0 && p2!=0) { if (d2 > (opt->tabdeg2&077) || (opt->tabdeg2 >= 0100) && (p2->op != STAR) ) continue; if (notcompat(p2,opt->tabtyp2, 0)) continue; } return(opt); } return(0); } /* * Given a tree, a code table, and a register, * produceab && table!=cregtab && recurf<2 && (opdope[tree->op]&LEAF)==0) { if (r=delay(&atree, table, reg)) { tree = atree; table = efftab; reg = r-1; } } /* * Basically, try to reorder the computation * so reg = x+y is done as reg = x; reg =+ y */ if (recurf==0 && reorder(&atree, table, reg)) { if (table==cctab && atree->op==NAME) return(reg); } tree = atree; if (table==efftab && tree->op==NAME) return(reg); if ((r=cexpr(tree, table, reg))>=0) return(r); if (table!=regtab) A...Htmga.szrun4tmgc.s6tmgl.s9tmgl.ttmgba.outxalloc.d code to evaluate the tree with the appropriate table. * Registers reg and upcan be used. * If there is a value, it is desired that it appear in reg. * The routine returns the register in which the value actually appears. * This routine must work or there is an error. * If the table called for is cctab, sptab, or efftab, * and tree can't be done using the called-for table, * another try is made. * If the tree can't be compiled using cctab, regtab is * used and a "tst" instruction is produced. * If{ if((r=cexpr(tree, regtab, reg))>=0) { fixup: modf = isfloat(tree); if (table==sptab || table==lsptab) { if (tree->type==LONG) { printf("mov\tr%d,-(sp)\n",r+1); nstack++; } printf("mov%c r%d,%c(sp)\n", modf, r, table==sptab? '-':0); nstack++; } if (table==cctab) printf("tst%c r%d\n", modf, r); return(r); } } if (tree->op>0 && tree->opop]) error("No code table for op: %s", opntab[tree->op]); else error("No code table for o, / 2 5 ! $ ' * - 0 3 6 " % ( + . 1 4 7 8 ; > A D G J M 9 < ? B E H K N :  the tree can't be compiled using sptab, * regtab is used and the register is pushed on the stack. * If the tree can't be compiled using efftab, * just use regtab. * Regtab must succeed or an "op not found" error results. * * A number of special cases are recognized, and * there is an interaction with the optimizer routines. */ rcexpr(atree, atable, reg) struct tnode *atree; struct table *atable; { register r; int modf, nargs, recurf; register struct tnode *tree; register struct table *table; p %d", tree->op); return(reg); } /* * Try to compile the tree with the code table using * registers areg and up. If successful, * return the register where the value actually ended up. * If unsuccessful, return -1. * * Most of the work is the macro-expansion of the * code table. */ cexpr(atree, table, areg) struct tnode *atree; struct table *table; { int c, r; register struct tnode *p, *p1, *tree; struct table *ctable; struct tnode *p2; char *string; int reg, reg1, rreg, flag, opd; char *o# /* C compiler, part 2 */ #include "c1h.c" char maprel[] { EQUAL, NEQUAL, GREATEQ, GREAT, LESSEQ, LESS, GREATQP, GREATP, LESSEQP, LESSP }; char notrel[] { NEQUAL, EQUAL, GREAT, GREATEQ, LESS, LESSEQ, GREATP, GREATQP, LESSP, LESSEQP }; struct tconst czero { CON, INT, 0, 0}; struct tconst cone { CON, INT, 0, 1}; struct tconst fczero { SFCON, DOUBLE, 0, 0 }; struct table *cregtab; int nreg 3; int isn 10000; int namsiz 8; main(argc, argv) char *argv[]; { extern fout; if (argc<4) { etable = atable; recurf = 0; if (reg<0) { recurf++; reg = ~reg; if (reg>=020) { reg =- 020; recurf++; } } if((tree=atree)==0) return(0); switch (tree->op) { /* * A conditional branch */ case CBRANCH: cbranch(optim(tree->btree), tree->lbl, tree->cond, 0); return(0); /* * An initializing expression */ case INIT: if (tree->tr1->op == AMPER) tree->tr1 = tree->tr1->tr1; if (tree->tr1->op==NAME) pname(tree->tr1); else if (tree->tr1==CON) psoct(tree->tr1->valuept; tree = atree; reg = areg; p1 = tree->tr2; c = tree->op; opd = opdope[c]; /* * When the value of a relational or a logical expression is * desired, more work must be done. */ if ((opd&RELAT||c==LOGAND||c==LOGOR||c==EXCLA) && table!=cctab) { cbranch(tree, c=isn++, 1, reg); rcexpr(&czero, table, reg); branch(isn, 0); label(c); rcexpr(&cone, table, reg); label(isn++); return(reg); } if(c==QUEST) { if (table==cctab) return(-1); cbranch(tree->tr1, c=isn++, 0, reg); flag rror("Arg count"); exit(1); } if(fopen(argv[1], ascbuf)<0) { error("Missing temp file"); exit(1); } if ((fout = creat(argv[3], 0666)) < 0) { error("Can't create %s", argv[3]); exit(1); } spacep = treespace; getree(); /* * If any floating-point instructions * were used, generate a reference which * pulls in the floating-point part of printf. */ if (nfloat) printf(".globl fltused\n"); /* * tack on the string file. */ close(ascbuf[0]); if (fopen(argv[2], ascbuf)<0) { error); else error("Illegal initialization"); putchar('\n'); return(0); /* * Put the value of an expression in r0, * for a switch or a return */ case RFORCE: if((r=rcexpr(tree->tr1, regtab, reg)) != 0) printf("mov%c r%d,r0\n", isfloat(tree->tr1), r); return(0); /* * sequential execution */ case COMMA: rcexpr(tree->tr1, efftab, reg); atree = tree = tree->tr2; break; /* * In the generated &~ operator, * fiddle things so a PDP-11 "bit" * instruction will be produced whe= nstack; rreg = rcexpr(p1->tr1, table, reg); nstack = flag; branch(r=isn++, 0); label(c); reg = rcexpr(p1->tr2, table, rreg); if (rreg!=reg) printf("mov%c r%d,r%d\n", isfloat(tree),reg,rreg); label(r); return(rreg); } reg = oddreg(tree, reg); reg1 = reg+1; /* * long values take 2 registers. */ if (tree->type==LONG && tree->op!=ITOL) reg1++; /* * Leaves of the expression tree */ if ((r = chkleaf(tree, table, reg)) >= 0) return(r); /* * x + (-1) is better done ("Missing temp file"); exit(1); } printf(".globl\n.data\n"); getree(); flush(); exit(nerror!=0); } /* * Given a tree, a code table, and a * count of available registers, find the code table * for the appropriate operator such that the operands * are of the right type and the number of registers * required is not too large. * Return a ptr to the table entry or 0 if none found. */ char *match(atree, table, nrleft) struct tnode *atree; struct table *table; { int op, d1, d2, t1, t2, dope; strucn cctab is used. */ case NAND: if (table==cctab) { tree->op = TAND; tree->tr2 = optim(block(1, COMPL, INT, 0, tree->tr2)); } break; /* * Handle a subroutine call. It has to be done * here because if cexpr got called twice, the * arguments might be compiled twice. * There is also some fiddling so the * first argument, in favorable circumstances, * goes to (sp) instead of -(sp), reducing * the amount of stack-popping. */ case CALL: r = 0; nargs = 0; modf = 0; if (treas x-1. */ if ((tree->op==PLUS||tree->op==ASPLUS) && (p1=tree->tr2)->op == CON && p1->value == -1) { p1->value = 1; tree->op =+ (MINUS-PLUS); } if (table==cregtab) table = regtab; /* * The following peculiar code depends on the fact that * if you just want the codition codes set, efftab * will generate the right code unless the operator is * postfix ++ or --. Unravelled, if the table is * cctab and the operator is not special, try first * for efftab; if the table isn't, if thet tnode *p2; register struct tnode *p1, *tree; register struct optab *opt; if ((tree=atree)==0) return(0); if (table==lsptab) table = sptab; if ((op = tree->op)==0) return(0); dope = opdope[op]; if ((dope&LEAF) == 0) p1 = tree->tr1; else p1 = tree; t1 = p1->type; d1 = dcalc(p1, nrleft); if ((dope&BINARY)!=0) { p2 = tree->tr2; /* * If a subtree starts off with a conversion operator, * try for a match with the conversion eliminated. * E.g. int = double can be done without gee->tr1->op!=NAME) { /* get nargs right */ nargs++; nstack++; } tree = tree->tr2; if(tree->op) { while (tree->op==COMMA) { r =+ comarg(tree->tr2, &modf); tree = tree->tr1; nargs++; } r =+ comarg(tree, &modf); nargs++; } tree = atree; tree->op = CALL2; if (modf && tree->tr1->op==NAME && tree->tr1->class==EXTERN) tree->op = CALL1; cexpr(tree, regtab, reg); popstk(r); nstack =- nargs; if (table==efftab || table==regtab) return(0); r = 0; goto fixup;  operator is, * or the first match fails, try to match * with the table actually asked for. */ if (table!=cctab || c==INCAFT || c==DECAFT || (opt = match(tree, efftab, nreg-reg)) == 0) if ((opt=match(tree, table, nreg-reg))==0) return(-1); string = opt->tabstring; p1 = tree->tr1; p2 = 0; if (opdope[tree->op]&BINARY) p2 = tree->tr2; loop: /* * The 0200 bit asks for a tab. */ if ((c = *string++) & 0200) { c =& 0177; putchar('\t'); } switch (c) { case '\0': if (!isfloat(tree)) if (tree->op==DIVIDE || tree->op==ASDIV) reg--; return(reg); /* A1 */ case 'A': p = p1; goto adr; /* A2 */ case 'B': p = p2; goto adr; adr: c = 0; if (*string=='\'') { c = 1; string++; } else if (*string=='+') { c = 2; string++; } pname(p, c); goto loop; /* I */ case 'M': if ((c = *string)=='\'') string++; else c = 0; prins(tree->op, c, instab); goto loop; /* B1 */ case 'C': if ((opd&LEAF) != 0) p = tree; else p = p1; goto pwo kinds of optimization. * First, it observes that "x + (reg = y)" where actually * the = is any assignment op is better done as "reg=y; x+reg". * In this case rcexpr is called to do the first part and the * tree is modified so the name of the register * replaces the assignment. * Moreover, expressions like "reg = x+y" are best done as * "reg = x; reg =+ y" (so long as "reg" and "y" are not the same!). */ sreorder(treep, table, reg) struct tnode **treep; struct table *table; { register struct tnod| isfloat(tree) || tree->type==LONG) { rcexpr(tree, sptab, 0); retval = arlength(tree->type); } else { (*flagp)++; rcexpr(tree, lsptab, 0); retval = 0; } return(retval); } byte; /* BF */ case 'P': p = tree; goto pb1; /* B2 */ case 'D': p = p2; pbyte: if (p->type==CHAR) putchar('b'); pb1: if (isfloat(p)) putchar('f'); goto loop; /* BE */ case 'L': if (p1->type==CHAR || p2->type==CHAR) putchar('b'); p = tree; goto pb1; /* F */ case 'G': p = p1; flag = 01; goto subtre; /* S */ case 'K': p = p2; flag = 02; goto subtre; /* H */ case 'H': p = tree; flag = 04; subtre: ctable = regtab; c = *string++ - 'A'; if (*ste *p, *p1; p = *treep; if (opdope[p->op]&LEAF) return(0); if (p->op==PLUS) if (reorder(&p->tr2, table, reg)) *treep = p = optim(p); p1 = p->tr1; if (p->op==STAR || p->op==PLUS) { if (reorder(&p->tr1, table, reg)) *treep = p = optim(p); p1 = p->tr1; } if (p1->op==NAME) switch(p->op) { case ASLSH: case ASRSH: case ASSIGN: if (p1->class != REG || isfloat(p->tr2)) return(0); if (p->op==ASSIGN) switch (p->tr2->op) { case TIMES: case DIVIDE: if (!ispow2(p->tr2)) @ C F I L O P S V Y \ _ b e Q T W Z ] ` c f R U X [ ring=='!') { string++; c =| 020; /* force right register */ } if ((c&02)!=0) ctable = sptab; if ((c&04)!=0) ctable = cctab; if ((flag&01) && ctable==regtab && (c&01)==0 && (tree->op==DIVIDE||tree->op==MOD || tree->op==ASDIV||tree->op==ASMOD)) ctable = cregtab; if ((c&01)!=0) { p = p->tr1; if(collcon(p) && ctable!=sptab) { if (p->op==STAR) p = p->tr1; p = p->tr1; } } if (table==lsptab && ctable==sptab) ctable = lsptab; if (c&010) r = reg1;  break; p->tr2 = pow2(p->tr2); case PLUS: case MINUS: case AND: case NAND: case OR: case EXOR: case LSHIFT: case RSHIFT: p1 = p->tr2->tr2; if (xdcalc(p1) > 12 || p1->op==NAME &&(p1->nloc==p->tr1->nloc || p1->regno==p->tr1->nloc)) return(0); p1 = p->tr2; p->tr2 = p1->tr1; if (p1->tr1->op!=NAME || p1->tr1->class!=REG || p1->tr1->nloc!=p->tr1->nloc) rcexpr(p, efftab, reg); p->tr2 = p1->tr2; p->op = p1->op + ASPLUS - PL# /* * C compiler */ #include "c1h.c" max(a, b) { if (a>b) return(a); return(b); } degree(at) struct tnode *at; { register struct tnode *t, *t1; if ((t=at)==0 || t->op==0) return(0); if (t->op == CON) return(-3); if (t->op == AMPER) return(-2); if (t->op==ITOL && (t1 = isconstant(t)) && t1->value>= 0) return(-2); if ((opdope[t->op] & LEAF) != 0) { if (t->type==CHAR || t->type==FLOAT) return(1); return(0); } return(t->degree); } pname(ap, flag) struct tnode *ap; { register else if (opdope[p->op]&LEAF || p->degree < 2) r = reg; else r = areg; rreg = rcexpr(p, ctable, r); if (ctable!=regtab && ctable!=cregtab) goto loop; if (c&010) { if (c&020 && rreg!=reg1) printf("mov%c r%d,r%d\n", isfloat(tree),rreg,reg1); else reg1 = rreg; } else if (rreg!=reg) if ((c&020)==0 && oddreg(tree, 0)==0 && (flag&04 || flag&01 && xdcalc(p2, nreg-rreg-1) <= (opt->tabdeg2&077) || flag&02 && xdcalc(p1,nreg-rreg-1) <= (opt->taUS; *treep = p; return(1); } goto OK; case ASTIMES: case ASDIV: if (!ispow2(p)) return(0); case ASPLUS: case ASMINUS: case ASSAND: case ASSNAND: case ASOR: case ASXOR: case DECBEF: case INCBEF: OK: if (table==cctab||table==cregtab) reg =+ 020; rcexpr(optim(p), efftab, ~reg); *treep = p1; return(1); } return(0); } /* * Delay handles postfix ++ and -- * It observes that "x + y++" is better * treated as "x + y; y++". * If the operator is ++ or i; register struct tnode *p; p = ap; loop: switch(p->op) { case SFCON: case CON: printf("$"); psoct(p->value); return; case FCON: printf("L%d", p->value); return; case NAME: i = p->offset; if (flag==2) i =+ 2; if (i) { psoct(i); if (p->class!=OFFS) putchar('+'); if (p->class==REG) regerr(); } switch(p->class) { case SOFFS: case XOFFS: pbase(p); case OFFS: printf("(r%d)", p->regno); return; case EXTERN: case STATIC: pbase(p); retbdeg1&077))) { reg = rreg; reg1 = rreg+1; } else printf("mov%c\tr%d,r%d\n", isfloat(tree), rreg, reg); goto loop; /* R */ case 'I': r = reg; if (*string=='-') { string++; r--; } goto preg; /* R1 */ case 'J': r = reg1; preg: if (*string=='+') { string++; r++; } if (r>nreg) error("Register overflow: simplify expression"); printf("r%d", r); goto loop; case '-': /* check -(sp) */ if (*string=='(') { nstack++; if (table!=lsptab) pu -- itself, * it calls rcexpr to load the operand, letting * the calling instance of rcexpr to do the * ++ using efftab. * Otherwise it uses sdelay to search for inc/dec * among the operands. */ delay(treep, table, reg) struct tnode **treep; { register struct tnode *p, *p1; register r; p = *treep; if (table!=efftab && (p->op==INCAFT||p->op==DECAFT) && p->tr1->op==NAME) { return(1+rcexpr(p->tr1, table, reg)); } p1 = 0; if (opdope[p->op]&BINARY) p1 = sdelay(&p->tr2); if (p1==0) p1 = sdeurn; case REG: printf("r%d", p->nloc); return; } error("Compiler error: pname"); return; case AMPER: putchar('$'); p = p->tr1; if (p->op==NAME && p->class==REG) regerr(); goto loop; case AUTOI: printf("(r%d)%c", p->nloc, flag==1?0:'+'); return; case AUTOD: printf("%c(r%d)", flag==1?0:'-', p->nloc); return; case STAR: p = p->tr1; putchar('*'); goto loop; } error("pname called illegally"); } regerr() { error("Illegal use of register"); } pbase(ap) struct tchar('-'); goto loop; } break; case ')': /* check (sp)+ */ putchar(')'); if (*string=='+') nstack--; goto loop; /* #1 */ case '#': p = p1->tr1; goto nmbr; /* #2 */ case '"': p = p2->tr1; nmbr: if(collcon(p)) { if (p->op==STAR) { printf("*"); p = p->tr1; } if ((p = p->tr2)->op == CON) { if (p->value) psoct(p->value); } else if (p->op==AMPER) pname(p->tr1, 0); } goto loop; case 'T': /* "tst R" if 1st op not in cctab */ if (dcalc(p1,lay(&p->tr1); if (p1) { r = rcexpr(optim(p), table, reg); *treep = p1; return(r+1); } return(0); } sdelay(ap) struct tnode **ap; { register struct tnode *p, *p1; p = *ap; if ((p->op==INCAFT||p->op==DECAFT) && p->tr1->op==NAME) { *ap = ncopy(p->tr1); return(p); } if (p->op==STAR || p->op==PLUS) if (p1=sdelay(&p->tr1)) return(p1); if (p->op==PLUS) return(sdelay(&p->tr2)); return(0); } /* * Copy a tree node for a register variable. * Used by sdelay because if *reg-- is turned *tnode *ap; { register struct tnode *p; p = ap; if (p->class==SOFFS || p->class==STATIC) printf("L%d", p->nloc); else printf("_%.8s", &(p->nloc)); } xdcalc(ap, nrleft) struct tnode *ap; { register struct tnode *p; register d; p = ap; d = dcalc(p, nrleft); if (d<20 && p->type==CHAR) { if (nrleft>=1) d = 20; else d = 24; } return(d); } dcalc(ap, nrleft) struct tnode *ap; { register struct tnode *p, *p1; if ((p=ap)==0) return(0); switch (p->op) { case NAME: if (p->class==R 5)>12 && !match(p1, cctab, 10)) printf("tst r%d\n", reg); goto loop; case 'V': /* adc or sbc as required for longs */ switch(tree->op) { case PLUS: case ASPLUS: case INCBEF: case INCAFT: printf("adc"); break; case MINUS: case ASMINUS: case NEG: case DECBEF: case DECAFT: printf("sbc"); break; default: while ((c = *string++)!='\n' && c!='\0'); break; } goto loop; } putchar(c); goto loop; } /* * This routine just calls sreorder (below) * on the subtree into *reg; reg-- the *reg will in turn * be changed to some offset class, accidentally * modifying the reg--. */ ncopy(ap) struct tname *ap; { register struct tname *p; p = ap; if (p->class!=REG) return(p); return(block(3, NAME, p->type, p->elsize, p->tr1, p->offset, p->nloc)); } /* * If the tree can be immediately loaded into a register, * produce code to do so and return success. */ chkleaf(atree, table, reg) struct tnode *atree; { struct tnode lbuf; register struct tnode *tree; trEG) return(9); case AMPER: case FCON: case AUTOI: case AUTOD: return(12); case CON: case SFCON: if (p->value==0) return(4); if (p->value==1) return(5); if (p->value > 0) return(8); return(12); case STAR: p1 = p->tr1; if (p1->op==NAME||p1->op==CON||p1->op==AUTOI||p1->op==AUTOD) if (p->type!=LONG) return(12); } if (p->type==LONG) nrleft--; return(p->degree <= nrleft? 20: 24); } notcompat(ap, ast, op) struct tnode *ap; { register at, st; register struct tnode s and then on the tree itself. * It returns non-zero if anything changed. */ reorder(treep, table, reg) struct tnode **treep; struct table *table; { register r, r1; register struct tnode *p; p = *treep; if (opdope[p->op]&LEAF) return(0); r1 = 0; while(sreorder(&p->tr1, table, reg)) r1++; if (opdope[p->op]&BINARY) while(sreorder(&p->tr2, table, reg)) r1++; r = 0; while (sreorder(treep, table, reg)) r++; *treep = optim(*treep); return(r); } /* * Basically this routine carries out tee = atree; if (tree->op!=STAR && dcalc(tree, nreg-reg) > 12) return(-1); lbuf.op = LOAD; lbuf.type = tree->type; lbuf.degree = tree->degree; lbuf.tr1 = tree; return(rcexpr(&lbuf, table, reg)); } /* * Compile a function argument. * If the stack is currently empty, put it in (sp) * rather than -(sp); this will save a pop. * Return the number of bytes pushed, * for future popping. */ comarg(atree, flagp) int *flagp; { register struct tnode *tree; register retval; tree = atree; if (nstack |*p; p = ap; at = p->type; st = ast; if (st==0) /* word, byte */ return(at>CHAR && atINT && atop==NAME && p->class==REG && op==ASSIGN && st==CHAR) return(0); return(st != at); } prins(op, c, itable) struct instab *itable; { register struct instab *insp; register char *ip; for (insp=itable; insp->op != 0; insp++) { if (insp->op == op) { ip = c? insp->str2: insp->str1; if (ip==0) break; printf("%s", ip); return; } } error("No match' for op %d", op); } collcon(ap) struct tnode *ap; { register op; register struct tnode *p; p = ap; if (p->op==STAR) p = p->tr1; if (p->op==PLUS) { op = p->tr2->op; if (op==CON || op==AMPER) return(1); } return(0); } isfloat(at) struct tnode *at; { register struct tnode *t; t = at; if ((opdope[t->op]&RELAT)!=0) t = t->tr1; i for (i=0; (d=>>1)!=0; i++); tree->tr2->value = i; d = tree->op; tree->op = d==TIMES? LSHIFT: (d==DIVIDE? RSHIFT: (d==ASTIMES? ASLSH: ASRSH)); tree = optim(tree); } return(tree); } cbranch(atree, albl, cond, areg) struct tnode *atree; { int l1, op; register lbl, reg; register struct tnode *tree; lbl = albl; reg = areg; if ((tree=atree)==0) return; switch(tree->op) { case LOGAND: if (cond) { cbranch(tree->tr1, l1=isn++, 0, reg); cbranch(tree->tr2, lbl, 1, reg); lace; break; case NAME: t = getw(ascbuf); if (t==EXTERN) { t = getw(ascbuf); *sp = block(6, NAME, t, 0, EXTERN, 0, 0,0,0,0); outname(&(*sp)->nloc); sp++; break; } *sp = block(3, NAME, 0, 0, t, 0, 0); (*sp)->type = getw(ascbuf); (*sp)->nloc = getw(ascbuf); sp++; break; case CON: case SFCON: case FCON: t = getw(ascbuf); *sp++ = block(1, op, t, 0, getw(ascbuf)); break; case FSEL: t = getw(ascbuf); sp[-1] = block(2, op, t, 0, sp[-1], getw(ascbuf)); break; caf (t->type==FLOAT || t->type==DOUBLE) { nfloat = 1; return('f'); } return(0); } oddreg(t, areg) struct tnode *t; { register reg; reg = areg; if (!isfloat(t)) switch(t->op) { case DIVIDE: case MOD: case ASDIV: case ASMOD: reg++; case TIMES: case ASTIMES: return(reg|1); } return(reg); } arlength(t) { if (t>=PTR) return(2); switch(t) { case INT: case CHAR: return(2); case LONG: return(4); case FLOAT: case DOUBLE: return(8); } return(1024); } /* * Stringabel(l1); } else { cbranch(tree->tr1, lbl, 0, reg); cbranch(tree->tr2, lbl, 0, reg); } return; case LOGOR: if (cond) { cbranch(tree->tr1, lbl, 1, reg); cbranch(tree->tr2, lbl, 1, reg); } else { cbranch(tree->tr1, l1=isn++, 1, reg); cbranch(tree->tr2, lbl, 0, reg); label(l1); } return; case EXCLA: cbranch(tree->tr1, lbl, !cond, reg); return; case COMMA: rcexpr(tree->tr1, efftab, reg); tree = tree->tr2; break; } op = tree->op; if (tree->type==LONG || opdopse NULL: *sp++ = block(0, 0, 0, 0); break; case CBRANCH: t = getw(ascbuf); sp[-1] = block(1, CBRANCH, sp[-1], t, getw(ascbuf)); break; case LABEL: label(getw(ascbuf)); break; case NLABEL: printf("_%s:\n", outname(s)); break; case RLABEL: t = outname(s); printf("_%s:\n~~%s:\n", t, t); break; case BRANCH: branch(getw(ascbuf), 0); break; case SETREG: nreg = getw(ascbuf)-1; break; default: if (opdope[op]&BINARY) { if (sp < &expstack[1]) { error("Binary exprs for switch code. */ char dirsw[] {"\ cmp r0,$%o\n\ jhi L%d\n\ asl r0\n\ jmp *L%d(r0)\n\ .data\n\ L%d:\ " }; char simpsw[] {"\ mov $L%d,r1\n\ mov r0,L%d\n\ L%d:cmp r0,(r1)+\n\ jne L%d\n\ jmp *L%d-L%d(r1)\n\ .data\n\ L%d:\ "}; char hashsw[] {"\ mov r0,r1\n\ clr r0\n\ div $%o,r0\n\ asl r1\n\ add $L%d,r1\n\ mov r0,*(r1)+\n\ mov (r1)+,r1\n\ L%d:cmp r0,-(r1)\n\ jne L%d\n\ jmp *L%d-L%d(r1)\n\ .data\n\ L%d:\ "}; pswitch(afp, alp, deflab) struct swtab *afp, *alp; { int tlab, ncase, i, j, tabs, worst, best, re[op]&RELAT&&tree->tr1->type==LONG) { if (tree->type!=LONG) { tree->op = MINUS; tree->type = LONG; tree = optim(tree); } else op = NEQUAL; rcexpr(tree, regtab, 0); printf("ashc $0,r0\n"); branch(lbl, op, !cond); return; } rcexpr(tree, cctab, reg); op = tree->op; if ((opdope[op]&RELAT)==0) op = NEQUAL; else { l1 = tree->tr2->op; if ((l1==CON || l1==SFCON) && tree->tr2->value==0) op =+ 200; /* special for ptr tests */ else op = maprel[op-EQUAL]; } if (isfloat(treession botch"); exit(1); } t = *--sp; *sp++ = block(2, op, getw(ascbuf), 0, *--sp, t); } else { sp[-1] = block(1, op, getw(ascbuf), 0, sp[-1]); } break; } } } outname(s) { register char *p, c; register n; p = s; n = 0; while (c = getc(ascbuf)) { *p++ = c; n++; } while (n++ < 8) *p++ = 0; return(s); } seq(c) { register o; if (getw(ascbuf) == 0) return; for (;;) { printf("%o", getw(ascbuf)); if ((o = getw(ascbuf)) != 1) break; printf("%c", c); } printfange; register struct swtab *swp, *fp, *lp; int poctab[swsiz]; fp = afp; lp = alp; if (fp==lp) { printf("jbr L%d\n", deflab); return; } tlab = isn++; if (sort(fp, lp)) return; ncase = lp-fp; lp--; range = lp->swval - fp->swval; /* direct switch */ if (range>0 && range <= 3*ncase) { if (fp->swval) printf("sub $%o,r0\n", fp->swval); printf(dirsw, range, deflab, isn, isn); isn++; for (i=fp->swval; i<=lp->swval; i++) { if (i==fp->swval) { printf("L%d\n", fp->swlab); fp+e)) printf("cfcc\n"); branch(lbl, op, !cond); } branch(lbl, aop, c) { register op; if(op=aop) prins(op, c, branchtab); else printf("jbr"); printf("\tL%d\n", lbl); } label(l) { printf("L%d:", l); } popstk(a) { switch(a) { case 0: return; case 2: printf("tst (sp)+\n"); return; case 4: printf("cmp (sp)+,(sp)+\n"); return; } printf("add $%o,sp\n", a); } error(s, p1, p2, p3, p4, p5, p6) { register f; extern fout; nerror++; flush(); f = fout; fout = 1; printf("%d: ", li("\n"); } +; } else printf("L%d\n", deflab); } goto esw; } /* simple switch */ if (ncase<8) { i = isn++; j = isn++; printf(simpsw, i, j, isn, isn, j, i, i); isn++; for (; fp<=lp; fp++) printf("%o\n", fp->swval); printf("L%d:..\n", j); for (fp = afp; fp<=lp; fp++) printf("L%d\n", fp->swlab); printf("L%d\n", deflab); goto esw; } /* hash switch */ best = 077777; for (i=ncase/4; i<=ncase/2; i++) { for (j=0; j= &expstack[20]) error("Stack botch"); op = getw(ascbuf); if ((op&0177400) a d g h k n q t w z } i l o r u x { ~ j m p s v em(0, swp->swval, i)]++; worst = 0; for (j=0; jworst) worst = poctab[j]; if (i*worst < best) { tabs = i; best = i*worst; } } i = isn++; printf(hashsw, tabs, isn, i, i, isn+tabs+1, isn+1, isn); isn++; for (i=0; i<=tabs; i++) printf("L%d\n", isn+i); for (i=0; iswval, tabs) == i) printf("%o\n", ldiv(0, swp->swval, tabs)); } printf("L%d:", isn++); for (i=0; iop)==0) return(tree); if (op==NAME && tree->class==AUTO) { tree->class = OFFS; tree->regno = 5; tree->offset = tree->nloc; } dope = opdope[op]; if ((dope&LEAF) != 0) return(tree); if ((dope&BINARY) == 0) return(unoptim(tree)); /* is known to be biabs; i++) { printf("L%d\n", deflab); for (swp=fp; swp<=lp; swp++) if (lrem(0, swp->swval, tabs) == i) printf("L%d\n", swp->swlab); } esw: printf(".text\n"); } sort(afp, alp) struct swtab *afp, *alp; { register struct swtab *cp, *fp, *lp; int intch, t; fp = afp; lp = alp; while (fp < --lp) { intch = 0; for (cp=fp; cpswval == cp[1].swval) { error("Duplicate case (%d)", cp->swval); return(1); } if (cp->swval > cp[1].swval) { intch++; t = cp-)); break; case SSPACE: printf(".=.+%o\n", getw(ascbuf)); break; case EVEN: printf(".even\n"); break; case SAVE: printf("jsr r5,csv\n"); t = getw(ascbuf)-6; if (t==2) printf("tst -(sp)\n"); else if (t > 2) printf("sub $%o,sp\n", t); break; case PROFIL: t = getw(ascbuf); printf("mov $L%d,r0\njsr pc,mcount\n", t); printf(".bss\nL%d:.=.+2\n.text\n", t); break; case SNAME: t = outname(s); printf("~%s=L%d\n", t, getw(ascbuf)); break; case ANAME: t = outname(snary */ if (tree->type==CHAR) tree->type = INT; if ((dope&COMMUTE)!=0) { acomm: d1 = tree->type; tree = acommute(tree); tree->type = d1; /* * PDP-11 special: * replace a&b by a NAND ~ b. * This will be undone when in * truth-value context. */ if (tree->op!=AND) return(tree); tree->op = NAND; tree->tr2 = block(1, COMPL, tree->tr2->type, 0, tree->tr2); } again: tree->tr1 = optim(tree->tr1); tree->tr2 = optim(tree->tr2); if ((dope&RELAT) != 0) { if ((d1=degree(tree->swval; cp->swval = cp[1].swval; cp[1].swval = t; t = cp->swlab; cp->swlab = cp[1].swlab; cp[1].swlab = t; } } if (intch==0) break; } return(0); } ispow2(atree) { register int d; register struct tnode *tree; tree = atree; if (!isfloat(tree) && tree->tr2->op==CON) { d = tree->tr2->value; if (d>1 && (d&(d-1))==0) return(d); } return(0); } pow2(atree) struct tnode *atree; { register int d, i; register struct tnode *tree; tree = atree; if (d = ispow2(tree)) {); printf("~%s=%o\n", t, getw(ascbuf)); break; case RNAME: t = outname(s); printf("~%s=r%d\n", t, getw(ascbuf)); break; case SWIT: t = getw(ascbuf); line = getw(ascbuf); swp = treespace; while (swp->swlab = getw(ascbuf)) { swp->swval = getw(ascbuf); swp++; } pswitch(treespace, swp, t); break; case EXPR: line = getw(ascbuf); if (sp != &expstack[1]) { error("Expression input botch\n"); exit(1); } nstack = 0; rcexpr(optim(*--sp), efftab, 0); spacep = treesp>tr1)) < (d2=degree(tree->tr2)) || d1==d2 && tree->tr1->op==NAME && tree->tr2->op!=NAME) { t = tree->tr1; tree->tr1 = tree->tr2; tree->tr2 = t; tree->op = maprel[op-EQUAL]; } if (tree->tr1->type==CHAR && tree->tr2->op==CON && (dcalc(tree->tr1) <= 12 || tree->tr1->op==STAR) && tree->tr2->value <= 127 && tree->tr2->value >= 0) tree->tr2->type = CHAR; } d1 = max(degree(tree->tr1), islong(tree->type)); d2 = max(degree(tree->tr2), 0); if (tree->tr1->type==LONG && dope&RELAT) d1 = 10; switch (op) { case LTIMES: case LDIV: case LMOD: case LASTIMES: case LASDIV: case LASMOD: tree->degree = 10; break; /* * PDP-11 special: * generate new =&~ operator out of =& * by complementing the RHS. */ case ASSAND: op = ASSNAND; tree->op = op; tree->tr2 = block(2, COMPL, tree->tr2->type, 0, tree->tr2); goto again; case NAND: if (isconstant(tree->tr2) && tree->tr2->value==0) return(tree->tr1); goto def; case CALL: tree->degree = 10; break; case QUEST: &fv; p++; if (*p++==0 && *p++==0 && *p++==0) { subtre->type = DOUBLE; subtre->value = fv.integer; subtre->op = SFCON; return(subtre); } break; } tree->degree = max(islong(tree->type), degree(subtre)); return(tree); } struct acl { int nextl; int nextn; struct tnode *nlist[20]; struct tnode *llist[21]; }; acommute(atree) { struct acl acl; int d, i, op, flt; register struct tnode *t1, **t2, *tree; struct tnode *t; acl.nextl = 0; acl.nextn = 0; tree = atree; op = tree->op;MOD: if (v==0) error("Divide check"); else if (op==DIVIDE) *vp =/ v; else *vp =% v; return; case RSHIFT: *vp =>> v; return; case LSHIFT: *vp =<< v; return; case NAND: *vp =& ~ v; return; } error("C error: const"); } insert(op, atree, alist) struct acl *alist; { register d; register struct acl *list; register struct tnode *tree; int d1, i; struct tnode *t; tree = atree; list = alist; if (tree->op == op) { ins: list->nlist[list->nextn++] = tree; insert(o case COLON: tree->degree = max(d1, d2); break; case MINUS: if (t = isconstant(tree->tr2)) { tree->op = PLUS; if (t->type==DOUBLE) /* PDP-11 FP representation */ t->value =^ 0100000; else t->value = -t->value; goto acomm; } goto def; case DIVIDE: case ASDIV: case ASTIMES: if (tree->tr2->op==CON && tree->tr2->value==1) return(tree->tr1); if (ispow2(tree) == 0) { case MOD: case ASMOD: d1 =+ 2; d2 =+ 2; } if (tree->type==LONG) return(hardlongs(t flt = isfloat(tree); insert(op, tree, &acl); acl.nextl--; t2 = &acl.llist[acl.nextl]; if (!flt) { /* put constants together */ for (i=acl.nextl;i>0&&t2[0]->op==CON&&t2[-1]->op==CON;i--) { acl.nextl--; t2--; const(op, &t2[0]->value, t2[1]->value); } } if (op==PLUS || op==OR) { /* toss out "+0" */ if (acl.nextl>0 && (t1 = isconstant(*t2)) && t1->value==0) { acl.nextl--; t2--; } if (acl.nextl <= 0) return(*t2); /* subsume constant in "&x+c" */ if (op==PLUS && t2[0]->p, tree->tr1, list); insert(op, tree->tr2, list); return; } tree = optim(tree); if (tree->op == op) goto ins; if (!isfloat(tree)) { /* c1*(x+c2) -> c1*x+c1*c2 */ if ((tree->op==TIMES||tree->op==LSHIFT) && tree->tr2->op==CON && tree->tr2->value>0 && tree->tr1->op==PLUS && tree->tr1->tr2->op==CON) { d = tree->tr2->value; if (tree->op==TIMES) tree->tr2->value =* tree->tr1->tr2->value; else tree->tr2->value = tree->tr1->tr2->value << d; tree->tr1->tr2->value = d; treree)); goto constant; case LSHIFT: case RSHIFT: case ASRSH: case ASLSH: if (tree->tr2->op==CON && tree->tr2->value==0) return(tree->tr1); /* * PDP-11 special: turn right shifts into negative * left shifts */ if (op==LSHIFT||op==ASLSH) goto constant; if (tree->tr2->op==CON && tree->tr2->value==1) goto constant; op =+ (LSHIFT-RSHIFT); tree->op = op; tree->tr2 = block(1, NEG, tree->type, 0, tree->tr2); goto again; constant: if (tree->tr1->op==CON && tree->tr2->op==Cop==CON && t2[-1]->op==AMPER) { t2--; t2[0]->tr1->offset =+ t2[1]->value; acl.nextl--; } } else if (op==TIMES || op==AND) { t1 = acl.llist[acl.nextl]; if (t1->op==CON) { if (t1->value==0) return(t1); if (op==TIMES && t1->value==1 && acl.nextl>0) if (--acl.nextl <= 0) return(acl.llist[0]); } } if (op==PLUS && !flt) distrib(&acl); tree = *(t2 = &acl.llist[0]); d = max(degree(tree), islong(tree->type)); if (op==TIMES && !flt) d++; for (i=0; itr1->op = tree->op; tree->op = PLUS; if (op==PLUS) goto ins; } } d = degree(tree); for (i=0; inextl; i++) { if ((d1=degree(list->llist[i]))llist[i]; list->llist[i] = tree; tree = t; d = d1; } } list->llist[list->nextl++] = tree; } block(an, args) { register int *p; int *oldp; register *argp, n; oldp = p = spacep; n = an+3; argp = &args; do *p++ = *argp++; while (--n); if (p >= &treespace[ossiz]) { error("Exp. ov. pass 2"); exit(1); ON) { const(op, &tree->tr1->value, tree->tr2->value); return(tree->tr1); } def: default: tree->degree = d1==d2? d1+islong(tree->type): max(d1, d2); break; } return(tree); } unoptim(atree) struct tnode *atree; { register struct tnode *subtre, *tree; register int *p; double static fv; struct { int integer; }; if ((tree=atree)==0) return(0); if (tree->op==CBRANCH) { tree->btree = optim(tree->btree); return(tree); } subtre = tree->tr1 = optim(tree->tr1); switch (tree->op) { 1 = acl.nlist[i]; t1->tr2 = t = *++t2; t1->degree = d = d==degree(t)? d+islong(t1->type): max(d, degree(t)); t1->tr1 = tree; tree = t1; if (tree->type==LONG) { if (tree->op==TIMES) tree = hardlongs(tree); else if (tree->op==PLUS && (t = isconstant(tree->tr1)) && t->value < 0) { tree->op = MINUS; t->value = - t->value; t = tree->tr1; tree->tr1 = tree->tr2; tree->tr2 = t; } } } if (tree->op==TIMES && ispow2(tree)) tree->degree = max(degree(tree->tr1), } spacep = p; return(oldp); } islong(t) { if (t==LONG) return(2); return(1); } isconstant(at) struct tnode *at; { register struct tnode *t; t = at; if (t->op==CON || t->op==SFCON) return(t); if (t->op==ITOL && t->tr1->op==CON) return(t->tr1); return(0); } hardlongs(at) struct tnode *at; { register struct tnode *t; t = at; switch(t->op) { case TIMES: case DIVIDE: case MOD: t->op =+ LTIMES-TIMES; break; case ASTIMES: case ASDIV: case ASMOD: t->op =+ LASTIMES-ASTIMES; t-case FSEL: tree->tr1 = block(2, RSHIFT, INT, 0, subtre, block(1, CON, INT, 0, tree->bitoffs)); tree->op = AND; tree->type = INT; tree->tr2 = block(1, CON, INT, 0, (1<flen)-1); return(optim(tree)); case AMPER: if (subtre->op==STAR) return(subtre->tr1); if (subtre->op==NAME && subtre->class == OFFS) { p = block(2, PLUS, tree->type, 1, subtre, tree); subtre->type = tree->type; tree->op = CON; tree->type = INT; tree->degree = 0; tree->value = subtre->offset;  islong(tree->type)); return(tree); } distrib(list) struct acl *list; { /* * Find a list member of the form c1c2*x such * that c1c2 divides no other such constant, is divided by * at least one other (say in the form c1*y), and which has * fewest divisors. Reduce this pair to c1*(y+c2*x) * and iterate until no reductions occur. */ register struct tnode **p1, **p2; struct tnode *t; int ndmaj, ndmin; struct tnode **dividend, **divisor; struct tnode **maxnod, **mindiv; loop: maxnod = &list->l>tr1 = block(1, AMPER, LONG+PTR, 0, t->tr1); break; default: return(t); } return(optim(t)); } subtre->class = REG; subtre->nloc = subtre->regno; subtre->offset = 0; return(p); } break; case STAR: if (subtre->op==AMPER) return(subtre->tr1); if (subtre->op==NAME && subtre->class==REG) { subtre->type = tree->type; subtre->class = OFFS; subtre->regno = subtre->nloc; return(subtre); } p = subtre->tr1; if ((subtre->op==INCAFT||subtre->op==DECBEF)&&tree->type!=LONG && p->op==NAME && p->class==REG && p->type==subtre->type) { p->type = tree->type; p->op = subtlist[list->nextl]; ndmaj = 1000; dividend = 0; for (p1 = list->llist; p1 <= maxnod; p1++) { if ((*p1)->op!=TIMES || (*p1)->tr2->op!=CON) continue; ndmin = 0; for (p2 = list->llist; p2 <= maxnod; p2++) { if (p1==p2 || (*p2)->op!=TIMES || (*p2)->tr2->op!=CON) continue; if ((*p1)->tr2->value == (*p2)->tr2->value) { (*p2)->tr2 = (*p1)->tr1; (*p2)->op = PLUS; (*p1)->tr1 = (*p2); *p1 = optim(*p1); squash(p2, maxnod); list->nextl--; goto loop; } if (((*p2)->tint opdope[] { 000000, /* EOF */ 000000, /* ; */ 000000, /* { */ 000000, /* } */ 036000, /* [ */ 002000, /* ] */ 036000, /* ( */ 002000, /* ) */ 014201, /* : */ 007001, /* , */ 000000, /* field selection */ 000000, /* 11 */ 000000, /* 12 */ 000000, /* 13 */ 000000, /* 14 */ 000000, /* 15 */ 000000, /* 16 */ 000000, /* 17 */ 000000, /* 18 */ 000000, /* 19 */ 000400, /* name */ 000400, /* short constant */ 000400, /* string */ 000400, /* float */ 000400, /* double */ 000000, /* 25 */re->op==INCAFT? AUTOI: AUTOD; return(p); } if (subtre->op==PLUS && p->op==NAME && p->class==REG) { if (subtre->tr2->op==CON) { p->offset =+ subtre->tr2->value; p->class = OFFS; p->type = tree->type; p->regno = p->nloc; return(p); } if (subtre->tr2->op==AMPER) { subtre = subtre->tr2->tr1; subtre->class =+ XOFFS-EXTERN; subtre->regno = p->nloc; subtre->type = tree->type; return(subtre); } } break; case EXCLA: if ((opdope[subtre->op]&RELAT)==0) r2->value % (*p1)->tr2->value) == 0) goto contmaj; if (((*p1)->tr2->value % (*p2)->tr2->value) == 0) { ndmin++; mindiv = p2; } } if (ndmin > 0 && ndmin < ndmaj) { ndmaj = ndmin; dividend = p1; divisor = mindiv; } contmaj:; } if (dividend==0) return; t = list->nlist[--list->nextn]; p1 = dividend; p2 = divisor; t->op = PLUS; t->type = (*p1)->type; t->tr1 = (*p1); t->tr2 = (*p2)->tr1; (*p1)->tr2->value =/ (*p2)->tr2->value; (*p2)->tr1 = t; t = optim(*p2); if  000000, /* 26 */ 000400, /* autoi, *r++ */ 000400, /* autod, *--r */ 000000, /* 29 */ 034203, /* ++pre */ 034203, /* --pre */ 034203, /* ++post */ 034203, /* --post */ 034220, /* !un */ 034202, /* &un */ 034220, /* *un */ 034200, /* -un */ 034220, /* ~un */ 036001, /* . (structure reference) */ 030101, /* + */ 030001, /* - */ 032101, /* * */ 032001, /* / */ 032001, /* % */ 026061, /* >> */ 026061, /* << */ 020161, /* & */ 016161, /* | */ 016161, /* ^ */ 036001, /* -> */ 001000, /* break; tree = subtre; tree->op = notrel[tree->op-EQUAL]; break; case NEG: case COMPL: if (tree->type==CHAR) tree->type = INT; if (tree->op == subtre->op) return(subtre->tr1); if (subtre->op==ITOL) { subtre->op = tree->op; subtre->type = INT; tree->op = ITOL; } } if (subtre->op == CON) switch(tree->op) { case NEG: subtre->value = -subtre->value; return(subtre); case COMPL: subtre->value = ~subtre->value; return(subtre); case ITOF: fv = subtre->value; p =(p1 < p2) { *p1 = t; squash(p2, maxnod); } else { *p2 = t; squash(p1, maxnod); } list->nextl--; goto loop; } squash(p, maxp) struct tnode **p, **maxp; { register struct tnode **np; for (np = p; np < maxp; np++) *np = *(np+1); } const(op, vp, av) int *vp; { register int v; v = av; switch (op) { case PLUS: *vp =+ v; return; case TIMES: *vp =* v; return; case AND: *vp =& v; return; case OR: *vp =| v; return; case EXOR: *vp =^ v; return; case DIVIDE: case  int -> double */ 001000, /* double -> int */ 000001, /* && */ 000001, /* || */ 030001, /* &~ */ 001000, /* double -> long */ 001000, /* long -> double */ 001000, /* integer -> long */ 001000, /* long -> integer */ 022005, /* == */ 022005, /* != */ 024005, /* <= */ 024005, /* < */ 024005, /* >= */ 024005, /* > */ 024005, /*

        p */ 024005, /* >=p */ 012213, /* =+ */ 012213, /* =- */ 012213, /* =* */ 012213, /* =/ */ 012213, /* =% */ 012253, /* =>> */  012253, /* =<< */ 012253, /* =& */ 012253, /* =| */ 012253, /* =^ */ 012213, /* = */ 030001, /* & for tests */ 032101, /* * (long) */ 032001, /* / (long) */ 032001, /* % (long) */ 012253, /* =& ~ */ 012213, /* =* (long) */ 012213, /* / (long) */ 012213, /* % (long) */ 000000, /* 89 */ 014201, /* ? */ 026061, /* long << */ 012253, /* long =<< */ 000000, /* 93 */ 000000, /* 94 */ 000000, /* 95 */ 000000, /* 96 */ 000000, /* 97 */ 000000, /* 98 */ 000000, /* 99 */ 036001, /* call */ ; a subroutine * of getkeywords. */ strdec(tkwp, mosf) int *tkwp; { register elsize, o; register struct hshtab *ssym; int savebits; struct hshtab *ds; mosflg = 1; ssym = 0; if ((o=symbol())==NAME) { ssym = csym; if (ssym->hclass==0) { ssym->hclass = STRTAG; ssym->lenp = dimp; chkdim(); dimtab[dimp++] = 0; } if (ssym->hclass != STRTAG) redec(); mosflg = mosf; o = symbol(); } mosflg = 0; if (o != LBRACE) { if (ssym==0) { syntax: decsyn(o); return(0); } if m = ds; xdflg++; } else if ((o=symbol()) != RPARN) goto syntax; type = type<ssp&0377; ohclass!=STRTAG) error("Bad structure name"); if ((elsize = dimtab[ssym->lenp&0377])==0) { *tkwp = RSTRUCT; elsize = ssym; } peeksym = o; } else { ds = defsym; mosflg = 0; savebits = bitoffs; bitoffs = 0; elsize = declist(MOS); bitoffs = savebits; defsym = ds; if ((o = symbol()) != RBRACE) goto syntax; if (ssym) { if (dimtab[ssym->lenp&0377]) error("%.8s redeclared", ssym->name); dimtab[ssym->lenp&0377] = elsize; } } return(elsize); } /* * Check tha /* * Enforce alignment restrictions in structures, * including bit-field considerations. */ align(type, offset, aflen) { register a, t, flen; char *ftl; flen = aflen; a = offset; t = type; ftl = "Field too long"; if (flen==0 && bitoffs) { a =+ (bitoffs-1) / NBPC; bitoffs = 0; } while ((t&XTYPE)==ARRAY) t = decref(t); if (t!=CHAR) { a = (a+ALIGN) & ~ALIGN; if (a>offset) bitoffs = 0; } if (flen) { if (type==INT) { if (flen > NBPW) error(ftl); if (flen+bitoffs > NBPW)"-", "*", "/", "%", ">>", "<<", "&", "|", "^", "->", "int->double", "double->int", "&&", "||", "&~", "double->long", "long->double", "integer->long", "long->integer", "==", "!=", "<=", "<", ">=", ">", "p", ">=p", "=+", "=-", "=*", "=/", "=%", "=>>", "=<<", "=&", "=|", "=^", "=", "& for tests", "*", "/", "%", "=& ~", "=*", "=/", "=%", 0, "?", "<<", "=<<", 0, 0, 0, 0, 0, "call", "call", "call", 0, "goto", "jump cond", "branch cond", t the dimension table has not overflowed */ chkdim() { if (dimp >= dimsiz) { error("Dimension/struct table overflow"); exit(1); } } /* * Process a comma-separated list of declarators */ declare(askw, tkw, offset, elsize) { register int o; register int skw; skw = askw; do { offset =+ decl1(skw, tkw, offset, elsize); } while ((o=symbol()) == COMMA); if (o==SEMI || o==RPARN && skw==ARG1) return(offset); decsyn(o); } /* * Process a single declarator */ decl1(askw, tkw, offset, elsize) { { bitoffs = 0; a =+ NCPW; } } else if (type==CHAR) { if (flen > NBPC) error(ftl); if (flen+bitoffs > NCPW) { bitoffs = 0; a =+ 1; } } else error("Bad type for field"); } return(a-offset); } /* * Complain about syntax error in declaration */ decsyn(o) { error("Declaration syntax"); errflush(o); } /* * Complain about a redeclaration */ redec() { error("%.8s redeclared", defsym->name); }  "set nregs", "load value", 0, 0, 0, "force register" };  int t1, chkoff, a; register int type, skw; register struct hshtab *dsym; skw = askw; chkoff = 0; mosflg = skw==MOS; if ((peeksym=symbol())==SEMI || peeksym==RPARN) return(0); /* * Filler field */ if (peeksym==COLON && skw==MOS) { peeksym = -1; t1 = conexp(); elsize = align(tkw, offset, t1); bitoffs =+ t1; return(elsize); } if ((t1=getype()) < 0) goto syntax; type = 0; do type = type<>TYLEN) & XTYPE)!=0); type =| tkw; dsym = defsym; i#include "sno.h" /* * sno3 */ bextend(str, last) struct node *str, *last; { register struct node *a, *s; register int b; int c, d; s = str; if ((c = s->p1) == 0) goto bad; b = d = 0; a = s->p2; if(a == 0) { a = c; goto eb2; } eb1: if (a == last) goto bad; a = a->p1; eb2: d++; c = class(a->ch); if (c == 1) { /* rp */ if (b == 0) goto bad; b--; goto eb3; } if (c == 2) { /* lp */ b++; goto eb1; } eb3: if (b == 0) { s->p2= a; return(d); } goto eb1; bad: return f (!(dsym->hclass==0 || (skw==ARG && dsym->hclass==ARG1) || (skw==EXTERN && dsym->hclass==EXTERN && dsym->htype==type))) if (skw==MOS && dsym->hclass==MOS && dsym->htype==type) chkoff = 1; else { redec(); goto syntax; } dsym->htype = type; if (skw) dsym->hclass = skw; if (skw==ARG1) { if (paraml==0) paraml = dsym; else parame->hoffset = dsym; parame = dsym; } if (elsize && ((type&TYPE)==RSTRUCT || (type&TYPE)==STRUCT)) { dsym->lenp = dimp; chkdim(); dimtab[dim(0); } ubextend(str, last) struct node *str, *last; { register struct node *a, *b, *s; s = str; a = s->p1; if(a == 0) goto bad; b = s->p2; if(b == 0) goto good; if (b == last) goto bad; a = b->p1; good: s->p2 = a; return(1); bad: return(0); } search(arg, r) struct node *arg, *r; { struct node *list, *back, *str, *etc, *next, *last, *base, *e; register struct node *a, *b, *var; int c, d; a = arg->p2; list = base = alloc(); last = next = 0; goto badv1; badvanc: a = a->p1; if (a# /* * C compiler, phase 1 * * * Handles processing of declarations, * except for top-level processing of * externals. */ #include "c0h.c" /* * Process a sequence of declaration statements */ declist(sclass) { register sc, elsize, offset; int type; offset = 0; sc = sclass; while ((elsize = getkeywords(&sclass, &type)) != -1) { offset = declare(sclass, type, offset, elsize); sclass = sc; } return(offset+align(INT, offset, 0)); } /* * Read the keywords introducing a declaration statemp++] = elsize; } elsize = 0; if (skw==MOS) { elsize = length(dsym); t1 = 0; if ((peeksym = symbol())==COLON) { elsize = 0; peeksym = -1; t1 = conexp(); dsym->hflag =| FFIELD; } a = align(type, offset, t1); elsize =+ a; offset =+ a; if (t1) { if (chkoff && (dsym->bitoffs!=bitoffs || dsym->flen!=t1)) redec(); dsym->bitoffs = bitoffs; dsym->flen = t1; bitoffs =+ t1; } if (chkoff && dsym->hoffset != offset) redec(); dsym->hoffset = offset; } if ((ds->typ == 0) { list->p1 = 0; if (rfail == 1) { a = 0; goto fail; } list = base; if (r == 0) next = last = 0; else { next = r->p1; last = r->p2; } goto adv1; } b = alloc(); list->p1 = b; list = b; badv1: list->p2 = back = alloc(); back->p1 = last; b = a->p2; c = a->typ; list->typ = c; if (c < 2) { back->p2 = eval(b, 1); goto badvanc; } last = list; str = alloc(); etc = alloc(); back->p2 = var = alloc(); var->typ = b->typ; var->p1 = str; var->p2 = etc; e = b-ent */ getkeywords(scptr, tptr) int *scptr, *tptr; { register skw, tkw, longf; int o, elsize, isadecl, ismos; isadecl = 0; longf = 0; tkw = -1; skw = *scptr; elsize = 0; ismos = skw==MOS; for (;;) { mosflg = ismos; switch ((o=symbol())==KEYW? cval: -1) { case AUTO: case STATIC: case EXTERN: case REG: if (skw && skw!=cval) error("Conflict in storage class"); skw = cval; break; case LONG: longf++; break; case STRUCT: o = STRUCT; elsize = strdec(&o, ismosym->htype&XTYPE)==FUNC) { if (dsym->hclass!=EXTERN && dsym->hclass!=AUTO) error("Bad function"); dsym->hclass = EXTERN; } if (dsym->hclass==AUTO) { autolen =+ rlength(dsym); dsym->hoffset = -autolen; } else if (dsym->hclass==STATIC) { dsym->hoffset = isn; outcode("BBNBNB", BSS, LABEL, isn++, SSPACE, rlength(dsym), PROG); } else if (dsym->hclass==REG) { if ((type&TYPE)>CHAR && (type&XTYPE)==0 || (type&XTYPE)>PTR || regvar<3) error("Bad register %o", type); dsym->hoffset = ->p1; if (e == 0) etc->p1 = 0; else etc->p1 = eval(e, 0); e = b->p2; if (e == 0) etc->p2 = 0; else { e = eval(e, 1); etc->p2 = strbin(e); delete(e); } goto badvanc; retard: a = back->p1; if (a == 0) { rfail = 1; goto fail; } list = a; back = list->p2; var = back->p2; str = var->p1; etc = var->p2; if (etc->p2) goto retard; if (var->typ == 1) { if (bextend(str, last) == 0) goto retard; goto adv0; } if (ubextend(str, last) == 0) goto retard; adv0: a = str->p2; adv01); cval = o; case INT: case CHAR: case FLOAT: case DOUBLE: if (tkw>=0) error("Type clash"); tkw = cval; break; default: peeksym = o; if (isadecl==0) return(-1); if (tkw<0) tkw = INT; if (skw==0) skw = AUTO; if (longf) { if (tkw==FLOAT) tkw = DOUBLE; else if (tkw==INT) tkw = LONG; else error("Misplaced 'long'"); } *scptr = skw; *tptr = tkw; return(elsize); } isadecl++; } } /* * Process a structure declaration-regvar; } syntax: return(elsize); } /* * Read a declarator and get the implied type */ getype() { register int o, type; register struct hshtab *ds; switch(o=symbol()) { case TIMES: return(getype()<ssp = dimp; getf: switch(o=symbol()) { case LPARN: if (xdflg) { xdflg = 0; ds = defsym; declare(ARG1, 0, 0, 0); defsy: if (a == last) next = 0; else next = a->p1; advanc: a = list->p1; if (a == 0) { a = alloc(); if (r == 0) { a->p1 = a->p2 = 0; goto fail; } b = r->p1; a->p1 = b; if (next == 0) { a->p2 = r->p2; goto fail; } while(1) { e = b->p1; if (e == next) { a->p2 = b; goto fail; } b = e; } } list = a; adv1: back = list->p2; var = back->p2; d = list->typ; if(d < 2) { if (var == 0) goto advanc; if (next == 0) goto retard; a = next; b = var->p1; e = var->p2; while(1) { if (a->ch != b->ch) goto retard; if (b == e) goto adv01; if (a == last) goto retard; a = a->p1; b = b->p1; } } str = var->p1; etc = var->p2; str->p1 = next; str->p2 = 0; c = etc->p2; if (var->typ == 1) { d = bextend(str, last); if (d == 0) goto retard; if (c == 0) goto adv0; while(1) { c =- d; if (c == 0) goto adv0; if (c < 0) goto retard; d = bextend(str, last); if (d == 0) goto retard; } } if (c =se do a fail return fail: inc failc bit $1,x(f) bne fret jsr pc,iget mov r0,x(f) bic $1,r0 cmp r0,$alt beq salt cmp r0,$salt bne fret alt: tst (i)+ br succ salt: jsr pc,iget mov r0,i br contin goto: br salt / do a success return / bundle translations delivered to this rule, / pop stack frame / restore interpreted instruction counter (i) / update input cursor (j) for invoking rule / update high water mark (k) in ktable / if there was a translation delivered, add to stack frame / clear tsr pc,gcontin br generate / tmg output routines/ and iget f = r5 i = r3 .globl env,si .globl errcom .globl cfile,lfile .globl putch,obuild,iget,flush .globl outb,outt,outw .globl start / adds 1 or 2 characters in r0 to output putch: clr -(sp) mov r0,-(sp) mov sp,r0 jsr pc,obuild add $4,sp rts pc / r0 points to string to put out on current output file (cfile) / string terminated by 0 / if last file differed from current file, flush output buffer first / in any case flush output buffer when its wr= 0) { if(d==3 & next!=0) { str->p2 = last; goto adv0; } goto advanc; } while(c--) if (ubextend(str, last) == 0) goto retard; goto adv0; fail: list = base; goto f1; fadv: free(back); b = list->p1; free(list); if (b == 0) return(a); list = b; f1: back = list->p2; var = back->p2; if (list->typ < 2) { delete(var); goto fadv; } str = var->p1; etc = var->p2; if (a != 0 & etc->p1 != 0) { if (str->p2 == 0) { free(str); str = 0; } assign(etc->p1, copy(str)); } he fail flag sret: mov f,r0 add $g1,r0 jsr pc,pbundle mov f,g mov (f),f mov si(f),i mov j(g),j(f) mov k(g),k(f) tst r0 beq 1f mov r0,(g)+ 1: clf rts pc / do a fail return / pop stack / do not update j or k / restore interpreted instruction counter fret: mov f,g mov (f),f mov si(f),i sef rts pc / diag and parse builtins / set current file to diagnostic or output / save and restore ktable water mark around parse-translate / also current file and next frame pointer (g) / execute parsing rite pointer (outw) / reaches its top (outt) obuild: cmp cfile,lfile beq 1f mov r0,-(sp) jsr pc,flush mov (sp)+,r0 mov cfile,lfile 1: mov outw,r1 1: tstb (r0) beq 1f movb (r0)+,outb(r1) inc r1 mov r1,outw cmp r1,$outt blt 1b mov r0,-(sp) jsr pc,flush mov (sp)+,r0 br obuild 1: rts pc / copy output buffer onto last output file and clear buffer flush: mov outw,0f mov lfile,r0 sys write;outb;0:0 clr outw rts pc / get interpreted instruction for a parsing rule / negative instruction iif (str) free(str); free(etc); free(var); goto fadv; } ule diag: mov dfile,r1 br 1f parse: mov ofile,r1 1: mov cfile,-(sp) mov r1,cfile mov k(f),-(sp) mov g,-(sp) jsr pc,iget jsr pc,adv bfs 1f / rule succeeded / if it delivered translation, put it in ktable and set / instruction counter for / translation generator to point there / go generate cmp g,(sp)+ ble 2f mov -(g),r0 jsr pc,kput mov k(f),i neg i add $ktab,i mov f,-(sp) mov g,f clr x(f) jsr pc,generate mov (sp)+,f mov si(f),i 2: mov (sp)+,k(f) mov (sp)+,cfile jmp succ 1: mov (sps a pointer to a parameter in this / stack fromae, fetch that instead / put environment pointer in r1 iget: mov f,r1 mov (i)+,r0 bge 2f mov r0,-(sp) /save the exit bit bic $-2,(sp) bic (sp),r0 1: /chase parameter mov env(r1),r1 add si(r1),r0 mov (r0),r0 blt 1b mov env(r1),r1 bis (sp)+,r0 2: rts pc /there followeth the driving tables start: .data succc: 0 continc: 0 failc: 0 advc: 0 .text  )+,g mov (sp)+,k(f) mov (sp)+,cfile br fail / advance stack frame to invoke a parsing rule / copy corsor, watr mark, ignored class to new frame / set intial frame length to default (g1) / check end of stack / r0,r1 are new i,environment adv: inc advc mov f,(g) mov i,si(f) mov j(f),j(g) mov k(f),k(g) mov n(f),n(g) mov g,f add $g1,g cmp g,$stke bhis 1f mov r0,i mov r1,env(f) jmp contin 1: jsr r0,errcom ;.even /pbundle entered with pointer to earliest element of bunlde / read rp rblk: iocom = 5 / tmg / main program and parsing rule interpreter / tracing = 1 f = r5 g = r4 i = r3 sef=sec^sec; clf=clc^clc; bfs=bcs^bcs; bfc=bcc^bcc /fail indicator .globl flush,obuild,putch,iget,kput .globl generate .globl cfile,dfile,ofile,input .globl main,succ,fail,errcom,pbundle,parse,diag .globl alt,salt,stop,goto .globl tables,start,end .globl stkb,stke .globl ktab .globl trswitch,trace .globl x,si,j,k,n,g1,env / begin here / get arguments from shell / arg1 is input file / arg2 is output file (standard output /to reduce from the top of stack in r0 /exit with pointer to bundle in r0, or zero if bundle is empty pbundle: cmp r0,g blo 1f clr r0 /empty bundle rts pc 1: mov r0,-(sp) mov r0,r1 mov (r1)+,r0 cmp r1,g beq 2f /trivial bundle 1: mov r1,-(sp) jsr pc,kput mov (sp)+,r1 mov (r1)+,r0 cmp r1,g blos 1b mov k(f),r0 2: mov (sp)+,g rts pc / tmg translation rule interpreter (generator) / see tmgc.s for definitions tracing = 1 f = r5 .globl x,si,ek,ep,ek.fs,ep.fs,fs .globl trswitch,trace .globl stas fsboot.s tty.s rrk.s rk.s strip a.out ls -l a.out cp a.out /usr/mdec/rkuboot as fsboot.s tty.s rrp.s rp.s strip a.out ls -l a.out cp a.out /usr/mdec/rpuboot as fsboot.s tty.s rhp.s hp.s strip a.out ls -l a.out cp a.out /usr/mdec/hpuboot as tpboot.s tty.s tc.s strip a.out ls -l a.out cp a.out /usr/mdec/tboot as tpboot.s tty.s tm.s strip a.out ls -l a.out cp a.out /usr/mdec/mboot as tpboot.s tty.s ht.s strip a.out ls -l a.out cp a.out /usr/mdec/hboot as tcf.s strip a.out cp a.out /usr/mdec/tcf as rkif missing) main: dec (sp) beq 3f mov 4(sp),0f sys open;0:0;0 bes 1f mov r0,input dec (sp) beq 3f mov 6(sp),0f sys creat;0:0;666 bes 1f mov r0,ofile / set up tables / initialize stack, for definitions see tmgc.s / go interpret beginning at "start" / finish up 3: mov $stkb,f clr j(f) clr k(f) clr n(f) mov f,g add $g1,g mov $start,r0 jsr pc,adv jsr pc,flush 1: sys unlink;1f sys exit 1: ;.even / fatal processor error /write a two letter message on diagnostic file / get a dart,end,tables,ktab,ktat .globl errcom .globl generate,.tp i = r3 / if exit bit is on pop stack frame restore inst counter and return generate: bit $1,x(f) beq gcontin sub $fs,f mov si(f),i rts pc gcontin: .if tracing tst trswitch beq 1f mov $'g,r0 jsr pc,trace 1: .endif / get interpreted instruction, decode by range of values mov (i)+,r0 mov r0,x(f) bic $1,r0 .if .. cmp r0,$.. blo badadr .endif cmp r0,$start blo gf cmp r0,$end blo gc cmp r0,$tables blo gf neg r0 cmp r0,$ktaf.s strip a.out cp a.out /usr/mdec/rkf as reset.s strip a.out cp a.out /usr/mdec/reset as dldr.s strip a.out cp a.out /usr/mdec/dldr as mcopy.s tm.s wrk.s rk.s strip a.out cp a.out /usr/mdec/tmrk as mcopy.s tm.s wrp.s rp.s strip a.out cp a.out /usr/mdec/tmrp as mcopy.s tm.s whp.s hp.s strip a.out cp a.out /usr/mdec/tmhp as mcopy.s ht.s wrk.s rk.s strip a.out cp a.out /usr/mdec/htrk as mcopy.s ht.s wrp.s rp.s strip a.out cp a.out /usr/mdec/htrp as mcopy.s ht.s whp.s hp.s strip a.out cp a.out /usr/mdeump errcom: mov dfile,cfile jsr pc,obuild mov $1f,r0 jsr pc,obuild jsr pc,flush stop: 4 1: <--fatal\n\0>;.even / all functions that succeed come here / test the exit indicator, and leave the rule if on succ: inc succc bit $1,x(f) bne sret contin: inc continc .if tracing tst trswitch beq 1f mov $'r,r0 jsr pc,trace 1: .endif / get interpreted instruction / save its exit bit (bit 0) on stack / distinguish type of instruction by ranges of value jsr pc,iget mov r0,x(f) bic $1,r0 .if t blo gk badadr: jsr r0,errcom ;.even / builtin translation function gf: jmp (r0) / tmg-coded translation subroutine / execute it in current environment gc: mov i,si(f) mov r0,i mov ek(f),ek.fs(f) mov ep(f),ep.fs(f) add $fs,f jsr pc,gcontin br generate / delivered compound translation / instruction counter is in ktable / set the k environment for understanding 1, 2 ... / to designate this frame gk: mov f,ek(f) add $ktab,r0 mov r0,i br gcontin / execute rulec/hthp rm a.out .. cmp r0,$.. blo 1f .endif cmp r0,$start blo 2f cmp r0,$end blo 3f cmp r0,$tables blo 2f / bad address 1: jsr r0,errcom ;.even / machine coded function 2: jmp (r0) / tmg-coded rule, execute and test its success / bfc = branch on fail clear 3: jsr pc,adv bfc succ / all functions and rules that fail come here / if exit bit is on do a fail return / if following instruction is an alternate (recognized literally) / do a goto, if a success alternate, do a nop / otherwi called for by 1 2 ... / found relative to instruction counter in the k environment / this frame becomes th p environment for / any parameters passed with this invocation / e.g. for 1(x) see also .tq .tp: movb (i)+,r0 movb (i)+,r2 inc r0 asl r0 mov i,si(f) mov f,ep.fs(f) mov ek(f),r1 mov si(r1),i sub r0,i add $fs,f mov f,ek(f) asl r2 beq 2f /element is 1.1, 1.2, .. 2.1,... mov (i),i neg i bge 1f jsr r0,errcom ;.even 1: cmp i,$ktat bhis badadr add $ktab,i sub r2,i 2: j # include "dextern" # define IDENTIFIER 257 # define MARK 258 # define TERM 259 # define LEFT 260 # define BINARY 261 # define RIGHT 262 # define PREC 263 # define LCURLY 264 # define C_IDENTIFIER 265 /* name followed by colon */ # define NUMBER 266 setup(argc,argv) int argc; char *argv[]; { int i,j,lev,t; int c; foutput = -2; i = 1; while( argc >= 2 && argv[1][0] == '-' ) { while( *++(argv[1]) ){ switch( *argv[1] ){ case 'v': case 'V': foutput = copen("y.output", 'w' ); if( foutpj]; continue; case LCURLY: if( i!=0 ) error( "%%{ appears within a rule" ); cpycode(); continue; default: error( "syntax error, input %d", t ); } } finact(){ /* finish action routine */ register i; if( rflag ){ printf( "\n1000 goto(" ); for( i=1; i='0' && c<='9'; c=getchar() ){ numbval = numbval*base + c - '0'; } peekc = c; return(NUMBER); } else if( (c>='a'&&c<='z')||(c>='A'&&c<='Z')||c=='_'||c=='.'||c=='$'){ ctokn = cnamp; while( (c>='a'&&c<='z') || (c>='A'&&c<='Z') || (c>='0'&&c<='9') || c=='_' || c=='.' || c=='$' ) { chstash( c ); if( peekc>=0 ) { c = peekc; peekc = -1; } else c = getchar(); } } else return(c); peekc=c; ut < 0 ) error( "cannot open y.output"); continue; case 'o': case 'O': oflag = 1; continue; case 'r': case 'R': oflag = 1; rflag = 1; continue; default: error( "illegal option: %c", *argv[1]); } } argv++; argc--; } ftable = copen( oflag ? "yacc.tmp" : "y.tab.c" , 'w' ); if( ftable<0 ) error( "cannot open table file" ); if( argc > 1 ) cin = copen( argv[1], 'r' ); if( cin < 0 ) error( "cannot open input" ); settab(); printf("#\n"); ctokn = "$end"; %d;\n", trmset[2].value ); } } defin(t) { /* define ctokn to be a terminal if t=0 or a nonterminal if t=1 */ char *cp,*p; int c; if (t) { if( ++nnonter >= ntlim ) error("too many nonterminals, limit %d",ntlim); nontrst[nnonter].name = ctokn; return( NTBASE + nnonter ); } else { if( ++nterms >= tlim ) error("too many terminals, limit %d",tlim ); trmset[nterms].name = ctokn; if( ctokn[0]==' ' && ctokn[2]=='\0' ) /* single character litera } chstash( '\0' ); if( reserve ){ /* find a reserved word */ if( compare("term")) return( TERM ); if( compare("TERM")) return( TERM ); if( compare("token")) return( TERM ); if( compare("TOKEN")) return( TERM ); if( compare("left")) return( LEFT ); if( compare("LEFT")) return( LEFT ); if( compare("nonassoc")) return( BINARY ); if( compare("NONASSOC")) return( BINARY ); if( compare("binary")) return( BINARY ); if( compare("BINARY")) return( BINARY ); if( compare("right")) return( RIGdefin(0); /* eof */ extval = 0400; /* beginning of assigned values */ ctokn = "error"; defin(0); ctokn = "$accept"; defin(1); mem=mem0; cnamp = cnames; lev=0; i=0; while( t = gettok() ){ switch( t ){ case IDENTIFIER: j = chfind(0); trmlev[j] = lev; continue; case ',': case ';': continue; case TERM: lev=0; continue; case LEFT: lev=(++i<<3)|01; continue; case BINARY: lev=(++i<<3)|02; continue; case RIGHT: lev=(++i<<3)|03; continue; case MARK: defout(); l */ trmset[nterms].value = ctokn[1]; else if ( ctokn[0]==' ' && ctokn[1]=='\\' ) { /* escape sequence */ if( ctokn[3] == '\0' ){ /* single character escape sequence */ switch ( ctokn[2] ){ /* character which is escaped */ case 'n': trmset[nterms].value = '\n'; break; case 'r': trmset[nterms].value = '\r'; break; case 'b': trmset[nterms].value = '\b'; break; case 't': trmset[nterms].value = '\t'; break; case '\'': trmset[nterms].value = '\''; break; case '"': trmset[nterms].vaHT ); if( compare("RIGHT")) return( RIGHT ); if( compare("prec")) return( PREC ); if( compare("PREC")) return( PREC ); error("invalid escape, or illegal reserved word: %s", ctokn ); } /* look ahead to distinguish IDENTIFIER from C_IDENTIFIER */ look: while( peekc==' ' || peekc=='\t' || peekc == '\n' ) { if( peekc == '\n' ) ++peekline; peekc = getchar(); } if( peekc != ':' ) return( IDENTIFIER ); peekc = -1; lineno =+ peekline; peekline = 0; return( C_IDENTIFIER ); } chfind(t) {  if( rflag ){ /* RATFOR */ printf( "define yyerrok yyerrf = 0\n" ); printf( "define yyclearin yychar = -1\n" ); printf( "subroutine yyactr(yyprdn)\n"); printf( "common/yycomn/yylval,yyval,yypv,yyvalv(150)\n" ); printf( "common/yylcom/yychar,yyerrf,yydebu\n" ); printf( "integer yychar, yyerrf, yydebu\n" ); printf( "integer yyprdn,yyval,yylval,yypv,yyvalv\n" ); } else { printf( "#define yyclearin yychar = -1\n" ); printf( "#define yyerrok yylue = '"'; break; case '\\': trmset[nterms].value = '\\'; break; default: error( "invalid escape" ); } } else if( ctokn[2] <= '7' && ctokn[2]>='0' ){ /* \nnn sequence */ if( ctokn[3]<'0' || ctokn[3] > '7' || ctokn[4]<'0' || ctokn[4]>'7' || ctokn[5] != '\0' ) error("illegal \\nnn construction" ); trmset[nterms].value = 64*(ctokn[2]-'0')+8*(ctokn[3]-'0')+ctokn[4]-'0'; if( trmset[nterms].value == 0 ) error( "'\\000' is illegal" ); } } else { trmset[nterms].value = extval++; int i,j; if (ctokn[0]==' ')t=0; for(i=1;i<=nterms;i++) if(compare(trmset[i].name)){ cnamp = ctokn; return( i ); } for(i=1;i<=nnonter;i++) if(compare(nontrst[i].name)) { cnamp = ctokn; return( i+NTBASE ); } /* cannot find name */ if( t>1 && ctokn[0] != ' ' ) error( "%s should have been defined earlier", ctokn ); return( defin( t ) ); } cpycode(){ /* copies code between \{ and \} */ int c; c = getchar(); if( c == '\n' ) { c = getchar(); lineno++; } while( c ){ if(errflag = 0\n" ); printf( "extern int yychar, yyerrflag;\n" ); printf("\nint yyval 0;\nint *yypv;\nint yylval 0;"); printf("\nyyactr(__np__){\n"); } break; case LCURLY: defout(); cpycode(); continue; case NUMBER: trmset[j].value = numbval; if( j < ndefout && j>2 ) error("please define type # of %s earlier", trmset[j].name ); continue; default: error("bad precedence syntax, input %d", t ); } break; } prdptr[0]=mem; /* added production } trmlev[nterms] = 0; return( nterms ); } } defout(){ /* write out the defines (at the end of the declaration section) */ _REGISTER int i, c; _REGISTER char *cp; for( i=ndefout; i<=nterms; ++i ){ cp = trmset[i].name; if( *cp == ' ' ) ++cp; /* literals */ for( ; (c= *cp)!='\0'; ++cp ){ if( c>='a' && c<='z' || c>='A' && c<='Z' || c>='0' && c<='9' || c=='_' ) ; /* VOID */ else goto nodef; } /* define it */ printf( "%c define %s %d\n", rflag?'  c=='\\' ) if( (c=getchar()) == '}' ) return; else putchar('\\'); if( c=='%' ) if( (c=getchar()) == '}' ) return; else putchar('%'); putchar( c ); if( c == '\n' ) ++lineno; c = getchar(); } error("eof before %%}"); } cpyact(){ /* copy C action to the next ; or closing } */ int brac, c, match, *i, j, s; brac = 0; loop: c = getchar(); swt: switch( c ){ case ';': if( brac == 0 ){ putchar( c ); return; } goto lcopy; case '{': brac++; goto lcopy; case '$': s = */ *mem++ = NTBASE; *mem++ = NTBASE+1; *mem++ = 1; *mem++ = 0; prdptr[1]=mem; i=0; /* i is 0 when a rule can begin, 1 otherwise */ for(;;) switch( t=gettok() ) { case C_IDENTIFIER: if( mem == prdptr[1] ) { /* first time */ if( rflag ){ printf( "goto 1000\n" ); } else printf("\nswitch(__np__){\n"); } if( i != 0 ) error( "previous rule not terminated" ); *mem = chfind(1); if( *mem < NTBASE )error( "token illegal on lhs of grammar rule" ); i=1; ':'#', trmset[i].name, trmset[i].value ); nodef: ; } ndefout = nterms+1; } chstash( c ){ /* put character away into cnames */ if( cnamp >= &cnames[cnamsz] ) error("too many characters in id's and literals" ); else *cnamp++ = c; } int gettok() { int j, base; static int peekline; /* number of '\n' seen in lookahead */ auto int c, match, reserve; begin: reserve = 0; if( peekc>=0 ) { c = peekc; lineno =+ peekline; peekc = -1; peekline = 0; } else c = getchar();  1; c = getchar(); if( c == '$' ){ printf("yyval"); goto loop; } if( c == '-' ){ s = -s; c = getchar(); } if( c>='0' && c <= '9' ){ j=0; while( c>='0' && c<= '9' ){ j= j*10+c-'0'; c = getchar(); } if( rflag ) printf( "yyvalv(yypv%c%d)", s==1?'+':'-', j ); else printf("yypv[%d]", s*j ); goto swt; } putchar( '$' ); if( s<0 ) putchar('-'); goto swt; case '}': brac--; if( brac == 0 ){ putchar( c ); return; } goto lcopy; case '/': /* ++mem; continue; case IDENTIFIER: *mem=chfind(1); if(*mem < NTBASE)levprd[nprod]=trmlev[*mem]; mem++; if(i==0) error("missing :"); continue; case '=': levprd[nprod] =| 04; if( i==0 ) error("semicolon preceeds action"); printf( rflag?"\n%d ":"\ncase %d:", nprod ); cpyact(); printf( rflag ? " return" : " break;" ); case '|': case ';': if(i){ *mem++ = -nprod; prdptr[++nprod] = mem; levprd[nprod]=0; i=0;} if (t=='|'){i=1;*mem++ = *prdptr[nprod-1];} con while( c==' ' || c=='\n' || c=='\t' ){ if( c == '\n' ) ++lineno; c=getchar(); } if (c=='/') {if (getchar()!='*')error("illegal /"); c=getchar(); while(c) { if( c == '\n' ) ++lineno; if (c=='*') {if((c=getchar())=='/')break;} else c=getchar();} if (!c) return(0); goto begin;} j=0; switch(c){ case '"': case '\'': match = c; ctokn = cnamp; chstash( ' ' ); while(1){ c = getchar(); if( c == '\n' || c == '\0' ) error("illegal look for comments */ putchar( c ); c = getchar(); if( c != '*' ) goto swt; /* it really is a comment */ putchar( c ); while( c=getchar() ){ if( c=='*' ){ putchar( c ); if( (c=getchar()) == '/' ) goto lcopy; } putchar( c ); } error( "EOF inside comment" ); case '\'': /* character constant */ match = '\''; goto string; case '"': /* character string */ match = '"'; string: putchar( c ); while( c=getchar() ){ if( c=='\\' ){ putchar( c ); c=getchar(tinue; case 0: /* End Of File */ case MARK: if( i != 0 ) error( "rule not terminated before %%%% or EOF" ); settab(); finact(); /* copy the programs which follow the rules */ if( t == MARK ){ while (c=getchar()) putchar(c); } return; case PREC: if( i==0 ) error( "%%prec must appear inside rule" ); if( gettok()!=IDENTIFIER)error("illegal %%prec syntax" ); j=chfind(2); if(j>=NTBASE)error("nonterminal %s illegal after %%prec", nontrst[j-NTBASE].name); levprd[nprod]=trmlev[or missing ' or \""); if( c == '\\' ){ c = getchar(); chstash( '\\' ); } else if( c == match ) break; chstash( c ); } break; case '%': case '\\': switch(c=getchar()) {case '0': return(TERM); case '<': return(LEFT); case '2': return(BINARY); case '>': return(RIGHT); case '%': case '\\': return(MARK); case '=': return(PREC); case '{': return(LCURLY); default: reserve = 1; } default: if( c >= '0' && c <= '9' ){ /* number */ numbval = c-'0' ; base); } else if( c==match ) goto lcopy; putchar( c ); } error( "EOF in string or character constant" ); case '\0': error("action does not terminate"); case '\n': ++lineno; goto lcopy; } lcopy: putchar( c ); goto loop; }  urn; } error(a) { printf("Error %d\n",a); dexit(); } dexit() { extern nflush; /* printf("nflush = %d\n",nflush); /*DEBUG*/ if(tp[0] > 0 && utmp == 0) { unlink(tmp[0]); unlink(tmp[1]); } exit(); } callsys(f,v) char f[],*v[]; { int t,status,i; if((t = fork()) == 0) { for(i = 1; i <= 12; i++) signal(i,0); execv(f,v); printf("Can't find %s\n",f); exit(1); } else { if(t == -1) { printf("Try again\n"); return(1); } } while(t != wait(&status)); /* printf("Status = %o, %s\n",r0,... / lookchar: mov r2,-(sp) jsr pc,plausible cmp w(r1),r(r1) /W,R blos noch mov r(r1),r0 jsr pc,bufchar bec 2f jsr pc,getbuf / 2: inc flag bne 2f jsr pc,fixct br 1f 2: mov flag,u1(r2) 1: mov (sp)+,r2 movb (r0),r0 tst r0 /clears c-bit rts pc / noch: mov (sp)+,r2 clr r0 sec rts pc / / / routine to put a character into the string / pointed to by r1; character in r0 / r0 is preserved; r1 points to the string / after return and must be saved. / / movb ch,r0 / mov ...,r1 / jsr pc,putchar# # include "econs.h" # include "ecmn.h" /*int mbuf[1024]; /*INSTR*/ /*int tbuf[12]; /*INSTR*/ int (*acts[])() {0, &coll, &save, &out, &error, &hyphen, &pno }; char *tmp[2] {"/tmp/crt0a", "/tmp/crt1a" }; char *ignonl "/usr/lib/eign"; char *gtab "/usr/lib/etab"; main(argc,argv) char *argv[]; { auto i,j,tm1,tm2,tm3; char *fn,*av[8]; /* extern etext; /*INSTR*/ /* monitor(&main,&etext,&mbuf,1024); /*INSTR*/ if(*argv[1] == '-') { j = flags(argv); argv =+ j; argc =- j; } status,f); /*DEBUG*/ if((t = (status & 0377)) != 0) { if(t != 2) { printf("Fatal error in %s\n",f); printf("t = %d\n",t); } dexit(); } return((status>>8) & 0377); } flags(argv) char *argv[]; { int j,xx; char *ap; j = 1; ap = argv[1]; while(*++ap != '\0') { switch(*ap) { default: printf("Unrecognized flag: %c\n",*ap); dexit(); case 'c': count = 1; continue; case 'i': /* Ignore file */ if(!xx) { xx = 1; only = 0; ignonl = argv[++j]; } / mov r1,... / putchar: mov r2,-(sp) mov r1,-(sp) mov r0,nchar jsr pc,plausible 1: cmp w(r1),l(r1) /W,L blt 3f mov w(r1),r0 inc r0 sub a(r1),r0 /W-A+1 jsr pc,allocate mov (sp),r0 jsr pc,copy jsr pc,swap jsr pc,release mov (sp),r1 / 3: mov w(r1),r0 jsr pc,bufchar bec 2f jsr pc,getbuf 2: movb nchar,(r0) mov $1,w1(r2) mov nchar,r0 /to preserve r0 for user inc w(r1) inc flag bne 2f jsr pc,fixct br 1f 2: mov flag,u1(r2) 1: mov (sp)+,r1 mov (sp)+,r2 rts pc / / fixct: mov r1,-(sp)  init(); i = 0; if(argc == 1) { *ibuf1 = 0; curfl = 2; curf[0] = '_'; curf[1] = '\t'; goto pipe; } while(++i < argc) { curs[4] = '\t'; if(fopen(argv[i],ibuf1) < 0) { printf("Can't open %s\n",argv[i]); dexit(); } curfl = 0; while((curf[curfl] = *argv[i]++) != 0 && curfl <=8) if(curf[curfl++] == '/') curfl = 0; curf[curfl++] = '\t'; if(curfl == 8) curf[8] = -1; pipe: ibuf = ibuf1; lno = 1; driver(); close(file); } flsh(0); close(tp[0]); /* monitor(0); / continue; case 'o': /*only file*/ if(!xx) { xx = 1; only = 1; ignonl = argv[++j]; } continue; case 'p': page = 1; continue; case 't': utmp = argv[++j]; tmp[0] = argv[j]; continue; case 'u': /* Unique symbols only */ usw = 1; continue; case 'w': /* Word list only */ word = 1; continue; } } return(j); } compile() { char buf[40],*b; int i,v; fopen(ignonl,ibuf1); b = buf - 1; while((*++b = getc(ibuf1)) != -1) {mov r3,-(sp) mov nbuf,r1 mov nbuf,flag 2: mov r1,u1(r2) dec r1 bge 1f mov (sp)+,r3 mov (sp)+,r1 rts pc 1: clr r2 mov $2,r3 1: cmp r3,nbuf2 bge 2b cmp u1(r3),u1(r2) blo 2f mov r3,r2 2: add $2,r3 br 1b *INSTR*/ /* dexit(); /*INSTR*/ /* times(tbuf); /*INSTR*/ /* tm1 = tbuf[0]/6; /*INSTR*/ /* tm2 = tbuf[1]/6; /*INSTR*/ /* printf("Prep: %d %d\n", tm1, tm2); /*INSTR*/ /* exit(); /*DEBUG*/ fn = "/bin/sort"; av[0] = "sort"; av[1] = tmp[0]; av[2] = "-o"; av[3] = tmp[0]; av[4] = 0; callsys(fn, av); /* times(tbuf); /*INSTR*/ /* tm1 = tbuf[3]/6; /*INSTR*/ /* tm2 = tbuf[5]/6; /*INSTR*/ /* printf("Sort: %d %d\n", tm1, tm2); /*INSTR*/ if(usw) { fn = "/usr/bin/upost"; av[0] = "upost"; i = 0; } e if(*b == '\n') { *b = '\0'; search(buf,b - buf,&itab,1); b = buf - 1; } else { if(*b == '\t') { v = 0; while((i = getc(ibuf1)) != -1) { if(i == '\n') break; v = v*10 + (i - '0'); } search(buf,b - buf,&itab,v); b = buf - 1; } else { if((b - buf) > 39) { printf("Ignore/only symbol too long.\n"); dexit(); } } } } close(ibuf1); return; } cfree (ptr) { free(ptr); } lse if(count) { fn = "count"; av[0] = "count"; i = 0; } else { fn = "/usr/bin/crpost"; av[0] = "crpost"; av[1] = "-E"; i = 1; } av[++i] = tmp[0]; av[++i] = 0; callsys(fn,av); /* times(tbuf); /*INSTR*/ /* tm1 = tbuf[3]/6 - tm1; /*INSTR*/ /* tm2 = tbuf[5]/6 - tm2; /*INSTR*/ /* printf("Post: %d %d\n", tm1, tm2); /*INSTR*/ dexit(); } driver() { auto p; top: l = -1; while((c = line[++l] = getc(ibuf)) != -1) { /* printf("driver: c = %o l = %d\n",c,l); /*DEBUG*/ if(l >= 299) { pr/ / routine to read from disc to a buffer / wcing the buffer if necessary / mov disc addr,r0 / mov buffer addr,r2 / jsr pc,getb / on return r0 = addr of byte in buffer / getb: mov r3,-(sp) mov r1,-(sp) mov r0,-(sp) mov r2,r3 asr r3 mov r3,r1 ashc $9.,r1 bic $777,r1 add $b1,r1 tst w1(r2) / w ble 1f jsr pc,clean 1: mov (sp),r0 bic $777,r0 /get lowest multiple of 512. mov r0,0f mov r0,b1s(r2) /set start mov afi,r0 sys seek;0:..;0 mov r1,0f sys read;0:..;512. mov b1s(r2),b1e(r2) add $51 intf("Line too long: %d.\n",lno); dexit(); } if(c & 0200) { printf("Illegal character: %o line %d\n",c,lno); dexit(); } if(fl) { if((*flag[fl])()) continue; } /*printf("cs = %d cc = %c ca = %d\n",cs,c,tab[cs].cl[c]); /*DEBUG*/ if(p = tab[cs].cl[c]) (*acts[p])(); continue; } if(ibuf == ibuf1) return; ibuf = ibuf1; goto top; } init() { int b[3]; auto fi,i; extern coll(),save(),out(),asym(),asw(),csym(),csw(); extern incl(),decl(),sk(),sk2(); extern dexit(); ib2.,b1e(r2) / set end clr w1(r2) /clear w mov (sp)+,r0 sub b1s(r2),r0 add r1,r0 / set r0=byte addr in buffer mov (sp)+,r1 mov (sp)+,r3 rts pc / / / routine to wc a buffer / mov buffer addr,r2 / mov buffer addr+6,r1 beginning of buffer / jsr pc,clean / clean: mov r0,-(sp) mov b1s(r2),0f mov afout,r0 sys seek;0:..;0 mov r1,0f sys write;0:..;512. clr w1(r2) /clear w mov (sp)+,r0 rts pc / / routine to get buffer addr of byte whose disc / addr is in r0 - also returns addr of write / flag for buff.globl flag .globl b1, w1, u1, b1s, b1e / here to allocate a new block / / / mov ...,r0 / jsr pc,allocate / mov r1,... / / requested size in bytes in r0 / pointer to header of allocated block returned in r1 / r0 is preserved / / convert to words, adjust for header, round up / to a power of two / / each block has a four-word header / W - write ptr (also used as link ptr in frlist) / R - read ptr / A - pointer to head of data / L - ptr to (end+1) of data hsz=1024. numb=4. numb2=2*numb w=0 r=2 a=4 l=6 / aluf1 = &ib1; if((fi = open(gtab,0)) < 0) { printf("Cannot open grammar table; see lem\n"); dexit(); } i = -1; while(++i < NUMS) if(read(fi,tab[i].cl,256) < 256) { printf("Bad grammar table; see lem\n"); dexit(); } close(fi); if(signal(1,1) != 1) signal(1,&dexit); if(signal(2,1) != 1) signal(2,&dexit); if(signal(3,1) != 1) signal(3,&dexit); while((tp[1] = creat(tmp[1],0)) < 0) tmp[1][9]++; close(tp[1]); tmp[0][9] = tmp[1][9]; tp[0] = creat(tmp[0],CREATC); if(count) returner in r2 / mov disc addr,r0 / jsr pc,bufchar / mov (r0),r0 for read / inc (r2) for write must inc w / c-bit set if char not in either buffer / bufchar: mov r1,-(sp) mov r3,-(sp) clr r3 1: mov r3,r2 asl r2 cmp r0,b1s(r2) blo 2f cmp r0,b1e(r2) bhis 2f sub b1s(r2),r0 mov r3,r1 ashc $9.,r1 bic $777,r1 add r1,r0 add $b1,r0 mov (sp)+,r3 mov (sp)+,r1 clc rts pc 2: inc r3 cmp r3,nbuf blt 1b mov (sp)+,r3 mov (sp)+,r1 sec rts pc / / routine to get a buffer / mov disc addr,r0 / jsr pc,getbuf locate: mov r0,-(sp) mov r2,-(sp) mov r3,-(sp) tst stats bne 1f jsr pc,initl 1: inc stats dec r0 bmi 1f jsr pc,log2 inc r0 1: asl r0 mov r0,-(sp) / / look on free list for block of required size / zzz: mov (sp),r0 tst frlist(r0) beq xxx / / found it, allocate and return / mov frlist(r0),r1 add $hblk,r1 mov (r1),frlist(r0) mov a(r1),r0 mov r0,w(r1) mov r0,r(r1) tst (sp)+ mov (sp)+,r3 mov (sp)+,r2 mov (sp)+,r0 / jsr pc,whead rts pc / / no block of required size / look for larger bloc; itab.hptr = &ipsp; itab.symt = &issp; itab.hsiz = PTRI; itab.ssiz = CHARI; itab.nsym = 0; itab.curb = 1; if((fi = open(ignonl,0)) < 0) { printf("Cannot open ignore/only file.\n"); dexit(); } if((read(fi,b,6) == 6) && (b[0] == 0100200)) { if(read(fi,itab.hptr,b[1]) < b[1]) { printf("Cannot read ignore/only file.\n"); dexit(); } if(read(fi,itab.symt,b[2]) < b[2]) { printf("Cannot read ignor/only file.\n"); dexit(); } close(fi); } else { close(fi); compile(); } ret/ mov (r0),r0 (for read) / inc (r2) must inc w for w / getbuf: mov r4,-(sp) mov r3,-(sp) mov $2,r3 clr r2 mov $1,r4 1: cmp r4,nbuf bge 1f cmp u1(r3),u1(r2) bhis 2f mov r3,r2 2: inc r4 add $2.,r3 br 1b 1: mov r2,r3 jsr pc,getb add $stats+6.,r3 inc (r3) mov (sp)+,r3 mov (sp)+,r4 rts pc / / routine to look at next character from string / pointed to by r1; character returned in r0 / c-bit set if character not available (end of file) / r1 is preserved / / mov ...,r1 / jsr pc,lookchar / movb k / xxx: tst (r0)+ cmp r0,$frend-frlist bhis www tst frlist(r0) bne yyy br xxx / / there are no larger blocks; must garbage collect / www: jsr pc,collect tst r0 bne zzz / / out of space / mov $1,r0 sys write; 1f; 2f-1f 4 1: 2: .even / / split larger block into two smaller pieces and / link together as smaller blocks in the free list. / yyy: mov hblk,r3 /get free header block beq www mov frlist(r0),r1 add $hblk,r1 mov w(r1),frlist(r0) mov r3,w(r1) add $hblk,r3 mov exp2-2(r0),r2 add a(r1),r2 mov w(r3),hblk mov l(r1),l(r3) mov r2,l(r1) /L mov r2,a(r3) clr w(r3) /W' mov r1,r2 sub $hblk,r2 mov r2,frlist-2(r0) br zzz / / / here to release a block / / mov ...,r1 / jsr pc,release / / pointer to block in r1 / release: / / discover that this is a plausible pointer / mov r0,-(sp) jsr pc,preposterous / / find free list index and link block to that entry / inc stats+2 mov frlist(r0),w(r1) clr r(r1) sub $hblk,r1 mov r1,frlist(r0) clr r1 /self-defense / jsr pc,wheamov $hblk,r1 1: mov (r1),r1 beq 1f add $hblk,r1 mov headsz,a(r1) mov headsz,l(r1) br 1b / 1: mov afout,r0 sys write;hblk;hsz jsr pc,reset mov (sp)+,r2 mov (sp)+,r0 rts pc . = b1 + [512.*numb] / .bss flag: .=.+2 stats: .=.+18. useful: .=.+2 afi: .=.+2 afout: .=.+2 datadr: .=.+2 hblk: .=.+2 /must remain here - pointer to free header frlist: .=hblk+34. frend: headers: strbuf: .=hblk+hsz strend: nchar: .=.+2 end: *argp bhi err asl r0 add argp,r0 br 2f 1: tst (sp)+ beq 1f movb $1,utable(r1) d mov (sp)+,r0 rts pc / / / jsr pc,collect / / coalesce free storage by rejoining paired blocks / on the free list. / zero is returned in r0 if no paired blocks were found. / collect: mov r1,-(sp) mov r2,-(sp) mov r3,-(sp) mov r4,-(sp) clr useful inc stats+4. clr r0 /start with smallest blocks /r0 contains frlist index loop1: mov $frlist,r1 add r0,r1 / / try next list member at this level / loop2: mov (r1),r3 beq advance /list is empty add $hblk,r3 tst (r3) /W beq advance /only one lis/ fortran random number generator. / either single or double prec. .globl rand., srand. .globl retrn srand.: value .+2 mov *2(r3),seed1 inc first jmp retrn rand.: value .+2 tst first bne 1f sys time mov r1,seed1 inc first 1: mov seed1,r1 jsr pc,ran mov r1,seed1 seti setd movif r0,fr0 divf $44000,fr0 movf fr0,value jmp retrn ran: mpy $13077.,r1 add $6925.,r1 mov r1,r0 bic $100000,r0 rts pc .bss first: .=.+2 seed1: .=.+2 value: .=.+8 / / / fortran random I/O .globl rread. .globl rwrite. .globl temp .globl retrn .globl rerr rread.: temp .+2 mov 2(r3),r0 mov 2(r0),0f mov rfin,r0 bne 1f sys open; rf; 0 bes 9f mov r0,rfin 1: sys seek; 0:..; 0 mov 4(r3),0f mov 6(r3),r0 mov 2(r0),0f+2 mov rfin,r0 sys read; 0:..; 0 jmp retrn rwrite.:temp .+2 mov 2(r3),r0 mov 2(r0),0f mov rfout,r0 bne 1f sys creat; rf; 17 bes 9f mov r0,rfout 1: sys seek; 0:..; 0 mov 4(r3),0f mov 6(r3),r0 mov 2(r0),0f+2 mov rfout,r0 sys write; 0t element / / calculate address of buddy / mov a(r3),r4 sub headsz,r4 bit exp2(r0),r4 beq 2f bic exp2(r0),r4 br 1f 2: bis exp2(r0),r4 1: add headsz,r4 / / and search for him / loop3: cmp a(r3),r4 beq coal mov r3,r2 mov w(r3),r3 tst r3 beq nocoal add $hblk,r3 br loop3 / / have found a pair; remove both blocks from list, / coalesce them, and put them on next higher list / coal: inc useful mov w(r3),w(r2) /remove him from list mov (r1),r2 add $hblk,r2 mov r3,r4 mov w(r2),w(r1) /remove other / call getarg(n, array [, nword] ) / / fill in the array with the n-th argument to the routine. / array is integer. / n counts from 1 for the file name (first) arg / if nword is specifies it gives the max number / of words to fill in / If no nword is given the array ends with at least one blank. / if nword is given the array is blank-padded to that length. / iargc(dummy) returns the number of arguments / (1-origin) .globl getarg., iargc. .globl retrn, temp .comm argp,2 getarg.: temp .+2 mov $512.,r2 :..; .. jmp retrn 9: jsr r5,rerr; 456. sys exit rf: .even rfin: .=.+2 rfout: .=.+2 one cmp a(r2),a(r4) bgt 1f mov r2,-(sp) mov r4,r2 mov (sp)+,r4 1: mov hblk,(r2) clr r(r2) mov headsz,a(r2) mov headsz,l(r2) sub $hblk,r2 mov r2,hblk add exp2(r0),l(r4) /L clr r(r4) mov frlist+2(r0),w(r4) sub $hblk,r4 mov r4,frlist+2(r0) br loop2 / / no buddy found, try next block on this list / nocoal: mov (r1),r1 add $hblk,r1 br loop2 / / advance to next free list / advance: tst (r0)+ cmp r0,$frend-frlist blo loop1 mov useful,r0 / / restore registers and return / mov (sp)+,r4 mov (cmp *2(sp),$3 blt 1f mov 6(r3),r2 mov 2(r2),r2 asl r2 asl r2 1: mov 4(r3),r4 mov 2(r3),r1 mov 2(r1),r1 mov argp,r0 cmp r1,(r0) bgt 1f asl r1 add r0,r1 mov (r1),r1 2: tst r2 ble 1f movb (r1)+,(r4)+ beq 2f dec r2 br 2b 2: dec r4 1: movb $' ,(r4)+ dec r2 bit $3,r2 bne 1b cmp r2,$256. bge 1f tst r2 bgt 1b 1: jmp retrn iargc.: temp .+2 clr temp mov *argp,temp+2 jmp retrn / / / move, line sct = 2 / fortran vt0 interfaces / erase screen erase.: temp .+2 jsr pc,setfil mov f,r0 sys write; erase; 2 jmp retrn / move(x, y) / / sets current x,y to arguments / .globl move. .globl line. .globl erase. .globl frame. .globl arc. .globl circle. .globl temp .globl retrn frame.: temp .+2 jsr pc,setfil mov 2(r3),r0 movb 2(r0),frame+1 mov f,r0 sys write; frame; 2 jmp retrn move.: temp .+2 jsr pc,garg mov r0,x mov r1,y jmp retrn / line(x, y) / / plot vector from cursp)+,r3 mov (sp)+,r2 mov (sp)+,r1 rts pc / / routine to find integer part of log2(x) / / jsr pc,log2 / / r0 = log2(r0) / log2: mov $15.,-(sp) tst r0 beq 2f 1: asl r0 bcs 2f dec (sp) br 1b 2: mov (sp)+,r0 rts pc / 0 exp2: 1;2;4;10;20;40;100;200;400;1000;2000;4000; 10000;20000;40000;100000 / / routine to discover whether r1 points to / a plausible header - to avoid ruination. / / r1 is preserved and r0 gets a suitable index for frlist / / jsr pc,preposterous / plausible: cmp r1,$strbuf blo bo/ Fortran library-- setfil / call setfil(unit, 5hname ) .globl setfil. .globl getbuf .globl chkunit .globl retrn .globl utable .globl temp .globl rerr setfil.: temp .+2 mov 2(r3),r1 mov 2(r1),r1 jsr r5,chkunit tstb utable(r1) beq 1f jsr r5,rerr; 112. 1: jsr r5,getbuf movb $-1,utable(r1) mov 4(r3),r0 mov r2,r1 1: movb (r0)+,(r1) beq 1f cmpb $' ,(r1)+ bne 1b clrb -(r1) 1: jmp retrn rent x,y / to arguments, setting current / x,y when done to arguments / line.: temp .+2 jsr pc,garg mov r0,x1 mov r1,y1 movb $3,command mov f,r0 sys write; command; 9 mov x1,x mov y1,y jmp retrn / call circle(x, y, radius) / circle's center at x, y circle.:temp .+2 jsr pc,garg mov r0,x mov r1,y mov 6(r3),r0 mov 2(r0),r0 ash $2,r0 mov r0,x1 movb $5,command mov f,r0 sys write; command; 7 jmp retrn / call arc(xo, yo, x1, y1, x2, y2) / plot circle arc: origin xo,yo; / counterclockwise tch cmp r1,$strend bhis botch rts pc / / botch: mov r0,-(sp) mov $1,r0 sys write; 1f; 2f-1f 4 1: 2: .even / / preposterous: cmp r1,$strbuf blo botch cmp r1,$strend bhis botch cmp a(r1),headsz /A blo botch cmp l(r1),datadr /L bhi botch mov l(r1),r0 /L sub a(r1),r0 /A mov r0,-(sp) jsr pc,log2 asl r0 cmp exp2(r0),(sp) bne botch mov r0,(sp) mov frlist(r0),r0 1: beq 1f add $hblk,r0 cmp r0,r1 beq botch mov (r0),r0 br 1b 1: mov (sp)+,r0 rts pc / / whead: m.globl ctime., retrn, temp ctime.: temp .+2 sys time clr temp mov r0,temp+2 setd setl movif temp,fr0 mulf $44200,fr0 mov r1,temp+2 movif temp,fr1 addf fr1,fr0 movf fr0,temp jmp retrn from x1,y1 to x2,y2 arc.: temp .+2 jsr pc,garg mov r0,x mov r1,y cmp (r3)+,(r3)+ jsr pc,garg mov r0,x1 mov r1,y1 cmp (r3)+,(r3)+ jsr pc,garg mov r0,x2 mov r1,y2 movb $6,command mov f,r0 sys write; command; 13. sub $8.,r3 jmp retrn setfil: tst f bne 1f sys creat; vt; 17 bes 9f mov r0,f 1: rts pc garg: jsr pc,setfil mov 2(r3),r0 mov 2(r0),r0 mov 4(r3),r1 mov 2(r1),r1 ash $2,r0 ash $2,r1 sub $2048.,r0 sub $2048.,r1 rts pc 9: mov $1,r0 sys write; bmes; emes-bmes sys exit ov r0,-(sp) mov afout,r0 sys seek;0;0 /write pointer to 0 sys write;hblk;hsz mov (sp)+,r0 rts pc / datasz: 16384. headsz: hsz nbuf: numb nbuf2: numb2 b1s: .=.+numb2 b1e: .=.+ numb2 w1: .=.+ numb2 u1: .=.+ numb2 b1 = . / initl: mov r0,-(sp) mov r2,-(sp) sys open;asmem; 1 /open for write bec 2f sys creat;asmem; 606 bes err2 2: mov r0,afout 1: sys open; asmem; 0 /open for read bes err2 mov r0,afi 1: br gargs / err2: mov $1,r0 sys write; 1f; 2f-1f 4 1: 2: asmem: / / / fortran nice subroutine .globl nice. .globl retrn, temp nice.: temp .+2 mov $16.,r0 tst *2(sp) beq 1f mov 2(r3),r0 mov 2(r0),r0 1: sys nice jmp retrn frame: .byte 4,0 erase: .byte 1,1 .byte 0 vt: bmes: ; emes: .bss .=.+1 command:.=.+1 x: .=.+2 y: .=.+2 x1: .=.+2 y1: .=.+2 x2: .=.+2 y2: .=.+2 f: .=.+2  .even / gargs: mov $headers,r2 mov r2,r0 sub $hblk,r0 mov r0,hblk 1: add $8,r0 mov r0,(r2) add $8,r2 cmp r2,$strend-8. blo 1b clr -8(r2) / mov headsz,datadr add datasz,datadr / mov $frlist,r0 1: clr (r0)+ cmp r0,$frend blo 1b mov hblk,r2 add $hblk,r2 mov (r2),hblk clr w(r2) mov headsz,a(r2) mov datadr,l(r2) mov datasz,r0 jsr pc,log2 asl r0 cmp r0,$frend-frlist blo 9f; 4; 9: sub $hblk,r2 mov r2,frlist(r0) / / install plausible pointers to make octal dumps look ok / / / / openr, openw-- / / call open(r|w) (string, iunit) / or, / call open(r|w) (argno, iunit) / where argno is an argument number (0 is command name) .globl openr. .globl openw. .globl utable .globl btable .globl ftable .globl getbuf .globl fopen .globl fcreat openr.: temp .+2 mov pc,-(sp) br 1f openw.: temp .+2 clr -(sp) 1: mov 4(r3),r1 mov 2(r1),r1 jsr r5,chkunit tstb utable(r1) beq 1f jsr r5,rerr; 101. sys exit 1: jsr r5,getbuf mov 2(r3),r0 mov 2(r0),r0 cmp r0,$32. bhi 1f cmp r0,/ / / iabs fortran function .globl iabs. .globl retrn .globl temp iabs.: temp .+2 setl setd movif *2(r3),r0 absf r0 movfi r0,temp jmp retrn  function dclog(z1) double complex z1, z2, dclog double precision a,b,c double precision dummy(2) equivalence (a,z2,dummy(1)), (b,dummy(2)) z2=z1 c=dcabs(z2) b=datan2(b,a) a=dlog(c) dclog=z2 return end np+size; cp->size = np->size - size; cp->next = np->next; np->size = size; return(&np->next); } } asize = size<1024? 1024: size; if ((cp = sbrk(asize)) == -1) { return (-1); } cp->size = asize; free(&cp->next); } } free(aptr) char *aptr; { register logical ptr; register logical cp; register logical np; ptr = aptr-2; cp = freelist; while ((np = cp->next) < ptr) cp = np; if (ptr+ptr->size == np) { ptr->size =+ np->size; ptr->next = np->next; np = ptr; } elsr0 mov r1,*(r3)+ rts r3 .bss ndigix: .=.+2 width: .=.+2 formp: .=.+2 rjust: .=.+2 ndfnd: .=.+2 bufp: .=.+2 spaces: .=.+2 calloc(n, s) { return(alloc(n*s)); } e ptr->next = np; if (cp+cp->size == ptr) { cp->size =+ ptr->size; cp->next = ptr->next; } else cp->next = ptr; } .globl ndigit .globl _ieh305i ndigit: .=.+2 _ieh305i: .=.+2 int IEH0958g 0; tmpnam(s) char *s; { printf(-1,s,"pl%d%c",getpid(),'a'+IEH0958g++); return(s); } getchar() { extern cin; return (cgetc(cin)); } # include "ciodec.c" ungetc (c, fn) { struct fileps *fp; if (nargs() != 2) IEHzap("ungetc"); /* push back onto input */ fp = &IEH3fpts[fn]; if (fp->wrflag == 0) IEH3mbuf(fn,0); if (fp->bptr <= fp->buff - 100) IEH3err("ungetc/unprintf: buffer full file %d",fn); *--fp->bptr = c; fp->nchars++; } system(str) char *str; { int status; if(fork() == 0) execl("/bin/sh", "sh", "-c", str, 0); wait(&status); } # include "ciodec.c" cflush (fn) int fn; { struct fileps *fp; if (nargs() != 1) IEHzap("cflush"); if (fn < 0 || fn >15) return; fp = &IEH3fpts[fn]; if (fp->nchars > 0 && fp->wrflag >= 2) { write (fn, fp->buff,fp->nchars); fp->bptr = fp->buff; fp -> nchars = fp->eoferr = 0; } if (fp->wrflag == 1) seek(fn, -(fp->nchars),1); return; } _Ierr (message, a, b, c, d, e) char message[]; { extern int cgoof; printf("ERROR "); printf(message, a, b, c, d, e); cputc('\n'); cexit(cgoof); } char _Iendm[128] {0}; _Imtab (formatp) char **formatp; { /* make up special table of string ending characters */ int i, normal; char ch; /* normally all characters end string except those listed */ normal = 1; if (**formatp == '^') {normal = 0; (*formatp)++;} for (i= 0; i < 128; i++) _Iendm[i] = normal; while ((ch = *((*formatp)++)) != ']') _Iendm[ch] = relvec (ptr) { free(ptr); } / C library -- unprintf .globl _unprintf .globl ndigix .globl pfloat .globl pscien .globl _IEH3revp .globl _IEH3bcko _unprintf: mov r5,-(sp) mov sp,r5 mov 4(r5),formp / format mov r5,r4 add $6,r4 / arglist sub $128.,sp / buffer loop: movb *formp,r0 beq 1f inc formp cmp r0,$'% beq 2f 3: mov r4,-(sp) mov r0,-(sp) jsr pc,*$_IEH3revp tst (sp)+ mov (sp)+,r4 br loop 1: add $128.,sp mov (sp)+,r5 jsr pc,_IEH3bcko rts pc 2: clr rjust clr ndigix cmpb *formp,$'- bne 2f inc formp inc !_Iendm[ch]; } _Inxch () /* returns next character which is not _Ispce */ { extern int _Isfil, (*_Igetc)(); int ch; while ((ch = (*_Igetc)(_Isfil)) > 0 && _Ispce(ch)); if (ch > 0) return (ch); return (-1); } _Ispce (c) char c; { switch (c) { case ' ': case '\n': case '\t': return(1); } return(0); } _Ispnd (ch) char ch; { return (_Iendm[ch] > 0); } char *_Iinpt; int (*_Igetc)(), (*_Iungc)(); _Igstr () { extern char *_Iinpt; return (*_Iinpt++); } _Iungs(ch) { extern char *_Iinpt; *--_Iingetvec (n) { return (alloc(n)); } rjust 2: jsr r3,gnum; width clr ndfnd cmp r0,$'. bne 1f jsr r3,gnum; ndigix 1: mov sp,r3 mov $swtab,r1 1: mov (r1)+,r2 beq 3b cmp r0,(r1)+ bne 1b jmp (r2) swtab: decimal; 'd octal; 'o float; 'f scien; 'e charac; 'c string; 's logical; 'l 0; 0 decimal: mov (r4)+,r1 bge 1f neg r1 movb $'-,(r3)+ br 1f logical: mov (r4)+,r1 1: jsr pc,1f br prbuf 1: clr r0 div $10.,r0 mov r1,-(sp) mov r0,r1 beq 1f jsr pc,1b 1: mov (sp)+,r0 add $'0,r0 movb r0,(r3)+ rts pc charac: mopt = ch; } wdleng () /* returns number of bits in a machine integer */ /* written so kernighan can tell where he is running */ { int k, leng; k = leng = 1; while (k =<< 1) leng++; return (leng); } vb (r4)+,(r3)+ bne 1f dec r3 1: movb (r4)+,(r3)+ br prbuf string: mov ndigix,r1 1: mov (r4)+,r2 1: movb (r2)+,(r3)+ beq prbuf sob r1,1b br prbuf octal: mov (r4)+,r1 jsr pc,1f br prbuf 1: mov r1,-(sp) beq 1f ash $-3,r1 bic $!17777,r1 jsr pc,1b 1: mov (sp)+,r0 bic $!7,r0 add $'0,r0 movb r0,(r3)+ rts pc float: mov ndfnd,r2 jsr pc,pfloat br prbuf scien: mov ndfnd,r2 jsr pc,pscien br prbuf prbuf: cmp r3,sp blos 1f tstb -1(r3) bne 1f dec r3 br prbuf 1: mov sp,r2 mov r4,-(_Iint (iptr, length, numbase) int *iptr, length; { int n, minus, numdig; extern int _Isfil, (*_Iungc)(), (*_Igetc)(); int c, dval; n = minus = numdig = 0; switch ((c=_Inxch())) { case '-': minus = 1; case '+': break; default: (*_Iungc)(c,_Isfil); } while ((dval=_Idigt(c=((*_Igetc)(_Isfil)), numbase ) ) >= 0 && numdig++ < length) n = n*numbase + dval; (*_Iungc)(c,_Isfil); if (numdig == 0) return (-1); if (iptr == 0) return (0); *iptr = minus ? -n : n; return (1); } _Idigt (x, base) { switch (x)# /* * C library -- alloc/free */ #define logical char * struct fb { logical size; char *next; }; int freelist[] { 0, -1, }; logical slop 2; alloc(asize) logical asize; { register logical size; register logical np; register logical cp; if ((size = asize) == 0) return(0); size =+ 3; size =& ~01; for (;;) { for (cp=freelist; (np= cp->next) != -1; cp=np) { if (np->size>=size) { if (size+slop >= np->size) { cp->next = np->next; return(&np->next); } cp = cp->next = sp) mov $' ,-(sp) mov width,r1 sub r3,r1 clrb (r3)+ add r2,r1 mov r1,spaces ble 1f tst rjust bne 1f 2: jsr pc,*$_IEH3revp dec spaces bne 2b 1: mov r2,bufp 1: movb *bufp,(sp) beq 1f inc bufp jsr pc,*$_IEH3revp br 1b 1: tst spaces ble 1f tst rjust beq 1f mov $' ,(sp) 2: jsr pc,*$_IEH3revp dec spaces bne 2b 1: tst (sp)+ mov (sp)+,r4 jmp loop gnum: clr ndfnd clr r1 1: movb *formp,r0 inc formp sub $'0,r0 cmp r0,$9. bhi 1f inc ndfnd mul $10.,r1 add r0,r1 br 1b 1: add $'0, { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': return(x-'0'); case '8': case '9': if (base > 8) return(x - '0'); case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': if (base >10) return(x - 'a' + 10); case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': if (base > 10) return(x-'A' + 10); } return(-1); } _Ilong (dptr, length) double *dptr; int length; { char temp[75]; int _Inodg(); double x; double atof(); if (_Isstr(temp, length, _Inodg) < 0) return (-1); x = atof(temp); if (dptr == 0) return (0); *dptr = x; return (1); } _Isstr (sptr, length, stopf) char *sptr; int length, (*stopf)(); { int ch, initlen, _Inxch(); extern int _Isfil, (*_Igetc)(), (*_Iungc)(); initlen = length; if ((ch=_Inxch()) < 0) return (-1); (*_Iungc)(ch,_Isfil); while (!((*stopf)(ch=(*_Igetc)(_Isfil))) && length-- > 0) if (sptr != 0) *(sptr++) = ch; if (ch >= 0) (*_Iungc)(ch,_Isfil); if (length == initlen) return (-1); if (spt# define bufflen 100 IEH3revp (c) char c; { /* reversed line IEH3outputter */ extern char *IEH3outp, *IEH3outlim; *IEH3outp++ = c; if (IEH3outp > IEH3outlim+100) IEH3err("unprint producing too many chars"); } IEH3nodg (ch) char ch; { if (IEH3digt(ch)) return (0); switch (ch) { case 'E': case 'e': case '.': case '+': case '-': return (0); } return (1); } r == 0) return (0); *sptr = '\0'; return (1); } _Iestr (c) char c; { if (_Ispce(c)) return (1); if (c == '\0') return (1); return (0); } puts(str) char *str; { auto char *p,c; auto int f; extern int cout; if (nargs() != 1) IEHzap("puts "); p = str; while( (c = *p++)!= '\0') cputc(c,cout); cputc('\n',cout); return(str); } IEH3nxch () /* returns next character which is not IEH3spce */ { char ch, cgetc(); extern int IEH3sfil; while ((ch = cgetc(IEH3sfil)) > 0 && IEH3spce(ch)); if (ch > 0) return (ch); return (-1); } scanf (p1, p2, p3, p4) int p1, p2, p3, p4; { /* first arg can be a control string, a file id, or -1 */ int ptrs[10], j, ip, flp, k; char *np; /* extern int cin;*/ extern (*_Igetc)(), (*_Iungc)(), cgetc(), ungetc(), _Igstr(), _Iungs(); extern char *_Iinpt; ip = 0; if (p1 == -1) {k = 1; _Iinpt = p2;} else if (p1 >= 0 && p1 < 10) k = 0; else k = -1; if (k <= 0) {_Igetc = cgetc; _Iungc = ungetc;} else {_Igetc = _Igstr; _Iungc = _Iungs;} j = 0; for (np = (&p2)[k]; *np; np++) if (*np == '%' && *(putchar (c) char c; { extern cout; cputc(c,cout); } char IEH3endm[128] {0}; IEH3mtab (formatp) char **formatp; { /* make up special table of string ending characters */ int i, normal; char ch; /* normally all characters end string except those listed */ normal = 1; if (**formatp == '^') {normal = 0; (*formatp)++;} for (i= 0; i < 128; i++) IEH3endm[i] = normal; while ((ch = *((*formatp)++)) != ']') IEH3endm[ch] = !IEH3endm[ch]; } np+1) != '%' && *(np+1) != '*') ptrs[ip++] = (&p3)[(j++)+k]; return (_Iscan ((k==0 ? p1 : 0), (&p2)[k], ptrs)); } _Iscan (fileid, format, listp) char *format; int *listp; { char ch, _Inxch(); int nmatch; extern int _Isfil; _Isfil = fileid; nmatch = 0; while (1) switch (ch= *format++) { case '\0': return (nmatch); case '%': switch (_Isfrm(&format, *listp++)) { case 0: listp--; break; case -1: return (nmatch > 0 ? nmatch : -1); default: nmatch++; } case ' ': case '\n': case '\t':char *_ptrbf, *_ptrst, *__fmt; printf(a1,a2,a3,a4){ auto char c, *s, adj, *ptr,*p, buf[30]; extern cputc(),_putstr(), cout; auto int *adx, x, n, m, width, prec,i, padchar, fd; double zz, *dblptr; char (*f)(); _ptrbf = buf; fd=cout; adx = &a1; f = cputc; if (a1 == -1) { f = _putstr; _ptrst = a2; adx =+ 2; } else if (a1 >= 0 && a1 <= 9) fd = *adx++; __fmt = *adx++; while( c = *__fmt++ ){ if(c != '%') (*f)(c,fd); else { x = *adx++; if( *__fmt == '-' ){ adj = 'l'; __fmt++; } # include "ciodec.c" IEH3bsz 512; IEH3mbuf (fn, type) int fn, type; { struct fileps *fp; extern char *IEH3olbf[], *alloc(); extern int IEHfbak[10]; int bx[19], size, bloc; fp = &IEH3fpts[fn]; fp->eoferr = fp->nchars = 0; fp->wrflag = type+1; /* decide whether to buffer or not */ if (ttyn(fn) != 'x') size = 1; else if (fstat(fn,bx) > 0 && bx[0] == 40 && type == 0) size = 1; else size = IEH3bsz; for (fp->buff = 0; size >10 && fp->buff == 0; size =/ 4) if ((bloc = alloc(size+100)) != -1) { IEH3olbf[ break; default: if (ch != _Inxch()) return(nmatch); } } int _Isfil 0; _Ichar (cptr) char *cptr; { char ch, _Inxch(); if ((ch = _Inxch()) < 0) return (-1); if (cptr == 0) return (0); *cptr = ch; return (1); } _Iflot (fptr, length) float *fptr; int length; { char temp[75]; int _Inodg(); float x; double atof(); if (_Isstr(temp, length, _Inodg) < 0) return (-1); x = atof(temp); if (fptr == 0) return (0); *fptr = x; return (1); } _Inodg (ch) char ch; { if (_Idigt(ch,10) >= 0) return (0);  else adj = 'r'; padchar = (*__fmt=='0') ? '0' : ' '; width = __conv(); if( *__fmt == '.'){++__fmt; prec = __conv();} else prec = 0; s = 0; switch ( c = *__fmt++ ) { case 'D': case 'd': _prt1(x); break; case 'o': case 'O': _prnt8(x); break; case 'x': case 'X': _prntx(x); break; case 'S': case 's': s=x; break; case 'C': case 'c': *_ptrbf++ = x&0777; break; case 'E': case 'e': fn] = bloc; fp->buff = fp->bptr =bloc + 100; fp->bsize = size; break; } if (fp->buff == 0) { fp->buff = fp->bptr = &IEHfbak[fn]; fp->bsize = size>1 ? 2 : 1; } } struct fileps IEH3fpts [10]; int IEHfbak[10]; switch (ch) { case 'E': case 'e': case '.': case '+': case '-': return (0); } return (1); } _Isfrm (spec, pointer) char **spec; int pointer; { int length, lflag, _Iestr(), _Ispnd(); char ch; length = lflag = 0; while (1) switch (ch = *((*spec)++)) { case '*': pointer=0; break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': length = length*10 + ch - '0' ; lflag++; break; case 'o': /* octal */ return(_Iint(pointer, lflag ? length :  case 'F': case 'f': dblptr = adx-1; zz = *dblptr; adx =+ 3; ftoa (zz, buf, prec, c); prec = 0; s = buf; break; default: (*f)(c,fd); adx--; } if (s == 0) {*_ptrbf = '\0'; s = buf;} n = _clenf (s); n = (prec 0) (*f)(padchar,fd); while (n--) (*f)(*s++,fd); while (m-- > 0) (*f)(padchar,fd); _ptrbf = buf; } } if(a1 == -1) (*f)('\0',fd); } _prntgets (s) char *s; { /* gets (s) - read a string with cgetc and store in s */ char *p; extern int cin; if (nargs () == 2) IEHzap("gets "); p=s; while ((*s = cgetc(cin)) != '\n' && *s != '\0') s++; if (*p == '\0') return (0); *s = '\0'; return (p); } 100, 8)); case 'x': /* hex */ return(_Iint(pointer, lflag ? length : 100, 16)); case 'd': /* decimal */ return (_Iint(pointer, lflag ? length : 100, 10)); case 'c': /* character */ return (_Ichar(pointer)); case 's': /* string */ return (_Isstr(pointer, lflag ? length : 100, _Iestr)); case 'f': case 'e': /* float */ return (_Iflot(pointer, lflag ? length : 100)); case 'l': /* (long) double or int */ switch(*(*spec)++) { case 'f': case 'F': case 'e': case 'E': return (_Ilong 8 (n) { /* print in octal */ int p, k, sw; if (n==0) {*_ptrbf++ = '0'; return;} sw = 0; for (p=15; p >= 0; p =- 3) if ((k = (n>>p)&07) || sw) { *_ptrbf++ = '0' + k; sw = 1; } } _prntx (n) { int d,a; if (a = n>>4) _prntx ( a & 07777); d = n&017; *_ptrbf++ = d > 9 ? 'A'+d-10 : '0' + d; } __conv() { auto c,n; n = 0; while( ((c = *__fmt++) >= '0') && (c<='9')) n = n*10+c-'0'; __fmt--; return(n); } _putstr(chr,str){ *_ptrst++ = chr; return; ieh305i(); /* force loading of dummy.s */ } ftoa (x, str, prec, format) float x; char *str; { /* converts a floating point number to an ascii string */ /* x is stored into str, which should be at least 30 chars long */ int ie, i, k, ndig, fstyle; double y; if (nargs() != 7) IEHzap("ftoa "); ndig = ( prec<=0) ? 7 : (prec > 22 ? 23 : prec+1); if (format == 'f' || format == 'F') fstyle = 1; else fstyle = 0; /* print in e format unless last arg is 'f' */ ie = 0; /* if x negative, write minus and reverse */ if ( x < 0) { *str++ = '-'; x = -x; (pointer, lflag ? length : 100)); default: printf(2, "long not yet implemented\n"); return(0); } case '[': /* special strings */ _Imtab(spec); return (_Isstr (pointer, lflag ? length : 100, _Ispnd)); case '%': if (_Inxch() != '%') return (-1); return(0); case '\0': _Ierr("scanf: bad format termination\n"); default: _Ierr ("scanf: format character %c", ch); } } _prt1(n) { int digs[15], *dpt; dpt = digs; if (n >= 0) n = -n; else *_ptrbf++ = '-'; for (; n != 0; n = n/10) *dpt++ = n%10; if (dpt == digs) *dpt++ = 0; while (dpt != digs) { --dpt; *_ptrbf++ = '0' - *dpt; } }  } /* put x in range 1 <= x < 10 */ if (x > 0.0) while (x < 1.0) { x =* 10.0; ie--; } while (x >= 10.0) { x = x/10.0; ie++; } /* in f format, number of digits is related to size */ if (fstyle) ndig =+ ie; /* round. x is between 1 and 10 and ndig will be printed to right of decimal point so rounding is ... */ for (y = i = 1; i < ndig; i++) y = y/10.; x =+ y/2.; if (x >= 10.0) {x = 1.0; ie++;} /* repair rounding disasters */ /* now loop. put out a digit (obtain by multiplying by 10, truncating, subtracting) until enough digits out */ /* if fstyle, and leading zeros, they go out special */ if (fstyle && ie<0) { *str++ = '0'; *str++ = '.'; if (ndig < 0) ie = ie-ndig; /* limit zeros if underflow */ for (i = -1; i > ie; i--) *str++ = '0'; } for (i=0; i < ndig; i++) { k = x; *str++ = k + '0'; if (i == (fstyle ? ie : 0)) /* where is decimal point */ *str++ = '.'; x =- (y=k); x =* 10.0; } /* now, in estyle, put out exponent if not zero */ if (!fstyle && ie # include "ciodec.c" char cgetc(fn) { struct fileps *fp; if (nargs() != 1) IEHzap("cgetc "); if (fn <0 || fn >15) IEH3err("cgetc: %d illegal file number",fn); fp = &IEH3fpts[fn]; if (fp == 0 || fp->wrflag > 1) IEH3err("cgetc: %d not open to read",fn); if (fp->wrflag == 0) /* file not opened with fopen: try making a buffer */ IEH3mbuf (fn, 0); if (fp->eoferr > 1) return ('\0'); if (fp->nchars == 0) switch (fp->nchars = read(fn, fp->bptr=fp->buff, fp->bsize)) { case -1: /* error */ if (fp->eof->word; if(pf->prev&1) { pe--; pf->prev =& 0177776; } if(pfword = df-de; df = de; de =+2; } put() { if(lp>0) { *pe++ = c; if(pe>pmax) diag("Arg collection overflow"); } else putchar(c); } get() { char *p; int n; if(lg==0) c = getchar(); else while(1) { if(gf->marg!=0) { if((c = gf[gf->marg++])==0) gf->marg = 0; else return; } c = (p = gf->mframe)[gf->mchar++]; if(c!=dollar) return; n = p[g!= 0) { *str++ = 'E'; if (ie < 0) { ie = -ie; *str++ = '-'; } for (k=100; k > ie; k =/10); for (; k > 0; k =/10) { *str++ = ie/k + '0'; ie = ie%k; } } *str = '\0'; return; } err == 0) IEH3err("cgetc: error on %d",fn); fp->eoferr = 3; return ('\0'); case 0: fp->eoferr = 2; return ('\0'); } fp->nchars--; return (*(fp->bptr++)); } cin 0; f->mchar] - '0'; if(n<0 || n>9) return; ++gf->mchar; gf->marg = arg(n) - gf; } } cwrite (buff, buffp1, len, fn) char *buff, *buffp1; int len, fn; { int unit, nwr; unit = buffp1-buff; len =* unit; nwr = write (fn, buff, len); return (nwr < 0 ? -1 : nwr/unit); } cread (buff, buffp1, len, fn) char *buff, *buffp1; int len, fn; { int unit, nrd; unit = buffp1 - buff; len =* unit; nrd = read(fn, buff, len); return (nrd < 0 ? -1 : nrd/unit); } cexit (rcode) { /* closes all files and exits */ int i; for (i = 0; i < 10; i++) cclose(i); exit(rcode); /* rcode courtesy of sny */ } # #include "m6.h" doif() { int i; int *p; char *arg(); i = 1; while(!comp(arg(i),one)) if((i =+ 2)>8) return; p = arg(i+1) - 2; ge = move(p,&gf->ga0,p->word+1); setscan(dummy); } bindec(n) { if(n == 0) return; bindec(n/10); *ge++ = (n%10) + '0'; } result(n) { char *p; setscan(dummy); ge = 2 + (p = &gf->ga0); if(n<0) { *ge++ = '-'; n = -n; } if(n==0) *ge++ = '0'; else bindec(n); *ge++ = 0; ge = (ge+1)&0177776; p->word = ge - p; *ge++ = *ge++ = 0; } binop(code) { int r1# include "ciodec.c" char cputc(ch, fn) { struct fileps *fp; if (nargs() != 2) IEHzap("cputc "); if (fn<0 || fn>20) return(ch); fp = &IEH3fpts[fn]; if (fp->wrflag == 1) IEH3err("cputc: %d not open",fn); if (fp->wrflag == 0) IEH3mbuf(fn,1); *(fp->bptr++) = ch; if (++(fp->nchars) < fp->bsize) return(ch); if (fp->wrflag == 3) /* append, seek to end */ { seek(fn, 0, 2); fp->wrflag = 2; /* now just write from here on */ } if ( write(fn, fp->bptr=fp->buff, fp->nchars) < 0) { if (fp->eoferr == 0) IEHas tmga.s cmp a.out /usr/lib/tmga cp a.out /usr/lib/tmga as tmgc.s cmp a.out /usr/lib/tmgc cp a.out /usr/lib/tmgc chdir tmgb as any.s; mv a.out any.o as append.s; mv a.out append.o as arith.s; mv a.out arith.o as bundle.s; mv a.out bundle.o as char.s; mv a.out char.o as copy.s; mv a.out copy.o as cstr.s; mv a.out cstr.o as ctest.s; mv a.out ctest.o as decmal.s; mv a.out decmal.o as discd.s; mv a.out discd.o as emit.s; mv a.out emit.o as end.s; mv a.out end.o as f.s; mv a.out f.o as find.s; mv a.out find.o,r2; int r,t; int arg1, arg2; arg1 = decbin(1); arg2 = decbin(2); if(code < 7) /* relationals */ result((code & ((arg1ga0 = 0; return; case 13: /* exp */ r = 1; while(arg2-->0) r =* 3err("cputc: writing %d",fn); fp->eoferr = 3; } fp->nchars = 0; return (ch); } cout 1;  as getnam.s; mv a.out getnam.o as ignore.s; mv a.out ignore.o as inc.s; mv a.out inc.o as infix.s; mv a.out infix.o as jget.s; mv a.out jget.o as lvrv.s; mv a.out lvrv.o as mult.s; mv a.out mult.o as octal.s; mv a.out octal.o as params.s; mv a.out params.o as push.s; mv a.out push.o as putcal.s; mv a.out putcal.o as putdec.s; mv a.out putdec.o as putoct.s; mv a.out putoct.o as px.s; mv a.out px.o as reln.s; mv a.out reln.o as shift.s; mv a.out shift.o as stack.s; mv a.out stack.o as string.s; mv a.out striarg1; result(r); if(arg2<-1) gf->ga0 = 0; } } decbin(i) { char *s; char t; int n; if(t = (*(s = arg(i))=='-')) s++; n = 0; while(*s>='0' && *s<='9') n = 10*n + *s++ - '0'; return(t?-n:n); } dnl() { char d; d = 0; while(d=getchar()) if(d=='\n') return; } quote() { char *p,*s; p = finddef(1); s = &p[p->dtext]; while(c = *s++) put(); } list() { int n,i; char *p; if((n=decbin(1))<=0) return; p = df; for(i=1;;) { if(p<=d0) return; if(p->dswitch>=0) if(i++>=n) break; p =+copen (filename, type) char *filename; int type; { int fn; switch (type) { case 'r': type = 0; case 0: fn = open(filename,0); break; case 'a': type = 2; case 2: if ((fn=open(filename,1))>=0) break; /* courtesy of sny */ /* append defaults to write if file missing */ case 'w': type = 1; case 1: fn = creat(filename,0666); break; default: IEH3err("copen: bad file %s",filename); } if (fn >= 0) IEH3mbuf(fn,type); return(fn); } ng.o as table.s; mv a.out table.o as tq.s; mv a.out tq.o as trace.s; mv a.out trace.o as trans.s; mv a.out trans.o as tx.s; mv a.out tx.o as unary.s; mv a.out unary.o ar r /lib/tmgb *.o rm *.o chdir .. as - tmgl.s ld -s /usr/lib/tmga a.out /usr/lib/tmgb /usr/lib/tmgc -ls cmp a.out /usr/lib/tmg cp a.out /usr/lib/tmg /usr/lib/tmg tmgl.t x cmp x tmgl.s cp x tmgl.s rm a.out x  p->prev; } for(p = &p->dident;c = *p++;) put(); } copy() { char *p; p = finddef(1); remove(2); newdef(p->dswitch); setdef(arg(2),p+p->dtext); } go(n) { if(comp(arg(1),one)) { popget(); if(lg>0) if(n==26) popget(); else setscan(gf->mframe); /* gobk=27 */ } } size() { int i; char *p; i = 0; p = arg(1); while(*p++ != 0) i++; result(i); } meta() { char d; int i; char *arg(); if((d = *arg(2))!=0) { for(i=0;i0 && *s!=0) s++; while(arg3-->0) { if((*de++ = *s++)==0) return; if(de>dmax) diag("No room for substr"); } *de++ = 0; } struct fileps { char *buff, *bptr; int nchars, bsize; char eoferr, wrflag; }; extern struct fileps IEH3fpts[10]; # #include "m6.h" pushget() { ge = (ge+1)&0177776; ge->word = gf-ge; gf = ge; ge =+2; ++lg; } dotrace() { char *arg(); int i,j; printf("\n%d %c%s",lg,sharp,arg(0)); for(j=9;j>0&&*arg(j)==0;j--); for(i=1;i<=j;i++) printf("%c%c%s%c",comma,lquote,arg(i),rquote); printf("%c\n",c); } popget() { ge = gf; gf =+ gf->word; --lg; if(gfprev =| 1; pe++; } pe->word = pf-pe; pf = pe; pe =+2; } popput() { pe = pf; pf =+ pf@ C F I L O R U A #include "r.h" char scrat[500]; int brkptr -1; int brkstk[10]; int forptr 0; int forstk[10]; repcode() { outcont(0); yyval = genlab(); outcont(yyval); brkstk[++brkptr] = yyval+1; genlab(); genlab(); } untils(p1) int p1; { outnum(p1+1); outcode("\tif(.not."); balpar(scrat); outcode(scrat); outcode(")"); outgoto(p1); outcont(p1+2); brkptr--; } ifcode(p1) int p1; { outcode("\tif(.not."); balpar(scrat); outcode(scrat); outcode(")"); outgoto(yyval=genlab()); genlab(); } whilecode(p1) int "error at line %d, file %d: ",linect[ninclude],infile); printf( 2, s1,s2); printf( 2, "\n"); errorflag = 1; } errcode(p1) char *p1; { int c; extern int yychar; extern int linect[],ninclude,infile; printf( 2, "\nsyntax error, line %d, file %d\n", linect[ninclude],infile); while( (c=getc()) != ';' && c != '}' && c != '\n' && c != '\0' ); yychar = -1; errorflag = 1; } c rew: mov $60017,*$mtc clr mtapa rts pc .endif .if .mt.-1 tcdt = 177350 tccm = 177342 taper: mov $tcdt,r0 mov $tccm,r1 for: mov $3,(r1) / rbn for 1: tstb (r1) bge 1b tst (r1) blt rev cmp tapa,(r0) beq rd bgt for rev: mov $4003,(r1) / rbn bac 1: tstb (r1) bge 1b tst (r1) blt for mov (r0),r2 add $5,r2 cmp tapa,r2 blt rev br for rd: clr -(r0) / bus addr mov wc,-(r0) / wc mov $5,-(r0) / read 1: tstb (r1) bge 1b tst (r1) blt taper rts pc rew: mov $4003,tccm rts pc p1; { outcont(0); brkstk[++brkptr] = yyval = genlab(); genlab(); outnum(yyval); outcode("\tif(.not."); balpar(scrat); outcode(scrat); outcode(")"); outgoto(yyval+1); } whilestat(p1) int p1; { outgoto(p1); outcont(p1+1); brkptr--; } balpar(bp) char *bp; { int i, c, lpar; extern int peek; while( (c=getc()) == ' ' || c == '\t' || c=='\n' ); peek = c; if( c != '(' ){ error("missing left paren"); bp[0] = '\0'; return(bp); } for( lpar=i=0; (bp[i++]=c=getc())!='\0'; ){ if( c=='\'' || tcdt = 177350 tccm = 177342 tread: mov $tcdt,r0 mov $tccm,r1 for: mov $3,(r1) / rbn for 1: tstb (r1) bge 1b tst (r1) blt rev cmp tapa,(r0) beq rd bgt for rev: mov $4003,(r1) / rbn bac 1: tstb (r1) bge 1b tst (r1) blt for mov (r0),r2 add $5,r2 cmp tapa,r2 blt rev br for rd: mov ba,-(r0) / bus addr mov wc,-(r0) / wc mov $5,-(r0) / read 1: tstb (r1) bge 1b tst (r1) blt tread rts pc rew: mov $4003,tccm rts pc  .endif tvec: br putc br getc br mesg tks = 177560 tkb = 177562 getc: mov $tks,r0 inc (r0) 1: tstb (r0) bge 1b mov tkb,r0 bic $!177,r0 cmp r0,$'A blo 1f cmp r0,$'Z bhi 1f add $40,r0 1: cmp r0,$'\r bne putc mov $'\n,r0 tps = 177564 tpb = 177566 putc: tstb tps bge putc cmp r0,$'\n bne 1f mov $'\r,r0 jsr pc,(r5) mov $'\n+200,r0 jsr pc,(r5) clr r0 jsr pc,(r5) mov $'\n,r0 rts pc 1: mov r0,tpb rts pc mesg: movb *(sp),r0 beq 1f jsr pc,(r5) inc (sp) br mesg 1: add $2,(sp) bc=='"' ) while( (bp[i++]=getc()) != c ); if( i>=499 || c=='{' || c=='}' ){ error("missing right parenthesis at %.20s", bp); break; } if( c=='(' ) lpar++; else if( c==')' ) lpar--; if( lpar == 0 ) break; } bp[i] = '\0'; return(bp); } int labval 23000; genlab(){ return(++labval); } gokcode(p1) char *p1; { outcode("\t"); outcode(p1); eatup(p1,scrat); outcode(scrat); outcode(0); } eatup(p1,bp) char *p1, *bp; { extern int peek; int i,c,lnb,lpar; lnb = '\n'; while( c =as mcrt0.s cmp a.out /lib/mcrt0.o cp a.out /lib/mcrt0.o as makdir.s; mv a.out makdir.o as mcount.s; mv a.out mcount.o as mdate.s; mv a.out mdate.o as mknod.s; mv a.out mknod.o as mount.s; mv a.out mount.o as nargs.s; mv a.out nargs.o as nice.s; mv a.out nice.o as nlist.s; mv a.out nlist.o as open.s; mv a.out open.o as pipe.s; mv a.out pipe.o as printf.s; mv a.out printf.o as prof.s; mv a.out prof.o as ptrace.s; mv a.out ptrace.o as putc.s; mv a.out putc.o as putchr.s; mv a.out putchr.o as read.s; mv a.out ric $1,(sp) rts pc end: tapa: .=.+2 mtapa: .=.+2 mtma: .=.+2 wc: .=.+2 name: .=.+32.  *p1++ ) if( c!=' ' ) lnb = c; i = lpar = 0; more: for( ; (bp[i++]=c=getc())!=';' && c!='{' && c!='\n' && c!='}'; ){ if( i>=499 ){ error("statement too long at %.20s", bp); break; } if( c != ' ' && c != '\t' ) lnb = c; if( c=='\'' || c=='"' ) while( (bp[i++]=getc()) != c ); if( c=='(' ) lpar++; else if( c==')' ) { lpar--; if( lpar < 0 ) error("missing left paren at %.20s",bp); } } if( c == '\n' ){ if( lnb=='\n' || lnb=='+' || lnb=='-' || lnb=='*' || lnb=='ead.o as reset.s; mv a.out reset.o as sbrk.s; mv a.out sbrk.o as seek.s; mv a.out seek.o as setgid.s; mv a.out setgid.o as setuid.s; mv a.out setuid.o as signal.s; mv a.out signal.o as sleep.s; mv a.out sleep.o as stat.s; mv a.out stat.o as stime.s; mv a.out stime.o as stty.s; mv a.out stty.o as sync.s; mv a.out sync.o as time.s; mv a.out time.o as times.s; mv a.out times.o as umount.s; mv a.out umount.o as unlink.s; mv a.out unlink.o as wait.s; mv a.out wait.o as write.s; mv a.out write.o cc -c -O mon.c peas as1?.s ld -s -n a.out cmp a.out /bin/as cp a.out /bin/as as as2?.s ld -s -n a.out cmp a.out /lib/as2 cp a.out /lib/as2 rm a.out (' || lnb=='/' || lnb==',' || lnb=='&' || lnb=='|' || lnb=='=' ) goto more; c = ';'; } if( c!=';' ) peek = c; bp[i-1] = '\0'; if( lpar > 0 ) error("missing right paren at %.20s",bp); return(bp); } forcode(){ extern int peek; int i,j,c; char *bp, *getvec(); outcont(0); balpar(scrat); yyval = genlab(); genlab(); genlab(); brkstk[++brkptr] = yyval+1; if( scrat[0] == '\0' ){ forstk[forptr++] = bp = getvec(1); *bp = '\0'; return; } scrat[0] = '\t'; for( i=1; (c=scrat[i++])rror.c qsort.c cc -c -f -O rin.c ar r /lib/libc.a rm *.o / / / as9 -- PDP-11 assembler pass 2 eae = 0 .data symtab: / special variables dotrel: 02; dot:000000 /. 01; dotdot:000000 /.. / register 24;000000 /r0 24;000001 /r1 24;000002 /r2 24;000003 /r3 24;000004 /r4 24;000005 /r5 24;000006 /sp 24;000007 /pc .if eae /eae & switches 01;177570 /csw 01;177300 /div 01;177302 /ac 01;177304 /mq 01;177306 /mul 01;177310 /sc 01;177311 /sr 01;177312 /nor 01;177314 /lsh 01;177316 /ash .endif / system calls 01;0000001 /exit 01;0000002 /fork 01;0000003 /read 01;0!=';' && c!='\0' ; ) if( c=='\'' || c=='"' ) while( scrat[i++] != c ); scrat[i-1] = '\0'; if( nonblank(scrat) ){ outcode(scrat); outcode(0); } for( j=i; (c=scrat[i++])!=';' && c!='\0' ; ) if( c=='\'' || c=='"' ) while( scrat[i++] != c ); scrat[i-1] = '\0'; if( nonblank(&scrat[j]) ){ outnum(yyval); outcode("\tif(.not.("); outcode(&scrat[j]); outcode("))"); outgoto(yyval+2); } else outcont(yyval); for( j=0; scrat[i+1]!='\0'; ) scrat[j++] = scrat[i++]; scrat[j] = '\0'; fo/ tape boot program to load and transfer / to a 'tp' entry / entry is made by jsr pc,*$0 / so return can be rts pc / jsr pc,(r5) is putc / jsr pc,2(r5) is getc / jsr pc,4(r5) is mesg core = 24. .mt. = 1 .. = [core*2048.]-512. start: mov $..,sp mov $name,r4 mov sp,r1 cmp pc,r1 bhis 2f clr r0 cmp (r0),$407 bne 1f mov $20,r0 1: mov (r0)+,(r1)+ cmp r1,$end blo 1b jmp (sp) 2: jsr pc,rew mov $tvec,r5 mov $'=,r0 jsr pc,(r5) 2: mov r4,r1 1: jsr pc,2(r5) cmp r0,$'\n beq 1f cmp r0,$'@ beq 2b000004 /write 01;0000005 /open 01;0000006 /close 01;0000007 /wait 01;0000010 /creat 01;0000011 /link 01;0000012 /unlink 01;0000013 /exec 01;0000014 /chdir 01;0000015 /time 01;0000016 /makdir 01;0000017 /chmod 01;0000020 /chown 01;0000021 /break 01;0000022 /stat 01;0000023 /seek 01;0000024 /tell 01;0000025 /mount 01;0000026 /umount 01;0000027 /setuid 01;0000030 /getuid 01;0000031 /stime 01;0000034 /fstat 01;0000036 /mdate 01;0000037 /stty 01;0000040 /gtty 01;0000042 /nice 01;0000060 /signal / double operandrstk[forptr++] = bp = getvec(j+1); for(i=0; *bp++ = scrat[i++]; ); } forstat(p1) int p1; { char *bp, *q; int i; bp = forstk[--forptr]; outnum(p1+1); if( nonblank(bp) ){ outcode("\t"); outcode(bp); outcode(0); } outgoto(p1); outcont(p1+2); for( q=bp; *q++; ); relvec(bp, q-bp); brkptr--; } docode(new,p1) int new; char *p1; { outcode("\t"); outcode(p1); eatup(p1,scrat); yyval = 0; if(new){ yyval = genlab(); genlab(); brkstk[++brkptr] = yyval; outnum(yyval); } outcode(scrat); o movb r0,(r1)+ cmp r0,$'# bne 1b sub $2,r1 cmp r1,r4 blo 2b br 1b 1: clrb (r1) cmp r1,r4 blos start mov $1,tapa mov $-6144.,wc jsr pc,taper clr r1 1: mov r1,r2 mov r4,r0 2: cmpb (r0)+,(r1) bne 2f tstb (r1)+ bne 2b br 1f 2: mov r2,r1 add $64.,r1 cmp r1,$12288. blo 1b jsr pc,rew br start 1: mov 44.(r2),tapa mov 38.(r2),r0 inc r0 clc ror r0 neg r0 mov r0,wc clr r0 1: clr (r0)+ cmp r0,sp blo 1b jsr pc,taper jsr pc,rew clr r0 cmp (r0),$407 / unix a.out? bne 2f 1: mov  13;0010000 /mov 13;0110000 /movb 13;0020000 /cmp 13;0120000 /cmpb 13;0030000 /bit 13;0130000 /bitb 13;0040000 /bic 13;0140000 /bicb 13;0050000 /bis 13;0150000 /bisb 13;0060000 /add 13;0160000 /sub / branch 06;0000400 /br 06;0001000 /bne 06;0001400 /beq 06;0002000 /bge 06;0002400 /blt 06;0003000 /bgt 06;0003400 /ble 06;0100000 /bpl 06;0100400 /bmi 06;0101000 /bhi 06;0101400 /blos 06;0102000 /bvc 06;0102400 /bvs 06;0103000 /bhis 06;0103000 /bec 06;0103000 /bcc 06;0103400 /blo 06;0103400 /bcs 06;0103400 /butcode(0); } dostat(p1) int p1; { if( p1==0 ) return; outcont(p1); outcont(p1+1); brkptr--; } breakcode(p1) int p1; { if(brkptr<0){ error("illegal BREAK"); return; } outgoto(brkstk[brkptr]+1); } nextcode(p1) int p1; { if(brkptr<0){ error("illegal NEXT"); return; } outgoto(brkstk[brkptr]); } nonblank(s) char *s; { int c; while( c = *s++ ) if( c!=' ' && c!='\t' && c!='\n' ) return(1); return(0); } error(s1, s2) char *s1, *s2; { extern int linect[],ninclude,infile; printf( 2,20(r0),(r0)+ cmp r0,sp blo 1b 2: jsr pc,*$0 br start .if .mt. mts = 172520 mtc = 172522 mtbrc = 172524 mtcma = 172526 taper: clr mtma cmp mtapa,tapa beq 1f bhi 2f jsr pc,rrec br taper 2: jsr pc,rew br taper 1: mov wc,r1 1: jsr pc,rrec add $256.,r1 bmi 1b rts pc rrec: bit $2,*$mts bne rrec tstb *$mtc bge rrec mov $-512.,*$mtbrc mov mtma,*$mtcma mov $60003,*$mtc 1: tstb *$mtc bge 1b tst *$mtc bge 1f mov $-1,*$mtbrc mov $60013,*$mtc br rrec 1: add $512.,mtma inc mtapa rts pes / jump/ branch type 35;0000400 /jbr 36;0001000 /jne 36;0001400 /jeq 36;0002000 /jge 36;0002400 /jlt 36;0003000 /jgt 36;0003400 /jle 36;0100000 /jpl 36;0100400 /jmi 36;0101000 /jhi 36;0101400 /jlos 36;0102000 /jvc 36;0102400 /jvs 36;0103000 /jhis 36;0103000 /jec 36;0103000 /jcc 36;0103400 /jlo 36;0103400 /jcs 36;0103400 /jes / single operand 15;0005000 /clr 15;0105000 /clrb 15;0005100 /com 15;0105100 /comb 15;0005200 /inc 15;0105200 /incb 15;0005300 /dec 15;0105300 /decb 15;0005400 /neg 15;0105400 /negb 15;0005500 /adc 15;0105500 /adcb 15;0005600 /sbc 15;0105600 /sbcb 15;0005700 /tst 15;0105700 /tstb 15;0006000 /ror 15;0106000 /rorb 15;0006100 /rol 15;0106100 /rolb 15;0006200 /asr 15;0106200 /asrb 15;0006300 /asl 15;0106300 /aslb 15;0000100 /jmp 15;0000300 /swab / jsr 07;0004000 /jsr / rts 10;000200 /rts / simple operand 11;104400 /sys / flag-setting 01;0000241 /clc 01;0000242 /clv 01;0000244 /clz 01;0000250 /cln 01;0000261 /sec 01;0000262 /sev 01;0000264 /sez 01;0000270 /sen / floating point o)+,r3 mov (sp)+,r2 oprand: mov $exsw2,r5 1: cmp (sp),(r5)+ beq 1f tst (r5)+ bne 1b br eoprnd 1: jmp *(r5) exsw2: '+; exadd '-; exsub '*; exmul '/; exdiv 037; exor '&; exand 035;exlsh 036;exrsh '%; exmod '^; excmbin '!; exnot 200; 0 excmbin: mov r0,r3 br eoprnd exrsh: neg r1 beq exlsh inc r1 clc ror r2 exlsh: jsr r5,combin; relte2 als r1,r2 br eoprnd exmod: jsr r5,combin; relte2 mov r3,r0 mov r2,r3 clr r2 dvd r1,r2 mov r3,r2 mov r0,r3 br eoprnd exadd: jsr r5,comb../fx/fhd.s f31.s; mv a.out f31.o as ../fx/fhd.s f32.s; mv a.out f32.o as ../fx/fhd.s f33.s; mv a.out f33.o as ../fx/fhd.s f34.s; mv a.out f34.o as ../fx/fhd.s f35.s; mv a.out f35.o as ../fx/fhd.s f36.s; mv a.out f36.o as ../fx/fhd.s f37.s; mv a.out f37.o as ../fx/fhd.s f38.s; mv a.out f38.o as ../fx/fhd.s f39.s; mv a.out f39.o ld -r ../a.out *.o mv a.out .. rm *.o chdir ../f4 as ../fx/fhd.s f41.s; mv a.out f41.o as ../fx/fhd.s f42.s; mv a.out f42.o as ../fx/fhd.s f43.s; mv a.out f43.o as ../fx/fhd.s f44.sps 01;170000 / cfcc 01;170001 / setf 01;170011 / setd 01;170002 / seti 01;170012 / setl 15;170400 / clrf 15;170700 / negf 15;170600 / absf 15;170500 / tstf 12;172400 / movf 14;177000 / movif 05;175400 / movfi 14;177400 / movof 05;176000 / movfo 14;172000 / addf 14;173000 / subf 14;171000 / mulf 14;174400 / divf 14;173400 / cmpf 14;171400 / modf 14;176400 / movie 05;175000 / movei 15;170100 / ldfps 15;170200 / stfps 24;000000 / fr0 24;000001 / fr1 24;000002 / fr2 24;000003 / fr3 24;000004 / fr4 24;000005 / in; reltp2 add r1,r2 br eoprnd exsub: jsr r5,combin; reltm2 sub r1,r2 br eoprnd exand: jsr r5,combin; relte2 com r1 bic r1,r2 br eoprnd exor: jsr r5,combin; relte2 bis r1,r2 br eoprnd exmul: jsr r5,combin; relte2 mpy r2,r1 mov r1,r2 br eoprnd exdiv: jsr r5,combin; relte2 mov r3,r0 mov r2,r3 clr r2 dvd r1,r2 mov r0,r3 br eoprnd exnot: jsr r5,combin; relte2 com r1 add r1,r2 br eoprnd eoprnd: mov $'+,(sp) jmp advanc combin: tstb passno bne combin1 mov r0,-(sp) bis r3,(s; mv a.out f44.o as ../fx/fhd.s f45.s; mv a.out f45.o as ../fx/fhd.s f46.s; mv a.out f46.o as ../fx/fhd.s f47.s; mv a.out f47.o ld -r ../a.out *.o mv a.out .. rm *.o chdir ../fx as fhd.s fx1.s; mv a.out fx1.o as fhd.s fx2.s; mv a.out fx2.o as fhd.s fx3.s; mv a.out fx3.o as fhd.s fx4.s; mv a.out fx4.o as fhd.s fx5.s; mv a.out fx5.o as fhd.s fx6.s; mv a.out fx6.o as fhd.s fx7.s; mv a.out fx7.o as fhd.s fx8.s; mv a.out fx8.o as fhd.s fx9.s; mv a.out fx9.o as fhd.s fxa.s; mv a.out fxa.o as fhd.s fxb.s; mv a.oufr5 / 11/45 operations 30;072000 /als (ash) 30;073000 /alsc (ashc) 30;070000 /mpy .if eae-1 30;070000/ mul 30;071000 / div 30;072000 / ash 30;073000 /ashc .endif 30;071000 /dvd 07;074000 /xor 15;006700 /sxt 11;006400 /mark 31;077000 /sob / specials 16;000000 /.byte 20;000000 /.even 21;000000 /.if 22;000000 /.endif 23;000000 /.globl 25;000000 /.text 26;000000 /.data 27;000000 /.bss 32;000000 /.comm start: cmp (sp),$4 bge 1f jmp aexit 1: cmp (sp)+,$5 blt 1f mov $40,defund / globalize all undefinedp) bic $!40,(sp) bic $!37,r0 bic $!37,r3 cmp r0,r3 ble 1f mov r0,-(sp) mov r3,r0 mov (sp)+,r3 1: tst r0 beq 1f cmp (r5)+,$reltm2 bne 2f cmp r0,r3 bne 2f mov $1,r3 br 2f 1: tst (r5)+ clr r3 2: bis (sp)+,r3 rts r5 combin1: mov r1,-(sp) clr maxtyp jsr pc,maprel mov r0,r1 mpy $6,r1 mov r3,r0 jsr pc,maprel add (r5)+,r0 add r1,r0 movb (r0),r3 bpl 1f cmp r3,$-1 beq 2f jsr r5,error; 'r 2: mov maxtyp,r3 1: mov (sp)+,r1 rts r5 maprel: cmp r0,$40 bne 1f mov $5,r0 rts pc 1: bit fxb.o as fhd.s fxc.s; mv a.out fxc.o as fhd.s fxd.s; mv a.out fxd.o as fhd.s fxe.s; mv a.out fxe.o as fhd.s fxf.s; mv a.out fxf.o as fhd.s fxg.s; mv a.out fxg.o as fhd.s fxh.s; mv a.out fxh.o as fhd.s fxi.s; mv a.out fxi.o as fhd.s fxx.s; mv a.out fxx.o ld -r ../a.out *.o mv a.out .. rm *.o chdir .. ld -s a.out -l cmp a.out /usr/fort/fc1 cp a.out /usr/fort/fc1 rm a.out chdir io as io?.s mv a.out io.o ar r /lib/filib.a io.o rm io.o chdir ../rt as r0.s cmp a.out /lib/fr0.o cp a.out /lib/fr0.o as r1.s; mvs 1: tst (sp)+ mov (sp)+,a.tmp1 mov (sp)+,a.tmp2 mov (sp)+,a.tmp3 jsr r5,ofile; a.tmp1 movb r0,txtfil jsr r5,ofile; a.tmp2 movb r0,fbfil jsr r5,ofile; a.tmp3 movb r0,symf movb r0,fin sys creat; a.out; 0 bec 1f jsr r5,filerr; a.outp 1: movb r0,fout jmp go / overlaid buffer inbuf = start . = inbuf+512. c $!37,r0 cmp r0,maxtyp blos 1f mov r0,maxtyp 1: cmp r0,$5 blos 1f mov $1,r0 1: rts pc X = -2 M = -1 reltp2: .byte 0, 0, 0, 0, 0, 0 .byte 0, M, 2, 3, 4,40 .byte 0, 2, X, X, X, X .byte 0, 3, X, X, X, X .byte 0, 4, X, X, X, X .byte 0,40, X, X, X, X reltm2: .byte 0, 0, 0, 0, 0, 0 .byte 0, M, 2, 3, 4,40 .byte 0, X, 1, X, X, X .byte 0, X, X, 1, X, X .byte 0, X, X, X, 1, X .byte 0, X, X, X, X, X relte2: .byte 0, 0, 0, 0, 0, 0 .byte 0, M, X, X, X, X .byte 0, X, X, X, X, X .byte 0, X, X, X a.out r1.o as r2.s; mv a.out r2.o as r3.s; mv a.out r3.o as r4.s; mv a.out r4.o as r5.s; mv a.out r5.o as r6.s; mv a.out r6.o as r7.s; mv a.out r7.o as r8.s; mv a.out r8.o as r9.s; mv a.out r9.o as ra.s; mv a.out ra.o as rb.s; mv a.out rb.o as rc.s; mv a.out rc.o as rd.s; mv a.out rd.o as re.s; mv a.out re.o as rf.s; mv a.out rf.o as rg.s; mv a.out rg.o as rh.s; mv a.out rh.o as rx.s; mv a.out rx.o ar r /lib/filib.a *.o rm *.o chdir ../rt1 as abs.s; mv a.out abs.o as aimag.s; mv a.out aimag.o as aint.s; m/ / / as8 -- PDP-11 assembler pass 2 qnl: a.out: .even a.outp: a.out .data a.tmp1: 0 a.tmp2: 0 a.tmp3: 0 tseekp: txtseek rseekp: trelseek txtmagic: br .+20 txtsiz: .=.+2 datsiz: .=.+2 bsssiz: .=.+2 symsiz: .=.+2 stksiz: .=.+2 exorig: .=.+2 .=.+2 txtseek: 20 datseek:.=.+2 .=.+2 trelseek:.=.+2 drelseek:.=.+2 .=.+2 symseek:.=.+2 .bss brlen = 1024. brtab: .=.+[brlen\/8.] brtabp: .=.+2 brdelt: .=.+2 fbbufp: .=.+2 defund: .=.+2 savdot: .=.+6 datbase:.=.+2 bssbase:.=.+2 fbfil: .=.+2 f, X, X .byte 0, X, X, X, X, X .byte 0, X, X, X, X, X v a.out aint.o as alog.s; mv a.out alog.o as alog10.s; mv a.out alog10.o as amax0.s; mv a.out amax0.o as amax1.s; mv a.out amax1.o as amin0.s; mv a.out amin0.o as amin1.s; mv a.out amin1.o as amod.s; mv a.out amod.o as atan.s; mv a.out atan.o as atan2.s; mv a.out atan2.o as cabs.s; mv a.out cabs.o fc -c ccos.f as cexp.s; mv a.out cexp.o fc -c clog.f as cmplx.s; mv a.out cmplx.o as conjg.s; mv a.out conjg.o as cos.s; mv a.out cos.o fc -c csin.f fc -c csqrt.f as dble.s; mv a.out dble.o fc -c dccos.f fc -c dclin: .=.+2 ibufc: .=.+2 txtfil: .=.+2 symf: .=.+2 adrbuf: .=.+12. xsymbol:.=.+2 fout: .=.+2 ch: .=.+2 wordf: .=.+2 argb: .=.+22. line: .=.+2 savop: .=.+2 curfb: .=.+20. nxtfb: .=.+20. numval: .=.+2 maxtyp: .=.+2 relfil: .=.+2 ibufp: .=.+2 txtp: .=.+6+512. relp: .=.+6+512. swapf: .=.+2 rlimit: .=.+2 passno: .=.+2 endtable:.=.+2 usymtab:.=.+20. end: .text / / / as25 is empty og.f fc -c dcsin.f fc -c dcsqrt.f as dim.s; mv a.out dim.o as dimag.s; mv a.out dimag.o as exp.s; mv a.out exp.o as float.s; mv a.out float.o as iabs.s; mv a.out iabs.o as idim.s; mv a.out idim.o as idint.s; mv a.out idint.o as ierr.s; mv a.out ierr.o as ifix.s; mv a.out ifix.o as isign.s; mv a.out isign.o as mod.s; mv a.out mod.o as real.s; mv a.out real.o as sign.s; mv a.out sign.o as sin.s; mv a.out sin.o as sngl.s; mv a.out sngl.o as sqrt.s; mv a.out sqrt.o fc -c tanh.f ar r /lib/libf.a *.o rm *.o chdi/ / / a7 -- pdp-11 assembler expres: clr xsymbol expres1: mov r5,-(sp) mov $'+,-(sp) clr r2 mov $1,r3 br 1f advanc: jsr pc,readop 1: mov r4,r0 jsr r5,betwen; 0; 177 br .+4 br 7f movb (r4),r0 tst r0 bne 1f tstb passno beq 1f jsr r5,error; 'u 1: cmp r0,$40 bne 1f mov r4,xsymbol clr r1 br oprand 1: mov 2(r4),r1 br oprand 7: cmp r4,$141 blo 1f asl r4 mov curfb-[2*141](r4),r0 mov 2(r0),r1 movb (r0),r0 br oprand 1: mov $esw1,r1 1: cmp (r1)+,r4 beq 1f tst (r1)+ bne 1b tst (/ tty -- get tty number .globl ttyn clr r0 jsr pc,ttyn movb r0,nam mov $1,r0 sys write; name; 5 sys exit .data name: nam: .even r ../rt2 as ctime.s; mv a.out ctime.o as getarg.s; mv a.out getarg.o as nice.s; mv a.out nice.o as rand.s; mv a.out rand.o as setfil.s; mv a.out setfil.o as uio.s; mv a.out uio.o ar r /lib/libf.a rm *.o sp)+ mov (sp)+,r5 rts pc 1: jmp *(r1) esw1: '+; binop '-; binop '*; binop '/; binop '&; binop 037; binop 035; binop 036; binop '%; binop '[; brack '^; binop 1; exnum 2; exnum1 '!; binop 200; 0 binop: cmpb (sp),$'+ beq 1f jsr pc,errore 1: movb r4,(sp) br advanc exnum1: mov numval,r1 br 1f exnum: jsr pc,getw mov r4,r1 1: mov $1,r0 br oprand brack: mov r2,-(sp) mov r3,-(sp) jsr pc,readop jsr pc,expres1 cmp r4,$'] beq 1f jsr r5,error; '] 1: mov r3,r0 mov r2,r1 mov (spchdir f1 as ../fx/fhd.s f11.s; mv a.out f11.o as ../fx/fhd.s f12.s; mv a.out f12.o as ../fx/fhd.s f13.s; mv a.out f13.o as ../fx/fhd.s f14.s; mv a.out f14.o as ../fx/fhd.s f15.s; mv a.out f15.o as ../fx/fhd.s f16.s; mv a.out f16.o as ../fx/fhd.s f17.s; mv a.out f17.o ld -r *.o mv a.out .. rm *.o chdir ../f2 as ../fx/fhd.s f21.s; mv a.out f21.o as ../fx/fhd.s f22.s; mv a.out f22.o as ../fx/fhd.s f23.s; mv a.out f23.o as ../fx/fhd.s f24.s; mv a.out f24.o ld -r ../a.out *.o mv a.out .. rm *.o chdir ../f3 as / / / a4 -- pdp-11 assembler pass 2 oset: mov r2,-(sp) mov (r5)+,r1 mov r0,r2 bic $!777,r0 add r1,r0 add $6,r0 mov r0,(r1)+ / next slot mov r1,r0 add $1004,r0 mov r0,(r1)+ / buf max mov r2,(r1)+ / seek addr mov (sp)+,r2 rts r5 putw: mov r1,-(sp) mov r2,-(sp) mov (r5)+,r2 mov (r2)+,r1 / slot cmp r1,(r2) / buf max bhis 1f mov r0,(r1)+ mov r1,-(r2) br 2f 1: tst (r2)+ mov r0,-(sp) jsr r5,flush1 mov (sp)+,r0 mov r0,*(r2)+ add $2,-(r2) 2: mov (sp)+,r2 mov (sp)+,r1 rts r5 flush: mov (r5)+,r2 cmp (r2)+,(r2)+ flush1: mov (r2)+,r1 mov r1,0f / seek address mov fout,r0 sys indir; 9f .data 9: sys seek; 0:..; 0 .text bic $!777,r1 add r2,r1 / write address mov r1,0f mov r2,r0 bis $777,-(r2) inc (r2) / new seek addr cmp -(r2),-(r2) sub (r2),r1 neg r1 mov r1,0f+2 / count mov r0,(r2) / new next slot mov fout,r0 sys indir; 9f .data 9: sys write; 0:..; .. .text rts r5 readop: mov savop,r4 beq 1f clr savop rts pc 1: jsr pc,getw1 cmp r4,$200 blo 1f cmp r4,$4r0 jsr r5,putw; relp add $2,*rseekp add $2,*tseekp br 2f 1: mov txtp,r0 movb r2,-1(r0) 2: inc dot rts pc error: mov $666,outmod / make nonexecutable mov r3,-(sp) mov r2,-(sp) mov r1,-(sp) mov r0,-(sp) mov $argb,r1 1: movb (r1),ch beq 1f clrb (r1)+ mov $1,r0 sys write; ch; 1 br 1b 1: mov (r5)+,r0 movb r0,0f mov line,r3 mov $0f+6,r0 mov $4,r1 2: clr r2 dvd $10.,r2 add $'0,r3 movb r3,-(r0) mov r2,r3 sob r1,2b mov $1,r0 sys write; 0f; 7 mov (sp)+,r0 mov (sp)+,r1 mov (sp)+,rf = r5 i = r3 .globl j .globl succ .globl ctest,iget .globl string string: tst -(sp) jsr pc,iget 1: mov j(f),(sp) mov r0,-(sp) jsr pc,ctest mov (sp)+,r0 bcs 1b mov (sp)+,j(f) jmp succ 000 blo 2f add $usymtab-4000,r4 rts pc 2: add $symtab-1000,r4 1: rts pc getw: mov savop,r4 beq getw1 clr savop rts pc getw1: dec ibufc bgt 1f movb fin,r0 sys read; inbuf; 512. bes 3f asr r0 mov r0,ibufc bne 2f 3: mov $4,r4 sev rts pc 2: mov $inbuf,ibufp 1: mov *ibufp,r4 add $2,ibufp rts pc 2 mov (sp)+,r3 rts r5 .data 0: .even .text betwen: cmp r0,(r5)+ blt 1f cmp (r5)+,r0 blt 2f 1: tst (r5)+ 2: rts r5 / builtins for shift-reduce parsking f = r5 i = r3 g = r4 .globl succ,pbundle,goto,iget .globl g1 .globl stack,unstack,gotab,accept /stack label of present rule (state) /should come first in a rule stack: mov i,(g) sub $2,(g)+ jmp succ /unstack(n) deletes last n stacked states /states are distinguishable from translations in not having /an exit bit ($1) nor being bundles ($100000) unstack: jsr pc,iget mov (r0),r0 mov g,r1 1: bit -(r1),$100001 bne 1b dec r0 bge 1b tst (r1)+ br 1f accept: /c/ / / a3 -- pdp-11 assembler pass 2 assem: jsr pc,readop cmp r4,$5 beq 2f cmp r4,$'< beq 2f jsr pc,checkeos br eal1 mov r4,-(sp) cmp (sp),$1 bne 1f mov $2,(sp) jsr pc,getw mov r4,numval 1: jsr pc,readop cmp r4,$'= beq 4f cmp r4,$': beq 1f mov r4,savop mov (sp)+,r4 2: jsr pc,opline dotmax: tstb passno bne eal1 movb dotrel,r0 asl r0 cmp dot,txtsiz-4(r0) blos ealoop mov dot,txtsiz-4(r0) eal1: jmp ealoop 1: mov (sp)+,r4 cmp r4,$200 bhis 1f cmp r4,$2 beq 3f jsr r5,error; 'x .globl succ .globl .ng,.nt,.cm / ! .nt: tst (sp) beq 1f clr (sp) br 9f 1: mov $1,(sp) br 9f /unary - .ng: neg (sp) br 9f / ~ .cm: com (sp) 9: jmp succ lean out all states from stack mov f,r1 add $g1,r1 1: mov r1,r0 mov r1,-(sp) 1: cmp r1,g bge 2f bit (r1)+,$100001 beq 1b mov -2(r1),(r0)+ br 1b 2: mov r0,g mov (sp)+,r0 jsr pc,pbundle tst r0 beq 1f mov r0,(g)+ 1: jmp succ /gotab(s1,t1,s2,t2,...sn,tn,0,t) /checks top of stack for states /s1,s2,... and goes to t1, t2 accordingly /if top of stack is not in table, goes to t gotab: mov g,r0 1: bit -(r0),$100001 /find top state bne 1b mov (r0),-(sp) 1: jsr pc,iget tst (r0) beq 1f cmp (s br assem 1: tstb passno bne 2f movb (r4),r0 bic $!37,r0 beq 5f cmp r0,$33 blt 6f cmp r0,$34 ble 5f 6: jsr r5,error; 'm 5: bic $37,(r4) bis dotrel,(r4) mov 2(r4),brdelt sub dot,brdelt mov dot,2(r4) br assem 2: cmp dot,2(r4) beq assem jsr r5,error; 'p br assem 3: mov numval,r4 jsr pc,fbadv asl r4 mov curfb(r4),r0 movb dotrel,(r0) mov 2(r0),brdelt sub dot,brdelt mov dot,2(r0) br assem 4: jsr pc,readop jsr pc,expres mov (sp)+,r1 cmp r1,$symtab /test for dot bne 1f bic $40,r3 i = r3 .globl generate .globl obuild .globl .tx,.txs .txs: mov i,r0 tst (i)+ br 1f .tx: mov (i)+,r0 1: jsr pc,obuild jmp generate p),r0 beq 1f jsr pc,iget br 1b 1: tst (sp)+ jmp goto  cmp r3,dotrel / can't change relocation bne 2f cmp r3,$4 / bss bne 3f mov r2,dot br dotmax 3: sub dot,r2 bmi 2f mov r2,-(sp) 3: dec (sp) bmi 3f clr r2 mov $1,r3 jsr pc,outb br 3b 3: tst (sp)+ br dotmax 2: jsr r5,error; '. br ealoop 1: cmp r3,$40 bne 1f jsr r5,error; 'r 1: bic $37,(r1) bic $!37,r3 bne 1f clr r2 1: bisb r3,(r1) mov r2,2(r1) ealoop: cmp r4,$'\n beq 1f cmp r4,$'\e bne 9f rts pc 1: inc line 9: jmp assem checkeos: cmp r4,$'\n beq 1f cmp r4,$'; beq 1f cmpg = r4 .globl succ,iget .globl trans trans: jsr pc,iget mov r0,(g)+ jmp succ .globl .p,sprv .globl .sr,.sl / >> .sr: neg (sp) / << .sl: mov 4(sp),r1 clr r0 alsc (sp),r0 mov r1,4(sp) jmp .p  r4,$'\e beq 1f add $2,(sp) 1: rts pc fbadv: asl r4 mov nxtfb(r4),r1 mov r1,curfb(r4) bne 1f mov fbbufp,r1 br 2f 1: add $4,r1 2: cmpb 1(r1),r4 beq 1f tst (r1) bpl 1b 1: mov r1,nxtfb(r4) asr r4 rts pc i = r3 .globl putch,putoct .globl trswitch .globl trace trace: jsr pc,putch mov i,r0 jsr pc,putoct mov $'\n,r0 jsr pc,putch rts pc .data trswitch: 0 .globl .p,sprv .globl .eq,.ne,.lt,.le,.gt,.ge .eq: jsr pc,sprv cmp 4(sp),(sp) beq true br false .ne: jsr pc,sprv cmp 4(sp),(sp) bne true br false .lt: jsr pc,sprv cmp 4(sp),(sp) blt true br false .le: jsr pc,sprv cmp 4(sp),(sp) ble true br false .gt: jsr pc,sprv cmp 4(sp),(sp) bgt true br false .ge: jsr pc,sprv cmp 4(sp),(sp) bge true br false true: mov $1,4(sp) jmp .p false: clr 4(sp) jmp .p / / / a2 -- pdp-11 assembler pass 2 outw: cmp dot-2,$4 beq 9f bit $1,dot bne 1f add $2,dot tstb passno beq 8f clr -(sp) rol r3 adc (sp) asr r3 / get relative pc bit cmp r3,$40 bne 2f / external references mov $666,outmod / make nonexecutable mov xsymbol,r3 sub $usymtab,r3 asl r3 bis $4,r3 / external relocation br 3f 2: bic $40,r3 / clear any ext bits cmp r3,$5 blo 4f cmp r3,$33 / est. text, data beq 6f cmp r3,$34 bne 7f 6: jsr r5,error; 'r 7: mov $1,r3 / make absolute 4: f = r5 i = r3 .globl ek,ep,ek.fs,ep.fs,si,x,fs .globl generate .globl .tq,gpar .tq: mov (i)+,r0 mov i,si(f) mov ep(f),r1 mov ep(r1),ep.fs(f) mov ek(r1),ek.fs(f) mov si(r1),r1 asl r0 sub r0,r1 mov (r1),i add $fs,f clr x(f) jsr pc,generate jmp generate gpar: mov (i)+,r0 mov ep(f),r1 asl r0 add r0,si(r1) jmp generate .globl gq;gq=.tq f = r5 i = r3 .globl j,n .globl iget,jget .globl succ,fail .globl .px,.pxs .pxs: mov i,r0 tst (i)+ br 1f .px: jsr pc,iget 1: inc litc mov n(f),-(sp) mov j(f),-(sp) mov r0,-(sp) 2: tstb *(sp) beq 2f jsr pc,jget cmpb r0,*(sp) beq 1f tst (sp)+ mov (sp)+,j(f) mov (sp)+,n(f) jmp fail 1: clr n(f) inc (sp) inc j(f) br 2b 2: cmp (sp)+,(sp)+ mov (sp)+,n(f) jmp succ litc: 0  cmp r3,$2 blo 5f cmp r3,$4 bhi 5f tst (sp) bne 4f add dotdot,r2 br 4f 5: tst (sp) beq 4f sub dotdot,r2 4: dec r3 bpl 3f clr r3 3: asl r3 bis (sp)+,r3 mov r2,r0 jsr r5,putw; txtp add $2,*tseekp mov r3,r0 jsr r5,putw; relp add $2,*rseekp 8: rts pc 1: jsr r5,error; 'o clr r3 jsr pc,outb rts pc 9: jsr r5,error; 'x rts pc outb: cmp dot-2,$4 / test bss mode beq 9b cmp r3,$1 blos 1f jsr r5,error; 'r 1: tstb passno beq 2f mov r2,r0 bit $1,dot bne 1f jsr r5,putw; txtp clr .globl allocate,putword,putchar .globl iget .globl succ .globl table table: mov $10,r0 jsr pc,allocate mov r1,-(sp) clr r0 jsr pc,putword jsr pc,putword jsr pc,putword jsr pc,putchar jsr pc,iget mov (sp)+,(r0) jmp succ .globl putch,obuild .globl putoct putoct: mov r0,-(sp) bic $7,r0 bic r0,(sp) clc ror r0 ror r0 ror r0 beq 1f jsr pc,putoct 1: mov (sp)+,r0 add $'0,r0 jsr pc,putch rts pc .globl putch,obuild .globl putdec putdec: tst r0 bge 1f cmp r0,$100000 beq 2f mov r0,-(sp) mov $'-,r0 jsr pc,putch mov (sp)+,r0 neg r0 1: alsc $-16.,r0 dvd $10.,r0 beq 1f mov r1,-(sp) jsr pc,1b mov (sp)+,r1 1: mov r1,r0 add $'0,r0 jmp putch 2: mov $1f,r0 jmp obuild 1: <-32768\0>;.even .globl .p,sprv .globl .a,.s,.o,.n,.x / + .a: jsr pc,sprv add (sp),4(sp) br 9f / - .s: jsr pc,sprv sub (sp),4(sp) br 9f / | .o: jsr pc,sprv bis (sp),4(sp) br 9f / & .n: jsr pc,sprv com (sp) bic (sp),4(sp) br 9f / ^ exclusive or .x: jsr pc,sprv mov (sp),r0 xor r0,4(sp) 9: jmp .p .globl .f .globl succ .globl seekchar,getword .f: mov (sp),r0 mov r0,6(sp) mov 4(sp),r1 jsr pc,seekchar jsr pc,getword mov r0,(sp) mov $-1,2(sp) jmp succ f = r5 g = r4 .globl k .globl errcom .globl ktab,ktat .globl putcall,kput putcall: jsr pc,kput mov k(f),(g)+ rts pc kput: sub $2,k(f) mov k(f),r1 neg r1 mov r0,ktab(r1) cmp r1,$ktat bhis 1f rts pc 1: jsr r0,errcom ;.even .globl succ,.u,update .globl .ia,.ib,.da,.db /prefix ++ .ib: inc (sp) jmp .u /prefix -- .db: dec (sp) jmp .u /postfix++ .ia: inc (sp) jsr pc,update dec (sp) jmp succ /potsfix -- .da: dec (sp) jsr pc,update inc (sp) jmp succ .globl end / the driving tables ended just before here end: .globl succ .globl iget .globl push push: jsr pc,iget mov (r0),r2 mov r2,r1 1: mov r1,-(sp) jsr pc,iget mov (sp)+,r1 mov r0,-(sp) mov (r0),-(sp) dec r2 bgt 1b mov r1,-(sp) jsr pc,succ / preserve c bit from here on mov (sp)+,r2 1: mov (sp)+,*(sp)+ dec r2 bgt 1b rts pc /pass sret or fret back to invoking rule f = r5 .globl n .globl succ,iget .globl ignore ignore: jsr pc,iget mov (r0),n(f) jmp succ f=r5 g=r4 .globl ofile .globl dogen .globl succ .globl g1,k .globl emit emit: mov f,-(sp) add $g1,(sp) mov g,r1 1: /look for a translation cmp (sp),r1 bge 3f /none at all bit -(r1),$100001 beq 1b /move it to end of stak mov (r1)+,r0 1: cmp g,r1 ble 1f mov (r1),-2(r1) mov r0,(r1)+ br 1b 1: mov ofile,r0 jsr pc,dogen mov g,r1 1: cmp (sp),r1 /try to find prev value of k bge 1f /nothing more in this stack frame tst -(r1) bge 1b /this isnt a k pointer (negative) mov (r1),k(f) br 3f 1:f = r5 .globl iget .globl env,si .globl succ .globl params params: jsr pc,iget mov (r0),r0 asl r0 mov env(f),r1 add r0,si(r1) jmp succ i = r3 .globl putcall,kput,obuild .globl seekchar .globl getchar .globl outb, outw, outt .globl cfile, lfile, flush .globl iget .globl sptr .globl generate,succ .globl getnam getnam: mov $1f+1,r0 jsr pc,putcall jsr pc,iget mov (r0),r0 jsr pc,kput jsr pc,iget mov (r0),r0 jsr pc,kput jmp succ 1: cmp cfile,lfile beq 1f jsr pc,flush mov cfile,lfile 1: mov (i)+,r1 mov r1,-(sp) mov (i)+,r0 add $sptr,r0 jsr pc,seekchar 2: mov (sp),r1 mov outw,r2 1: jsr pc,getchar tst r0 beq 1f movb r0,out mov f,r0 /go back to prev stack frame mov k(r0),k(f) 3: tst (sp)+ jmp succ i = r3 .globl putcall,iget,kput,putoct .globl generate,succ .globl octal octal: mov $1f+1,r0 jsr pc,putcall jsr pc,iget mov (r0),r0 jsr pc,kput jmp succ 1: mov (i),r0 jsr pc,putoct jmp generate b(r2) inc r2 mov r2,outw cmp r2,$outt blt 1b / jsr pc,flush br 2b 1: tst (sp)+ jmp generate / / / a21 -- pdp-11 assembler pass 2 indir = 0 main: sys signal; 2; 1 ror r0 bcs 1f sys signal; 2; aexit 1: jmp start / set up sizes and origins go: / read in symbol table mov $usymtab,r1 1: jsr pc,getw bvs 1f add $14,symsiz / count symbols jsr pc,getw jsr pc,getw jsr pc,getw jsr pc,getw mov r4,r0 bic $!37,r0 cmp r0,$2 /text blo 2f cmp r0,$3 /data bhi 2f add $31,r4 /mark "estimated" mov r4,(r1)+ jsr pc,getw mov r4,(r1)+ br 3f 2: clr (r1)+ clr (r1)+ jsr pc,getw 3: j.globl .m,.q,.r .globl .p,sprv .m: jsr pc,sprv mov (sp),r0 mpy 4(sp),r0 mov r1,4(sp) br 1f .q: jsr pc,sprv mov 4(sp),r1 sxt r0 dvd (sp),r0 mov r0,4(sp) br 1f .r: jsr pc,sprv mov 4(sp),r1 sxt r0 dvd (sp),r0 mov r1,4(sp) 1: jmp .p i=r3 .globl lptr,rptr,sptr .globl succ,fail .globl iget .globl find,enter .globl seekchar,getword,getchar .globl putword,putchar,alterword .globl getcstr,rewcstr .globl length,rewind index=0 tablep=2 temp=4 which=6 framel=10 find: mov pc,-(sp) /which(sp) br 1f enter: clr -(sp) 1: jsr pc,rewcstr jsr pc,getcstr bne 1f tst (sp)+ jmp fail 1: clr -(sp) /temp(sp) jsr pc,iget mov (r0),-(sp) /tablep(sp) clr -(sp) /index(sp) right: add $rptr,index(sp) br 1f left: add $lptr,index(sp) 1: /get indexsr pc,setbrk br 1b 1: / read in f-b definitions mov r1,fbbufp movb fbfil,fin clr ibufc 1: jsr pc,getw bvs 1f add $31,r4 / "estimated" mov r4,(r1)+ jsr pc,getw mov r4,(r1)+ jsr pc,setbrk br 1b 1: mov r1,endtable mov $100000,(r1)+ / set up input text file; initialize f-b table jsr pc,setup / do pass 1 jsr pc,assem / prepare for pass 2 cmp outmod,$777 beq 1f jmp aexit 1: clr dot mov $2,dotrel mov $..,dotdot clr brtabp movb fin,r0 sys close jsr r5,ofile; a.tmp1 movb r0,fin cl.globl .lv,.rv .globl succ / unary & .lv: mov 2(sp),(sp) jmp succ / * .rv: mov (sp),2(sp) mov *2(sp),(sp) jmp succ  of next entry mov tablep(sp),r1 mov index(sp),r0 jsr pc,seekchar jsr pc,getword tst r0 beq nomore mov r0,index(sp) add $sptr,r0 jsr pc,seekchar jsr pc,rewcstr 1: /comparison loop mov tablep(sp),r1 jsr pc,getchar mov r0,-(sp) jsr pc,getcstr cmp r0,(sp)+ bgt right blt left tst r0 beq found br 1b nomore: /not in table tst which(sp) beq 1f tst (i)+ /exit from find add $framel,sp jmp fail 1: mov tablep(sp),r1 jsr pc,length mov r0,temp(sp) clr r0 jsr pc,putword /scratch word jsr ibufc jsr pc,setup inc passno inc bsssiz bic $1,bsssiz mov txtsiz,r1 inc r1 bic $1,r1 mov r1,txtsiz mov datsiz,r2 inc r2 bic $1,r2 mov r2,datsiz mov r1,r3 mov r3,datbase / txtsiz mov r3,savdot+2 add r2,r3 mov r3,bssbase / txtsiz+datsiz mov r3,savdot+4 asl r3 add $20,r3 mov r3,symseek / 2*txtsiz+2*datsiz+20 sub r2,r3 mov r3,drelseek / 2*txtsiz+datsiz sub r1,r3 mov r3,trelseek / txtsiz+datsiz+20 sub r2,r3 mov r3,datseek / txtsiz+20 mov $usymtab,r1 1: jsr pc,doreloc add $4,r1 cf = r5 .globl j,n .globl input .globl classtab .globl jget jget: inc jgetc 3: mov j(f),r1 mov r1,r0 bic $inpt-1,r0 bic r0,r1 cmp r0,inpr beq 1f inc readc mov r0,inpr mov input,r0 sys seek inpr: 1;0 sys read;inpb;inpt 2: cmp r0,$inpt bge 1f clrb inpb(r0) inc r0 br 2b 1: movb inpb(r1),r0 asl r0 bit n(f),classtab(r0) beq 1f inc j(f) inc r1 cmp r1,$inpt blt 1b br 3b 1: asr r0 rts pc inpt = 128. .bss inpb: . = .+inpt .data jgetc: 0 readc: 0 r pc,putword /left pointer jsr pc,putword /right mov index(sp),r0 jsr pc,seekchar mov temp(sp),r0 mov r0,index(sp) jsr pc,alterword jsr pc,rewcstr 1: /copy loop jsr pc,getcstr mov tablep(sp),r1 jsr pc,putchar tst r0 bne 1b found: jsr pc,iget mov index(sp),(r0) add $framel,sp jmp succ mp r1,endtable blo 1b clr r0 jsr r5,oset; txtp mov trelseek,r0 jsr r5,oset; relp mov $8.,r2 mov $txtmagic,r1 1: mov (r1)+,r0 jsr r5,putw; txtp dec r2 bne 1b jsr pc,assem /polish off text and relocation jsr r5,flush; txtp jsr r5,flush; relp / append full symbol table mov symf,r0 mov r0,fin sys seek; 0; 0; clr ibufc mov symseek,r0 jsr r5,oset; txtp mov $usymtab,r1 1: jsr pc,getw bvs 1f mov r4,r0 jsr r5,putw; txtp jsr pc,getw mov r4,r0 jsr r5,putw; txtp jsr pc,getw mov r4,r0 jsr r5,putw; txtp jsr pc,getw mov r4,r0 jsr r5,putw; txtp mov (r1)+,r0 jsr r5,putw; txtp mov (r1)+,r0 jsr r5,putw; txtp jsr pc,getw jsr pc,getw br 1b 1: jsr r5,flush; txtp jmp aexit .data aexit: mov a.tmp1,0f sys unlink; 0:.. mov a.tmp2,0f sys unlink; 0:.. mov a.tmp3,0f sys unlink; 0:.. sys chmod; a.out; outmod: 777 sys exit .text filerr: mov *(r5),r5 1: movb (r5)+,ch beq 1f mov $1,r0 sys write; ch; 1 br 1b 1: mov $1,r0 sys write; qnl; 2 jmp aexit doreloc: movb (r1),r0 bnuble operand ; 13;0010000 ; 13;0110000 ; 13;0020000 ; 13;0120000 ; 13;0030000 ; 13;0130000 ; 13;0040000 ; 13;0140000 ; 13;0050000 ; 13;0150000 ; 13;0060000 ; 13;0160000 / branch ; 06;0000400 ; 06;0001000 ; 06;0001400 ; 06;0002000 ; 06;0002400 ; 06;0003000 ; 06;0003400 ; 06;0100000 ; 06;0100400 ; 06;0101000 ; 06;0101400 ; 06;0102000 ; 06;0102400 ; 06;0103000 ; 06;0103000 ; 06;0103000 ; 06;0103400 ; 06;0103400 ; 06;0103400 / jump/branch type ; 35;0000400 ; 36;0001000 ; 36;0001400 ; 36;00020pc /overlay buffer inbuf = setup . =inbuf+512. .text bes 1f tst (r5)+ rts r5 1: jmp filerr 00 ; 36;0002400 ; 36;0003000 ; 36;0003400 ; 36;0100000 ; 36;0100400 ; 36;0101000 ; 36;0101400 ; 36;0102000 ; 36;0102400 ; 36;0103000 ; 36;0103000 ; 36;0103000 ; 36;0103400 ; 36;0103400 ; 36;0103400 / single operand ; 15;0005000 ; 15;0105000 ; 15;0005100 ; 15;0105100 ; 15;0005200 ; 15;0105200 ; 15;0005300 ; 15;0105300 ; 15;0005400 ; 15;0105400 ; 15;0005500 ; 15;0105500 ; 15;0005600 ; 15;0105600 ; 15;0005700 ; 15;0105700 ; 15;0006000 ; 15;0106000 ; 15;0006100 ; 15;0106100 ; 15;0037 .byte -14,141,142,143,144,145,146,147 .byte 150,151,152,153,154,155,156,157 .byte 160,161,162,163,164,165,166,167 .byte 170,171,172,-14,-26,-14,176,-14 .data namedone:.byte 0 a.tmp1: a.tmp2: a.tmp3: .even curfb: -1;-1;-1;-1;-1;-1;-1;-1;-1;-1 obufp: outbuf symend: usymtab .bss curfbr: .=.+10. savdot: .=.+6 bufcnt: .=.+2 hshsiz = 1553. hshtab: .=2*hshsiz+. pof: .=.+1 wordf: .=.+1 fin: .=.+1 fbfil: .=.+1 fileflg:.=.+1 errflg: .=.+1 ch: .=.+1 .even symbol/ / / a9 -- pdp-11 assembler pass 1 eae = 0 / key to types / 0 undefined / 1 absolute / 2 text / 3 data / 4 bss / 5 flop freg,dst (movfo, = stcfd) / 6 branch / 7 jsr / 10 rts / 11 sys / 12 movf (=ldf,stf) / 13 double operand (mov) / 14 flop fsrc,freg (addf) / 15 single operand (clr) / 16 .byte / 17 string (.ascii, "<") / 20 .even / 21 .if / 22 .endif / 23 .globl / 24 register / 25 .text / 26 .data / 27 .bss / 30 mul,div, etc / 31 sob / 32 .comm / 33 estimated text / 34 estimated data / 35 jbr / 36 jeq, 06200 ; 15;0106200 ; 15;0006300 ; 15;0106300 ; 15;0000100 ; 15;0000300 / jsr ; 07;0004000 / rts ; 010;000200 / simple operand ; 011;104400 / flag-setting ; 01;0000241 ; 01;0000242 ; 01;0000244 ; 01;0000250 ; 01;0000261 ; 01;0000262 ; 01;0000264 ; 01;0000270 / flo: .=.+8. obufc: .=.+2 outbuf: .=.+512. line: .=.+2 inbfcnt:.=.+2 ifflg: .=.+2 inbfp: .=.+2 nargs: .=.+2 curarg: .=.+2 opfound:.=.+2 savop: .=.+2 numval: .=.+2 nxtfb: .=.+4 usymtab:.=.+36. end: .text jne, etc .data symtab: / special variables <.\0\0\0\0\0\0\0>; dotrel:02; dot:000000 <..\0\0\0\0\0\0>; 01; dotdot:000000 / register ; 24;000000 ; 24;000001 ; 24;000002 ; 24;000003 ; 24;000004 ; 24;000005 ; 24;000006 ; 24;000007 .if eae /eae & switches ; 01;177570 ; 01;177300 ; 01;177302 ; 01;177304 ating point ops ; 01;170000 ; 01;170001 ; 01;170011 ; 01;170002 ; 01;170012 ; 15;170400 ; 15;170700 ; 15;170600 ; 15;170500 ; 12;172400 ; 14;177000 ; 05;175400 ; 14;177400 ; 05;176000 ; 14;172000 ; 14;173000 ; 14;171000 ; 14;174400 ; 01;177310 ; 01;177311 ; 01;177312 ; 01;177314 ; 01;177316 .endif / system calls ; 01;0000001 ; 01;0000002 ; 01;0000003 ; 01;0000004 ; 01;0000005 ; 01;0000006 ; 01;0000007 ; 01;0000010 ; 01;0000011 ; 01;0000012 ; 01;0000013 ; 01;0000014 ; 14;173400 ; 14;171400 ; 14;176400 ; 05;175000 ; 15;170100 ; 15;170200 ; 24;000000 ; 24;000001 ; 24;000002 ; 24;000003 ; 24;000004 ; 24;000005 / 11/45 operations ; 30;072000 ; 30;073000 ; 30;070000 .if eae-1 ; 30;070000 ; 30;071000 ; 30;072000 ; 01;0000015 ; 01;0000016 ; 01;0000017 ; 01;0000020 ; 01;0000021 ; 01;0000022 ; 01;0000023 ; 01;0000024 ; 01;0000025 ; 01;0000026 ; 01;0000027 ; 01;0000030 ; 01;0000031 ; 01;0000034 ; 01;0000036 ; 01;0000037 ; 01;0000040 ; 01;0000042 ; 01;0000060 / do0>; 30;073000 .endif ; 30;071000 ; 07;074000 ; 15;006700 ; 11;006400 ; 31;077000 / specials <.byte\0\0\0>; 16;000000 <.even\0\0\0>; 20;000000 <.if\0\0\0\0\0>; 21;000000 <.endif\0\0>; 22;000000 <.globl\0\0>; 23;000000 <.text\0\0\0>; 25;000000 <.data\0\0\0>; 26;000000 <.bss\0\0\0\0>; 27;000000 <.comm\0\0\0>; 32;000000 ebsymtab: start: sys signal; 2; 1 ror r0 bcs 1f sys signal; 2; aexit 1: mov sp,r5 mov (r5)+,r0 cmpr5 1: cmp (sp),(r5)+ beq 1f tst (r5)+ bne 1b br eoprnd 1: jmp *(r5) exsw2: '+; exadd '-; exsub '*; exmul '/; exdiv 037; exor '&; exand 035;exlsh 036;exrsh '%; exmod '!; exnot '^; excmbin 0; 0 excmbin: mov r0,r3 / give left flag of right br eoprnd exrsh: neg r1 beq exlsh inc r1 clc ror r2 exlsh: jsr r5,combin; 0 als r1,r2 br eoprnd exmod: jsr r5,combin; 0 mov r1,-(sp) mov r2,r1 clr r0 dvd (sp)+,r0 mov r1,r2 br eoprnd exadd: jsr r5,combin; 0 add r1,r2 br eoprnd exsub: jsr r5,combin; 1 sub r1,r2 br eoprnd exand: jsr r5,combin; 0 com r1 bic r1,r2 br eoprnd exor: jsr r5,combin; 0 bis r1,r2 br eoprnd exmul: jsr r5,combin; 0 mpy r2,r1 mov r1,r2 br eoprnd exdiv: jsr r5,combin; 0 mov r1,-(sp) mov r2,r1 clr r0 dvd (sp)+,r0 mov r0,r2 br eoprnd exnot: jsr r5,combin; 0 com r1 add r1,r2 br eoprnd eoprnd: mov $'+,(sp) jmp advanc combin: mov r0,-(sp) bis r3,(sp) bic $!40,(sp) bic $!37,r0 bic $!37,r3 cmp r0,r3 ble 1f mov r0,-(sp) mov r3,/ / / a5 -- pdp-11 assembler pass 1 readop: mov savop,r4 beq 1f clr savop rts pc 1: jsr pc,8f jsr pc,putw rts pc 8: jsr pc,rch _readop: mov r0,r4 movb chartab(r0),r1 bgt rdname jmp *1f-2(r1) fixor escp 8b retread dquote garb squote rdname skip rdnum retread string 1: escp: jsr pc,rch mov $esctab,r1 1: cmpb r0,(r1)+ beq 1f tstb (r1)+ bne 1b rts pc 1: movb (r1),r4 rts pc esctab: .byte '/, '/ .byte '\<, 035 .byte '>, 036 .byte '%, 037 .byte 0, 0 fixor: mov $037,r4 3: mov (sp),r0 jsr pc,allocate mov 2(sp),r0 jsr pc,copy jsr pc,swap jsr pc,release mov 2(sp),r1 br 1b 1: mov (sp)+,r0 mov (sp)+,r1 rts pc / reset: mov r3,-(sp) mov r2,-(sp) clr r3 1: cmp r3,nbuf bge 1f mov r3,r2 asl r2 mov $-1.,w1(r2) clr b1s(r2) clr b1e(r2) clr u1(r2) inc r3 br 1b 1: clr flag mov (sp)+,r2 mov (sp)+,r3 rts pc / r0 mov (sp)+,r3 1: tst r0 beq 1f tst (r5)+ beq 2f cmp r0,r3 bne 2f mov $1,r3 br 2f 1: tst (r5)+ clr r3 2: bis (sp)+,r3 rts r5 retread: rts pc rdname: movb r0,ch cmp r1,$'0 blo 1f cmp r1,$'9 blos rdnum 1: jmp rname rdnum: jsr pc,number br 1f rts pc squote: jsr pc,rsch br 1f dquote: jsr pc,rsch mov r0,-(sp) jsr pc,rsch swab r0 bis (sp)+,r0 1: mov r0,numval mov $1,r4 jsr pc,putw mov numval,r4 jsr pc,putw mov $1,r4 tst (sp)+ rts pc skip: jsr pc,rch mov r0,r4 cmp r0,$'\e beq 1f cmp r0,$'\n bne skip 1: rts pc garb: jsr r5,error; 'g br 8b string: mov $'<,r4 jsr pc,putw clr numval 1: jsr pc,rsc...alloc1.sMalloc2.sOalloc3.saltch.sbsp.sbword.sgetch.sgetwd.slength.srewind.szero.sa.outrunalloc.oaltch.obsp.obword.ogetch.ogetwd.olength.orewind.ozero.o/ / / a6 -- pdp-11 assembler pass 1 opline: mov r4,r0 jsr r5,betwen; 0; 200 br 1f cmp r0,$'< bne xpr jmp opl17 xpr: jsr pc,expres add $2,dot rts pc 1: movb (r4),r0 cmp r0,$24 beq xpr jsr r5,betwen; 5; 36 br xpr mov r0,-(sp) jsr pc,readop mov (sp)+,r0 asl r0 jmp *1f-12(r0) 1: opl13 / map fop freg,fdst to double opl6 opl7 opl10 opl11 opl13 / map fld/fst to double opl13 opl13 / map fop fsrc,freg to double opl15 opl16 opl17 opl20 opl21 opl22 opl23 xpr opl25 opl26 opl27h tst r1 bne 1f mov r0,r4 bis $400,r4 jsr pc,putw inc numval br 1b 1: mov $-1,r4 jsr pc,putw mov $'<,r4 tst (sp)+ rts pc rsch: jsr pc,rch cmp r0,$'\e beq 4f cmp r0,$'\n beq 4f clr r1 cmp r0,$'\\ bne 3f jsr pc,rch mov $schar,r2 1: cmpb (r2)+,r0 beq 2f tstb (r2)+ bpl 1b rts pc 2: movb (r2)+,r0 clr r1 rts pc 3: cmp r0,$'> bne 1f inc r1 1: rts pc 4: jsr r5,error; '< jmp aexit schar: .byte 'n, 012 .byte 't, 011 .byte 'e, 004 .byte '0, 000 .byte 'r, 015 .byte 'a, 006   opl13 / map mul s,r to double opl31 opl32 xpr xpr opl35 opl36 / jbr opl35: mov $4,-(sp) br 1f / jeq, etc opl36: mov $6,-(sp) 1: jsr pc,expres cmp r3,dotrel bne 1f sub dot,r2 bge 1f cmp r2,$-376 blt 1f mov $2,(sp) 1: add (sp)+,dot rts pc /double opl13: opl7: jsr pc,addres op2: cmp r4,$', beq 1f jsr pc,errora rts pc 1: jsr pc,readop opl15: / single operand jsr pc,addres add $2,dot rts pc opl31: / sob jsr pc,expres cmp r4,$', beq 1f jsr pc,errora 1: jsr pc,readop /bra.byte 'p, 033 .byte 0, -1 #define NDIM 10 #define NTAB 601 char *dfile "/usr/lib/units"; char *unames[NDIM]; double getflt(); int fperr(); struct unit { double factor; char dim[NDIM]; }; struct table { double factor; char dim[NDIM]; char *name; } table[NTAB]; char names[NTAB*10]; struct prefix { double factor; char *pname; } prefix[] { 1e-18, "atto", 1e-15, "femto", 1e-12, "pico", 1e-9, "nano", 1e-6, "micro", 1e-3, "milli", 1e-2, "centi", 1e-1, "deci", 1e1, "deka", 1e2, "hecta", 1e2, "hecto", 1e3, "kilo", 1e6, "nch opl6: opl10: opl11: jsr pc,expres add $2,dot rts pc / .byte opl16: jsr pc,expres inc dot cmp r4,$', bne 1f jsr pc,readop br opl16 1: rts pc / < (.ascii) opl17: add numval,dot jsr pc,readop rts pc /.even opl20: inc dot bic $1,dot rts pc /.if opl21: jsr pc,expres tst r3 bne 1f jsr r5,error; 'U 1: tst r2 bne opl22 inc ifflg opl22: /endif rts pc /.globl opl23: cmp r4,$200 blo 1f bisb $40,(r4) jsr pc,readop cmp r4,$', bne 1f jsr pc,readop br opl23 1: rts pc opl25: opl26.globl plausible .globl lookchar .globl wc .globl seekchar .globl putchar .globl allocate .globl release .globl stats .globl w,r,a,l .globl bufchar .globl copy .globl getbuf .globl swap .globl fixct / / routine to copy the contents of one string / to another. / / mov source,r0 / mov dest,r1 / jsr pc,copy / mov r1,... / / on return, r1 points to the new string and should / be saved. r0 is preserved. / copy: mov r0,-(sp) mov r2,-(sp) mov r3,-(sp) jsr pc,wc 1: jsr pc,reset mov w(r0),r2 sub a(r0),r2 /W-Amega", 1e6, "meg", 1e9, "giga", 1e12, "tera", 0.0, 0 }; int ibuf[259]; int fperrc; int peekc; int dumpflg; main(argc, argv) char *argv[]; { register i; register char *file; struct unit u1, u2; double f; if(argc>1 && *argv[1]=='-') { argc--; argv++; dumpflg++; } file = dfile; if(argc > 1) file = argv[1]; if(fopen(file, ibuf) < 0) { printf("no table\n"); exit(); } ldfps(07600); /* interrupt on fp errors */ signal(8, fperr); init(); close(ibuf[0]); ibuf[0] = 0; loop: fperrc =: opl27: mov dotrel,r1 asl r1 mov dot,savdot-4(r1) mov savdot-[2*25](r0),dot asr r0 sub $25-2,r0 mov r0,dotrel rts pc / .common opl32: cmp r4,$200 blo 1f bis $40,(r4) jsr pc,readop cmp r4,$', bne 1f jsr pc,readop jsr pc,expres rts pc 1: jsr r5,error; 'x rts pc addres: cmp r4,$'( beq alp cmp r4,$'- beq amin cmp r4,$'$ beq adoll cmp r4,$'* beq astar getx: jsr pc,expres cmp r4,$'( bne 2f jsr pc,readop jsr pc,expres jsr pc,checkreg jsr pc,checkrp add $2,dot clr r0 rts pc 2 mov l(r1),r3 sub a(r1),r3 /L-A cmp r2,r3 ble 1f jsr pc,release mov r2,r0 jsr pc,allocate mov 4(sp),r0 / 1: mov a(r1),w(r1) /rewind w pointer mov a(r0),-(sp) / 4: mov (sp),0f mov afi,r0 sys seek;0:.. ;0 /set input pointer cmp r2,$512. ble 2f mov $512.,r3 /# output this time mov r3,0f mov r3,3f add r3,(sp) sub r3,r2 /# left to output br 1f / 2: mov r2,0f mov r2,3f mov r2,r3 clr r2 / 1: mov afi,r0 sys read;b1;0:.. bes bad cmp r0,r3 bne bad mov afout,r0 mov (r1),0f add r3,(r1) sys 0; printf("you have: "); if(convr(&u1)) goto loop; if(fperrc) goto fp; loop1: printf("you want: "); if(convr(&u2)) goto loop1; for(i=0; i 2: .even / / wc: mov r1,-(sp) mov r2,-(sp) mov r3,-(sp) clr r3 1: cmp r3,nbuf bge 1f mov r3,r2 asl r2 tst w1(r2) ble 2f mov r3,r1 ashc $9.,r1 bic $777,r1 add $b1,r1 jsr pc,er struct unit *p; register f, i; p = up; printf("\t%e ", p->factor); f = 0; for(i=0; idim[i], i, f); if(f&1) { putchar('/'); f = 0; for(i=0; idim[i], i, f); } putchar('\n'); } pu(u, i, f) { if(u > 0) { if(f&2) putchar('-'); if(unames[i]) printf("%s", unames[i]); else printf("*%c*", i+'a'); if(u > 1) putchar(u+'0'); return(2); } if(u < 0) return(1); return(0); } convr(up) struct unit *up; { register struct unit jsr r5,error; '* 1: jsr pc,addres add r0,dot rts pc errora: jsr r5,error; 'a rts pc checkreg: cmp r2,$7 bhi 1f cmp r3,$1 beq 2f cmp r3,$4 bhi 2f 1: jsr pc,errora 2: rts pc errore: jsr r5,error; 'e rts pc checkrp: cmp r4,$') beq 1f jsr r5,error; ') rts pc 1: jsr pc,readop rts pc clean 2: inc r3 br 1b 1: jsr pc,whead mov (sp)+,r3 mov (sp)+,r2 mov (sp)+,r1 rts pc swap: mov w(r1),-(sp) mov w(r0),w(r1) mov (sp),w(r0) mov r(r1),(sp) mov r(r0),r(r1) mov (sp),r(r0) mov a(r1),(sp) mov a(r0),a(r1) mov (sp),a(r0) mov l(r1),(sp) mov l(r0),l(r1) mov (sp)+,l(r0) rts pc / / / / / / mov position,r0 / mov ...,r1 / jsr pc,seekchar / seekchar: mov r1,-(sp) mov r0,-(sp) 1: mov (sp),r0 add a(r1),r0 cmp r0,l(r1) bhi 3f mov r0,r(r1) cmp r0,w(r1) blo 1f mov r0,w(r1) br 1f  *p; register c; register char *cp; char name[20]; int den, err; p = up; for(c=0; cdim[c] = 0; p->factor = getflt(); if(p->factor == 0.) p->factor = 1.0; err = 0; den = 0; cp = name; loop: switch(c=get()) { case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case '-': case '/': case ' ': case '\t': case '\n': if(cp != name) { *cp++ = 0; cp = name; err =| lookup(cp, p, den, c); } if(c == '/') den++; if(c == '\n') return(err); goto loop; } *cp++ = c; goto loop; } lookup(name, up, den, c) char *name; struct unit *up; { register struct unit *p; register struct table *q; register i; char *cp1, *cp2; double e; p = up; e = 1.0; loop: q = hash(name); if(q->name) { l1: if(den) { p->factor =/ q->factor*e; for(i=0; idim[i] =- q->dim[i]; } else { p->factor =* q->factor*e; for(i=0; idim[i] =+ q->dim[i]; } if(c >= '2' && c <= '9') { c--;1,041, /*A*/ 076,041,076,041,041,076, /*B*/ 036,041,040,040,041,036, /*C*/ 076,041,041,041,041,076, /*D*/ 077,040,076,040,040,077, /*E*/ 077,040,076,040,040,040, /*F*/ 036,041,040,047,041,036, /*G*/ 041,041,077,041,041,041, /*H*/ 004,004,004,004,004,004, /*I*/ 001,001,001,001,041,036, /*J*/ 041,042,074,044,042,041, /*K*/ 040,040,040,040,040,077, /*L*/ 041,063,055,041,041,041, /*M*/ 041,061,051,045,043,041, /*N*/ 036,041,041,041,041,036, /*O*/ 076,041,041,076,040,040, /*P*/ 036,041,041,045,04 mov r5,r1 clr r0 2: movb r0,ch mov r1,r0 mov (sp)+,r5 mov (sp)+,r3 mov (sp)+,r2 rts pc 1: mov r0,r3 mov r5,r0 jsr pc,fbcheck add $141,r0 cmp r3,$'b beq 1f add $10.,r0 1: mov r0,r4 mov (sp)+,r5 mov (sp)+,r3 mov (sp)+,r2 add $2,(sp) rts pc rch: movb ch,r0 beq 1f clrb ch rts pc 1: dec inbfcnt blt 2f movb *inbfp,r0 inc inbfp bic $!177,r0 beq 1b rts pc 2: movb fin,r0 beq 3f sys read; inbuf;512. bcs 2f tst r0 beq 2f mov r0,inbfcnt mov $inbuf,inbfp br 1b 2: movb fin,r0  goto l1; } return(0); } for(i=0; cp1 = prefix[i].pname; i++) { cp2 = name; while(*cp1 == *cp2++) if(*cp1++ == 0) { cp1--; break; } if(*cp1 == 0) { e =* prefix[i].factor; name = cp2-1; goto loop; } } for(cp1 = name; *cp1; cp1++); if(cp1 > name+1 && *--cp1 == 's') { *cp1 = 0; goto loop; } printf("cannot recognize %s\n", name); return(1); } equal(s1, s2) char *s1, *s2; { register char *c1, *c2; c1 = s1; c2 = s2; while(*c1++ == *c2) if(*c2++ == 0) re2,035, /*Q*/ 076,041,041,076,042,041, /*R*/ 036,040,036,001,041,036, /*S*/ 037,004,004,004,004,004, /*T*/ 041,041,041,041,041,036, /*U*/ 041,041,041,041,022,014, /*V*/ 041,041,041,055,063,041, /*W*/ 041,022,014,014,022,041, /*X*/ 021,012,004,004,004,004, /*Y*/ 077,002,004,010,020,077, /*Z*/ 016,010,010,010,010,016, /*[*/ 040,020,010,004,002,001, /*\*/ 034,004,004,004,004,034, /*]*/ 004,012,000,000,000,000, /*^*/ 000,000,000,000,000,077, /*_*/ 000,000,000,000,000,000, /* */ 010,010,010,010,00clrb fin sys close 3: decb nargs bgt 2f mov $'\e,r0 rts pc 2: tst ifflg beq 2f jsr r5,error; 'i jmp aexit 2: mov curarg,r0 tst (r0)+ mov (r0),0f mov r0,curarg incb fileflg sys indir; 9f .data 9: sys open; 0:0; 0 .text bec 2f mov 0b,r0 jsr r5,filerr; jmp aexit 2: movb r0,fin mov $1,line mov r4,-(sp) mov r1,-(sp) mov $5,r4 jsr pc,putw mov *curarg,r1 2: movb (r1)+,r4 beq 2f jsr pc,putw br 2b 2: mov $-1,r4 jsr pc,putw mov (sp)+,r1 mov (sp)+,r4 br 1b turn(1); return(0); } init() { register char *cp; register struct table *tp, *lp; int c, i, f, t; char *np; cp = names; for(i=0; iname = np; lp->factor = 1.0; lp->dim[i] = 1; } lp = hash(""); lp->name = cp-1; lp->factor = 1.0; l0: c = get(); if(c == 0) { printf("%l units; %l bytes\n\n", i, cp-names); if(dumpflg) for(tp = &table[0]; tp < &table[NTAB]; tp++) { if(tp->name ==0,010, /*!*/ 022,022,000,000,000,000, /*"*/ 022,077,022,022,077,022, /*#*/ 036,054,036,015,055,036, /*$*/ 001,062,064,013,023,040, /*%*/ 014,022,014,024,042,035, /*&*/ 010,010,000,000,000,000, /*'*/ 004,010,010,010,010,004, /*(*/ 010,004,004,004,004,010, /*)*/ 000,022,014,014,022,000 /***/ }; char blank ' '; char plot 'X'; int msk 040; /*mask at sixth bit*/ main(argc,argp) char **argp;int argc; { int i; /*if invoked with no arguments, prints error comment; if invoked with an argument, prints/ / / a2 -- pdp-11 assembler pass 1 error: incb errflg mov r0,-(sp) mov r1,-(sp) mov (r5)+,r0 tst *curarg beq 1f mov r0,-(sp) mov *curarg,r0 clr *curarg jsr r5,filerr; '\n mov (sp)+,r0 1: mov r2,-(sp) mov r3,-(sp) mov line,r3 movb r0,1f mov $1f+6,r0 mov $4,r1 2: clr r2 dvd $10.,r2 add $'0,r3 movb r3,-(r0) mov r2,r3 sob r1,2b mov $1,r0 sys write; 1f; 7 mov (sp)+,r3 mov (sp)+,r2 mov (sp)+,r1 mov (sp)+,r0 rts r5 .data 1: .even .text betwen: cmp r0,(r5)+ blt 1f  0) continue; printf("%s", tp->name); units(tp); } return; } if(c == '/') while(c != '\n') c = get(); if(c == '\n') goto l0; np = cp; while(c != ' ' && c != '\t') { *cp++ = c; c = get(); if(c == '\n') { *cp++ = 0; tp = hash(np); if(tp->name) goto redef; tp->name = np; tp->factor = lp->factor; for(c=0; cdim[c] = lp->dim[c]; i++; goto l0; } } *cp++ = 0; lp = hash(np); if(lp->name) goto redef; convr(lp); lp->name = np; f it in banner form. */ if(argc<2){ printf("missing argument\n"); exit(); } banner(argp[1],bp); banprt(bp); } banner(s,bufp) char *s;struct bann *bufp; { char c,*p,*q,*r; p=s; r=bufp; banset(blank,bufp); while((c= *s++)!=0){ if((s-p)>chpln)return(s-p); if(c>='`')c =- ' '; /*map lower to upper case*/ if(c<' ')c='#'; if(c>'?')c=- 0100; q=ctbl[c]; banfil(q,r); r=+pospch; } } banfil(c,p) char *c; struct bann *p; { int i,j; for(i=0;ifactor != 1.0) goto l0; for(c=0; cdim[c]; if(t>1 || (f>0 && t!=0)) goto l0; if(f==0 && t==1) { if(unames[c]) goto l0; f = c+1; } } if(f>0) unames[f-1] = np; goto l0; redef: printf("redefination %s\n", np); goto l0; } double getflt() { register c, i, dp; double d, e; int f; d = 0.; dp = 0; do c = get(); while(c == ' ' || c == '\t'); l1: if(c >= '0' && c <= '9') { d = d*10. + c-'0'; if(dp) dp++; c = get(); goto l){ if(((c[i]<alpha[i][j] = plot; } } return(0); } banset(c,p) char c; struct bann *p; { int i,j; for(i=0;ialpha[i][j] = c; } banprt(ptr) struct bann *ptr; { int i,j; for(i=0;ialpha[i][pposs-1]='\0'; for(j=pposs-2;j>=0;j--){ if(ptr->alpha[i][j]!=blank)break; ptr->alpha[i][j]='\0'; } printf("%s\n",ptr->alpha[i]); } } cc -c -O alloc.c cc -c -O calloc.c cc -c -O cclose.c cc -c -O ceof.c cc -c -O cerror.c cc -c -O cexit.c cc -c -O cflush.c cc -c -O cfree.c cc -c -O cgetc.c cc -c -O ciodec.c cc -c -O clenf.c cc -c -O copen.c cc -c -O cputc.c cc -c -O cwrd.c as dummy.s; mv a.out dummy.o cc -c -f -O ftoa.c cc -c -O getch.c cc -c -O gets.c cc -c -O getvec.c cc -c -O iehzap.c cc -c -O makbuf.c cc -c -O maktab.c cc -c -O nexch.c cc -c -O nodig.c cc -c -O printf.c cc -c -O putch.c cc -c -O puts.c cc -c -O relvec.c cc -c -O revput1; } if(c == '.') { dp++; c = get(); goto l1; } if(dp) dp--; if(c == '+' || c == '-') { f = 0; if(c == '-') f++; i = 0; c = get(); while(c >= '0' && c <= '9') { i = i*10 + c-'0'; c = get(); } if(f) i = -i; dp =- i; } e = 1.; i = dp; if(i < 0) i = -i; while(i--) e =* 10.; if(dp < 0) d =* e; else d =/ e; if(c == '|') return(d/getflt()); peekc = c; return(d); } get() { register c; if(c=peekc) { peekc = 0; return(c); } c = getc(ibuf); if(c </ / / a4 -- pdp-11 assembler pass1 rname: mov r1,-(sp) mov r2,-(sp) mov r3,-(sp) mov $8,r5 mov $symbol+8.,r2 clr -(r2) clr -(r2) clr -(r2) clr -(r2) clr -(sp) clr -(sp) cmp r0,$'~ / symbol not for hash table bne 1f inc 2(sp) clr ch 1: jsr pc,rch movb chartab(r0),r3 ble 1f add r3,(sp) swab (sp) dec r5 blt 1b movb r3,(r2)+ br 1b 1: mov r0,ch mov (sp)+,r1 clr r0 tst (sp)+ beq 1f mov symend,r4 br 4f 1: div $hshsiz,r0 ashc $1,r0 add $hshtab,r1 1: sub r0,r1 cmp r1,$hshtab .c cc -c -O scan1.c cc -c -O scan2.c cc -c -O scan3.c cc -c -O system.c cc -c -O tmpnam.c cc -c -O unget.c as unprnt.s; mv a.out unprnt.o cc -c -O wdleng.c ar r /lib/libp.a *.o rm *.o = 0) { if(ibuf[0]) return(0); printf("\n"); exit(); } return(c); } hash(name) char *name; { register struct table *tp; register char *np; register h; h = 0; np = name; while(*np) h = h*57 + *np++ - '0'; h = lrem(0, h, NTAB); tp = &table[h]; l0: if(tp->name == 0) return(tp); if(equal(name, tp->name)) return(tp); tp++; if(tp >= &table[NTAB]) tp = table; goto l0; } fperr() { signal(8, fperr); fperrc++; } bhi 2f add $2*hshsiz,r1 2: mov $symbol,r2 mov -(r1),r4 beq 3f cmp (r2)+,(r4)+ bne 1b cmp (r2)+,(r4)+ bne 1b cmp (r2)+,(r4)+ bne 1b cmp (r2)+,(r4)+ bne 1b br 1f 3: mov symend,r4 mov r4,(r1) 4: mov $symbol,r2 mov r4,-(sp) add $20,r4 cmp r4,0f blos 4f add $512.,0f sys indir; 9f .data 9: sys break; 0:end .text 4: mov (sp)+,r4 mov (r2)+,(r4)+ mov (r2)+,(r4)+ mov (r2)+,(r4)+ mov (r2)+,(r4)+ clr (r4)+ clr (r4)+ mov r4,symend sub $4,r4 1: mov r4,-(sp) mov r4,r3 sub $8,r3 cmp r3,as alloc?.s; mv a.out alloc.o as altch.s; mv a.out altch.o as bsp.s; mv a.out bsp.o as bword.s; mv a.out bword.o as getch.s; mv a.out getch.o as getwd.s; mv a.out getwd.o as length.s; mv a.out length.o as rewind.s; mv a.out rewind.o as zero.s; mv a.out zero.o ar r /lib/libs.a *.o rm *.o #define nchars 64 /*number of chars in char set*/ #define nlines 6 /*number of lines in a banner character*/ #define pposs 85 /*number of print positions on a line (must be multiple of 4)*/ /*followed by end of string character*/ #define pospch 8 /*number of char positions per banner char*/ #define chpln 10 /*number of banner characters per line*/ struct bann{ char alpha[nlines][pposs]; }; struct bann buffer,*bp buffer; char ctbl[nchars][nlines]{ 036,041,046,051,046,035, /*@*/ 014,022,041,077,04$usymtab blo 1f sub $usymtab,r3 clr r2 div $3,r2 mov r2,r4 add $4000,r4 / user symbol br 2f 1: sub $symtab,r3 clr r2 div $3,r2 mov r2,r4 add $1000,r4 / builtin symbol 2: jsr pc,putw mov (sp)+,r4 mov (sp)+,r3 mov (sp)+,r2 mov (sp)+,r1 tst (sp)+ rts pc number: mov r2,-(sp) mov r3,-(sp) mov r5,-(sp) clr r1 clr r5 1: jsr pc,rch jsr r5,betwen; '0; '9 br 1f sub $'0,r0 mpy $10.,r5 add r0,r5 als $3,r1 add r0,r1 br 1b 1: cmp r0,$'b beq 1f cmp r0,$'f beq 1f cmp r0,$'. bne 2f/ / / a3 -- pdp-11 assembler pass 1 assem: jsr pc,readop jsr pc,checkeos br ealoop tst ifflg beq 3f cmp r4,$200 blos assem cmpb (r4),$21 /if bne 2f inc ifflg 2: cmpb (r4),$22 /endif bne assem dec ifflg br assem 3: mov r4,-(sp) jsr pc,readop cmp r4,$'= beq 4f cmp r4,$': beq 1f mov r4,savop mov (sp)+,r4 jsr pc,opline br ealoop 1: mov (sp)+,r4 cmp r4,$200 bhis 1f cmp r4,$1 / digit beq 3f jsr r5,error; 'x br assem 1: bitb $37,(r4) beq 1f jsr r5,error; 'm 1: bisb dot-2,(r4) mov dot,2(r4) br assem 3: mov numval,r0 jsr pc,fbcheck movb dotrel,curfbr(r0) asl r0 movb dotrel,nxtfb mov dot,nxtfb+2 movb r0,nxtfb+1 mov dot,curfb(r0) movb fbfil,r0 sys write; nxtfb; 4 br assem 4: jsr pc,readop jsr pc,expres mov (sp)+,r1 cmp r1,$200 bhis 1f jsr r5,error; 'x br ealoop 1: cmp r1,$dotrel bne 2f bic $40,r3 cmp r3,dotrel bne 1f 2: bicb $37,(r1) bic $!37,r3 bne 2f clr r2 2: bisb r3,(r1) mov r2,2(r1) br ealoop 1: jsr r5,error; '. movb $2,dotrel ealoop: cmp r FTI: float (or double) to integer * ITF: integer to float * ITP: integer to pointer * ITL: integer to long * LTI: long to integer * LTF: long to float * FTL: float to long * PTI: pointer to integer * XX: usually illegal * When FTI, LTI, FTL are added in they specify * that it is the left operand that should be converted. * For + this is done and the conversion is turned back into * ITF, ITL, LTF. * For = however the left operand can't be converted * and the specified conversion is applied to dvanc; case MCALL: *cp++ = block(0,0,0,0); /* 0 arg call */ os = CALL; break; case INCBEF: case INCAFT: case DECBEF: case DECAFT: *cp++ = block(1, CON, INT, 0, 1); break; case LPARN: if (o!=RPARN) goto syntax; goto advanc; case LBRACK: if (o!=RBRACK) goto syntax; build(LBRACK); goto advanc; } build(os); goto opon1; syntax: error("Expression syntax"); errflush(o); return(0); } copname(acs) struct hshtab *acs; { register struct hshtab *cs; register struct tname *4,$'; beq assem1 cmp r4,$'\n bne 1f inc line br assem1 1: cmp r4,$'\e bne 2f tst ifflg beq 1f jsr r5,error; 'x 1: rts pc 2: jsr r5,error; 'x 2: jsr pc,checkeos br assem1 jsr pc,readop br 2b assem1: jmp assem fbcheck: cmp r0,$9. bhi 1f rts pc 1: jsr r5,error; 'f clr r0 rts pc checkeos: cmp r4,$'\n beq 1f cmp r4,$'; beq 1f cmp r4,$'\e beq 1f add $2,(sp) 1: rts pc the rhs. */ char cvtab[4][4] { /* int double long ptr */ /* int */ 0, (FTI<<4)+ITF, (LTI<<4)+ITL, (ITP<<4)+ITP, /* double */ ITF, 0, LTF, XX, /* long */ ITL, (FTL<<4)+LTF, 0, XX, /* ptr */ ITP, XX, XX, PTI }; /* * character type table */ char ctab[] { EOF, INSERT, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, SPACE, NEWLN, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, SPACE, EXCLA, DQUOTE, UNKN, UNKN, MOD, AND, SQt (sp)+ mov (sp)+,r5 rts pc 1: jmp *(r1) esw1: '+; binop '-; binop '*; binop '/; binop '&; binop 037; binop 035; binop 036; binop '%; binop '[; brack '^; binop 1; exnum '!; binop 0; 0 binop: cmpb (sp),$'+ beq 1f jsr pc,errore 1: movb r4,(sp) br advanc exnum: mov numval,r1 mov $1,r0 br oprand brack: mov r2,-(sp) mov r3,-(sp) jsr pc,readop jsr pc,expres cmp r4,$'] beq 1f jsr r5,error; '] 1: mov r3,r0 mov r2,r1 mov (sp)+,r3 mov (sp)+,r2 oprand: inc opfound mov $exsw2, UOTE, LPARN, RPARN, TIMES, PLUS, COMMA, MINUS, PERIOD, DIVIDE, DIGIT, DIGIT, DIGIT, DIGIT, DIGIT, DIGIT, DIGIT, DIGIT, DIGIT, DIGIT, COLON, SEMI, LESS, ASSIGN, GREAT, QUEST, UNKN, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LBRACK, UNKN, RBRACK, EXOR, LETTER, UNKN, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, Lunt the number of appearances of temp1[j] */ count = 0; tred = -temp1[j]; for( p=1; p<=nterms; ++p ){ if( temp1[p]+tred == 0 ) ++count; } if( count >ntimes ){ lastred = tred; ntimes = count; } } /* clear out entries in temp1 which equal lastred */ for( p=1; p<= nterms; ++p ) if( temp1[p]+lastred == 0 )temp1[p]=0; /* write out the state */ /* first, check for equality with another state */ /* see if there is a nonterminal with all dots # #include "c0h.c" /* * info on operators: * 01-- is binary operator * 02-- left (or only) operand must be lvalue * 04-- is relational operator * 010-- is assignment-type operator * 020-- non-float req. on left * 040-- non-float req. on right * 0100-- is commutative * 0200-- is right, not left-associative * 0400-- is leaf of tree * *0XX000-- XX is priority of operator */ int opdope[] { 000000, /* EOF */ 000000, /* ; */ 000000, /* { */ 000000, /* } */ 036000, /* [ */ 002000, /* ] ETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LBRACE, OR, RBRACE, COMPL, UNKN }; before it. */ p0 = 0; q1 = pstate[i+1]; for( q0=pstate[i]; q0pitem) ) < NTBASE ) goto standard; if( p0 == 0 ) p0 = p1; else if( p0 != p1 ) goto standard; } /* now, all items have dots before p0 */ if( cdebug ){ settty(); printf("state %d, pre-nonterminal %s\n",i,nontrst[p0-NTBASE].name); } for( j=0; jpitem) != p0 ) goto nextj; } /* we have a match with state j ! */ tystate[i] = -j; zzacsave =+ tystate[j]; zznsave++; wrstate(i); return; nextj: ; } standard: tystate[i] = 2; wrstate(i); size = 0; for( p0=1; p0<=nterms; ++p0 ) if( (p1=temp1[p0])!=0 ) { arrval( TESTACT+trmse034203, /* ++post */ 034203, /* --post */ 034220, /* !un */ 034202, /* &un */ 034220, /* *un */ 034200, /* -un */ 034220, /* ~un */ 036001, /* . (structure reference) */ 030101, /* + */ 030001, /* - */ 032101, /* * */ 032001, /* / */ 032001, /* % */ 026061, /* >> */ 026061, /* << */ 020161, /* & */ 017161, /* | */ 017161, /* ^ */ 036001, /* -> */ 000000, /* int -> double */ 000000, /* double -> int */ 016001, /* && */ 015001, /* || */ 030001, /* &~ */ 000000, /* 56 */ 000000, /* 57 targ.s; mv a.out getarg.o as nice.s; mv a.out nice.o as rand.s; mv a.out rand.o as setfil.s; mv a.out setfil.o as uio.s; mv a.out uio.o ar r /lib/libf.a rm *.o t[p0].value ); if( p1 < 0 ) arrval( REDUCACT - p1 ); else if( p1 == ACCEPTCODE ) arrval( ACCEPTACT ); else if( p1 == ERRCODE ) arrval( ERRACT ); else arrval( SHIFTACT + p1 ); size =+ 2; } if( lastred ) arrval( REDUCACT + lastred ); else arrval( ERRACT ); tystate[i] = size+1; /* store entry size in tystate */ zzacent =+ (size+1); return; } wrstate(i){ /* writes state i */ int j0,j1,s; struct item *pp, *qq; settty(); printf("\ns*/ 000000, /* 58 */ 000000, /* 59 */ 022005, /* == */ 022005, /* != */ 024005, /* <= */ 024005, /* < */ 024005, /* >= */ 024005, /* > */ 024005, /*

        p */ 024005, /* >=p */ 012213, /* =+ */ 012213, /* =- */ 012213, /* =* */ 012213, /* =/ */ 012213, /* =% */ 012253, /* =>> */ 012253, /* =<< */ 012253, /* =& */ 012253, /* =| */ 012253, /* =^ */ 012213, /* = */ 000000, /* 81 */ 000000, /* 82 */ 000000, /* 83 */ 000000, /* 84 */ 000000, /* 85 */ 000 26); goto out; } while((c = read(tbuf[0], tbuf+1, 512)) > 0) write(pbuf[0], tbuf+1, c); unlink(tfile); exit(0); } putc(c, tbuf); } ill: write(2, "Password file illformed\n", 24); out: unlink(tfile); bex: exit(1); } f = r5 .globl iget .globl env,si .globl succ .globl params params: jsr pc,iget mov (r0),r0 asl r0 mov env(f),r1 add r0,si(r1) jmp succ 000, /* 86 */ 000000, /* 87 */ 000000, /* 88 */ 000000, /* 89 */ 014201, /* ? */ 034200, /* sizeof */ 000000, /* 92 */ 000000, /* 93 */ 000000, /* 94 */ 000000, /* 95 */ 000000, /* 96 */ 000000, /* 97 */ 000000, /* 98 */ 000000, /* 99 */ 036001, /* call */ 036001, /* mcall */ 000000, /* goto */ 000000, /* jump cond */ 000000, /* branch cond */ 000000, /* 105 */ 000000, /* 106 */ 000000, /* 107 */ 000000, /* 108 */ 000000, /* 109 */ 000000 /* force r0 */ }; /* * conversion table: *37 .byte -14,141,142,143,144,145,146,147 .byte 150,151,152,153,154,155,156,157 .byte 160,161,162,163,164,165,166,167 .byte 170,171,172,-14,-26,-14,176,-14 .data namedone:.byte 0 a.tmp1: a.tmp2: a.tmp3: .even curfb: -1;-1;-1;-1;-1;-1;-1;-1;-1;-1 obufp: outbuf symend: usymtab .bss curfbr: .=.+10. savdot: .=.+6 bufcnt: .=.+2 hshsiz = 1553. hshtab: .=2*hshsiz+. pof: .=.+1 wordf: .=.+1 fin: .=.+1 fbfil: .=.+1 fileflg:.=.+1 errflg: .=.+1 ch: .=.+1 .even symbolb:bob: S%d <- S%d over S%d; b=%d,h=%d,w=%d .ds %d \*(%d\*(%d.ds %d "\*(%d\*(%d\*(%d. b:b shift b: S%d <- S%d vert %d S%d vert %d; b=%d,h=%d,w=%d . e:eb: S%d <- S%d S%d; b=%d,h=%d,w=%d .ds %d \*(%d\*(%d . numb: %s %d . shift: %d . sqrt: S%d <- S%d;b=%d,h=%d,w=%d .ds %d \e|\*(%d . S%d <- %c pile of: S%d;h=%d b=%d,w=%d .ds %d \ \*(%d\ \*(%d\ \*(%d\ .ds %d \*(%d\*(%d\*(%d. shift2 s%d <- %d %d %d h=%d,b=%d,w=%d s==STATIC) { dsym->hoffset = isn; printf(".bss\nL%d:.=.+%o\n.text\n", isn++, rlength(dsym)); } else if (dsym->hclass==REG) { if ((type&TYPE)>CHAR && (type&XTYPE)==0 || (type&XTYPE)>PTR || regvar<3) error("Bad register %o", type); dsym->hoffset = --regvar; } syntax: return(elsize); } getype() { register int o, type; register struct hshtab *ds; switch(o=symbol()) { case TIMES: return(getype()< 2: .even / / wc: mov r1,-(sp) mov r2,-(sp) mov r3,-(sp) clr r3 1: cmp r3,nbuf bge 1f mov r3,r2 asl r2 tst w1(r2) ble 2f mov r3,r1 ashc $9.,r1 bic $777,r1 add $b1,r1 jsr pc, goto getf; case NAME: defsym = ds = csym; type = 0; ds->ssp = dimp; getf: switch(o=symbol()) { case LPARN: if (xdflg) { xdflg = 0; ds = defsym; declare(ARG1, 0, 0, 0); defsym = ds; xdflg++; } else if ((o=symbol()) != RPARN) goto syntax; type = type<ssp&0377; oname); } ont; collect/t/cont; collect/u/cont; collect/v/cont; collect/w/cont; collect/x/cont; collect/y/cont; collect/z/cont; collect/A/cont; collect/B/cont; collect/C/cont; collect/D/cont; collect/E/cont; collect/F/cont; collect/G/cont; collect/H/cont; collect/I/cont; collect/J/cont; collect/K/cont; collect/L/cont; collect/M/cont; collect/N/cont; collect/O/cont; collect/P/cont; collect/Q/cont; collect/R/cont; collect/S/cont; collect/T/cont; collect/U/cont; collect/V/cont; collect/W/cont; collect/X/cont; collect/Y/c/ / / a6 -- pdp-11 assembler pass 1 opline: mov r4,r0 jsr r5,betwen; 0; 200 br 1f cmp r0,$'< bne xpr jmp opl17 xpr: jsr pc,expres add $2,dot rts pc 1: movb (r4),r0 cmp r0,$24 beq xpr jsr r5,betwen; 5; 36 br xpr mov r0,-(sp) jsr pc,readop mov (sp)+,r0 asl r0 jmp *1f-12(r0) 1: opl13 / map fop freg,fdst to double opl6 opl7 opl10 opl11 opl13 / map fld/fst to double opl13 opl13 / map fop fsrc,freg to double opl15 opl16 opl17 opl20 opl21 opl22 opl23 xpr opl25 opl26 opl27tate %d\n",i); qq = pstate[i+1]; for( pp=pstate[i]; pp0 ){ /* shift, error, or accept */ if( j1 == ACCEPTCODE ) printf( "accept" ); else if( j1 == ERRCODE ) printh tst r1 bne 1f mov r0,r4 bis $400,r4 jsr pc,putw inc numval br 1b 1: mov $-1,r4 jsr pc,putw mov $'<,r4 tst (sp)+ rts pc rsch: jsr pc,rch cmp r0,$'\e beq 4f cmp r0,$'\n beq 4f clr r1 cmp r0,$'\\ bne 3f jsr pc,rch mov $schar,r2 1: cmpb (r2)+,r0 beq 2f tstb (r2)+ bpl 1b rts pc 2: movb (r2)+,r0 clr r1 rts pc 3: cmp r0,$'> bne 1f inc r1 1: rts pc 4: jsr r5,error; '< jmp aexit schar: .byte 'n, 012 .byte 't, 011 .byte 'e, 004 .byte '0, 000 .byte 'r, 015 .byte 'a, 006 / / / a8 -- pdp-11 assembler pass 1 chartab: .byte -14,-14,-14,-14,-02,-14,-14,-14 .byte -14,-22, -2,-14,-14,-22,-14,-14 .byte -14,-14,-14,-14,-14,-14,-14,-14 .byte -14,-14,-14,-14,-14,-14,-14,-14 .byte -22,-20,-16,-14,-20,-20,-20,-12 .byte -20,-20,-20,-20,-20,-20,056,-06 .byte 060,061,062,063,064,065,066,067 .byte 070,071,-20,-02,-00,-20,-14,-14 .byte -14,101,102,103,104,105,106,107 .byte 110,111,112,113,114,115,116,117 .byte 120,121,122,123,124,125,126,127 .byte 130,131,132,-20,-24,-20,-20,1f( "error" ); else printf( "shift %d", j1 ); } else printf("reduce %d",-j1 ); } /* output the final production */ if( lastred ) printf("\n\t. reduce %d\n\n", lastred ); else printf("\n\t. error\n\n" ); ret: settab(); } % r@& . 7 9  9 /9R~ \ z,9@~ \ 94~ \ KX*vu5 5 5X r e8A! y 5 pЁ5  @tU5 @tU @tU p +L9 /9 /9 /9 /(: /L: /l: /)~i)e~)x)er)l)ef)? b)e\)X)Li5 5 r eT8A! y: /: /: /: /;   _h@t6t-+_h%_h@tt+;   jsr r5,error; '* 1: jsr pc,addres add r0,dot rts pc errora: jsr r5,error; 'a rts pc checkreg: cmp r2,$7 bhi 1f cmp r3,$1 beq 2f cmp r3,$4 bhi 2f 1: jsr pc,errora 2: rts pc errore: jsr r5,error; 'e rts pc checkrp: cmp r4,$') beq 1f jsr r5,error; ') rts pc 1: jsr pc,readop rts pc /* fake portable I/O routines, for those sites so backward as to not have the port. library */ int cin, cout; extern int fin, fout; copen( s, c ) char *s; { int f; if( c == 'r' ){ fin = f = open( s, 0 ); } else if( c == 'a' ){ f = open( s, 1 ); seek( f, 0, 2 ); } else { /* c == w */ f = creat( s, 0666 ); } return( f ); } cflush(x){ /* fake! sets file to x */ flush(); fout = x; } system(){ error( "The function \"system\" is called" ); } ccll; skip/H/coll; skip/I/coll; skip/J/coll; skip/K/coll; skip/L/coll; skip/M/coll; skip/N/coll; skip/O/coll; skip/P/coll; skip/Q/coll; skip/R/coll; skip/S/coll; skip/T/coll; skip/U/coll; skip/V/coll; skip/W/coll; skip/X/coll; skip/Y/coll; skip/Z/coll; collect/'/cont; collect/-/hyphen; collect/ /out; collect/a/cont; collect/b/cont; collect/c/cont; collect/d/cont; collect/e/cont; collect/f/cont; collect/g/cont; collect/h/cont; collect/i/cont; collect/j/cont; collect/k/cont; collect/l/cont; collect/m/cont; colle: cmp r3,$24 / register type bne 1f jsr pc,checkreg clr r0 rts pc 1: add $2,dot clr r0 rts pc alp: jsr pc,readop jsr pc,expres jsr pc,checkrp jsr pc,checkreg cmp r4,$'+ bne 1f jsr pc,readop clr r0 rts pc 1: mov $2,r0 rts pc amin: jsr pc,readop cmp r4,$'( beq 1f mov r4,savop mov $'-,r4 br getx 1: jsr pc,readop jsr pc,expres jsr pc,checkrp jsr pc,checkreg clr r0 rts pc adoll: jsr pc,readop jsr pc,expres add $2,dot clr r0 rts pc astar: jsr pc,readop cmp r4,$'* bne 1fose(i){ close(i); } cexit(i){ flush(); exit(); }  mov l(r1),r3 sub a(r1),r3 /L-A cmp r2,r3 ble 1f jsr pc,release mov r2,r0 jsr pc,allocate mov 4(sp),r0 / 1: mov a(r1),w(r1) /rewind w pointer mov a(r0),-(sp) / 4: mov (sp),0f mov afi,r0 sys seek;0:.. ;0 /set input pointer cmp r2,$512. ble 2f mov $512.,r3 /# output this time mov r3,0f mov r3,3f add r3,(sp) sub r3,r2 /# left to output br 1f / 2: mov r2,0f mov r2,3f mov r2,r3 clr r2 / 1: mov afi,r0 sys read;b1;0:.. bes bad cmp r0,r3 bne bad mov afout,r0 mov (r1),0f add r3,(r1) sys2J` & 6  v2w d2 BNf  |4et7A  |  R " <' p Fw*2w 2 @t5t@t5^Vw1w 1 >/ (4 p/N `/ %  ` x4 3  4 4 p5 5 P/ p/5 3  H&5)5 6  ff 2%  -5ff 2e05  d3  N5 `5 s55 P/ p/w0w 0Ƅ >//&w0w 0 @ =||((lp&03)==0))return(0); if((lt>>3) == (lp>>3)){ return(lt&03); } if((lt>>3) > (lp>>3)) return(3); return(1); } int cdebug 0; /* debug for common states */ wract(i){ /* output state i */ /* temp1 has the actions, lastred the default */ int p, p0, p1, size; int ntimes, tred, count, j; struct item *q0, *q1; /* find the best choice for lastred */ lastred = 0; ntimes = 0; for( j=1; j<=nterms; ++j ){ if( temp1[j] >= 0 ) continue; if( temp1[j]+lastred == 0 ) continue; /* co/ / / cmplx fortran function .globl cmplx. .globl dcmplx. .globl retrn .globl temp .globl rerr dcmplx.:temp .+2 setd br 1f cmplx.: temp .+2 setf 1: cmp *2(sp),$2 bne 1f mov r3,r1 tst (r1)+ movf *(r1)+,r0 movf *(r1)+,r1 mov $temp,r1 movf r0,(r1)+ movf r1,(r1)+ jmp retrn 1: jsr r5,rerr; 6. / / / cexp fortran function .globl cexp. .globl rval8p .globl retrn .globl temp .globl rerr .globl exp .globl sin .globl cos cexp.: temp rval8p; 2 .+2 setf movf (sp)+,r0 jsr pc,exp bes 1f movf r0,temp movf (sp),r0 jsr pc,sin mulf temp,r0 movf r0,temp+4 movf (sp)+,r0 jsr pc,cos mulf temp,r0 movf r0,temp jmp retrn 1: jsr r5,rerr; 5. turn(1); return(0); } numb(str) char *str; { /* convert to integer */ int k; for (k=0; *str >= '0' && *str <= '9'; str++) k = k*10 + *str - '0'; return(k); } broken(str, nlin) { switch(ylet(str,nlin)) { case 'n': case 'N': return(1); } return(0); } ylet (str, k) char *str; { k++; while (*str &&k--) str++; return(*--str); } span(str, k) { switch(ylet(str,k)) { case 's': case 'S': return(1); } return(0); } maknew(str) char *str; { /* make two numerical fields */ ine error5 cmp r0,$buffer+nword+nword blo 1b mov (sp)+,r0 rts pc mtrack: mov (r0)+,(r5) jsr pc,flag rts r0 flag: bit $100200,tccm beq flag blt error6 rts pc flag1: bit $100200,tccm beq flag1 bge 1f tst tcst bge error7 add $2,(sp) 1: rts pc comobv: mov r0,r4 bic $!777,r0 asl r0 mov cobtab(r0),r0 swab r0 clr r1 ror r0 rol r1 asl r0 asl r0 rol r1 swab r4 bic $177401,r4 bis cobtab(r4),r0 rts pc bcomobv: mov r0,r2 bic $!70,r2 mov r0,r3 mov $6.,r4 1: asr r3 dec r4 bne 1d Missing temp fileIllegal initialization.bss L%d:.=.+4 .text mov%c r%d,r0 mov%c r%d,%c(sp) tst%c r%d No code table for op: %sNo code table for op %dmov%c r%d,r%d mov%c r%d,r%d Register overflow: simplify expressionr%d*tst r%d adcsbc r%d """""Hh(FTNTNNNt*+,HIJB@@B@@L\\nnh "56&$L%d(r%d)r%dCompiler error: pname(r%d)%c%c(r%d)pname called illegallyIllegal use of re?{xuJ q | z * inp1L24L20004L27L28 _font"~fontp1p2_shift"~shiftp1L30L32 _sqrt"~sqrthinpsp2L34L35 L36 L37L20006L40 _lpile"0L10005 L10006 L69L62>L65L59~lpile0binlist2hitypebhgetvec (n) { return (alloc(n)); }  alloc(); while(a != '\n') { c->p1 = d = alloc(); c = d; l: c->ch = a; if(a == '\0') { if(fin) { close(fin); fin = 0; a = getchar(); goto l; } rfail = 1; break; } a = getchar(); } b->p2 = c; if(rfail) { delete(b); b = 0; } return(b); } syspot(string) struct node *string; { register struct node *a, *b, *s; s = string; if (s!=0) { a = s; b = s->p2; while(a != b) { a = a->p1; putchar(a->ch); } } putchar('\n'); } strstr(s) char s[]; { inti = r3 .globl putcall,iget,kput,putdec .globl generate,succ .globl decimal decimal: mov $1f+1,r0 jsr pc,putcall jsr pc,iget mov (r0),r0 jsr pc,kput jmp succ 1: mov (i),r0 jsr pc,putdec jmp generate 2.,b1e(r2) / set end clr w1(r2) /clear w mov (sp)+,r0 sub b1s(r2),r0 add r1,r0 / set r0=byte addr in buffer mov (sp)+,r1 mov (sp)+,r3 rts pc / / / routine to wc a buffer / mov buffer addr,r2 / mov buffer addr+6,r1 beginning of buffer / jsr pc,clean / clean: mov r0,-(sp) mov b1s(r2),0f mov afout,r0 sys seek;0:..;0 mov r1,0f sys write;0:..;512. clr w1(r2) /clear w mov (sp)+,r0 rts pc / / routine to get buffer addr of byte whose disc / addr is in r0 - also returns addr of write / flag for buffb = isn++; brklab = isn++; label(o3 = isn++); statement(0); label(contlab); contlab = o1; if ((o=symbol())==KEYW && cval==WHILE) { cbranch(tree(), o3, 1); label(brklab); brklab = o2; goto semi; } goto syntax; case CASE: o1 = conexp(); if ((o=symbol())!=COLON) goto syntax; if (swp==0) { error("Case not in switch"); goto stmt; } if(swp>=swtab+swsiz) { error("Switch table overflow"); } else { swp->swlab = isn; (swp++)->swval =.globl allocate,putword,putchar .globl iget .globl succ .globl table table: mov $10,r0 jsr pc,allocate mov r1,-(sp) clr r0 jsr pc,putword jsr pc,putword jsr pc,putword jsr pc,putchar jsr pc,iget mov (sp)+,(r0) jmp succ dy ~ { x w t q n k h e b v s p m j g d a u r o l i f c ` _ \ Y V S P M J ^ [ X U R O L I ] Z W T Q N K H G D A > ; 8 5 2 F C @ = : 7 4 1 E B ? < 9 6 3 0 / , ) & #   . + ( % "    - * '  o1; label(isn++); } goto stmt; case SWITCH: o1 = brklab; brklab = isn++; np = pexpr(); chkw(np); rcexpr(block(1,RFORCE,0,0,np), regtab); pswitch(); brklab = o1; return; case DEFAULT: if (swp==0) error("Default not in switch"); if ((o=symbol())!=COLON) goto syntax; label(deflab = isn++); goto stmt; case FOR: o1 = contlab; o2 = brklab; contlab = isn++; brklab = isn++; if (o=forstmt()) goto syntax; label(brklab); contlab = i = dfile(temp[t1].beg); if((ct = temp[t1].ct) >= 8) { ct = 8; *curf = -1; } else { *curf = '\t'; } put(i,temp[t1].beg,ct); put(i,curf,curfl); if(cross) put(i,curs,cursl); conf(lno,4,lbuf); put(i,lbuf,5); break; case 2: i = dfile(curf+1); put(i,curf+1,curfl-1); if(cross) put(i,curs,cursl); else { conf(lno,4,lbuf); put(i,lbuf,5); } if((ct = temp[t1].ct) >= 8) { put(i,temp[t1].beg,8); put(i,&mone,1); PARN) { /* incr part */ peeksym = -1; statement(0); branch(contlab); return(0); } l = contlab; contlab = isn++; st = tree(); if ((o=symbol()) != RPARN) return(o); ss = space; if (space-treebase > forsps) { error("Expression too large"); space = &treebase[forsps]; } sp2 = savxpr; for (sp1=treebase; sp1hclass>0) { error("Redefinition"); goto stmt; } o1->hclass = STATIC; o1->htype = ARRAY; if (o1->hoffset==0) o1->hoffset = isn++; label(o1->hoffset); if ((peeksym=symbol())==RBRACE) return; goto stmt; } } peeksym = o; rcexpr(tree(), efftab); semi: if ((o=symbol())==SEMI) return; syntax: error("Statement synturn(0); } flsh(fil) { extern tp[],utmp; if(optr[fil] <= 0) return(optr[fil]); if(bct[fil]++ >= 128 && utmp == 0) { printf("Wraparound temp file %d\n",fil); dexit(); } nflush++; if(write(tp[fil],obuf[fil],optr[fil]) != optr[fil]) return(-1); optr[fil] = 0; return(0); } nt point; char *p, *q; p = str; for (point=0; *str; str++) if (*str=='.') point=1; if (!point && *(str-1)== '$') return(0); for(; str>p; str--) if ( (point && *str == '.') || (!point && digit(*(str-1)) ) ) break; if (!point && p==str) /* not numerical, don't split */ return(0); p= str; q = exstore; while (*exstore++ = *str++); *p = 0; return(q); } digit(x) { return(x>= '0' && x<= '9'); } settab(ncol, ilin) { int k, icol; printf(".ta "); for (icol = 0; icolname, cval); if (nel>nchstr) { strflg++; printf(".=.+%o\n", nel-nchstr); strflg = 0; nchstr = nel; } return(nchstr); } if (peeksym==RBRACE) return(ninit); initflg++; s = tree(); initflg = 0; switch(width) { case 1: printf(".byte "); if (s->op != CON) goto bad; case 2: if (s->op==CON) { printf("%o\n", s->value) case SFCON: case CON: printf("$"); psoct(p->value); return; case FCON: printf("L%d", p->value); return; case NAME: i = p->offset; if (flag==2) i =+ 2; if (i) { psoct(i); if (p->class!=OFFS) putchar('+'); if (p->class==REG) regerr(); } switch(p->class) { case SOFFS: case XOFFS: pbase(p); case OFFS: printf("(r%d)", p->regno); return; case EXTERN: case STATIC: pbase(p); return; case REG: printf("r%d", p->nloc); return; } ellect/1/cont; collect/2/cont; collect/3/cont; collect/4/cont; collect/5/cont; collect/6/cont; collect/7/cont; collect/8/cont; collect/9/cont; collect/0/cont; collect/./cont; collect/_/cont; collect/ /out; skip/'/agobl; skip/"/agobl; skip/op==FCON || s->op==SFCON) { if (type==STRUCT) { ninit =+ 3; goto prflt; } goto bad; } rcexpr(block(1,INIT,0,0,s), regtab); break; case 4: sf = fcval; printf("%o;%o\n", sf); goto flt; case 8: prflt: printf("%o;%o;%o;%o\n", fcval); flt: if (s->op==FCON || s->op==SFCON) break; default: bad: bxdec(); } return(++ninit); } bxdec() { error("Inconsistent external initialization"); } statement(d) { register o, o1, o2; int o3, o4; structrror("Compiler error: pname"); return; case AMPER: putchar('$'); p = p->tr1; if (p->op==NAME && p->class==REG) regerr(); goto loop; case AUTOI: printf("(r%d)%c", p->nloc, flag==1?0:'+'); return; case AUTOD: printf("%c(r%d)", flag==1?0:'-', p->nloc); return; case STAR: p = p->tr1; putchar('*'); goto loop; } error("pname called illegally"); } regerr() { error("Illegal use of register"); } pbase(ap) struct tnode *ap; { register struct tnode *p; p = ap; if (p->class=ength(ds) / nel; /* * Pretend a structure is kind of an array of integers. * This is a kludge. */ if (basetype==STRUCT) { nel =* realwidth/2; width = 2; } if ((peeksym=symbol())==COMMA || peeksym==SEMI) { printf(".comm\t_%.8s,%o\n",ds->name,(nel*width+ALIGN)&~ALIGN); return; } ninit = 0; printf(".data\n_%.8s=.\n", ds->name); if ((o=symbol())==LBRACE) { do ninit = cinit1(ds, basetype, width, ninit, nel); while ((o=symbol())==COMMA); if (o!=RBRACE) peeksym = o; } else { pe; > A 7 C F 2 5 D G " % ( + ' " %   7 : ) , / =SOFFS || p->class==STATIC) printf("L%d", p->nloc); else printf("_%.8s", &(p->nloc)); } xdcalc(ap, nrleft) struct tnode *ap; { register struct tnode *p; register d; p = ap; d = dcalc(p, nrleft); if (d<20 && p->type==CHAR) { if (nrleft>=1) d = 20; else d = 24; } return(d); } dcalc(ap, nrleft) struct tnode *ap; { register struct tnode *p, *p1; if ((p=ap)==0) return(0); switch (p->op) { case NAME: if (p->class==REG) return(9); case AMPER: case FCON: case AUTOI: case AL209 L210 L211+L212/~label lL2145_popstk" L10057( L215 L216 L219 L221 ~popstk aL220:L20072 L222EL223V~error fsp1p2p3 p4 p5p6_flush _fout L225b~psocth ansignnL227~ L228g# /* C compiler */ #include "c0h.c" extdef() { register o, elsize; int type, sclass; register struct hshtab *ds; if(((o=symbol())==EOF) || o==SEMI) return; peeksym = o; type = INT; sclass = EXTERN; xdflg = FNDEL; if ((elsize = getkeywords(&sclass, &type)) == -1 && peeksym!=NAME) goto syntax; if (type==STRUCT) blkhed(); do { defsym = 0; decl1(EXTERN, type, 0, elsize); if ((ds=defsym)==0) return; funcsym = ds; ds->hflag = FNDEL; printf(".globl _%.8s\n", ds->name); xdflg UTOD: return(12); case CON: case SFCON: return(p->value==0? 4:(p->value==1?5:8)); case STAR: p1 = p->tr1; if (p1->op==NAME || p1->op==CON) return(12); } return(p->degree<=nrleft? 20: 24); } notcompat(ap, ast, op) struct tnode *ap; { register at, st; register struct tnode *p; p = ap; at = p->type; st = ast; if ((at&07)==STRUCT) at =& 077770; /* map to int */ if (st==0) /* word, byte */ return(at>1 & at<=07); if (st==1) /* word */ return(at>0 & at<=07); st =- 2; if ((at&0%7 te`  %7    7  ww Z@e5@e5 H r e.A! y0Zʋ  L%(ʕ  6ʕ    0 7&e e & %&  e&  &  e ?e%P   VeS Q  _ D &7>%7L7F_%$ 76707x($_%" %/= 0; if ((ds->type&XTYPE)==FUNC) { if ((peeksym=symbol())==LBRACE || peeksym==KEYW) { funcblk.type = decref(ds->type); cfunc(ds->name); return; } } else cinit(ds); } while ((o=symbol())==COMMA); if (o==SEMI) return; syntax: error("External definition syntax"); errflush(o); statement(0); } cfunc(cs) char *cs; { register savdimp; savdimp = dimp; printf(".text\n_%.8s:\n", cs); if (stflg) printf("~~%.8s:\n", cs); declist(ARG); regvar = 5; retlab = isn++; if ((peeksym07L41L42 L43*L44J_lintyp"L10008jL10009lL45L46L10010L47L48L49L20002L52L10011L54(L55L10012"L58_plength L10013TL59^L60 L62~_convert"L64L10014L10015cret L10019L72L74L77L70.L73L75L76~convertnpt/L61RL67L68L69rL20005L71}L72L73L74*L75L200070L77\L79L81L82L10012L83L10013L84_cpyact"" L10014L85L10015L86 L89L93&L94_finact"L1L966_getchar _putchar L99VL100;L101hL102ZL103L104pL106L107L109cret ~fin = symbol()) != LBRACE) error("Compound statement required"); statement(1); printf("L%d:jmp cret\n", retlab); dimp = savdimp; } cinit(ds) struct hshtab *ds; { register basetype, nel, ninit; int o, width, realwidth; nel = 1; basetype = ds->type; /* * If it's an array, find the number of elements. * "basetype" is the type of thing it's an array of. */ while ((basetype&XTYPE)==ARRAY) { if ((nel = dimtab[ds->ssp&0377])==0) nel = 1; basetype = decref(basetype); } realwidth = width = l_debug _defsym _funcsym _xdflg _proflg _stflg _csym _cval _fcval _nchstr _nerror _paraml _parame _strflg _osleft _mosflg _initflg _inhdr _dimtab _obuf _sbuf _dimp _regvar _funcblk eksym = o; ninit = cinit1(ds, basetype, width, 0, nel); } /* * Above we pretended that a structure was a bunch of integers. * Readjust in accordance with reality. * First round up partial initializations. */ if (basetype==STRUCT) { if (o = 2*ninit % realwidth) printf(".=.+%o\n", realwidth-o); ninit = (2*ninit+realwidth-2) / realwidth; nel =/ realwidth/2; } /* * If there are too few initializers, allocate * more storage. * If there are too many initializers, extend * the decla tnode *np; stmt: switch(o=symbol()) { case EOF: error("Unexpected EOF"); case SEMI: case RBRACE: return; case LBRACE: if (d) { o2 = blkhed() - 6; if (proflg) { printf("mov\t$L%d,r0\n", isn); printf("jsr\tpc,mcount\n"); printf(".bss\nL%d:.=.+2\n.text\n", isn++); } printf("jsr r5,csv\n"); if (o2==2) printf("tst -(sp)\n"); else if (o2 != 0) printf("sub $%o,sp\n", o2); } while (!eof) { if ((o=symbol())==RBRACE) return; peeksym = o; statement(llect/u/cont; collect/v/cont; collect/w/cont; collect/x/cont; collect/y/cont; collect/z/cont; collect/A/cont; collect/B/cont; collect/C/cont; collect/D/cont; collect/E/cont; collect/F/cont; collect/G/cont; collect/H/cont; collect/I/cont; collect/J/cont; collect/K/cont; collect/L/cont; collect/M/cont; collect/N/cont; collect/O/cont; collect/P/cont; collect/Q/cont; collect/R/cont; collect/S/cont; collect/T/cont; collect/U/cont; collect/V/cont; collect/W/cont; collect/X/cont; collect/Y/cont; collect/Z/cont; cored size for benefit of "sizeof" */ if (ninitnel) { if ((ds->type&XTYPE)==ARRAY) dimtab[ds->ssp&0377] = ninit; nel = ninit; } /* * If it's not an array, only one initializer is allowed. */ if (ninit>1 && (ds->type&XTYPE)!=ARRAY) error("Too many initializers"); if (((nel&width)&ALIGN)) printf(".even\n"); } cinit1(ds, type, awidth, aninit, nel) struct hshtab *ds; { float sf; register struct tnode *s; register width, n0); } error("Missing '}'"); return; case KEYW: switch(cval) { case GOTO: if (o1 = simplegoto()) branch(o1); else dogoto(); goto semi; case RETURN: doret(); goto semi; case IF: np = pexpr(); o2 = 0; if ((o1=symbol())==KEYW) switch (cval) { case GOTO: if (o2=simplegoto()) goto simpif; cbranch(np, o2=isn++, 0); dogoto(); label(o2); goto hardif; case RETURN: if (nextchar()==';') { o2 = retlab; goto simpif; } actiL111$L112L113L20009L10023L10024L116L117L118L119L200114L121L122 L10026L10027L141^L140NL142nL138*L136L137L139<L143~~defin>cpcptL124~L125fL126L123zL128L129?L130L131$L132L133L10028L144\L20012  if (stack->typ) writes("illegal function"); a1 = stack->p1; if (a1->typ!=5) writes("illegal function"); a1 = a1->p2; op = a1->p1; a3base = a3 = alloc(); a3->p2 = op->p2; op->p2 = 0; a1 = a1->p2; a2 = list->p2; f1: if (a1!=0 & a2!=0) goto f2; if (a1!=a2) writes("parameters do not match"); op = op->p1; goto f3; f2: a3->p1 = a4 = alloc(); a3 = a4; a3->p2 = and(a1); assign(a1->p1, eval(a2->p2, 1));/* recursive */ a1 = a1->p2; a2 = a2->p1; goto f1; f3: o; case 5: a = addr->p2->p1; delete(a->p2); a->p2 = value; return; } } >p1; if (e == 0) etc->p1 = 0; else etc->p1 = eval(e, 0); e = b->p2; if (e == 0) etc->p2 = 0; else { e = eval(e, 1); etc->p2 = strbin(e); delete(e); } goto badvanc; retard: a = back->p1; if (a == 0) { rfail = 1; goto fail; } list = a; back = list->p2; var = back->p2; str = var->p1; etc = var->p2; if (etc->p2) goto retard; if (var->typ == 1) { if (bextend(str, last) == 0) goto retard; goto adv0; } if (ubextend(str, last) == 0) goto retard; adv0: a = str->p2; adv01->typ == 0) { list->p1 = 0; if (rfail == 1) { a = 0; goto fail; } list = base; if (r == 0) next = last = 0; else { next = r->p1; last = r->p2; } goto adv1; } b = alloc(); list->p1 = b; list = b; badv1: list->p2 = back = alloc(); back->p1 = last; b = a->p2; c = a->typ; list->typ = c; if (c < 2) { back->p2 = eval(b, 1); goto badvanc; } last = list; str = alloc(); etc = alloc(); back->p2 = var = alloc(); var->typ = b->typ; var->p1 = str; var->p2 = etc; e = b-+... main.c2parser.c0zacc.c)zerr.c*zinit.ca.outmain.oparser.ozacc.ozerr.ozinit.o: if (a == last) next = 0; else next = a->p1; advanc: a = list->p1; if (a == 0) { a = alloc(); if (r == 0) { a->p1 = a->p2 = 0; goto fail; } b = r->p1; a->p1 = b; if (next == 0) { a->p2 = r->p2; goto fail; } while(1) { e = b->p1; if (e == next) { a->p2 = b; goto fail; } b = e; } } list = a; adv1: back = list->p2; var = back->p2; d = list->typ; if(d < 2) { if (var == 0) goto advanc; if (next == 0) goto retard; a = next; b = var->p1;p = execute(op); /* recursive */ if (op) goto f3; a1 = stack->p1->p2; op = a1->p1; a3 = a3base; stack->p1 = op->p2; stack->typ = 1; op->p2 = a3->p2; f4: a4 = a3->p1; free(a3); a3 = a4; a1 = a1->p2; if (a1 == 0) goto advanc; assign(a1->p1, a3->p2); goto f4; case 11: case 10: case 9: case 8: case 7: a1 = and(stack); stack = pop(stack); a2 = and(stack); a3 = doop(op, a2, a1); delete(a1); delete(a2); stack->p1 = a3; stack->typ = 1; goto advanc; case 15:,...$dextern&y0.c(y1.cKy2.c1y3.c#y4.cy5.cl.outy0.oy1.oy2.oy3.oy4.oy5.oa.out e = var->p2; while(1) { if (a->ch != b->ch) goto retard; if (b == e) goto adv01; if (a == last) goto retard; a = a->p1; b = b->p1; } } str = var->p1; etc = var->p2; str->p1 = next; str->p2 = 0; c = etc->p2; if (var->typ == 1) { d = bextend(str, last); if (d == 0) goto retard; if (c == 0) goto adv0; while(1) { c =- d; if (c == 0) goto adv0; if (c < 0) goto retard; d = bextend(str, last); if (d == 0) goto retard; } } if (c = a1 = copy(list->p2); a2 = 1; goto l3; case 14: a1 = list->p2; a2 = 0; l3: stack = push(stack); stack->p1 = a1; stack->typ = a2; goto advanc; } } doop(op, arg1, arg2) { register int a1, a2; a1 = arg1; a2 = arg2; switch (op) { case 11: return(div(a1, a2)); case 10: return(mult(a1, a2)); case 8: return(add(a1, a2)); case 9: return(sub(a1, a2)); case 7: return(cat(a1, a2)); } return(0); } execute(e) struct node *e; { register struct node *r, *b, *c; struct node *[], yyr1[], yyr2[], yyact[], yypact[]; auto int *ps, s[_maxdepth]; auto int ac, n, *p; yystate = 0; yychar = -1; yynerrs = 0; yyerrflag = 0; ps= &s[0]-1; yypv= &yyv[0]-1; stack: /* put a state and value onto the stack */ if( yydebug ) printf( "state %d, value %d, char %d\n",yystate,yyval,yychar ); *++ps = yystate; *++yypv = yyval; newstate: /* set ap to point to the parsing actions for the new state */ p = &yyact[ yypact[yystate+1] ]; actn: /* get= 0) { if(d==3 & next!=0) { str->p2 = last; goto adv0; } goto advanc; } while(c--) if (ubextend(str, last) == 0) goto retard; goto adv0; fail: list = base; goto f1; fadv: free(back); b = list->p1; free(list); if (b == 0) return(a); list = b; f1: back = list->p2; var = back->p2; if (list->typ < 2) { delete(var); goto fadv; } str = var->p1; etc = var->p2; if (a != 0 & etc->p1 != 0) { if (str->p2 == 0) { free(str); str = 0; } assign(etc->p1, copy(str)); } m, *ca, *d, *a; r = e->p2; lc = e->ch; switch (e->typ) { case 0: /* r g */ a = r->p1; delete(eval(r->p2, 1)); goto xsuc; case 1: /* r m g */ m = r->p1; a = m->p1; b = eval(r->p2, 1); c = search(m, b); delete(b); if (c == 0) goto xfail; free(c); goto xsuc; case 2: /* r a g */ ca = r->p1; a = ca->p1; b = eval(r->p2, 0); assign(b, eval(ca->p2, 1)); goto xsuc; case 3: /* r m a g */ m = r->p1; ca = m->p1; a = ca->p1; b = eval(r->p2, 0); d = search(m, b->p2d p  ~ | !  |  c = j f   z C } n  }   \!  f  } x { B y  2 n LOPS  'M8 N=@Cp) o& +MK c  *MB =  'M88)  'wD [^MPSV)  *MX b &M0J) & &M  &M$#&), M  Uif (str) free(str); free(etc); free(var); goto fadv; } ); if (d == 0) goto xfail; c = eval(ca->p2, 1); if (d->p1 == 0) { free(d); assign(b, cat(c, b->p2)); delete(c); goto xsuc; } if (d->p2 == b->p2->p2) { assign(b, c); free(d); goto xsuc; } (r=alloc())->p1 = d->p2->p1; r->p2 = b->p2->p2; assign(b, cat(c, r)); free(d); free(r); delete(c); goto xsuc; } xsuc: if (rfail) goto xfail; b = a->p1; goto xboth; xfail: rfail = 0; b = a->p2; xboth: if (b == 0) { return(e->p1); } b = eval(b, 0); if (b == lookr movb r0,(r1)+ cmp r0,$'# bne 1b sub $2,r1 cmp r1,r4 blo 2b br 1b 1: clrb (r1) cmp r1,r4 blos start mov $1,tapa mov $-6144.,wc jsr pc,tread clr r1 1: mov r1,r2 mov r4,r0 2: cmpb (r0)+,(r1) bne 2f tstb (r1)+ bne 2b br 1f 2: mov r2,r1 add $64.,r1 cmp r1,$12288. blo 1b jsr pc,rew br start 1: mov 44.(r2),tapa mov 38.(r2),r0 inc r0 clc ror r0 neg r0 mov r0,wc clr r0 1: clr (r0)+ cmp r0,sp blo 1b jsr pc,tread jsr pc,rew br callout tapa: 0 wc: 0 ba: 0 name = ..-32. #include "sno.h" /* * sno4 */ and(ptr) struct node *ptr; { register struct node *a, *p; p = ptr; a = p->p1; if (p->typ == 0) { switch (a->typ) { case0: case 0: a->typ = 1; case 1: goto l1; case 3: flush(); return(syspit()); case 5: a = a->p2->p1; goto l1; case 6: return(binstr(nfree())); } writes("attempt to take an illegal value"); goto case0; l1: a = copy(a->p2); } return(a); } eval(e, t) struct node *e; { struct node *list, *a2, *a3, *a4, *a3base; et) return(0); if (b == lookfret) { rfail = 1; return(0); } if (b->typ!=2) writes("attempt to transfer to non-label"); return(b->p2); } assign(adr, val) struct node *adr, *val; { register struct node *a, *addr, *value; addr = adr; value = val; if (rfail == 1) { delete(value); return; } switch (addr->typ) { default: writes("attempt to make an illegal assignment"); case 0: addr->typ = 1; case 1: delete(addr->p2); addr->p2 = value; return; case 4: sysput(value); returnd1h1h2h3p1p2p3supshL772 L78\ L79f L80s L81y L82d L83 L84 L85 L86  register struct node *a1, *stack, *op; if (rfail == 1) return(0); stack = 0; list = e; goto l1; advanc: list = list->p1; l1: op = list->typ; switch (op) { default: case 0: if (t == 1) { a1 = and(stack); goto e1; } if (stack->typ == 1) writes("attempt to store in a value"); a1 = stack->p1; e1: stack = pop(stack); if (stack) writes("phase error"); return(a1); case 12: a1 = and(stack); stack->p1 = look(a1); delete(a1); stack->typ = 0; goto advanc; case 13: Z ] I O R U X [ J 9 ,68,16,74,17,75,18,76,19,77,50 ,92,51,93,52,94,53,95,54,96,73 ,47,87,47,98,47,116,131,117,132,133 ,47,-1,4,-1,20,-1,104,104,125,-1 ,105,-1,106,70,99,71,100,72,101,127 ,134,128,135,129,136,130,137,-1,97,-1 ,107,-1,108,-1,109,-1,115,93,116,-1 ,52,-1,7,-1,8,-1,10,-1,11,-1 ,12,-1,13,-1,51,-1,14,-1,102,-1 ,15,-1,53,95,117,-1,54,-1,55,-1 ,16,-1,17,-1,18,-1,19,25,84,30 ,85,42,88,43,89,44,90,45,91,103 ,123,-1,79,-1}; int yypgo[] {0,1,3,13,53,55,57,61,63,79 ,81,83,85,87,91,93,95,97,99,101 ,103,105,107,109,111,1138ii8Y ((89((9Y 99 IHH HI((9Y extern int yyline; /* input line number */ yyerror(s) char *s; { extern int yychar; extern char *yysterm[]; printf("\n%s", s ); if( yyline ) printf(", line %d,", yyline ); printf(" on input: "); if( yychar >= 0400 ) printf("%s\n", yysterm[yychar-0400] ); else switch ( yychar ) { case '\t': printf( "\\t\n" ); return; case '\n': printf( "\\n\n" ); return; case '\0': printf( "$end\n" ); return; default: printf( "%c\n" , yychar ); return; } } tcdt = 177350 tccm = 177342 tread: mov $tcdt,r0 mov $tccm,r1 for: mov $3,(r1) / rbn for 1: tstb (r1) bge 1b tst (r1) blt rev cmp tapa,(r0) beq rd bgt for rev: mov $4003,(r1) / rbn bac 1: tstb (r1) bge 1b tst (r1) blt for mov (r0),r2 add $5,r2 cmp tapa,r2 blt rev br for rd: mov ba,-(r0) / bus addr mov wc,-(r0) / wc mov $5,-(r0) / read 1: tstb (r1) bge 1b tst (r1) blt tread rts pc rew: mov $4003,tccm rts pc 8ii8Y ((89((9Y 99 IHH HI((9Y  the next action, and perform it */ n = ( ac = *p++ ) & 07777; /* n is the "address" of the action */ switch( ac>>12 ) { /* switch on operation */ case 1: /* skip on test */ if( yydebug && (yychar<0) ){ yychar = yylex(); printf( "character %d read\n", yychar ); } if( n != ( (yychar<0) ? ( yychar=yylex() ) : yychar ) ) ++p; goto actn; /* get next action */ case 2: /* shift */ yystate=n; yyval=yylval; yychar= -1; if( yyerrfb bic $!7,r3 bis r3,r2 mov r0,r3 mov $6.,r4 1: asl r3 dec r4 bne 1b bic $!700,r3 bis r3,r2 com r2 bic $!777,r2 rts pc bn: .=.+2 savr5: .=.+2 savsp: .=.+2 cobtab: .=.+1024. buffer: .=.+nword+nword 7    r epA! y.  7  w(& %2)> 2e&&  % P 6%(#%1  X R7NJ~%)%/%* $e%P<7 & & % .>?=& & % -@A=" * % +_F  _D  l 7 ~ z\7  y b \%/_7L%0 %_ &  _ _F H_f = r5 i = r3 .globl j,n .globl iget,jget .globl succ,fail .globl .px,.pxs .pxs: mov i,r0 tst (i)+ br 1f .px: jsr pc,iget 1: inc litc mov n(f),-(sp) mov j(f),-(sp) mov r0,-(sp) 2: tstb *(sp) beq 2f jsr pc,jget cmpb r0,*(sp) beq 1f tst (sp)+ mov (sp)+,j(f) mov (sp)+,n(f) jmp fail 1: clr n(f) inc (sp) inc j(f) br 2b 2: cmp (sp)+,(sp)+ mov (sp)+,n(f) jmp succ litc: 0 _dlag ) --yyerrflag; goto stack; /* stack new state */ case 3: /* reduce */ if( yydebug ) printf("reduce %d\n",n); ps =- yyr2[n]; yypv =- yyr2[n]; yyval=yypv[1]; yyactr(n); /* consult goto table to find next state */ for( p= &yygo[yypgo[yyr1[n]]]; *p != *ps && *p >= 0 ; p =+ 2 ) ; yystate = p[1]; goto stack; /* stack new state and value */ case 4: /* accept */ return(0); case 0: /* error ... attempt to resume parsing */ F  ӕ.7 % {|%7 ,7%[[_F7_F_F5/&_T60|_T __Fw ZV P7J% %  D-@w,7 (@w  7  & 1 " t5 7 ww 7   %' t%8 ww C _. 7 _47  yP 7PC J r eA! y  1 .+  %00,8252 ,4401,8256,4402,8253,4403,8254,12312,4398,8255,4399 ,8257,4400,8252,4401,8256,4402,8253,4403,8254,12313 ,4387,8249,4388,8248,4398,8255,4399,8257,4400,8252 ,4401,8256,4402,8253,4403,8254,12314,4353,8225,4354 ,8224,4355,8226,4356,8227,4357,8228,4358,8235,4359 ,8237,4360,8236,4361,8234,4362,8238,4367,8197,4368 ,8198,4369,8229,4370,8231,4371,8230,4372,8232,4373 ,8233,4374,8218,4375,8221,4376,8219,4377,8220,4386 ,8201,4389,8213,4390,8217,4391,8214,4392,8215,4393 ,8216,4394,8223,4396,8222,0,4353,8225,4354, switch( yyerrflag ){ case 0: /* brand new error */ ++yynerrs; yyerror( "syntax error" ); case 1: case 2: /* incompletely recovered error ... try again */ yyerrflag = 3; /* find a state where "error" is a legal shift action */ while ( ps >= s ) { for( p= &yyact[ yypact[*ps+1] ] ; (*p>>12) == 1 ; p =+ 2 ) /* search ps actions */ if( *p == 4352 ) goto found; /* the current ps has no shift onn "rb.orc.ord.ore.orf.org.orh.orx.o39L213L214L10048_ispow2 L235hL10043L236L20045L10046L249~delayprregtabletreepp1L251HL10055(L20046BL250DL252b_sdelay"L253rL254~sdelayappp1L10056L256_ncopy"L255L10057L257L20049~ncopyappL261L260~chkleaf:error", pop stack */ if( yydebug ) printf( "error recovery pops state %d, uncovers %d\n", *ps, ps[-1] ); --ps; --yypv; } /* there is no state on the stack with an error shift ... abort */ abort: return(1); found: /* we have a state with a shift on "error", resume parsing */ yystate = p[1] & 07777; goto stack; case 3: /* no shift yet; clobber input char */ if( yydebug ) printf( "error recovegnore erase label dlabel setsiz 2: erase: jsr pc,cerase br disp label: jsr pc,getc tst r0 bne label br disp dlabel: clr vtcol clr vtlc 1: jsr pc,getc tst r0 beq disp jsr pc,char br 1b setsiz: jsr pc,getc mov r0,cscale br disp point: jsr r5,collect 4 jsr pc,vtpoint br disp vect: jsr r5,collect 8. jsr pc,vtvect br disp frame: jsr pc,getc br disp circle: clr xory mov $cxy,r1 1: jsr pc,getc movb r0,(r1)+ cmp r1,$cxy+6 blo 1b jmp disp / temp mov radius,r1 mov r1,# define NUMA 14 # define NUMC 128 # define NUMS 3 # define SIZA 8 # define SIZC 2 # define SIZS 8 # define PTRI 509 # define CHARI 4000 # define PTRX 509 # define CHARX 4000 # define CONT 1 # define COLL 2 # define SAVE 3 # define OUT 4 # define ASYM 5 # define ASW 6 # define CSYM 7 # define CSW 8 # define INCL 9 # define DECL 10 # define SK2 11 # define SK 12 # define TABS 13 # define SEMI 14 # define SHARP 15 # define SKIP 0 # define COLLECT 1 # define SKIP2 2 #define CREATC 0644 ry discards char %d\n", yychar ); if( yychar == 0 ) goto abort; /* don't discard EOF, quit */ yychar = -1; goto newstate; /* try again in the same state */ } } } @w0w 0ue @ 5r@ b  55_N f  5e}- = u=w0w / %@ b@tt5  @w/w / 2\ 15 / 15 / /5 / 5 /@t%t N 5 / -l15 /5 /5 @ 5 / -D1<1 6 /  1 11 16 /e....46 /e10W6 /%. 58B0 lA / eu-@ vH @ vH qA / M4@ 5}+N A / %AA /%NA@ A / - A / A / ww  %r  f 42 57o%af 42 5& f R2% f 1 5@wPw > w,qw>w ,A w.w N 1ww   ww ~wpDep  p % 21w7 p7 pׯp- p p(wp7 p .wpeAByyaccpt(){}  _pres _pfirst _pempty#_nnonter#_lastred#_ftable _foutput _arrndx _zzcwset#_zzpairs#_zzgoent#_zzgobes#_zzacent# _zzacsav#"_zznsave#$_zzclose#&_zzsrcon#(_zzrrcon#*_ctokn _lineno#,_peekc#._tstates _ntstate _mstates _clset _lkst ` _nlset#0_lsetsz#2_wsets ` _cwset _wssize#4_numbval _rflag#6_oflag#8_ndefout#:_nerrors#<_fatfl#>_machine 15,01114,01122,01107,03111,01120, 01103,01126,01105,01132,01104,01102,01123,01131, xxxxx,01106,01130,01101,01127,01112,01125,01113, 01060,03061,01062,01063,01064,01065,01066,01067, 01070,01071,01052,01055,00004,00005,00006,01055, 00007,01100,02050,02051,03133,02135,00010,00011, 01075,00012,03072,01053,xxxxx,04041,00013,01077, 02047,04174,xxxxx,01043,00014,01044,xxxxx,xxxxx, xxxxx,xxxxx,xxxxx,xxxxx,xxxxx,xxxxx,xxxxx,xxxxx, xxxxx,xxxxx,xxxxx,xxxxx,xxxxx,xxxxx,xxxxx,xxxxx, }; int ibuf[259]; int obuf[2(chdir ../util; tp 2cr *) >/dev/null : 0 mboot dd if=../util/mboot ibs=512 count=1 conv=sync : 1 hboot dd if=../util/hboot ibs=512 count=1 conv=sync : 2 thru 97 dd if=/dev/tap2 bs=512 skip=1 count=96 : 98 dd if=../util/hpuboot ibs=512 count=1 conv=sync : 99 dd if=../util/rpuboot ibs=512 count=1 conv=sync : 100 dd if=../util/rkuboot ibs=512 count=1 conv=sync : 101 thru 4099 dd if=/dev/rk0 bs=512 skip=1 count=3999 : 4100 dd if=../util/rkuboot ibs=512 count=1 conv=sync : 4101 thru 8099 dd if=/dev/rk1 bs=512 skd } z  |  } break; case 46:{ yyval = numb(yypv[1]); } break; case 47:{ yyval = numb(yypv[1]); } break; case 48:{ yyval = 'H'; } break; case 49:{ yyval = 'B'; } break; case 50:{ yyval = 'N'; } break; case 51:{ yyval = 'D'; } break; case 52:{ yyval = 'T'; } break; case 53:{ yyval = 'U'; } break; case 56:{ yyval = yypv[2]->c1; } break; case 57:{ yyval = '{'; } break; case 58:{ yyval = yypv[2]->c1; } break; case 59:{ yyval = '}'; } break; case 60:{ yyval = 0; } break; case 61:{ lp[ct++] = yypv[1]; } break; case 62:{ lp[.globl .m,.q,.r .globl .p,sprv .m: jsr pc,sprv mov (sp),r0 mpy 4(sp),r0 mov r1,4(sp) br 1f .q: jsr pc,sprv mov 4(sp),r1 sxt r0 dvd (sp),r0 mov r0,4(sp) br 1f .r: jsr pc,sprv mov 4(sp),r1 sxt r0 dvd (sp),r0 mov r1,4(sp) 1: jmp .p  { switch ( ylet(style[icol],ilin)) { default: case 'L': case 'l': format = "%s@"; break; case 'R': case 'r': format= "@%s"; break; case 'n': case 'N': if (!dwide[icol] || tabentry[ilin][icol+1] != 0) { format=dwide[icol]? "@%s" : "%s@"; break; } case 'c': case 'C': format = "@%s@"; break; case 's': case 'S': format= ""; break; } if (! (dwide [icol-1]>0 && tabentry[ilin][icol] == 0 )) printf(format, tabentry[ilin][icol]); onbr"~chconbrlL40L42_dogoto"~dogotonp_tree _build _chkw _doret"~dorettL45D~putcharPbcL47b_putc L271 L273 ~getypez dstypeoL10071 L268 L274x L20048 L279 L280 L282` _conexp L283< L20046$ L286p ~decsyn oL288~redec L290fltused  { int i; char *o; /*printf("%d %c %d\n",fil,*string,n);/*DEBUG*/ string--; if((i = optr[fil] + n - 512) >= 0) { n =- i; o = &obuf[fil][optr[fil]] -1; while(--n >= 0) *++o = *++string; optr[fil] = 512; flsh(fil); n = i; } o = &obuf[fil][optr[fil]] - 1; optr[fil] =+ n; while(--n >= 0) { *++o = *++string; } return(0); } flsh(fil) { extern tp[]; if(optr[fil] <= 0) return(optr[fil]); nflush++; if(write(tp[fil],obuf[fil],optr[fil]) != optr[fil]) return(-1); optr[fil] = 0/ read rk rblk: iocom = 5 f = r5 i = r3 .globl j .globl succ .globl ctest,iget .globl string string: tst -(sp) jsr pc,iget 1: mov j(f),(sp) mov r0,-(sp) jsr pc,ctest mov (sp)+,r0 bcs 1b mov (sp)+,j(f) jmp succ *INSTR*/ /* dexit(); /*INSTR*/ /* times(tbuf); /*INSTR*/ /* tm1 = tbuf[0]/6; /*INSTR*/ /* tm2 = tbuf[1]/6; /*INSTR*/ /* printf("Prep: %d %d\n", tm1, tm2); /*INSTR*/ /* exit(); /*DEBUG*/ fn = "/bin/sort"; av[0] = "sort"; av[1] = tmp[0]; av[2] = "-o"; av[3] = tmp[0]; av[4] = 0; callsys(fn, av); /* times(tbuf); /*INSTR*/ /* tm1 = tbuf[3]/6; /*INSTR*/ /* tm2 = tbuf[5]/6; /*INSTR*/ /* printf("Sort: %d %d\n", tm1, tm2); /*INSTR*/ if(usw) { fn = "/usr/bin/upost"; av[0] = "upost"; i = 0; } e@ & e %   0 %c t  - x lf X R D>  w(w $   Nf    ww N ww N  r  ww  wzw v p@ A HwVw R L@A H w. w  @ i))99d, w BNf et7 p Fww @t5@t5~vwrw n ^ N % 8 ` x $     !(  2  BE  ff %  Iff eL   j |   wjw fb ZXwTw PL DBw>w : @ =@ww uurn; } error(a) { printf("Error %d\n",a); dexit(); } dexit() { extern nflush; /* printf("nflush = %d\n",nflush); /*DEBUG*/ if(tp[0] > 0 && utmp == 0) { unlink(tmp[0]); unlink(tmp[1]); } exit(); } callsys(f,v) char f[],*v[]; { int t,status,i; if((t = fork()) == 0) { for(i = 1; i <= 12; i++) signal(i,0); execv(f,v); printf("Can't find %s\n",f); exit(1); } else { if(t == -1) { printf("Try again\n"); return(1); } } while(t != wait(&status)); /* printf("Status = %o, %s\n",i = r3 .globl putcall,iget,kput,putoct .globl generate,succ .globl octal octal: mov $1f+1,r0 jsr pc,putcall jsr pc,iget mov (r0),r0 jsr pc,kput jmp succ 1: mov (i),r0 jsr pc,putoct jmp generate L227 L220 L221, L219~treeDcsandflgoppppsosopstprstopL160L10034L164_nextcha L165L167_copname" L20042PL173eL10031L10032 _block L177rL178L179L183,L228_errflus L159 L20043*L189L190L195L199L10043LL206XL10044zL207r(yyprdn) common/yycomn/yylval,yyval,yypv,yyvalv(150) common/yylcom/yychar,yyerrf,yydebu integer yychar, yyerrf, yydebu integer yyprdn,yyval,yylval,yypv,yyvalv #define yyclearin yychar = -1 #define yyerrok yyerrflag = 0 extern int yychar, yyerrflag; int yyval 0; int *yypv; int yylval 0; yyactr(__np__){ please define type # of %s earlierbad precedence syntax, input %dgoto 1000 switch(__np__){ previous rule not terminatedtoken illegal on lhs of grammar rulemissing :semicolon preceeds action * intcharfloatdoublestructlongautoexternstaticregistergotoreturnifwhileelseswitchcasebreakcontinuedodefaultforsizeofArg countCan't find %sCan't create temp.globl .data Symbol table overflowWarning: assignment operator assumedNonterminated commentUnknown characterL%d:.byte %o,0 Long character constantNonterminated string.data L%d:%o;%o;%o;%o .text Expression overflowexpression overflowExpression syntaxBad function.bss L%d:.=.+%o .text Bad register %of = r5 .globl j .globl classtab,jget .globl ctest .globl putcstr .globl succ ctest: inc ctestc mov r0,-(sp) jsr pc,jget asl r0 bit *(sp)+,classtab(r0) clc beq 1f asr r0 jsr pc,putcstr inc j(f) sec 1: rts pc .data ctestc: 0 L10012 L65:L20024RL20026T_subseq"L71L20031L72L73L74L10003L75L76L78L20032L804L89L91~L85L10007L10008L10009_getnum _getstr"_getcc"6L102L10010L104L105(L20021&L107fL108TL112~subseqxcabcL114L10019L115L116L113entry[ilin][icol], ct); else if (span(style[icol],ilin) && (icol+1==ncol || !span(style[icol+1],ilin))) printf(".if \\n(%d-\\n(%d .nr %d \\n(%d\n", 30+ilin, icol+50, icol+50, ilin+30); } } /* run out table, put field characters in */ printf (".fc  @\n"); for (ilin=0; ilin  _b>  _h >  _h>  _n>  _n#>  _n*>  _n1>  _t7>  _t=>  _B>  _sG>  % " 7 "% "% !% !%:!_!mn!7 h _w p fs5 @tt  @sj@4sj@ew4 -N! @    -6!%  rrt>  N \ w  5% 3 5 !,%\  5%}(\0(%( 5 @ `, 5!@ `5,@ `,BD " `,w w 15BeCe~-1nF  271@wt movclrcmptstaddsubincdecmuldivasrashaslbicbic $1,bitbit $1,bisbis $1,xornegcom*$jeqjnejlejgtjltjgejlosjhijlojhis/nopjbr ?K?K?K?K?K?K??K??K?K?K?L?L?L?L?L?&L?6L?JLhL?xLTLLT?L?LLT5 %5 %)5 D-%  3  5%%   Nff e ff ef %  &ff xe ?.e( %  &  e?eww @ / x% @wN & &  xef& f%+* xe 3N& f& xe4:;89w >DCB%#  x used _hshtab _space _cp _cmst P_isn _swtab _swp _contlab _brklab _retlab _deflab _nauto _autolen _peeksym _peekc _eof _line _treebas _debug _defsym _funcsym _xdflg _proflg _stflg _csym _cval _fcval _nchstr _nerror _paraml _parame _strflg _osleft _mosflg _initflg _inhdr _dimtab _obuf _sbuf _dimp _regvar _funcblk 7 % %upN Efe %_^ Ne 5%f&f be 5% %7w& f&f be%# 5ru NN  Ame 5rA f r upN  @E% @E % @E% AA @@5 ww CB 7%-%)r  ffe %-P  HN @# 7 2w ,(?% :  7  $f v Le0 9ev*p* h*b* 7R*we&  m6* 4* 0~  0  0~ w7 * ) )0   )Wp `e0eӕ?f) ,)P ) ) @f ) Z7D') JXZ|)t)-n)f)f@w fw'w&PXwfw&VXJA 7 (fAW,f B@ 8 @&61fA   @ @er3 / byte 1: mov 2(sp),r4 / working x bisb (r1)+,r3 2: add cscale,r4 aslb r3 bcs 3f bne 2b sub cscale,r5 dec (sp) bne 1b tst (sp)+ mov (sp)+,x add $8*7,x add $16.*7,r5 mov r5,y incb vtcol rts pc 3: mov r4,x mov r5,y jsr pc,vtpoint br 2b .bss .=.+50. stack: eof: .=.+2 lchar: .=.+2 nchar: .=.+2 hiwat: .=.+2 fchar: .=.+2 charb: .=.+nbuf scnt: .=.+2 xy: .=.+12. x = xy y = xy+2 count: .=.+2 evenodd:.=.+2 vtcol: .=.+2 vtlc: .=.+2 cscale: .=.+2 cxy: ox: .=.+2 oy: .=.+2 radius: cx: .=.+2 _d"x./yopt -r./yopt -rv./yopt./yopt -v/usr/yacc/yopti-r-rv-voptimization execl call failsMH2019.yaccopt -rMH2019.yaccopt -rvMH2019.yaccoptMH2019.yaccopt -v : int nterms %d; int nnonter %d; int nstate %d; char *yysterm[] { "%s", 0 }; char yy y   y%;  f %   f % %_< %%__  f %  l%%^X T    _74,($7    7 &  & %   _ _ _  5   x t%_< %b_< f P& %D <_, 4 .%_<   5 B@ @ae54N @-#@ !%*@ @a% %  @@54 u-%* \  ~ &  2_z#w b @ @me,55 De,_%%*_%%f5 Ce,M I%*E%@Ap,p(  N d& AA 2r %AA 2r  eC- u-u5ueD- FA1@ @m5...patablefctable]mtab.catabctabMetablea.outetabctaba.outetabetabmq mov r1,mul mov ac,rsq mov mq,rsq+2 mov r1,cy mov $-1,cx asl r1 asl r1 mov r1,count br cirarc cirarc: jsr r5,idle; 10 br 2f br 1f 2: jmp disp 1: loop: tst cx bge 2f mov $-ssize,r0 br 1f 2: mov $ssize,r0 1: mov r0,dely tst cy bge 2f mov $ssize,r0 br 1f 2: mov $-ssize,r0 1: mov r0,delx mov cx,mq mov cx,mul mov mq,r1 mov ac,r0 mov cy,mq mov cy,mul add mq,r1 adc r0 add ac,r0 sub rsq+2,r1 sbc r0 sub rsq,r0 mov cx,r1 mov cy,r2 bic $!100000,r0 bic $!100000,r1 bic $!100L3N_disarra"X_chkfun"L4_length L20000 L5L10002L11L12@ _error" L20006_block"xL20001L17L18T _decref L208L20007.L21LL22i L20010`L24_incref L25L20013L26} L33_chklval"L34_chkw"L35L36L37L38L10000.L296L30 L31d_setype"L1_fold"L100~getstrcL118&L119L20034L1211_mapch"tL1225~getcc6cccpccL124RL20036FL127lL1288L10022L10023L10024L10025L10026L135@L153L156L157 L145L144L143L10028L10029$L138L140~mapchtL130acnmpeekacL131.L1334L134L100f = r5 i = r3 .globl j .globl jget,iget .globl char .globl succ,fail char: jsr pc,jget bne 1f tst (i)+ jmp fail 1: mov r0,-(sp) jsr pc,iget mov (sp)+,(r0) inc j(f) jmp succ / read and echo character from tty. / perform normal cr/lf uc/lc mapping. tks = 177560 tkb = 177562 getc: tstb *$tks bge getc mov tkb,r0 bic $!177,r0 cmp r0,$'A blo 1f cmp r0,$'Z bhi 1f add $'a-'A,r0 1: cmp r0,$'\r bne putc mov $'\n,r0 / put a character on the tty. / also performs delay. tps = 177564 tpb = 177566 putc: cmp r0,$'\n bne 1f mov $'\r,r0 jsr pc,(r5) mov $'\n,r0 1: tstb tps bpl 1b mov r0,tpb rts pc / write a string to tty / jsr pc, mesg; ; .even mesg: movb *(sp),0) printf ("%s\n",page[(mustwr+i) % PL]); flush(); } outc (c, lp) char **lp; { int j; j = 0; while (j >0 || *(*lp) == '\b' || *(*lp) == ESC || **lp == SI || **lp == SO) { switch (*(*lp)) { case '\b': j++; (*lp)++; break; case '\0': *(*lp)++ = ' '; j--; break; case ESC: /* 'escape' */ (*lp) =+ 2; break; case SI: case SO: (*lp)++; break; default: (*lp)++; j--; break; } } if (c != ' ' || *(*lp) == '\0') *(*lp) = c; (*lp)++; } store (ll) { if (page[ll/ / / sqrt & dsqrt fortran functions .globl sqrt. .globl dsqrt. .globl sqrt .globl retrn .globl rerr .globl temp dsqrt.: temp .+2 setd br 1f sqrt.: temp .+2 setf 1: movf *2(r3),r0 jsr pc,sqrt bes 1f movf r0,temp jmp retrn 1: jsr r5,rerr; 13. 8253 ,4403,8254,12328,4383,8250,4384,8251,4385,8242,4387 ,8249,4388,8248,4398,8255,4399,8257,4400,8252,4401 ,8256,4402,8253,4403,8254,12329,4383,8250,4384,8251 ,4385,8242,4387,8249,4388,8248,4398,8255,4399,8257 ,4400,8252,4401,8256,4402,8253,4403,8254,12330,4363 ,8302,4364,8303,4365,8304,4366,8305,0,12355,12373 ,12374,12375,12376,12359,12344,12345,4353,8225,4354,8224 ,4355,8226,4356,8227,4357,8228,4358,8235,4359,8237 ,4360,8236,4361,8234,4362,8238,4367,8240,4368,8241 ,4369,8229,4370,8231,4371,8230,4372,8232xxxxArg countMissing temp fileCan't create %sTree space botch.globl fltused Missing temp fileIllegal initialization.bss L%d:.=.+4 .text mov%c r%d,r0 mov%c r%d,%c(sp) tst%c r%d No code table for op: %sNo code table for op %dmov%c r%d,r%d mov%c r%d,r%d Register overflow: simplify expressionr%d*tst r%d adcsbc r%d  Bb"|@NHNHHHn*+,HIJ<::<::FVVhhz/ PDP-11/20 vt01 driver ssize = 2 nbuf = 4500. rti = 2 reset = 5 drsc = 167770 drrc = 167774 dr11cx = 167772 dr11ps = 167750 dr11pb = 167752 lks = 177546 vtsc = 176756 vtxr = 176760 vtyr = 176762 csw = 177570 ps = 177776 ac = 177302 mq = 177304 mul = 177306 div = 177300 sr = 177311 ash = 177316 .. = 20 jmp *$restart .+2; 0 / bus .+2; 0 / ins .+2; 0 / bpt .+2; 0 / iot .+2; 0 / pwr .+2; 0 / emt .+2; 0 / sys . = [100-..]^. / clock clint; 300 . = [500-..]^. / dr11c dr11int; 240 restart:too many lookahead sets$$$~$yyact %d: reduce/reduce conflict (red'ns %d and %d ) on %s %d: shift/reduce conflict (shift %d, red'n %d) on %syypactyyr1yyr2off = %d, k = %d action table overflow %d no space in action tableyygoyypgo%s: gotos on %s nonterminal %s %d %d state %d, pre-nonterminal %s states %d and %d have equal positions state %d %s same as %d %s accepterrorshift %dreduce %d . reduce %d . error The function "system" is called/dL0oF0dV     r h  4 G  : o  m  _ & s  k  z  b \  D 8 B ?   i g   t   =   t hpunixrp40xvC',I sxt- div,I- movC,A KCmovC',I sxt- divsp)+,I- movC,A KCGJmovC(J),I sxt- divsp)+,I- movC,#(J) GDKCmovC2(sp),I sxt- divsp)+,I- mov,*(sp)+ KCmovb',I xor,(sp) movsp)+,I movb,A GDmovC(sp),-(sp) KAxor,(sp) movCsp)+,I movC,*(sp)+ movC',I asr movC,A GBasrC(I) movC(I),I movif,I GBmovif(I),I GAmovif,I GAmovfi,I GAsetl movfi,-(sp) movsp)+,I seti setl movif,I seti GBsetl movif(I),I seti GAmov,-(sp) setl movifsp)+,I seti GCsxt GAmovsp)+,I -- 7j&1@\X 1w&f@@& HADCBF7F(F6rwH*6r@<=@A>?DEBC=EDCB(KfSVW' P<@#<@d@p@|@@ #!""$vJJJHJ0@@@## @@@A A  L v R r  < HH00HHHHHHbAjArAzAAiy(8XyyXyyXyy$ 5&  5&  \5@&  wL   w>\ \& (    5@x&  Z& B    @& UJ&w\ ,& w\ &w&w&w  7 % %a %U%%W 8U] W 8E\fc     ` \ ]-%% a h h   \ \a  ! p ]\R B\ %W !W e,8224,4355,8226,4356,8227,4357,8228,4358,8235,4359 ,8237,4360,8236,4361,8234,4362,8238,4367,8240,4368 ,8241,4369,8229,4370,8231,4371,8230,4372,8232,4373 ,8233,4374,8218,4375,8221,4376,8219,4377,8220,4386 ,8201,4389,8213,4390,8217,4391,8214,4392,8215,4393 ,8216,4394,8223,4396,8222,12350,4378,8311,4395,8330 ,0,4378,8311,4395,8331,0,4378,8311,4395,8332 ,0,4378,8311,4395,8333,0,12301,12302,12303,12304 ,-1}; int yypact[] {0,1,62,65,124,125,148,149,150,150 ,150,205,208,211,214,217,276,150,150,150 ,150,277,280,28s rkf.s strip a.out cp a.out ../util/rkf as reset.s strip a.out cp a.out ../util/reset as dldr.s strip a.out cp a.out ../util/dldr as mcopy.s tm.s wrk.s rk.s strip a.out cp a.out ../util/tmrk as mcopy.s tm.s wrp.s rp.s strip a.out cp a.out ../util/tmrp as mcopy.s tm.s whp.s hp.s strip a.out cp a.out ../util/tmhp as mcopy.s ht.s wrk.s rk.s strip a.out cp a.out ../util/htrk as mcopy.s ht.s wrp.s rp.s strip a.out cp a.out ../util/htrp as mcopy.s ht.s whp.s hp.s strip a.out cp a.out ../util/hthp rm a.o((hxx(h(xx(H((hx8H( mov $inod,r4 1: mov (r5)+,(r4)+ cmp r4,$addr+16. blo 1b rts pc / routine to read in block / number specified by bno / after applying file system / mapping algorithm in inode. / bno is incremented, success / return is a skip, error (eof) / is direct return. rmblk: add $2,(sp) mov bno,r0 inc bno bit $LRG,mode bne 1f asl r0 mov addr(r0),r0 bne rblka 2: sub $2,(sp) rts pc / large algorithm / huge algorithm is not implemented 1: clr -(sp) movb r0,(sp) clrb r0 swab r0 asl r0 mov addr(r0),r0)Hyiy)iHy)yy))vH%5 @ 5vHu @ p-vH - u-uu -d @ 7`p h5 @ vH@ p-vHN ^@ vH ^ee( - e  ^N ^e - _' @ B @  ^ -  w w p   } .%@ } 15 5 -n @ re5 }@ re5 } @ }  p) @ @ / 5 @ } @ @ / - ump condbranch condset nregsload valueforce registerP((<((j((=((>((?((@((A((B((C((D((E(((((F(()((G(((((( ((!((*((H((+((I((,((J((-((K((.((L((/((W((7((U((Q((0()N()1 ) )O ) )%))&))b))c))<))=))>")&)?*).)@.)*)A&)")B2)7)C<)@)D@)<)E7)2)))))")&)*).).)*) &)") )) F)K) K)F) ))j)0+0+ )!)%)&)b`)c`)P*(Z*)Z***+*,*-*.Z*7Z* Z& f% w$ w  u-@w @w D  w%%%%%# 5~Fw C_ xCC / p_C / _%e  p+ 0    xB C G CC=$ 0%*& d#% + C /% %& -C* 0 _C ww pC wrw `D  Ce C / w<fr0,fr5 movf $one,fr0 clrf fr1 1: dec r1 bmi 1f movf fr0,fr2 movf fr1,fr3 mulf fr4,fr0 mulf fr4,fr1 mulf fr5,fr2 mulf fr5,fr3 subf fr3,fr0 addf fr2,fr1 br 1b 1: tst r0 beq 1f clrf -(sp) movf $one,fr2 movf fr2,-(sp) movf fr1,-(sp) movf fr0,-(sp) jmp divide 1: movf fr1,-(sp) movf fr0,-(sp) jmp *(r4)+ )9999(9h9yyyy9yyyyyyy9Ix _cvtab _opdope _ctab _symbuf _hshDeclaration syntax%.8s redeclared(8HY(8(888ii(IHIyI888X88XXII(888AE@ 5N  AE@ u@ 5_Z Nf & e_Z u- u- N _ (_ X%_Z -_V ) +_Z ,_Z @ _Z %$ %  _Z  _Z %#_Z  &_  % _Z   % _Z N r eA! y 'N_ _Z N_V w ,4R,8Z,9b,:v,;~,jmp GBjmp(I) jsrc,MA GBjsrc,#(I) GAjsrc,(I) clr clrf movC,I movof,I GBmovC(I),I GBmovof(I),I mov+,-(sp) mov,I GBmov+2(I),-(sp) mov(I),I movC',I M'C mov',I M,A GJmovC(J),I M'C(J) GBmovC(I),-(sp) M'C(I) movCsp)+,I GJmov(J),I M,#(J) GBmov(I),-(sp) M,#(I) movsp)+,I GAM1,A+ V'GJmov+2(J),-(sp) mov(J),I M1,#+2(J) V'(J)GBmov+2(I),-(sp) mov(I),-(sp) add1,#+2(I) V'(I)movs rts r5 vtvect: jsr r5,idle; 10 rts pc mov xy+4,r0 mov xy+6,r1 mov $2,r3 / sign(dx) mov r0,r2 sub x,r2 / abs(dx) bge 1f mov $-2,r3 neg r2 1: mov $2,r4 / sign(dy) sub y,r1 / abs(dy) bge 1f mov $-2,r4 neg r1 1: clr r5 clr -(sp) / residules cmp r2,r1 blt 2f / select loop on max(dx,dy) mov r2,count asr count loop1: jsr pc,xvtpoint cmp r5,(sp) ble 1f add r2,(sp) sub r5,(sp) clr r5 add r4,y 1: add r1,r5 add r3,x dec count bge loop1 tst (sp)+ rts pc 2: mov r1,count asr X w e d V  _foutput _cin _cout _arrndx _zzcwset _zzpairs _zzgoent _zzgobes _zzacent _zzacsav _zznsave _zzclose _zzrrcon _zzsrcon _ctokn _ntlim _tlim _lineno _peekc _tstates _ntstate _mstates _clset _lkst _nlset _lsetsz _wsets _cwset _wssize _numbval _rflag _oflag _ndefout _machine _setup"L10001L10002L14ZL16bL9<L17pL10008"L100 8 8(iY Y Y yyyYyY Duplicate case (%d)cfcc jbr L%d L%d:tst (sp)+ cmp (sp)+,(sp)+ add $%o,sp %d: %c%oEEEE! r * * r * * dr D" Hn(& $&@@ @ \@<FNV\bl& |&|&"& "&0& !d  ! !BL z V V L V  L V ,    7` 25ʥ    %!ʥE%5 E%% @ _ w J7j y tU_ VR :` x >7 84 & &   e  %YtU= %)7 7E  feVp^ -  v% # tU P 7Zwl  .% w J N w6w 2.e w _%2 5@ "r%/_7& & & v(e2 2 25L "5& 5% @-%% r? %% ,% %$%    &  5   &  5 r eEA! y"U & &&_: % $ v(e Nf  2%wf%U(A p_%p)+,I GAMP GAMsp) VM KAmovC,A KAmovfo,A GBKAmovf,#(I) GBmovC,#(I) movC(I),I GBKAmovfo,#(I) GBKImovC,#(I) movC,I KAGJmovf,#(J) KAGJmovfo,#(J) GDKAmovC,*(sp)+ GDKAmovfo,*(sp)+ GAGAM' GAMD,I GAKJMD(J),I GAKIMP,I KDGAMD(sp)+,I KCGAMPsp)+,I GAM,I M+,(sp) VGAKIMsp)+,(sp) VM,I KCGAMsp)+,2(sp) VMsp)+,(sp) GCKAxor,(sp) movsp)+,I GAasr GATsxt- div,I- GATsxt- KJdiv(J),I- GATsxt- KIdiv,I- KCGATsxt- divsp)+,I- M,A' mov,I movC',I MP,I movC,A KBM(I),A' mov,I KAM,A' mov,I KBGJM(I),#(J) mov(J),I movf',I KIMP,I movf,A KCmovC',I MPsp)+,I movC,A KCmovof',I MPsp)+,I movfo,A KAGJM,#(J) mov(J),I KCGBMsp)+,#(I) mov(I),I GDKCmovC2(sp),I MPsp)+,I movC,*(sp)+ KCGBmovC(I),I MPsp)+,I movC,#(I) KCGBmovof(I),J MPsp)+,J movfo,#(I) movf,I movC',I sxt- divP,I- movC-,A KCmovC',I sxt- divsp)+,I- movC-,A KCGJmovC(J),I sxt- divsp)+,I- movC-,#(J) GDKCmovC2(sp),I sxt- divsp)+,I- movC-,*(sp)+ mo L10027& L126L127L10025L118:L119PL120TL121\L122fL129L128L123nL124vL125z~foldopap1ap2p1v1v2L115L114L116<L20019XL20020b_conexp"~conexpt_tree L132L134  s $ ~ t   =    t   g  mv a.out r3.o as r4.s; mv a.out r4.o as r5.s; mv a.out r5.o as r6.s; mv a.out r6.o as r7.s; mv a.out r7.o as r8.s; mv a.out r8.o as r9.s; mv a.out r9.o as ra.s; mv a.out ra.o as rb.s; mv a.out rb.o as rc.s; mv a.out rc.o as rd.s; mv a.out rd.o as re.s; mv a.out re.o as rf.s; mv a.out rf.o as rg.s; mv a.out rg.o as rh.s; mv a.out rh.o as rx.s; mv a.out rx.o ar r /lib/filib.a *.o rm *.o chdir ../rt1 as abs.s; mv a.out abs.o as aimag.s; mv a.out aimag.o as aint.s; mv a.out aint.o as alog.s; mv a.out alog.o ah w %( $@ 55 X %[ 3 3 3_ %#  X%d 5 5 @ r eA! y%@ u& ff xe _E%T & &d%#_ E%i & &$ xe_%$  1% & ^ &f} 5 5 5  5_%3 ee%5%1e& &%% %.%L%% & %_0u- @w C   3w%g 3" _*" xF%$%_*"_*"&( p(e 3 3 34 4 %#% 4 % %%%2- %  %(;%84%2l %#] != 0) free (page[ll]); page[ll] = alloc ( leng (lbuff) + 2); copy (page[ll],lbuff); } fetch(ll) { int i; for (i=0; i < LINELN; i++) lbuff[i] = '\0'; copy (line=lbuff, page[ll]); } copy (s,t) char *s, *t; { if (t == 0) return (*s=0); while (*s++ = *t++); } leng (s) char *s; { int l; for (l=0; s[l]; l++); return (l); } n }C z   UETR5$  5$  U$wp   \]   7 $r@\r@]  e  JW!]W!(] 5h$7 `$e  , J$N$@$ f\    \]$ $$$]& N & N  N N S C B A  eW!\Շ w^ m## # rf]5#e        W!]\P    0&\d& dN & dN dC N eN e-.#8#$## L20044 L163 L164 _rlength L20046 L167 L168P L169v L170rL171 L172_prste"" _blkend" ~blkend csL20048 L177 L179 L180L10016<L186B L182Z L188^ L185> ~prste" csrflgacsL187L189~errflust aooL191 L20050~ ~declist scsclasselsizeoffsettypeL194 5:4N f  AAE@ 54N   AE@ u@ 5_x Nf z &B /e_x u- u-3B NB /_ (_ N%Z_x -_t ) 0+_x M_x @  _x %$B /%  _x  p_x %#_x  &_  , % _x  V % _x NB r e@A! yB /'NB_ _x BN_t w <$B 5~F * x+ % %#2 %e7&= e %% D w%% && & h e & 7t5&6w dJ wXw T L 7l  y o w, < e ~     %    %7   _ x  _, t_, l_, 5 Z%aN Z x :0 0 *f %  * ; mv a.out f44.o as ../fx/fhd.s f45.s; mv a.out f45.o as ../fx/fhd.s f46.s; mv a.out f46.o as ../fx/fhd.s f47.s; mv a.out f47.o ld -r ../a.out *.o mv a.out .. rm *.o chdir ../fx as fhd.s fx1.s; mv a.out fx1.o as fhd.s fx2.s; mv a.out fx2.o as fhd.s fx3.s; mv a.out fx3.o as fhd.s fx4.s; mv a.out fx4.o as fhd.s fx5.s; mv a.out fx5.o as fhd.s fx6.s; mv a.out fx6.o as fhd.s fx7.s; mv a.out fx7.o as fhd.s fx8.s; mv a.out fx8.o as fhd.s fx9.s; mv a.out fx9.o as fhd.s fxa.s; mv a.out fxa.o as fhd.s fxb.s; mv a.ou w4$  Nfe j%  5~F  Nfe j%   Nff j% N =w #D 5~F w#%(Nf&e %  =%$%(Nf&e %  =% r eXAA! y"  %Pe( ^ x8A b U 4 % %, p _~%p, NfS& f%e =_ b _~%V# # # int fromflg 0; # define CONTIG 257 # define QTEXT 258 # define SPACE 259 # define THIN 260 # define TAB 261 # define UP 262 # define DOWN 263 # define BACK 264 # define FWD 265 # define MATRIX 266 # define LCOL 267 # define CCOL 268 # define RCOL 269 # define COL 270 # define MARK 271 # define LINEUP 272 # define SUM 273 # define INT 274 # define PROD 275 # define UNION 276 # define INTER 277 # define LPILE 278 # define PILE 279 # define CPILE 280 # define RPILE 281 # define ABOVE 282 # define DEFINE N& <85& 28 eRNf f%5wR 75& 7  N Nf f%55 Nf b &B /eN @w)%ZN  5 5Nf X%5%(%F %% -Q(K%V% %! 7NfS %56Nf %5_@55  5~F@5 5E 0@ r e@A! y.  _%+%I_ _D5  " w z u sj  GCM,(sp) GCKBM(I),(sp) GCKAM,(sp) /d/o/x0f,0e/c/s/l:0rZV3d3t3333333l3|3366355553328886z575586^66606644^4h444444H 8X _cvtab _opdope _ctab _symbuf _hshused _hshtab _space _cp _cmst P_isn _swtab _swp _contlab _brklab _retlab _deflab _nauto _autolen _peeksym _peekc _eof _line _treebas _debug _defsym _funcsym _xdflg _proflg _stflg _csym _cval _fcval _nchstr _nerror @ 5@ @m@5@@m@-@@5@ 5@mAA@ @@@5NNN& &f & %e@mv 1NNN& @mT 1@ @ & A @l& 1Nf %N Ns @  NNm Ny N @ A p, @ @   Nff~ e nh ^ &T & eN N N w&-CLR>. d: N K H E B ? < 9 M J G D A > ; 8 7 4 1 . + ( % " 6 3 0 - * ' $ ! 5 2 / , ) & #                           L86*L87L90L20009<L93_simpleg L98L20011_branch L100, _dogoto _doret _pexpr" L107*_cbranch _label L108@_nextcha L110_chconbr L113< L10006hL114L20012L20016_conexp L121L122L20017L20021L124L20019_chkw _pswitch" L128zL129_forstmt"N L131L134L135.L136L137;~forstmt#$  %e d    tE5% % uu- u-1 5+7" y %@e@-  ee}_@5 r eA! y w%_N _ & & & e?edN & &  e?e%__%_w dD 333 3 3 ̥  e e  h 9  F ?  _paraml _parame _strflg _osleft _mosflg _initflg _inhdr _dimtab _obuf _sbuf _dimp _regvar _funcblk _build"L10003L10004L10005L10006L7L20003xL19(L27L15L10L16L23pL28 ~buildopdopepcvndtleftccvnp1p3p2t1t2t3csv L2L10029L147L148kL150~defout6cpciL153L20017@L20013L157L20019RL10035L20015XL10031dL10032pL10033|L155L163_chstash"~chstashcL165L166L164L10040L10041L10042L10043L10044L207n L199D L200J L206h L204\ L205b L201P L202V L10055L10056L188L196prflagaregctabletreerregstringcprregtableopdatreeoptp1p2reg1L10015PL99~_branch _label L20033L98zL20024L20026L102nL103x_oddreg _chkleaf":L10016L105L106L10017 L1076 L110Z L111z L10032 L10018 L118 L20029 L20027 L121 213,4390,8217,4391,8214,4392,8215,4393 ,8216,4394,8223,4396,8222,0,12322,4394,8270,0 ,4353,8272,4354,8273,4355,8274,4356,8275,0,12356 ,12357,12358,12351,12352,12354,12353,4353,8272,4354,8273 ,4355,8274,4356,8275,4394,8278,0,12363,12364,12365 ,12366,12367,12368,12369,12370,12371,12372,12298,4383,8250 ,4384,8251,4385,8242,4387,8249,4388,8248,4398,8255 ,4399,8257,4400,8252,4401,8256,4402,8253,4403,8254 ,12293,12294,12296,12326,12360,12361,12342,12343,12336,12337 ,12338,12339,12340,12341,4398,8255,4399,8257,44011,4395 ,8313,0,4378,8311,4395,8314,0,12321,4353,8272 ,4354,8273,4355,8274,4356,8275,4395,8316,0,4363 ,8302,4364,8303,4365,8304,4366,8305,4395,8318,0 ,12299,4394,8319,0,4394,8320,0,4394,8321,0 ,4394,8322,0,12305,12306,12307,12308,12362,12319,12315 ,12316,12317,12318,12346,12347,12300,12331,4387,8249,4388 ,8248,4398,8255,4399,8257,4400,8252,4401,8256,4402 ,8253,4403,8254,12309,4383,8250,4384,8251,4385,8242 ,4387,8249,4388,8248,4398,8255,4399,8257,4400,8252 ,4401,8256,4402,8253,4403,8254,12323,4353,8225,4354 / hpwrite wblk: iocom = 61 N& 55V 5@ 53Nf %3@ 5 5@3Nf %s@5Nf 5 e}-@=E@-5ʥ@%$/N&& % $@ 5 E@-@%$  &f % eʋ_w B5  @@ 5% C wx r eFA! y7  7n  e%#3% ,%d ,-1}; memory overflow NULL { %s }  )9IyiiiyHIhi9YY(h9YY9YY(hyYHYyyIHIyy+2(sp),*2+2(sp) rts pc 1: mov 4+2(sp),r1 mov 6+2(sp),r0 jsr pc,seekchar mov 0+2(sp),r0 jsr pc,alterword / make sp hold a simple rv (forget it might be a table value) sprv: mov (sp)+,r0 cmp $-1,2(sp) bne 1f mov (sp)+,(sp) mov (sp)+,(sp) 1: mov r0,pc 9: jmp succ 8224 ,4355,8226,4356,8227,4357,8228,4358,8235,4359,8237 ,4360,8236,4361,8234,4362,8238,4367,8240,4368,8241 ,4369,8229,4370,8231,4371,8230,4372,8232,4373,8233 ,4374,8218,4375,8221,4376,8219,4377,8220,4386,8201 ,4389,8213,4390,8217,4391,8214,4392,8215,4393,8216 ,4394,8223,4396,8222,4397,8295,12348,4383,8250,4384 ,8251,4385,8242,4387,8249,4388,8248,4398,8255,4399 ,8257,4400,8252,4401,8256,4402,8253,4403,8254,12327 ,4383,8250,4384,8251,4385,8242,4387,8249,4388,8248 ,4398,8255,4399,8257,4400,8252,4401,8256,4402,bol"L10005\L10006dL88dL92L90tL94L84L10013pL10014zL10015L10016L10017L10018L61L67@L68JL110~L70xL96L69\L79L99L640L81>L98L20018L82HL109nL77L63(L100L111~symbolspcL55L56L54FL57L60 L20016D_getchar .globl putch,obuild .globl putoct putoct: mov r0,-(sp) bic $7,r0 bic r0,(sp) clc ror r0 ror r0 ror r0 beq 1f jsr pc,putoct 1: mov (sp)+,r0 add $'0,r0 jsr pc,putch rts pc ? 7 `    / copy and execute DEC loaders core = 24. prs = 177550 mov $dldr,r0 mov $[core*2048.]-300,r1 mov r1,r2 1: mov (r0)+,(r1)+ cmp r0,$end blo 1b jmp (r2) dldr: 10706 24646 10705 62705 114 5001 13716 177570 6016 103402 5016 404 241 6116 1001 10116 5000 4715 105303 1374 4715 4767 74 10402 162702 4 22702 2 1441 4767 54 61604 10401 4715 2004 105700 1753 0 751 110321 770 16703 150 105213 105713 100376 116303 2 60300 42703 177400 5302 207 12667 44 4715.globl .p,sprv .globl .a,.s,.o,.n,.x / + .a: jsr pc,sprv add (sp),4(sp) br 9f / - .s: jsr pc,sprv sub (sp),4(sp) br 9f / | .o: jsr pc,sprv bis (sp),4(sp) br 9f / & .n: jsr pc,sprv com (sp) bic (sp),4(sp) br 9f / ^ exclusive or .x: jsr pc,sprv mov (sp),r0 xor r0,4(sp) 9: jmp .p  9 y)) yiyy yyiiiiii) y)y yy)) iiii iy5 %5 %)5 D-%  3  5%%   Nff e ff ef %  &ff xe ?.e( %  &  e?eww @ / x% @wN & &  xef& f%+* xe 3N& f& xe4:;89w >DCB%#  x _svargv _eht _ebase _ewid _yyval _yypv _yylval _tht <_tbase <_ptr _nptr d_sptr d_eqnreg _eqnht _eqnbase _lefteq _righteq _lastcha _ESC _HREV _HFWD _SI _SO _boverb"~boverbtregbhwp1p2csv _oalloc _max L2L3 _printf L4 _down _fwd L5$ _back _upc,flag1 br 1b / reverse pass put in / foreward and reverse / block numbers mov $4017,tccm jsr pc,flag 1: mov $nword+3.,r4 2: clrb tcst clr (r5) jsr pc,flag dec r4 bne 2b clrb tcst clr (r5) mov bn,r0 jsr pc,comobv jsr pc,flag movb r1,tcst mov r0,(r5) jsr pc,flag dec bn blt check clrb tcst clr (r5) jsr pc,flag clrb tcst clr (r5) jsr pc,flag clrb tcst mov bn,(r5) jsr pc,flag clrb tcst clr (r5) jsr pc,flag clrb tcst clr (r5) jsr pc,flag br 1b / foreward pass / confirm blo/ copy mag tape to disk / load with proper tape and disk drivers jsr pc,rew 2: jsr pc,4(r5) .even jsr pc,numb mov r0,dska jsr pc,4(r5) .even jsr pc,numb mov r0,tapa jsr pc,4(r5) .even jsr pc,numb mov r0,r2 1: jsr pc,tread jsr pc,wblk inc tapa inc dska dec r2 bne 1b jsr pc,rew rts pc numb: clr r1 1: jsr pc,2(r5) cmp r0,$'\n beq 1f sub $'0,r0 cmp r0,$9 bhi 2f mul $10.,r1 add r0,r1 br 1b 1: mov r1,r0 rts pc 2: jsr pc,4L20052 _declare L10020DL212\L2082L217xL201L205~getkeyw elsizetptrolongfisadeclskwtkwscptrL197 L199L206,L207L10017BL10018F_strdec"L213hL214L215~L218L196L219L220L221L222L224L226~strdecdsmosftkwpelsizessymoL228 mov f,r0 /go back to prev stack frame mov k(r0),k(f) 3: tst (sp)+ jmp succ cerase: bit $1,csw bne cerase jsr r5,vtcom 6 rts pc vtcom: jsr r5,idle; 10 br 1f jsr pc,vtok mov (r5)+,vtsc rts r5 1: tst (r5)+ rts r5 getc: tst nchar bne 2f tst eof beq 1f jmp restart 1: mov $240,ps jsr pc,stardr clr ps br getc 2: movb *fchar,r0 bic $!377,r0 inc fchar dec nchar cmp fchar,$charb+nbuf bne 1f mov $charb,fchar 1: rts pc stardr: cmp nchar,$nbuf\/2 ble 2f cmp nchar,$nbuf blt 1f mov pc,hiwat rts pc 1: tst hiwat bne 1f 2: clr hiwat bis $2,drsc 1: rts pc ww D% % w@@% x& `?eBpC r r@ @Px @ t tw b ^ Z%  Dw<-2x(p ..:PT\fnvzIllegal conditionalCall of non-functionIllegal indirectionIllegal lvalueIllegal structure refUnimplemented structure operationIllegal conversionInteger operand required...$dldr.sdtf.smcopy.srkf.stboot.suboot.sfsboot.smboot.sJrun]hp.s[ht.sbreset.s"rhp.srk.sWrp.srrk.sIrrp.stc.sPtcf.sXtm.stpboot.stty.swhp.sYwrk.s|wrp.smakout cmp a.out /bin/rmdir cc -s -f -O sa.c cmp a.out /usr/bin/sa cc -s -n -O sh.c cmp a.out /bin/sh cc -s -O size.c cmp a.out /bin/size cc -s -O sleep.c cmp a.out /usr/bin/sleep cc -s -O sort.c cmp a.out /bin/sort cc -s -O split.c cmp a.out /usr/bin/split as strip.s strip a.out cmp a.out /bin/strip cc -s -O stty.c cmp a.out /bin/stty cc -s -O su.c cmp a.out /bin/su as sum.s strip a.out cmp a.out /bin/sum cc -s -O sync.c cmp a.out /bin/sync cc -s -O tbl.c -lp cmp a.out /usr/bin/tbl cc -s -O tee.crd+nword blo 1b mov (sp)+,r0 rts pc mtrack: mov (r0)+,(r5) jsr pc,flag rts r0 flag: bit $100200,tccm beq flag blt error6 rts pc flag1: bit $100200,tccm beq flag1 bge 1f tst tcst bge error7 add $2,(sp) 1: rts pc comobv: mov r0,r4 bic $!777,r0 asl r0 mov cobtab(r0),r0 swab r0 clr r1 ror r0 rol r1 asl r0 asl r0 rol r1 swab r4 bic $177401,r4 bis cobtab(r4),r0 rts pc bcomobv: mov r0,r2 bic $!70,r2 mov r0,r3 mov $6.,r4 1: asr r3 dec r4 bne 1b bic $!7,r3 bis r3,r2 movf = r5 i = r3 .globl x,k .globl ktab,ktat .globl putcall,obuild .globl errcom,succ,generate .globl rewcstr,getcstr .globl scopy scopy: mov $2f+1,r0 jsr pc,putcall jsr pc,rewcstr mov k(f),r2 neg r2 add $2,r2 1: jsr pc,getcstr tst r0 beq 1f movb r0,ktab(r2) inc r2 cmp r2,$ktat blt 1b jsr r0,errcom ;.even 1: clrb ktab(r2) bic $1,r2 neg r2 mov r2,k(f) jmp succ 2: mov i,r0 jsr pc,obuild jmp generate .globl .p,sprv .globl .sr,.sl / >> .sr: neg (sp) / << .sl: mov 4(sp),r1 clr r0 alsc (sp),r0 mov r1,4(sp) jmp .p  -% N A 1} N Am 1] -_6 P ^N? / @ }@ }f &? /% -@m }@m }@ &? /% -? /} X& A 1VE  &e} X& A 1V5 @ %vH_ -dw>w , t7 ~@ 58B@ 6B#x~tl~t Z~t`  lp -" :~eB-ڂ _!5  t0 -~/usr/bin/wc cc -s -O who.c cmp a.out /bin/who as write.s ld -s a.out -l cmp a.out /bin/write rm a.out / unix DEC-tape time/mtrack track formatter nword = 256. nblock = 578. endz = 7200. ps = 177776 tcst = 177340 tccm = 177342 tcwc = 177344 tcba = 177346 tcdt = 177350 mov r5,savr5 mov sp,savsp start: mov savr5,r5 mov savsp,sp jsr pc,4(r5) .even clr r0 mov $cobtab,r1 1: jsr pc,bcomobv mov r2,(r1)+ inc r0 cmp r0,$512. bne 1b mov $buffer,r0 1: mov $-1,(r0)+ cmp r0,$buffer+nword+nword blo 1b mov savr5,r5 jsr pc,2(r5) mov $340,ps mov $tcdt,r5 mov  clr eof mov $stack,sp mov $7,cscale mov $charb,fchar mov $charb,lchar clr nchar mov $100,drsc / IE on dr11c / mov $100,lks / IE on clock disp: jsr pc,getc asl r0 cmp r0,$2f-1f bhis 2f jmp *1f(r0) 1: disp / ignore order point vect frame circle arc explor disp / screw movexy disp / photo 2: jsr pc,cerase clr vtcol clr vtlc mov $-4000,x mov $3777,y mov $7,cscale 1: jsr pc,getc jsr pc,char br 1b order: jsr pc,getc asl r0 cmp r0,$2f-1f bhis disp jmp *1f(r0) 1: disp / iopr.c cmp a.out /bin/opr cc -s -O passwd.c cmp a.out /bin/passwd as pfe.s strip a.out cmp a.out /usr/bin/pfe cc -s -O pr.c cmp a.out /bin/pr cc -s -f -O prof.c cmp a.out /usr/bin/prof cc -s -O ps.c cmp a.out /bin/ps cc -s -O ptx.c cmp a.out /usr/bin/ptx cc -s -O pwd.c cmp a.out /usr/bin/pwd cc -s -O quiz.c cmp a.out /usr/bin/quiz cc -s -O rc.c cmp a.out /usr/bin/rc cc -s -O restor.c cmp a.out /bin/restor as rew.s strip a.out cmp a.out /bin/rew cc -s -O rm.c cmp a.out /bin/rm as rmdir.s strip a.<=@A>?DEBC=EDCB(KfSVW' P<@#<@d@p@|@@ #!""$|PPPNP6@@@## @@@A A  R | X x  B NN66NNNNNNbAjArAzAA~~~~Arg countMissing temp fileCan't create %sTree space botch.globl fltuse Xh(r5) .even tst (sp)+ rts pc ba: buf wc: -256. .bss buf: .=.+512. dska: .=.+2 tapa: .=.+2 .text L167L168L20053L170L172~sortcpfplpafptalpintchL175L176VL177LL20055L180L181L174L179H_ispow2"Z~ispow2ZtreedatreeL184L183_pow2"~pow2treediatreeL187L188L20057L10041L10042L10043L10045_optim V V V ?VSSlWSSvW?W?WSSSS?NN?NNTSTSS?TXN?TXN?fN?fNTT?$T??N??NSS?NN?fN??N??W??W?W?W?W?W?W?W?W?W?? Xw ~wn+Ded+  ^+ % 0w7 J+7 J+ׯ@+- 8+ 6+(w*+7 ,+ .w +eXB J ӕ- R r f e0 @ >* ҋ D~8BXFX *ӕ0 hiY99IYYfltused!fpp_getnum"_peekc _getchar _cval _fcval _error nfract.totdig2decpt0base,getdigfperr_tbitset _nolook _nstate _pstate _apstate _actsiz _tystate _stsize _memsiz _mem0 _mem _amem _memact _nprod _prdptr _prdlim _levprd _nterms _nerrors _fatfl _extval _trmset _cnames _cnamsz _cnamp _maxtmp _temp1 _temp2 _trmlev _nontrst _indgo _pres _pfirst _pempty _nnonter _lastred _ftable8xx8  283 # define DELIM 284 # define GSIZE 285 # define GFONT 286 # define FROM 287 # define TO 288 # define OVER 289 # define SQRT 290 # define SUPER 291 # define SUB 292 # define SIZE 293 # define FONT 294 # define ROMAN 295 # define ITALIC 296 # define BOLD 297 # define MQ 298 # define MQ1 299 # define LEFT 300 # define RIGHT 301 # define DOT 302 # define DOTDOT 303 # define HAT 304 # define TILDE 305 # define BAR 306 # define UNDER 307 #define yyclearin yychar = -1 #define yyerrok yyerrflag = 0 extern int yy cmp a.out /usr/bin/tee as time.s strip a.out cmp a.out /bin/time as tp?.s ld a.out -lc -l cmp a.out /bin/tp cc -s -O tr.c cmp a.out /usr/bin/tr as tty.s ld -s a.out -l cmp a.out /bin/tty cc -s -f -O typo.c cmp a.out /usr/bin/typo cc -s -O umount.c cmp a.out /etc/umount cc -s -O uniq.c cmp a.out /bin/uniq cc -s -f -O units.c cmp a.out /usr/bin/units as update.s strip a.out cmp a.out /etc/update cc -s -O usort.c cmp a.out /usr/bin/usort cc -s -O wall.c cmp a.out /etc/wall cc -s -O wc.c cmp a.out _line _ascbuf _nerror _cctab _efftab _regtab _sptab _lsptab _instab _brancht _opdope _opntab _nstack _nfloat _spacep _spacema _treebas _didreor _czero#_cone#_fczero#_tabtab#_cregtab _lleft#&_lassgn#2_llocv#<_main"~mainargcspargvtreetreespacctablecsv L2 L3_error _exit _fopen L4FL5@ r  @ r m -'@ re5 @ mx e% @ r mN @ r m0  -ww 7 7%7|% t%( .%(Ue  +L%L%7  f .%_(@ 0 vH m } .%N P5 _:@t _6@t@t5%!@ 8BA @6Bt@-V@ A %vHpvHDu#@tx-@te@t&e  @t../fx/fhd.s f31.s; mv a.out f31.o as ../fx/fhd.s f32.s; mv a.out f32.o as ../fx/fhd.s f33.s; mv a.out f33.o as ../fx/fhd.s f34.s; mv a.out f34.o as ../fx/fhd.s f35.s; mv a.out f35.o as ../fx/fhd.s f36.s; mv a.out f36.o as ../fx/fhd.s f37.s; mv a.out f37.o as ../fx/fhd.s f38.s; mv a.out f38.o as ../fx/fhd.s f39.s; mv a.out f39.o ld -r ../a.out *.o mv a.out .. rm *.o chdir ../f4 as ../fx/fhd.s f41.s; mv a.out f41.o as ../fx/fhd.s f42.s; mv a.out f42.o as ../fx/fhd.s f43.s; mv a.out f43.o as ../fx/fhd.s f44.s $-4000,x clrb vtcol ret: rts pc vtbs: sub $8.*7,x decb vtcol rts pc vttab: incb vtcol add $8.*7,x bitb $7,vtcol bne vttab rts pc vtpfx: jsr pc,getc mov r0,r1 sub $'7,r1 cmp r1,$2 bhi ret asl r1 jmp *0f(r1) 0: vtrev vthrev vthfor vtrev: add $8.*7,y decb vtlc vthrev: add $8.*7,y decb vtlc rts pc vthfor: sub $8.*7,y incb vtlc rts pc gchar: asl r1 asl r1 asl r1 asl r1 add $chrtab,r1 mov x,-(sp) / reference x mov y,r5 / working y mov $16.,-(sp) / table counter clr i = r3 .globl putch,putoct .globl trswitch .globl trace trace: jsr pc,putch mov i,r0 jsr pc,putoct mov $'\n,r0 jsr pc,putch rts pc .data trswitch: 0 0003,00004,00005,01141,00007,01130, 02042,02145,00003,02157,00005,02160,00007,00008, 01137,01134,00003,00004,00005,00006,00007,00008, 00001,01167,00003,00004,00005,00006,00007,00008, 00001,01055,01055,00004,01075,00006,00007,00008, 00001,00002,00003,00004,00005,00006,00007,001075, 00001,01076,00003,01074,01057,00006,01131,00008, 01135,01050,01174,01173,01050,01051,01175,01051, 01135,01133,01133,01130,00005,00006,00007,00008, 00001,00002,02173,02175,02047,02140,02136,00008, 00001,00002,02176,00004,/ read rp rblk: iocom = 5 ,4373,8233 ,4374,8218,4375,8221,4376,8219,4377,8220,4386,8201 ,4389,8213,4390,8217,4391,8214,4392,8215,4393,8216 ,4394,8223,4395,8306,4396,8222,0,12332,12333,12334 ,12335,4387,8249,4388,8248,4398,8255,4399,8257,4400 ,8252,4401,8256,4402,8253,4403,8254,12311,4387,8249 ,4388,8248,4398,8255,4399,8257,4400,8252,4401,8256 ,4402,8253,4403,8254,12310,4387,8249,4388,8248,4398 ,8255,4399,8257,4400,8252,4401,8256,4402,8253,4403 ,8254,12320,4383,8250,4384,8251,4385,8242,4387,8249 ,4388,8248,4398,8255,4399,8257,4400,8296 ,8222,12291,4096,16384,0,4353,8225,4354,8224,4355 ,8226,4356,8227,4357,8228,4358,8235,4359,8237,4360 ,8236,4361,8234,4362,8238,4367,8240,4368,8241,4369 ,8229,4370,8231,4371,8230,4372,8232,4373,8233,4374 ,8218,4375,8221,4376,8219,4377,8220,4386,8201,4389 ,8213,4390,8217,4391,8214,4392,8215,4393,8216,4394 ,8223,4396,8222,12289,12290,4383,8250,4384,8251,4385 ,8242,4387,8249,4388,8248,4398,8255,4399,8257,4400 ,8252,4401,8256,4402,8253,4403,8254,12292,12295,12297 ,4353,8225,4354,8224,4355,8226,4356,8227,4357,L95GL20018L10012L90L10013L10014L91*L93<L97`L10027L10028L10029L10030L184 L189 L195 L10033L10034L10035L10036L10037L10038L112 L114 L1324 L140 L135^ L130z L180: L168 L165 L117 L158Z L123 L172 L119 L161r L183r L170 L126$ L137~ L139 ~cex_cvtab _opdope _ctab _symbuf _hshused _hshtab _space _cp _cmst P_isn _swtab _swp _contlab _brklab _retlab _deflab _nauto _autolen _peeksym _peekc _eof _line _treebas _debug _defsym _funcsym _xdflg _proflg _stflg _csym _cval _fcval _nchstr _nerror yy)I  9 I y x 9 x I x yy))x ye @ 5@   5_N vf  5e}- = u= ww %@ @t5  @wLw H @\ 6 (   @t% N v -  5 @  -   ~zvr* eb^ZVP eFBs %4 5($ %ite pointer .bss cstrr: .=.+2 /read pointer cstrb: .=.+cstrt /base of quick access fragment status,f); /*DEBUG*/ if((t = (status & 0377)) != 0) { if(t != 2) { printf("Fatal error in %s\n",f); printf("t = %d\n",t); } dexit(); } return((status>>8) & 0377); } flags(argv) char *argv[]; { int j,xx; char *ap; j = 1; ap = argv[1]; while(*++ap != '\0') { switch(*ap) { default: printf("Unrecognized flag: %c\n",*ap); dexit(); case 'c': count = 1; continue; case 'i': /* Ignore file */ if(!xx) { xx = 1; only = 0; ignonl = argv[++j]; }.globl succ .globl iget .globl push push: jsr pc,iget mov (r0),r2 mov r2,r1 1: mov r1,-(sp) jsr pc,iget mov (sp)+,r1 mov r0,-(sp) mov (r0),-(sp) dec r2 bgt 1b mov r1,-(sp) jsr pc,succ / preserve c bit from here on mov (sp)+,r2 1: mov (sp)+,*(sp)+ dec r2 bgt 1b rts pc /pass sret or fret back to invoking rule [] {0,1,1,1,2,2,2,2,2,2 ,4,5,5,6,6,6,6,7,9,10 ,11,12,12,3,3,3,3,3,3,3 ,3,3,3,3,3,3,3,3,3,3 ,3,3,3,3,27,28,29,30,26,26 ,26,26,26,26,24,25,21,21,22,22 ,22,8,8,16,17,19,18,14,15,15 ,15,15,20,13,23,23,23,23,23,23 ,23,23,23,23,23,31,31,31,31,-1}; int yyr2[] {0,1,1,0,1,2,2,1,2,1 ,1,1,2,4,4,4,4,1,1,1 ,1,2,0,3,2,2,2,4,4,4 ,4,4,3,3,1,5,3,3,2,2 ,2,2,2,4,2,2,2,2,1,1 ,1,1,1,1,1,1,2,2,2,2 ,0,1,3,1,1,1,1,2,1,1 ,1,2,1,1,3,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,-1}; int yygo[] {0,-1,1,0,2,14,73,31,87,119 ,133,-1,98,2,47,7,66,8,67,omp: %s %s\n",a,b); /*DEBUG*/ a--; b--; while(*++a == *++b) { if(*a == '\0') return(1); } return(0); } char buf[512]; int nread 1; get(ifile) int ifile; { char static *ibuf; if(--nread){ return(*ibuf++); } if(nread = read(ifile,buf,512)){ if(nread < 0)goto err; ibuf = buf; return(*ibuf++); } nread = 1; return(0); err: nread = 1; printf("read error\n"); return(0); } int tp[1] 1; int optr[4]; char bsp[512]; char *obuf[1] bsp; int nflush; put(fil,string,n) char *string;?O?nP?PnQ?QT?Q?Q?O?R? 0: .even mov (sp)+,r1 mov (sp)+,r0 0 rts pc compare: mov r0,-(sp) mov $buffer,r0 1: cmp (r0)+,$-1 b; itab.hptr = &ipsp; itab.symt = &issp; itab.hsiz = PTRI; itab.ssiz = CHARI; itab.nsym = 0; itab.curb = 1; if((fi = open(ignonl,0)) < 0) { printf("Cannot open ignore/only file.\n"); dexit(); } if((read(fi,b,6) == 6) && (b[0] == 0100200)) { if(read(fi,itab.hptr,b[1]) < b[1]) { printf("Cannot read ignore/only file.\n"); dexit(); } if(read(fi,itab.symt,b[2]) < b[2]) { printf("Cannot read ignor/only file.\n"); dexit(); } close(fi); } else { close(fi); compile(); } retct/T/cont; collect/U/cont; collect/V/cont; collect/W/cont; collect/X/cont; collect/Y/cont; collect/Z/cont; skip2/a/coll; skip2/b/coll; skip2/c/coll; skip2/d/coll; skip2/e/coll; skip2/f/coll; skip2/g/coll; skip2/h/coll; skip2/i/coll; skip2/j/coll; skip2/k/coll; skip2/l/coll; skip2/m/coll; skip2/n/coll; skip2/o/coll; skip2/p/coll; skip2/q/coll; skip2/r/coll; skip2/s/coll; skip2/t/coll; skip2/u/coll; skip2/v/coll; skip2/w/coll; skip2/x/coll; skip2/y/coll; skip2/z/coll; skip2/A/coll; skip2/B/coll; skip2/C/coll; 10304 4715 303 50304 16707 26 4767 177752 4715 105700 1342 6204 103002 0 677 6304 114 0 . = dldr-500+744 16701 26 12702 352 5211 105711 100376 116162 2 [core*2048.]-400 5267 177756 765 prs end: VV V V ?VSSlWSSvW?W?WSSSS?NN?NNTSTSS?TXN?TXN?fN?fNTT?$T??N??NSS?NN?fN??N??W??W?W?W?W?W?W?W?W?W?? Xw ~w+De+  + % 0w7 +7 +ׯ+- + +(w|+7 ~+ .wr+eXB J ӕ- R r f e0 @ >+ ҋ D~8BXFX *; return(0); } $13,tccm jsr pc,flag / 8Kch for end zone mov $endz,r4 1: jsr r0,mtrack; 101101 dec r4 bne 1b / foreward guard mov $199.,r4 1: jsr r0,mtrack; 10101 dec r4 bne 1b / blocks mov $nblock,r3 1: jsr r0,mtrack; 10101 jsr r0,mtrack; 10110 jsr r0,mtrack; 11010 jsr r0,mtrack; 01000 jsr r0,mtrack; 01000 jsr r0,mtrack; 01000 jsr r0,mtrack; 01000 mov $nword-4,r4 2: jsr r0,mtrack; 111000 dec r4 bne 2b jsr r0,mtrack; 111011 jsr r0,mtrack; 111011 jsr r0,mtrack; 111011 jsr r0,mtrack; 111011 js b ee%5%1e& &%% %.%L%% & %_6u- @w C   3w%g 3" _0" xF%$%_0"_0"&( v(e 3 3 34 4 %#% 4 % %%%2- %  %(;%84%2l %intf("Line too long: %d.\n",lno); dexit(); } if(c & 0200) { printf("Illegal character: %o line %d\n",c,lno); dexit(); } if(fl) { if((*flag[fl])()) continue; } /*printf("cs = %d cc = %c ca = %d\n",cs,c,tab[cs].cl[c]); /*DEBUG*/ if(p = tab[cs].cl[c]) (*acts[p])(); continue; } if(ibuf == ibuf1) return; ibuf = ibuf1; goto top; } init() { int b[3]; auto fi,i; extern coll(),save(),out(),asym(),asw(),csym(),csw(); extern incl(),decl(),sk(),sk2(); extern dexit(); ib, 7 $7 $7 7 w @  7  . $ e!& 7 7   + - 7w t 7 rn7h ' t ~    7  0 wp`w e0YYYI9YY9 init(); i = 0; if(argc == 1) { *ibuf1 = 0; curfl = 2; curf[0] = '_'; curf[1] = '\t'; goto pipe; } while(++i < argc) { curs[4] = '\t'; if(fopen(argv[i],ibuf1) < 0) { printf("Can't open %s\n",argv[i]); dexit(); } curfl = 0; while((curf[curfl] = *argv[i]++) != 0 && curfl <=8) if(curf[curfl++] == '/') curfl = 0; curf[curfl++] = '\t'; if(curfl == 8) curf[8] = -1; pipe: ibuf = ibuf1; lno = 1; driver(); close(file); } flsh(0); close(tp[0]); /* monitor(0); /DEBC=EDCB' P&#&NZfl #!""$^22202##   4 ^ z : Z r r $ ~ 00000000LT\dn````Arg countMissing temp fileCan't create %sTree space botch.globl fltused Missing temp fileI M8M??xM??xM??M?M?M?MMMMMT?MT? N?N?N?.N?BN?FN?NN?NN?TXN?TXN?fN?fN?rN?rN??N??N?N?N??N?fN??N?N?NN?NN?TXN?TXN?fN?fN??N??N?N?TO?(O?? L20002L13L14D L15XL16J _eqnbox"l~eqnboxlbhp1p2L18L17jL19BL20 L21 _size"n~sizenp1p2_numb"|~numb|c `t  5~F? %5"F7# y%3  #_  4@ 478Ze   7_b!   3_ w ``5 5 B 5Nef '% C Cae !u%% ef &% %(_&$ %%   w%%# A1l %( Ne $Ce L &  5%*  5 B@ @ae54N @-#@ !%*@ @a% %  @@54 u-%* \  ~ &  2_z#w b @ @me,55 De,_%%*_%%f5 Ce,M I%*E%@Ap,p(  N d& AA 2r %AA 2r  eC- u-u5ueD- FA1@ @m5L%  5  Nfe L%   Nff L% N =w D 5 w%(Nf&e %  =%$%(Nf&e %  =% r eBA! y" %Pe( ^ x" U 4 % %, p _`%p, N& H%e =_b _`%-&e@@ cc -c -O c0[01234].c cc -c -O c1[0123].c as c1t.s; mv a.out c1t.o cc cvopt.c a.out table.s table.i as table.i; mv a.out table.o cc -c -O c2[01].c ed c0t.s g/fpp =/s/1/0/ w q as c0t.s; mv a.out c0t.o cc -s -n c0?.o cmp a.out /lib/c0 ed c0t.s g/fpp =/s/0/1/ w q as c0t.s; mv a.out c0t.o cc -f -s -n c0?.o cmp a.out /lib/fc0 cc -s -n c1?.o table.o cmp a.out /lib/c1 cc -f -s -n c1?.o table.o cmp a.out /lib/fc1 cc -s -n c2?.o cmp a.out /lib/c2 rm *.o table.i a.out DC(@p@0@pAf r2p 5 _L% N&_T%w w D eD-w w D@( = x2F=a;ADp}5@ =@0=Q-=x@' RF %+A r=A r &@t@t=A_F w w BCJ- `f '%f '%_l( J-  H%*%.B%> 9%(5%/%*eAfVp^ AADtpd       O N M L K I GAmovif,I GAmovfi,I GAsetl movfi,-(sp) movsp)+,I seti setl movif,I seti GBsetl movif(I),I seti GAmov,-(sp) setl movifsp)+,I seti GCsxt GAmovsp)+,I -- -!-P,F-G-NZ-UZ-K-L-M'C GBM'C(I) ML,A KBML(I),A KAMC,A GBML,#(I) GBKJML(J),#(I) GBKIMC,#(I)  M8M??xM??xM??M?M?M?MMMMMT?MT? N?N?N?.N?BN?FN?NN?NN?TXN?TXN?fN?fN?rN?rN??N??N?N?N??N?fN??N?N?NN?NN?TXN?TXN?fN?fN??N??N?N?TO?(O??* ҋ D~8BXFX *ӕ0  $f v Le0 9ev*p* h*b* 7R*we&  m6* 4* 0~  0  0~ w7 * ) )0   )Wp `e0eӕ?f) ,)P ) ) @f ) Z7D') JXZ|)t)-n)f)f@w fw'w&PXwfw&VXJA 7 (fAW,f B@ 8 @&61fA   @ @e7j&1@\X 1w&f@@& HADCBF7F(F6rwH*6r@<=@A>?DEBC=EDCB(KfSVW' P<@#<@d@p@|@@ #!""$vJJJHJ0@@@## @@@A A  L v R r  < HH00HHHHHHbAjArAzAAN& <85& 28 eRNf f%5wR 75& 7  N Nf f%55 Nf b &B /eN @w)%ZN  5 5Nf X%5%(%F %% -Q(K%V% %! 7NfS %56Nf %5_@55  5~F@5 5E 0@ r e@A! y.  _%+%I_ _D5  mov $4005,tccm jsr pc,compare jsr pc,flag tst r4 bne 1b mov $4003,tccm jsr pc,flag1 br error4 jsr pc,compare mov savr5,r5 mov savsp,sp rts pc error1: mov $1,r0 br 1f error2: mov $1,r0 br 1f error3: mov $3,r0 br 1f error4: mov $4,r0 br 1f error5: mov $5,r0 br 1f error6: mov $6,r0 br 1f error7: mov $7,r0 1: mov $1,tccm mov savr5,r5 mov savsp,sp jsr pc,4(r5) ; .even rts pc compare: mov r0,-(sp) mov $buffer,r0 1: cmp (r0)+,$-1 bne error5 cmp r0,$buffer+nwo5:4N f  AAE@ 54N   AE@ u@ 5_x Nf z &B /e_x u- u-3B NB /_ (_ N%Z_x -_t ) 0+_x M_x @  _x %$B /%  _x  p_x %#_x  &_  , % _x  V % _x NB r e@A! yB /'NB_ _x BN_t w <$B 5~F 5~F55N& , 55V 5~F@ 5~F3Nf %3@ 5~F 5~F@3Nf %s@5Nf , 5 e}-@=E@-5ʥ@%$/N&& % $@ 5~F E@-@%$  &f % eʋ_w .B5  @@ 5% C w. r e\@A! y7 < 7f<  e%#>HCHRHYH_HfHkHpHvH|HHHHHHHHHHHHHHHHHHHHHHHHHHHHI IIIIIIII"I&I)I,I/I2I5I9I=I@ICIFIHITIYI[I`IeIjIoIyIIII:,nameshort constantstringfloatdouble*r++*--r++pre--pre++post--post!un&*-~.+-*/%>><<&|^->int->doubledouble->int&&||&~double->longlong->doubleinteger->longlong->integer==!=<=<>=>p>=p=+=-=*=/=%=>>=<<=&=|=^=& for tests=& ~?callcallcallgotoj w4$  Nfe j%  5~F  Nfe j%   Nff j% N =w #D 5~F w#%(Nf&e %  =%$%(Nf&e %  =% r eXAA! y"  %Pe( ^ x8A b U 4 % %, p _~%p, NfS& f%e =_ b _~%Vf = 1; goto loop; /* lead backward */ case 014: leadf = 0; goto loop; /* initialize */ case 000: escf = 1; leadf = 1; rail = 0; mag = 0; font = 0; x = 0; y = 1300; goto loop; default: error("Bad control"); } /* flash code */ case 00: case 01: flash(code&077); goto loop; } error("Eh?"); } done() { fflush(obuf); exit(); } erase() { wvt(2, 01, 01); } flash(c) { char *cp; int sx, sy; int ft; if (font) c =| 0100; if(rail && mag) ft = p'+ N& | @5%' 5 If `%5D%b 0  f 0_x %@%b 0 D(K@e5 5W5V5%(K5%+ %,%I%JO5  %W%$%Z%WZ5u 5~F%uuNf& f%5%(K- O_x 5u_x u-_x    75)00005,00006,00007,00008, 00001,00002,00003,00004,00005,00006,00007,00008, 00001,00002,00003,00004,00005,00006,00007,00008, 00001,00002,00003,00004,00005,00006,00007,00008, }; int fontab[128] { 00000,01150,01164,01156,01155,03154,03151,01172, 01163,01144,01142,01170,01146,02152,01165,01153, xxxxx,01160,01055,02073,xxxxx,01141,01137,01143, 02140,01145,02047,01157,00001,01162,00002,01166, 01055,01167,01161,01057,03056,01147,00003,03054, 01046,01171,xxxxx,01045,xxxxx,01121,01124,01117, 01110,01116,011Z S P W R U \ ] ^ _ ` a } :0j2 & 6  2w 1%A  2X@& l1 A  2@& N1 7rZ @A   2X 17.Z@e-$ZA  2@e7ZBZX 1X 1X 1 5,@X 17WX 1  &Y %7Y 7 Y f f%# 0X 1 lYA /PW 81X@& l1 A  2 0X 1 F/ Y  2wf0w T0C wR0%ZW@Duplicate case (%d)cfcc jbr L%d L%d:tst (sp)+ cmp (sp)+,(sp)+ add $%o,sp %d: %c%oEEEE! r * * r * * dr D" AWp 8 E / .)*)ffD /e ),b, *E / eN/E / %M( (( (Nff((ffJD /e ( 4E / e N8E / C@E / e NEE / jE /w(@t5M5 @ @a0 Z u-N&& Z2% @a Ze 5 5 @ @ap-Z@ @a5Z u-AupA- uAupu @ @-v' p'l'h' b'Nm ffP'fD /e <'5 2'NmJE / u-5 *' 'OE / N&& Z2%@-N&& H2%WE / e ㆵ u-& &[E / 5 u-_N`E / N&& Z2%@-eE / e 놵 w 4CB 05 '4- qE  w4- 54t5 te ׂ  w C  %% 1w w ~B b#  %*.%+-%HLK  w2w DC B_tC7^( y & %5& $ e& eN _& & e& & e& e_ z$5& p$ e&  & &  z  k   s & _  mts = 172520 mtc = 172522 mtbrc = 172524 mtcma = 172526 tread: 1: mov ba,mtma cmp mtapa,tapa beq 1f bhi 2f jsr pc,rrec br 1b 2: jsr pc,rew br 1b 1: mov wc,r1 1: jsr pc,rrec add $256.,r1 bmi 1b rts pc rrec: mov $mts,r0 bit $2,(r0)+ bne rrec tstb (r0)+ bpl rrec inc r0 mov $-512.,(r0)+ mov mtma,(r0) mov $mtc,r0 mov $60003,(r0) 1: tstb (r0) bpl 1b tst (r0)+ bpl 1f mov $-1,(r0) mov $60013,-(r0) br rrec 1: add $512.,mtma inc mtapa rts pc rew: mov $60017,*$mtc clr mtapa rts pto loop; /* lower rail */ case 001: rail = 0; goto loop; /* upper mag */ case 003: mag = 1; goto loop; /* lower mag */ case 004: mag = 0; goto loop; /* upper font */ case 006: font = 1; goto loop; /* lower font */ case 005: font = 0; goto loop; /* escape forward */ case 007: escf = 1; goto loop; /* escape backward */ case 010: escf = 0; goto loop; /* stop */ case 011: error("done"); /* lead forward */ case 012: leadase(); y = 1300; } } else { y =+ esc; /* if (y>1300) error("Off top"); */ } goto loop; /* control, size change */ case 02: if ((code&020) != 0) { /* size */ esc = code & 017; if (esc==15) error("Bad size"); size = sizetab[esc]; wvt(3, 1, 4, size); if (dflag & single[esc]) x =+ 55; if (!dflag & !single[esc]) x =- 55; dflag = !single[esc]; goto loop; } switch(code&017) { /* control */ /* upper rail */ case 002: rail = 1; gohSwitch table overflowDefault not in switchUnknown keywordRedefinitionStatement syntaxExpression too largeStatement syntaxUndefined structure: %.8sNot an argument: %.8s%.8s undefined~%.8s=%c%o ~%.8s=L%d Conflict in storage classType clashMisplaced 'long'Bad structure name%.8s redeclaredDimension/struct table overflowiy))ytermTERMtokenTOKENleftLEFTnonassocNONASSOCbinaryBINARYrightRIGHTprecPRECinvalid escape, or illegal reserved word: %s%s should have been defined earliereof before %%}yyvalyyvalv(yypv%c%d)yypv[%d]EOF inside commentEOF in string or character constantaction does not terminatenonterminal %s not defined! %s: %d too many statesputitem(%s), state %d yacc error--duplicate itemout of state space%d: %s %d, %s %d, working set overflow State %d, nolook = %d flag set! %s     XX@ 5u-_H @  5@  5@ 7 yN @ K @   NNNm Q N @   @ T NNNm Z N " A A @  @ ]  A A @l  NNNm c   Nm %R   u @  u-wXw T L7H@ 5@ 5@ 5@ 5@ 506L10007L58~summarypnisL60zL61_printf L62L63L64L65(L20021L67$L69L70L71L72^L20023FL75L76 L77*L78PL79sL80L81L82L83 L84 L850 L86c L87t L10008zL59L89 L90L91 L92L93 L94L95 yi9X99 )999 9 i9 H 9 H H i9  9 H H 9 9 ip=1 count=3999 : 8100 : dd if=../util/rkuboot ibs=512 count=1 conv=sync : 8101 thru 12099 : dd if=/dev/rk0 bs=512 skip=1 count=3999 aregtregL100380L89@_arlengt"HL10040 L20031TL107fL101xL105`~arlengtHtL100nL99jL20033Z_dirsw# L108 _simpsw# L109 _hashsw#6 L1106 _pswitch"~~pswitch~deflabfptlablptabsbestpoctabZijafpalpncaserangeswpworstL112L113 L111_sortjle  $ %%  eu@E%N 5f %#  &  xe?fe`( @E%_$ _%4  f % _&_5 %%  5%52 5 N &&  te5@tE5E @555%P %% 55 u5 $%%D-55 %> %%e%_cbranch"L10050 L10051 L201 L200 L194 L197 L192 ~cbranchalblareg condoptreelblregatreel1L191 L10052 L195b L20063H _label" L20067 L20071z L20069 L10047 L10048 _rcexpr L202& L203Z L10053< L204N L206l L207%L10054v L10055z _branch" ~branch opclblaop` Cc % bN(K $% wT%fS_%(K_ 7 _C%fS%_FN $%F%(K D%nA \G< \G]B8N(K $% 5%W%Z%W- &f@B /e S%VfRB /%_vB  _Fw *Bu@ 5~F5%5 %6%"_%V_N85& 8 eNf@ f% 8  N Nf@ f%b8 ^8 @ZW%V page[ll%PL]=0; } fetch (ll%PL); cp = 0; continue; case '\0': continue; case ESC: c = getchar(); if (c == '7') { store(ll%PL); ll--; fetch (ll%PL); } else { outc (ESC, &line); outc (c, &line ); } continue; case '\r': line = lbuff; continue; case '\t': outc (' ', &line); cp = line-lbuff; while (cp++%8) outc(' ', &line); continue; default: outc(c, &line); } for (i=0; i  _%\ N 21 5u-_w X 7HCHRHYH_HfHkHpHvH|HHHHHHHHHHHHHHHHHHHHHHHHHHHHI IIIIIIII"I&I)I,I/I _ !5%  = %\  !5\ u-_N ^!5 r e8A! y%02%9.@e7H%0 5 5%0w$ _%9 upAmew%a%z%A%Z %_%.%$:lDu%a%z%A%Z%0%9 %_%.%$N  H#B#:# 5@_w #  _=  _b=  _b= xxxxArg countMissing temp fileCan't create %sTree space botch.globl fltused Missing temp fileIllegal initialization.bss L%d:.=.+4 .text mov%c r%d,r0 mov%c r%d,%c(sp) tst%c r%d No code table for op: %sNo code table for op %dmov%c r%d,r%d mov%c r%d,r%d Register overflow: simplify expressionr%d*tst r%d adcsbc r%d  Bb"|@NHNHHHn*+,HIJ<::<::FVVhhzzb "56  $L%d(r%d)r%dCompiler error: pname(r%d)%c%c(r%d)pname called illegallyIllegal use of registerL%d_%.8s%sNo match' for op %dcmp r0,$%o jhi L%d asl r0 jmp *L%d(r0) .data L%d:mov $L%d,r1 mov r0,L%d L%d:cmp r0,(r1)+ jne L%d jmp *L%d-L%d(r1) .data L%d:mov r0,r1 clr r0 div $%o,r0 asl r1 add $L%d,r1 mov r0,*(r1)+ mov (r1)+,r1 L%d:cmp r0,-(r1) jne L%d jmp *L%d-L%d(r1) .data L%d:jbr L%d sub $%o,r0 L%d L%d %o L%d:.. L%d L%d L%d L%d:.. %o L%d:L%d L%d .text  _%2 5@ "r%/_7& & & v(e2 2 25L "5& 5% @-%% r? %% ,% %$%    &  5   &  5 r eEA! y"U & &&_: % $ v(e Nf  2%wf%U(A p_%5DC(@p@0@pAf r2p 5 _R% N&_Z%w w D eD-w w D@( = x2F=a;ADp}5@ =@0=Q-=x@' RF %+A r=A r &@t@t=A_F w w BCJ- `f "'%f "'%_r( J-  H%*%.B%> 9%(5%/%*eAfVp^ AAfS f%V f%@ 5~F=%%  e@?5  E /  f& %ww D Jf& `%E /NE / wdw RNE / wNw <@  xCE / ENE / ww  = ==;E / Nff f fff /e  0 7=ww  D -E /%ww B __%     ~F5_5 ӕ0 $f v Le0 9e** ** 7*we&  m* * 0~  0  0~ w7 Z* P* L*0   8*Wp `e0eӕ?f * ,*P * * @f ) Z7>') JXZ))-))f@w fw&w&PXwfw&VXJA 7 H)fAW,f B@ 8 @&61fA   @ Dtp0(%( "5 @ `, "5!@ `5,@ `,BD " `,w w L25BeCe~-42nF  272@wt movclrcmptstaddsubincdecmuldivasrashaslbicbic $1,bitbit $1,bisbis $1,xornegcom*$jeqjnejlejgtjltjgejlosjhijlojhis/nopjbr ?K?K?K?K?K?K??K??K?K?K?L?L?L?L?L?&L?6L?JLhL?xLTLLT?L?LLT M8M??xM??xM??M?M?M?MMMMMT?MT? N?N?N?.N?BN?FN?NN?NN?TXN?TXN?fN?fN?rN?rN??N??N?N?N??N?fN??N?N?NN?NN?TXN?TXN?fN?fN??N??N?N?TO?(O??@p ҋ D~8BB pӕ0 $f v Le0 9eoo oo 7owe&  mo o 21~  21  21~ w7 |o ro no0   ZoWp `e0eӕ?fBo ,8oP .o (o @f  o ~7n B~nn-nnf VlPlHl  78l 4l 0l7*n 7 lf@l _fcval _nchstr _nerror _paraml _parame _strflg _osleft _mosflg _initflg _inhdr _dimtab _obuf _sbuf _dimp _regvar _funcblk _extdef"~extdefdselsizetypesclassocsv _symbol L1_getkeyw" L10000TL2L6`_blkhed" _decl1 L7b_printf L8L10001L4_decref _cfunc"_cinit"|L11p_error Y IIY Y yyyyY Y  IY  IY Y iYY8228 ,4358,8235,4359,8237,4360,8236,4361,8234,4362,8238 ,4369,8229,4370,8231,4371,8230,4372,8232,4373,8233 ,4374,8218,4375,8221,4376,8219,4377,8220,4386,8201 ,4389,8213,4390,8217,4391,8214,4392,8215,4393,8216 ,4394,8223,4396,8222,0,4394,8261,0,4394,8262 ,0,4394,8263,0,4394,8264,0,4353,8225,4354 ,8224,4355,8226,4356,8227,4357,8228,4358,8235,4359 ,8237,4360,8236,4361,8234,4362,8238,4367,8197,4368 ,8198,4369,8229,4370,8231,4371,8230,4372,8232,4373 ,8233,4374,8218,4375,8221,4376,8219,4377,8220,4386 ,8201,4389,8_cvtab#_opdope#_ctab#_symbuf _hshused _hshtab _space _cp _cmst P_isn _swtab _swp _contlab _brklab _retlab _deflab _nauto _autolen _peeksym _peekc _eof _line _treebas L20035 L20034 L124 L125 _prins L1270 L1298 L131H L20036V L10019r L138 L141 L142 L143 L10020 L144. _collcon L146* L147D L148T L149v L10021h L150p L10022 L152 L1558 L10023$ L10024 _xdcalc L157L160x L162 L163L164L20037 L171 L174 L175L176& L182L10026 L190L20030erm[] { "%s", 0 }; char *yysnter[] { "%s", "%s" }; %d/%d terminals, %d/%d nonterminals %d/%d grammar rules, %d/%d states %d shift/reduce, %d reduce/reduce conflicts reported %d/%d working sets used memory: states,etc. %d/%d, parser %d/%d %d/%d distinct lookahead sets %d extra closures %d action entries %d action entries saved through merging %d states %d goto entries %d entries saved by goto default conflicts: %d shift/reduce, %d reduce/reduce fatal error: , line %d int %s[] {0# `t  5~F? %5"F7# y%3  #_  4@ 47b8Ze   D8_h! "  3_ w ``5 5 B 5Nef "'% C Cae !u%% ef &% %(_,$ %%   w%%# A1l %( Ne $Ce L &  5%* ?O?O?nP?PnQ?QT?Q?Q?O?R?+ ҋ D~8BXFX *@e7d&1@\X 1w&f@@& HADCBF7(F6rw*6r@ J&**7*B]PP7 v*EDE!wE\*ED5!5! w |bXW!wZ44w643  xXwW! B  wZ44 wL4"4 w64 4w643  X)E7)E)U)E@)U@) )  ]E UUB]))) L) $BE? e]CE e@]@E xX5 )e5(5@(eY@] H e] 5@(> L]; N]66  N](R] `&e  N]   N](e(bww5Q$\ ] f   EU P5'   P\fPPQ7 '5    5 C B A  `5'  5p'  5^'  eE\  "$ $5"' $$ 5&  5&  \5@&  wL   w>\ \& (    5@x&  Z& B    @& UJ&w\ ,& w\ &w&w&w  7 % %a %U%%W 8U] W 8E\fc     ` \ ]-%% a h h   \ \a  ! p ]\R B\ %W !W e UETR5$  5$  U$wp   \]   7 $r@\r@]  e  JW!]W!(] 5h$7 `$e  , J$N$@$ f\    \]$ $$$]& N & N  N N S C B A  eW!\Շ w^ m## # rf]5#e        W!]\P    0&\d& dN & dN dC N eN e-.#8#$##<=@A>?DEBC=EDCB(KfSVW' P<@#<@d@p@|@@ #!""$|PPPNP6@@@## @@@A A  R | X x  B NN66NNNNNNbAjArAzAA~~~~Arg countMissing temp fileCan't create %sTree space botch.globl fltused Missing temp fileIllegal initialization.bss L%d:.=.+4 .text mov%c r%d,r0 mov%c r%d,%c(sp) tst%c r%d No code table for op: %sNo code table for op %dmov%c r%d,r%d mov%c r%d,r%d Register overflow: simplify expressionr%d*tst r%d adcsbc r%d """""Hh(FTNTNNNt*+,HIJB@@B@@L\\nnh "56&$L%d(r%d)r%dCompiler error: pname(r%d)%c%c(r%d)pname called illegallyIllegal use of registerL%d_%.8s%sNo match' for op %dcmp r0,$%o jhi L%d asl r0 jmp *L%d(r0) .data L%d:mov $L%d,r1 mov r0,L%d L%d:cmp r0,(r1)+ jne L%d jmp *L%d-L%d(r1) .data L%d:mov r0,r1 clr r0 div $%o,r0 asl r1 add $L%d,r1 mov r0,*(r1)+ mov (r1)+,r1 L%d:cmp r0,-(r1) jne L%d jmp *L%d-L%d(r1) .data L%d:jbr L%d sub $%o,r0 L%d L%d %o L%d:.. L%d L%d L%d L%d:.. %o L%d:L%d L%d .text Duplicate case (%d)cfcc jbr L%d L%d:tst (sp)+ cmp (sp)+,(sp)+ add $%o,sp %d: %c%oEEEE! # define PL 102 # define ESC 033 # define SI 017 # define SO 016 # define LINELN 800 char *page[PL]; char lbuff [LINELN], *line; main () { int c, i, j, ll, cp, mustwr; extern int fin, fout; fin = dup(0); fout = dup(1); for (ll=0; ll0) switch (c = getchar()) { case '\n': store (ll%PL); if (++ll >= mustwr) if (page[ll%PL] != 0) { printf ("%s\n",page[ll%PL]); mustwr++; free (page[ll%PL]); ijgapmidwnlistp1p2L10000LL10001PL42L20008L45L20010L10002FL10003PL48L49 L50L20012tL53* L540 L55A L56L57L58H L100076L63K L64Q L20013L66T L67Z L70] L71c L72z L73 L20015 _shift2" ~shift2 b1b2b3subsh+2(I) ML,A KAMC,A GBML,#(I) KBGJML(I),#(J) KAGJML,#(J) GBKJML(J),#(I) GBKIML,#(I) GDKBML(I),*(sp)+ GDKAML,*(sp)+ M'C M,A KBM(I),A KAM,A GBM'C(I) KBGJM(I),#(J) KBmovC',J M(I),J movC,A KAmovC',J M,J movC,A KAGJM,#(J) KCGBMsp)+,#(I) KCGBmovC(I),J Msp)+,J movC,#(I) asrC GBasrC(I) aslC GBaslC(I) ash,A KBash(I),A KAash,A j ..7.".#.$.%.(.).*.+.-...Q.0.< .= .> .? .@ .A .B .C .D .E .H.I.O.movo-!-P,F-G-NT-UT-K-L-M'C GBM'C(I) ML,A KBML(I),A KAMC,A GBML,#(I) GBKJML(J),#(I) GBKIMC,#(I) KBGJML(I),#(J) KAGJMC,#(J) GDKBML(I),*(sp)+ GDKAMC,*(sp)+ clr clr+ mov,A+ sxt mov,A mov+,A+ mov(I),A+ sxt KAmov,A+ sxt KAsetl movfi,A seti KAGJsetl movfi,#(J) seti KBmov(I),A mov+2(I),A+ KAmov,A movsp)+,A+ GBmov,#+2(I) sxt(I) KAGJmovsp)+,#+2(J) mov,#(J) GBKImov+2,#(I) sxt(I) KCGBmovsp)+,#+2(I) sxt(I) KCGBmovsp)+,#(I) movsp)+,#vC',I sxt- div,I- movC,A KCmovC',I sxt- divsp)+,I- movC,A KCGJmovC(J),I sxt- divsp)+,I- movC,#(J) GDKCmovC2(sp),I sxt- divsp)+,I- mov,*(sp)+ KCmovb',I xor,(sp) movsp)+,I movb,A GDmovC(sp),-(sp) KAxor,(sp) movCsp)+,I movC,*(sp)+ movC',I asr movC,A GBasrC(I) movC(I),I movif,I GBmovif(I),I GAmovif,I GAmovfi,I GAsetl movfi,-(sp) movsp)+,I seti setl movif,I seti GBsetl movif(I),I seti GAmov,-(sp) setl movifsp)+,I seti GCsxt GAmovsp)+,I -- >HCHRHYH_HfHkHpHvH|HHHHHHHHHHHHHHHHHHHHHHHHHHHHI IIIIIIII"I&I)I,I/I2I5I9I=I@ICIFIHITIYI[I`IeIjIoIyIIII:,nameshort constantstringfloatdouble*r++*--r++pre--pre++post--post!un&*-~.+-*/%>><<&|^->int->doubledouble->int&&||&~double->longlong->doubleinteger->longlong->integer==!=<=<>=>p>=p=+=-=*=/=%=>>=<<=&=|=^=& for tests=& ~?callcallcallgotoj clint: rti dr11int: bic $2,drsc movb drrc,*lchar tst drrc bge 1f inc eof br 3f 1: inc lchar inc nchar cmp lchar,$charb+nbuf bne 3f mov $charb,lchar 3: jsr pc,stardr 2: rti char: bit $!177,r0 jne disp jsr r5,idle; 10 rts pc mov r0,r1 sub $40,r1 bpl gchar movb chrsw+40(r1),r1 jmp *0f(r1) 0: ret / ignore vtnl vtcr vtbs vttab vtpfx ret / was escape vtnl: sub $16.*7,y incb vtlc incb vtlc cmpb vtlc,$[256.\/7]*2-6 blt vtcr mov $3777,y clrb vtlc jsr pc,cerase vtcr: movf,I GBmovof(I),I GEHAj.(.).7.0.clrC(sp) mov,-(sp) GBmov(I),-(sp) mov+,-(sp) mov,-(sp) GCM'sp) GCM,(sp) GCKBM(I),(sp) GCKAM,(sp) /d/o/x0f&0e/c/s/l40rZ2I5I9I=I@ICIFIHITIYI[I`IeIjIoIyIIII:,nameshort constantstringfloatdouble*r++*--r++pre--pre++post--post!un&*-~.+-*/%>><<&|^->int->doubledouble->int&&||&~double->longlong->doubleinteger->longlong->integer==!=<=<>=>p>=p=+=-=*=/=%=>>=<<=&=|=^=& for tests=& ~?callcallcallgotojump condbranch condset nregsload valueforce registerP((<((j((=((>((?((@((A((B((C((D((E(((((F(()((G(((((( ((!((*((H((+((I((,((J((-((K((.((L((/((W((7((U((Q((0))N))1))O))%))&))b))c))< )$)=$) )>(),)?0)4)@4)0)A,)()B8)=)CB)F)DF)B)E=)8) )$)$) )(),)0)4)4)0) ,)()  )$) L)Q) Q)L) $) )j)6+6+ )!)%*&*bf)cf)P*(`*)`***++,+-*.`*7`*0`*1*F6+G6+H+I+J,K6,L+N6+U6+O",fX)3D,4X,8`,9h,:|,;,jmp GBjmp(I) jsrc,MA GBjsrc,#(I) GAjsrc,d        movC,I KAGJmovf,#(J) KAGJmovfo,#(J) GDKAmovC,*(sp)+ GDKAmovfo,*(sp)+ GAGAM' GAMD,I GAKJMD(J),I GAKIMP,I KDGAMD(sp)+,I KCGAMPsp)+,I GAM,I M+,(sp) VGAKIMsp)+,(sp) VM,I KCGAMsp)+,2(sp) VMsp)+,(sp) GCKAxor,(sp) movsp)+,I GAasr GATsxt- div,I- GATsxt- KJdiv(J),I- GATsxt- KIdiv,I- KCGATsxt- divsp)+,I- M,A' mov,I movC',I MP,I movC,A KBM(I),A' mov,I KAM,A' mov,I KBGJM(I),#(J) mov(J),I movf',I KIMP,I movf,A KCmovC',I MPsp)+,I movC,A KCmovof',I MPsp)+,I movfo,A KAGJM,#(J) mov(J),I KCGBMsp)+,#(I) mov(I),I GDKCmovC2(sp),I MPsp)+,I movC,*(sp)+ KCGBmovC(I),I MPsp)+,I movC,#(I) KCGBmovof(I),J MPsp)+,J movfo,#(I) movf,I movC',I sxt- divP,I- movC-,A KCmovC',I sxt- divsp)+,I- movC-,A KCGJmovC(J),I sxt- divsp)+,I- movC-,#(J) GDKCmovC2(sp),I sxt- divsp)+,I- movC-,*(sp)+ movC',I sxt- div,I- movC,A KCmovC',I sxt- divsp)+,I- movC,A KCGJmovC(J),I sxt- divsp)+,I- movC,#(J) GDKCmovC2(sp),I sxt- divsp)+,I- mov,*(sp)+ KCmovb',I xor,(sp) movsp)+,I movb,A GDmovC(sp),-(sp) KAxor,(sp) movCsp)+,I movC,*(sp)+ movC',I asr movC,A GBasrC(I) movC(I),I movif,I GBmovif(I),I GAmovif,I GAmovfi,I GAsetl movfi,-(sp) movsp)+,I seti setl movif,I seti GBsetl movif(I),I seti GAmov,-(sp) setl movifsp)+,I seti GCsxt GAmovsp)+,I -- -!-P,F-G-NZ-UZ-K-L-M'C GBM'C(I) ML,A KBML(I),A KAMC,A GBML,#(I) GBKJML(J),#(I) GBKIMC,#(I) KBGJML(I),#(J) KAGJMC,#(J) GDKBML(I),*(sp)+ GDKAMC,*(sp)+ clr clr+ mov,A+ sxt mov,A mov+,A+ mov(I),A+ sxt KAmov,A+ sxt KAsetl movfi,A seti KAGJsetl movfi,#(J) seti KBmov(I),A mov+2(I),A+ KAmov,A movsp)+,A+ GBmov,#+2(I) sxt(I) KAGJmovsp)+,#+2(J) mov,#(J) GBKImov+2,#(I) sxt(I) KCGBmovsp)+,#+2(I) sxt(I) KCGBmovsp)+,#(I) movsp)+,#+2(I) ML,A KAMC,A GBML,#(I) KBGJML(I),#(J) KAGJML,#(J) GBKJML(J),#(I) GBKIML,#(I) GDKBML(I),*(sp)+ GDKAML,*(sp)+ M'C M,A KBM(I),A KAM,A GBM'C(I) KBGJM(I),#(J) KBmovC',J M(I),J movC,A KAmovC',J M,J movC,A KAGJM,#(J) KCGBMsp)+,#(I) KCGBmovC(I),J Msp)+,J movC,#(I) asrC GBasrC(I) aslC GBaslC(I) ash,A KBash(I),A KAash,A j..7.".#.$.%.(.).*.+.-...Q.0.<.=.>.?.@.A.B.C.D.E.H.I.O.movof,I GBmovof(I),I GEHAj.(.).7.0.clrC(sp) mov,-(sp) GBmov(I),-(sp) mov+,-(sp) mov,-(sp) GCM'sp) GCM,(sp) GCKBM(I),(sp) GCKAM,(sp) /d/o/x0f,0e/c/s/l:0rZV3d3t3333333l3|3366355553328886z575586^66606644^4h444444 5 B@ @ae54N "@-#@ !%*@ @a% %  @@54 u-%* b  ~ &  2_#w b @ @me,55 De,_%%*_%%f5 Ce,M I%*E%@Ap,p(  N j& AA 2r %AA 2r  eC- u-u5ueD- FA1@ @m5DC(@p@0@pAf r2p 5 _R% N&_Z%w w D eD-w w D@( = x2F=a;ADp}5@ =@0=Q-=x@' RF %+A r=A r &@t@t=A_F w w BCJ- `f "'%f "'%_r( J-  H%*%.B%> 9%(5%/%*eAfVp^ AADtp0(%( "5 @ `, "5!@ `5,@ `,BD " `,w w L25BeCe~-42nF  272@wt movclrcmptstaddsubincdecmuldivasrashaslbicbic $1,bitbit $1,bisbis $1,xornegcom*$jeqjnejlejgtjltjgejlosjhijlojhis/nopjbr ?K?K?K?K?K?K??K??K?K?K?L?L?L?L?L?&L?6L?JLhL?xLTLLT?L?LLT M8M??xM??xM??M?M?M?MMMMMT?MT? N?N?N?.N?BN?FN?NN?NN?TXN?TXN?fN?fN?rN?rN??N??N?N?N??N?fN??N?N?NN?NN?TXN?TXN?fN?fN??N??N?N?TO?(O??+ ҋ D~8BXFX *ӕ0 $f v Le0 9e** ** 7*we&  m* * 0~  0  0~ w7 Z* P* L*0   8*Wp `e0eӕ?f * ,*P * * @f ) Z7>') JXZ))-))f@w fw&w&PXwfw&VXJA 7 H)fAW,f B@ 8 @&61fA   @ @e7d&1@\X 1w&f@@& HADCBF7(F6rw*6r@ J&**7*B]PP7 v*EDE!wE\*ED5!5! w |bXW!wZ44w643  xXwW! B  wZ44 wL4"4 w64 4w643  X)E7)E)U)E@)U@) )  ]E UUB]))) L) $BE? e]CE e@]@E xX5 )e5(5@(eY@] H e] 5@(> L]; N]66  N](R] `&e  N]   N](e(bww5Q$\ ] f   EU P5'   P\fPPQ7 '5    5 C B A  `5'  5p'  5^'  eE\  "$ $5"' $$ 5&  5&  \5@&  wL   w>\ \& (    5@x&  Z& B    @& UJ&w\ ,& w\ &w&w&w  7 % %a %U%%W 8U] W 8E\fc     ` \ ]-%% a h h   \ \a  ! p ]\R B\ %W !W e UETR5$  5$  U$wp   \]   7 $r@\r@]  e  JW!]W!(] 5h$7 `$e  , J$N$@$ f\    \]$ $$$]& N & N  N N S C B A  eW!\Շ w^ m## # rf]5#e        W!]\P    0&\d& dN & dN dC N eN e-.#8#$##<=@A>?DEBC=EDCB(KfSVW' P<@#<@d@p@|@@ #!""$|PPPNP6@@@## @@@A A  R | X x  B NN66NNNNNNbAjArAzAA~~~~Arg countMissing temp fileCan't create %sTree space botch.globl fltused Missing temp fileIllegal initialization.bss L%d:.=.+4 .text mov%c r%d,r0 mov%c r%d,%c(sp) tst%c r%d No code table for op: %sNo code table for op %dmov%c r%d,r%d mov%c r%d,r%d Register overflow: simplify expressionr%d*tst r%d adcsbc r%d """""Hh(FTNTNNNt*+,HIJB@@B@@L\\nnh "56&$L%d(r%d)r%dCompiler error: pname(r%d)%c%c(r%d)pname called illegallyIllegal use of registerL%d_%.8s%sNo match' for op %dcmp r0,$%o jhi L%d asl r0 jmp *L%d(r0) .data L%d:mov $L%d,r1 mov r0,L%d L%d:cmp r0,(r1)+ jne L%d jmp *L%d-L%d(r1) .data L%d:mov r0,r1 clr r0 div $%o,r0 asl r1 add $L%d,r1 mov r0,*(r1)+ mov (r1)+,r1 L%d:cmp r0,-(r1) jne L%d jmp *L%d-L%d(r1) .data L%d:jbr L%d sub $%o,r0 L%d L%d %o L%d:.. L%d L%d L%d L%d:.. %o L%d:L%d L%d .text Duplicate case (%d)cfcc jbr L%d L%d:tst (sp)+ cmp (sp)+,(sp)+ add $%o,sp %d: %c%oEEEE! x 0 0 x 0 0 jx J" B!H"H"%&3\"h"p""&'&&&&'&&&''''''Divide checkC error: constExp. ov. pass 2<<888888888HCHRHYH_HfHkHpHvH|HHHHHHHHHHHHHHHHHHHHHHHHHHHHI IIIIIIII"I&I)I,I/I\`w  _%_75  Nefe %%M% H 7 & f eB~eb 7 dE% R7N%% 78e  | % % p  t  ww N N   7%   7ww @@E  E%N  r55%  fVpC  tk h {qwxevbmhSwitch table overflowDefault not in switchUnknown keywordRedefinitionStatement syntaxExpression too largeStatement syntaxUndefined structure: %.8sNot an argument: %.8s%.8s undefined~%.8s=%c%o ~%.8s=L%d Conflict in storage classType clashMisplaced 'long'Bad structure name%.8s redeclaredDimension/struct table overflowiy))y)Hyiy)iHy)yy))7 % %upN Efe %_^ Ne 5%f&f be 5% %7w& f&f be%# 5ru NN  Ame 5rA f r upN  @E% @E % @E% AA @@5 ww CB 7%-%)r  ffe %-P  HN @# 7 2w ,(?% :  7 iy)) I I  )yy y ii5 5%; 6 xD  - %  fe  5w   % w wt   %   =@w 2 * $%ʋʕ   0 ʥ w 7 %  wʥ E /7   Ew| x% E e E 0w 6%d0!  wPPL101L100~lintyptL93~error fsp1p2p3 p4 p5p6_fflush L103 _printf _putchar ~blockxanapopoldpd nptp1 p2p3_gblock"L107~gblocknpL109L110 _exit ~chklvalappL111L113 L10027& L126L127L10025L118:L119PL120TL121\L122fL129L128L123nL124vL125z~foldopap1ap2p1v1v2L115L114L116<L20019XL20020b_conexp"~conexpt_tree L132L134 PP2ppppp &v"(8Hl^ B Z ^ > \\\\2xxxxx.globl _%.8s External definition syntax.text _%.8s: ~~%.8s: Compound statement requiredL%d:jmp cret .comm _%.8s,%o .data _%.8s=. .=.+%o .=.+%o Too many initializers.even _%.8s=L%d .=.+%o .byte %o %o;%o %o;%o;%o;%o Inconsistent external initializationUnexpected EOFmov $L%d,r0 jsr pc,mcount .bss L%d:.=.+2 .text jsr r5,csv tst -(sp) sub $%o,sp Missing '}'Case not in switciiyyiyi)iyih * x+ % %#2 %e7&= e %% D w%% && & h e & 7t5&6w dJ wXw T L 7l  y o w, < e ~     %    %7   _ x  _, t_, l_, 5 Z%aN Z x :0 0 *f %  * yy)I  9 I y x 9 x I x yy))x y%;  f %   f % %_< %%__  f %  l%%^X T    _74,($7    7 &  & %   _ _ _  5   x t%_< %b_< f P& %D <_, 4 .%_<     ) x      yx )y y y_% e _ r5  f& & n e & |_  %[v7rjfb` \XV R C_ < 8%:%7 .*ˋ.˕     7%__7 & %_;  t _w 2 %N %8 %@[xrp l h5 `%+TNJ % L 6e,7.Ce$C &  9 y)) yiyy yyiiiiii) y)y yy)) iiii iy ee%5%1e& &%% %.%L%% & %_0u- @w C   3w%g 3" _*" xF%$%_*"_*"&( p(e 3 3 34 4 %#% 4 % %%%2- %  %(;%84%2l %# `t  5~F? %5"F7# y%3  #_  4@ 478Ze   7_b!   3_ w ``5 5 B 5Nef '% C Cae !u%% ef &% %(_&$ %%   w%%# A1l %( Ne $Ce L &  5%*  5 B@ @ae54N @-#@ !%*@ @a% %  @@54 u-%* \  ~ &  2_z#w b @ @me,55 De,_%%*_%%f5 Ce,M I%*E%@Ap,p(  N d& AA 2r %AA 2r  eC- u-u5ueD- FA1@ @m5DC(@p@0@pAf r2p 5 _L% N&_T%w w D eD-w w D@( = x2F=a;ADp}5@ =@0=Q-=x@' RF %+A r=A r &@t@t=A_F w w BCJ- `f '%f '%_l( J-  H%*%.B%> 9%(5%/%*eAfVp^ AADtp0(%( 5 @ `, 5!@ `5,@ `,BD " `,w w 15BeCe~-1nF  271@wt movclrcmptstaddsubincdecmuldivasrashaslbicbic $1,bitbit $1,bisbis $1,xornegcom*$jeqjnejlejgtjltjgejlosjhijlojhis/nopjbr ?K?K?K?K?K?K??K??K?K?K?L?L?L?L?L?&L?6L?JLhL?xLTLLT?L?LLT M8M??xM??xM??M?M?M?MMMMMT?MT? N?N?N?.N?BN?FN?NN?NN?TXN?TXN?fN?fN?rN?rN??N??N?N?N??N?fN??N?N?NN?NN?TXN?TXN?fN?fN??N??N?N?TO?(O??* ҋ D~8BXFX *ӕ0  $f v Le0 9ev*p* h*b* 7R*we&  m6* 4* 0~  0  0~ w7 * ) )0   )Wp `e0eӕ?f) ,)P ) ) @f ) Z7D') JXZ|)t)-n)f)f@w fw'w&PXwfw&VXJA 7 (fAW,f B@ 8 @&61fA   @ @e7j&1@\X 1w&f@@& HADCBF7F(F6rwH*6r@<=@A>?DEBC=EDCB(KfSVW' P<@#<@d@p@|@@ #!""$vJJJHJ0@@@## @@@A A  L v R r  < HH00HHHHHHbAjArAzAAxxxxArg countMissing temp fileCan't create %sTree space botch.globl fltused Missing temp fileIllegal initialization.bss L%d:.=.+4 .text mov%c r%d,r0 mov%c r%d,%c(sp) tst%c r%d No code table for op: %sNo code table for op %dmov%c r%d,r%d mov%c r%d,r%d Register overflow: simplify expressionr%d*tst r%d adcsbc r%d  Bb"|@NHNHHHn*+,HIJ<::<::FVVhhzzb "56  $L%d(r%d)r%dCompiler error: pname(r%d)%c%c(r%d)pname called illegallyIllegal use of registerL%d_%.8s%sNo match' for op %dcmp r0,$%o jhi L%d asl r0 jmp *L%d(r0) .data L%d:mov $L%d,r1 mov r0,L%d L%d:cmp r0,(r1)+ jne L%d jmp *L%d-L%d(r1) .data L%d:mov r0,r1 clr r0 div $%o,r0 asl r1 add $L%d,r1 mov r0,*(r1)+ mov (r1)+,r1 L%d:cmp r0,-(r1) jne L%d jmp *L%d-L%d(r1) .data L%d:jbr L%d sub $%o,r0 L%d L%d %o L%d:.. L%d L%d L%d L%d:.. %o L%d:L%d L%d .text Duplicate case (%d)cfcc jbr L%d L%d:tst (sp)+ cmp (sp)+,(sp)+ add $%o,sp %d: %c%oEEEE! r * * r * * dr D" HCHRHYH_HfHkHpHvH|HHHHHHHHHHHHHHHHHHHHHHHHHHHHI IIIIIIII"I&I)I,I/I2I5I9I=I@ICIFIHITIYI[I`IeIjIoIyIIII:,nameshort constantstringfloatdouble*r++*--r++pre--pre++post--post!un&*-~.+-*/%>><<&|^->int->doubledouble->int&&||&~double->longlong->doubleinteger->longlong->integer==!=<=<>=>p>=p=+=-=*=/=%=>>=<<=&=|=^=& for tests=& ~?callcallcallgotojump condbranch condset nregsload valueforce registerP((<((j((=((>((?((@((A((B((C((D((E(((((F(()((G(((((( ((!((*((H((+((I((,((J((-((K((.((L((/((W((7((U((Q((0()N()1 ) )O ) )%))&))b))c))<))=))>")&)?*).)@.)*)A&)")B2)7)C<)@)D@)<)E7)2)))))")&)*).).)*) &)") )) F)K) K)F) ))j)0+0+ )!)%)&)b`)c`)P*(Z*)Z***+*,*-*.Z*7Z*0Z*1*F0+G0+H+I+J,K0,L+N0+U0+O,fR)3>,4R,8Z,9b,:v,;~,jmp GBjmp(I) jsrc,MA GBjsrc,#(I) GAjsrc,(I) clr clrf movC,I movof,I GBmovC(I),I GBmovof(I),I mov+,-(sp) mov,I GBmov+2(I),-(sp) mov(I),I movC',I M'C mov',I M,A GJmovC(J),I M'C(J) GBmovC(I),-(sp) M'C(I) movCsp)+,I GJmov(J),I M,#(J) GBmov(I),-(sp) M,#(I) movsp)+,I GAM1,A+ V'GJmov+2(J),-(sp) mov(J),I M1,#+2(J) V'(J)GBmov+2(I),-(sp) mov(I),-(sp) add1,#+2(I) V'(I)movsp)+,I GAMP GAMsp) VM KAmovC,A KAmovfo,A GBKAmovf,#(I) GBmovC,#(I) movC(I),I GBKAmovfo,#(I) GBKImovC,#(I) movC,I KAGJmovf,#(J) KAGJmovfo,#(J) GDKAmovC,*(sp)+ GDKAmovfo,*(sp)+ GAGAM' GAMD,I GAKJMD(J),I GAKIMP,I KDGAMD(sp)+,I KCGAMPsp)+,I GAM,I M+,(sp) VGAKIMsp)+,(sp) VM,I KCGAMsp)+,2(sp) VMsp)+,(sp) GCKAxor,(sp) movsp)+,I GAasr GATsxt- div,I- GATsxt- KJdiv(J),I- GATsxt- KIdiv,I- KCGATsxt- divsp)+,I- M,A' mov,I movC',I MP,I movC,A KBM(I),A' mov,I KAM,A' mov,I KBGJM(I),#(J) mov(J),I movf',I KIMP,I movf,A KCmovC',I MPsp)+,I movC,A KCmovof',I MPsp)+,I movfo,A KAGJM,#(J) mov(J),I KCGBMsp)+,#(I) mov(I),I GDKCmovC2(sp),I MPsp)+,I movC,*(sp)+ KCGBmovC(I),I MPsp)+,I movC,#(I) KCGBmovof(I),J MPsp)+,J movfo,#(I) movf,I movC',I sxt- divP,I- movC-,A KCmovC',I sxt- divsp)+,I- movC-,A KCGJmovC(J),I sxt- divsp)+,I- movC-,#(J) GDKCmovC2(sp),I sxt- divsp)+,I- movC-,*(sp)+ movC',I sxt- div,I- movC,A KCmovC',I sxt- divsp)+,I- movC,A KCGJmovC(J),I sxt- divsp)+,I- movC,#(J) GDKCmovC2(sp),I sxt- divsp)+,I- mov,*(sp)+ KCmovb',I xor,(sp) movsp)+,I movb,A GDmovC(sp),-(sp) KAxor,(sp) movCsp)+,I movC,*(sp)+ movC',I asr movC,A GBasrC(I) movC(I),I movif,I GBmovif(I),I GAmovif,I GAmovfi,I GAsetl movfi,-(sp) movsp)+,I seti setl movif,I seti GBsetl movif(I),I seti GAmov,-(sp) setl movifsp)+,I seti GCsxt GAmovsp)+,I -- -!-P,F-G-NT-UT-K-L-M'C GBM'C(I) ML,A KBML(I),A KAMC,A GBML,#(I) GBKJML(J),#(I) GBKIMC,#(I) KBGJML(I),#(J) KAGJMC,#(J) GDKBML(I),*(sp)+ GDKAMC,*(sp)+ clr clr+ mov,A+ sxt mov,A mov+,A+ mov(I),A+ sxt KAmov,A+ sxt KAsetl movfi,A seti KAGJsetl movfi,#(J) seti KBmov(I),A mov+2(I),A+ KAmov,A movsp)+,A+ GBmov,#+2(I) sxt(I) KAGJmovsp)+,#+2(J) mov,#(J) GBKImov+2,#(I) sxt(I) KCGBmovsp)+,#+2(I) sxt(I) KCGBmovsp)+,#(I) movsp)+,#+2(I) ML,A KAMC,A GBML,#(I) KBGJML(I),#(J) KAGJML,#(J) GBKJML(J),#(I) GBKIML,#(I) GDKBML(I),*(sp)+ GDKAML,*(sp)+ M'C M,A KBM(I),A KAM,A GBM'C(I) KBGJM(I),#(J) KBmovC',J M(I),J movC,A KAmovC',J M,J movC,A KAGJM,#(J) KCGBMsp)+,#(I) KCGBmovC(I),J Msp)+,J movC,#(I) asrC GBasrC(I) aslC GBaslC(I) ash,A KBash(I),A KAash,A j ..7.".#.$.%.(.).*.+.-...Q.0.< .= .> .? .@ .A .B .C .D .E .H.I.O.movof,I GBmovof(I),I GEHAj.(.).7.0.clrC(sp) mov,-(sp) GBmov(I),-(sp) mov+,-(sp) mov,-(sp) GCM'sp) GCM,(sp) GCKBM(I),(sp) GCKAM,(sp) /d/o/x0f&0e/c/s/l40rZ2I5I9I=I@ICIFIHITIYI[I`IeIjIoIyIIII:,nameshort constantstringfloatdouble*r++*--r++pre--pre++post--post!un&*-~.+-*/%>><<&|^->int->doubledouble->int&&||&~double->longlong->doubleinteger->longlong->integer==!=<=<>=>p>=p=+=-=*=/=%=>>=<<=&=|=^=& for tests=& ~?callcallcallgotojump condbranch condset nregsload valueforce registerP((<((j((=((>((?((@((A((B((C((D((E(((((F(()((G(((((( ((!((*((H((+((I((,((J((-((K((.((L((/((W((7((U((Q((0))N))1))O))%))&))b))c))< )$)=$) )>(),)?0)4)@4)0)A,)()B8)=)CB)F)DF)B)E=)8) )$)$) )(),)0)4)4)0) ,)()  )$) L)Q) Q)L) $) )j)6+6+ )!)%*&*bf)cf)P*(`*)`***++,+-*.`*7`*0`*1*F6+G6+H+I+J,K6,L+N6+U6+O",fX)3D,4X,8`,9h,:|,;,jmp GBjmp(I) jsrc,MA GBjsrc,#(I) GAjsrc,(I) clr clrf movC,I movof,I GBmovC(I),I GBmovof(I),I mov+,-(sp) mov,I GBmov+2(I),-(sp) mov(I),I movC',I M'C mov',I M,A GJmovC(J),I M'C(J) GBmovC(I),-(sp) M'C(I) movCsp)+,I GJmov(J),I M,#(J) GBmov(I),-(sp) M,#(I) movsp)+,I GAM1,A+ V'GJmov+2(J),-(sp) mov(J),I M1,#+2(J) V'(J)GBmov+2(I),-(sp) mov(I),-(sp) add1,#+2(I) V'(I)movsp)+,I GAMP GAMsp) VM KAmovC,A KAmovfo,A GBKAmovf,#(I) GBmovC,#(I) movC(I),I GBKAmovfo,#(I) GBKImovC,#(I) movC,I KAGJmovf,#(J) KAGJmovfo,#(J) GDKAmovC,*(sp)+ GDKAmovfo,*(sp)+ GAGAM' GAMD,I GAKJMD(J),I GAKIMP,I KDGAMD(sp)+,I KCGAMPsp)+,I GAM,I M+,(sp) VGAKIMsp)+,(sp) VM,I KCGAMsp)+,2(sp) VMsp)+,(sp) GCKAxor,(sp) movsp)+,I GAasr GATsxt- div,I- GATsxt- KJdiv(J),I- GATsxt- KIdiv,I- KCGATsxt- divsp)+,I- M,A' mov,I movC',I MP,I movC,A KBM(I),A' mov,I KAM,A' mov,I KBGJM(I),#(J) mov(J),I movf',I KIMP,I movf,A KCmovC',I MPsp)+,I movC,A KCmovof',I MPsp)+,I movfo,A KAGJM,#(J) mov(J),I KCGBMsp)+,#(I) mov(I),I GDKCmovC2(sp),I MPsp)+,I movC,*(sp)+ KCGBmovC(I),I MPsp)+,I movC,#(I) KCGBmovof(I),J MPsp)+,J movfo,#(I) movf,I movC',I sxt- divP,I- movC-,A KCmovC',I sxt- divsp)+,I- movC-,A KCGJmovC(J),I sxt- divsp)+,I- movC-,#(J) GDKCmovC2(sp),I sxt- divsp)+,I- movC-,*(sp)+ movC',I sxt- div,I- movC,A KCmovC',I sxt- divsp)+,I- movC,A KCGJmovC(J),I sxt- divsp)+,I- movC,#(J) GDKCmovC2(sp),I sxt- divsp)+,I- mov,*(sp)+ KCmovb',I xor,(sp) movsp)+,I movb,A GDmovC(sp),-(sp) KAxor,(sp) movCsp)+,I movC,*(sp)+ movC',I asr movC,A GBasrC(I) movC(I),I movif,I GBmovif(I),I GAmovif,I GAmovfi,I GAsetl movfi,-(sp) movsp)+,I seti setl movif,I seti GBsetl movif(I),I seti GAmov,-(sp) setl movifsp)+,I seti GCsxt GAmovsp)+,I -- -!-P,F-G-NZ-UZ-K-L-M'C GBM'C(I) ML,A KBML(I),A KAMC,A GBML,#(I) GBKJML(J),#(I) GBKIMC,#(I) KBGJML(I),#(J) KAGJMC,#(J) GDKBML(I),*(sp)+ GDKAMC,*(sp)+ clr clr+ mov,A+ sxt mov,A mov+,A+ mov(I),A+ sxt KAmov,A+ sxt KAsetl movfi,A seti KAGJsetl movfi,#(J) seti KBmov(I),A mov+2(I),A+ KAmov,A movsp)+,A+ GBmov,#+2(I) sxt(I) KAGJmovsp)+,#+2(J) mov,#(J) GBKImov+2,#(I) sxt(I) KCGBmovsp)+,#+2(I) sxt(I) KCGBmovsp)+,#(I) movsp)+,#+2(I) ML,A KAMC,A GBML,#(I) KBGJML(I),#(J) KAGJML,#(J) GBKJML(J),#(I) GBKIML,#(I) GDKBML(I),*(sp)+ GDKAML,*(sp)+ M'C M,A KBM(I),A KAM,A GBM'C(I) KBGJM(I),#(J) KBmovC',J M(I),J movC,A KAmovC',J M,J movC,A KAGJM,#(J) KCGBMsp)+,#(I) KCGBmovC(I),J Msp)+,J movC,#(I) asrC GBasrC(I) aslC GBaslC(I) ash,A KBash(I),A KAash,A j..7.".#.$.%.(.).*.+.-...Q.0.<.=.>.?.@.A.B.C.D.E.H.I.O.movof,I GBmovof(I),I GEHAj.(.).7.0.clrC(sp) mov,-(sp) GBmov(I),-(sp) mov+,-(sp) mov,-(sp) GCM'sp) GCM,(sp) GCKBM(I),(sp) GCKAM,(sp) /d/o/x0f,0e/c/s/l:0rZV3d3t3333333l3|3366355553328886z575586^66606644^4h444444, x  & 6 % w Z  f7v P7p @-@7T e @& V 5 e@ @.  w p p    v   p 5 @ P77A& .e&7& ewB77&> je | *  v  ww  r5% @@ H=@&77 ww   7 P  K Jdu7 ~ d an I-~~ d an end d and a s d and any d and eac d and fre d and ind d and its d and kno d and pre d and ret d and sep d and sub d and tha d and the d and wri d and wri d and~~~ d anew, s d another d any dat d apart f d arbitra d are use d are~~~ d as I-no d as an a d as an e d as a~~~ d as desc d as dire d as need d as the d as the d as~~~ 1 d at 304 d at a di d at a pr d at data d at loca d at loca d at the d at the d at~~~ d be made d be mare d be mare d be mark d be the d be used d because ncreasing ncreasing ncremente nct to~~~ nction is nction of nction of nction of nction se nction wi nction wi nctionall nctions b nctions~~ nctive tr ncy of th ncy of th nd nd "A.1" nd 104 ma nd 104 st nd 1C ill nd 1C sho nd 203 co nd 205 ar nd 205 co nd 206,~~ nd 208, s nd 222.~~ nd 222~~~ nd 224, r nd 232 fo nd 237 ar nd 237.~~ nd 26B ar nd 307 ea nd 3C ill nd 3C sho nd 4C sho nd 529. nd I-numb nd a coun nd a matc nd a sepa nd a spec nd all of nd alloca nd an I-~ nd an end nd and re nd and~~~ ndg returns %d dctran returns %d dclast = %o dclser =%o dcih returns %d invalid dc command bad format Iiiihii9Y9YiYyYyf"w w@&HFfA7R; fA @e71@x;  1 @ fA7~;  fA & 9 &fA @e&7w@;"(.6<BDJPV\bhnrx|/usr/chess/bookseek 0 /%s Cannot open %s eh? ambiguous illegal gok %c kqrbnp PNBRQK r n b k q b n rr n b q k b n r o-o-onullresigndrawep(q)iles suc iles the iles the iles the iles to iles whi iles, an iles, an iles, bu iles, di iles, ho iles, so iles, th iles, un iles,~~~ iles. A iles. D iles. F iles. F iles. I iles. S iles. T iles. T iles. T iles.~~~ iles.~~~ iles;~~~ iles;~~~ iles~~~ iles~~~ ile~~~ ile~~~ ile~~~ ile~~~ ile~~~ ile~~~ ile~~~ ile~~~ ile~~~ ile~~~ 1 ile~~~ 1 ile~~~ 1 ile~~~ 1 ile~~~ 1 ile~~~ 1 ile~~~ 1 ile~~~ 1 ile~~~ 1 ile~~~ 1 ile~~~ 1 ile~~~ 2 ile~~~ 2 ile~~~ 2 ile~~~ 2 ile~~~~~ ile~~~~~ iliated  @$ G@bswitch" @ fA7FL  fA & 9 &fA @e&7w@n&@wՋ@@ 7t Ef `C  r CpDD`f@ Z`  H &D D  D&` f@ www &w Uw w&w w sortargcgetnum(num2colfrevfnumfascii|tabfibuf involv In~~~ in~~~ in~~~ in~~~ is a d is a f is a n is a p is a s is a s is an is a~~ is a~~ is che is des is eff is eli is enc is fou is fou is gen is gen is gre is ill is ind is ind is ind is lin is not is not is of is par is per is per is per is pos is pos is pre is pro is pro is pro is pro is rea is ref is sea is sea is so is sto is sto is tha is the is the is to is und is ver is~~~ is~~~ is~~~ is~~~ is~~~ is~~~ is~~~ is~~~  betwee 4 ~ 15 f 4 ustrati 4 stem. 4 r stora 5 .~~~ 6 5 become 4 ~ 15 d 4 user~~~ 4 ssible 4 r provi 5 . User 5 be use 4 ~ 14 t 4 user. 4 so that 4 r more 5 . In t 5 at the 4 ~ 14 f 4 user to 4 so cont 4 r in th 5 . File 5 at loc 4 ~ 14 a 4 user ar 4 sk file 4 r examp 5 . Any 5 areas 4 ~ 14 4 used fo 4 shows t 4 purpose 5 -node. 5 are al 4 ~ 12 s 4 urring 4 showing 4 previou Aug 23 14:16 \n", ciotp) ; extern int *iot, iotta[], *ciotp, ef[], *cacms ; ccih.c ccih extern int selmes[], *ciotp, *irr, *iras ; start( ciotp ) ; commd.c commd pt[10] = ciotp ; /* store link into last to this iot */ ciotp = iotp ; ciotp = iotp ; ciotp = iotp ; ciotp = iotp ; ciotp = iotp ; ciotp = iotp ; /* set curren iotp */ fcp[11] = ciotp ; fcp[11] = ciotp ; /* update last link */ extern int *iot, fct[], *bt, *ciotp ; /*diag*/printf(" cief[1] == 2 ) goto badf ; if( ef[1] == 2 ) goto badf ; if( ef[1] == 2 ) goto badf ; if( op[0] == '\n' ) { ef[1] = 1; goto badf; } if(( ef[1] == 2) &&( ef[2] == 'l') ) if(( op[0] = getchar() ) == '\n' ){ ef[1] = 1; goto lir ;} if((ef[1]==1) &&(i==0) ) ; if((op[0] = getchar() ) == '\n') { ef[1] = 1 ; goto badf ; } if((op[0] = getchar() ) == '\n') {ef[1] = 1 ; goto badf ; } if((op[1] = getchar() ) == '\n') { ef[1] = 1 ; goto badf ; }  _sidcf _chcnt _maxch _p20flg _printf"S_getchar"zR_savpsw"Q_ef _ciotp _dcdspy"4_mtdspy"_iodspy"T!_dkdspy"h$_qdspy"_bfdspy"$._ccdspy"J_numbrs"_getnum"~_pswold _pswtmp _dccs#^V_mtc#fV_dkc#lV_ccs#xV_mts#dV_reboot"~S_ccsr#V_cco#zV_cci#|V_dcwc#`V_dcma#bV_c1 _c2 _c3 _d1 _d2 _d3 _syinit"_ldunix"S_iras"P_irc _ircmax sswiely, a ively, ma ively, wh ively. F iven by a iven dire iven file iven mome iven the iven to t iven when iven. Th iven. Th ives to t ive~~~ 7 ividual d ividual w iving a~~ iving its ivities t ix A.~~~ ix the ma ixed and ixed leng ixed leng ixed leng ixed leng ixed~~~ ize 423 s ize 423.~ ize by an ize error ize may t ize of da ize of~~~ ize, comp ize, the ized by t ized for ized in t ize~~~ 6 ize~~~ 10 junct to~ junction junction just~~~ 1 k (I-node k 0 and b k 0 and b k 1, and k 1. Tog k 10  w2w 2 5 @? 5@ HNe17 2 @ /  4@@ @ ,:5 N H7 4 5* 4- 4 47 2@7 27 27 2w21w 17@5@5@,:5N 7575 t5 @ 5@ 5Z8M@CNff %@M MȕxNff % L Lȕ-Nf * )7 7  7 7 7   ch points ch provid ch refer ch reliev ch system ch the co ch the sa ch they h ch throug ch throug ch time t ch user a ch user h ch user. ch users ch will b ch will b ch will n ch would ch, root chal arra chal dire chal dire chal dire chal dire chal dire chal dire chal file chal file chal file chal file chal file chal file chal name chal name chal nami chal nami chal nami chal nami chal~~~ 1 chal~~~ 1 chal~~~ 1 changed a changed b changed.~ character character chart for charts sh charts sh charts sh chart prior art prior art prior art prior art prior art prising a prising a prising t problem o procedure process i process.~ program a program e program i program p program s program s program. programmi programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs programs, programsart FIG. art arran art file art file~ art form. art from art from art gener art metho art metho art of a art of th art root~ art suffe art syste art, diff art. A g art. Com art. In articular articular articular articular articular articular articular articular articular articular arting lo arting po arting po arts show arts show arts show arts, the art~~~ 20 ary ary and f ary conce ary depen ary diagr ary for d ary maxim ary numbe ary numbe ary stora ary, it i ary. Phy ary~~~ 15 ar~~~ 13 as again~ All da all I- all of all of all of alloca alloca alloca alloca alloca alloca alloca alloca alloca alloca alloca alloca alloca alloca alloca along~ alread Also c also c also c also c also c Also l also c altern altern Althou Althou altern always always always always amodif among an alt An an an att an end an ent an I-n an I-n an I-n an I-n an exi an ind an ind an ind an ind an int an inv an ope an unu and "A and 22 and 22 and 22 and 23  11 or~~~ 11 or~~~ 13 or~~~ 14 or~~~ 17 or~~~ 18 or~~~ 18 or~~~ 20 or~~~ 20 or~~~~~ ose I-no ose I-nu ose a da ose a se ose crea ose data ose digi ose digi ose much ose of p ose phys ose prog ose prog oses, bu ose~~~ 1 osing ca osition osition ossibili ossibili ossible ossible ossible. ossible~ ost due ost due ost file ost part ost, all ost. Th ost~~~ osure ot a dat ot a dir ot appar ot be er ot conce ot conta ot conta ot direc ot direc ot direc ot direc ot direc ot direc ot direc ot direc ot d struct struct struct struct sub-~~ subdir subdir subrou subrou subrou subrou subrou subrou subrou subtle such a such a such a such b Such m such s suer. suffer Summar symbol symbol symbol symbol symbol symbol System System symbol symbol SYSTEM System system system system system system system system system system system system system system system system system system system system system system system system system system system system system ut.cgetchar chcnt = 0 ; chcnt getput.cgetchar chin[++chcnt] = *tkb & 0177 ; chcnt getput.cgetchar extern maxch, chcnt ; chcnt getput.cgetchar if( chcnt > maxch ) goto newlin ; chcnt getput.cgetchar if( chin[chcnt] == '#' ) {if(chcnt >=1 ) { chcnt=-2; /*decr*/ chcnt getput.cgetchar if( chin[chcnt] == '@' ) { chcnt = -1 ; /* delete line*/ chcnt getput.cgetchar if(( chin[chcnt] == '\n' ) ||( chin[chcnt] == '\r' ) ) chcnt getput.cgetchar maxch = chcnt ; chcnt getput.cgetchar return( chin[ch-' wJ f'4^@x;  N @e -|' wf@OB&L 6= .& f & 8%@e& & 8%@,u-z;  eu-~;  N N Nf V eFf)EwEEeEHEeEAeAH@wf)Ed&; 8 7P&L&;  0% ; 8 7%%;  >% 8% J&VE$ $ 7 7 2 $$-" 7 $ @7z$- & 6 % mlevniceprintplaymanualsetupscore/xxxxxxxxseektestinputxxxxxxxxxxxxxxxehpictscaleforeachbookw 5D 55 5 LdED .@ 5 7CC DC 4%5 @Z w-Z@D &*N w-D e V3e `47 e5 @ @ r @_l X 7@_ X  6_ _ X 5___ 5>@ 2  3"c `4wc er m a single a single a single a single a small a small~ a specia a specia a storag a storag a storag a stored a subrou a summar a symbol A throug A throug A throug a true h a used b a user d a user m a user m a user m a user w a user w a user w a user w a user w a user~~ a user~~ A" is fo A" is no A" is se A", for~ A"~~~ 4 a volume a which a whole A" is se A, 1B an A, 1B, a A, 2B, 2 A, 3B an A, 4B an a write a, and i a, direc A, I-lis A, inclu A, it wi A. All A.~~~ 10 A.~~~ 15 a, e.g. A.1" are A.1@_ - ]f 95-\_ -\@\ff h&%_ kkW T%jjW T%_ W T5 \e@-A mp\Aup@ m^\ fW T% _ W T F1=% W \_ @ @[[r[#h[f[[[s[a    x _ W _ 0=% [_ WuWf_ _ -j[gW T_ -V[V[W T_ -B[F[ X T_ X T_ f 9 this ero, the ero~~~ ero~~~ 1 erpreted erred be erred fr erred fr erred fr erred th erred to erred to erred to erred to erred to erred to errelati erring t erring~~ erroneou erroneou error an error,~~ Errors i error. error.~~ error.~~ errorono errors i errors i errors m errors n errors o errors o errors. error~~~ ers 223, ers 420. ers and ers and ers and ers and ers appe ers are ers are ers are ers are ers are ers are~ ers asso ers caut ers cont ers easi ers file ers for ers from ers in b er@    xzzzz@ @ @    xL&0@8U 4Uȕ+,U (Uc U : W-_Rc@ 2 ;@ 2 TA 2cA 2 wf/w T/@ ?T TwF/w 4/N T  J AT T @T ~Tȕ/Nef . w.w .@t5A ru%@5W-@ T Tȕk W-@T Tȕq@A5S SHS@ @5S SAe0HwJ.w 8. , H i ntion, ph ntion: t ntion;~~~ ntion;~~~ ntions of ntions, a ntive phy ntly bein ntly bein ntly occu ntly prov nto I-lis nto buffe nto buffe nto open nto the I nto the I nto the I nto the I nto the c nto the f nto the l nto the o nto the o nto the v nto this nto~~~ 4 nto~~~ 5 nto~~~ 9 nto~~~ 10 ntrast to ntrast to ntries (l ntries 10 ntries 11 ntries 52 ntries ar ntries co ntries co ntries ha ntries ha ntries is ntries mu ntries po ntries po ntries.~~ ntries.~~ ntries~~~ ntries~~~ ntroduced ntroducti e. A file. B file. D file. I file. L file. T file. T file. T file. T file. T file. W file. W file.~~~ file.~~~ file.~~~ file.~~~ file.~~~ file.~~~ file.~~~ Files 20 file; wh files 20 files 22 files am files an files an files an files an files an files an Files ar files ar files be files be files by files by files by files co files cr files ex files ex files fo files fo files in files in files in files in files is files is files of files of files of files on files or files su files th files th fi1 file~~~ 2 file~~~ 2 file~~~ 2 file~~~ 2 file~~~~~ file~~~~~ filled, t filled, t find a ma find each find phys first I-n first I-n first be first por first por first ref first use first use first use first use first use first use first~~~ first~~~ first~~~ fit from fix A.~~~ fix the m fixed and fixed len fixed len fixed~~~ flag indi flagged f flags are flexible flow char flow char flow char flow char flow char for a fir for a par for a sec for a sin for all d for all o for all o for a~~~ for backu ng 6 ion poi 6 econd u 7 e~~~ 6 7 to dat 6 tion in 6 path na 6 inters~ 6 each I- 7 es~~~ 1 7 to a d 6 th~~~ 6 own in 6 ing and 6 e open 7 esent i 7 the nu 6 the ope 6 ould be 6 indepen 6 e indic 7 erred t 7 the in 6 the new 6 or~~~ 6 in open 6 e first 7 er wish 7 subrou 6 the fre 6 ory is 6 implifi 6 e acces 7 er may 7 simpli 6 ter mem 6 ond use 6 ill be 6 e I-~~~ 7 ent~~~ 7 simple 6 tem dir 6 oncerne  ]c v4 7\\ cA 2 w\ @ w-w -5 NS JS5W- @ pc@ W- w-w -< # <; z5%@e&; 4%@ N N   wT-w B-@@t5%b@ t@mDC! #e "! L3t!$@t&@t% Ne   f  e5 L3twp,w ^,Q 8   8 (  r4)+ rts pc patt: bit (r5)+,_dir(r0) bne 1f mov r0,r1 add (r5)+,r1 jsr pc,look jsr pc,look rts r5 1: add $6,r5 rts r5 satt: mov r5,-(sp) bit (r5)+,_dir(r0) bne 1f mov r0,r1 add (r5)+,r1 jsr pc,look / pawn mov r0,r1 2: mov (sp),r5 bit (r5)+,_dir(r1) bne 1f add (r5)+,r1 tst _board(r1) beq 2b tst (r5)+ mov r4,-(sp) jsr pc,look jsr pc,look jsr pc,look jsr pc,look cmp (sp)+,r4 bne 2b 1: mov (sp)+,r5 add $14.,r5 rts r5 look: cmp (r5)+,_board(r1) bne 1f mov -2(r5),(r4)+ 1:d|yvspolifc`]Znkheb_\Ymjgda^[XWTQNKHEBVSPMJGDAUROLIFC@?<9630-*>;852/,)=:741.+('$!&# %"lr r4 div r3,r4 asr r4 mul r3,r4 mov r5,r4 add r1,r4 mov (sp)+,r5 mov r1,-(sp) mov r2,-(sp) loop: mov r1,r0 cmp (r0),(r4) bge loop1 add r3,r1 br loop loop1: cmp r2,r4 blos 1f sub r3,r2 mov r2,r0 cmp (r0),(r4) bge loop1 jsr pc,exchange cmp r1,r4 bne loop mov r2,r4 br loop 1: cmp r1,r4 beq 1f jsr pc,exchange mov r1,r4 br loop1 1: mov (sp)+,r2 mov r4,-(sp) mov r4,r1 add r3,r1 jsr pc,qsort mov (sp)+,r2 mov (sp)+,r1 br qsort done: rts pc exchange: mov r1,-(sp) mov  ode, her ode, sto ode, tha ode. Ea ode. Fi ode. Fu ode. It ode. Wi ode.~~~ ode.~~~ odern~~~ odes 201 odes all odes and odes are odes are odes are odes are odes are odes as odes by odes by~ odes dir odes for odes in odes in odes in odes on odes per odes per odes poi odes res odes tak odes to odes) st odes, an odes, th odes. A odes. D odes. T odes; di odes;~~~ odes~~~ odes~~~ odes~~~ odes~~~ ode~~~ ode~~~ ode~~~ ode~~~ ode~~~ 1 ode~~~ 1 ode~~~ 1 ode~~~ 1 ode~~~ 2 ode~~~ 2 odicall ame is r ame is s ame is~~ ame is~~ ame is~~ ame mann ame matc ame may ame must ame of a ame of a ame of a ame of a ame of t ame of t ame or a ame phys ame refe ame sear ame spec ame time ame tree ame volu ame". T ame, and ame, et~ ame, whi ame,~~~ ame. "R ame. A ame. In ame. Th amed fil amed in amed~~~ amees fo ames and ames and ames and ames app ames are ames are ames for ames for ames in ames is~ ames may ames mus ames of ames of ames of ames of~ ames of~ ames onl ames whi ames wit ames, a name Newly neces need No pe node node not a numbe numbe numbe numbe numbe numbe numbe numbe numbe obtai occur of fi of le of wo on th one w opera opera or wr own c Physi Physi owner permi Physi physi point point point point previ progr progr progr read read readi refer refer regar reque retur role Root root same same searc secon set i set t shari shari shari shown Singl  12 l~~~ 13 l~~~ 13 l~~~ 14 l~~~ 15 l~~~ 15 l~~~ 16 l~~~ 16 l~~~ 18 l~~~ 18 l~~~ 18 l~~~ 18 l~~~ 19 l~~~ 21 l~~~~~ l~~~~~ l~~~~~ m actions m and use m and use m area 50 m area 50 m as a do m a~~~ 20 m because m debuggi m directo m directo m directo m directo m directo m directo m directo m directo m directo m directo m drawbac m each I- m entry) m error,~ m errors m file si m file~~~ m for dat m for the m form in m giving m in Tabl m in comm m indexes m informa m in~~T>XX  w7vPPE@E? (E p@Ext.$ZFUE ]&&   5  c  (7  E w*  &PC @EE 7H 7BE 6-0U, $( $E U5@ D &5@775@  wD J@ Ex.>6HPe5.e(`D E ectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory" rectory, rectory, rectory, rectory, rectory. rectory. rectory. rectory. rectory. rectory. rectory. rectory~ rectory~ rectory~ rectory~ rectory~ rectory~ rectory~ rectory~ r = ob; symtab = stab; for (c=0; c<200; c++) { stab[c].name[0] = '\0'; stab[c].value = 0; } defloc = lookup("define", 1); defloc->value = defloc->name; incloc = lookup("include", 1); incloc->value = incloc->name; stringbuf = sbf; line = ln; lineno = 0; if (fcreat(tmp4, obuf) < 0) { printf("Can't creat %s\n", tmp4); dexit(); } while(getline()) { if (ibuf==ibuf2) putc(001, obuf); /*SOH: insert */ if (ln[0] != '#') for (lp=line; *lp!='\0'; lp++) putc(*lp, obuf); putc('\n',  e~~~ 13 e~~~ 13 e~~~ 13 e~~~ 13 e~~~ 13 e~~~ 13 e~~~ 13 e~~~ 13 e~~~ 14 e~~~ 14 e~~~ 14 e~~~ 14 e~~~ 14 e~~~ 14 e~~~ 14 e~~~ 14 e~~~ 14 e~~~ 14 e~~~ 14 e~~~ 14 e~~~ 15 e~~~ 15 e~~~ 15 e~~~ 15 e~~~ 15 e~~~ 15 e~~~ 15 e~~~ 15 e~~~ 15 e~~~ 15 e~~~ 15 e~~~ 15 e~~~ 16 e~~~ 16 e~~~ 16 e~~~ 16 e~~~ 16 e~~~ 16 e~~~ 16 e~~~ 16 e~~~ 16 e~~~ 16 e~~~ 17 e~~~ 17 e~~~ 17 e~~~ 17 e~~~ 17 e~~~ 17 e~~~ 17 e~~~ 17 e~~~ 18 otp = %o\n",ciotp ) ; common.c _ int *iot; int *ciotp; dspydr.c main ccdspy( ciotp ) ; ciotp = iodspy() ; dcdspy(ciotp) ; /* call dc display routine */ dkdspy(ciotp) /* call dk display routine */ ; mtdspy(ciotp) /* call mt display routine */ ; extern int *ciotp ; /*diag*/ printf("ciotp = %o \n", ciotp ) ; iodspy.c iodspy return(ciotp) ; pter = ciotp ; extern int *iot, ef[], *ciotp ; syinit.c syinit ciotp = iot ; extern int fct[], *ciotp, *tsical physical physical physical physical physical pical of pid acce pid acce pid inde ping tra place, t placed i placed i placing ple and ple and~ ple arra ple exte ple file ple file ple file ple in a ple" fil ple, a u ple, a~~ ple, inc ple, nam ple, sys ple, the ple, to ple, to plement plemente plementi ples of plete se pleted.~ pleted.~ pletely~ pletes t plex and plex sin plexitie plexity plicate plicate plicate plicated plicated plicated plicated plicate~ plicatio plicatio plies a plified pl 7 w f $"_- 7    "p$"_$׭\ p$"d^'$"׭\   "dp$"IF׭P  ׭D\ pl  "`(p$"+׭>$׭  ׭   ^"B'/<\ Ff - $"N׭* c!/T p$" *"C׭f  ׭Z/Nc!*.0t7$":%׭4\ `\$p$"P *" F"data file data file data file data file data file data file data file data file data file data file data file data file data file data file data file data file data file data file data file data file data file data file data file data file data file data file data is t data layo data layo data layo data layo data rema data stor data stor data used data whic data, and data, dir data. A data~~~ data~~~ data~~~ data~~~ data~~~ 1 data~~~ 1 data~~~ 1 data~~~ 1 data~~~ 1 data~~~ 2 date the dated as da_ccint"`_dcint"`_mtint"(`_dkint"8`_clkint"H`_ccih _dcih _mtih _dkih _iras _pswold _reg rtistreg`testirT`tstretX`phighb`retx`resregldunix.oJ.+X  Xȋ_X_ldunix"printf.oJ{+HPw A 5r5Nf ` A 5rNe0 ww @e5@ les f files f files f files f files f files f file~~ f file~~ f file~~ f file~~ f I-node f I-node f I-node f I-node f I-node f indica f indica f indire f indire f indire f indire f indire f input/ f its po f large f levels f links f links f many o f miscel f of the f physic f primar f provid f read a f refere f simple f simult f stored f system f system f system f the bl f the cl f the co f the cu f the cu f the cu f the da f the da f the da f the da f the da f the da f the da f the de f the di f t 03<5m@,=5 @> _&e u@ 03<5m@,=5@$> :e  L= @m,= e5  @3== 5 @5== Ff50 %  %  %  0* F" %  %  %  0* u@Juw-&$eN  %  =% e}ee Nfw hB@w \B-*w nB@7 *wxfw*w TB7 *wbf@w`w\w<w@fwHw$ w&f \w }w7n,FB@$Y r Cd$YDf 7-.7#(e 7#e7#m  %efwwwVwZf@www4w8fAww5WpeW  W D wDwwf& @&HFfA7hJ  first~ e fixed e flags e flow c e flow c e flow c e for ma e for th e for th e for th e for th e form o e format e format e format e format e format e formin e for~~~ e free I e free b e free I e free I e free. e free~~ e free~~ e full p e full p e full p e functi e functi e functi e genera e genera e given e given e given e given e greatl e handli e has be e having e having e having e having e I-node e I-node e I-node e I-node e I-~~~ e herein e hierar e hierar e hierar e hierar e I-list e I-list  C __dklast C __dklser 053160D __dkma C __dkntf C __dkq 026060T __dkstat C __dktl 022042T __dktran 053156D __dkwc C __ef 020220T __endiot C __eof 017616T __fatal C __fclen C __fct C __fcthrs C __frecnt 051172T __getchar 016176T __getnum 012464T __gq 033770T __initb 012402T __initq C __inmess 020524T __iodspy C __iot C __iotta 050326T __iras C __irc C __ircmax C __klcs 051606T __l - - - - - - - - - on 5 rams~~~ 5 length 5 es may 6 ame~~~ 6 an ind 5 themsel 5 rammati 5 le. Th 5 es in t 6 ame of 6 an I-n 5 the vol 5 r.~~~ 1 5 le and 5 erences 6 ame fil 6 additi 5 the sec 5 r ident 5 layout 5 erence 6 additio 6 256 wo 5 the roo 5 r I-nod 5 l stora 5 er.~~~ 6 _____ o 6 21 5 the buf 5 own at 5 l data 5 er iden 6 ____ of 6 locat 5 the_ 5 ow char 5 its I-n 5 er area 6 I-node. 6 File 5 4 check t 4 ows the 4 ng bit 4 ist (I- 4 h the I 4 ectory, 4 ch user 4 ovide f 4 ng a~~~ 4 isk fil 4 h of th 4 eatment 4 ch is~~ 4 ough th 4 nes for 4 is then 4 h is~~~ 4 earch i 4 ce~~~ 1 4 ossible 4 neously 4 is prov 4 h data 4 e. Thi 4 ccurrin 4 ory str 4 ned as 4 is perf 4 gh the 4 e. I-n 4 ccordin 4 ory nam 4 ne or m 4 is not 4 ge arra 4 e the f 4 cation, 4 ory lev 4 nd writ 4 ion~~~ 4 ge area 4 e that  e simpli e simply e simult e single e size 4 e size 4 e size o e size, e size~~ e size~~ e so tha e some d e space e space e specia e specia e specia e specia e spectr e starti e starti E STORAG e storag e storag e storag e storag e storag e storag e storag e storag e storag e storag e storag e storag e storag e storag e storag e storag e stored e stored e subrou e such b e superv e superv e superv e swappe e symbol e symbol E SYSTEM e symbol e symbol e system e system e system e system e system e syste I-number I-number I-number I-number I-number I-number I-number I-number I-number I-number I-number I-number I-number I-~~~ 7 I-~~~ 8 I-~~~ 10 I-~~~ 10 I-~~~ 11 I-~~~ 17 h~~~ 13 h~~~ 13 h~~~ 15 h~~~ 19 i -~~~~~ I-list ( I-list 2 I-list 2 I-list 2 I-list 2 I-list 2 I-list a I-list a I-list i I-list i I-list) I-list), I-list, I-list. I-list.~ I-list.~ I-node 2 I-node 2 I-node 2 I-node 2 I-node 2 I-node 2 I-node c I-node c I-node w I-node) I-node, I-nodes I-nodes I-nodes I-nodes I-nodes I-nodes5-[K@Hw [I[6X T _ f 95-Z1@.wZ/ZBX T _ _ RI NX`XrX|XX TW _ @ _ zZX Tw2Iw IW- NX T 5 Ih FN 7 T w6dccs = %o dcwc = %o dcma = %o dcbe blocks o blocks o blocks o blocks o blocks p blocks u blocks w blocks, blocks, blocks, blocks, blocks. blocks. blocks. blocks.~ blocks.~ blocks.~ blocks; block~~~ block~~~ block~~~ block~~~ block~~~ block~~~ block~~~ block~~~ block~~~ block~~~ block~~~ block~~~ bodiment bodiment bodiment bolic fi bolic fi bolic na bolic na bolic na bolic na bolic na bolic na bolic na bolic na bolic na bolic na bolic ne both ent both. N both~~~ Brief bove. T branches broadly broutine broutine broutine broutin @ uu- e}eew!w-eN j*F % }ee Tw\Ff@wH@wB@@ _,*,=_) <55 3=e& 0* ee& 0* 55=e & 0* e z & 0* 4=e& 0* 5 <=e& 0* n== 5<@ K=a& 0* e_(= ==@ 5@ 2< l@& 0* e:5: 5N wR3f 5 @? 5@ HNe1v9 4 @ /  6@@ @ D<5 N 9 6 5* 6- 6 69 4@9 49 49 4wf2f 69  r6 V O9  O @5@5@D<5N n95_N b/  N 89x  9 b/  - ified plified plified plified plified, plify fi plished plishes pluralit pluralit pluralit ply inde ply.~~~ point fr point in point of point to point to point to point to point.~~ pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointer pointers pointers pointers pointers pointers pointers pointers pointers pointers ps of f mes of f mes of~~ mes of~~ mes only mes such mes the mes whic mes with mes, and mes, nam mes. A~ mes. Fo mes.~~~ mes~~~ mes~~~ 1 mes~~~~~ method f method o method o method o method o methods methods me~~~ 3 me~~~ 8 me~~~ 8 me~~~ 11 me~~~ 12 me~~~ 14 me~~~ 14 me~~~ 18 me~~~ 20 might wr milar~~~ minated minated, minated. mination mine the mined an mined lo mined lo mined,~~ minent m ming con ming fun ming fun ming lar ming may ming of ming of ming or ming sch ming ser ming sma ming, an m1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pson 1-1 pt to th ption ption ption is ption of ptions~~ ptually pt~~~ 7 pular, a pularity pulate f pulate I pulating pulating purpose purpose purpose purposes put buff put data put into put reso put/outp put/outp put/outp puter ap puter me puter me puter me puter me puter me puter me puter sy puter sy puters, puters~~ pute g~~~ 6 g~~~ 8 g~~~ 8 g~~~ 9 g~~~ 10 g~~~ 11 g~~~ 12 g~~~ 13 g~~~ 13 g~~~ 13 g~~~ 14 g~~~ 14 g~~~ 14 g~~~ 15 g~~~ 15 g~~~ 17 g~~~ 19 g~~~ 19 g~~~ 20 g~~~ 20 g~~~ 20 g~~~ 21 g~~~ 21 g~~~~~ g~~~~~ g~~~~~ h 14B ar h 16 wor h 18 are h 20 are h 23 are h 24 giv h 25B ar h a flag h a numb h a numb h admini h all of h all~~~ h an arr h anothe h any ar h any fi h any ot h any~~~ h are eq h are us h as dat h as dis h as lis h assure h a~~~ h a~~~ h become h begins h being h betwe  is rea is rea is rep is res is res is ret is ret is ret is rew is sea is set is set is set is set is set is sho is sho is sig is so is sto is ter is the is the is the is the is the is the is the is the is to is to is tra is tra is tra is use is use is, ea is, th is, th is~~~ is~~~ is~~~ is~~~ It is is~~~ is~~~ is~~~ is~~~ is~~~ it is it mus it the it wil its "f its co its co Its I- its I- its I- its I- its I- its ph its po itself ]; selmes[10]; reg[8]; siccf common.c _ siccf;sidcf; dspydr.c main siccf = 0 ; siccf = 1 ; extern siccf, sidcf; siccf = 1 ; /*init to simulate the ccreg on pdp20 */ syinit.c syinit extern siccf, sidcf ; if( siccf == 0 ) { sidcf common.c _ siccf;sidcf; dspydr.c main sidcf = 0 ; sidcf = 1 ; extern siccf, sidcf; sidcf = 1 ; /*init to simulate the dcreg on pdp 20 */ syinit.c syinit extern siccf, sidcf ; if( sidcf == 0 ) { snack ccdspy on the on the on the on the Once~~ on the on the one di one or one or one or one or one su ones.~ one~~~ only a only b only d only,~ on~~~ open f operat operat operat operat operat operat operat operat operat operat operat operat operat operat operat operat operat operat operat or dir or for or mor or mor or mor or mor or mor or oth or pro or pro or pro or pro or the order order order order~ orient orient or~~~ other other other other  f he new n he norma he norma he numbe he numbe he numbe he numbe he numbe he numbe he numbe he occas he only he open he open he open he open he open he open he opera he order he outse he outse he owner he owner he owner he parti he physi he physi he physi he physi he physi he physi he physi he physi he physi he physi he physi he physi he physi he physi he physi he physi he physi he point he possi he preci he prefi he prese he prese he prese he prese he prese he prese he prese he prese he Prior he pr er of th er of th er of th er of th er of th er of th er of wo er of wo er of~~~ er of~~~ er of~~~ er opera er point er prese er previ er progr er progr er read~ er reque er reque er retur er searc er servi er stora er stora er stora er store er subdi er subro er syste er syste er that er the m er the p er the u er to an er to an er to di er to fi er to op er to pe er to ph er to re er to re er to re er to re er to th er to th er to th er to us er twice er two. er user er user er which er which er whicor dir e or ind e or mor e or mor e or mor e or mor e or pro e or pro e order~ e outset e outset e owner e owner e owner e partic e partic e passed e pass~~ e perfor e permis e permis e permis e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e physic e pointe e pointe e point~ e popula e possib e precis e prefix e prepar e presen e presen eal~~~ 16 al~~~ 18 al~~~ 18 al~~~ 18 al~~~ 19 al~~~ 21 al~~~~~ am actio am error am form am itsel am parti am size, am subro am. Eac ame "1" ame "1"~ ame "A" ame "A" ame "A" ame "A", ame "A.1 ame "USE ame (the ame 123. ame 125 ame 127~ ame A.1, ame and ame and ame I-no ame I-no ame and ame and ame as~~ ame a~~~ ame begi ame begi ame by w ame data ame dire ame file ame file ame file ame file ame file ame file ame I-no ame in a ame in o ame in s ame is a ame is a ame is a ame is f ame is f ame is p ) ) extern int ef[] ; dkdspy.c dkdspy n[i++] = getnum(ef) ; ef[1] = 1 ; ef[1] = 0 ; if( ef[1] == 2 ) goto badf ; if( ef[1] == 2 ) goto badf ; if(( ef[1] == 1 ) &&( n[i] == 0 ) ) i =-1 /* decr */; if(ef[1] == 2 ) goto badf ; while(( ef[1] == 0 ) &&( i <= 5 ) ) extern int ef[] ; dspydr.c main i = getnum(ef) ; if( ef[1] == 2 ) goto badf ; if( ef[1] == t e is fir e is fou e is fou e is fou e is in e is lin e is mad e is mod e is ope e is ope e is par e is poi e is poi e is pre e is rea e is rea e is rea e is ref e is sea e is sep e is so e is ver e is~~~ e is~~~ e is~~~ e is~~~ e is~~~ e is~~~ e is~~~ e it app e it is e itself e key to e key~~~ e large e last d e last d e last m e last~~ e later e layout e length e less s e less~~ e level e linear e linkin e linkin e linkin e linkin e links e list ( e list 5 e list 5 e list 5 e list 5 e list per~~~ per~~~ pesudo Physic physic physic physic physic physic physic physic physic physic physic physic physic physic physic physic physic place, placed placed placin plural point point point pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointe pointi i o locati o locati o longer o lose d o marked o named~ o not co o not in o obtain o one in o one, t o open a o open a o open a o open f o open t o open t o open t o permit o permit o pesudo o physic o physic o physic o physic o physic o physic o possib o princi o prior o provid o provid o read b o read o o read o o read, o reduce o refer o refer o refer o refer o refer o relate o remove o rename o share o simpli o simula o specia o that a o that a o that b o that i o that s o that t o the ad o the ed, the~~ ed, thus ed,~~~ 16 ed,~~~ 18 ed. Also ed. As b ed. As f ed. Comp ed. Each ed. If t ed. In t ed. Inst ed. Main ed. The ed. The ed. The ed. The ed. The ed. Ther ed. This ed. This ed. User ed. When ed.~~~ 4 ed.~~~ 5 ed.~~~ 7 ed.~~~ 7 ed.~~~ 7 ed.~~~ 10 ed.~~~ 11 ed.~~~ 12 ed.~~~ 16 ed.~~~ 18 ed.~~~ 18 ed.~~~ 21 eded for eded to c eded.~~~ edetermin edetermin edetermin ediate ac edicated edicated edicated edly comp edly upda eds the f eds the f eds. It educe the ed~~ 5 d~~~ 6 d~~~ 7 d~~~ 7 d~~~ 8 d~~~ 8 d~~~ 9 d~~~ 10 d~~~ 11 d~~~ 11 d~~~ 13 d~~~ 13 d~~~ 15 d~~~ 15 d~~~ 16 d~~~ 17 d~~~ 17 d~~~ 18 d~~~ 19 d~~~ 20 d~~~ 21 d~~~ 21 d~~~ 21  99 89i9HH 89YYY? ???TDRRRRS3pFf 55% 5 @0 @0 W-- 55W-oW-0W-0HW-9D 97 AupAmeu `55W-0u-@@4  7  ,@@p@@ h7 ,@@pAupu@Ff5 @5@LW-9ast I-no ast modi ast modi ast one ast port ast to t ast to~~ ast~~~ as~~~ 13 as~~~ 17 at 205. at 304 s at 3B, i at 408 w at a dif at a dir at a kno at a kno at a kno at A.1, at a pre at all I at all p at any p at any~~ at an~~~ at a~~~ at a~~~ at block at data At FIG. at FIG. at FIG. at FIG. at deal at error at file at file at immed at immin at is de at is, e at is, s at is, t at is, t at least at locat at locat at locat at locat at locat at no sp at of st at of th at one p at shown at the b"(.6<BDJPV\bhntz~/mnt/chess/book/treeseek 0 /%s Cannot open %s %c kqrbnp PNBRQK r n b k q b n rr n b q k b n r %d. ... o-oo-o-onullresignep(q) pnbrqkrnb/dev/vscannot open vs /mnt/chess/draw/cvtabcannot open cvtab Cannot create %s nullresigno-ooo-oo*x-ep(q)ch+junk on end ambiguous illegal . . /dev/vt0cannot open vt /mnt/chess/draw/cvtabcannot open cvtab %d %d %d %d wgen %9.0f bgen %9.0%q k @5@5@N Ne18N ww A rNea 8@t ww |A r NC r  rfA r<& ew>w :4 (  ww   7ww  7 ww - -j7 W-7@ m5@2e2@ A rd 5A rd5@ @ m4AWpd(H 5@@ become become been l before begin. beginn behalf being being~ benefi betwee betwee betwee be~~~ be~~~ be~~~ bit 12 bit 12 bit 20 bit 20 bits 2 block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block BLOCKS blocks blocks blocks blocks [0] ; /*diag*/printf("(at %o)", ccs ) ; extern int selmes[], fct[], *ccs, *cco, *cci, *cacms, ef[] ; printf("ccs= %o cco= %o\n", *ccs, *cco ) ; ccih.c ccih *ccs = 0 ; *ccs = 0100100 ; /* left bit is read only bit. extern int inmess[], *cco, *cci, *ccs ; cctran.c cctran extern int *ccs, *cci, *cco ; if( *ccs >= 0 ) { while( *ccs >= 0 ) while(( i<=(len-1) ) &&( ccs[0] < 0 ) ) *cco = mess[i++] ; common.c _ int *ccs c1; int *cco c2; int *cci c3; dspydr.c main iv; int *dciv; int *mtiv; int *dkiv; int *clkiv; syinit.c syinit *dciv = &dcint ; cciv[1] = dciv[1] = mtiv[1] = dkiv[1] = clkiv[1] = 0340 ; /* set priority */ dciv = 0124 ; extern int *cciv, *dciv, *mtiv, *dkiv, *clkiv ; dclast common.c _ int *cclast; int *dclast; int *mtlast; int *dklast; dcbeg.c dcbeg dclast = iotp ; extern int *dclast, *sycroq ; dcdspy.c dcdspy if( i >= 1 ) dclast = n[0] ; printf("dclast = %o dclser =%o\n", dclast, dclser ) ; extern int *d se r user. r users' r users, r using t r which d r which i r which i r which p r who cre r wishes r wishes r wishes r wishes r wishes r wishes r wishes~ r within r write i r write r r writing r writing r writing r writing r writing r writing r written r's area, r's~~~ 9 r's~~~ 9 r) to loc r)~~~ 7 r, a link r, altern r, altern r, and th r, and~~~ r, mainte r, or sys r, the su r, there r,~~~ 5 r,~~~ 6 r,~~~ 7 r,~~~ 8 r. Advan r. Any d r. As be r. Diagr r. Furth r. In a r. In od/: t s r o j i h g f e d a M L   ybA'? , } `O  0 z0g^A MLS5 s X : . -d*  &" %5 F  777& ewr&7r7l7 @ 5N  w w @ 5 @ 5 @  ~ ww u@ @@mȕ A r 5 N ff % @@mC r e0Ȑ @wN V7 L ӕ0B~8ӕ.  ӕ0~ B~  :ӕ. B~ӕe ӕ- ӕ+ r e0e0S&e@7 e(  @&-8w 5 @5@LW-9DW-d<A r5A ruA r5A ruA r 5A r u@t AWt@PAWt@P@]=@w> 8 ; int comd, ba, *fcp, fc ; switch(comd) { /* comds that need to deallocate buffers */ commd ccdspy.c ccdspy flag = commd( mess, &i ) ; ccih.c ccih na = commd( inmess, &linked ) ; commd.c commd commd(sc,linked) int sc[], *linked ; { d1 common.c _ d1; d2; d3; d4; d5; d6; d7; d8; d9; int *dccs d1; int *dcwc d2; int *dcma d3; dspydr.c main dccs = icle sketches the history of their use in Bell Laboratories research, and describes some of the current frontiers of our minicomputer work. While some of these applications will by their nature remain closely associated with research, an increasing number of them have already impacted and will continue to impact directly on the Bell System. Background__________ By 1966 it was clear that the single-stream batch com- puting era at Bell Laboratories, typified by computers  *mtcr m2; char *dkcr d4; char *ccsr c1; int *mts m1; int *mtc m2; int *mtbrc m3; int *mtma m4; m1; m2; m3; m4; m3 common.c _ int *mts m1; int *mtc m2; int *mtbrc m3; int *mtma m4; m1; m2; m3; m4; m4 common.c _ int *mts m1; int *mtc m2; int *mtbrc m3; int *mtma m4; m1; m2; m3; m4; main dspydr.c main main() { /* display driver - dspydr */ maxch common.c _ fclen; fcthrs; comd; chcnt; maxch; dspydr.c main extern chcnt, maxch ; maxch = 0 ; fatal.c fatal chcnt = maxch + 1 ; /* deled the co d the di d the I- d the en d the I- d the I- d the la d the na d the ph d the ph d the ph d the pr d the re d the se d the us d the us d their d then p d then t d then u d there d theref d therei d the~~~ d the~~~ d the~~~ d the~~~ d throug d thus c d thus~~ d thus~~ d time~~ d to a s d to acc d to acc d to as d to ass d to be d to be d to be d to be d to buf d to by d to cho d to con d to con d to cor d to cur d to fil d to for d to I-n d to I-n d to hav d to loc d to ref d to sim d to theors gone */ dkstat.c dkstat *dkc, *dkds, *dker, *dkda ) ; *dkc, *dkds, *dker, *dkda ) ; extern int *dkc, *dkds, *dker, *dkda ; if((*dker & 1 ) != 0 ) ss = ss | 010000 ; /* cksum */ if((*dker & 2 ) != 0 ) ss = ss | 010000 ; /* cksum */ if((*dker & 040 ) != 0 ) ss = ss | 01000 ; /* misc */ if((*dker & 0100 ) != 0 ) ss = ss | 01000 ; /* misc */ if((*dker & 0200 ) != 0 ) ss = ss | 01000 ; /* misc */ if((*dker & 0400 ) !=  dclser, p20flg ; if( dclser != 1 ) goto er2 ; syinit.c syinit dclser = 0 ; extern dclser, mtlser, dklser ; dcma common.c _ int *dccs d1; int *dcwc d2; int *dcma d3; dcdspy.c dcdspy case 2: *dcma = n[2] ; printf("dccs = %o dcwc = %o dcma = %o\n", *dccs, *dcwc, *dcma); extern int *dccs, *dcwc, *dcma, *dclast ; dctran.c dctran *dcma = dct[2] ; extern int *dccs, *dcwc, *dcma ; dspydr.c main dcma = 0172412 ; } dcma = &d3 ; extern int *dccs, *d goto ret ; } { deallb( iotp, 1, iot ) ; { deallb(iotp,1,iot); {deallb(iotp,1,iot); { deallb(iotp, 1, iot ) ; { deallb(iotp,1,iot); /* deal iot entry */ { deallb(iotp,1,iot); /* deall iot entry */ { deallb( iotp, 1, iot ) ; if( i != 0 ) { deallb(iotp,1,iot); na = 15; goto ret; } iotp = allocb( 1, iot ) ; iotp = allocb( 1, iot); iotp = allocb(1, iot ) ; iotp = allocb(1, iot ) ; /* alloc io225 c de 225. de 230 h de 230 i de 235 h de 235 w de 301 i de 308, de 308. de 408 s de 408 s de 408 w de 520 i de 520. de 530 o de 530. de a con de a dir de alloc de also de also de also de an ad de and r de and t de and~~ de arbit de arbit de are a de arran de as wi de by pl de by th de capac de chang de conta de conta de conte de corre de fixed de for t de for t de for t de for t de havin de havin de in a de in th de in th de in th de in tu de inacc de in~~~ de is ag de is al de is co de is in deYi @mV `U V `U_j `N5 5-_` @D@-wV `U _j @-wV `U _j pnhdV `U _j RPLV `U _j h  xV pppppppp* _` ?bQ?fQ?hQnQ@TQ_j V `U_j W `U LN_j @M=% _` f "M% _` @&-7 7P7PPP_j -d 7 \ PP P_j cc  xN_` L=% _` f] ) ; bt delb.c deallb if( bt[i] == ba ) bt[i] = -bt[i] ; bt delb.c deallb if( i >(bt[-1] - 1) ) goto allfre /* if past end of table error */ ; bt delb.c deallb blksz = bt[-2] ; bt delb.c deallb if(( ba< bt[-4] ) ||( ba > bt[-5] ) ) bt delb.c deallb while( i < bt[-1] ) if(ba == bt[i++] ) goto releas ; bt delb.c deallb deallb(ba, size, bt) int ba, size, bt[]; { bt endiot.cendiot deallb( iotp[8], fcp[5], bt ) ; bt endiot.cendiot extern int *iot, *bt, fct[] ; bt inb.c initb *(bt-1) = q ;pO_n  :9 cx xhv  71sd { t^ odjx  i:!h $   ?:68$ "  ~hcnt fatal.c fatal chcnt = maxch + 1 ; /* deletes present input line */ chcnt fatal.c fatal extern chcnt, maxch ; chcnt getput.cgetchar else chcnt = -1 ; /* reinit */ chcnt getput.cgetchar chin[chcnt] = chin[chcnt] | 040 ; chcnt getput.cgetchar chin[chcnt] = '\n' ; chcnt getput.cgetchar if((chin[chcnt] >= 0101 ) &&(chin[chcnt] <= 0132 ) ) chcnt getput.cgetchar putchar( chin[chcnt] ) ; chcnt getput.cgetchar chcnt = -1 ; /* init cnt */ chcnt getpd~}|{zyxwvucwc, *dcma, *dclast ; syinit.c syinit dcma = &d3 ; } dcma = 0172412 ; } extern int *dccs, *dcwc, *dcma ; dctran dcbeg.c dcbeg if( dctran( &iotp[2] ) == 0 ) goto que ; dcdspy.c dcdspy flag = dctran( &iotp[2] ) ; dcih.c dcih i = dctran( &dclast[2] ) ; dctran.c dctran dctran( dct ) int dct[] ; { dcwc common.c _ int *dccs d1; int *dcwc d2; int *dcma d3; dcdspy.c dcdspy case 1: *dcwc = n[1] ; printf("dccs = %o dcwc = %o dcma = %o\n", *dccs, *dcwc, *dcma); <= 3 ) ) extern int ef[] ; numbrs.c numbrs ef[1] = 0 ; extern int ef[] ; if( ef[1] == 1 ) /* no line left */ { *amount = 0; goto ret; } if( ef[1]==2 ) i =-1 ; /* decr since error in last num */ if((ef[1]==1) &&(array[i]==0) ) i =-1 ; /* decr again */ while((ef[1]==0) &&(i < max) ) array[i++] = getnum(ef) ; qdspy.c qdspy {n = 0 ; ef[1] = 1 ; { ef[1] = 1 ; /* have blank*/ n= getnc ata buff ata by i ata cont ata due ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata file ata fiyiy9I9)y)v, *mtiv, *dkiv, *clkiv ; dclast common.c_ int *cclast; int *dclast; int *mtlast; int *dklast; dclast dcbeg.c dcbeg dclast = iotp ; dclast dcbeg.c dcbeg extern int *dclast, *sycroq ; dclast dcdspy.cdcdspy if( i >= 1 ) dclast = n[0] ; dclast dcdspy.cdcdspy printf("dclast = %o dclser =%o\n", dclast, dclser ) ; dclast dcdspy.cdcdspy extern int *dccs, *dcwc, *dcma, *dclast ; dclast dcih.c dcih else /* disk */ dkbeg(dclast) ; dclast dcih.c dcih endiot(dclast) ; dclast /* tape */ mtbeg(iotp) ; mtbrc common.c _ int *mts m1; int *mtc m2; int *mtbrc m3; int *mtma m4; mtdspy.c mtdspy case 1: *mtbrc = n[1] ; extern int *mtc, *mts, *mtbrc, *mtma ; printf("mtc= %o mtbrc= %o mtma= %o mts= %o\n",*mtc,*mtbrc,*mtma,*mts); mtih.c mtih ames[5] =(*mtbrc - mtlast[7]) >> 1 ; /* actual words(not bytes)trans*/ extern int *mtlast, *mtc, *mts, *mtbrc, *mtma, *iot ; mtstat.c mtstat extern int *mts, *mtbrc ; if(((*mts&01000 )!=0) &(*mtbrc!=0) ) ss = ss | d~{xur}zwtqtes present input line */ extern chcnt, maxch ; getput.c getchar extern maxch, chcnt ; if( chcnt > maxch ) goto newlin ; maxch = chcnt ; syinit.c syinit extern irc, ircmax, maxch, chcnt, p20flg ; maxch = 0 ; mtbeg dcih.c dcih if((dclast[5]&3) == 1 ) mtbeg(dclast) ;/*tape*/ mtbeg.c mtbeg mtbeg(iotp) int iotp[] ; { mtdspy.c mtdspy flag = mtbeg(iotp) ; snack.c snack if( dev == 1 ) { mtbeg(iotp) ; goto pop ; } /* mag tape */ start.c start if((iotp[5]&3) == 1 ) dklast[9], usn ) ; /* get unique sector number */ dcbeg dcbeg.c dcbeg dcbeg(iotp) int iotp[] ; { dcdspy.c dcdspy flag = dcbeg(iotp) ; dkih.c dkih { if( ackqed == 1 ) /* ack sent */ dcbeg( dklast ) ; } mtih.c mtih dcbeg(mtlast) ; snack.c snack if((*iotp &(3<<8) ) == 0 ) {dcbeg(iotp); goto pop ; } start.c start dcbeg( iotp ) ; dccs common.c _ int *dccs d1; int *dcwc d2; int *dcma d3; dcdspy.c dcdspy case 0: *dccs = n[0] ; printf("dccs = %o dcwc = %o - Nf  _Z `U_N 5NZ `U _N J5@_N[ `U _@A1,_@ @m[ `U _@A1,i@@5@e5@ @m[ `U _@A1,A@5@A1,@5,@ @m[ `U 5 @5,@ @m [ `U   ;&[<[J[ `UFfu  f x9%7DN  72N@ &e  7N@5NBX `U _ @e@e& %-_ @W-wW-wVX `U%_ @e@e& %-~^@5 N rX `U R X `U I@e@e& %-*4@W-wW-wX `U% I laF be re( ihd tr: nt st X `UX `UFf)5 5 K@U55@J@U 55J@U55J@U55J  J @0@U55J@U@55ast = %o \n", dclast ) ; dspydr.c main extern int *dccs, *dcwc, *dcma, *dclast ; dclser common.c _ dclser; mtlser; dklser; dcbeg.c dcbeg dclser = 1 ; /* say dclast awaiting service */ extern dclser ; if( dclser != 0 ) goto que ; dcdspy.c dcdspy if( i == 2 ) dclser = n[1] ; printf("dclast = %o dclser =%o\n", dclast, dclser ) ; extern dclser ; dcih.c dcih dclser = 0 ; /* say dclast has been serviced by int */ dclser = 1 ; /* say needs service */ externed "f arked as arked fr arked fr arked us arked. arly ben arly sea arly, to arly~~~ arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrangem arrows a arrows a ars at a ars in s Art art FIG. art arra art file art file art form art from art from art gene art meth art meth art of a art of t art root art suff art syst art, dif art. A art. Co art. In articula articula ar i = getnum(ef) ; getnum.c getnum getnum(ef) int ef[]; { iodspy.c iodspy i = getnum(ef) ; mtdspy.c mtdspy n[i++] = getnum(ef) ; numbrs.c numbrs while((ef[1]==0) &&(i < max) ) array[i++] = getnum(ef) ; qdspy.c qdspy /* have blank*/ n= getnum(ef) ; n = getnum(ef) ; gq dcih.c dcih if(( ndc = gq(sycroq) ) == 0 ) goto st; /*trans on empty*/ dkih.c dkih dklast = gq(dkq) ; /* get top of disk q */ if(( nq = gq(dkq) ) == 0 ) goto sendac ; /* q empty iii9IY9)yiYyy)9IYi)9YIi)9IYi95 W-@?Ne,:fe,: * 5 W-&5 W-@AWpAN?@`eRAWpAfNmeR *  w w Nf * @ =@ =wr w ` @5}}wT w B W- "5 W-@AWpAAmBtC r 49eR  w w "@e 5u@e 57 /4[0  _,P$1 D 5@ A@ A@  _,W-57N N  _,7x 5&557!X5N &5spy printf("dcih returns %d\n", dcih() ) ; dcih dcih.c dcih dcih() { /* data channel interrupt handler */ dcint syinit.csyinit *dciv = &dcint ; dcint syinit.csyinit extern ccint, dcint, dkint, mtint, clkint ; dciv common.c_ int *cciv; int *dciv; int *mtiv; int *dkiv; int *clkiv; dciv syinit.csyinit *dciv = &dcint ; dciv syinit.csyinit cciv[1] = dciv[1] = mtiv[1] = dkiv[1] = clkiv[1] = 0340 ; /* set priority */ dciv syinit.csyinit dciv = 0124 ; dciv syinit.csyinit extern int *cciv, *dciUDX w7vPPE@E? (E p@Ext.$ZFUE ]&&   5  c  (7  E w*  &PC @EE 7H 7BE 6-0U, $( $E U5@ D &5@775@  wD J@ Ex.>6HPe5.e(`D E erea bfdspy.cbfdspy area = iotta ; area bfdspy.cbfdspy area = ackara ; area bfdspy.cbfdspy area = bufara; area bfdspy.cbfdspy if( area == ackara ) area bfdspy.cbfdspy if( area == bufara) area bfdspy.cbfdspy if( area == iotta ) area bfdspy.cbfdspy printf("area(%o) not equal to either bufara(%o)",area,bufara); area bfdspy.cbfdspy extern int *table, *area ; area common.c_ int *table;int *area; area syinit.csyinit area = ackara ; area syinit.csyinit if((op[1] = getchar() ) == '\n') {ef[1] = 1 ; goto badf ; } ef[1] = 0 ; extern int ef[] ; if( ef[1] == 1 ) goto end2 ; getnum.c getnum case 10: /* newline */ ef[1] =1; ef[1] = 0 ; ef[1] = 1 ; ef[1] = 2 ; ef[1] = 2 ; ef[2] = 0 ; ef[2] = i ; ef[2] = i ; getnum(ef) int ef[]; { iodspy.c iodspy if( ef[1] == 2 ) goto getptr ; i = getnum(ef) ; if( ef[1] == 1 ) goto curptr ; if( ef[1] == 2 ) goto per ; if( i == '\n' ) { ef[1] == 1; goto curptr ;  p [?q on, ention: ention;~ ention;~ entions entions, entive p ently be ently be ently oc ently pr entries entries entries entries entries entries entries entries entries entries entries entries entries entries. entries. entries~ entries~ entry 11 entry 11 entry 12 entry 12 entry 12 entry ac entry co entry co entry ha entry in entry in entry in entry is entry is entry ma entry po entry so entry) f entry. entry.~~ entry~~~ entry~~~ entry~~~ entry~~~ entry~~~ ents are ents are ents are ents for ent dspydr.cmain dccs = &d1 ; dccs dspydr.cmain *dkc = *mtc = *dccs = 0200 ; dccs dspydr.cmain extern int *dccs, *dcwc, *dcma, *dclast ; dccs syinit.csyinit dccs = &d1 ; dccs syinit.csyinit *ccs = *dccs = *mts = *dkc = 0 ; /* 4 major channels */ dccs syinit.csyinit dccs = 0172414 ; dccs syinit.csyinit extern int *dccs, *dcwc, *dcma ; dcdspy dcdspy.cdcdspy dcdspy(iotp) int iotp[] ; { dcdspy dspydr.cmain dcdspy(ciotp) ; /* call dc display routine */ dcih dcdspy.cdcdextern int *bt, bufara[], *ackmes, ackara[] ; commd.c commd iotp[8] = allocb( fcp[5], bt ) ; iotp[8] = allocb( fcp[5], bt ) ; if( i != 0) { deallb(fcp[3],fcp[5],bt); na = 15; if( sc[3] > fcp[5]*bt[-2]) if( sc[3] > fcp[5]*bt[-2]) deallb(fcp[3], fcp[5], bt ) ; fcp[3] = allocb(n,bt) ; if( iotp == 0 ) { deallb(fcp[3],fcp[5],bt);na=6;goto ret;} extern int *iot, fct[], *bt, *ciotp ; common.c _ int *bt; delb.c deallb bt[-4],bt[-5]prisam ; mtih.c mtih extern mtq, irc, ircmax ; syinit.c syinit extern irc, ircmax, maxch, chcnt, p20flg ; irc = ircmax = 0 ; ircmax = 1 ; irr ccih.c ccih extern int selmes[], *ciotp, *irr, *iras ; klcs common.c _ int *klcs; syinit.c syinit *tks = *tps = *klcs = 0 ; /* tty and clock */ extern int *klcs ; klcs = 0172540 ; ldunix dspydr.c main ldunix() ; /* no return */ m1 common.c _ int *mts m1; int *mtc m2; int *mtbrc m3; int *mtma m4; m1; m2; m3; m4; m2 common.c _ char int *dkds d9; d8 common.c_ d1; d2; d3; d4; d5; d6; d7; d8; d9; d8 common.c_ int *dkc d4; int *dkwc d5; int *dkma d6; int *dkda d7; int *dker d8; int *dkds d9; d9 common.c_ d1; d2; d3; d4; d5; d6; d7; d8; d9; d9 common.c_ int *dkc d4; int *dkwc d5; int *dkma d6; int *dkda d7; int *dker d8; int *dkds d9; damin commd.c commd i = damin( &sc[2], &fcp[8]) + damin( &sc[4], &fcp[9] ) ; damin commd.c commd i = damin( &sc[4], &iotp[9] ) ; /* disk adr conversion */ damin commd.c commd if( dami   xjd^XBRBLBZ `Ue_zN 5N*Z `U ^Ne l5N@h~z  p .ɉ$m#<.ɁBijkl#Y(ɁJh*Y(  +ɁhZ[\MY(ɁYXWVZ,QQɁ GHIJKLMY( 1 ; iotp[5] = comd << 8 | 2 ; iotp[5] = comd << 8 | 1 ; iotp[5] = comd<< 8 | 2 ; iotp[5] = comd<<8 | 1 ; iotp[5] = comd<<8 | 1 ; /* store comd and tape op */ iotp[5] = comd<<8 | 2 ; iotp[5] = comd<<8 | 2 ; /* store comd and disk op */ iotp[5] = comd<<8 | 1 ; iotp[5] = comd<<8 | 2 ; /*diag*/ printf("comd= %d fc= %d\n",comd,fc) ; comd = 63 & sc[1] ; extern fclen, comd ; printf("unknown command from sel comd = 5_N*Y `U Ne  _@EU=_8Y `UNJY `U 5_50-V-V-V7 V VTnh5 Z EU 5@e  __& -|Ve  _!55 EU 5@e  __50 V V-V7 _U-55 u5 Fh@ 5OX55 u 55<  x^$tt$$$$t[ fclen *(dklast[1] & 037) ] ; i =( dklast[0] &(3<<8) ) >> 8 ; /* dc status */ if( dklser == 1 ) dklast = nq ; if( dktran(&dklast[6]) == 0 ) { e = 301 ; goto er1 ; } if( i == 3 ) endiot( dklast ) ; /* dc half done - release iot entry */ if((dklast[0] & 01400 ) == 0 ) ac[6] = dklast ; /*dc stat not started*/ ldc =(dklast[5] & 0177400 ) >> 8 ; /* last device comd */ printf("from dklast = %o ", dklast ) ; while( i < 10 ) printf(" %o", dklast[i++] ) ; dklser common.c _ & sc[1] ; comd commd.c commd extern fclen, comd ; comd commd.c commd printf("unknown command from sel comd = %o\n", comd ) ; comd commd.c commd switch(comd) { comd common.c_ fclen; fcthrs; comd; chcnt; maxch; comd endiot.cendiot comd =( iotp[5] &(0377<<8) ) >> 8 ; comd endiot.cendiot int comd, ba, *fcp, fc ; comd endiot.cendiot switch(comd) { /* comds that need to deallocate buffers */ commd ccdspy.cccdspy flag = commd( mess, &i ) ; commd ccih.c ccih na = commd( inmess, &linked ) ; como badf ; if( ef[1] == 2 ) goto badf ; if( ef[1] == 2 ) goto badf ; if( ef[1] == 2 ) goto badf; if( ef[1] == 2 ) goto badf; if( ef[1] == 2 ) goto pbi ; if( op[0] == '\n' ) {ef[1] = 1; goto badf; } if(( ef[1] == 1 ) &&( n == 0 ) ) goto pre ; if((ef[1] == 1 ) &&( n == 0 ) )goto dedef ; if((ef[1] == 1) &&( n == 0 ) ) goto aldef ; if((ef[1] == 1) &&( n2 == 0 ) ) goto wrone ; if((ef[1] == 1) &&(n==0) ) goto indef ; if((ef[1] == 2)DW-d<A r5A ruA r5A ruA r 5A r u@t AWt@PAWt@P@]=@Ff @Et5@Et5@Et5@E5@AWpCp`Cp `Amp= Ff)@= 9-= 25 7 u-  A Am  - - @ @m @ =Ff NT[ `U @?z[ `U[ `U=[ `U8[ `U\ `U/&\ `U*T\ `U%\ &5 & 4/e5 5555N&  55 x7-5ww  w- N5 &5& H-eXv-r-el- . $ 5@57 55  -N N5&5 & D0e5 ,5555N&  55  7,5ww  ,,e, h5T#Wp mJ#Au55 @ 5555 Vw- @zEu@u@55B  @  -  -N N5&5 & H-e5 J5% - I_wf) J N  5 @EU=Ne  @EU=w|@Ff)w"@?M@?MM5 @Ff@e55 W-f Nm I% _ @_ 5 7 W-  A Aa1-_ - @ @a @ LLLL   x   LLLL X `Ue_ N 5N0X `U _ Ne  rJ@U55^J@U55 JJ@U55@6J@U 55"J"5@JW-W-W- 5I@U5@U5NX `U @Ff(I-LIU?I-8_,&IE 7xX Et7fXbX\XX `U%TI_FXBXX `U%4X5 @e  __5_  xlU?d7 `W 5PE5Awp< 1 Awp. qNY `U  t&e  7NAWpfe  7f x9%7f x9%7 7777w5 W- A wp 1 vrpljd 7^7ZT7 P7 L7 H7 D7 @7 <67 2-. ;;;_ 57z;v;r; 57`;\;X;  .;*; &; ;;;P;R57;T;V:;:57::: :p:r:t:v:`JD>8 2 ?:?:?:?: ??:?: w -He 7 5uw-%@e5N N 5 u- uNf ewjwd@wZw V P? J-FD>f  [.55 "w-HL e f Hw-.+eN  N 5u- uNf u-ew w@wxw tn? h-db@_ T555 Dw->C@e 5w-$2u-.AWt  = 0100 ; /* select remote bit */ extern int *mtc, *mts ; mtdspy.c mtdspy case 3: *mts = n[3] ; extern int *mtc, *mts, *mtbrc, *mtma ; printf("mtc= %o mtbrc= %o mtma= %o mts= %o\n",*mtc,*mtbrc,*mtma,*mts); mtih.c mtih extern int *mtlast, *mtc, *mts, *mtbrc, *mtma, *iot ; tmpsta = *mts ; mtstat.c mtstat if((*mts & 0100 ) == 0 ) ; /* selr off do nothing */ extern int *mts, *mtbrc ; if(( *mts & 0100 ) == 0 ) ss = ss | 020000 ; /* selr */ if(( *mts & 01000er 523 fer 523, fer 523. fer 523. fer 523. fer and fer and fer dire fer from fer is f fer to a fer to a fer to d fer to f fer to p fer to t fer to t fer to t fer to u fere wit ference ference ference ference ference ferenced ferences ferences ferences ferences ferences ferent f ferent f ferent n ferent p ferent p ferent s ferent u fering a ferred b ferred f ferred f ferred f ferred t ferred t ferred t ferred t ferred t ferred t ferred t ferring ferring~ fers to ffected ffective ffective ffer 523 eady */ /*diag*/ if( p20flg != 1 ) *dkc = *dkc | 0200 ; extern p20flg, dkntf; if( p20flg != 1 ) *dkc = *dkc | 0200 ; /* set ready */ dspydr.c main if( p20flg == 1 ) { if( p20flg == 1 ) { else p20flg = i ; if( p20flg == 0 ) { printf("no unix load\n" ); goto endlin; } printf("p20flg = %d\n", p20flg ) ; if( p20flg == 0 ) { printf("no reboot\n"); goto endlin ; } if( p20flg == 1 ) savpsw() ; if( p20flg == 1 ) savpsw() ; extern p2ccs, *dcwc, *dcma, *dclast ; dcih.c dcih else /* disk */ dkbeg(dclast) ; endiot(dclast) ; if((dclast[5]&3) == 1 ) mtbeg(dclast) ;/*tape*/ dclast = ndc ; /* save last transfer */ dclast[0] = dclast[0] | 3<<8 ; /* dc status to done */ dclast[0] =( dclast[0] & 0377 ) | 2<<8 ; dcold = dclast ; /* save present dclast for starting linked iot */ extern int *dclast, *sycroq, *dccs ; i = dclast[0] & 3 ; i = dctran( &dclast[2] ) ; /*diag*/printf(" new dcliiYYiYiY ccs = ccsr = 0167770 ; ccs = ccsr = &c1 ; *ccs = 0100000 ; extern int *ccs, *cco, *cci ; syinit.c syinit ccs = ccsr = &c1 ; *ccs = *dccs = *mts = *dkc = 0 ; /* 4 major channels */ ccs = ccsr = 0167770 ; ccsr = ccs ; extern int *ccs, *cco, *cci ; ccsr ccih.c ccih extern char *ccsr; while((i@CNff 2%@ ȕxNiled in t iles 204 iles 204, iles 221 iles amon iles and iles and iles and iles and iles and iles and~ iles are iles are iles beco iles begi iles by n iles by s iles by~~ iles cont iles crea iles exis iles expe iles for iles for iles in a iles in a iles in c iles in t iles is e iles is~~ iles of a iles of a iles of~~ iles on~~ iles or i iles such iles them iles them iles they iles to b iles whic iles, and iles, and iles, but iles, dir iles, how iles, so~ iles, the iles, una iles,~~~ iles. Al il e I-node e I-node e I-node e I-node e I-node e I-node e I-numb e I-~~~ e identi e identi e illust e implem e in a c e in a d e in acc e in ano e in a~~ e in ord e in par e in seq e in the e in the e in the e in the e in thi e in tur e inacce e index e index~ e indica e indica e indica e indica e indica e indica e inform e input/ e integr e integr e interr e Invent e into b e invent e invent e involv e in~~~ e is a f e is a p e is aga e is all e is als e is ass e is a~~ e is con e is del e is ext e is extion. ation. ations f ations t ations w ations w ations. ations.~ ationshi ation~~~ ation~~~ ation~~~ ation~~~ ative, a atively atively, atively, ative~~~ atly sim atly~~~ atment g atment o atment o atment~~ ator 234 ator 239 ator 239 ats show attempt~ atum giv atus and at~~~ 3 ault dir ault dir ault dir ault~~~ ault~~~ ault~~~ ause an ause dir ause dir ause it ause mai ause of ause som ause the aution t autiousl availabl ave an~~ ave a~~~ ave I-no ave been ave been ave link ave more ave the  jsr r5,getc; 9:.. swab r0 bis (sp)+,r0 rts r5 getc: mov r1,-(sp) mov (r5)+,r1 dec 2(r1) bge 1f mov r1,r0 add $6,r0 mov r0,0f mov r0,4(r1) mov (r1),r0 sys read; 0:..; 512. bes 2f tst r0 bne 3f 2: mov (sp)+,r1 sec rts r5 3: dec r0 mov r0,2(r1) 1: clr r0 bisb *4(r1),r0 inc 4(r1) mov (sp)+,r1 rts r5 put.s.ci+/ putw/putc -- write words/characters on output file / / fcreat -- create an output file for use by put(w|c) / / calling sequences -- / / mov $filename,r0 / jsr r5,@5W- W-@5N (5W- 5 5W- Nf  Nf  Nf  Nf   Ff @ N (@- Ff BҤ Ff(5 u- -(? (u-wt(@5@ 5N N ew>(w f >@ 5 W-.W-b  8 5`?@ -'ee \w4.@ @N R w'w 'C C5=     C &ZbJkRnDqbrjׯCpG@   =  &   @e W/  @ =   x B@ @ @e=ׯB/  BN f ^ wx&w f&B B5%1 W-8@e=G@4Nf ^ @2Nf ^ @@=  at a k at a p at any at a~~ at FIG at the A~~~ 1 A~~~ 1 a~~~ a~~~ a~~~ a~~~ a~~~ a~~~ a~~~ 1 a~~~ 1 a~~~ 1 a~~~ 1 a~~~ 1 a~~~ 1 a~~~ 1 a~~~ 1 a~~~ 2 a~~~~~ a~~~~~ Backgr a~~~~~ B.2,~~ B.3,.. backup be ano be che be con be con be ded be fun be giv be gre be loc be loc be mor be pas be pre be pro be sep be sha be sha be sho be tak be the be the be tre be und be use be use Becaus Becaus becaus becaus becaus becaus becaus becaus become ion 50 ation 52 ation 52 ation 52 ation 52 ation 52 ation 52 ation 52 ation an ation an ation bi ation bi ation bu ation co ation fo ation in ation in ation in ation is ation is ation is ation of ation of ation of ation of ation of ation of ation of ation of ation of ation of ation of ation of ation of ation on ation on ation po ation po ation po ation po ation po ation po ation sh ation sh ation to ation wa ation wo ation, a ation, a ation, a ation, s ation, t ation, t ation, t ation,~~ ation,~~ ation. an ames, na ames. F ames.~~~ ames~~~ ames~~~~ ame~~~ ame~~~ ame~~~ 1 ame~~~ 1 ame~~~ 1 ame~~~ 2 amined,~ aming co aming fu aming fu aming ma aming of aming of aming sc aming, a aming. aming~~~ ammatica ammatica ammatica ammatica ammatica amming o amodific among fi among se ample in ample, a ample, a ample, i ample, n ample, s ample, t ample, t ample, t amples o ams and ams are ams are ams are ams as p ams beca ams conc ams conc ams deal ams deta ams gain ams in d ams in f ams may ams may ams ma ng may b ng metho ng name ng name ng name ng of a ng of da ng of da ng of di ng of in ng of th ng of th ng on th ng on th ng only ng open ng or ti ng or wr ng or wr ng or wr ng other ng physi ng physi ng point ng point ng previ ng proce ng progr ng progr ng pseud ng rapid ng schem ng servi ng sever ng shown ng simpl ng small ng succe ng symbo ng syste ng syste ng syste ng syste ng syste ng syste ng syste ng syste ng syste ng syste ng syste ng syste ng syste ng syste ng syste ng syste ng syste ng syst When When Word "A" i "defa "ROOT "ROOT (FIG. - 17 - 18 - 19 - 20 - 21 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - 29 - 30 - 31 - 32 1 an 1 ar 1 ar 1 be 1 da 1 I- 1 di 1 I- 1 in 1 in 1 lo 1 st 1 th 1 th 1 tr 1 tr 2 2 2 2 2 da 2 di 2 I- 2 en 2 fi 2 in 2 is 2 nu 2 ow 2 re 2 tr 2 us 256 w 256 w 3 3 3 30 3 ar 3 bl 3 co at"4pscien"zndigit$retrn"cerror"_putcha"putc"flush"2_errno$_getcha"getc"log"lgetw#V fopen"putw# fcreat" 5 e list 5 e list 5 e list 5 e list 5 e list e e list~~ e list~~ e locate e locate e locate e locati e locati e locati e locati e locati e locati e locati e locati e locati e locati e logica e lose m e lost d e lost. e made a e made b e made i e made m e made m e mainta e mainte e mainte e mainte e mainte e mainte e mainte e mainte e mainte e mainte e manner e manner e map 40 e map 40 e map 40 e map 40 e map 40 e map bi e mared e mared e marked e marked e matche e maximu e may ac e may ac e may be e may) sub $512.,save(r3) 1: clr ct br 2b .bss buf: .=.+512. bufe: ct: .=.+2 end: .=.+2 file: .=.+2 count: .=.+2 ind: .=.+2 save: .=.+100. ;z$. & 6 % mlevxxxxprintplaymanualsetupscore/xxxxxxxxseektestinputxxxxxxxxspeakxxxxehpictscaleforeachbookw B:@ 95 5 6`A@ < : 7?? @? 9%5 @V w-~V@@ h.N pw-z@  a .8a :97 a5 @ ;  @_z 7<__ _  5___ | 5< 7  7_ :9w_ _Umcheck.s!/ check -- verify consistency of file system clr r2 mov $argbuf,r3 mov (sp)+,r5 tst (sp)+ 1: dec r5 ble 1f mov (sp)+,r4 cmpb (r4),$'0 blo 2f cmpb (r4),$'9 bhi 2f clr r1 3: movb (r4)+,r0 beq 3f sub $'0,r0 mpy $10.,r1 add r0,r1 br 3b 3: mov r1,(r3)+ br 1b 2: mov r4,r2 br 1b 1: mov $-1,(r3)+ tst r2 bne 1f mov $rf0,0f jsr r5,mesg; ; .even jsr pc,check mov $rk1,0f jsr r5,mesg; <\nRK1:\n\0>; .even jsr pc,check mov $rk2,0f jsr r5,mesg; <\nRK2:\n\0>; .ev&d1 ; extern c1,c2,c3,d1,d2,d3; syinit.c syinit dccs = &d1 ; extern c1, c2, c3, d1, d2, d3 ; d2 common.c _ d1; d2; d3; d4; d5; d6; d7; d8; d9; int *dccs d1; int *dcwc d2; int *dcma d3; dspydr.c main dcwc = &d2 ; extern c1,c2,c3,d1,d2,d3; syinit.c syinit dcwc = &d2 ; extern c1, c2, c3, d1, d2, d3 ; d3 common.c _ d1; d2; d3; d4; d5; d6; d7; d8; d9; int *dccs d1; int *dcwc d2; int *dcma d3; dspydr.c main dcma = &d3 ; extern c1,c2,c3,d1,d2,d3;  alloc alloc alloc Also Altho Altho alway an I- Any a Any~~ and " and a and i and o and t Any f Any n are c are c are n area area arran arran arrow As bl As fi as al As an As se at 40 At FI At th At th be un below bit s block block Buffe block block block block block block block block block branc buffe but n by al by in By se by re Canad Canad Canad Canad Canad Canad Canad Canad t& 6 % Ff07 @e5V `UV `U P=% - jOW z_` 7 r OA1@ T_` -J $O@_, 6 _j * L _j r7V `U _j  %_j _j +_j  ^L_j 5 @e@e& %--l 5-_` W-_` -_` W-_` uW-@ 5 u-@ @mA AaH u-u5 u-@  _ 5% W 7 5-_-@# 5-_@@e@-@e5-jNfZ %7PLJ>-DNf4 %7*&$+-Nf %7 % %0 _B w 5% W  5- -@tpjR _ T5% W >_ 5-(_-@# M 9-  ^ L K J I H G F E D C B A @ ? > = < ; : 9 8 7 6 5 4 3 2 1 0 / . - , + * ) ( ' & % $ # " !     r inters ar inters as inters ca inters co inters ea inters fo inters fr inters in inters in inters in inters in inters in inters in inters in inters is inters of inters pe inters po inters th inters to inters to inters to inters to inters to inters to inters to inters to inters to inters to inters to inters to inters wh inters, a inters, p inters,~~ inters. inters. inters. inters.~~ inters.~~ inters.~~ inters.~~ inters; I inters~~~ inters~~~ inters~~~ inters~~~ inters~~~ inters~~~ inter~~~ inter~~~  w"w "@O'L > x' fj' x5%@e&T' 4%@,u-x8 2eu-|8 2N N  Nf  Vewn!w \!D2GT7"GwL!w :!,G'8 5 7''8 2& 8 5 7&&8 2;p& 4% p'FX& T& 4 4 2 8&4&-$ 7 *& (&$&-#7 & JwvFw w v  7r# r#wp%N r#wp%f 7r#`e &% ron.c _ int *sycroq; int *ackq; int *mtq; int *dkq; mtbeg.c mtbeg extern int *mtq, *mtlast ; if( testq(mtq) == 0 ) goto empty ; pq(mtq,iotp) ; mtih.c mtih extern mtq, irc, ircmax ; if((nq = gq(mtq) ) == 0 ) goto sendac ; qdspy.c qdspy q = mtq ; extern int *sycroq, *ackq, *mtq, *dkq ; syinit.c syinit extern int *sycroq, *ackq, *mtq, *dkq, qa[] ; mtq = initq( &qa[ql*2], ql ) ; mts common.c _ int *mts m1; int *mtc m2; int *mtbrc m3; int *mtma m4; dspydr.c main *mtsirect e direct e direct e direct e direct e direct e direct e direct e direct e direct e direct e direct e direct e direct e direct e direct e direct e direct e direct e each~~ e elimin e embodi e end of e end of e entrie e entry e entry~ e equal e erroro e errors e errors e exampl e except e exerci e extens e file A e file a e file a e file a e file d e file d e file f e file i e file i e file i e file i e file i e file n e file n e file n e file n e file n e file n e file n e file n e file n e file n e  drawba Drawin due to due to due to duplic duplic Each d duplic duplic duplic During during each d each I each f Embodi each~~ easily effect effect effici elimin elimin elimin embodi encoun encoun ending entrie entrie entrie entrie entrie entrie entrie entrie entrie entrie entry entry entry entry entry entry entry entry entry entry entry entry entry) entry. entry~ entry~ errone error Errors error, errors errors errors errors errors made mo e maintai e mainten e mainten e mainten e mainten e mainten e mainten e mainten e mainten e mainten e manner e manner~ e map 402 e map 406 e map 406 e map 406 e map 406 e map bit e mared " e mared a e marked e marked e matches e maximum e may acc e may acc e may be e may be e may be e may loc e may thu e method e modific e modifie e more co e more th e more us e more va e more~~~ e more~~~ e most pa e much of e must be e must be e must pr e name "1 e name "A e name "A e name "U e name (t e nan ind n and ma n and pr n anothe n any di n any ev n any I- N are~~~ n area o n are~~~ n arises n arrang n as I-n n as set n at 205 n at 3B, n at FIG n at FIG n at FIG n attemp n a~~~ n a~~~ 1 n a~~~ 2 n backup n be giv n be sei n become n behalf n bit is n bit is n bit wh n bits 4 n bits f n block n block n block n blocks n but on n by any n change n checki n choosi n common n comput n comput n comput n comput n conjun n conjun n contai n contra n contra n creati n data b n dealin n diagra n differ n  deallb /* incr not in use counter */ niucnt =+1 ; extern niucnt, toterr, rngcnt, frecnt ; syinit.c syinit extern niucnt, toterr, rngcnt, frecnt ; niucnt = toterr = rngcnt = frecnt = 0 ; numbrs ccdspy.c ccdspy numbrs( 3, n, &i ) ; numbrs( 6, n, &i ) ; numbrs( 6, n, &i ) ; numbrs( 6, n, &i ) ; numbrs( 6, n, &i ) ; numbrs( 6, n, &i ) ; numbrs( fclen, n, &i ) ; dcdspy.c dcdspy numbrs(2, n, &i ) ; dkdspy.c dkdspy numbrs(2, n, &i ) ; _commd"L2rsave _fclen _fct _comd L3_printf L5 L6V_fcthrs L7hL8 L9zL10000L10L10001L11_bt _allocb L12 _iot L13H_deallb L148_damin L15L16L17>L18X_ciotp L19(L20L21L22<L23:L24@L25RL26bL27xL28@L29re es to th es to th es to~~~ es which es which es which es which es which es withi es) stor es, and es, and es, and es, and~ es, but es, but es, but es, comp es, dire es, FIG. es, for~ es, howe es, name es, so~~ es, the es, the es, unaf es, user es, viol es, whil es,~~~ 1 es-- to es. A l es. All es. As es. As es. At es. A~~ es. Dir es. Dir es. For es. For es. For es. Fur es. I-l es. In es. Onc es. Suc es. Sys es. The es. The es. The es. The es. Thu es. Thu es.~~~ es.~~W-"XN  @ , `5@-W- @N  W-\ 4  7 W--? 5% @-> f  NP  _@N  5_  W-` @ww bp Nf   @ ,wlw Z*e- v  He-e7w&w  Hww _ 7 @_ 5%/:7 t7%*/07  \5@ % J5%/-ZZ X r~~~ puter~~~ puter~~~ p~~~ 10 qual and qual the que.~~~ quence o quence o quence w quential quently ques of quest in quest is quest is questing quests d quire le quired i quiring quite di quite si r (index r 211 to r 211. r 212 wh r 234 wi r 239 is r 239 to r 523 an r 523 an r 523 is r 523 is r 523, a r 523. r 523. r 523. r 528 of r a diff r a firs r a full r a part r a seco r a sing r a smal r access r admini r all da r all of r all of r also g r always r amy us r and co r and lo r and th r ad=:741EB?<9630/,)&# .+(%"-*'$!     , the a ks, the c ks. An i ks. Fixe ks. Many ks.~~~ 3 ks.~~~ 12 ks.~~~ 19 ks; I-nod ks~~~ 20 kup stora kup stora kup stora kup.~~~ 1 k~~~ 2 k~~~ 2 k~~~ 4 k~~~ 5 k~~~ 5 k~~~ 6 k~~~ 7 k~~~ 8 k~~~ 10 k~~~ 11 k~~~ 14 k~~~ 16 k~~~ 17 direct n direct n direct n direct n direct n direct n direct n direct n direct n disk s n duplic n each 1 n each~~ n end of n entrie n entry n entry n error. n error. n error~ n exampl n FIG. 1 n FIG. 1 n FIG. 1 n FIG. 2 n existi n FIG. 3 n FIG. 3 n FIG. 3 n FIG. 3 n FIG. 3 n FIG. 4 n FIG. 4 n FIG. 4 n FIG. 5 n file i n file l n file l n file l n file l n file l n file l n file l n file l n file l n file l n file l n file l n file n n file.~ n file~~ n file~~ n file~~ n flow c n for ke n free b n free b n just~~ keepin key to key to key~~~ known Large large large large large. large~ large~ last m last m later later~ layout layout layout leads~ least length length length length length length level level levels levels Likewi linear link i link t links links links list 4 list 5 list 5 list 5 list 5 list 5 list 5 list 5 list e list. list~~ list~~ locate locate Locati Locati Locati locati locati locati locati locati locati locati locati e& e@e5EW 25 2 5%W- AWp AmeuN,"f@e@e& e@e5@Ae@%'( h (2 nFf \Wp*ed!Ff7 4 0d!lWped!\p ,"FWpf:Wpf e5_ @V ׭(l18"WpfWpf ec 8"WpfWpf e MDC?002z0+   numbrs(2,n,&i) ; dspydr.c main numbrs( 11, n, &r) ; iodspy.c iodspy numbrs( l, n, &nums ) ; mtdspy.c mtdspy numbrs(1,n,&i) ; numbrs(2, n, &i ) ; numbrs(2,n,&i) ; numbrs.c numbrs numbrs(max,array,amount) int array[],amount[] ; { oldpri common.c _ p20flg; irc; ircmax; oldpri; p20flg common.c _ p20flg; irc; ircmax; oldpri; dcih.c dcih extern dclser, p20flg ; if( p20flg != 1 ) *dccs = *dccs | 0200 ; dkih.c dkih /*diag*/if(p20flg != 1) *dkc = *dkc | 0200 ; /* rlves emselves emselves, emselves, em~~~ 3 em~~~ 9 em~~~ 13 em~~~ 16 em~~~ 18 em~~~~~ en a data en a data en a data en a data en a dire en a dire en a file en a file en a pseu en a user en a user en a user en a user en an exi en be sei en become en by any en change en comput en direct en direct en file i en file l en file l en file l en file l en file l en file l en file l en file l en file l en file l en file l en file l en file.~ en file~~ en file~~ en into t en locate en make i en moment en no d<;:9876543210/.-,+*)('&%$#"!      th ion;~~~ ion;~~~ ional di ional na ional na ional na ional sy ionally ional~~~ ions bet ions for ions of ions of ions to ions und ions wil ions wit ions, an ions. B ions.~~~ ionship ions~~~ ions~~~ ions~~~ ion~~~ ion~~~ ion~~~ 1 ion~~~ 1 ior Art ior art ior art ior art ior art ior art ior art ior art ior art ior art ior art ior art, ior art. ior art. ior art~ ious pro ious ser iously d iously d iously n iously. iously.~ ip among ipal fun ipal wit ipal~~~ iprogram iption iptiota, alpha, lev); remove(); if(v > alpha) { alpha = v; use(pv, m); if(alpha >= beta) break; } } lmp = p2; f1: pvp = pv; return(alpha); } double maxmin(alpha, beta, lev) double alpha, beta; int lev; { int m; register *pv, *p1, *p2; double v, minmax(); if(lev >= xlev) return(maxqui(alpha, beta, lev)); pv = pvp; *pvp++ = 0; p1 = lmp; agen(false); p2 = lmp; m = p2-p1; if(m == 0) { alpha = -1.0e4+lev; goto f1; } p2 = p1; lev++; while(p1 != lmp) { m = *p1++; move( C 4 EC`fC K"e  "@@ b(C C @@ b(Ce  @ v0&0, P &f @ ,ty_qsort"qsortdoneloop$loop12))99ii_attacv _center _wheur _bheur _control _qdepth _mdepth _rand _matflg _bookf _bookp _intrp _moveno _gval _vtabf _fout _vx _vy _vtab ._game _fault _pvalue _abmove _pvbuf _pvp _lmp _sbufp _clktim _mantom _ply _value _evalue _mfmt _debug _deptory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rectory rerenc erformed erformed erformed erformed erformed erformed erformed erformed erformin erical d ering an eriodica eriods f eristics erly acc erly app erly dup ermed a ermed he ermed hi ermine t ermined ermined ermined ermissib ermissio ermissio ermissio ermit ac ermit fi ermit in ermit ra ermits d ermits t ermitted ermitted ermitted ermittin ermittin ermittin ermore, ern in t ern to t ernative ernative ernative ernative erned wi erned wi erned wi erned wi erned wi erned wi ern~~~ 1 ero coun ero dedi ero_`a bU Bh er who c er wishe er wishe er wishe er wishe er wishe er wishe er wishe er withi er's are er's~~~ er's~~~ er) to l er)~~~ er, and er, main er, or s er, the er, ther er,~~~ er,~~~ er,~~~ er. Adv er. As er. Dia er. In er. In er. In er. Thu er. Use er.~~~ er.~~~ 1 er.~~~ 1 er.~~~ 1 er.~~~ 1 ER1" is~ ER1.A.1" era. Th era. Th eral and eral dir eral hie eral hie eral pur eral pur eral tim eral use erally a erally l erally n erally p erally q erally r erally~~ eral~~~ erarchal erarch88Y_printn"`rsave L2$`_putchar L18`rretrn _printf"<`L4L`L5L`L6t`L3DaL8aL9`L10`L11`L12`L13`L14HaL15`L16PaL10000`L10001`L17`L18`L19`L20aL70asswitch psw.o.oJ;+`$_֠_savpsw" *area ; common.c _ int *table;int *area; syinit.c syinit extern int fct[], *ciotp, *table, *area ; table = ackmes ; testq ccbeg.c ccbeg if( testq( ackq ) == 0 ) goto empty ; dcbeg.c dcbeg if( testq(sycroq) != 0 ) goto que ; dkbeg.c dkbeg if( testq(dkq) == 0 ) goto empty ; iras.c iras if( testq( ackq ) == v ) goto prisam ; v = testq( ackq ) ; mtbeg.c mtbeg if( testq(mtq) == 0 ) goto empty ; qdspy.c qdspy n = testq(q) ; qu.c testq testq(qt) int qt[] ; { snack.c snack ifA & 9 &fA @e&7w@&./lib/crt20.o/usr/c/c0/usr/c/c1/usr/bin/nas/tmp/ctm0a%s: c0c1as-a.outa.outmove failed: %s ld-l2/lib/libc.a-l/bin/lddefineincludeCan't creat %s Undefined controlNested 'include'Missing file %sControl syntax%d: Line overflowCan't find %s Try again Fatal error in %s  fw  7 df\w 7 Finb.oiodspy.oMiras.omtbeg.omtdspy.omtih.omtstat.omttran.onumbrs.oqdspy.oqu.osnack.ostart.osyinit.oLcompsyinit.osnack.ostart.osyinit.oiear.oldunix.opsw.oreboot.ocrt20.siear.sa.outf the ll of the ll of the ll of the ll of the ll of the ll of the ll path n ll path n ll path n ll path n ll path n ll path n ll physic ll physic ll pointi ll possib ll unallo llaneous llaneous lled, the lled, the lling fil llocatabl llocatabl llocatabl llocatabl llocatabl llocated llocated llocated llocated llocated llocated llocated llocated llocated, llocated. llocated~ llocating llocation llustrate llustrate llustrate llustrate llustrate llustrate llustrate llustrate llustrate llustrati llustrY `U e l5NY `U @d !EU? Y `Ug ! @ z:@0 Ff) J xNe l @EU=wJDN:  5 @EU=@Ff)5fC5 ^C@?VC@?JCBC5 @Ff@e55 W-f Nm ?% _h@_L5 7 |xW-  A Aa1-P_r -@ @ @a @ ~BvBnB br err 1: mov r1,r3 clr r4 / count entries 2: cmp (r3),ii bne 2f inc r4 add $12.,r3 br 2b 2: cmpb r4,(r2) beq pall jsr r5,mesg; <#\0>; .even err: incb longf+1 jsr r5,mesg ; .even pall: tst longf beq 1f mov r5,-(sp) mov ii,r5 jsr pc,decml mov (sp)+,r5 1: cmp (r1),ii bne 1f tst longf beq 2f jsr pc,pentry jsr r5,mesg <\n\0>; .even 2: add $12.,r1 br 1b 1: tst longf beq ep2 jsr r5,mesg; <\n\0>; .even ep2: inc r2 inc ii cmp ii,maxi ble p2 tst (r1) beq 1f mov (r1),ii " may A.1" the a. A se a. The a. The A.1 is a A.1, A.2 A.1, the A.2, A.3 A.3,..., A.~~~ 12 Abstract ability able 1. able blo able blo able blo able for able spa able spa able to above. absence abular f access I access I access c access d access d access i access t access t access t access t access t access t access t access t access t access t access t access t access t access t access. access. accessib accessib accessin access~~ accommod accompli accompli accordin accordin accordin accordin ac)())99I)()))())9h999I)Y9y9y9y the~ ein, and ein:~~~ eing dea eing sho eing~~~ eir corr eir file eir need eir stor eized fo el file el of in el of in el, each elate th elates t elations eld of t eld. Th eleted a eleted, eletion, elf to~~ elf) is elf-~~~ elf. Th elf. Us elieve t eliminat eliminat eliminat eliminat ell as t ellaneou ellaneou elow.~~~ elow.~~~ els --sy els may els of i els, for els, mai els. Sy elves ar elves st elves st elves, c elves, v ely by t ely cont ely inde ely open ely sepa ely, a b ely, may ely, whi el 7 I- 7 ma 7 me 7 me 7 mo 7 na 7 no 7 oc 7 Ph 7 of 7 sa 7 te 7 to 8 50 8 by 8 co 8 co 8 en 8 fi 8 fi 8 in 8 li 8 ma 8 nu 8 re 8 se 8 sh 8 st 8 un 8 un 8 x 2 9 9 25 9 25 9 FI 9 a 9 ad 9 bu 9 di 9 fi 9 fi 9 in 9 nu 9 ow 9 ro 9 si 9 Th 9 th A dir A lar A lin A plu A use a man A num A sin a use accom Admin admin Advan All d Also An an $$jUTY `U rY `U 5 W- @ mY `U Y `U55 N@e& J%5NY `U Y `U5 W-@ @aY `U Y `UFEt5W-. "@@   !-w-w@ z:@0  N ! !Ff-DU?D-f7 U?|xE5@f E%T J (%@ "82 5=NY `U w ed in op ed in pr ed in pr ed in ta ed in th ed in th ed in th ed in th ed in th ed in th ed in th ed in th ed in th ed in th ed in th ed in th ed into~ ed in~~~ ed in~~~ ed lengt ed lengt ed lengt ed lengt ed locat ed locat ed on a ed on a~ ed on du ed on th ed on th ed on th ed on th ed ones. ed physi ed previ ed separ ed since ed so th ed the~~ ed throu ed to a ed to ac ed to ac ed to as ed to as ed to be ed to be ed to be ed to bu ed to by ed to ch ed to co ed to co ed to cu ed to fi ed to fo ed to It common.c _ fclen; fcthrs; comd; chcnt; maxch; dspydr.c main chcnt = 5 ; extern chcnt, maxch ; fatal.c fatal chcnt = maxch + 1 ; /* deletes present input line */ extern chcnt, maxch ; getput.c getchar else chcnt = -1 ; /* reinit */ chin[chcnt] = chin[chcnt] | 040 ; chin[chcnt] = '\n' ; if((chin[chcnt] >= 0101 ) &&(chin[chcnt] <= 0132 ) ) putchar( chin[chcnt] ) ; chcnt = -1 ; /* init cnt */ chcnt = 0 ; chin[++chcnt] @5W- W-@5N (5W- 5 5W- Nf  Nf  Nf  Nf   Ff @ N (@- Ff BҤ Ff'5 u- -'> 'u-w'@5@ 5N N ewV'wf (=@ 5 W-.W-b  8 5`>@ -&e a num gh all o gh any a gh a~~~ gh buffe gh direc gh direc gh direc gh not s gh the I gh the d gh the I gh the I gher in ght loca ght phys ght phys ght writ gh~~~ 3 gh~~~ 13 gical or gin. In ging.~~~ ginning ginning ginning ginning ginning ginning ginning ginning ginning ginning ginning~ ginning~ gins in gins wit gins~~~ gital co gital co give the given by given di given fi given mo given th given to given wh given. given. gives to giving a giving i gle acce gle dire gle dire gle file g= *tkb & 0177 ; extern maxch, chcnt ; if( chcnt > maxch ) goto newlin ; if( chin[chcnt] == '#' ) {if(chcnt >=1 ) { chcnt=-2; /*decr*/ if( chin[chcnt] == '@' ) { chcnt = -1 ; /* delete line*/ if(( chin[chcnt] == '\n' ) ||( chin[chcnt] == '\r' ) ) maxch = chcnt ; return( chin[chcnt++] ) ; syinit.c syinit chcnt = 5 ; extern irc, ircmax, maxch, chcnt, p20flg ; chin common.c _ char chin[70]; getput.c getchar chin[chcnt] = chin[chcnt] | 040 ; chin[chcnt] may b ing metho ing name ing name ing name ing of a ing of da ing of da ing of di ing of in ing of th ing of th ing on th ing on th ing only ing open ing or ti ing or wr ing or wr ing or wr ing other ing physi ing physi ing point ing point ing previ ing proce ing progr ing progr ing pseud ing rapid ing schem ing servi ing shown ing simpl ing small ing succe ing symbo ing syste ing syste ing syste ing syste ing syste ing syste ing syste ing syste ing syste ing syste ing syste ing syste ing syste ing symd commd.c commd commd(sc,linked) int sc[], *linked ; { d1 common.c_ d1; d2; d3; d4; d5; d6; d7; d8; d9; d1 common.c_ int *dccs d1; int *dcwc d2; int *dcma d3; d1 dspydr.cmain dccs = &d1 ; d1 dspydr.cmain extern c1,c2,c3,d1,d2,d3; d1 syinit.csyinit dccs = &d1 ; d1 syinit.csyinit extern c1, c2, c3, d1, d2, d3 ; d2 common.c_ d1; d2; d3; d4; d5; d6; d7; d8; d9; d2 common.c_ int *dccs d1; int *dcwc d2; int *dcma d3; d2 dspydr.cmain dcwc = &d2 ; d2 dspydr.cmain extern c1,c2k d @95 N f d L@@ 5Ne0 f V w/f W- Nfe( IW-Ne  N7 7W-dA r   9 A r uA rd& V : A rdu@Ff @     xF  $ N , fe( w.f)@   F. bv k nz q~ r Nf w-f3_ -ZT_ 49 7 74extern int *mtlast, *mtc, *mts, *mtbrc, *mtma, *iot ; if( *mtc < 0 ) goto deverr ; if( p20flg != 1 ) *mtc = *mtc | 0200 ; /* mtc ready */ lfunc =(*mtc & 016 ) >> 1 ; mttran.c mttran *mtc = mtreg[0] ; /* function and go */ extern int *mts, *mtc, *mtbrc, *mtma ; if(( *mtc & 0200 ) == 0 ) goto busy /* controller busy */ ; syinit.c syinit extern int *mts, *mtc, *mtbrc, *mtma ; mtc = mtcr= 0172522 ; mtcr = mtc ; mtcr common.c _ char *mtcr m2; char *dkcr d4; char *ccsr c1; mtII9)Iy)III9)99)with on word on, a na on, all on, all on, phys on, rena on, stor on, the on, the on, this on,~~~ 1 on,~~~ 1 on. In on. The on. Thi on. Wor on.~~~ 1 on.~~~ 2 on: tha on;~~~ on;~~~ 2 onal dir onal nam onal nam onal nam onal sys onally a onal~~~~ onceptua oncern i oncern t oncerned oncerned Once~~~ oncerned oncerned oncerned oncerned ond dire ond dire ond dire ond leve ond port ond port ond port ond set ond the ond to I ond user ond user ond user ond user ond user ond user ond, for ondary s on 3 loc 3 rea 3 sam 3 sto 3 wri 30 -~~ 301 is 302 re 303 ex 303~~~ 304 sh 305. 306 an 307 ea 308, t 308. 31 -~~ 32 -~~ 3A and 3A sho 3A, in 3A, it 3A.~~~ 3A.~~~ 3B is 3B, is 3B.~~~ 3C ill 3C is 4 4 4 and 4 bit 4 blo 4 com 4 dat 4 Gen 4 exp 4 is 4 it 4 key 4 lar 4 nee 4 sta 4 the 401 ar 401 be 401. 402 of 402. 403, b 404 co 404. 404. 404~~~ 405 is 406 ar 406 co 406. 406.~~ 407 co 408 wh 408 wi 420.  L% _` @ 7dP7VPRPNP_j  PPP_j cc  x_`  W `U_j "W `U_j L 5-b_` -V@wB>0W `U _j K=% @5O I>W `U _j  5-d-@wPW `U _j  5-a-x->-@wZW `U _j  ^Mp pacm& 4  NM6 B hW~WWWWWW `UW @ W `U-ng~ erating~ eration eration, eration, eration, eration, erations erations erations ercised ere a la ere are ere are ere I-no ere shou ere shou ere to d ere user ere with ereby ma ereby po ered in ered in ered use ered. I erefore erefore erefore, erefore, erein as erein re erein te erein th erein, a erein:~~ erence t erence t erence t erence t erence w erenced~ erences erences erences erences erences erent fi erent fr erent na erent po erent po erent sy erent us erest in erest in erfere w erfeer~~~ her~~~ hes begi hes file hes the hes to c hes to c hes to e hes to l hes to o hes to o hes to r hes to r hese cha hese dir hese spe hese two hese~~~ hese~~~ hes~~~ 1 hether t hey cont hey deal hey do n hey had hey have hey repr he~~~ 2 he~~~ 2 he~~~ 2 he~~~ 3 he~~~ 3 he~~~ 3 he~~~ 4 he~~~ 4 he~~~ 4 he~~~ 4 he~~~ 4 he~~~ 5 he~~~ 5 he~~~ 5 he~~~ 6 he~~~ 6 he~~~ 6 he~~~ 7 he~~~ 7 he~~~ 7 he~~~ 8 he~~~ 8 he~~~ 9 he~~~ 9 he~~~ 10 he~~~ 10 he~~~ 10 he~~~ 11 he~~~ 13 he~~~ 13 ta bl l data bl l data bl l data fi l data fi l datum g l directo l directo l directo l directo l directo l directo l directo l directo l directo l directo l directo l directo l disk fi l file fo l file na l file na l file na l file na l file na l file na l file st l find a l form a~ l form of l form;~~ l functio l handlin l handlin l hierarc l hierarc l illustr l illustr l its dat l linking l linking l locatio l locatio l modern~ l name in l name is l name tr l names w l names~~ l naming l naming l nami name ile name ile name ile name ile name ile name ile name ile name ile name ile name ile name ile name ile name ile name ile name ile name ile name ile name ile name ile nami ile of a ile of a ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile oper ile or b ile or d ile or p ile read ile retu ile sepa ile seve ile shar ilies ectories ectories ectories ectories ectories ectories ectories ectories ectories ectories ectories ectories ectories ectories ectories ectories ectories ectories ectories ectories ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 1 ectory 3 ectory 3 ectory a ectory a ectory a ectory a ectory a ectory a ectory a ectory a ectory a ectory a ectory b ectory b ectory b ectory b ectory b ectory b ecto               _value _bkpos _game errorVpmoveXnmoveHbmoveHrmoveqmove<kmovemoveHmovekmovexmoveomoveoomovepmoveq _ char *mtcr m2; char *dkcr d4; char *ccsr c1; dspydr.c main ccs = ccsr = 0167770 ; ccs = ccsr = &c1 ; extern char *ccsr ; syinit.c syinit ccs = ccsr = &c1 ; ccs = ccsr = 0167770 ; ccsr = ccs ; char *mtcr, *dkcr, *ccsr ; cctran ccbeg.c ccbeg if( cctran(mess,len) == 0 ) goto alack ; ccdspy.c ccdspy flag = cctran( mess,6 ) ; cctran.c cctran cctran(mess,len) int mess[],len ; { snack.c snack if( cctran(idx,6) == 0 ) goto ret ; /* busy */ chcnret phigh: mov _reg+12.,r0 / get old stack pter add $2,r0 / get psw word mov (r0),r1 bic $!0340,r1 / have old priority mov r1,_pswold bis $0340,(r0) / set psw priority high ret: jsr pc,resreg / restore regs mov _reg+12.,sp / set stack rti / interrupt return / / / internal sub to store regs ( not sp ) streg: mov r0,_reg mov $_reg+2,r0 mov r1,(r0)+ mov r2,(r0)+ mov r3,(r0)+ mov r4,(r0)+ ii} if(( c[0] = getchar() ) == '\n' ) { ef[1] = 1 ; goto badf ; } if((ef[1]==2) &&( ef[2]!='p') ) goto badf ; extern int *iot, ef[], *ciotp ; mtdspy.c mtdspy n[i++] = getnum(ef) ; ef[1] = 1 ; ef[1] = 0 ; if ( ( ef[1] == 1 ) && ( n[i] == 0 ) ) i =-1 /* decr */; if ( ef[1] == 2 ) goto badf ; if ( ef[1] == 2 ) goto badf ; if ( ef[1] == 2 ) goto badf ; if ( ef[1] == 2 ) goto badf ; while ( ( ef[1] == 0 ) && ( i k d @:5 N f d M@@ 5Ne0 f V w/f W- Nfe( IW-Ne  N7 7W-dA r   9 A r uA rd& V : A rdu@Ff @     xF  $ N , fe( w.f)@   ,/ bv k nz q~ r Nf w.f4_ -BU_ 5: 8 75p[9] ) ; i = damin( &sc[4], &iotp[9] ) ; /* disk adr conversion */ if( damin( &sc[4], &iotp[9] ) != 0 ) /* error in adr */ if( damin(&sc[4],&iotp[9]) != 0 ) if( damin(&sc[4],&iotp[9]) != 0 ) dam.c damin damin(secptr,pdp) int secptr[], pdp[] ; { dkih.c dkih damin( usn, &da ) ; /* map sector num back to disk adr */ damout dam.c damout damout(pdp,secptr) int pdp[], secptr[] ; { dkih.c dkih damout( &dklast[9], &ac[4] ) ; /* disk adr, sel format damout( &0 ) != 0 ) ss = ss | 010000 ; /* pae */ if(( *mts & 0200 ) != 0 ) ss = ss | 01000 ; /* nxm */ if(( *mts & 02000 ) != 0 ) ss = ss | 0100 ; /* eot */ if(( *mts & 020000 ) != 0 ) ss = ss | 010000 ; /* cr */ if(( *mts & 040 ) != 0 ) ss = ss | 020 ; /* bot */ if(( *mts & 0400 ) != 0 ) ss = ss | 01000 ; /* bte */ if(( *mts & 04000 ) != 0 ) ss = ss | 0400 ; /* bgl */ if(( *mts & 040000 ) != 0 ) ss = ss | 040 ; /* eof */ if(((*mts&01000 )!=0) &(*bf _fout _vx _vy _vtab ._game _fault _pvalue _abmove _pvbuf _pvp _lmp _sbufp _clktim _mantom _ply _value _evalue _mfmt _debug _depth _flag _eppos _bkpos _wkpos _edge _pval _dir _board _mbuf ` _sbuf d_use"rsave L2L3L1rretrn _princ""L52L6~_putchar _out L10000ld [ 3?v d .b ; 50xj Y A .4LpO_n  :9 cx xhv  71sd { t^nmnohupnroffodoedoprovpasswdpfeplotprproofpsptiptxrelocrewrmrmdir+] ) ; extern fclen ; commd.c commd while( i < fclen )fcp[i++] = 0 ; extern fclen, comd ; fcp = &fct[ fc*fclen ] ; while( i < fclen ) printf(" %o", fcp[i++] ) ; common.c _ fclen; fcthrs; comd; chcnt; maxch; dkih.c dkih ba = fct[ fc * fclen + 8 ] ; ea = fct[ fc * fclen + 9 ] ; extern fclen ; fcp = &fct[ fclen *(dklast[1] & 037) ] ; endiot.c endiot extern fclen ; fcp = &fct[ fc*fclen ] ; mtih.c mtih extern fclen ; fct[ fc * fclen + 1 ] = 0 ; fct[ spydr.cmain extern int *ciotp ; ciotp dspydr.cmain /*diag*/ printf("ciotp = %o \n", ciotp ) ; ciotp iodspy.ciodspy return(ciotp) ; ciotp iodspy.ciodspy pter = ciotp ; ciotp iodspy.ciodspy extern int *iot, ef[], *ciotp ; ciotp syinit.csyinit ciotp = iot ; ciotp syinit.csyinit extern int fct[], *ciotp, *table, *area ; clkint syinit.csyinit *clkiv = &clkint ; clkint syinit.csyinit extern ccint, dcint, dkint, mtint, clkint ; clkiv common.c_ int *cciv; int *dciv; int *mtiv; int *dkiv; int *c at the b at the c at the I at the I At the o At the o at the d at the d at the f at the s at the t at the u at they at the~~ at the~~ at the~~ at the~~ at this at to pr at volum at when at, dupl at. Use ata arra ata as n ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata bloc ata blo W-  5@@ @ A Aapvwtwr> KP `  x 7 -~<-Ul-U^-Z-RUH-RU:47 07 ,w&w"BrKN<Qr Rp PbNkn*qbad char -- %c too many squares illegal position only one king each side needs a king black is in check iYYi)ufara[], *ackmes, ackara[] ; bufara bfdspy.cbfdspy area = bufara; bufara bfdspy.cbfdspy if( area == bufara) bufara bfdspy.cbfdspy printf("area(%o) not equal to either bufara(%o)",area,bufara); bufara bfdspy.cbfdspy extern int *bt, bufara[], *ackmes, ackara[] ; bufara common.c_ bufara[1550]; ackara[117]; qa[68]; ef[3]; iotta[150]; bufara syinit.csyinit bt = initb( bufara, bufl, 256 ) ; bufara syinit.csyinit extern int *iot, iotta[], *bt, bufara[], *ackmes, ackara[] ;  n = getnum(ef) ; n = getnum(ef) ; n = getnum(ef) ; n = getnum(ef) ; n = getnum(ef) ; n2 = getnum(ef) ; n2 = getnum(ef) ; ccdspy.c ccdspy i = getnum(ef) ; i = getnum(ef) ; dcdspy.c dcdspy n[i++] = getnum(ef) ; dkdspy.c dkdspy n[i++] = getnum(ef) ; dspydr.c main i = getnum(ef) ; lmax: i = getnum(ef) ; { l = getnum(ef) ; if( ef[1] == 2 ) goto badf ; i = getnum(ef) ; cnt++] ) ; chcnt syinit.csyinit chcnt = 5 ; chcnt syinit.csyinit extern irc, ircmax, maxch, chcnt, p20flg ; chin common.c_ char chin[70]; chin getput.cgetchar chin[chcnt] = chin[chcnt] | 040 ; chin getput.cgetchar chin[chcnt] = '\n' ; chin getput.cgetchar if((chin[chcnt] >= 0101 ) &&(chin[chcnt] <= 0132 ) ) chin getput.cgetchar putchar( chin[chcnt] ) ; chin getput.cgetchar chin[++chcnt] = *tkb & 0177 ; chin getput.cgetchar extern char chin[] ; chin getput.cgetchar if( c 01 ;/*rle*/ mttran.c mttran *mtbrc = mtreg[1] ; extern int *mts, *mtc, *mtbrc, *mtma ; syinit.c syinit extern int *mts, *mtc, *mtbrc, *mtma ; mtbrc = 0172524 ; mtc common.c _ int *mts m1; int *mtc m2; int *mtbrc m3; int *mtma m4; dspydr.c main *dkc = *mtc = *dccs = 0200 ; extern int *mtc, *mts ; mtdspy.c mtdspy case 0: *mtc = n[0] ; extern int *mtc, *mts, *mtbrc, *mtma ; printf("mtc= %o mtbrc= %o mtma= %o mts= %o\n",*mtc,*mtbrc,*mtma,*mts); mtih.c mtih fc * fclen + 2 ] = selsta ; syinit.c syinit extern fclen ; fclen = fcel ; while( i < 32 ) fct[ i++ * fclen ] = 0 ; fct ccdspy.c ccdspy fcp = &fct[ i*fclen ] ; extern int selmes[], fct[], *ccs, *cco, *cci, *cacms, ef[] ; commd.c commd extern int *iot, fct[], *bt, *ciotp ; fcp = &fct[ fc*fclen ] ; common.c _ fct[320]; inmess[10]; selmes[10]; reg[8]; dkih.c dkih ba = fct[ fc * fclen + 8 ] ; ea = fct[ fc * fclen + 9 ] ; extern int fct[], *dktl, *dkq , *dklast ; _-  5-_-@ff %_d % %_ 5 e@-A mjAup@ mX f % _  &=% W _@ @#a    xFXXXXXX$_W _ =% _WuWf_h_-db _-PN _-<: _ _ 5-ly, to rly~~~ rm as a rm a~~~ rm in Ta rm in~~~ rm of an rm of fi rm of~~~ rm. As rm;~~~ rmal dir rmal use rmat A.1 rmat is rmat of rmat of rmat to rmat, du rmat. U rmation rmation rmation rmation rmation rmation rmation rmation rmation rmats sh rmed a " rmed by rmed by rmed by rmed by rmed by rmed her rmed his rmed on rmed on rmed, an rmed~~~ rmine th rmined a rmined l rmined l rming la rming se rming sm rmissibl rmission rmission rmission rmit acc rmit fix rmit ind rmit rap  data f data f data f data f data f data f data f data f data f data f data f data f data l data l data s data w data. data~~ data~~ data~~ datum deal o deal p deal w deal w dealin dealin deal~~ debugg dedica Descri degree deleti denied Descri Descri descri descri descri design Detail desire detail detail detail determ diagra differ differ differ differ Direct Direct Direct Direct differ diffic diffic digita digita Direct Direct Direct Direct Y9i99Y99I_attacv _center _wheur _bheur _control _qdepth _mdepth _rand _matflg _bookf _bookp _intrp _moveno _gval _vtabf _fout _vx _vy  2f 3: add $12.,r1 br 2b 2: jsr pc,pentry1 mov (sp)+,r1 1: rts pc 9: jsr r5,mesg <\0>; .even mov (sp)+,r1 rts pc xit: jsr r5,flush; obuf sys exit decml: mov r4,-(sp) jsr pc,1f mov (sp)+,r4 rts pc 1: clr r4 div $10.,r4 mov r5,-(sp) mov r4,r5 beq 1f jsr pc,1b 1: mov (sp)+,r0 add $'0,r0 jsr r5,putc; obuf rts pc mesg: movb (r5)+,r0 beq 1f jsr r5,putc; obuf br mesg 1: inc r5 bic $1,r5 rts r5 qsort: mov r2,r0 sub r1,r0 cmp r0,r3 ble done mov r5,-(sp) mov r0,r5 c 4 spe 4 thr 4 -~~~ 4A, 4B 4B and 4C sho 5 5 5 a s 5 a s 5 are 5 com 5 com 5 dir 5 lea 5 nam 5 of 5 ope 5 par 5 poi 5 poi 5 sym 5 the 5 the 5 -~~~ 5 show 6 6 6 6 app 6 dir 6 dir 6 dir 6 fil 6 may 6 poi 6 pro 6 rem 6 sig 6 sto 6 sto 6 thr 6 to 6 wit 6 -~~~ 6 show 7 7 7 all 7 and 7 dat 7 dif 7 dir 7 ent 7 exa 7 gen 7 hie 7 is 7 met 7 poi 7 pro 7 suc 7 wit 7 -~~~ d08wv_^BA.-RQ\n.Ja'mgo /X(  4 x r  *$ W 6; A@ t =59:TUlm]meae.s.ch+qdiv = 177300 ac = 177302 mq = 177304 mul = 177306 sc = 177310 sr = 177311 nor = 177312 lsh = 177314 ash = 177316 get.s.ch+/ getw/getc -- get words/characters from input file / fopen -- open a file for use by get(c|w) / / calling sequences -- / / mov $filename,r0 / jsr r5,fopen; ioptr / / on return ioptr buffer is set up or error bit is set if / file could not be opened. / / jsr r5,get(c|w)1; ioptr / / on return char/word is in r0; error bit is / set on error or end of filhhhhhIh9HIh9x))x contai contai contai contai contai contai contai contai contai contai contai contai contai contai contai contai contai contai conten conten contig contig contra conven conven conven conven coordi correc corres corres corres corres creati creati creati curren dapt t Data b data a data b data b data b data b data b data b data b data b data b data b data b data d data f data f data f data f data f data f data f data f data f data f data f data f )99ii))H9Hyyy)y name o name r name, name. named named~ namees names names names names names names names names names names names names names names names names names, names. names~ names~ name~~ name~~ name~~ naming naming naming naming naming naming neames necess necess need f needs. new us new~~~ no int no phy normal normal not a not co not co not lo not pe not pr not se not to novel novel~ now ce now ma now ma now pr number number number ~ and 26B a and 307 e and 3C il and 3C sh and 4C sh and 529. and I-num and a cou and a sep and a spe and all o and alloc and an I- and an en and anew, and anoth and any d and apart and are u and block and block and block and conta and conta and corre and data and data and data and diffi and direc and direc and direc and direc and direc and disk and each and each and each and effic and endin and erron and exten and file and file and fixed and flexi and for w and for w and freed and freed and indic inn d below. d betwee d betwee d betwee d beyond d be~~~ d bit 52 d bit wh d block d block d block. d blocks d by I-n d by a s d by all d by any d by dir d by dir d by eac d by eli d by ind d by pro d by pro d by ref d by the d by the d by the d by the d by the d by the d by the d by the d by the d by the d by the d by~~~ d by~~~ d contai d contai d contai d contai d contai d correc d corres d data b d data b d data b d data b d data f d data f d data f d data f d data f d data w d diffic d direct d dire be next be one a be one o be opene be opene be passe be prepa be provi be provi be searc be seize be self- be separ be share be share be short be store be swapp be taken be the o be the p be treat be under be under be used be used be used Because Because be used. be used. because because because because because because become l becomes becomes becomes becomes~ bed abov bed belo bed for bed for bed in m bed whic bed. Al bed. Co bed. Ea bed. Th bed. Th bed.~~~ been cha been loc beenA  u /  v "9 Qcked to cked.~~~ ckground cking th cks (I-n cks 103~ cks 231 cks 236 cks 236 cks 403, cks acco cks and cks are cks are cks are~ cks are~ cks are~ cks as n cks comp cks cont cks cont cks curr CKS FOR cks impl cks in t cks incr cks incr cks inst cks is~~ cks is~~ cks may cks of 2 cks of a cks of a cks of d cks of f cks of i cks of t cks of t cks of t cks perm cks up t cks whic cks, I-l cks, a l cks, the cks, the cks. An cks. Fi cks. Ma cks.~~~ cks.~~~ cks.~~~ cks; I-n cks~~~ 2 ckup sto ckup stok point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck point ck shoul ck that ck the c ck the c ck the i ck usage ck withi ck, a co ck, and ck. A n ck. For ck.~~~ cked and cked and cked as cked in  if (aflg) { printf("II\n"); nbad = 0; eachi(&pass2); printf("bad: %d\ndup: %d\n", nbad, ndup); } seek(sfo, 0, 3); write(sfo, sblock, 1024); } eachi(f) int (*f)(); { static struct inode buf[16]; int i; struct inode *ip; int pass2(); inumber = 0; for (i=magic2/2; i>0; i--) { seek(sfi, (inumber+32)/16, 3); if (read(sfi,buf,512)!=512) { printf("Read error\n"); exit(); } for(ip=buf; ipw2,w ,@@ @w,w ,HC 7Hw+w +2 b -2wx2wl2 w+w +5 <5% @@ p_@0__H wj+w X+ *5W-AW-Ze W-  @w.+w +5 G G5W-0W-9@owners a owners. ows a da ows a si ows a tr ows as i ows as i ows data ows data ows in a ows the ows the ows the ows the o~~~ 2 o~~~ 3 o~~~ 3 o~~~ 4 o~~~ 5 o~~~ 5 o~~~ 6 o~~~ 6 o~~~ 8 o~~~ 9 o~~~ 9 o~~~ 9 o~~~ 10 o~~~ 10 o~~~ 11 o~~~ 11 o~~~ 12 o~~~ 14 o~~~ 16 o~~~ 17 o~~~ 18 o~~~ 20 o~~~ 20 o~~~ 21 o~~~ 21 o~~~ 21 o~~~ 21 o~~~~~ p 402 of p 404 co p 404 to p 404. p 404. p 404. p 404~~~ p 404~~~ p 406 ar p 406 co p 406, a p 406. p 406.~~ p among p bits cns ed. Mai ed. The ed. The ed. The ed. The ed. The ed. The ed. Thi ed. Thi ed. Use ed. Whe ed.~~~ ed.~~~ ed.~~~ ed.~~~ ed.~~~ ed.~~~ 1 ed.~~~ 1 ed.~~~ 1 ed.~~~ 1 ed.~~~ 1 ed.~~~ 1 ed.~~~ 2 eded for eded to eded.~~~ edetermi edetermi edetermi ediate a edicated edicated edicated edly com edly upd eds the eds the eds. It educe th educes t edures f edure~~~ ed~~~ 2 ed~~~ 2 ed~~~ 2 ed~~~ 3 ed~~~ 3 ed~~~ 3 ed~~~ 6 ed~~~ 11 ed~~~ 13 ed~~~ 18 ee and~~ ee begin ee block ee block ee blu multaneou multaneou multaneou multaneou multiprog mum file mum file~ mum of ei mum size must acce must be e must be g must be p must be t must be u must be~~ must coor must deal must firs must now must prop mutiliate my use th m~~~ 3 m~~~ 6 m~~~ 9 m~~~ 13 m~~~ 16 m~~~ 17 m~~~ 18 m~~~~~ n n n n n n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n 1-1-2~~ n/nas"; break; } else { passa: t = copy(argv[i]); if(getsuf(t)=='c') { clist[nc++] = t; t = setsuf(copy(t), 'o'); } if (nodup(llist, t)) llist[nl++] = t; } } if(nc==0) goto nocom; if (pflag==0) { tmp0 = copy("/tmp/ctm0a"); while((c=open(tmp0, 0))>=0) { close(c); tmp0[9]++; } while((creat(tmp0, 0400))<0) tmp0[9]++; } signal(2, &dexit); (tmp1 = copy(tmp0))[8] = '1'; (tmp2 = copy(tmp0))[8] = '2'; (tmp3 = copy(tmp0))[8] = '3'; (tmp4 = copy(tmp0)) o count o create o create o create o curren o data f o data f o data f o data f o data f o data f o data~~ o dedica o direct o direct o direct o distin o each I o end at o errors o figure o file s o file s o files o files o files o find e o find p o fix th o form a o I-list o I-node o I-node o I-numb o gives o hardwa o have I o have m o have t o have~~ o identi o incons o indepe o indica o indica o indica o indire o indire o intere o levels o levels o link t o locate o locate o locate o locate o locat Ff) T(5W-AW-Ze W-  @Ff5 ^E ZE5W-0W-9@5  AWp Ameu@Ff&E55555555555 5W-. W- W-0W-9 $;  _,*;  _,2;  6;  :;  >;  ^@e@e&@e&@e& e@;  B;  @e@e&@e&@e& eD;  5 ion poi ation sho ation sho ation to ation was ation wor ation, a ation, al ation, al ation, st ation, th ation, th ation, th ation,~~~ ation,~~~ ation. T ation. T ation. W ations fo ations to ations wi ations wi ations. ations.~~ ationship ation~~~ ation~~~ ation~~~ ation~~~ ative, a atively c atively, atively, ative~~~ atly simp atly~~~ 1 atment gi atment of atment of atment~~~ ator 234 ator 239 ator 239 ats showi attempt~~ atum givi atus and at~~~ 3 ault dire ault dire ault dire aultmain() { char c; extern fin,fout; fin = open("qwer",0); fout = creat("asdf",0666); while(c = getchar()) { if(c == ' ') putchar('\n'); else putchar(c); } flush(); exit(); } sort f01 f01 sort f11 f11 sort f21 f21 sort f31 f31 sort f41 f41 sort f51 f51 sort f61 f61 sort f71 f71 f("table adr = %o\n", table ) ; if( table == bt ) { printf("table is io buffers\n");goto ret;} if(table == ackmes){printf("table is ack\n"); goto ret ; } if(table == iot ) {printf("table is iot\n"); goto ret ; } printf( "allocb %d units from adr = %o\n", n, ba ) ; printf("area index = %d\n", table[-3] ) ; printf("cacms = %o\n", cacms) ; printf("ciotp = %o\n", ciotp) ; printf("free areas\n"); printf("in use areas\n") ; printf("rng = %d frecnt = %dt ; niucnt = toterr = rngcnt = frecnt = 0 ; tpb common.c _ char *tks 0177560 ; char *tps 0177564 ; int *tkb 0177562 ; int *tpb 0177566 ; getput.c putchar *tpb = ch[i++] ; } *tpb = c | 0200 ; extern char *tps, *tpb ; syinit.c syinit extern int *tks, *tkb, *tps, *tpb ; tpb = 0177566 ; tps common.c _ char *tks 0177560 ; char *tps 0177564 ; int *tkb 0177562 ; int *tpb 0177566 ; getput.c putchar { while( *tps >= 0 ) ; extern char *tps, *tpb ; while( tps[0] >= 0 ) ; snd wh r appara r Art r area 5 r area 5 r areas r areas r areas. r are~~~ r art FI r art ar r art fi r art fi r art ge r art me r art me r art ro r art su r art sy r art, d r art. r art. r art~~~ r as a d r a~~~ r backup r block r block r block r block. r blocks r blocks r blocks r blocks r blocks r blocks r blocks r blocks r blocks r both. r both~~ r by lin r corres r creati r data f r data f r data f r data f r data f r data f r data~~ r data~~ r defaul r defaul r descri r direct r direct r ~@AA,:up,:@0,:^AWpAAmAVCpACmÜVw`\4@AWpAAmAVw`B4@97`84@_@ _ _ _  @@A@@A@@@0,:@p$: _@e7   @ 59 @,:t [RRNJJwH<@@7 >7 5  xPb4 #  x:2*z@ wFw 4  5 5a~~~ 10 a~~~ 11 a~~~ 11 a~~~ 11 a~~~ 12 a~~~ 12 a~~~ 14 a~~~ 14 a~~~ 14 a~~~ 15 a~~~ 16 a~~~ 17 a~~~ 18 a~~~ 19 a~~~ 19 a~~~ 20 a~~~ 20 a~~~ 20 a~~~ 21 a~~~~~ a~~~~~ a~~~~~ b-~~~ 21 backs~~~ backup st backup st backup st bdirector bdirector bdirector be a full be anothe be a~~~ 1 be better be broadl be checke be comple be consid be contai be create be dedica be descri be descri be descri be erroro be exerci be functi be given be given be given be greatl ber root dir root dir root dir root dir ROOT" is ROOT.USE root dir root dir root I-n root~~~ root~~~ root~~~~ roper fo roper na roper na roperly roperly roperly ropriate ropriate ror and ror,~~~ ror. Fu ror.~~~ ror.~~~~ roronous rors in rors in rors in~ rors mus rors now rors occ rors occ rors. T ror~~~ 1 rough 14 rough 18 rough 20 rough 23 rough 24 rough 25 rough a rough al rough an rough a~ rough bu rough di rough di rough di rough th rough th rough th rough~~~ rough~~~ round routine routinepeat- edly. Another frustration was the unreliability of the hardware on which the big operating systems were supposed to run. Conse- quently the "computer utility", in the sense discussed in the middle 60's, has not arrived. It is true that the best modern computation centers now combine efficient batch service with moderately sophisticated interactive computing and with remote access by minicomputers; but the goals are less ambitious than they were in 1966, and ther 5-_06-@_06- 5-_06-@ff .8%_:6` `U%a `U%_:6(a `U5 \e@-A mDAup@ m2 f4a `U% _:6Da `U z=% W _06@ @#̰̾a    x4444444444_06W _:6 =% `_:6WuWf_4_06-><Ra `U_:6-*(ha `U_:6-5 @ 5 www   w-  _`  @ww |x r l5db@wXResign t = %d depth = %d depth = %d Illegal move Black to move White to move resignsaverestorerandrand = %d playresign firstpictinputwinputbinputprincmovenot able to back up incdepth = %d decdepth = %d removenot able to back up / mateno mate matflgmatflg = %d hint %d statd~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=d}z|y~{xwtqnkhebvspmjgdaurolifc`_\YVSPMJ^[XUROLI]ZWTQNKHGDA>;852FC@ach blo each con each dat each dat Each dir Each dir each dir each dir Each I-n Each I-n each I-n each I-n each I-n each I-n each dir Each fil each I-n each fil each I-n each ind each of each of each tim Each use each use each use each~~~ each~~~ ead and ead and ead are~ ead at a ead beyo ead by t ead cont ead from ead in u ead in, ead in,~ ead in. ead in. ead into ead into ead of t ead of~~ ead oper ead or w ead or w ead or~~ ead or~~ ead the ead" fas ead, dat ead/writ eading a eading a eading a )9))9yy))9)n multip n names n nine p n no lon n no phy n not sh n of a h n of a s n of all n of an n of dat n of dir n of fil n of I-n n of ind n of ind n of the n of the n of the n of the n of the n of the n of the n of the n of the n of the n of the n of the n of the n of the n of the n of whi n of~~~ n on dis n on sto n on the n one di n one or n one or n one us n only b n open f n open f n open f n open f n open f n open f n open f n order n order n other n out on n out on n part f n physic n physic n physicdX L!B R9p^ a \][  4 & _l)  j( f  %VU a @|+  I+^XH O S Z KK` ݯlZq? U~ Z))CF)ccG  ԯ Z dire 2 ast modi 3 at a kno 2 at a~~~ 3 at FIG. 2 at file 2 at is, t 5 at locat 2 at the b 2 at the I 2 At the o 2 at the d 4 at the~~ 32 ata bloc 66 ata file 4 ata layo 2 ata stor 3 atable b 2 atable s 4 ata~~~ 5 ata~~~ 1 3 ate dire 2 ate I-no 6 ate the 3 ated and 4 ated by 2 ated dat 2 ated I-n 2 ated for 3 ated fro 6 ated in 5 ated to 2 ated wit 2 ated, an 2 ated~~~ 2 ates tha 3 ate~~~ 1 |w       ww N N ww hw-  7 vrn h2 `\ %d@e&F %7 <5 @ @a@ @a5,@ @a7 eN ww @ N N  7ww 7 7 ww  7~z t p jwfw b@@ @wHw D>C 7&ww met r art met r art roo r art suf r art sys r art, di r art. A r art. I r art~~~ r as a da r a~~~ 9 r backup r block ( r block 2 r block i r block. r blocks r blocks r blocks r blocks r blocks r blocks r blocks r blocks, r blocks. r both. r both~~~ r by link r corresp r creatin r data fi r data fi r data fi r data fi r data fi r data fi r data~~~ r data~~~ r default r default r describ r directl r directo r directo r directo r directo r directo r directo r directo r directo r directo r direct @ @ @e=ׯ/  N f > ww  5%1 W-8@e=G@4Nf > @2Nf > @@=   bkntqr ww A ru@t5@5W- W-@5N 5W- 5 5W- Nf  Nf  Nf  Nf   w_maxply _attab _pvbuf _pvp _ispawn _isknig _isdiag _isrigh _check"rsave L2$_wattack L1<_battack rretrn _agen"@L10000V_bagen L10001^_wagen L3^_gmove"bL5_use L6L7_seek _read L8L9L11L10_move" L4L13_done"L12JL140_bmove L158_wmove _gremove"N_remove as $1.s reloc a.out 60000 mv a.out $1.o ju i< 4_ ^ 5  t i g J *   " Ny {  G1 t  07 ;   y  Q ~ ; 5> Ns ' R q lP- O x vlkL earing~~ early se ears at ears in eas 503 eas as n eas may eas not~ eas rese eas. Sy ease of eases~~~ easily a easing d easing t easons f eassigne east one eat deal eat erro eate a n eate add eated by eated by eated fi eated in eated th eated to eated, I eatedly eatedly eated~~~ eate~~~ eating a eating a eating f eation, eation. eatly si eatly~~~ eatment eatment eatment eatment~ ebugging eby made eby poin ecause a ecause d ecause d ecause i ecause m ecause o ecause s ecause t ecaution ecessarniz record 5 record 5 rect blo rect blo rect err RECT POI rect poi rect poi rect poi rect poi rect poi rect poi rect poi rect poi rect poi rect poi rect poi rect poi rect sto rectly t rectly w rectly~~ rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rectorie rect L m >@h~z  p [ 3?v d .b ; 50xj Y A .4 es creat es direc es do no es exist es expec es file es fille es for b es for c es for d es for e es for f es for f es for h es for m es for u es for w es forme es for~~ es for~~ es found es havin es havin es in I- es in a es in ac es in co es in pr es in th es in th es in th es in th es in th es indic es indic es indic es into es into es is ef es is ge es is pe es is to es is~~~ es is~~~ es it th es its p es makin es may b es may b es may b es may h es may r es must es must es must es must es musts b ctories c ctories d ctories i ctories m ctories m ctories m ctories o ctories r ctories t ctories t ctories t ctories w ctories, ctories, ctories, ctories-- ctories. ctories. ctories. ctories. ctories. ctories. ctories. ctories.~ ctories;~ ctories~~ ctories~~ ctory 101 ctory 101 ctory 101 ctory 110 ctory 110 ctory 110 ctory 110 ctory 112 ctory 112 ctory 112 ctory 112 ctory 112 ctory 112 ctory 112 ctory 112 ctory 120 ctory 120 ctory 120 ctory 303 ctory 303 ctory I-n ctory I-n ctory I-n ctory I-cke e checke e class e comple e comple e comple e comput e comput e concer e consid e consis e consis e contai e contai e contai e contai e contai e contai e contai e conten e conten e conten e conten e conten e conten e conten e conten e conten e conten e conten e conten e conven e corres e corres e corres e create e create e creati e creati e curren e curren e curren e curren e curren e curren e curren e curren e curren e curren e data a e data a e data b e data b e data b e data b e data b e data b e da/ ; syinit.c syinit char *mtcr, *dkcr, *ccsr ; dkc=dkcr= 0177404; dkcr = dkc ; dkda common.c _ int *dkc d4; int *dkwc d5; int *dkma d6; int *dkda d7; int *dker d8; int *dkds d9; dkdspy.c dkdspy case 3: *dkda = n[3] ; *dkc, *dkwc, *dkma, *dkda, *dker, *dkds ) ; extern int *dkc, *dkwc, *dkma, *dkda ; dkstat.c dkstat *dkc, *dkds, *dker, *dkda ) ; *dkc, *dkds, *dker, *dkda ) ; unit =( * dkda & 0160000 ) >> 13 ; undL83R_out L84ZL85L86L87L88L89L90L91L92L93_statc L94L95L96L97_score _algin">L98L21:_stdin L99.L100_cooin"pL102^L101lL10009L104L103L10010L105L107L108 L109L106L100112_bagen L100126_wagen L111n_check spsw,_pswtmp _respsw: mov _pswtmp,*$177776 rts pc reboot.s1+ .globl _reboot / / this routine branches into the second instruction / of the rom (read only memory) pdp bootstrap / loader. it does not read the console switches and / boots from disk. / _reboot: mov $177406,r1 jmp *$173104 / rom bootstrap loader zzzz.ss2+..globl _edata,_end .data _edata: .bss _end:  e~~~ 5 e~~~ 5 e~~~ 5 e~~~ 5 e~~~ 6 e~~~ 6 e~~~ 6 e~~~ 6 e~~~ 6 e~~~ 6 e~~~ 6 e~~~ 7 e~~~ 7 e~~~ 7 e~~~ 7 e~~~ 7 e~~~ 7 e~~~ 7 e~~~ 7 e~~~ 7 e~~~ 7 e~~~ 7 e~~~ 8 e~~~ 8 e~~~ 8 e~~~ 8 e~~~ 8 e~~~ 8 e~~~ 8 e~~~ 8 e~~~ 8 e~~~ 9 e~~~ 9 e~~~ 9 e~~~ 9 e~~~ 9 e~~~ 9 e~~~ 10 e~~~ 10 e~~~ 10 e~~~ 10 e~~~ 10 e~~~ 10 e~~~ 10 e~~~ 11 e~~~ 11 e~~~ 11 e~~~ 11 e~~~ 11 e~~~ 12 e~~~ 12 e~~~ 12 e~~~ 12 e~~~ 12 e~~~ 12 e~~~ 13 e~~~ 13n int *ackq, *ackmes, *iot ; gq(ackq) ; if(( idx = testq(ackq)) == 0 ) goto ret ; /* no items in q */ syinit.c syinit ackq = initq( &qa[ql] , ql ) ; extern int *sycroq, *ackq, *mtq, *dkq, qa[] ; allocb allb.c allocb allocb(n,bt) int bt[] ; { bfdspy.c bfdspy ba = allocb(n, table) ; ccbeg.c ccbeg if((ackp = allocb(1,ackmes) ) == 0 ) goto er1 ; commd.c commd iotp[8] = allocb( fcp[5], bt ) ; iotp[8] = allocb( fcp[5], bt ) ; fcp[3] = allocb(n,bt) ; m); v = minmax(beta, alpha, lev); remove(); if(v > alpha) { alpha = v; use(pv, m); if(alpha >= beta) break; } } lmp = p2; f1: pvp = pv; return(alpha); } double minqui(alpha, beta, lev) double alpha, beta; int lev; { double v; int m; register *pv, *p1, *p2; pv = pvp; *pvp++ = 0; m = check(); v = valuep*10 + valueb; if(v= mlev) { if(m) v =+ 1000.0; alpha = v; goto f1; } lev++; p1 = lmp; if(m 421 an 421~~~ 423 is 423 st 423.~~ 424 is 424~~~ 424~~~ 425 co 426 (F 426 co 426 of 426 of 426 of 426 of 4A and 4A sho 4A, I- 4A. A 4B and 4B sho 4C sho 4C) is 4C). 4C)~~~ 5 5 5 5 (FI 5 all 5 arr 5 con 5 dat 5 des 5 fil 5 imp 5 in 5 inv 5 or 5 thr 5 to 5 is a 5 show 5.~~~ 501 an 501 ar 501 il 501 wh 502 ac 502 is 502 of 502. 503 an 503 is 504 an 504 co 505 co 505 co 505 is 505. 506 al 506 is 506 is 506 is ble = ackmes ; if( table == ackmes ) cacms = ba ; /* update current ackmes pter */ if(table == ackmes){printf("table is ack\n"); goto ret ; } extern int *bt, bufara[], *ackmes, ackara[] ; ccbeg.c ccbeg extern int ackq, ackmes ; if((ackp = allocb(1,ackmes) ) == 0 ) goto er1 ; common.c _ int *cacms;int *ackmes; snack.c snack deallb(idx, 1, ackmes ) ; extern int *ackq, *ackmes, *iot ; while( i < ackmes[-2] ) printf(" %o",idx[i++]) ; syinit.c syinit ackmes = initb( ackaointers~ ointers~ ointers~ ointers~ ointers~ ointers~ OINTER~ ointer~~ ointer~~ ointer~~ ointer~~ ointing ointing ointing ointing ointing ointing ointing ointing~ oints to oints to oints to oint~~~ ok ahead okup.~~~ ol bit 4 ol bits olating ole is l ole of I olic fil olic fil olic nam olic nam olic nam olic nam olic nam olic nam olic nam olic nam olic nam olic nam olic nea olidatio olume 50 olume 50 olume 50 olume 50 olume ac olume an olume ar olume at olume co olume in olume of olume so olume sts illus as illus as illus as indic as just~ as listi as may s as neces as neces as neces as neede as not~~ as part As physi as physi as physi as physi as reser As seque as set f as shown as the I as the I as the I as to da as well as will as. Sys ase a us ase of f ase the ases~~~ ashion t ashion. ashion.~ ashion.~ asily an asing da asing th asion ar asons fo ass of f assed be assigned associat associat associat assumed assure t assure t assure t assure t assure t assure~~ ass~~~ ast dire ast dire  ry entry ry entry ry entry ry entry ry entry ry entry ry file ry file ry file ry file ry file ry file ry file ry file ry file ry file ry file ry file ry file ry file ry file ry file ry file ry file. ry file. ry file. ry file; ry files ry files ry files ry files ry files ry files ry files ry files ry files ry files ry files ry files ry for d ry for t ry for~~ ry havin ry I-nod ry I-nod ry I-num ry I-num ry hiera ry hiera ry hiera ry in a ry in di ry in op ry in op ry in th ry in th ry is d nt ny prior ny such ny valid nym dire nym dire nym dire nym entr nym for nym for nym is e nym is p nym, a s nym, the nym. A~ nym. Th ny~~~ 2 ny~~~ 18 ny~~~ 19 ny~~~ 19 nzero~~~ n~~~ 2 n~~~ 3 n~~~ 4 n~~~ 4 n~~~ 5 n~~~ 5 n~~~ 5 n~~~ 6 n~~~ 6 n~~~ 8 n~~~ 8 n~~~ 9 n~~~ 9 n~~~ 9 n~~~ 9 n~~~ 10 n~~~ 11 n~~~ 12 n~~~ 12 n~~~ 13 n~~~ 14 n~~~ 14 n~~~ 15 n~~~ 16 n~~~ 16 n~~~ 17 n~~~ 18 n~~~ 18 n~~~ 18 n~~~ 19 n~~~ 20 n~~~ 20 n~~~~~ n~~~~~  re data re denie re descr re detai re direc re elimi re equal re examp re files re flow re flow re flow re free. re I-nod re gener re invol re is ve re less re lose re lost re made re made re maint re marke re modif re must re must re neede re not c re not g re now c re now m re of a re of di re or pr re parti re perfo re physi re physi re physi re popul re provi re read re read re repea re requi re searc re secon re set t re sever re shoul re shoul re shown re subro re syste re takes re than access access access access access access access access access access access access access accord accord accord accoun accoun action activi actual actual additi additi additi additi addres addres adjunc admini admini admini admini admini agains all da All I- all it all mo all of all of all of all of all of all ph all po all po all~~~ along along also h also~~ altern among amy us an add an add an adj an alt an arr an ent an exa an I-n An ind  - - - - - - - - - - A A A Ad Al Al An As At At Ca Ca Ca Ca Ca Ca Ca Ca Ca Ca Ca Ca Ca Ca Ca Ca FI FI FI FI FI FI FI FI In In Lo No Ph Sy Th Th Th Th Th Wh Wh Wh Wh Wh Wo - 1 - 1 - 1 e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e directo e each~~~ e elimina e embodim e end of e end of e entries e entry i e entry~~ e equal a e erroron e errors e errors. e example e excepti e exercis e extensi e file A. e file an e file as e file at e file da e file da e file fo e file in e file in e file in e  the va the vo the vo the vo their their themse themse themse themse then m There thereb theref theref These these they c they d they h they h they r The~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ the~~~ This l the~~~ the~~~ the~~~ This a this a this f This g This i This l this l This r this p This~~ this~~ those those throug throug throug throug  in the d in the d in the d in the d in the d in the d in the d in the d in usi d in, an d in,~~~ d in. T d in. T d indexi d indica d indice d indire d into b d into~~ d into~~ d in~~~ d in~~~~ d is inc d is pro d is the d its I- d its I- d its co d its I- d known d length d length d length d length d level d locati d locati d lost f d mainta d mainte d makes d manipu d many o d match d may~~~ d may~~~ d method d more~~ d name, d nonown d not a d obtain d of acc d of dir d of fil d of fil d of the d/ putw/putc -- write words/characters on output file / / fcreat -- create an output file for use by put(w|c) / / calling sequences -- / / mov $filename,r0 / jsr r5,fcreat; ioptr / / on return ioptr is set up for use by put or error / bit is set if file could not be created. / / mov(b) thing,r0 / jsr r5,put(w|c)1; ioptr / / the character or word is written out. / / jsr r5,flush; ioptr / / the buffer is fled. / .globl putc, putw, flush, fcreat fcreat: mov r1,-(sp) mov (r5)+,r1 mov r0,0f sys c cmp r0,$1 beq phigh / here return same priority jmp ret phigh: mov _reg+12.,r0 / get old stack pter add $2,r0 / get psw word mov (r0),r1 bic $!0340,r1 / have old priority mov r1,_pswold bis $0340,(r0) / set psw priority high ret: jsr pc,resreg / restore regs mov _reg+12.,sp / set stack rti / interrupt return / / / internal sub to store regs ( not sp ) streg: mov r0,_reg mov $_reg+2,r0 /* C command */ char *tmp0; char *tmp1; char *tmp2; char *tmp3; char *tmp4; char ts[1000]; char *tsp ts; char *av[50]; char *clist[50]; char *llist[50]; int instring; int pflag; int cflag; int *ibuf; int *ibuf1; int *ibuf2; int *obuf; char *lp; char *line; int lineno; int exfail; struct symtab ( char name[8]; char *value; ) *symtab; int symsiz 200; struct symtab *defloc; struct symtab *incloc; char *stringbuf; char *pass0 "/lib/c0"; char *pass1 "/lib/c1"; char *assem "/bin/as"; char *pref "/lib/crt0.o";  21 lo 21 ma 21 ma 21 ph 21 st 21 su 21 to 210 de 210 is 210 to 210. 211 to 211. 212 wh 21A th 23 are 24 thr 256 wo 25B ar 26A an 26B ar 2A is~ 2A sho 2A, 2B 2B, 2C 2C sho 3 3 3 and 3 det 3 dir 3 dir 3 dir 3 dir 3 dis 3 fou 3 if 3 loc 3 of 3 pse 3 spe 3 sys 3 the 3 whi 3 -~~~ 3A, 3B 3B and 3C sho 4 4 4 4 ana 4 Det 4 app 4 con 4 fil 4 gua 4 I-l 4 los 4 pos 4 pri 4 pro 4 ret 4 spe IYxYYY99YYI(I8Xh9_fault _xlev le. a file. a file. a file. a file. a file. a files a a files a a files a a files b a files f a files s a files t a files, a files, a files. a files. a files. a files. a files. a files. a files.~ a files.~ a files;~ a file~~~ a file~~~ a file~~~ a file~~~ a file~~~ a first u a first u a first~~ a flag in a form of a full pa a full pa a hierarc a hierarc a in mult a is then a known a a known p a known s a large n a large~~ a layout a layout a layout a layout a lengthy a link ma a link FIG. FIG. FIG. FIG. FIG. FIG. FIG. FIG. File File ended entry entry erron examp expec FIG. FIG. FIG. FIGS. file file file file file file file file file, files files Fixed Fixed For e For~~ Free Free Free Gener first first flagg for r found given givin I-nod I-nod I-nod I-nod I-nod I-num If th If th hiera hiera I-lis I-lis I-lis I-lis I-nod I-nod I-nod I-nod grams wh grams wh grams wh grams wh grams wh grams, s grams, t grams~~~ grams~~~ grams~~~ grams~~~ grams~~~ gram~~~ great de greatly greatly~ gree of grity ch grity of grity of grity of ground GS. 15A GS. 19A GS. 1A, GS. 1A, GS. 21A GS. 24 t GS. 26A GS. 2A, GS. 3A, GS. 4A, GS. 7 th GS.~~~ gs are~~ GS. 7~~~ gth data gth I-no gth I-no gth inpu gth of t gth, and gthy pro gth~~~ guarded guish be guish ov guous ar guous li gures, F g~~~ 2 g~~~ 3 g~~~ 3 g~~~ 4 g~~~ 4 g~~~ 5 g~~~ 6  - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 3 - 3 - 3 A d A p A s Adm Alt Alt An As At At Can Can Can Can Can Can Can Can Can Can Can Can Can Can Can Can FIG FIG FIG FIG FIG FIG FIG FIG In Inf Loc No Phy Sys The The The The The Whe Whe Whe Whe Whe Wor  6 iles an 6 ditiona 7 ention 7 set to 6 ted in 6 on poin 6 ile sys 6 dificat 7 entific 7 read i 6 ted by 6 odifica 6 ile siz 6 de~~~ 1 7 ent of 7 point 6 t of th 6 ode map 6 icular 6 depende 7 enerall 7 other 6 t locat 6 o the I 6 hown in 6 default 7 ed~~~ 7 of ind 6 t inven 6 o that 6 hich ma 6 de map 7 ed from 7 necess 6 s~~~ 15 6 o physi 6 he~~~ 2 6 ddition 7 ectory. 7 name o 6 s~~~ 11 6 o data ied, thu ief ield of ield. T ient for ient in ient mai ient ot ient ref ient, fo iented f iented f ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarcha ierarchy ierarchy ierarchy ierarchy ies (lin ies 102 ies 113 ies 204 ies 306 ies 528 ies a ma ies also ies and ies and ies and ies appe ies are ies are ies are ies are ies are ies are ies are  ies are ies are~ ies as w ies by t ies comp ies cont ies cont ies do n ies havi ies havi ies in p ies indi ies indi ies indi ies is t ies maki ies may ies must ies must ies of~~ ies poin ies poin ies refe ies to a ies to b ies to f ies to~~ ies whic ies, but ies, use ies, whi ies-- to ies. As ies. At ies. Fo ies. I- ies. On ies. Su ies. Th ies. Th ies.~~~ ies.~~~ ies.~~~ ies;~~~ ies~~~ ies~~~ ies~~~ 1 ies~~~ 1 ieval by ieval, d ieve the ieving v iew of t iew take if I-nod If the r If the~ single single single size, so nam so tha so tha so tha so tha some d some r so~~~ space specia specia specia specia specia specia specia specia specia specia spectr starti starti STORAG starti storag storag storag storag storag storag storag storag storag storag storag storag storag storag storag storag storag storag storag storag storag storag storag storag storag storag stored stored stored stored stored stored stored stored stored stored bheur.obook.obplay.odata.odraw.oinit.oinput.omater.oplay.oprinc.osavres.oscore.ostat.ostdin.owheur.owplay.ol.outzatt.oybgen.oxbmove.owctrl.ovqsort.ouwgen.otwmove.oa.outl.outa.outirec ot disti ot gener ot I-nod ot inter OT" is a OT.USER1 ot lost ot permi ot pract ot provi ot set i ot shown ot stric ot to lo otal dir otal num oth entr oth. Ne other di other di other di other er other fa other fi other mi other op other se other us other us other. other. other~~~ other~~~ oth~~~ ot~~~ 2 ot~~~ 3 ot~~~ 5 ot~~~~~ ouble ar ouble ch ough 14B ough 18 ough 20 ough 23 ough 24 ough 25B ough a n ough all ough any ough a~~ ough buf ough dir ough dir ough dir ough not ough the ougical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physical physicall physical~ physical~ physical~ physical~ physical~ physical~ physical~ pical of pid acces pid acces pid index ping trac place, th placed in placed in placing i ple an ; #b wQp I )IxI 9)IIIr_wplay L47L48,L494L50L51:L52_draw L53@L54_input L55FL56L57NL58L59VL60_princ L61\L62ZL63>L64bL10007NL10008RL65xL66|L67|L68L69L70L71L72L73L74L75L76L77L78L79L80_putchar L81L82 _"e u@ 03";5m@;5 @x< _"e u@ 03";5m@;5@< :e  L= @m; e5  @;4< 5 @;4< ww . !  !  !  J& "C>9 !  !  !  J& u@Juw-~$eN , !  =% e}cacms = %o\n", cacms) ; extern int *iot, iotta[], *ciotp, ef[], *cacms ; ccdspy.c ccdspy extern int selmes[], fct[], *ccs, *cco, *cci, *cacms, ef[] ; common.c _ int *cacms;int *ackmes; ccbeg ccbeg.c ccbeg ccbeg(mess,len,iotp) int mess[] ; { ccdspy.c ccdspy flag = ccbeg(mess,6,iotp) ; ccih.c ccih ccbeg(outmes, 6, 0 ) ; commd.c commd ccbeg( ac, 6, 0 ) ; ccbeg( ac, 6, 0 ) ; ccbeg( ac, 6, 0 ) ; dkih.c dkih ackqed = ccbeg( ac, 6, ac[6] ) ; mtih.c mtih ackqed = ccbeg(a2,bfr+2(r1) blo 2b 3: mov r0,ptr(r1) mov (sp)+,r2 rts pc 1: mov ptr(r1),r0 sub bfr(r1),r0 mov r0,9f mov bfr(r1),0f mov f(r1),r0 sys write; 0:..; 9:.. mov bfr(r1),ptr(r1) rts pc / tab: .byte 16,16,16,16,16,16,16,16 .byte 16,16,16,16,16,16,16,16 .byte 16,16,16,16,16,16,16,16 .byte 16,16,16,16,16,16,16,16 .byte 14,16,16,16,16,16,16,16 .byte 16,16,16,16,16,16,16,16 .byte 16,16,16,16,16,16,16,16 .byte 16,16,16,16,16,16,16,16 .byte 16, 0, 0, 0, 0, 2, 2, 4 .byte 4, 4, 4, 4, 6, 6, 6,10 .bytees a sim es acces es all p es also es among es an in es and a es and d es and d es and d es and I es and e es and e es and f es and i es and s es and t es and t es and~~ es appea es appea es are a es are a es are a es are a es are c es are f es are i es are m es are n es are n es are p es are p es are p es are r es are s es are s es are t es are t es are~~ es are~~ es as ac es as we es at a es becom es begin es begin es by na es by sy es by th es by th es by~~~ es by~~~ es compl es conta es conta es conta locati locati locati locati locati locati locati locati locati locati locati locati locati locati longer made a made a made i made~~ made~~ mainte mainte mainte makes manner manner manner manner map 40 map 40 map 40 map 40 map 40 map 40 map 40 map 40 map 40 map bi map bi marked marked marked marked maximu maximu maximu maximu may ac may ac may al may be may be may be may be may be may be may ha may in may re may si may th memory memory memory  Nf f Z%@ 5 7r5` @ 5 7r5 ww @  5@  @5T fn %N@e&X %5 u-9 N@ @a& 4 N@ @a& 4 N@ @a& 4 N@ @a& 4 ww A 7r@m5W-NE @tE ww @@  | @ W- W-@e w2 . . /dev/vt0cannot open c1 common.c_ c1; c2; c3; c1 common.c_ char *mtcr m2; char *dkcr d4; char *ccsr c1; c1 common.c_ int *ccs c1; int *cco c2; int *cci c3; c1 dspydr.cmain ccs = ccsr = &c1 ; c1 dspydr.cmain extern c1,c2,c3,d1,d2,d3; c1 syinit.csyinit ccs = ccsr = &c1 ; c1 syinit.csyinit extern c1, c2, c3, d1, d2, d3 ; c2 common.c_ c1; c2; c3; c2 common.c_ int *ccs c1; int *cco c2; int *cci c3; c2 dspydr.cmain cco = &c2 ; c2 dspydr.cmain extern c1,c2,c3,d1,d2,d3; c2 syinit.csyinit  system system system system system system system system taken~ techni termed than a than o that a that a that b that f that f that i that i that s that t that t that t that w the the the the the the __ the ac the ad the ad the ar the bl the bl the cl the co the co the co the co the da the da the da the da the da the da the de the di the di the di the di The fi the em The fi The fi the fi the fi the fi the fi the fi the fi the fi  ng dicating dicating dicating dicating dicating~ dicating~ dication, dicator 2 dicator 2 dicator 2 dices int different different different different different different different difficult difficult dificatio dificatio dificatio dificatio dificatio dificatio dified, c dified, t digital c digital c diment diment of diment, a dinate ac ding a da ding an a ding and ding and ding and ding an~~ ding a~~~ ding bit ding bit ding bloc ding disk ding file ding in a ding its ding on t ding or w ding or w ding or w ding othe ding pseu ding succ ding the~ ding thro ding to a ding to p ding to t ding to t ding to t ding to t ding to t ding to~~ ding~~~ ding~~~ 1 ding~~~~~ direct bl direct bl direct po direct po direct po direct po direct po direct po direct po direct po direct po direct po direct po direct po direct st directly directly directly~ directori directori directori directori directori directori directori directori directori directori directori directori directori directori directori directori g. D ring. I Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- ring; an ring~~~ ring~~~ ring~~~ riodical riods fo rior Art rior art rior art rior art rior art rior art rior art rior art rior art rior art rior art rior art rior art rior art rior art rious pr rious se ription ription ription rise in rises.~~ Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- Ritchie- rising a rising a rising t ristics RiFor file for file for file for file for gene for havi for in p for in t for in~~ for keep for late for main for mani for mani for phys for prov for rapi for read for read for sear for some for symb For the for the for the for the for the for the for the for the for the for thes for the~ for this for thos for use for use for use for user for user for usin for whic for writ for writ for writ for. An fore eli fore los fore, fi fore, re fore, th fore. T form as form a~~ form in form in~ form of ng l naming~ l not be l now be~ l number l of indi l of indi l of the l of the l of the l of the l of the l of the l of the l of the~ l of the~ l of the~ l of the~ l order o l path na l path na l path na l path na l path na l path na l physica l physica l physica l pointin l possibl l primari l provisi l purpose l purpose l reading l set of l storage l storage l storage l storage l storage l system l the num l times. l to have l treatme l unalloc l user da l user re l with a l with an l with n  11 th 12 12 12 12 12 co 12 in 12 of 12 op 12 pe 12 pr 12 st 12 sy 12 Th 12 th 12 th 12 us 12 Wh 13 ar 13 bl 13 by 13 FI 13 co 13 FI 13 fi 13 hi 13 is 13 la 13 ob 13 re 13 Th 13 st 13 sy 13 to 13 wi 14 14 14 14 "A 14 al 14 al 14 an 14 ar 14 bl 14 bl 14 bl 14 fi 14 nu 14 Th 14 se 14 th 14 wr 15 15 be 15 bu 15 cu 15 de 15 en 15 fi 15 fl 15 fo 15 mu 15 nu 15 po  1 I-n 1 dir 1 I-n 1 in 1 int 1 loc 1 sto 1 tha 1 the 1 tra 1 tra 1 in F 1, and 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1-1-2~ 1. FI 1. To 10 10 10 "R 10 8 10 at 10 br 10 de 10 I- 10 di 10 du 10 I- 10 is 10 no 10 nu 10 si 10 th 10 wi 11 11 "d 11 ac 11 an 11 co 11 De 11 di 11 ea 11 fi 11 fi 11 li 11 nu 11 of 11 on 11 sh 11 st 10 r~~~ 11 r~~~ 11 r~~~ 11 r~~~ 12 r~~~ 13 r~~~ 13 r~~~ 13 r~~~ 14 r~~~ 16 r~~~ 16 r~~~ 17 r~~~ 17 r~~~ 18 r~~~ 18 r~~~ 18 r~~~ 19 r~~~ 19 r~~~ 20 r~~~ 20 r~~~ 20 r~~~~~    7 32  xV>JJX  3 7 v_ 0\h V2\ PqP7B ~E4> p;E&7 E x >  |7 |7 :  Z7 P7 e 7  77777 s x j7 <X7 <F3 IyYi L24L25L26ge vo orage wh orage wh orage,~~ orage. orage. orage. orage.~~ orage.~~ orage;~~ ORAGE~~~ orage~~~ orage~~~ orating~ ord 405 ord 407 ord 421~ ord 423 ord 424 ord 424~ ord 425 ord 426 ord 524, ord 524~ ord bloc ord data ord I-no ord phys order of order to order to order~~~ ordinate ording t ording t ording t ording t ords are ords in ords on ords per ords use ords whi ords.~~~ ords~~~ ore comp ore data ore deta ore elim ore lose ore phys ore phys ore seco ore than ore than ore than ore usef org thro 5 he buff 5 e buffe 6 that i 5 ~ 4 5 set of 5 ng the~ 5 he__ 5 e and~~ 6 same f 5 ystems 5 service 5 ndling 5 haring 5 e alloc 6 return 5 ystem i 5 ser.~~~ 5 nding t 5 handlin 5 e___ 6 proper 5 written 5 s. The 5 ndex in 5 h conta 5 ding an 6 possib 5 with~~~ 5 s to re 5 name~~~ 5 grams~~ 5 diagram 6 path n 5 w chart 5 s to fi 5 name "A 5 grams a 5 de~~~ 6 or wri 5 ust be 5 s to da 5 n)Ixyyxxxxxxx9)9I 9IHH Y 2 cess is 12 cess to 3 cessary 2 cessible 2 cetera. 2 ch block 2 ch check 5 ch conta 2 ch data 6 ch direc 2 ch file 2 ch have 2 ch I-nod 6 ch I-nod 2 ch is pe 2 ch is se 4 ch is~~~ 2 ch may b 3 ch of th 2 ch throu 2 ch user 3 ch will 6 chal dir 6 chal fil 6 chal nam 3 chal~~~ 2 changed 2 characte 3 charts s 2 check is 4 check th 5 checked 2 ched in 39 chie-Tho 2 ch~~~ 10 2 ch~~~ 12 2 ciaes must nes whic nes whic nes. As nes.~~~ new data new data new entr new file new file new file new name new user new, sim Newly cr new~~~ next rea ne~~~ 8 ne~~~ 16 ne~~~ 17 nformati nformati nformati nformati nformati nformati nformati nformati nformati nfrequen ng ng a bul ng a dat ng a fal ng a new ng a new ng a non ng a rea ng a sec ng a sma ng a sym ng a wri ng acces ng an ad ng an I- ng an un ng and d ng and f ng and f ng and m ng and t ng and w ng an~~~ ng as sh ng at an ng at an ng a~~~ d with ned with ned with ned with ned, tha ned, the ned,~~~ ned. Th ned. Th ned. Wh ned.~~~ need be need for need for needed f needed t needed.~ needs. nefficie nefit fr nent mod neous ac neous ac neous fi neous st neously neously neously neously neous~~~ ner as a ner iden ner iden ner iden ner prev ner whic neral an neral hi neral hi neral pu neral pu nerally nerally nerally nerally nerally nerally nerally~ ners and ners. W ner~~~ 1 nes for nes for nes for nes for~ nes is g nes may n is~~~ is~~~ is~~~ is~~~~ it app It is it is it is its I- its da its ps its ps itself itself known known known large large large last d layout layout leads leads leads length length less s less~~ level, levels levels levels levels limits linear linkin linkin linkin linkin linkin linkin list ( list ( list ( list i list) list;~ listin locate locate locate locate locate locate locate locate locate locati locati locati locati locati  locati locati logica lookup lose d lose m lost d lost d lost f lost, lost. made i made l made m made m Mainte mainta mainta Mainte Mainte Mainte Mainte mainte mainte mainte mainte mainte mainte mainte mainte mainte mainte mainte mainte mainte mainte mainte make i making manipu manipu manipu manipu many f many o many o many o Many p match matche may be may be may be may be may be may be may be may be may be may be may be may be may be may be   with write writt writt "1" is "A" is "A" is "A" is "A", f "A"~~~ "A.1" "A.1" "curre "defau "free" "full "ROOT" "ROOT. "simpl "USER1 (FIG. (FIG. (FIG. (I-num + 1 in - 17 - - 18 - - 19 - - 20 - - 21 - - 22 - - 23 - - 24 - - 25 - - 26 - - 27 - - 28 - - 29 - - 30 - - 31 - - 32 - -~~~~~ -~~~~~ -~~~~~ -~~~~~ -~~~~~ -~~~~~ -~~~~~ -~~~~~ -~~~~~ -~~~~~ -~~~~~ -~~~~~ -~~~~~ -~~~~~ -~~~~~ -~~~~~ 0 and 0 and 1 an 1 are 1 arr 1 bel 1 dat irect~~ ndividual ndividual ndled by ndling an ndling di ndling is ndling of ndling pr nds at th nds on th nds to fi nds to re nd~~~ 2 nd~~~ 4 nd~~~ 7 nd~~~ 7 nd~~~ 8 nd~~~ 8 nd~~~ 9 nd~~~ 10 nd~~~ 11 nd~~~ 13 nd~~~ 15 nd~~~ 15 nd~~~ 16 nd~~~ 17 nd~~~ 17 nd~~~ 19 nd~~~ 20 nd~~~ 21 nd~~~ 21 ne and on ne anothe ne bit pe ne bit pe ne blocks ne direct ne for ma ne indica ne input/ ne of the ne or mor ne or mor ne or mor ne or mor ne physic ne physic ne point~ ne such b ne the lo ne u sin ated the ated to ated to ated to ated to ated to ated wit ated wit ated, an ated, an ated, I- ated,~~~ ated. A ated. M ated. T ated.~~~ atedly c atedly u ated~~~ ated~~~ ately by ately in ately op ately~~~ ater des ater~~~ ates a s ates tha ates tha ates the ates to ates~~~ ate~~~ ate~~~ 1 ate~~~ 1 ate~~~ 1 ate~~~~~ ath name ath name ath name ath name ath name ath name atical f atical f atical i atical i atically ating a ating a ating a ating an ating an ating an ating de ating fi atil open fil open fil open fil open fil open fil open fil open fil open fil open the open the open the opened a opened a opened f opened, opened. oper for oper nam oper nam operate operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatin operatio operatio operatio operatan while(( i<=(len-1) ) &&( ccs[0] < 0 ) ) *cco = mess[i++] ; cco common.c_ int *ccs c1; int *cco c2; int *cci c3; cco dspydr.cmain cco = 0167772 ; cco dspydr.cmain cco = &c2 ; cco dspydr.cmain extern int *ccs, *cco, *cci ; cco syinit.csyinit cco = &c2 ; cco syinit.csyinit cco = 0167772 ; cco syinit.csyinit extern int *ccs, *cco, *cci ; ccs ccdspy.cccdspy case 0: *ccs = n[0] ; ccs ccdspy.cccdspy /*diag*/printf("(at %o)", Y_ccbeg"rsave L2"L3_printf L4_ackq _testq L5L6._ackmes _allocb L7L8L9TL10~_pq _cctran L1L11 _fatal rretrn  n physic n physic n physic n physic n point n pointe n pointe n pointe n pointe n pointe n pointe n positi n princi n prior n proper n proper n provid n provid n put in n readin n realit n referr n relate n same d n sequen n served n set to n should n shown n some r n starti n storag n system n system n Table n tabula n termed n that f n that v n the ab n the ac n the ar n the bu n the bu n the bu n the co n the co n the cu n the cu n the de n the di n the di n the di n the em n the I- n the I- n the Iated by 4 cated in 4 cated to 3 cates th 2 cate~~~ 2 cating a 7 cating t 2 cating~~ 7 cation 4 10 cation 5 2 cation b 2 cation i 7 cation o 6 cation p 2 cation, 2 cation,~ 3 cations 3 cation~~ 3 cator 23 2 cause di 2 ccess I- 13 ccess to 2 ccess. 2 ccessibl 2 ccomplis 4 ccording 2 ccount f 4 ccurring 3 ce acces 11 ce progr 3 ce to th 2 ceeds th 2 cellaneo 6 cerned w 2 ces for 2 ces may 2 cess I-n e vari ore, fil ore, rea ore, sin ore, the ore. Th ored acc ored at ored at ored at ored at ored beg ored dat ored fil ored in ored in ored in ored in ored in ored on ored on ored on ored. I ored. T ored~~~ ore~~~ ore~~~ ore~~~ ore~~~ 1 oriented oriented ories 20 ories 30 ories al ories an ories an ories an ories ap ories ar ories ar ories ar ories ar ories ar ories ar ories ar ories as ories by ories co ories do ories in ories ma ories ma ories mu ories of ories re ories to ories to oe capac ile conta ile conte ile creat ile data ile data ile data ile data ile data ile data, ile data, ile entri ile forma ile formi ile handl ile has b ile havin ile havin ile in a~ ile in th ile indic ile indic ile indic ile into ile is as ile is de ile is ex ile is ex ile is fi ile is fo ile is op ile is op ile is pr ile is re ile is re ile is se ile is so ile is~~~ ile itsel ile list ile list ile list ile list ile list ile list ile list ile list ile list ile list ile list~ ile list~ ile write, o zero th o zero, t o zero~~~ o, a seco o, thereb o. There o. N + 1 oadly dis oblem of obtained obtains t obtains t obtain~~~ ocatable ocatable ocatable ocatable ocatable ocate I-n ocate I-n ocate roo ocate the ocated I- ocated an ocated an ocated an ocated ar ocated bi ocated da ocated fo ocated fr ocated in ocated in ocated to ocated wi ocated, a ocated,~~ ocated. ocated~~~ ocate~~~ ocating a ocating i ocating t ocating t ocation 4 ocation 4 ocation 4 ocation 4 ocation 4 ocation 5 ocat! "W N   @ &   / e&7 J  j De Ԥ!@eW  8m RW et ZEWue T!eB >5 &     7= ߋpF@E A Ze      @7@ eE "   r t@P ljɋU\` _ \ Y V S P M J ^ [ X U R O L I ] Z W T Q N K H G D A > ; 8 5 2 F C @ = : 7 4 1 E B ? < 9 6 3 0 / , ) & #   . + % "    - * ' ( $ !         ROLIZWTQNKHG]DAP./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abnk -P 3Wk P Zcfi" ?UP 괴|lor" >UP 괴Gu" *-" UP 303" UP ]69<" UP ?@" UP hCF" UP ILO" UP R" UP U" UP mAD" ~UP GJM" }UP P" |UP S" |UP VB" {UP EHKN" zUP QT" yUP WX" yUP [^" xUP &a" xUP rd" wUP g" wUP _jmY\" vUP _be" uUP  hknZ" tUP ]`" sUP c" sUP fi" rUP )lo" qUP ps" qUP v" pUP y" oUP |" lUP >qt" kUP wz" kUP +}" jUP " iUP r" hUP u" gUP x" eUP " dUP r" cUP S" bUP  " aUP " `UP " _UP " ^UP @" ]UP v" \UP " [UP " ZUP " YUP " XUP " WUP b" VUP " UUP 񴴁p" TUP 񴴑<" QUP 񴴁" OUP 񴴁v" NUP 񴴁" MUP 񴴁l" MUP 񴴁" LUP 񴴁T" KUP 𴴁h" KUP 𴴁" JUP 𴴁 " JUP " IUP 𴴁" HUP 𴴁e" HUP 𴴁" GUP 𴴁" GUP 𴴁" FUP 𴴁!" EUP 𴴁" EUP 𴴁" AUP ;" VP خF" VP خ" VP خ," VP خ" VP خ2   " VP خ  " VP خg " VP خ" VP خ" VP خ  " VP خ{" VP خ" !$'*-" VP خ "%(" VP خ+" VP خx. " VP خ #&),/0" VP ׮{369<" UP ׮`?" UP ׮BE14" UP ׮7:=@" UP ׮m"C" UP ׮:LOR" UP ׮U" UP ׮X" UP ׮P[" UP ׮\lor" UP ׮u" UP ̮ehk" UP ̮n" UP ̮" UP ̮}" UP Ʈ" UP Ʈ~" UP Ʈ0P P " UP Ʈ}y" WP  " UP Ʈ " UP ƮC" UP Ʈ" UP ƮA " UP ƮP ,P cP FP Eu$'*-" UP Ʈ%+0) JP -E" UP Ʈ HKN:=" UP Ʈ}@) JP 9 \_beQTW) JP :eZ]`cfRUX) JP :[" UP Ʈ^a) JP -e dghknq" UP Ʈ(t) JP -?C) JP -") JP -) JP -@) JP -+) JP -0 P DP  P 3P [" UP Ʈ9  " UP Ʈ) JP 9) JP 9 !$" UP ŮN') JP 98;>*-" UP Ů03" UP Ůw6" UP Ů9" UP Ů<?" UP Ů>@) JP 9J" UP ŮMPSV" UP Ů BEHKNQT" UP ŮcW) JP 9XP 9P [^" UP <ad" UP gj" UP  mY\_" UP Wb" UP Gehk" UP nZ" UP ]`" UP cfi" UP l" UP Ir" UP Cux{" UP ~" UP 5" UP S" UP "" UP " UP )) JP & ) JP &) ~JP &') ~JP &K) |JP &-#) yJP & ) xJP &) JP %) xJP %P %P \Sk "k "ADk k E`Uk Kk K\X) %P @[) %P @^lor) %P @0u) %P @"|) %P @?) %P @P) %P @0P MP  ) y%P _2) w%P _6) t%P _) p%P _H6) m%P _ A) g%P _) d%P ^E ) TNP Ne') N%P HoP ^P 0rP HP uP @P 2x- P Sr) JP 4@P RP  ) JP 4G) JP 4) JP 4B) JP 4) JP 4$) JP 42+) JP 4!) JP 4u!) JP 4k k #k k #\P 4P C,P 1P CP 0P PP P )P ԬP jP ӬP jP ҬP jU P ѬP jP ЬP j}P ϬP j$~P άP i= qtwzP ̬P i%vP ˬP ieP ʬP i9RP ȬP i.;>*-0369P ƬP i/P ŬP iW(P ìP iP ¬P i P P i...emanas ctutheled iolibsecurZyacciosysunixostartlbegbcwratcxyacctmgm6eqnbctrtute...dman0cman1bman2aman3`man4_man5^man6]man7\man8xd.e..[basinfchangesYintroXkaaWnaaVptxUtaaTtocStocrcRxxc.e..Qar.1Pas.1Obas.1Nbc.1Mcat.1Lcc.1Kcdb.1Jchdir.1Ichmod.1Hcmp.1Gcomm.1Fcp.1Ecref.1Ddate.1Cdb.1Bdc.1Add.1@diff.1?dsw.1>du.1=echo.1<ed.1;eqn.1:exit.19fc.18file.17find.16goto.15grep.14if.1b.e..break.2chdir.2chmod.2chown.2close.2creat.2csw.2dup.2exec.2exit.2fork.2fstat.2getgid.2getpid.2getuid.2gtty.2indir.2intro.2kill.2link.2mknod.2mount.2nice.2open.2pipe.2profil.2ptrace.2read.2seek.2setgid.2a.e..abort.3abs.3alloc.3atan.3atof.3atoi.3crypt.3ctime.3ecvt.3end.3exp.3floor.3fmod.3fptrap.3gamma.3getarg.3getc.3getchar.3getpw.3hmul.3ierror.3ldiv.3locv.3log.3monitor.3nargs.3nlist.3perror.3pow.3printf.3`.e..vcat.4udc.4tdh.4sdn.4rdp.4qhp.4phs.4oht.4nkl.4mlp.4lmem.4kpc.4jrf.4irk.4hrp.4gtc.4ftm.4-tty.4_.e..,a.out.5+archive.5*ascii.5)core.5(directory.5'dump.5&fs.5%greek.5$group.5#mtab.5"passwd.5!tabs.5 tp.5ttys.5utmp.5wtmp.5^.e..agen.6apl.6azel.6bj.6cal.6catsim.6cb.6chess.6col.6cubic.6factor.6fed.6fget.6form.6fsend.6graf.6 graph.6 gsi.6hyphen.6ibm.6iget.6isend.6kaaishu.6lazarus.6lc.6lex.6m6.6maze.6moo.6nfs.6].e..cr.7ms.7plot.7salloc.7.th WAIT I 4/9/73 .sh NAME wait \*- await completion of process .sh SYNOPSIS .bd wait .sh DESCRIPTION Wait until all processes started with .bd & have completed, and report on abnormal terminations. .s3 Because .it "sys wait" must be executed in the parent process, the Shell itself executes .it wait, without creating a new process. .sh "SEE ALSO" sh (I) .sh BUGS After executing .it wait you are committed to waiting until termination, because interrupts and quits are ignored by all processes concerned. The o.th TTY I 3/15/72 .sh NAME tty \*- get typewriter name .sh SYNOPSIS .bd tty .sh DESCRIPTION .it Tty gives the name of the user's typewriter in the form `tty\fIn\fR' for \fIn\fR a digit or letter. The actual path name is then `/dev/tty\fIn\fR'. .sh DIAGNOSTICS `not a tty' if the standard input file is not a typewriter. .sh BUGS .th WRITE I 8/5/73 .sh NAME write \*- write to another user .sh SYNOPSIS .bd write user [ ttyno ] .sh DESCRIPTION .it Write copies lines from your typewriter to that of another user. When first called, it sends the message .s3 message from yourname... .s3 The recipient of the message should write back at this point. Communication continues until an end of file is read from the typewriter or an interrupt is sent. At that point .it write writes `EOT' on the other terminal and exits. .s3 If you want to nly out, if the process does not terminate, is to .it kill it from another terminal or to hang up. .tc | .tr | .th TROFF I 4/15/75 .sh NAME troff \*- format text .sh SYNOPSIS .bd troff [ \fB+\fIn\fR ] [ \fB\*-\fIn\fR ] [ \fB\-s\fIn\fR ] [ \fB\-n\fIn\fR ] [ \fB\-r\fIan\fR ] [ \fB\-m\fIname\fR ] [ .bd \*-t ] [ .bd \*-f ] [ .bd \*-w ] [ .bd \*-a ] [ \fB\-p\fIn\fR ] files .sh DESCRIPTION .it Troff formats text for a Graphic Systems phototypesetter according to control lines embedded in the text files. It reads the standard input if no file arguments are given. An argument of just ``\-'' refers to the standwrite to a user who is logged in more than once, the .it ttyno argument may be used to indicate the last character of the appropriate typewriter name. .s3 Permission to write may be denied or granted by use of the .it mesg command. At the outset writing is allowed. Certain commands, in particular .it roff and .it pr, disallow messages in order to prevent messy output. .s3 If the character `!' is found at the beginning of a line, .it write calls the shell to execute the rest of the line as a command. .s3 The.th UNIQ I 12/1/72 .sh NAME uniq \*- report repeated lines in a file .sh SYNOPSIS .bd uniq [ .bd \*-udc [ \fB+\fRn ] [ \fB\*-\fRn ] ] [ input [ output ] ] .sh DESCRIPTION .it Uniq reads the input file comparing adjacent lines. In the normal case, the second and succeeding copies of repeated lines are removed; the remainder is written on the output file. Note that repeated lines must be adjacent in order to be found; see sort(I). If the .bd \*-u flag is used, just the lines that are not repeated in the origiard input. The non-file option arguments are interpreted as follows: .s3 .lp +10 10 \fB+\fIn\fR Commence typesetting at the first page numbered \fIn\fR or larger. .s3 .lp +10 10 \fB\*-\fIn\fR Stop after page .it n. .s3 .lp +10 10 \fB\-s\fIn\fR Print output in groups of .it n pages, stopping the typesetter after each group. .s3 .lp +10 10 \fB\-n\fIn\fR First generated (not necessarily printed) page is given the number \fIn;\fR simulates ``.pn|\fIn\fR''. .s3 .lp +10 10 \fB\-r\fIan\fR Set number register .it a following protocol is suggested for using .it write: when you first write to another user, wait for him to write back before starting to send. Each party should end each message with a distinctive signal ( .bd (o) for `over' is conventional) that the other may reply. .bd (oo) (for `over and out') is suggested when conversation is about to be terminated. .sh FILES /etc/utmp to find user .br /bin/sh to execute `!' .sh "SEE ALSO" mesg (I), who (I), mail (I) .sh BUGS nal file are output. The .bd \*-d option specifies that one copy of just the repeated lines is to be written. The normal mode output is the union of the .bd \*-u and .bd \*-d mode outputs. .s3 The .bd \*-c option supersedes .bd \*-u and .bd \*-d and generates an output report in default style but with each line preceded by a count of the number of times it occurred. .s3 The .it n arguments specify skipping an initial portion of each line in the comparison: .s3 .lp +8 4 \fB\*-\fIn\fR The first \fIn\fR fields to the value .it n. .s3 .lp +10 10 \fB\-m\fIname\fR Prepends a standard macro file; simulates ``.so /usr/lib/tmac.\fIname\fR''. .s3 .lp +10 10 \fB\*-t\fR Place output on standard output instead of the phototypesetter. .s3 .lp +10 10 \fB\*-f\fR Refrain from feeding out paper and stopping the phototypesetter at the end. .s3 .lp +10 10 \fB\*-w\fR Wait until phototypesetter is available, if currently busy. .s3 .lp +10 10 \fB\*-a\fR Send a printable approximation of the results to the standard output. .s3 .lp +.th WHO I 3/15/72 .sh NAME who \*- who is on the system .sh SYNOPSIS .bd who [ who-file ] [ .bd "am I" ] .sh DESCRIPTION .it Who, without an argument, lists the name, typewriter channel, and login time for each current UNIX user. .s3 Without an argument, .it who examines the /etc/utmp file to obtain its information. If a file is given, that file is examined. Typically the given file will be /usr/adm/wtmp, which contains a record of all the logins since it was created. Then .it who lists logins, logouts, a together with any blanks before each are ignored. A field is defined as a string of non-space, non-tab characters separated by tabs and spaces from its neighbors. .s3 .lp +8 4 \fB+\fIn\fR The first \fIn\fR characters are ignored. Fields are skipped before characters. .i0 .s3 .sh "SEE ALSO" sort (I), comm (I) .sh BUGS 10 10 \fB\-p\fIn\fR Print all characters with point-size \fIn\fR while retaining all prescribed spacings and motions. .s3 .i0 .sh FILES .dt /usr/lib/suftab suffix hyphenation tables .br /tmp/rtm? temporary .br /usr/lib/tmac.* standard macro files .br .sh "SEE ALSO" TROFF User's Manual (internal memorandum). .br TROFF Made Trivial (internal memorandum). .br nroff (I), eqn (I), catsim (VI) .sh BUGS nd crashes since the creation of the wtmp file. Each login is listed with user name, typewriter name (with `/dev/' suppressed), and date and time. When an argument is given, logouts produce a similar line without a user name. Reboots produce a line with `x' in the place of the device name, and a fossil time indicative of when the system went down. .s3 With two arguments, .it who behaves as if it had no arguments except for restricting the printout to the line for the current typewriter. Thus `who am I' (and.th TYPO I 5/15/74 .sh NAME typo \*- find possible typos .sh SYNOPSIS .bd typo [ .bd \*-1 ] [ .bd \*-n ] file ... .sh DESCRIPTION .it Typo hunts through a document for unusual words, typographic errors, and .it "hapax legomena" and prints them on the standard output. .s3 The words used in the document are printed out in decreasing order of peculiarity along with an index of peculiarity. An index of 10 or more is considered peculiar. Printing of certain very common English words is suppressed. .s3 The stat.th TR I 5/20/74 .sh NAME tr \*- transliterate .sh SYNOPSIS .bd tr [ .bd \*-cds ] [ string1 [ string2 ] ] .sh DESCRIPTION .it Tr copies the standard input to the standard output with substitution or deletion of selected characters. Input characters found in .it string1 are mapped into the corresponding characters of .it string2. Any combination of the options .bd \*-cds may be used. .bd \*-c complements the set of characters in .it string1 with respect to the universe of characters whose ascii codes are 0 also `who are you') tells you who you are logged in as. .sh FILES /etc/utmp .sh "SEE ALSO" login (I), init (VIII) .sh BUGS istics for judging words are taken from the document itself, with some help from known statistics of English. The .bd \*-n option suppresses the help from English and should be used if the document is written in, for example, Urdu. .s3 The .bd \*-1 option causes the final output to appear in a single column instead of three columns. The normal header and pagination is also suppressed. .s3 Roff (I) and nroff (I) control lines are ignored. Upper case is mapped into lower case. Quote marks, vertical bars, hyph01 through 377 octal. .bd \*-d deletes all input characters in .it string1. .bd \*-s squeezes all strings of repeated output characters that are in .it string2 to single characters. .s3 The following abbreviation conventions may be used to introduce ranges of characters or repeated characters into the strings: .s3 \fB[\fIa\*|\fB\*-\fIb\fB\*|]\fR stands for the string of characters whose ascii codes run from character .it a to character .it b. .s3 \fB[\fIa\fB\*|*\fIn\fB\*|]\fR, where .it n is an integer or .th WC I 7/26/74 .sh NAME wc \*- word count .sh SYNOPSIS .bd wc [ name ... ] .sh DESCRIPTION .it Wc counts lines and words in the named files, or in the standard input if no name appears. A word is a maximal string of printing characters delimited by spaces, tabs or newlines. All other characters are simply ignored. .sh BUGS ens, and ampersands within words are equivalent to spaces. Words hyphenated across lines are put back together. .sh FILES /tmp/ttmp?? .br /usr/lib/salt .br /usr/lib/w2006 .sh BUGS Because of the mapping into lower case and the stripping of special characters, words may be hard to locate in the original text. .s3 The escape sequences of troff (I) are not correctly recognized. empty, stands for \fIn\fR-fold repetition of character .it a. .it n is taken to be octal or decimal according as its first digit is or is not zero. A zero or missing .it n is taken to be huge; this facility is useful for padding .it string2. .s3 The escape character `\\' may be used as in .it sh to remove special meaning from any character in a string. In addition, `\\' followed by 1, 2 or 3 octal digits stands for the character whose ascii code is given by those digits. .s3 The following example creates a list of all the words in `file1' one per line in `file2', where a word is taken to be a maximal string of alphabetics. The strings are quoted to protect the special characters from interpretation by the Shell; 012 is the ascii code for newline. .s3 .ti +8 tr \*-cs "[A\*-Z][a\*-z]" "[\\012*]" file2 .sh "SEE ALSO" sh (I), ed (I), ascii (V) .sh BUGS Won't handle ascii NUL in .it string1 or .it string2; always deletes NUL from input. A single file with several links to it is treated like several files. terminal .lp +10 10 \fBhup\fR hang up dataphone on last close. .lp +10 10 \fB\-hup\fR do not hang up dataphone on last close. .lp +10 10 \fB0\fR hang up phone line immediately .lp +10 10 \fB50 75 110 134 150 200 300 600 1200 1800 2400 4800 9600 exta extb\fR .br Set typewriter baud rate to the number given, if possible. (These are the speeds supported by the DH-11 interface). .s3 .i0 .dt The various delay algorithms are tuned to various kinds of terminals. In general the specifications ending in `0' mean no .th TP I 10/15/73 .sh NAME tp \*- manipulate DECtape and magtape .sh SYNOPSIS .bd tp [ key ] [ name ... ] .sh DESCRIPTION .it Tp saves and restores files on DECtape or magtape. Its actions are controlled by the .it key argument. The key is a string of characters containing at most one function letter and possibly one or more function modifiers. Other arguments to the command are file or directory names specifying which files are to be dumped, restored, or listed. In all cases, appearance of a directory na.th TIME I 8/16/73 .sh NAME time \*- time a command .sh SYNOPSIS .bd time command .sh DESCRIPTION The given command is executed; after it is complete, .it time prints the elapsed time during the command, the time spent in the system, and the time spent in execution of the command. .s3 The execution time can depend on what kind of memory the program happens to land in; the user time in MOS is often half what it is in core. .s3 The times are printed on the diagnostic output stream. .sh BUGS Elapsed time is acdelay for the corresponding character. .sh "SEE ALSO" stty (II) .sh BUGS me refers to the files and (recursively) subdirectories of that directory. .s3 The function portion of the key is specified by one of the following letters: .s3 .lp +8 4 \fBr\fR The named files are written on the tape. If files with the same names already exist, they are replaced. `Same' is determined by string comparison, so `./abc' can never be the same as `/usr/dmr/abc' even if `/usr/dmr' is the current directory. If no file argument is given, `\fB.\fR' is the default. .s3 .lp +8 4 \fBu\fR updates the tacurate to the second, while the CPU times are measured to the 60th second. Thus the sum of the CPU times can be up to a second larger than the elapsed time. .th STRIP I 3/15/72 .sh NAME strip \*- remove symbols and relocation bits .sh SYNOPSIS .bd strip name ... .sh DESCRIPTION .it Strip removes the symbol table and relocation bits ordinarily attached to the output of the assembler and loader. This is useful to save space after a program has been debugged. .s3 The effect of .it strip is the the same as use of the .bd \*-s option of .it ld. .sh FILES /tmp/stm? temporary file .sh "SEE ALSO" ld (I), as (I) .sh BUGS pe. .bd u is like .bd r, but a file is replaced only if its modification date is later than the date stored on the tape; that is to say, if it has changed since it was dumped. .bd u is the default command if none is given. .s3 .lp +8 4 \fBd\fR deletes the named files from the tape. At least one name argument must be given. This function is not permitted on magtapes. .s3 .lp +8 4 \fBx\fR extracts the named files from the tape to the file system. The owner and mode are restored. If no file argument is given, .th TEE I 3/6/74 .sh NAME tee \*- pipe fitting .sh SYNOPSIS .bd tee [ name ... ] .sh DESCRIPTION .it Tee transcribes the standard input to the standard output and makes copies in the named files. .sh BUGS .th SPLIT I 1/15/73 .sh NAME split \*- split a file into pieces .sh SYNOPSIS .bd split .bd \*-\fIn [ file [ name ] ] .sh DESCRIPTION .it Split reads .it file and writes it in \fIn\fR-line pieces (default 1000), as many as necessary, onto a set of output files. The name of the first output file is .it name with .bd aa appended, and so on lexicographically. If no output name is given, .bd x is default. .s3 If no input file is given, or if .bd \*- is given in its stead, then the standard input file is used. .the entire contents of the tape are extracted. .s3 .lp +8 4 \fBt\fR lists the names of the specified files. If no file argument is given, the entire contents of the tape is listed. .s3 .i0 The following characters may be used in addition to the letter which selects the function desired. .s3 .lp +10 6 \fBm\fR Specifies magtape as opposed to DECtape. .s3 .lp +10 6 \fB0,...,7\fR This modifier selects the drive on which the tape is mounted. For DECtape, `x' is default; for magtape `0' is the default. .s3 .lp +1.th STTY I 6/12/72 .sh NAME stty \*- set typewriter options .sh SYNOPSIS .bd stty [ option ... ] .sh DESCRIPTION .it Stty sets certain I/O options on the current output typewriter. With no argument, it reports the current settings of the options. The option strings are selected from the following set: .s3 .lp +10 10 \fBeven\fR allow even parity .lp +10 10 \fB\*-even\fR disallow even parity .lp +10 10 \fBodd\fR allow odd parity .lp +10 10 \fB\*-odd\fR disallow odd parity .lp +10 10 \fBraw\fR raw mode input (sh BUGS 0 6 \fBv\fR Normally .it tp does its work silently. The .bd v (verbose) option causes it to type the name of each file it treats preceded by the function letter. With the .bd t function, .bd v gives more information about the tape entries than just the name. .s3 .lp +10 6 \fBc\fR means a fresh dump is being created; the tape directory is zeroed before beginning. Usable only with .bd r and .bd u. This option is assumed with magtape since it is impossible to selectively overwrite magtape. .s3 .lp +10 6 \fBf\fno erase, kill, interrupt, quit, EOT; parity bit passed back) .lp +10 10 \fB\*-raw\fR negate raw mode .lp +10 10 \fBcooked\fR same as `\-raw' .lp +10 10 \fB\*-nl\fR allow carriage return for new-line, and output CR-LF for carriage return or new-line .lp +10 10 \fBnl\fR accept only new-line to end lines .lp +10 10 \fBecho\fR echo back every character typed .lp +10 10 \fB\*-echo\fR do not echo characters .lp +10 10 \fBlcase\fR map upper case to lower case .lp +10 10 \fB\*-lcase\fR do not map case .lp +10 10 \.th SPELL I 4/15/75 .sh NAME spell \*- find spelling errors .sh SYNOPSIS .bd spell [ .bd \*-v ] file ... .sh DESCRIPTION .it Spell collects the words from the named documents, and looks them up in a dictionary. The words not found are printed on the standard output. Words which are reasonable transformations of dictionary entries (e.g. a dictionary entry plus .it s ) are not printed. If no files are given, the input is from the standard input. .s3 If the .bd \*-v flag is given, all words which are not literR causes new entries on tape to be `fake' in that no data is present for these entries. Such fake entries cannot be extracted. Usable only with .bd r and .bd u. .s3 .lp +10 6 \fBi\fR Errors reading and writing the tape are noted, but no action is taken. Normally, errors cause a return to the command level. .s3 .lp +10 6 \fBw\fR causes .it tp to pause before treating each file, type the indicative letter and the file name (as with v) and await the user's response. Response .bd y means `yes', so the file is tfB\*-tabs\fR replace tabs by spaces when printing .lp +10 10 \fBtabs\fR preserve tabs .lp +10 10 \fBek\fR reset erase and kill characters back to normal # and @. .lp +10 10 \fBerase\fI c\fR set erase character to .it c. .lp +10 10 \fBkill\fI c\fR set kill character to .it c. .lp +10 10 \fBcr0 cr1 cr2 cr3\fR .br select style of delay for carriage return (see below) .lp +10 10 \fBnl0 nl1 nl2 nl3\fR .br select style of delay for linefeed (see below) .lp +10 10 \fBtab0 tab1 tab2 tab3\fR .br select style of delaally in the dictionary are printed; those which can be transformed to lie in the dictionary are so marked, and the others are marked with asterisks. .s3 The process takes several minutes. .sh FILES /usr/lib/w2006, /usr/dict/words, /usr/lib/spell[123] .sh "SEE ALSO" typo (I) .sh BUGS .s3 Because of the mapping into lower case and the stripping of special characters, words may be hard to locate in the original text. .s3 The escape sequences of troff (I) are not correctly recognized. .s3 More suffixes, and perreated. Null response means `no', and the file does not take part in whatever is being done. Response .bd x means `exit'; the .it tp command terminates immediately. In the .bd x function, files previously asked about have been extracted already. With .bd "r, u," and .bd d no change has been made to the tape. .s3 .i0 .sh FILES /dev/tap? .br /dev/mt? .sh DIAGNOSTICS Several; the non-obvious one is `Phase error', which means the file changed after it was selected for dumping but before it was dumped. .sh BUGS y for tab (see below) .lp +10 10 \fBff0 ff1\fR .br select style of delay for form feed (see below) .lp +10 10 \fBtty33\fR set all modes suitable for Teletype model 33 .lp +10 10 \fBtty37\fR set all modes suitable for Teletype model 37 .lp +10 10 \fBvt05\fR set all modes suitable for DEC VT05 terminal .lp +10 10 \fBtn300\fR set all modes suitable for GE Terminet 300 .lp +10 10 \fBti700\fR set all modes suitable for Texas Instruments 700 terminal .lp +10 10 \fBtek\fR set all modes suitable for Tektronix 4014 haps some prefixes, should be added. .s3 The dictionary cannot be distributed because of copyright limitations. .th "SORT" I 5/13/75 .sh NAME sort, usort \*- sort or merge files .sh SYNOPSIS .bd sort [ .if t \fB\*-abdnrt\fIx\fR .if n -abdnrt______x ] [ \fB+\fIpos \fR [ \fB\*-\fIpos \fR] ] . . . [ .bd \*-mo ] [ name ] . . . .br .bd usort [ .bd \-umo ] [ name ] . . . .sh DESCRIPTION .it Sort sorts all the named files together and writes the result on the standard output. The name `\*-' means the standard input. The standard input is also used if no input file names are given. Thus .it sort may be used as a filt.th SHIFT I 8/21/73 .sh NAME shift \*- adjust Shell arguments .sh SYNOPSIS .bd shift .sh DESCRIPTION .it Shift is used in Shell command files to shift the argument list left by 1, so that old .bd $2 can now be referred to by .bd $1 and so forth. .it Shift is useful to iterate over several arguments to a command file. For example, the command file .s3 .lp +5 0 : loop .br if $1x = x exit .br pr \*-3 $1 .br shift .br goto loop .s3 .i0 prints each of its arguments in 3-column format. .s3 .it Shift is executed w `&' are given upon receipt of the first command subsequent to the termination of the command, or when a .it wait is executed. The following is a list of the abnormal termination messages: .s3 .nf Bus error Trace/BPT trap Illegal instruction IOT trap EMT trap Bad system call Quit Floating exception Memory violation Killed Broken Pipe .s3 .fi If a core image is produced, `\*- Core dumped' is appended to the appropriate message. .s3 .bd "Redirection of I/O." There are three character sequences thater. .s3 The default sort key is an entire line. Default ordering is lexicographic in ASCII collating sequence, except that lower-case letters are considered the same as the corresponding upper-case letters. Non-ASCII bytes are ignored. The ordering is affected by the flags .if t \fB\*-abdnrt\fR, .if n .it abdnrt, one or more of which may appear: .s3 .lp +4 4 \fBa\fR Do not map lower case letters. .s3 .lp +4 4 \fBb\fR Leading blanks (spaces and tabs) are not included in fields. .s3 .lp+4 4 \fBd\fR `Dictionarithin the Shell. .sh "SEE ALSO" sh (I) .sh BUGS  cause the immediately following string to be interpreted as a special argument to the Shell itself. Such an argument may appear anywhere among the arguments of a simple command, or before or after a parenthesized command list, and is associated with that command or command list. .s3 An argument of the form `arg' causes file `arg' to be used as the standard output (file dy' order: only letters, digits and blanks are significant in ASCII comparisons. .s3 .lp +4 4 \fBn\fR An initial numeric string, consisting of optional minus sign, digits and optionally included decimal point, is sorted by arithmetic value. .s3 .lp+4 4 \fBr\fR Reverse the sense of comparisons. .s3 .lp +4 4 \fBt\fIx\fR Tab character between fields is .it x. .s3 .i0 Selected parts of the line, specified by \fB+\fIpos\fR and \fB\*-\fIpos\fR, may be used as sort keys. .it Pos has the form .it m.n, where .it m sescriptor 1) for the associated command. `Arg' is created if it did not exist, and in any case is truncated at the outset. .s3 An argument of the form `>>arg' causes file `arg' to be used as the standard output for the associated command. If `arg' did not exist, it is created; if it did exist, the command output is appended to the file. .s3 For example, either of the command lines .s3 ls >junk; cat tail >>junk .br ( ls; cat tail ) >junk .s3 creates, on file `junk', a listing of the working directory, follpecifies a number of fields to skip, and .it n a number of characters to skip further into the next field. A missing .it \\.n is taken to be 0. \fB+\fIpos\fR denotes the beginning of the key; \fB\*-\fIpos\fR denotes the first position after the key (end of line by default). The ordering rule may be overridden for a particular key by appending one or more of the flags .bd abdnr to \fB+\fIpos\fR. .s3 When no tab character has been specified, a field consists of nonblanks and any preceding blanks. Under the ..th SH I 5/15/74 .sh NAME sh \*- shell (command interpreter) .sh SYNOPSIS .bd sh [ .bd \*-t ] [ .bd \*-c ] [ name [ arg1 ... [ arg9 ] ] ] .sh DESCRIPTION .it Sh is the standard command interpreter. It is the program which reads and arranges the execution of the command lines typed by most users. It may itself be called as a command to interpret files of commands. Before discussing the arguments to the Shell used as a command, the structure of command lines themselves will be given. .s3 .bd "Commands." Eacowed immediately by the contents of file `tail'. .s3 Either of the constructs `>arg' or `>>arg' associated with any but the last command of a pipeline is ineffectual, as is `', and other characters meaningful to the Shell may be passed as part of arguments. A special case of this feature allows the continuation of commands onto more than one line: a new-line preceded by `\\' is translated into a blank. .s3 Sequences of characters enclosed in double (") or single (\*a) quotes are also taken literally. For example: .s3 ls | pr \*-h "My directory" .s3 causes a directory listing to be produced by .it ls, and passed on to .it pr to be printed with the heading `My directory'. Quotes permit the inclusion of blanks in .th ROFF I 11/4/74 .sh NAME roff \*- format text .sh SYNOPSIS .bd roff [ \fB+\fIn\fR ] [ \fB\*-\fIn\fR ] [ .bd \*-s ] [ .bd \*-h ] file ... .sh DESCRIPTION .it Roff formats text according to control lines embedded in the text in the given files. Encountering a nonexistent file terminates printing. Incoming interconsole messages are turned off during printing. The optional flag arguments mean: .s3 .lp +5 5 \fB+\fIn\fR Start printing at the first page with number \fIn\fR. .s3 .lp +5 5 \fB\*-\fIn\fR Stop pri.ig no - Ignore input lines through a line beginning with `\fB..\fR'. .ti 0 .li .in|+n yes - Indent n spaces from left margin. .ti 0 .li .ix +n no - Same as `.in' but without break. .ti 0 .li .li|n no - Literal, treat next n lines as text. .ti 0 .li .ll|+n no n=65 Line length including indent is n characters. .ti 0 .li .ls|+n yes n=1 Line spacing set to n lines per output line. .ti 0 .li .m1|n no n=2 Put n blank lines between the top of page and head title. .ti 0 .li .m2|n no n=2 n blank lines put between hthe heading, which is a single argument to .it pr. .s3 .bd "Argument passing." When the Shell is invoked as a command, it has additional string processing capabilities. Recall that the form in which the Shell is invoked is .s3 sh [ name [ arg1 ... [ arg9 ] ] ] .s3 The .it name is the name of a file which is read and interpreted. If not given, this subinstance of the Shell continues to read the standard input file. .s3 In command lines in the file (not in command input), character sequences of the form `$n'nting at the first page numbered higher than \fIn\fR. .s3 .lp +5 5 \fB\*-s\fR Stop before each page (including the first) to allow paper manipulation; resume on receipt of an interrupt signal. .s3 .lp +5 5 \fB\*-h\fR Insert tabs in the output stream to replace spaces whenever appropriate. .s3 .i0 .dt Input consists of intermixed .it "text lines," which contain information to be formatted, and .it "request lines," which contain instructions about how to format it. Request lines begin with a distinguished .itead title and beginning of text on page. .ti 0 .li .m3|n no n=1 n blank lines put between end of text and foot title. .ti 0 .li .m4|n no n=3 n blank lines put between the foot title and the bottom of page. .ti 0 .li .na yes no Stop adjusting the right margin. .ti 0 .li .ne|n no - Begin new page, if n output lines cannot fit on present page. .ti 0 .li .nn|+n no - The next n output lines are not numbered. .ti 0 .li .n1 no no Add 5 to page offset; number lines in margin from 1 on each page. .ti 0 .li .n2|n no , where .it n is a digit, are replaced by the \fIn\fRth argument to the invocation of the Shell (argn). `$0' is replaced by .it name. .s3 The argument `\*-t,' used alone, causes .it sh to read the standard input for a single line, execute it as a command, and then exit. This facility replaces the older `mini-shell.' It is useful for interactive programs which allow users to execute system commands. .s3 The argument `\*-c' (used with one following argument) causes the next argument to be taken as a command l "control character," normally a period. .s3 Output lines may be .it filled as nearly as possible with words without regard to input lineation. Line .it breaks may be caused at specified places by certain commands, or by the appearance of an empty input line or an input line beginning with a space. .s3 The capabilities of .it roff are specified in the attached Request Summary. Numerical values are denoted there by n or +n, titles by t, and single characters by c. Numbers denoted +n may be signed + or \*-, ino Add 5 to page offset; number lines from n; stop if n=0. .ti 0 .li .ni|+n no n=0 Line numbers are indented n. .ti 0 .li .nf yes no Stop filling output lines. .ti 0 .li .nx|filename - Change to input file `filename'. .ti 0 .li .of|t no t=\*a\*a\*a\*a Odd foot title becomes t. .ti 0 .li .oh|t no t=\*a\*a\*a\*a Odd head title becomes t. .ti 0 .li .pa|+n yes n=1 Same as `.bp'. .ti 0 .li .pl|+n no n=66 Total paper length taken to be n lines. .ti 0 .li .po|+n no n=0 Page offset. All lines are preceded by n spacine and executed. No new-line need be present, but new-line characters are treated appropriately. This facility is useful as an alternative to `\*-t' where the caller has already read some of the characters of the command to be executed. .s3 .bd "End of file." An end-of-file in the Shell's input causes it to exit. A side effect of this fact means that the way to log out from UNIX is to type an EOT. .s3 .bd "Special commands." The following commands are treated specially by the Shell. .s3 .it chdir is done wn which case they signify relative changes to a quantity, otherwise they signify an absolute resetting. Missing n fields are ordinarily taken to be 1, missing t fields to be empty, and c fields to shut off the appropriate special interpretation. .s3 Running titles usually appear at top and bottom of every page. They are set by requests like .s3 .in +10 .if t \&.he \(fmpart1\(fmpart2\(fmpart3\(fm .if n \&.he 'part1'part2'part3' .in -10 .s3 Part1 is left justified, part2 is centered, and part3 is right justifes. .ti 0 .li .ro no arabic Roman page numbers. .ti 0 .li .sk|n no - Produce n blank pages starting next page. .ti 0 .li .sp|n yes - Insert block of n blank lines, except at top of page. .ti 0 .li .ss yes yes Single space output lines, equivalent to `.ls 1'. .ti 0 .li .ta|n|n.. - Pseudotab settings. Initial tab settings are columns 9 17 25 ... .ti 0 .li .tc|c no space Tab replacement character becomes `c'. .ti 0 .li .ti|+n yes - Temporarily indent next output line n spaces. .ti0 .li .tr|cdef.. no - Translaithout spawning a new process by executing .it "sys chdir" (II). .s3 .it login is done by executing /bin/login without creating a new process. .s3 .it wait is done without spawning a new process by executing .it "sys wait" (II). .s3 .it shift is done by manipulating the arguments to the Shell. .s3 `\fB:\fR' is simply ignored. .s3 .bd "Command file errors; interrupts." Any Shell-detected error, or an interrupt signal, during the execution of a command file causes the Shell to cease execution of that file. .sied on the page. Any % sign in a title is replaced by the current page number. Any nonblank may serve as a quote. .s3 ASCII tab characters are replaced in the input by a .it "replacement character," normally a space, according to the column settings given by a .ta command. (See .tr for how to convert this character on output.) .s3 Automatic hyphenation of filled output is done under control of .hy. When a word contains a designated .it "hyphenation character," that character disappears from the output and hte c into d, e into f, etc. .ti0 .li .ul|n no - Underline the letters and numbers in the next n input lines. 3 Processes that are created with `&' ignore interrupts. Also if such a process has not redirected its input with a `<', its input is automatically redirected to the zero length file /dev/null. .sh FILES /etc/glob, which interprets `*', `?', and `['. .br /dev/null as a source of end-of-file. .sh "SEE ALSO" `The UNIX Time-Sharing System', CACM, July, 1974, which gives the theory of operation of the Shell. .br chdir (I), login (I), wait (I), shift (I) .sh BUGS There is no way to redirect the diagnostic outputyphens can be introduced into the word at the marked places only. .sh FILES /usr/lib/suftab suffix hyphenation tables .br /tmp/rtm? temporary .br .sh "SEE ALSO" nroff (I), troff (I) .sh BUGS .it Roff is the simplest of the runoff programs, but is utterly frozen. .bp .tc | .tr | .in 0 .ce REQUEST SUMMARY .s3 .ul .if t .ta .75i 1.5i 2.25i .if n .ta 9 17 25 33 Request Break Initial Meaning .if t .in2.25i .if n .in24 .na .ti 0 .li .ad yes yes Begin adjusting right margins. .ti 0 .li .ar no arabic Arabic page nu.th RMDIR I 3/15/72 .sh NAME rmdir \*- remove directory .sh SYNOPSIS .bd rmdir dir ... .sh DESCRIPTION .it Rmdir removes (deletes) directories. The directory must be empty (except for the standard entries `\fB.\fR' and `\fB..\fR', which .it rmdir itself removes). Write permission is required in the directory in which the directory to be removed appears. .sh BUGS Needs a \fB\*-r\fR flag. .br Actually, write permission in the directory's parent is .it not required. .br Mildly unpleasant consequences can fol. mbers. .ti 0 .li .br yes - Causes a line break \*- the filling of the current line is stopped. .ti 0 .li .bl|n yes - Insert of n blank lines, on new page if necessary. .ti 0 .li .bp|+n yes n=1 Begin new page and number it n; no n means `+1'. .ti 0 .li .cc|c no c=. Control character becomes `c'. .ti 0 .li .ce|n yes - Center the next n input lines, without filling. .ti 0 .li .de|xx no - Define parameterless macro to be invoked by request `.xx' (definition ends on line beginning `\fB..\fR'). .ti 0 .li .ds yeslow removal of your own or someone else's current directory.  no Double space; same as `.ls 2'. .ti 0 .li .ef|t no t=\*a\*a\*a\*a Even foot title becomes t. .ti 0 .li .eh|t no t=\*a\*a\*a\*a Even head title becomes t. .ti 0 .li .fi yes yes Begin filling output lines. .ti 0 .li .fo no t=\*a\*a\*a\*a All foot titles are t. .ti 0 .li .hc|c no none Hyphenation character becomes `c'. .ti 0 .li .he|t no t=\*a\*a\*a\*a All head titles are t. .ti 0 .li .hx no - Title lines are suppressed. .ti 0 .li .hy|n no n=1 Hyphenation is done, if n=1; and is not done, if n=0. .ti 0 .li .th RM I 1/20/73 .sh NAME rm \*- remove (unlink) files .sh SYNOPSIS .bd rm [ .bd \*-f ] [ .bd \*-r ] name ... .sh DESCRIPTION .it Rm removes the entries for one or more files from a directory. If an entry was the last link to the file, the file is destroyed. Removal of a file requires write permission in its directory, but neither read nor write permission on the file itself. .s3 If a file has no write permission, .it rm prints the file name and its mode, then reads a line from the standard input. If the line begins with \fBy\fR, the file is removed, otherwise it is not. The question is not asked if option .bd \-f was given or if the standard input is not a typewriter. .s3 If a designated file is a directory, an error comment is printed unless the optional argument .bd \*-r has been used. In that case, .it rm recursively deletes the entire contents of the specified directory. To remove directories \fIper se\fR see rmdir(I). .sh FILES /etc/glob to implement the .bd \*-r flag .sh "SEE ALSO" rmdir (I) .sh BUGS .th PWD I 5/15/74 .sh NAME pwd \*- working directory name .sh SYNOPSIS .bd pwd .sh DESCRIPTION .it Pwd prints the pathname of the working (current) directory. .sh "SEE ALSO" chdir (I) .sh BUGS .th PR I 3/20/74 .sh NAME pr \*- print file .sh SYNOPSIS .bd pr [ .bd \*-h .it header ] [ \fB\*-\fIn\fR ] [ \fB+\fIn\fR ] [ \fB\*-w\fIn\fR ] [ \fB\*-l\fIn\fR ] [ \fB\*-t\fR ] [ .bd \*-s\fIc\fB ] [ .bd \*-m ] name .li . . . .sh DESCRIPTION .it Pr produces a printed listing of one or more files. The output is separated into pages headed by a date, the name of the file or a specified header, and the page number. If there are no file arguments, .it pr prints its standard input, and is thus usable as a filter.When .it rm removes the contents of a directory under the .bd \*-r flag, full pathnames are not printed in diagnostics. .th PS I 3/20/74 .sh NAME ps \*- process status .sh SYNOPSIS .bd ps [ .bd aklx ] [ namelist ] .sh DESCRIPTION .it Ps prints certain indicia about active processes. The .bd a flag asks for information about all processes with typewriters (ordinarily only one's own processes are displayed); .bd x asks even about processes with no typewriter; .bd l asks for a long listing. Ordinarily only the typewriter number (if not one's own), the process number, and an approximation to the command line are given. If the .b .s3 Options apply to all following files but may be reset between files: .s3 .lp +5 5 \fB\*-\fIn\fR produce \fIn\fR-column output .s3 .lp +5 5 \fB+\fIn\fR begin printing with page \fIn\fR .s3 .lp +5 5 \fB\*-h\fR treat the next argument as a header to be used instead of the file name .s3 .lp +5 5 \fB\*-w\fIn\fR for purposes of multi-column output, take the width of the page to be .it n characters instead of the default 72 .s3 .lp +5 5 \fB\*-l\fIn\fR take the length of the page to be .it n lines instead of t.th REV I 4/24/75 .sh NAME rev \*- reverse lines of a file .sh SYNOPSIS .bd rev .sh DESCRIPTION .it Rev copies the standard input to the standard output, reversing the order of characters in every line. .sh BUGS d k flag is specified, the file .it /usr/sys/core is used in place of .it /dev/mem. This is used for postmortem system debugging. If a second argument is given, it is taken to be the file containing the system's namelist. .s3 The long listing is columnar and contains .s3 .lp +5 0 The name of the process's control typewriter. .s3 .lp +5 0 Flags associated with the process. 01: in core; 02: system process; 04: locked in code (e.g. for physical I/O); 10: being swapped; 20: being traced by another process. .s3 he default 66 .s3 .lp +5 5 \fB\*-t\fR do not print the 5-line header or the 5-line trailer normally supplied for each page .s3 .lp +5 5 \fB\*-s\fIc\fR separate columns by the single character .it c instead of by the appropriate amount of white space. A missing .it c is taken to be a tab. .s3 .lp +5 5 \fB\*-m\fR print all files simultaneously, each in one column .s3 .i0 Interconsole messages via write(I) are forbidden during a .it pr. .sh FILES /dev/tty? to suspend messages. .sh "SEE ALSO" cat (I), cp (I) .s.th RC I 5/15/74 .sh NAME rc \*- Ratfor compiler .sh SYNOPSIS .bd rc [ .bd \*-c ] [ .bd \*-r ] [ .bd \*-f ] [ .bd \*-v ] file ... .sh DESCRIPTION .it Rc invokes the Ratfor preprocessor on a set of Ratfor source files. It accepts three types of arguments: .s3 Arguments whose names end with `.r' are taken to be Ratfor source programs; they are preprocessed into Fortran and compiled. Each subroutine or function `name' is placed on a separate file .it name.f, and its object code is left on .it name.o. The main.lp +5 0 The state of the process. 0: nonexistent; S: sleeping; W: waiting; R: running; Z: terminated; T: stopped. .s3 The user ID of the process owner. .s3 The process ID of the process; as in certain cults it is possible to kill a process if you know its true name. .s3 The priority of the process; high numbers mean low priority. .s3 The size in blocks of the core image of the process. .s3 The event for which the process is waiting or sleeping; if blank, the process is running. .s3 The command and its arguh DIAGNOSTICS none; files not found are ignored .sh BUGS  routine is on .it MAIN.f and .it MAIN.o; block data subprograms go on .it blockdata?.f and .it blockdata?.o. The files resulting from a `.r' file are loaded into a single object file .it file.o, and the intermediate object and Fortran files are removed. .s3 The following flags are interpreted by .it rc. See .it "ld (I)" for load-time flags. .s3 .lp +6 5 \fB\*-c\fR Suppresses the loading phase of the compilation, as does any error in anything. .s3 .lp +6 5 \fB\*-f\fR Save Fortran intermediate files. This isments. .s3 .i0 .dt .it Ps makes an educated guess as to the file name and arguments given when the process was created by examining core memory or the swap area. The method is inherently somewhat unreliable and in any event a process is entitled to destroy this information, so the names cannot be counted on too much. .sh FILES /unix system namelist .br /dev/mem core memory .br /usr/sys/core alternate core file .br /dev searched to find swap device and typewriter names .sh "SEE ALSO" kill (I) .sh BUGS .th PFE I 11/1/73 .sh NAME pfe \*- print floating exception .sh SYNOPSIS .bd pfe .sh DESCRIPTION .it Pfe examines the floating point exception register and prints a diagnostic for the last floating point exception. .sh "SEE ALSO" signal (II) .sh BUGS Since the system does not save the exception register in a core image file, the message refers to the last error encountered by anyone. Floating exceptions are therefore volatile.  primarily for debugging. .s3 .lp +6 5 \fB\*-r\fR Ratfor only; don't try to compile the Fortran. This implies .bd \*-f and .bd \*-c. .s3 .lp +6 5 \fB\*-v\fR Don't list intermediate file names while compiling. .i0 .dt .s3 Arguments whose names end with `.f' are taken to be Fortran source programs; they are compiled in the normal manner. (Only one Fortran routine is allowed in a `.f' file.) Other arguments are taken to be either loader flag arguments, or Fortran-compatible object programs, typically produced .th PROF I 3/12/73 .sh NAME prof \*- display profile data .sh SYNOPSIS .bd prof [ .bd \*-v ] [ .bd \*-a ] [ .bd \*-l ] [ file ] .sh DESCRIPTION .it Prof interprets the file .it mon.out produced by the .it monitor subroutine. Under default modes, the symbol table in the named object file .it (a.out default) is read and correlated with the .it mon.out profile file. For each external symbol, the percentage of time spent executing between that symbol and the next is printed (in decreasing order), together with .th PASSWD I 9/1/72 .sh NAME passwd \*- change login password .sh SYNOPSIS .bd passwd name password .sh DESCRIPTION The .it password becomes associated with the given login name. This can only be done by corresponding user or by the super-user. An explicit null argument ("") for the password argument removes any password. .sh FILES /etc/passwd .sh "SEE ALSO" login (I), passwd (V), crypt (III) .sh BUGS by an earlier .it rc run, or perhaps libraries of Fortran-compatible routines. These programs, together with the results of any compilations specified, are loaded to produce an executable program with name .bd a.out. .i0 .sh FILES ratjunk temporary .br /usr/bin/ratfor preprocessor .br /usr/fort/fc1 Fortran compiler .sh "SEE ALSO" ``RATFOR \*- A Rational Fortran''. .br fc(I) for Fortran error messages. .sh DIAGNOSTICS Yes, both from .it rc itself and from Fortran. .sh BUGS Limit of about 50 arguments, 10 blthe number of times that routine was called and the number of milliseconds per call. .s3 If the .bd \*-a option is used, all symbols are reported rather than just external symbols. If the .bd \*-l option is used, the output is listed by symbol value rather than decreasing percentage. If the .bd \*-v option is used, all printing is suppressed and a profile plot is produced on the 611 display. .s3 In order for the number of calls to a routine to be tallied, the .bd \*-p option of .it cc must have been given w.th OPR I 7/17/74 .sh NAME opr \*- off line print .sh SYNOPSIS .bd opr [ \fB\*-\fRdestination ] [ .bd \*-crm ] [ name ... ] .sh DESCRIPTION .it Opr causes the named files to be printed off line at the specified destination. If no names appear the standard input is assumed. .s3 At the mother system the following destinations are recognized. The default destination is .bd mh. .s3 .lp +4 4 \fBlp\fR Local line printer. .s3 .lp +4 4 \fBmh\fR GCOS at Murray Hill Comp Center. GCOS identification must be registerock data files. .s3 #define and #include lines in ``.f'' files are not processed. hen the file containing the routine was compiled. This option also arranges for the .it mon.out file to be produced automatically. .sh FILES mon.out for profile .br a.out for namelist .br /dev/vt0 for plotting .sh "SEE ALSO" monitor (III), profil (II), cc (I) .sh BUGS Beware of quantization errors. ed in the UNIX password file (see passwd (V)). .s3 .lp +4 4 \fBsp\fR Spider network printer. .s3 .lp +4 4 \fIxx\fR The two-character code .it xx is taken to be a Murray Hill GCOS station id. Useful codes are `r1' for quality print and `q1' for quality print with special ribbon. .i0 .s3 .it Opr uses spooling daemons that do the job when facilities become available. Flag .bd \*-r causes the named files to be removed when spooled. Flag .bd \*-c causes copies to be made so as to insulate the daemons from any intervening changes to the files. .s3 Flag .bd \*-m causes mail to be sent when UNIX is finished transmitting the file. For GCOS jobs the mail includes the snumb. .sh FILES .nf .if t .ta 1.2i .if n .ta 14 /etc/passwd personal ident cards /lib/dpr dataphone spooler /etc/dpd dataphone daemon /usr/dpd/* spool area /lib/lpr line printer spooler /etc/lpd line printer daemon /usr/lpd/* spool area /lib/npr spider network spooler .fi .fi .sh "SEE ALSO" fsend (I), dpd (VIII), lpd (VIII) .sh BUGS Line printer spooler /tmp/rtm? temporary .br /usr/lib/tmac.* standard macro files .br .sh "SEE ALSO" NROFF User's Manual (internal memorandum). .br neqn (I), col (I) .sh BUGS .th NEQN I 4/30/74 .sh NAME neqn \*- typeset mathematics on terminal .sh SYNOPSIS .bd neqn [ file ] ... .sh DESCRIPTION .it Neqn is an nroff (I) preprocessor. The input language is the same as that of eqn (I). Normal usage is almost always .s3 neqn file ... | nroff .s3 Output is meant for terminals with forward and reverse capabilities, such as the Model 37 teletype or GSI terminal. .s3 If no arguments are specified, .it neqn reads the standard input, so it may be used as a filter. .sh "SEE ALSO" eqn (I), doesn't handle flags. .br Spider network spooler doesn't spool. .th NOHUP I 11/1/73 .sh NAME nohup \*- run a command immune to hangups .sh SYNOPSIS .bd nohup command [ arguments ] .sh DESCRIPTION .it Nohup executes .it command with hangups, quits and interrupts all ignored. .sh "SEE ALSO" nice (I), signal (II) .sh BUGS gsi (VI) .sh BUGS Because of some interactions with .it nroff there may not always be enough space left before and after lines containing equations. .th OD I 1/15/73 .sh NAME od \*- octal dump .sh SYNOPSIS .bd od [ .bd \*-abcdho ] [ file ] [ [ .bd + ] offset[ \fB. \fR][ \fBb\fR ] ] .sh DESCRIPTION .it Od dumps .it file in one or more formats as selected by the first argument. If the first argument is missing .bd \*-o is default. The meanings of the format argument characters are: .s3 .lp +3 3 \fBa\fR interprets words as PDP-11 instructions and dis-assembles the operation code. Unknown operation codes print as ???. .s3 .lp +3 3 \fBb\fR interprets bytes.th NM I 8/20/73 .sh NAME nm \*- print name list .sh SYNOPSIS .bd nm [ .bd \-cnrupg ] [ name ] .sh DESCRIPTION .it Nm prints the symbol table from the output file of an assembler or loader run. Each symbol name is preceded by its value (blanks if undefined) and one of the letters \fBU\fR (undefined) \fBA\fR (absolute) \fBT\fR (text segment symbol), \fBD\fR (data segment symbol), \fBB\fR (bss segment symbol), or \fBC\fR (common symbol). If the symbol is local (non-external) the type letter is in lower case.th MV I 8/20/73 .sh NAME mv \*- move or rename a file .sh SYNOPSIS .bd mv name1 name2 .sh DESCRIPTION .it Mv changes the name of .it name1 to .it name2. If .it name2 is a directory, .it name1 is moved to that directory with its original file-name. Directories may only be moved within the same parent directory (just renamed). .s3 If .it name2 already exists, it is removed before .it name1 is renamed. If .it name2 has a mode which forbids writing, .it mv prints the mode and reads the standard input to obta in octal. .s3 .lp +3 3 \fBc\fR interprets bytes in ascii. Unknown ascii characters are printed as \\?. .s3 .lp +3 3 \fBd\fR interprets words in decimal. .s3 .lp +3 3 \fBh\fR interprets words in hex. .s3 .lp +3 3 \fBo\fR interprets words in octal. .s3 .s3 .i0 The \fIfile\fR argument specifies which file is to be dumped. If no file argument is specified, the standard input is used. Thus .it od can be used as a filter. .s3 The offset argument specifies the offset in the file where dumping is to commence. This. The output is sorted alphabetically. .s3 If no file is given, the symbols in .bd a.out are listed. .s3 Options are: .s3 .lp +4 4 \fB\-c\fR list only C-style external symbols, that is those beginning with underscore `\*_'. .s3 .lp +4 4 \fB\-g\fR print only global (external) symbols .s3 .lp +4 4 \fB\-n\fR sort by value instead of by name .s3 .lp +4 4 \fB\-p\fR don't sort; print in symbol-table order .s3 .lp +4 4 \fB\-r\fR sort in reverse order .s3 .lp +4 4 \fB\-u\fR print only undefined symbols. .i0 .sh FILin a line; if the line begins with .bd y, the move takes place; if not, .it mv exits. .s3 If .it name2 would lie on a different file system, so that a simple rename is impossible, .it mv copies the file and deletes the original. .sh BUGS It should take a .bd "\*-f" flag, like .it rm, to suppress the question if the target exists and is not writable.  argument is normally interpreted as octal bytes. If `\fB.\fR' is appended, the offset is interpreted in decimal. If `\fBb\fR' is appended, the offset is interpreted in blocks. (A block is 512 bytes.) If the file argument is omitted, the offset argument must be preceded by `\fB+\fR'. .s3 Dumping continues until end-of-file. .sh "SEE ALSO" db (I) .sh BUGS ES a.out .sh BUGS .th MKDIR I 3/15/72 .sh NAME mkdir \*- make a directory .sh SYNOPSIS .bd mkdir dirname ... .sh DESCRIPTION .it Mkdir creates specified directories in mode 777. The standard entries `\fB.\fR' and `\fB..\fR' are made automatically. .sh "SEE ALSO" rmdir (I) .sh BUGS .tc | .tr | .de x .in \\n(inu .if t .ta \\$2 .if n .ta \\$2+1 .in \\$1 .ti -\\$2 \fB\\$3\fP\t\\ .. .th NROFF I 4/15/75 .sh NAME nroff \*- format text .sh SYNOPSIS .bd nroff [ \fB+\fIn\fR ] [ \fB\*-\fIn\fR ] [ \fB\-n\fIn\fR ] [ \fB\-r\fIan\fR ] [ \fB\-m\fIx\fR ] [ .bd \*-s ] [ .bd \*-h ] [ .bd \*-q ] files .sh DESCRIPTION .it Nroff formats text according to control lines embedded in the text files. .it Nroff reads the standard input if no file arguments are given. An argument of just ``\-'' refers to the s.th NICE I 2/8/75 .sh NAME nice \*- run a command at low priority .sh SYNOPSIS .bd nice [ \fB\-\fInumber\fR ] command [ arguments ] .sh DESCRIPTION .it Nice executes .it command with low scheduling priority. If a numerical argument is given, that priority (in the range 1-20) is used; if not, priority 4 is used. .s3 The super-user may run commands with priority higher than normal by using a negative priority, e.g. `\-\-10'. .sh "SEE ALSO" nohup (I), nice (II) .sh BUGS .th MESG I 3/15/72 .sh NAME mesg \*- permit or deny messages .sh SYNOPSIS .bd mesg [ .bd n ] [ .bd y ] .sh DESCRIPTION .it Mesg with argument .bd n forbids messages via .it write by revoking non-user write permission on the user's typewriter. .it Mesg with argument .bd y reinstates permission. All by itself, .it mesg reverses the current permission. In all cases the previous state is reported. .sh FILES /dev/tty? .sh "SEE ALSO" write (I) .sh DIAGNOSTICS `?' if the standard input file is not a typewriter .tandard input. The non-file option arguments are interpreted as follows: .s3 .lp +10 10 \fB+\fIn\fR Output commences at the first page whose page number is .it n or larger. .s3 .lp +10 10 \fB\*-\fIn\fR Printing stops after page .it n. .s3 .lp +10 10 \fB\-n\fIn\fR First generated (not necessarily printed) page is given number \fIn\fR; simulates ``.pn|\fIn\fR''. .s3 .lp +10 10 \fB\-r\fIan\fR Set number register to the value .it n. .s3 .lp +10 10 \fB\-m\fIname\fR Prepends a standard macro file; simulates ``.so.th NEWGRP I 4/8/75 .sh NAME newgrp \*- log in to a new group .sh SYNOPSIS .bd newgrp group .sh DESCRIPTION .it Newgrp changes the group identification of its caller, analogously to .it login. The same person remains logged in, and the current directory is unchanged, but calculations of access permissions to files are performed with respect to the new group ID. .s3 A password is demanded if the group has a password and the user himself does not. .s3 When most users log in, they are members of the group namesh BUGS  /usr/lib/tmac.\fIname\fR''. .s3 .lp +10 10 \fB\*-s\fR Stop prior to each page to permit paper loading. Printing is restarted by typing a `newline' character. .s3 .lp +10 10 \fB\*-h\fR Spaces are replaced where possible with tabs to speed up output (or reduce the size of the output file). .s3 .lp +10 10 \fB\*-q\fR Prompt names for insertions are not printed and the bell character is sent instead; the insertion is not echoed. .s3 .lp +10 10 .br .i0 .sh FILES .dt /usr/lib/suftab suffix hyphenation tables .br d `other.' .sh FILES /etc/group, /etc/passwd .sh "SEE ALSO" login (I), group (V) .sh BUGS .th MAN I 8/20/73 .sh NAME man \*- run off section of UNIX manual .sh SYNOPSIS .bd man [ section ] [ title ... ] .sh DESCRIPTION .it Man is a shell command file which locates and prints one or more sections of this manual. .it Section is the section number of the manual, as an Arabic not Roman numeral, and is optional. .it Title is one or more section names; these names bear a generally simple relation to the page captions in the manual. If the .it section is missing, .bd 1 is assumed. For example, .s3 .bd " man man" .s3 would reproduce this page. .sh FILES /usr/man/man?/* .sh BUGS The manual is supposed to be reproducible either on the phototypesetter or on a typewriter. However, on a typewriter some information is necessarily lost. directory; .lp +3 3 \fBb\fR if the entry is a block-type special file; .lp +3 3 \fBc\fR if the entry is a character-type special file; .lp +3 3 \fB\*-\fR if the entry is a plain file. .s3 .i0 The next 9 characters are interpreted as three sets of three bits each. The first set refers to owner permissions; the next to permissions to others in the same user-group; and the last to all others. Within each set the three characters indicate permission respectively to read, to write, or to execute the file as a pr.th LD I 8/16/73 .sh NAME ld \*- link editor .sh SYNOPSIS .bd ld [ .bd \*-sulxrdni ] name ... .sh DESCRIPTION .it Ld combines several object programs into one; resolves external references; and searches libraries. In the simplest case the names of several object programs are given, and .it ld combines them, producing an object module which can be either executed or become the input for a further .it ld run. (In the latter case, the .bd \*-r option must be given to preserve the relocation bits.) The output.th MAIL I 2/21/75 .sh NAME mail \*- send mail to designated users .sh SYNOPSIS .bd mail [ .bd \-yn ] [ person ... ] .sh DESCRIPTION .it Mail with no argument searches for a file called .it .mail, prints it if it is nonempty, then asks if it should be saved. If the answer is .bd y, the mail is added to .it mbox. Finally .it .mail is truncated to zero length. To leave the mailbox untouched, hit `delete.' The question can be answered on the command line with the argument `\-y' or `\-n'. .s3 When .it personsogram. For a directory, `execute' permission is interpreted to mean permission to search the directory for a specified file. The permissions are indicated as follows: .s3 .lp +3 3 \fBr\fR if the file is readable .lp +3 3 \fBw\fR if the file is writable .lp +3 3 \fBx\fR if the file is executable .lp +3 3 \fB\*-\fR if the indicated permission is not granted .s3 .i0 The group-execute permission character is given as .bd s if the file has set-group-ID mode; likewise the user-execute permission character is give of .it ld is left on .bd a.out. This file is made executable only if no errors occurred during the load. .s3 The argument routines are concatenated in the order specified. The entry point of the output is the beginning of the first routine. .s3 If any argument is a library, it is searched exactly once at the point it is encountered in the argument list. Only those routines defining an unresolved external reference are loaded. If a routine from a library references another routine in the library, the refer are named, .it mail takes the standard input up to an end of file and adds it to each .it person's .it .mail file. The message is preceded by the sender's name and a postmark. .s3 A .it person is either a user name recognized by .it login (I), in which case the mail is sent to the default working directory of that user; or the path name of a directory, in which case .it .mail in that directory is used. .s3 When a user logs in he is informed of the presence of mail. No mail will be received from a sender ton as .bd s if the file has set-user-ID mode. .s3 The last character of the mode is normally blank but is printed as ``t'' if the 1000 bit of the mode is on. See .it "chmod (I)" for the current meaning of this mode. .sh FILES /etc/passwd to get user ID's for \fBls \*-l\fR. .sh BUGS enced routine must appear after the referencing routine in the library. Thus the order of programs within libraries is important. .s3 .it Ld understands several flag arguments which are written preceded by a `\*-'. Except for \fB\*-l\fR, they should appear before the file names. .s3 .lp +4 4 \fB\*-s\fR `squash' the output, that is, remove the symbol table and relocation bits to save space (but impair the usefulness of the debugger). This information can also be removed by .it strip. .s3 .lp +4 4 \fB\*-u\fR  whom .it .mail is inaccessible or unwritable. .sh FILES /etc/passwd to identify sender and locate persons .br /etc/utmp to identify sender .br .li .mail input mail .br mbox saved mail .br /tmp/m# temp file .sh "SEE ALSO" write (I) .sh BUGS .th LOGIN I 3/15/72 .sh NAME login \*- sign onto UNIX .sh SYNOPSIS .bd login [ username ] .sh DESCRIPTION The .it login command is used when a user initially signs onto UNIX, or it may be used at any time to change from one user to another. The latter case is the one summarized above and described here. See `How to Get Started' for how to dial up initially. .s3 If .it login is invoked without an argument, it asks for a user name, and, if appropriate, a password. Echoing is turned off (if possible) during take the following argument as a symbol and enter it as undefined in the symbol table. This is useful for loading wholly from a library, since initially the symbol table is empty and an unresolved reference is needed to force the loading of the first routine. .s3 .lp +4 4 \fB\*-l\fR This option is an abbreviation for a library name. \fB\*-l\fR alone stands for `/lib/liba.a', which is the standard system library for assembly language programs. \fB\*-l\fIx\fR stands for `/lib/lib\fIx\fR.a' where \fIx\fR is a.th LS I 3/20/74 .sh NAME ls \*- list contents of directory .sh SYNOPSIS .bd ls [ .bd \*-ltasdruifg ] name ... .sh DESCRIPTION For each directory argument, .it ls lists the contents of the directory; for each file argument, .it ls repeats its name and any other information requested. The output is sorted alphabetically by default. When no argument is given, the current directory is listed. When several arguments are given, the arguments are first sorted appropriately, but file arguments appear before direthe typing of the password, so it will not appear on the written record of the session. .s3 After a successful login, accounting files are updated and the user is informed of the existence of .it .mail and message-of-the-day files. .it Login initializes the user and group IDs and the working directory, then executes a command interpreter (usually .it sh (I)) according to specifications found in a password file. .s3 Login is recognized by the Shell and executed directly (without forking). .sh FILES /etc/utmpny character. A library is searched when its name is encountered, so the placement of a \fB\*-l\fR is significant. .s3 .lp +4 4 \fB\*-x\fR do not preserve local (non-.globl) symbols in the output symbol table; only enter external symbols. This option saves some space in the output file. .s3 .lp +4 4 \fB\*-X\fR Save local symbols except for those whose names begin with `L'. This option is used by .it cc to discard internally generated labels while retaining symbols local to routines. .s3 .lp +4 4 \fB\*-r\fR ctories and their contents. There are several options: .s3 .lp +4 4 \fB\*-l\fR list in long format, giving mode, number of links, owner, size in bytes, and time of last modification for each file. (See below.) If the file is a special file the size field will instead contain the major and minor device numbers. .s3 .lp +4 4 \fB\*-t\fR sort by time modified (latest first) instead of by name, as is normal .s3 .lp +4 4 \fB\*-a\fR list all entries; usually those beginning with `\fB.\fR' are suppressed .s3 .lp +4 accounting .br /usr/adm/wtmp accounting .br .li .mail mail .br /etc/motd message-of-the-day .br /etc/passwd password file .sh "SEE ALSO" init (VIII), getty (VIII), mail (I), passwd (I), passwd (V) .sh DIAGNOSTICS `login incorrect,' if the name or the password is bad. `No Shell,', `cannot open password file,' `no directory': consult a UNIX programming counselor. .sh BUGS generate relocation bits in the output file so that it can be the subject of another .it ld run. This flag also prevents final definitions from being given to common symbols, and suppresses the `undefined symbol' diagnostics. .s3 .lp +4 4 \fB\*-d\fR force definition of common storage even if the .bd \*-r flag is present. .s3 .lp +4 4 \fB\*-n\fR Arrange that when the output file is executed, the text portion will be read-only and shared among all users executing the file. This involves moving the data areas  4 \fB\*-s\fR give size in blocks for each entry .s3 .lp +4 4 \fB\*-d\fR if argument is a directory, list only its name, not its contents (mostly used with .bd \*-l to get status on directory) .s3 .lp +4 4 \fB\*-r\fR reverse the order of sort to get reverse alphabetic or oldest first as appropriate .s3 .lp +4 4 \fB\*-u\fR use time of last access instead of last modification for sorting (\fB\*-t\fR) or printing (\fB\*-l\fR) .s3 .lp +4 4 \fB\*-i\fR print i-number in first column of the report for each file li.th LN I 3/15/72 .sh NAME ln \*- make a link .sh SYNOPSIS .bd ln name1 [ name2 ] .sh DESCRIPTION A link is a directory entry referring to a file; the same file (together with its size, all its protection information, etc) may have several links to it. There is no way to distinguish a link to a file from its original directory entry; any changes in the file are effective independently of the name by which the file is known. .s3 .it Ln creates a link to an existing file .it name1. If .it name2 is given, theup the the first possible 4K word boundary following the end of the text. .s3 .lp +4 4 \fB\*-i\fR When the output file is executed, the program text and data areas will live in separate address spaces. The only difference between this option and .bd \-n is that here the data starts at location 0. .i0 .dt .sh FILES /lib/lib?.a libraries .br a.out output file .sh "SEE ALSO" as (I), ar (I) .sh BUGS sted .s3 .lp +4 4 \fB\*-f\fR force each argument to be interpreted as a directory and list the name found in each slot. This option turns off .bd "\*-l, \*-t, \*-s," and .bd \*-r, and turns on .bd \*-a; the order is the order in which entries appear in the directory. .s3 .lp +4 4 \fB\-g\fR Give group ID instead of owner ID in long listing. .s3 .i0 The mode printed under the .bd \*-l option contains 11 characters which are interpreted as follows: the first character is .s3 .lp +3 3 \fBd\fR if the entry is a  link has that name; otherwise it is placed in the current directory and its name is the last component of .it name1. .s3 It is forbidden to link to a directory or to link across file systems. .sh "SEE ALSO" rm (I) .sh BUGS There is nothing particularly wrong with .it ln, but .it tp doesn't understand about links and makes one copy for each name by which a file is known; thus if the tape is extracted several copies are restored and the information that links were involved is lost. .th KILL I 2/8/75 .sh NAME kill \*- terminate a process .sh SYNOPSIS .bd kill [ \fB\*-\fRsigno ] processid ... .sh DESCRIPTION Kills the specified processes. The process number of each asynchronous process started with `&' is reported by the Shell. Process numbers can also be found by using \fIps\fR (I). .s3 If process number 0 is used, then all processes belonging to the current user and associated with the same control typewriter are killed. .s3 The killed process must belong to the current user unless he is the super-user. .s3 If a signal number preceded by ``\*-'' is given as first argument, that signal is sent instead of .it kill (see .it "signal (II))." .sh "SEE ALSO" ps (I), sh (I), signal (II) .sh BUGS a do-nothing command that is ignored by the Shell and only serves to place a label. .sh "SEE ALSO" sh (I) .sh BUGS   #&).th IF I 5/2/74 .sh NAME if \*- conditional command .sh SYNOPSIS .bd if expr command [ arg ... ] .sh DESCRIPTION .it If evaluates the expression .it expr, and if its value is true, executes the given .it command with the given arguments. .s3 The following primitives are used to construct the .it expr: .s3 .lp +13 13 \fB\*-r\fR file true if the file exists and is readable. .s3 .lp +13 13 \fB\*-w \fRfile true if the file exists and is writable. .s3 .lp +13 13 s1 \fB= \fRs2 true if the strings .it s1 and .it .th FIND I 5/15/74 .sh NAME find \*- find files .sh SYNOPSIS .bd find pathname expression .sh DESCRIPTION .it Find recursively descends the directory hierarchy from .it pathname seeking files that match a boolean .it expression written in the primaries given below. In the descriptions, the argument .it n is used as a decimal integer where .it +n means more than .it n, .it \*-n means less than .it n and .it n means exactly .it n. .s3 .lp +16 16 \fB\*-name\fR filename True if the .it filename argument matches.th FC I 8/20/73 .sh NAME fc \*- Fortran compiler .sh SYNOPSIS .bd fc [ .bd \*-c ] sfile1.f ... ofile1 ... .sh DESCRIPTION .it Fc is the UNIX Fortran compiler. It accepts three types of arguments: .s3 Arguments whose names end with `.f' are assumed to be Fortran source program units; they are compiled, and the object program is left on the file sfile1.o (i.e. the file whose name is that of the source with `.o' substituted for `.f'). .s3 Other arguments (except for \fB\*-c\fR) are assumed to be either loaders2 are equal. .s3 .lp +13 13 s1 \fB!= \fRs2 true if the strings .it s1 and .it s2 are not equal. .s3 .lp +13 13 \fB{ \fRcommand \fB}\fR The bracketed command is executed to obtain the exit status. Status zero is considered .it true. The command must not be another .it if. .s3 .i0 These primaries may be combined with the following operators: .s3 .lp +13 13 \fB!\fR unary negation operator .s3 .lp +13 13 \fB\*-a\fR binary .it and operator .s3 .lp +13 13 \fB\*-o\fR binary .it or operator .s3 .lp +13 13 \fB( \fR the current file name. Normal .it Shell argument syntax may be used if escaped (watch out for `[', `?' and `*'). .s3 .lp +16 16 \fB\*-perm\fR onum \c True if the file permission flags exactly match the octal number .it onum (see chmod(I)). If .it onum is prefixed by a minus sign, more flag bits (017777, see stat(II)) become significant and the flags are compared: .it "(flags&onum)==onum." .s3 .lp +16 16 \fB\*-type\fI c\fR True if the type of the file is .it c, where .it c is .bd "b, c, d" or .bd f for blo flags, or object programs, typically produced by an earlier .it fc run, or perhaps libraries of Fortran-compatible routines. These programs, together with the results of any compilations specified, are loaded (in the order given) to produce an executable program with name .bd a.out. .s3 The .bd \*-c argument suppresses the loading phase, as does any syntax error in any of the routines being compiled. .s3 The following is a list of differences between .it fc and ANSI standard Fortran (also see the BUGS sectexpr\fB )\fR parentheses for grouping. .s3 .i0 .bd \*-a has higher precedence than .bd \*-o. Notice that all the operators and flags are separate arguments to .it if and hence must be surrounded by spaces. Notice also that parentheses are meaningful to the Shell and must be escaped. .sh "SEE ALSO" sh (I), find (I) .sh BUGS ck special file, character special file, directory or plain file. .s3 .lp +16 16 \fB\*-links\fI n\fR \c True if the file has .it n links. .s3 .lp +16 16 \fB\*-user\fR uname \c True if the file belongs to the user .it uname. .s3 .lp +16 16 \fB\*-group\fR gname \c As it is for .bd \*-user so shall it be for .bd \*-group (someday). .s3 .lp +16 16 \fB\*-size\fI n\fR \c True if the file is .it n blocks long (512 bytes per block). .s3 .lp +16 16 \fB\*-atime\fI n\fR \c True if the file has been accessed in .it n dion): .s3 .lp +4 4 1. Arbitrary combination of types is allowed in expressions. Not all combinations are expected to be supported at runtime. All of the normal conversions involving integer, real, double precision and complex are allowed. .s3 .lp +4 4 2. Two forms of ``implicit'' statements are recognized: .bd "implicit integer /i\*-n/", or .bd "implicit integer (i\-n)." .s3 .lp +4 4 3. The types doublecomplex, logical*1, integer*1, integer*2, integer*4 (same as integer), real*4 (real), and real*8 (double .th GREP I 5/15/74 .sh NAME grep \*- search a file for a pattern .sh SYNOPSIS .bd grep [ .bd \*-v ] [ .bd \*-b ] [ .bd \*-c ] [ .bd \*-n ] expression [ file ] ... .sh DESCRIPTION .it Grep searches the input files (standard input default) for lines matching the regular expression. Normally, each line found is copied to the standard output. If the .bd \*-v flag is used, all lines but those matching are printed. If the .bd \*-c flag is used, only a count of matching lines is printed. If the .bd \*-n flag is usays. .s3 .lp +16 16 \fB\*-mtime\fI n\fR \c True if the file has been modified in .it n days. .s3 .lp +16 16 \fB\*-exec\fR command \c True if the executed command returns exit status zero (most commands do). The end of the command is punctuated by an escaped semicolon. A command argument `{}' is replaced by the current pathname. .s3 .lp +16 16 \fB\*-ok\fR command \c Like .bd \*-exec except that the generated command line is printed with a question mark first, and is executed only if the user responds \fBy\fRprecision) are supported. .s3 .lp +4 4 4. \fB&\fR as the first character of a line signals a continuation card. .s3 .lp +4 4 5. \fBc\fR as the first character of a line signals a comment. .s3 .lp +4 4 6. All keywords are recognized in lower case. .s3 .lp +4 4 7. The notion of `column 7' is not implemented. .s3 .lp +4 4 8. G-format input is free form\*- leading blanks are ignored, the first blank after the start of the number terminates the field. .s3 .lp +4 4 9. A comma in any numeric or logical input fielded, each line is preceded its relative line number in the file. If the .bd \*-b flag is used, each line is preceded by the block number on which it was found. This is sometimes useful in locating disk block numbers by context. .s3 In all cases the file name is shown if there is more than one input file. .s3 For a complete description of the regular expression, see ed (I). Care should be taken when using the characters $ * [ ^ | ( ) and \\ in the regular expression as they are also meaningful to the Shell. I. .s3 .lp +16 16 \fB\*-print\fR \c Always true; causes the current pathname to be printed. .s3 .i0 The primaries may be combined with these operators (ordered by precedence): .s3 .lp +16 16 \fB!\fR prefix .it not .s3 .lp +16 16 \fB\*-a\fR infix .it and, second operand evaluated only if first is true .s3 .lp +16 16 \fB\*-o\fR infix .it or, second operand evaluated only if first is false .s3 .lp +16 16 \fB( \fRexpression\fB )\fR parentheses for grouping. (Must be escaped.) .s3 .i0 To remove files named `a.o terminates the field. .s3 .lp +4 4 10. There is no carriage control on output. .s3 .lp +4 4 11. A sequence of .it n characters in double quotes `"' is equivalent to .it n .bd h followed by those characters. .s3 .lp +4 4 12. In .bd data statements, a hollerith string may initialize an array or a sequence of array elements. .s3 .lp +4 4 13. The number of storage units requested by a binary .bd read must be identical to the number contained in the record being read. .s3 .lp +4 4 14. If the first character in t is generally necessary to enclose the entire .it expression argument in quotes. .sh "SEE ALSO" ed (I), sh (I) .sh BUGS Lines are limited to 256 characters; longer lines are truncated. ut' and `*.o' not accessed for a week: .s3 .lp +.5i 0 find / "(" \*-name a.out \*-o \*-name "*.o" ")" \*-a \*-atime +7 \*-a \*-exec rm {} ";" .i0 .sh FILES /etc/passwd .sh "SEE ALSO" sh (I), if(I), file system (V) .sh BUGS There is no way to check device type. .br Syntax should be reconciled with .it if. an input file is ``#'', a preprocessor identical to the C preprocessor is called, which implements ``#define'' and ``#include'' preprocessor statements. (See the C reference manual for details.) The preprocessor does not recognize Hollerith strings written with \fIn\*|\fBh\fR. .s3 .i0 In I/O statements, only unit numbers 0-19 are supported. Unit number .it n refers to file fort\fInn;\fR (e.g. unit 9 is file `fort09'). For input, the file must exist; for output, it will be created. Unit 5 is permanently asso.th GOTO I 3/15/72 .sh NAME goto \*- command transfer .sh SYNOPSIS .bd goto label .sh DESCRIPTION .it Goto is allowed only when the Shell is taking commands from a file. The file is searched from the beginning for a line beginning with `:' followed by one or more spaces followed by the .it label. If such a line is found, the .it goto command returns. Since the read pointer in the command file points to the line after the label, the effect is to cause the Shell to transfer to the labelled line. .s3 `:' is .th FILE I 1/16/75 .sh NAME file \*- determine file type .sh SYNOPSIS .bd file file ... .sh DESCRIPTION .it File performs a series of tests on each argument in an attempt to classify it. If an argument appears to be ascii, .it file examines the first 512 bytes and tries to guess its language. .sh BUGS ciated with the standard input file; unit 6 with the standard output file. Also see .it setfil (III) for a way to associate unit numbers with named files. .sh FILES .ta 1.5i .nf a.out loaded output f.tmp[123] temporary (deleted) /usr/fort/fc1 compiler proper /lib/fr0.o runtime startoff /lib/filib.a interpreter library /lib/libf.a builtin functions, etc. /lib/liba.a system library .fi .sh "SEE ALSO" rc (I), which announces a more pleasant Fortran dialect; the ANSI standard; ld (I) for loader flags. For some subroutines, try ierror, getarg, setfil (III). .sh DIAGNOSTICS Compile-time diagnostics are given in English, accompanied if possible with the offending line number and source line with an underscore where the error occurred. Runtime diagnostics are given by number as follows: .s3 .lp +5 5 1 invalid log argument .lp +5 5 2 bad arg count to amod .lp +5 5 3 bad arg count to atan2 .lp +5 5 4 excessive argument to cabs .lp +5 5 5 exp too large in cexp .lp +5 5 6 bad arg count to cmplx .lp +5 5 7 bad arg count tade with .bd left and .bd right: .it "left [ x sup 2 + y sup 2 over alpha right ] ~=~1" produces $left [ x sup 2 + y sup 2 over alpha right ] ~=~1$. The .bd right clause is optional. .s3 Vertical piles of things are made with .bd "pile, lpile, cpile," and .bd rpile: .it "pile {a above b above c}" produces $pile {a above b above c}$. There can be an arbitrary number of elements in a pile. .bd lpile left-justifies, .bd pile and .bd cpile center, with different vertical spacing, and .bd rpile right justifiesn specifies a set of strings of characters. A member of this set of strings is said to be .it matched by the regular expression. The regular expressions allowed by .it ed are constructed as follows: .s3 .lp +3 3 1. An ordinary character (not one of those discussed below)\| is a regular expression and matches that character. .s3 .lp +3 3 2. A circumflex `^' at the beginning of a regular expression matches the empty string at the beginning of a line. .s3 .lp +3 3 3. A currency symbol `$' at the end of a regulo dim .lp +5 5 8 excessive argument to exp .lp +5 5 9 bad arg count to idim .lp +5 5 10 bad arg count to isign .lp +5 5 11 bad arg count to mod .lp +5 5 12 bad arg count to sign .lp +5 5 13 illegal argument to sqrt .lp +5 5 14 assigned/computed goto out of range .lp +5 5 15 subscript out of range .lp +5 5 16 real**real overflow .lp +5 5 17 (negative real)**real .lp +5 5 100 illegal I/O unit number .lp +5 5 101 inconsistent use of I/O unit .lp +5 5 102 cannot create output file .lp +5 5 103 cannot open input. .s3 .vs 12p Diacritical marks are made with .bd dot, .bd dotdot, .bd hat, .bd bar: .it "x dot = f(t) bar" is $x dot = f(t) bar$. Default sizes and fonts can be changed with .bd "size n" and various of .bd roman, .bd italic, and .bd bold. .s3 Keywords like .it sum .EQ ( sum ) .EN .it int .EQ ( int ) .EN .it inf .EQ ( inf ) .EN and shorthands like >= .EQ (>=) .EN \*-> .EQ (->), .EN != .EQ ( != ), .EN are recognized. Spell out Greek letters in the desired case, as in .it "alpha, GAMMA." Mathematical words lar expression matches the null character at the end of a line. .s3 .lp +3 3 4. A period `\fB.\fR' matches any character except a new-line character. .s3 .lp +3 3 5. A regular expression followed by an asterisk `*' matches any number of adjacent occurrences (including zero)\| of the regular expression it follows. .s3 .lp +3 3 6. A string of characters enclosed in square brackets `[ ]' matches any character in the string but no others. If, however, the first character of the string is a circumflex `^' the reg file .lp +5 5 104 EOF on input file .lp +5 5 105 illegal character in format .lp +5 5 106 format does not begin with ( .lp +5 5 107 no conversion in format but non-empty list .lp +5 5 108 excessive parenthesis depth in format .lp +5 5 109 illegal format specification .lp +5 5 110 illegal character in input field .lp +5 5 111 end of format in hollerith specification .lp +5 5 112 bad argument to setfil .lp +5 5 120 bad argument to ierror .lp +5 5 999 unimplemented input conversion .i0 .sh BUGS The following ike sin, cos, log are made Roman automatically. Troff (I) four-character escapes like \\(bs (\(bs) can be used anywhere. Strings enclosed in double quotes "..." are passed through untouched. .sh "SEE ALSO" A System for Typesetting Mathematics (Computer Science Technical Report #17, Bell Laboratories, 1974.) .br TROFF Users' Manual (internal memorandum) .br TROFF Made Trivial (internal memorandum) .br troff (I), neqn (I) .sh BUGS Undoubtedly. Watch out for small or large point sizes \*- it's tuned too well fular expression matches any character except new-line and the characters in the string. .s3 .lp +3 3 7. The concatenation of regular expressions is a regular expression which matches the concatenation of the strings matched by the components of the regular expression. .s3 .lp +3 3 8. A regular expression enclosed between the sequences `\\(' and `\\)'is identical to the unadorned expression; the construction has side effects discussed under the .it s command. .s3 .lp +3 3 9. The null regular expression standis a list of those features not yet implemented: .br arithmetic statement functions .br scale factors on input .br .bd Backspace statement. or size 10. Be cautious if inserting horizontal or vertical motions, and of backslashes in general. ing alone is equivalent to the last regular expression encountered. .s3 .i0 Regular expressions are used in addresses to specify lines and in one command (see .it s below)\| to specify a portion of a line which is to be replaced. If it is desired to use one of the regular expression metacharacters as an ordinary character, that character may be preceded by `\\'. This also applies to the character bounding the regular expression (often `/')\| and to `\\' itself. .s3 To understand addressing in .it ed it is n.th EXIT I 3/15/72 .sh NAME exit \*- terminate command file .sh SYNOPSIS .bd exit .sh DESCRIPTION .it Exit performs a .bd seek to the end of its standard input file. Thus, if it is invoked inside a file of commands, upon return from .it exit the shell will discover an end-of-file and terminate. .sh "SEE ALSO" if (I), goto (I), sh (I) .sh BUGS 036"%(+.1478;>ADGJM9<?BEHKN:ecessary to know that at any time there is a \fIcurrent line.\fR Generally speaking, the current line is the last line affected by a command; however, the exact effect on the current line is discussed under the description of the command. Addresses are constructed as follows. .s3 .lp +6 3 1. The character `\fB.\fR' addresses the current line. .s3 .lp +6 3 2. The character `$' addresses the last line of the buffer. .s3 .lp +6 3 3. A decimal number .it n addresses the \fIn\fR-th line of the buffer. .s3 .lp +6.EQ delim $$ .EN .th EQN I 2/22/74 .sh NAME eqn \*- typeset mathematics .sh SYNOPSIS .bd eqn [ file ] ... .sh DESCRIPTION .it Eqn is a troff (I) preprocessor for typesetting mathematics on the Graphics Systems phototypesetter. Usage is almost always .s3 eqn file ... | troff .s3 If no files are specified, .it eqn reads from the standard input. A line beginning with ``.EQ'' marks the start of an equation; the end of an equation is marked by a line beginning with ``.EN''. Neither of these lines is altered .th ED I 1/15/73 .if t .ds q \(aa .if n .ds q ' .sh NAME ed \*- text editor .sh SYNOPSIS .bd ed [ .bd \*- ] [ name ] .sh DESCRIPTION .it Ed is the standard text editor. .s3 If a .it name argument is given, .it ed simulates an .it e command (see below)\| on the named file; that is to say, the file is read into .it ed's buffer so that it can be edited. The optional .bd \*- suppresses the printing of character counts by .it e, .it r, and .it w commands. .s3 .it Ed operates on a copy of any file it is editing;  3 4. `\*q\fIx\fR' addresses the line marked with the mark name character \fIx\fR, which must be a lower-case letter. Lines are marked with the .it k command described below. .s3 .lp +6 3 5. A regular expression enclosed in slashes `/' addresses the first line found by searching toward the end of the buffer and stopping at the first line containing a string matching the regular expression. If necessary the search wraps around to the beginning of the buffer. .s3 .lp +6 3 6. A regular expression enclosed in qor defined by .it eqn, so you can define them yourself to get centering, numbering, etc. All other lines are treated as comments, and passed through untouched. .s3 Spaces, tabs, newlines, braces, double quotes, tilde and circumflex are the only delimiters. Braces ``{}'' are used for grouping. Use tildes ``~'' to get extra spaces in an equation. .s3 .vs 13p Subscripts and superscripts are produced with the keywords .bd sub and .bd sup. Thus .it "x sub i" makes $x sub i$, .it "a sub i sup 2" produces $a subchanges made in the copy have no effect on the file until a \fIw\fR (write)\| command is given. The copy of the text being edited resides in a temporary file called the .it buffer. There is only one buffer. .s3 Commands to .it ed have a simple and regular structure: zero or more .it addresses followed by a single character .it command, possibly followed by parameters to the command. These addresses specify one or more lines in the buffer. Every command which requires addresses has default addresses, so thaueries `?' addresses the first line found by searching toward the beginning of the buffer and stopping at the first line containing a string matching the regular expression. If necessary the search wraps around to the end of the buffer. .s3 .lp +6 3 7. An address followed by a plus sign `+' or a minus sign `\*-' followed by a decimal number specifies that address plus (resp. minus)\| the indicated number of lines. The plus sign may be omitted. .s3 .lp +6 3 8. If an address begins with `+' or `\-' the additi i sup 2$, and .it "e sup {x sup 2 + y sup 2}" gives $e sup {x sup 2 + y sup 2}$. Fractions are made with .bd over. .it "a over b" is $a over b$ and .it "1 over sqrt {ax sup 2 +bx+c}" is $1 over sqrt {ax sup 2 +bx+c}$ . .bd sqrt makes square roots. .s3 The keywords .bd from and .bd to introduce lower and upper limits on arbitrary things: $lim from {n-> inf} sum from 0 to n x sub i$ is made with .it "lim from {n-> inf} sum from 0 to n x sub i." Left and right brackets, braces, etc., of the right height are mt the addresses can often be omitted. .s3 In general, only one command may appear on a line. Certain commands allow the input of text. This text is placed in the appropriate place in the buffer. While .it ed is accepting text, it is said to be in \fIinput mode.\fR In this mode, no commands are recognized; all input is merely collected. Input mode is left by typing a period `\fB.\fR' alone at the beginning of a line. .s3 .it Ed supports a limited form of .it "regular expression" notation. A regular expressioon or subtraction is taken with respect to the current line; e.g. `\-5' is understood to mean `\fB.\fR\-5'. .s3 .lp +6 3 9. If an address ends with `+' or `\-', then 1 is added (resp. subtracted). As a consequence of this rule and rule 8, the address `\-' refers to the line before the current line. Moreover, trailing `+' and `\-' characters have cumulative effect, so `\-\-' refers to the current line less 2. .s3 .lp +6 3 10. To maintain compatibility with earlier version of the editor, the character `^' in addresses is entirely equivalent to `\-'. .s3 .i0 Commands may require zero, one, or two addresses. Commands which require no addresses regard the presence of an address as an error. Commands which accept one or two addresses assume default addresses when insufficient are given. If more addresses are given than such a command requires, the last one or two (depending on what is accepted)\| are used. .s3 Addresses are separated from each other typically by a comma `\fB,\fR'. They may also be separated by a seAn .it l command may follow any other on the same line. .s3 .lp +5 5 ( \fB. \fR, \fB. \fR)\|m\fIa\fR .br The move command repositions the addressed lines after the line addressed by .it a. The last of the moved lines becomes the current line. .s3 .lp +5 5 ( \fB. \fR, \fB. \fR)\|p .br The print command prints the addressed lines. `\fB.\fR' is left at the last line printed. The .it p command may be placed on the same line after any command. .s3 .lp +5 5 q .br The quit command causes .it ed to exit. No automatmmand list, 64 characters per file name, and 128K characters in the temporary file. The limit on the number of lines depends on the amount of core: each line takes 1 word. .sh FILES /tmp/#, temporary; `#' is the process number (in octal). .sh DIAGNOSTICS `?' for errors in commands; `TMP' for temporary file overflow. .sh "SEE ALSO" A Tutorial Introduction to the ED Text Editor (B. W. Kernighan) .sh BUGS The .it s command causes all marks to be lost on lines changed. micolon `\fB;\fR'. In this case the current line `\fB.\fR' is set to the previous address before the next address is interpreted. This feature can be used to determine the starting line for forward and backward searches (`/', `?')\|. The second address of any two-address sequence must correspond to a line following the line corresponding to the first address. .s3 In the following list of .it ed commands, the default addresses are shown in parentheses. The parentheses are not part of the address, but are useic write of a file is done. .s3 .lp +5 5 ($)\|r filename .br The read command reads in the given file after the addressed line. If no file name is given, the remembered file name, if any, is used (see .it e and .it f commands)\|. The remembered file name is not changed unless `filename' is the very first file name mentioned. Address `0' is legal for .it r and causes the file to be read at the beginning of the buffer. If the read is successful, the number of characters read is typed. `\fB.\fR' is left at the.th ECHO I 3/15/72 .sh NAME echo \*- echo arguments .sh SYNOPSIS .bd echo [ arg ... ] .sh DESCRIPTION .it Echo writes its arguments in order as a line on the standard output file. It is mainly useful for producing diagnostics in command files. .sh BUGS d to show that the given addresses are the default. .s3 As mentioned, it is generally illegal for more than one command to appear on a line. However, any command may be suffixed by `p' or by `l', in which case the current line is either printed or listed respectively in the way discussed below. .s3 .lp +5 5 ( \fB. \fR)\|a .lp +5 5 .lp +5 5 .li \fB.\fR .lp +5 5 The append command reads the given text and appends it after the addressed line. `\fB.\fR' is left on the last line input, if there were any, last line read in from the file. .s3 .lp +5 5 ( \fB. \fR, \fB. \fR)\|s/regular expression/replacement/ or, .lp +5 5 ( \fB. \fR, \fB. \fR)\|s/regular expression/replacement/g .br The substitute command searches each addressed line for an occurrence of the specified regular expression. On each line in which a match is found, all matched strings are replaced by the replacement specified, if the global replacement indicator `g' appears after the command. If the global indicator does not appear, only th.th DU I 1/20/73 .sh NAME du \*- summarize disk usage .sh SYNOPSIS .bd du [ .bd \*-s ] [ .bd \*-a ] [ name ... ] .sh DESCRIPTION .it Du gives the number of blocks contained in all files and (recursively) directories within each specified directory or file .it name. If .it name is missing, `\fB.\fR' is used. .s3 The optional argument .bd \*-s causes only the grand total to be given. The optional argument .bd \*-a causes an entry to be generated for each file. Absence of either causes an entry to be generat otherwise at the addressed line. Address `0' is legal for this command; text is placed at the beginning of the buffer. .s3 .lp +5 5 ( \fB. \fR, \fB. \fR)\|c .lp +5 5 .lp +5 5 .li \fB.\fR .lp +5 5 The change command deletes the addressed lines, then accepts input text which replaces these lines. `\fB.\fR' is left at the last line input; if there were none, it is left at the first line not deleted. .s3 .lp +5 5 ( \fB. \fR, \fB. \fR)\| d .br The delete command deletes the addressed lines from the buffe first occurrence of the matched string is replaced. It is an error for the substitution to fail on all addressed lines. Any character other than space or new-line may be used instead of `/' to delimit the regular expression and the replacement. `\fB.\fR' is left at the last line substituted. .s2 An ampersand `&' appearing in the replacement is replaced by the string matching the regular expression. The special meaning of `&' in this context may be suppressed by preceding it by `\\'. As a more general feated for each directory only. .s3 A file which has two links to it is only counted once. .sh BUGS Non-directories given as arguments (not under .bd \*-a option) are not listed. .s3 Removable file systems do not work correctly since i-numbers may be repeated while the corresponding files are distinct. .it Du should maintain an i-number list per root directory encountered. er. The line originally after the last line deleted becomes the current line; if the lines deleted were originally at the end, the new last line becomes the current line. .s3 .lp +5 5 e filename .br The edit command causes the entire contents of the buffer to be deleted, and then the named file to be read in. `\fB.\fR' is set to the last line of the buffer. The number of characters read is typed. `filename' is remembered for possible use as a default file name in a subsequent .it r or .it w command. .s3 .lpure, the characters `\\\fIn\fR', where .it n is a digit, are replaced by the text matched by the \fIn\fR-th regular subexpression enclosed between `\\(' and `\\)'. When nested, parenthesized subexpressions are present, .it n is determined by counting occurrences of `\\(' starting from the left. .s2 Lines may be split by substituting new-line characters into them. The new-line in the replacement string must be escaped by preceding it by `\\'. .s3 .lp +5 5 ( \fB.\fR , \fB.\fR ) t \fIa\fR .br This command acts.th DSW I 3/15/72 .sh NAME dsw \*- delete interactively .sh SYNOPSIS .bd dsw [ directory ] .sh DESCRIPTION For each file in the given directory (`\fB.\fR' if not specified) .it dsw types its name. If .bd y is typed, the file is deleted; if .bd x, .it dsw exits; if new-line, the file is not deleted; if anything else, .it dsw asks again. .sh "SEE ALSO" rm (I) .sh BUGS The name .it dsw is a carryover from the ancient past. Its etymology is amusing.  +5 5 f filename .br The filename command prints the currently remembered file name. If `filename' is given, the currently remembered file name is changed to `filename'. .s3 .lp +5 5 (1,$)\|g/regular expression/command list .br In the global command, the first step is to mark every line which matches the given regular expression. Then for every such line, the given command list is executed with `\fB.\fR' initially set to that line. A single command or the first of multiple commands appears on the same line  just like the .it m command, except that a copy of the addressed lines is placed after address .it a (which may be 0). `\fB.\fR' is left on the last line of the copy. .s3 .lp +5 5 (1,$)\|v/regular expression/command list .br This command is the same as the global command except that the command list is executed with `\fB.\fR' initially set to every line .it except those matching the regular expression. .s3 .lp +5 5 (1,$)\|w filename .br The write command writes the addressed lines onto the given file. If t.th DIFF I 5/15/74 .sh NAME diff \*- differential file comparator .sh SYNOPSIS .bd diff [ .bd \*- ] name1 name2 .sh DESCRIPTION .it Diff tells what lines must be changed in two files to bring them into agreement. The normal output contains lines of these forms: .s3 .lp +5 0 .it n1 a .it n3,n4 .br .it n1,n2 d .it n3 .br .it n1,n2 c .it n3,n4 .s3 .i0 These lines resemble .it ed commands to convert file .it name1 into file .it name2. The numbers after the letters pertain to file .it name2. In fact, by exchangiwith the global command. All lines of a multi-line list except the last line must be ended with `\\'. .it A, .it i, and .it c commands and associated input are permitted; the `\fB.\fR' terminating input mode may be omitted if it would be on the last line of the command list. The (global)\| commands, .it g, and .it v, are not permitted in the command list. .s3 .lp +5 5 ( \fB. \fR)\|i .lp +5 5 .lp +5 5 .li \fB.\fR .br This command inserts the given text before the addressed line. `\fB.\fR' is left at the file does not exist, it is created mode 666 (readable and writeable by everyone)\|. The remembered file name is .it not changed unless `filename' is the very first file name mentioned. If no file name is given, the remembered file name, if any, is used (see .it e and .it f commands)\|. `\fB.\fR' is unchanged. If the command is successful, the number of characters written is typed. .s3 .lp +5 5 ($)\|= .br The line number of the addressed line is typed. `\fB.\fR' is unchanged by this command. .s3 .lp +5 5 ng `a' for `d' and reading backward one may ascertain equally how to convert file .it name2 into .it name1. As in .it ed, identical pairs where .it n1 = .it n2 or .it n3 = .it n4 are abbreviated as a single number. .s3 Following each of these lines come all the lines that are affected in the first file flagged by `*', then all the lines that are affected in the second file flagged by `\fB.\fR'. .s3 Under the \fB\*-\fR option, the output of .it diff is a script of .it "a, c" and .it d commands for the edhe last line input; if there were none, at the addressed line. This command differs from the .it a command only in the placement of the text. .s3 .lp +5 5 ( \fB. \fR)\|k\fIx\fR .br The mark command marks the addressed line with name .it x, which must be a lower-case letter. The address form `\*q\fIx\fR' then addresses this line. .s3 .lp +5 5 ( \fB. \fR, \fB. \fR)\|l .br The list command prints the addressed lines in an unambiguous way: non-graphic characters are printed in octal, and long lines are folded. !UNIX command .br The remainder of the line after the `!' is sent to UNIX to be interpreted as a command. `\fB.\fR' is unchanged. .s3 .lp +5 5 ( \fB.\fR+1 )\| .br An address alone on a line causes the addressed line to be printed. A blank line alone is equivalent to `.+1p'; it is useful for stepping through text. .s3 .i0 If an interrupt signal (ASCII DEL)\| is sent, .it ed prints a `?' and returns to its command level. .s3 Some size limitations: 512 characters per line, 256 characters per global coitor .it ed, which will change the contents of the first file into the contents of the second. In this connection, the following shell program may help maintain multiple versions of a file. Only an ancestral file ($1) and a chain of version-to-version .it ed scripts ($2,$3,...) made by .it diff need be on hand. A `latest version' appears on the standard output. .s3 .lp +5 0 .tr || (cat $2 ... $9; echo "1,$p") \*v ed \*- $1 .s3 .i0 Except for occasional `jackpots', .it diff finds a smallest sufficient set of file differences. .sh "SEE ALSO" cmp (I), comm (I), ed (I) .sh DIAGNOSTICS `jackpot' \*- To speed things up, the program uses hashing. You have stumbled on a case where there is a chance that this has resulted in a difference being called where none actually existed. Sometimes reversing the order of files will make a jackpot go away. .sh BUGS Editing scripts produced under the \fB\*-\fR option are naive about creating lines consisting of a single `\fB.\fR'.  .lp +6 6 number .br The value of the number is pushed on the stack. A number is an unbroken string of the digits 0-9. It may be preceded by an underscore \*_ to input a negative number. Numbers may contain decimal points. .s3 .lp +6 6 + \- * % ^ .br The top two values on the stack are added (+), subtracted (\*-), multiplied (*), divided (/), remaindered (%), or exponentiated (^). The two entries are popped off the stack; the result is pushed on the stack in their place. Any fractional part of an expone.th DB I 8/20/73 .sh NAME db \*- debug .sh SYNOPSIS .bd db [ core [ namelist ] ] [ .bd \*- ] .sh DESCRIPTION Unlike many debugging packages (including DEC's ODT, on which .it db is loosely based), .it db is not loaded as part of the core image which it is used to examine; instead it examines files. Typically, the file will be either a core image produced after a fault or the binary output of the assembler. .it Core is the file being debugged; if omitted \fBcore\fR is assumed. .it Namelist is a file containi.th DD I 5/15/74 .sh NAME dd \*- convert and copy a file .sh SYNOPSIS .bd dd [option=value] ... .sh DESCRIPTION .it Dd copies the specified input file to the specified output with possible conversions. The standard input and output are used by default. The input and output block size may be specified to take advantage of raw physical I/O. .s3 .ft I .lp +15 15 option values .ft R .lp +15 15 if= input file name; standard input is default .lp +15 15 of= output file name; standard output is default .lp +15 15 int is ignored. .s3 .lp +6 6 \fBs\fIx\fR The top of the stack is popped and stored into a register named .it x, where .it x may be any character. If the .bd s is capitalized, .it x is treated as a stack and the value is pushed on it. .s3 .lp +6 6 \fBl\fIx\fR The value in register .it x is pushed on the stack. The register .it x is not altered. All registers start with zero value. If the .bd l is capitalized, register .it x is treated as a stack and its top value is popped onto the main stack. .s3 .lp +6 6 \fng a symbol table. If it is omitted, the symbol table is obtained from the file being debugged, or if not there from .bd a.out. If no appropriate name list file can be found, .it db can still be used but some of its symbolic facilities become unavailable. .s3 For the meaning of the optional third argument, see the last paragraph below. .s3 The format for most .it db requests is an address followed by a one character command. Addresses are expressions built up as follows: .s3 .lp +4 3 1. A name has the valuebs= input block size (default 512) .lp +15 15 obs= output block size (default 512) .lp +15 15 bs= set both input and output block size, superseding .it ibs and .it obs; also, if no conversion is specified, it is particularly efficient since no copy need be done .lp +15 15 cbs=\fIn\fR conversion buffer size .lp +15 15 skip=\fIn\fR skip \fIn\fR input records before starting copy .lp +15 15 count=\fIn\fR copy only \fIn\fR input records .lp +15 15 conv=ascii convert EBCDIC to ASCII .lp +15 10 ebcdic convert ASCBd\fR The top value on the stack is duplicated. .s3 .lp +6 6 \fBp\fR The top value on the stack is printed. The top value remains unchanged. .s3 .lp +6 6 \fBf\fR All values on the stack and in registers are printed. .s3 .lp +6 6 \fBq\fR exits the program. If executing a string, the recursion level is popped by two. If .bd q is capitalized, the top value on the stack is popped and the string execution level is popped by that value. .s3 .lp +6 6 \fBx\fR treats the top element of the stack as a character strin assigned to it when the input file was assembled. It may be relocatable or not depending on the use of the name during the assembly. .s3 .lp +4 3 2. An octal number is an absolute quantity with the appropriate value. .s3 .lp +4 3 3. A decimal number immediately followed by `\fB.\fR' is an absolute quantity with the appropriate value. .s3 .lp +4 3 4. An octal number immediately followed by \fBr\fR is a relocatable quantity with the appropriate value. .s3 .lp +4 3 5. The symbol \fB.\fR indicates the current II to EBCDIC .lp +15 10 lcase map alphabetics to lower case .lp +15 10 ucase map alphabetics to upper case .lp +15 10 swab swap every pair of bytes .lp +15 10 noerror do not stop processing on an error .lp +15 10 sync pad every input record to \fIibs\fR .lp +15 10 .li ... , ... several comma-separated conversions .i0 .s3 .fi Where sizes are specified, a number of bytes is expected. A number may end with .bd "k, b" or .bd w to specify multiplication by 1024, 512, or 2 respectively. Also a pair of numbers mayg and executes it as a string of dc commands. .s3 .lp +6 6 \fB[ ... ]\fR puts the bracketed ascii string onto the top of the stack. .s3 .lp +6 6 \fIx =x\fR .br The top two elements of the stack are popped and compared. Register .it x is executed if they obey the stated relation. .s3 .lp +6 6 \fBv\fR replaces the top element on the stack by its square root. Any existing fractional part of the argument is taken into account, but otherwise the scale factor is ignored. .s3 .lp +6 6 \fB!\fR interprets the pointer of \fIdb\fR. The current pointer is set by many \fIdb\fR requests. .s3 .lp +4 3 6. A \fB*\fR before an expression forms an expression whose value is the number in the word addressed by the first expression. A \fB*\fR alone is equivalent to `\fB*.\fR'. .s3 .lp +4 3 7. Expressions separated by \fB+\fR or blank are expressions with value equal to the sum of the components. At most one of the components may be relocatable. .s3 .lp +4 3 8. Expressions separated by \fB\*-\fR form an expression with value be separated by .bd x to indicate a product. .s3 .it Cbs is used only if .it ascii or .it ebcdic conversion is specified. In the former case .it cbs characters are placed into the conversion buffer, converted to ASCII, and trailing blanks trimmed and new-line added before sending the line to the output. In the latter case ASCII characters are read into the conversion buffer, converted to EBCDIC, and blanks added to make up an output record of size .it cbs. .s3 After completion, .it dd reports the number ofrest of the line as a UNIX command. .s3 .lp +6 6 \fBc\fR All values on the stack are popped. .s3 .lp +6 6 \fBi\fR The top value on the stack is popped and used as the number radix for further input. .s3 .lp +6 6 \fBo\fR The top value on the stack is popped and used as the number radix for further output. .s3 .lp +6 6 \fBk\fR the top of the stack is popped, and that value is used as a non-negative scale factor: the appropriate number of places are printed on output, and maintained during multiplication, divi equal to the difference to the components. If the right component is relocatable, the left component must be relocatable. .s3 .lp +4 3 9. Expressions are evaluated left to right. .s3 .in \n(inu Names for registers are built in: .s3 .bd " r0 ... r5" .bd " sp" .bd " pc" .bd " fr0 ... fr5" .s3 These may be examined. Their values are deduced from the contents of the stack in a core image file. They are meaningless in a file that is not a core image. .s3 If no address is given for a command, the curren whole and partial input and output blocks. .s3 For example, to read an EBCDIC tape blocked ten 80-byte EBCDIC card images per record into the ASCII file .it x: .s3 dd if=/dev/rmt0 of=x ibs=800 cbs=80 conv=ascii,lcase .s3 Note the use of raw magtape. .it Dd is especially suited to I/O on the raw physical devices because it allows reading and writing in arbitrary record sizes. .sh "SEE ALSO" cp (I) .sh BUGS The ASCII/EBCDIC conversion tables are taken from the 256 character standard in the CACM Nov, 196sion, and exponentiation. The interaction of scale factor, input base, and output base will be reasonable if all are changed together. .s3 .lp +6 6 \fBz\fR The stack level is pushed onto the stack. .s3 .lp +6 6 \fB?\fR A line of input is taken from the input source (usually the console) and executed. .s3 .i0 An example which prints the first ten values of n! is .nf .s3 .in +3 .bd "[la1+dsa*pla10>y]sy" .bd "0sa1" .bd lyx .i0 .fi .sh "SEE ALSO" bc (I), which is a preprocessor for .it dc providing infix notatit address (also specified by ``\fB.\fR'') is assumed. In general, ``\fB.\fR'' points to the last word or byte printed by .it db. .s3 There are .it db commands for examining locations interpreted as numbers, machine instructions, ASCII characters, and addresses. For numbers and characters, either bytes or words may be examined. The following commands are used to examine the specified file. .s3 .lp +4 3 / The addressed word is printed in octal. .s3 .lp +4 3 \\ The addressed byte is printed in octal. .s3 .lp 8. It is not clear how this relates to real life. .s3 Newlines are inserted only on conversion to ASCII; padding is done only on conversion to EBCDIC. There should be separate options. on and a C-like syntax which implements functions and reasonable control structures for programs. .sh DIAGNOSTICS (x) ? for unrecognized character x. .br (x) ? for not enough elements on the stack to do what was asked by command x. .br `Out of space' when the free list is exhausted (too many digits). .br `Out of headers' for too many numbers being kept around. .br `Out of pushdown' for too many items on the stack. .br `Nesting Depth' for too many levels of nested execution. .sh BUGS +4 3 " The addressed word is printed as two ASCII characters. .s3 .lp +4 3 .tr |\*a | The addressed byte is printed as an ASCII character. .s3 .tr || .lp +4 3 \*g The addressed word is printed in decimal. .s3 .lp +4 3 ? The addressed word is interpreted as a machine instruction and a symbolic form of the instruction, including symbolic addresses, is printed. Often, the result will appear exactly as it was written in the source program. .s3 .lp +4 3 & The addressed word is interpreted as a symbolic address a.th DC I 2/8/75 .sh NAME dc \*- desk calculator .sh SYNOPSIS .bd dc [ file ] .sh DESCRIPTION .it Dc is an arbitrary precision arithmetic package. Ordinarily it operates on decimal integers, but one may specify an input base, output base, and a number of fractional digits to be maintained. The overall structure of .it dc is a stacking (reverse Polish) calculator. If an argument is given, input is taken from that file until its end, then from the standard input. The following constructions are recognized: .s3RUX[^adghknqtwz}ind is printed as the name of the symbol whose value is closest to the addressed word, possibly followed by a signed offset. .s3 .lp +4 3 (i. e., the character ``new line'') This command advances the current location counter ``\fB.\fR'' and prints the resulting location in the mode last specified by one of the above requests. .s3 .lp +4 3 ^ This character decrements ``\fB.\fR'' and prints the resulting location in the mode last selected one of the above requests. It is a converse to . .s3 .lp +4 3 % Exit. .s3 .in \n(inu Odd addresses to word-oriented commands are rounded down. The incrementing and decrementing of ``\fB.\fR'' done by the .bd and .bd ^ requests is by one or two depending on whether the last command was word or byte oriented. .s3 The address portion of any of the above commands may be followed by a comma and then by an expression. In this case that number of sequential words or bytes specified by the expression is printed. ``\fB.\fR'' is advanced so that it points at the last thio examine the registers and other per-process data in a core image; also there should be some way of specifying double-precision addresses. It does not know yet about shared text segments. fR sort output on column 2 .lp +5 3 \fB3\fR sort output on column 3 .s3 .i0 .sh FILES .dt /tmp/crt?? temporaries .br /usr/lib/aign default assembler .it ignore file .br /usr/lib/cign default C .it ignore file .br /usr/bin/crpost post processor .br /usr/bin/upost post processor for .bd \*-u option .br /bin/sort used to sort temporaries .br .s3 .fi .sh "SEE ALSO" as (I), cc (I) .sh BUGS ng printed. .s3 There are two commands to interpret the value of expressions. .s3 .lp +4 3 = When preceded by an expression, the value of the expression is typed in octal. When not preceded by an expression, the value of ``\fB.\fR'' is indicated. This command does not change the value of ``\fB.\fR''. .s3 .lp +4 3 : An attempt is made to print the given expression as a symbolic address. If the expression is relocatable, that symbol is found whose value is nearest that of the expression, and the symbol is ty.th DATE I 11/1/74 .sh NAME date \*- print and set the date .sh SYNOPSIS .bd date [ .bd s ] [ mmddhhmm[yy] ] .sh DESCRIPTION If no argument is given, the current date and time are printed. If an argument is given, the current date is set. The first .it mm is the month number; .it dd is the day number in the month; .it hh is the hour number (24 hour system); the second .it mm is the minute number; .it yy is the last 2 digits of the year number and is optional. For example: .s3 .bd" date 10080045" .s3 se.th CP I 2/8/75 .sh NAME cp \*- copy .sh SYNOPSIS .bd cp file1 file2 .sh DESCRIPTION The first file is copied onto the second. The mode and owner of the target file are preserved if it already existed; the mode of the source file is used otherwise. .s3 If .it file2 is a directory, then the target file is a file in that directory with the file-name of .it file1. .s3 It is forbidden to copy a file onto itself. .sh "SEE ALSO" cat (I), pr (I), mv (I) .sh BUGS ped, followed by a sign and the appropriate offset. If the value of the expression is absolute, a symbol with exactly the indicated value is sought and printed if found; if no matching symbol is discovered, the octal value of the expression is given. .s3 .in \n(inu The following command may be used to patch the file being debugged. .s3 .lp +4 3 ! This command must be preceded by an expression. The value of the expression is stored at the location addressed by the current value of ``\fB.\fR''. The opcodes dots the date to Oct 8, 12:45 AM. The current year is the default if no year is mentioned. The system operates in GMT. .it Date takes care of the conversion to and from local standard and daylight time. .s3 If the argument is ``s,'' .it date calls the network file store via the TIU interface (if present) and sets the clock to the time thereby obtained. .sh DIAGNOSTICS ``No permission'' if you aren't the super-user and you try to change the date; ``bad conversion'' if the date set is syntactically incorrect. ..th COMM I 5/15/74 .sh NAME comm \*- print lines common to two files .sh SYNOPSIS .bd comm [ .bd \*- [ .bd 123 ] ] file1 file2 .sh DESCRIPTION .it Comm reads .it file1 and .it file2, which should be in sort, and produces a three column output: lines only in .it file1; lines only in .it file2; and lines in both files. The filename `\*-' means the standard input. .s3 Flags 1, 2, or 3 suppress printing of the corresponding column. Thus .bd comm .bd \*-12 prints only the lines common to the two files; .bd comm  not appear in the symbol table, so the user must assemble them by hand. .s3 .in \n(inu The following command is used after a fault has caused a core image file to be produced. .s3 .lp +4 3 $ causes the fault type and the contents of the general registers and several other registers to be printed both in octal and symbolic format. The values are as they were at the time of the fault. .s3 .in \n(inu For some purposes, it is important to know how addresses typed by the user correspond with locations in the fish FILES /dev/tiu/d0 .sh BUGS .bd \*-23 prints only lines in the first file but not in the second; .bd comm .bd \*-123 is a no-op. .s3 .sh "SEE ALSO" cmp (I), diff (I) .sh BUGS le being debugged. The mapping algorithm employed by .it db is non-trivial for two reasons: First, in an .bd a.out file, there is a 20(8) byte header which will not appear when the file is loaded into core for execution. Therefore, apparent location 0 should correspond with actual file offset 20. Second, addresses in core images do not correspond with the addresses used by the program because in a core image there is a header containing the system's per-process data for the dumped process, and also because .th CREF I 2/5/73 .sh NAME cref \*- make cross reference listing .sh SYNOPSIS .bd cref [ .bd \*-acilostux123 ] name ... .sh DESCRIPTION .it Cref makes a cross reference listing of program files in assembler or C format. The files named as arguments in the command line are searched for symbols in the appropriate syntax. .s3 The output report is in four columns: .nf .s3 (1) (2) (3) (4) symbol file see text as it appears in file below .s3 .fi .it Cref uses either an .it ignore file or an .it only file. If.th CMP I 5/15/74 .sh NAME cmp \*- compare two files .sh SYNOPSIS .bd cmp [ .bd \*-l ] [ .bd \*-s ] file1 file2 .sh DESCRIPTION The two files are compared. (If .it file1 is `\*-', the standard input is used.) Under default options, .it cmp makes no comment if the files are the same; if they differ, it announces the byte and line number at which the difference occurred. If one file is an initial subsequence of the other, that fact is noted. Moreover, return code 0 is yielded for identical files, 1 for differthe stack is stored contiguously with the text and data part of the core image rather than at the highest possible locations. .it Db obeys the following rules: .s3 If exactly one argument is given, and if it appears to be an .bd a.out file, the 20-byte header is skipped during addressing, i.e., 20 is added to all addresses typed. As a consequence, the header can be examined beginning at location \*-20. .s3 If exactly one argument is given and if the file does not appear to be an .bd a.out file, no mapping i the .bd \*-i option is given, the next argument is taken to be an .it ignore file; if the .bd \*-o option is given, the next argument is taken to be an .it only file. .it Ignore and .it only files are lists of symbols separated by new lines. All symbols in an .it ignore file are ignored in columns (1) and (3) of the output. If an .it only file is given, only symbols in that file appear in column (1). At most one of .bd \*-i and .bd \*-o may be used. The default setting is .bd \*-i. Assembler predefined syment files, and 2 for an inaccessible or missing argument. .s3 Options: .s3 .lp +6 3 \fB\*-l\fR Print the byte number (decimal) and the differing bytes (octal) for each difference. .s3 .lp +6 3 \fB\*-s\fR Print nothing for differing files; return codes only. .i0 .dt .sh "SEE ALSO" diff (I), comm (I) .sh BUGS s done. .s3 If zero or two arguments are given, the mapping appropriate to a core image file is employed. This means that locations above the program break and below the stack effectively do not exist (and are not, in fact, recorded in the core file). Locations above the user's stack pointer are mapped, in looking at the core file, to the place where they are really stored. The per-process data kept by the system, which is stored in the first part of the core file, cannot currently be examined (except by \fbols or C keywords are ignored. .s3 The .bd \*-s option causes current symbols to be put in column 3. In the assembler, the current symbol is the most recent name symbol; in C, the current function name. The .bd \*-l option causes the line number within the file to be put in column 3. .s3 The .bd \*-t option causes the next available argument to be used as the name of the intermediate temporary file (instead of /tmp/crt??). The file is created and is not removed at the end of the process. .s3 Options: .s3 ..th CHMOD I 2/8/75 .sh NAME chmod \*- change mode .sh SYNOPSIS .bd chmod octal file ... .sh DESCRIPTION The octal mode replaces the mode of each of the files. The mode is constructed from the OR of the following modes: .s3 .lp +10 7 4000 set user ID on execution .lp +10 7 2000 set group ID on execution .lp +10 7 1000 sticky bit for shared, pure-procedure programs (see below) .lp +10 7 0400 read by owner .lp +10 7 0200 write by owner .lp +10 7 0100 execute (search in directory) by owner .lp +10 7 0070 read, B$\fR). .s3 If one wants to examine a file which has an associated name list, but is not a core image file, the last argument ``\fB\*-\fR'' can be used (actually the only purpose of the last argument is to make the number of arguments not equal to two). This feature is used most frequently in examining the memory file /dev/mem. .sh "SEE ALSO" as (I), core (V), a.out (V), od (I) .sh DIAGNOSTICS ``File not found'' if the first argument cannot be read; otherwise ``\fB?\fR''. .sh BUGS There should be some way tlp +5 3 \fBa\fR assembler format (default) .lp +5 3 \fBc\fR C format input .lp +5 3 \fBi\fR use .it ignore file (see above) .lp +5 3 \fBl\fR put line number in col. 3 (instead of current symbol) .lp +5 3 \fBo\fR use .it only file (see above) .lp +5 3 \fBs\fR current symbol in col. 3 (default) .lp +5 3 \fBt\fR user supplied temporary file .lp +5 3 \fBu\fR print only symbols that occur exactly once .lp +5 3 \fBx\fR print only C external symbols .lp +5 3 \fB1\fR sort output on column 1 (default) .lp +5 3 \fB2\write, execute (search) by group .lp +10 7 0007 read, write, execute (search) by others .s3 .i0 Only the owner of a file (or the super-user) may change its mode. .s3 If an executable file is set up for sharing (``\*-n'' option of .it "ld (I)" ), then mode 1000 prevents the system from abandoning the swap-space image of the program-text portion of the file when its last user terminates. Thus when the next user of the file executes it, the text need not be read from the file system but can simply be swapped in, saving time. Ability to set this bit is restricted to the super-user since swap space is consumed by the images; it is only worth while for heavily used commands. .s3 .sh "SEE ALSO" ls (I), chmod (II) .sh BUGS citly changed again: .lp +8 4 \fBo\fR octal (default) .lp +8 4 \fBi\fR decimal .lp +8 4 \fBf\fR single-precision floating-point .lp +8 4 \fBd\fR double-precision floating-point .s3 .i0 .lp +4 4 \\ Print the specified bytes in octal. .s3 .lp +4 4 = print the value of the addressed expression in octal. .c2 @ .s3 .lp +4 4 \*a print the addressed bytes as characters. Control and non-ASCII characters are escaped in octal. .c2 ' .s3 .lp +4 4 " take the contents of the address as a pointer to a sequence of charact.th CC I 5/15/74 .sh NAME cc \*- C compiler .sh SYNOPSIS .bd cc [ .bd \*-c ] [ .bd \*-p ] [ .bd \-f ] [ .bd \*-O ] [ .bd \*-S ] [ .bd \*-P ] file ... .sh DESCRIPTION .it Cc is the UNIX C compiler. It accepts three types of arguments: .s3 Arguments whose names end with `.c' are taken to be C source programs; they are compiled, and each object program is left on the file whose name is that of the source with `.o' substituted for `.c'. The `.o' file is normally deleted, however, if a single C program is compil.th CHDIR I 5/15/74 .sh NAME chdir \*- change working directory .sh SYNOPSIS .bd chdir directory .sh DESCRIPTION .it Directory becomes the new working directory. The process must have execute (search) permission in .it directory. .s3 Because a new process is created to execute each command, .it chdir would be ineffective if it were written as a normal command. It is therefore recognized and executed by the Shell. .sh "SEE ALSO" sh (I), pwd (I) .sh BUGS ers, and print the characters up to a null byte. Control and non-ASCII characters are escaped as octal. .s3 .lp +4 4 & Try to interpret the contents of the address as a pointer, and print symbolically where the pointer points. The typeout contains the name of an external symbol and, if required, the smallest possible positive offset. Only external symbols are considered. .s3 .lp +4 4 ? Interpret the addressed location as a PDP-11 instruction. .s3 .lp +4 4 $\fIm\fR If no .it m is given, print a stack trace oed and loaded all at one go. .s3 The following flags are interpreted by .it cc. See .it "ld (I)" for load-time flags. .s3 .lp +6 5 \fB\*-c\fR Suppress the loading phase of the compilation, and force an object file to be produced even if only one program is compiled. .s3 .lp +6 5 \fB\*-p\fR Arrange for the compiler to produce code which counts the number of times each routine is called; also, if loading takes place, replace the standard startup routine by one which automatically calls the .it monitor subroutf the terminated or stopped program. The last call made is listed first; the actual arguments to each routine are given in octal. (If this is inappropriate, the arguments may be examined by name in the desired format using ``/''.) If .it m is ``r'', the contents of the PDP-11 general registers are listed. If .it m is ``f'', the contents of the floating-point registers are listed. In all cases, the reason why the program stopped or terminated is indicated. .s3 .lp +4 4 %\fIm\fR According to .it m, set or deline (III) at the start and arranges to write out a .it mon.out file at normal termination of execution of the object program. An execution profile can then be generated by use of .it prof (I). .s3 .lp +6 5 \fB\-f\fR In systems without hardware floating-point, use a version of the C compiler which handles floating-point constants and loads the object program with the floating-point interpreter. Do not use if the hardware is present. .s3 .lp +6 5 \fB\*-O\fR Invoke an object-code optimizer. .s3 .lp +6 5 \fB\*-.th CDB I 2/8/75 .sh NAME cdb \*- C debugger .sh SYNOPSIS .bd cdb [ a.out [ core ] ] .sh DESCRIPTION .it Cdb is a debugger for use with C programs. It is useful for both post-mortem and interactive debugging. An important feature of .it cdb is that even in the interactive case no advance planning is necessary to use it; in particular it is not necessary to compile or load the program in any special way nor to include any special routines in the object file. .s3 The first argument to .it cdb is an object proete a breakpoint, or run or continue the program: .s3 .lp +8 4 \fBb\fR An address within the program must be given; a breakpoint is set there. Ordinarily, breakpoints will be set on the entry points of functions, but any location is possible as long as it is the first word of an instruction. (Labels don't appear in the symbol table yet.) Stopping at the actual first instruction of a function is undesirable because to make symbolic printouts work, the function's save sequence has to be completed; therefore .S\fR Compile the named C programs, and leave the assembler-language output on corresponding files suffixed `.s'. .s3 .lp +6 5 \fB\*-P\fR Run only the macro preprocessor on the named C programs, and leave the output on corresponding files suffixed `.i'. .i0 .dt .s3 Other arguments are taken to be either loader flag arguments, or C-compatible object programs, typically produced by an earlier .it cc run, or perhaps libraries of C-compatible routines. These programs, together with the results of any compilationgram, preferably containing a symbol table; if not given ``a.out'' is used. The second argument is the name of a core-image file; if it is not given, ``core'' is used. The core file need not be present. .s3 Commands to .it cdb consist of an address, followed by a single command character, possibly followed by a command modifier. Usually if no address is given the last-printed address is used. An address may be followed by a comma and a number, in which case the command applies to the appropriate number of sit cdb automatically moves breakpoints at the start of functions down to the first real code. .s3 It is impossible to set breakpoints on pure-procedure programs (\-n flag on cc or ld) because the program text is write-protected. .s3 .lp +8 4 \fBd\fR An address must be given; the breakpoint at that address is removed. .s3 .lp +8 4 \fBr\fR Run the program being debugged. Following the ``%r'', arguments may be given; they cannot specify I/O redirection (``>'', ``<'') or filters. No address is permissible, and s specified, are loaded (in the order given) to produce an executable program with name .bd a.out. .sh FILES file.c input file .br file.o object file .br a.out loaded output .br /tmp/ctm? temporary .br /lib/c[01] compiler .br /lib/fc[01] floating-point compiler .br /lib/c2 optional optimizer .br /lib/crt0.o runtime startoff .br /lib/mcrt0.o runtime startoff of profiling .br /lib/fcrt0.o runtime startoff for floating-point interpretation .br /lib/libc.a C library; see section III. .br /lib/liba.a Assembluccessive addresses. .s3 Addresses are expressions composed of names, decimal numbers, and octal numbers (which begin with ``0'') and separated by ``+'' and ``\*-''. Evaluation proceeds left-to-right. .s3 Names of external variables are written just as they are in C. For various reasons the external names generated by C all begin with an underscore, which is automatically tacked on by .it cdb. Currently it is not possible to suppress this feature, so symbols (defined in assembly-language programs) which do the program is restarted from scratch, not continued. Breakpoints should have been set if any were desired. The program will stop if any signal is generated, such as illegal instruction (including simulated floating point), bus error, or interrupt (see signal(II)); it will also stop when a breakpoint occurs and in any case announce the reason. Then a stack trace can be printed, named locations examined, etc. .s3 .lp +8 4 \fBc\fR Continue after a breakpoint. It is possible but probably useless to continue afer library used by some routines in libc.a .sh "SEE ALSO" ``Programming in C\(em a tutorial,'' C Reference Manual, monitor (III), prof (I), cdb (I), ld (I). .sh DIAGNOSTICS The diagnostics produced by C itself are intended to be self-explanatory. Occasional messages may be produced by the assembler or loader. Of these, the most mystifying are from the assembler, in particular ``m,'' which means a multiply-defined external symbol (function or data). .sh BUGS not begin with underscore are inaccessible. .s3 Variables local to a function (automatic, static, and arguments) are accessible by writing the name of the function, a colon ``:'', and the name of the local variable (e.g. ``main:argc''). There is no notion of the ``current'' function; its name must always be written explicitly. .s3 A number which begins with ``0'' is taken to be octal; otherwise numbers are decimal, just as in C. There is no provision for input of floating numbers. .s3 The construction ``namter an error since there is no way to repair the cause of the error. .s3 .i0 .sh "SEE ALSO" cc (I), db (I), C Reference Manual .sh BUGS Use caution in believing values of register variables at the lowest levels of the call stack; the value of a register is found by looking at the place where it was supposed to have been saved by the callee. .s3 Some things are still needed to make .it cdb uniformly better than .it db: non-C symbols, patching files, patching core images of programs being run. It would be des.th CAT I 1/15/73 .sh NAME cat \*- concatenate and print .sh SYNOPSIS .bd cat file ... .sh DESCRIPTION .it Cat reads each file in sequence and writes it on the standard output. Thus .s3 .bd " cat file" .s3 prints the file, and .s3 .bd " cat file1 file2 >file3" .s3 concatenates the first two files and places the result on the third. .s3 If no input file is given, or if the argument `\-' is encountered, .it cat reads from the standard input file. .s3 .sh "SEE ALSO" pr(I), cp(I) .sh DIAGNOSTICS none; if a e[expression]'' assumes that .it name is a pointer to an integer and is equivalent to the contents of the named cell plus twice the expression. Notice that .it name has to be a genuine pointer and that arrays are not accessible in this way. This is a consequence of the fact that types of variables are not currently saved in the symbol table. .s3 The command characters are: .s3 .lp +4 4 /\fIm\fR print the addressed words. .it m indicates the mode of printout; specifying a mode sets the mode until it is expliirable to have the types of variables around to make the correct style printout more automatic. Structure members should be available. .s3 Naturally, there are all sorts of neat features not handled, like conditional breakpoints, optional stopping on certain signals (like illegal instructions, to allow breakpointing of simulated floating-point programs). file cannot be found it is ignored. .sh BUGS .bd "cat x y >x" and .bd "cat x y >y" cause strange results. .th BC I 2/20/75 .sh NAME bc \*- arbitrary precision interactive language .sh SYNOPSIS .bd bc [ .bd \-l ] [ file ... ] .sh DESCRIPTION .it Bc is an interactive processor for a language which resembles C but provides unlimited precision arithmetic. It takes input from any files given, then reads the standard input. The `\-l' argument stands for the name of a library of mathematical subroutines which contains sine (named `s'), cosine (`c'), arctangent (`a'), natural logarithm (`l'), and exponential (`e'). Thet (that does not have `=' as its highest operator) is printed. .s3 Statements have the following syntax: .s3 .lp +5 5 expression .br The expression is executed for its side effects (assignment or function call) or for printing as described above. .s3 .lp +5 5 .bd comment .li ... .br This statement is ignored. It is used to interject commentary in a program. .s3 .lp +5 5 .bd done .br Return to system level. .s3 .lp +5 5 .bd draw expression expression expression .br A line is drawn on the Tektronix 611 displae result is the negation of the expression. .s3 .lp +5 5 expression operator expression .br Common functions of two arguments are abbreviated by the two arguments separated by an operator denoting the function. A complete list of operators is given below. .s3 .lp +5 5 expression .bd ( [expression [ .bd , expression] ... ] .bd ) .br Functions of an arbitrary number of arguments can be called by an expression followed by the arguments in parentheses separated by commas. The expression evaluates to the line nu syntax for .it bc programs is as follows; E means expression, S means statement. .s3 .lp +6 6 Comments .br are enclosed in /* and */. .s3 .lp +6 6 Names .br letters a\-z .br array elements: letter[E] .br The words `ibase', `obase', and `scale' .s3 .lp +6 6 Other operands .br arbitrarily long numbers with optional sign and decimal point. .br ( E ) .br sqrt ( E ) .br ( E , ... , E ) .s3 .lp +6 6 Operators .br + \- * / % ^ .br ++ \-\- (prefix and postfix; apply to names) .br == <= >y `/dev/vt0' from the current display position to the XY co-ordinates specified by the first two expressions. The scale is zero to one in both X and Y directions. If the third expression is zero, the line is invisible. The current display position is set to the end point. .s3 .lp +5 5 .bd display list .br The list of expressions and strings is concatenated and displayed (i.e. printed) on the 611 starting at the current display position. The current display position is not changed. .s3 .lp +5 5 .bd dump .br mber of the entry of the function in the internally stored statements. This causes the internal statements to be compiled. If the expression evaluates negative, a builtin function is called. The list of builtin functions appears below. .s3 .lp +5 5 name .bd [ expression [ .bd , expression ] ... .bd ] .br Each expression is truncated to an integer and used as a specifier for the name. The result is syntactically identical to a name. .bd a[1,2] is the same as .bd a[1][2]. The truncated expressions are restric= != < > .br = =+ =\- =* =/ =% =^ .br .s3 .lp +6 6 Statements .br E .br { S ; ... ; S } .br if ( E ) S .br while ( E ) S .br for ( E ; E ; E ) S .br null statement .br break .br quit .s3 .lp +6 6 Function definitions are exemplified by .br define ( ,..., ) { .br auto , ... , .br S; ... S .br return ( E ) .br } .s3 .i0 .dt All function arguments are passed by value. .s3 The value of a statement that is an expression is printed unless the main operator iThe name and current value of every variable is printed. .s3 .lp +5 5 .bd edit .br The UNIX editor, .it ed, is invoked with the .it file argument. After the editor exits, this file is recompiled. .s3 .lp +5 5 .bd erase .br The 611 screen is erased. .s3 .lp +5 5 .bd for name .bd = expression expression statement .br .lp +5 5 .bd for name .bd = expression expression .br .li ... .lp +5 5 .bd next .br The .it for statement repetitively executes a statement (first form) or a group of statements (second form) undted to values between 0 and 32767. .s3 .i0 The following is the list of operators: .s3 .lp +5 5 = .br = is the assignment operator. The left operand must be a name or an array element. The result is the right operand. Assignment binds right to left, all other operators bind left to right. .s3 .lp +5 5 & | .br & (logical and) has result zero if either of its arguments are zero. It has result one if both its arguments are non-zero. | (logical or) has result zero if both of its arguments are zero. It has ress an assignment. Either semicolons or newlines may separate statements. Assignment to .it scale influences the number of digits to be retained on arithmetic operations. Assignments to .it ibase or .it obase set the input and output number radix respectively. .s3 The same letter may be used as an array name, a function name, and a simple variable simultaneously. `Auto' variables are saved and restored during function calls. All other variables are global to the program. When using arrays as function argumenter control of a named variable. The variable takes on the value of the first expression, then is incremented by one on each loop, not to exceed the value of the second expression. .s3 .lp +5 5 .bd goto expression .br The expression is evaluated, truncated to an integer and execution goes to the corresponding integer numbered statment. If executed from immediate mode, the internal statements are compiled first. .s3 .lp +5 5 .bd if expression statement .br .lp +5 5 .bd if expression .br .li ... .lp +5 5 [ .bdult one if either of its arguments are non-zero. .s3 .lp +5 5 < <= > >= == <> .br The relational operators (< less than, <= less than or equal, > greater than, >= greater than or equal, == equal to, <> not equal to) return one if their arguments are in the specified relation. They return zero otherwise. Relational operators at the same level extend as follows: a>b>c is the same as a>b&b>c. .s3 .lp +5 5 + \*- .br Add and subtract. .s3 .lp +5 5 * / .br Multiply and divide. .s3 .lp +5 5 ^ .br Exponentiatis or defining them as automatic variables empty square brackets must follow the array name. .s3 For example .s3 .nf scale = 20 define e(x){ auto a, b, c, i, s a = 1 b = 1 s = 1 for(i=1; 1==1; i++){ a = a*x b = b*i c = a/b if(c == 0) return(s) s = s+c } } .s3 .fi defines a function to compute an approximate value of the exponential function and .s3 .nf for(i=1; i<=10; i++) e(i) .fi .s3 prints approximate values of the exponential function of the first ten integers. .sh FILES /usr/lib/lib.b m else .br .li ... ] .lp +5 5 .bd fi .br The statement (first form) or group of statements (second form) is executed if the expression evaluates to non-zero. In the second form, an optional .bd else allows for a group of statements to be executed when the first group is not. .s3 .lp +5 5 .bd list [expression [expression]] .br .br list is used to print out the stored internal statements. If no arguments are given, all internal statements are printed. If one argument is given, only that internal statement is lon. .s3 .i0 The following is a list of builtin functions: .s3 .lp +5 5 .bd arg(i) .br is the value of the \fIi\fR -th actual parameter on the current level of function call. .s3 .lp +5 5 .bd exp(x) .br is the exponential function of \fIx\fR. .s3 .lp +5 5 .bd log(x) .br is the natural logarithm of \fIx\fR. .s3 .lp +5 5 .bd sqr(x) .br is the square root of \fIx\fR. .s3 .lp +5 5 .bd sin(x) .br is the sine of \fIx\fR (radians). .s3 .lp +5 5 .bd cos(x) .br is the cosine of \fIx\fR (radians). .s3 .lp +5 5 .bd atnathematical library .sh "SEE ALSO" .it dc (I), C Reference Manual, ``BC \- An Arbitrary Precision Desk-Calculator Language.'' .sh BUGS No &&, | | yet. .br .it for statement must have all three E's .br .it quit is interpreted when read, not when executed. isted. If two arguments are given, all internal statements inclusively between the arguments are printed. .s3 .lp +5 5 .bd print list .br The list of expressions and strings are concatenated and printed. (A string is delimited by " characters.) .s3 .lp +5 5 .bd prompt list .br .it Prompt is the same as .it print except that no newline character is printed. .s3 .lp +5 5 .bd return [expression] .br The expression is evaluated and the result is passed back as the value of a function call. If no expression is (x) .br is the arctangent of \fIx\fR. Its value is between \*-\(*p/2 and \(*p/2. .s3 .lp +5 5 .bd "rnd( )" .br is a uniformly distributed random number between zero and one. .s3 .lp +5 5 .bd "expr( )" .br is the only form of program input. A line is read from the input and evaluated as an expression. The resultant value is returned. .s3 .lp +5 5 .bd abs(x) .br is the absolute value of \fIx\fR. .s3 .lp +5 5 .bd int(x) .br returns \fIx\fR truncated (towards 0) to an integer. .i0 .sh FILES .dt /tmp/btm? tempogiven, zero is returned. .s3 .lp +5 5 .bd run .br The internal statements are compiled. The symbol table is re-initialized. The random number generator is reset. Control is passed to the lowest numbered internal statement. .s3 .lp +5 5 .bd save [expression [expression]] .br .it Save is like .it list except that the output is written on the .it file argument. If no argument is given on the command, .bd b.out is used. .s3 .i0 Expressions have the following syntax: .s3 .lp +5 5 name .br A name is used to specirary .br b.out save file .sh DIAGNOSTICS Syntax errors cause the incorrect line to be typed with an underscore where the parse failed. All other diagnostics are self explanatory. .sh BUGS Has been known to give core images. .th BAS I 5/15/74 .sh NAME bas \*- basic .sh SYNOPSIS .bd bas [ file ] .sh DESCRIPTION .it Bas is a dialect of Basic. If a file argument is provided, the file is used for input before the console is read. .it Bas accepts lines of the form: .s3 statement integer statement .s3 Integer numbered statements (known as internal statements) are stored for later execution. They are stored in sorted ascending order. Non-numbered statements are immediately executed. The result of an immediate expression statemenfy a variable. Names are composed of a letter followed by letters and digits. The first four characters of a name are significant. .s3 .lp +5 5 number .br A number is used to represent a constant value. A number is written in Fortran style, and contains digits, an optional decimal point, and possibly a scale factor consisting of an .bd e followed by a possibly signed exponent. .s3 .lp +5 5 .bd ( expression .bd ) .br Parentheses are used to alter normal order of evaluation. .s3 .lp +5 5 \*_ expression .br Th.th AS I 1/15/73 .sh NAME as \*- assembler .sh SYNOPSIS .bd as [ .bd \*- ] name ... .sh DESCRIPTION .it As assembles the concatenation of the named files. If the optional first argument .bd \*- is used, all undefined symbols in the assembly are treated as global. .s3 The output of the assembly is left on the file .bd "a.out." It is executable if no errors occurred during the assembly, and if there were no unresolved external references. .sh FILES /lib/as2 pass 2 of the assembler .br /tmp/atm[1-3]? temporary .br a.out object .sh "SEE ALSO" ld (I), nm (I), db (I), a.out (V), `UNIX Assembler Manual'. .sh DIAGNOSTICS When an input file cannot be read, its name followed by a question mark is typed and assembly ceases. When syntactic or semantic errors occur, a single-character diagnostic is typed out together with the line number and the file name in which it occurred. Errors in pass 1 cause cancellation of pass 2. The possible errors are: .s3 .ta 3 ) Parentheses error .br ] Parentheses error .br < String not .th name section date .sh NAME .sh SYNOPSIS .sh DESCRIPTION .sh FILES .sh "SEE ALSO" .sh DIAGNOSTICS .sh BUGS .nf .bp .ce PERMUTED INDEX .sp 1.5 .nf .de xx \\h"3i-\\w'\\$1'u"\\$1 \\$2 .. .so ptxx terminated properly .br * Indirection used illegally .br .li \fB.\fR Illegal assignment to `\fB.\fR' .br A Error in address .br B Branch instruction is odd or too remote .br E Error in expression .br F Error in local (`f' or `b') type symbol .br G Garbage (unknown) character .br I End of file inside an if .br M Multiply defined symbol as label .br O Word quantity assembled at odd address .br P `\fB.\fR' different in pass 1 and 2 .br R Relocation error .br U Undefined symbol .br X Syntax error .br .sh BUGS Sif $2x != x goto both goto $1x : allx sh $0 1 I sh $0 2 II sh $0 3 III sh $0 4 IV sh $0 5 V sh $0 6 VI sh $0 7 VII sh $0 8 VIII : tx cat tocx? >cattoc ptx -t cattoc ptxx rm cattoc ed - tocx1 1,$s/([IV]*) /" "/ 1,$s/.*/.xx "&"/ w toc1 e tocx2 1,$s/([IV]*) /" "/ 1,$s/.*/.xx "&"/ w toc2 e tocx3 1,$s/([IV]*) /" "/ 1,$s/.*/.xx "&"/ w toc3 e tocx4 1,$s/([IV]*) /" "/ 1,$s/.*/.xx "&"/ w toc4 e tocx5 1,$s/([IV]*) /" "/ 1,$s/.*/.xx "&"/ w toc5 e tocx6 1,$s/([IV]*) /" "/ 1,$s/.*/.xx "&"/ w toc6 e tocx7 1,$s/([IV]*) /".nr in 5 .de i0 .in \n(in .. .de lp .i0 .ta \\$2+1 .in \\$1 .ti -\\$2 .. .de s1 .sp 1 .ne 4 .. .de s2 .sp 1 .. .de s3 .sp 1 .. .de fo 'sp 2 'tl ''- % -'' 'bp .. .de th .de x1 'sp 2 'tl '\\$1(\\$2)'\\$3'\\$1(\\$2)' 'sp 2 \\.. .wh -5 fo .wh 0 x1 .in \n(in .. .de sh .s1 .ne 5 .ti 0 \\$1 .br .. .de bd .tr __ .ul \\$1 .. .de bn .tr __ .ul \\$1\\t .. .de it .tr __ .ul .li \\$1 .. .de dt .ta 8 16 24 32 40 48 56 64 .. .ds b B .ds G G .ds a ' .ds - - .ds _ _ .ds v | .ds p J .ds r .ds g ` .ds X X .ds u u .ds ymbol table overflow is not checked. \fBx\fR errors can cause incorrect line numbers in following diagnostics.  "/ 1,$s/.*/.xx "&"/ w toc7 e tocx8 1,$s/([IV]*) /" "/ 1,$s/.*/.xx "&"/ w toc8 q exit : 1x sh $0 1 I exit : 2x sh $0 2 II exit : 3x sh $0 3 III exit : 4x sh $0 4 IV exit : 5x sh $0 5 V exit : 6x sh $0 6 VI exit : 7x sh $0 7 VII exit : 8x sh $0 8 VIII exit : x echo usage: sh tocrc "[12345678]" exit : both chdir /usr/man/man$1 ls >xa ed - xa v/\.[12345678]$/d g/intro.2/d g/^/s//e /\ .a\ /NAME/1p w q ed - xb echo "1,$s/ *\\\*- */("$2") /" >xa if $1 != 2 goto 1f echo 0a >>xa echo "intro(II) introduction to> -> .ds | .th AR I 3/15/72 .sh NAME ar \*- archive and library maintainer .sh SYNOPSIS .bd ar key afile name ... .sh DESCRIPTION .it Ar maintains groups of files combined into a single archive file. Its main use is to create and update library files as used by the loader. It can be used, though, for any similar purpose. .s3 .it Key is one character from the set .bd drtux, optionally concatenated with .bd v. .it Afile is the archive file. The .it names are constituent files in the archive file. The meanings of the .it system calls" >>xa echo . >>xa : 1f echo w /usr/man/man0/tocx$1 >>xa ed - xb \(-> .de dt .ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 6i .. .lg 0 ed are replaced. If no names are given, all files in the archive that have been modified are replaced by the modified version. .s3 .bd x extracts the named files. If no names are given, all files in the archive are extracted. In neither case does .bd x alter the archive file. .s3 .bd v means verbose. Under the verbose option, .it ar gives a file-by-file description of the making of a new archive file from the old archive and the constituent files. The following abbreviations are used: .s3 .bd " c" copy .bVII. USER MAINTAINED SUBROUTINES .sp .5 .so toc7 .sp 1.5 .ne .5i VIII. SYSTEM MAINTENANCE .sp .5 .so toc8 .in -1i .lg .ll 6i .lt 6i .ps 10 .vs 12p .de he .tl '-''' 'sp .5i 'ft R .CH 'ft 'ps 'sp .5i .. .de fo 'ft R 'ps 10 'sp .5i .CF 'ft 'ps 'bp .. .wh 0 he .wh -1i fo .de pg .sp .5 .. .tr | .br .sp 3i .ps 18 .ft B .ce UNIX PROGRAMMER'S MANUAL .ps 12 .vs 14p .sp 2 .ft I .ce Sixth Edition .sp 3 .ce 3 K. Thompson .sp .5 D. M. Ritchie .sp 2 .ce May, 1975 .sp 2.5i .ps 10 .vs 12p .ft R .bp .sp 3i .sp 3i .ll 4.7i .in 1.5i .ft R This manual was set by a Graphic Systems phototypesetter driven by the \fItroff\fR formatting prograd " a" append .bd " d" delete .bd " r" replace .bd " x" extract .sh FILES /tmp/vtm? temporary .sh "SEE ALSO" ld (I), archive (V) .sh BUGS Option .bd tv should be implemented as a table with more information. .s3 There should be a way to specify the placement of a new file in an archive. Currently, it is placed at the end. .s3 Since .it ar has not been rewritten to deal properly with the new file system modes, extracted files have mode 666. .s3 For the same reason, only the first 8 characters of file.nr in .5i .de i0 .in \n(inu .. .de lp .tc  .tr  .i0 .ta \\$2/2u .in \\$1/2u .ti -\\$2/2u .. .de s1 .sp .10i .ne 2 .. .de s2 .sp .07i .. .de s3 .sp .07i .ne 2 .. .de fo 'ft R 'ps 10 'sp .50i 'tl ''- % -'' 'ft 'ps 'bp .. .de th .de x1 .tl '-''' 'ft R 'ps 10 'sp .50i 'tl '\\$1\|(\|\\$2\|)'\\$3'\\$1\|(\|\\$2\|)' 'ft 'ps 'sp .50i \\.. .wh -1i fo .wh 0 x1 .ft R .ps 10 .vs 11p .in \n(inu .. .wh 0 x1 .de sh .s1 .ft B .ps 8 .ti 0 \\$1 .ft .ps .br .. .de it 'ft I 'li \\$1 'ft .. .de bd 'ft B \\$1 'ft R .. .de bn 'm operating under the \s8UNIX\s10 system. The text of the manual was prepared using the \fIed\fR text editor. .br .ft R .ll 6i .in 0 .bp 1 .sp 3 .ce 2 PREFACE to the Sixth Edition .sp .de CF .ro .tl ''%'' .ar .. .sp 2 We are grateful to L. L. Cherry, R. C. Haight, S. C. Johnson, B. W. Kernighan, M. E. Lesk, and E. N. Pinson for their contributions to the system software, and to L. E. McMahon for software and for his contributions to this manual. We are particularly appreciative of the invaluable technical,  names are significant. .s3 If the same file is mentioned twice in an argument list, it may be put in the archive twice. ft B \\$1 \\fR\\ .. .ds b \(*b .ds _ \(ul .ds - \(mi .ds a \(aa .ds v \(vb .ds p \(*p .ds r \(rg .ds g \(ga .ds | \| .ds X \(mu .ds u \(*m .ds G \(*G .ds > \(-> .de dt .ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 6i .. .lg editorial, and administrative efforts of J. F. Ossanna, M. D. McIlroy, and R. Morris. They all contributed greatly to the stock of \s8UNIX\s10 software and to this manual. Their inventiveness, thoughtful criticism, and ungrudging support increased immeasurably not only whatever success the \s8UNIX\s10 system enjoys, but also our own enjoyment in its creation. .bp .sp 2 .ce INTRODUCTION TO THIS MANUAL .pg .pg This manual gives descriptions of the publicly available features of \s8UNIX\s10. It provides neither a general overview \- see ``The \s8UNIX\s10 Time-sharing System'' (Comm. ACM \fB17\fR 7, July 1974, pp. 365-375) for that \- nor details of the implementation of the system, which remain to be disclosed. .pg Within the area it surveys, this manual attempts to be as complete and timely as possible. A conscious decision was made to describe each program in exactly the state it was in at the time its manual section was prepared. In particular, the desire to describe something as it should be, not as it is, wf its purpose. .pg The \fIsynopsis\fR summarizes the use of the program being described. A few conventions are used, particularly in the Commands section: .pg .in 1i \fBBoldface\fR words are considered literals, and are typed just as they appear. .pg Square brackets ( [ ] ) around an argument indicate that the argument is optional. When an argument is given as ``name'', it always refers to a file name. .pg Ellipses ``.\|.\|.'' are used to show that the previous argument-prototype may be repeated. .pg A finaon terminals. These terminals generally have a speed switch which should be set at ``300'' (or ``30'' for 30 characters per second) and a half/full duplex switch which should be set at full-duplex. (This switch will often have to be changed since many other systems require half-duplex). When a connection is established, the system types ``login:''; you type your user name, followed by the ``return'' key. If you have a password, the system asks for it and turns off the printer on the terminal so the passwordas resisted. Inevitably, this means that many sections will soon be out of date. .pg This manual is divided into eight sections: .pg .nf I. Commands II. System calls III. Subroutines IV. Special files V. File formats and conventions VI. User-maintained programs VII. User-maintained subroutines VIII. Maintenance .pg .fi Commands are programs intended to be invoked directly by the user, in contradistinction to subroutines, which are intended to be called by the user's programs. Commands generally resil convention is used by the commands themselves. An argument beginning with a minus sign ``_'' is often taken to mean some sort of flag argument even if it appears in a position where a file name could appear. Therefore, it is unwise to have files whose names begin with ``_''. .pg .in .5i The \fIdescription\fR section discusses in detail the subject at hand. .pg The \fIfiles\fR section gives the names of files which are built into the program. .pg A .ft I see also .ft R section gives pointers to related in will not appear. After you have logged in, the ``return'', ``new line'', or ``linefeed'' keys will give exactly the same results. .pg .ul \s8TTY\s10 37 terminal:|| When you have established a data connection, the system types out a few garbage characters (the ``login:'' message at the wrong speed). Depress the ``break'' (or ``interrupt'') key; this is a speed-independent signal to \s8UNIX\s10 that a 150-baud terminal is in use. The system then will type ``login:,'' this time at the correct speed; you respode in directory .ft I /bin .ft R (for \fIbin\fR\|ary programs). Some programs also reside in .ft I /\|usr/\|bin, .ft R to save space in \fI/bin.\fR These directories are searched automatically by the command interpreter. .pg System calls are entries into the \s8UNIX\s10 supervisor. In assembly language, they are coded with the use of the opcode \fIsys\fR, a synonym for the \fItrap\fR instruction. In this edition, the C language interface routines to the system calls have been incorporated in section II. .pgformation. .pg A \fIdiagnostics\fR section discusses the diagnostic indications which may be produced. Messages which are intended to be self-explanatory are not listed. .pg The \fIbugs\fR section gives known bugs and sometimes deficiencies. Occasionally also the suggested fix is described. .pg .in 0 At the beginning of this document is a table of contents, organized by section and alphabetically within each section. There is also a permuted index derived from the table of contents. Within each index entry,nd with your user name. From the \s8TTY\s10 37 terminal, and any other which has the ``new-line'' function (combined carriage return and linefeed), terminate each line you type with the ``new-line'' key (\fInot\fR the ``return'' key). .pg .in 0 For all these terminals, it is important that you type your name in lower-case if possible; if you type upper-case letters, \s8UNIX\s10 will assume that your terminal cannot generate lower-case letters and will translate all subsequent upper-case letters to lower cas A small assortment of subroutines is available; they are described in section III. The binary form of most of them is kept in the system library \fI/\|lib/\|liba.a.\fR The subroutines available from C and from Fortran are also included; they reside in \fI/\|lib/\|libc.a\fR and \fI/\|lib/\|libf.a\fR respectively. .pg The special files section IV discusses the characteristics of each system ``file'' which actually refers to an I/O device. The names in this section refer to the DEC device names for the hardwa the title of the writeup to which it refers is followed by the appropriate section number in parentheses. This fact is important because there is considerable name duplication among the sections, arising principally from commands which exist only to exercise a particular system call. .pg .pg This manual was prepared using the \s8UNIX\s10 text editor \fIed\fR and the formatting program \fItroff\fR. e. .pg The evidence that you have successfully logged in is that the Shell program will type a ``%'' to you. (The Shell is described below under ``How to run a program.'') .pg For more information, consult \fIgetty\fR (VIII), which discusses the login sequence in more detail, and \fItty\fR (IV), which discusses typewriter I/O. .pg .ul Logging out.|| There are three ways to log out: .pg .in .5i You can simply hang up the phone. .pg You can log out by typing an end-of-file indication (EOT character, control `re, instead of the names of the special files themselves. .pg The file formats and conventions section V documents the structure of particular kinds of files; for example, the form of the output of the loader and assembler is given. Excluded are files used by only one command, for example the assembler's intermediate files. .pg User-maintained programs and subroutines (sections VI and VII) are not considered part of the \s8UNIX\s10 system, and the principal reason for listing them is to indicate their exis.nf .sp 2i .ps 12 .ft B .vs 14p .ce 100 DOCUMENTS FOR USE WITH THE UNIX TIME-SHARING SYSTEM .sp .ps 11 .ft I Sixth Edition .sp 2i .ps 10 .vs 12p .ft R The enclosed UNIX documentation is supplied in accordance with the Software Agreement you have with the Western Electric Company. .ce 0 .ce .bp .sp 2i .ft B CONTENTS .sp .ft R .in 1i .vs 20p \01. Setting Up UNIX \- Sixth Edition \02. The UNIX Time-Sharing System \03. C Reference Manual \04. Programming in C \- A Tutorial \05. UNIX Assembler Reference Manual \`d'') to the Shell. The Shell will terminate and the ``login: '' message will appear again. .pg You can also log in directly as another user by giving a \fIlogin\fR command (I). .pg .in 0 .ul How to communicate through your terminal.|| When you type to \s8UNIX\s10, a gnome deep in the system is gathering your characters and saving them in a secret place. The characters will not be given to a program until you type a return (or new-line), as described above in .ul Logging in. .pg \s8UNIX\s10 typewriter I/O is full-duplex. It has full read-ahead, which means that you can type at any time, even while a program is typing at you. Of course, if you type during output, the output will have the input characters interspersed. However, whatever you type will be saved up and interpreted in correct sequence. There is a limit to the amount of read-ahead, but it is generous and not likely to be exceeded unless the system is in trouble. When the read-ahead limit is exceeded, the system throws away all the saved characters. tence without necessarily giving a complete description. The authors of the individual programs should be consulted for more information. .pg Section VIII discusses commands which are not intended for use by the ordinary user, in some cases because they disclose information in which he is presumably not interested, and in others because they perform privileged functions. .pg .pg Each section consists of a number of independent entries of a page or so each. The name of the entry is in the upper corners of it.tr | .bp .ce HOW TO GET STARTED .sp 1.5 This section provides the basic information you need to get started on \s8UNIX\s10: how to log in and log out, how to communicate through your terminal, and how to run a program. See ``U\s8NIX\s10 for Beginners'' by Brian W. Kernighan for a more complete introduction to the system. .pg .ft I Logging in.|| .ft R You must call \s8UNIX\s10 from an appropriate terminal. \s8UNIX\s10 supports \s8ASCII\s10 terminals typified by the \s8TTY\s10 37, the GE Terminet 300, the Da.pg On a typewriter input line, the character ``@'' kills all the characters typed before it, so typing mistakes can be repaired on a single line. Also, the character ``#'' erases the last character typed. Successive uses of ``#'' erase characters back to, but not beyond, the beginning of the line. ``@'' and ``#'' can be transmitted to a program by preceding them with ``\\''. (So, to erase ``\\'', you need two ``#''s). .pg The \s8ASCII\s10 ``delete'' (a.k.a. ``rubout'') character is not passed to programs bs pages, its preparation date in the upper middle. Entries within each section are alphabetized. The page numbers of each entry start at 1. (The earlier hope for frequent, partial updates of the manual is clearly in vain, but in any event it is not feasible to maintain consecutive page numbering in a document like this.) .pg All entries are based on a common format, not all of whose subsections will always appear. .pg .in .5i The \fIname\fR section repeats the entry name and gives a very short description osi 300, and various graphical terminals. You must also have a valid user name, which may be obtained, together with the telephone number, from the system administrators. The same telephone number serves terminals operating at all the standard speeds. After a data connection is established, the login procedure depends on what kind of terminal you are using. .pg .in .5i .ul 300-baud terminals:|| Such terminals include the GE Terminet 300, most display terminals, Execuport, TI, GSI, and certain Anderson-Jacobsut instead generates an .ul interrupt signal. This signal generally causes whatever program you are running to terminate. It is typically used to stop a long printout that you don't want. However, programs can arrange either to ignore this signal altogether, or to be notified when it happens (instead of being terminated). The editor, for example, catches interrupts and stops what it is doing, instead of terminating, so that an interrupt can be used to halt an editor printout without losing the file being edited. .pg The \fIquit\fR signal is generated by typing the \s8ASCII\s10 FS character. It not only causes a running program to terminate but also generates a file with the core image of the terminated process. Quit is useful for debugging. .pg Besides adapting to the speed of the terminal, \s8UNIX\s10 tries to be intelligent about whether you have a terminal with the new-line function or whether it must be simulated with carriage-return and line-feed. In the latter case, all input carriage returns are turnede system, see ``The \s8UNIX\s10 Time-Sharing System,'' by the present authors. It may also be useful to glance through section II of this manual, which discusses system calls, even if you don't intend to deal with the system at that level. .pg .ul Writing a program.|| To enter the text of a source program into a \s8UNIX\s10 file, use \fIed\fR (I). The three principal languages in \s8UNIX\s10 are assembly language (see \fIas\fR (I)), Fortran (see \fIfc\fR (I)), and C (see \fIcc\fR (I)). After the program texputc.3~putchar.3}qsort.3|rand.3{reset.3zsetfil.3ysin.3xsqrt.3wttyn.3 to new-line characters (the standard line delimiter) and both a carriage return and a line feed are echoed to the terminal. If you get into the wrong mode, the \fIstty\fR command (I) will rescue you. .pg Tab characters are used freely in \s8UNIX\s10 source programs. If your terminal does not have the tab function, you can arrange to have them turned into spaces during output, and echoed as spaces during input. The system assumes that tabs are set every eight columns. Again, the \fIstty\fR command (I) will t has been entered through the editor and written on a file, you can give the file to the appropriate language processor as an argument. The output of the language processor will be left on a file in the current directory named ``a.out''. (If the output is precious, use \fImv\fR to move it to a less exposed name soon.)| If you wrote in assembly language, you will probably need to load the program with library subroutines; see \fIld \fR(I). The other two language processors call the loader automatically. .setuid.2signal.2sleep.2stat.2stime.2stty.2sync.2time.2times.2umount.2unlink.2wait.2write.2set or reset this mode. Also, there is a file which, if printed on \s8TTY\s10 37 or TermiNet 300 terminals, will set the tab stops correctly (\fItabs\fR (V)). .pg Section \fItty\fR (IV) discusses typewriter I/O more fully. .pg .ul How to run a program; the Shell.|| When you have successfully logged into \s8UNIX\s10, a program called the Shell is listening to your terminal. The Shell reads typed-in lines, splits them up into a command name and arguments, and executes the command. A command is simply an execupg When you have finally gone through this entire process without provoking any diagnostics, the resulting program can be run by giving its name to the Shell in response to the ``%'' prompt. .pg Next, you will need \fIcdb\fR (I) or \fIdb\fR (I) to examine the remains of your program. The former is useful for C programs, the latter for assembly-language. No debugger is much help for Fortran. .pg Your programs can receive arguments from the command line just as system programs do. See \fIexec\fR (II). .pg .ul3kill.12ld.11ln.10login.1/ls.1.mail.1-man.1,mesg.1+mkdir.1*mv.1)neqn.1(newgrp.1'nice.1&nm.1%nohup.1$nroff.1#od.1"opr.1!passwd.1 pfe.1pr.1prof.1ps.1pwd.1rc.1rev.1rm.1rmdir.1roff.1sh.1shift.1size.1table program. The Shell looks first in your current directory (see next section) for a program with the given name, and if none is there, then in a system directory. There is nothing special about system-provided commands except that they are kept in a directory where the Shell can find them. .pg The command name is always the first word on an input line; it and its arguments are separated from one another by spaces. .pg When a program terminates, the Shell will ordinarily regain control and type a ``%''  Text processing.|| Almost all text is entered through the editor. The commands most often used to write text on a terminal are: .ul cat, pr, roff, nroff, and .ul troff, all in section I. .pg The \fIcat\fR command simply dumps \s8ASCII\s10 text on the terminal, with no processing at all. The \fIpr\fR command paginates the text, supplies headings, and has a facility for multi-column output. .ul Troff and .ul nroff are elaborate text formatting programs, and require careful forethought in entering both the tesleep.1sort.1spell.1split.1strip.1stty.1 tee.1 time.1 tp.1 tr.1 troff.1tty.1typo.1uniq.1wait.1wc.1who.1write.1yacc.1at you to indicate that it is ready for another command. .pg The Shell has many other capabilities, which are described in detail in section \fIsh\fR\|(I). .pg .ul The current directory.|| \s8UNIX\s10 has a file system arranged in a hierarchy of directories. When the system administrator gave you a user name, he also created a directory for you (ordinarily with the same name as your user name). When you log in, any file name you type is by default in this directory. Since you are the owner of this directoryxt and the formatting commands into the input file. .ul Troff drives a Graphic Systems phototypesetter; it was used to produce this manual. .ul Nroff produces output on a typewriter terminal. .ul Roff (I) is a somewhat less elaborate text formatting program, and requires somewhat less forethought. .pg .ul Surprises.|| Certain commands provide inter-user communication. Even if you do not plan to use them, it would be well to learn something about them, because someone else may aim them at you. .pg To communi.th TM IV 2/21/74 .sh NAME tm \*- TM-11/TU-10 magtape interface .sh DESCRIPTION The files .it "mt0, ..., mt7" refer to the DEC TU10/TM11 magtape. When opened for reading or writing, the tape is rewound. When closed, it is rewound; if it was open for writing, an end-of-file is written first. .s3 A standard tape consists of a series of 512 byte records terminated by an end-of-file. To the extent possible, the system makes it possible, if inefficient, to treat the tape like any other file. Seeks have their usu, you have full permissions to read, write, alter, or destroy its contents. Permissions to have your will with other directories and files will have been granted or denied to you by their owners. As a matter of observed fact, few \s8UNIX\s10 users protect their files from destruction, let alone perusal, by other users. .pg To change the current directory (but not the set of permissions you were endowed with at login) use \fIchdir\fR (I). .pg .ul Path names.|| To refer to files not in the current directory, cate with another user currently logged in, .ul write (I) is used; .ul mail (I) will leave a message whose presence will be announced to another user when he next logs in. The write-ups in the manual also suggest how to respond to the two commands if you are a target. .pg When you log in, a message-of-the-day may greet you before the first ``%''. al meaning and it is possible to read or write a byte at a time. Writing in very small units is inadvisable, however, because it tends to create monstrous record gaps. .s3 The .it mt files discussed above are useful when it is desired to access the tape in a way compatible with ordinary files. When foreign tapes are to be dealt with, and especially when long records are to be read or written, the ``raw'' interface is appropriate. The associated files are named .it "rmt0, ..., rmt7." Each .it read or .it wriyou must use a path name. Full path names begin with ``/'', the name of the root directory of the whole file system. After the slash comes the name of each directory containing the next sub-directory (followed by a ``/'') until finally the file name is reached. E.g.: .ul /\|usr/\|lem/\|filex refers to the file .ul filex in the directory .ul lem; lem is itself a subdirectory of .ul usr; usr springs directly from the root directory. .pg If your current directory has subdirectories, the path names of files the\.e..ac.8bproc.8chgrp.8chown.8clri.8crash.8cron.8dcheck.8df.8dpd.8dump.8getty.8glob.8icheck.8init.8lpd.8mkfs.8mknod.8mount.8ncheck.8restor.8sa.8su.8sync.8umount.8update.8wall.8te call reads or writes the next record on the tape. In the write case the record has the same length as the buffer given. During a read, the record size is passed back as the number of bytes read, provided it is no greater than the buffer size; if the record is long, an error is indicated. In raw tape I/O, the buffer must begin on a word boundary and the count must be even. Seeks are ignored. An error is returned when a tape mark is read, but another read will fetch the first record of the new tape file. .rein begin with the name of the subdirectory (no prefixed ``/''). .pg Without important exception, a path name may be used anywhere a file name is required. .pg Important commands which modify the contents of files are \fIcp\fR (I), \fImv\fR (I), and \fIrm\fR (I), which respectively copy, move (i.e. rename) and remove files. To find out the status of files or directories, use \fIls\fR (I). See \fImkdir\fR (I) for making directories; \fIrmdir\fR (I) for destroying them. .pg For a fuller discussion of the filpdgen.6plog.6plot.6primes.6ptx.6quiz.6rathole.6searchcpi.6sky.6sno.6speak.6spline.6tbl.6tekstare.6tmg.6tss.6ttt.6units.6wump.6sh FILES /dev/mt?, /dev/rmt? .sh "SEE ALSO" tp (I) .sh BUGS If any non-data error is encountered, it refuses to do anything more until closed. In raw I/O, there should be a way to perform forward and backward record and file spacing and to write an EOF mark. .th TC IV 10/15/73 .sh NAME tc \*- TC-11/TU56 DECtape .sh DESCRIPTION The files .it "tap0 ... tap7" refer to the TC-11/TU56 DECtape drives 0 to 7. .s3 The 256-word blocks on a standard DECtape are numbered 0 to 577. .sh FILES /dev/tap? .sh "SEE ALSO" tp (I) .sh BUGS he buffer must begin on a word boundary, and counts should be a multiple of 512 bytes (a disk block). Likewise .it seek calls should specify a multiple of 512 bytes. .sh FILES /dev/rk?, /dev/rrk? .sh BUGS Care should be taken in using the interleaved files. First, the same drive should not be accessed simultaneously using the ordinary name and as part of an interleaved file, because the same physical blocks have in effect two different names; this fools the system's buffering strategy. Second, the combined .th MEM IV 5/27/74 .sh NAME mem, kmem, null \*- core memory .sh DESCRIPTION .it Mem is a special file that is an image of the core memory of the computer. It may be used, for example, to examine, and even to patch the system using the debugger. .s3 A memory address is an 18-bit quantity which is used directly as a UNIBUS address. References to non-existent locations cause errors to be returned. .s3 Examining and patching device registers is likely to lead to unexpected results when read-only or write-only.th RP IV 2/21/74 .sh NAME rp \*- RP-11/RP03 moving-head disk .sh DESCRIPTION The files .it "rp0 ... rp7" refer to sections of RP disk drive 0. The files .it "rp8 ... rp15" refer to drive 1 etc. This is done since the size of a full RP drive is 81200 blocks and internally the system is only capable of addressing 65536 blocks. Also since the disk is so large, this allows it to be broken up into more manageable pieces. .s3 The origin and size of the pseudo-disks on each drive are as follows: .s3 .br disk stafiles cannot be used for swapping or raw I/O.  bits are present. .s3 The file .it kmem is the same as .it mem except that kernel virtual memory rather than physical memory is accessed. In particular, the I/O area of .it kmem is located beginning at 160000 (octal) rather than at 760000. The 1K region beginning at 140000 (octal) is the system's data for the current process. .s3 The file .it null returns end-of-file on .it read and ignores .it write. .sh FILES /dev/mem, /dev/kmem, /dev/null rt length .br 0 0 40600 .br 1 40600 40600 .br 2 0 9200 .br 3 72000 9200 .br 4 0 65535 .br 5 15600 65535 .br 6-7 unassigned .s3 It is unwise for all of these files to be present in one installation, since there is overlap in addresses and protection becomes a sticky matter. Here is a suggestion for two useful configurations: If the root of the file system is on some other device and the RP used as a mounted device, then .it rp0 and .it rp1, which divide the disk into two equal size portions, is a good.th RF IV 10/15/73 .sh NAME rf \*- RF11/RS11 fixed-head disk file .sh DESCRIPTION This file refers to the concatenation of all RS-11 disks. .s3 Each disk contains 1024 256-word blocks. The length of the combined RF file is 1024\*X(minor+1) blocks. That is minor device zero is taken to be 1024 blocks long; minor device one is 2048, etc. .s3 The .it rf0 file accesses the disk via the system's normal buffering mechanism and may be read and written without regard to physical disk records. There is also a ``raw'.th LP IV 5/27/74 .sh NAME lp \*- line printer .sh DESCRIPTION .it Lp provides the interface to any of the standard DEC line printers. When it is opened or closed, a suitable number of page ejects is generated. Bytes written are printed. .s3 An internal parameter within the driver determines whether or not the device is treated as having a 96- or 64-character set. In half-ASCII mode, lower case letters are turned into upper case and certain characters are escaped according to the following table: .s3 .if t  idea. Other things being equal, it is advantageous to have two equal-sized portions since one can always be copied onto the other, which is occasionally useful. .s3 If the RP is the only disk and has to contain the root and the swap area, the root can be put on .it rp2 and a mountable file system on .it rp5. Then the swap space can be put in the unused blocks 9200 to 15600 of .it rp0 (or, equivalently, .it rp4). This arrangement puts the root file system, the swap area, and the i-list of the mounted file s' interface which provides for direct transmission between the disk and the user's read or write buffer. A single read or write call results in exactly one I/O operation and therefore raw I/O is considerably more efficient when many words are transmitted. The name of the raw RF file is .it rrf0. The same minor device considerations hold for the raw interface as for the normal interface. .s3 In raw I/O the buffer must begin on a word boundary, and counts should be a multiple of 512 bytes (a disk block). Like.ig .lp +10 5 { (- .lp +10 5 } )- .lp +10 5 \*g \*a- .lp +10 5 | !- .lp +10 5 ~ ^- .. .if n .ig .lp +10 5 { \o"(\*-" .lp +10 5 } \o")\*-" .lp +10 5 \*g \o"\*a\*-" .lp +10 5 | \o"!\*-" .lp +10 5 ~ \o"^\*-" .. .i0 .s3 The driver correctly interprets carriage returns, backspaces, tabs, and form feeds. A sequence of newlines which extends over the end of a page is turned into a form feed. All lines are indented 8 characters. Lines longer than 80 characters are truncated. These numbers are parameters in theystem relatively near each other and thus tends to minimize head movement. .s3 The .it rp files access the disk via the system's normal buffering mechanism and may be read and written without regard to physical disk records. There is also a ``raw'' interface which provides for direct transmission between the disk and the user's read or write buffer. A single read or write call results in exactly one I/O operation and therefore raw I/O is considerably more efficient when many words are transmitted. The nameswise .it seek calls should specify a multiple of 512 bytes. .sh FILES /dev/rf0, /dev/rrf0 .sh BUGS The 512-byte restrictions on the raw device are not physically necessary, but are still imposed.  driver; another parameter allows indenting all printout if it is unpleasantly near the left margin. .sh FILES /dev/lp .sh "SEE ALSO" lpr (I) .sh BUGS Half-ASCII mode, the indent and the maximum line length should be settable by a call analogous to stty (II).  of the raw RP files begin with .it rrp and end with a number which selects the same disk section as the corresponding .it rp file. .s3 In raw I/O the buffer must begin on a word boundary, and counts should be a multiple of 512 bytes (a disk block). Likewise .it seek calls should specify a multiple of 512 bytes. .sh FILES /dev/rp?, /dev/rrp? .sh BUGS .th PC IV 10/15/73 .sh NAME pc \*- PC-11 paper tape reader/punch .sh DESCRIPTION .it Ppt refers to the PC-11 paper tape reader or punch, depending on whether it is read or written. .s3 When .it ppt is opened for writing, a 100-character leader is punched. Thereafter each byte written is punched on the tape. No editing of the characters is performed. When the file is closed, a 100-character trailer is punched. .s3 When .it ppt is opened for reading, the process waits until tape is placed in the reader and.th KL IV 5/27/74 .sh NAME kl \*- KL-11 or DL-11 asynchronous interface .sh DESCRIPTION The discussion of typewriter I/O given in tty (IV) applies to these devices. .s3 Since they run at a constant speed, attempts to change the speed via stty (II) are ignored. .s3 The on-line console typewriter is interfaced using a KL-11 or DL-11. By appropriate switch settings during a reboot, UNIX will come up as a single-user system with I/O on the console typewriter. .sh FILES /dev/tty8 console .sh "SEE ALSO" tty (IV),.th RK IV 10/15/73 .sh NAME rk \*- RK-11/RK03 (or RK05) disk .sh DESCRIPTION .it Rk? refers to an entire RK03 disk as a single sequentially-addressed file. Its 256-word blocks are numbered 0 to 4871. .s3 Drive numbers (minor devices) of eight and larger are treated specially. Drive 8+\fIx\fR is the \fIx\fR+1 way interleaving of devices rk0 to rk\fIx\fR. Thus blocks on rk10 are distributed alternately among rk0, rk1, and rk2. .s3 The .it rk files discussed above access the disk via the system's normal buff the reader is on-line. Then requests to read cause the characters read to be passed back to the program, again without any editing. This means that several null leader characters will usually appear at the beginning of the file. Likewise several nulls are likely to appear at the end. End-of-file is generated when the tape runs out. .s3 Seek calls for this file are meaningless. .sh FILES /dev/ppt .sh BUGS If both the reader and the punch are open simultaneously, the trailer is sometimes not punched. Sometim init (VIII) .sh BUGS Modem control for the DL-11E is not implemented. ering mechanism and may be read and written without regard to physical disk records. There is also a ``raw'' interface which provides for direct transmission between the disk and the user's read or write buffer. A single read or write call results in exactly one I/O operation and therefore raw I/O is considerably more efficient when many words are transmitted. The names of the raw RK files begin with .it rrk and end with a number which selects the same disk as the corresponding .it rk file. .s3 In raw I/O tes the reader goes into a dead state in which it cannot be opened. .th HT IV 2/9/75 .sh NAME ht \*- RH-11/TU-16 magtape interface .sh DESCRIPTION The files .it "mt0, ..., mt7" refer to the DEC RH/TM/TU16 magtape. When opened for reading or writing, the tape is rewound. When closed, it is rewound; if it was open for writing, a double end-of-file is written first. .s3 A standard tape consists of a series of 512 byte records terminated by a double end-of-file. To the extent possible, the system makes it possible, if inefficient, to treat the tape like any other file. Seeks have their usual meaning and it is possible to read or write a byte at a time. Writing in very small units is inadvisable, however, because it tends to create monstrous record gaps. .s3 The .it mt files discussed above are useful when it is desired to access the tape in a way compatible with ordinary files. When foreign tapes are to be dealt with, and especially when long records are to be read or written, the ``raw'' interface is appropriate. The associated files are named .it "rmt0, ..., rmt7." Each .it rearect transmission between the disk and the user's read or write buffer. A single read or write call results in exactly one I/O operation and therefore raw I/O is considerably more efficient when many words are transmitted. The names of the raw RP files begin with .it rhp and end with a number which selects the same disk section as the corresponding .it hp file. .s3 In raw I/O the buffer must begin on a word boundary, and counts should be a multiple of 512 bytes (a disk block). Likewise .it seek calls shouldtty (IV), stty (II), dh (IV) .sh BUGS d or .it write call reads or writes the next record on the tape. In the write case the record has the same length as the buffer given. During a read, the record size is passed back as the number of bytes read, provided it is no greater than the buffer size; if the record is long, an error is indicated. In raw tape I/O, the buffer must begin on a word boundary and the count must be even. Seeks are ignored. An error is returned when a tape mark is read, but another read will fetch the first record of the new  specify a multiple of 512 bytes. .sh FILES /dev/hp?, /dev/rhp? .sh BUGS .th CAT IV 10/27/73 .sh NAME cat \*- phototypesetter interface .sh DESCRIPTION .it Cat provides the interface to a Graphic Systems C/A/T phototypesetter. Bytes written on the file specify font, size, and other control information as well as the characters to be flashed. The coding will not be described here. .s3 Only one process may have this file open at a time. It is write-only. .sh FILES /dev/cat .sh "SEE ALSO" troff (I), Graphic Systems specification (available on request) .sh BUGS tape file. .sh FILES /dev/mt?, /dev/rmt? .sh "SEE ALSO" tp (I) .sh BUGS Raw I/O doesnt work yet. The magtape system is supposed to be able to take 64 drives. Such addressing has never been tried. These bugs will be fixed when we get more experience with this device. .s3 If any non-data error is encountered, it refuses to do anything more until closed. In raw I/O, there should be a way to perform forward and backward record and file spacing and to write an EOF mark. .th DP IV 8/24/73 .sh NAME dp \*- DP-11 201 data-phone interface .sh DESCRIPTION The .it dp0 file is a 201 data-phone interface. .it Read and .it write calls to dp0 are limited to a maximum of 512 bytes. Each write call is sent as a single record. Seven bits from each byte are written along with an eighth odd parity bit. The sync must be user supplied. Each read call returns characters received from a single record. Seven bits are returned unaltered; the eighth bit is set if the byte was not received in odd.th TTYN III 1/15/73 .sh NAME ttyn \*- return name of current typewriter .sh SYNOPSIS .ft B jsr pc,ttyn .s3 ttyn(file) .s3 .ft R .sh DESCRIPTION .it Ttyn hunts up the last character of the name of the typewriter which is the standard input (from \fIas\fR) or is specified by the argument .it file descriptor (from C). If \fIn\fR is returned, the typewriter name is then ``/dev/tty\fIn\fR''. .s3 .bd x is returned if the indicated file does not correspond to a typewriter. .sh BUGS .th HS IV 2/9/75 .sh NAME hs \*- RH11/RS03-RS04 fixed-head disk file .sh DESCRIPTION The files .it "hs0 ... hs7" refer to RJS03 disk drives 0 through 7. The files .it "hs8 ... hs15" refer to RJS04 disk drives 0 through 7. The RJS03 drives are each 1024 blocks long and the RJS04 drives are 2048 blocks long. .s3 The .it hs files access the disk via the system's normal buffering mechanism and may be read and written without regard to physical disk records. There is also a ``raw'' inteface which provides for di parity. A 10 second time out is set and a zero-byte record is returned if nothing is received in that time. .sh FILES /dev/dp0 .sh "SEE ALSO" dn (IV), gerts (III) .sh BUGS .th SQRT III 3/15/72 .sh NAME sqrt \*- square root function .sh SYNOPSIS .br .ft B jsr pc,sqrt .s3 double sqrt(x) .br double x; .ft R .sh DESCRIPTION The square root of fr0 (resp. \fBx\fR) is returned (in fr0). .sh DIAGNOSTICS The c-bit is set on negative arguments and 0 is returned. There is no error return for C programs. .sh BUGS No error return from C. rect transmission between the disk and the user's read or write buffer. A single read or write call results in exactly one I/O operation and therefore raw I/O is considerably more efficient when many words are transmitted. The names of the raw HS files begin with .it rhs. The same minor device considerations hold for the raw interface as for the normal interface. .s3 In raw I/O the buffer must begin on a word boundary, and counts should be a multiple of 512 bytes (a disk block). Likewise .it seek calls shou.th DN IV 3/20/74 .sh NAME dn \*- DN-11 ACU interface .sh DESCRIPTION The .it dn? files are write-only. The permissible codes are: .s3 .lp +8 4 0-9 dial 0-9 .lp +8 4 : dial * .lp +8 4 ; dial # .lp +8 4 \*- 4 second delay for second dial tone .lp +8 4 = end-of-number .s3 .i0 The entire telephone number must be presented in a single .it write system call. .s3 It is recommended that an end-of-number code be given even though not all ACU's actually require it. .dt .sh FILES /dev/dn0 connected to 801 with dp0 .b.th SIN III 3/15/72 .sh NAME sin, cos \*- trigonometric functions .sh SYNOPSIS .nf .ft B jsr pc,sin (cos) .s3 double sin(x) double x; .s3 double cos(x) double x; .fi .ft R .sh DESCRIPTION The sine (cosine) of fr0 (resp. \fBx\fR), measured in radians, is returned (in fr0). .s3 The magnitude of the argument should be checked by the caller to make sure the result is meaningful. .sh BUGS ld specify a multiple of 512 bytes. .sh FILES /dev/hs?, /dev/rhs? .sh BUGS r /dev/dn1 not currently connected .br /dev/dn2 not currently connected .sh "SEE ALSO" dp (IV) .sh BUGS .th SETFIL III 10/29/73 .sh NAME setfil \*- specify Fortran file name .sh SYNOPSIS .ft B call setfil ( \fRunit\fB, \fRhollerith-string\fB ) .ft R .sh DESCRIPTION .it Setfil provides a primitive way to associate an integer I/O .it unit number with a file named by the .it hollerith-string. The end of the file name is indicated by a blank. Subsequent I/O on this unit number will refer to the file whose name is specified by the string. .s3 .it Setfil should be called only before any I/O has been done on the .it.th HP IV 2/9/75 .sh NAME hp \*- RH-11/RP04 moving-head disk .sh DESCRIPTION The files .it "hp0 ... hp7" refer to sections of RP disk drive 0. The files .it "hp8 ... hp15" refer to drive 1 etc. This is done since the size of a full RP drive is 170,544 blocks and internally the system is only capable of addressing 65536 blocks. Also since the disk is so large, this allows it to be broken up into more manageable pieces. .s3 The origin and size of the pseudo-disks on each drive are as follows: .s3 .br disk st.th DH IV 5/27/74 .sh NAME dh \*- DH-11 communications multiplexer .sh DESCRIPTION Each line attached to the DH-11 communications multiplexer behaves as described in tty (IV). Input and output for each line may independently be set to run at any of 16 speeds; see stty (II) for the encoding. .sh FILES /dev/tty[f-u] .sh "SEE ALSO" tty (IV), stty (II) .sh BUGS  unit, or just after doing a .bd rewind or .bd endfile. It is ineffective for unit numbers 5 and 6. .sh "SEE ALSO" fc (I) .sh BUGS The exclusion of units 5 and 6 is unwarranted. art length .br 0 0 9614 .br 1 18392 65535 .br 2 48018 65535 .br 3 149644 20900 .br 4 0 40600 .br 5 41800 40600 .br 6 83600 40600 .br 7 125400 40600 .s3 It is unwise for all of these files to be present in one installation, since there is overlap in addresses and protection becomes a sticky matter. .s3 The .it hp files access the disk via the system's normal buffering mechanism and may be read and written without regard to physical disk records. There is also a ``raw'' interface which provides for di.th DC IV 5/27/74 .sh NAME dc \*- DC-11 communications interface .sh DESCRIPTION The discussion of typewriter I/O given in tty (IV) applies to these devices. .s3 The DC-11 typewriter interface operates at any of four speeds, independently settable for input and output. The speed is selected by the same encoding used by the DH (IV) device (enumerated in stty (II)); impossible speed changes are ignored. .sh FILES /dev/tty[01234567abcd] 113B Dataphones (not currently connected\*- see dh (IV)) .sh "SEE ALSO" .th RESET III 5/10/73 .sh NAME reset, setexit \*- execute non-local goto .sh SYNOPSIS .ft B .bd "setexit( )" .s3 .bd "reset( )" .ft R .sh DESCRIPTION These routines are useful for dealing with errors and interrupts encountered in a low-level subroutine of a program. .s3 .it Setexit saves its stack environment in a static place for later use by .it reset. .s3 .it Reset restores the environment saved by the last call of .it setexit. It then returns in such a way that execution continues as if the call of .it setexit had just returned. All accessible data have values as of the time .it reset was called. .s3 The routine that called .it setexit must still be active when .it reset is called. .sh "SEE ALSO" signal (II) .sh BUGS n file (mode 666) and sets up the buffer .it iobuf (size 518 bytes); .it putc and .it putw write a byte or word respectively onto the file; .it flush forces the contents of the buffer to be written, but does not close the file. The structure of the buffer is: .nf .ft B .nf struct buf { int fildes; /* File descriptor */ int nunused; /* Remaining slots */ char *xfree; /* Ptr to next free slot */ char buff[512]; /* The buffer */ }; .ft R .s3 .fi Before terminating, a program should call .it flush to force he number of characters indicated by the precision specification is reached; however if the precision is 0 or missing all characters up to a null are printed. .s3 .lp +6 3 l The argument is taken to be an unsigned integer which is converted to decimal and printed (the result will be in the range 0 to 65535). .s3 .i0 If no recognizable character appears after the \fB%\fR, that character is printed; thus \fb%\fR may be printed by use of the string \fB%%\fR. In no case does a non-existent or small field width .th RAND III 1/15/73 .sh NAME rand, srand \*- random number generator .sh SYNOPSIS (seed in r0) .br .ft B jsr pc,srand /to initialize .s3 jsr pc,rand /to get a random number .s3 .nf srand(seed) int seed; .s3 rand( ) .fi .ft R .s3 .sh DESCRIPTION .it Rand uses a multiplicative congruential random number generator to return successive pseudo-random numbers (in r0) in the range from 0 to 2\u\s715\s10\d\*-1. .s3 The generator is reinitialized by calling .it srand with 1 as argument (in r0). It can be set to a rout the last of the output .it (fflush from C). .s3 The user must supply .it iobuf, which should begin on a word boundary. .s3 To write a new file using the same buffer, it suffices to call .it [f]flush, close the file, and call .it fcreat again. .sh "SEE ALSO" creat (II), write (II), getc (III) .sh DIAGNOSTICS .it Fcreat sets the error bit (c-bit) if the file creation failed (from C, returns \*-1). .it Putc and .it putw return their character (word) argument. In all calls .it errno is set appropriately tcause truncation of a field; padding takes place only if the specified field width exceeds the actual width. Characters generated by .it printf are printed by calling .it putchar. .sh "SEE ALSO" putchar (III) .sh BUGS Very wide fields (>128 characters) fail. andom starting point by calling .it srand with whatever you like as argument, for example the low-order word of the time. .sh BUGS The low-order bits are not very random. o 0 or to a system error number. See introduction (II). .sh BUGS .tr | .th POW III 4/30/73 .sh NAME pow \*- floating exponentiation .sh SYNOPSIS .ft B movf x,fr0 .br movf y,fr1 .br jsr pc,pow .s3 .nf double pow(x,y) double x, y; .fi .s3 .ft R .sh DESCRIPTION .it Pow returns the value of \fIx\u\s8y\s10\d\fR (in fr0). .it "Pow(0.0,|y)" is 0 for any .it y. .it "Pow(\*-x,|y)" returns a result only if .it y is an integer. .sh "SEE ALSO" exp (III), log (III) .sh DIAGNOSTICS The carry bit is set on return in case of overflow, .it pow(0.0,|0.0), or .it pow(\*-x,|y) for non-integ.th QSORT III 2/8/75 .sh NAME qsort \*- quicker sort .sh SYNOPSIS .nf .ft B qsort(base, nel, width, compar) char *base; int (*compar)( ); .fi .ft R .sh DESCRIPTION .it Qsort is an implementation of the quicker-sort algorithm. The first argument is a pointer to the base of the data; the second is the number of elements; the third is the width of an element in bytes; the last is the name of the comparison routine. It is called with two arguments which are pointers to the elements being compared. The routine m.th PRINTF III 9/17/73 .sh NAME printf \*- formatted print .sh SYNOPSIS .ft B printf(format, arg\s6\d1\u\s10, ...); .br char *format; .ft R .sh DESCRIPTION .it Printf converts, formats, and prints its arguments after the first under control of the first argument. The first argument is a character string which contains two types of objects: plain characters, which are simply copied to the output stream, and conversion specifications, each of which causes conversion and printing of the next successive argumenral .it y. From C there is no diagnostic. .sh BUGS ust return an integer less than, equal to, or greater than 0 according as the first argument is to be considered less than, equal to, or greater than the second. .sh "SEE ALSO" sort (I) .sh BUGS t to .it printf. .s3 Each conversion specification is introduced by the character \fB%\fR. Following the \fB%\fR, there may be .s3 .lp +6 2 \*- an optional minus sign ``\*-'' which specifies .it "left adjustment" of the converted argument in the indicated field; .s3 .lp +6 2 \*- an optional digit string specifying a .it "field width;" if the converted argument has fewer characters than the field width it will be blank-padded on the left (or right, if the left-adjustment indicator has been given) to make up .th PERROR III 11/5/73 .sh NAME perror, sys\*_errlist, sys\*_nerr, errno \*- system error messages .sh SYNOPSIS .ft B perror(s) .br char *s; .s3 int sys\*_nerr; .br char *sys\*_errlist[]; .s3 int errno; .ft R .br .sh DESCRIPTION .it Perror produces a short error message describing the last error encountered during a call to the system from a C program. First the argument string .it s is printed, then a colon, then the message and a new-line. Most usefully, the argument string is the name of the program whic.th PUTCHAR III 5/10/73 .sh NAME putchar, flush \*- write character .sh SYNOPSIS .ft B putchar(ch) .s3 flush( ) .ft R .sh DESCRIPTION .it Putchar writes out its argument and returns it unchanged. Only the low-order byte is written, and only if it is non-null. Unless other arrangements have been made, .it putchar writes in unbuffered fashion on the standard output file. .s3 Associated with this routine is an external variable .it fout which has the structure of a buffer discussed under putc (III). If the filthe field width; .s3 .lp +6 2 \*- an optional period ``\fB.\fR'' which serves to separate the field width from the next digit string; .s3 .lp +6 2 \*- an optional digit string .it "(precision)" which specifies the number of digits to appear after the decimal point, for e- and f-conversion, or the maximum number of characters to be printed from a string; .s3 .lp +6 2 \*- a character which indicates the type of conversion to be applied. .s3 .i0 The conversion characters and their meanings are .s3 .lp +6 3 d .h incurred the error. The error number is taken from the external variable .it errno, which is set when errors occur but not cleared when non-erroneous calls are made. .s3 To simplify variant formatting of messages, the vector of message strings .it sys\*_errlist is provided; .it errno can be used as an index in this table to get the message string without the newline. .it Sys\*_nerr is the largest message number provided for in the table; it should be checked because new error codes may be added to the syse descriptor part of this structure (first word) is greater than 2, output via .it putchar is buffered. To achieve buffered output one may say, for example, .s3 .nf fout = dup(1); or fout = creat(...); .s3 .fi In such a case .it flush must be called before the program terminates in order to flush out the buffered output. .it Flush may be called at any time. .sh "SEE ALSO" putc (III) .sh BUGS The .it fout notion is kludgy. lp +6 3 o .lp +6 3 x The integer argument is converted to decimal, octal, or hexadecimal notation respectively. .s3 .lp +6 3 f The argument is converted to decimal notation in the style ``[\fB\*-\fR]ddd.ddd'' where the number of d's after the decimal point is equal to the precision specification for the argument. If the precision is missing, 6 digits are given; if the precision is explicitly 0, no digits and no decimal point are printed. The argument should be .it float or .it double. .s3 .lp +6 3 e The argtem before they are added to the table. .sh "SEE ALSO" Introduction to System Calls .sh BUGS .th PUTC III 6/12/72 .sh NAME putc, putw, fcreat, fflush \*- buffered output .sh SYNOPSIS .ft B .nf mov $filename,r0 jsr r5,fcreat; iobuf .s3 fcreat(file, iobuf) char *file; struct buf *iobuf; .s3 .ft R (get byte in r0) .ft B jsr r5,putc; iobuf .s3 putc(c, iobuf) int c; struct buf *iobuf; .s3 .ft R (get word in r0) .ft B jsr r5,putw; iobuf .s3 putw(w, iobuf); .br int w; .br struct buf *iobuf; .s3 jsr r5,flush; iobuf .s3 fflush(iobuf) struct buf *iobuf; .fi .ft R .sh DESCRIPTION .it Fcreat creates the giveument is converted in the style ``[\fB\*-\fR]d\fB.\fRddd\fBe\fR\(+-dd'' where there is one digit before the decimal point and the number after is equal to the precision specification for the argument; when the precision is missing, 6 digits are produced. The argument should be a .it float or .it double quantity. .s3 .lp +6 3 c The argument character is printed. .s3 .lp +6 3 s The argument is taken to be a string (character pointer) and characters from the string are printed until a null character or until t.th NLIST III 6/12/72 .sh NAME nlist \*- get entries from name list .sh SYNOPSIS .ft B .nf .i0 nlist(filename, nl) char *filename; .dt struct { char name[8]; int type; int value; } nl[ ]; .fi .ft R .sh DESCRIPTION .it Nlist examines the name list in the given executable output file and selectively extracts a list of values. The name list consists of a list of 8-character names (null padded) each followed by two words. The list is terminated with a null name. Each name is looked up in the name list of the file. If the name is found, the type and value of the name are placed in the two words following the name. If the name is not found, the type entry is set to \*-1. .s3 This subroutine is useful for examining the system name list kept in the file \fB/unix\fR. In this way programs can obtain system addresses that are up to date. .sh "SEE ALSO" a.out (V) .sh DIAGNOSTICS All type entries are set to \*-1 if the file cannot be found or if it is not a valid namelist. .sh BUGS .th LDIV III 5/7/73 .sh NAME ldiv, lrem \*- long division .sh SYNOPSIS .ft B ldiv(hidividend, lodividend, divisor) .s3 lrem(hidividend, lodividend, divisor) .ft R .sh DESCRIPTION The concatenation of the signed 16-bit .it hidividend and the unsigned 16-bit .it lodividend is divided by \fIdivisor\fR. The 16-bit signed quotient is returned by .it ldiv and the 16-bit signed remainder is returned by .it lrem. Divide check and erroneous results will occur unless the magnitude of the divisor is greater than that the simplest applications; .it getc is better when there are multiple input files. .sh "SEE ALSO" getc (III) .sh DIAGNOSTICS Null character returned on EOF or error. .sh BUGS \*-1 should be returned on EOF; null is a legitimate character. .th NARGS III 5/10/73 .sh NAME nargs \*- argument count .sh SYNOPSIS .bd "nargs( )" .sh DESCRIPTION .it Nargs returns the number of actual parameters supplied by the caller of the routine which calls \fInargs\fR. .s3 The argument count is accurate only when none of the actual parameters is .it float or \fIdouble\fR. Such parameters count as four arguments instead of one. .sh BUGS As indicated. Also, this routine does not work (and cannot be made to work) in programs with separated I and D space. Altogetherof the high-order dividend. .s3 An integer division of an unsigned dividend by a signed divisor may be accomplished by .s3 quo = ldiv(0, dividend, divisor); .s3 and similarly for the remainder operation. .s3 Often both the quotient and the remainder are wanted. Therefore .it ldiv leaves a remainder in the external cell .it ldivr. .sh BUGS No divide check check. .th GETC III 4/30/72 .sh NAME getc, getw, fopen \*- buffered input .sh SYNOPSIS .ft B mov $filename,r0 .br jsr r5,fopen; iobuf .s3 fopen(filename, iobuf) .br char *filename; .br struct buf *iobuf; .s3 jsr r5,getc; iobuf .br .ft R (character in r0) .s3 .ft B getc(iobuf) .br struct buf *iobuf; .s3 jsr r5,getw; iobuf .br .ft R (word in r0) .s3 .ft B getw(iobuf) .br struct buf *iobuf; .ft R .sh DESCRIPTION These routines provide a buffered input facility. .it Iobuf is the address of a 518(10) byte buffer area it is best to avoid using this routine and depend, for example, on passing an explicit argument count. .th IERROR III 10/29/73 .sh NAME ierror \*- catch Fortran errors .sh SYNOPSIS .ft B if ( ierror ( \fIerrno\fB ) .ne. 0 ) goto \fIlabel\fR .sh DESCRIPTION .it Ierror provides a way of detecting errors during the running of a Fortran program. Its argument is a run-time error number such as enumerated in .it fc (I). .s3 When .it ierror is called, it returns a 0 value; thus the .bd goto statement in the synopsis is not executed. However, the routine stores inside itself the call point and invocation level. If a whose contents are maintained by these routines. Its structure is .s3 .nf .ft B struct buf { int fildes; /* File descriptor */ int nleft; /* Chars left in buffer */ char *nextp; /* Ptr to next character */ char buff[512]; /* The buffer */ }; .ft R .s3 .fi .it Fopen may be called initially to open the file. On return, the error bit (c-bit) is set if the open failed. If \fIfopen\fR is never called, \fIget\fR will read from the standard input file. From C, the value is negative if the open failed. .th MONITOR III 2/11/74 .sh NAME monitor \*- prepare execution profile .sh SYNOPSIS .ft B monitor(lowpc, highpc, buffer, bufsize) .br int lowpc( ), highpc( ), buffer[ ], bufsize; .ft R .sh DESCRIPTION .it Monitor is an interface to the system's profile entry (II). .it Lowpc and .it highpc are the names of two functions; .it buffer is the address of a (user supplied) array of .it bufsize integers. .it Monitor arranges for the system to sample the user's program counter periodically and record the execution hnd when the indicated error occurs, a .bd return is simulated from .it ierror with a non-zero value; thus the .bd goto (or other statement) is executed. It is a ghastly error to call .it ierror from a subroutine which has already returned when the error occurs. .s3 This routine is essentially tailored to catching end-of-file situations. Typically it is called just before the start of the loop which reads the input file, and the .bd goto jumps to a graceful termination of the program. .s3 There is a limit of.s3 .it Getc returns the next byte from the file in r0. The error bit is set on end of file or a read error. From C, the character is returned as an integer, without sign extension; it is \*-1 on end-of-file or error. .s3 \fIGetw\fR returns the next word in r0. .it Getc and \fIgetw\fR may be used alternately; there are no odd/even problems. \fIGetw\fR is may be called from C; \*-1 is returned on end-of-file or error, but of course is also a legitimate value. .s3 .it Iobuf must be provided by the user; it muistogram in the buffer. The lowest address sampled is that of .it lowpc and the highest is just below .it highpc. For the results to be significant, especially where there are small, heavily used routines, it is suggested that the buffer be no more than a few times smaller than the range of locations sampled. .s3 To profile the entire program, it is sufficient to use .s3 extern etext; .br ... .br monitor(2, &etext, buf, bufsize); .s3 .it Etext is a loader-defined symbol which lies just above all the prog 5 on the number of different error numbers which can be caught. .sh "SEE ALSO" fc (I) .sh BUGS There is no way to ignore errors. st be on a word boundary. .s3 To reuse the same buffer for another file, it is sufficient to close the original file and call \fIfopen\fR again. .sh "SEE ALSO" open (II), read (II), getchar (III), putc (III) .sh DIAGNOSTICS c-bit set on EOF or error; from C, negative return indicates error or EOF. Moreover, .it errno is set by this routine just as it is for a system call (see introduction (II)). .sh BUGS ram text. .s3 To stop execution monitoring and write the results on the file .it mon.out, use .s3 monitor(0); .s3 Then, when the program exits, prof (I) can be used to examine the results. .s3 It is seldom necessary to call this routine directly; the .bd \*-p option of .it cc is simpler if one is satisfied with its default profile range and resolution. .sh FILES mon.out .sh "SEE ALSO" prof (I), profil (II), cc (I) .th HMUL III 4/7/73 .sh NAME hmul \*- high-order product .sh SYNOPSIS .ft B hmul(x, y) .ft R .sh DESCRIPTION .it Hmul returns the high-order 16 bits of the product of .bd x and .bd y. (The binary multiplication operator generates the low-order 16 bits of a product.) .sh BUGS .th GETARG III 11/24/73 .sh NAME getarg, iargc \*- get command arguments from Fortran .sh SYNOPSIS .ft B call getarg ( i, iarray \fR[ \fB, isize \fR]\fB ) .s3 .li ... = iargc(dummy) .ft R .sh DESCRIPTION The .it getarg entry fills in .it iarray (which is considered to be .it integer) with the Hollerith string representing the .it i th argument to the command in which it it is called. If no .it isize argument is specified, at least one blank is placed after the argument, and the last word affected is blank p.th LOG III 4/30/72 .sh NAME log \*- natural logarithm .sh SYNOPSIS .ft B jsr pc,log .s3 double log(x) .br double x; .ft R .sh DESCRIPTION The natural logarithm of fr0 is returned in fr0. From C, the natural logarithm of \fBx\fR is returned. .sh DIAGNOSTICS The error bit (c-bit) is set if the input argument is less than or equal to zero and the result is a negative number very large in magnitude. From C, there is no error indication. .sh BUGS .th GETPW III 4/7/73 .sh NAME getpw \*- get name from UID .sh SYNOPSIS .ft B getpw(uid, buf) .br char *buf; .ft R .sh DESCRIPTION .it Getpw searches the password file for the (numerical) \fIuid\fR, and fills in \fIbuf\fR with the corresponding line; it returns non-zero if \fIuid\fR could not be found. The line is null-terminated. .sh FILES /etc/passwd .sh "SEE ALSO" passwd (V) .sh DIAGNOSTICS non-zero return on error. .sh BUGS added. The user should make sure that the array is big enough. .s3 If the .it isize argument is given, the argument will be followed by blanks to fill up .it isize words, but even if the argument is long no more than that many words will be filled in. .s3 The blank-padded array is suitable for use as an argument to setfil (III). .s3 The .it iargc entry returns the number of arguments to the command, counting the first (file-name) argument. .sh "SEE ALSO" exec (II), setfil (III) .sh BUGS .th LOCV III 3/9/74 .sh NAME locv \*- long output conversion .sh SYNOPSIS .nf .ft B char *locv(hi, lo) int hi, lo; .fi .ft R .sh DESCRIPTION .it Locv converts a signed double-precision integer, whose parts are passed as arguments, to the equivalent ASCII character string and returns a pointer to that string. .sh BUGS Since .it locv returns a pointer to a static buffer containing the converted result, it cannot be used twice in the same expression; the second result overwrites the first. .th GETCHAR III 4/7/73 .sh NAME getchar \*- read character .sh SYNOPSIS .ft B getchar( ) .br .ft R .sh DESCRIPTION .it Getchar provides the simplest means of reading characters from the standard input for C programs. It returns successive characters until end-of-file, when it returns ``\\0''. .s3 Associated with this routine is an external variable called \fIfin\fR, which is a structure containing a buffer such as described under \fIgetc\fR (III). .s3 Generally speaking, .it getchar should be used only for .th GAMMA III 5/15/74 .sh NAME gamma \*- log gamma function .sh SYNOPSIS .br .ft B jsr pc,gamma .s3 double gamma(x) .br double x; .ft R .sh DESCRIPTION If \fIx\fR is passed (in fr0) .it gamma returns ln |\*|\*G(\*|\fIx\fR\*|)\*|| (in fr0). The sign of \*G(\*|\fIx\fR\*|) is returned in the external integer .it signgam. The following C program might be used to calculate \*G: .s3 y = gamma(x); .br if (y > 88.) .br error( ); .br y = exp(y); .br if(signgam) .br y = \*-y; .sh DIAGNOSTICS The c-bit is set on negative integral arguments and the maximum value is returned. There is no error return for C programs. .sh BUGS No error return from C. -p) option of .it cc. Of course it was for the benefit of such systems that the symbols were invented, and user programs, unless they are in firm control of their environment, are wise not to refer to the absolute symbols directly. .s3 One technique sometimes useful is to call .it sbrk(0), which returns the value of the current program break, instead of referring to .it &end, which yields the program break at the instant execution started. .s3 These symbols are accessible from assembly language if it is red. .s3 A routine named .it ctime is also available from Fortran. Actually it more resembles the .it time (II) system entry in that it returns the number of seconds since the epoch 0000 GMT Jan. 1, 1970 (as a floating-point number). .sh "SEE ALSO" time(II) .sh BUGS .th FPTRAP III 11/18/73 .sh NAME fptrap \*- floating point interpreter .sh SYNOPSIS .ft B sys signal; 4; fptrap .ft R .sh DESCRIPTION .it Fptrap is a simulator of the 11/45 FP11-B floating point unit. It works by intercepting illegal instruction traps and decoding and executing the floating point operation codes. .sh FILES In systems with real floating point, there is a fake routine in /lib/liba.a with this name; when simulation is desired, the real version should be put in liba.a .sh DIAGNOSTICS A break pomembered that they should be prefixed by `\*_' .sh "SEE ALSO" break (II), alloc (III) .sh BUGS .th CRYPT III 4/30/73 .sh NAME crypt \*- password encoding .sh SYNOPSIS .ft B mov $key,r0 .br jsr pc,crypt .s3 char *crypt(key) .br char *key; .ft R .sh DESCRIPTION On entry, r0 points to a string of characters terminated by an ASCII NUL. The routine performs an operation on the key which is difficult to invert (i.e. encrypts it) and leaves the resulting eight bytes of ASCII alphanumerics in a global cell called ``word''. .s3 From C, the .it key argument is a string and the value returned is a pointer to thint trap is given when a real illegal instruction trap occurs. .sh "SEE ALSO" signal (II), cc (I) (`\-f' option) .sh BUGS Rounding mode is not interpreted. It's slow. .th ECVT III 4/30/73 .sh NAME ecvt, fcvt \*- output conversion .sh SYNOPSIS .ft B jsr pc,ecvt .s3 jsr pc,fcvt .s3 char *ecvt(value, ndigit, decpt, sign) .br double value; .br int ndigit, *decpt, *sign; .s3 char *fcvt(value, ndigit, decpt, sign) .br .li ... .ft R .sh DESCRIPTION .it Ecvt is called with a floating point number in fr0. .s3 On exit, the number has been converted into a string of ascii digits in a buffer pointed to by r0. The number of digits produced is controlled by a global variable \fI\*_ndie eight-character result. .s3 This routine is used to encrypt all passwords. .sh "SEE ALSO" passwd(I), passwd(V), login(I) .sh BUGS Short or otherwise simple passwords can be decrypted easily by exhaustive search. Six characters of gibberish is reasonably safe. .th FMOD III 2/13/75 .sh NAME fmod \*- floating modulo function .sh SYNOPSIS .ft B .nf double fmod(x, y) double x, y; .ft R .fi .sh DESCRIPTION .if t .ds L \(<= .if n .ds L <_ .it Fmod returns the number .it f such that .it "x = iy + f," .it i is an integer, and 0 \*L .it f < .it y. .sh BUGS gits\fR. .s3 Moreover, the position of the decimal point is contained in r2: r2=0 means the d.p. is at the left hand end of the string of digits; r2>0 means the d.p. is within or to the right of the string. .s3 The sign of the number is indicated by r1 (0 for +; 1 for \*-). .s3 The low order digit has suffered decimal rounding (i. e. may have been carried into). .s3 From C, the .it value is converted and a pointer to a null-terminated string of \fIndigit\fR digits is returned. The position of the decimal po.th ATOI III 2/8/75 .sh NAME atoi \*- convert ASCII to integer .sh SYNOPSIS .ft B atoi(nptr) .br char *nptr; .ft R .sh DESCRIPTION .it Atoi converts the string pointed to by .it nptr to an integer. The string can contain leading blanks or tabs, an optional `\-', and then an unbroken string of digits. Conversion stops at the first non-digit. .sh "SEE ALSO" atof (III) .sh BUGS There is no provision for overflow. .th FLOOR III 5/15/74 .sh NAME floor, ceil \*- floor and ceiling functions .sh SYNOPSIS .br .ft B double floor(x) .br double x; .s3 double ceil(x) .br double x; .ft R .sh DESCRIPTION The floor function returns the largest integer (as a double precision number) not greater than \fBx\fR. .s3 The ceil function returns the smallest integer not less than \fBx\fR. .sh BUGS int is stored indirectly through \fIdecpt\fR (negative means to the left of the returned digits). If the sign of the result is negative, the word pointed to by \fIsign\fR is non-zero, otherwise it is zero. .s3 \fIFcvt\fR is identical to \fIecvt\fR, except that the correct digit been rounded for F-style output of the number of digits specified by \fI\(*_ndigits\fR. .sh "SEE ALSO" printf (III) .sh BUGS .th ATOF III 4/30/73 .sh NAME atof \*- convert ASCII to floating .sh SYNOPSIS .ft B double atof(nptr) .br char *nptr; .br .ft R .sh DESCRIPTION .it Atof converts a string to a floating number. .it Nptr should point to a string containing the number; the first unrecognized character ends the number. .s3 The only numbers recognized are: an optional minus sign followed by a string of digits optionally containing one decimal point, then followed optionally by the letter \fBe\fR followed by a signed integer. .s.th EXP III 4/30/73 .sh NAME exp \*- exponential function .sh SYNOPSIS .ft B jsr pc,exp .s3 double exp(x) .br double x; .ft R .sh DESCRIPTION The exponential of fr0 is returned in fr0. From C, the exponential of \fIx\fR is returned. .sh DIAGNOSTICS If the result is not representable, the c-bit is set and the largest positive number is returned. From C, no diagnostic is available. .s3 Zero is returned if the result would underflow. .sh BUGS .th CTIME III 10/15/73 .sh NAME ctime, localtime, gmtime \*- convert date and time to ASCII .sh SYNOPSIS .ft B char *ctime(tvec) .br int tvec[2]; .s3 .ft R [from Fortran] .br .ft B double precision ctime .br .li ... = ctime(dummy) .s3 int *localtime(tvec) .br int tvec[2]; .s3 int *gmtime(tvec) .br int tvec[2]; .br .ft R .sh DESCRIPTION .it Ctime converts a time in the vector .it tvec such as returned by time (II) into ASCII and returns a pointer to a character string in the form .s3 Sun Sep 16 01:03:5h DIAGNOSTICS There are none; overflow results in a very large number and garbage characters terminate the scan. .sh BUGS The routine should accept initial \fB+\fR, initial blanks, and \fBE\fR for \fBe\fR. Overflow should be signalled. .th END III 4/28/75 .sh NAME end, etext, edata \*- last locations in program .sh SYNOPSIS .ft B .nf extern end; extern etext; extern edata; .ft R .fi .sh DESCRIPTION These names refer neither to routines nor to locations with interesting contents. Instead, their addresses coincide with the first address above the program text region .it (etext), above the initialized data region .it (edata), or uninitialized data region .it (end). The last is the same as the program break. Values are given to these symbols 2 1973\\n\\0 .s3 All the fields have constant width. .s3 The .it localtime and .it gmtime entries return pointers to integer vectors containing the broken-down time. .it Localtime corrects for the time zone and possible daylight savings time; .it gmtime converts directly to GMT, which is the time UNIX uses. The value is a pointer to an array whose components are .s3 .lp +5 5 0 seconds .lp +5 5 1 minutes .lp +5 5 2 hours .lp +5 5 3 day of the month (1-31) .lp +5 5 4 month (0-11) .lp +5 5 5 year \*- 1900 .lp .th ATAN III 4/30/73 .sh NAME atan, atan2 \*- arc tangent function .sh SYNOPSIS .ft B jsr pc,atan\fR[\fB2\fR]\fB .s3 .br double atan(x) .br double x; .br .s3 double atan2(x, y) .br double x, y; .ft R .sh DESCRIPTION The \fIatan\fR entry returns the arc tangent of fr0 in fr0; from C, the arc tangent of \fIx\fR is returned. The range is \*-\*p/2 to \*p/2. The \fIatan2\fR entry returns the arc tangent of fr0/fr1 in fr0; from C, the arc tangent of \fIx/y\fR is returned. The range is \*-\*p to \(*p. .sh DIAGNby the link editor .it ld (I) when, and only when, they are referred to but not defined in the set of programs loaded. .s3 The usage of these symbols is rather specialized, but one plausible possibility is .s3 .nf extern end; ... ... = brk(&end+...); .fi .s3 (see .it break (II)). The problem with this is that it ignores any other subroutines which may want to extend core for their purposes; these include .it sbrk (see .it break (II)), .it alloc (III), and also secret subroutines invoked by the profile (\+5 5 6 day of the week (Sunday = 0) .lp +5 5 7 day of the year (0-365) .lp +5 5 8 Daylight Saving Time flag if non-zero .i0 .s3 The external variable .it timezone contains the difference, in seconds, between GMT and local standard time (in EST, is 5*60*60); the external variable .it daylight is non-zero iff the standard U.S.A. Daylight Savings Time conversion should be applied. The program knows about the peculiarities of this conversion in 1974 and 1975; if necessary, a table for these years can be extendeOSTIC There is no error return. .sh BUGS .th ALLOC III 3/1/74 .sh NAME alloc, free \*- core allocator .sh SYNOPSIS .ft B .nf char *alloc(size) .s3 free(ptr) char *ptr; .fi .ft R .sh DESCRIPTION .it Alloc and .it free provide a simple general-purpose core management package. .it Alloc is given a size in bytes; it returns a pointer to an area at least that size which is even and hence can hold an object of any type. The argument to .it free is a pointer to an area previously allocated by .it alloc; this space is made available for further allocationmination. A special status (0177) is returned for a stopped process which has not terminated and can be restarted. See ptrace (II). If the 0200 bit of the termination status is set, a core image of the process was produced by the system. .s3 If the parent process terminates without waiting on its children, the initialization process (process ID = 1) inherits the children. .sh "SEE ALSO" exit (II), fork (II), signal (II) .sh DIAGNOSTICS The error bit (c-bit) is set if there are no children not previously wai.th TIME II 8/5/73 .sh NAME time \*- get date and time .sh SYNOPSIS (time = 13.) .br .ft B sys time .s3 time(tvec) .br int tvec[2]; .ft R .sh DESCRIPTION .it Time returns the time since 00:00:00 GMT, Jan. 1, 1970, measured in seconds. From .it as, the high order word is in the r0 register and the low order is in r1. From C, the user-supplied vector is filled in. .sh "SEE ALSO" date (I), stime (II), ctime (III) .sh DIAGNOSTICS \*- . .s3 Needless to say, grave disorder will result if the space assigned by .it alloc is overrun or if some random number is handed to .it free. .s3 The routine uses a first-fit algorithm which coalesces blocks being freed with other blocks already free. It calls .it sbrk (see .it "break (II))" to get more core from the system when there is no suitable space already free. .sh DIAGNOSTICS Returns \*-1 if there is no available core. .sh BUGS Allocated memory contains garbage instead of being cleared. ted for. From C, a returned value of \*-1 indicates an error. .th SYNC II 8/5/73 .sh NAME sync \*- update super-block .sh SYNOPSIS (sync = 36.; not in assembler) .br .ft B sys sync .ft R .sh DESCRIPTION .it Sync causes all information in core memory that should be on disk to be written out. This includes modified super blocks, modified i-nodes, and delayed block I/O. .s3 It should be used by programs which examine a file system, for example .it "icheck, df," etc. It is mandatory before a boot. .sh "SEE ALSO" sync (VIII), update (VIII) .sh DIAGNOSTICS \*- .th ABS III 2/9/75 .sh NAME abs, fabs \*- absolute value .sh SYNOPSIS .ft B abs(i) .br int i; .s3 double fabs(x) .br double x; .ft R .s3 .sh DESCRIPTION .it Abs returns the absolute value of its integer operand; .it fabs is the .it double version. .th UNLINK II 8/5/73 .sh NAME unlink \*- remove directory entry .sh SYNOPSIS (unlink = 10.) .br .ft B sys unlink; name .s3 unlink(name) .br char *name; .ft R .sh DESCRIPTION .it Name points to a null-terminated string. .it Unlink removes the entry for the file pointed to by .it name from its directory. If this entry was the last link to the file, the contents of the file are freed and the file is destroyed. If, however, the file was open in any process, the actual destruction is delayed until it is closed,{~.th ABORT III 4/10/75 .sh NAME abort \*- generate an IOT fault .sh SYNOPSIS .bd abort() .sh DESCRIPTION .it Abort executes the IOT instruction. This is usually considered a program fault by the system and results in termination with a core dump. It is used to generate a core image for debugging. .sh "SEE ALSO" db (I), cdb (I), signal (II) .sh DIAGNOSTICS usually ``IOT trap -- core dumped'' from the Shell. .sh BUGS  even though the directory entry has disappeared. .sh "SEE ALSO" rm (I), rmdir (I), link (II) .sh DIAGNOSTICS The error bit (c-bit) is set to indicate that the file does not exist or that its directory cannot be written. Write permission is not required on the file itself. It is also illegal to unlink a directory (except for the super-user). From C, a \*-1 return indicates an error. .th STTY II 12/15/74 .sh NAME stty \*- set mode of typewriter .sh SYNOPSIS (stty = 31.) .br (file descriptor in r0) .br .ft B sys stty; arg .br .li ... .br arg: .byte ispeed, ospeed; .byte erase, kill; mode .s3 .nf stty(fildes, arg) struct { char ispeed, ospeed; char erase, kill; int mode; } *arg; .fi .ft R .s3 .sh DESCRIPTION .it Stty sets mode bits and character speeds for the typewriter whose file descriptor is passed in r0 (resp. is the first argument to the call). First, the system delays until th.th WRITE II 8/5/73 .sh NAME write \*- write on a file .sh SYNOPSIS (write = 4.) .br (file descriptor in r0) .br .ft B sys write; buffer; nbytes .s3 write(fildes, buffer, nbytes) .br char *buffer; .ft R .sh DESCRIPTION A file descriptor is a word returned from a successful .it open, .it creat, .it dup, or .it pipe call. .s3 .it Buffer is the address of .it nbytes contiguous bytes which are written on the output file. The number of characters actually written is returned (in r0). It should be regarded as an.th UMOUNT II 8/5/73 .sh NAME umount \*- dismount file system .sh SYNOPSIS (umount = 22.) .br .ft B sys umount; special .ft R .sh DESCRIPTION .it Umount announces to the system that special file .it special is no longer to contain a removable file system. The file associated with the special file reverts to its ordinary interpretation; see .it mount (II). .s3 .sh "SEE ALSO" umount (VIII), mount (II) .sh DIAGNOSTICS Error bit (c-bit) set if no file system was mounted on the special file or if there are stile typewriter is quiescent. The input and output speeds are set from the first two bytes of the argument structure as indicated by the following table, which corresponds to the speeds supported by the DH-11 interface. If DC-11, DL-11 or KL-11 interfaces are used, impossible speed changes are ignored. .s3 .lp +8 4 0 (hang up dataphone) .lp +8 4 1 50 baud .lp +8 4 2 75 baud .lp +8 4 3 110 baud .lp +8 4 4 134.5 baud .lp +8 4 5 150 baud .lp +8 4 6 200 baud .lp +8 4 7 300 baud .lp +8 4 8 600 baud .lp +8 4 9 1200  error if this is not the same as requested. .s3 Writes which are multiples of 512 characters long and begin on a 512-byte boundary in the file are more efficient than any others. .sh "SEE ALSO" creat (II), open (II), pipe (II) .sh DIAGNOSTICS The error bit (c-bit) is set on an error: bad descriptor, buffer address, or count; physical I/O errors. From C, a returned value of \*-1 indicates an error. l active files on the mounted file system. baud .lp +8 4 10 1800 baud .lp +8 4 11 2400 baud .lp +8 4 12 4800 baud .lp +8 4 13 9600 baud .lp +8 4 14 External A .lp +8 4 15 External B .s3 .i0 In the current configuration, only 110, 150 and 300 baud are really supported on dial-up lines, in that the code conversion and line control required for IBM 2741's (134.5 baud) must be implemented by the user's program, and the half-duplex line discipline required for the 202 dataset (1200 baud) is not supplied. .s3 The next two characters of the argument struct.th WAIT II 2/9/75 .sh NAME wait \*- wait for process to terminate .sh SYNOPSIS (wait = 7.) .br .ft B sys wait .ft R .br (process ID in r0) .br (status in r1) .s3 .ft B wait(status) .br int *status; .ft R .sh DESCRIPTION .it Wait causes its caller to delay until one of its child processes terminates. If any child has died since the last .it wait, return is immediate; if there are no children, return is immediate with the error bit set (resp. with a value of \*-1 returned). The normal return yields the proc.th TIMES II 8/5/73 .sh NAME times \*- get process times .sh SYNOPSIS (times = 43.; not in assembler) .br .ft B sys times; buffer .s3 times(buffer) .br struct tbuffer *buffer; .ft R .sh DESCRIPTION .it Times returns time-accounting information for the current process and for the terminated child processes of the current process. All times are in 1/60 seconds. .s3 After the call, the buffer will appear as follows: .s3 .nf struct tbuffer { int proc\*_user\*_time; int proc\*_system\*_time; int child\*_userure specify the erase and kill characters respectively. (Defaults are # and @.) .s3 The .it mode contains several bits which determine the system's treatment of the typewriter: .s3 .lp +12 7 100000 Select one of two algorithms for backspace delays .lp +12 7 040000 Select one of two algorithms for form-feed and vertical-tab delays .lp +12 7 030000 Select one of four algorithms for carriage-return delays .lp +12 7 006000 Select one of four algorithms for tab delays .lp +12 7 001400 Select one of four algorithess ID of the terminated child (in r0). In the case of several children several .it wait calls are needed to learn of all the deaths. .s3 If no error is indicated on return, the r1 high byte (resp. the high byte stored into .it status ) contains the low byte of the child process r0 (resp. the argument of .it exit ) when it terminated. The r1 (resp. .it status ) low byte contains the termination status of the process. See signal (II) for a list of termination statuses (signals); 0 status indicates normal ter\*_time[2]; int child\*_system\*_time[2]; }; .s3 .fi The children times are the sum of the children's process times and their children's times. .sh "SEE ALSO" time (I) .sh DIAGNOSTICS \*- .sh BUGS The process times should be 32 bits as well. ms for new-line delays .lp +12 7 000200 even parity allowed on input (e. g. for M37s) .lp +12 7 000100 odd parity allowed on input .lp +12 7 000040 raw mode: wake up on all characters .lp +12 7 000020 map CR into LF; echo LF or CR as CR-LF .lp +12 7 000010 echo (full duplex) .lp +12 7 000004 map upper case to lower on input (e. g. M33) .lp +12 7 000002 echo and print tabs as spaces .lp +12 7 000001 hang up (remove `data terminal ready,' lead CD) after last close .i0 .s3 The delay bits specify how long transmission stops to allow for mechanical or other movement when certain characters are sent to the terminal. In all cases a value of 0 indicates no delay. .s3 Backspace delays are currently ignored but will be used for Terminet 300's. .s3 If a form-feed/vertical tab delay is specified, it lasts for about 2 seconds. .s3 Carriage-return delay type 1 lasts about .08 seconds and is suitable for the Terminet 300. Delay type 2 lasts about .16 seconds and is suitable for the VT05 and the TI 700. Delay type 3 is unimpor device number */ int actime[2]; /* +28: time of last access */ int modtime[2]; /* +32: time of last modification */ }; .fi .s3 The flags are as follows: .s3 .lp +10 9 100000 i-node is allocated .lp +10 9 060000 2-bit file type: .lp +15 9 000000 plain file .lp +15 9 040000 directory .lp +15 9 020000 character-type special file .lp +15 9 060000 block-type special file. .lp +10 9 010000 large file .lp +10 9 004000 set user-ID on execution .lp +10 9 002000 set group-ID on execution .lp +10 9 001000 save tenals in the list above cause a core image if not caught or ignored. .s3 The value of the call is the old action defined for the signal. .s3 After a .it fork (II) the child inherits all signals. .it Exec (II) resets all caught signals to default action. .sh "SEE ALSO" kill (I), kill (II), ptrace (II), reset (III) .sh DIAGNOSTICS The error bit (c-bit) is set if the given signal is out of range. In C, a \*-1 indicates an error; 0 indicates success. .sh BUGS lemented and is 0. .s3 New-line delay type 1 is dependent on the current column and is tuned for Teletype model 37's. Type 2 is useful for the VT05 and is about .10 seconds. Type 3 is unimplemented and is 0. .s3 Tab delay type 1 is dependent on the amount of movement and is tuned to the Teletype model 37. Other types are unimplemented and are 0. .s3 Characters with the wrong parity, as determined by bits 200 and 100, are ignored. .s3 In raw mode, every character is passed immediately to the program without xt image after execution .lp +10 9 000400 read (owner) .lp +10 9 000200 write (owner) .lp +10 9 000100 execute (owner) .lp +10 9 000070 read, write, execute (group) .lp +10 9 000007 read, write, execute (others) .i0 .sh "SEE ALSO" ls (I), fstat (II), fs (V) .sh DIAGNOSTICS Error bit (c-bit) is set if the file cannot be found. From C, a \*-1 return indicates an error. .th SETUID II 8/5/73 .sh NAME setuid \*- set process user ID .sh SYNOPSIS (setuid = 23.) .br (user ID in r0) .ft B .br sys setuid .s3 setuid(uid) .ft R .sh DESCRIPTION The user ID of the current process is set to the argument. Both the effective and the real user ID are set. This call is only permitted to the super-user or if the argument is the real user ID. .sh "SEE ALSO" getuid (II) .sh DIAGNOSTICS Error bit (c-bit) is set as indicated; from C, a \*-1 value is returned. waiting until a full line has been typed. No erase or kill processing is done; the end-of-file character (EOT), the interrupt character (DEL) and the quit character (FS) are not treated specially. .s3 Mode 020 causes input carriage returns to be turned into new-lines; input of either CR or LF causes LF-CR both to be echoed (used for GE TermiNet 300's and other terminals without the newline function). .s3 The hangup mode 01 causes the line to be disconnected when the last process with the line open closes it.th SLEEP II 8/5/73 .sh NAME sleep \*- stop execution for interval .sh SYNOPSIS (sleep = 35.; not in assembler) .br (seconds in r0) .br .ft B sys sleep .s3 sleep(seconds) .ft R .sh DESCRIPTION The current process is suspended from execution for the number of seconds specified by the argument. .sh "SEE ALSO" sleep (I) .sh DIAGNOSTICS \*- .th SETGID II 8/5/73 .sh NAME setgid \*- set process group ID .sh SYNOPSIS (setgid = 46.; not in assembler) .br (group ID in r0) .ft B .br sys setgid .s3 setgid(gid) .ft R .sh DESCRIPTION The group ID of the current process is set to the argument. Both the effective and the real group ID are set. This call is only permitted to the super-user or if the argument is the real group ID. .sh "SEE ALSO" getgid (II) .sh DIAGNOSTICS Error bit (c-bit) is set as indicated; from C, a \*-1 value is returned.  or terminates. It is useful when a port is to be used for some special purpose; for example, if it is associated with an ACU used to place outgoing calls. .s3 This system call is also used with certain special files other than typewriters, but since none of them are part of the standard system the specifications will not be given. .sh "SEE ALSO" stty (I), gtty (II) .sh DIAGNOSTICS The error bit (c-bit) is set if the file descriptor does not refer to a typewriter. From C, a negative value indicates an error.th SIGNAL II 8/5/73 .sh NAME signal \*- catch or ignore signals .sh SYNOPSIS (signal = 48.) .br .ft B sys signal; sig; label .ft R .br (old value in r0) .s3 .ft B signal(sig, func) .br int (*func)( ); .ft R .sh DESCRIPTION A .it signal is generated by some abnormal event, initiated either by user at a typewriter (quit, interrupt), by a program error (bus error, etc.), or by request of another program (kill). Normally all signals cause termination of the receiving process, but this call allows them either .th SEEK II 8/5/73 .sh NAME seek \*- move read/write pointer .sh SYNOPSIS (seek = 19.) .br (file descriptor in r0) .ft B .br sys seek; offset; ptrname .s3 seek(fildes, offset, ptrname) .ft R .sh DESCRIPTION The file descriptor refers to a file open for reading or writing. The read (resp. write) pointer for the file is set as follows: .s3 .lp +6 3 if .it ptrname is 0, the pointer is set to .it offset. .s3 .lp +6 3 if .it ptrname is 1, the pointer is set to its current location plus .it offset. .s3 .lp +6 3 i. to be ignored or to cause an interrupt to a specified location. Here is the list of signals: .s3 .lp +10 5 1 hangup .lp +10 5 2 interrupt .lp +10 5 3* quit .lp +10 5 4* illegal instruction (not reset when caught) .lp +10 5 5* trace trap (not reset when caught) .lp +10 5 6* IOT instruction .lp +10 5 7* EMT instruction .lp +10 5 8* floating point exception .lp +10 5 9 kill (cannot be caught or ignored) .lp +10 5 10* bus error .lp +10 5 11* segmentation violation .lp +10 5 12* bad argument to system call .lp +f .it ptrname is 2, the pointer is set to the size of the file plus .it offset. .s3 .lp +6 3 if .it ptrname is 3, 4 or 5, the meaning is as above for 0, 1 and 2 except that the offset is multiplied by 512. .s3 .i0 If .it ptrname is 0 or 3, .it offset is unsigned, otherwise it is signed. .sh "SEE ALSO" open (II), creat (II) .sh DIAGNOSTICS The error bit (c-bit) is set for an undefined file descriptor. From C, a \*-1 return indicates an error. .th STIME II 8/5/73 .sh NAME stime \*- set time .sh SYNOPSIS (stime = 25.) .br (time in r0-r1) .br .ft B sys stime .s3 stime(tbuf) .br int tbuf[2]; .ft R .sh DESCRIPTION .it Stime sets the system's idea of the time and date. Time is measured in seconds from 0000 GMT Jan 1 1970. Only the super-user may use this call. .sh "SEE ALSO" date (I), time (II), ctime (III) .sh DIAGNOSTICS Error bit (c-bit) set if user is not the super-user. 10 5 13 write on a pipe with no one to read it .s3 .i0 In the assembler call, if .it label is 0, the process is terminated when the signal occurs; this is the default action. If .it label is odd, the signal is ignored. Any other even .it label specifies an address in the process where an interrupt is simulated. An RTI or RTT instruction will return from the interrupt. Except as indicated, a signal is reset to 0 after being caught. Thus if it is desired to catch every such signal, the catching routine must i.th READ II 8/5/73 .sh NAME read \*- read from file .sh SYNOPSIS (read = 3.) .br (file descriptor in r0) .ft B .br sys read; buffer; nbytes .br .s3 read(fildes, buffer, nbytes) .br char *buffer; .ft R .sh DESCRIPTION A file descriptor is a word returned from a successful .it "open, creat, dup," or .it pipe call. .it Buffer is the location of .it nbytes contiguous bytes into which the input will be placed. It is not guaranteed that all .it nbytes bytes will be read; for example if the file refers to a typewr.th STAT II 8/5/73 .sh NAME stat \*- get file status .sh SYNOPSIS (stat = 18.) .br .ft B sys stat; name; buf .s3 stat(name, buf) .br char *name; .br struct inode *buf; .ft R .sh DESCRIPTION .it Name points to a null-terminated string naming a file; .it buf is the address of a 36(10) byte buffer into which information is placed concerning the file. It is unnecessary to have any permissions at all with respect to the file, but all directories leading to the file must be readable. After .it stat, .it buf has tssue another .it signal call. .s3 In C, if .it func is 0, the default action for signal .it sig (termination) is reinstated. If .it func is 1, the signal is ignored. If .it func is non-zero and even, it is assumed to be the address of a function entry point. When the signal occurs, the function will be called. A return from the function will continue the process at the point it was interrupted. As in the assembler call, .it signal must in general be called again to catch subsequent signals. .s3 When a caughiter at most one line will be returned. In any event the number of characters read is returned (in r0). .s3 If the returned value is 0, then end-of-file has been reached. .sh "SEE ALSO" open (II), creat (II), dup (II), pipe (II) .sh DIAGNOSTICS As mentioned, 0 is returned when the end of the file has been reached. If the read was otherwise unsuccessful the error bit (c-bit) is set. Many conditions can generate an error: physical I/O errors, bad buffer address, preposterous .it nbytes, file descriptor not thhe following structure (starting offset given in bytes): .s3 .if t .ta .5i 1i 2.5i .if n .ta 3 9 24 .nf struct inode { char minor; /* +0: minor device of i-node */ char major; /* +1: major device */ int inumber; /* +2 */ int flags; /* +4: see below */ char nlinks; /* +6: number of links to file */ char uid; /* +7: user ID of owner */ char gid; /* +8: group ID of owner */ char size0; /* +9: high byte of 24-bit size */ int size1; /* +10: low word of 24-bit size */ int addr[8]; /* +12: block numbers t signal occurs during certain system calls, the call terminates prematurely. In particular this can occur during a .it read or .it write on a slow device (like a typewriter; but not a file); and during .sleep or .it wait. When such a signal occurs, the saved user status is arranged in such a way that when return from the signal-catching takes place, it will appear that the system call returned a characteristic error status. The user's program may then, if it wishes, re-execute the call. .s3 The starred sigat of an input file. From C, a \*-1 return indicates the error. uent .it exec (II) calls. .sh "SEE ALSO" wait (II), signal (II), cdb (I) .sh DIAGNOSTICS From assembler, the c-bit (error bit) is set on errors; from C, \-1 is returned and .it errno has the error code. .sh BUGS The request 0 call should be able to specify signals which are to be treated normally and not cause a stop. In this way, for example, programs with simulated floating point (which use ``illegal instruction'' signals at a very high rate) could be efficiently debugged. .s3 Also, it should be possible.th OPEN II 8/5/73 .sh NAME open \*- open for reading or writing .sh SYNOPSIS (open = 5.) .br .ft B sys open; name; mode .br .ft R (file descriptor in r0) .s3 .ft B open(name, mode) .br char *name; .ft R .sh DESCRIPTION .it Open opens the file .it name for reading (if .it mode is 0), writing (if .it mode is 1) or for both reading and writing (if .it mode is 2). .it Name is the address of a string of ASCII characters representing a path name, terminated by a null character. .s3 The returned file descriptor s.th PTRACE II 1/25/75 .sh NAME ptrace \*- process trace .sh SYNOPSIS .nf (ptrace = 26.; not in assembler) (data in r0) .ft B sys ptrace; pid; addr; request .ft R .br (value in r0) .ft B .s3 ptrace(request, pid, addr, data); .ft R .fi .sh DESCRIPTION .it Ptrace provides a means by which a parent process may control the execution of a child process, and examine and change its core image. Its primary use is for the implementation of breakpoint debugging, but it should be adaptable for simulation of non-UNIX  to stop a process on occurrence of a system call; in this way a completely controlled environment could be provided. hould be saved for subsequent calls to .it read, .it write, and .it close. .sh "SEE ALSO" creat (II), read (II), write (II), close (II) .sh DIAGNOSTICS The error bit (c-bit) is set if the file does not exist, if one of the necessary directories does not exist or is unreadable, if the file is not readable (resp. writable), or if too many files are open. From C, a \*-1 value is returned on an error. environments. There are four arguments whose interpretation depends on a .it request argument. Generally, .it pid is the process ID of the traced process, which must be a child (no more distant descendant) of the tracing process. A process being traced behaves normally until it encounters some signal whether internally generated like ``illegal instruction'' or externally generated like ``interrupt.'' See signal (II) for the list. Then the traced process enters a stopped state and its parent is notified via .th PROFIL II 5/15/74 .sh NAME profil \*- execution time profile .sh SYNOPSIS (profil = 44.; not in assembler) .br .ft B sys profil; buff; bufsiz; offset; scale .s3 profil(buff, bufsiz, offset, scale) .br char buff[ ]; .br int bufsiz, offset, scale; .ft R .sh DESCRIPTION .it Buff points to an area of core whose length (in bytes) is given by .it bufsiz. After this call, the user's program counter (pc) is examined each clock tick (60th second); .it offset is subtracted from it, and the result multiplied by .i.th NICE II 8/5/73 .sh NAME nice \*- set program priority .sh SYNOPSIS (nice = 34.) .br (priority in r0) .br .ft B sys nice .s3 nice(priority) .ft R .sh DESCRIPTION The scheduling .it priority of the process is changed to the argument. Positive priorities get less service than normal; 0 is default. Only the super-user may specify a negative priority. The valid range of .it priority is 20 to \*-220. The value of 4 is recommended to users who wish to execute long-running programs without flak from the adminis.it wait (II). When the child is in the stopped state, its core image can be examined and modified using .it ptrace. If desired, another .it ptrace request can then cause the child either to terminate or to continue, possibly ignoring the signal. .s3 The value of the .it request argument determines the precise action of the call: .s3 .lp +4 4 0 This request is the only one used by the child process; it declares that the process is to be traced by its parent. All the other arguments are ignored. Peculiar rest scale. If the resulting number corresponds to a word inside .it buff, that word is incremented. .s3 The scale is interpreted as an unsigned, fixed-point fraction with binary point at the left: 177777(8) gives a 1-1 mapping of pc's to words in .it buff; 77777(8) maps each pair of instruction words together. 2(8) maps all instructions onto the beginning of .it buff (producing a non-interrupting core clock). .s3 Profiling is turned off by giving a .it scale of 0 or 1. It is rendered ineffective by giving a .tration. .s3 The effect of this call is passed to a child process by the .it fork system call. The effect can be cancelled by another call to .it nice with a .it priority of 0. .s3 The actual running priority of a process is the .it priority argument plus a number that ranges from 100 to 119 depending on the cpu usage of the process. .sh "SEE ALSO" nice (I) .sh DIAGNOSTICS The error bit (c-bit) is set if the user requests a .it priority outside the range of 0 to 20 and is not the super-user. ults will ensue if the parent does not expect to trace the child. .s3 .lp +4 4 1,2 The word in the child process's address space at .it addr is returned (in r0). Request 1 indicates the data space (normally used); 2 indicates the instruction space (when I and D space are separated). .it addr must be even. The child must be stopped. The input .it data is ignored. .s3 .lp +4 4 3 The word of the system's per-process data area corresponding to .it addr is returned. .it Addr must be even and less than 512. This it bufsiz of 0. Profiling is also turned off when an .it exec is executed but remains on in child and parent both after a .it fork. .sh "SEE ALSO" monitor (III), prof (I) .sh DIAGNOSTICS \*- .th MOUNT II 5/15/74 .sh NAME mount \*- mount file system .sh SYNOPSIS (mount = 21.) .br .ft B sys mount; special; name; rwflag .s3 mount(special, name, rwflag) .br char *special, *name; .br .ft R .sh DESCRIPTION .it Mount announces to the system that a removable file system has been mounted on the block-structured special file .it special; from now on, references to file .it name will refer to the root file on the newly mounted file system. .it Special and .it name are pointers to null-terminated strings space contains the registers and other information about the process; its layout corresponds to the .it user structure in the system. .s3 .lp +4 4 4,5 The given .it data is written at the word in the process's address space corresponding to .it addr, which must be even. No useful value is returned. Request 4 specifies data space (normally used), 5 specifies instruction space. Attempts to write in pure procedure result in termination of the child, instead of going through or causing an error for the parent. .th PIPE II 8/5/73 .sh NAME pipe \*- create an interprocess channel .sh SYNOPSIS (pipe = 42.) .br .ft B sys pipe .br .ft R (read file descriptor in r0) .br (write file descriptor in r1) .s3 .ft B pipe(fildes) .br int fildes[2]; .ft R .sh DESCRIPTION The .it pipe system call creates an I/O mechanism called a pipe. The file descriptors returned can be used in read and write operations. When the pipe is written using the descriptor returned in r1 (resp. fildes[1]), up to 4096 bytes of data are buffered before containing the appropriate path names. .s3 .it Name must exist already. Its old contents are inaccessible while the file system is mounted. .s3 The .it rwflag argument determines whether the file system can be written on; if it is 0 writing is allowed, if non-zero no writing is done. Physically write-protected and magnetic tape file systems must be mounted read-only or errors will occur when access times are updated, whether or not any explicit write is attempted. .sh "SEE ALSO" mount (VIII), umount (II) ..s3 .lp +4 4 6 The process's system data is written, as it is read with request 3. Only a few locations can be written in this way: the general registers, the floating point status and registers, and certain bits of the processor status word. .s3 .lp +4 4 7 The .it data argument is taken as a signal number and the child's execution continues as if it had incurred that signal. Normally the signal number will be either 0 to indicate that the signal which caused the stop should be ignored, or that value fetchethe writing process is suspended. A read using the descriptor returned in r0 (resp. fildes[0]) will pick up the data. .s3 It is assumed that after the pipe has been set up, two (or more) cooperating processes (created by subsequent .it fork calls) will pass data through the pipe with .it read and .it write calls. .s3 The Shell has a syntax to set up a linear array of processes connected by pipes. .s3 Read calls on an empty pipe (no buffered data) with only one end (all write file descriptors closed) return sh DIAGNOSTICS Error bit (c-bit) set if: .it special is inaccessible or not an appropriate file; .it name does not exist; .it special is already mounted; .it name is in use; there are already too many file systems mounted. .sh BUGS \- d out of the process's image indicating which signal caused the stop. .s3 .lp +4 4 8 The traced process terminates. .s3 .i0 As indicated, these calls (except for request 0) can be used only when the subject process has stopped. The .it wait call is used to determine when a process stops; in such a case the ``termination'' status returned by .it wait has the value 0177 to indicate stoppage rather than genuine termination. .s3 To forestall possible fraud, .it ptrace inhibits the set-user-id facility on subseqan end-of-file. Write calls under similar conditions generate a fatal signal (signal (II)); if the signal is ignored, an error is returned on the write. .sh "SEE ALSO" sh (I), read (II), write (II), fork (II) .sh DIAGNOSTICS The error bit (c-bit) is set if too many files are already open. From C, a \*-1 returned value indicates an error. A signal is generated if a write on a pipe with only one end is attempted. .sh BUGS .th MKNOD II 8/5/73 .sh NAME mknod \*- make a directory or a special file .sh SYNOPSIS (mknod = 14.; not in assembler) .br .ft B sys mknod; name; mode; addr .s3 mknod(name, mode, addr) .br char *name; .ft R .sh DESCRIPTION .it Mknod creates a new file whose name is the null-terminated string pointed to by .it name. The mode of the new file (including directory and special file bits) is initialized from .it mode. The first physical address of the file is initialized from .it addr. Note that in the case of a directory, .it addr should be zero. In the case of a special file, .it addr specifies which special file. .s3 .it Mknod may be invoked only by the super-user. .sh "SEE ALSO" mkdir (I), mknod (VIII), fs (V) .sh DIAGNOSTICS Error bit (c-bit) is set if the file already exists or if the user is not the super-user. From C, a \*-1 value indicates an error. it Errno is not cleared on successful calls, so it should be tested only after an error has occurred. There is a table of messages associated with each error, and a routine for printing the message. See .it "perror (III)." .pg The possible error numbers are not recited with each writeup in section II, since many errors are possible for most of the calls. Here is a list of the error numbers, their names inside the system (for the benefit of system-readers), and the messages available using .it perror. A shortty to the TIU special file. .en 23 ENFILE "File table overflow" The system's table of open files is full, and temporarily no more .it opens can be accepted. .en 24 EMFILE "Too many open files" Only 15 files can be open per process. .en 25 ENOTTY "Not a typewriter" The file mentioned in .it stty or .it gtty is not a typewriter or one of the other devices to which these calls apply. .en 26 ETXTBSY "Text file busy" An attempt to execute a pure-procedure program which is currently open for writing (or reading!.th LINK II 8/5/73 .sh NAME link \*- link to a file .sh SYNOPSIS (link = 9.) .br .ft B sys link; name1; name2 .s3 link(name1, name2) .br char *name1, *name2; .ft R .sh DESCRIPTION A link to .it name1 is created; the link has the name .it name2. Either name may be an arbitrary path name. .sh "SEE ALSO" link (I), unlink (II) .sh DIAGNOSTICS The error bit (c-bit) is set when .it name1 cannot be found; when .it name2 already exists; when the directory of .it name2 cannot be written; when an attempt is made to lt explanation is also provided. .en 0 \(mi (unused) .en 1 EPERM "Not owner and not super-user" Typically this error indicates an attempt to modify a file in some way forbidden except to its owner. It is also returned for attempts by ordinary users to do things allowed only to the super-user. .en 2 ENOENT "No such file or directory" This error occurs when a file name is specified and the file should exist but doesn't, or when one of the directories in a path name does not exist. .en 3 ESRCH "No such process"). Also an attempt to open for writing a pure-procedure program that is being executed. .en 27 EFBIG "File too large" An attempt to make a file larger than the maximum of 32768 blocks. .en 28 ENOSPC "No space left on device" During a .it write to an ordinary file, there is no free space left on the device. .en 29 ESPIPE "Seek on pipe" A .it seek was issued to a pipe. This error should also be issued for other non-seekable devices. .en 30 EROFS "Read-only file system" An attempt to modify a file or directoryink to a directory by a user other than the super-user; when an attempt is made to link to a file on another file system; when more than 127 links are made. From C, a \*-1 return indicates an error, a 0 return indicates success.  The process whose number was given to .it signal does not exist, or is already dead. .en 4 EINTR "Interrupted system call" An asynchronous signal (such as interrupt or quit), which the user has elected to catch, occurred during a system call. If execution is resumed after processing the signal, it will appear as if the interrupted system call returned this error condition. .en 5 EIO "I/O error" Some physical I/O error occurred during a .it read or .it write. This error may in some cases occur on a call fol was made on a device mounted read-only. .en 31 EMLINK "Too many links" An attempt to make more than 127 links to a file. .en 32 EPIPE "Write on broken pipe" A write on a pipe for which there is no process to read the data. This condition normally generates a signal; the error is returned if the signal is ignored. .th KILL II 12/15/74 .sh NAME kill \*- send signal to a process .sh SYNOPSIS (kill = 37.; not in assembler) .br (process number in r0) .br .ft B sys kill; sig .s3 kill(pid, sig); .ft R .sh DESCRIPTION .it Kill sends the signal .it sig to the process specified by the process number in r0. See signal (II) for a list of signals. .s3 The sending and receiving processes must have the same effective user ID, otherwise this call is restricted to the super-user. .s3 If the process number is 0, the signal is sent lowing the one to which it actually applies. .en 6 ENXIO "No such device or address" I/O on a special file refers to a subdevice which does not exist, or beyond the limits of the device. It may also occur when, for example, a tape drive is not dialled in or no disk pack is loaded on a drive. .en 7 E2BIG "Arg list too long" An argument list longer than 512 bytes (counting the null at the end of each argument) is presented to .it exec. .en 8 ENOEXEC "Exec format error" A request is made to execute a file whic.th INDIR II 8/5/73 .sh NAME indir \*- indirect system call .sh SYNOPSIS (indir = 0.; not in assembler) .br .ft B sys indir; syscall .ft R .sh DESCRIPTION The system call at the location .it syscall is executed. Execution resumes after the .it indir call. .s3 The main purpose of .it indir is to allow a program to store arguments in system calls and execute them out of line in the data segment. This preserves the purity of the text segment. .s3 If .it indir is executed indirectly, it is a no-op. If the instrto all other processes which have the same controlling typewriter and user ID. .s3 In no case is it possible for a process to kill itself. .sh "SEE ALSO" signal (II), kill (I) .sh DIAGNOSTICS The error bit (c-bit) is set if the process does not have the same effective user ID and the user is not super-user, or if the process does not exist. From C, \-1 is returned. h, although it has the appropriate permissions, does not start with one of the magic numbers 407 or 410. .en 9 EBADF "Bad file number" Either a file descriptor refers to no open file, or a read (resp. write) request is made to a file which is open only for writing (resp. reading). .en 10 ECHILD "No children" .it Wait and the process has no living or unwaited-for children. .en 11 EAGAIN "No more processes" In a .it fork, the system's process table is full and no more processes can for the moment be created. uction at the indirect location is not a system call, the executing process will get a fault. .sh "SEE ALSO" \*- .sh DIAGNOSTICS \*- .en 12 ENOMEM "Not enough core" During an .it exec or .it break, a program asks for more core than the system is able to supply. This is not a temporary condition; the maximum core size is a system parameter. The error may also occur if the arrangement of text, data, and stack segments is such as to require more than the existing 8 segmentation registers. .en 13 EACCES "Permission denied" An attempt was made to access a file in a way forbidden by the protection system. .en 14 \(mi (unused) .en 15 ENOTBLK "B.th GTTY II 8/5/73 .sh NAME gtty \*- get typewriter status .sh SYNOPSIS (gtty = 32.) .br (file descriptor in r0) .ft B .br sys gtty; arg .br .li ... .br arg: .=.+6 .s3 gtty(fildes, arg) .br int arg[3]; .ft R .sh DESCRIPTION .it Gtty stores in the three words addressed by .it arg the status of the typewriter whose file descriptor is given in r0 (resp. given as the first argument). The format is the same as that passed by .it stty. .sh "SEE ALSO" stty (II) .sh DIAGNOSTICS Error bit (c-bit) is set if the fil.th INTRO II 11/5/73 .de pg .sp .. .de en .pg .in 3 .ti 0 \\$1\t\\$2\t\\$3 .br .. .sp 2 .in 0 .if t .ta 3 10 .ce INTRODUCTION TO SYSTEM CALLS .sp Section II of this manual lists all the entries into the system. In most cases two calling sequences are specified, one of which is usable from assembly language, and the other from C. Most of these calls have an error return. From assembly language an erroneous call is always indicated by turning on the c-bit of the condition codes. The presence of an error is mlock device required" A plain file was mentioned where a block device was required, e.g. in .it mount. .en 16 EBUSY "Mount device busy" An attempt to mount a device that was already mounted or an attempt was made to dismount a device on which there is an open file or some process's current directory. .en 17 EEXIST "File exists" An existing file was mentioned in an inappropriate context, e.g. .it link. .en 18 EXDEV "Cross-device link" A link to a file on another device was attempted. .en 19 ENODEV "No such de descriptor does not refer to a typewriter. From C, a \*-1 value is returned for an error, 0, for a successful call. ost easily tested by the instructions .it bes and .it bec (``branch on error set (or clear)''). These are synonyms for the .it bcs and .it bcc instructions. .pg From C, an error condition is indicated by an otherwise impossible returned value. Almost always this is \(mi1; the individual sections specify the details. .pg In both cases an error number is also available. In assembly language, this number is returned in r0 on erroneous calls. From C, the external variable .it errno is set to the error number. .evice" An attempt was made to apply an inappropriate system call to a device; e.g. read a write-only device. .en 20 ENOTDIR "Not a directory" A non-directory was specified where a directory is required, for example in a path name or as an argument to .it chdir. .en 21 EISDIR "Is a directory" An attempt to write on a directory. .en 22 EINVAL "Invalid argument" Some invalid argument: currently, dismounting a non-mounted device, mentioning an unknown signal in .it signal, and giving an unknown request in .it s.th GETUID II 5/15/74 .sh NAME getuid \*- get user identifications .sh SYNOPSIS (getuid = 24.) .br .ft B sys getuid .ft B .s3 getuid( ) .ft R .sh DESCRIPTION .it Getuid returns a word (in r0), the low byte of which contains the real user ID of the current process. The high byte contains the effective user ID of the current process. The real user ID identifies the person who is logged in, in contradistinction to the effective user ID, which determines his access permission at the moment. It is thus useful to programs which operate using the ``set user ID'' mode, to find out who invoked them. .sh "SEE ALSO" setuid (II) .sh DIAGNOSTICS \*- ated because of lack of process space. From C, a return of \*-1 (not just negative) indicates an error. t be followed by a 0 pointer. .s3 When a C program is executed, it is called as follows: .s3 main(argc, argv) .br int argc; .br char **argv; .s3 where \fIargc\fR is the argument count and \fIargv\fR is an array of character pointers to the arguments themselves. As indicated, \fIargc\fR is conventionally at least one and the first member of the array points to a string containing the name of the file. .s3 .it Argv is not directly usable in another .it execv, since .it argv[argc] is \*-1 and not 0. .sh "SE.th GETPID II 2/8/75 .sh NAME getpid \*- get process identification .sh SYNOPSIS (getpid = 20.; not in assembler) .br .ft B sys getpid .ft R .br (pid in r0) .ft B .s3 getpid( ) .ft R .sh DESCRIPTION .it Getpid returns the process ID of the current process. Most often it is used to generate uniquely-named temporary files. .sh "SEE ALSO" \*- .sh DIAGNOSTICS \*- .th EXIT II 8/5/73 .sh NAME exit \*- terminate process .s3 .sh SYNOPSIS (exit = 1.) .br (status in r0) .br .ft B sys exit .s3 exit(status) .br int status; .ft R .sh DESCRIPTION .it Exit is the normal means of terminating a process. .it Exit closes all the process's files and notifies the parent process if it is executing a .it wait. The low byte of r0 (resp. the argument to \fIexit\fR) is available as status to the parent process. .s3 This call can never return. .sh "SEE ALSO" wait (II) .sh DIAGNOSTICS NoneE ALSO" fork (II) .sh DIAGNOSTICS If the file cannot be found, if it is not executable, if it does not have a valid header (407, 410, or 411 octal as first word), if maximum memory is exceeded, or if the arguments require more than 512 bytes a return from .it exec constitutes the diagnostic; the error bit (c-bit) is set. Even for the super-user, at least one of the execute-permission bits must be set for a file to be executed. From C the returned value is \*-1. .sh BUGS Only 512 characters of arguments are .th GETGID II 5/15/74 .sh NAME getgid \*- get group identifications .sh SYNOPSIS (getgid = 47.; not in assembler) .br .ft B sys getgid .ft B .s3 getgid( ) .ft R .sh DESCRIPTION .it Getgid returns a word (in r0), the low byte of which contains the real group ID of the current process. The high byte contains the effective group ID of the current process. The real group ID identifies the group of the person who is logged in, in contradistinction to the effective group ID, which determines his access permissi. allowed. on at the moment. It is thus useful to programs which operate using the ``set group ID'' mode, to find out who invoked them. .sh "SEE ALSO" setgid (II) .sh DIAGNOSTICS \*- .th EXEC II 8/5/73 .sh NAME exec, execl, execv \*- execute a file .sh SYNOPSIS (exec = 11.) .br .ft B sys exec; name; args .br .li ... .br name: <...\\0> .br .li ... .br args: arg0; arg1; ...; 0 .br arg0: <...\\0> .br arg1: <...\\0> .br ... .s3 execl(name, arg0, arg1, ..., argn, 0) .br char *name, *arg0, *arg1, ..., *argn; .s3 execv(name, argv) .br char *name; .br char *argv[ ]; .ft R .sh DESCRIPTION .it Exec overlays the calling process with the named file, then transfers to the beginning of the core .th DUP II 8/5/73 .sh NAME dup \*- duplicate an open file descriptor .sh SYNOPSIS (dup = 41.; not in assembler) .br (file descriptor in r0) .br .ft B sys dup .s3 dup(fildes) .br int fildes; .ft R .sh DESCRIPTION Given a file descriptor returned from an .it open, .it pipe, or .it creat call, .it dup will allocate another file descriptor synonymous with the original. The new file descriptor is returned in r0. .s3 .it Dup is used more to reassign the value of file descriptors than to genuinely duplicate a file.th FSTAT II 8/5/73 .sh NAME fstat \*- get status of open file .s3 .sh SYNOPSIS (fstat = 28.) .br (file descriptor in r0) .ft B .br sys fstat; buf .s3 fstat(fildes, buf) .br struct inode *buf; .ft R .sh DESCRIPTION This call is identical to .it stat, except that it operates on open files instead of files given by name. It is most often used to get the status of the standard input and output files, whose names are unknown. .sh "SEE ALSO" stat (II) .sh DIAGNOSTICS The error bit (c-bit) is set if the file deimage of the file. There can be no return from the file; the calling core image is lost. .s3 Files remain open across .it exec calls. Ignored signals remain ignored across .it exec, but signals that are caught are reset to their default values. .s3 Each user has a .it real user ID and group ID and an .it effective user ID and group ID. The real ID identifies the person using the system; the effective ID determines his access privileges. .it Exec changes the effective user and group ID to the owner of the ex descriptor. Since the algorithm to allocate file descriptors returns the lowest available value, combinations of .it dup and .it close can be used to manipulate file descriptors in a general way. This is handy for manipulating standard input and/or standard output. .sh "SEE ALSO" creat (II), open (II), close (II), pipe (II) .sh DIAGNOSTICS The error bit (c-bit) is set if: the given file descriptor is invalid; there are already too many open files. From C, a \*-1 returned value indicates an error. scriptor is unknown; from C, a \*-1 return indicates an error, 0 indicates success. ecuted file if the file has the ``set-user-ID'' or ``set-group-ID'' modes. The real user ID is not affected. .s3 The form of this call differs somewhat depending on whether it is called from assembly language or C; see below for the C version. .s3 The first argument to .it exec is a pointer to the name of the file to be executed. The second is the address of a null-terminated list of pointers to arguments to be passed to the file. Conventionally, the first argument is the name of the file. Each pointer addr.th CSW II 8/5/73 .sh NAME csw \*- read console switches .sh SYNOPSIS (csw = 38.; not in assembler) .br .ft B sys csw .s3 getcsw( ) .ft R .sh DESCRIPTION The setting of the console switches is returned (in r0). .th FORK II 8/5/73 .sh NAME fork \*- spawn new process .sh SYNOPSIS (fork = 2.) .br .ft B sys fork .br .ft R (new process return) .br (old process return) .s3 .ft B fork( ) .ft R .sh DESCRIPTION .it Fork is the only way new processes are created. The new process's core image is a copy of that of the caller of .it fork. The only distinction is the return location and the fact that r0 in the old (parent) process contains the process ID of the new (child) process. This process ID is used by .it wait. .s3 Theesses a string terminated by a null byte. .s3 Once the called file starts execution, the arguments are available as follows. The stack pointer points to a word containing the number of arguments. Just above this number is a list of pointers to the argument strings. The arguments are placed as high as possible in core. .s3 sp\*> nargs .br arg0 .br ... .br argn .br \*-1 .s3 arg0: .br ... .br argn: .s3 From C, two interfaces are available. .it execl is useful when a known file with.th CREAT II 8/5/73 .sh NAME creat \*- create a new file .sh SYNOPSIS (creat = 8.) .br .ft B sys creat; name; mode .br .ft R (file descriptor in r0) .ft B .s3 creat(name, mode) .br char *name; .ft R .sh DESCRIPTION .it Creat creates a new file or prepares to rewrite an existing file called .it name, given as the address of a null-terminated string. If the file did not exist, it is given mode .it mode. See .it chmod (II) for the construction of the .it mode argument. .s3 If the file did exist, its mode an two returning processes share all open files that existed before the call. In particular, this is the way that standard input and output files are passed and also how pipes are set up. .s3 From C, the child process receives a 0 return, and the parent receives a non-zero number which is the process ID of the child; a return of \*-1 indicates inability to create a new process. .sh "SEE ALSO" wait (II), exec (II) .sh DIAGNOSTICS The error bit (c-bit) is set in the old process if a new process could not be cre known arguments is being called; the arguments to .it execl are the character strings constituting the file and the arguments; as in the basic call, the first argument is conventionally the same as the file name (or its last component). A 0 argument must end the argument list. .s3 The .it execv version is useful when the number of arguments is unknown in advance; the arguments to .it execv are the name of the file to be executed and a vector of strings containing the arguments. The last argument string musd owner remain unchanged but it is truncated to 0 length. .s3 The file is also opened for writing, and its file descriptor is returned (in r0). .s3 The .it mode given is arbitrary; it need not allow writing. This feature is used by programs which deal with temporary files of fixed names. The creation is done with a mode that forbids writing. Then if a second instance of the program attempts a .it creat, an error is returned and the program knows that the name is unusable for the moment. .sh "SEE ALSO" write (II), close (II), stat (II) .sh DIAGNOSTICS The error bit (c-bit) may be set if: a needed directory is not searchable; the file does not exist and the directory in which it is to be created is not writable; the file does exist and is unwritable; the file is a directory; there are already too many files open. .s3 From C, a \*-1 return indicates an error. s an error, 0 indicates success. .th WALL VIII 4/10/75 .sh NAME wall \*- write to all users .sh SYNOPSIS .bd /etc/wall .sh DESCRIPTION .it Wall reads its standard input until an end-of-file. It then sends this message to all currently logged in users preceded by ``Broadcast Message ...''. It is used to warn all users, typically prior to shutting down the system. .s3 The sender should be super-user to override any protections the users may have invoked. .sh FILES /dev/tty? .sh "SEE ALSO" mesg (I), write (I) .sh DIAGNOSTICS ``Cannot send t.th CLOSE II 8/5/73 .sh NAME close \*- close a file .sh SYNOPSIS (close = 6.) .br (file descriptor in r0) .br .ft B sys close .s3 close(fildes) .s3 .ft R .sh DESCRIPTION Given a file descriptor such as returned from an .it open, .it creat, or .it pipe call, .it close closes the associated file. A close of all files is automatic on .it exit, but since processes are limited to 15 simultaneously open files, .it close is necessary for programs which deal with many files. .sh "SEE ALSO" creat (II), open (II), .th BREAK II 8/5/73 .sh NAME break, brk, sbrk \*- change core allocation .sh SYNOPSIS (break = 17.) .br .ft B sys break; addr .s3 char *brk(addr) .s3 char *sbrk(incr) .ft R .sh DESCRIPTION .it Break sets the system's idea of the lowest location not used by the program (called the break) to .it addr (rounded up to the next multiple of 64 bytes). Locations not less than .it addr and below the stack pointer are not in the address space and will thus cause a memory violation if accessed. .s3 From C, .it brk wilo ...'' when the open on a user's tty file fails. .sh BUGS pipe (II) .sh DIAGNOSTICS The error bit (c-bit) is set for an unknown file descriptor. From C a \*-1 indicates an error, 0 indicates success. l set the break to .it addr. The old break is returned. .s3 In the alternate entry .it sbrk, .it incr more bytes are added to the program's data space and a pointer to the start of the new area is returned. .s3 When a program begins execution via .it exec the break is set at the highest location defined by the program and data storage areas. Ordinarily, therefore, only programs with growing data areas need to use .it break. .sh "SEE ALSO" exec (II), alloc (III), end (III) .sh DIAGNOSTICS The c-bit is set if.th UPDATE VIII 11/1/73 .sh NAME update \*- periodically update the super block .sh SYNOPSIS .bd update .sh DESCRIPTION .it Update is a program that executes the .it sync primitive every 30 seconds. This insures that the file system is fairly up to date in case of a crash. This command should not be executed directly, but should be executed out of the initialization shell command file. See sync (II) for details. .sh "SEE ALSO" sync (II), init (VIII) .sh BUGS With .it update running, if the CPU is halted jus.th CHOWN II 12/15/74 .sh NAME chown \*- change owner and group of a file .sh SYNOPSIS (chmod = 16.) .br .ft B sys chown; name; owner .s3 chown(name, owner) .br char *name; .ft R .sh DESCRIPTION The file whose name is given by the null-terminated string pointed to by .it name has its owner and group changed to the low and high bytes of .it owner respectively. Only the super-user may execute this call, because if users were able to give files away, they could defeat the (nonexistent) file-space accounting pr the program requests more memory than the system limit or if more than 8 segmentation registers would be required to implement the break. From C, \*-1 is returned for these errors. .sh BUGS Setting the break in the range 0177700 to 0177777 is the same as setting it to zero. t as the .it sync is executed, a file system can be damaged. This is partially due to DEC hardware that writes zeros when NPR requests fail. A fix would be to have .it "sync" temporarily increment the system time by at least 30 seconds to trigger the execution of .it update. This would give 30 seconds grace to halt the CPU. ocedures. .sh "SEE ALSO" chown (VIII), chgrp (VIII), passwd (V) .sh DIAGNOSTICS The error bit (c-bit) is set on illegal owner changes. From C a \*-1 returned value indicates error, 0 indicates success. .th YACC I 11/25/74 .sh NAME yacc \*- yet another compiler-compiler .sh SYNOPSIS .bd yacc [ .bd \*-vor ] [ grammar ] .sh DESCRIPTION .it Yacc converts a context-free grammar into a set of tables for a simple automaton which executes an LR(1) parsing algorithm. The grammar may be ambiguous; specified precedence rules are used to break ambiguities. .s3 The output is .it y.tab.c, which must be compiled by the C compiler and loaded with any other routines required (perhaps a lexical analyzer) and the Yacc libra.th UMOUNT VIII 10/31/73 .sh NAME umount \*- dismount file system .sh SYNOPSIS .bd /etc/umount special .sh DESCRIPTION .it Umount announces to the system that the removable file system previously mounted on special file .it special is to be removed. .sh "SEE ALSO" mount (VIII), umount (II), mtab (V) .sh FILES /etc/mtab mounted device table .sh DIAGNOSTICS It complains if the special file is not mounted or if it is busy. The file system is busy if there is an open file on it or if someone has his current dir.th CHMOD II 12/15/74 .sh NAME chmod \*- change mode of file .sh SYNOPSIS (chmod = 15.) .br .ft B sys chmod; name; mode .s3 chmod(name, mode) .br char *name; .ft R .sh DESCRIPTION The file whose name is given as the null-terminated string pointed to by .it name has its mode changed to .it mode. Modes are constructed by ORing together some combination of the following: .s3 .in +3 4000 set user ID on execution 2000 set group ID on execution 1000 save text image after execution 0400 read by owner 0200 wriry: .s3 cc y.tab.c other.o \*-ly .s3 If the .bd \*-v flag is given, the file .it y.output is prepared, which contains a description of the parsing tables and a report on conflicts generated by ambiguities in the grammar. .s3 The .bd \*-o flag calls an optimizer for the tables; the optimized tables, with parser included, appear on file .it y.tab.c .s3 The .bd \*-r flag causes Yacc to accept grammars with Ratfor actions, and produce Ratfor output on .it y.tab.r; .bd \*-r implies the .bd \*-o flag. Typical usectory there. .sh BUGS te by owner 0100 execute (search on directory) by owner 0070 read, write, execute (search) by group 0007 read, write, execute (search) by others .in -3 .s3 Only the owner of a file (or the super-user) may change the mode. Only the super-user can set the 1000 mode. .sh "SEE ALSO" chmod (I) .sh DIAGNOSTIC Error bit (c-bit) set if .it name cannot be found or if current user is neither the owner of the file nor the super-user. From C, a \*-1 returned value indicates an error, 0 indicates success. age is then .s3 rc y.tab.r other.o .s3 .sh "SEE ALSO" ``LR Parsing'', by A. V. Aho and S. C. Johnson, Computing Surveys, June, 1974. ``The YACC Compiler-compiler'', internal memorandum. .sh AUTHOR S. C. Johnson .sh FILES y.output .br y.tab.c .br y.tab.r when ratfor output is obtained .br yacc.tmp when optimizer is called .br /lib/liby.a runtime library for compiler .br /usr/yacc/fpar.r ratfor parser .br /usr/yacc/opar.c parser for optimized tables .br /usr/yacc/yopti optimizer postpass .sh DIAGNOSTICS.th SYNC VIII 11/1/73 .sh NAME sync \*- update the super block .sh SYNOPSIS .bd sync .sh DESCRIPTION .it Sync executes the .it sync system primitive. If the system is to be stopped, .it sync must be called to insure file system integrity. See sync (II) for details. .sh "SEE ALSO" sync (II) .sh BUGS .th CHDIR II 8/5/73 .sh NAME chdir \*- change working directory .sh SYNOPSIS (chdir = 12.) .br .ft B sys chdir; dirname .s3 chdir(dirname) .br char *dirname; .ft R .sh DESCRIPTION .it Dirname is the address of the pathname of a directory, terminated by a null byte. .it Chdir causes this directory to become the current working directory. .sh "SEE ALSO" chdir (I) .sh DIAGNOSTICS The error bit (c-bit) is set if the given name is not that of a directory or is not readable. From C, a \*-1 returned value indicate The number of reduce-reduce and shift-reduce conflicts is reported on the standard output; a more detailed report is found in the .it y.output file. .sh BUGS Because file names are fixed, at most one Yacc process can be active in a given directory at a time. .th SU VIII 10/31/73 .sh NAME su \*- become privileged user .sh SYNOPSIS .bd su .sh DESCRIPTION .it Su allows one to become the super-user, who has all sorts of marvelous (and correspondingly dangerous) powers. In order for \fIsu\fR to do its magic, the user must supply a password. If the password is correct, \fIsu\fR will execute the Shell with the UID set to that of the super-user. To restore normal UID privileges, type an end-of-file to the super-user Shell. .s3 The password demanded is that of the entry ``root'' in the system's password file. .s3 To remind the super-user of his responsibilities, the Shell substitutes `#' for its usual prompt `%'. .sh "SEE ALSO" sh (I)  the next argument file instead of the tape. .s3 .lp +5 3 \fBi\fR All read and checksum errors are reported, but will not cause termination. .s3 .lp +5 3 \fBw\fR In conjunction with the .bd x option, before each file is extracted, its i-number is typed out. To extract this file, you must respond with .bd y. .s3 .i0 The .bd x option is used to retrieve individual files. If the i-number of the desired file is not known, it can be discovered by following the file system directory search algorithm. First retrie.th MKNOD VIII 2/11/75 .sh NAME mknod \*- build special file .sh SYNOPSIS .bd /etc/mknod name [ .bd c ] [ .bd b ] major minor .sh DESCRIPTION .it Mknod makes a directory entry and corresponding i-node for a special file. The first argument is the .it name of the entry. The second is .bd b if the special file is block-type (disks, tape) or .bd c if it is character-type (other devices). The last two arguments are numbers specifying the .it major device type and the .it minor device (e.g. unit, drive, or line .th SA VIII 6/1/74 .sh NAME sa \*- Shell accounting .sh SYNOPSIS sa [ .bd \*-abcjlnrstuv ] [ file ] .sh DESCRIPTION When a user logs in, if the Shell is able to open the file .it /usr/adm/sha, then as each command completes the Shell writes at the end of this file the name of the command, the user, system, and real time consumed, and the user ID. .it Sa reports on, cleans up, and generally maintains this and other accounting files. To turn accounting on and off, the accounting file must be created or destrove the .it root directory whose i-number is 1. List this file with .it "ls \*-fi 1." This will give names and i-numbers of sub-directories. Iterating, any file may be retrieved. .s3 The .bd r option should only be used to restore a complete dump tape onto a clear file system or to restore an incremental dump tape onto this. Thus .s3 /etc/mkfs /dev/rp0 40600 .br restor r /dev/rp0 .s3 is a typical sequence to restore a complete dump. Another .it restor can be done to get an incremental dump in on top of thinumber). .s3 The assignment of major device numbers is specific to each system. They have to be dug out of the system source file .it conf.c. .sh "SEE ALSO" mknod (II) .sh BUGS yed externally. .s3 .it Sa is able to condense the information in .it /usr/adm/sha into a summary file .it /usr/adm/sht which contains a count of the number of times each command was called and the time resources consumed. This condensation is desirable because on a large system .it sha can grow by 100 blocks per day. The summary file is read before the accounting file, so the reports include all available information. .s3 If a file name is given as the last argument, that file will be treated as the accouns. .s3 A .it dump followed by a .it mkfs and a .it restor is used to change the size of a file system. .sh FILES /dev/mt0 .sh "SEE ALSO" ls (I), dump (VIII), mkfs (VIII), clri (VIII) .sh DIAGNOSTICS There are various diagnostics involved with reading the tape and writing the disk. There are also diagnostics if the i-list or the free list of the file system is not large enough to hold the dump. .s3 If the dump extends over more than one tape, it may ask you to change tapes. Reply with a new-line when the nex.th MKFS VIII 11/1/73 .sh NAME mkfs \*- construct a file system .sh SYNOPSIS .bd /etc/mkfs special proto .sh DESCRIPTION .it Mkfs constructs a file system by writing on the special file .it special according to the directions found in the prototype file .it proto. The prototype file contains tokens separated by spaces or new lines. The first token is the name of a file to be copied onto block zero as the bootstrap program (see boot procedures (VIII)). The second token is a number specifying the size of the ting file; .it sha is the default. There are zillions of options: .s3 .de qq .s3 .lp +3 3 \fB\\$1\fR \\ .. .qq a Place all command names containing unprintable characters and those used only once under the name ``***other.'' .qq b Sort output by sum of user and system time divided by number of calls. Default sort is by sum of user and system times. .qq c Besides total user, system, and real time for each command print percentage of total time over all commands. .qq j Instead of total minutes time for each ct tape has been mounted. .sh BUGS There is redundant information on the tape that could be used in case of tape reading problems. Unfortunately, .it restor's approach is to exit if anything is wrong. created file system. Typically it will be the number of blocks on the device, perhaps diminished by space for swapping. The next token is the i-list size in blocks (remember there are 16 i-nodes per block). The next set of tokens comprise the specification for the root file. File specifications consist of tokens giving the mode, the user-id, the group id, and the initial contents of the file. The syntax of the contents field depends on the mode. .s3 The mode token for a file is a 6 character string. The firategory, give seconds per call. .qq l Separate system and user time; normally they are combined. .qq n Sort by number of calls. .qq r Reverse order of sort. .qq s Merge accounting file into summary file .it /usr/adm/sht when done. .qq t For each command report ratio of real time to the sum of user and system times. .qq u Superseding all other flags, print for each command in the accounting file the day of the year, time, day of the week, user ID and command name. .qq v If the next character is a digit .it n.th NCHECK VIII 2/8/75 .sh NAME ncheck \*- generate names from i-numbers .sh SYNOPSIS .bd ncheck [ .bd \*-i numbers ] [ .bd \*-a ] [ filesystem ] .sh DESCRIPTION .it Ncheck with no argument generates a pathname vs. i-number list of all files on a set of default file systems. The .bd \*-i flag reduces the report to only those files whose i-numbers follow. .bd \*-a allows printing of the names `.' and `..', which are ordinarily suppressed. A file system may be specified. .s3 The full report is in no usefust character specifies the type of the file. (The characters .bd \*-bcd specify regular, block special, character special and directory files respectively.) The second character of the type is either .bd u or .bd \*- to specify set-user-id mode or not. The third is .bd g or .bd \*- for the set-group-id mode. The rest of the mode is a three digit octal number giving the owner, group, and other read, write, execute permissions (see .it chmod (I)). .s3 Two decimal number tokens come after the mode; they specif, then type the name of each command used .it n times or fewer. Await a reply from the typewriter; if it begins with ``y'', add the command to the category ``**junk**.'' This is used to strip out garbage. .i0 .dt .sh FILES /usr/adm/sha accounting .br /usr/adm/sht summary .sh "SEE ALSO" ac (VIII) .sh BUGS l order, and probably should be sorted. .sh "SEE ALSO" dcheck (VIII), icheck (VIII), sort (I) .sh BUGS y the user and group ID's of the owner of the file. .s3 If the file is a regular file, the next token is a pathname whence the contents and size are copied. .s3 If the file is a block or character special file, two decimal number tokens follow which give the major and minor device numbers. .s3 If the file is a directory, .it mkfs makes the entries \fB.\fR and \fB..\fR and then reads a list of names and (recursively) file specifications for the entries in the directory. The scan is terminated with the token .th RESTOR VIII 11/24/73 .sh NAME restor \*- incremental file system restore .sh SYNOPSIS .bd restor key [ arguments ] .sh DESCRIPTION .it Restor is used to read magtapes dumped with the .it dump command. The .it key argument specifies what is to be done. .it Key is a character from the set .bd trxw. .s3 .lp +5 3 \fBt\fR The date that the tape was made and the date that was specified in the .it dump command are printed. A list of all of the i-numbers on the tape is also given. .s3 .lp +5 3 \fBr\fR The tape .th MOUNT VIII 10/31/73 .sh NAME mount \*- mount file system .sh SYNOPSIS .bd /etc/mount special file [ .bd \*-r ] .sh DESCRIPTION .it Mount announces to the system that a removable file system is present on the device corresponding to special file .it special (which must refer to a disk or possibly DECtape). The .it file must exist already; it becomes the name of the root of the newly mounted file system. .s3 .it Mount maintains a table of mounted devices; if invoked without an argument it prints the tabl\fB$\fR. .s3 If the prototype file cannot be opened and its name consists of a string of digits, .it mkfs builds a file system with a single empty directory on it. The size of the file system is the value of .it proto interpreted as a decimal number. The i-list size is the file system size divided by 43 plus the size divided by 1000. (This corresponds to an average size of three blocks per file for a 4000 block file system and six blocks per file at 40,000.) The boot program is left uninitialized. .s3 A samis read and loaded into the file system specified in .it arguments. This should not be done lightly (see below). .s3 .lp +5 3 \fBx\fR Each file on the tape is individually extracted into a file whose name is the file's i-number. If there are .it arguments, they are interpreted as i-numbers and only they are extracted. .s3 .lp +5 3 \fBc\fR If the tape overflows, increment the last character of its name and continue on that drive. (Normally it asks you to change tapes.) .s3 .lp +5 3 \fBf\fR Read the dump frome. .s3 The optional last argument indicates that the file is to be mounted read-only. Physically write-protected and magnetic tape file systems must be mounted in this way or errors will occur when access times are updated, whether or not any explicit write is attempted. .sh "SEE ALSO" mount (II), mtab (V), umount (VIII) .sh BUGS Mounting file systems full of garbage will crash the system. ple prototype specification follows: .s3 .nf .in +5 /usr/mdec/uboot 4872 55 d\*-\*-777 3 1 usr d\*-\*-777 3 1 sh \*-\*-\*-755 3 1 /bin/sh ken d\*-\*-755 6 1 $ b0 b\*-\*-644 3 1 0 0 c0 c\*-\*-644 3 1 0 0 $ $ .in -5 .fi .sh "SEE ALSO" file system (V), directory (V), boot procedures (VIII) .sh BUGS It is not possible to initialize a file larger than 64K bytes. .br The size of the file system is restricted to 64K blocks. .br There should be some way to specify links. .th LPD VIII 6/1/74 .sh NAME lpd \*- line printer daemon .sh SYNOPSIS .bd /etc/lpd .sh DESCRIPTION .it Lpd is the line printer daemon (spool area handler) invoked by .it opr. It uses the directory .it /usr/lpd. The file .it lock in that directory is used to prevent two daemons from becoming active simultaneously. After the daemon has successfully set the lock, it scans the directory for files beginning with ``df.'' Lines in each .it df file specify files to be printed in the same way as is done by the data-.th ICHECK VIII 2/9/75 .sh NAME icheck \*- file system storage consistency check .sh SYNOPSIS .bd icheck [ .bd \*-s ] [ .bd \*-b numbers ] [ filesystem ] .sh DESCRIPTION .it Icheck examines a file system, builds a bit map of used blocks, and compares this bit map against the free list maintained on the file system. If the file system is not specified, a set of default file systems is checked. The normal output of .it icheck includes a report of .s3 .lp +4 0 The number of blocks missing; i.e. not in any filriter line. Arguments other than `0' can be used to make .it getty treat the line specially. Normally, it sets the speed of the interface to 300 baud, specifies that raw mode is to be used (break on every character), that echo is to be suppressed, and either parity allowed. It types the ``login:'' message, which includes the characters which put the Terminet 300 terminal into full-duplex and return the GSI terminal to non-graphic mode. Then the user's name is read, a character at a time. If a null characterphone daemon dpd (VIII). .sh FILES /usr/lpd/* spool area .br /dev/lp printer .sh "SEE ALSO" dpd (VIII), opr (I) .sh BUGS e nor in the free list, .lp +4 0 The number of special files, .lp +4 0 The total number of files, .lp +4 0 The number of large and huge files, .lp +4 0 The number of directories, .lp +4 0 The number of indirect blocks, and the number of double-indirect blocks in huge files, .lp +4 0 The number of blocks used in files, .lp +4 0 The number of free blocks. .s3 .i0 The .bd \*-s flag causes .it icheck to ignore the actual free list and reconstruct a new one by rewriting the super-block of the file system. The fi is received, it is assumed to be the result of the user pushing the ``break'' (``interrupt'') key. The speed is then changed to 150 baud and the ``login:'' is typed again, this time including the character sequence which puts a Teletype 37 into full-duplex. If a subsequent null character is received, the speed is changed back to 300 baud. .s3 The user's name is terminated by a new-line or carriage-return character. The latter results in the system being set to treat carriage returns appropriately (see .it .th INIT VIII 2/22/74 .sh NAME init \*- process control initialization .sh SYNOPSIS .bd /etc/init .sh DESCRIPTION .it Init is invoked inside UNIX as the last step in the boot procedure. Generally its role is to create a process for each typewriter on which a user may log in. .s3 First, .it init checks to see if the console switches contain 173030. (This number is likely to vary between systems.) If so, the console typewriter .bd /dev/tty8 is opened for reading and writing and the Shell is invoked immediatle system should be dismounted while this is done; if this is not possible (for example if the root file system has to be salvaged) care should be taken that the system is quiescent and that it is rebooted immediately afterwards so that the old, bad in-core copy of the super-block will not continue to be used. Notice also that the words in the super-block which indicate the size of the free list and of the i-list are believed. If the super-block has been curdled these words will have to be patched. The .bd stty (II)). .s3 The user's name is scanned to see if it contains any lower-case alphabetic characters; if not, and if the name is nonempty, the system is told to map any future upper-case characters into the corresponding lower-case characters. .s3 Finally, login is called with the user's name as argument. .sh "SEE ALSO" init (VIII), login (I), stty (II), ttys (V) .sh BUGS ely. This feature is used to bring up a single-user system. When the system is brought up in this way, the .it getty and .it login routines mentioned below and described elsewhere are not used. If the Shell terminates, .it init starts over looking for the console switch setting. .s3 Otherwise, \fIinit\fR invokes a Shell, with input taken from the file .it /etc/rc. This command file performs housekeeping like removing temporary files, mounting file systems, and starting daemons. .s3 Then .it init reads the f\*-s flag causes the normal output reports to be suppressed. .s3 Following the .bd \-b flag is a list of block numbers; whenever any of the named blocks turns up in a file, a diagnostic is produced. .s3 .it Icheck is faster if the raw version of the special file is used, since it reads the i-list many blocks at a time. .sh FILES Currently, /dev/rrk2 and /dev/rrp0 are the default file systems. .sh "SEE ALSO" dcheck (VIII), ncheck (VIII), fs (V), clri (VIII), restor(VIII) .sh DIAGNOSTICS For duplicate blocks .th DUMP VIII 11/24/73 .sh NAME dump \*- incremental file system dump .sh SYNOPSIS .bd dump [ key [ arguments ] filesystem ] .sh DESCRIPTION .it Dump makes an incremental file system dump on magtape of all files changed after a certain date. The .it key argument specifies the date and other options about the dump. .it Key consists of characters from the set .bd abcfiu0hds. .s3 .lp +5 5 \fBa\fR Normally files larger than 1000 blocks are not incrementally dump; this flag forces them to be dumped. .s3 .lp +5 5ile .it /etc/ttys and forks several times to create a process for each typewriter specified in the file. Each of these processes opens the appropriate typewriter for reading and writing. These channels thus receive file descriptors 0 and 1, the standard input and output. Opening the typewriter will usually involve a delay, since the \fIopen\fR is not completed until someone is dialed up and carrier established on the channel. Then .it /etc/getty is called with argument as specified by the last character ofand bad blocks (which lie outside the file system) .it icheck announces the difficulty, the i-number, and the kind of block involved. If a read error is encountered, the block number of the bad block is printed and .it icheck considers it to contain 0. ``Bad freeblock'' means that a block number outside the available space was encountered in the free list. ``\fIn\fR dups in free'' means that \fIn\fR blocks were found in the free list which duplicate blocks either in some file or in the earlier part of the f \fBb\fR The next argument is taken to be the maximum size of the dump tape in blocks (see \fBs\fR). .s3 .lp +5 5 \fBc\fR If the tape overflows, increment the last character of its name and continue on that drive. (Normally it asks you to change tapes.) .s3 .lp +5 5 \fBf\fR Place the dump on the next argument file instead of the tape. .s3 .lp +5 5 \fBi\fR the dump date is taken from the entry in the file /etc/dtab corresponding to the last time this file system was dumped with the .bd -u option. .s3 .lp +5  the .it ttys file line. .it Getty reads the user's name and invokes .it login (q.v.) to log in the user and execute the Shell. .s3 Ultimately the Shell will terminate because of an end-of-file either typed explicitly or generated as a result of hanging up. The main path of \fIinit\fR, which has been waiting for such an event, wakes up and removes the appropriate entry from the file \fIutmp\fR, which records current users, and makes an entry in \fI/usr/adm/wtmp\fR, which maintains a history of logins and loree list. .sh BUGS Since .it icheck is inherently two-pass in nature, extraneous diagnostics may be produced if applied to active file systems. .br It believes even preposterous super-blocks and consequently can get core images. 5 \fBu\fR the date just prior to this dump is written on /etc/dtab upon successful completion of this dump. This file contains a date for every file system dumped with this option. .s3 .lp +5 5 \fB0\fR the dump date is taken as the epoch (beginning of time). Thus this option causes an entire file system dump to be taken. .s3 .lp +5 5 \fBh\fR the dump date is some number of hours before the current date. The number of hours is taken from the next argument in .it arguments. .s3 .lp +5 5 \fBd\fR the dump date gouts. Then the appropriate typewriter is reopened and .it getty is reinvoked. .s3 .it Init catches the .it hangup signal (signal #1) and interprets it to mean that the switches should be examined as in a reboot: if they indicate a multi-user system, the .it /etc/ttys file is read again. The Shell process on each line which used to be active in .it ttys but is no longer there is terminated; a new process is created for each added line; lines unchanged in the file are undisturbed. Thus it is possible to drop.th GLOB VIII 9/19/73 .sh NAME glob \*- generate command arguments .sh SYNOPSIS .bd /etc/glob command [ arguments ] .sh DESCRIPTION .it Glob is used to expand arguments to the shell containing ``*'', ``['', or ``?''. It is passed the argument list containing the metacharacters; .it glob expands the list and calls the indicated command. The actions of .it glob are detailed in the Shell writeup. .sh SEE ALSO" sh (I) .sh BUGS is some number of days before the current date. The number of days is taken from the next argument in .it arguments. .s3 .lp +5 5 \fBs\fR the size of the dump tape is specified in feet. The number of feet is taken from the next argument in .it arguments. It is assumed that there are 9 standard UNIX records per foot. When the specified size is reached, the dump will wait for reels to be changed. The default size is 2200 feet. .s3 .i0 .dt .dt If no arguments are given, the .it key is assumed to be .bd i and t or add phone lines without rebooting the system by changing the .it ttys file and sending a .it hangup signal to the .it init process: use ``kill \*-1 1.'' .sh FILES /dev/tty?, /etc/utmp, /usr/adm/wtmp, /etc/ttys, /etc/rc .sh "SEE ALSO" login (I), kill (I), sh (I), ttys (V), getty (VIII) .th GETTY VIII 2/11/75 .sh NAME getty \*- set typewriter mode .sh SYNOPSIS .bd /etc/getty [ char ] .sh DESCRIPTION .it Getty is invoked by .it init (VIII) immediately after a typewriter is opened following a dial-up. It reads the user's name and invokes the .it login command (I) with the name as argument. While reading the name .it getty attempts to adapt the system to the speed and type of terminal being used. .s3 .it Init calls .it getty with an argument specified by the .it ttys file entry for the typewhe file system is assumed to be /dev/rp0. .s3 Full dumps should be taken on quiet file systems as follows: .s3 dump 0u /dev/rp0 .br ncheck /dev/rp0 .s3 The .it ncheck will come in handy in case it is necessary to restore individual files from this dump. Incremental dumps should then be taken when desired by: .s3 dump .s3 When the incremental dumps get cumbersome, a new complete dump should be taken. In this way, a restore requires loading of the complete dump tape and only the latest incremental tape. .sh DIAGNOSTICS If the dump requires more than one tape, it will ask you to change tapes. Reply with a new-line when this has been done. If the first block on the new tape is not writable, e.g. because you forgot the write ring, you get a chance to fix it. Generally, however, read or write failures are fatal. .sh FILES /dev/mt0 magtape .br /dev/rp0 default file system .br /etc/dtab .sh "SEE ALSO" restor (VIII), ncheck (VIII), dump (V) .sh BUGS ccurs when there are more entries than links; if entries are removed, so the link-count drops to 0, the remaining entries point to thin air. They should be removed. When there are more links than entries, or there is an allocated file with neither links nor entries, some disk space may be lost but the situation will not degenerate. .sh "SEE ALSO" icheck (VIII), fs (V), clri (VIII), ncheck (VIII) .sh BUGS Since .it dcheck is inherently two-pass in nature, extraneous diagnostics may be produced if applied to ss 44, and start. This should write a copy of all of core on the tape with an EOF mark. Caution: Any error is taken to mean the end of core has been reached. This means that you must be sure the ring is in, the tape is ready, and the tape is clean and new. If the dump fails, you can try again, but some of the registers will be lost. See below for what to do with the tape. .s3 In restarting after a crash, always bring up the system single-user. This is accomplished by following the directions in .it "boot pr.th DPD VIII 3/15/72 .sh NAME dpd \*- data phone daemon .sh SYNOPSIS .bd /etc/dpd .sh DESCRIPTION .it Dpd is the 201 data phone daemon. It is designed to submit jobs to the Honeywell 6070 computer via the GRTS interface. .s3 .it Dpd uses the directory .it /usr/dpd. The file .it lock in that directory is used to prevent two daemons from becoming active. After the daemon has successfully set the lock, it forks and the main path exits, thus spawning the daemon. The directory is scanned for files beginning withactive file systems. ocedures" (VIII) as modified for your particular installation; a single-user system is indicated by having a particular value in the switches (173030 unless you've changed .it init) as the system starts executing. When it is running, perform a .it dcheck and .it icheck (VIII) on all file systems which could have been in use at the time of the crash. If any serious file system problems are found, they should be repaired. When you are satisfied with the health of your disks, check and set the date if necessar .bd df. Each such file is submitted as a job. Each line of a job file must begin with a key character to specify what to do with the remainder of the line. .s3 .lp +5 3 \fBS\fR directs .it dpd to generate a unique snumb card. This card is generated by incrementing the first word of the file .it /usr/dpd/snumb and converting that to three-digit octal concatenated with the station ID. .s3 .lp +5 3 \fBL\fR specifies that the remainder of the line is to be sent as a literal. .s3 .lp +5 3 \fBB\fR specifies that.th CRON VIII 10/25/74 .sh NAME cron \*- clock daemon .sh SYNOPSIS .bd /etc/cron .sh DESCRIPTION .it Cron executes commands at specified dates and times according to the instructions in the file /usr/lib/crontab. Since .it cron never exits, it should only be executed once. This is best done by running .it cron from the initialization process through the file /etc/rc; see .it init (VIII). .s2 Crontab consists of lines of six fields each. The fields are separated by spaces or tabs. The first five are integer y, then come up multi-user. This is most easily accomplished by changing the single-user value in the switches to something else, then logging out by typing an EOT. .s3 To even boot \s8UNIX\s10 at all, three files (and the directories leading to them) must be intact. First, the initialization program .it /etc/init must be present and executable. If it is not, the CPU will loop in user mode at location 6. For .it init to work correctly, .it /dev/tty8 and .it /bin/sh must be present. If either does not exist, the rest of the line is a file name. That file is to be sent as binary cards. .s3 .lp +5 3 \fBF\fR is the same as \fBB\fR except a form feed is prepended to the file. .s3 .lp +5 3 \fBU\fR specifies that the rest of the line is a file name. After the job has been transmitted, the file is unlinked. .s3 .lp +5 3 \fBM\fR is followed by a user ID; after the job is sent, the snumb number and the first line of information in the file is mailed to the user to verify the sending of the job. .s3 .i0 Any error encounpatterns to specify the minute (0-59), hour (0-23), day of the month (1-31), month of the year (1-12), and day of the week (1-7 with 1=monday). Each of these patterns may contain a number in the range above; two numbers separated by a minus meaning a range inclusive; a list of numbers separated by commas meaning any of the numbers; or an asterisk meaning all legal values. The sixth field is a string that is executed by the Shell at the specified times. A percent character in this field is translated to a ne the symptom is best described as thrashing. .it Init will go into a .it fork/exec loop trying to create a Shell with proper standard input and output. .s3 If you cannot get the system to boot, a runnable system must be obtained from a backup medium. The root file system may then be doctored as a mounted file system as described below. If there are any problems with the root file system, it is probably prudent to go to a backup system to avoid working on a mounted file system. .s3 .it "Repairing disks.||" Ttered will cause the daemon to drop the call, wait up to 20 minutes and start over. This means that an improperly constructed \fIdf\fR file may cause the same job to be submitted every 20 minutes. .s3 While waiting, the daemon checks to see that the .it lock file still exists. If it is gone, the daemon will exit. .sh FILES /dev/dn0, /dev/dp0, /usr/dpd/* .sh "SEE ALSO" opr (I) w-line character. Only the first line (up to a % or end of line) of the command field is executed by the Shell. The other lines are made available to the command as standard input. .s2 Crontab is examined by .it cron every hour. Thus it could take up to an hour for entries to become effective. If it receives a hangup signal, however, the table is examined immediately; so `kill \-1 ...' can be used. .sh FILES /usr/lib/crontab .sh "SEE ALSO" init(VIII), sh(I), kill (I) .sh DIAGNOSTICS None \- illegal lines inhe first rule to keep in mind is that an addled disk should be treated gently; it shouldn't be mounted unless necessary, and if it is very valuable yet in quite bad shape, perhaps it should be dumped before trying surgery on it. This is an area where experience and informed courage count for much. .s3 The problems reported by .it icheck typically fall into two kinds. There can be problems with the free list: duplicates in the free list, or free blocks also in files. These can be cured easily with an .it "ic.th DF VIII 1/20/73 .sh NAME df \*- disk free .sh SYNOPSIS .bd df [ filesystem ] .sh DESCRIPTION .it Df prints out the number of free blocks available on a file system. If the file system is unspecified, the free space on all of the normally mounted file systems is printed. .sh FILES /dev/rf?, /dev/rk?, /dev/rp? .sh "SEE ALSO" icheck (VIII) .sh BUGS  crontab are ignored. .sh BUGS A more efficient algorithm could be used. The overhead in running .it cron is about one percent of the machine, exclusive of any commands executed. heck \*-s." If the same block appears in more than one file or if a file contains bad blocks, the files should be deleted, and the free list reconstructed. The best way to delete such a file is to use .it clri (VIII), then remove its directory entries. If any of the affected files is really precious, you can try to copy it to another device first. .s3 .it Dcheck may report files which have more directory entries than links. Such situations are potentially dangerous; .it clri discusses a special case of the .th DCHECK VIII 2/8/75 .sh NAME dcheck \*- file system directory consistency check .sh SYNOPSIS .bd dcheck [ .bd \*-i numbers ] [ filesystem ] .sh DESCRIPTION .it Dcheck reads the directories in a file system and compares the link-count in each i-node with the number of directory entries by which it is referenced. If the file system is not specified, a set of default file systems is checked. .s3 The .bd \*-i flag is followed by a list of i-numbers; when one of those i-numbers turns up in a directory, the nuF258;>ADGHKNQTWZ]Iproblem. All the directory entries for the file should be removed. If on the other hand there are more links than directory entries, there is no danger of spreading infection, but merely some disk space that is lost for use. It is sufficient to copy the file (if it has any entries and is useful) then use .it clri on its inode and remove any directory entries that do exist. .s3 Finally, there may be inodes reported by .it dcheck that have 0 links and 0 entries. These occur on the root device when the system mber, the i-number of the directory, and the name of the entry are reported. .s3 The program is fastest if the raw version of the special file is used, since the i-list is read in large chunks. .sh FILES Currently, /dev/rrk2 and /dev/rrp0 are the default file systems. .sh DIAGNOSTICS When a file turns up for which the link-count and the number of directory entries disagree, the relevant facts are reported. Allocated files which have 0 link-count and no entries are also listed. The only dangerous situation o.th CRASH VIII 2/12/75 .tr | .sh NAME crash \*- what to do when the system crashes .sh DESCRIPTION This section gives at least a few clues about how to proceed if the system crashes. It can't pretend to be complete. .s3 .it "How to bring it back up.||" If the reason for the crash is not evident (see below for guidance on `evident') you may want to try to dump the system if you feel up to debugging. At the moment a dump can be taken only on magtape. With a tape mounted and ready, stop the machine, load addreis stopped with pipes open, and on other file systems when the system stops with files that have been deleted while still open. A .it clri will free the inode, and an .it "icheck -s" will recover any missing blocks. .s3 .it "Why did it crash?||" UNIX types a message on the console typewriter when it voluntarily crashes. Here is the current list of such messages, with enough information to provide a hope at least of the remedy. The message has the form `panic: ...', possibly accompanied by other information. Left unstated in all cases is the possibility that hardware or software error produced the message in some unexpected way. .s3 .lp +5 5 blkdev .br The .it getblk routine was called with a nonexistent major device as argument. Definitely hardware or software error. .s3 .lp +5 5 devtab .br Null device table entry for the major device used as argument to .it getblk. Definitely hardware or software error. .s3 .lp +5 5 iinit .br An I/O error reading the super-block for the root file system during initializationof system debugging is impossible here. .sh "SEE ALSO" clri, icheck, dcheck, boot procedures (VIII) .sh BUGS  into location zero and executed there, it will type `=' on the console, read in a .it tp entry name, load that entry into core, and transfer to zero. Thus one way to run UNIX is to maintain the system code on a tape using .it tp. Caution: the file /usr/mdec/tboot (DECtape) or /usr/mdec/mboot (magtape) must be present when the tape is made! When a boot is required, execute (somehow) a program which reads in and jumps to the first block of the tape. In response to the `=' prompt, type the entry name of the s. .s3 .lp +5 5 out of inodes .br A mounted file system has no more i-nodes when creating a file. Sorry, the device isn't available; the .it icheck should tell you. .s3 .lp +5 5 no fs .br A device has disappeared from the mounted-device table. Definitely hardware or software error. .s3 .lp +5 5 no imt .br Like `no fs', but produced elsewhere. .s3 .lp +5 5 no inodes .br The in-core inode table is full. Try increasing NINODE in param.h. Shouldn't be a panic, just a user error. .s3 .lp +5 5 no clock .br During .th CLRI VIII 10/31/73 .sh NAME clri \*- clear i-node .sh SYNOPSIS .bd clri i-number [ filesystem ] .sh DESCRIPTION .it Clri writes zeros on the 32 bytes occupied by the i-node numbered .it i-number. If the .it "file system" argument is given, the i-node resides on the given device, otherwise on a default file system. The file system argument must be a special file name referring to a device containing a file system. After .it clri, any blocks in the affected file will show up as ``missing'' in an .it ichecystem on the tape (we use plain `unix'). It is strongly recommended that a current version of the system be maintained in this way, even if it is usually booted from disk. .s3 The standard DEC ROM which loads DECtape is sufficient to read in .it tboot, but the magtape ROM loads block one, not zero. If no suitable ROM is available, magtape and DECtape programs are presented below which may be manually placed in core and executed. .s3 The system can also be booted from a disk file with the aid of the .it ubooinitialization, neither the line nor programmable clock was found to exist. .s3 .lp +5 5 swap error .br An unrecoverable I/O error during a swap. Really shouldn't be a panic, but it is hard to fix. .s3 .lp +5 5 unlink \- iget .br The directory containing a file being deleted can't be found. Hardware or software. .s3 .lp +5 5 out of swap space .br A program needs to be swapped out, and there is no more swap space. It has to be increased. This really shouldn't be a panic, but there is no easy fix. .s3 .lp +5 k of of the file system. .s3 Read and write permission is required on the specified file system device. The i-node becomes allocatable. .s3 The primary purpose of this routine is to remove a file which for some reason appears in no directory. If it is used to zap an i-node which does appear in a directory, care should be taken to track down the entry and remove it. Otherwise, when the i-node is reallocated to some new file, the old entry will still point to that file. At that point removing the old entry wit program. When read into location 0 and executed, .it uboot reads a single character (either .bd p or .bd k for RP or RK, both drive 0) to specify which device is to be searched. Then it reads a UNIX pathname from the console, finds the corresponding file on the given device, loads that file into core location zero, and transfers to it. .it Uboot operates under very severe space constraints. It supplies no prompts, except that it echoes a carriage return and line feed after the .bd p or .bd k. No diagnosti5 out of text .br A pure procedure program is being executed, and the table for such things is full. This shouldn't be a panic. .s3 .lp +5 5 trap .br An unexpected trap has occurred within the system. This is accompanied by three numbers: a `ka6', which is the contents of the segmentation register for the area in which the system's stack is kept; `aps', which is the location where the hardware stored the program status word during the trap; and a `trap type' which encodes which trap occurred. The trap typesll destroy the new file. The new entry will again point to an unallocated i-node, so the whole cycle is likely to be repeated again and again. .sh BUGS Whatever the default file system is, it is likely to be wrong. Specify the file system explicitly. .s3 If the file is open, .it clri is likely to be ineffective. c is provided if the indicated file cannot be found, nor is there any means of correcting typographical errors in the file name except to start the program over. If it fails to find the file, however, it jumps back to its start, so another try can be attempted, starting again with the .bd p or .bd k. Notice that .it uboot will only load a file from drive 0, and the file system it searches must start at the beginning of the disk. .it Uboot itself usually resides in the otherwise unused block 0 of the disk, s are: .s3 .lp +10 5 0 bus error .lp +10 5 1 illegal instruction .lp +10 5 2 BPT/trace .lp +10 5 3 IOT .lp +10 5 4 power fail .lp +10 5 5 EMT .lp +10 5 6 recursive system call (TRAP instruction) .lp +10 5 7 11/70 cache parity, or programmed interrupt .lp +10 5 10 floating point trap .lp +10 5 11 segmentation violation .i0 .s3 In some of these cases it is possible for octal 20 to be added into the trap type; this indicates that the processor was in user mode when the trap occurred. If you wish to examine the .th CHOWN VIII 2/8/75 .sh NAME chown \*- change owner .sh SYNOPSIS .bd chown owner file ... .sh DESCRIPTION The user-ID of the files is changed to .it owner. The owner may be either a decimal UID or a login name found in the password file. .s3 Only the super-user is allowed to change the owner of a file, in order to simplify as yet unimplemented accounting procedures. .sh FILES /etc/passwd .sh "SEE ALSO" chgrp (VIII) .sh BUGS o it can be loaded by ROM program; .it mkfs can be used to put it there when the file system is created. It can also be loaded from a .it tp tape as described above. .s3 .it "The switches.||" The console switches play an important role in the use and especially the booting of UNIX. During operation, the console switches are examined 60 times per second, and the contents of the address specified by the switches are displayed in the display register. (This is not true on the 11/40 since there is no display restack after such a trap, either dump the system, or use the console switches to examine core; the required address mapping is described below. .s3 .it "Interpreting dumps.||" All file system problems should be taken care of before attempting to look at dumps. The dump should be read into the file .it /usr/sys/core; .it cp (I) will do. At this point, you should execute .it "ps \*-alxk" and .it who to print the process table and the users who were on at the time of the crash. You should dump ( .it od (I)) the.th CHGRP VIII 2/8/75 .sh NAME chgrp \*- change group .sh SYNOPSIS .bd chgrp group file ... .sh DESCRIPTION The group-ID of the files is changed to .it group. The group may be either a decimal GID or a group name found in the group-ID file. .s3 Only the super-user is allowed to change the group of a file, in order to simplify as yet unimplemented accounting procedures. .sh "SEE ALSO" chown (VIII) .sh FILES /etc/group .sh BUGS gister on that machine.) If the switch address is even, the address is interpreted in kernel (system) space; if odd, the rounded-down address is interpreted in the current user space. .s3 If any diagnostics are produced by the system, they are printed on the console only if the switches are non-zero. Thus it is wise to have a non-zero value in the switches at all times. .s3 During the startup of the system, the .it init program (VIII) reads the switches and will come up single-user if the switches are set t first 30 bytes of .it /usr/sys/core. Starting at location 4, the registers R0, R1, R2, R3, R4, R5, SP and KDSA6 (KISA6 for 11/40s) are stored. If the dump had to be restarted, R0 will not be correct. Next, take the value of KA6 (location 22(8) in the dump) multiplied by 100(8) and dump 1000(8) bytes starting from there. This is the per-process data associated with the process running at the time of the crash. Relabel the addresses 140000 to 141776. R5 is C's frame or display pointer. Stored at (R5) is the ^JMPSVY\_`cfio 173030. .s3 It is unwise to have a non-existent address in the switches. This causes a bus error in the system (displayed as 177777) at the rate of 60 times per second. If there is a transfer of more than 16ms duration on a device with a data rate faster than the bus error timeout (about 10\*us) then a permanent disk non-existent-memory error will occur. .s3 .it "ROM programs.||" Here are some programs which are suitable for installing in read-only memories, or for manual keying into core if no ROM is preold R5 pointing to the previous stack frame. At (R5)+2 is the saved PC of the calling procedure. Trace this calling chain until you obtain an R5 value of 141756, which is where the user's R5 is stored. If the chain is broken, you have to look for a plausible R5, PC pair and continue from there. Each PC should be looked up in the system's name list using .it db (I) and its `:' command, to get a reverse calling order. In most cases this procedure will give an idea of what is wrong. A more complete discussion .tr | .th "BOOT PROCEDURES" VIII 2/11/75 .sh NAME boot procedures \*- UNIX startup .sh DESCRIPTION .it "How to start UNIX.||" UNIX is started by placing it in core at location zero and transferring to zero. Since the system is not reenterable, it is necessary to read it in from disk or tape. .s3 The .it tp command places a bootstrap program on the otherwise unused block zero of the tape. The DECtape version of this program is called .it tboot, the magtape version .it mboot. If .it tboot or .it mboot is readsent. Each program is position-independent but should be placed well above location 0 so it will not be overwritten. Each reads a block from the beginning of a device into core location zero. The octal words constituting the program are listed on the left. .s3 .ne 5 .nf DECtape (drive 0) from endzone: .if n .ta 3 11 15 23 38 .if t .ta .3i 1i 1.4i 2i 3.5i 012700 mov $tcba,r0 177346 010040 mov r0,\*-(r0) / use tc addr for wc 012710 mov $3,(r0) / read bn forward 000003 105710 1: tstb (r0) / wait for ready 002376 bge 1b 112710 movb $5,(r0) / read (forward) 000005 000777 br \fB.\fR / loop; now halt and start at 0 .s3 DECtape (drive 0) with search: 012700 1: mov $tcba,r0 177346 010040 mov r0,\*-(r0) / use tc addr for wc 012740 mov $4003,\*-(r0) / read bn reverse 004003 005710 2: tst (r0) 002376 bge 2b / wait for error 005760 tst \*-2(r0) / loop if not end zone 177776 002365 bge 1b 012710 mov $3,(r0) / read bn forward 000003 105710 2: tstb (r0) / wait for ready 002376 bge 2b .th SALLOC VII 6/15/72 .sh NAME salloc \*- string allocation and manipulation .sh SYNOPSIS .nf (get size in r0) .bd "jsr pc,allocate" (header address in r1) .s3 (get source header address in r0, destination header address in r1) .bd "jsr pc,copy" .s3 .bd "jsr pc,wc" .s3 (all following routines assume r1 contains header address) .s3 .bd "jsr pc,release" .s3 (get character in r0) .bd "jsr pc,putchar" .s3 .bd "jsr pc,lookchar" (character in r0) .s3 .bd "jsr pc,getchar" (character in r0) .s3 (get character in rine called with bad header pointer. .br `cannot open output file' \*- temp file .it alloc.d cannot be created or opened. .br `out of space' \*- no sufficiently large block or no header is available for a new or growing block. .sh BUGS  112710 movb $5,(r0) / read (forward) 000005 105710 2: tstb (r0) / wait for ready 002376 bge 2b 005007 clr pc / transfer to zero .s3 .fi Caution: both of these DECtape programs will (literally) blow a fuse if 2 drives are dialed to zero. .s3 .nf Magtape from load point: 012700 mov $mtcma,r0 172526 010040 mov r0,\*-(r0) / usr mt addr for wc 012740 mov $60003,\*-(r0) / read 9\*-track 060003 000777 br \fB.\fR / loop; now halt and start at 0 .s3 RK (drive 0): 012700 mov $rkda,r0 177412 00500) .bd "jsr pc,alterchar" .s3 (get position in r0) .bd "jsr pc,seekchar" .s3 .bd "jsr pc,backspace" (character in r0) .s3 (get word in r0) .bd "jsr pc,putword" .s3 .bd "jsr pc,lookword" (word in r0) .s3 .bd "jsr pc,getword" (word in r0) .s3 (get word in r0) .bd "jsr pc,alterword" .s3 .bd "jsr pc,backword" (word in r0) .s3 .bd "jsr pc,length" (length in r0) .s3 .bd "jsr pc,position" (position in r0) .s3 .bd "jsr pc,rewind" .s3 .bd "jsr pc,create" .s3 .bd "jsr pc,fsfile" .s3 .bd "jsr pc,zero" .fi .sh DESCRIPT.th PLOT VII 2/25/75 .sh NAME plot: openpl et al. \*- graphics interface .sh SYNOPSIS .nf .ft B openpl( ) .s3 erase( ) .s3 label(s) char s[ ]; .s3 line(x1, y1, x2, y2) .s3 circle(x, y, r) .s3 arc(x, y, x0, y0, x1, y1) .s3 dot(x, y, dx, n, pattern) int pattern[ ]; .s3 move(x, y) .s3 point(x, y) .s3 linemod(s) char s[ ]; .s3 space(x0, y0, x1, y1) .s3 closepl( ) .fi .s3 .ft R .sh DESCRIPTION These subroutines generate graphic output in a relatively device-independent manner. See .it plot (VI) for a description40 clr \*-(r0) / rkda cleared by start 010040 mov r0,\*-(r0) 012740 mov $5,\*-(r0) 000005 105710 1: tstb (r0) 002376 bge 1b 005007 clr pc .s3 .ne 11 RP (drive 0) 012700 mov $rpmr,r0 176726 005040 clr \*-(r0) 005040 clr \*-(r0) 005040 clr \*-(r0) 010040 mov r0,\*-(r0) 012740 mov $5,\*-(r0) 000005 105710 1: tstb (r0) 002376 bge 1b 005007 clr pc .dt .sh FILES /unix \*- UNIX code .br /usr/mdec/mboot \*- \fItp\fR magtape bootstrap .br /usr/mdec/tboot \*- \fItp\fR DECtape bootstrap .ION This package is a complete set of routines for dealing with almost arbitrary length strings of words and bytes. It lives in .it /lib/libs.a. The strings are stored on a disk file, so the sum of their lengths can be considerably larger than the available core. A small buffer cache makes for reasonable speed. .s3 For each string there is a header of four words, namely a write pointer, a read pointer and pointers to the beginning and end of the block containing the string. Initially the read and write poin of the meaning of the subroutines. .s3 There are four libraries containing these routines, one that produces general graphics commands on the standard output, and one each for the vt0 storage scope, the Diablo plotting terminal and the Tektronix 4014 terminal. .it Openpl must be used before any of the others to open the device for writing. .it Closepl flushes the output. .sh FILES /usr/lib/plot.a produces output for plotting filters .br /usr/lib/vt0.a produces output on vt0 storage scope .br /usr/lib/gsip.br /usr/mdec/uboot \*- file system bootstrap .sh "SEE ALSO" tp (I), init (VIII) ters point to the beginning of the string. All routines that refer to a string require the header address in r1. Unless the string is destroyed by the call, upon return r1 will point to the same string, although the string may have grown to the extent that it had to be be moved. .s3 .it Allocate obtains a string of the requested size and returns a pointer to its header in r1. .s3 .it Release releases a string back to free storage. .s3 .it Putchar and .it putword write a byte or word respectively into the sta produces output on Diablo terminal .br /usr/lib/tek.a produces output for the Tektronix 4014 terminal .sh "SEE ALSO" plot (VI), graph (VI) .sh BUGS .th AC VIII 2/20/74 .sh NAME ac \*- login accounting .sh SYNOPSIS .bd ac [ .bd \*-w wtmp ] [ .bd \*-p ] [ .bd \*-d ] people .sh DESCRIPTION .it Ac produces a printout giving connect time for each user who has logged in during the life of the current .it wtmp file. A total is also produced. .bd \*-w is used to specify an alternate \fIwtmp\fR file. .bd \*-p prints individual totals; without this option, only totals are printed. .bd \*-d causes a printout for each midnight to midnight period. Any .it people wiring and advance the write pointer. .s3 .it Lookchar and .it lookword read a byte or word respectively from the string but do not advance the read pointer. .s3 .it Getchar and .it getword read a byte or word respectively from the string and advance the read pointer. .s3 .it Alterchar and .it alterword write a byte or word respectively into the string where the read pointer is pointing and advance the read pointer. .s3 .it Backspace and .it backword read the last byte or word written and decrement the write qtwx{~ll limit the printout to only the specified login names. If no \fIwtmp\fR file is given, .it /usr/adm/wtmp is used. .s3 The accounting file .it /usr/adm/wtmp is maintained by .it init and .it login. Neither of these programs creates the file, so if it does not exist no connect-time accounting is done. To start accounting, it should be created with length 0. On the other hand if the file is left undisturbed it will grow without bound, so periodically any information desired should be collected and the file tpointer. .s3 All write operations will automatically get a larger block if the current block is exceeded. All read operations return with the error bit set if attempting to read beyond the write pointer. .s3 .it Seekchar moves the read pointer to the offset specified in r0. .s3 .it Length returns the current length of the string (beginning pointer to write pointer) in r0. .s3 .it Position returns the current offset of the read pointer in r0. .s3 .it Rewind moves the read pointer to the beginning of the stri.hc % .th MS VII 11/6/74 .sh NAME ms \*- macros for formatting manuscripts .sh SYNOPSIS .bd "nroff \*-ms" [ options ] file ... .br .bd "troff \*-ms" [ options ] file ... .sh DESCRIPTION This package of .it nroff and .it troff macro definitions provides a canned formatting .li facility for tech%nical papers. When producing 2-column output on a terminal, its output should be filtered through .it col (I). .s3 The package supports three different formats: BTL technical memorandum with cover sheet, released pruncated. .sh FILES /usr/adm/wtmp .sh "SEE ALSO" init (VIII), login (I), wtmp (V). .sh BUGS ng. .s3 .it Create returns the read and write pointers to the beginning of the string. .s3 .it Fsfile moves the read pointer to the current position of the write pointer. .s3 .it Zero zeros the whole string and sets the write pointer to the beginning of the string. .s3 .it Copy copies the string whose header pointer is in r0 to the string whose header pointer is in r1. Care should be taken in using the copy instruction since r1 will be changed if the contents of the source string is bigger than the destinataper with cover sheet, and an abbreviated `debugging' form without cover sheet. .s3 The macro requests are defined in the attached Request Reference. Many .it nroff and .it troff requests are unsafe in conjunction with this package, however the requests listed below may be used with impunity after the first .PP. .s3 .lp +8 0 .ta 5n .nf .li .bp begin new page .li .br break output line here .li .sp n insert n spacing lines .li .ls n (line spacing) n=1 single, n=2 double space .li .na no alignment of right maradgjmpsvbion string. .s3 .it Wc forces the contents of the internal buffers and the header blocks to be written on disc. .s3 An in-core version of this allocator exists in .it dc (I), and a permanent-file version exists in .it form and .it fed (VI). .sh FILES .if t .ta 1i .if n .ta 13 /lib/libs.a library, accessed by .it "ld ... -ls" .br alloc.d temporary file for string storage .sh "SEE ALSO" alloc (III) .sh DIAGNOSTICS `error in copy' \*- disk write error encountered in .it copy. .br `error in allocator' \*- routgin .fi .i0 .s3 Output of the .it eqn, .it neqn and .it tbl (I) preprocessors for equations and tables is acceptable as input. .sh FILES /usr/lib/tmac.s .sh "SEE ALSO" eqn (I), nroff (I), troff (I), tbl (VI) .sh BUGS .bp .in0 .tr &. .in0 .ce REQUEST REFERENCE .if t .ta .75i 1.5i 2i .if n .ta 10 18 24 .if t .in 2i .if n .in 23 .if n .na .s3 .ti0 Request Initial Cause .ti0 Form Value Break Explanation .ps 9 .vs 11p .s3 .ti0 .li .1C yes yes One column format on a new page. .ti0 .li .2C no yes Two column format. .ti0 .li .AB no yes Begin abstract. .ti0 .li .AE - yes End abstract. .ti0 .li .AI no yes Author's institution follows. Suppressed in TM. .ti0 .li .AU \fIx y\fR no yes Author's name follows. \fIx\fR is location and \fIy\fR is extension, ignored except in TM. .ti0 .li .B no no Boldface text follows. .ti0 .li .CS \fIx...\fR - yes Cover sheet info if TM format, suppressed otherwise. Arguments are number of text pages, other pages, total pages, figures, tables, references. .ti0 .li .DA \fIx\fR nroff no `Date lse functions are named by analogy to .it "fork, exit, read, write" (II). They establish and synchronize `coroutines', which behave in many respects like a set of processes working in the same address space. The functions live in .it /usr/lib/cr.a. .s3 Coroutines are placed on queues to indicate their state of readiness. One coroutine is always distinguished as `running'. Coroutines that are runnable but not running are registered on a `ready queue'. The head member of the ready queue is started whenever no expressions and arguments of further calls, regardless of actual need. There is no checking for stack overflow. .br Under /usr/lib/scr.a stack overflow checking is not rigorous. ine' at bottom of page is \fIx\fR. Default is today. .ti0 .li .DE - yes End displayed text. Implies .KE. .ti0 .li .DS \fIx\fR no yes Start of displayed text, to appear verbatim line-by-line. \fIx\fR=I for indented display (default), \fIx\fR=L for left-justified on the page, \fIx\fR=C for centered. Implies .KS. .ti0 .li .EN - yes Space after equation produced by .it eqn or .it neqn. .ti0 .li .EQ \fIx\fR - yes Space before equation. Equation number is \fIx\fR. .ti0 .li .FE - yes End footnote. .ti0 .li .FS no other coroutine is specifically caused to be running. .s3 Each connector heads two queues: .it Connector[0] is the queue of unsatisfied .it crreads outstanding on the connector. .it Connector[1] is the queue of .it crwrites. All queues must start empty, .it i.e. with heads set to zero. .s3 .it Crfork is normally called with no arguments. It places the running coroutine at the head of the ready queue, creates a new coroutine, and starts the new one running. .it Crfork returns immediately in the new corout.th WUMP VI 11/25/73 .sh NAME wump \*- the game of hunt-the-wumpus .sh SYNOPSIS .bd /usr/games/wump .sh DESCRIPTION .it Wump plays the game of ``Hunt the Wumpus.'' A Wumpus is a creature that lives in a cave with several rooms connected by tunnels. You wander among the rooms, trying to shoot the Wumpus with an arrow, meanwhile avoiding being eaten by the Wumpus and falling into Bottomless Pits. There are also Super Bats which are likely to pick you up and drop you in some random room. .s3 The program asks vno Start footnote. The note will be moved to the bottom of the page. .ti0 .li .HO - no `Bell Laboratories, Holmdel, New Jersey 07733'. .ti0 .li .I no no Italic text follows. .ti0 .li .IP \fIx y\fR no yes Start indented paragraph, with hanging tag \fIx\fR. Indentation is \fIy\fR ens (default 5). .ti0 .li .KE - yes End keep. Put kept text on next page if not enough room. .ti0 .li .KF no yes Start floating keep. If the kept text must be moved to the next page, float later text back to this page. .ti0 .li .KS nine with value 0, and upon restarting of the old coroutine with value 1. .s3 .it Crexit stops the running coroutine and does not place it in any queue. .s3 .it Crread copies characters from the .it buffer of the .it crwrite at the head of the .it connector's write queue to the .it buffer of .it crread. If the write queue is empty, copying is delayed and the running coroutine is placed on the read queue. The number of characters copied is the minimum of .it nbytes and the number of characters remaining inarious questions which you answer one per line; it will give a more detailed description if you want. .s3 This program is based on one described in .it "People's Computer Company," .it 2, 2 (November 1973). .sh BUGS It will never replace Space War. o yes Start keeping following text. .ti0 .li .LG no no Make letters larger. .ti0 .li .LP yes yes Start left-blocked paragraph. .ti0 .li .MH - no `Bell Laboratories, Murray Hill, New Jersey 07974'. .ti0 .li .ND troff no No date line at bottom of page. .ti0 .li .NH \fIn\fR - yes Same as .SH, with section number supplied automatically. Numbers are multilevel, like 1.2.3, where \fIn\fR tells what level is wanted (default is 1). .ti0 .li .NL yes no Make letters normal size. .ti0 .li .OK - yes `Other keywords' fo the write .it buffer, and is returned as the value of .it crread. After copying, the location of the write .it buffer and the corresponding .it nbytes are updated appropriately. If zero characters remain, the coroutine of the .it crwrite is moved to the head of the ready queue. If the write queue remains nonempty, the head member of the read queue is moved to the head of the ready queue. .s3 .it Crwrite queues the running coroutine on the .it connector's write queue, and records the fact that .it nbytes (z.if n .ds / / .if t .ds / \z/\h'\w'*'u' .th UNITS VI 8/30/74 .sh NAME units \*- conversion program .sh SYNOPSIS .it Units converts quantities expressed in various standard scales to their equivalents in other scales. It works interactively in this fashion: .s3 .it " You have:" inch .br .it " You want:" cm .br .it " * 2.54000e+00 .br .it " \*/ 3.93701e\-01 .s3 A quantity is specified as a multiplicative combination of units optionally preceded by a numeric multiplier. Powers are indicated by suffixed positr TM cover sheet follow. .ti0 .li .PP no yes Begin paragraph. First line indented. .ti0 .li .R yes no Roman text follows. .ti0 .li .RE - yes End relative indent level. .ti0 .li .RP no - Cover sheet and first page for released paper. Must precede other requests. .ti0 .li .RS - yes Start level of relative indentation. Following .IP's measured from current indentation. .ti0 .li .SG \fIx\fR no yes Insert signature(s) of author(s), ignored except in TM. \fIx\fR is the reference line (initials of author and typisero or more) characters in the string .it buffer are available to .it crreads. If the read queue is not empty, its head member is started running. .s3 .it Crexch exchanges the read queues of connectors .it conn1 and .it conn2 if \fIi\fR=0; and it exchanges the write queues if \fIi\fR=1. If a nonempty read queue that had been paired with an empty write queue becomes paired with a nonempty write queue, .it crexch moves the head member of that read queue to the head of the ready queue. .s3 .it Crprior sets a ive integers, division by the usual sign: .s3 .it " You have:" 15 pounds force/in2 .br .it " You want:" atm .br .it " * 1.02069e+00" .br .it " \*/ 9.79730e\-01" .s3 .it Units only does multiplicative scale changes. Thus it can convert Kelvin to Rankine, but not Centigrade to Fahrenheit. Most familiar units, abbreviations, and metric prefixes are recognized, together with a generous leavening of exotica and a few constants of nature including: .s3 .nf pi ratio of circumference to diameter c speed of ligt). .ti0 .li .SH - yes Section head follows, font automatically bold. .ti0 .li .SM no no Make letters smaller. .ti0 .li .TL no yes Title follows. .ti0 .li .TM \fIx y z\fR no - BTL TM cover sheet and first page, \fIx\fR=TM number, \fIy\fR=(quoted list of) case number(s), \fIz\fR=file number. Must precede other requests. .ti0 .li .WH - no `Bell Laboratories, Whippany, New Jersey 07981'. priority on the running coroutine to control the queuing of .it crreads and .it crwrites. When queued, the running coroutine will take its place before coroutines whose priorities exceed its own priority and after others. Priorities are compared as logical, .it i.e. unsigned, quantities. Initially each coroutine's priority is set as large as possible, so default queuing is .nh FIFO. .hy .s3 .bd "Storage allocation." The old and new coroutine share the same activation record in the function that invoked .itht e charge on an electron g acceleration of gravity force same as g mole Avogadro's number water pressure head per unit height of water au astronomical unit .s3 .fi `Pound' is a unit of mass. Compound names are run together, e.g. `lightyear'. British units that differ from their US counterparts are prefixed thus: `brgallon'. For a complete list of units, `cat /usr/lib/units'. .sh FILES /usr/lib/units .sh BUGS y|z crfork, so only one may return from the invoking function, and then only when the other has completed execution in that function. .s3 The activation record for each function execution is dynamically allocated rather than stacked; a factor of 3 in running time overhead can result if function calls are very frequent. The overhead may be overcome by providing a separate stack for each coroutine and dispensing with dynamic allocation. The base (lowest) address and size of the new coroutine's stack are supplied.th TTT VI 11/1/73 .sh NAME ttt \*- the game of tic-tac-toe .sh SYNOPSIS .bd /usr/games/ttt .sh DESCRIPTION .it Ttt is the X and O game popular in the first grade. This is a learning program that never makes the same mistake twice. .s3 Although it learns, it learns slowly. It must lose nearly 80 games to completely know the game. .sh FILES /usr/games/ttt.k learning file .sh BUGS .th CR VII 1/4/75 .sh NAME crfork, crexit, crread, crwrite, crexch, crprior \*- coroutine scheme .sh SYNOPSIS .nf .ft B int crfork( \fR[\fB stack, nwords \fR]\fB ) int stack[]; int nwords; .s3 crexit() .s3 int crread(connector, buffer, nbytes) int *connector[2]; char *buffer; int nbytes; .s3 crwrite(connector, buffer, nbytes) int *connector[2]; char *buffer; int nbytes; .s3 crexch(conn1, conn2, i) int *conn1[2], *conn2[2]; int i; .s3 #define logical char * crprior(p) logical p; .fi .ft R .sh DESCRIPTION The to .it crfork as optional arguments .it stack and .it nwords. Stacked allocation and dynamic allocation cannot be mixed in one run. For stacked operation, obtain the coroutine functions from .it /usr/lib/scr.a instead of .it /usr/lib/cr.a. .sh FILES /usr/lib/cr.a .br /usr/lib/scr.a .sh DIAGNOSTICS `rsave doesn't work' \*- an old C compilation has called `rsave'. It must be recompiled to work with the coroutine scheme. .sh BUGS Under /usr/lib/cr.a each function has just 12 words of anonymous stack for hard ...as.th TMG VI 10/21/72 .sh NAME tmg \*- compiler-compiler .sh SYNOPSIS .bd tmg name .sh DESCRIPTION .it Tmg produces a translator for the language whose parsing and translation rules are described in file \fIname\fB.t\fR. The new translator appears in a.out and may be used thus: .s3 .bd a.out input [ output ] .s3 Except in rare cases input must be a randomly addressable file. If no output file is specified, the standard output file is assumed. .sh FILES .nf \fIname\fB.s\fR: assembly language version of \fInamegether. .pg The output of the assembler is placed on the file \fIa.out\fR in the current directory. If there were no unresolved external ref%er%ences, and no errors detected, \fIa.out\fP is made executable; otherwise, if it is produced at all, it is made non-executable. .ul 2. Lexical conventions .et Assembler tokens include identifiers (alternatively, ``symbols'' or ``names''), temporary symbols, constants, and operators. .ms 2.1 Identifiers .pg An identifier consists of a sequence of alphanumeric charace, the data segment begins at the lowest 8K byte boundary after the text segment. .pg The bss segment may not contain any explicitly initialized code or data. The length of the bss segment (like that of text or data) is determined by the high-water mark of the location counter within it. The bss segment is actually an extension of the data segment and begins immediately after it. At the start of execution of a program, the bss segment is set to 0. Typically the bss segment is set up by state%ments exemplifi\fB.t\fR /usr/lib/tmg: the compiler-compiler /usr/lib/tmg[abc], /lib/libs.a: libraries alloc.d: scratch file for table storage .fi .sh "SEE ALSO" A Manual for the Tmg Compiler-writing Language, internal memorandum. .sh DIAGNOSTICS Syntactic errors result in "???" followed by the offending line. .br Situations such as space overflow with which the Tmg processor or a Tmg-produced processor can not cope result in a descriptive comment and a dump. .sh AUTHOR M. D. McIlroy .sh BUGS Footnote 1 of Section 9.2 of ters (including period ``\|\fB.\fR\|'', underscore ``\(ul'', and tilde ``~'' as alphanumeric) of which the first may not be numeric. Only the first eight characters are significant. When a name begins with a tilde, the tilde is discarded and that occurrence of the identifier generates a unique entry in the symbol table which can match no other occurrence of the identifier. This feature is used by the C compiler to place names of local variables in the output symbol table without having to worry about makined by .sp lab\fB: .\fR = \fB.\fR+10 .sp The advantage in using the bss segment for storage that starts off empty is that the initialization information need not be stored in the output file. See also \fILocation counter\fP and \fIAssignment state%ments\fP below. .ul 4. The location counter .et One special symbol, ``\|\fB.\fP\|'', is the location counter. Its value at any time is the offset within the appropriate segment of the start of the state%ment in which it appears. The location counter may be assignTmg Manual is not enforced, causing trouble. .br Restrictions (7.) against mixing bundling primitives should be lifted. .br Certain hidden reserved words exist: gpar, classtab, trans, goto, alt, salt. .br Octal digits include 8=10 and 9=11. g them unique. .ms 2.2 Temporary symbols .pg A temporary symbol consists of a digit followed by ``f\|'' or ``b''. Temporary symbols are discussed fully in \(sc5.1. .ms 2.3 Constants .pg An octal constant consists of a sequence of digits; ``8'' and ``9'' are taken to have octal value 10 and 11. The constant is truncated to 16 bits and interpreted in two's complement notation. .pg A decimal constant consists of a sequence of digits terminated by a decimal point ``\fB.\fR''. The magnitude of the constant shed to, with the restriction that the current segment may not change; furthermore, the value of ``\|\fB.\fP\|'' may not decrease. If the effect of the assignment is to increase the value of ``\|\fB.\fP\|'', the required number of null bytes are generated (but see \fISegments\fP above). .ul 5. Statements .et A source program is composed of a sequence of \fIstate%ments\fP. Statements are separated either by new-lines or by semicolons. There are five kinds of state%ments: null state%ments, expression state%menould be representable in 15 bits; i.e., be less than 32,768. .pg A single-character constant consists of a single quote ``\|\(fm\|'' followed by an \s8ASCII\s10 character not a new-line. Certain dual-character escape sequences are acceptable in place of the \s8ASCII\s10 character to represent new-line and other non-graphics (see \fIString state%ments\fP, \(sc5.5). The constant's value has the code for the given character in the least significant byte of the word and is null-padded on the left. .pg A double-ts, assignment state%ments, string state%ments, and keyword state%ments. .pg Any kind of state%ment may be preceded by one or more labels. .ms 5.1 Labels .pg There are two kinds of label: name labels and numeric labels. A name label consists of a name followed by a colon (\|:\|). The effect of a name label is to assign the current value and type of the location counter ``\|\fB.\fP\|'' to the name. An error is indicated in pass 1 if the name is already defined; an error is indicated in pass 2 if the ``\|\fB.pl 11i .hc % .ll 6.5i .ps 16 .vs 18p .sp 1.5i .ce UNIX Assembler Reference Manual .sp 1.5 .ft I .ps 12 .ce Dennis M. Ritchie .ce 2 .sp .5 Bell Laboratories Murray Hill, New Jersey .sp 2 .ps 10 .vs 11p .ft R .de pg .sp .5 .. .de et .ft .pg .. .de ms .ne 3 .sp .. .de ul .ne 4 .sp .ft B .. .de fo 'bp .. .de he 'tl '-''' 'sp 0.5i .ft I .if o .tl '''Assembler Manual - %' .if e .tl 'Assembler Manual - %''' .ft 'sp 0.4i .ns .. .wh -1i fo .wh 0 he .ul 0. Introduction .et This document describes the usage and inpucharacter constant consists of a double quote ``\|"\|'' followed by a pair of \s8ASCII\s10 characters not including new-line. Certain dual-character escape sequences are acceptable in place of either of the \s8ASCII\s10 characters to represent new-line and other non-graphics (see \fIString state%ments\fR, \(sc5.5). The constant's value has the code for the first given character in the least significant byte and that for the second character in the most significant byte. .ms 2.4 Operators .pg There are seve.\fP\|'' value assigned changes the definition of the label. .pg A numeric label consists of a digit \fI0\fR to \fI9\fR followed by a colon (\|:\|). Such a label serves to define temporary symbols of the form ``\fIn\fR\|b'' and ``\fIn\fR\|f\|'', where \fIn\fR is the digit of the label. As in the case of name labels, a numeric label assigns the current value and type of ``\|\fB.\fP\|'' to the temporary symbol. However, several numeric labels with the same digit may be used within the same assembly. Ref%er%ent syntax of the \s8UNIX PDP\s10-11 assembler \fIas\fP. The details of the \s8PDP\s10-11 are not described; consult the \s8DEC\s10 documents ``\s8PDP\s10-11/20 Handbook'' and ``\s8PDP\s10-11/45 Handbook.'' .pg The input syntax of the \s8UNIX\s10 assembler is generally similar to that of the \s8DEC\s10 assembler \s8PAL\s10-11\s8R\s10, although its internal workings and output format are unrelated. It may be useful to read the publication \s8DEC\s10-11-\s8ASDB\s10-\s8D\s10, which describes \s8PAL\s10-11\s8R\ral single- and double-character operators; see \(sc6. .ms 2.5 Blanks .pg Blank and tab characters may be interspersed freely between tokens, but may not be used within tokens (except character constants). A blank or tab is required to separate adjacent identifiers or constants not otherwise separated. .ms 2.6 Comments .pg The character ``\|/\|'' introduces a comment, which extends through the end of the line on which it appears. Comments are ignored by the assembler. .ul 3. Segments .et Assembled code aces of the form ``\fIn\fR\|f\|'' refer to the first numeric label ``\fIn\|\fR:'' \fIf\fR\|orward from the ref%er%ence; ``\fIn\fRb'' symbols refer to the first ``\fIn\fR\|:'' label \fIb\fRackward from the ref%er%ence. This sort of temporary label was introduced by Knuth [\fIThe Art of Computer Programming, Vol I: Fundamental Algorithms\|\fR]. Such labels tend to conserve both the symbol table space of the assembler and the inventive powers of the programmer. .ms 5.2 Null state%ments .pg A null state%ment iss10, although naturally one must use care in assuming that its rules apply to \fIas\fP. .pg \fIAs\fP is a rather ordinary two-pass assembler without macro capabilities. It produces an output file which contains relocation information and a complete symbol table; thus the output is acceptable to the \s8UNIX\s10 link-editor \fIld\fP, which may be used to combine the outputs of several assembler runs and to obtain object programs from libraries. The output format has been designed so that if a program containsnd data fall into three segments: the text segment, the data segment, and the bss segment. The text segment is the one in which the assembler begins, and it is the one into which instructions are typically placed. The \s8UNIX\s10 system will, if desired, enforce the purity of the text segment of programs by trapping write operations into it. Object programs produced by the assembler must be processed by the link-editor \fIld\fR (using its ``_n'' flag) if the text segment is to be write-protected. A single c an empty state%ment (which may, however, have labels). A null state%ment is ignored by the assembler. Common examples of null state%ments are empty lines or lines containing only a label. .ms 5.3 Expression state%ments .pg An expression state%ment consists of an arithmetic expression not beginning with a keyword. The assembler computes its (16-bit) value and places it in the output stream, together with the appropriate relocation bits. .ms 5.4 Assignment state%ments .pg An assignment state%ment consists  no unresolved ref%er%ences to external symbols, it is executable without further processing. .ul 1. Usage .et \fIas\fP is used as follows: .sp .ft B as \fR[\fB _ \fR] \fIfile\s6\d1\u\s10 .\|.\|. .sp .ft R If the optional ``_'' argument is given, all undefined symbols in the current assembly will be made undefined-external. See the \fB.globl\fR directive below. .pg The other arguments name files which are concatenated and assembled. Thus programs may be written in several pieces and assembled toopy of the text segment is shared among all processes executing such a program. .pg The data segment is available for placing data or instructions which will be modified during execution. Anything which may go in the text segment may be put into the data segment. In programs with write-protected, sharable text segments, data segment contains the initialized but variable parts of a program. If the text segment is not pure, the data segment begins immediately after the text segment; if the text segment is purof an identifier, an equals sign (\|=\|), and an expression. The value and type of the expression are assigned to the identifier. It is not required that the type or value be the same in pass 2 as in pass 1, nor is it an error to redefine any symbol by assignment. .pg Any external attribute of the expression is lost across an assignment. This means that it is not possible to declare a global symbol by assigning to it, and that it is impossible to define a symbol to be offset from a non-locally defined global symbol. .pg As mentioned, it is permissible to assign to the location counter ``\|\fB.\fP\|''. It is required, however, that the type of the expression assigned be of the same type as ``\|\fB.\fP\|'', and it is forbidden to decrease the value of ``\fB\|.\|\fR''. In practice, the most common assignment to ``\|\fB.\fP\|'' has the form ``.\|=\|.\|+\|\fIn\fR'' for some number \fIn;\fR this has the effect of generating \fIn\fR null bytes. .ms 5.5 String state%ments .pg A string state%ment generates a sequencected by any possible future applications of the link-editor to the output file. .pg .ti 3 text .br The value of a text symbol is measured with respect to the beginning of the text segment of the program. If the assembler output is link-edited, its text symbols may change in value since the program need not be the first in the link editor's output. Most text symbols are defined by appearing as labels. At the start of an assembly, the value of ``\|\fB.\fP\|'' is text 0. .pg .ti 3 data .br The value of a data  apply these operators to any but absolute symbols. .in 0 .ul 7. Pseudo-operations .et The keywords listed below introduce state%ments which generate data in unusual forms or influence the later operations of the assembler. The metanotation .pg [ stuff ] .\|.\|. .pg means that 0 or more instances of the given stuff may appear. Also, boldface tokens are literals, italic words are substitutable. .ms 7.1 \fB.byte \fIexpression \fR[ \fB, \fIexpression \fR] .\|.\|. .pg The \fIexpression\fRs in the comma-s of bytes containing \s8ASCII\s10 characters. A string state%ment consists of a left string quote ``<'' followed by a sequence of \s8ASCII\s10 characters not including newline, followed by a right string quote ``>''. Any of the \s8ASCII\s10 characters may be replaced by a two-character escape sequence to represent certain non-graphic characters, as follows: .sp .ta .5i 1.5i 2.0i .ne 9 .nf \\n \s8NL\s10 (012) \\t \s8HT\s10 (011) \\e \s8EOT\s10 (004) \\0 \s8NUL\s10 (000) \\r \s8CR\s10 (015) \\a \s8ACK\ssymbol is measured with respect to the origin of the data segment of a program. Like text symbols, the value of a data symbol may change during a subsequent link-editor run since previously loaded programs may have data segments. After the first \fB.data\fR state%ment, the value of ``\|\fB.\fP\|'' is data 0. .pg .ti 3 bss .br The value of a bss symbol is measured from the beginning of the bss segment of a program. Like text and data symbols, the value of a bss symbol may change during a subsequent link-editeparated list are truncated to 8 bits and assembled in successive bytes. The expressions must be absolute. This state%ment and the string state%ment above are the only ones which assemble data one byte at at time. .ms 7.2 \fB.even\fR .pg If the location counter ``\|\fB.\fP\|'' is odd, it is advanced by one so the next state%ment will be assembled at a word boundary. .ms 7.3 \fB.if \fIexpression\fR .pg The \fIexpression\fR must be absolute and defined in pass 1. If its value is nonzero, the \fB.if\fR is i10 (006) \\p \s8PFX\s10 (033) \\\\ \\ \\> > .sp .fi .in 0 The last two are included so that the escape character and the right string quote may be represented. The same escape sequences may also be used within single- and double-character constants (see \(sc2.3 above). .ms 5.6 Keyword state%ments .pg Keyword state%ments are numerically the most common type, since most machine instructions are of this sort. A keyword state%ment begins with one of the many predefined keywords of the assembler; the syntax or run, since previously loaded programs may have bss segments. After the first \fB.bss\fR state%ment, the value of ``\|\fB.\fP\|'' is bss 0. .pg .ti 3 external absolute, text, data, or bss .br symbols declared \fB.globl\fR but defined within an assembly as absolute, text, data, or bss symbols may be used exactly as if they were not declared \fB.globl\fR; however, their value and type are available to the link editor so that the program may be loaded with others that ref%er%ence these symbols. .pg .ti 3 reggnored; if zero, the state%ments between the \fB.if\fR and the matching \fB.endif\fR (below) are ignored. .li \fB.if\fR may be nested. The effect of \fB.if\fR cannot extend beyond the end of the input file in which it appears. (The state%ments are not totally ignored, in the following sense: \fB.if\fRs and \fB.endif\fRs are scanned for, and moreover all names are entered in the symbol table. Thus names occurring only inside an \fB.if\fR will show up as undefined if the symbol table is listed.) .ms 7.4 \fB.of the remainder depends on the keyword. All the keywords are listed below with the syntax they require. .ul 6. Expressions .et An expression is a sequence of symbols representing a value. Its constituents are identifiers, constants, temporary symbols, operators, and brackets. Each expression has a type. .pg All operators in expressions are fundamentally binary in nature; if an operand is missing on the left, a 0 of absolute type is assumed. Arithmetic is two's complement and has 16 bits of precision. All ister .br The symbols .ta 6 .pg .nf \fBr0\fR .\|.\|. \fBr5 fr0\fR .\|.\|. \fBfr5 sp pc .ft R .fi .pg are predefined as register symbols. Either they or symbols defined from them must be used to refer to the six general-purpose, six floating-point, and the 2 special-purpose machine registers. The behavior of the floating register names is identical to that of the corresponding general register names; the former are provided as a mnemonic aid. .pg .ti 3 other types .br Each keyword known to the assembleendif\fR .pg This state%ment marks the end of a conditionally-assembled section of code. See \fB.if\fR above. .ms 7.5 \fB.globl \fIname \fR[ \fB,\fI name \fR] .\|.\|. .pg This state%ment makes the \fInames\fR external. If they are otherwise defined (by assignment or appearance as a label) they act within the assembly exactly as if the \fB.globl\fR state%ment were not given; however, the link editor \fIld\fR may be used to combine this routine with other routines that refer these symbols. .pg Converseoperators have equal precedence, and expressions are evaluated strictly left to right except for the effect of brackets. .ms 6.1 Expression operators .pg The operators are: .sp .in 8 .ta 3 8 .ti 0 (blank) when there is no operator between operands, the effect is exactly the same as if a ``+'' had appeared. .pg .ti 0 + addition .pg .ti 0 _ subtraction .pg .ti 0 * multiplication .pg .ti 0 \\\(sl division (note that plain ``\|/\|'' starts a comment) .pg .ti 0 & bitwise \fBand\fR .pg .ti 0 \|\|\(bv bitwr has a type which is used to select the routine which processes the associated keyword state%ment. The behavior of such symbols when not used as keywords is the same as if they were absolute. .in 0 .ms 6.3 Type propagation in expressions .pg When operands are combined by expression operators, the result has a type which depends on the types of the operands and on the operator. The rules involved are complex to state but were intended to be sensible and predictable. For purposes of expression evaluation thly, if the given symbols are not defined within the current assembly, the link editor can combine the output of this assembly with that of others which define the symbols. .pg As discussed in \(sc1, it is possible to force the assembler to make all otherwise undefined symbols external. .ms .ne 5 7.6 \fB.text\fR .br 7.7 \fB.data\fR .br 7.8 \fB.bss\fR .br .pg These three pseudo-operations cause the assembler to begin assembling into the text, data, or bss segment respectively. Assembly starts in the text sise \fBor\fR .pg .ti 0 >> logical right shift .pg .ti 0 << logical left shift .pg .hc .ti 0 % modulo .pg .hc % .ti 0 ! \fIa\fR\|!\|\fIb\fR is \fIa \fBor \fR(\|\fBnot \fIb\fR\|); i.e., the \fBor\fR of the first operand and the one's complement of the second; most common use is as a unary. .pg .ti 0 ^ result has the value of first operand and the type of the second; most often used to define new machine instructions with syntax identical to existing instructions. .sp .in 0 Expressions may be grouped by ue important types are .pg .ta 1i .nf undefined absolute text data bss undefined external other .fi .pg The combination rules are then: If one of the operands is undefined, the result is undefined. If both operands are absolute, the result is absolute. If an absolute is combined with one of the ``other types'' mentioned above, or with a register expression, the result has the register or other type. As a consequence, one can refer to r3 as ``r0+3''. If two operands of ``other type'' are combined, the egment. It is forbidden to assemble any code or data into the bss segment, but symbols may be defined and ``\|\fB.\fP\|'' moved about by assignment. .ms 7.9 \fB.comm\fI name \fB, \fIexpression\fR .pg Provided the \fIname\fR is not defined elsewhere, this state%ment is equivalent to .pg .ti 6 .li .globl name .ti 6 name = expression ^ name .pg That is, the type of \fIname\fR is ``undefined external'', and its value is \fIexpression\fR. In fact the \fIname\fR behaves in the current assembly just like an use of square brackets ``\|[\|\|]\|''. (Round parentheses are reserved for address modes.) .ms 6.2 Types .pg The assembler deals with a number of types of expressions. Most types are attached to keywords and used to select the routine which treats that keyword. The types likely to be met explicitly are: .sp 1 .in 6 .ti 3 undefined .br Upon first encounter, each symbol is undefined. It may become undefined if it is assigned an undefined expression. It is an error to attempt to assemble an undefined expressresult has the numerically larger type (not that this fact is very useful, since the values are not made public). An ``other type'' combined with an explicitly discussed type other than absolute acts like an absolute. .pg Further rules applying to particular operators are: .sp .in 7 .ta 3 7 .ti 0 + If one operand is text-, data-, or bss-segment relocatable, or is an undefined external, the result has the postulated type and the other operand must be absolute. .pg .ti 0 _ If the first operand is a relocatandefined external. However, the link-editor \fIld\fR has been special-cased so that all external symbols which are not otherwise defined, and which have a non-zero value, are defined to lie in the bss segment, and enough space is left after the symbol to hold \fIexpression\fR bytes. All symbols which become defined in this way are located before all the explicitly defined bss-segment locations. .ul 8. Machine instructions .et Because of the rather complicated instruction and addressing structure of the \sion in pass 2; in pass 1, it is not (except that certain keywords require operands which are not undefined). .pg .ti 3 undefined external .br A symbol which is declared \fB.globl\fR but not defined in the current assembly is an undefined external. If such a symbol is declared, the link editor \fIld\fR must be used to load the assembler's output with another routine that defines the undefined ref%er%ence. .pg .ti 3 absolute .br An absolute symbol is one defined ultimately from a constant. Its value is unaffeble text-, data-, or bss-segment symbol, the second operand may be absolute (in which case the result has the type of the first operand); or the second operand may have the same type as the first (in which case the result is absolute). If the first operand is external undefined, the second must be absolute. All other combinations are illegal. .pg .ti 0 ^ This operator follows no other rule than that the result has the value of the first operand and the type of the second. .pg .ti 0 others It is illegal to8PDP\s10-11, the syntax of machine instruction state%ments is varied. Although the following sections give the syntax in detail, the 11/20 and 11/45 handbooks should be consulted on the semantics. .ms 8.1 Sources and Destinations .pg The syntax of general source and destination addresses is the same. Each must have one of the following forms, where \fIreg\fR is a register symbol, and \fIexpr\fR is any sort of expression: .sp .ne 17 .nf .ta .75i 1.825i 2.75i syntax words mode .ta .75i 2.75i+\w'0+reg'u .lc \(ru 8 \(ru9 .ft R .ta .75i 2.0i 2.75i \fIreg\fR 0 0+\fIreg\fB (\|\fIreg\fB\|)\|+ \fR0 2+\fIreg\fB _\|(\|\fIreg\fB\|) \fR0 4+\fIreg\fR \fIexpr\|\fB(\|\fIreg\fB\|) \fR1 6+\fIreg\fB (\|\fIreg\fB\|) \fR0 1+\fIreg\fB *\|\fIreg\fB \fR0 1+\fIreg\fB *\|(\|\fIreg\fB\|)\|+ \fR0 3+\fIreg\fB *\|_\|(\|\fIreg\fB\|) \fR0 5+\fIreg\fB *\|(\|\fIreg\fB\|) \fR1 7+\fIreg\fB *\|\fIexpr\fB\|(\|\fIreg\fB\|) \fR1 7+\fIreg\fB \fIexpr \fR1 67 \fB$\|\fIexpr \fR1 27 \fB*\|\fIexpr \fR1 77 \fB*\|$\|\fIexpr \fR1 37 .spft R .fi \fBsys\fR is another name for the \fBtrap\fR instruction. It is used to code system calls. Its operand is required to be expressible in 6 bits. The alternative forms for \fBash\fR, \fBashc\fR, \fBmul\fR, and \fBdiv\fR are provided to avoid conflict with \s8EAE\s10 register names should they be needed. .pg The expression in \fBmark\fR must be expressible in six bits, and the expression in \fBsob\fR must be in the same segment as ``\fB\|.\|\fR'', must not be external-undefined, must be less than ``\|8 F\s10 error in local (``f\|'' or ``b'') type symbol \s8 G\s10 garbage (unknown) character \s8 I\s10 end of file inside an \fB.if\fR \s8 M\s10 multiply defined symbol as label \s8 O\s10 word quantity assembled at odd address \s8 P\s10 phase error_ ``\|\fB.\fP\|'' different in pass 1 and 2 \s8 R\s10 relocation error \s8 U\s10 undefined symbol \s8 X\s10 syntax error .fi  .fi The \fIwords\fR column gives the number of address words generated; the \fImode\fR column gives the octal address-mode number. The syntax of the address forms is identical to that in \s8DEC\s10 assemblers, except that ``*'' has been substituted for ``@'' and ``$'' for ``#''; the \s8UNIX\s10 typing conventions make ``@'' and ``#'' rather inconvenient. .br .pg Notice that mode ``*reg'' is identical to ``(reg)''; that ``*(reg)'' generates an index word (namely, 0); and that addresses consisting of an unad\fB.\fR\|'', and must be within 510 bytes of ``\|\fB.\fR\|''. .ms 8.9 Floating-point unit instructions .pg The following floating-point operations are defined, with syntax as indicated: .pg .nf \fB cfcc \fB setf \fB setd \fB seti \fB setl \fB clrf \fIfdst \fB negf \fIfdst \fB absf \fIfdst \fB tstf \fIfsrc \fB movf \fIfsrc,\|freg \fR(= ldf\fR\|) \fB movf \fIfreg,\|fdst \fR(= stf\fR\|) \fB movif \fIsrc,\|freg \fR(= ldcif\fR\|) \fB movfi \fIfreg,\|dst \fR(= stcfi\fR\|) \fB movof \fIfsrc,\|freg \fR(= ldcdf\fR\orned expression are assembled as pc-relative ref%er%ences independent of the type of the expression. To force a non-relative ref%er%ence, the form ``*$expr'' can be used, but notice that further indirection is impossible. .ms 8.3 Simple machine instructions .pg The following instructions are defined as absolute symbols: .pg .ta 1i 2.5i 3i .ne 8 .nf .ft B clc clv clz cln sec sev sez sen .pg .fi .ft R They therefore require no special syntax. The \s8PDP\s10-11 hardware allows more than one of the `|) \fB movfo \fIfreg,\|fdst \fR(= stcfd\fR\|) \fB movie \fIsrc,\|freg \fR(= ldexp\fR) \fB movei \fIfreg,\|dst \fR(= stexp\fR) \fB addf \fIfsrc,\|freg \fB subf \fIfsrc,\|freg \fB mulf \fIfsrc,\|freg \fB divf \fIfsrc,\|freg \fB cmpf \fIfsrc,\|freg \fB modf \fIfsrc,\|freg \fB ldfps \fIsrc \fB stfps \fIdst \fB stst \fIdst .fi .ft R .pg \fIfsrc\fR, \fIfdst\fR, and \fIfreg\fR mean floating-point source, destination, and register respectively. Their syntax is identical to that for their non-floating counterparts, .th TBL VI 2/2/75 .sh NAME tbl \*- format tables for nroff or troff .sh SYNOPSIS .bd tbl [ files ] ... .sh DESCRIPTION .it Tbl is an nroff (I) or troff(I) preprocessor for formatting tables. The input files are copied to the standard output, except for lines between .TS and .TE command lines, which are assumed to describe tables and reformatted. The first line after .TS specifies the various columns: it consists of a list of column describers separated by blanks or tabs. Each column describer is a character`clear'' class, or alternatively more than one of the ``set'' class to be \fBor\fR-ed together; this may be expressed as follows: .pg clc\|\|\|\(bv\|\|clv .ms 8.4 Branch .pg The following instructions take an expression as operand. The expression must lie in the same segment as the ref%er%ence, cannot be undefined-external, and its value cannot differ from the current location of ``\|\fB.\fP\|'' by more than 254 bytes: .pg .ne 10 .nf .ft B br blos bne bvc beq bvs bge bhis blt bec \fR(=\fB bcc\fR)\fB but note that only floating registers 0_3 can be a \fIfreg\fR. .pg The names of several of the operations have been changed to bring out an analogy with certain fixed-point instructions. The only strange case is \fBmovf\fR, which turns into either \fBstf\fR or \fBldf\fR depending respectively on whether its first operand is or is not a register. Warning: \fBldf\fR sets the floating condition codes, \fBstf\fR does not. .ul 9. Other symbols .et .ti 0 9.1 \fB.\|.\fR .pg The symbol ``\fB\|.\|.\|\fR'' is the  string made up of the letters `n', `r', `c', `l' and `s', which mean: .lp +4 4 .sp c center within the column .lp +4 4 .if n .sp 1 .if t .sp .3 r right-adjust .lp +4 4 .if n .sp 1 .if t .sp .3 l left-adjust .lp +4 4 .if n .sp 1 .if t .sp .3 n numerical adjustment: the units digits of numbers are aligned. .lp +4 4 .if n .sp 1 .if t .sp .3 s span the previous entry over this column. .if n .sp 1 .if t .sp .3 .i0 .s3 The column describer may be followed by an integer giving the number of spaces between this c bgt bcc ble blo bpl bcs bmi bes \fR(=\fB bcs\fR)\fB bhi .pg .fi .ft R \fBbes\fR (``branch on error set'') and \fBbec\fR (``branch on error clear'') are intended to test the error bit returned by system calls (which is the c-bit). .ms 8.5 Extended branch instructions .pg The following symbols are followed by an expression representing an address in the same segment as ``\|\fB.\|\fP''. If the target address is close enough, a branch-type instruction is generated; if the address is too far away, a \fBjm\fIrelocation counter\fR. Just before each assembled word is placed in the output stream, the current value of this symbol is added to the word if the word refers to a text, data or bss segment location. If the output word is a pc-relative address word which refers to an absolute location, the value of ``\fB\|.\|.\|\fR'' is subtracted. .pg Thus the value of ``\fB\|.\|.\|\fR'' can be taken to mean the starting core location of the program. In \s8UNIX\s10 systems with relocation hardware, the initial value ofolumn and the next; 3 is default. The describer `ccr5' indicates that the first two lines in this column are centered; the third and remaining lines are right-adjusted; and the column should be separated from the column to the right by 5 spaces. Letting \\t represent a tab (which must be typed as a genuine tab) the input .s3 .nf .TS cccl sccn sscn Household Population Town\\tHouseholds \\tNumber\\tSize Bedminster\\t789\\t3.26 Bernards Twp.\\t3087\\t3.74 Bernardsville\\t2018\\t3.30 Bound Brook\\t342p\fR will be used. .pg .ne 10 .nf .ft B jbr jlos jne jvc jeq jvs jge jhis jlt jec jgt jcc jle jlo jpl jcs jmi jes jhi .pg .fi .ft R \fBjbr\fR turns into a plain \fBjmp\fR if its target is too remote; the others (whose names are contructed by replacing the ``b'' in the branch instruction's name by ``j''\|) turn into the converse branch over a \fBjmp\fR to the target address. .ms 8.6 Single operand instructions .pg The following symbols are names of single-operand machine instructions. The form of  ``\|\fB.\|.\fR\|'' is 0. .pg The value of ``\|\fB.\|.\fR\|'' may be changed by assignment. Such a course of action is sometimes necessary, but the consequences should be carefully thought out. It is particularly ticklish to change ``\|\fB.\|.\fR\|'' midway in an assembly or to do so in a program which will be treated by the loader, which has its own notions of ``\|\fB.\|.\fR\|''. .ms 9.2 System calls .pg The following absolute symbols may be used to code calls to the \s8UNIX\s10 system (see the \fBsys\fR 5\\t3.04 Branchburg\\t1644\\t3.49 Bridgewater\\t7897\\t3.81 Far Hills\\t240\\t3.19 .TE .fi yields .nf .TS .nr 49 0 .nr 50 0 .nr 47 \n(49+\w'Town'+1n .if \n(47-\n(50 .nr 50 \n(47 .nr 47 \n(49+\w''+1n .if \n(47-\n(50 .nr 50 \n(47 .nr 47 \n(49+\w'Bedminster'+1n .if \n(47-\n(50 .nr 50 \n(47 .nr 47 \n(49+\w'Bernards Twp.'+1n .if \n(47-\n(50 .nr 50 \n(47 .nr 47 \n(49+\w'Bernardsville'+1n .if \n(47-\n(50 .nr 50 \n(47 .nr 47 \n(49+\w'Bound Brook'+1n .if \n(47-\n(50 .nr 50 \n(47 .nr 47 \n(49+\w'Branchburg'+1n .iaddress expected is discussed in \(sc8.1 above. .pg .ft B .nf clr sbcb clrb ror com rorb comb rol inc rolb incb asr dec asrb decb asl neg aslb negb jmp adc swab adcb tst sbc tstb .br .ft R .fi .ms 8.7 Double operand instructions .pg The following instructions take a general source and destination (\(sc8.1), separated by a comma, as operands. .pg .ne 12 .ft B .nf mov movb cmp cmpb bit bitb bic bicb bis bisb add sub .fi .ft R .ms 8.8 Miscellaneous instructions .pg The following instinstruction above). .pg .ft B .nf .ta 1i 2.5i break nice chdir open chmod read chown seek close setuid creat signal exec stat exit stime fork stty fstat tell getuid time gtty umount link unlink makdir wait mdate write mount .fi .ft R .pg Warning: the \fBwait\fR system call is not the same as the \fBwait\fR instruction, which is not defined in the assembler. .ul 10. Diagnostics .et When an input file cannot be read, its name followed by a question mark is typed and assembly ceases. When syntf \n(47-\n(50 .nr 50 \n(47 .nr 47 \n(49+\w'Bridgewater'+1n .if \n(47-\n(50 .nr 50 \n(47 .nr 47 \n(49+\w'Far Hills'+1n .if \n(47-\n(50 .nr 50 \n(47 .nr 30 \n(49+\w'Household Population'+1n .nr 51 0 .nr 47 \n(50+\w'789'+4n .if \n(47-\n(51 .nr 51 \n(47 .nr 47 \n(50+\w'3087'+4n .if \n(47-\n(51 .nr 51 \n(47 .nr 47 \n(50+\w'2018'+4n .if \n(47-\n(51 .nr 51 \n(47 .nr 47 \n(50+\w'3425'+4n .if \n(47-\n(51 .nr 51 \n(47 .nr 47 \n(50+\w'1644'+4n .if \n(47-\n(51 .nr 51 \n(47 .nr 47 \n(50+\w'7897'+4n .if \n(47-\n(51 .nr 5ructions have more specialized syntax. Here \fIreg\fR is a register name, \fIsrc\fR and \fIdst\fR a general source or destination (\(sc8.1), and \fIexpr\fR is an expression: .pg .nf .ta 1.0i 1.5i 3i \fB jsr\fI reg,dst \fB rts\fI reg \fB sys\fI expr .ft B ash \fIsrc\|,\|reg \fR(or, \fBals\fR)\fB ashc \fIsrc\|,\|reg \fR(or, \fBalsc\fR)\fB mul \fIsrc\|,\|reg \fR(or, \fBmpy\fR)\fB div \fIsrc\|,\|reg \fR(or, \fBdvd\fR)\fR \fB xor \fIreg\|,\|dst\fB sxt \fIdst\fB mark \fIexpr\fB sob \fIreg\|,\|expr\fB .pg .actic or semantic errors occur, a single-character diagnostic is typed out together with the line number and the file name in which it occurred. Errors in pass 1 cause cancellation of pass 2. The possible errors are: .sp .nf .ta .5i .8i ) parentheses error ] parentheses error > string not terminated properly * indirection (\|*\|) used illegally \fB.\fR illegal assignment to ``\|\fB.\fP\|'' \s8 A\s10 error in address \s8 B\s10 branch address is odd or too remote \s8 E\s10 error in expression \s1 \n(47 .nr 47 \n(50+\w'240'+4n .if \n(47-\n(51 .nr 51 \n(47 .nr 31 \n(50+\w'Households'+4n .nr 52 0 .nr 48 \n(50+\w'Households'+0n .if \n(48-\n(52 .nr 52 \n(48 .nr 48 \n(50+\w'Number'+0n .if \n(48-\n(52 .nr 52 \n(48 .nr 47 \n(51+\w''+1n .if \n(47-\n(52 .nr 52 \n(47 .nr 47 \n(51+\w''+1n .if \n(47-\n(52 .nr 52 \n(47 .nr 47 \n(51+\w''+1n .if \n(47-\n(52 .nr 52 \n(47 .nr 47 \n(51+\w''+1n .if \n(47-\n(52 .nr 52 \n(47 .nr 47 \n(51+\w''+1n .if \n(47-\n(52 .nr 52 \n(47 .nr 47 \n(51+\w''+1n .if \n(47-\n(52 .nr 52 \n(47 .nr 47 \n(51+\w''+1n .if \n(47-\n(52 .nr 52 \n(47 .nr 47 \n(51+\w''+1n .if \n(47-\n(52 .nr 52 \n(47 .nr 53 0 .nr 47 \n(52+\w'3'+4n .if \n(47-\n(53 .nr 53 \n(47 .nr 47 \n(52+\w'3'+4n .if \n(47-\n(53 .nr 53 \n(47 .nr 47 \n(52+\w'3'+4n .if \n(47-\n(53 .nr 53 \n(47 .nr 47 \n(52+\w'3'+4n .if \n(47-\n(53 .nr 53 \n(47 .nr 47 \n(52+\w'3'+4n .if \n(47-\n(53 .nr 53 \n(47 .nr 47 \n(52+\w'3'+4n .if \n(47-\n(53 .nr 53 \n(47 .nr 47 \n(52+\w'3'+4n .if \n(47-\n(53 .nr 53 \n(47 .nr 54 0 .nr 48 \n(52+\w'Size'+0n .if \n( \n(12+\n(13+\w'\s8\|' .as 11 "\*(12 .nr 11 \w'\*(11' .ds 12 "\|\| .nr 12 \w'\*(12' .as 11 "\*(12 .nr 11 \w'\*(11' .ds 12 "\|=\| .nr 12 \w'\*(12' .as 11 "\*(12 .nr 11 \w'\*(11' .ds 12 "\|\| .nr 12 \w'\*(12' .as 11 "\*(12 .nr 11 \w'\*(11' .ds 12 "ky\(fm\(fm .nr 12 \w'\*(12' .as 11 "\*(12 .nr 11 \w'\*(11' .ds 12 "\*' .nr 12 \w'\*(12' 'ps 8 .ds 13 "n\|\(mi\|\fR1\fP .nr 13 \w'\*(13' .as 12 \v'18u'\s8\*(13\|\s10\v'-18u' 'ps 10 .nr 12 \n(12+\n(13+\w'\s8\|' .as 11 "\*(12 .nr 11 \w'\*(11' .ds 11 \x'0'\fI\*(11\s\n(9m. The vocabulary option substitutes a different file for .it /usr/lib/speak.m. Other vocabularies, to be used with option \fB\*-e\fR, exist in /usr/vs/latin.m and /usr/vs/polish.m. .s3 A set of single letter options may appear in any order preceded by .bd \*-. Their meanings are: .s3 .lp +8 4 \fBe\fR suppress English preprocessing .lp +8 4 \fBf\fR equivalent to `f1, f2,...' .lp +8 4 \fBp\fR suppress pronunciation by rule .lp +8 4 \fBs\fR suppress spelling .lp +8 4 \fBv\fR suppress voice output .s3 .i0 The 48-\n(54 .nr 54 \n(48 .nr 47 \n(53+\w''+1n .if \n(47-\n(54 .nr 54 \n(47 .nr 47 \n(53+\w'.26'+1n .if \n(47-\n(54 .nr 54 \n(47 .nr 47 \n(53+\w'.74'+1n .if \n(47-\n(54 .nr 54 \n(47 .nr 47 \n(53+\w'.30'+1n .if \n(47-\n(54 .nr 54 \n(47 .nr 47 \n(53+\w'.04'+1n .if \n(47-\n(54 .nr 54 \n(47 .nr 47 \n(53+\w'.49'+1n .if \n(47-\n(54 .nr 54 \n(47 .nr 47 \n(53+\w'.81'+1n .if \n(47-\n(54 .nr 54 \n(47 .nr 47 \n(53+\w'.19'+1n .if \n(47-\n(54 .nr 54 \n(47 .if \n(30-\n(54 .nr 54 \n(30 .if \n(31-\n(54 .nr 54 \n(31 .fc  @ .ta9\f\n(98 .ne 78u \*(11 'ps \n(99 .ft \n(98 .EN .. .if t .ig .ce (2nd deriv. at end) = k*(2nd deriv. next to end) .. .s3 .br is set by the next argument. By default \fIk\fR = 0. .s3 .lp +5 5 \fBn\fR Space output points so that approximately .it n points occur between the lower and upper .it x limits. (Default .it n = 100.) .s3 .lp +5 5 \fBp\fR Make output periodic, i.e. match derivatives at ends. First and last input values should normally agree. .s3 .lp +5 5 \fBx\fR Next 1 (or 2) arguments are lower (and ufollowing input will reconstitute a coded vocabulary, `speak.m', from an ascii listing, `speak.v', that was created using \fB!l\fR. .s3 .lp +8 0 (cat speak.v; echo !w speak.m) \*v speak \*-v /dev/null .s3 .i0 .sh FILES /usr/lib/speak.m .sh "SEE ALSO" M. D. McIlroy, ``Synthetic English Speech by Rule,'' Computing Science Technical Report #14, Bell Laboratories, 1973 .br vs (V), vs (IV) .sh BUGS Excessively long words cause dumps. .br Space is not reclaimed from changed entries; use \fB!w\fR and \fB!r\fR to e \n(54u @Household Population@ .ta \n(50u \n(54u @Town@ @Households@ .ta \n(50u \n(52u \n(54u @@ @Number@ @Size@ .ta \n(50u \n(51u \n(52u \n(53u \n(54u Bedminster@ @789@ @3.26@ Bernards Twp.@ @3087@ @3.74@ Bernardsville@ @2018@ @3.30@ Bound Brook@ @3425@ @3.04@ Branchburg@ @1644@ @3.49@ Bridgewater@ @7897@ @3.81@ Far Hills@ @240@ @3.19@ .fc .TE .fi .s3 .s3 If pper) .it x limits. Normally these limits are calculated from the data. Automatic abcissas start at lower limit (default 0). .i0 .sh "SEE ALSO" plot (I) .sh AUTHOR M. D. McIlroy .sh BUGS A limit of 1000 input points is enforced silently. ffect reclamation. .br \fB!p\fR doesn't always work as advertised. no arguments are given, .it tbl reads the standard input, so it may be used as a filter. When it is used with .it eqn or .it neqn the .it tbl command should be first, to minimize the volume of data passed through pipes. .sh BUGS No column describer may end with `s'. .th SPEAK VI 4/26/75 .if t .ds A \o"a\(ga" .if n .ds A a` .if t .ds v \|\(bv .sh NAME speak \*- word to voice translator .sh SYNOPSIS .bd speak [ .bd \*-efpsv ] [ vocabulary [ output ] ] .sh DESCRIPTION .it Speak turns a stream of words into utterances and outputs them to a voice synthesizer, or to the specified .it output. It has facilities for maintaining a vocabulary. It receives, from the standard input .s3 .lp +5 3 \*- working lines: text of words separated by blanks .lp +5 3 \*- phonetic lines: str.th SNO VI 2/9/73 .sh NAME sno \*- Snobol interpreter .sh SYNOPSIS .bd sno [ file ] .sh DESCRIPTION .it Sno is a Snobol III (with slight differences) compiler and interpreter. .it Sno obtains input from the concatenation of .it file and the standard input. All input through a statement containing the label `end' is considered program and is compiled. The rest is available to `syspit'. .s3 .it Sno differs from Snobol III in the following ways. .s3 There are no unanchored searches. To get the same effect: .s3.th SPLINE VI 5/15/74 .sh NAME spline \*- interpolate smooth curve .sh SYNOPSIS .bd spline [ option ] ... .sh DESCRIPTION .it Spline takes pairs of numbers from the standard input as abcissas and ordinates of a function. It produces a similar set, which is approximately equally spaced and includes the input set, on the standard output. The cubic spline output (R. W. Hamming, .ft I Numerical Methods for Scientists and Engineers, .ft R 2nd ed., 349ff) has two continuous derivatives, and sufficiently many poinings of phonemes for one word preceded and separated by commas. The phonemes may be followed by comma-percent then a `replacement part' \*- an ASCII string with no spaces. The phonetic code is given in .it vs (V). .lp +5 3 \*- empty lines .lp +5 3 \*- command lines: beginning with .bd !. The following command lines are recognized: .s3 .lp +15 10 \fB!r\fR file replace coded vocabulary from file .lp +15 10 \fB!w\fR file write coded vocabulary on file .lp +15 10 \fB!p\fR print phonetics for working word .lp + a ** b unanchored search for b .br a *x* b = x c unanchored assignment .s3 There is no back referencing. .s3 x = "abc" .br a *x* x is an unanchored search for `abc' .s3 .i0 Function declaration is different. The function declaration is done at compile time by the use of the label `define'. Thus there is no ability to define functions at run time and the use of the name `define' is preempted. There is also no provision for automatic variables other than the parameters. For example: .s3 .lp +8 8 .bd "dts to look smooth when plotted, for example by .it plot (I). .s3 The following options are recognized, each as a separate argument. .s3 .lp +5 5 \fBa\fR Supply abscissas automatically (they are missing from the input); spacing is given by the next argument, or is assumed to be 1 if next argument is not a number. .s3 .lp +5 5 \fBk\fR The constant \fIk\fR used in the boundary value computation .s3 .if n .ig .ti +1.5i .ds ' \h'-\w'\(fm\(fm'u' .EQ .nr 99 \n(.s .nr 98 \n(.f 'ps 10 .ft I .ds 11 "y\(fm\(fm .nr 11 15 10 \fB!l\fR list vocabulary on standard output with phonetics .lp +15 10 \fB!c\fR word copy phonetics from working word to specified word .lp +15 10 \fB!d\fR print decomposition of working word into substrings .lp +15 10 \fB!f\fI n\fR turn off (or on) English preprocessing rule number .it n (see listing for meaning of .it n) .s3 .i0 Each working line replaces its predecessor. Its first word is the `working word'. Each phonetic line replaces the phonetics stored for the working word. In particular, a phonefine f( )" .s3 .i0 or .s3 .lp +8 8 .bd "define f(a,b,c)" .s3 .i0 All labels except `define' (even `end') must have a non-empty statement. .s3 If `start' is a label in the program, program execution will start there. If not, execution begins with the first executable statement. `define' is not an executable statement. .s3 There are no builtin functions. .s3 Parentheses for arithmetic are not needed. Normal precedence applies. Because of this, the arithmetic operators `/' and `*' must be set off by space. .s\w'\*(11' .ds 12 "\*' .nr 12 \w'\*(12' 'ps 8 .ds 13 "\fR0\fP .nr 13 \w'\*(13' .as 12 \v'18u'\s8\*(13\|\s10\v'-18u' 'ps 10 .nr 12 \n(12+\n(13+\w'\s8\|' .as 11 "\*(12 .nr 11 \w'\*(11' .ds 12 "\|\| .nr 12 \w'\*(12' .as 11 "\*(12 .nr 11 \w'\*(11' .ds 12 "\|=\| .nr 12 \w'\*(12' .as 11 "\*(12 .nr 11 \w'\*(11' .ds 12 "\|\| .nr 12 \w'\*(12' .as 11 "\*(12 .nr 11 \w'\*(11' .ds 12 "ky\(fm\(fm .nr 12 \w'\*(12' .as 11 "\*(12 .nr 11 \w'\*(11' .ds 12 "\*' .nr 12 \w'\*(12' 'ps 8 .ds 13 "\fR1\fP .nr 13 \w'\*(13' .as 12 \v'1etic line of comma only deletes the entry for the working word. Each working line, phonetic line or empty line causes the working line to be uttered. The process terminates at the end of input. .s3 Unknown words are pronounced by rules, and failing that, are spelled. For the builtin part of the rules, see the reference. Spelling is done by taking each character of the word, prefixing it with `*', and looking it up. Unspellable words burp. .s3 Words not found verbatim in the vocabulary are pronounced piecewi3 The right side of assignments must be non-empty. .s3 Either \*a or " may be used for literal quotes. .s3 The pseudo-variable `sysppt' is not available. .sh "SEE ALSO" Snobol III manual. (JACM; Vol. 11 No. 1; Jan 1964; pp 21) .sh BUGS 8u'\s8\*(13\|\s10\v'-18u' 'ps 10 .nr 12 \n(12+\n(13+\w'\s8\|' .as 11 "\*(12 .nr 11 \w'\*(11' .ds 12 ", .nr 12 \w'\*(12' .as 11 "\*(12 .nr 11 \w'\*(11' .ds 12 "\|\| .nr 12 \w'\*(12' .as 11 "\*(12 .nr 11 \w'\*(11' .ds 12 "\|\| .nr 12 \w'\*(12' .as 11 "\*(12 .nr 11 \w'\*(11' .ds 12 "\|\| .nr 12 \w'\*(12' .as 11 "\*(12 .nr 11 \w'\*(11' .ds 12 "y\(fm\(fm .nr 12 \w'\*(12' .as 11 "\*(12 .nr 11 \w'\*(11' .ds 12 "\*' .nr 12 \w'\*(12' 'ps 8 .ds 13 "n .nr 13 \w'\*(13' .as 12 \v'18u'\s8\*(13\|\s10\v'-18u' 'ps 10 .nr 12se. First the word is bracketed by sharps: `#...#'. The vocabulary is then searched for the longest fragment that matches the beginning of the word. The phonetic part of the phonetic string is uttered, and the matched fragment is replaced by the replacement part of the phonetic string, if any. The process is repeated until the word is exhausted. A fragment is entered into the vocabulary as a working word prefixed by `%'. .s3 .it Speak is initialized with a coded vocabulary stored in file .it /usr/lib/speak..th SKY VI 9/22/73 .sh NAME sky \*- obtain ephemerides .sh SYNOPSIS .bd sky [ .bd \-l ] .sh DESCRIPTION .it Sky predicts the apparent locations of the Sun, the Moon, the planets out to Saturn, stars of magnitude at least 2.5, and certain other celestial objects. .it Sky reads the standard input to obtain a GMT time typed on one line with blanks separating year, month number, day, hour, and minute; if the year is missing the current year is used. If a blank line is typed the current time is used. The program prints the azimuth, elevation, and magnitude of objects which are above the horizon at the ephemeris location of Murray Hill at the indicated time. The `\-l' flag causes it to ask for another location. .s3 Placing a ``1'' input after the minute entry causes the program to print out the Greenwich Sidereal Time at the indicated moment and to print for each body its topographic right ascension and declination as well as its azimuth and elevation. Also, instead of the magnitude, the semidiameter of the body, if files by name; and some elementary formatting and translating routines. The remainder of this memorandum lists the portable and non-portable library routines and explains some of the programming aids available. .PP The I/O routines in the C library fall into several classes. Files are addressed through intermediate numbers called .I file-descriptors .R which are described in section 2. Several default file-descriptors are provided by the system; other aspects of the system environment are explained in se characters per word. On \*sUNIX\*S \*sASCII\*S character code is used. Characters range from \(mi128 to +127 in numeric value, there is sign extension when characters are assigned to integers, and right shifts are arithmetic. The ``first'' character in a word is stored in the right half word. .PP More serious problems of compatibility are caused by the loaders on the different operating systems. .PP \*sUNIX\*S permits external names to be in upper and lower case, up to seven characters long. There may be n seconds of arc, is reported. .s3 A ``2'' after the minute entry makes the coordinate system geocentric. .s3 The effects of atmospheric extinction on magnitudes are not included; the brightest magnitudes of variable stars are marked with ``*''. .s3 For all bodies, the program takes into account precession and nutation of the equinox, annual (but not diurnal) aberration, diurnal parallax, and the proper motion of stars. In no case is refraction included. .s3 The program takes into account perturbations of tction 3. .PP Basic character-stream input and output involves the reading or writing of files considered as streams of characters. The C library includes facilities for this, discussed in section 4. Higher-level character stream operations permit translation of internal binary representations of numbers to and from character representations, and formatting or unpacking of character data. These operations are performed with the subprograms in section 5. Binary input and output routines permit data transmissimultiple external definitions (uninitialized) of the same name. .PP The C alphabet for identifier names includes the upper and lower case letters, the digits, and the underline. It is not possible for C programs to communicate with \*sFORTRAN\*S programs. .SH 4. BASIC CHARACTER STREAM ROUTINES .PP These routines transfer streams of characters in and out of C programs. Interpretation of the characters is left to the user. Facilities for interpreting numerical strings are presented in section 5; and routineshe Earth due to the Moon, Venus, Mars, and Jupiter. The expected accuracies are: for the Sun and other stellar bodies a few tenths of seconds of arc; for the Moon (on which particular care is lavished) likewise a few tenths of seconds. For the Sun, Moon and stars the accuracy is sufficient to predict the circumstances of eclipses and occultations to within a few seconds of time. The planets may be off by several minutes of arc. .s3 There are lots of special options not described here, which do things like son without the cost of translation to or from readable \*sASCII\*S character representations. Such data transmission should only be directed to files or tapes, and not to printers or terminals. As is usual with such routines, the only simple guarantee that can be made to the programmer seeking portability is that data written by a particular sequence of binary writes, if read by the exactly matching sequence of binary reads, will restore the previous contents of memory. Other reads or writes have system-de to transfer binary data to and from files or devices are discussed in section 6. In the following routine descriptions, the optional argument .ft I fd .ft P represents a file-descriptor; if not present, it is taken to be 0 for input and 1 for output. When your program starts, remember that these are associated with the ``standard'' input and output files. .sn COPEN (filename, type) .sN \fICopen\fR initiates activity on a file; if necessary it will create the file too. Up to 10 files may be open at one timubstituting named star catalogs, smoothing nutation and aberration to aid generation of mean places of stars, and making conventional adjustments to the Moon to improve eclipse predictions. .s3 For the most accurate use of the program it is necessary to know that it actually runs in Ephemeris time. .sh FILES /usr/lib/startab, /usr/lib/moontab .sh "SEE ALSO" azel (VI) .br .ft I American Ephemeris and Nautical Almanac, .ft R for the appropriate years; also, the .ft I Explanatory Supplement to the American Ephpendent effects. See section 6 for a discussion of binary input and output. Section 7 describes some further routines in the portable library. These include a storage allocator and some other control and conversion functions. .SH 2. FILE DESCRIPTORS .PP Except for the standard input and output files, all files must be explicitly opened before any I/O is performed on them. When files are opened for writing, they are created if not already present. They must be closed when finished, although the normal .I cexe. When called as described here, .ft I copen .ft R returns a filedescriptor for a character stream file. Values less than zero returned by .I copen .R indicate an error trying to open the file. Other calls to .ft I copen .ft R are described in sections 6 and 7. .sp 3p Arguments : .sp 3p .ft I Filename: .ft P a string representing a file name, according to the local operating system conventions. All accept a string of letters and digits as a legal file name, although leading digits are not recommended on \*emeris and Nautical Almanac. .ft R .sh AUTHOR R. Morris .sh BUGS it .R routine will take care of that. When opened a disc file or device is associated with a file descriptor, an integer between 0 and 9. This file descriptor is used for further I/O to the file. .PP Initially you are given three file descriptors by the system: 0, 1, and 2. File 0 is the standard input; it is normally the teletype in time-sharing or input data cards in batch. File 1 is the standard output; it is normally the teletype in time-sharing or the line printer in batch. File 2 is the error file; itsGCOS\*S. .br .ft I Type: .ft R a character `r', `w', or `a' meaning read, write, or append. Note that the type is a single character, whereas the file name must be a string. .sn CGETC ( fd ) .sN .ft I Cgetc .ft R returns the next character from the input unit associated with \fIfd\fR. On end of file \fIcgetc\fR returns `\\0'. To signal end of file from the teletype, type the special symbol appropriate to \*sUNIX\*S: EOT (control-D) .sn CPUTC (ch , fd ) .sN .ft I Cputc .ft R writes a character onto the giv...xappenc0c1c2c3c4c5c6catcm5tcm6titpag is an output file, normally the same as file 1, except that when file 1 is diverted via a command line '>' operator, file 2 remains attached to the original destination, usually the terminal. It is used for error message output. These popular \*sUNIX\*S conventions are considered part of the C library specification. By closing 0 or 1, the default input or output may be re-directed; this can also be done on the command line by .ft I >file .ft P for output or .ft I \fIidentifier .ed .dp 2 lvalue: identifier primary \fG[ \fIexpression \fG]\fI lvalue \fG. \fIidentifier primary \fG\(em>\fI identifier \** \fI expression \fG( \fIlvalue \fG)\fR .ed .fi .sp .7 The primary-expression operators .dp .ft G (^) [^] . \(em> .sp .5 .ed have highest priority and group left-to-right. The unary operators .dp .ft G \* & \(mi ! \*~ \fR++ \(mi\(mi \fG items being read. .sn CCLOSE (fd) .sN The same description applies as for character-stream files. .SH 7. OTHER PORTABLE ROUTINES .LP .sn REW (fd) .sN Rewinds unit .I fd. .R Buffers are emptied properly and the file is left open. .sn SYSTEM (string) .sN The given .I string .R is executed as if it were typed at the terminal. .sn NARGS (\|) .sN A subroutine can call this function to try to find out how many arguments it was called with. Normally, .I nargs() .R returns the number of arguments plus 3 for every ternate = empty \*v alternate primary primary = character \*v `[' category `]' \*v option option = `{' category `}' .s3 .i0 .fi The first category on each line of an index file names an information file. The remaining categories specify the order and contents of the data in each line of the information file. Information files have the same syntax. Backslash `\\' is used as with .it sh (I) to quote syntactically significant characters or to insert transparent newlines into a line. When either a question or isizeof .ed .sp .5 have priority below the primary operators but higher than any binary operator, and group right-to-left. Binary operators and the conditional operator all group left-to-right, and have priority decreasing as indicated: .dp .ft I binop: .ft G \** / % + \(mi >> << < > <= >= == != & .tr ^^ ^ .tr ^\| \(or && \(or\(or ? : .tr ^^ .sp .4 .fi .ft R Assignment operators all have the same priority, and all group right-to-left. .dp 3 .ft I asgnop: .ft G.I float .R or .I double .R argument and plus one for every .I long .R argument. If the new \*sUNIX\*S feature of separated instruction and data space areas is used, .I nargs() .R doesn't work at all. .sn CALLOC (n, sizeof(object)) .sN .I Calloc .R returns a pointer to new storage, allocated in space obtained from the operating system. The space obtained is well enough aligned for any use, i.e. for a double-precision number. Enough space to store .I n .R objects of the size indicated by the second argument ts answer is empty, .it quiz will refrain from asking it. .sh FILES /usr/lib/quiz/index .br /usr/lib/quiz/* .sh BUGS  = =+ =\(mi =\** =/ =% =>> =<< =& =^ =\(or .ed .tr ^\| .sp .4 .ft R The comma operator has the lowest priority, and groups left-to-right. .sp .7 2. Declarations. .dp 2 declaration: decl-specifiers declarator-list\*(op \fG; .ed .dp 5 decl-specifiers: type-specifier sc-specifier type-specifier sc-specifier sc-specifier type-specifier .ed .dp 4 sc-specifier: .ft G auto static extern register .ed .dp 6 type-specifier: \fGint \fGchar \fGfloat \fGdouble struct { \fItyis provided. The .I sizeof .R is executed at compile time; it is not in the library. A returned value of \(mi1 indicates failure to obtain space. .sn CFREE (ptr, n, sizeof(*ptr)) .sN .I Cfree .R returns to the operating system memory starting at .I ptr .R and extending for .I n .R units of the size given by the third argument. The space should have been obtained through \fIcalloc\fR. On \*sUNIX\*S you can only return the exact amount of space obtained by .I calloc; .R the second and third arguments are ign36"%(+.1478;>ADGJM9<?Bpe-decl-list }\fG struct \fIidentifier { type-decl-list }\fG struct \fIidentifier\fG .ed .dp 2 declarator-list: declarator declarator \fG,\fI declarator-list .ed .dp 6 declarator: identifier \** \fIdeclarator declarator \fG( )\fI declarator \fG[\fI constant-expression\*(op \fG]\fI \fG( \fIdeclarator \fG) .ed .dp 2 type-decl-list: type-declaration type-declaration type-decl-list .ed .dp 2 type-declaration: type-specifier declarator-list \fG; .ed .sp 1.5 3. Statements. .dp 1 statored. .sn FTOA (floating-number, char-string, precision, format\|) .sN .ft I Ftoa .ft R (floating to \*sASCII\*S conversion) converts floating point numbers to character strings. The .ft I format .ft R argument should be either `f' or `e'; `e' is default. See the explanation of .ft I printf .ft R in section 5 for a description of the result. .sn ATOF (char-string) .sN Returns a floating value equal to the value of the \*sASCII\*S character string argument, interpreted as a decimal floating point number. .sn.pn 26 .fp 3 G 'tr ^\| 'hc $ 'tr @ 'll 6.5i 'ps 10 .ds op \s6\d\fIopt\fP\u\s10 .ds * \fR\v'.2'*\fP\v'-.2' .ds ~ \v'.5'\s14~\s10\v'-.5' 'vs 11p .de pg .sp .4 .ti 1 .. .de et .sp .2 .ft R .ti 1 .. .de dp .sp .7 .ne \\$1 .ft I .nf .. .de ed .fi .br .ft R .. .de ul .sp 1.5 .ne 4 .ft G .. .de ms .sp 1 .ne 4 .. .de fo 'bp .. .de he .po 0 .tl '-''' .po 'sp 0.5i .ft I .if o .tl '''C Reference Manual - %' .if e .tl 'C Reference Manual - %''' .ft 'sp 0.4i .. .de bG .br .fp 3 G .ft G .. .de eG .br .ft R .. .de itement: expression \fG; .se { \fIstatement-list } .se \fGif ( \fIexpression \fG) \fIstatement .se \fGif ( \fI expression \fG) \fIstatement \fGelse \fIstatement .se \fGwhile ( \fIexpression \fG) \fIstatement .se \fGfor ( \fIexpression\*(op \fG; \fIexpression\*(op \fG; \fIexpression\*(op \fG) statement .se \fGswitch ( \fIexpression \fG) \fIstatement .se \fGcase \fIconstant-expression \fG:\fI statement .se \fGdefault : \fIstatement .se \fGbreak ; .se \fGcontinue ; .se .ft G return ; .se  TMPNAM (str) .sN This routine places in the character array expected as its argument a string which is legal to use as a file name and which is guaranteed to be unique among all jobs executing on the computer at the same time. It is thus appropriate for use as a temporary file name, although the user may wish to move it into an appropriate directory. The value of the function is the address of the string. .sn ABORT (code) .sN Causes your program to terminate abnormally, which typically results in a dump b .ft I \\$1 .ft R .. .de bd .ft G \\$1 .ft R .. .de se .br .ft I .. .wh 0 he .wh -1i fo .sp 2 .ce REFERENCES .sp 1.5 .ta 2 .tc @ .in 2 .ti 0 1. Johnson, S. C., and Kernighan, B. W. ``The Programming Language B.'' Comp. Sci. Tech. Rep. #8., Bell Laboratories, 1972. .sp .6 .ti 0 2. Ritchie, D. M., and Thompson, K. L. ``The \s8UNIX\s10 Time-sharing System.'' C. ACM \fG7, \fR17, July, 1974, pp. 365-375. .sp .6 .ti 0 3. Peterson, T. G., and Lesk, M. E. ``A User's Guide to the C Language on the IBM 370.'' Interna.ft G return ( \fIexpression \fG) ; .se .ft G goto \fIexpression \fG; .se \fIidentifier \fG: \fIstatement .se \fG; .ed .dp 2 statement-list: statement statement statement-list .sp 1.5 .ft R 4. External definitions. .dp 2 program: external-definition external-definition program .dp 2 external-definition: function-definition data-definition .ed .dp 2 function-definition: type-specifier\*(op \fIfunction-declarator function-body .ed .dp 2 function-declarator: declarator \fG( \fI parameter-list\*(op \fG) .ed .dp 1 parameter-list: identifier identifier \fG,\fI parameter-list .ed .dp 1 function-body: type-decl-list function-statement .ed .dp 2 function-statement: { declaration-list\*(op statement-list } .ed .dp 2 data-definition: \fGextern\fI\*(op type-specifier\*(op init-declarator-list\*(op \fG; .ed .dp 2 init-declarator-list: init-declarator init-declarator \fG,\fI init-declarator-list .ed .dp 2 init-declarator: declarator initializer\*(op .ed .dp 5 initializerefore type). .ti0 g C.3) Externals on \*sGCOS\*n must have a type (not defaulted to \fGint\fR). .ti0 u C.4) \*sGCOS\*n allows initialization of internal \fGstatic\fR (same syntax as for external definitions). .ti0 g C.5) integer\(mi>... is not allowed on \*sGCOS\*n. .ti0 g C.6) Some operators on pointers are illegal on \*sGCOS\*n (<, >). .ti0 g C.7) \fGregister\fR storage class means something on \*sUNIX\*n, but is not accepted on \*sGCOS\*n. .ti0 g C.8) Scope holes: ``int x; f^(^^)^{int x;}'' is illegal oncounter-clockwise. This command is not necessarily implemented on all (or even any) of the output devices. .s3 .lp +3 3 c circle: The first four bytes specify the center of the circle, the next two the radius. .s3 .lp +3 3 e erases the screen .s3 .lp +3 3 f linemod: takes the following string as the type for all future lines. The types are `dotted,' `solid,' `longdashed,' `shortdashed,' and `dotdashed.' This instruction is effective only with the Tektronix terminal. .s3 .lp +3 3 d dotline: takes the first f: constant { constant-expression-list } .ed .dp 5 constant-expression-list: constant-expression constant-expression \fG,\fI constant-expression-list .ed .dp 2 constant-expression: expression .ed .sp .4 5. Preprocessor .dp 1 \fG# define \fIidentifier token-string .ed .dp 1 \fG# include "\fIfilename^\fG" .ed .in 0 .bp .ds s \\s8 .ds n \\s10 .ft R .fi .sp 1 .ce 2 APPENDIX 2 Implementation Peculiarities .sp 2 This Appendix briefly summarizes the differences between the implementations of C on the \*sUNIX\*n but defines two variables on \*sGCOS\*n. .ti0 g C.9) When function names are used as arguments on \*sUNIX\*n, either ``fname'' or ``&fname'' may be used to get a pointer to the function; on \*sGCOS\*n ``&fname'' generates a doubly-indirect pointer. (Note that both are wrong since the ``&'' is supposed to be supplied for free.) .sp .ne 5 .ti0 .ft I D. Operating System Dependencies .sp .ft R .ti0 d D.1) \*sGCOS\*n allocates external scalars by SYMREF; \*sUNIX\*n allocates external scalars as labelour bytes as the coordinates of the beginning of a dotted line. The next two are a signed x-increment, and the next two are a word count. Following are the indicated number of byte-pairs representing words. For each bit in this list of words a point is plotted which is visible if the bit is `1,' invisible if not. Each point is offset rightward by the x-increment. The instruction is effective only on the vt0 scope. .s3 .i0 .sh "SEE ALSO" plot (VII), graph (VI) .sh BUGS  \*sPDP\*n-11 under \*sUNIX\*n and on the \*sHIS\*n 6070 under \*sGCOS\*n; it includes some known bugs in each implementation. Each entry is keyed by an indicator as follows: .sp .ta .4i .8i .nf h hard to fix g \*sGCOS\*n version should probably be changed u \*sUNIX\*n version should probably be changed d Inherent difference likely to remain .sp .fi This list was prepared by M. E. Lesk, S. C. Johnson, E. N. Pinson, and the author. .sp 2 .fi .ta .4i 1.2i .in 1.2i .ti0 .ft I A. Bugs or differences from C led common; as a result there may be many uninitialized external definitions of the same variable on \*sUNIX\*n but only one on \*sGCOS\*n. .ti0 d D.2) External names differ in allowable length and character set; on \*sUNIX\*n, 7 characters and both cases; on \*sGCOS\*n 6 characters and only one case. .sp .ne 5 .ft I .ti0 E. Semantic Differences .ft R .sp .ti0 hg E.1) ``int i, *p; p=i; i=p;'' does nothing on \*sUNIX\*n, does something on \*sGCOS\*n (destroys right half of i) . .ti0 d E.2) ``>>'' means arithCFILOPSVYlanguage specifications .ft R .sp .ti0 hg A.1) \*sGCOS\*n does not do type conversions in ``?:''. .ti0 hg A.2) \*sGCOS\*n has a bug in \fGint\fR and \fGreal\fR comparisons; the numbers are compared by subtraction, and the difference must not overflow. .ti 0 g A.3) When \fIx\fR is a \fGfloat\fR, the construction ``test ? \(mix : x'' is illegal on \*sGCOS\*n. .ti0 hg A.4) ``p1\(mi>p2 =+ 2'' causes a compiler error, where p1 and p2 are pointers. .ti0 u A.5) On \*sUNIX\*n, the expression in a \fGreturn\fR statemetic shift on \*sUNIX\*n, logical on \*sGCOS\*n. .ti0 d E.3) When a \fGchar\fR is converted to integer, the result is always positive on \*sGCOS\*n but can be negative on \*sUNIX\*n. .ti0 d E.4) Arguments of subroutines are evaluated left-to-right on \*sGCOS\*n, right-to-left on \*sUNIX\*n. .H1 Change and Insert \(mi ``c'' and ``i'' .H2 .PG This section discusses the .ul change command .X1 c .X2 which is used to change or replace a group of one or more lines, and the .ul insert command .X1 i .X2 which is used for inserting a group of one or more lines. .PG ``Change'', written as .X1 c .X2 is used to replace a number of lines with different lines, which are typed in at the terminal. For example, to change lines ``\*.+1'' through ``$'' to something else, type .X1 .+1,$c . . . \fItype the linesment is \fInot\fR converted to the type of the function, as promised. .ti0 hug A.6) \fGentry\fR statement is not implemented at all. .sp .ne 5 .ft I .ti0 .ft I B. Implementation differences .ft R .sp .ti0 d B.1) Sizes of character constants differ; \*sUNIX\*n: 2, \*sGCOS\*n: 4. .ti0 d B.2) Table sizes in compilers differ. .ti0 d B.3) \fGchar\fRs and \fGint\fRs have different sizes; \fGchar\fRs are 8 bits on \*sUNIX\*n, 9 on \*sGCOS\*n; words are 16 bits on \*sUNIX\*n and 36 on \*sGCOS\*n. There are correspo.th PRIMES VI 4/10/75 .sh NAME primes \*- print all primes larger than somewhat .sh SYNOPSIS .bd primes .sh DESCRIPTION When .it primes is invoked, it waits for a number to be typed in. If you type in a positive number less than 2\u\s756\s0\d (about .if n 7.2e16) .if t 7.2\(mu10\u\s716\s0\d\|) it will print all primes greater than or equal to this number. .sh DIAGNOSTICS `Ouch.' for input out of range or for garbage input. .sh BUGS  of text you want here\fP . . . \fB.\fR .X2 The lines you type between the ``c'' command and the ``\*.'' will take the place of the original lines between start line and end line. This is most useful in replacing a line or several lines which have errors in them. .PG If only one line is specified in the ``c'' command, then just that line is replaced. (You can type in as many replacement lines as you like.) Notice the use of ``\*.'' to end the input \(mi this works just like the ``\*.'' in the append commannding differences in representations of \fGfloat\fRs and \fGdouble\fRs. .ti0 d B.4) Character arrays stored left to right in a word in \*sGCOS\*n, right to left in \*sUNIX\*n. .ti0 g B.5) Passing of floats and doubles differs; \*sUNIX\*n passes on stack, \*sGCOS\*n passes pointer (hidden to normal user). .ti0 g B.6) Structures and strings are aligned on a word boundary in \*sUNIX\*n, not aligned in \*sGCOS\*n. .ti0 g B.7) \*sGCOS\*n preprocessor supports #rename, #escape; \*sUNIX\*n has only #define, #inclu.th PLOT VI 3/10/75 .sh NAME plot: tek, gsip, vt0 \*- graphics filters .sh SYNOPSIS source | .bd tek .br source | .bd gsip .br source | .bd vt0 .sh DESCRIPTION These commands produce graphical output on the Tektronix 4014 terminal, the GSI or other Diablo-mechanism terminals, and the on-line storage scope respectively. They read the standard input to obtain plotting instructions, which are usually generated by a program calling the graphics subroutines described in .it plot (VII). Each instruction consists d and must appear by itself on a new line. If no line number is given, line dot is replaced. The value of dot is set to the last line you typed in. .PG ``Insert'' is similar to append \(mi for instance .X1 /string/i .li . . . \fItype the lines to be inserted here\fP . . . .li \fB.\fR .X2 will insert the given text .ul before the next line that contains ``string''. The text between ``i'' and ``\*.'' is .ul inserted before the specified line. If no line number is specified dot is used. Dot is set to the last de. .ti0 u B.8) Preprocessor is not invoked on \*sUNIX\*n unless first character of file is ``#''. .ti0 u B.9) The external definition ``static int .^.^.'' is legal on \*sGCOS\*n, but gets a diagnostic on \*sUNIX\*n. (On \*sGCOS\*n it means an identifier global to the routines in the file but invisible to routines compiled separately.) .ti 0 g B.10) A compound statement on \*sGCOS\*n must contain one ``;'' but on \*sUNIX\*n may be empty. .ti 0 g B.11) On \*sGCOS\*n case distinctions in identifiers and keywoof an ASCII letter usually followed by binary information. A plotting coordinate is transmitted as four bytes representing the .it x and .it y values; each value is a signed number transmitted low-order byte first. The assumed plotting space is set by request. The instructions are taken from .s3 .lp +3 3 m move: the next four bytes specify the coordinates of a point to move to. This is used before writing a label. .s3 .lp +3 3 p point: the next four bytes specify the coordinates at which a point is drawn. .line inserted. .H1 Exercise 7: .H2 .PG ``Change'' is rather like a combination of delete followed by insert. Experiment to verify that .X1 \fIstart, end\fP d i .ul . . . text . . . .li \fB.\fR .X2 is almost the same as .X1 \fIstart, end\fP c .ul . . . text . . . .li \fB.\fR .X2 These are not .ul precisely the same if line ``$'' gets deleted. Check this out. What is dot? .PG Experiment with ``a'' and ``i'', to see that they are similar, but not the same. You will observe that .X1 \fIline-number\fP a .li . rds are ignored; on \*sUNIX\*n case is significant everywhere, with keywords in lower case. .sp .ne 5 .ti0 .ft I C. Syntax Differences .ft R .sp .ti0 g C.1) \*sUNIX\*n allows broader classes of initialization; on \*sGCOS\*n an initializer must be a constant, name, or string. Similarly, \*sGCOS\*n is much stickier about wanting braces around initializers and in particular they must be present for array initialization. .ti0 g C.2) ``int extern'' illegal on \*sGCOS\*n; must have ``extern int'' (storage class bs3 .lp +3 3 l line: the next eight bytes are taken as two pairs of coordinates specifying the endpoints of a line to be drawn. .s3 .lp +3 3 t label: the bytes up to a new-line are written as ASCII starting at the last point drawn or moved to. .s3 .lp +3 3 a arc: the first four bytes specify the center, the next four specify the starting point, and the last four specify the end point of a circular arc. The least significant coordinate of the end point is used only to determine the quadrant. The arc is drawn . . \fItext\fP . . . .li \fB.\fR .X2 appends .ul after the given line, while .X1 \fIline-number\fP i .li . . . \fItext\fP . . . .li \fB.\fR .X2 inserts .ul before it. Observe that if no line number is given, ``i'' inserts before line dot, while ``a'' appends after line dot. .H1 Moving text around: the ``m'' command .H2 .PG The move command ``m'' is used for cutting and pasting \(mi it lets you move a group of lines from one place to another in the buffer. Suppose we want to put the first three lines of the buffer at the end instead. We could do it by saying: .X1 1,3w temp $r temp 1,3d .X2 (Do you see why?) but we can do it a lot easier with the ``m'' command: .X1 1,3m$ .X2 The general case is .X1 \fIstart line, end line\fP m \fIafter this line\fP .X2 Notice that there is a third line to be specified \(mi the place where the moved stuff gets put. Of course the lines to be moved can be specified by context searches; if we had .X1 First paragraph .li . . . end of first paragraph. Second paragraph .li . . . end oring1' in specified lines. If no line is specified, make substitution in line dot. Dot is set to last line in which a substitution took place, which means that if no substitution took place, dot is not changed. .ul s changes only the first occurrence of string1 on a line; to change all of them, type a ``g'' after the final slash. .sp 4p .ul v (exclude) .ul v/---/commands executes ``commands'' on those lines that .ul do not contain ``---''. .sp 4p .ul w (write) Write out buffer onto a file. Dot is not changemand where it means ``whatever was matched on the left-hand side''. It is used to save typing. Suppose the current line contained .X1 Now is the time .X2 and we wanted to put parentheses around it. We could just retype the line, but this is tedious. Or we could say .X1 s/^/(/ s/$/)/ .X2 using our knowledge of ``^'' and ``$''. But the easiest way uses the ``&'': .X1 s/\*.*/(&)/ .X2 This says ``match the whole line, and replace it by itself surrounded by parens.''~ The ``&'' can be used several times in a linf second paragraph. .X2 we could reverse the two paragraphs like this: .X1 /Second/,/second/m/First/\(mi1 .X2 Notice the ``\(mi1'' \(mi the moved text goes .ul after the line mentioned. Dot gets set to the last line moved. .H1 The global commands ``g'' and ``v'' .H2 .PG The .ul global command ``g'' is used to execute one or more .ul ed commands on all those lines in the buffer that match some specified string. For example .X1 g/peling/p .X2 prints all lines that contain ``peling''. More usefully, .X1 g/peld. .sp 4p .ul .li .= (dot value) Print value of dot. (``='' by itself prints the value of ``$''.) .sp 4p .ul ! (temporary escape) Execute this line as a UNIX command. .sp 4p .ul /-----/ Context search. Search for next line which contains this string of characters. Print it. Dot is set to line where string found. Search starts at ``\*.+1'', wraps around from ``$'' to 1, and continues to dot, if necessary. .sp 4p .ul ?-----? Context search in reverse direction. Start search at ``\*.\(mi1'', scan to 1, wrape; consider using .X1 s/\*.*/&? &!!/ .X2 to produce .X1 Now is the time? Now is the time!! .X2 .PG We don't have to match the whole line, of course: if the buffer contains .X1 the end of the world .X2 we could type .X1 /world/s//& is at hand/ .X2 to produce .X1 the end of the world is at hand .X2 Observe this expression carefully, for it illustrates how to take advantage of .ul ed to save typing. The string ``/world/'' found the desired line; the shorthand ``//'' found the same word in the line; and the `ing/s//pelling/gp .X2 makes the substitution everywhere on the line, then prints each corrected line. Compare this to .X1 1,$s/peling/pelling/gp .X2 which only prints the last line substituted. Another subtle difference is that the ``g'' command does not give a ``?'' if ``peling'' is not found where the ``s'' command will. .PG There may be several commands (including ``a'', ``c'' ``i'' ``r'', ``w'', but not ``g''); in that case, every line except the last must end with a backslash ``\\'': .X1 g/xxx/\*.-1s/a around to ``$''. .in 0 `&'' saved us from typing it again. .PG The ``&'' is a special character only within the replacement text of a substitute command, and has no special meaning elsewhere. We can turn off the special meaning of ``&'' by preceding it with a ``\\'': .X1 s/ampersand/\\&/ .X2 will convert the word ``ampersand'' into the literal symbol ``&'' in the current line. bc/def/\\ .li \fB.\fR+2s/ghi/jkl/\\ .li \fB.\fR-2,\fB.\fRp .X2 makes changes in the lines before and after each line that contains ``xxx'', then prints all three lines. .PG The ``v'' command is the same as ``g'', except that the commands are executed on every line that does .ul not match the string following ``v'': .X1 v/ /d .X2 deletes every line that does not contain a blank. .H1 Special Characters .H2 .PG You may have noticed that things just don't work right when you used some characters like ``.'', ``*'', ``$'', and others in context searches and the substitute command. The reason is rather complex, although the cure is simple. Basically, .ul ed treats these characters as special, with special meanings. For instance, .ul in a context search or the first string of the substitute command only, \*. means ``any character,'' not a period, so .X1 /x\*.y/ .X2 means ``a line with an .th MOO VI 11/1/73 .sh NAME moo \*- guessing game .sh SYNOPSIS .bd /usr/games/moo .sh DESCRIPTION .it Moo is a guessing game imported from England. The computer picks a number consisting of four distinct decimal digits. The player guesses four distinct digits being scored on each guess. A `cow' is a correct digit in an incorrect position. A `bull' is a correct digit in a correct position. The game continues until the player guesses the number (a score of four bulls). .sh BUGS .sp 2 .H1 Summary of Commands and Line Numbers .H2 .PG The general form of .ul ed commands is the command name, perhaps preceded by one or two line numbers, and, in the case of .ul e, r and .ul w, followed by a file name. Only one command is allowed per line, but a .ul p command may follow any other command (except for .ul e, r, w and .ul q). .sp .ul a (append) Add lines to the buffer (at line dot, unless a different line is specified). Appending continues until ``\*.'' is typed on a new line. Dot is set to x, .ul any character, and a y,'' .ul not just ``a line with an x, a period, and a y.''~ A complete list of the special characters that can cause trouble is the following: .X1 ^ \*. $ [ * \\ .X2 .ul Warning: The backslash character \\ is special to .ul ed. For safety's sake, avoid it where possible. If you have to use one of the special characters in a substitute command, you can turn off its magic meaning temporarily by preceding it with the backslash. Thus .X1 s/\\\\\\\*.\\*/backslash dot .fp 3 G .tr ^\| .hc $ .tr @ .br .po 0 .tl '-''' .po .pl 11i .ll 6.5i .ps 18 .vs 18p .sp 1.4i .ce C Reference Manual .sp 2 .ps 10 .vs 11p .ce 3 .ft I Dennis M. Ritchie .sp .25 Bell Telephone Laboratories Murray Hill, New Jersey 07974 .ps 10 .ft R .vs 11p .sp 3 .de pg .sp .4 .ti 1 .. .de et .sp .2 .ft R .ti 1 .. .de dp .sp .7 .ne \\$1 .ft I .nf .. .de ed .fi .sp .7 .ft R .. .de ul .sp 1.5 .ne 4 .ft G .. .de ms .sp 1 .ne 4 .. .de fo 'bp .. .de he .po 0 .tl '-''' .po 'sp 0.5i .ft I .if o .tl '''C Reference M the last line appended. .sp 4p .ul c (change) Change the specified lines to the new text which follows. .li The new lines are terminated by a ``\*.''. If no lines are specified, replace line dot. Dot is set to last line changed. .sp 4p .ul d (delete) Delete the lines specified. If none are specified, delete line dot. Dot is set to the first undeleted line, unless ``$'' is deleted, in which case dot is set to ``$''. .sp 4p .ul e (edit) Edit new file. Any previous contents of the buffer are thrown away, so istar/ .X2 will change ``\\\*.*'' into ``backslash dot star''. .PG Here is a hurried synopsis of the other special characters. First, the circumflex `` ^ '' signifies the beginning of a line. Thus .X1 /^string/ .X2 finds ``string'' only if it is at the beginning of a line: it will find .X1 string .X2 but not .X1 the string... .X2 The dollar-sign ``$'' is just the opposite of the circumflex; it means the end of a line: .X1 /string$/ .X2 will only find an occurrence of ``string'' that is at the end of some linanual - %' .if e .tl 'C Reference Manual - %''' .ft 'sp 0.4i .. .de bG .br .ft G .. .de eG .br .ft R .. .de it .ft I \\$1 .ft R .. .de bd .ft G \\$1 .ft R .. .wh -1i fo .wh 0 he .ds op \s6\d\fIopt\fP\u\s10 .ds * \fR\v'.2'*\fP\v'-.2' .ds ~ \v'.5'\s14~\s10\v'-.5' ssue a .ul w beforehand if you want to save them. .sp 4p .ul f (file) Print remembered filename. If a name follows .ul f the remembered name will be set to it. .sp 4p .ul g (global) .ul g/---/commands will execute the commands on those lines that contain ``---'', which can be any context search expression. .sp 4p .ul i (insert) Insert lines before specified line (or dot) .li until a ``\*.'' is typed on a new line. Dot is set to last line inserted. .sp 4p .ul m (move) Move lines specified to after the line ne. This implies, of course, that .X1 /^string$/ .X2 will find only a line that contains just ``string'', and .X1 /^\*.$/ .X2 finds a line containing exactly one character. .PG The character ``\*.'', as we mentioned above, matches anything; .X1 /x\*.y/ .X2 matches any of .X1 x+y x-y x y x\*.y .X2 This is useful in conjunction with ``*'', which is a repetition character; ``a*'' is a shorthand for ``any number of a's,'' so ``\*.*'' matches any number of anythings. This is used like this: .X1 s/\*.*/stuff/ .X2 .th M6 VI 2/19/74 .sh NAME m6 \*- general purpose macroprocessor .sh SYNOPSIS .bd m6 [ name ] .sh DESCRIPTION .it M6 copies the standard input to the standard output, with substitutions for any macro calls that appear. When a file name argument is given, that file is read before the standard input. .s3 The processor is as described in the reference with these exceptions: .s3 .lp +2 0 .it #def,arg1,arg2,arg3: causes \fIarg1\fP to become a macro with defining text \fIarg2\fP and (optional) built-in serial numamed after .ul m. Dot is set to the last line moved. .sp 4p .ul p (print) Print specified lines. If none specified, print line dot. A single line number is equivalent to ``line-number p''. A single newline prints ``\*.+1'', the next line. .sp 4p .ul q (quit) Exit from ed. Wipes out all text in buffer!! .sp 4p .ul r (read) Read a file into buffer (at end unless specified elsewhere.) Dot set to last line read. .sp 4p .ul s (substitute) .ul s/string1/string2/ will substitute the characters of `string2' for `stwhich changes an entire line, or .X1 s/\*.*,// .X2 which deletes all characters in the line up to and including the last comma. (Since ``\*.*'' finds the longest possible match, this goes up to the last comma.) .PG ``['' is used with ``]'' to form ``character classes''; for example, .X1 /[1234567890]/ .X2 matches any single digit _ any one of the characters inside the braces will cause a match. .PG Finally, the ``&'' is another shorthand character - it is used only on the right-hand part of a substitute comber \fIarg3\fP. .s3 .it #del,arg1: deletes the definition of macro \fIarg1\fP. .s3 .it #end: is not implemented. .s3 .it #list,arg1: sends the name of the macro designated by \fIarg1\fP to the current destination without recognition of any warning characters; \fIarg1\fP is 1 for the most recently defined macro, 2 for the next most recent, and so on. The name is taken to be empty when \fIarg1\fP doesn't make sense. .s3 .it #warn,arg1,arg2: replaces the old warning character \fIarg1\fP by the new warning character \fIarg2\fP. .s3 .it #quote,arg1: sends the definition text of macro \fIarg1\fP to the current destination without recognition of any warning characters. .s3 .it #serial,arg1: delivers the built-in serial number associated with macro \fIarg1\fP. .s3 .it #source,arg1: is not implemented. .s3 .it #trace,arg1: with \fIarg1\fP = `1' causes a reconstruction of each later call to be placed on the standard output with a call level number; other values of \fIarg1\fP turn tracing off. .i0 .s3 The built-in `warn other separators. In general blanks, tabs, newlines, and comments as described below are ignored except as they serve to separate tokens. At least one of these characters is required to separate otherwise adjacent identifiers, constants, and certain operator-pairs. .pg If the input stream has been parsed into tokens up to a given character, the next token is taken to include the longest string of characters which could possibly constitute a token. .ms 2.1 Comments .et The characters ^^\fG/\**\fR^^ introdu the subscript ``opt,'' so that .dp { expression\*(op } .ed would indicate an optional expression in braces. .ul 4. What's in a Name? .et C bases the interpretation of an identifier upon two attributes of the identifier: its .ft I storage class .ft R and its .ft I type. .ft R The storage class determines the location and lifetime of the storage associated with an identifier; the type determines the meaning of the values found in the identifier's storage. .pg There are four declarable storage classes: auto' may be used to replace inconvenient warning characters. The example below replaces `#' `:' `<' `>' by `[' `]' `{' `}'. .s3 .lp +10 0 .nf #warn,<#>,[: [warn,<:>,]: [warn,[substr,<<>>,1,1\fB;\fP,{] [warn,[substr,{{>>,2,1\fB;\fP,}] [now,{calls look like this}] .fi .i0 .s3 Every built-in function has a serial number, which specifies the action to be performed before the defining text is expanded. The serial numbers are: 1 gt, 2 eq, 3 ge, 4 lt, 5 ne, 6 le, 7 seq, 8 sne, 9 add, 10 sub, 11 mpy, 12 div, 13 exp, 2ce a comment, which terminates with the characters^^ \fG\**/\fR. .ms 2.2 Identifiers (Names) .et An identifier is a sequence of letters and digits; the first character must be alphabetic. The underscore ``\(ru'' counts as alphabetic. Upper and lower case letters are considered different. No more than the first eight characters are significant, and only the first seven for external identifiers. .ms 2.3 Keywords .et The following identifiers are reserved for use as keywords, and may not be used otherwise: .matic, static, external, and register. Automatic variables are local to each invocation of a function, and are discarded on return; static variables are local to a function, but retain their values independently of invocations of the function; external variables are independent of any function. Register variables are stored in the fast registers of the machine; like automatic variables they are local to each function and disappear on return. .pg C supports four fundamental types of objects: characters, inte0 if, 21 def, 22 copy, 23 warn, 24 size, 25 substr, 26 go, 27 gobk, 28 del, 29 dnl, 32 quote, 33 serial, 34 list, 35 trace. Serial number 0 specifies no built-in action. .sh "SEE ALSO" A. D. Hall, M6 Reference Manual. Computer Science Technical Report #2, Bell Laboratories, 1969. .sh DIAGNOSTICS Various table overflows and ``impossible'' conditions result in comment and dump. There are no diagnostics for poorly formed input. .sh AUTHOR M. D. McIlroy .sh BUGS Provision should be made to extend tables as needsp .7 .in .5i .ta 2i .nf .ne 10 .ft G int break char continue float if double else struct for auto do extern while register switch static case goto default return entry sizeof .sp .7 .ft R .fi .in 0 The .bd entry keyword is not currently implemented by any compiler but is reserved for future use. .ms 2.3 Constants .et There are several kinds of constants, as follows: .ms 2.3.1 Integer constants .et An integer constant is a sequence of digits. An integer is taken to be octal if it begins with \fG0\fR, decigers, single-, and double-precision floating-point numbers. .sp .7 .in .5i Characters (declared, and hereinafter called, \fGchar\fR) are chosen from the \s8ASCII\s10 set; they occupy the right-most seven bits of an 8-bit byte. It is also possible to interpret \fGchar\fRs as signed, 2's complement 8-bit numbers. .sp .4 Integers (\fGint\fR) are represented in 16-bit 2's complement notation. .sp .4 Single precision floating point (\fGfloat\fR) quantities have magnitude in the range approximately 10\u\s7\(+-38\ed, instead of wasting a big fixed core allocation. You get what the PDP11 gives you for arithmetic. mal otherwise. The digits \fG8\fR and \fG9\fR have octal value 10 and 11 respectively. .ms 2.3.2 Character constants .et A character constant is 1 or 2 characters enclosed in single quotes ``\fG^\(aa^\fR''. Within a character constant a single quote must be preceded by a back-slash ``\\''. Certain non-graphic characters, and ``\\'' itself, may be escaped according to the following table: .sp .7 .ta .5i 1.25i .nf \s8BS\s10 \\b \s8NL\s10 \\n \s8CR\s10 \\r \s8HT\s10 \\t \fIddd\fR \\\fIddd\fR \\ \\\\ .fis10\d or 0; their precision is 24 bits or about seven decimal digits. .sp .4 Double-precision floating-point (\fGdouble\fR) quantities have the same range as \fGfloat\fRs and a precision of 56 bits or about 17 decimal digits. .sp .7 .in 0 .pg Besides the four fundamental types there is a conceptually infinite class of derived types constructed from the fundamental types in the following ways: .sp .7 .in .5i .ft I arrays .ft R of objects of most types; .sp .4 .ft I functions .ft R which return objects of a gwz}ilorux{~jmpsvy| .sp .7 The escape ``\\\fIddd\fR'' consists of the backslash followed by 1, 2, or 3 octal digits which are taken to specify the value of the desired character. A special case of this construction is ``\\0'' (not followed by a digit) which indicates a null character. .pg Character constants behave exactly like integers (not, in particular, like objects of character type). In conformity with the addressing structure of the \s8PDP\s10-11, a character constant of length 1 has the code for the given character iniven type; .sp .4 .ft I pointers .ft R to objects of a given type; .sp .4 .ft I structures .ft R containing objects of various types. .sp .7 .in 0 In general these methods of constructing objects can be applied recursively. .ul 5. Objects and lvalues .et An object is a manipulatable region of storage; an lvalue is an expression referring to an object. An obvious example of an lvalue expression is an identifier. There are operators which yield lvalues: for example, if E is an expression of pointer type, the.ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i .ul 1. Introduction .et C is a computer language based on the earlier language B [1]. The languages and their compilers differ in two major ways: C introduces the notion of types, and defines appropriate extra syntax and semantics; also, C on the \s8PDP\s10-11 is a true compiler, producing machine code where B produced interpretive code. .pg Most of the software for the \s8UNIX\s10 time-sharing system [2] is written in C, as is the operating system itself. C is also avail the low-order byte and 0 in the high-order byte; a character constant of length 2 has the code for the first character in the low byte and that for the second character in the high-order byte. Character constants with more than one character are inherently machine-dependent and should be avoided. .ms 2.3.3 Floating constants .et A floating constant consists of an integer part, a decimal point, a fraction part, an \fGe\fR, and an optionally signed integer exponent. The integer and fraction parts both consin \**E is an lvalue expression referring to the object to which E points. The name ``lvalue'' comes from the assignment expression ``E1@=@E2'' in which the left operand E1 must be an lvalue expression. The discussion of each operator below indicates whether it expects lvalue operands and whether it yields an lvalue. .ul 6. Conversions .et A number of operators may, depending on their operands, cause conversion of the value of an operand from one type to another. This section explains the result to be expecable on the \s8HIS\s10 6070 computer at Murray Hill and and on the \s8IBM\s10 System/370 at Holmdel [3]. This paper is a manual only for the C language itself as implemented on the \s8PDP\s10-11. However, hints are given occasionally in the text of implementation-dependent features. .pg The \s8UNIX\s10 Programmer's Manual [4] describes the library routines available to C programs under \s8UNIX\s10, and also the procedures for compiling programs under that system. ``The \s8GCOS\s10 C Library'' by Lesk and Bast of a sequence of digits. Either the integer part or the fraction part (not both) may be missing; either the decimal point or the \fGe\fR and the exponent (not both) may be missing. Every floating constant is taken to be double-precision. .ms 2.4 Strings .et A string is a sequence of characters surrounded by double quotes ``^\fG"\fR^''. A string has the type array-of-characters (see below) and refers to an area of storage initialized with the given characters. The compiler places a null byte (^\\0^) at tted from such conversions. .ms 6.1 Characters and integers .et A \fGchar\fR object may be used anywhere an \fGint\fR may be. In all cases the \fGchar\fR is converted to an \fGint\fR by propagating its sign through the upper 8 bits of the resultant integer. This is consistent with the two's complement representation used for both characters and integers. (However, the sign-propagation feature disappears in other implementations.) .ms 6.2 Float and double .et All floating arithmetic in C is carried out in drres [5] describes routines available under that system as well as compilation procedures. Many of these routines, particularly the ones having to do with I/O, are also provided under \s8UNIX\s10. Finally, ``Programming in C\(mi A Tutorial,'' by B. W. Kernighan [6], is as useful as promised by its title and the author's previous introductions to allegedly impenetrable subjects. .ul 2. Lexical conventions .et There are six kinds of tokens: identifiers, keywords, constants, strings, expression operators, andhe end of each string so that programs which scan the string can find its end. In a string, the character ``^\fG"\fR^'' must be preceded by a ``\\''^; in addition, the same escapes as described for character constants may be used. .ul 3. Syntax notation .et In the syntax notation used in this manual, syntactic categories are indicated by \fIitalic\fR type, and literal words and characters in \fGgothic.\fR Alternatives are listed on separate lines. An optional terminal or non-terminal symbol is indicated byouble-precision; whenever a \fGfloat\fR appears in an expression it is lengthened to \fGdouble\fR by zero-padding its fraction. When a \fGdouble\fR must be converted to \fGfloat\fR, for example by an assignment, the \fGdouble\fR is rounded before truncation to \fGfloat\fR length. .ms 6.3 Float and double; integer and character .et All \fGint\fRs and \fGchar\fRs may be converted without loss of significance to \fGfloat\fR or \fGdouble\fR. Conversion of \fGfloat\fR or \fGdouble\fR to \fGint\fR or \fGchar\fR takes place with truncation towards 0. Erroneous results can be expected if the magnitude of the result exceeds 32,767 (for \fGint\fR) or 127 (for \fGchar\fR). .ms 6.4 Pointers and integers .et Integers and pointers may be added and compared; in such a case the \fGint\fR is converted as specified in the discussion of the addition operator. .pg Two pointers to objects of the same type may be subtracted; in this case the result is converted to an integer as specified in the discussion of the subtraction operpe of the result is ``^.^.^.^''. The expression ``E1[E2]'' is identical (by definition) to ``\**^(^^(^E1^)^+^(^E2^)^^)^''. All the clues needed to understand this notation are contained in this section together with the discussions in \(sc\(sc 7.1.1, 7.2.1, and 7.4.1 on identifiers, \fG\**\fR, and \fG+\fR respectively; \(sc14.3 below summarizes the implications. .ms 7.1.6 \fIprimary-expression \fG( \fIexpression-list\*(op \fG) .et A function call is a primary expression followed by parentheses containing ad the result is \fGint\fR. .ms 7.2.6 ++ \fIlvalue-expression\fR .et The object referred to by the lvalue expression is incremented. The value is the new value of the lvalue expression and the type is the type of the lvalue. If the expression is \fGint\fR or \fGchar\fR, it is incremented by 1; if it is a pointer to an object, it is incremented by the length of the object. ++ is applicable only to these types. (Not, for example, to \fGfloat\fR or \fGdouble\fR.) .ms 7.2.7 \fR\(mi\(mi\fI lvalue-expression\fR ator.  possibly empty, comma-separated list of expressions which constitute the actual arguments to the function. The primary expression must be of type ``function returning .^.^.'', and the result of the function call is of type ``^.^.^.^''. As indicated below, a hitherto unseen identifier followed immediately by a left parenthesis is contextually declared to represent a function returning an integer; thus in the most common case, integer-valued functions need not be declared. .pg Any actual arguments of type \f.et The object referred to by the lvalue expression is decremented analogously to the ++ operator. .ms 7.2.8 \fIlvalue-expression ++ .et The result is the value of the object referred to by the lvalue expression. After the result is noted, the object referred to by the lvalue is incremented in the same manner as for the prefix ++ operator: by 1 for an \fGint\fR or \fGchar\fR, by the length of the pointed-to object for a pointer. The type of the result is the same as the type of the lvalue-expression. .ms 7Gfloat\fR are converted to \fGdouble\fR before the call; any of type \fGchar\fR are converted to \fGint\fR. .pg In preparing for the call to a function, a copy is made of each actual parameter; thus, all argument-passing in C is strictly by value. A function may change the values of its formal parameters, but these changes cannot possibly affect the values of the actual parameters. On the other hand, it is perfectly possible to pass a pointer on the understanding that the function may change the value of th.2.9 \fIlvalue-expression \(mi\(mi .et The result of the expression is the value of the object referred to by the the lvalue expression. After the result is noted, the object referred to by the lvalue expression is decremented in a way analogous to the postfix ++ operator. .ms 7.2.10 \fGsizeof \fIexpression .et The \fGsizeof\fR operator yields the size, in bytes, of its operand. When applied to an array, the result is the total number of bytes in the array. The size is determined from the declarations of .ul 7. Expressions .et The precedence of expression operators is the same as the order of the major subsections of this section (highest precedence first). Thus the expressions referred to as the operands of \fG+\fR (\(sc7.4) are those expressions defined in \(sc\(sc7.1_7.3. Within each subsection, the operators have the same precedence. Left- or right-associativity is specified in each subsection for the operators discussed therein. The precedence and associativity of all the expression operators is summae object to which the pointer points. .pg Recursive calls to any function are permissible. .ms 7.1.7 \fIprimary-lvalue \fG.\fI member-of-structure\fR .et An lvalue expression followed by a dot followed by the name of a member of a structure is a primary expression. The object referred to by the lvalue is assumed to have the same form as the structure containing the structure member. The result of the expression is an lvalue appropriately offset from the origin of the given lvalue whose type is that of the the objects in the expression. This expression is semantically an integer constant and may be used anywhere a constant is required. Its major use is in communication with routines like storage allocators and I/O systems. .ms 7.3 Multiplicative operators .et The multiplicative operators \fG\**\fR, \fG/\fR, and \fG%\fR group left-to-right. .ms 7.3.1 \fIexpression\fG \** \fIexpression\fR .et The binary \fG\**\fR operator indicates multiplication. If both operands are \fGint\fR or \fGchar\fR, the result is \frized in an appendix. .pg Otherwise the order of evaluation of expressions is undefined. In particular the compiler considers itself free to compute subexpressions in the order it believes most efficient, even if the subexpressions involve side effects. .ms 7.1 Primary expressions .et Primary expressions involving \fG.\fR^, \fG\(mi>\fR, subscripting, and function calls group left to right. .ms 7.1.1 \fIidentifier\fR .et An identifier is a primary expression, provided it has been suitably declared as discnamed structure member. The given lvalue is not required to have any particular type. .pg Structures are discussed in \(sc8.5. .ms 7.1.8 \fIprimary-expression \fG\(mi>\fI member-of-structure\fR .et The primary-expression is assumed to be a pointer which points to an object of the same form as the structure of which the member-of-structure is a part. The result is an lvalue appropriately offset from the origin of the pointed-to structure whose type is that of the named structure member. The type of the primGint\fR; if one is \fGint\fR or \fGchar\fR and one \fGfloat\fR or \fGdouble\fR, the former is converted to \fGdouble\fR, and the result is \fGdouble\fR; if both are \fGfloat\fR or \fGdouble\fR, the result is \fGdouble\fR. No other combinations are allowed. .ms 7.3.2 \fIexpression \fG/\fI expression\fR .et The binary \fG/\fR operator indicates division. The same type considerations as for multiplication apply. .ms 7.3.3 \fIexpression \fG%\fI expression\fR .et The binary \fG%\fR operator yields the remaindeussed below. Its type is specified by its declaration. However, if the type of the identifier is ``array of .^.^.'', then the value of the identifier-expression is a pointer to the first object in the array, and the type of the expression is ``pointer to .^.^.''. Moreover, an array identifier is not an lvalue expression. .pg Likewise, an identifier which is declared ``function returning .^.^.'', when used except in the function-name position of a call, is converted to ``pointer to function returning .^.^.''ary-expression need not in fact be pointer; it is sufficient that it be a pointer, character, or integer. .pg Except for the relaxation of the requirement that E1 be of pointer type, the expression ``E1\(mi>MOS'' is exactly equivalent to ``(\**E1).MOS''. .ms 7.2 Unary operators .et Expressions with unary operators group right-to-left. .ms 7.2.1 \fG\**\fI expression\fR .et The unary \fG\**\fR operator means .ft I indirection: .ft R the expression must be a pointer, and the result is an lvalue referring to r from the division of the first expression by the second. Both operands must be \fGint\fR or \fGchar\fR, and the result is \fGint\fR. In the current implementation, the remainder has the same sign as the dividend. .ms 7.4 Additive operators .et The additive operators \fG+\fR and \fG\(mi\fR group left-to-right. .ms 7.4.1 \fIexpression \fG+\fI expression\fR .et The result is the sum of the expressions. If both operands are \fGint\fR or \fGchar\fR, the result is \fGint\fR. If both are \fGfloat\fR or \fGdoub. .ms 7.1.2 \fIconstant\fR .et A decimal, octal, character, or floating constant is a primary expression. Its type is \fGint\fR in the first three cases, \fGdouble\fR in the last. .ms 7.1.3 \fIstring\fR .et A string is a primary expression. Its type is originally ``array of \fGchar\fR''; but following the same rule as in \(sc7.1.1 for identifiers, this is modified to ``pointer to \fGchar\fR'' and the result is a pointer to the first character in the string. .ms 7.1.4 \fG(\fI expression \fG)\fR .et A parethe object to which the expression points. If the type of the expression is ``pointer to .^.^.'', the type of the result is ``^.^.^.^''. .ms 7.2.2 \fG&\fI lvalue-expression\fR .et The result of the unary \fG&\fR operator is a pointer to the object referred to by the lvalue-expression. If the type of the lvalue-expression is ``^.^.^.^'', the type of the result is ``pointer to .^.^.''. .ms 7.2.3 \fG\(mi\fI expression\fR .et The result is the negative of the expression, and has the same type. The type of thele\fR, the result is \fGdouble\fR. If one is \fGchar\fR or \fGint\fR and one is \fGfloat\fR or \fGdouble\fR, the former is converted to \fGdouble\fR and the result is \fGdouble\fR. If an \fGint\fR or \fGchar\fR is added to a pointer, the former is converted by multiplying it by the length of the object to which the pointer points and the result is a pointer of the same type as the original pointer. Thus if P is a pointer to an object, the expression ``P+1'' is a pointer to another object of the same type asnthesized expression is a primary expression whose type and value are identical to those of the unadorned expression. The presence of parentheses does not affect whether the expression is an lvalue. .ms 7.1.5 \fIprimary-expression\fG [\fI expression \fG]\fR .et A primary expression followed by an expression in square brackets is a primary expression. The intuitive meaning is that of a subscript. Usually, the primary expression has type ``pointer to .^.^.'', the subscript expression is \fGint\fR, and the ty expression must be \fGchar\fR, \fGint\fR, \fGfloat\fR, or \fGdouble\fR. .ms 7.2.4 \fG!\fI expression\fR .et The result of the logical negation operator \fG!\fR is 1 if the value of the expression is 0, 0 if the value of the expression is non-zero. The type of the result is \fGint\fR. This operator is applicable only to \fGint\fRs or \fGchar\fRs. .ms 7.2.5 \fG\*~\fI expression\fR .et The \*~ operator yields the one's complement of its operand. The type of the expression must be \fGint\fR or \fGchar\fR, an the first and immediately following it in storage. .pg No other type combinations are allowed. .ms 7.4.2 \fIexpression \fG\(mi \fIexpression\fR .et The result is the difference of the operands. If both operands are \fGint\fR, \fGchar\fR, \fGfloat\fR, or \fGdouble\fR, the same type considerations as for \fG+\fR apply. If an \fGint\fR or \fGchar\fR is subtracted from a pointer, the former is converted in the same way as explained under \fG+\fR above. .pg If two pointers to objects of the same type are subtracted, the result is converted (by division by the length of the object) to an \fGint\fR representing the number of objects separating the pointed-to objects. This conversion will in general give unexpected results unless the pointers point to objects in the same array, since pointers, even to objects of the same type, do not necessarily differ by a multiple of the object-length. .ms 7.5 Shift operators .et The shift operators \fG<<\fR and \fG>>\fR group left-to-right. .ms 7.5.1 \fIexpression \fG<< \fIexpnd and third operand are the same, the result has their common type; otherwise the same conversion rules as for \fG+\fR apply. Only one of the second and third expressions is evaluated. .ms 7.14 Assignment operators .et There are a number of assignment operators, all of which group right-to-left. All require an lvalue as their left operand, and the type of an assignment expression is that of its left operand. The value is the value stored in the left operand after the assignment has taken place. .ms 7.14.1he function in which they are declared. .pg There are some severe restrictions on .bd register identifiers: there can be at most 3 register identifiers in any function, and the type of a register identifier can only be .bd int, .bd char, or pointer (not .bd float, .bd double, structure, function, or array). Also the address-of operator .bd & cannot be applied to such identifiers. .a Except for these restrictions (in return for which one is rewarded with faster, smaller code), register identifiers behave as ression\fR .br 7.5.2 \fIexpression \fG>> \fIexpression\fR .et Both operands must be \fGint\fR or \fGchar\fR, and the result is \fGint\fR. The second operand should be non-negative. The value of ``E1<>E2'' is E1 (interpreted as a two's complement, 16-bit quantity) arithmetically right-shifted E2 bit positions. Vacated bits are filled by a copy of the sign bit of E1. [Note: the use of ar \fIlvalue \fG= \fIexpression\fR .et The value of the expression replaces that of the object referred to by the lvalue. The operands need not have the same type, but both must be \fGint\fR, \fGchar\fR, \fGfloat\fR, \fGdouble\fR, or pointer. If neither operand is a pointer, the assignment takes place as expected, possibly preceded by conversion of the expression on the right. .pg When both operands are \fGint\fR or pointers of any kind, no conversion ever takes place; the value of the expression is simply sif they were automatic. In fact implementations of C are free to treat .bd register as synonymous with .bd auto. .pg If the sc-specifier is missing from a declaration, it is generally taken to be \fGauto\fR. .ms 8.2 Type specifiers .et The type-specifiers are .dp 6 type-specifier: \fGint\fR \fGchar\fR \fGfloat \fGdouble struct \fI{ type-decl-list }\fG struct \fIidentifier { type-decl-list }\fG struct \fIidentifier .ed The \fGstruct\fR specifier is discussed in \(sc8.5. If the type-specifier ithmetic rather than logical shift does not survive transportation between machines.] .ms 7.6 Relational operators .et The relational operators group left-to-right, but this fact is not very useful; ``a\fI expression\fR .br .ne 4 7.6.3 \fIexpression \fG<=\fI expression\fR .br .ne 4 7.6.4 \fIexpression \fG>=\fI expression\fR .et The operators < (less than), > (greater than), <= (less thtored into the object referred to by the lvalue. Thus it is possible to generate pointers which will cause addressing exceptions when used. .ms .ta \w'0.00.00 'u 7.14.2 \fIlvalue \fG=+ \fIexpression\fR .br 7.14.3 \fIlvalue \fG=\(mi \fIexpression\fR .br 7.14.4 \fIlvalue \fG=\** \fIexpression\fR .br 7.14.5 \fIlvalue \fG=/ \fIexpression\fR .br 7.14.6 \fIlvalue \fG=% \fIexpression\fR .br 7.14.7 \fIlvalue \fG=>> \fIexpression\fR .br 7.14.8 \fIlvalue \fG=<< \fIexpression\fR .br 7.14.9 \fIlvalue \fG=& \fIexpressiois missing from a declaration, it is generally taken to be \fGint\fR. .ms 8.3 Declarators .et The declarator-list appearing in a declaration is a comma-separated sequence of declarators. .dp 2 declarator-list: declarator declarator \fG,\fI declarator-list .ed The specifiers in the declaration indicate the type and storage class of the objects to which the declarators refer. Declarators have the syntax: .dp 6 declarator: identifier \fG\**\fI declarator declarator \fG( )\fI declarator \fG[ \fIcan or equal to) and >= (greater than or equal to) all yield 0 if the specified relation is false and 1 if it is true. Operand conversion is exactly the same as for the \fG+\fR operator except that pointers of any kind may be compared; the result in this case depends on the relative locations in storage of the pointed-to objects. It does not seem to be very mean$ing$ful to compare pointers with integers other than 0. .ms .ti 0 7.7 Equality operators .et .ne 4 .ti 0 7.7.1 \fIexpression \fG==\fI expression\fn\fR .br .tr ^^ 7.14.10 \fIlvalue \fG=^ \fIexpression\fR .br .tr ^\| 7.14.11 \fIlvalue \fG=^\(or \fIexpression\fR .et The behavior of an expression of the form ``E1@=op@E2'' may be inferred by taking it as equivalent to ``E1@=@E1@op@E2''; however, E1 is evaluated only once. Moreover, expressions like ``i@=+@p'' in which a pointer is added to an integer, are forbidden. .ms 7.15 \fIexpression \fG,\fI expression\fR .et A pair of expressions separated by a comma is evaluated left-to-right and the value of the onstant-expression\*(op \fG] \fG( \fIdeclarator \fG) .ed The grouping in this definition is the same as in expressions. .ms 8.4 Meaning of declarators .et Each declarator is taken to be an assertion that when a construction of the same form as the declarator appears in an expression, it yields an object of the indicated type and storage class. Each declarator contains exactly one identifier; it is this identifier that is declared. .pg If an unadorned identifier appears as a declarator, then it has the tyR .br .ne 4 7.7.2 \fIexpression \fG!=\fI expression\fR .et The \fG==\fR (equal to) and the \fG!=\fR (not equal to) operators are exactly analogous to the relational operators except for their lower precedence. (Thus ``a^b^)? a^:^b^ot explicitly initialized is guaranteed to be 0. .ul 11. Scope rules .et A complete C program need not all be compiled at the same time: the source text of the program may be kept in several files, and precompiled routines may be loaded from libraries. Communication among the functions of a program may be carried out both through explicit calls and through manipulation of external data. .pg Therefore, there are two kinds of scope to consider: first, what may be called the \fIlexical scope\fR of an identifiscanning of the replacement string is attempted. This facility is most valuable for definition of ``manifest constants'', as in .sp .7 .nf .bG # define tabsize 100 .^.^. int table[tabsize]; .sp .7 .eG .fi .ms 12.2 File inclusion .et Large C programs often contain many external data definitions. Since the lexical scope of external definitions extends to the end of the program file, it is good practice to put all the external definitions for data at the start of the program file, so that the functions def; return^(^m^>^c? m^:^c^)^; } .sp .7 .eG .fi Here ``int'' is the type-specifier; ``max(a,@b,@c)'' is the function-declarator; ``int@a,@b,@c;'' is the type-decl-list for the formal parameters; ``{@.^.^.@}'' is the function-statement. .pg C converts all \fGfloat\fR actual parameters to \fGdouble\fR, so formal parameters declared \fGfloat\fR have their declaration adjusted to read \fGdouble\fR. Also, since a reference to an array in any context (in particular as an actual parameter) is taken to mean a pointer, which is essentially the region of a program during which it may be used without drawing ``undefined identifier'' diagnostics; and second, the scope associated with external identifiers, which is characterized by the rule that references to the same external identifier are references to the same object. .ms 11.1 Lexical scope .et C is not a block-structured language; this may fairly be considered a defect. The lexical scope of names declared in external definitions extends from their definition throughined within the file need not repeat tedious and error-prone declarations for each external identifier they use. It is also useful to put a heavily used structure definition at the start and use its structure tag to declare the \fGauto\fR pointers to the structure used within functions. To further exploit this technique when a large C program consists of several files, a compiler control line of the form .dp 1 \fG# include "\fIfilename^\fG" .ed results in the replacement of that line by the entire contentser to the first element of the array, declarations of formal parameters declared ``array of ...'' are adjusted to read ``pointer to ...''. Finally, because neither structures nor functions can be passed to a function, it is useless to declare a formal parameter to be a structure or function (pointers to structures or functions are of course permitted). .pg A free \fGreturn\fR statement is supplied at the end of each function definition, so running off the end causes control, but no value, to be returned to  the end of the file in which they appear. The lexical scope of names declared at the head of functions (either as formal parameters or in the declarations heading the statements constituting the function itself) is the body of the function. .pg It is an error to redeclare identifiers already declared in the current context, unless the new declaration specifies the same type and storage class as already possessed by the identifiers. .ms 11.2 Scope of externals .et If a function declares an identifier to be of the file \fIfilename\fR. .pg .ul 13. Implicit declarations .et It is not always necessary to specify both the storage class and the type of identifiers in a declaration. Sometimes the storage class is supplied by the context: in external definitions, and in declarations of formal parameters and structure members. In a declaration inside a function, if a storage class but no type is given, the identifier is assumed to be \fGint\fR; if a type but no storage class is indicated, the identifier is assumed tthe caller. .ms 10.2 External data definitions .et An external data definition has the form .dp 2 data-definition: \fGextern\*(op \fItype-specifier\*(op init-declarator-list\*(op \fG; .ed The optional .ft G extern .ft R specifier is discussed in \(sc 11.2. If given, the init-declarator-list is a comma-separated list of declarators each of which may be followed by an initializer for the declarator. .dp 2 init-declarator-list: init-declarator init-declarator \fG, \fIinit-declarator-list .ed .dp 2 in \fGextern\fR, then somewhere among the files or libraries constituting the complete program there must be an external definition for the identifier. All functions in a given program which refer to the same external identifier refer to the same object, so care must be taken that the type and extent specified in the definition are compatible with those specified by each function which references the data. .pg In \s8PDP\s10-11 C, it is explicitly permitted for (compatible) external definitions of the same ideo be \fGauto\fR. An exception to the latter rule is made for functions, since \fGauto\fR functions are mean$ing$less (C being incapable of compiling code into the stack). If the type of an identifier is ``function returning ...'', it is implicitly declared to be \fGextern\fR. .pg In an expression, an identifier followed by \fG(\fR and not currently declared is contextually declared to be ``function returning \fGint\fR''. .pg Undefined identifiers not followed by \fG(\fR are assumed to be labels which will bit-declarator: declarator initializer\*(op .ed Each initializer represents the initial value for the corresponding object being defined (and declared). .dp 5 initializer: constant { constant-expression-list } .ed .dp 3 constant-expression-list: constant-expression constant-expression \fG,\fI constant-expression-list .ed Thus an initializer consists of a constant-valued expression, or comma-separated list of expressions, inside braces. The braces may be dropped when the expression is just a plainntifier to be present in several of the separately-compiled pieces of a complete program, or even twice within the same program file, with the important limitation that the identifier may be initialized in at most one of the definitions. In other operating systems, however, the compiler must know in just which file the storage for the identifier is allocated, and in which file the identifier is merely being referred to. In the implementations of C for such systems, the appearance of the .ft G extern .ft R ke defined later in the function. (Since a label is not an lvalue, this accounts for the ``Lvalue required'' error message sometimes noticed when an undeclared identifier is used.) Naturally, appearance of an identifier as a label declares it as such. .pg For some purposes it is best to consider formal parameters as belonging to their own storage class. In practice, C treats parameters as if they were automatic (except that, as mentioned above, formal parameter arrays and \fGfloat\fRs are treated specially). constant. The exact meaning of a constant expression is discussed in \(sc15. The expression list is used to initialize arrays; see below. .pg The type of the identifier being defined should be compatible with the type of the initializer: a \fGdouble\fR constant may initialize a \fGfloat\fR or \fGdouble\fR identifier; a non-floating-point expression may initialize an \fGint\fR, \fGchar\fR, or pointer. .pg An initializer for an array may contain a comma-separated list of compile-time expressions. The length eyword before an external definition indicates that storage for the identifiers being declared will be allocated in another file. Thus in a multi-file program, an external data definition without the .ft G extern .ft R specifier must appear in exactly one of the files. Any other files which wish to give an external definition for the identifier must include the .ft G extern .ft R in the definition. The identifier can be initialized only in the file where storage is allocated. .pg In \s8PDP\s10-11 C none of  .ul 14. Types revisited .et This section summarizes the operations which can be performed on objects of certain types. .ms 14.1 Structures .et There are only two things that can be done with a structure: pick out one of its members (by means of the \fG^.^\fR or \fG\(mi>\fR operators); or take its address (by unary \fG&\fR). Other operations, such as assigning from or to it or passing it as a parameter, draw an error message. In the future, it is expected that these operations, but not necessarily others,of the array is taken to be the maximum of the number of expressions in the list and the square-bracketed constant in the array's declarator. This constant may be missing, in which case 1 is used. The expressions initialize successive members of the array starting at the origin (subscript 0) of the array. The acceptable expressions for an array of type ``array of ...'' are the same as those for type ``...''. As a special case, a single string may be given as the initializer for an array of \fGchar\fRs; in tthis nonsense is necessary and the .ft G extern .ft R specifier is ignored in external definitions. .ul 12. Compiler control lines .et When a line of a C program begins with the character \fG#\fR, it is interpreted not by the compiler itself, but by a preprocessor which is capable of replacing instances of given identifiers with arbitrary token-strings and of inserting named files into the source program. In order to cause this preprocessor to be invoked, it is necessary that the very first line of the pro will be allowed. .ms 14.2 Functions .et There are only two things that can be done with a function: call it, or take its address. If the name of a function appears in an expression not in the function-name position of a call, a pointer to the function is generated. Thus, to pass one function to another, one might say .bG .sp .7 .nf int f(^^); ... g(^f^); .sp .7 .eG .ft R Then the definition of \fIg \fRmight read .sp .7 .bG g^(^funcp^) int (\**funcp)^(^^); { .^.^. (\**funcp)^(^^); .^.^. } .sp his case, the characters in the string are taken as the initializing values. .pg Structures can be initialized, but this operation is incompletely implemented and machine-dependent. Basically the structure is regarded as a sequence of words and the initializers are placed into those words. Structure initialization, using a comma-separated list in braces, is safe if all the members of the structure are integers or pointers but is otherwise ill-advised. .pg The initial value of any externally-defined object ngram begin with \fG#\fR. Since null lines are ignored by the preprocessor, this line need contain no other information. .ms 12.1 Token replacement .et A compiler-control line of the form .dp 1 \fG# define \fIidentifier token-string .ed (note: no trailing semicolon) causes the preprocessor to replace subsequent instances of the identifier with the given string of tokens (except within compiler control lines). The replacement token-string has comments removed from it, and it is surrounded with blanks. No re.7 .eG .fi Notice that \fIf\fR was declared explicitly in the calling routine since its first appearance was not followed by \fG(\fR^. .ms 14.3 Arrays, pointers, and subscripting .et Every time an identifier of array type appears in an expression, it is converted into a pointer to the first member of the array. Because of this conversion, arrays are not lvalues. By definition, the subscript operator \fG[^]\fR is interpreted in such a way that ``E1[E2]'' is identical to ``\**(^(^E1)^+^(E2^)^)''. Because of the conversion rules which apply to \fG+\fR, if E1 is an array and E2 an integer, then E1[E2] refers to the E2-th member of E1. Therefore, despite its asymmetric appearance, subscripting is a commutative operation. .pg A consistent rule is followed in the case of multi-dimensional arrays. If E is an \fIn^\fR-dimensional array of rank .ft I i^\(mu^j^\(mu^.^.^.^\(muk, .ft R then E appearing in an expression is converted to a pointer to an (\fIn\fR\(mi1)-dimensional array with rank .ft I j^\(mu^.^.^.^\(muk. .f.ul 16. Examples. .et These examples are intended to illustrate some typical C constructions as well as a serviceable style of writing C programs. .ms 16.1 Inner product .et This function returns the inner product of its array arguments. .sp .7 .nf .bG double inner^(^v1, v2, n^)^ double v1^[^^]^, v2^[^^]^; { double sum^; int i^; sum = 0.0^; for ^(^i=0^; itword^)^; p\(mi>count = 1^; p\(mi>right = p\(mi>left = 0^; return^(^p^)^; } /\** Is word repeated? \**/ if ^(^^(^cond=compar^(^p\(mi>tword, word^)^^)^ \fR==\fG 0^)^ { p\(mi>count\fR++\fG^; return^(^p^)^; } /\** Sort into left or right \**/ if ^(^cond<0^)^ p\(mi>left = tree^(^p\(mi>left, word^)^; else p\(mi>right = tree^(^p\(mi>right, word^)^; return^(^p^)^; } /\** \** Print the tree by printing the left subtree, the \ given node, and the right subtree. \**/ tprint^(^p^)^t R If the \fG\**\fR operator, either explicitly or implicitly as a result of subscripting, is applied to this pointer, the result is the pointed-to (\fIn\fR\(mi1)-dimensional array, which itself is immediately converted into a pointer. .pg For example, consider .sp .7 .bG int x[3][5]; .sp .7 .eG Here \fIx\fR is a 3\(mu5 array of integers. When \fIx\fR appears in an expression, it is converted to a pointer to (the first of three) 5-membered arrays of integers. In the expression ``x[^i^]'', which is equivalt, but perhaps a little less clear. It uses the facts that parameter arrays are really pointers, and that all parameters are passed by value. .sp .7 .nf .bG double inner^(^v1, v2, n^)^ double \**v1, \**v2^; { double sum^; sum = 0.0^; while^(^n\fR\fR\(mi\(mi\fG\fG^)^ sum \fR=+\fG \**v1\fR++\fG \** \**v2\fR++\fG^; return^(^sum^)^; } .fi .eG .sp .7 The declarations for the parameters are really exactly the same as in the last example. In the first case array declarations ``^[^^^]^'' were given struct tnode \**p^; { while ^(^p^)^ { tprint^(^p\(mi>left^)^; printf^(^"%d: %s\\n", p\(mi>count, p\(mi>tword^)^; p = p\(mi>right^; } } /\** \** String comparison: return number ^(^>, =, <^)^ 0 \** according as s1 ^(^>, =, <^)^ s2. \**/ compar^(^s1, s2^)^ char \**s1, \**s2^; { int c1, c2^; .sp .5 while^(^^(^c1 = \**s1\fR++\fG^)^ \fR==\fG ^(^c2 = \**s2\fR++\fG^)^^)^ if ^(^c1\fR==\fG\(aa\\0\(aa^)^ return^(^0^)^; return^(^c2\(mic1^)^; } /\** \** String copy: copy s1 into s2 until the null ent to ``\**(x+i)'', \fIx\fR is first converted to a pointer as described; then \fIi\fR is converted to the type of \fIx\fR, which involves multiplying \fIi\fR by the length the object to which the pointer points, namely 5 integer objects. The results are added and indirection applied to yield an array (of 5 integers) which in turn is converted to a pointer to the first of the integers. If there is another subscript the same argument applies again; this time the result is an integer. .pg It follows from all to emphasize that the parameters would be referred to as arrays; in the second, pointer declarations were given because the indirection operator and ++ were used. .ms 16.2 Tree and character processing .et Here is a complete C program ^(^courtesy of R. Haight^)^ which reads a document and produces an alphabetized list of words found therein together with the number of occurrences of each word. The method keeps a binary tree of words such that the left descendant tree for each word has all the words lexico \** character appears. \**/ copy^(^s1, s2^)^ char \**s1, \**s2^; { while^(^\**s2\fR++\fG = \**s1\fR++\fG^)^; } /\** \** Node allocation: return pointer to a free node. \** Bomb out when all are gone. Just for fun, there \** is a mechanism for using nodes that have been \** freed, even though no one here calls "free." \**/ struct tnode \**alloc^(^^)^ { struct tnode \**t^; .sp .5 if ^(^freep^)^ { t = freep^; freep = freep\(mi>left^; return^(^t^)^; } if ^(^\fR\(mi\(mi\fGnnodes < 0^)^ { pri this that arrays in C are stored row-wise (last subscript varies fastest) and that the first subscript in the declaration helps determine the amount of storage consumed by an array but plays no other part in subscript calculations. .ms 14.4 Labels .et Labels do not have a type of their own; they are treated as having type ``array of \fGint\fR''. Label variables should be declared ``pointer to \fGint\fR''; before execution of a \fGgoto\fR referring to the variable, a label (or an expression deriving from agraphically smaller than the given word, and the right descendant has all the larger words. Both the insertion and the printing routine are recursive. .pg The program calls the library routines \fIgetchar\fR to pick up characters and \fIexit\fR to terminate execution. \fIPrintf\fR is called to print the results according to a format string. A version of \fIprintf\fR is given below ^(^\(sc16.3^)^. .pg Because all the external definitions for data are given at the top, no \fGextern\fR declarations are necessantf^(^"Out of space\\n"^)^; exit^(^^)^; } return^(^spacep\fR++\fG^)^; } /\** \** The uncalled routine which puts a node on the free list. \**/ free^(^p^)^ struct tnode \**p^; { p\(mi>left = freep^; freep = p^; } .sp .7 .fi .eG .in 0 To illustrate a slightly different technique of handling the same problem, we will repeat fragments of this example with the tree nodes treated explicitly as members of an array. The fundamental change is to deal with the subscript of the array member under discussion, i label) should be assigned to the variable. .pg Label variables are a bad idea in general; the \fGswitch\fR statement makes them almost always unnecessary. .ul 15. Constant expressions .et In several places C requires expressions which evaluate to a constant: after .ft G case, .ft R as array bounds, and in initializers. In the first two cases, the expression can involve only integer constants, character constants, and .ft G sizeof .ft R expressions, possibly connected by the binary operators .tr ^^ .dp + ry within the functions. To stay within the rules, a type declaration is given for each non-integer function when the function is used before it is defined. However, since all such functions return pointers which are simply assigned to other pointers, no actual harm would result from leaving out the declarations; the supposedly \fGint\fR function values would be assigned without error or complaint. .sp .7 .nf .in .5i .bG .ta .5i 1i 3i # define nwords 100 /\** number of different words \**/ # define wsize 20nstead of a pointer to it. The \fGstruct\fR declaration becomes .sp .7 .nf .bG struct tnode { char tword^[^wsize^]^; int count; int left; int right; }; .fi .eG .sp .7 and \fIalloc\fR becomes .sp .7 .nf .bG alloc^(^^)^ { int t; .sp .5 t = \fR\(mi\(mi\fGnnodes; if ^(^t<=0^)^ { printf^(^"Out of space\\n"^)^; exit^(^^)^; } return^(^t^)^; } .fi .eG .sp .7 The \fIfree\fR stuff has disappeared because if we deal with exclusively with subscripts some sort of map has to be kept, which is \(mi \** / % & \(or ^ << >> .ed or by the unary operators .dp \(mi \*~ .ed .tr ^\| Parentheses can be used for grouping, but not for function calls. .pg A bit more latitude is permitted for initializers; besides constant expressions as discussed above, one can also apply the unary \fG&\fR operator to external scalars, and to external arrays subscripted with a constant expression. The unary \fG&\fR can also be applied implicitly by appearance of unsubscripted external arrays. The rule he /\** max chars per word \**/ struct tnode { /\** the basic structure \**/ char tword^[^wsize^]^; int count^; struct tnode \**left^; struct tnode \**right^; }^; .sp .7 struct tnode space^[^nwords^]^; /\** the words themselves \**/ int nnodes nwords^; /\** number of remaining slots \**/ struct tnode \**spacep space^; /\** next available slot \**/ struct tnode \**freep^; /\** free list \**/ /\** \** The main routine reads words until end-of-file \ ^(^\(aa\\0\(aa returned from "getchar"^)^ \** "tree" is too much trouble. .pg Now the \fItree\fR routine returns a subscript also, and it becomes: .sp .7 .nf .bG tree^(^p, word^)^ char word^[^^]^; { int cond; .sp .5 if ^(^p\fR==\fG0^)^ { p = alloc^(^^)^; copy^(^word, space^[^p^]^.tword^)^; space^[^p^]^.count = 1; space^[^p^]^.right = space^[^p^]^.left = 0; return^(^p^)^; } if ^(^^(^cond=compar^(^space^[^p^]^.tword, word^)^^)^ \fR==\fG 0^)^ { space^[^p^]^.count\fR++\fG; return^(^p^)^; } if ^(^cond<0^)^ space^[^p^]^.left = tre is that initializers must evaluate either to a constant or to the address of an external identifier plus or minus a constant.  called to sort each word into the tree. \**/ .ta .5i 1i 1.5i 2i 2.5i 3i main^(^^)^ { struct tnode \**top, \**tree^(^^)^; char c, word^[^wsize^]^; int i^; .sp .5 i = top = 0^; while ^(^c=getchar^(^^)^^)^ if ^(^\(aaa\(aa<=c && c<=\(aaz\(aa \(or\(or \(aaA\(aa<=c && c <=\(aaZ\(aa^)^ { if ^(^i>3^)^&017777^)^; putchar^(^^(^n&07^)^+\(aa0\(aa^)^; } .br .fi .eG .in 0 on of space to move right before plotting. .s3 .lp +5 5 \fBu\fR Next argument is fraction of space to move up before plotting. .s3 .i0 Points are connected by straight line segments in the order they appear in input. If a specified lower limit exceeds the upper limit, or if the automatic increment is negative, the graph is plotted upside down. Automatic abscissas begin with the lower \fIx\fR limit, or with 0 if no limit is specified. Grid lines and automatically determined limits fall on round values, howevnd. .PG We can do both the search for the desired line .ul and a substitution all at once, like this: .X1 /their/s/their/the/p .X2 which will yield .X1 to come to the aid of the party. .X2 There were three parts to that last command: context search for the desired line, make the substitution, print the line. .PG The expression ``/their/'' is a context search expression. In their simplest form, all context search expressions are like this \(mi a string of characters surrounded by slashes. Context searches ar ...ioliber roundness may be subverted by giving an inappropriately rounded lower limit. Plotting symbols specified by .bd c are placed so that a small initial letter, such as + o x, will fall approximately on the plotting point. .sh "SEE ALSO" spline (VI), plot (VI) .sh BUGS A limit of 1000 points is enforced silently. e interchangeable with line numbers, so they can be used by themselves to find and print a desired line, or as line numbers for some other command, like ``s''. We used them both ways in the examples above. .PG Suppose the buffer contains the three familiar lines .X1 Now is the time for all good men to come to the aid of their party. .X2 Then the .ul ed line numbers .X1 /Now/+1 /good/ /party/\(mi1 .X2 are all context search expressions, and they all refer to the same line (line 2). To make a change in line 2 ...xct1ct2ct3ct4ct5ct6ct7ct8ct9ct0instructionsnmacpipepipe.cprintxct1xct2xct3xct4xct5xct6xct7xct8xct9xct0xx  , we could say .X1 /Now/+1s/good/bad/ .X2 or .X1 /good/s/good/bad/ .X2 or .X1 /party/\(mi1s/good/bad/ .X2 The choice is dictated only by convenience. We could print all three lines by, for instance .X1 /Now/,/party/p .X2 or .X1 /Now/,/Now/+2p .X2 or by any number of similar combinations. The first one of these might be better if we don't know how many lines are involved. (Of course, if there were only three lines in the buffer, we'd use .X1 1,$p .X2 but not if there were several hundred.) .PG The basic rule is: a context search expression is .ul the same as a line number, so it can be used wherever a line number is needed. .H1 Exercise 6: .H2 .PG Experiment with context searching. Try a body of text with several occurrences of the same string of characters, and scan through it using the same context search. .PG Try using context searches as line numbers for the substitute, print and delete commands. (They can also be used with ``r'', ``w'', and ``a''.) .PG Try context searching using ``?text?'' instead of ``/mmarize some things about the ``p'' command and dot. Essentially ``p'' can be preceded by 0, 1, or 2 line numbers. If there is no line number given, it prints the ``current line'', the line that dot refers to. If there is one line number given (with or without the letter ``p''), it prints that line (and dot is set there); and if there are two line numbers, it prints all the lines in that range (and sets dot to the last line printed.) If two line numbers are specified the first can't be bigger than the seconlers!) .PG If no line numbers are given, the ``s'' command assumes we mean ``make the substitution on line dot'', so it changes things only on the current line. This leads to the very common sequence .X1 s/something/something else/p .X2 which makes some correction on the current line, and then prints it, to make sure it worked out right. If it didn't, we can try again. (Notice that we put a print command on the same line as the substitute. With few exceptions, ``p'' can follow any command; no other multi-cotext/''. This scans lines in the buffer in reverse order rather than normal. This is sometimes useful if you go too far while looking for some string of characters \(mi it's an easy way to back up. .PG (If you get funny results with any of the characters .X1 ^ \*. $ [ * \\ .X2 read the section on ``Special Characters''.) .PG .ul Ed provides a shorthand for repeating a context search for the same string. For example, the .ul ed line number .X1 /string/ .X2 will find the next occurrence of ``std (see Exercise 2.) .PG Typing a single newline will cause printing of the next line \(mi it's equivalent to ``\*.+1p''. Try it. Try typing ``^'' \(mi it's equivalent to ``\*.\(mi1p''. .H1 Deleting lines: the ``d'' command .H2 .PG Suppose we want to get rid of the three extra lines in the buffer. This is done by the .ul delete command .X1 d .X2 Except that ``d'' deletes lines instead of printing them, its action is similar to that of ``p''. The lines to be deleted are specified for ``d'' exactly as they aremmand lines are legal.) .PG It's also legal to say .X1 s/ . . . // .X2 which means ``change the first string of characters to \fInothing\fR'', i.e., remove them. This is useful for deleting extra words in a line or removing extra letters from words. For instance, if we had .X1 Nowxx is the time .X2 we can say .X1 s/xx//p .X2 to get .X1 Now is the time .X2 Notice that ``//'' here means ``no characters'', not a blank. There .ul is a difference! (See below for another meaning of ``//''.) ring''. It often happens that this is not the desired line, so the search must be repeated. This can be done by typing merely .X1 // .X2 This shorthand stands for ``the most recently used context search expression.'' It can also be used as the first string of the substitute command, as in .X1 /string1/s//string2/ .X2 which will find the next occurrence of ``string1'' and replace it by ``string2''. This can save a lot of typing. Similarly .X1 ?? .X2 means ``scan backwards for the same expression.''  for ``p'': .X1 \fIstarting line, ending line\fP d .X2 Thus the command .X1 4,$d .X2 deletes lines 4 through the end. There are now three lines left, as we can check by using .X1 1,$p .X2 And notice that ``$'' now is line 3! Dot is set to the next line after the last line deleted, unless the last line deleted is the last line in the buffer. In that case, dot is set to ``$''. .H1 Exercise 4: .H2 .PG Experiment with ``a'', ``e'', ``r'', ``w'', ``p'', and ``d'' until you are sure that you know what they do, an.th FORM VI 6/15/72 .sh NAME form \*- form letter generator .sh SYNOPSIS .bd form proto arg ... .sh DESCRIPTION .it Form generates a form letter from a prototype letter, an associative memory, arguments and in a special case, the current date. .s3 If .it form is invoked with the .it proto argument \fIx\fR, the associative memory is searched for an entry with name \fIx\fR and the contents filed under that name are used as the prototype. If the search fails, the message `[\fIx\fR]:' is typed on the console an"% #&d until you understand how dot, ``$'', and line numbers are used. .PG If you are adventurous, try using line numbers with ``a'', ``r'', and ``w'' as well. You will find that ``a'' will append lines .ul after the line number that you specify (rather than after dot); that ``r'' reads a file in .ul after the line number you specify (not necessarily at the end of the buffer); and that ``w'' will write out exactly the lines you specify, not necessarily the whole buffer. These variations are sometimes handy. For d whatever text is typed in from the console, terminated by two new lines, is used as the prototype. If the prototype argument is missing, `{letter}' is assumed. .s3 Basically, .it form is a copy process from the prototype to the output file. If an element of the form [\fIn\fR] (where \fIn\fR is a digit from 1 to 9) is encountered, the \fIn\fR-th .it arg is inserted in its place, and that argument is then rescanned. If [0] is encountered, the current date is inserted. If the desired argument has not been .H1 The current line \(mi ``Dot'' or ``.'' .H2 .PG Suppose our buffer still contains the six lines as above, that we have just typed .X1 1,3p .X2 and .ul ed has printed the three lines for us. Try typing just .X1 p (no line numbers). .X2 This will print .X1 to come to the aid of their party. .X2 which is the third line of the buffer. In fact it is the last (most recent) line that we have done anything with. (We just printed it!) We can repeat this ``p'' command without line numbers, and it will continue to instance you can insert a file at the beginning of a buffer by saying .X1 0r filename .X2 and you can enter lines at the beginning of the buffer by saying .X1 0a .li . . . \fItext\fP . . . .li \fB.\fR .X2 Notice that ``\*.w'' is .ul very different from .X1 .li \fB.\fR w .X2 .H1 Modifying text: the Substitute command ``s'' .H2 .PG We are now ready to try one of the most important of all commands \(mi the substitute command .X1 s .X2 This is the command that is used to change individual words or letters withigiven, a message of the form `[\fIn\fR]:' is typed. The response typed in then is used for that argument. .s3 If an element of the form [\fIname\fR] or {\fIname\fR} is encountered, the \fIname\fR is looked up in the associative memory. If it is found, the contents of the memory under this \fIname\fR replaces the original element (again rescanned). If the \fIname\fR is not found, a message of the form `[\fIname\fR]:' is typed. The response typed in is used for that element. The response is entered in the print line 3. .PG The reason is that .ul ed maintains a record of the last line that we did anything to (in this case, line 3, which we just printed) so that it can be used instead of an explicit line number. This most recent line is referred to by the shorthand symbol .X1 .li \fB.\fR (pronounced ``dot''). .X2 Dot is a line number in the same way that ``$'' is; it means exactly ``the current line'', or loosely, ``the line we most recently did something to.'' We can use it in several ways \(mi one possibilitn a line or group of lines. It is what we use, for example, for correcting spelling mistakes and typing errors. .PG Suppose that by a typing error, line 1 says .X1 Now is th time .X2 \(mi the ``e'' has been left off ``the''. We can use ``s'' to fix this up as follows: .X1 1s/th/the/ .X2 This says: ``in line 1, substitute for the characters `th' the characters `the'.'' To verify that it works (\fIed\fR will not print the result automatically) we say .X1 p .X2 and get .X1 Now is the time .X2 which is what we memory under the name if the name is enclosed in [ ]. The response is not entered in the memory but is remembered for the duration of the letter if the name is enclosed in {}. Brackets and braces may be nested. .s3 In both of the above cases, the response is typed in by entering arbitrary text terminated by two new lines. Only the first of the two new lines is passed with the text. .s3 If one of the special characters [{]}\\ is preceded by a \\, it loses its special character. .s3 If a file named `forma' ay is to say .X1 .li \fB.\fR,$p .X2 This will print all the lines from (including) the current line to the end of the buffer. In our case these are lines 3 through 6. .PG Some commands change the value of dot, while others do not. The print command sets dot to the number of the last line printed; by our last command, we would have ``\*.'' = ``$'' = 6. .PG Dot is most useful when used in combinations like this one: .X1 .li \fB.\fR+1 (or equivalently, \*.+1p) .X2 This means ``print the next line'' and gives uswanted. Notice that dot must have been set to the line where the substitution took place, since the ``p'' command printed that line. Dot is always set this way with the ``s'' command. .PG The general way to use the substitute command is .X1 \fIstarting-line, ending-line\fP s/\fIchange this\fP/\fIto this\fP/ .X2 Whatever string of characters is between the first pair of slashes is replaced by whatever is between the second pair, in .ul all the lines between starting line and ending line. Only the first occurlready exists in the user's directory, `formb' is used as the output file and so forth to `formz'. .s3 The file `form.m' is created if none exists. Because form.m is operated on by the disc allocator, it should only be changed by using .it fed, the form letter editor, or .it form. .s3 .sh FILES form.m associative memory .br form? output file (read only) .sh "SEE ALSO" fed (VI), roff (I) .sh BUGS An unbalanced ] or } acts as an end of file but may add a few strange entries to the associative memory.  a handy way to step slowly through a buffer. We can also say .X1 .li \fB.\fR\(mi1 (or \*.\(mi1p ) .X2 which means ``print the line .ul before the current line.'' This enables us to go backwards if we wish. Another useful one is something like .X1 .li \fB.\fR\(mi3,\*.\(mi1p .X2 which prints the previous three lines. .PG Don't forget that all of these change the value of dot. You can find out what dot is at any time by typing .X1 .li \fB.\fR= .X2 .ul Ed will respond by printing the value of dot. .PG Let's surence on each line is changed, however. If you want to change .ul every occurrence, see Exercise 5. The rules for line numbers are the same as those for ``p'', except that dot is set to the last line changed. (But there is a trap for the unwary: if no substitution took place, dot is .ul not changed. This causes an error ``?'' as a warning.) .PG Thus we can say .X1 1,$s/speling/spelling/ .X2 and correct the first spelling mistake on each line in the text. (This is useful for people who are consistent misspel(+.147:=),/25.H1 Writing text out as a file \(mi the Write command ``w'' .H2 .PG It's likely that we'll want to save our text for later use. To write out the contents of the buffer onto a file, we use the .ul write command .X1 w .X2 followed by the filename we want to write on. This will copy the buffer's contents onto the specified file (destroying any previous information on the file). To save the text on a file named ``junk'', for example, type .X1 w junk .X2 Leave a space between ``w'' and the file name. .ul Ed willed the file name wrong. Try alternately reading and appending to see that they work similarly. Verify that .X1 ed filename .X2 is exactly equivalent to .X1 ed e filename .X2 What does .X1 f filename .X2 do? .H1 Printing the contents of the buffer \(mi the Print command ``p'' .H2 .PG To .ul print or list the contents of the buffer (or parts of it) on the terminal, we use the print command .X1 p .X2 The way this is done is as follows. We specify the lines where we want printing to begin and where we want it t contents of the strings with names given by the arguments. .s3 .lp +3 3 .bd q .br returns to the system. .s3 .lp +3 3 .bd c [ .bd p ] [ .bd f ] .br checks the associative memory file for consistency and reports the number of free headers and blocks. The optional arguments do the following: .s3 .lp +6 3 \fBp\fR causes any unaccounted-for string to be printed. .s3 .lp +6 3 \fBf\fR fixes broken memories by adding unaccounted-for headers to free storage and removing references to released headers from associ respond by printing the number of characters it wrote out. In our case, .ul ed would respond with .X1 68 .X2 (Remember that blanks and the newline character at the end of each line are included in the character count.) Writing a file just makes a copy of the text \(mi the buffer's contents are not disturbed, so we can go on adding lines to it. This is an important point. .ul Ed at all times works on a copy of a file, not the file itself. No change in the contents of a file takes place until you give a ``w'o end, separated by a comma, and followed by the letter ``p''. Thus to print the first two lines of the buffer, for example, (that is, lines 1 through 2) we say .X1 1,2p (starting line=1, ending line=2 p) .X2 .ul Ed will respond with .X1 Now is the time for all good men .X2 .PG Suppose we want to print .ul all the lines in the buffer. We could use ``1,3p'' as above if we knew there were exactly 3 lines in the buffer. But in general, we don't know how many there are, so what do we use for the ending line numative memory. .br .i0 .dt .sh FILES /tmp/ftmp? temporary .br form.m associative memory .sh "SEE ALSO" form (VI), ed (I), sh (I) .sh WARNING It is legal but unwise to have string names with blanks, `*' or `?' in them. .sh BUGS ' command. (Writing out the text onto a file from time to time as it is being created is a good idea, since if the system crashes or if you make some horrible mistake, you will lose all the text in the buffer but any text that was written onto a file is relatively safe.) .H1 Leaving ed \(mi the Quit command ``q'' .H2 .PG To terminate a session with .ul ed, save the text you're working on by writing it onto a file using the ``w'' command, and then type the command .X1 q .X2 which stands for .ul quit. The sysber? .ul Ed provides a shorthand symbol for ``line number of last line in buffer'' \(mi the dollar sign ``$''. Use it this way: .X1 1,$p .X2 This will print .ul all the lines in the buffer (line 1 to last line.) If you want to stop the printing before it is finished, push the DEL or Delete key; .ul ed will type .X1 ? .X2 and wait for the next command. .PG To print the .ul last line of the buffer, we could use .X1 $,$p .X2 but .ul ed lets us abbreviate this to .X1 $p .X2 We can print any single line by typin.th FACTOR VI 1/15/73 .sh NAME factor \*- discover prime factors of a number .sh SYNOPSIS .bd factor [ number ] .sh DESCRIPTION When .it factor is invoked without an argument, it waits for a number to be typed in. If you type in a positive number less than 2\u\s756\s0\d (about .if n 7.2e16) .if t 7.2\(mu10\u\s716\s0\d\|) it will factor the number and print its prime factors; each one is printed the proper number of times. Then it waits for another number. It exits if it encounters a zero or any non-numeric tem will respond with ``%''. At this point your buffer vanishes, with all its text, which is why you want to write it out before quitting. .H1 Exercise 1: .H2 .PG Enter .ul ed and create some text using .X1 a .li . . . text . . . .li \fB.\fR .X2 Write it out using ``w''. Then leave .ul ed with the ``q'' command, and print the file, to see that everything worked. (To print a file, say .X1 pr filename .X2 or .X1 cat filename .X2 in response to ``%''. Try both.) .H1 Reading text from a file \(mi the Edit commag the line number followed by a ``p''. Thus .X1 1p .X2 produces the response .X1 Now is the time .X2 which is the first line of the buffer. .PG In fact, .ul ed lets us abbreviate even further: we can print any single line by typing .ul just the line number \(mi no need to type the letter ``p''. So if we say .X1 $ .X2 .ul ed will print the last line of the buffer for us. .PG We can also use ``$'' in combinations like .X1 $\(mi1,$p .X2 which prints the last two lines of the buffer. This helps when we want to character. .s3 If .it factor is invoked with an argument, it factors the number as above and then exits. .s3 Maximum time to factor is proportional to .if n sqrt(n) .if t \(sr\o'\fIn\fR\(rn' and occurs when .it n is prime or the square of a prime. It takes 1 minute to factor a prime near 10\u\s713\s0\d. .sh DIAGNOSTICS `Ouch.' for input out of range or for garbage input. .sh BUGS nd ``e'' .H2 .PG A common way to get text into the buffer is to read it from a file in the file system. This is what you do to edit text that you saved with the ``w'' command in a previous session. The .ul edit command ``e'' fetches the entire contents of a file into the buffer. So if we had saved the three lines ``Now is the time'', etc., with a ``w'' command in an earlier session, the .ul ed command .X1 e junk .X2 would fetch the entire contents of the file ``junk'' into the buffer, and respond .X1 68 .see how far we got in typing. .H1 Exercise 3: .H2 .PG .H2 As before, create some text using the append command and experiment with the ``p'' command. You will find, for example, that you can't print line 0 or a line beyond the end of the buffer, and that attempts to print a buffer in reverse order by saying .X1 3,1p .X2 don't work. .th CUBIC VI 11/1/73 .sh NAME cubic \*- three dimensional tic-tac-toe .sh SYNOPSIS .bd /usr/games/cubic .sh DESCRIPTION .it Cubic plays the game of three dimensional 4\*X4\*X4 tic-tac-toe. .hc ~ Moves are given by the three ~digits (each 1-4) specifying the coordinate of the square to be played. .sh WARNING Too much playing of the game will cause it to disappear. .sh BUGS X2 which is the number of characters in ``junk''. .ul If anything was already in the buffer, it is deleted first. .PG If we use the ``e'' command to read a file into the buffer, then we need not use a file name after a subsequent ``w'' command; .ul ed remembers the last file name used in an ``e'' command, and ``w'' will write on this file. Thus a common way to operate is .X1 ed e file [editing session] w q .X2 .PG You can find out at any time what file name .ul ed is remembering by typing the .ul file comm.th FED VI 1/15/73 .sh NAME fed \*- edit form letter memory .sh SYNOPSIS .bd fed .sh DESCRIPTION .it Fed is used to edit a form letter associative memory file, .bd form.m, which consists of named strings. Commands consist of single letters followed by a list of string names separated by a single space and ending with a new line. The conventions of the Shell with respect to `*' and `?' hold for all commands but \fBm\fR. The commands are: .s3 .lp +3 3 \fBe\fR name ... .br .it Fed writes the string whose name .th COL VI 5/20/74 .sh NAME col \*- filter reverse line feeds .sh SYNOPSIS .bd col .sh DESCRIPTION .it Col reads the standard input and writes the standard output. It performs the line overlays implied by reverse line feeds (ascii code ESC-7). .it Col is particularly useful for filtering multicolumn output made with the `.rt' command of .it nroff. .sh "SEE ALSO" nroff (I) .sh BUGS Can't back up more than 102 lines. and ``f''. In our case, if we typed .X1 f .X2 .ul ed would reply .X1 junk .X2 .H1 Reading text from a file \(mi the Read command ``r'' .H2 .PG Sometimes we want to read a file into the buffer without destroying anything that is already there. This is done by the .ul read command ``r''. The command .X1 r junk .X2 will read the file ``junk'' into the buffer; it adds it to the end of whatever is already in the buffer. So if we do a read after an edit: .X1 e junk r junk .X2 the buffer will contain .ul two copieis .it name onto a temporary file and executes .it ed. On exit from the \fIed\fR the temporary file is copied back into the associative memory. Each argument is operated on separately. Be sure to give an editor .it w command (without a filename) to rewrite .it fed's temporary file before quitting out of .it ed. .s3 .lp +3 3 .bd d [ name ... ] .br deletes a string and its name from the memory. When called with no arguments .bd d operates in a verbose mode typing each string name and deleting only if a .bd y.th CHESS VI 11/1/73 .sh NAME chess \*- the game of chess .sh SYNOPSIS .bd /usr/games/chess .sh DESCRIPTION .it Chess is a computer program that plays class D chess. Moves may be given either in standard (descriptive) notation or in algebraic notation. The symbol `+' is used to specify check; `o-o' and `o-o-o' specify castling. To play black, type `first'; to print the board, type an empty line. .s3 Each move is echoed in the appropriate notation followed by the program's reply. .sh FILES /usr/lib/book opes of the text (six lines). .X1 Now is the time for all good men to come to the aid of their party. Now is the time for all good men to come to the aid of their party. .X2 Like the ``w'' and ``e'' commands, ``r'' prints the number of characters read in, after the reading operation is complete. .PG Generally speaking, ``r'' is much less used than ``e''. .H1 Exercise 2: .H2 .PG Experiment with the ``e'' command \(mi try reading and printing various files. You may get an error ``?'', typically because you spell is typed. A .bd q response returns to \fIfed\fR's command level. Any other response does nothing. .s3 .lp +3 3 .bd m name1 name2 ... .br (move) changes the name of name1 to name2 and removes previous string name2 if one exists. Several pairs of arguments may be given. Literal strings are expected for the names. .s3 .lp +3 3 .bd n [ name ... ] .br (names) lists the string names in the memory. If called with the optional arguments, it just lists those requested. .s3 .lp +3 3 .bd p name ... .br prints thening `book' .sh DIAGNOSTICS The most cryptic diagnostic is `eh?' which means that the input was syntactically incorrect. .sh WARNING Over-use of this program will cause it to go away. .sh BUGS Pawns may be promoted only to queens. CFILORUADGt means ``append (or add) text lines to the buffer, as I type them in.'' Appending is rather like writing fresh material on a piece of paper. .PG So to enter lines of text into the buffer, we just type an ``a'' followed by a newline, followed by the lines of text we want, like this: .X1 a Now is the time for all good men to come to the aid of their party. .li \fB.\fR .X2 .PG The only way to stop appending is to type a line that contains only a period. The ``\*.'' is used to tell .ul ed that we have finished.tr | .th AZEL VI 6/3/74 .sh NAME azel \*- satellite predictions .sh SYNOPSIS .bd azel [ .bd \-d ] [ .bd \-l ] satellite1 [ .bd \-d ] [ .bd \-l ] satellite2 ... .sh DESCRIPTION .it Azel predicts, in convenient form, the apparent trajectories of Earth satellites whose orbital elements are given in the argument files. If a given satellite name cannot be read, an attempt is made to find it in a directory of satellites maintained by the programs's author. The .bd \-d option causes .it azel to ask for a date and.TL A Tutorial Introduction to the \s-2UNIX\s+2 Text Editor .sp .AU B. W. Kernighan .sp .AI Bell Laboratories, Murray Hill, N. J. .nr PS 9 .nr VS 11 .if t .2C .H1 Introduction .H2 .PG .ul Ed is a ``text editor'', that is, an interactive program for creating and modifying ``text'', using directions provided by a user at a terminal. The text is often a document like this one, or a program or perhaps data for a program. .PG This introduction is meant to simplify learning .ul ed. The recommended way to learn .u appending. (Even experienced users forget that terminating ``\*.'' sometimes. If .ul ed seems to be ignoring you, type an extra line with just ``\*.'' on it. You may then find you've added some garbage lines to your text, which you'll have to take out later.) .PG After the append command has been done, the buffer will contain the three lines .X1 Now is the time for all good men to come to the aid of their party. .X2 The ``a'' and ``\*.'' aren't there, because they are not text. .PG To add more text to what read line|1 data (see below) from the standard input. The .bd \-l option causes .it azel to ask for the observer's latitude, west-longitude, and height above sea level. .s3 For each satellite given the program types its full name, the date, and a sequence of lines each containing a time, an azimuth, an elevation, a distance, and a visual magnitude. Each such line indicates that: at the indicated time, the satellite may be seen from Murray Hill (or provided location) at the indicated azimuth and elevation, l ed is to read this document, simultaneously using .ul ed to follow the examples, then to read the description in section I of the .S1 UNIX .S2 manual, all the while experimenting with .ul ed. (Solicitation of advice from experienced users is also useful.) .PG Do the exercises! They cover material not completely discussed in the actual text. An appendix summarizes the commands. .H1 Disclaimer .H2 .PG This is an introduction and a tutorial. For this reason, no attempt is made to cover more than a part of th we already have, just issue another ``a'' command, and continue typing. .H1 Error Messages \(mi ``?'' .H2 .PG If at any time you make an error in the commands you type to .ul ed, it will tell you by typing .X1 ? .X2 This is about as cryptic as it can be, but with practice, you can usually figure out how you goofed. and that its distance and apparent magnitude are as given. Predictions are printed only when the sky is dark (sun more than 5 degrees below the horizon) and when the satellite is not eclipsed by the earth's shadow. Satellites which have not been seen and verified will not have had their visual magnitude level set correctly. .s3 All times input and output by .it azel are GMT (Universal Time). .s3 The satellites for which elements are maintained are: .s3 .lp +10 10 sla,b,e,f,k Skylab A through Skylab K. Skylae facilities that .ul ed offers (although this fraction includes the most useful and frequently used parts). Also, there is not enough space to explain basic .S1 UNIX .S2 procedures. We will assume that you know how to log on to .S1 UNIX, .S2 and that you have at least a vague understanding of what a file is. .PG You must also know what character to type as the end-of-line on your particular terminal. This is a ``newline'' on Model 37 Teletypes, and ``return'' on most others. Throughout, we will refer to th.th CAL VI 11/1/73 .sh NAME cal \*- print calendar .sh SYNOPSIS .bd cal [ month ] year .sh DESCRIPTION .it Cal prints a calendar for the specified year. If a month is also specified, a calendar just for that month is printed. .it Year can be between 1 and 9999. The .it month is a number between 1 and 12. The calendar produced is that for England and her colonies. .s3 Try September 1752. .sh BUGS The year is always considered to start in January even though this is historically naive. b A is the laboratory; B was the rocket but it has crashed. A and probably K have been verified. .s3 .lp +10 10 cop Copernicus I. Never verified. .s3 .lp +10 10 oao Orbiting Astronomical Observatory. Seen and verified. .s3 .lp +10 10 pag Pageos I. Seen and verified; fairly dim (typically 2nd-3rd magnitude), but elements are extremely accurate. .s3 .lp +10 10 exp19 Explorer 19; seen and verified, but quite dim (4th-5th magnitude) and fast-moving. .s3 .lp +10 10 c103b, c156b, c184b, c206b, c220b, c461b, c500bis character, whatever it is, as ``newline''. .H1 Getting Started .H2 .PG We'll assume that you have logged in to .S1 UNIX .S2 and it has just said ``%''. The easiest way to get .ul ed is to type .X1 ed (followed by a newline) .X2 You are now ready to go \(mi .ul ed is waiting for you to tell it what to do. .H1 Creating Text \(mi the Append command ``a'' .H2 .PG As our first problem, suppose we want to create some text starting from scratch. Perhaps we are typing the very first draft of a paper; clearly it .th BJ VI 3/15/72 .sh NAME bj \*- the game of black jack .sh SYNOPSIS .bd /usr/games/bj .sh DESCRIPTION .it Bj is a serious attempt at simulating the dealer in the game of black jack (or twenty-one) as might be found in Reno. The following rules apply: .s3 .lp +5 5 The bet is $2 every hand. .s3 A player `natural' (black jack) pays $3. A dealer natural loses $2. Both dealer and player naturals is a `push' (no money exchange). .s3 If the dealer has an ace up, the player is allowed to make an `insurance' bet a .br Various of the USSR Cosmos series; none seen. .s3 .lp +10 10 7276a Unnamed (satellite # 72-76A); not seen. .s3 .i0 The element files used by .it azel contain five lines. The first line gives a year, month number, day, hour, and minute at which the program begins its consideration of the satellite, followed by a number of minutes and an interval in minutes. If the year, month, and day are 0, they are taken to be the current date (taken to change at 6 A.M. local time). The output report starts at the indwill have to start somewhere, and undergo modifications later. This section will show how to get some text in, just to get started. Later we'll talk about how to change it. .PG When .ul ed is first started, it is rather like working with a blank piece of paper \(mi there is no text or information present. This must be supplied by the person using .ul ed; it is usually done by typing in the text, or by reading it into .ul ed from a file. We will start by typing in some text, and return shortly to how to readgainst the chance of a dealer natural. If this bet is not taken, play resumes as normal. If the bet is taken, it is a side bet where the player wins $2 if the dealer has a natural and loses $1 if the dealer does not. .s3 If the player is dealt two cards of the same value, he is allowed to `double'. He is allowed to play two hands, each with one of these cards. (The bet is doubled also; $2 on each hand.) .s3 If a dealt hand has a total of ten or eleven, the player may `double down'. He may double the bet ($2icated epoch and prints the position of the satellite for the indicated number of minutes at times separated by the indicated interval. This line is ended by two numbers which specify options to the program governing the completeness of the report; they are ordinarily both ``1''. The first option flag suppresses output when the sky is not dark; the second supresses output when the satellite is eclipsed by the earth's shadow. The next line of an element file is the full name of the satellite. The next three  files. .PG First a bit of terminology. In .ul ed jargon, the text being worked on is said to be ``kept in a buffer.'' Think of the buffer as a work space, if you like, or simply as the information that you are going to be editing. In effect the buffer is like the piece of paper, on which we will write things, then change some of them, and finally file the whole thing away for another day. .PG The user tells .ul ed what to do to his text by typing instructions called ``commands.'' Most commands consist of a to $4) and receive exactly one more card on that hand. .s3 Under normal play, the player may `hit' (draw a card) as long as his total is not over twenty-one. If the player `busts' (goes over twenty-one), the dealer wins the bet. .s3 When the player `stands' (decides not to hit), the dealer hits until he attains a total of seventeen or more. If the dealer busts, the player wins the bet. .s3 If both player and dealer stand, the one with the largest total wins. A tie is a push. .s3 .i0 The machine deals and kare the elements themselves (including certain derivatives of the elements). .sh FILES /usr/jfo/el/* \*- orbital element files .sh "SEE ALSO" sky (VI) .sh AUTHOR J. F. Ossanna .sh BUGS  single letter, which must be typed in lower case. Each command is typed on a separate line. (Sometimes the command is preceded by information about what line or lines of text are to be affected \(mi we will discuss these shortly.) .ul Ed makes no response to most commands \(mi there is no prompting or typing of messages like ``ready''. (This silence is preferred by experienced users, but sometimes a hangup for beginners.) .PG The first command is .ul append, written as the letter .X1 a .X2 all by itself. Ieeps score. The following questions will be asked at appropriate times. Each question is answered by .bd y followed by a new line for `yes', or just new line for `no'. .s3 ? (means, ``do you want a hit?'') .br Insurance? .br Double down? .s3 Every time the deck is shuffled, the dealer so states and the `action' (total bet) and `standing' (total won or lost) is printed. To exit, hit the interrupt key (DEL) and the action and standing will be printed. .sh BUGS .ds . \fB.\fP .tr~ .ds . \fB.\fR . S1 - smaller in text .de S1 .nh .ps -1 .. . S2 - reverse S1 .de S2 .ps +1 .hy .. .de WS .sp \\$1 .. . H1 - start new section .de H1 .SH .. . H2 - after H1 title .de H2 .. . X1 - start of example .de X1 .nf .in +.3i .sp 4p .if t .tr -\(en .. . X2 - end of example .de X2 .sp 4p .tr -- .in -.3i .fi .. .de PG .PP .. ...e0e1e2e3 e4e5e6e7intabsentry. Each entry has the following format: .s3 .lp +24 20 path name 32 bytes .lp +24 20 mode 2 bytes .lp +24 20 uid 1 byte .lp +24 20 gid 1 byte .lp +24 20 unused 1 byte .lp +24 20 size 3 bytes .lp +24 20 time modified 4 bytes .lp +24 20 tape address 2 bytes .lp +24 20 unused 16 bytes .lp +24 20 check sum 2 bytes .s3 .i0 The path name entry is the path name of the file when put on the tape. If the pathname starts with a zero word, the entry is empty. It is at most 32 bytes long and ends in a null byte. Mods table is present only so people can look at it. It does not matter to .it mount if there are duplicated entries nor to .it umount if a name cannot be found. .sh FILES /etc/mtab .sh "SEE ALSO" mount (VIII), umount (VIII) .sh BUGS .th WTMP V 2/22/74 .sh NAME wtmp \*- user login history .sh DESCRIPTION This file records all logins and logouts. Its format is exactly like utmp (V) except that a null user name indicates a logout on the associated typewriter. Furthermore, the typewriter name `~' indicates that the system was rebooted at the indicated time; the adjacent pair of entries with typewriter names `|' and `}' indicate the system-maintained time just before and just after a .it date command has changed the system's idea of the time, uid, gid, size and time modified are the same as described under i-nodes (file system (V)). The tape address is the tape block number of the start of the contents of the file. Every file starts on a block boundary. The file occupies (size+511)/512 blocks of continuous tape. The checksum entry has a value such that the sum of the 32 words of the directory entry is zero. .s3 Blocks 25 (resp. 63) on are available for file storage. .s3 A fake entry (see tp (I)) has a size of zero. .sh "SEE ALSO" file system .th GROUP V 2/10/75 .sh NAME group \*- group file .sh DESCRIPTION .it Group contains for each group the following information: .s3 .lp +10 5 group name .lp +10 5 encrypted password .lp +10 5 numerical group ID .lp +10 5 a comma separated list of all users allowed in the group .s3 .i0 This is an ASCII file. The fields are separated by colons; Each group is separated from the next by a new-line. If the password field is null, no password is demanded. .s3 This file resides in directory /etc. Because of the ence. .s3 .it Wtmp is maintained by login (I) and init (VIII). Neither of these programs creates the file, so if it is removed record-keeping is turned off. It is summarized by ac (VIII). .sh FILES /usr/adm/wtmp .sh "SEE ALSO" utmp (V), login (I), init (VIII), ac (VIII), who (I) (V), tp (I) rypted passwords, it can and does have general read permission and can be used, for example, to map numerical group ID's to names. .sh FILES /etc/group .sh "SEE ALSO" newgrp (I), login (I), crypt (III), passwd (I) .th UTMP V 9/10/73 .sh NAME utmp \*- user information .sh DESCRIPTION This file allows one to discover information about who is currently using UNIX. The file is binary; each entry is 16(10) bytes long. The first eight bytes contain a user's login name or are null if the table slot is unused. The low order byte of the next word contains the last character of a typewriter name. The next two words contain the user's login time. The last word is unused. .sh FILES /etc/utmp .sh "SEE ALSO" init (VIII) and login .th TABS V 6/15/72 .sh NAME tabs \*- set tab stops .sh SYNOPSIS .bd "cat /usr/pub/tabs" .sh DESCRIPTION Printing this file on a suitable terminal sets tab stops every 8 columns. Suitable terminals include the Teletype model 37 and the GE TermiNet 300. .s3 These tab stop settings are desirable because UNIX assumes them in calculating delays. .th GREEK V 10/31/72 .sh NAME greek \*- graphics for extended TTY-37 type-box .sh SYNOPSIS .bd "cat /usr/pub/greek" .sh DESCRIPTION .it Greek gives the mapping from ascii to the ``shift out'' graphics in effect between SO and SI on model 37 Teletypes with a 128-character type-box. It contains: .s3 .nf .if n .ig .ta 1i .3i .75i 1i .3i .75i 1i .3i alpha \(*a A beta \(*b B gamma \(*g \\ GAMMA \(*G G delta \(*d D DELTA \(*D W epsilon \(*e S zeta \(*z Q eta \(*y N THETA \(*H T theta \(*h O lambda \(*l L LAMBDA(I), which maintain the file; who (I), which interprets it. .th PASSWD V 9/10/73 .sh NAME passwd \*- password file .sh DESCRIPTION .it Passwd contains for each user the following information: .s3 .lp +10 5 name (login name, contains no upper case) .lp +10 5 encrypted password .lp +10 5 numerical user ID .lp +10 5 numerical group ID (for now, always 1) .lp +10 5 GCOS job number, box number, optional GCOS user-id .lp +10 5 initial working directory .lp +10 5 program to use as Shell .s3 .i0 This is an ASCII file. Each field within each user's entry is separated from t \(*L E mu \(*m M nu \(*n @ xi \(*c X pi \(*p J PI \(*P P rho \(*r K sigma \(*s Y SIGMA \(*S R tau \(*t I phi \(*f U PHI \(*F F psi \(*q V PSI \(*Q H omega \(*w C OMEGA \(*W Z nabla \(gr [ not \(no \*_ partial \(pd ] integral \(is ^ .. .if t .ig .nf 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 .th TTYS V 2/11/75 .sh NAME ttys \*- typewriter initialization data .sh DESCRIPTION The .it ttys file is read by the .it init program and specifies which typewriter special files are to have a process created for them which will allow people to log in. It consists of lines of 3 characters each. .s3 The first character is either `0' or `1'; the former causes the line to be ignored, the latter causes it to be effective. The second character is the last character in the name of a typewriter; e.g. \fIx\fR referhe next by a colon. The GCOS field is used only when communicating with that system, and in other installations can contain any desired information. Each user is separated from the next by a new-line. If the password field is null, no password is demanded; if the Shell field is null, the Shell itself is used. .s3 This file resides in directory /etc. Because of the encrypted passwords, it can and does have general read permission and can be used, for example, to map numerical user ID's to names. .sh FILES /eP 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 ^ ^ .. .sh "SEE ALSO" ascii (VII) s to the file `/dev/tty\fIx\fR'. The third character is used as an argument to the .it getty program, which performs such tasks as baud-rate recognition, reading the login name, and calling .it login. For normal lines, the character is `0'; other characters can be used, for example, with hard-wired terminals where speed recognition is unnecessary or which have special characteristics. (Getty will have to be fixed in such cases.) .sh FILES /etc/ttys .sh "SEE ALSO" init (VIII), getty (VIII), login (I) tc/passwd .sh "SEE ALSO" login (I), crypt (III), passwd (I), group (V) opsvy|qtwz}.th TP V 9/10/73 .sh NAME tp \*- DEC/mag tape formats .sh DESCRIPTION The command .it tp dumps files to and extracts files from DECtape and magtape. The formats of these tapes are the same except that magtapes have larger directories. .s3 Block zero contains a copy of a stand-alone bootstrap program. See boot procedures (VIII). .s3 Blocks 1 through 24 for DECtape (1 through 62 for magtape) contain a directory of the tape. There are 192 (resp. 496) entries in the directory; 8 entries per block; 64 bytes per .th MTAB V 1/6/74 .sh NAME mtab \*- mounted file system table .sh DESCRIPTION .it Mtab resides in directory .it /etc and contains a table of devices mounted by the .it mount command. .it Umount removes entries. .s3 Each entry is 64 bytes long; the first 32 are the null-padded name of the place where the special file is mounted; the second 32 are the null-padded name of the special file. The special file has all its directories stripped away; that is, everything through the last ``/'' is thrown away. .s3 Thi.th "FILE SYSTEM" V 2/9/75 .sh NAME fs \*- format of file system volume .sh DESCRIPTION Every file system storage volume (e.g. RF disk, RK disk, RP disk, DECtape reel) has a common format for certain vital information. Every such volume is divided into a certain number of 256 word (512 byte) blocks. Block 0 is unused and is available to contain a bootstrap program, pack label, or other information. .s3 Block 1 is the .it "super block." Starting from its first word, the format of a super-block is .s3 .nf struct { int isize; int fsize; int nfree; int free[100]; int ninode; int inode[100]; char flock; char ilock; char fmod; int time[2]; }; .s3 .fi .it Isize is the number of blocks devoted to the i-list, which starts just after the super-block, in block 2. .it Fsize is the first block not potentially available for allocation to a file. These numbers are used by the system to check for bad block numbers; if an ``impossible'' block number is allocated from the free list or is freed, a diagnostic is writtep +15 9 020000 character-type special file .lp +15 9 060000 block-type special file. .lp +10 9 010000 large file .lp +10 9 004000 set user-ID on execution .lp +10 9 002000 set group-ID on execution .lp +10 9 000400 read (owner) .lp +10 9 000200 write (owner) .lp +10 9 000100 execute (owner) .lp +10 9 000070 read, write, execute (group) .lp +10 9 000007 read, write, execute (others) .s3 .i0 Special files are recognized by their flags and not by i-number. A block-type special file is basically one which can pnumber, to aid in (unimplemented) recovery after tape errors. The number of data blocks per file is directly specified by the control word for the file and indirectly specified by the size in the i-node. If these numbers differ, the file was dumped with a `phase error'. .sh "SEE ALSO" dump (VIII), restor (VIII), file system(V) n on the on-line console. Moreover, the free array is cleared, so as to prevent further allocation from a presumably corrupted free list. .s3 The free list for each volume is maintained as follows. The .it free array contains, in .it "free[1], ... , free[nfree\*-1]," up to 99 numbers of free blocks. .it Free[0] is the block number of the head of a chain of blocks constituting the free list. The first word in each free-chain block is the number (up to 100) of free-block numbers listed in the next 100 words ootentially be mounted as a file system; a character-type special file cannot, though it is not necessarily character-oriented. For special files the high byte of the first address word specifies the type of device; the low byte specifies one of several devices of that type. The device type numbers of block and character special files overlap. .s3 The address words of ordinary files and directories contain the numbers of the blocks in the file (if it is small) or the numbers of indirect blocks (if the file i.th DIRECTORY V 9/10/73 .sh NAME dir \*- format of directories .sh DESCRIPTION A directory behaves exactly like an ordinary file, save that no user may write into a directory. The fact that a file is a directory is indicated by a bit in the flag word of its i-node entry. Directory entries are 16 bytes long. The first word is the i-number of the file represented by the entry, if non-zero; if zero, the entry is empty. .s3 Bytes 2-15 represent the (14-character) file name, null padded on the right. These bytesf this chain member. The first of these 100 blocks is the link to the next member of the chain. To allocate a block: decrement .it nfree, and the new block is .it free[nfree]. If the new block number is 0, there are no blocks left, so give an error. If .it nfree became 0, read in the block named by the new block number, replace .it nfree by its first word, and copy the block numbers in the next 100 words into the .it free array. To free a block, check if .it nfree is 100; if so, copy .it nfree and the .it fs large). Byte number .it n of a file is accessed as follows. .it N is divided by 512 to find its logical block number (say .it b ) in the file. If the file is small (flag 010000 is 0), then .it b must be less than 8, and the physical block number is .it addr[b]. .s3 If the file is large, .it b is divided by 256 to yield .it i. If .it i is less than 7, then .it addr[i] is the physical block number of the indirect block. The remainder from the division yields the word in the indirect block which contains th are not cleared for empty slots. .s3 By convention, the first two entries in each directory are for ``\fB.\fR'' and ``\fB..\fR''. The first is an entry for the directory itself. The second is for the parent directory. The meaning of ``\fB..\fR'' is modified for the root directory of the master file system and for the root directories of removable file systems. In the first case, there is no parent, and in the second, the system does not permit off-device references. Therefore in both cases ``\fB..\fR'' hree array into it, write it out, and set .it nfree to 0. In any event set .it free[nfree] to the freed block's number and increment .it nfree. .s3 .it Ninode is the number of free i-numbers in the .it inode array. To allocate an i-node: if .it ninode is greater than 0, decrement it and return .it inode[ninode]. If it was 0, read the i-list and place the numbers of all free inodes (up to 100) into the .it inode array, then try again. To free an i-node, provided .it ninode is less than 100, place its number ie number of the block for the sought-for byte. .s3 If .it i is equal to 7, then the file has become extra-large (huge), and .it addr[7] is the address of a first indirect block. Each word in this block is the number of a second-level indirect block; each word in the second-level indirect blocks points to a data block. Notice that extra-large files are not marked by any mode bit, but only by having .it addr[7] non-zero; and that although this scheme allows for more than 256\*X256\*X512 = 33,554,432 bytes peras the same meaning as ``\fB.\fR''. .sh "SEE ALSO" file system (V) nto .it inode[ninode] and increment .it ninode. If .it ninode is already 100, don't bother to enter the freed i-node into any table. This list of i-nodes is only to speed up the allocation process; the information as to whether the inode is really free or not is maintained in the inode itself. .s3 .it Flock and .it ilock are flags maintained in the core copy of the file system while it is mounted and their values on disk are immaterial. The value of .it fmod on disk is likewise immaterial; it is used as a f file, the length of files is stored in 24 bits so in practice a file can be at most 16,777,216 bytes long. .s3 For block .it b in a file to exist, it is not necessary that all blocks less than .it b exist. A zero block number either in the address words of the i-node or in an indirect block indicates that the corresponding block has never been allocated. Such a missing block reads as if it contained all zero words. .sh "SEE ALSO" icheck, dcheck (VIII) .th CORE V 2/11/75 .sh NAME core \*- format of core image file .sh DESCRIPTION UNIX writes out a core image of a terminated process when any of various errors occur. See .it "signal (II)" for the list of reasons; the most common are memory violations, illegal instructions, bus errors, and user-generated quit signals. The core image is called ``core'' and is written in the process's working directory (provided it can be; normal access controls apply). .s3 The first 1024 bytes of the core image are a copy of lag to indicate that the super-block has changed and should be copied to the disk during the next periodic update of file system information. .s3 .it Time is the last time the super-block of the file system was changed, and is a double-precision representation of the number of seconds that have elapsed since 0000 Jan. 1 1970 (GMT). During a reboot, the .it time of the super-block for the root file system is used to set the system's idea of the time. .s3 I-numbers begin at 1, and the storage for i-nodes begi.th DUMP V 2/11/75 .sh NAME dump \*- incremental dump tape format .sh DESCRIPTION The .it dump and .it restor commands are used to write and read incremental dump magnetic tapes. .s3 The dump tape consists of blocks of 512-bytes each. The first block has the following structure. .s3 .nf struct { int isize; int fsize; int date[2]; int ddate[2]; int tsize; }; .s3 .fi .it Isize, and .it fsize are the corresponding values from the super block of the dumped file system. (See file system (V).) .it Date is ththe system's per-user data for the process, including the registers as they were at the time of the fault. The remainder represents the actual contents of the user's core area when the core image was written. If the text segment is write-protected and shared, it is not dumped; otherwise the entire address space is dumped. .s3 The format of the information in the first 1024 bytes is described by the .it user structure of the system. The important stuff not detailed therein is the locations of the registers. ns in block 2. .tr | Also, i-nodes are 32 bytes long, so 16 of them fit into a block. Therefore, i-node .it i is located in block (\fIi\fR|+|31)|/|16, and begins 32\u\fB.\fR\d((\fIi\fR|+|31)|(mod 16) bytes from its start. I-node 1 is reserved for the root directory of the file system, but no other i-number has a built-in meaning. Each i-node represents one file. The format of an i-node is as follows. .s3 .nf .if t .ta .5i 1.i 2.5i struct { int flags; /* +0: see below */ char nlinks; /* +2: number of linkse date of the dump. .it Ddate is the incremental dump date. The incremental dump contains all files modified between .it ddate and .it date. .it Tsize is the number of blocks per reel. This block checksums to the octal value 031415. .s3 Next there are enough whole tape blocks to contain one word per file of the dumped file system. This is .it isize divided by 16 rounded to the next higher integer. The first word corresponds to i-node 1, the second to i-node 2, and so forth. If a word is zero, then the correHere are their offsets. The parenthesized numbers for the floating registers are used if the floating-point hardware is in single precision mode, as indicated in the status register. .s3 .lp +10 7 fpsr 0004 .lp +10 7 fr0 0006 (0006) .lp +10 7 fr1 0036 (0022) .lp +10 7 fr2 0046 (0026) .lp +10 7 fr3 0056 (0032) .lp +10 7 fr4 0016 (0012) .lp +10 7 fr5 0026 (0016) .lp +10 7 r0 1772 .lp +10 7 r1 1766 .lp +10 7 r2 1750 .lp +10 7 r3 1752 .lp +10 7 r4 1754 .lp +10 7 r5 1756 .lp +10 7 sp 1764 .lp +10 7 pc 1774 to file */ char uid; /* +3: user ID of owner */ char gid; /* +4: group ID of owner */ char size0; /* +5: high byte of 24-bit size */ int size1; /* +6: low word of 24-bit size */ int addr[8]; /* +8: block numbers or device number */ int actime[2]; /* +24: time of last access */ int modtime[2]; /* +28: time of last modification */ }; .dt .fi .s3 The flags are as follows: .s3 .lp +10 9 100000 i-node is allocated .lp +10 9 060000 2-bit file type: .lp +15 9 000000 plain file .lp +15 9 040000 directory .lsponding file exists, but was not dumped. (Was not modified after .it ddate) If the word is \*-1, the file does not exist. Other values for the word indicate that the file was dumped and the value is one more than the number of blocks it contains. .s3 The rest of the tape contains for each dumped file a header block and the data blocks from the file. The header contains an exact copy of the i-node (see file system (V)) and also checksums to 031415. The next-to-last word of the block contains the tape block  .lp +10 7 ps 1776 .s3 .i0 In general the debuggers .it "db (I)" and .it "cdb (I)" are sufficient to deal with core images. .sh "SEE ALSO" cdb (I), db (I), signal (II) .th ASCII V 6/12/72 .sh NAME ascii \*- map of ASCII character set .sh SYNOPSIS .bd "cat /usr/pub/ascii" .sh DESCRIPTION .it Ascii is a map of the ASCII character set, to be printed as needed. It contains: .in 2 .nf .cs R 20 |000 nul|001 soh|002 stx|003 etx|004 eot|005 enq|006 ack|007 bel| |010 bs |011 ht |012 nl |013 vt |014 np |015 cr |016 so |017 si | |020 dle|021 dc1|022 dc2|023 dc3|024 dc4|025 nak|026 syn|027 etb| |030 can|031 em |032 sub|033 esc|034 fs |035 gs |036 rs |037 us | |040 sp |041 ! |042 "n have been removed by .it strip. .s3 The header always contains 8 words: .s3 .lp +5 3 1 A magic number (407, 410, or 411(8)) .lp +5 3 2 The size of the program text segment .lp +5 3 3 The size of the initialized portion of the data segment .lp +5 3 4 The size of the uninitialized (bss) portion of the data segment .lp +5 3 5 The size of the symbol table .lp +5 3 6 The entry location (always 0 at present) .lp +5 3 7 Unused .lp +5 3 8 A flag indicating relocation bits have been suppressed .s3 .i0 The sizes ofby the text or data word associated with the relocation word: .s3 .lp +6 3 00 indicates the reference is absolute .lp +6 3 02 indicates the reference is to the text segment .lp +6 3 04 indicates the reference is to initialized data .lp +6 3 06 indicates the reference is to bss (uninitialized data) .lp +6 3 10 indicates the reference is to an undefined external symbol. .i0 .s3 Bit 0 of the relocation word indicates if .it on that the reference is relative to the pc (e.g. ``clr x''); if .it off, that the refe |043 # |044 $ |045 % |046 & |047 \*a | |050 ( |051 ) |052 * |053 + |054 , |055 \*- |056 . |057 / | |060 0 |061 1 |062 2 |063 3 |064 4 |065 5 |066 6 |067 7 | |070 8 |071 9 |072 : |073 ; |074 < |075 = |076 > |077 ? | |100 @ |101 A |102 B |103 C |104 D |105 E |106 F |107 G | |110 H |111 I |112 J |113 K |114 L |115 M |116 N |117 O | |120 P |121 Q |122 R |123 S |124 T |125 U |126 V |127 W | |130 X |131 Y |132 Z |133 [ |134 \\ |135 ] |136 ^ |137 \*_ |  each segment are in bytes but are even. The size of the header is not included in any of the other sizes. .s3 When a file produced by the assembler or loader is loaded into core for execution, three logical segments are set up: the text segment, the data segment (with uninitialized data, which starts off as all 0, following initialized), and a stack. The text segment begins at 0 in the core image; the header is not loaded. If the magic number (word 0) is 407, it indicates that the text segment is not to berence is to the actual symbol (e.g., ``clr *$x''). .s3 The remainder of the relocation word (bits 15-4) contains a symbol number in the case of external references, and is unused otherwise. The first symbol is numbered 0, the second 1, etc. .sh "SEE ALSO" as (I), ld (I), strip (I), nm (I) |140 \*g |141 a |142 b |143 c |144 d |145 e |146 f |147 g | |150 h |151 i |152 j |153 k |154 l |155 m |156 n |157 o | |160 p |161 q |162 r |163 s |164 t |165 u |166 v |167 w | |170 x |171 y |172 z |173 { |174 | |175 } |176 ~ |177 del| .fi .i0 .cs R .sh FILES found in /usr/pub  write-protected and shared, so the data segment is immediately contiguous with the text segment. If the magic number is 410, the data segment begins at the first 0 mod 8K byte boundary following the text segment, and the text segment is not writable by the program; if other processes are executing the same file, they will share the text segment. If the magic number is 411, the text segment is again pure, write-protected, and shared, and moreover instruction and data space are separated; the text and data s.th ARCHIVE V 9/10/73 .sh NAME ar \*- archive (library) file format .sh DESCRIPTION The archive command .it ar is used to combine several files into one. Archives are used mainly as libraries to be searched by the link-editor .it ld. .s3 A file produced by .it ar has a magic number at the start, followed by the constituent files, each preceded by a file header. The magic number is 177555(8) (it was chosen to be unlikely to occur anywhere else). The header of each file is 16 bytes long: .s3 .lp +13 8 0-7 filegment both begin at location 0. See the 11/45 handbook for restrictions which apply to this situation. .s3 The stack will occupy the highest possible locations in the core image: from 177776(8) and growing downwards. The stack is automatically extended as required. The data segment is only extended as requested by the .it break system call. .s3 The start of the text segment in the file is 20(8); the start of the data segment is 20+S\s6\dt\u\s10 (the size of the text) the start of the relocation information.th TTY IV 5/27/74 .sh NAME tty \*- general typewriter interface .sh DESCRIPTION This section describes both a particular special file, and the general nature of the typewriter interface. .s3 The file .it /dev/tty is, in each process, a synonym for the control typewriter associated with that process. It is useful for programs or Shell sequences which wish to be sure of writing messages on the typewriter no matter how output has been redirected. It can also be used for programs which demand a file name for oe name, null padded on the right .lp +13 8 8-11 modification time of the file .lp +13 8 12 user ID of file owner .lp +13 8 13 file mode .lp +13 8 14-15 file size .s3 .i0 Each file begins on a word boundary; a null byte is inserted between files if necessary. Nevertheless the size give reflects the actual size of the file exclusive of padding. .s3 Notice there is no provision for empty areas in an archive file. .sh "SEE ALSO" ar (I), ld (I) .sh BUGS Names are only 8 characters, not 14. More important, there  is 20+S\s6\dt\u\s10+S\s6\dd\u\s10; the start of the symbol table is 20+2(S\s6\dt\u\s10+S\s6\dd\u\s10) if the relocation information is present, 20+S\s6\dt\u\s10+S\s6\dd\u\s10 if not. .s3 The symbol table consists of 6-word entries. The first four words contain the ASCII name of the symbol, null-padded. The next word is a flag indicating the type of symbol. The following values are possible: .s3 .lp +6 3 00 undefined symbol .lp +6 3 01 absolute symbol .lp +6 3 02 text segment symbol .lp +6 3 03 data segmenutput, when typed output is desired and it is tiresome to find out which typewriter is currently in use. .s3 As for typewriters in general: all of the low-speed asynchronous communications ports use the same general interface, no matter what hardware is involved. The remainder of this section discusses the common features of the interface; the KL, DC, and DH writeups (IV) describe peculiarities of the individual devices. .s3 When a typewriter file is opened, it causes the process to wait until a connection isn't enough room to store the proper mode, so .it ar always extracts in mode 666. t symbol .lp +6 3 37 file name symbol (produced by ld) .lp +6 3 04 bss segment symbol .lp +6 3 40 undefined external (.globl) symbol .lp +6 3 41 absolute external symbol .lp +6 3 42 text segment external symbol .lp +6 3 43 data segment external symbol .lp +6 3 44 bss segment external symbol .i0 .s3 Values other than those given above may occur if the user has defined some of his own instructions. .s3 The last word of a symbol table entry contains the value of the symbol. .s3 If the symbol's type is undefineis established. In practice user's programs seldom open these files; they are opened by .it init and become a user's input and output file. The very first typewriter file open in a process becomes the .it "control typewriter" for that process. The control typewriter plays a special role in handling quit or interrupt signals, as discussed below. The control typewriter is inherited by a child process during a .it fork. .s3 A terminal associated with one of these files ordinarily operates in full-duplex mode.d external, and the value field is non-zero, the symbol is interpreted by the loader .it ld as the name of a common region whose size is indicated by the value of the symbol. .s3 The value of a word in the text or data portions which is not a reference to an undefined external symbol is exactly that value which will appear in core when the file is executed. If a word in the text or data portion involves a reference to an undefined external symbol, as indicated by the relocation bits for that word, then the  Characters may be typed at any time, even while output is occurring, and are only lost when the system's character input buffers become completely choked, which is rare, or when the user has accumulated the maximum allowed number of input characters which have not yet been read by some program. Currently this limit is 256 characters. When the input limit is reached all the saved characters are thrown away without notice. .s3 These special files have a number of modes which can be changed by use of the .it.th A.OUT V 9/9/73 .sh NAME a.out \*- assembler and link editor output .sh DESCRIPTION .it A.out is the output file of the assembler .it as and the link editor .it ld. Both programs make .it a.out executable if there were no errors and no unresolved external references. .s3 This file has four sections: a header, the program and data text, a symbol table, and relocation bits (in that order). The last two may be empty if the program was loaded with the ``\*-s'' option of .it ld or if the symbols and relocatiovalue of the word as stored in the file is an offset from the associated external symbol. When the file is processed by the link editor and the external symbol becomes defined, the value of the symbol will be added into the word in the file. .s3 If relocation information is present, it amounts to one word per word of program text or initialized data. There is no relocation information if the ``suppress relocation'' flag in the header is on. .s3 Bits 3-1 of a relocation word indicate the segment referred to  stty system call (II). When first opened, the interface mode is 300 baud; either parity accepted; 10 bits/character (one stop bit); and newline action character. Modes that can be changed by .it stty include the interface speed (if the hardware permits); acceptance of even parity, odd parity, or both; a raw mode in which all characters may be read one at a time; a carriage return (CR) mode in which CR is mapped into newline on input and either CR or line feed (LF) cause echoing of the sequence LF-CR; mapping of upper case letters into lower case; suppression of echoing; a variety of delays after function characters; and the printing of tabs as spaces. See .it getty (VIII) for the way that terminal speed and type are detected. .s3 Normally, typewriter input is processed in units of lines. This means that a program attempting to read will be suspended until an entire line has been typed. Also, no matter how many characters are requested in the read call, at most one line will be returned. It is not however need on output. The EOT character is not transmitted (except in raw mode) to prevent terminals which respond to it from hanging up. .sh FILES /dev/tty .sh "SEE ALSO" dc (IV), kl (IV), dh (IV), getty (VIII), stty (I, II), gtty (I, II), signal (II) .sh BUGS Half-duplex terminals are not supported. On raw-mode output, parity should be transmitted as specified in the characters written. hie). Bell Laboratories internal memorandum. An excellent reference, but a bit heavy going for the beginner, especially one who has never used a language like C. .if t .sp 5p .I Others: .R .if t .sp 5p D. M. Ritchie, UNIX Assembler Reference Manual. .sp 2p B. W. Kernighan and L. L. Cherry, A System for Typesetting Mathematics, Computing Science Tech. Rep. 17. .sp 2p M. E. Lesk and B. A. Barres, The GCOS C Library. Bell Laboratories internal memorandum. .sp 2p K. Thompson and D. M. Ritchie, Setting Up UNIX. cessary to read a whole line at once; any number of characters may be requested in a read, even one, without losing information. .s3 During input, erase and kill processing is normally done. By default, the character `#' erases the last character typed, except that it will not erase beyond the beginning of a line or an EOT. By default, the character `@' kills the entire line up to the point where it was typed, but not beyond an EOT. Both these characters operate on a keystroke basis independently of any ba.sp 3 .SH Index Index .LP .sp 2 .nf & (asynchronous process) 8 ; (multiple processes) 8 * (pattern match) 5 [ ] (pattern match) 6 ? (pattern match) 6 <> (redirect I/O) 7 >> (file append) 12 backslash (\\) 2 cat (concatenate files) 4 cdb (C debugger) 12 chdir (change directory) 7 chmod (change protection) 7 command arguments 4 command files 8 cp (copy files) 5 cref (cross reference) 11 date 2 db (assembly debugger) 13 delete (DEL) 2 diff (file comparison) 11 directories 7 document format.sp 2p M. D. McIlroy, UNIX Summary. .sp 2p D. M. Ritchie, The UNIX I/O System. .sp 2p A. D. Hall, The M6 Macro Processor, Computing Science Tech. Rep. 2. .sp 2p J. F. Ossanna, NROFF User's Manual _ Second Edition, Bell Laboratories internal memorandum. .sp 2p D. M. Ritchie and K. Thompson, Regenerating System Software. .sp 2p B. W. Kernighan, Ratfor_A Rational Fortran, Bell Laboratories internal memorandum. .sp 2p M. D. McIlroy, Synthetic English Speech by Rule, Computing Science Tech. Rep. 14. .sp 2p M. D.ckspacing or tabbing that may have been done. Either `@' or `#' may be entered literally by preceding it by `\\'; the erase or kill character remains, but the `\\' disappears. These two characters may be changed to others. .s3 When desired, all upper-case letters are mapped into the corresponding lower-case letter. The upper-case letter may be generated by preceding it by `\\'. In addition, the following escape sequences are generated on output and accepted on input: .s3 .lp +14 7 for use .lp +15 7 \*g \\\*ting 9 ed (editor) 3 editor programming 11 EOT (end of file) 3 eqn (mathematics) 11 erase character (#) 2 file system structure 6 filenames 5 file protection 7 goto 12 grep (pattern matching) 11 if (condition test) 12 index 14 kill a program 8 kill a character (@) 2 lil (high-level assembler) 13 login 1 logout 2 ls (list file names) 4 macro for formatting 10 mail 2 multi-columns printing (pr) 5 mv (move files) 5 nroff 9 on-line manual 3 opr (offline print) 5 pathname 6 pattern mat McIlroy, Bell Laboratories internal memorandum. .sp 2p J. F. Ossanna, TROFF Users' Manual, Bell Laboratories internal memorandum. .sp 2p B. W. Kernighan, TROFF Made Trivial, Bell Laboratories internal memorandum. .sp 2p R. H. Morris and L. L. Cherry, Computer Detection of Typographical Errors, Computing Science Tech. Rep. 18. .sp 2p S. C. Johnson, YACC (Yet Another Compiler-Compiler), Bell Laboratories internal memorandum. .sp 2p P. J. Plauger, Programming in LIL: A Tutorial, Bell Laboratories internal mema .lp +15 7 .br | \\! .br .tr ?? .lp +15 7 ~ \\^ .lp +15 7 { \\( .lp +15 7 } \\) .s3 .i0 In raw mode, the program reading is awakened on each character. No erase or kill processing is done; and the EOT, quit and interrupt characters are not treated specially. The input parity bit is passed back to the reader, but parity is still generated for output characters. .s3 The ASCII EOT (control-D) character may be used to generate an end of file from a typewriter. When an EOT is received, all the characters waitinch in filenames 5 pipes ( | ) 8 pr (print files) 4 prof (run-time monitor) 13 protection 7 ptx (permuted index) 11 pwd (working directory) 7 quotes 6 ratfor (decent Fortran) 13 readahead 2 reading list 13 redirect I/O (<>) 7 RETURN key 1 rm (remove files) 5 rmdir (remove directory) 7 roff (text formatting) 9 root (of file system) 6 shell (command interpreter) 8 shell arguments ($) 12 shell programming 12 shift (shell arguments) 12 sleep 12 sort 11 spell (find spelling mistakes) stoppiorandum. g to be read are immediately passed to the program, without waiting for a new-line, and the EOT is discarded. Thus if there are no characters waiting, which is to say the EOT occurred at the beginning of a line, zero characters will be passed back, and this is the standard end-of-file indication. The EOT is passed back unchanged in raw mode. .s3 When the carrier signal from the dataset drops (usually because the user has hung up his terminal) a .it hangup signal is sent to all processes with the typewriter ng a program 2 stty (set terminal options) 2 tabs (set tab stops) 2 terminal types 1 time (time programs) 13 tr (translate characters) 11 troff (typesetting) 9 typo (find spelling mistakes) 11 wc (word count) 11 who (who is looged in) 2 write (to a user) 3 yacc (compiler-compiler) 13 as control typewriter. Unless other arrangements have been made, this signal causes the processes to terminate. If the hangup signal is ignored, any read returns with an end-of-file indication. Thus programs which read a typewriter and test for end-of-file on their input can terminate appropriately when hung up on. .s3 Two characters have a special meaning when typed. The ASCII DEL character (sometimes called `rubout') is not passed to a program but generates an .it interrupt signal which is sent to all pro.SH .tr ~ V.~~UNIX READING LIST .PP .ti 0 .br .I General: .R .if t .sp 5p .UC UNIX Programmer's Manual (Ken Thompson, Dennis Ritchie, and a cast of thousands). Lists commands, system routines and interfaces, file formats, and some of the maintenance procedures. You can't live without this, although you will probably only read section I. .if t .sp 5p The .UC UNIX Time-sharing System (Ken Thompson, Dennis Ritchie). CACM, July 1974. An overview of the system, for people interested in operating systems. Worth r.SH IV. PROGRAMMING .PP .UC UNIX is a marvelously pleasant and productive system for writing programs; productivity seems to be an order of magnitude higher than on other interactive systems. .PP There will be no attempt made to teach any of the programming languages available on .UC UNIX , but a few words of advice are in order. First, .UC UNIX is written in C, as is most of the applications code. If you are undertaking anything substantial, C is the only reasonable choice. More on that in a moment. But rcesses with the associated control typewriter. Normally each such process is forced to terminate, but arrangements may be made either to ignore the signal or to receive a trap to an agreed-upon location. See .it signal (II). .s3 The ASCII character FS generates the .it quit signal. Its treatment is identical to the interrupt signal except that unless a receiving process has made other arrangements it will not only be terminated but a core image file will be generated. If you find it hard to type this characeading by anyone who programs. Contains a remarkable number of one-sentence observations on how to do things right. .if t .sp 5p .I Document Preparation: .R .if t .sp 5p A Tutorial Introduction to the .UC UNIX Text Editor. (Brian Kernighan). Bell Laboratories internal memorandum. Weak on the more esoteric uses of the editor, but still probably the easiest way to learn .C ed . .if t .sp 5p Typing Documents on .UC UNIX. (Mike Lesk). Bell Laboratories internal memorandum. A macro package to isolate the novice emember that there are quite a few programs already written, some of which have substantial power. .PP The editor can be made to do things that would normally require special programs on other systems. For example, to list the first and last lines of each of a set of files, say a book, you could laboriously type .B1 ed e chap1.1 1p $p e chap1.2 1p $p etc. .B2 But instead you can do the job once and for all. Type .B1 ls chap* >temp .B2 to get the list of filenames into a file. Then edit this file to make thter, try control-\\ or control-shift-L. .s3 When one or more characters are written, they are actually transmitted to the terminal as soon as previously-written characters have finished typing. Input characters are echoed by putting them in the output queue as they arrive. When a process produces characters more rapidly than they can be typed, it will be suspended when its output queue exceeds some limit. When the queue has drained down to some threshold the program is resumed. Even parity is always generatfrom the vagaries of the formatting programs. If this specific package isn't available on your system, something similar probably is. This one works with both .C nroff and .C troff . .if t .sp 5p .I Programming: .R .if t .sp 5p Programming in C: A Tutorial (Brian Kernighan). Bell Laboratories internal memorandum. The easiest way to start learning C, but it's no help at all with the interface to the system beyond the simplest IO. Should be read in conjunction with .if t .sp 5p C Reference Manual (Dennis Ritce necessary series of editing commands (using the global commands of .C ed ), and write it into ``script''. Now the command .B1 ed