IMD 1.17: 30/08/2011 16:04:47 micronix 1.3 #1013-8 distribution vol 3 1982 gary fitts    e`}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"! ~ DZ5,weSA@*[ RSTUVʱʤPQʱʤ7NO~ʱʤJvʱxʤ@Apʱpʤn<=>?iʱiʤ+:;bʱbʤ89\ʱ\ʤ= 234567UʱVʤN -./01NʱOʤ*+,GʱHʤ"#$%&'()AʱBʤ !:ʱ;ʤ4ʱ4ʤ:-ʱ.ʤ$ʱ'ePjihgfedcba_^]\[ZY  DZ5,weSA@*ʱʤʱʤiʱʤʱʤʱʤʱʤʱʤʱʤ ʱʤ}~ʱ|ʱˤ tuvwxyz{ʱʤrsʱʤjklmnopqʱʤEaʱʤWXʱ0DZȤhȱȤN|ȱ}Ȥ|xȱxȤ1qȱtȤ lȱlȤhȱhȤ|cȱdȤ_ȱ`ȤpZȱ[Ȥ:VȱWȤmRȱRȤMȱMȤHȱIȤ-CȱDȤ'>ȱ?R˱SˤkL˱MˤF˱Fˤ%@˱Aˤ;˱;ˤl5˱5ˤh.˱0ˤ)˱)ˤ#˱$ˤ˱ˤa˱ˤ^˱ˤ ˱ ˤ˱ˤ ˱ˤXʱB9ȱ:Ȥ 5ȱ6(M1ȱp.ȱo ,ȱ,Ȥ)ȱ)0%ȱ)@$ȱ,ɑl ȱ"ɑȱɑGȱɑnHȱɁ 9:;<=>? ȱɑg/(ȱ ȱ pȱW     ˱ˤ ˱`˱8̤˱ˤ}˱ˤv˱ˤX˱ˤ˱ˤ=˱ˤ: ˱ˤ}˱}ˤu˱vˤ n˱oˤm g˱hˤ"`˱aˤYY˱[=EFGHȱȤ03ȱȤf)*ȱȤ%ȱȤȱȤ ȱȤȱȤ7ȱȤmȱȤ|   ȱȤr  ȱȤ5ȱȤȱȤȱȤȱȤȱ!EF(̱(̤|CD"̱"̤@AḆ̤>?̱̤ 89:;<=̱̤567̱ ̤1̱̤Z'(˱ˤ#$%&˱ˤ !"˱ˤM˱ˤ˱ˤ˱ˤ ˱ˤ)˱ˤ ˱TNɱOɤ-HɱIɤ~CɱDɤI|}=ɱ>ɤ=z{7ɱ8ɤrxy1ɱ2ɤEvw,ɱ-ɤnopqrstu%ɱ&ɤPlmɱ ɤykȱȤ )_ȺMWȱȤTUVȱȤz OPQRSȱȤMNȱȤIJKLȱ{|̱̤xyẕ̤uvw̱̤9rstẕ{̤qṯupo̱̤oḻlklmnḏe$hij[̱]̤d bcdefgU̱V̤`aO̱P̤ [\]^_H̱I̤g TUVWXYZḆCS<̱l̤KLMNOPQR8̱9̤GHIJ0̱2gɱɤ ɱɤɱɤɱɤ ɱɤ ɱɤɱɤ3ɱɤ~ɱɤxɱyɤsɱsɤmɱmɤ&gɱgɤaɱbs[ɱ\ɤUɱVp̱0̱̤̱0̱̤̱̤+̱̤ ̱̤̱̤x̱̤y̱̤̱̤̱̤̱̤}~̱Zʱʤʱʤ9 ʱʤ ʱ ʤ ʱʤ ɱɤp ɱɱɤɱɤYɱɤ'ɱɤaɱɤQɱɤ}ɱɤxɱɤɱ ... usr  ...binspoolmanadmhelpͿ* \ !! !Ϳ!N#F; !ͥá ͚!!9 !N#F!Ϳá͚!9! !N#F!!!!á͚!0ͪ á͚!0ͪ á͚!~#fo"/*/##~# */*/##~# á*/##~w#~w*/ N#F*/ ~w#~w~OGyOxGá͚!N#F!*0Dá͚!N#F!*0Dá͚!~#fo"/!~#fo"/:/{*/##*/  #ڃ*/;:/*/ N#F*/ ~w#~w:/w*/##~w#~w:/ :/!~#fo####~#~!N#F;!~#foMDá͚!. ..macrooverstrikeratfortranslitunrotinclude~#fo"/*/####~#á*/##~#&á*/ ~#@!*/{*/ N#F*/ N#F*/N#Fi`"/!/>#*/ */ ~#~*/##:/w:/#w*/MDá͚!N#F;á͚!~#fo"/*/####~#foMD!u*/ ~#!*/{á*/##~#D*/##N#F*/ N#F*/N#F!*/##y;x#Dá*/##>w#w*/ */ ~#~áOut of memory ͚!~#fo"/!~#fo"/*/ ~#ʰ*/ N#F!/~# */ */:ywx#w+~#(*/ :/w:/#w*/##>w#w*/ */!9Bͥ()definetoken too long.M!~#fo"e0!*e0*e0#"e0Kyw~OGz ywx#w!~am#~7!~0~#~7*e0!yOx#G>>Ң! *e0!yOx#G>>:e02e0:f02f0*e0~OG!>aw#w*e0*e0#"e06!~#foMDc͚**#"!~á͚!* >2 2 >2 2 * " !"áM!yx#w:2:2*~OGc͜ i`"e0:e0 Œ:f0–* #" *e0MDcM!N#Fi`!~#fo  "e0!:e0:f0#*e0~OG:e02e0:f02f0cunexpected  !"#$%&')*+,-./012345678EOF.EOF in string.call stack overflow.infinite recursion loop.͚!9!!(ywx#w!~n#~ʉ! >>#!) Ý! ~#6! 6!~a«#~!-!t y!9 !~[#~·!>w#w!!(ywx#w!~[#~!~w#~w* #" ! >>#7! * )( : w: #w!-9!͗!9!͗!!(ywx#w!͞!~(š#~ʥ*͞* )$ >w#w ! ~#!9 !~]#~!~w#~w+~# !9! ~#~á!!l!!!á*/!?"/ðM!~#fo"e0*e0}o|g}_*e0#"e0:e0:f0rw*e0MDi`"e0!/~#µ!i`"/!/~#¡c*/>|w>#w*/##>2/2/*/"/!/~#*/~#fo##!e0yx# !/~# !/~#S*/##*/##~#~_*/"/*/##~#fo"/!i`"/!/~#<c*/>w>#w*/##õ*/##~#fo"/*/~#fo!e0yOx#Gi`##"/:/:/*/*e0 "/*/!/  #*/*/ }|*/##*/##MDcbad free call M!~#fo"e0!e0~#c*e0 "/*~ #~! !~((#~G* )$ >#~!9~!~)U#~’* )$ ~w#~w+>#!9 * )$ ~w#~w !~, #~* )$ ~µ#~!͗ !͗*  * )( N#F** )( ~#fo" * ) ~#fo" : 2 : 2 !9!!(ywx#w`áM! ~#O>2 2 !~#fo"e0*e0~y*e0~OG͗*e0#"e0Zcevaluation stack overflow.͚! ~#²!N#F: : !| !* !~* #" áarg stack overflow.͚: :/##>w#w!/~#*/"/c>2/2/*/"/!/~#T!/:/:/#҃!/:/:/#ڃ!/:/c:/#˜!!!Ϳ!ͥØ*/"/*/##~#fo"/-!/~#¸*/##:/w:/#w*/"/!/~#*/##>w#w*/##:/w:/#w*/##:/w:/#w*/##:/w:/#w!/~#N*/####*/~#fo !/y"x#N*/*/~#fo####  */##*/##~#~!/~#ʢ*/####*/~#fo !/yvx#¢*/*/~#fo####  */##*/##~#~c͚!9!/ywx#w!0~#~!~#fo~#fo####~#~!~#fo~#fo####~#~ ! * ) : w: #w* #" á͚!9* #" !!~#fo) ~#~!!!~#fo ~!~{#~–!N#F!N#F!!!~#fo i`!~#fo  }|!!  # !~#fo ~$=!!~#fo ~OGá!!  #!!~#fo ~OG!!!~#fo ~OG! }|!#~!!~#fo  !!~#fo!~#fo #}|!!~#fo) ~#~!!~#fo ͞!~w#~w!~w#~w͚!9!~#fo!P!N#Fá!~#fo~#fo##N#F!~#fo~#fo N#F!~#fo~#foN#F!!~w#~wùM!~#fo"e0!~#fo!~#fo "c0!~#fo"a0!c0:e0:f0#Ҳ*e0*e0#"e0:a0wÐ!~#foMDcM!"e0*e0~#*e0N#F*e0N#F!N#F!*e0##"e0cM!~#fo"e0*e0~!*e0#"e0*e0!yOx#Gc͚!~#fo"60!~#fo"80*60*80 qá*60#"60*80#"80M*60~`á͚!N#F!N#F4áM!~#fo"a0!"e0*e0~#*e0~#fo"c0*c0~*a0*a0#"a0*c0~*c0#"c0*a06*a0MDc*e0##"e0ïyOx#G>>k !!~#fo) ~#~!!~#fo) ~#~!!~#fo !!~#fo á͚áM!~#fo~OGi`}o|g), ~#fo"e0!e0~# *e0 N#F!N#Fy !*e0 N#F!N#F͚cc*e0~#fo"e0Ú ͚!9!!N#Fywx#w!!N#Fywx#w!!~#fo~OGi`}o|g), ~#~!~# !!~#fo~OGi`}o|g), !͕ ywx#w+~#~!~#fo##!N#F !~#fo####!N#F á!~#fo##N#F!N#Fy !>w#w+ !M!~#fo"e0!~#fo"a0!~#fo"c0:b0[*a0>o>g"a0:f0[*e0>o>g"e0*c0*c0#"c06-*e0*a0?";0!;0~#ʌ*a0*;0*c0*c0 "c0*e0*a0Z0 }2:0!:0>9::0'2:0*c0*c0#"c0::0w*c0!yOx#Gc͚!!N#Fywx#w!~#~ á!~#foMDá͚!9!:=0w:>0#w!!~#fo!~#fo }|!N#Fy_xhá!~#fo"=0!~#foMDá͚!9!:=0w:>0#w!!~#~!N#Fyºxá!~#fo"=0!~#foMDá"A0?0 "O0!9~#fo"E0!~#fo~#~ !~#fo~# !>w#w!~#` !~#fo!͕ ywx#w!!~#fo~#~!~#fo##!N#F !~#fo####!N#F á͚!!!N#F:ywx#w!!N#F!N#F`!~#foMDá͚!!N#Fá͚!N#FG !~#fo!N#F͕ ywx#w!!N#F!~#foN#F͚á͚!~#fo~#w !~#foN#F !~#fo>w#wá͚!~0#~ !>9># 0á!~a#~ !>z># !~A#~ !>Z># aá!~#foMDá: line ͚!! ! !9~#fo"G0!9~#foC0MD"O0!9~#fo"K0!9~#fo"M0!9~#foI0MD"O0!9*e0*c0*a0i`!"a0"c0"e0!9~w#~w#~w#~w+MD!9 _ #ڀ{ !94À! 9~+w>#w! 9N#FxO>GvO>G! 9q#pý! 9~+w>#w! 9N#Fx$O>Gv4O>G! 9q#pý! 9N#Fv! 9q#pý! 9N#Fv! 9q#pý~##~#foy#•x#–+++~#fo##u!9!9N#F###q#p+++q!9N#F#q#p*0g0!9͜ * " i`" : ,: X*  }|EP* MD! MDi`" ! : : #! d>2 2 ! : : #! d* #" y: §: ­ò * d: : >2 2 * #"  !_  !_  !~#fo" * ##~#* H* ##~#* * ##~w#~w*  N#F*  ~w#~w~OGyOxG !N#F!k ͒ !N#F!k ͒ !~#fo"# !~#fo"! :" *# ##*#   #*# :" *#  N#F*#  ~w#~w:! w*# ##~w#~w:! :" ;!~#fo####~,#~;!N#F !~#foMD !~#fo"% *% ####~#f *% ##~#t *%  ~#Ž!*% *%  N#F*%  N#F*% N#FD i`"' !' >#*%  *%  ~#~*% ##:' w:( #w*% MD !N#F  --J !~#fo") *) ####~#foMD! *)  ~#P!*) P *) ##~#ʒ*) ##N#F*)  N#F*) N#Fp *) ##y‰x#ʒ *) ##>w#w*)  *)  ~#~ Out of memory !~#fo"+ !~#fo"- *+  ~#*+  N#F)!- ~#Y*+  *- ͈ywx#w+~#v*+  :- w:. #w*+ ##>w#w*+  *+  ~#~ !!!p !> *- !͎ "- ͜ !~#fo" * }o|g}ʭ* #" : : * MDi`" !7 ~#!# i`"3 !3 ~#ò *3 >|w>#w*3 ##)>21 22 *7 "5 !5 ~#2*5 ~#fo##! yx#Y!5 ~#n!1 ~#ʡ*1 ##*5 ##~#~í*5 "1 *5 ##~#fo"5 !# i`"3 !3 ~#Šò *3 >w>#w*3 ##)*7 ##~#fo"7 *5 ~#fo! yOx#Gi`##"/ :/ :0 *5 *  "3 *5 !/  #*3 */   }|*3 ##)*5 ##MDò bad free call ͜ !~#fo" ! ~#Cò *  "; *; ##>w#w!7 ~#k*; "7 ò >29 2: *7 "= != ~#ʢ!; :9 :: #!; := :> #!= :; ±:< #!!!ͮ !*= "9 *= ##~#fo"= {!9 ~#*; ##:= w:> #w*; "7 H!= ~#,*; ##>w#w*9 ##:; w:< #wH*; ##:= w:> #w*9 ##:; w:< #w!= ~#ʜ*; ####*; ~#fo != ypx#œ*; *= ~#fo####  *; ##*= ##~#~!9 ~#*9 ####*9 ~#fo !; yx#*9 *; ~#fo####  *9 ##*; ##~#~ò !9!4 ! } iyOx#G! 7=>>T : } 2 }:!}2!}T * }N#F5é* }##~C #~d * }N#Fͣ é* }~#fo#5é* }##~s #~„ * }N#Fé* }##~“ #~³ * }####N#F* }N#F=é* }##~ #~©!~ #~ʦ* }N#Fé?!͖ i`"}*} *}MD??L*iͼb !)!N#Fb?missing parenthesis in condition.missing left paren.?!9!y(| xʊ !N #?!ͼ>2}2}!i`"}:};¸ :} :}{ :} :}} :} :} :} !? ywx#w!_ ~#~S !~#fo~#fo####~0 #~b !~#fo~#fo####~M #~ž b !N#F> !~#fo~#fo##N#F!~#fo~#fo N#F!~#fo~#foN#Fp !~w#~w ͜ !" * ~# * N#F * N#F!N#Fp * ##" ø ò ͜ !~#fo" * ~ * #" * !yOx#Gò !!N#Fe ywx#w!~O #~X  !~#foMD !9!:w w:x #w!!~#fo!~#fo }|!N#F* y® x·  !~#fo"w !~#foMD !9!:w w:x #w!!~#~!N#F* 58!}~#s !, #s :}  :}! !68 :}(. :}P *}#"}!ͼ!}># :})] :}8 :}2}:}2}8 ??!~#fo#b!N#F5??*i"}*i!~#fo "i*}MD?warning: possible label conflict.23?!N#Fw8y x ! !N#F7y ! #!N#FͼL??L*iͼ!͖ i`"}*}͋ ͪ*}MD?unbalanced parenthesis.unexpected brace or EOF.?!9!i`"}:};® :} :} ¾ :} :}} :} !!}~#ʠ !Z #à :y x  !~#fo"w !~#foMD "{ y  " !9~#fo" !9~#fo" !9~#fo} MD" !9~#fo" !9~#fo" !9~#fo MD" !9* * * i`!" " " !9~w#~w#~w#~w+MD!9 _ # { !94 ! 9~ +w>#w! 9N#Fx- O>G = O>G! 9q#p ! 9~_ +w>#w! 9N#Fxs O>G ҃ O>G! 9q#p ! 9N#F ! 9q#p ! 9N#F ! 9q#p ~# #~#foy# x# +++~#fo## !9!9N#F###q}{ :} :} :}" !r #! :},/ :}S !y D xj !j :}(` :}} *}#"}!ͼ:} :})Š :}j :}2}:}2}j ??!N#F5* } ~# !~#fo#5??!g:g :g *}5!͖ i`"}*}*}# *}MD??!N#Fb!~#fo#5?illegal next.illegal break.?* }"}!} iyx#ҍ*}##~u#~ʼ*}##~‡#~ü!~›#~„!@#Ì:} 2}:}2}X!~#~*}~#fo#b*} ~w#~w/*}#p+++q!9N#F#q#pk  ##~#~2*}##~#~©2*}N#Fb*} ~w#~w?!~@#~d*}~#fo##b*} ~w#~wÁ*}~#fo#b*} ~w#~w?!2#??L!N#Fͼ͋ ͪ??*g*g#"g6 *g*g#"g6!g!g"g??*gg}o|g}H|$ͪ>2}2}:}:};*g*g#"g6 *}#"}*g*g#"g!~?*g*g#"g6*$?*gg}o|g}|o! O?.or.|.and.&.not.^!.ne.^=!=.eq.==.le.<=.lt.<.ge.>=.gt.>?!!N#Fʹy!ͼ?!!N#Fʹ:?/P!99n5()definecontinuedoif(.not.goto?!~#fo~OGi`}og)f ~#fo"}!}~#ʠ*}##N#F!N#Fʹyʦ!*}####N#F!N#F͢6??*}~#fo"}Ymissing quote.?y2}:}OGyx:} :} :}OG!~#fo"}*}yw~OG@i`"}:}a,:}p:}0<:}p!!}  #z*}~OG*}6>a2}2}J*}#"}!~#fo~'ʖ!~#fo~"!~#fo#"}*}yw!~#fo 9*}~OGyx9*}~ X!#*}!~#fo~!@ABCDEFGIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwx 9!~#fo~#b!~#foyw~ !~#fo~OGy3x!~#fo~2}2}*}#6*}MD?*}#"}â!~#fo~OGyJ><2}2}*}#"}*}yw*}~OGy*}~OG:}2}:}2}J!~#fo~2}2}J*}#"}Ê?!N#Fy x!~#fo~OGyxB!~#fo~;B!~#fo~{B!~#fo~}[!~#fo~2}2}*}MD?!N#F͟ypx|!"}S!N#Fͯi`"}!}~#S!"}S?!~#fo~!~#fo~0!~#fo>9?!~w#~wâ?unexpey!ͼ?!!N#Fʹy"!ͼ?!!N#FʹyC!ͼ?!!N#Fʹyd!ͼ?!!N#Fʹy!!N#Fʹyʛ!ͼ?!!N#Fʹy!!N#Fʹy!ͼ?!!N#Fʹy!yͼ?!w!N#Fʹy!rͼ?!~#fo"}*}~I*}~'L*}~"L*}~OG?*}#"}*}~r*}*} r*}#"}S*}!}yOx#G! !H*}#"}*}~*}*} *}~OG*}#"}Ù*}"}*}#"}?!U~!N#FP-??!cted EOF.illegal right brace.stack overflow in parser.illegal until.illegal else.?!9!i`"}:}j:}ʈ:}z:}µ i`"}! i: }–:!}d!#d!i`"}]:}:}P) i`"}:}:}C:}:}C:}:}C:} :}C:}:}C:}*:}C:}::}C:}{J:}jC:}]:}ki`"}:}x:}†͌i`"}:}“:}¡ i`"}:}®:}½! :}:}* }##~#~* }N#Fv :} !N#F!}7i`} 6!}"}*}~2*}~OG*}#"}??!>#Q!N#FL*iͼͪ??L*iͼ!N#Fͪ?untilrepeatfornextbreakelsewhiledoif?!!N#Fʹy?!!N#Fʹy?!!N#Fʹy?!!N#Fʹy"?!!N#Fʹy>?!!N#FʹyZ?!!N#Fʹyv?!!N#Fʹyʒ?!!N#Fʹyʮ???!~#!~#?!N#F!N#FW6??!:}* }##~ #~(* }N#F0!9#!*#: } 2 }:!}2!}* }} o|g" }! }: }:!}ڟ!y#ß:}}w:}* }##~{‰#~: } 2 }:!}2!}B* }##:}w:}#w* }:}w:}#w* } w#w* } w#w:}:}¤* }####!X"ä:}:}!͏B!#B:}':}::}7:}B*}O!i`"}!*}̓ä!Z~#x!n5À!n5??! } iyx#Ҧ* }##~{£#~¼?: } 2 }:!}2!}Æ* }##~#~!~#~& æ* }##~#~ N#Fw8i`!~#fo  "}!:}:}#=*}~OG:}2}:}2} ??!~A#~_!>Z>#{!~a#~!>z>#a?!~0#~!>9>#0?!~#foMD?too many characters pushed back.?!X:P:P!y#*P*P#"P!~??!PVyx#-:P2P:P2P*P~OG?&W??EG??!g"g!V"P! i" }* }##>w>#w!P*Pͮ!2Z2 Z>2 Z2 Z* Z" Z!T"g!"}"}*}####E~ywx#w?;unexpected EOF.))if(.not.(missing left parenthesis in for statementude?!X!VͶ%i`"~!$!XʹyA%!X*~Ͷ%!}:}:}D%!$y#D%?*}}o|g"}*}##!X"*}w#w*}####!$*}##N#F;'ywx#w*}####~#­%:}2}:}2}!$y#!V"PA%?!~#fo~%!~#fo> %!~#fo~%!~w#~wù%!~#fo~M&!~#fo> M&!~#fo~M&!N#F!~w#~w!~#fo~!~w#~w%!~#fo6!~#foMD??!~#fo"~!N#Fw8i`!~#fo  "~!~:~:~#&*~~2~*~*~~*~:~w*~#"~:~2~:~2~Ó&??*}####N#F!!T+.?!͖ i`"}!Xy(x!!#?!Xi`"}!X:};C:}b!X!g:g\:g£kL͋ ͪ!Xi`"}!X:};:}®!X*}5!5k*}L!ͼ͋ !ͼ*iͼ*}##ͪ2}2}!X"}*}i`"}:}(:}0:}2}:}2}G*}w8*} "}:})=:}q*}#"}:}T:}!!*}͢6*}MD?:}~:}G!y#G?!͖ i`"}!g:gª:gʵ!5*}5*}MD??* } ~#!~#fo#!N#F **}####~#fo ~#fo}0='!Tw8i`" ~*}~w#~w!Td&!T* ~ "gÈ'!}"}yx#z'*}##=#*}####N#F͇*:}2}:}2}&È'!T"g!z?Out of heap space ?!!'!58!n5??!~#fo"!~#fo"(i`"~!~~#'@**L)i`" ~: ~ (:~(@** ~*~**~MD@?!~#fo"!~#fo"!~#fo"**L)i`"~:~s(:~|(@*͇***~***MD@?(i`"~!~~#¸(?!N#F!N#F*~**~MD??2~2~>2~:~) } ~# !~#fo##5?if?!N#FL!ͼb !N#Fb??!Xi`"}!X:};b:}‹!X* } ~#ʯ!~#fo#5ï* } ~#ʦ!~#fo#L͋ ͪ!N#Fb!~#fo##5??* } ~#!~#fo#L!N#Fb* } ~#!~#fo##5??!~<*#~ʓ!~>;#~ʓ!~=L#~ʓ!~!]#~ʓ!~&n#~ʓ!~|#~ʓ!~^#~™Ü?token too long.?!~#fo"*"}*}*}#"}͔yw~OG@i`"}:}a:}):~OG!m=K~ ~#fo}1):~OG!m=E~ "~1)*~MD?:~2~()r)as)w *?!~#fo"!~#fo"*~OG!<)ú?!!*ͪ8i`"~*~MD@!!*;i`"~:~¶):~)!!*ͪ8i`"~!!~##N#F+++N#F*~_9Ê)!!*;i`"~Ê)!"~Ê)?!9!~#fo"!~#fo"!~#fo"* :w:#w* w#w* w#w* *~r{*~*ywx#w@?!~#fo"*!ͽ/* N#Fn;* ~w#~w* ~#fo}+* ~#fo|+* N#F-:}0:}*}!yOx#G>>%!y#*}!yOx#G>>d:}2}:}2}*}~OGz>a2}2}*}*}#"}6*}MD@?*g*g#"g!~??!gTyx#:g2g:g2g*g~OG???!N#Fw8i`!~#fo  "}!:}:}#*}~OGz:}2}:}2}?unexpected EOF.call stack overflow.circular definition.?!Rͯi`"}:}t:}ʓ!}~#§*P6$!Vd&?!Z~#ʢ!y#â!Z>>#!By#:}a:}!X!R5y!RÒ!Z~#2* ~w#~w+@* w#w* ~w#~w+?!~#fo"*":G~2G~:H~2H~g+*E~*E~#"E~~OGyOGo+!E~.i`":+:ʧ+: ‘+:ʧ+**#":w:+*6:¹+:+!:+:#++*MD@?!~#fo"!~#fo"!~#fo"!:w:#w:2:2!>#,!* ~w#~w+f,*N#F*~w#~w~OGyOGn,*.ywx#w+~,#~ʦ,!N#F!~w#~w!~ ,!~#fo6!~¾,#~,!! , #,,*MD@?!~#fo"!RÒ*Z#"Z!Z>>#!-y#*Z)b : Zw: Z#wͳ!X!Kͳ!R!Kͳ!Rͯi`"}!R:}(u:}ʀ*P*Z)^ w#wÒ:}(œ:}»*Z)^ >#!R:}):}*Z)^ ~w#~w+>#8!RÒ*Z)^ ~w#~wÒ:},:}Š*Z)^ ~'#~Š!KͳÒ!K* Z *Z)b N#F*Z)b ~#fo" Z* Z)Z ~#fo" Z:Z2Z: Z2 ZÒ!R!Rͯi`"}g*P*P#"P6*P6!Vd&??!Z~#2Z2Z!~#fo"}*}~-*P*P#"!U~*P-:W~2W~:X~2X~#-*U~*U~#"U~6 0-!U~! ͽ/*[~}@o|g}M-!U~!ͽ/@?!~#fo"!~#fo"**#"~22!~#ʶ-* ~w#~w+-*N#F*~w#~w:w-@**}ogͽ/: -:i-* ~#fo}@o|g}i-*!ͽ/i-?!~#fo"* ~#fo}4.* ~#fo}0:.@* ~#O.*1* ~#fo}@o|g}ʹ.2~2~:~:~.*~!m=K~ ~#fo}@o|g}F/*~!m=E~ !ͽ/F/* * ~#fo}..* N#F* N#P*}~*}#"}!~#fo"}*}~-*}~OGK*}#"}?evaluation stack overflow.?!Z~#n*P*P#"P!~Ü: Z: Z!0y#!P* Z !~* Z#" Z?arg stack overflow.?: Z: Z!y#* Z)Z : Zw: Z#w* Z#" Z??*Z#"Z!~#fo)Z ~#fo"}!P*} ~2}2}:}$ :}? !N#F!N#FG!Ñ !P*} w8i`*}  "}!}:}:}# *}P ~$ʽ !P*} ~OGz4!?!}:}£ :}#‘ !P*} ~OGzÑ !P*} ~OGi` "}:}$!!~#fo :}:}F;ywx#w** ~#~* ~w#~w+P/* ~5/#~¡/* ~wì/*~#"~n.* * ~#fo#MDx2y2zx2|y2{!yͱ=*N#F*~w#~w~OGyOG@* ~ w* w#w@?!~#fo"!~#fo"* ~#fo}/* ~#fo} 0*MD@* ~#0*1*~#fo* yOx#Gi`" ~! ~~#y0* ~* N#F* N#FB>!!~#fo)Z ~#fo"}!~#fo)Z ~#fo"}!P*} !P*} ͮ!??!~#fo~OGi`}og)f ~#fo"}!}~#<"!~#fo~OGi`}og)f !!?2ywx#w+~#fo"}*}##!N#F"*}####!N#F"?*}##N#F!N#Fʹyq">2}2}Á"*}~#fo"}<"*}~#d"2}2}!}~#«"*}!!?2ywx#w*}~#fo"}*}##!N#F"*}####!N#F"??!N#F=#!~#fo!*~w#~w:w* ~w#~w*MD@?!9!~#fo"* ~#z1* ~#fo}ʣ1** !"~* ~#fo }| w #w-1!* N#Fͧ;x1* #~w1** !!?2ywx#w+~#~ i`~#1* ~w-1* ~w#~w-1!!3~##N#F+++N#F* N#F_9x*2* ~@w@?!N#F4??!~#fo"!~#fo"**m=i`"* 3i`"*"!~#‹2@*:2:2}ʶ2**#"6Ë2*MD@?!;~~#2!7~"9~*9~";~27~28~*;~MD??!~#fo!N#Fw8?2ywx#w!~#fo~##͞'!!N#F!~#foN#F͢6??!~#fo~#j#!~#foN#F-2!~#fow#w?: line : ?*}##~#ʣ#!!v#*}##N#F!58!!p#!58*}N#F͇$!!m#!58!N#Ff$!n5?: line : ?*Z#"Z*}##~#&$!!#*}##N#F!58!!#!58*}N#F͇$!!#!58!N#Ff$? ?!!d$!N#F!58??! !N#F!}7!}!B~#r3!S:i`"=~!=~~#3@*=~!A~  #*=~*=~~#fo)) "=~*=~:A~w:B~#w*?~";~*=~####MD@*=~> w>#w*=~####4*;~"=~r3?!~#fo"!~#/4@:2:2;2i`"C~!:C~:D~#Ҽ4*C~##::#Ҽ4*~#fo))* *C~##y†4x#4**C~##~#fo  #* *C~##~#fo##~#~5*C~##:C~:D~#4!:C~:D~#g4*C~##::#g4*C~##~#fo"C~G4* *C~##~#~*C~~#fo))*C~ !y-5x#W5*C~*  #*C~##* ~#~e5*C~##:w:#w*C~";~@?!~#fo">2E:EA6:EOG!m=E~ ~#fo:EOG!m=I~ yOx#Gi`"F!F~#L6:EOG!m=K~ ~#fo}L6:EOG!m=I~ ~#L6*F:EOG!m=I~ N#F:EOG!m=M~ N#FBo>g":c7*>o>g"**#"6-**7="I!I~#ʔ7**I*7* "**R=0 }2H!H>9ҹ7:H'2H**#":Hw*!yOx#G@?!~#fo"!~#fo"** !8*~/8@*#"*#"7*~8@@?!"*~#t8*N#Fw8*N#F!N#FB<*##"?8@?!~#fo"*~ʗ8*#"Å8*!yOx#G@?!!!N#F};ywx#w!#~8!~#foMD?!~#9!N#Fn;!!!N#F;ywx#wR9!~'9#~R9!N#Fn;!!!N#F;ywx#w!~#foMD??! ~#~:!y=!y222>2!?##~2K#~2L!y=!y222>2!9?##~2M#~2N! ~#fo###*K!N#F#w! 9N#FxGn<G! 9q#p+@! 9~=+w>#w! 9N#Fx=O>Gn<,=O>G! 9q#p+@! 9N#Fn!9MD! 9  # # #!94!>!9!9+@#~#~+++~#~#~>#>#>+++>#~#~#~ #~{>>#># >#ͅ>!9MD!9~#foͭ>! 9MD!9~#foͭ>=!9N#F!9>Ò>ͅ>!9MD!9~#foͭ>! 9MD!9~#foͭ>=!9N#F!9>Ò>ͅ>! 9MD!9~#fo#͛>!9MD!9~#fo#͛>=!9N#Fkb9>Ò>ͅ>y?~#?#~#foy#?x#?+++~#fo##ú?!9!9***i`!"""!9N#F###q#p+++q!9N#F#q#p  $'0Y   F*N#F;*##yx#%Â*##>w#w* * ~#~ÂOut of memory {!~#fo"!~#fo"* ~#ʑ* N#Fͼ!~#* *ywx#w+~# * :w:#w*##>w#w* * ~#~Â!!M!;!lÂ*!"Ñ!~#fo"E*E}o|g}@*E#"E:E:FSX*EMDi`"E!~#–!Qi`"!~#‚*>|w>#w*##ͼ>22*"!~#*~#fo##!Eyx#!~#!~#4*##*##~#~@*"*##~#fo"æ!9F͆to: too large.from: too large.usage: translit from to!9!!! !!6~!~#~!. !!~#fo##~#~!~#fo~^µ>22ÿ>22!!N#FNy! !~#~#!!~#fo####~#~!!N#FNy#! !!! }|!!!  f:c:!>22!!N#F} i`"E*E!ywx#w:§:.!!  #.!#~.!!~#fo ~OG !!N#F} i`"E*E!yz{|}~ywx#w!!  #.>22p:E;:FA!#~r!#~r!!~#fo ~OG p!~€#~p*E p!~#fo"E*E~*E~OG!y¸x#*E!yOx#G*E#"EÜ{!~#~Â!~#!N#F!N#F͎Â!N#F!N#F͎y7x@Â!~#fo#MDÂ{!N#F!N#F/!N#FyxÂÂ!~#fo"E*E~ʧ*E#"EÕ*E*E#"E!~*E*E#"E6*E!yOx#GyxABCDEFGHIJKLMNOPQR!Qi`"!~#*>w>#w*##ͼÖ*##~#fo"*~#fo!EyOx#Gi`##"::**E "*!  #** }|*##ͼ*##MDbad free call !~#fo"E!E~#*E "*##>w#w!~#*">22*"!~#5!::#d!::#d!:D:#y!!!A!͆y*"*##~#fo"!~#™*##:w:#w*"!~#¿*##>w#w*##:w:#w*##:w:#w*##:w:#w!~#/*####*~#fo !ySTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789{!9!$ywx#w! ywx#w!ywx#w!>w#w!~#fo!~#fo ~^!~w#~w!~#fo!~#fo ~!!N#Fywx#w!~#fo!~#fo ~@!N#F!!N#F͇yÂ!~#fo!~#fo ~-A!N#F!~#fo!~#fo ~OG͇y!>#h!~#fo#!~#fo ~‰!N#F!-͇!~w#~wÍ!~#fo !~#fo ~0!~#fo !~#fo >9!!N#F!!N#F!N#F, ! 9y!~#fo !x#/**~#fo####  *##*##~#~!~#ʃ*####*~#fo !yWx#ƒ**~#fo####  *##*##~#~{!9!ywx#w!~#~!~#fo~#fo####~#~!~#fo~#fo####~#~1!N#FlÂ!~#fo~#fo##N#F!~#fo~#fo N#F!~#fo~#foN#F;!~w#~wÚ!"E*E~#ʀ*EN#F*EN#F!N#F;*E##"EK{>22!~#fo>w#w! ~#~! >$>#Â! > >#! ~#fo/ }2! ~#fo6 }2!~#fo"!~#fo ~a[!~#fo !~#fo >z[!!N#F!!N#F!N#F, ! 9y!~#fo !~#fo ~A!~#fo !~#fo >Z!!N#F!!N#F!N#F, ! 9y!N#F!-͇y{!9!~#fo!~#fo~#fo ~@!~#fo!~#fo~#fo ~OGÂ!~#fo~#fo#!~#fo ~B@Â!~#fo~w#~w!~#fo!~#fo~#fo ~0Q !~#fo!~#fo~#fo >9Q !!!!~#fo!~#fo~#fo ̓!>w#w!># !~#fo!~#fo~#fo ~0 !~#fo!~~#fo!~#fo "*~ &*~ 0*#"*~-C>22*~-U*~+\*#"! ~j#~¹*~0¹*#~a*#>z*#~OG! MDå*#~OGyX®x¹*##"!::#*~a*>z*~OG! MD*~OGy2!::L¹*#"ù:0Z!>9Z!~#fo!~#foN#F! N#F:OG  }|ï:ak!>z|:A!>Z!~#fo!~#foN#F! N#F:OG  }|*#"ù!~#!~#fo!~#fo~#fo>o>g}|*!yOx#G!~#~ #fo~#fo >9 !~#fo~#fo#!~#fo ~0 !~#fo~#fo#!~#fo >9 !~#fo!~#fo~#fo ~a !~#fo!~#fo~#fo >z !~#fo!~#fo~#fo ~OG! MD !~#fo!~#fo~#fo ~OGÂ!~#foMDÂ!~w#~w!~#fo~w#~w {!! !N#F!A!͆Â{!9!~#fo~w#~w! ~#fo~w#~w!!N#F!N#F!N#F͎ywx#w!! ~#fo! ~#fo~#fo ~OG!N#F͎ywx#w!!  # ! N#F!~#fo!~#fo ~OG͇!~w#~!N#F*!yOx#GÂ!~#fo"E*E~>*E#"E,*E!yOx#G{!!N#F͓ywx#w!~}#~†Â!~#foMDÂ{!9!:w:#w!!~#fo!~#fo }|!N#FXyxÂ!~#fo"!~#foMDÂ{!9!:w:#w!!~#~!N#FXy7x@Â!~#fo"!~#foMDÂ" "/!9~#fo"!!9~#fo "/!9~#fo"%!9~#fo"'!9~#fo#MD"/!9~#fo"+!9~#fo"-!9~#fo)MD"/!9*E*C*Ai`wú ÂZ Z Z {!9!~#fo"!~#fo"!~#fo"!~#O Â*MD! V*##* * >w#w+~#~ w #w*:w:#w!*\*####:w:#w:¼ : !*rx !~#fo}o|`g} |  *####>w>#w Â!"!::6 *~#6 *! 3  #\ !::g *~#g *:w:#wg *##" *MDÂ{!͋ Â{!͋ Â{!~#fo"*##~#¬ * *##~#½ Â*##~w#~w* N#F* ~w#~w~OGyOxGÂ{!N#!"A"C"E!9~w#~w#~w#~w+MD!9 _ #{ !94! 9~g+w>#w! 9N#Fx{O>GҋO>G! 9q#pÞ! 9~+w>#w! 9N#FxO>GO>G! 9q#pÞ! 9N#F! 9q#pÞ! 9N#F! 9q#pÞ!! 9~+K~1! 9N#F ! 9~w#~w! 9~w+~w!9q#pÞ~#b#~#foy#vx#w+++~#fo##V!9!9N#F###q#p+++q!9N#F#q#pF!% Â{!N#F!% Â{!~#fo"!~#fo":\ *##*  #d *͟: * N#F* ~w#~w:w*##~w#~w: ¦ : !~#fo####~¿ #~ !N#F͟!~#foMDÂ{!~#fo"*####~# Â*##~#Â* ~#!!*\* N#F* N#F*N#F͒i`"!>#y* * ~#~*##:w:#w*MDÂ{!N#F͟Â{!~#fo"*####~#foMD!V* ~#!*\Â*##~#%*##N#F* N#  G}|!N#F͖yx#|!~#fo"b!~#foMD|u!9!:bw:c#w!!~#~!N#F͖yux~|!~#fo"b!~#foMD|"fd "x!9~#fo"j!9~#foh "x!9~#fo"n!9~#fo"p!9~#folMD"x!9~#fo"t!9~#fo"v!9~#forMD"x!9***i`!"""!9~w#~w#~w#~w+MD!9 _ #[{ !94[! 9~+w>#w! 9N#FxO>GQO>G! 9q#pØ! 9~+w>#w! 9N#FxO>G!9 u!9!!!V͋!!!ywx#w+>#!!~#fo 6! !Q!͏ !ywx#w!ywx#w!~#fo~!~#fo~$!~#fo~ !~w#~w!~#~-!ywx#w-|!~#fo~$Q!ywx#w!ywx#w!~#fo~}!~#fo~ }!~w#~w!~#fo!~#fo~!~w#~wÅ!ywx#w!~#~!~#fo~ ;!~w#~w!~#~Q!~#fo~$Q!~w#~w!~#~!ywx#w!~#fo!~#fo~!~w#~wÊ!~w#~w!N#F!~w#~w6 !N#F!~w#~w6!K(!~w#~w](!~#fo"*~x*~OGE*#"Y>su!9!~#fo"!~#fo"!~#fo"!~#|*MD!{P*##* * >w#w+~#~ w #w*:w:#w!*ͪ*####:w:#w:0:y!*Ͱxy!~#fo}o|`g}_| y*####>w>#wy|!*"!J::Ҫ*~#ʪ*! § #!J::*~#*:w:#w*##"*MD|u!N#F!N#F!JQO>G! 9q#pØ! 9N#FQ! 9q#pØ! 9N#FQ! 9q#pØ~#\#~#foy#px#q+++~#fo##P!9!9N#F###q#p+++q!9N#F#q#p|u!~#fo" !~#fo"!~#fo"* ##~#:* )*  ~#fo"* ##~#fo"!~#o**#"~ ´**  yOx#Gi`"!:: #Ҟ*MDã*MDi`"!~#2:2:2T**  N#F*c** "!:2:#2*  !  #* ##!  #* ~ '*!yOx#G|u!N#F!Vs|u!N#F!Vs|u!~#fo"!~#fo" : *##*  #ڲ*: * N#F* ~w#~w: w*##~w#~w:  : !~#fo#V###~ #~!N#F!~#foMD|u!~#fo"*####~#G|*##~#U|* ~#o!*ͪ* N#F* N#F*N#Fi`"!>#* * ~#~*##:w:#w*MD|u!N#F|+u!~#fo"*####~#foMD!P* ~#1!*ͪ1|*##~#s*##N#F* N#F*N#F*##yjx#s|*##>w#w* * ~#~|Out of memory u!~#fo"!~#fo"* ~#* N#F !~#: * *i ywx#w+~ !9ͤ͂!/Éincluderead͍!~#L!8$ywx#wÎ!~#fo~\ã!!*!N#Fywx#w!~#Ž!N#Fʹ!N#F!! !~#fo ~#fo}0!8$~#~"!N#Fͽ"!"! %i`"}%!"!"͍y!"*}%%!"/Î! Îã͍!~#fo"}%!~#fo"y%*}%~b*}%> X*}%~b*}%#"}%>*}%~ʙ*}%> *}%~*y%*y%#"y%*}%~*}%#"}%b*y%6*}%MDã: can't read ͂!!!N#F!!ͤÉ͂!H$!N#F͆#W * :w:#w*##>w#w* * ~#~|!!!!ͪ|*!"(!~#fo"*}o|g}ʎ *#"::ҡ æ *MDi`"!"~# !͏i`"!~# >*>|w>#w*## >22*"" ! ~# * ~#fo##!yx#: ! ~#O !~#ʂ *##* ##~#~Î * "* ##~#fo"  !͏i`"!~#k >*>w>#w*## *"##~#fo""* ~#fo!yOx#Gi`##":: * * "* !  #** }|*## * ##MD>bad fÉ͍!~#fo"}%!~#fo"y%i`"$!$~#$ã*y%*}%͂i`"$:$C:$Lã*y%*$*$K*$MDã͍!~#fo"}%!~#fo"y%!~#fo"{%*y%*}%͂i`"$:$©:$²ã*{%ͽ*y%*$*{%K*{%MDã͂i`"$!$~#É!N#F!N#F*$K*$MDÉ͂2 $2 $>2$:$_:$OG!>$ ~#fo}g:$OG!8$ " $g* $MDÉ:$2$(rawB͍!~#fo"}%!~#fo"y%*y%~OG!r]!!*}%Mi`" $* $MDã!!*}%ji`" $: $: $!ree call (!~#fo"!~#$ >* "&*&##>w#w!"~#L *&"">>2$2%*""(!(~#ʃ !&:$:%#Ҳ !&:(:)#ڲ !(:&’ :'# !! ! ! *("$*(##~#fo"(\ !$~# *&##:(w:)#w*&"") !(~# *&##>w#w*$##:&w:'#w) *&##:(w:)#w*$##:&w:'#w!(~#} *&####*&~#fo !(yQ x#} *&*(~#fo####  *&##*(##~#~!$~# *$####*$~#fo !&y¥ x# *$*&~#fo####  *$##*&##~#~>u!9!*ywx#w!J~#~4 !~#fo~!*}%Mi`" $!! $##N#F+++N#F* $!!*}%ji`" $!" $͍!9!~#fo"}%!~#fo"y%!~#fo"{%*}% :y%w:z%#w*}% w#w*}% w#w*}% *{%~r±ôywx#wã͍!~#fo"}%*}%! *}% N#F*}% ~w#~w*}% ~#fo};*}% ~#fo|>*}% N#Fc *}% ~w#~w>ã*}% w#w*}% ~w#~w;͍!~#fo"}%*}%"{%::$2:$:;$2;$*8$*8$#"8$~OGyOGå!8$: i`"y%:y%·:z%:y% :z%*{%*{%#"{%:y%wp*{%6:y%:z%#fo####~ #~C !~#fo~#fo####~. #~ C !N#Fͪ|!~#fo~#fo##N#F!~#fo~#fo N#F!~#fo~#foN#F!~w#~w (!~#fo"!~#fo!~#fo "!~#fo"!::# **#":wÿ !~#foMD>(!"*~#-*N#F0*N#F!N#F*##" >(!~#fo"*~P*#">*!yOx#G>!9^#V#^#V#N#Fů~# x}u!!N#Fywx#w!~»#~|!~#foMD|u!9!:bw:c#w!!~#fo!~#fo    !}%:{%:|%# *}%MDã͍!~#fo"}%!~#fo"y%!~#fo"{%!:}%w:~%#w:y%2y%:z%2z%!y%>#!*{% ~w#~w+*{%N#F*{%~w#~w~OGyOGä*{%: ywx#w+~µ#~!N#F!~w#~w!~ E!~#fo6!~#~!!}%  #*}%MDã͍!~#fo"}%!H$*}%͆:J$2J$:K$2K$Y*H$*H$#"H$6 f!H$! *N$}@o|g}ʃ!H$! ã͍!~#fo"}%!~#fo"y%*}%*}%#"}%~2{%2|%!{%~#*y% ~w#~w+*y%N#F*y%~w#~w:{%w ã*!~#foMDÉ"C%A% "g% "g%!9~#fo"G%!9~#fo"I%E%MD"g%!9~#fo"M%!9~#foK% "g%!9~#fo"Q%!9~#fo"S%O%MD"g%!9~#fo"W%!9~#fo"Y%!9~#foU%MD"g%!9~#fo"]%!9~#fo"_%!9~#fo[% "g%!9~#fo"c%!9~#fo"e%!9~#foa%MD"g%!9~w#~w#~w#~w+MD!9 _ #{ !94! 9~e+w>#w! 9N#FxyO>G҉O>G! 9q#p! 9~+w>#w! 9N#FxO>GO>G! 9q#p! 9N#F! 9q#y%*{%}og :{%  :|%Ÿ*y% ~#fo}@o|g}ʟ*y%! ß͍!~#fo"}%*}% ~#fo}j *}% ~#fo}0p ã*}% ~#… *}%P *}% ~#fo}@o|g} 2$2$:$:$ *$!>$ ~#fo}@o|g}| *$!8$ ! | *}% *}% ~#fo}  *}% N#F*}% N#F͎ywx#w*}%*}% ~#~*}% ~w#~w+ *}% ~k #~ *}% ~w *$#"$ä *}% *}% ~#fo#MDx2i%2j%x2l%y2k%!i%T*}%N#F*}%~w#~w~OGyOGã*}% ~ w*}% w#wp! 9N#F! 9q#p!! 9~+I~/! 9N#F ! 9~w#~w! 9~w+~w!9q#p!9N#F!9~#fo ## # +++ #~#~#~#~#~#~#~#~!9MD!9~#~#~#~ !9~w#~w#~w#~w#~w#~w#~w#~w!9MD! 9  # # #!9MD! 9  # # #!94!9!9#~#~+++~#~#~>#>#>+++>#~#~#~ #~{p>#># >#(!9MD!9~#foP! 9MD!9~#foP͡!9N#F!9̓5(!9MD!9~#foPã͍!~#fo"}%!~#fo"y%*y% ~#fo}. *y% ~#fo} 6 *}%MDã*y% ~#K *y%P *y%~#fo*y% yOx#Gi`"$!$~#ʯ *$*y% N#F*y% N#F!$y› x#ʯ *y% ~ wã*y% :$2i%2j%:$2l%:$2k%!i%T*y%*y% ~#~*y% *y% ~#fo}  ywx#w:}% :~%H *y%N#F*y%~w#~w:}%w*y% ~w#~w*}%MDã͍!9!~#fo"}%*}% ~#° *}% ~#fo} *}%*}% !$*}% ~#fo }| w #wc !*}% N#FJx* *}% #~w* *}%*}% !!u ! 9MD!9~#foP͡!9N#F!9̓5(! 9MD!9~#fo#>!9MD!9~#fo#>͡!9N#Fkb9p5(~#i#~#foy#}x#~+++~#fo##]!9!9*}%*{%*y%i`!"y%"{%"}%!9N#F###q#p+++q!9N#F#q#pywx#w+~#~ i`~# *}% ~wc *}% ~w#~wc !!&$##N#F+++N#F*}% N#Fx` *}% ~@wã͂!N#FKÉ͍!~#fo"}%!~#fo"y%*}%*y%i`"}%*}%?i`"y%*y%"{%!{%~# ã*}%:}%2}%:~%2~%} *{%*{%#"{%6 *y%MDã͂!.$~#!*$",$*,$".$2*$2+$*.$MDÉ͍!~#fo"}%*}% !#MDã͍!~#fo"}%*}%i`"4$ i`"2$*2$##~#fo"0$*0$!4$  #ڽ*0$!4$  #*2$##*0$##~#~*0$"2$*0$##~#fo"0$n!.$:0$:1$#¨!i`"0$!0$~#,ã*0$!4$  #*0$*0$~#fo)) "0$*0$:4$w:5$#w*2$".$*0$####MDã*0$> w>#w*0$####K*.$"0$è͍!~#fo"}%!}%~#eã:}%2}%:~%2~% i`"6$!}%:6$:7$#*6$##:}%:~%#*}%~#fo))*}% *6$##y¼x#2*}%*6$##~#fo  #*}% *6$##~#fo##~#~F*6$##:6$:7$##!}%:6$:7$#ڝ*6$##:}%:~%#ڝ*6$##~#fo"6$}*}% *6$##~#~*6$~#fo))*6$ !}%ycx#*6$*}%  #*6$##*}% ~#~Û*6$##:}%w:~%#w*6$".$ã͍!~#fo"}%>28%:8%w:8%OG!8$ ~#fo:8%OG!<$ yO% x#Gi`"9%!9%~#ʂ:8%OG!>$ ~#fo}ʂ:8%OG!<$ ~#ʂ*9%:8%OG!<$ N#F:8%OG!@$ N#FÂ*}%Dã:8%28%÷͍!~#fo"}%!~#fo"y%*}%*y% ã*}%#"}%*y%#"y%æ*}%~¹ã͍!"}%*}%~#*}%N#F*}%N#F!N#F*}%##"}%ã͍!~#fo"}%*}%~:*}%#"}%(*}%!yOx#Gã͂!!!N#F ywx#w!#~!~#foMDÉ!~#¼!N#F!!!N#Fjywx#w!~#~!N#F!!!N#Fj. ..lprmailywx#w!~#foMDÉ͂! ~#~!i%͒!i%2q%2r%2s%>2t%!q%ͣ##~2;%#~2<%!i%͒!i%2q%2r%2s%>2t%!q%##~2=%#~2>%! ~#fo###*;%!N#Fͺx!*=%!N#Fͺx! N#F!##N#F!N#FͺxÉÉ!~#foMDÉ͂!!N#F8ywx#w!~"#~+É!~#foMDÉ͂!9!:?%w:@%#w!!~#fo!~#fo }|!N#FyxŠÉ!~#fo"?%!~#foMDÉ͂!9!:?%w:@%#w!!~#~!N#FyxÉ!~#fo"?%  ...deviceanged to "m". Thus, .ce .bd anat file.8 .sp is the same as .ce .bd anat -o file.m file.8 .sp If .bd -o is present, a name directive (title for Microsoft) is emitted using the output file name as the module name; any ".suffix" in the name is stripped off. If there is no .bd -o, but are present, the first input file name is used in the name directive. If neither is preset, no name directive is emitted. Code generation begins in .bd cseg, and reverts to .bd cseg at the end before any liter/dev/ttyC 9600 hardhand als are emitted. Any symbols not defined by the end of the input file are published via extrn statements at the end. .in -5 .bd NOTES .in +5 .br The start string used with .bd -s does not have "." and "_" mapped as identifiers. .in -5 .bd SEE ALSO .in +5 .br as (1), ld (1), lib (2), cc (1), cp1 (1), cp2 (1) NOTE: This program and documentation are products of Whitesmiths, Ltd., and are sold separately. ....he "archive (1) 1/13/82 archive (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd archive - archive maintainer .in -5 .bd USAGE .in +5 .br .bd archive {dptux} archname [files] .in -5 .sp 2 .bd FUNCTION .in +5 .br .bd Archive maintains a group of files combined into a single archive file. The archiver has good protection against data loss through disk overflow and works equally well with text and non-text files (for those systems on which there i. ..man1{man2man3man4man5s a distinction). .sp Exactly one key character must be specified to indicate which action you wish .bd archive to perform. The meanings of the key characters are: .sp 2 .in +10 .ta 10 .ti -10 d Delete the named files from the archive file. If no names are given, the archive is not altered. .sp .ti -10 p Print the named files in the archive. Non-printing characters are filtered out. .sp .ti -10 t Print a table of contents of the archive file. If no names are given, all files in the archive are tabled. If...anat.1archive.1chars.1clean.1common.1 compress.1 concat.1 cp.1 cptree.1 cxr.1dc.1detab.1down.1edit.1expand.1icheck.1init.10kwic.1/overstrike.1.lines.1-ls.1,macro.1+mkdir.1*mkfs.1)comm.1(mv.1'passwd.1&ps.1%pwd.1$ratfor.1 names are given, only those files are tabled. .sp .ti -10 u Update the named files in the archive. If the named archive does not exist, it is created. If no names are given, all files in the archive are updated. If a name is given which is not in the archive, a new archive entry is created and its contents becomes the contents of the named file. Otherwise, the contents of archive's entry is replaced with the current version of the file. .sp .ti -10 x Extract the named files. The files in the archive are.he "anat (1) 3/18/82 anat (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd anat - A-Natural assembler .in -5 .bd USAGE .in +5 .br .bd anat .in -5 .bd FUNCTION .in +5 .br .bd Anat translates A-Natural narrative assembly language for the Intel 8080 to standard assembly language acceptable for either the ISIS-II asm80 or the Microsoft Macro-80 assembler. Since the output of the 8080 code generator, .bd p2, is A-natural, .bd copied out to ordinary files of the same name. The former contents of the ordinary files are destroyed. If no names are given, all files in the archive are extracted. In neither case does x alter the archive. .bp .in -15 .bd EXAMPLES .in +5 .br To make an archive: .sp .ce .bd archive u newarch.a file1 file2 file3 file4  anat is required to interface the C compiler to existing 8080 software development facilities. The flags are: .sp .in +10 .ta 10 .ti -10 -i Emit code in ISIS-II format. Identifiers have each "." changed to "@" and each "_" changed to "?". Default is Microsoft, in which case each "." is changed to "$" and each "_" is changed to ".". .sp .ti -10 -o Filename can be specified with the -o operand so that the output is written to the specified file and an error message is written to STDOUT. Default is STDO.he "chars (1) 3/18/82 chars (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br chars - count characters in standard input or .nf files. .fi .sp 2 .in -5 .bd USAGE .in +5 .br .bd chars [file ...] .sp 2 .in -5 .bd FUNCTION .in +5 .br The number of characters in each of the named files is printed on the standard output. If it would provide additional information, a total is then printed. If no file names are specified, or if "-" is given as a file UT for output and STDERR for error message. .sp .ti -10 -s Emit an end statement. With a start operand, specifies a starting address. Default is no start address on the end statement. .sp 2 .in -10 If are present, they are concatenated in order and used as the input file instead of the default STDIN. If -o is absent, one or more files are present and the first filename begins with "8", .bd as then behaves is if .bd -o was specified using the first filename, except that the trailing "8" is ch name, the standard input is read up to an end-of-file and the number of characters read is printed. .sp Note: On some systems, (but not Micronix), the number of characters in a file is poorly defined. There are sometimes two kinds of files - text and binary. The standard input is assumed to be a text file while files specified by name are assumed to be binary files. .sp 2 .in -5 .bd EXAMPLE .in +5 .br To count the characters in a number of files: .sp .ce .bd chars file1 file2 file3 file4 .sp 2 .in -5 .bd SE the standard output. If the second named file does not exist, it is created. .sp .bd Compress searches for opportunities to abbreviate long runs of identical characters in an input stream. It encodes these into a form that the .bd expand program can later be used to undo. The remainder of the file is merely copied through. Most text files are probably not worth compressing unless they contain long runs of spaces. Data files, such as executable modules, benefit somewhat from compression. A typical compresE ALSO .in +5 .br lines (1), words (1) sion value is 7%. .in -5 .bd EXAMPLE .in +5 .br To compress a file (for disk file space saving): .sp .in +8 .bd compress input compressed .in -8 .in -5 .bd NOTES .in +5 .br Due to I/O idiosyncracies on some systems, the standard input and output cannot be used. The automatic addition of carriage returns, etc. in the input and output streams is unacceptable for this program. The construction .sp .in +8 .bd compress input output .sp .in -8 should work regardless of the local environment. .in -5 .bd SEE.he "clean (1) 6/18/82 clean (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd clean - clean CP/M format text files .in -5 .bd USAGE .in +5 .br .bd clean [-u] file ... .in -5 .bd FUNCTION .in +5 .br .bd Clean removes return characters from each of the named files and truncates the file upon encountering a CP/M end-of-file character (^Z). .sp The "cleaning" is done in place. To clean a file for general Micronix use, enter the .bd clean file command. ALSO .in +5 .br expand (1)  The -u option reverses the process. It stands for "unclean". Use .sp .ti +10 .bd clean -u file to make a file suitable for CP/M programs to look at. .in -5 .bd EXAMPLE .in +5 .br To import a CP/M text file, enter .sp .ce .bd far /dev/dja -x file; clean file .in -5 SEE ALSO .br .in +5 far (1) .he "concat (1) 3/18/82 concat (1)" .fo " -#-" .rm 65 .in 5 .bd PROGRAM .in +5 .bd concat - concatenate named files onto standard .nf output .fi .in -5 .bd USAGE .in +5 .bd concat file1 file2 ... .in -5 .bd FUNCTION .in +5 .fi .bd Concat reads each of the files named in its argument list and produces output which is the concatenation (in the order given) of the input files. If no file names are given, no output is produced. .in .he "common (1) 3/18/82 common (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .br .bd .in +5 common - print lines in common .in -5 .bd USAGE .br .in +5 .bd common [-wN] [-1] [-2] [-3] file1 [file2] .in -5 .bd FUNCTION .br .in +5 .bd Common prints lines in the first named file in column 1, lines in the second named file are printed in column 2, lines common to both files are printed in column 3. Leading blank space is removed for printin-5 .bd EXAMPLE .br .in +5 To read a file: .sp .in +8 .bd concat file .in -8 .in -5 .bd SEE ALSO .in +5 .br g purposes. The files are assumed to be sorted. If no second file name is given, the standard input is used for the second file. .sp If .bd -1, -2, or .bd -3 is given as an argument, those columns specified are printed. .sp Horizontal positioning of the columns may be changed with the .bd -w option. (Default is 80 columns wide.) .sp .bd -wN - where .bd N is a number - sets the width to .bd N columns wide. .in -5 .bd EXAMPLES .br .in +5 Find spelling mistakes .sp .in +5 .bd translit A-Z a-z .he "cp (1) 3/18/82 cp (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd cp - copy files .in -5 .bd USAGE .in +5 .br .bd cp source destination or .bd cp source ... directory .in -5 FUNCTION .in +5 .br The first named file is copied to the second. If the last named file is a directory, each of the preceding named files are copied "into the directory". .bd Cp refuses to copy a file to itself or wt1 .br .bd translit ^a-z @40 t2 .br .bd translit @12@40 @12 t3 .br .bd sort t4 .br .bd common -2 dictionary mistakes .in -10 .in .in 5 .bd NOTES .br .in +5 Only works with sorted inputs. ith the directory as source. That is, "file" is copied to "dir/file". .bd Cp, as a command under Micronix, is analogous (but not identical) to PIP under CP/M. It is the most common and efficient way to copy files. .in -5 .bd SEE ALSO .in +5 .br mv (1), common (1) and cptree (1) to copy large groups of files .he "compress (1) 3/18/82 compress (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd compress - compresses files .in -5 .bd USAGE .in +5 .br .bd compress [ input [ output ] ] .in -5 .bd FUNCTION .in +5 .br The first named file is compressed and written onto the second named file. If no file names are given, the standard input and output are used. If only one file name is given, the named file is used for input and its compression is written to .he "cptree (1) 3/18/82 cptree (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd cptree - copy Micronix file hierarchies .in -5 .bd USAGE .in +5 .br .bd cptree [-v] [source destination] .in -5 .bd FUNCTION .in +5 .br The contents of the source directory and all its descendants are copied into the destination directory. The destination directory must exist, but .bd cptree will create any needed sub-directories. s it is read; .bd ? is the only error diagnostic. The following is a list of the tokens, their meanings, and the action .bd dc will take. .bd .sp .in +5 A number. The number is pushed on the stack, (i.e., remembered). A number must begin with a digit or a minus sign followed by a digit. For example, to input ten in base sixteen, type .bd 0a. .sp 2 .in -5 .bd ' .sp .in +5 An apostrophe followed by a character is converted to that character's ASCII value and pushed onto the stack.  If either the source or destination names are not given, .bd cptree will ask for them. If .bd -v is in the command line, .bd cptree will print each operation in the tree copy as it is performed. It is permissible to copy a tree into a sub-tree of itself. .bd Cptree will avoid getting into a wormhole. .in -5 .bd SEE ALSO .in +5 .br mv (1), cp (1), rm (1) .sp 2 .in -5 .bd +, -, *, /, %, &, |, ^, <, > .sp .in +5 These are the binary operators. The top two values on the stack are combined. Division by zero is not permitted. If a binary operation is attempted with fewer than two numbers in the stack, an error will result. .sp The following are the operators and their meanings. .nf .in +3 .bd 10 + add - subtract * multiply / divide % modulo & bitwise and | bitwise or ^ bitwise exclusive or < bitwise shift left > bitwise shift right .in -8 .fi .sp .in +10 .ta 1.he "cxr (1) 3/18/82 cxr (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .br .in +5 .bd cxr - C cross reference listing generator .in -5 .bd USAGE .in +5 .bd cxr [ -exclusions ... ] [ program.c ... ] .in -5 .bd FUNCTION .in +5 .fi .bd Cxr generates a C cross reference listing for each of the named files. If an argument begins with a minus, the rest of the argument is taken as the name of file containing symbols to be excluded fr0 .ti -10 ~ The top value on the stack is bitwise inverted. It is an error for the stack to be empty. .sp .ti -10 i Set the input radix. The input radix is set to the value on the top of the stack. Values less than 2 are not accepted. Values larger than 36 are liable to cause garbage. All further input is assumed to be in the new radix. .sp .ti -10 o Set the output radix, as above. .sp .ti -10 p Print the value on the top of the stack. .sp .ti -10 c Clear. The stack is emptied. .sp .in -5 .in .in 5 .bd EXAom the cross referencing. The symbols found therein are added to the list of already excluded symbols. The exclusion files are free form. The symbols may appear most anywhere, as long as they are separated by non-alphanumeric characters. Note that the output of .bd cxr is in order of appearance. For a useful listing, run .bd cxr's output through .bd sort. If no cross reference input files are given, the standard input is used. For each symbol, the following is printed: .sp .in +8 .bd MPLES .br .in +5 What is 243 in hex? .sp .bd dc .br 16 o 243 p .sp 2 What is a capital N in octal? .sp .bd dc .br 8 o 'N p  .sp .in -8 where .in +8 .sp .bd .sp .in -8 is simply the name of the symbol. .in +8 .bd .sp .in -8 is the name of the file in which the current instance of the symbol occurs; is used when the standard input is being used. .in +8 .bd .sp .in -8 is the name of the function in which the current instance of the symbol appears. If the symbol is global, no function name is printed. .sp .in +8 .bd .sp .in -8 is the number of the file. .in +8.he "detab (1) 3/18/82 detab (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd detab - converts tabs into an equivalent number of .nf spaces .fi .sp 2 .in -5 .bd USAGE .in +5 .br .bd detab .in -5 .sp 2 .bd FUNCTION .in +5 .fi .bd Detab acts as a filter, copying the standard input to the standard output unchanged with the exception that tabs are expanded to an equivalent number of spaces. .bd Detab assumes tabs are ev .bd .sp .in -8 is the text of the line in which the current instance of the symbol appears. Leading white space is removed from the line before printing. .bp All of the C keywords and the std.h typedefs are automatically excluded. This includes the preprocessor keywords. Comments, string constants, character constants and numerical constants are excluded. .in -5 .bd NOTES .br .in +5 If you make your structure references or function declarations into onions of parenthesis, .bd cxr may gaffe. ery eight positions at columns 9, 17, 25, etc. .sp 2 .in -5 .bd EXAMPLE .br .in +5 .fi To prepare a file for printing on a device that does not understand tabs: .sp .in +8 .bd detab output .br .in -8 .sp 2 .in -5 .bd SEE ALSO .br .in +5 entab (1)  .in -5 .bd EXAMPLE .sp .bd .in +5 cxr file1.c file2.c file3.c file4.c >cross .sp .bd sort sorted .sp .in -5 Under Micronix: .sp .in +8 .bd cxr *.c | sort > output & .in -8 .in .in 5 .bd SEE ALSO .in +5 .br sort (1), kwic (1) .he "down (1) 3/18/82 down (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .br .in +5 .bd down - take the system down .in -5 .bd USAGE .br .in +5 .bd down .in -5 .bd FUNCTION .br .in +5 The .bd down command is the orderly way to bring Micronix down. Only the super user may use this command and it only functions when Micronix is in the multi-user mode. .in -5 .bd SEE ALSO .br .in +5 .ul User's Reference Manual, Installation a.he "dc (1) 3/18/82 dc (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .br .in +5 .bd dc - desk calculator .sp 2 .in -5 .bd USAGE .br .in +5 .bd dc .sp 2 .in -5 .bd FUNCTION .br .in +5 .bd Dc is a stack-oriented desk calculator allowing integer arithmetic and conversion. Its operation is much like a Reverse Polish Notation calculator. It reads the standard input and writes the standard output. Each token is processed as soon a nd Operation sp A regular expression enclosed in .bd / addresses the line found by searching .ul forward from the current line for the first line, which is matched by the regular expression. If necessary, the search wraps around to the beginning of the buffer. .sp A regular expression enclosed in .bd \ addresses the line as above, except that search is .ul backwards through the file. .sp Two addresses separated by a .bd + or .bd - addresses the line in the buffer which is the sum (or difference) of the two ad.he "edit (1) 3/18/82 edit (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .br .in +5 .bd edit - text editor .sp 2 .in -5 .sp .bd USAGE .br .in +5 .bd edit [file] .in -5 .bd FUNCTION .br .in +5 .bd Edit is a line-oriented text editor which operates on a temporary .ul copy of the file it is editing so that changes made have no effect on the file until a w(rite) command is issued. The copy of the text being edited resides in a temporary file called the .ul buffer. .sp Commands to edit have a simple and regular structure: zero or more addresses followed by a single command character, possibly followed by parameters to the command. Missing addresses are supplied by default. Certain commands allow the addition of text to the buffer (i - insert, c - change, a - append, etc., see below). Input governed by these commands is merely collected; no additional commands are recognized in this mode. To get back to normal command mode, type a pedresses. (Example: 2+1 addresses the third line of the buffer.) .sp If an address begins with .bd + or .bd -, addition or subtraction is taken with respect to the current line (i.e, -5 is equivalent to .-5). .sp An address consisting entirely of minus signs or entirely of plus signs is taken to mean the line forward or behind the current line by as many lines as plus or minus signs. (Example: "--" addresses the line before last.) .sp 3 .in -4 Commands may require one, two or no addresses. Commandriod (.) alone at the beginning of a line. .sp .bd Edit supports a limited form of regular expression notation. A .ul regular expression is used in commands and addresses to refer to patterns in the text. Following are the specifications for regular expressions: .sp .in +10 .ta 10 .ti -10 1. Any character except a special character matches itself. These are the regular expression delimiters: .bd { }, .bd [ ], .bd ?, and sometimes .bd %, *, and .bd $. .sp .ti -10 2. A .bd ? matches any character (excs which require no addresses regard the presence of an address as an error. Commands which accept addresses assume default addresses if too few addresses are given. .sp Addresses are separated by a .bd ,. The second address of a two address sequence must correspond to the following line. (Example: 3,2 is an illegal address list.) A .bd % is shorthand for .bd 1,$. .sp In the following list of .bd edit commands, the default addresses are shown in parentheses. The parentheses are not part of the address,ept newline). .sp .ti -10 3. A .bd @ followed by any character except .bd ( or .bd ) matches that character. .sp .ti -10 4. A string enclosed in .bd [ and .bd ] (or .bd [^ and .bd ] ) matches any character in, or not in, the set consisting of the characters of the string (example: [abc] matches a, b, or c). If a substring of the form .bd a-b with .bd a and .bd b letters or digits within the brackets, it is understood to mean the set of characters spanned by the two limits. (Examples: [0-9 but are used to show that the given addresses are the defaults. Most commands may be followed by a "p" meaning that the line is to be printed after the operation is performed. With many commands this happens automatically. .bp .nf .bd (.) a .bd .bd (.) .fi .sp .in +4 The given text (which may be excessively long and/or consist of many lines) is a(ppended) after the present line and before the next line if there is one. 0 is legal as an address for this command; the text is placed at the beginning o] matches any digit; [a-zA-Z] matches any upper or lower letters.) .sp .ti -10 5. A regular expression of forms 1-4 followed by .bd * matches a contiguous run of 0 or more occurrences of the preceding regular expression. (Examples: .bd * matches any number of spaces (including zero); .bd ?* matches the entire line (any number of occurrences of any character). .sp .ti -10 6. A regular expression enclosed in .bd { and .bd } matches what the regular expression matches. [It also has side effects - seef the buffer. .nf .sp 2 .in -4 .bd (.,.) c .bd .bd (.) .fi .sp .in +4 The c(hange) command first deletes the addressed lines, then accepts text which replaces these lines. .nf .sp 2 .in -4 .bd (.,.) d .bd .bd (.) .fi .in +4 The addressed lines are d(eleted) from the buffer. (Example: 1,$d completely erases the buffer.) .sp 2 .ti -4 .bd e[!] [filename] .br The e(nter) command causes the entire contents of the buffer to be deleted, then the named file to be read in. If you are finished editing the .bd s - (substitute) command below.] .sp .ti -10 7. The concatenation of regular expressions matches the concatenation of what is matched. .sp .ti -10 8. A .bd % as the first character of a regular expression restricts matches to the left end of the line. A .bd $ as the last character similarly limits matches to the right end of the line. .sp .ti -10 9. A regular expression matches the longest among the left-most of possible matches. .sp .ti -9 10. An empty regular expression stands for a copy o one file and wish to switch to another, use .bd enter. If the file you are presently working on has not been written, a diagnostic is printed. This is intended to reduce the possibility of accidental loss of work. The optional exclamation point overrides this safety feature. .sp 2 .ti -4 .bd f [filename] .br The remembered f(ilename) is printed. If a filename is given, the remembered filename is changed to it. .bp .ti -4 .bd (1,$) g/regular expression/command .br G(lobal). First, every line in the f the last regular expression encountered. .sp 3 .in -10 To understand addressing in .bd edit, you need to know that at any time, .bd edit remembers a .ul current line. In general, the current line is set to the last line affected by the previous line. The current line is initially set to the last line of the file. Addresses are constructed as follows: .sp .in +4 A .bd (.) addresses the current line. .sp A .bd $ addresses the last line. .sp A decimal number (n) addresses the nth line of the buffer. . buffer matching the regular expression is marked. Then for each marked line, the command is executed with .bd (.) initially set to that line. .sp 2 .in -4 .bd (.) i .bd .bd (.) .in +4 .fi The given text is i(nserted) just before the addressed line. This command differs from .bd append (above) only in the placement of the text. .sp 2 .ti -4 .bd (.,.+1) j .br The j(oin) command joins the addressed lines into a single line. In any case, an additional space is inserted between the text of the nly works if file is still in buffer. .sp 2 .ti -4 .bd (1,$) w[!] [filename] .br The addressed lines are w(ritten) onto the named file. If no file name is given, the remembered name, if any, is used. If the named file exists and is not the remembered file, a diagnostic is printed. This is intended to prevent accidental overwriting of valuable files. The optional exclamation point immediately following the write command character suppresses this safety feature. .sp 2 .ti -4 .bd (1,$) x/regular expression/formerly separate lines. .sp 2 .ti -4 .bd (.,.) l .br The addressed lines are l(isted) in an unambiguous way. Control characters are displayed as a caret ("^") followed by the upper case letter corresponding to the control character. Dirty characters (with the sign bit set) are displayed as three-digit octal preceded by a back slashes ("\"). .sp 2 .ti -4 .bd (.,.) m a .br The m(ove) command repositions the addressed lines after the line referred to by the address "a". .sp 2 .ti -4 .bd n[!] .br Edit the ncommand .br Exactly like the global command (above) except that all lines .ul not matching the regular expression are affected. .bp .ti -4 .bd (.+1) z [N] .br Print the next .bd n lines (default 22). The value .bd n is sticky, in that it becomes the default value for future scroll commands. This command is quite useful for marching your way through text. .sp 2 .ti -4 .bd ($) =[l] .br Lines are printed with line number. If [l] is given, then the line is additionally printed in the style described i(ext) file, if any, in the argument list. This is an easy way to edit a group of files without having to remember all their names yourself. If the exclamation point is given, the command is forced. (Example: edit a b c d e; ... n ... n ...) .bp .ti -4 .bd (.,.) p[l][=] .br The addressed lines are p(rinted) in the specified format. The "l" means to print in the manner described in the "l" command (above). The .bd = means to number the lines. Note that the printing format remains in effect until it is chn the "l" command (above). Lines are printed out with numbers until the "=" sign is entered again. .sp 2 .ti -4 .bd < file .br The named file is read as further input for edit. The command may contain further .bd < commands. .sp 2 .ti -4 .bd (.+1,.+1) .br An address alone on a line causes the text of the addressed line to be printed. A blank line alone is equivalent to .bd .+1p and is useful for stepping through text. .in -5 .bd NOTES .br .in +5 Sending a ^C character to .bd edit underanged again. .sp 2 .ti -4 .bd q[!] .br Use the q(uit) command to terminate an editing session. No automatic write of the file is done. A diagnostic is printed if the buffer has been changed since the last write command. This feature offers some degree of protection against accidental loss of work. The optional exclamation point immediately following the "q" overrides this safety feature, (i.e., quit impetuously). .sp 2 .ti -4 .bd (.)r [filename] .br The r(ead) command reads in the named file after the ad CP/M (Digital Research) will cause your work to be ungracefully lost (but this is not a problem under Micronix). .in -5 .bd SEE ALSO .br .in +5 Kernighan, Brian W. and P.J. Plauger, .ul Software Tools, (Addison-Wesley, 1976). dressed line. If no filename is given, the remembered filename is used. The filename is remembered if there is as yet no remembered filename. Address "0" is legal for this command and causes the named file to be read in at the beginning of the buffer. .sp 2 .ti -4 .bd (.,.)s/regular expression/replacement/[g] .br In the s(ubstitute) command, each addressed line is searched for strings matching the regular expression. An optional "g" (global) may follow the substitute command. In the presence of a "g" all .he "expand (1) 3/18/82 expand (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .br .in +5 .bd expand - uncompress files .in -5 .bd USAGE .br .in +5 .bd expand [ input [ output ] ] .in -5 .sp 2 .bd FUNCTION .br .in +5 .fi .bd Expand reverses the effects of .bd compress. .bd Expand is not guaranteed to do anything sensible with input which is not the result of a .bd compress run. The first named file is expanded and written into the seoccurrences of matched strings are replaced by the given replacement text. In the absence of a "g" only the first matched string in each line is replaced. It is an error for the substitution to fail on all addressed lines. .sp An .bd & appearing in the replacement text is replaced by the string matching the regular expression. (Example: s/toves/slithy &/ would change "toves" into "slithy toves".) .bd @n where it is a digit (1 through 9) is replaced by the nth regular subexpression enclosed in .bd } acond named file. If no file names are given, standard input and output are used. If only one file name is given, the named file is used for input, and its expansion is written to the standard output. .sp 2 .in -5 .bd EXAMPLE .br .in +5 .nf A (Micronix) do-nothing pipeline: .sp .in +8 .bd ... | compress | expand | ... .in -8 .sp 2 .in -5 .bd SEE ALSO .in +5 .br compress (1) nd .bd {. When nest parenthesized regular sub-expressions are present, n is determined by counting occurrences of .bd { starting from the left. These regular sub-expressions tagged by number can be extremely useful in automating otherwise impossible editing tasks. (Example: .bd s/{[A-Z][a-z]*}, {[A-Z][a-z]*}/@2,@1/ would convert a list of people's names from: "lastname, firstname" to "firstname lastname".) Lines may be split by substituting newline characters into them. .bd @n in the replacement patt.he "icheck (1) 3/18/82 icheck (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd icheck - file system consistency check .in -5 .bd USAGE .in +5 .br .bd 2 icheck [-s] [-b numbers] filesystem .sp c .in -5 .bd FUNCTION .in +5 .br .bd Icheck assumes "filesystem" is the name of a special file containing a Micronix file system. .bd Icheck checks the inodes (block pointers) and the free list to see that no block is referenern is understood to mean newline. If no replacement pattern is given, the previous replacement pattern is used, (i.e., "s/pattern"). If neither pattern is given, then the previous substitute command is re-executed, (i.e., "s"). This feature saves a lot of time. .sp 2 .ti -4 .bd (.,.)t a .br The t(ranscribe) command works exactly like the .bd move command, except that a copy of the addressed lines is placed after the line corresponding to address "a". .sp 2 .ti -4 .bd u .br .bd Undo previous command; o ced more than once. It also prints statistics about the file system. .in +10 .ta 10 .ti -10 -s causes the free list to be reconstructed from scratch. .ti -10 -b followed by a list of block numbers will cause the requested block numbers to be called out when they are encountered. .in -10 .bd Icheck can take several minutes on a large file system. .in -5 .bd EXAMPLE .in +5 .br To check the root file system: .sp .ce .bd icheck /dev/root .in -5 .bd NOTES .in +5 .br Be sure that the file system in ques. .in -5 .bd EXAMPLE .br .in +5 To prepare a file for printing on a device which does not understand back spaces: .sp .in +8 .bd overstrike output tion is not active. .in -5 .bd SEE ALSO .in +5 .br ncheck (1), dcheck (1) .he "lines (1) 3/18/82 lines (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .bd lines - count lines in standard input or files .in -5 .bd USAGE .in +5 .bd lines [file ... ] .in -5 .bd FUNCTION .in +5 .fi The number of lines in each of the named files is printed along with the file name. If it would provide additional information, a total is printed at the end. If no file names are specified, or if "-" is given as a file .he "init (1) 3/18/82 init (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br init .in -5 .bd USAGE .in +5 .br .bd /etc/init .in -5 .bd FUNCTION .in +5 .br .bd Init creates an automatic process for each terminal on a which a user may log in. .bd Init first brings the system up in single-user mode, with only the console active. If there is a password on the "root" account, it demands this first. (Therefore, it name, the standard input is read up to and end-of-file and the number of lines is printed. .in -5 .bd EXAMPLE .br .in +5 .nf To count the lines in a number of files: .sp .in +8 .bd lines file1 file2 file3 file4 .in -8 .in -5 .bd SEE ALSO .in +5 chars (1), words (1) is a good idea to keep a Micronix diskette with an unprotected root account, in case the root password is lost.) When the single user shell exits, .bd init runs the shell script "/etc/rc" if it exists, then reads the file "/etc/ttys", and branches several times to create a process for each terminal specified in the file. When one of init's child processes terminates, a new process is generated to take its place. Normally, this takes place automatically. The format of the "/etc/tty" file is as follows,.he "ls (1) 6/25/82 ls (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br ls .in -5 USAGE .in +5 .bd .br .bd ls [-adfgilrstu] name ... .in -5 .bd FUNCTION .in +5 .br .bd Ls lists all the named non-directories first, then the contents of each named directory. If no names are specified, the current directory is listed. There are three basic printing formats: line, multi-column, and long. Line format is one file to a line. In mu (one per line): .nf .bd tty A (9600) (on) (shake) .fi .sp 2 .in -5 .bd SEE ALSO .in +5 .br ttys (5) lti-column format, .bd ls produces a rectangular array of file names sorted down the page and compacted as much as possible within an 80 column width. In long format, files are listed one to a line with a lot of information about each file packed into the line (see -l below). Long format is explicitly forced by the -l or -g option (see below). Otherwise, .bd ls chooses line or multi-cloumn format automatically, depending on whether its standard output is a file or a terminal. Options: .ta 5 .in +5 ..he "kwic (1) 3/18/82 kwic (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .bd kwic - prepares key word in context index .in -5 .bd USAGE .in +5 .bd kwic .in -5 .bd FUNCTION .in +5 .fi .bd Kwic is a special purpose program useful in the preparation of context indexes. It produces one output line for each word of input suitably rotated so that the word in question appears at the beginning of the line. End of line is marked bti -5 .bd -a All. .bd Normally, files names beginning with '.' are not listed. If -a is specified, they are listed. .ti -5 .bd -d Directory. Normally, if a directory name is given, its contents is listed. If -d is specified, then only the name is printed (along with any other attributes called for by other options). .ti -5 .bd -f File order. Disable all sorting and print the files in the order they actually appear in the directory. .ti -5 .bd -g Group. For each file, print the name of the owner's group, y addition of a dollar sign ($). .br .in -5 .bd EXAMPLE .br .in +5 In standard usage: .sp .in +8 .bd kwic index .in -8 .in -5 .bd SEE ALSO .in +5 .br Kernighan, B.W. and P.J. Plauger, .ul Software Tools, (Addison-Wesley, 1976). .sp unrot (1), sort(1) instead of the owner's login name. The latter is the default for long listings. (This option forces a long listing, whether or not -l has been specified.) .ti -5 -i Print the inode number of each file. .bp .ti -5 .bd -l Long format. Print mode, link count, owner, size, time of last modification, and name. .ti -5 .bd -r Reverse. Files are sorted in reverse order. .ti -5 .bd -s Sizes are given in blocks (of 512 bytes each) instead of characters. .ti -5 .bd -t Time sort. Sort files by modification time (mo.he "overstrike (1) 3/18/82 overstrike (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd overstrike - converts back spaces to multiple lines .in -5 .bd USAGE .in +5 .br .bd overstrike .in -5 .bd FUNCTION .in +5 .br .bd Overstrike copies the standard input to the standard output. When it encounters a back space, it replaces it by a "return" and an appropriate number of spaces, thus eliminating backward motion in the middle of a line st recent first) instead of alphabetically. .ti -5 .bd -u Use the access time instead of the modification time for -t and -l. .sp 2 Long printing format is laid out as follows: Each line refers to one file. The fields printed are: .sp .bd .ce mode links owner size time name .sp Mode is the access permissions of the file symbolically displayed. Links is the number of links to the file. Owner is the login name of the user who owns the file. Size is the size of the file in bytes (or blocks with the$2 + $3) .br .bd add(firstarg, secondarg, thirdarg) .br .in -8 .sp would produce: .sp .in +8 .bd firstarg + secondarg + thirdarg .sp 2 .in -8 .in -5 .bd EXAMPLE .br .in +5 .nf As a language preprocessor stage: .sp .in +8 .bd macro tm1 .in -8 .sp 2 .in -5 .bd SEE ALSO .in +5 include (1), ratfor (1)  -s option) Time is the last modification time (or last access time) of the file. The mode takes the form: .sp .ce .bd -[bcd]rwxrwxrwx .sp The .bd - stands for plain file or permission not granted; the .sp .nf b stands for block special file c stands for character special file d stands for directory .sp .fi Files may also have the following characters interspersed within these descriptions: .sp .nf l stands for write locked file s stands for set user or group ID on execution r stands for read per.he "mkdir (1) 3/18/82 mkdir (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd mkdir - make directory .in -5 .bd USAGE .in +5 .br .bd mkdir newdir ... .in -5 .bd FUNCTION .in +5 .br .bd Mkdir creates the specified directory or directories. Entries for "." and ".." are created automatically. .in -5 .bd ERRORS .in +5 .br The given directory names must not yet exist. .bd Mkdir requires write permission on the pmission w stands for write permission x stands for execute permission .sp .fi If a letter is missing in the above representation, it indicates that permission for that mode of access is not permitted. .sp .in -5 .bd EXAMPLES .in +5 .br .ti +8 .bd drwxr-xr-x The .bd d means this is a directory. The .bd rwx means the owner of the directory has all permissions. The .bd r-x means those user's in the directory's group have only read and search permission on the directory. Likewise for others (those usearent directory. If a multiple element path name is given, .bd mkdir creates each of the directories in the path leading to the desired directory. It is not possible to remove a directory from the system that contains files; files must first be removed using the .bd rm command. .in -5 .bd EXAMPLES .in +5 .br .bd mkdir /a/sally .bd mkdir /usr/spool/mail /usr/spool/lpr Each directory created is accessible to any user. It is advisable to organize your work by keeping related files together in their rs who are neither the owner of the directory nor in the same group). .sp 2 .ti +8 .bd -rl-r--r-- .sp .bd - means this is a plain file. .sp .bd rl- means the file is readable by the owner and write locked. .sp .bd r-- means the file is readable by those in the group. the second .bd r-- means the file is readable by anyone else on the system also. .sp 2 .fi .in .in 5 .bd FILES .in +5 .br /etc/passwd - to get names for user ID numbers .br /etc/group - to get names for group ID numbers .sp 2 .in -5 .bd own, separate directories (i.e., mkdir programs, mv *.c programs, etc.). .in -5 .bd SEE ALSO .in +5 .br rm (1) .he "mkfs (1) 3/18/82 mkfs (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd mkfs - make an empty file system .in -5 .bd USAGE .in +5 .br .bd 2 mkfs device [size] .br mkfs device [-exclude] .in -5 .bd FUNCTION .in +5 .br .bd Mkfs builds an empty file system on the named device. If no size is specified, it determines the device size automatically. A numerical argument .ul without a leading "-" is taken as the desirSEE ALSO .in +5 .br chmod (1) - to change the mode of a file owner (1) - to change the owner of a file group (1) - to change the group of a file passwd (5) - the structure of the password file group (5) - the structure of the group file ed size (in 512-byte blocks). A numerical argument .ul with a leading "-" is taken as a number of blocks to be excluded from the file system at the end of the device (say for swap space). In this case, the actual device size is also determined automatically. The .bd ilist size is set to .sp .ce .bd s/43 + s/1000, .sp where .bd s is the file system size determined above. The smallest practical file system is about 50 blocks. .bd Warning! Extreme care should be taken when using this command: It .ul o.he " macro (1) 3/18/82 macro (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .br .in +5 .bd macro - macro expansion .in -5 .bd USAGE .br .in +5 .bd macro .in -5 .bd FUNCTION .in +5 .fi The standard input is copied to the standard output, with macros expanded along the way. After encountering a line of the form: .br .sp .in +8 .bd define(token,string) .br .sp .in -8 the token will be replaced by the string everywhere it appears. A token bliterates any former file system on the device. If, for example, you entered .sp .ce .bd mkfs /dev/root .sp you would have to rebuild your files from scratch. Needless to say, aim carefully! .in -5 .bd ERRORS .in +5 .br The named device must be a block-special file. .in -5 .bd EXAMPLES .in +5 .br .nf .bd 3 mkfs /dev/dja mkfs /dev/hdb -2048 mkfs /dev/hhb 18448 is a contiguous string of alphanumerics delimited by non-alphanumerics. Macro exansions are applied recursively [i.e. define(a,b) define(b,c) is equivalent to define(a,c)]. Macros may be defined with arguments. If the sequence $n where n is a digit occurs in the defining string, $n will be replaced by the nth argument. $1 is the first argument. In an instance where a macro has fewer than n arguments, $n is replaced by the null string, (i.e., simply ignored). An example: .sp .br .in +8 .bd define(add, $1 +  .he "comm (1) 3/18/82 comm (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .br .bd .in +5 comm - print lines in common .in -5 .bd USAGE .br .in +5 .bd comm [-123] file1 [file2] .in -5 .bd FUNCTION .br .in +5 .bd Comm prints lines unique to the first named file in column 1, lines unique to the second named file in column 2, and lines common to both files in column 3. Leading blank space is removed for printing purposes. The files must be sorted. .in 5 .rm 65 .he "ps (1) 5/18/82 ps (1)" .fo " -#-" .bd NAME .in +5 .br .bd ps - process status .sp 2 .in -5 .bd SYNOPSIS .in +5 .br ps [alx] .sp 2 .in -5 .bd DESCRIPTION .in +5 .br .bd Ps prints information about processes currently running on the system. Any user is allowed to know the command name other users are running. The actual data being processed is not a matter of public record, however. .sp .bd Ps can be very useful in If no second file name is given, the standard input is used for the second file. Flags 1, 2, or 3 suppress printing of the corresponding columns. Thus .bd comm -12 prints only the lines common to the two files; .bd comm -13 prints only the lines that are unique to the second file; .bd comm -123 prints nothing. .in -5 .bd EXAMPLES .br .in +5 To find spelling mistakes .in +5 .bd translit A-Z a-z t1 .br .bd translit ^a-z @40 t2 .br .bd translit @12@40 @12 t3 .br .bd sort t4 .br .btracking down errant processes and terminating them. .sp Options: .sp 2 .in +5 .ta 5 .ti -5 a All. Print information about all processes associated with a terminal. .sp .ti -5 l Long format. Print detailed information on each process. .sp .ti -5 x Print information about all processes not associated with a terminal. .sp .in -5 The following is a description of each possible column in the output from .bd ps. .sp 2 STATE represents the current state of the program. Within the state field the following fld comm -13 dictionary mistakes .in -10 .in .in 5 .bd NOTES .br .in +5 Only works with sorted inputs. ags may show up: .sp .in +5 .ta 5 .ti -5 Al Alive. The process has not yet terminated. .sp .ti -5 Aw Awake. The process is not waiting for a slow event and may be run immediately. .sp .ti -5 Ld Loaded. The process has been loaded into memory. .sp .ti -5 Lk Locked. The image of this process is currently locked in main memory. .sp .ti -5 Sw Swapped. The image of this process currently resides on the swap device. .sp .ti -5 Sy System. This process is in its system phase. .in -5 .sp .ti -5 UID User ID numbe.he "mv (1) 3/18/82 mv (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd mv - move or rename files .in -5 .bd USAGE .br .in +5 .bd 2 mv file1 file2 .sp mv file ... directory .in -5 .bd FUNCTION .br .in +5 .bd Mv moves (changes the name of) file1 to file2. If the last argument is a directory, each of the named files is moved into the directory retaining their original names. This command is similar to the REr. Number identifying the user running the process. .sp .ti -5 PID Process ID. The identifying number of the process. .sp .ti -5 PPID Parent's process ID. The identifying number of the parent process. .sp .ti -5 CPU The CPU priority of the process. .sp .ti -5 PRI The run-time priority of the process. .sp .ti -5 NICE The user settable priority of the process. .sp .ti -5 WCHAN The address of the event on which this process is sleeping. .sp .ti -5 TTY The name of the controlling tty for this process. .sp .ti Name command in CP/M. .in -5 .bd SEE ALSO .br .in +5 -5 COMMAND The name of the command. (Usually a close approximation of what was entered from the keyboard.) .sp 2 .in .in 5 .bd EXAMPLE .br .in +5 To kill your runaway process from another terminal: .sp .ta 5 .in +5 .ti -5 1) Log in. .sp .ti -5 2) Type "ps". .sp .ti -5 3) Locate the process of interest in the resulting printout. .sp .ti -5 4) Type "kill process ID number"; ex: "kill 7" .sp 2 .in .in 5 .bd SEE ALSO .in +5 .br sh(1), signal(2) .he "passwd (1) 6/25/82 passwd (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd passwd - enter (or change) login password .in -5 .bd USAGE .in +5 .br passwd .in -5 .bd FUNCTION .in +5 .br .bd Passwd is used to changed the login password of the given user. When a user's account is first created, it has no password, that is, no password will be demanded of the user at log in time. This command may be used set or change you.he "pwd (1) 3/18/82 pwd (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .br .in +5 .bd pwd - present working directory .in -5 .bd USAGE .br .in +5 .bd pwd .in -5 .bd FUNCTION .br .in +5 .bd Pwd finds and displays the full path name of the working directory under which it is executed. .in -5 .bd NOTES .br .in +5 Presently, .bd pwd fails if file systems are mounted on directories other than the root, but this is only a ter password. The super user may set or change anyone's password, but, not even the super user may know what a user's password is. It may, however, be changed to something known. This program is fairly self-explanatory and prompts you for the name of the user whose password you want to change and the password itself. When you type the password, the "echo" is temporarily turned off, so that the password is unseen. Only the encryption of the password is kept around. If two or more users set their password to tmporary situation. he same thing, the encryptions will not be the same. .sp 2 .in -5 .bd NOTES .in +5 .br It is recommended, if the intention is password security, that passwords be long, complicated, fast to type, and frequently changed. .in -5 .bd SEE ALSO .in +5 .br Tutorial in User's Manual  .he "ratfor (1) 3/18/82 ratfor (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd ratfor - ratfor -> FORTRAN translator .in -5 .bd USAGE .br .in +5 .bd ratfor .sp 2 .in -5 .bd FUNCTION .in +5 .br .fi The .bd Ratfor preprocessor for FORTRAN enables you to write in a the free-form structured language, Ratfor, then compile your programs with your existing FORTRAN compiler. This implementation incorporates .bd include and .b !"#$&'d macro capabilities. .bd Ratfor reads from the standard input and writes to the standard output. It may be used as a filter. .sp Lines of the form: .sp .in +8 .bd include file .sp .in -8 are replaced by the contents of the named file. .bd Includes may be nested. Note that some implementations include the file "file.rat". In this implementation, the file must be named explicitly. .sp Macro definitions such as: .sp .in +8 .bd define(token,string) .sp .in +3 or .sp .in -3 .bd define(token,...$1...$2...$3....lt. less than <= .le. less than or equal == .eq. equal != .ne. not equal ^= .ne. not equal ! .not. logical negation ^ .not. logical negation & .and. logical and | .or. logical or .in -8 .sp 2 .in .in 5 .bd EXAMPLE .nf .in +5 To compile a Ratfor program using Microsoft FORTRAN: .sp .nf .bd 3 ratfor program.for f80 program.rel,tty:=program.for/n l80 program.rel,forlib.rel,program.com/n,/e .fi .sp 2 .in -5 .bd NOTES .br .in +5 .fi .bd Do statements generate a spurious, although harmless, e) .br .sp .in -8 may appear. The left parenthesis must follow the word define immediately. In the first case, .bd string is merely substituted for .bd token everywhere it appears. In the second, occurrences of the form: .sp .ti +8 .bd token(arga,argb,argc) .sp are replaced by the defining string, but with the values substituted for the arguments. The construction $n, where n is a decimal digit, signifies the nth argument. A given macro may have at most nine arguments. Macro definitions may be recursive.xtra .bd continue in the absence of a .bd break statement. .sp 2 .in -5 .bd ALSO READ .br .in +5 .fi Kernighan, B.W. and P.J. Plauger, .ul Software Tools, (Addison-Wesley, 1976).  .br .sp Any valid FORTRAN statement is a valid .bd ratfor statement. A statement or group of statements may be enclosed in curly brackets "{" and "}". The result is treated as a single statement. In addition to standard FORTRAN, the following are understood: .bp .bd if (condition) statement; .sp .in +5 The statement is executed if the condition is true. .sp .in -5 .bd if (condition) statement; else statement; .sp .in +5 If the condition is true, the first statement is executed, otherwise the second sta#rm.1"sh.1!sort.1@stty.1?tail.1>translit.1=unrot.1<update.1;upm.1:who.19words.18as.17df.16print.15change.14sum.13cmp.12entab.11compare.1Pcopy.1Omake.1Ncrypt.1Minclude.1Ldate.1Kunique.1Jdcheck.1Idiff.1Hcat.1Gfar.1Ffind.1Eform.1Dmail.1tement is executed. An .bd else goes with the last un-elsed .bd if. .sp .in -5 .bd while (condition) statement; .sp .in +5 The statement is executed repeatedly as long as the condition remains true (possibly zero times as the condition is always tested before the statement is executed.) The condition may not be left out. For an infinite loop, see .bd repeat below. .br .sp .in -5 .bd for (statement; condition; statement) statement; .sp .in +5 First, the first statement is executed. Then repeatedly the con.he "rm (1) 6/25/82 rm (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd rm - remove files (directories) .in -5 .bd USAGE .in +5 .br .bd rm [-r] file ... .in -5 .bd FUNCTION .br .in +5 Each of the named files is removed, if possible. It is also used also to remove directories; files must be removed first, however. The -r option removes entire hierarchies of files. This means all files, subdirectories, didition is tested, and if true, the last statement is executed, then the second. If the condition is false, the loop is broken and control proceeds to the next statement following the .bd for. More clearly: the first statement is the initializer of the loop, the second is the incrementation, and the last is the body of the loop. .br .sp .in -5 .bd repeat statement; .sp .in +5 The statement is executed repeatedly. .br .sp .in -5 .bd repeat statement; until (condition); .sp .in +5 The statement is executed rerectories, etc. will be permanently erased, which means that this option is quite .ul dangerous! When run interactively, this program asks if it may proceed with the requests, however, offering some amount of protection, but still, take care when using this command. .in -5 .bd ERRORS .in +5 .br It is not possible to remove non-empty directories. peatedly until the condition is true. The condition is always tested after the statement is executed, which is to say, the statement will always be executed at least once. .sp .in -5 .bd do limits; statement; .sp .in +5 A FORTRAN .bd do loop is set up with the specified limits and the statement as the body of the loop. You are relieved of the burden of dealing with the continue statement and its statement number. .bp .in -5 .bd number statement; .sp .in +5 Statements may be numbered. Numbers may comprise.he "sh (1) 4/18/82 sh (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd sh .in -5 .bd USAGE .in +5 .br .bd sh [-v] [-c command] .in -5 .bd FUNCTION .in +5 .br The .bd shell establishes an interface between the user and the Micronix operating system. It is a general purpose command interpreter and it should be noted at this point that the .bd shell is just another process to Micronix; it is by no means the  at most five digits. You need not worry about where on the line the number appears. .sp .in -5 .bd break; .sp .in +5 One level of .bd while, .bd for, .bd repeat, or .bd do loop is broken out of. .sp .in -5 .bd next; .sp .in +5 Transfers control to the looping mechanism of the innermost .bd while, .bd for, .bd repeat, or .bd do in which it occurs. .sp 2 .in -5 .in .in 5 .in +5 .sp 2 The following abbreviations may be used: .sp .in +8 .nf .bd 11 > .gt. greater than >= .ge. greater than or equal <  final word in command interpreters. The user may wish to write his/her own command interpreter. That is to say, the .bd shell is not part of the operating system, but merely serves to provide convenient access to the system's facilities. The Micronix command interpreter, or .bd shell, provides convenient access to the Micronix system facilities. It is intended to be simple, even transparent, to use. In normal operation, the .bd shell enters interactive mode and successively reads, interprets, and put and the standard error are sent to the named file. The last form is the same as the third, except the option is appended to the end of the named file. .br An expression of the form .bd "(a > b) >& c" can be used to split the output from the command a, standard output to file b, standard error to file c. .bd Pipes. Commands may be piped together, that is, the standard output of one process can be "connected" to the standard input of another. The processes are run concurrently. A "|" (vertical bar) iexecutes commands. When it receives a line of input, the .bd shell first breaks it into "words". Normally a word is a cluster of symbols surrounded by white space. Certain symbols have special meaning to the .bd shell, i.e. characters in the set .bd < > & | ` " ( ). When encountered, they are treated as separated entities, regardless of the presence or absence of surrounding white space. .bd Shell Features: .bd Command Execution. The first word of a command has special meaning for the .bd s the symbol denoting a pipe. The following command line .nf .bd print file | lpr, .fi would send the output of the print command to the input of the .bd lpr command. The .bd shell has its own syntax for a linear array of pipes, limited in length only by the maximum available number of processes. As an example: .nf .bd cat file find word1 | find word2 | words .bd comm1 | comm2 | comm3 | comm5 | ... etc. .fi .bd Asynchronous Commands. It is possible to run a command asynchronously, or in theshell. It expects this word to be the "command name". When it encounters a word which it does not recognize, the .bd shell assumes it refers to a program, which it then attempts to find and execute. .bd Path Searching. If it fails to find the command, it prints an error message. The .bd shell searches for commands in a series of pre-specified directories called the "search path". The default search path is ".", "/bin", "/usr/bin". The .bd shell's current idea of the search path may be examined or c background. Normally, a command is run and the .bd shell waits for it to finish before prompting for additional input. When a command is run asynchronously, however, the .bd shell does not wait, but returns immediately, while the command continues to execute parallel to the .bd shell. With this facility, a single user on a single terminal can be doing several things at once. A pipeline followed by an ampersand on the command line causes all of the processes in the pipeline to be run asynchronously. hanged by the built-in "path" command discussed below. If the first word of a command contains a .bd / (slash) character, then the normal path searching mechanism is disabled and the .bd shell attempts to execute the exact name specified. .bd Directory Hashing. The .bd shell internalizes the contents of the directories in the search path, so that in order to locate a command, it does not need to refer to the file system. This function is intended to be transparent. If, however, a program is added oWhen an asynchronous command completes or is abnormally terminated, the .bd shell gives notification. The process ID is given when the asynchronous process is dispatched. Example: .bd ls -l& .bd Argument Expansion. All words in the command line are subject to expansion. Words are expanded with the following characters: .nf .bd * ? [...] [^...] .fi If a word contains any of these constructions, it is evaluated as a pattern to be matched against the set of extant file names. That is, the givr removed to one of the directories in the search path in the middle of a session, (normally a very rare occurrence) the .bd shell's internal tables will disagree. In this case it may be necessary to enter the command's name twice, (causing the .bd shell to remake its internal tables). There is a significant speed payoff to this way of doing things. .sp 2 .bd I/O Redirection There is the concept of standard input, standard output, and standard error. An accepted way to fashion programs is to have theen word will be replaced by the list of all file names it matches. Following are the rules for pattern matching. .ta 10 .in +10 .ti -10 * This character is "wild card" of sorts, matching any number of characters, and any character, including zero. .ti -10 ? Matches any single character. .ti -10 [ ... ] Matches any single character listed within the brackets. .ti -10 [^...] Matches any single character NOT within the brackets. .ti -10 x Ordinary characters match themselves. .in -10 Matching patternsm read from the standard input, write to the standard output, and send error or other transient messages to the standard error. By default, each process is set up so that its standard input is read from the controlling terminal and standard output and error are written to the terminal. The .bd shell has provision to change this. You may arrange to have input and/or output read from/written to files or other processes instead. In the following example, the command is read from the file. .nf .bd comm may be composed of arbitrary arrangements of the above constructs. If a string of characters is enclosed in quotation marks ("), all argument expansion is disabled. .bp If a string of characters is enclosed in grave accents (`), that string is interrupted as a command, executed and replaced by the output of the command and broken into words. Within braces ([]) there may appear expressions of the form X-Y, meaning that all of the characters between X and Y are inclusive. Example: .nf .bd [A-Za-z] .fand < file .bp .bd Input Redirection. .fi Arrangements may also be made so that the command's standard input becomes the file: .nf .bd command > file .bd command >> file .bd command >& file .bd command >>& file .fi .bd Output Redirection. In the first form, (>), the command's standard output is sent to the named file, destroying its previous contents. The second form, (>>), .ul appends the command's output to the .ul end of the named file. In the third form, (>&), .ul both the standard outi would match any single upper or lower case letter. .bd Grouping of Commands Commands may be grouped together arbitrarily by using parenthesis. When enclosed in parentheses, any arbitrary command or series of commands is treated as a simple command. Example: .nf .bd (cd a; comm1) | (cd b; comm2) .fi would run the first part of the pipeline in directory "a" and the second in directory "b". Parenthetical expressions may be nested. There are limits on the maximum number of processes allowed, however. +,-./012456789:;<=>?@ABCD  To run a series of commands in the background, for example; .nf .bd (comm1; comm2; comm3)& .fi .bd Sequential Execution Operator More than one command may be put on a line by separating the command with semicolons (;) Example .nf .bd command1; command2 .fi The commands are executed sequentially in the order given (left to right). .bp .bd Built-In Commands There are a number of commands internal to the .bd shell: .bd alias .bd alias name1 name2 .sp .bd alias name3 "a complex command with embenc .fi This command calls the .bd sync system call (mass storage synchronization, see Section 2). It insures that all information destined for mass storage devices is actually written out. .bd Sync should always be called before bringing the system down to insure the integrity of the file system(s). .nf .bd type file(s) .fi The contents of each of the named files are printed verbatim on the standard output. .nf .bd unalias name .fi The given name is removed from the alias table. .bd wait .fdded spaces" Aliasing provides the facility to rename or develop abbreviations for commands. The first form prints the current list of aliases in effect. The others introduce a new alias. After these alias commands have been typed to the shell, giving the command "name1" will result in issuing the command name2. That is to say the right hand word or group of words is substituted for the left. Use .bd unalias (see below) to turn off an alias. How to use .bd alias: If you find you frequently type a longi This command causes a wait until all all asynchronous processes (if any) have completed. .bd Wait may be prematurely interrupted by pressing the RUB-OUT or DELETE key.  and cumbersome command, you should consider setting up an alias for it. Some often-used commands are: .in +5 .bd 5 far /dev/fla -xv .br mount /dev/fla /f .br umount /dev/fla .in -5 To set up .bd alias, edit the .bd .sh file in your home directory (the directory in which you find yourself when you first log in). Add lines like the following: .in +5 .bd 5 alias x "far /dev/fla -xv" .br alias m "mount /dev/fla /f" .br alias u "umount /dev/fla" .in -5 Next time you log in, all of these "aliases" will b.he "sort (1) 8/4/82 sort (1)" .fo " -#-" .in 10 .rm 65 .bd .ti -5 PROGRAM .br .bd sort - sort text files .ti -5 .bd USAGE .br .bd sort [-bdfnrutx] [+column] [-o output] [input ...] .ti -5 .bd FUNCTION .br .bd All of the named input files are sorted together. If no input file names are given, then the standard input is used instead. The result is written to the standard output unless an output file name is given (with the e automatically set in the shell. You may type just the one letter abbreviation for the long command. You may view the alias table by typing "alias". An "alias" is eliminated with .bd unalias. Note that this feature may also be used to smooth over trivial name differences found in different systems. If you are used to typing something else for one of the commands, make yourself an "alias." .bp .bd chdir (cd) .bd chdir name .fi These change the current directory. Micronix maintains the concept of a cu-o option). The default sorting key is the entire line. Ordering is lexicographic, by bytes, in machine collating sequence. The following optional flags may be used to influence the sorting. .in +14 .ti -8 +N Sort by the Nth column over from the left. Default is column 0. .ti -8 -b Ignore leading blanks (spaces and tabs) in comparisons. .ti -8 -d Dictionary order, only letters, digits and blanks are significant in comparisons. .ti -8 -f Ignore case in comparisons. .ti -8 -i Ignore non-ascii characrrent directory. The first form changes the current directory to the home directory (described below). The second form changes to the named directory. The command, .bd cd is synonymous to .bd chdir, and is easier to type. .nf .bd dir .bd dir name .bd dir names .fi The "dir" is short for "directory". The first form list the files in the current directory. The second lists the files in the directory, "name". The third prints the list of names. All forms print their display in an easily read, alters. .ti -8 -n Sort by integral number. Fields are ordered by numerical value. .ti -8 -o file Send the output to the named file "sort file -o file" will work. .ti -8 -r Reverse. Sort backwards. .ti -8 -tx Tab character is set to the character x. .in -10 '-' options listed above may be combined. That is sort -b -d -f -i is the same as sort -bdfi .bd Sort can be used on arbitrarily large files. It is limited only by the amount of temporary file space it can consume. .ti -5 EXAMPLES .br A phabetized and columnar form. .nf .bd echo .bd echo args .fi The first command toggles the .bd shell's command echoing feature. The second prints the arguments. .nf .bd home .bd home name .fi These commands examine or change the home directory. The first form prints the .bd shell's currently remembered home directory name. .nf .bd kill N .bd kill name .fi The first version kills the process whose numerical id is N. (Id's are reported by the ps command, and by the shell when a background psimple example, to see what a file looks like once sorted: sort file To sort by the second column: sort +1 file To sort a list of numbers: sort -n file To sort a file in place: sort file -o file To sort the password file by numerical user id sort +2 -t: -n /etc/passwd .ti -5 SEE ALSO .br unique (1) rocess is initiated.) The second version kills the process with the given command name (the name by which the process was invoked, which is also reported by ps). .nf .bd nice N command ... .fi Nice runs the following command in a way that is "nice" to other users on the system, ie, at low priority. The larger the value of N (up to 127), the lower the scheduling priority will be. Conversely, the super-user can be "mean" by specifying a negative nice (to -128). A nice of 4 is recommended to keep background.he "stty (1) 3/15/82 stty (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd stty - set typewriter (terminal) options .sp 2 .in -5 .bd USAGE .in +5 .br stty [option ...] .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Stty sets certain I/O options on the current output typewriter. With no arguments, it reports the current settings of the options which differ from the default settings. The following are options: .sp 2 .in +1 programs inconspicuous. .nf .bd prompt word .fi This command changes the .bd shell's prompt. The prompt is changed to the given word. The default prompt is .bd % or .bd #; the .bd # prompt indicates super-user. .nf .bd source file .fi The .bd shell takes its next input from the named file instead of the standard input. Input is again taken from standard input upon reaching the end of the file. A "source" may be nested, that is, a named file may contain another source command. .nf .bd sy 0 .ta 10 .ti -10 raw Raw mode input (no erase, kill, interrupt, quit, EOT, parity bit, passed). .ti -10 -raw Negate raw mode. .ti -10 cooked Same as -raw; default is cooked mode. .ti -10 -nl Allow carriage return for new-line, and output CR-LF for carriage return or new-line; default is -nl mode. .ti -10 nl Accept only new-line to end lines. .ti -10 echo Echo back every character typed; echo is asserted by default. .ti -10 -echo Do not echo characters. .ti -10 lcase Map upper case to lower case. .tthermore, contiguous characters which are elements of the .bd to set for which there is no explicit corresponding character in the .bd to set are collapsed to a single occurrence of the last character in the specification for the .bd to set. .sp .in -5 .bd EXAMPLES .br .in +5 .nf To replace all occurrences of x by y: .sp .in +8 .bd translit x y output .in -8 .sp To change x to y and y to x: .sp .in +8 .bd translit xy yx output .in -8 .bp To delete all occurrences of A: .sp .in +8 .bd i -10 -lcase Do not map case; default. .ti -10 -tabs Replace tabs by spaces when printing; default. .ti -10 tabs Preserve tabs. .ti -10 erase Set erase character to "c"; default erase or backspace character is "H" (^H). .ti -10 kill c Set kill character to "c"; default kill or line delete character is "X" (^X). .bp .ti -10 shake Do hardware handshaking using the clear-to-send (RS232 CTS) pin. .ti -10 -shake No handshaking; hardware handshaking is off be default. .ti -10 data8 Keep all 8 bits of inputranslit A output .in -8 .sp To map all lower case into upper case: .sp .in +8 .bd translit a-z A-Z output .in -8 .sp To put one white space separated symbol per line: .ti +8 .bd translit @40@11@12 @12 out .sp 2 .in -5 .bd SEE ALSO .br .in +5 change (1), edit (1) .sp 2 .in -5 .bd .fi NOTE .in +5 .br .bd Translit is analogous to the UNIX .bd tr program. t data. .ti -10 -data8 Keep only 7 bits of input data. This is the default. .ti -10 data7 Same as -data8: Keep only 7 bits of input data; default. .in -10 .nf Baud Rates: 50 75 110 134 150 200 300 600 1200 1800 2400 4800 9600 19200 .fi Set typewriter baud rate to number given, if possible. Micronix presently has no built-in delays. .sp 2 .in -5 .bd SEE ALSO .in +5 .br stty (2) .he "unrot (1) 3/18/82 unrot (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .br .in +5 .bd unrot - reformats lines produced by .bd kwic .in -5 .bd USAGE .in +5 .br .bd unrot .in -5 .bd FUNCTION .in +5 .br .fi This is a special purpose program for use with .bd kwic - the key word in context index generator. Output is assumed to be destined for printing on an 80 character wide device. .bd Unrot reads the standard input and writes the.he "tail (1) 3/18/82 tail (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd tail - prints the last few lines of a file .in -5 .bd USAGE .in +5 .br .bd tail [-N] [file] .in -5 .sp 2 .bd FUNCTION .in +5 .br .fi .bd Tail prints the last n lines (default = 10) of the named file. If no file is given, the last n lines before the first end-of-file encountered on the standard input are printed. br .sp .in -5 .bd BUGS .br . standard output. A dollar sign ($) is assumed to be the folding marker put in by .bd kwic. A blank column running down the middle of the page will be produced. To the right of the middle column will be keywords with following context. To the left will be context preceding the keyword in the original line. .sp .in -5 .bd EXAMPLE .br .in +5 .nf To create a keyword in context index: .sp .in +8 .bd kwic temp1 .br .bd sort temp2 .br .bd unrot index .br .sp .in -8 .in -5 .bd SEE ALSO .brin +5 .fi .bd Tail reads the entire file in order to obtain the last few lines. If n is too large, .bd tail will fail since it stores the text of lines in memory.  .in +5 kwic (1), sort (1) .he "translit (1) 6/25/82 translit (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .br .in +5 .bd translit - transliterates characters .in -5 .bd USAGE .br .in +5 .bd translit from [to] .in -5 .bd FUNCTION .br .in +5 .fi .br Translit can be used to perform a variety of useful character mapping functions. .bd Translit modifies its input on a character-by-character basis. .bd Translit changes each character in its .bd from set to th.he "update (1) 3/18/82 update (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .br .in +5 .bd update .in -5 .bd USAGE .br .in +5 .BD update .in -5 .bd FUNCTION .br .in +5 .bd Update periodically updates the systems on-line mass storage devices. It calls .bd sync (2) once every 30 seconds. .bd Update runs silently, asynchronously. e corresponding one in its .bd to set. If there is no .bd to set, the effect is to remove each character found in the .bd from set. If the .bd to set has fewer characters than the .bd from set, the last character in the .bd to set is repeated as many times as needed to fill out the .bd to set. .sp Notation of the form x-y may be used as shorthand set notation to mean all the characters lexically between x and y, where x and y are letters of the same case or both digits. .sp If .bd ^ is tar). Some CP/M programs do not work under .bd upm, however, because of their extreme system dependence. Programs attempting 8080 I/O instruction, for example, or interrupt manipulation will not work. If a CP/M program goes awry, however, it will have only a local effect - the rest of the operating system will continue running. The intended purpose of .bd upm is to "bridge the gap" between low-cost multi-user systems and the enormous body of special-purpose software written for the CP/M system - givinhe first character of the .bd from specification, it is understood to mean all characters .ul not in the following specification. .sp Notation of the form .bd @377 (an "at" sign followed by up to three digits of octal) may be used to specify characters by ASCII value. .sp If the .bd from set contains fewer characters than the .bd to set, or if the .bd ^ is used as above, the last character of the .bd to set is sufficiently replicated to fill the .bd from set to the size of the .bd to set. Fur g true multi-user function .ul and CP/M. .bd Upm is intended to be means whereby major applications software written for CP/M may be run unchanged directly under Micronix. Under Micronix there are no records, no extents, no disk drives in the CP/M sense, no file control blocks (FCBs), disk parameter blocks (DPBs), allocation vectors, etc., but .bd upm attempts to do a good job of pulling the wool over the eyes of the CP/M program. When the CP/M program thinks it is opening a CP/M file, it is really in the command line. An example follows: .ti +5 .bd upm a:/cpm b:./ /cpm/ws meaning run .bd upm, setting drive A to correspond to Micronix directory "/cpm" and drive B to correspond to directory "./", then directly run the program /cpm/ws.com (the .com suffix is added automatically). You may leave INTERACTIVE mode by typing "exit" as a command. Exit from .bd upm's DIRECT mode occurs immediately upon completion of the called application program. In summary then, the order of events from the time  opening a Micronix file. .bd Upm handles conversion back and forth between CP/M FDB's and Micronix file path names. It maintains a table of correspondences between CP/M drives and Micronix directories. File I/O is monitored and the extent numbers are changed at the appropriate times. It should be noted that some files under Micronix may be inaccessible because they have "CP/M impossible names". This is no great stumbling block, however, as one can simply rename the Micronix file(s). The rules for .bd up .bd upm is called is as follows: .in +5 .ta 5 .ti -5 1) An attempt is made to read the ".upm" file in the current directory. It may contain drive designators, an "lst" designator, drive select commands, and a CP/M command to be run in DIRECT mode. The commands found in the ".upm" file are executed in the order they appear. .ti -5 2) The command line is scanned for drive designators, drive select commands, CP/M program name and its arguments (if any). The commands found on the command line are executedm file names are: .sp .in +5 All lower case letters. Maximum eight character filename. Maximum three character extension (optional). .bp Names without an extension may be at most eight characters long. No question marks (?) or asterisks (*) may be used as a character in the name. .in -5 .sp .bd Upm also contains a "Bios jump table" bearing a striking resemblance to the original, and corresponding in function. Users will also find all the conventional commands, file reference characte in the order they appear. .ti -5 3) A choice is made. If no CP/M program name was specified on the command line, .bd upm goes into INTERACTIVE mode and gives a CP/M prompt (e.g. "A>"). If a program was specified, that program is immediately run. .in -5 These features may be used to customize .bd upm, and can be used to advantage in conjunction with the .bd alias command of the shell. Some examples follow. The simplest way to run .bd upm is by simply typing: .ti +5 .bd upm It will then come up anrs and functions expected from CP/M - file transfer, logical device assignment, program assembly and debugging features and system utilities. There is no significant difference in the way application programs are run under .bd upm. All documentation for these programs are valid. .bd Upm has two modes: DIRECT and INTERACTIVE. If you intend to run only one CP/M application program, use the DIRECT mode. If you intend to run a series of CP/M programs, use the INTERACTIVE mode. To enter INTERACTIVE mode, td prompt you for further instruction. A possible .upm file might contain: .in +5 .bd 7 A:/cpm .br B:./ .bd LST:|/bin/lpr .br B: .in -5 Which means: .in +5 Make CP/M drive A refer to Micronix directory "/cpm". Make CP/M drive B refer to Micronix directory "./" (your current directory). Address the LST: device and arrange to have printed output sent to the printer spooler program. (File contents directed to program .ul after execution of application program command for printing; LST: output is then dype .ti +5 .bd upm alone on a line. To enter DIRECT mode type .ti +5 .bd upm program name To effectively use .bd upm it is necessary to understand the relationship between CP/M's concept of drive letters and Micronix's directories. CP/M organizes its information by drive letter (A: - P:). Since the most natural analogous structure in Micronix is the directory, .bd upm maintains a table of CP/M drive designations and the names of the Micronix directories to which they correspond. The special cirected to .bd lpr program for printing.) Select drive B. .in -5 With the preceding .upm file in existence, you need only type "upm", and it will scan the .upm file and come up with everything set up as described. This spares you the hassle of repeatedly typing in drive designation commands each time you enter .bd upm. It's also possible to specify more information on the command line. Consider: .ti +5 .bd upm a:/cpm b:./ lst:output b: a:ws document This command tells the system to: .in +5 1) Start ommand "=" (a single equal sign alone on a line) displays the CP/M - Micronix drive relationships currently in effect. You may change the drive designation pointers with a command of the form .ti +5 .bd A:dirname wherein A may be replaced by any of the letters A through P and directory name must contain at least one slant character ("/"). For example .ti +5 .bd B:./ would "point" CP/M drive "B" at your current directory. These drive designation modifiers may appear as commands to the .bd upm "CCP" or .bd upm. 2) Set drive A to /cpm 3) Set drive B to ./ 4) Arrange printed output be written onto the file "output" after execution of Wordstar "P" command 5) Select drive B 6) Run Wordstar 7) Pass the argument "document" to Wordstar .in -5 Admittedly, it would be a bit cumbersome to type this entire command every time. Instead, you could use the .bd alias command to make a "shorthand" command line containing: .bd alias ws "upm a:/cpm b:./ lst:output b: a:ws document" Every time you log in, simply`XYZ[\]^abcdefghij type .ti +5 .bd ws and the above commands is run for you. .bd Printer Operation CP/M programs send printer output to the "lst:" device. By default, upm connects the lst device to your terminal. The easiest way to connect it to your printer is to do it indirectly, thru a disk file. Either in the .upm file, or on the command line, include the words "lst:output". Then all printed output will be stored in the file "output". When you exit from upm, type "lpr output", and the output will be sent to .he "upm (1) 6/25/82 upm (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd upm - CP/M for Micronix .in -5 .bd USAGE .in +5 .br .bd upm [upm args] [cp/m prog] [prog args] .in -5 .bd FUNCTION .in +5 .br .bd Upm provides a close functional replica of the environment in which applications programs written to run under CP/M expect. Many CP/M programs will function unchanged under Micronix (such as Micropro's WordSt the line printer. (Any file name you wish can be used here, not just "output". Don't let different people use the same name in the same directory, or their outputs will be mixed.) This has the advantage that other people can continue to use the line printer while you are running your CP/M programs. There is another way to connect the lst device to the printer. Instead of "lst:output" in the .upm file or on the command line, you can use "lst:|/bin/lpr". This connects the lst device directly with the spoolinow. .in -10 If are present, they are concatenated in order and used as the input file instead of the default STDIN. If -o is absent, and one or more files are present, and the first filename begins with '8', then .bd as behaves as if -o was specified using the first filename, but with the trailing '8' changed to 'r'. Thus, .ti +4 .bd as file.8 .br is the same as .ti +4 .bd as -o file.r file.8 .br A relocatable object image consists of a four-word header, a symbol table, a text segment and ag program, and allows your printed output to appear as soon as it is generated. There is a problem here, however, that is inherent in the logic of spooling. To avoid interleaved printing, the spooling program must read each input stream to its end before it can accept another. When the input is coming via a pipe from upm, then lpr cannot see an end-of-input until the pipe is closed, ie, until upm exits. That means that no one else on the system will be able to use the line printer until you exit from upm.  data segment; all "words" are two-byte integers written less significant byte first. .bp The header consists of the value 0406, the number of symbol table entries, the number of bytes of object code defined by the text segment, and the number of bytes defined by the data segment. Each symbol table entry consists of a flag byte, a seven-byte name padded with trailing nulls, and a value word. Meaningful flag values are .sp .in +4 .bd 4 3 - undefined .br 4 - defined absolute .br 5 - defined text relative .b .bd Text Files. Herein are some practical suggestions on the handling of text files and the successful transportation thereof between CP/M and Micronix. Also included is a description of the differences in their formats. CP/M text files and Micronix text files are identical, .ul except for the following: .in +5 .ti -5 .ta 5 1. At the end of each line of a Micronix file there is a single NEWLINE character; at the end of each line of a CP/M text file there is a RETURN character followed by a NEWLINE charar 6 - defined data relative .sp .in -4 To this is added 010 if the symbol is to be globally known, which is always the case in modules produced by .bd as. Both text and data segments have the same form - a sequence of load items, each of which defines one or more object bytes. A load item that begins with a positive byte (n) calls for loading unchanged the following (n) bytes in order. .sp If the load item begins with byte (n), such that .sp .ce .bd m = n >> 3 & 017 .sp and .sp .ce .bd (m != 0), .sp the.he "who (1) 3/18/82 who (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd who .in -5 .bd USAGE .in +5 .br .bd who .in -5 .bd FUNCTION .in +5 .br .bd Who prints a list of the currently logged-in users of Micronix. .in -5 .bd FILES .in +5 .br /etc/utmp (current user information)  word following it is relocated at (n & 7). Additional bytes are loaded unchanged. .sp Relocation consists of adding the start address of the text segment, if .ce .sp .bd (m == 1), .sp or adding the start address of the data segment, minus the length of the text segment if .sp .ce .bd (m == 2), .sp or adding the value of the symbol whose index is .sp .ce .bd (m == 3). If (m == 0), then the byte following is taken as m and the word following that byte is relocated by adding the value of the symbol whos.he "words (1) 3/18/82 words (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .br .in +5 .bd words - count words in standard input or files .in -5 .bd USAGE .in +5 .br .bd words .in -5 .bd FUNCTION .in +5 .br .fi The number of words in each of the named files is printed alongside the file name. If no file names are specified, or if "-" is given as a file name, the standard input is read up to an end-of-file and the number of words ene index is (m + 13). .bp As before, (n & 7), as additional bytes, are then loaded unchanged. The text segment is relocated relative to location zero, while the data segment is relocated relative to the end of the text segment. Thus, both segments can be simply loaded in order, using their combined lengths as the total segment length. Note that the lengths presented in the header are for the object code loaded, not for the number of relocation bytes required to specify the code. .sp In a valid load module,countered is printed. A word is defined as a contiguous string of non-blanks separated by blanks characters. A blank is a space, tab, or newline character. .in -5 .bd EXAMPLE .br .in +5 .nf To count the words in a number of files: .sp .in +8 .bd words file1 file2 file3 .in -8 .in -5 .bd SEE ALSO .in +5 .br chars (1), lines (1)  each segment consists of a an integral number of load items. .in -5 .bd SEE ALSO .in +5 .br anat (1), ld (1), lib (1), cc (1), cp1 (1), cp2 (1) NOTE: This program and documentation are products of Whitesmiths, Ltd., and are sold separately. .he "as (1) 4/13/82 as (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd as - A-Natural assembler .in -5 .sp 2 .bd USAGE .in +5 .br .bd as .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd As assembles A-natural narrative assembly language for the Intel 8080 to Whitesmith's format for relocatable object images. Since the output of the 8080 code generator p2 is A-Natural, as is required to produce relocatable images suitable for binding.he "df (1) 3/18/82 df (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .br .in +5 .bd df - disk free space .in -5 .bd USAGE .br .in +5 .bd df device ... .in -5 .bd FUNCTION .br .in +5 .bd Df finds and prints the number of free blocks on each named device, each of which is assumed to contain a file system. This command is somewhat analogous to the CP/M STAT command. .in -5 .bd EXAMPLE .br .in +5 .bd df /dev/root .in -5  with the .bd ld (link editor) program. The flags are: .in +10 .ta 10 .ti -10 -i Produces a map of local symbols to STDOUT. .ti -10 -o Filename may be specified. Writes the output to the specified file and writes error messages to STDOUT. Default is STDOUT for output and STDERR for error messages, which may lead to corruption of the output on those systems that distinguish between text and binary files. Under some circumstances, an input filename can take the place of this option, as explained bel .bd SEE ALSO .br .in +5 dcheck (1), icheck (1), ncheck (1), fsck (1) fact is also noted. If the .bd -l option is used, the byte number (decimal) and the differing bytes (octal) are printed for each difference. .in -5 .bd SEE ALSO .in +5 .br diff (1), common (1) .he "print (1) 3/18/82 print (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .bd print - prints files .in -5 .bd USAGE .in +5 .bd 2 print file1 file2 ... .sp print [-N] [-lN] [-wN] .in -5 .bd FUNCTION .br .in +5 .fi .bd Print produces output suitable for redirection to a printer. It also produces a heading at the top of each page, including the file name and the page number of the file. .sp The following flags may also be .he "entab (1) 3/18/82 entab (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd entab - replaces blanks by tabs .in -5 .bd USAGE .in +5 .bd entab .in -5 .bd FUNCTION .in +5 .fi .bd Entab acts as a filter, copying the standard input to the standard output unchanged with the exception that groups of blanks are replaced by a tab where possible. .bd Entab assumes tabs are every eight positions, at columns 9, 17, 25, etc. .bd used: .sp .in +10 .ta 10 .ti -10 -N Causes column N to be printed. .ti -10 -lN Print N lines per page. .ti -10 -wN Print page N columns wide. .in -10 .in -5 .bd EXAMPLE .br .in +5 .nf To print a file: .sp .in +8 .bd print file .sp .in -8 or to print with flag values: .in +8 .sp .bd print -4 -l188 -w132 file .sp 2 .in -8 .in -5 .bd SEE ALSO .in +5 .br lpr (1) Entab is useful for speeding up printing and communication over slow paths, or to effect file compression. .bd Detab is its inverse. .in -5 .bd EXAMPLE .br .in +5 To compress a file in which there are many spaces: .sp .in +8 .bd entab output .in -8 .in -5 .bd SEE ALSO .in +5 .br detab (1) .he "change (1) 3/18/82 change (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd change - make global changes in a stream .sp 2 .in -5 .bd USAGE .in +5 .br .bd change from [to] .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Change reads the standard input up to an end-of-file. It writes the standard output exactly as it was read, except that all instances of the regular expression .bd from are replaced with .bd to. If no replacement pattern is specifi.he "compare (1) 3/18/82 compare (1)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd compare - compare two files for equality .sp 2 .in -5 .bd USAGE .in +5 .br .bd compare file1 file2 .in -5 .sp .bd FUNCTION .in +5 .br .bd Compare reads the two named files, line by line, and announces any differing lines, including the line number. .sp 2 .in -5 .bd EXAMPLE .in +5 .br To find the differing line in two nearly identical files: .sp .ce .bd compare version1 version2 .sp 2ed, all instances of the regular expression are eliminated. The rules for regular expressions and replacement patterns are exactly as in .bd edit. .sp 2 .in -5 .bd EXAMPLE .in +5 .br To make a global replacement: .sp .ce .bd change lead gold output .sp 2 .in -5 .bd SEE ALSO .in +5 .br edit (1), find (1)  .in -5 .bd NOTES .in +5 .br The algorithm is very poor if lines have been added or deleted to one of the files. Compare will then report that all of the following lines differ when in fact only a small change may have been made between the two files. .sp 2 .in -5 .bd SEE ALSO .in +5 .br diff (1) for a more sophisticated text comparator. .he "sum (1) 3/18/82 sum (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .bd sum - compute check sums .sp 2 .in -5 .bd USAGE .in +5 .br sum [-r] [files] .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Sum computes and prints a check sum and block count for each named file. (Blocks are 512 bytes long.) If no file names are given, it computes a check sum for the standard input. .sp If the -r option is used, .bd sum recursively desc.he "copy (1) 1/13/82 copy (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .bd copy - copy input characters to output .in -5 .bd USAGE .in +5 .bd copy .in -5 .bd FUNCTION .in +5 .br .bd Copy simply copies its standard input to its standard output unchanged, up to an end of file. .in -5 .bd EXAMPLE .br .in +5 .nf To copy one file to another: .sp .in +8 .bd copy destination .in -8 .in -5 .bd NOTES .br .in +5 .fi On ends the file hierarchy, summing each file as it goes. In recursive mode, special files and directories are not summed. As an example, check sums can be used to verify the integrity of a file over the phone. Sums are in the range 0 to 65,535. If two files have identical check sums, it is quite likely that they are identical. some systems, (but not Micronix), due to I/O conventions non-text files would be mangled if copied with the above example. In this instance, use the .bd cp program. .in -5 .bd SEE ALSO .br .in +5 cp (1), concat (1) .he "cmp (1) 3/18/82 cmp (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd cmp - compare two files .in -5 .bd USAGE .in +5 .br .bd cmp [-l] file1 file2 .in -5 .bd FUNCTION .in +5 .br .bd Cmp compares two given files. Nothing is printed if they are identical. If a difference is encountered, .bd cmp announces the byte number and line number at which the difference occurred. .sp If one file is an initial sub-sequence of the other, that  .he "make (1) 8/5/82 make (1)" .fo " -#-" .rm 64 .ta 8 .in 4 .ti -4 NAME .br .bd make - automated program construction .ti -4 SYNOPSIS .br .bd make object ... .ti -4 DESCRIPTION .br The problem of keeping the assembly instructions straight for large programs composed of many modules is reduced to the one-time job of writing a complete description file. The .bd make program reads the file .ul makefile in the current directory. The makefile consists of a number of lines describing interdependencies .he "date (1) 3/18/82 date (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd date - print or set the date and time of day .sp 2 .in -5 .bd USAGE .in +5 .br .bd date [year] [month] [date] [hour:[minute:[second]]] .sp 2 .in -5 .bd FUNCTION .in +5 .br Only the super-user may set the time. If no argument is given, the current date and time are printed. Otherwise, all of the arguments are taken together with the present date among program modules and the actions necessary to contruct these modules. Make first reads the makefile and contructs a tree of dependencies and update actions for each module named on the command line (or the first module, if none are named). It then walks this tree, updating out-of-date modules (ie, any module that doesn't exist or whose mod time is less recent than any of those on which it depends). Lines in the makefile take the form .ti +4 product : ingredients ; action where product is the name ofand time to produce a new date and time. The systems' idea of the time is set. .bd [year], [date], [hour], [minute], and .bd [second] are each given as decimal numbers. .bd [month] is the name of a month, in English; case is ignored. The first three letters of the name of the month must be given. If any specification is omitted, the current value of that specification is used in its stead. A common error is to attempt to set the day of the week. This is not permissable in the command line. .sp 2  a program module, ingredients is a space seperated list if files upon which the product depends, and action is a shell command line. There is no restriction on the number or order of lines describing the same product; all these descriptions are integrated into the tree. .ti -4 EXAMPLE .br Here is a simple makefile: .in +4 .nf all: prog doc prog: prog1.o prog2.o; link -o prog prog1.o prog2.o prog1.o: hdr.h prog1.c; cc -c prog1.c prog2.o: hdr.h prog2.c; cc -c prog2.c doc: doc.frm; form doc prog:; echo new version of prog | mail qc_dept doc:; echo new prog doc | mail doc_dept .in -4 .fi Now the command "make prog" will update the program (in case any of the files hdr.h, prog1.c, or prog2.c have changed), "make doc" will update the documentation, and "make all" will update both. In each case, a notice is mailed to the appropriate department. .he "unique (1) 3/18/82 unique (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .br .in +5 .bd unique - eliminate adjacent duplicate lines in an .nf I/O stream .fi .in -5 .bd USAGE .in +5 .br .bd unique [-n] .in -5 .bd FUNCTION .br .in +5 .bd Unique reads the standard input and writes the standard output. All but one of each set of adjacent duplicate lines are eliminated. Otherwise, the text is copied through un.he "crypt (1) 4/12/82 crypt (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .br .in +5 .bd crypt - file encryption .sp 2 .in -5 .bd USAGE .in +5 .br crypt key .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Crypt reads from its standard input and writes to its standard output, encrypting as it goes, according to the key. .bd Crypt is its own inverse; to read an encrypted file, all you need to know is the key word. Note: this is not a vchanged. If the .bd -n option is given, a count of the number of duplicates of each line is printed along with the text of the line. .in -5 .bd EXAMPLE .br .in +5 .nf To eliminate all duplicate lines in a file: .sp .in +8 .bd 2 sort temp unique output .in -8 .in -5 .fi .bd NOTES .br .in +5 In order to assure adjacency, the file in question must be presorted. .in -5 .bd SEE ALSO .in +5 .br sort (1) ery sophisticated encryption scheme (NSA would have it overnight). You can increase the complexity of the encryption by using multiple passes of .bd crypt, each with a different keyword. .sp 2 .in -5 .bd EXAMPLES .in +5 .br To encrypt a file: .sp .nf .bd crypt bandersnatch < file > encrypted .sp .fi To read the encrypted file .sp .nf .bd crypt bandersnatch < encrypted .sp .fi Encrypt a file with three keywords: .sp .nf .bd crypt honeybee < file | crypt Beaumont | crypt oscar > encrypted .he "dcheck (1) 3/18/82 dcheck (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd dcheck - file system directory consistency check .in -5 .bd USAGE .in +5 .br .bd dcheck [-f] file system .... .in -5 .bd FUNCTION .in +5 .br .bd Dcheck reads the directories in a file system and compares the link-counts in each i-node with the number of directory entries by which it is referenced. .in -5 .bd ERRORS .in +5 .br When .he "include (1) 3/18/82 include (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .bd include - file inclusion .in -5 .bd USAGE .in +5 .bd include .in -5 .bd FUNCTION .br .in +5 .fi The standard input is copied to the standard output with the exception of each line beginning with: .br .sp .in +8 .bd include filename .in -8 .br .sp which is replaced by the contents of the named file. Includes may be nested; that is, an included file ma file turns up for which the link-count and the number of directory entries disagree, the relevant facts are reported. A dangerous situation occurs when there are more entries than links; if entries are removed, the link-count drops to 0 and the remaining entries point to thin air - they should be removed. When there are more links than entries, some disk space may be wasted but the situation is not dangerous. If the .bd -f option is given, .bd dcheck will try to ratify the situation. .in -5 .bd Nay invoke another file for inclusion. If a named file is not openable, an error message is printed and the program terminates abruptly. .in -5 .bd EXAMPLE .br .in +5 .nf As a compiler preprocessor: .sp .in +8 .bd include program.tm1 .in -8 .in -5 .bd SEE ALSO .in +5 macro (1)  OTES .in +5 .br Extraneous diagnostics may be produced if .bd dcheck is applied to an active file system. .in -5 .bd SEE ALSO .in +5 .br fsck (1), ncheck (1), icheck (1) and present are listed. .ti -10 .bd -x Extract. Each named file is copied .ul from the diskette .ul to the current Micronix directory. If no file names are given, .ul the entire contents of the diskette is extracted. .ti -10 .bd -v Verbose. Be verbose about it. Each operation is printed along with the affected file name. Files deleted are preceded by a "d", those replaced are preceded by an "r", those extracted are preceded by "x". .in -10 At most, one of the flags - .bd d, t, r, x - may be present. .he "diff (1) 6/25/82 diff (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd diff - find differences in lines of text files .in -5 .bd USAGE .in+5 .br .bd diff [-e] file1 file2 .in -5 .bd FUNCTION .in +5 .br .bd Diff is a file comparator intended for use with text files. It attempts to find a minimal set of differences between lines of the given files. Differences are reported by lines of the form .in +8 .bdIf none are present, .bd -t is assumed. The file list may contain wild card matching patterns to be applied to the set of file names in the CP/M diskette's directory. The rules for file name matching patterns are exactly the same as those for the shell (see sh (I)). .in -5 .bd EXAMPLES .br .in +5 You receive a new CP/M software package in the mail on diskette and want to run it under Micronix. .sp 2 To copy its contents to Micronix, insert the diskette into floppy drive A and type: .ce .bd far fla - N a R,S .bd N,M d R .bd N,M c R,S .in -8 Where N and M are line numbers in file1; R and S are line numbers in file2. Following each line of this type is a list of the affected lines in file1 marked by "<" and a list of the affected lines in file2 marked by ">". If the .bd -e flag is given, the output takes the format of a command script for .bd edit to change the first file into the second. .in -5 .bd ERRORS .in +5 .br There are limitations on the size of files. An "Out of memory" errorxv To copy a file from a diskette, changing its name in the process: .ce .bd far dja -p filename > newname To copy only the ".doc" files over from a CP/M mini-floppy: .ce .bd far mfa -xv "*.doc"  message is printed if the problem is too large. Spurious blanks lines are sometimes generated in output produced under the -e option. .sp 2 .in -5 .bd EXAMPLE .br .in +9 .bd 5 diff apple pear .sp 4 a 7, 9 .br > A text line .br > another text line .br > a third text line .sp .in .in 5 .in +5 .bp means that one of the changes required is to add lines after line number 4 in the first file. After the addition is done, the lines will become lines 7 thru 9 in the second file. .in 5 .rm 65 .he "find (1) 6/25/82 find (1)" .fo " -#-" .bd NAME .in +5 .bd .br find - find files .sp 2 .in -5 .bd SYNOPSIS .in +5 .br find pathname-list expression .sp 2 .in -5 .bd DESCRIPTION .in +5 .br .bd Find searches each of the given pathnames for files matching the given expression. If the pathname of a directory is given, all files in that directory and all of its subdirectories (recursively) are searched. The .he "cat (1) 3/18/82 cat (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd cat - concatenate and print .in -5 .bd USAGE .in +5 .br .bd cat [-n] file ... .in -5 .bd FUNCTION .in +5 .br .bd Cat reads each file in the order given and writes it to the standard output. Thus, .ce .bd cat file prints the file and .ce .bd cat file1 file2 > file3 concatenates the first two files and places the result in the third. If no files are given or if "-" is giexpression above is built from constructions like the following: .sp .bd .ti -3 -name filename .br True if the filename argument matched the current file name. Normal shell argument syntax may be used if escaped (watch out for '[', '?', '*', '^'). Examples: '-name a.out' would match all files named "a.out". '-name "*.o" ' would match all files in the tree whose name ends in ".o" .sp .bd .ti -3 -perm onum .br Where onum is an octal number. True if the file's permission flags match the given number. Exampleven as a file name, .bd cat reads the standard input up to an end-of-file. If the .bd -n option is given, the lines are numbered. .in -5 .bd NOTES .in +5 .br Beware of .ce .bd cat a b > a and .ce .bd cat a b > b they destroy the input files before reading them! .in -5 .bd SEE ALSO .in +5 .br : ' -perm 777 ' would match all files whose permissions are "wide open". .sp .bd .ti -3 -type c .br True if the type of the file c, where c is b, c, d or f for block special, character special directory or play file. Example: ' -type f '. .sp .ti -3 .bd -links .br True if the file has n links. Example: '-links 1' would consider only files with exactly one link. .sp .ti -3 .bd -user name .br True if the file belongs to the user uname (login name or numeric user ID). Example: ' -user root ' would screen a.he "far (1) 6/25/82 far (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd far - floppy archiver .in -5 .bd USAGE .in +5 .br .bd far device [flags] [files] .in -5 .bd FUNCTION .in +5 .br .bd Far provides a simple interface to CP/M floppy diskettes. Device is assumed to be the name of a Micronix special file (such as /dev/fla) containing a CP/M diskette. Names such as /dev/fla may be abbreviated as fla. The flags arell files except those owned by root. .bp .ti -3 .bd -group name .br True if the file belongs to group gname (group name or numeric group ID). Example: '-group sales' would consider only files in group "sales". .sp .ti -3 .bd -size n .br True if the file is n blocks long (512 bytes per block). .sp .ti -3 .bd -inum n .br True if the file has inode number n. .sp .ti -3 .bd -atime n .br True if the file has been accessed in n days. .sp .ti -3 .bd -mtime n .br True if the file has been modified in n days. .sp: .ta 10 .in +10 .ti -10 .bd -d Delete. Delete the named files from the floppy diskette. If no file names are given, no action is taken. .ti -10 .bd -p Print. Each named file is sent to the standard output. .ti -10 .bd -r Replace. Each named file is copied .ul to the floppy. If no file names are given, no action is taken. If a file already exists on the floppy, it is silently overwritten. .ti -10 .bd -t Table. Print a table of contents of the floppy diskette. If any files are named, only those named   .ti -3 .bd -exec command .br Always true. If the command is complex it must be enclosed in quotes ("). If the sequence {} occurs in the command, the current filename will be substituted for it. .sp .ti -3 .bd -ok command .br Like -exec except that the generated command is written on the the standard output, then the standard input is read and the command executed only upon the response 'y'. In other words, you are asked if it's ok to execute the command. Expect to see something like: < rm /a/smith/books/3.pl n Page length. The page length is set to n lines long. If no number (n) is specified, the page length is set to 66 lines (default). .bp .bd .rm n Right margin. The right margin is set at column n. If no number (n) is specified, it is set at column 60 (default). .sp 2 .bd .sp n Space down n lines. If no number (n) is given, spaces 1 line (default). .sp 2 .bd .ta n Set the tab. Value (n) determines amount of tabbed spaces. Entered with ^I sequence or TAB key. When used with next (.ti) command,.1 > ok ? .sp .ti -3 .bd -print .br Print the file name. Always true, causes the current pathname to be printed. (Note that 'find' does its work silently and if you don't tell it otherwise, nothing will be printed.) .sp .ti -3 .bd -newer file .br True if the current file has been modified more recently than the argument file. If two of the above constructions appear one after the other, then the effect is a logical AND of the two. That is, a primitive will be processed only if all of the previous primitive produces "hanging" paragraphs. .bd .ti n Temporary indent. The indent is set to a value (n) for the next line only. This is quite useful for numbering paragraphs - a negative value produces a "hanging" paragraph. .sp 2 .bd .ul n Cause the next (or number of given) input line(s) to be underlined. The default is 1. Printer must have double-strike capability. If not, see the .bd overstrike program (Section 1) for instructions on implementing this program. .in -5 .bd SEE ALSO .in +5 .br edit (1), s were successful. .bp .in -5 .bd EXAMPLES .in +5 .br To remove all files named a.out that have not been accessed in a week .sp .nf find / -name a.out -atime +7 -exec "rm {}" .sp .fi To simply list the names of all the file in a hierarchy: .sp .ti +5 find . -print .sp 2 .in -5 .bd FILES .in +5 .br /etc/passwd - to look up user names. /etc/group - to look up group names. .sp 2 .in -5 .bd SEE ALSO .in +5 .br sh (1), filsys (5) .in 5 .rm 65 .he "mail (1) 5/18/82 mail (1)" .fo " -#-" .bd NAME .in +5 .br .bd mail - send and receive mail .sp 2 .in -5 .bd SYNOPSIS .in +5 .br mail [-[yn]] [user] .sp 2 .in -5 .bd DESCRIPTION .in +5 .br Micronix has an inter-user mail system. The .bd mail program sends letters to the appropriate system user. Letters are sent to another user by entering: .sp .in +5 % mail user name To enter the letter, just begin typing. Enter as many .he "form (1) 3/18/82 form (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .bd .br form - format text .in -5 .bd USAGE .in +5 .br .bd form [-t] [-o output] [file ... ] .in -5 .bd DESCRIPTION .in +5 .fi .bd Form is a general purpose text formatter with text filling, underline, indenting, centering, and other useful capabilities. This document was prepared using .bd form. .sp The standard input is read and formatted according tolines as necessary. Letters are terminated by entering a single period, or a ^D at the beginning of the last line. .sp .in -5 The next time the user logs in, he will be greeted with the message "You have mail". To read his mail, he simply enters .sp .in +5 .bd % mail .sp .in -5 The letter is printed on-screen. The user is then asked if he wants to keep his mail. The appropriate reply is "yes" to keep it, or "no" to delete it. Kept mail is stored in the "mbox" file in the user's directory.  instructions embedded in the input file; the result is written to the standard output. If a list of files names is given, they are used as the input. If "-o" followed by a file name appears on the command line, then the output is written into the named file. If "-t" appears on the command line, then the output is made more suitable for a glass tty, i.e. long sequences of blank lines are avoided. .sp Input consists of text lines interspersed with command lines destined to be printed If the first charactCgrep.1Blord.1Aln.1`login.1_lib.1^lpr.1]mknod.1\man.1[cc.1Zmore.1Yod.1Xhelp.1Wcp1.1Vcp2.1Ucpp.1Tddt.1Sfsck.1Rgroup.1Qhex.1plink.1omount.1nncheck.1mnewuser.1lobj.1kowner.1jptc.1itd.1htee.1gumount.1fdu.1efile.1dchmod.1er of a line is a period (.), .bd form attempts to interpret the line as a command; in any case, the text of such lines will not appear verbatim in the output. .sp The following commands are implemented: .sp 2 .bd .bd n Cause the next (or number of given) line(s) of text to be double-striked for bold face appearance. (Default is 1.) Printer must have double-strike ability, otherwise .bd overstrike (Section 1) must be implemented. .bd .bp n Begin page number n. Jump to the top of the next page. Set.he "grep (1) 3/18/82 grep (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd grep - find instances of a regular expression in a .nf stream .fi .in -5 .bd USAGE .in +5 .bd grep [-c] [-i] [-l] [-n] [-v] pattern [filename...] .br .in -5 .bd FUNCTION .in +5 .fi Lines in each of the named files matching the regular expression "pattern" are written on the standard output. The rules for regular expressions are as in the page number to n (default is sequential order beginning with 1). .sp 2 .bd .br Cause break. The next input line will begin at the left margin. .bp .bd .ce n Center the next (or number of given) input line(s). Default is next line only. .sp 2 .bd .fi Set filled text mode. All text lines will be filled out with blanks if necessary so that the right margin is justified. Fill mode is the initial default condition. .sp 2 .bd .fo TEXT Set the footer. The specified text will be printed at the bottom .bd edit. .sp The following flags are meaningful in the command line: .ta 10 .in +10 .ti -10 -c Only a count of matching lines is printed for each file. .ti -10 .sp -i The case of letters is ignored in comparisons. .sp .ti -10 -l The names of files containing matching lines are listed once, one on a line. .sp .ti -10 -n Each matching line is preceded by its line number in its respective file. .sp .ti -10 -v All lines .ul not matching the pattern are printed. .br .in -10 .in -5 .bd EXAMPLE .br .in +5 . of each page. .sp 2 .bd .he TEXT Set the header. The specified text will be printed at the top of each following page. .sp 2 .bd .in n Set the indent. The indent is set to the nth column. The command ".in 0" is interpreted to mean no indent. Default is 0. .sp 2 .bd .ls n Set the line spacing to n lines. The command ".ls 2" is interpreted to mean double space. The line spacing is set to 1 (default) initially. .sp 2 .bd .nf No fill. Turns off fill mode; lines are no longer justified. .sp 2 .bd  nf To search for occurrences of a string in a file: .sp .ce .bd grep string file .in -5 .bd SEE ALSO .in +5 .br edit (1), change (1) Cross-device link" error message is displayed. .in -5 .bd SEE ALSO .in +5 .br rm (1), cp (1), mv (1) .he "lord (1) 4/13/82 lord (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd lord - order libraries .sp 2 .in -5 .bd USAGE .in +5 .br lord -[c* d* i r* s] .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Lord reads in a list of module names, with associated interdepencies, from STDIN, and outputs to STDOUT a topologically sorted list of module names such that, if at all possible, no module depends on an earlier module in the li.he "login (1) 3/18/82 login (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .br .in +5 .bd login - sign on .in -5 .bd USAGE .br .in +5 .bd login .in -5 .bd FUNCTION .br .in +5 .bd Login is executed automatically by .bd init. It requests a user name (and password if appropriate), performs the required bookkeeping, executes the shell and begins the user's Micronix session. .in -5 .bd FILES .br .nf .bd 5 /etc/utmp accountingst. Each module is introduced by a line containing its name followed by a colon. Subsequent lines are interpreted as either: .sp 2 .in +8 .ta 8 .ti -8 defs - things defined by the module, .ti -8 refs - things referred to by the module, or other stuff. .in -8 Refs and defs have the syntax given by one or more formats entered as flags on the command line. Each character of the format must match the corresponding character at the beginning of an input line; a ? will match any character except newline. I /usr/adm/wtmp accounting /etc/banner The sign on message /etc/motd message-of-the-day /etc/passwd password file .in +5 .sp .fi .in -5 .bd SEE ALSO .br .in +5 init (1) f all characters of the format match, the rest of the input line is taken as a ref or def name. Thus, the format flag "-d0x????D" would identify as valid def any line beginning with "0x", four arbitrary characters and a "D", so that the input line "0x3ff0D_inbuf" would be taken as a def named "_inbuf". The flags are: .sp 2 .in +5 .ta 5 .ti -5 -c* prepend the string * to the output stream. Implies -s. Each module name is output preceded by a space; the output stream is terminated with a newline. Hence, .he "lib (1) 3/18/82 lib (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd lib - maintains Whitesmith's format libraries .in -5 .bd USAGE .in +5 .br .bd lib lfile [flags] [files] .in -5 .bd FUNCTION .in +5 .br .bd Lib performs all functions necessary to build and maintain object module libraries. It can also be used to collect arbitrary files into one bucket. .bd Lfile is the name of an existing library file or, in th.bd lord can be used to build a command line. .sp .ti -5 -d* use the string * as a fromat for defs. .sp .ti -5 -i ignore other stuff. Default is to complain about any line not recognizable as a def or ref. .sp .ti -5 -r* use the string * as a format for refs. .sp .ti -5 -s suppress output of defs and refs; output only module names in order. .in -5 .sp 2 Up to ten formats may be input for defs, and up to ten for refs. If no -d flags are given, .bd lord uses the default def formats: "0x????????B", "0x?????e case of replace (-r), the name of the library to be created. The flags are: .ta 10 .in +10 .ti -10 -d Delete the zero or more named files from the library. .ti -10 -r Replace the zero or more named files in an existing library or, if no library .bd lfile exists, create a library with the named files in the specified order. Named files that are not present in the library are appended to the end in the order specified. .ti -10 -t Lists files in the library in the order they occur. If any files are ???D", "0x????????T", 0x????B", "0x????D", "0x????????U" and "0x????U". These are compatible with the default output of rel (obj). If there are any circular dependencies among the modules, .bd lord writes "not completely sorted" to STDERR and outputs a partially-ordered list. In general, rearrangements are made only when necessary, so an ordered set of modules should pass through .bd lord unchanged. .sp 2 .in -5 .bd RETURNS .in +5 .br .bd Lord returns success if no error messages are printed, otherwisenamed, only those named and present are listed. .ti -10 -x Extract any named files that are present in the library into files of the same name. If no files are named, all files are extracted. .ti -10 -v Be verbose about it. Files retained unmodified are each listed with a preceding "c". Those deleted are preceded by a "d", those replaced are preceded by an "r" and those appended to the end are preceded by an "a". For the .bd -t option, each file is listed with its length in bytes. .ti -10 -6 Create a failure. .sp 2 .in -5 .bd EXAMPLE .in +5 .br To create a library of ordered object modules under Idris: .sp .ti +4 .bd % rel *.0 | lord -c"lib libx.a -c" | sh .sp 2 To order a set of objects using Micronix nm: .sp .in +4 .bd % nm *.o > nmlist .br .bd % lord < nmlist -c"ar r libx.a" | \ .br .bd -d"??????T" -d"??????D" -d"??????B" -r"??????U" | sh .in -4 .sp 2 .in -5 .bd SEE ALSO .in +5 .br lib (1), obj (1) NOTE: This program and documentation are products of Whitesmiths, Ltd.  file with UNIX v. 6 format, if none exists. Effective only with .bd -r. .ti -10 -7 Create a file with UNIX v. 7 format, if none exists. Effective only with .bd -r. .bp .in -10 At most, one of the flags [drtx] may be present. If none are present, .bd -t is assumed. Similarly, at most one of the flags [67] should be present. If none are present, Whitesmith's library file format is assumed when a new library is created by .bd -r. The Whitesmith's library format consists of a two-byte header having the.he "ln (1) 3/18/82 ln (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .br .in +5 .bd ln - make links .in -5 .bd USAGE .br .in +5 .bd ln name1 name2 .in -5 .bd FUNCTION .br .in +5 A link is made between two files (name1 and name2). Therefore, changes made to file name1 affect file name2 and vice-versa. A file may have up to 255 links. .in -5 .bd ERRORS .in +5 .br Linked files must be on the same file system, otherwise, a "   value 0177565, written less significant byte first, followed by zero or more entries. Each entry consists of a fourteen-byte name, followed by a two-byte unsigned file length, also stored less significant byte first, followed by the file contents proper. If a name begins with a null byte, it is taken as the end of the library file. Note that this differs in several small ways from UNIX v. 6 format, which has a header of 0177555, an eight-byte name, six bytes of miscellaneous UNIX specific file attributes.he " mknod (1) 3/18/82 mknod (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .br .in +5 .bd mknod - create special file .in -5 .bd USAGE .br .in +5 .bd mknod name type major minor .in -5 .bd FUNCTION .br .in +5 Type is either b or c for block special or character special. Major and minor are the major and minor device numbers, respectively. A special file is created (mode 777) with the given name. This call is restricted to the, and a two-byte file length. Moreover, a file whose length is odd is followed by a null padding byte in the UNIX format, but no padding is used in standard library format. UNIX v.7 format is characterized by a header of 0177545, a fourteen-byte name, six bytes of UNIX specific file attributes, and a four-byte length. Odd length files are also padded to even. .in -5 .bd RETURNS .in +5 .br .bd Lib returns success if no problems are encountered, else failure. In most failures, an error message is printed  super-user. Conventional use requires that all special devices be kept in the one directory, "/dev". .in -5 .bd NOTES .br .in +5 Warning: it is dangerous to have to separate nodes with the same type and major/minor number. If you want multiple names, use .bd ln. .in -5 .bd SEE ALSO .br .in +5 ln (1), rm (1), mkdir (1), mode (1) to STDERR and the library file is not modified. Output from the .bd -t flag, and verbose remarks, are written to STDERR. .in -5 .bd EXAMPLE .in +5 .br To build a library and check its contents: .in +8 .bd lib clib -r one.o two.o three.o .bd lib clb -tv .in -8 .bp .in -5 .bd NOTES .in +5 .br If all files are deleted from a library, a vestigial file remains. Modifying UNIX v.6 or UNIX v.7 format files causes all attributes of all file entries to be zeroed. It does not check for large files (over 65.he "man (1) 6/28/82 man (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .br .in +5 .bd man - on line manual .in -5 .bd USAGE .br .in +5 .bd man [N] topic ... .in -5 .bd FUNCTION .br .in +5 .bd Man prints documentation (if it exists) for each named topic. Complete on-line documentation is resident on the Micronix system. .bd Man is the same program as .bd help, execpt that when it is called as "man" it omits searching /usr/help534 bytes). NOTE: This program and documentation are products of Whitesmiths, Ltd., and are sold separately with the , and searches /usr/man/man0, ..., /usr/man/man9 in order. These are the directories containing the corresponding sections of the Micronix Reference Manual: .nf /usr/man/man1 Programs /usr/man/man2 System Entries /usr/man/man3 Libraries and subroutines /usr/man/man4 Devices /usr/man/man5 File formats /usr/man/man6 Other programs (such as CP/M programs) .fi The "N" option directs .bd man to the corresponding section of the manual. .in -5 .bd EXAMPLE .br .in +5 The command line .ti +8 .bd man man.he "lpr (1) 3/18/82 lpr (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .br .in +5 .bd lpr, lprm, lprq - line printer spooler .in -5 .bd USAGE .in +5 .br .bd 3 lpr file(s) .br lprq .br lprm .in -5 .bd FUNCTION .in +5 .br .bd Lpr causes each of the named files to be queued for printing. If no file names are given, the standard input is used. Thus, a printout can be named, dated, and paginated by .sp .ce .bd print file | lpr .sp or it ca prints this page. Entering .ti +8 .bd man 2 stty prints the stty.2 file instead of stty.1. n be formatted by .sp .ce .bd form file | lpr The .bd lpr program writes to device .bd /dev/lp by default. If, however, it sees a file .bd /usr/spool/lpr/device, it reads this first. This can contain a device name (such as .bd /dev/ttyC, if your printer is plugged into port C), a baud rate (such as 1200), and possibly the word "shake" (to request RS232 hardware handshaking, if your printer requires it). All these items are separated by any kind of white space. The name by which this program is inv.he "cc (1) 4/18/82 cc (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd cc - C and Pascal compiler .in -5 .bd USAGE .in +5 .br .bd cc [options] file ... .in -5 .bd FUNCTION .in +5 .br .bd Cc is the Whitesmiths' C compiler supervisor; it accepts several types of arguments: Those ending with ".p" are assumed to be Pascal source files and are converted to ".c" files. Arguments ending with ".c" are taken to be C source files and are oked is significant. If invoked as .bd lpr, it uses the directory .bd /usr/spool/lpr for queuing. If it is invoked as, say, .bd dpr, then it uses .bd /usr/spool/dpr for queuing, and it looks for .bd /usr/spool/dpr/device to determine what printer to use. This makes it easy to support several different printers with several differently named links to the same program. If its name ends in .bd q (such as lprq or dprq), it reports on the files still waiting in its queue. If its name ends in .bd m (scompiled with each relocatable object module left in the file named for the source with ".o" substituted for ".c". In the same way, arguments whose names end with ".s" are taken to be A-natural source files and are compiled to produce an ".o" file. The following options are meaningful to .bd cc: .in +10 .ta 10 .ti -10 -c Suppress the loading phase of the compilation, and force object file(s) to be produced for each source file. .ti -10 -i name Passed on to .bd cpp, the C compiler preprocessor. Name uch as lprm or dprm), it removes all its caller's files from its queue. .bp .in -5 .bd EXAMPLES .in +5 .br To setup a 1200 baud printer named "xer" connected to port B, type .sp .nf .bd 6 cd /bin ln lpr mpr ln lpr mprm ln lpr mprq mkdir /usr/spool/mpr echo /dev/ttyB 1200 >/usr/spool/mpr/device .in -5 .bd SEE ALSO .in +5 .br ln (1), form (1), edit (1), print (1) ! is a prefix to be used on "# include ". .ti -10 -o file The result of the compilation will be written on the named file. If no "-o" option is given, the output is written to "a.out" .ti -10 -lX Library inclusion. The file "/lib/libX.a" will be included in the linking phase of the compilation. An example is included below. .ti -10 -lS Use the standard I/O library. Note that this only affects the loading phase of the compilation. If you use the library, your programs should include the line: .sp/help for a file with the same name as the given topic. Then, like .bd man, it searches /usr/man/man0, ..., /usr/man/man9 in order. These are the directories containing the corresponding sections of the Micronix Reference Manual: .nf /usr/man/man1 Programs /usr/man/man2 System Entries /usr/man/man3 Libraries and subroutines /usr/man/man4 Devices /usr/man/man5 File formats /usr/man/man6 Other programs (such as CP/M programs) .fi The "N" option directs .bd help to the corresponding section of the ma .ce .bd # include .sp 2 .ti -10 -cpm Compile to run under CP/M. .ti -10 -ws Use the Whitesmiths' C library. .bp .ti -10 -xN where N is a number. Arguments of this type are passed on to pass 2 of the compiler; see .bd cp2. .in -10 .in -5 .bd SEE ALSO .in +5 .br Kernighan, B.W. and D.M. Ritchie, .ul The C Programming Language, (Prentice-Hall, 1978). .sp 2 Kernighan, B.W., .ul Programming in C - A Tutorial .sp 2 Ritchie, D.M., .ul C Reference Manual, (Addison-Wesley, 1976). .sp 2 cpp (1), cp1nual. .in -5 .bd EXAMPLE .br .in +5 The command line .ti +8 .bd help help prints this page. Entering .ti +8 .bd help 2 stty prints the stty.2 file instead of stty.1.  (1), cp2 (1), as (1), ld (1), lib (1) .he "cp1 (1) 3/18/82 cp1 (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .br .in +5 .bd cp1 - parse C programs .in -5 .bd USAGE .in +5 .br .bd cp1 .in -5 .bd FUNCTION .in +5 .br .bd Cp1 is the parsing pass of the C compiler. It accepts a sequential file of lexemes from the preprocessor, .bd cpp, and writes a sequential file of flow graphs and parse trees, suitable for input to a machine-dependent code gen.he "more (1) 3/18/82 more (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd more .in -5 .bd USAGE .in +5 .br .bd more file ... .in -5 .bd FUNCTION .in +5 .br .bd More allows you to scroll through the named files on a video terminal, one screen full at a time. At the bottom of the screen, it prints "--More--" and waits. Press carriage return to continue, delete to quit. If no file names are given, the serator, .bd cp2. The operation of .bd cp1 is largely independent of any target machine. The flag options are: .sp .in +10 .ta 10 .ti -10 -a Compile code for machines with separate address and data registers. .sp .ti -10 -b# Enforce storage boundaries according to .bd #, which is reduced modulo 4. A bound of 0 leaves no holes in structures or auto allocations. A bound of 1 (default) requires short, intermediate and longer data to begin on an even bound. A bound of 2 is the same as 1 except thatandard input is used. .in -5 .bd NOTES .in +5 .br It does not work with an input pipe.t 4 to 8 bytes of data are forced to a multiple of a four-byte boundary. A bound of 3 is the same as 2, except that eight bytes of data (doubles) are forced to a multiple of an eight-byte boundary. .ti -10 -c Ignore case distinctions in testing external identifiers for equality, and map all names to lowercase on output. By default, case distinctions matter. .ti -10 -e Do not force loading of extern references that are declared, but never defined or used in an expression. Default is used to load all ex.he "od (1) 3/18/82 od (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd od, hd - octal or hex dump .in -5 .bd USAGE .in +5 .br .bd od [-bcdox] file .in -5 .bd FUNCTION .in +5 .br .bd Od dumps file in one or more formats. If no file name or "-" is given, the standard input is used. The following flags are understood: .in +10 .ta 10 .ti -10 -b Interpret bytes in octal. .ti -10 -c Interpret bytes in ASCII. .ternal references declared. .ti -10 -l Take integers and pointers to be 4-bytes long. Default is 2-bytes. .ti -10 -m Treat each structure/union as a separate name space, and require .bd x.m to mean .bd x is a structure and .bd m one of its members. .bp .ti -10 -n# Ignore characters after the first .bd # in testing external identifiers for equality. Default is 7; maximum is 8. .ti -10 -o file Write the output to the specified file and write error messages to STDOUT. Default is STDOUT for outputi -10 -d Interpret words in decimal. .ti -10 -h Hex words .ti -10 -o Interpret words in octal (default). .ti -10 -x Interpret bytes in hexadecimal. .sp 2 .in -10 .in -5 .bd EXAMPLE .sp .nf od -bo file t and STDERR for error messages. .ti -10 -r# Assign no more than .bd # variables to registers at any one time, where .bd # is reduced modulo 4. Default is three register variables. .ti -10 -u Take "string" as an array of unsigned characters, not an array of characters. .in -10 If is present, it is used as the input file instead of the default, STDIN. On many systems, the .bd -o option and are mandatory because STDIN and STDOUT are interpreted as text files, and hence become corrupte.he "help (1) 6/28/82 help (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .br .in +5 .bd help - help processor .in -5 .bd USAGE .br .in +5 .bd help [N] topic ... .in -5 .bd FUNCTION .br .in +5 .bd Help prints documentation (if it exists) for each named topic. Complete on-line documentation is resident on the Micronix system. .bd Help is the same program as .bd man, execpt that when it is called as "help" it looks first in /usr" d. .in -5 .bd EXAMPLE .in +5 .br .bd Cp1 is usually sandwiched between .bd cpp and .bd cp2, as in: .sp .nf .bd 3 cpp -x -o temp1 file.c cp1 -o temp2 temp1 cp2 -o file.mac temp2 .fi .in -5 .bd SEE ALSO .in +5 .br cpp (1) .br .ul C Compiler User's Manual for language definition. NOTE: This program and documentation are products of Whitesmiths, Ltd., cessors. The flag options are: .in +10 .ta 10 .ti -10 -c Do not strip out .bd /* comments */ nor continue lines that end with .bd \. .ti -11 -dname Define name; if the definition string (=def) is included, it reads it in before the input; if "=def" is omitted, the definition is taken as "1". The "name" and "=def" must be in the same argument - no blanks are permitted unless the argument is quoted. Up to ten definitions may be entered in this fashion. .sp .ti -10 -i Change the prefix used with .bd .he "cp2 (1) 4/15/82 cp2 (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd cp2 - generate code for 8080 C programs .sp 2 .in -5 .bd USAGE .in +5 .br cp2 -[flags] .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Cp2 is the code generating pass of the C compiler. It accepts a sequential file of flow graphs and parse trees from .bd cp1 and writes a sequential file of A-Natural statements, suitable for input to the A-Natural a#include from the default ("") to the string prefix. Multiple prefixes to be tried in any order may be specified, separated by the "|" character. .ti -10 -o can be specified with flag. Writes the output to the specified file and writes error messages to STDOUT. Default is STDOUT for output and STDERR for error messages. On many systems, the .bd -o option is mandatory with .bd -x because STDOUT is interpreted as a text file, and hence becomes corrupted. .ti -10 -p? Change thessembler, .bd as. As much as possible, the compiler generates free-standing code; but for those operations which cannot be done compactly, it generates inline calls to a set of machine-dependent library routines. The 8080 runtime library is documented in Section IV of the C Reference Manual. The flags are: .sp 2 .in +5 .ta 5 .ti -5 -p Emit profiler calls on entry to each function. No profiler is currently provided for the 8080. .ti -5 -o * Write the output file * and write the error messages to STDO preprocessor control character from .bd # to .bd ?. .ti -10 -s? Change the secondary preprocessor control character from .bd @ to .bd ?. .ti -10 -x Put out lexemes for input to the C compiler .bd cp1, not lines of text. .ti -10 -6 Put out extra newlines and/or SOH ('\') codes to keep source line numbers correct for UNIX/V6 compiler or ptc. .in -10 .bd Cpp processes the named file, or STDIN if none is named, in the order specified, writing the resultant text to STDOUT. Preprocessor actions are descUT. Default is STDOUT for output and STDERR for error messages. .ti -5 -x# Map the three virtual sections, for Functions (04), Literals (02), and Variables (01), to the physical sections Code (bit is one) and Data (bit is zero). thus, "-x4" is for separate I/D space, "-x6" is for ROM/RAM code, and "-x7" is for compiling tables into ROM. Default is 6. .in -5 If is present, it is used as the input file instead of the default STDIN. On many systems, is mandatory because STDIN is interpretedribed in detail in the Preprocessor section of the C Compiler User's Manual. The presence of a secondary preprocessor control character permits two levels of parameterization. For instance, the invocation .sp .ce .bd cpp -c -p@ .sp will expand .bd define and .bd ifdef conditionals, leaving all .bd # commands and comments intact. Invoking .bd cpp with no arguments would expand both .bd @ and .bd # commands. The flag, .bd -s#, effectively disables the secondary control character. .in -5 . as a text file, and hence becomes corrupted. Files output from .bd cp1 for use with 8080 code generator should be generated with: "-b0" to eliminate holes in structures and auto allocation, and "-n8" for full length external names. A boundary of "-b1" (default) is also acceptable if compact storage is less important than compatibility with data structures on other machines. Note that use of the .bd cp1 flags "-b2", "-b3", or "-1" will produce bizarre behavior and incorrect code in .bd cp2, often with nbd EXAMPLE .in +5 .br The standard for writing C programs is .sp .nf .bd 8 /* name of program */ #include # define MAXN 100 COUNT things[MAXN]; etc. .fi .sp The use of uppercase identifiers is not required by .bd cpp, but is strongly recommended to distinguish parameters from normal program identifiers and keywords. .in -5 .bd NOTES .in +5 .br Unbalanced quotes (' or ") may not occur in a line, even in the absence of the -x flag. Flotaing constants longer than 38 digits mao meaningful diagnostics. Wherever possible, labels in the emitted code each contain a comment which gives the source line from which the code immediately following obtains. .sp 2 .in -5 .bd EXAMPLE .in +5 .br .bd cp2 usually follows .bd cpp and .bd cp1 as follows: .sp .in +5 .bd 3 cpp -x -o temp1 file.c .br cp1 -b0 -n8 -o temp2.80 temp1 .br cp2 -o file.s temp2 .in -5 .sp 2 .in .in 5 .bd SEE ALSO .in +5 .br as (1), cp1 (1), cc (1), cpp (1) NOTE: This program and documentation are products of Whitesmiths,y compile incorrectly on some host machines. .in -5 .bd SEE ALSO .in +5 .br cp1 (1), ptc (1) .br Micronix C and Pascal manual .br  Ltd., .he "ddt (1) 4/12/82 ddt (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd ddt - a program for examination and manipulation of .nf non-text files .fi .sp 2 .in -5 .bd SYNOPSIS .in +5 .br ddt [file] .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Ddt can be a handy tool for programmers and others who need to manipulate arbitrary (i.e. non-ASCII text) files. It is functionally analogous to CP/M's DDT, but the Digital .he "cpp (1) 4/13/82 cpp (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd cpp - preprocess defines and includes .in -5 .bd USAGE .in +5 .br .bd cpp .in -5 .bd FUNCTION .in +5 .br .bd Pp is the preprocessor used by the C compiler, to perform .bd #define, #include, and other functions signaled by a .bd # before actual compilation begins. It can be used to advantage, however, with most language pro# Research version works with memory, while this one works on files. Changes made to a file under .bd ddt are immediately effective. There is no intermediate buffer as with some editors. Addresses (mentioned below) are given in hexadecimal, (up to six digits long). If the first character of an address is an .bd ' (apostrophe), the value of that number will be that of the ASCII character following. The following are valid addresses: .sp .nf .bd 2 0 6 b B 'y c3b0 78ba4 'A FFFF '/ .sp .fi Addresssp .ti +5 .bd fsck filesystem .sp where .bd filesystem is the name of the device on which the file system in question lives, you can bring your file system completely up to par. If no specification is made, .bd fsck searches for and attempts to fix all file system problems. .sp 2 Options: .sp .in +5 .ta 5 .ti -5 -t Test all of the blocks on the file system to see that each is readable. Systems on large disks may take some time to complete. .sp .ti -5 -n No changes will be made. .bd Fsck will only  list may be comma-separated or space-separated. The following are valid address lists: .sp .nf .bd 0,ffff 0,5,7 0,3000,'a 'a,'b,'c .sp .fi No command takes more than three addresses. Extra addresses are ignored. .sp .bd Ddt always remembers the last file address accessed. In most cases, if you give no address on the next command, this old remembered address is used. .bp Commands: .sp .ti -3 .bd d - display .sp Takes 0, 1, or 2 arguments. Displays the contents of the file in hex bytes on the left and ASClook and tell you what it would do. .sp 2 .in -5 .ti -7 .bd Fsck can fix: .sp .in +5 .ti -5 - Two files claiming the same block. The block is copied and a copy is given to each file. .bp .ti -5 - File containing a bad block. An attempt is made to copy the bad block; in any case, a new block is allocated to fill the spot. The bad block is assigned to a file in the directory "badblocks". .sp .ti -5 - Duplicates in the free list. .sp .ti -5 - Allocated blocks in the free list. .sp .ti -5 - Blocks missiII characters on the right. If no address follows .bd d, the next 128 bytes, starting at the given location, are displayed. Finally, if two addresses are given, that part of the file which lies between the two addresses is displayed. Examples: .nf .sp .bd d 0, ffff .sp .bd d .sp .bd d 55 .sp .bd d a000 .sp 2 .fi .ti -3 .bd f - fill (requires three arguments) .sp .ti -3 .bd f A, B, C .sp The portion of the file which lies between addresses A and B (inclusive) is overwritten with a flood of the characng from the free list. .sp .ti -5 - Bad block in the free chain. The free list is rebuilt from scratch. .sp .ti -5 - File for which there is no directory entry (an orphan). An entry is made in the "lost+found" directory. .sp .ti -5 - Missing directory self link ".". .sp .ti -5 - Missing directory parental link "..". .sp .ti -5 - Disconnected directory. Appropriate links are made to directory names in "lost+found," if necessary. .sp .ti -5 - Imbalanced directory entry - link counts. Resolved in favor of  Repacking the units in their original container provides the best protection during shipping. - Enclosed in the Decision I box is a contents list for the system you have ordered. This list contains the serial num bers of all devices in your system. Please check the contents of the the containers to verify all components have been re ceived. Most systems are shipped in more than one container, but the Decision I box always contains the system contents dsubstitutethe directory entries, i.e., the link count is changed. .sp 2 .in -5 .ti -7 .bd Fsck cannot fix: .sp .in +5 .ti -5 - Bad blocks in the i-list or super block. .sp .ti -5 - Ridiculous numbers in the super block. .sp 2 .in .in 5 .bd SEE ALSO .in +5 .nf .br filesystem (5), icheck(1), dcheck(1), df (1), ncheck (1)  command allows you to examine and optionallly change the file on a byte-by-byte basis. After entering the .bd substitute command you will be in "substitute" mode until you exit it by entering a single period on a line. If while in the substitute mode you press RETURN, the byte you were looking at will remain unchanged and you will be stepped to the next byte. If you enter a byte value and then push RETURN, the byte will be changed to the byte entered. .sp 2 .in -3 .bd / (address) .br .bd // (search) .s.he "group (1) 4/18/82 group (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd group - examine or change the group of a list of files .sp 2 .in -5 .bd USAGE .in +5 .br group [-name] file ... .sp 2 .in -5 .bd FUNCTION .in +5 .br Associated with each Micronix file is a group number. The group number is used to determine group access permission. If you are running a single user, informal, or very low user-population systep .in +3 .bd Ddt has the ability to search for patterns in a file. When the "/" command is given, you will be asked to enter a series of bytes to search for. If an address follows the "/", the search commences at the given address in the file. Without an address, the search commences at the current file address. The "//" command is a shorthand to search again for the previously given pattern. m, the whole concept of groups may be irrelevant to you. The .bd group command can be used to view the group names of files. The relationship of group names to group numbers is entirely established by the file "/etc/group" [see .bd group (5)]. .sp .bd Group prints the group name for each file given. If the file's group number has no name, the group number is printed in decimal instead. If the first argument to .bd group is a group name preceded by a hyphen, .bd group attempts to change the group o.he "fsck (1) 4/13/82 fsck (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd fsck - file system check and repair .sp 2 .in -5 .bd USAGE .in +5 .br fsck [-t] [-n] filesystem .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Fsck is a complete Micronix file system maintenance package. System crashes may cause the Micronix file systems (as well as standard UNIX version 6 file systems) to become internally inconsistent in potentiallf each of the named files to the given name. .sp 2 .in -5 .bd EXAMPLES .sp .in +5 .ti +5 .bd group file1 file2 file3 to discover which group each of these files belongs to. .sp 2 .ti +5 .bd group file1 file2 file3 to discover which group each of these file belongs to. .sp 2 .ti +5 .bd group -sales file1 file2 file3 to "give" each of the files to the group named "sales." .sp 2 .in -5 .bd SEE ALSO .in +5 .br group (5) .sp 2 .in -5 .bd FILES .in +5 .br /etc/group - group name <-> group number relationshipsy dangerous ways to your data. It is also possible for the physical device on which a file system resides to develop unreadable spots. The .bd fsck program ratifies these inconsistencies and maintains the file system. .bd NOTE! Do not run .bd fsck on an .ul active file system. If information in the file system is changing while .bd fsck is taking its "snapshot" of the state of the file system, it will get the wrong idea and will try and fix things that were not wrong in the first place. By typing .$  ddress field; S1 and S2 records have fields of two and three bytes in length, respectively; S9 and S8 records have fields of two and three bytes in length, respectively, and contain no data bytes. is represented most significant byte first. The SO record contains the name of the input file, formatted as data bytes. If input was from xeq, XEQ is used as the name. S1 and S2 records represent text or data segment bytes to be loaded. They normally contain 32 image bytes, output in incr.he "hex (1) 4/14/82 hex (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .bd hex - translate object file to ASCII formats .sp 2 .in -5 .bd USAGE .in +5 .br hex -[flags] .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Hex translates executable images produced by .bd link to Intel standard hex format or to Motorola S-record object file format. The executable image is read from , if specified, otherwise from the file xeq. The   flags are: .sp 2 .in +5 .ta 5 .ti -5 -h Do not start record for Intel hex files. .ti -5 -m* Insert the string *, instead of , into the Motorola SO record generated when -s is given. .ti -5 -r## Interpret the input file as "raw" binary and not as object file. Output is produced as described below, in either format, except that the starting address of the module is specified by the long integer ##. .ti -5 -s Produce S-record rather than the default hex format. .ti -5 +# Start output with the #th easing order of address; the last record of each segment may be shorter. The text segment is output first, followed by the data segment. S9 records contain only a two-byte start address in their field; S8 records contain a three-byte address. The start address of an object file is the start of the text section. is a single byte value such that the numerical sum of all the bytes represented on the line (except the S field), taken modulo 256, is 255 (0xFF). .sp 2 .in -5 .bd RETURNS .in +byte. # should be between 0 and one less than the value specified by the -#flag. -4 +3 produces bytes 3, 7, 11, 1 5, ...; -2 +0 produces all even bytes; -1 +1 outputs all odd bytes; 0 is the default which outputs all bytes. .ti -5 -# Output every #th byte. -2 outputs every other byte, -4 every fourth; 1 is the default which outputs all bytes. .in -5 Output is written to STDOUT. .ul Hex Files A file in Intel hex format consists of the following records, in the order listed: .in +5 .ti -5 1) A "$" alone5 .br .bd Hex returns success if no error messages are printed, that is, if all records make sense and all reads and writes succeed; otherwise it reports failure. .sp 2 .in -5 .bd EXAMPLE .in +5 .br The file hello.c, consisting of : .sp .ti +5 .bd char *p {"hello world"}; when compiled produces the following Intel hex file: .sp .in +5 .bd % hex hello.o .br .bd $ .br .bd :0E000002006856C6C6F20776F726C640094 .br .bd :000000010 .bp .in .in 5 .bd SEE ALSO .in +5 .br link (1), obj (1), cc (1), as (1), cp1 (1),  on a line to indicate the end of the (non-existent) symbol table. If -h is specified, this line is omitted. .bp .ti -5 2) Data records for the text segment, if any. These represent 32 image bytes per line, possibly terminated by a shorter line. .ti -5 3) Data records for the data segment, if any, in the same format as the text segment records. .ti -5 4) An end record specifying the start address. .in -5 Data records each begin with a ":" and consist of pairs of hexadecimal digits, each pair representincp2 (1), cpp (1) NOTE: This program and documentation are products of Whitesmiths, Ltd., g the numerical value of a byte. The last pair is a checksum such that the numerical sum of all the bytes represented on the line, modulo 256, is zero. the bytes on a data record line are: .in +5 .ti -5 a) The number of image bytes on the line. .ti -5 b) Two bytes for the load offset of the first image byte. The offset is written more significant byte first so that it reads correctly as a four-digit hexadecimal number. .ti -5 c) A zero byte "00". .ti -5 d) The image bytes in increasing order of addr.he "link (1) 4/14/82 link (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .bd link - combine object files .sp 2 .in -5 .bd USAGE .in +5 .br link -[flags] .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Link combines relocatable object files in standard format for any target machine, selectively loading from libraries of such files made with .bd lib, to create an executable image for stand-alone execution, or for input to other binary reess. .ti -5 e) The checksum byte. .in -5 An end record also begins with a ":" and is written as digit pairs with a trailing checksum. Its format is: .in +5 .ti -5 a) A zero byte "00". .ti -5 b) Two bytes for the start address, in the same format as the load offset in a data record. .ti -5 c) A one byte "01". .ti -5 d) The checksum byte. .in -5 .ul S-Record Files A file in Motorola S-record format is a series of records each containing the following fields: .bd .ti +5 All information is represented as pairs of hexadecimal digits, each pair representing the numerical value of a byte. determines the interpretation of the remainder of the line; valid S fields are "SO", "S1", S2", "S8", "S9". indicates the number of bytes represented in the rest of the line, so the total number of characters in the line is * 2 + 4. indicates the byte address of the first data byte in the data field. SO records have two zero bytes as their a% rget machine. .ti -5 -dr# Round data bias up to ensure that there are at least # low-order binary zeros in its value. Ignored if -db## is specified. .ti -5 -d Do not define bss symbols, and do not complain about undefined symbols. Used for partial links, i.e., if the output module is to be input to .bd link. .ti -5 -eb* If the symbol * is referenced, make it equal to the first unused location past the bss area. .bp .ti -5 ed* If the symbol * is referenced, make it equal to the first unused location pastymbol table name field, so that values [0, 8) provide for odd lengths in the range [1, 15]. If (val & 010) then ints are four bytes; otherwise they are two bytes. If (val * 020) then ints are represented least significant byte first, otherwise most significant byte first; order is assumed purely ascending or purely descending. (val & 0140) >> 5 is the strongest for bounds that are multiples of 0, 2, 4, 8 bytes. If (val & 0200) no relocation information is present in this file. Relocation information c the initialized data area. .ti -5 et* If the symbol * is referenced, make it equal to the first unused location past the text area. .ti -5 -h Suppress headers in output file. This should be specified only for stand-alone modules such as bootstraps. .ti -5 -l* Append library name to the end of the list of files to be linked, where the library name is formed by appending * to "/lib/lib". Up to ten such names may be specified as flags; they are appended in the order specified. .ti -5 -o* Write output modonsists of two successive byte streams, one for the text segment and one for the data segment, each terminated by a zero control byte. Control bytes in the range [1, 31] cause that many bytes in the corresponding segment to be skipped; bytes in the range [32, 63] skip 32 bytes, plus 256 times the control byte minus 32, plus the number of bytes specified by the relocation byte following. All other control bytes control relocation of the next short or long int in the corresponding segment. If the 1-weightedule to file *. Default is xeq. .ti -5 -r Suppress relocation bits. This should not be specified if the output module is to be input to .bd link. .ti -5 -tb## Set text bias to the long integer ##. Default is location zero. .ti -5 -t Suppress symbol table. This should not be specified if the output module is to be input to .bd link. .ti -5 -u* Enter the symbol * into the symbol table as an undefined public reference, usually to force loading of selected modules from a library. .ti -5 -x* Specify pla bit is set in such a control byte, then a change in load bias must be subtracted from the int. The 2-weighted bit is set if a long int is being relocated instead of a short int. The value of the control byte right-shifted two places, minus 16, constitutes a "symbol code". A symbol code of 47 is replaced by a code obtained from the byte or bytes following in the relocation stream. If the next byte is less than 128, the symbol code is its value plus 47. Otherwise, the code is that byte minus 128, timescement in the output module of the input .text and .data sections. The 2-weighted bit of # routes .text input, the 1-weighted bit, .data. If either bit is set, the corresponding sections are put in the text segment output; otherwise they go in the data segment. The default value used, predictably, is 2. .in -5 The bss section is always assumed to follow the data section in both the input and output files. It is perfectly permissible for text and data sections to overlap, as far as .bd link is concerne 256, plus 175 plus the value of the next relocation byte after that one. A symbol code of zero calls for no further relocation; 1 means that a change in the text bias must be added; 3 means that a change in bss bias must be added. Other symbol codes call for the value symbol table entry indexed by the symbol code minus 4 to be added to the item. Each symbol table entry consists of a value int, a flag byte, and a name padded with trailing NULLs. Meaningful flag values are o for undefined, 4 for defined d; the target machine may or may not make sense of this situation (as with separate instruction and data spaces). The specified are linked in order; if a file is in library format, it is searched once from start to end. Only those library modules are included which define public symbols for which there are currently outstanding unsatisfied references. Hence, libraries must be carefully ordered, or rescanned, to ensure that all references are resolved. By special dispensation, flags of the form absolute, 5 for defined text relative, 6 for defined data relative, and 7 for defined bss relative. To this is added 010 if the symbol is to be globally known. If a symbol still undefined after linking has a non-zero value, .bd link assigns the symbol a unique area, in the bss segment, whose length is specified by the value, and considers the symbol defined. This occurs only if -d has not been given. .sp 2 .in -5 .bd RETURNS .in +5 .bd Link returns success if no error messages are printed to STDOUT, tha"-1*" may be interspersed among . These call for the corresponding libraries to be searched at the points specified in the list of files. No space may occur after the "-1", in this usage. .ul File Format A relocatable object image consists of a header followed by a text segment, a data segment, the symbol table, and relocation information. The header consists of an identification byte 0x99, a configuration byte, a short unsigned int containing the number of symbol table bytes, and six unsigned int is, if no undefined symbols remain and if all reads and writes succeed; otherwise, it returns failure. .sp 2 .in -5 .bd EXAMPLE .in +5 .br To load the C program echo.o with separate I/D spaces for Micronix (UNIX/V6): .sp .ti +5 .bd % link -1c.11 -rt -db0 /lib/Crts.o echo.o; taout or with read-only text section: .sp .ti +5 .bd % link -1c.11 -rt -dr13 /lib/Crts.o echo.o; taout .bp And to load the 8080 version of echo under CP/M: .sp .nf .bd A:link -hrt -tb0x0100 a:chdr.o echo.o a:clib.a a:mlib.a .sp 2 .fi    .in -5 .bd SEE ALSO .in +5 .br hex (1), lib (1), lord (1), obj (1), cc (1), as (1), cp1 (1), cp2 (1), cpp (1) NOTE: This program and documentation are products of Whitesmiths, Ltd., ts giving: the number of bytes of object code defined by the text segment, the number of bytes needed by the bss segment, the number of bytes needed for stack plus heap, the text segment offset. Byte order and size of all ints in the header are determined by the configuration byte. The configuration byte contains all information needed to fully represent the header and remaining information in the file. Its value val defines the following fields: ((val & 07) << 1) + 1 is the number of characters in the s& .he "mount (1) 4/13/82 mount (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd mount - mount a file system .sp 2 .in -5 .bd USAGE .in +5 .br mount [special directory] .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Mount is used to extend the Micronix file system to include additional devices. .sp .bd Mount with no argument displays the current list of mounted file systems. The named special file is mounted on the named directnot recognize. Lowercase letters are used for local symbols, uppercase for globals. .ti -5 -g Print global symbols only. .ti -5 -i Print all global symbols with the interval in bytes between successive symbols shown in each value field. Implies the flags -[d u v]. .ti -5 -o Output symbol values in octal. Default is hexadecimal. .ti -5 -s Display the sizes, in decimal, of the text segment, the data segment, the bss segment, and the space reserved for the runtime stack plus heap, followed by the sum oory. A special file may be mounted at most once. Mount refuses to mount a special file which does not contain a file system. .sp 2 .in -5 .bd EXAMPLE .sp .in +5 .ti +5 .bd mount /dev/dja /f mounts a floppy on directory /f .sp 2 .in -5 .bd SEE ALSO .in +5 .br .bd umount - to reverse the effects of .bd mount. f all the sizes. .ti -5 -t List type information for this file. For each object file the data file is: the size of an integer on the target machine, the byte order it observes, the most restrictive storage bound it enforces, and the maximum number of characters it permits in an external name. If the file is library, the type of library is output and the information above is output for each module in the library. .bp .ti -5 -u List all undefined symbols in each file. If -d is also specified, each undef.he "ncheck (1) 4/13/82 ncheck (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd ncheck - generate names from i-numbers .sp 2 .in -5 .bd USAGE .in +5 .br ncheck [-i numbers] filesystem .sp 2 .in -5 .bd FUNCTION .in +5 .bd Ncheck generates a pathname vs. i-number list for the named file system. If -i is specified along with a list of numbers, pathnames are reported only for the i-numbers specified. .sp 2 .in -5 .bd EXAMPLES .in +5 .tiined symbol is listed with the code "U". The value of each symbol, if non-zero, is the space to be reserved for it at load time if it is not explicitly defined. .ti -5 -v Sort by value; implies the -d flag above. Symbols of equal value are sorted alphabetically. .in -5 If no flags are given, the default is -[d u]; that is, all symbols are listed, sorted in alphabetical order on symbol name. If more than one of the flags -[d s t y] is selected, then type information is output first, followed by segment  +5 .bd ncheck /dev/root to generate a list of all the file names and their i-numbers for the root file system. .sp 2 .ti +5 .bd ncheck -i 26 87 204 /dev/root to look up path names for a few selected i-numbers. .sp 2 .in -5 .bd SEE ALSO .in +5 .br fsck (1), icheck (1), dcheck (1) sizes, followed by the symbol list specified with -d or -u. specifies zero or more files, which must be in relocatable format, or standard library format, or in UNIX/V6 library format, or UNIX/V7 library format. If more than one file, or a library, is specified, the name of ech separate file or module precedes any information output for it, each name followed by a colon and a newline; if -s is given, a line of totals is also output. If no are specified, or if "-" is encountered on the co.he "newuser (1) 4/12/82 newuser (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .bd newuser - add a user account to the system .sp 2 .in -5 .bd USAGE .in +5 .br newuser .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Newuser is largely interactive and fairly self-explanatory. A menu-type display will ask you for the new user name and for the name of a group to put him in. It makes a directory for the new user, setting the owner and grmmand line, xeq is used. .sp 2 .in -5 .bd RETURNS .in +5 .br .bd Obj returns success if no diagnostics are produced, that is, if all reads are successful and all file formats are valid. .sp 2 .in -5 .bd EXAMPLE .in +5 .br To obtain a list of all symbols in a module: .sp .in +5 .bd 7 % obj alloc.o .br 0x00000074T_alloc .br 0x00000000U_exit .br 0x000001feT_free .br 0x000000beT_nalloc .br 0x00000000U_sbreak .br 0x00000000U_write .in .in 5 .sp 2 .bd SEE ALSO .br .in +5 lib (1), link (1), lord oup properly, makes a new entry in the "/etc/passwd" file and possibly makes a new entry in the "/etc/group" file. .sp .bd Newuser is intended to make it easy to add new users. You may want to customize your "/etc/passwd" file, however. .bd Newuser utilizes locking, so that two newusers running simultaneously will not interfere with each other. FILES /etc/passwd /etc/group .sp 2 .in -5 .bd SEE ALSO .in +5 .br passwd (5), group (5), group (1), owner (1), passwd (1) (1), cc (1), as (1), cp1 (1), cp2 (1), cpp (1) NOTE: This program and documentation are products of Whitesmiths, Ltd., and are sold separately. .he "obj (1) 4/15/82 obj (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd obj - examine object files .sp 2 .in -5 .bd USAGE .in +5 .br obj -[flags] .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Obj permits inspection of relocatable object files in standard form for any target machine. Such files may have been output by an assembler, combined by link, or archived by .bd lib. Obj can be used either to check their size and confi.he "owner (1) 4/13/82 owner (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd owner - file ownership .sp 2 .in -5 .bd USAGE .in +5 .br owner [-user] file ... .sp 2 .in -5 .bd FUNCTION .in +5 .br Every Micronix file has associated with it a user I.D. number - the "owner" of the file. The .bd owner utility program allows you to examine or change this file owner number. .bd NOTE: Only the super-user may change the owneguration, or to output information from their symbol tables. The flags are: .sp .in +5 .ta 5 .ti -5 -d Output all defined symbols in each file, one per line. Each line contains the value of the symbol, a code indicating to what the value is relative, and the symbol name. values are output as the number of digits needed to represent an integer on the target machine. Relocation codes are: "T" for test relative, "D" for data relative, "B: for bss relative, "A" for absolute, or "?" for anything .bd obj does ' r of a file. There is usually a name for each user I.D. number. These names are kept in the system-wide file "/etc/passwd." In order to discover who owns a file, type: .sp .ti +5 .bd owner filename .sp The program will look up the owner of the file and attempt to express it as a user name. If this is not possible, it will list the owner as a numerical user I.D. .sp 2 To change the owner of a file, type .sp .ti +5 .bd owner -newowner filename .sp .bd newowner may be a user name or a user I.D. number (namrovide the facility to save files on floppy diskettes (although it can be used in other ways). It doesn't matter if your dump won't all fit on one floppy diskette; .bd td allows you to change diskettes on the fly. Each disk is filled to capacity, then the program asks for operator service. In this sense it does need a bit of babysitting. .sp .bd Td incorporates the facility to do incremental dumps. That is, each new back up contains only files which have changed since the last incremental dump. It uses es are recommended). The .bd owner program works equally well with list of files: .sp .ti +5 .bd owner file1 file2 file3 file4 file5 reports on the ownership of each of the named files. .bp .in -5 .bd EXAMPLES .sp .in +5 .ti +5 .bd owner -root a.out makes file "a.out" belong to user "root". .sp 2 .ti +5 .bd owner a.out reports who owns the file "a.out". .sp 2 .in -5 .bd FILES .in +5 .br /etc/passwd - user I.D. <-> name relationships a system-wide dump table to remember the times directories were dumped. Before beginning a major dump, you should have a stack of formatted diskettes. These diskettes must be pre-formatted but they need not contain file systems. .bd Td will notice that a diskette has no file system and ask you if it should make one. It will then call the .bd mkfs program for you. Unlike some other back-up systems, this program's back-ups are in file system form, meaning it is easy to look through a dump. Options: .sp.he "ptc (1) 4/15/82 ptc (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd ptc - Pascal to C translator .sp 2 .in -5 .bd USAGE .in +5 .br ptc -[flags] .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Ptc is a program that accepts as input lines of Pascal text and produces as output a corresponding C program which is acceptable to the Whitesmiths, Ltd. C compiler. If is present, it is taken as the Pascal program to translate 2 .in +5 .ta 5 .ti -5 -a All. Dump all files. Normally only files under 1000 blocks long are dumped. .sp .ti -5 -dN Day. Dump only files newer than N days old. .sp .ti -5 -hN Hour. Dump only files newer than N hours old. Note: The -d and -h options are additive. .bp .ti -5 -i Incremental. Dump files changed since the last dump of the directory. .sp .ti -5 -u Update. Update the central dump table at the conclusion of a successful dump. .sp .ti -5 -v Verbose. Each file name is printed as it is dumped; otherwise input is taken from STDIN. The flags are: .sp .in +5 .ta 5 .ti -5 -c Pass comments through to the C program. .ti -5 -f Set the precision for reals to single precision (float). Default is double. .ti -5 -k Permit pointer types to be defined using type identifiers from outer blocks. Default is ISO standard, i.e., the type pointed to must be defined in the same type declaration as the pointer type definition. .ti -5 -m# Make # the number of bits in MAXINT excluding the sign bit, e.g., MA. .sp 2 .in .in 5 .bd EXAMPLES .in +5 .sp .ti +5 .bd td . /dev/dja To do a full dump of the current directory onto a floppy A. .sp 2 .ti +5 .bd td -h2 /b/sally /dev/djb Dump the last 2 hours work on floppy drive B. .sp 2 .ti +5 .bd td -a / /dev/djb Full dump of the entire file system. .sp 2 .ti +5 .bd td -i -u newdir /dev/fla .sp Incremental dump of the directory "newdir" onto floppy drive A (but with alternate sectoring). .sp 2 .ti +5 .bd td -d2 -h12 . /dev/dja Dump of everything that's changed since tXINT becomes 32767 for -m15, 1 for -m, etc. Default for MAXINT is 32766 [sic]. Acceptable values for # are in the range [0, 32). .ti -5 -o* Write the C program to the file * and diagnostics to STDOUT. Default is STDOUT for the C program and STDERR for diagnostics. .ti -5 -r Turn off runtime array bounds checks. .ti -5 -s# Make # the number of bits in the maximum allowable set size, i.e., the size of all sets whose base type is integer becomes the specified power of two. Acceptable values are in the rawo and half days ago. .bp .nf .bd 5 mount /dev/dja /f cd /f dir cp file /a/fred/restored umount /dev/dja .sp .fi Example procedure to restore a dumped file. .sp 2 .in -5 .bd FILES .in +5 .br /etc/dtab - the central dump table .sp 2 .in -5 .bd SEE ALSO .in +5 .br cptree (1), ncheck (1), mkfs (1) nge [0, 32). Default is 8 (256 elements). .in -5 The CP/M operating system implementation on the Intel 8080 and Zilog Z80 restricts the acceptable value for # to the range [0, 16]; for maximum portability, this restriction should be honored. Identifiers are mapped to uppercase to keep from conflicting with those declared as reserved words in C. Moreover, structure declarations may be produced that contain conflicting field declarations; and declarations are present for library functions that may not be n.he "tee (1) 5/27/82 tee (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd tee - a pipe fitting .sp 2 .in -5 .bd USAGE .in +5 .br tee [-a] [-i] [file ... ] .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Tee reads the standard input and writes it unchanged to the standard output, making copies in each of the named files. Options .sp .in +5 .ta 5 .ti -5 .bd -a Append. Data is appended to the end of each named file, rather thaneeded. All of these pecadillos are forgiven by the use of appropriate C compiler options. .sp 2 .in -5 .bd RETURNS .in +5 .br .bd Ptc returns success if it produces no diagnostics. .sp 2 .in -5 .bd SEE ALSO .in +5 .br cc (1), as (1), cp1 (1), cp2 (1), cpp (1) NOTE: This program and documentation are products of Whitesmiths, Ltd.,  being over-written. .sp .ti -5 .bd -i Ignore. Interrupt signals are ignored. .sp 2 .in .in 5 .bd EXAMPLE .sp .in +5 .ti +10 .bd edit | tee record will keep a record of the editor's responses to commands. .he "td (1) 4/13/82 td (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd td - tree dump (file backup) .sp 2 .in -5 .bd USAGE .in +5 .br td [-a] [-dN] [-hN] [-i] [-u] [directory] [device] .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Td provides reasonably convenient back-up service. .sp .bd Td dumps potentially all the files in the named directory and in all of its sub-directories recursively. .sp .bd Td is intended to p( .he "umount (1) 4/13/82 umount (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd umount - dismount a file system .sp 2 .in -5 .bd USAGE .in +5 .br umount special .sp 2 .in -5 .bd FUNCTION .in +5 .br The named special file is dismounted. The special file must have been previously mounted with the .bd mount command. It is not permitted to dismount a file system with files still open. Diagnostic: "Device busy". Sometime.in 5 .rm 65 .he "chmod (1) 6/25/82 chmod (1)" .fo " -#-" .bd NAME .in +5 .br .bd chmod - change mode of files .sp 2 .in -5 .bd SYNOPSIS .in +5 .br chmod mode file ... .sp 2 .in -5 .bd DESCRIPTION .in +5 .br The mode of each named file is changed according to the mode argument, which may be an octal number (such as 766) or a symbolic expression (such as u=rw). Brief summary The symbolic mode may be a comma-seps it is necessary to use the "change directory" command before dismounting a device. As an example: .sp .ti +5 .bd cd /; umount /dev/dja .sp 2 .in -5 .bd EXAMPLE .in +5 .ti +5 .bd umount /dev/dja to dismount a floppy. .sp 2 .in -5 .bd SEE ALSO .in +5 .br mount(1) - to mount file systems erated list (no spaces) of commands, each of which has the form [augo] [+-=] [rwxslugo] with one or more letters chosen from each set. a = all, u = user, g = group, o = other, r = read, w = write, x = execute (or search when applied to a directory), s = set id on execution, l = write lock. + means add the bits (logical OR), - means delete the bits (logical AND with the compliment), and = means assignment (logical set and clear). Explanation .br We will first give a brief discussion of the Micronix file p.in 5 .rm 65 .he "du (1) 5/4/82 du (1)" .fo " -#-" .bd PROGRAM .in +5 .br .bd du - disk usage .sp 2 .in -5 .bd USAGE .br .in +5 du [-a] [-s] [name ...] .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Du find the amount of storage space used by the files whose names are given. If a directory name is given, then the disk usage is reported for all the files in the directory and the same is done for each directory on down the tree. If anrotection system: The file protection system allows one to restrict access to files based upon two different criteria - namely, .ul who is trying to access the file and .ul how they are trying to access it. For the purposes of file protection, all users are divided into three categories: .in +5 .ta 5 .ti -5 1) The owner of the file. .ti -5 2) Those in the same group as the file's owner. .ti -5 3) Others. (Those not meeting one of the above criteria.) .in -5 How a file is accessed is composed of ond when disk space becomes an issue, this program can be very useful at showing you where all your disk space is going. If there are several links to a file, the space used by the file is counted only once. Space used by directories themselves is not counted, nor are indirect blocks, as these are considered system overhead and in any event do not amount to more than a few percent. The program doesn't know about files with holes in them: they are counted as if all the holes were filled. .sp Options: .ta e or more of the following: .in +5 .ti -5 1) Access for reading. .ti -5 2) Access for writing. .ti -5 3) Access for program execution or directory searching. .bp .in -5 There are nine file permission mode bits: three for the owner, three for the group and three for others. The meanings of the nine bits are as follows: .nf Allow: Reading by the owner Writing by the owner Execution by the owner Reading by the group Writing by the group Execution by the group Reading by others Writing5 .in +5 .ti -5 -a All. Normally a total block count is produced only for each directory. With the -a option in effect, a block count is produced for each file, regardless. .ti -5 -s Summary. Only a grand total is printed. .sp 2 .in .in 5 .bd EXAMPLES .in +5 .br To find out just how much space you are using, simply enter: .sp .ti +5 .bd du -s To find out which directory has that enormous file in it: .sp .ti +5 .bd du To get the name of the offending file itself: .sp .ti +5 .bd du -a To get an overview by others Execution by others .fi There are also 3 other mode bits that can be set or cleared by chmod. .nf Set user id on execution Set group id on execution Lock the file when it is opened for writing .fi The first two apply only to programs. Ordinarily, when a program is executed, it is tagged with the name of the user who executes it, and thereafter it has the same access permissions. But consider the following situation. Suppose that you have written a spelling checking program that uses a  of the top of the file system: .sp .ti +5 .bd du -s /* .sp 2 .in -5 .bd SEE ALSO .br .in +5 df (1), ls (1) copyrighted dictionary. You must prevent others from copying the dictionary, so you must prevent "read" access by "others". But when an "other" executes the spelling program, how is the program going to read the dictionary? The solution is provided by turning on the speller's "set user id" flag. This causes the program to be tagged with its creator's name, not with its executor's. Then as long as you set the dictionary's "owner" permission to allow reading, the speller can read the dictionary, even though t.in 5 .rm 65 .he "file (1) 6/25/82 file (1)" .fo " -#-" .bd PROGRAM .in +5 .br file .sp 2 .in -5 .bd SYNOPSIS .in +5 .br file file1 ... .sp 2 .in -5 .bd DESCRIPTION .in +5 .br .bd File attempts to guess the type of each named file. Currently, the following types of files are recognized: .in +5 A-natural source file Block special file C source file CP/M text file Character special file Data Directory Empty Executable Pascal sourche person who invokes the speller cannot. The "set group id" flag behaves similarly, except that it only gives the program the permissions of its creator's group. The write lock flag prevents more than one program at a time from holding a file open for writing. This is especially useful for protecting the database of a single-user program that is run multi-user under the Micronix CP/M emulator. The format of the mode argument to .bd chmod is as follows: .nf .bd WHO operand HOW .fi where WHO is a coe file Ratfor source file Relocatable module Software Tools archive Text file Text processor input Whitesmiths library .in -5 ) mbination of the letters a, u, g, and o (for all, user, group, and other); the operand is +, -, or = (for add, delete, and set); and HOW is a combination of the letters r, w, x, s, and l (for read, write, execute, set-id, and lock). HOW may also contain the letters u, g, and o (see below). .sp 2 .in -5 .bd EXAMPLES .in +5 .br To set a file "wide open" so that anyone may access it: .nf .bd chmod a=rwx file .fi This sets all permissions set to read, write, and execute. .sp 2 .nf .bd chmod u=rw file .fi Ti +10 .bd wall System going down in 3 minutes -- Please prepare ^D After which, each user would see: .ti +10 .bd Broadcast message ... followed by what appears above. BCDEFGHIKL.in 5 .rm 65 .he "cu (1) 6/25/82 cu (1)" .fo " -#-" .bd NAME .in +5 .bd cu - call up .sp 2 .in -5 .bd SYNOPSIS .in +5 .br cu device [-s speed] .sp 2 .in -5 .bd DESCRIPTION .in +5 .br .bd Cu may be used to connect to other machines through your Micronix machine. When the .bd cu command is given, one process is set up to handle sending characters to the remote system, one is set up to receive them. Much of this is not ohis sets the user permissions to read and write (but not execute), and leaves the group and other permissions unchanged. .sp 2 .nf .bd chmod go-wx *.c .fi Group and others have the write and execute permission taken away on all files ending with ".c". .sp 2 .nf .bd chmod u+s spell .fi This sets the "set user id" flag on the spell program. .sp 2 .nf .bd chmod +l database This sets the lock flag on the database. (Since the lock flag applies equally to user, group, and others, the WHO part of the operandbvious to the user. When .bd cu is ready it prints a "~". Thereafter, whatever you type will be immediately sent to the remote port, and whatever is received from it is sent to your terminal. So, typically, you press a single key on your terminal, Micronix takes it and re-transmits it to the remote machine, which will usually send it back, at which point Micronix receives it and sends it to your terminal and you see the character on your screen! There is definitely an upper limit to the baud rate you ca may be left out here.) .sp 2 .nf .bd chmod o-x,g=o * This takes all files, removes execute permission from others, and then sets the group equal to the others. n use for the remote port - 1200 baud is the highest recommended. If the remote machine is another Micronix machine, additional commands apply. You many copy a file from local to remote machine via: .sp .nf .bd ~%put file .sp .fi Or from remote to local via: .sp .nf .bd ~%take file .sp .fi Note only text files may be copied reliably. This need not be a drawback, however, because any file can be converted into a text file, transferred, and then converted back again. Both the sending and receiving processectty.1bwall.1acu.1su.1pilot.1~rp.1}cal.1|boot.1s recognize .sp .nf .bd ~>file ~> .sp .fi as starting and ending delimiters for file diversion, so that in order to copy a file from a foreign system to the local one, all you have to do is get the foreign system to generate: .sp .nf .bd ~>filename Text of file ... more file ... ~> .sp .fi That is, a beginning marker, the text of the file, and then an ending marker. To get out of .bd cu type: .sp .nf .bd ~. .fi .sp 2 .in -5 .bd EXAMPLE .in +5 .br To set up communication over a modem, get your har.in 5 .rm 65 .he "tty (1) 5/27/82 tty (1)" .fo " -#-" .bd NAME .in +5 .br .bd tty - get terminal name .sp 2 .in -5 .bd SYNOPSIS .in +5 .br tty .sp 2 .in -5 .bd DESCRIPTION .in +5 .br .bd Tty is a simple program that attempts to look up the full path name and number of the current "tty" device (teletypewriter or terminal). Normally, this is the name of the Micronix (terminal) port you logged in on. Tdware set up and then type: .sp .ti +8 .bd cu /dev/ttyC -s 300 In this example the modem would be plugged into Micronix port C (the third one). Typically, one must reverse the transmit and receive lines in the cable running from the computer to the modem. One reverses the wires running to pins 2 and 3 of the connector at one end or the other. o ascertain your device number, enter the .bd tty command. A typical response is .sp .ti +5 /dev/ttyB .sp meaning that you are on "ttyB". If no associated file name can be found, the message "not a tty" is printed instead. .sp 2 .in -5 .bd FILES .in +5 .br /dev - Directory in which to search for file names. .in 5 .rm 65 .he "su (1) 6/25/82 su (1)" .fo " -#-" .bd NAME .in +5 .br .bd su - set user identification .sp 2 .in -5 .bd USAGE .in +5 .br su [name] .sp 2 .in -5 .bd DESCRIPTION .in +5 .br .bd Su allows you to change your effective user ID in midstream so to speak. The most common use of this program is to temporarily become a super-user in order to install a program, change a system-wide file, kill off an errant process or o.he "wall (1) 6/17/82 wall (1)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd wall - write to all users .in -5 .bd SYNOPSIS .in +5 .br wall .in -5 .bd DESCRIPTION .br .in +5 .bd Wall reads the standard input up to an end of file, then sends this to the terminal of each currently logged in user. Its normal use is to inform users of immediate system status. Only the super-user may use .bd wall. .in -5 .bd EXAMPLE .in +5 .t* ther administrative task. If no name is given, "root" is the default. Non super users will be asked to give passwords. .sp 2 .in -5 .bd EXAMPLE .in +5 .br su  point on. If no label name is given, pilot prints "Missing label" and stops. If there is no such label to be found in the current pilot script file, "name: Label not found" is printed and pilot stops. .sp Example .in +10 .nf *top t:Hello j:*top .sp .fi .in -10 This would print "Hello" over and over again forever. A more useful example: .sp .in +10 .nf a: m:yes jn: *default t: you typed yes e: * default t: you didn't type yes e: 1) Accept a line from the controlling terminal 2) Match it against "Yes" 3).he "pilot (1) 7/19/82 pilot (1)" .fo " -#-" .rm 65 .in 10 .bd .ti -5 .bd NAME .br .bd pilot - an author language .sp 2 .ti -5 .bd DESCRIPTION .br This program gets its name from and is loosely based upon that set of programs written for the CP/M system under the generic name PILOT, itself based upon some complex IBM software. The present incarnation has adopted many of the ideas, but is not totally faithful to the original PILOT standard. Pilot is an author language in the YZ[\]^_`bcdefghisense that it should be possible for "authors," i.e. non-programmers, to successfully and fairly rapidly get something working in the pilot language. Pilot is a non-structured language, but structured language enthusiasts may be assured that "rp" (a rational pilot) is available as a preprocessor. (See rp (1)). In order to run something in pilot, one issues the command: .sp .bd .ti +10 pilot filename .sp where the given filename refers to a "pilot script". Pilot will simply read the script and do whatever Jump to *default if the previous match failed. 4) type - "you typed yes" otherwise .sp 2 .fi .in -10 .ti -5 .bd M - match - m: pattern,pattern,pattern, ... .br Compare the most recent input against the given list of patterns and set pilot's condition flag based on the outcome. The following instructions may base their behavior on the outcome of these pattern comparisons. Two results are possible: 1) The input matched one of the patterns (success). .sp 2) The input matched none of them (failure). .sp Comp is requested. To write a "pilot script" one needs only a way to get text into a file. Most text editors will suffice. .bd .ce Pilot Operation In general, pilot reads its input file, one line at a time, performing the described actions before proceeding. The general layout of a pilot command is: .ti +5 .bd *label command conditional : word1 word2 word3 ... .bd *label is a tag by which one may refer to this line elsewhere in the script. It is optional, and in practice, most commands will not have labearison of each pattern is by a marching window scan. .sp Case is ignored, that is, a capital Q is considered to be the same as a lower case q. .sp Example .in +10 .nf m:a m:one,two,three .fi .in -10 The first will succeed whenever the most recent terminal input contained the letter "a" anywhere. The second will succeed if the most recent input contained any of the three given character sequences which form the words one, two, three. .sp 2 .ti -5 .bd N - new file - n: filename .br Fairly straightforward: ls. A label may appear on a line by itself. .bd command is a single letter command, discussed in detail below. .bp .bd conditional is either the letter Y or N. A conditional specifier is optional. If one appears, the command will only do something if the Y or N matches the current state of pilot's condition flag. .bd words are optional and specific to individual commands. .bd .ce Instruction Summary .nf .in +20 A - accept C - call D - define E - exit J - jump M - match N - new file R - return S - savPilot has been marching along executing instructions in its pilot script file. When it encounters the line .sp .nf .bd n: newfile .sp .fi pilot will have done with the current file and start executing instructions with the first line in the file named "newfile". (There must, of course exist such a file, and it must be readable.) Pilot stops if it can't read the given file. .sp 2 .ti -5 .bd R - return - r: .br Discussed in C - call (above). A return instruction causes a jump to the line following the most e T - type U - unix W - wait .fi .in -20 .sp 2 .bd .ce Instruction Descriptions .ti -5 .bd A - accept - a: [variable] .br One line of input is accepted from the standard input. If a variable name is given, a copy of the accepted data will be stored in the variable. .sp Examples .in +10 .nf a: a: $save .sp 2 .fi .in -10 .ti -5 .bd C - call - c: *label .br Jump to the given label, but remember where you were. If a return instruction (r:) is encountered in the program flow after the label, pilot will jump bacrecently executed call instruction. If there are no calls for which there have been no returns, pilot stops. It returns out of pilot to the calling program, as it were. Anything to the right of the colon is ignored. .sp Example .in +10 .nf r: .fi .in -10 .sp 2 .ti -5 .bd S - save - s: $variable .br The current value of the input terminal input register is saved in the string variable whose name is given. If no name is given, no action is taken. .sp Example .in +10 .nf s: $phial .sp .in -10 .fi The most recek to the instruction following the call. .sp Example .in +10 .nf c: *output e: *output t: Hello world! r: 1) Call instruction jump down to "*output". 2) Type instruction - type "Hello world!" .bp 3) Return - go back to just after the last call 4) exit - all done! .fi .in -10 .sp 2 .ti -5 .bd D - define - d: $move data .br The string "data" is evaluated if necessary and then a copy of the resulting string of characters is stored in the string variable "name". Note that "$" denotes string variables. .sp Ently accepted input is saved in "phial". .sp 2 .ti -5 .bd T - type - t: text .br A simple command, really. That which follows the colon is simply sent verbatim to the standard output, (usually the terminal). If the last character of the line is a left slant (\), then no "newline" character is sent at the end of the line. Example .nf .in +10 t: A) First selection t: B) Second selection t: t: Your choice ==>\ a: .sp .fi .in -10 The four lines above are typed. .ti -5 .bd U - unix - u: command .br The commanxample .in +10 .nf d: $x The cheese t: $x 1) Definition $x is set to "The cheese" 2) Type - "The cheese" will be typed. .sp 2 .fi .in -10 .ti -5 .bd E - exit - e: .br This is a simple instruction. Pilot quits when it encounters an exit instruction. Anything to the right of the colon is ignored. .sp Example .nf .in +10 e: Stop the whole works right now. .in -10 .fi .sp 2 .ti -5 .bd J - jump - j: *label .br Go to some other part of the current pilot script file and continue executing instructions from that+ d to the right of the colon is executed just as if it had been typed as a command to the shell. This command gives you access to the rest of the system. This instruction can take much longer than any of the others just to get set up. If the sub-process created by a U instruction is interrupted or otherwise abnormally terminated, pilot will stop. .bp Example .nf .in +10 u: ls u: cat $file | form | lpr & u: pilot zzz .in -10 .fi Each command is executed. Note that it is possible for pilot to continue before -5 .bd for (statement; condition; statement) statement; .sp .in +5 First, the first statement is executed. Then repeatedly the condition is tested, and if true, the last statement is executed, then the second. If the condition is false, the loop is broken and control proceeds to the next statement following the .bd for. More clearly: the first statement is the initializer of the loop, the second is the incrementation, and the last is the body of the loop. .br .sp .in -5 .bd repeat statement; .sp .in +5 Thethe command finishes (ex. 2) or for there to coexist several layers of pilot programs (ex. 3). .ti -5 .bd W - wait - w: [$variable] [number] .br Wait is just like "accept" above only it "times out" after a certain period. The default period is six seconds. One can select a different period by placing a numeric value to the right of the colon as one of the arguments. If the specified time interval expires before the RETURN key has been pressed, then the data returned is the single word "TIMEOUT" which can  statement is executed repeatedly. .br .sp .in -5 .bd repeat statement; .bd until (condition); .sp .in +5 The statement is executed repeatedly until the condition is true. The condition is always tested after the statement is executed, which is to say, the statement will always be executed at least once. .sp .in -5 .bd break; .sp .in +5 One level of .bd while, .bd for, or .bd repeat, loop is broken out of. .sp .in -5 .bd next; .sp .in +5 Transfers control to the looping mechanism of the innermost .bd wlater be tested. Example .in +10 .nf w: w: $data w: 9 w: $fast 2 1) Accept data for a six second period. 2) Accept data; wait for six seconds; store it in "data" 3) Accept data; wait for nine seconds. 4) Accept data; wait for two seconds; store it in "fast" .sp 2 .fi .in .in 10 .ti -5 SEE ALSO .br rp - rational pilot hile, .bd for, or .bd repeat, in which it occurs. .sp 2 .in -5 .bd ALSO READ .br .in +5 .fi Kernighan, B.W. and P.J. Plauger, .ul Software Tools, (Addison-Wesley, 1976). .he "rp (1) 3/18/82 rp (1)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM .in +5 .br .bd rp - rational_pilot -> pilot translator .in -5 .bd USAGE .br .in +5 .bd rp pilot_file .sp 2 .in -5 .bd FUNCTION .in +5 .br .fi The .bd rp preprocessor for pilot enables you to write programs in the free-form structured language "rational pilot", then automatically translate them into standard pilot for interpretation by the "p.he "cal (1) 7/16/82 cal (1)" .fo " -#-" .in 10 .rm 65 .ti -5 .bd NAME .br .bd cal - print a calendar .ti -5 .bd SYNOPSIS .br .bd cal [month] [year] .ti -5 .bd DESCRIPTION .br The .bd cal program is capable of printing full-year calendars or single-month calendars for any year or any month after year 0 (A.D). .bd Cal with no arguments prints a full-year calendar for the current year. .bd Cal with one numerical argument prints a calendar for that year. Month names ilot" command. This implementation incorporates .bd include and .bd macro capabilities. .bd Rp reads from the standard input and writes to the standard output. .sp Lines of the form: .sp .in +8 .bd include file .sp .in -8 are replaced by the contents of the named file. .bd Includes may be nested. .sp Macro definitions such as: .sp .in +8 .bd define(token, string) .sp .in +3 or .sp .in -3 .bd define(token, ...$1...$2...$3...) .br .sp .in -8 may appear. The left parenthesis must follow the word define immedimay be given a english names, abbreviations, or as numbers. If a month name is given, a single-month calendar is printed. If both arguments are numeric, the first is taken to be the month. .ti -5 .bd EXAMPLES .br .ti +5 .bd cal 1932 Would print a full year calendar for the year 1932. .ti +5 .bd cal august 1955 To print a single month calendar for August, 1955. .ti +5 .bd cal Would print this year's calendar. .ti +5 .bd cal november For a single month calendar for November of this year. ately. In the first case, .bd string is merely substituted for .bd token everywhere it appears. In the second, occurrences of the form: .sp .ti +8 .bd token(arga, argb, argc) .sp are replaced by the defining string, but with the values substituted for the arguments. The construction $n, where n is a decimal digit, signifies the nth argument. A given macro may have at most nine arguments. Macro definitions may be recursive. .br .sp Any valid pilot statement is a valid .bd rp statement. A statement or g.he "boot (1) 6/17/82 boot (1)" .fo " -#-" .in 8 .rm 65 .bd .ti -6 NAME .br .bd boot - Micronix bootstrap procedures .ti -6 .bd SYNOPSIS .br djboot, hdboot, m5boot, m10boot, m16boot .ti -6 .bd DESCRIPTION .br The CP/M diskette that comes with Micronix includes the following bootstrap programs: .in +8 .ti -8 djboot Boot from the DJDMA controller with a 5 inch or an 8 inch drive. .ti -8 hdboot Boot from the HDCA controller the 10, 20, or 26 megabyte drive .ti -8 m5boot Boot from the HDDMA coroup of statements may be enclosed in curly brackets "{" and "}". The result is treated as a single statement. In addition to standard pilot, the following are understood: .bp .bd if (condition) statement; .sp .in +5 The statement is executed if the condition is true. The condition may be either a match query or a define query (see pilot (I)). .sp .in -5 .bd if (condition) statement; else statement; .sp .in +5 If the condition is true, the first statement is executed, otherwise the second statement is exentroller with the 5 megabyte drive .ti -8 m10boot Boot from the HDDMA controller with the 10 megabyte drive .ti -8 m16boot Boot from the HDDMA controller with the 16 megabyte drive .in -8 These are CP/M programs, ie, they are stored on the CP/M diskette as djboot.com, hdboot.com, etc, and are invoked from CP/M by typing the name without the .com extension. In each case, they assume that the target disk contains a Micronix file system, and they search its root directory for files that could be Micronix kcuted. For example .nf t: Give me your answer true. a: if (m: y) { t: Oh, Joy! t: ... } else if (m: n) t: Oh, Woe! else t: Eh? .fi An .bd else goes with the last un-elsed .bd if. .sp .in -5 .bd while (condition) statement; .sp .in +5 The statement is executed repeatedly as long as the condition remains true (possibly zero times as the condition is always tested before the statement is executed.) The condition may not be left out. For an infinite loop, see .bd repeat below. .br .sp .in , ernels. If exactly one such file is found, it is loaded and executed. If more than one kernel is found, the names are listed and the operator is asked choose one. This allows backup copies or alternate versions to be kept. CP/M's only role in this process is the invocation of the bootstrap program. Once the bootstrap begins executing, it is independent of CP/M, and CP/M itself is overwritten as Micronix is loaded. CP/M can be eliminated entirely by placing the desired bootstrap program on the "system tracd (chdir = 12) .br .bd sys; chdir; dirname .sp 2 .in -5 .bd RETURNS .in +5 .br The carry flag is cleared on success, or set on failure. ks" of a floppy disk. Then as long as that diskette is in drive A, Micronix will boot automatically from the appropriate hard disk every time the Decision's RESET button is hit. This should save the operator about 5 seconds per day. (CAUTION: if Micronix is already running, make sure you type sync before hitting RESET.) The loaders that can be placed on a floppy's system tracks are stored as files on the Micronix CP/M diskette, and are called hdload, m5load, m10load, and m16load, corresponding to the simil.he "chmod (2) 3/18/82 chmod (2)" .fo " -#-" .rm 65 .in 5 .bd NAME .in +5 .bd chmod - change mode of file .sp 2 .in -5 .bd C .in +5 .br chmod(name, mode) .br char *name; .sp 2 .in -5 .bd FUNCTION .in +5 .br The mode of the file is set as indicated. Only the owner of a file, or the super-user, may change the mode. Modes are constructed by ORing together some combination of the following (octal) values: .in +8 .nf .bd 8 4000 Set user id on execution 2000 Set group id on arly-named bootstrap programs. See below for an installation example. The djboot program has already been placed on the system tracks of the Micronix stand-alone floppy, so if you put this in drive A and hit RESET, it will boot automatically. .ti -6 .bd EXAMPLES .nf SCREEN COMMENTS DISPLAY To boot the Micronix stand-alone floppy: Make sure the diskette is write-enabled Insert the diskette into drive A Hit RESET Machine responds FFFF Machine types :, you type b :b Loader takes over DJDMA execution 1000 Currently ignored 0400 Read by owner 0200 Write by owner 0100 Execute (or search directory) by owner 0070 Read, write, execute (search) by group 0007 Read, write, execute (search) by others .in -8 .fi When a file with the set-user-id flag is executed, the effective user ID of the process is set to the owner of the file. (In this way, for instance, a spelling program could use a secret dictionary.) For security reasons, whenever a file is opened for writing, its set-id flags are clearloader ... To boot Micronix from the m5: Insert the Micronix CP/M diskette in drive A Hit RESET Machine responds FFFF Machine types :, you type b :b CP/M announces itself Morrow Designs CP/M Type m5boot A> m5boot Loader takes over HDDMA loader ... To prepare an auto-boot floppy for the m5: Insert the Micronix CP/M diskette in drive A Hit RESET Machine responds FFFF Machine types : you type b :b CP/M announces itself Morrow Designs CP/M Type formatdj. Follow the A> formatdj instructionsed. .sp 2 .in -5 .bd RETURNS .in +5 .br A 0 indicates success, a -1 indicates failure. .sp 2 .in -5 .bd ASSEMBLER .in +5 .br .bd (chmod = 15) .br .bd sys; chmod; name; mode .sp 2 .in -5 .bd RETURNS .in +5 .br The carry flag is cleared on success, or set on failure.  to format a new diskette. 512 byte sectors are recommended. Type sysgen m5load A> sysgen m5load Type an A Destination drive? A Insert the formatted Insert a write diskette in drive A enabled diskette and hit RETURN. in drive A The diskette is ready to use Function complete... To use the m5 auto-boot: Insert the auto-boot diskette in drive A Hit RESET Machine responds FFFF Machine types :, you type b :b Loader takes over HDDMA loader ... .ti -6 .bd BUGS .fi The bootstrap programs o.he "chown (2) 3/18/82 chown (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd chown - change owner and group of a file .sp 2 .in -5 .bd C .in +5 .br chown(name, owner) .br char *name; .sp 2 .in -5 .bd FUNCTION .in +5 .br The owner of the file is changed to the low byte of "owner", and the group is changed to the high byte. Only the super-user may execute this call. .sp 2 .in -5 .bd RETURNS .in +5 .br A 0 indicates success, a -1 indicates failure. .sp 2 .in -5 .bdnly search the first block of the root directory, so you should limit your root directory to 32 entries (which is a good idea anyway, to speed up rooted file-name searches), or else you should make sure that the Micronix kernel occurs as one of the first 32 entries.  ASSEMBLER .in +5 .br .bd (chown = 16) .br .bd sys; chown; name; owner .sp 2 .in -5 .bd RETURNS .in +5 .br The carry flag is cleared on success, or set on failure. {...zchdir.2ychmod.2xchown.2wclose.2vcreat.2ucsw.2tdup.2sexit.2rfork.2qfstat.2getpid.2gtty.2indir.2mknod.2mount.2sync.2time.2access.2break.2exec.2getuid.2kill.2link.2open.2pipe.2read.2seek.2setuid.2signal.2sleep.2.he "close (2) 3/18/82 close (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd close - close a file .sp 2 .in -5 .bd C .in +5 .br close(descriptor) .sp 2 .in -5 .bd FUNCTION .in +5 .br Given a file descriptor previously returned by .bd open, creat, or .bd pipe, close closes the associated file. A close of all files is automatic on .bd exit, but since processes are limited to 16 simultaneously open files, .bd close () may be necessary for programs that deal with many fi.he "chdir (2) 3/19/82 chdir (2)" .fo " -#-" .rm 65 .in 5 .bd NAME .in +5 .br .bd chdir - change working directory .in -5 .bd C .in +5 .br chdir(dirname) .br char *dirname; .sp 2 .in -5 .bd FUNCTION .in +5 .br The working directory of the current process is changed to the given directory. The user must have search (execute) permission on the directory. .sp 2 .in -5 .bd RETURNS .in +5 .br A 0 is returned on success, a -1 on failure. .sp 2 .in -5 .bd ASSEMBLER .in +5 .br .b- les. .sp 2 .in -5 .bd RETURNS .in +5 .br A 0 indicates success, a -1 indicates failure. .sp 2 .in -5 .bd ASSEMBLER .in +5 .br .bd (close = 6) .br .bd (file descriptor in hl) .br .bd sys; close .sp 2 .in -5 .bd RETURNS .in +5 .br The carry flag is cleared on success, or set on failure. .in -5 .bd ASSEMBLER .in +5 .br .bd (dup = 41) .br (old descriptor in hl) .br .bd sys; dup .br (new descriptor in hl) .sp 2 .in -5 .bd RETURNS .in +5 .br On success, the carry flag is cleared and the new descriptor is returned in register hl. On failure, the carry flag is set. .he "creat (2) 3/18/82 creat (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd creat - create a new file (or truncate an old one) .sp 2 .in -5 .bd C .in +5 .br creat(name, mode) .br char *name; .sp 2 .in -5 .bd FUNCTION .in +5 .br If the file does not exist, and if the parent directory is writable, it is created with the given mode. If the file does exist and is writable, it is truncated to 0 length, and its mode and owner remain unchanged. In either case, the file is o.he "exit (2) 3/19/82 exit (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd exit - terminate this process .in -5 .bd C .in +5 .br exit(status) .in -5 .bd FUNCTION .in +5 .fi .bd Exit closes all open files, terminates the calling process, and notifies the parent process (if it is executing a wait). The low byte of status is available to the parent (via wait). .nf .in -5 .bd RETURNS .in +5 .fi This call can never return. .in -5 .bd ASSEMBLER pened for writing only, and a file descriptor is returned. See .bd chmod (2) for the construction of modes. Note that the file is opened for writing, even if the given mode does not allow writing. This can be used as a locking mechanism, in that another program will not be able to create the same file. .bd Creat is subject to the limit of 16 open files per process. .sp 2 .in -5 .bd RETURNS .in +5 .br .bd Creat() returns a file descriptor (a small, positive number) on success, or a -1 on failure. .sp 2 ..in +5 .br .bd (exit = 1) .br .bd (status in hl) .br .bd sys; exit .in -5 .bd RETURNS .in +5 .fi None. in -5 .bd ASSEMBLER .in +5 .br .bd (creat = 8) .br .bd sys; creat; name; mode .br .bd (file descriptor in hl) .sp 2 .in -5 .bd RETURNS .in +5 .br The carry flag is cleared on success, or set on failure. If successful, a file descriptor is returned in hl. .he "fork (2) 3/19/82 fork (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd fork - create a new process .in -5 .bd C .in +5 .br fork() .in -5 .bd FUNCTION .in +5 .br .bd Fork is the only way to create a new process. The calling process splits into a "parent" and a "child". The child's core image is a copy of the parent's, open files are shared, and signals remain unchanged. .bd Fork() returns a zero to the child process, while it returns a non-zer.he "csw (2) 3/19/82 csw (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd csw - read the console switches .sp 2 .in -5 .bd C .in +5 .br getcsw() .sp 2 .in -5 .bd FUNCTION .in +5 .br The setting of the console switches is returned. .sp 2 .in -5 .bd RETURNS .in +5 .br The setting of the console switches is returned. .sp 2 .in -5 .bd ASSEMBLER .in +5 .br .bd (csw = 38) .br .bd sys; csw .br .bd (switch setting in hl) .sp 2 .in -5 .bd RETURNS .in +5 .br The switch settingo number to the parent. This is the process ID of the child, and is used by .bd wait (2) and .bd kill (2). .in -5 .bd RETURNS .in +5 .br .bd Fork() returns a zero to the child, and the non-zero process ID of the child to the parent. A return of -1 (not just negative) indicates a temporary lack of process space. .in -5 .bd ASSEMBLER .in +5 .br .bd (fork = 2) .br .bd sys; fork .br .bd (child return) .br .bd (+ 3 bytes) .br .bd (parent return) (child id in hl) .in -5 .bd RETURNS .in +5 .br The child pro is returned in hl. cess returns to the location immediately following the fork. The parent skips three bytes before returning, and receives the child ID in hl. If a new process cannot be created, the carry flag is set on return to the parent (and the child return never happens). .he "dup (2) 3/19/82 dup (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd dup - duplicate a file descriptor .sp 2 .in -5 .bd C .in +5 .br dup(descriptor) .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Dup takes a file descriptor previously returned by .bd open, creat, or .bd pipe and allocates a new descriptor synonymous with the original. Subsequent reads or writes with the new descriptor will have exactly the same effect as the same call with the old.he "fstat (2) 3/19/82 fstat (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd fstat - get the status of an open file .in -5 .bd C .in +5 .br fstat(descriptor, buf) .br struct stat *buf; .in -5 .bd FUNCTION .in +5 .fi .bd Fstat is identical to .bd stat, except that it operates on open files (via the file descriptor) rather than on files given by name. This is often used to examine the status of the standard input and output, whose names are usually descriptor. Since the algorithm that allocates file descriptors returns the lowest available value, combinations of .bd dup and .bd close can be used to move file descriptors in a general way. This is used mostly for manipulating the standard input (file descriptor 0) and the standard output (file descriptor 1). .bd Dup is subject to the limit of 16 active file descriptors per process. .sp 2 .in -5 .bd RETURNS .in +5 .br .bd Dup() returns a file descriptor (positive) if successful, or a -1 if not. .sp 2 .  unknown. Buf is the address of a 36 byte buffer, into which the following information is placed: .nf .bd 15 struct stat { char minor, /* minor device */ major; /* major device */ int inumber, /* inode number */ flags; /* see below */ char nlinks, /* number of links */ uid, /* user id of owner */ gid, /* group id of owner */ size0; /* high byte of size */ int size1, /* low word of size */ sddr[8]; /* block numbers */ long actime, /* time of last access */ modtime; /* " last modification */gram without waiting for a full line to be typed, there is no erase or kill processing, and there is no recognition of any special control characters. In cooked mode, the following control characters are recognized: .in +4 .nf .bd 6 ^D end-of-file (when typed alone on a line) ^\ send a quit signal to this tty's processes DEL send an interrupt signal to same ^B send a background signal to same ESC freeze the output from this tty ^S same as ESC .in -4 .fi Note that even while the tty is in raw mode, the }; The flags are as follows (values in octal): .nf .bd 15 100000 inode is allocated 060000 2-bit file type 000000 plain file 040000 directory 020000 character-special file 060000 block-special file 010000 large file 004000 set user-id on execution 002000 set group-id on execution 001000 one writer only 000400 read (owner) 000200 write (owner) 000100 execute or search directory (owner) 000070 read, write, execute (group) 000007 read, write, execute (others) .fi The one- other modes still have an effect. In cr->lf mode, input crs are turned into lfs, and output crs or lfs are turned into cr-lfs. In echo mode, input is echoed immediately. If the mode is also raw, it is echoed exactly as typed; otherwise, the special control characters are not echoed, the kill character is echoed as itself plus a newline, and the erase character is echoed as backspace-space-backspace. In expand-tabs mode, tabs are output as the number of spaces needed to bring the cursor to the next 0-modwriter-only bit allows the file to be open for writing in at most one process at a time. .in -5 .bd RETURNS .in +5 .fi A 0 indicates success, a -1 indicates failure (bad file descriptor). .in -5 .bd ASSEMBLER .in +5 .br .bd (fstat = 28) .br .bd (file descriptor in hl) .br .bd sys; fstat; buf .in -5 .bd RETURNS .in +5 .br The carry flag is cleared on success, or set on failure. On success, the status is placed in the 36-byte area pointed at by buf. -8 column. .in -5 .bd RETURNS .in +5 .br A 0 indicates success, a -1 indicates failure. On success, the status is placed in the 6-byte structure pointed at by vec. .bp .in -5 .bd ASSEMBLER .in +5 .br .bd (gtty = 32) .br .bd (file descriptor in hl) .br .bd sys; gtty; vec .in -5 .bd RETURNS .in +5 .br The carry flag is cleared on success, or set on failure. On success, the status is placed in the 6-byte area pointed at by vec. .he "getpid (2) 3/19/82 getpid (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd getpid - get process ID .in -5 .bd C .in +5 .br getpid() .in -5 .bd FUNCTION .in +5 .br .bd Getpid returns the process ID of the current process. This is the same ID that is used by the .bd fork, kill, and .bd wait system calls. .in -5 .bd RETURNS .in +5 .br .bd Getpid returns the process ID. .in -5 .bd ASSEMBLER .in +5 .br .bd (getpid = 20) .br .bd sys; getpid .br .he "indir (2) 3/19/82 indir (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd indir - indirect system call .in -5 .bd ASSEMBLER .in +5 .br .bd (indir = 0) .br .bd sys; indir; syscall .in -5 .bd FUNCTION .in +5 .br The system call at the location syscall is executed. Execution resumes after the .bd indir call. The main purpose of .bd indir is to allow programs to construct system calls in their data segments, avoiding modifications to their code. The.bd (id in hl) .in -5 .bd RETURNS .in +5 .br .bd Getpid returns the process ID in hl.  system call at syscall must begin with the "sys" byte. An .bd indir executed indirectly is a no-op. .in -5 .bd RETURNS .in +5 .br The returns depend on the indirectly executed call. .he "gtty (2) 3/19/82 gtty (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd gtty - get typewriter status .in -5 .bd C .in +5 .br .nf gtty(descriptor, vec) struct { char ispeed, /* input speed */ ospeed, /* output speed */ erase, /* erase character */ kill; /* kill character */ int mode; /* see below */ } *vec; .fi .in -5 .bd FUNCTION .in +5 .br .bd Gtty gets the status of the terminal associated with the file descriptor, and writes.he "mknod (2) 3/19/82 mknod (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd mknod - make a directory or special file .sp 2 .in -5 .bd C .in +5 mknod(name, mode, addr) char *name; .in -5 .bd FUNCTION .in +5 .fi .bd Mknod creates a new file. Unlike .bd creat, it may be used to create directories and special files; it does not truncate or open files. The mode of the new file (including the file type bits) is taken from the mode argu the status into the 6-byte structure pointed at by vec. (This structure is the same as that passed by .bd stty. ) Actually, this call may be made to any character device, but devices that do not like it may return an error. .bd Ispeed and ospeed are one of: .nf .in +4 .bd 16 0 1200 baud 1 50 baud 2 75 baud 3 110 baud 4 134.5 baud 5 150 baud 6 200 baud 7 300 baud 8 600 baud 9 1200 baud 10 1800 baud 11 2400 baud 12 4800 baud 13 9600 baud 14 1ment, and the first address is taken from addr. For directories, this address should be 0, while for special files it should be the device number. This call is restricted to the super-user. .in -5 .bd RETURNS .in +5 .br A 0 indicates success, a -1 indicates failure. .in -5 .bd ASSEMBLER .in +5 .br .bd (mknod = 14) .br .bd sys; mknod; name; mode; addr .in -5 .bd RETURNS .in +5 .br The carry flag is cleared on success, or set on failure. 9200 baud 15 1200 baud .in -4 .fi The next two characters specify the erase and kill characters, respectively. (The defaults are ^H and ^X). .bp The mode specifies what services are performed by the system on input and output. Currently, these are: .nf .in +4 .bd 5 0100000 Use the RS-232 clear-to-send line 040000 Keep all 8 bits of input data 0040 Raw input 0020 Cr -> lf mapping 0010 Echo input 0002 Expand tabs .in -4 .fi In raw mode, all characters are passed immediately to the pro/ .he "mount (2) 3/19/82 mount (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd mount - mount a file system .in -5 .bd C .in +5 .br .bd mount(device, on, ronly) .bd .br char *device, *on; .in -5 .bd FUNCTION .in +5 .br .bd Mount informs the system that the given block device contains a file system. Subsequent references to the file "on" will refer to the root directory of the new file system. The old contents of "on" are inaccessible until the devi .ul sum of any of the following: .nf .in +8 .bd 3 4 read 2 write 1 execute .in -8 .in -5 .bd RETURNS .in +5 .fi .br .bd Access returns a 0 if permission is granted, -1 if not. .sp 2 .in -5 .bd ASSEMBLER .in +5 .br .bd (access = 33) .br .bd sys; access; name; mode .sp 2 .in -5 .bd RETURNS .in +5 .br .bd Access returns with the error bit clear if the permissions are granted, or with the error bit set if they are not. ce is unmounted. If ronly is non-zero, the system will not allow writing on the device. If the device is physically write protected, it should still be mounted read-only to prevent the system from trying to update access times. This call is restricted to the super-user. There is a limit to the number of devices that can be mounted concurrently. .in -5 .bd RETURNS .in +5 .br A 0 indicates success, a -1 indicates failure. .in -5 .bd ASSEMBLER .in +5 .br .bd (mount = 21) .br .bd sys; mount; device; on; r.he "break (2) 3/18/82 break (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd break, brk, sbrk - change core allocation .sp 2 .in -5 .bd C .in +5 .br char * brk(addr) .br char * sbrk(addr) .sp 2 .in -5 .bd FUNCTION .in +5 .fi .br .bd Brk sets the system's idea of the lowest memory location not used by the program (called the "break") to addr (which may be rounded up to suit memory management hardware). The old break is returned. Locations greater than or equal to the break only .in -5 .bd RETURNS .in +5 .br The carry flag is cleared on success, or set on failure. and less than the stack pointer are not in the address space of the program. These locations may be overwritten by the system, and may cause memory faults if accessed. The system will refuse to set the break above the stack pointer, but a program is free to move its stack pointer below the break. .bd Sbrk adds incr more bytes to the program's data space and returns a pointer to the start of the new area. When a program begins execution via .bd exec (2), its break is set to the top of its program and data .he "sync (2) 3/19/82 sync (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd sync - update the disks .in -5 .bd C .in +5 .br sync() .in -5 .bd FUNCTION .in +5 .br .bd Sync causes all information in core memory that should be on disk to be written out. This includes modified super-blocks, modified inodes, and delayed block I/O. .in -5 .bd RETURNS .in +5 .br No information is returned. .bd Sync always succeeds. .in -5 .bd ASSEMBLER .in +5 .br .bstorage areas. Thus, only programs that must dynamically allocate data space need to use these calls. .sp 2 .in -5 .bd RETURNS .in +5 .br The old break is returned on success. A -1 is returned if the request would require more memory than the system limit, or if it would move the break across the stack pointer. .sp 2 .in -5 .bd ASSEMBLER .in +5 .br .bd (break = 17) .br .bd sys; break; addr .sp 2 .in -5 .bd RETURNS .in +5 .br Only success or failure is returned, by clearing or setting the carry flag, respecd (sync = 36) .br .bd sys; sync .in -5 .bd RETURNS .in +5 .br No error indication is returned. tively. .he "time (2) 3/19/82 time (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd time - get date and time .in -5 .bd C .in +5 .br time(tp) .br long *tp; .in -5 .bd FUNCTION .in +5 .br .bd Time fills the long value pointed to by the argument with the number of seconds since 0:00 GMT January 1 1970. .in -5 .bd RETURNS .in +5 .br The user-supplied long integer is filled in. There are no error conditions. .in -5 .bd ASSEMBLER .in +5 .br .bd (time = .he "exec (2) 3/19/82 exec (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd exec - execute a program .sp 2 .in -5 .bd C .in +5 .br execv(name, argv) .br char *name; .br char *argv[]; execl(name, arg0, arg1, ..., argn, 0) .br char *name, *arg0, *arg1, ..., *argn; .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Exec overlays the calling core image with the named file, then transfers to the beginning of the new core image. There can be no return fr13) .br .bd sys; time .br .bd (time in hl-de) .in -5 .bd RETURNS .in +5 .br The time is returned with the high order word in hl and the low order word in de. There are no error conditions. om a successful .bd exec: the calling core image is lost. Exec does not create a new process - the same process continues with the new core image. Previously opened files remain open (so standard input and output are preserved), and ignored signals remain ignored. Caught signals, however, are reset to their default behavior. Each process has "real" user and group IDs and "effective" user and group IDs. The real IDs identify the user; the effective IDs determine the access privileges. If a file does not ha.he "access (2) 3/18/81 access (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd access - test file access permissions .sp 2 .in -5 .bd C .in +5 .br access(name, mode) .br char *name; .br int mode; .sp 2 .in -5 .bd FUNCTION .in +5 .br Permission to access the named file, in the specified mode, is tested. The test is based on the real user and group IDs, rather than the effective IDs, so that a set-user-id program may test the permissions of its invoker. Mode is the0 ve "set-user-id" or "set-group-id" mode [see .bd chmod, (2)], then .bd exec sets all IDs, real and effective, to the individual executing the file. If the file does have either mode, .bd exec sets the corresponding effective ID to the owner of the executed file. The real IDs remain unchanged. This allows a user to write a program that takes advantage of his own access privileges (rather than its invoker's privileges). In order to be executed, a file must have one of the execute permission bits set, even fot of string pointers. The last pointer must be 0. When the file starts execution, core is set up as follows: .nf .bd 9 (top of user core) argn: string\0 ... arg0: string\0 -1 argn ... arg0 sp -> argc .sp 2 .fi .in -5 .bd RETURNS .in +5 .br If .bd exec returns at all, the carry flag is set to indicate an error. r the super-user. The system expects one of two file formats. If the first byte is hex 99, then the first 16 bytes are taken to be a header with the following structure .nf .bp struct header { char ident, /* hex 99 */ conf; /* not used by exec */ unsigned tablsize, /* not used by exec */ textsize, /* bytes in text segment */ datasize, /* bytes in data segment */ bss_size, /* b.he "getuid (2) 3/25/82 getuid (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd getuid - get user IDs .in -5 .bd C .in +5 .br getuid() .in -5 .bd FUNCTION .in +5 .br .bd Getuid returns the real user IDs of the current process. The real group ID is in the high byte of the returned word. The real user ID is in the low byte. (The real IDs identify the individual, while the effective IDs determine his current access privileges. See the .bd exec and .bd chmodytes in bss segment */ heapsize, /* minimum stack + heap */ textoff, /* text segment offset */ dataoff; /* data segment offset */ }; .sp .fi (This header structure is produced by Whitesmith's compilers.) The rest of the file is assumed to contain textsize bytes of text, followed by datasize bytes of data. Text is loaded at address textoff, data is loaded at address dataoff, and bss space is allocated following the data. The break is system calls for a discussion.) .in -5 .bd RETURNS .in +5 .br .bd Getuid returns the real user IDs: .br high byte = group ID, low byte = user ID. .in -5 .bd ASSEMBLER .in +5 .br .bd (getuid = 24) .br .bd sys; getuid .br .bd (IDs in hl) .in -5 .bd RETURNS .in +5 .br .bd Getuid returns the real process IDs: .br .bd high byte = group ID, low byte = user ID.  set at the highest location in the text or data + bss segments. If the first byte of the file is not hex 99, then the file is taken to be pure object code origined at address 256 (100 hex). The brake is set to the file size. In any case, the program must meet the maximum-size restriction (currently 65024 bytes), and it must keep a "halt" instruction (the system-call trap) at address 8. (This is supplied by the system, unless the text offset is <= 8.) C offers two different interfaces to .bd exec. Execl.he "kill (2) 3/19/82 kill (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd kill - signal a process .in -5 .bd C .in +5 .br kill(pid, sig) .in -5 .bd FUNCTION .in +5 .br .bd Kill sends the signal, sig, to the process with the given ID. The usual effect is to kill the process - see .bd signal (2) for a discussion and a list of signals. The sending and receiving processes must have the same effective user IDs, or the sender must be the super-user. If is useful when a known file is being executed with known arguments. The arguments are all string pointers. Any number of arguments may be given, but the last must be a 0. When the number of arguments is not known in advance, .bd execv is handy. Pointers to the argument strings are collected into a list, a null pointer is appended to mark the end of the list, and .bd execv is called with the address of the list. Currently, the total number of bytes in the argument strings (including the terminating nulls) the given process ID is 0, then the signal is sent to all other processes with the same controlling tty. A process can never kill itself. .in -5 .bd RETURNS .in +5 .br A 0 indicates success, a -1 indicates failure. .in -5 .bd ASSEMBLER .in +5 .br .bd (kill = 37) .br .bd (process ID in hl) .br .bd sys; kill; sig .in -5 .bd RETURNS .in +5 .br The carry flag is cleared on success, or set on failure.  is limited to 512. It is conventional to repeat the name of the file being executed as the first argument, so that programs can use the name with which they are invoked. .bp When a C program is executed, it begins as follows: .bd main(argc, argv) .in +8 .br .bd int argc; .br .bd char **argv; .in -8 where .bd argc is the argument count, and .bd argv is a list of pointers to the argument strings themselves. Conventionally, .bd argc is at least 1 and .bd argv[0] is the program name. As delivered by the sy.he "link (2) 3/19/82 link (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd link - link to a file .in -5 .bd C .in +5 .br link(old, new) .br char *old, *new; .in -5 .bd FUNCTION .in +5 .fi A link to "old" is created, with the name "new". Either name may be an arbitrary pathname. "New" must not already exist, its directory must be writable, and it must be on the same device as "old". "Old" must not be a directory (unless the user is the super-user), and must not have more than 254 links. .nf .in -5 .bd RETURNS .in +5 .fi A 0 indicates success, a -1 indicates failure. .in -5 .bd ASSEMBLER .in +5 .br .bd (link = 9) .br .bd sys; link; old; new .in -5 .bd RETURNS .in +5 .br The carry flag is cleared on success, or set on failure. stem, argv[argc] == -1, so that .bd argv cannot be used directly in another .bd execv until .bd argv[argc] is set to 0. .sp 2 .in -5 .bd RETURNS .in +5 .br Any return is an error return. In that case, the calling image is not lost and can continue. Possible errors include: the file cannot be found, is not an ordinary file, is not executable, is too big, or the argument list is too long. .sp 2 .in -5 .bd ASSEMBLER .in +5 .br .bd (exec = 11) .br .bd sys; exec; name; argv .bp .bd Argv is the address of a lis1 .he "open (2) 3/19/82 open (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd open - open a file for reading or writing .in -5 .bd C .in +5 .br .bd open(name, mode) .br .bd char *name; .in -5 .bd FUNCTION .in +5 .br The named file is opened for .nf .in +4 .bd 3 reading (mode 0), writing (mode 1), or both (mode 2). .in -4 .fi The returned file descriptor should be saved for subsequent calls to .bd read, .bd write, and .bd close. There is a li.he "seek (2) 3/19/82 seek (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd seek - move read/write pointer .in -5 .bd C .in +5 .br seek(descriptor, offset, from) .in -5 .bd FUNCTION .in +5 .br Each open file has an associated read/write pointer. .bd Seek moves this pointer as follows: .in +2 .ti -2 - If .bd from is 0, the pointer is set to offset. .sp .ti -2 - If .bd from is 1, the pointer is set to its current location plus offset. .spmit of 16 open files per process. .nf .in -5 .bd RETURNS .in +5 .fi A non-negative return indicates success, a -1 indicates failure. On success, a file descriptor (small non-negative number) is returned. .in -5 .bd ASSEMBLER .in +5 .br .bd (open = 5) .br .bd sys; open; name; mode .br .bd (file descriptor in hl) .in -5 .bd RETURNS .in +5 .br The carry flag is cleared on success, or set on failure. On success, a file descriptor is returned in hl.  .ti -2 - If .bd from is 2, the pointer is set to the size of the file plus offset. .sp .ti -2 - If .bd from is 3, 4, or 5, the meaning is the same as for 0, 1, or 2, except that offset is multiplied by 512. .sp .ti -2 - If .bd from is 0 or 3, offset is treated as signed. Otherwise it is unsigned. .sp .in -2 .nf .ce .bd IN SUMMARY: .ta 8 .bd 6 Byte Block seeks seeks Motion is relative to 0 3 Beginning of file (unsigned) 1 4 Curr.he "pipe (2) 3/19/82 pipe (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd pipe - create an inter-process channel .in -5 .bd C .in +5 .br .bd pipe(descriptor) .br .bd int descriptor[2]; .br .bd (read descriptor = descriptor[0]) .br .bd (write descriptor = descriptor[1]) .in -5 .bd FUNCTION .in +5 .br .bd Pipe returns two file descriptors that can be used to communicate between processes created by subsequent .bd fork calls. When the pipe isent location (signed) 2 5 End of file (signed) .fi .bd Seeks are not allowed on pipes, but are allowed on character devices, although most such devices ignore them. Seeking far past the end of a file and writing will create a "hole" in the file that occupies no space. Reading the hole will allocate zero-filled space. .in -5 .bd RETURNS .in +5 .br A 0 indicates success, a -1 indicates failure. .bp .in -5 .bd ASSEMBLER .in +5 .br .bd (seek = 19) .br .bd (descriptor in hl) .br .bd sys; seek; offset; from  written using descriptor[1], up to 4096 bytes of data will be buffered before the writing process is suspended. A read using descriptor[0] will pick up the data. Read calls on an empty pipe with no writers will return an end-of-file (i.e., 0 bytes read). Write calls under similar conditions will generate a signal. .in -5 .bd RETURNS .in +5 .br A 0 indicates success, a -1 indicates failure. .in -5 .bd ASSEMBLER .in +5 .br .bd (pipe = 42) .br .bd sys; pipe .br .bd (read descriptor in hl) .br .bd (write  .in -5 .bd RETURNS .in +5 .br The carry flag is cleared on success, or set on failure. descriptor in de) .in -5 .bd RETURNS .in +5 .br The carry flag is cleared on success, or set on failure. .he "setuid (2) 3/19/82 setuid (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd setuid - set process user IDs .in -5 .bd C .in +5 .br setuid(uid) .in -5 .bd FUNCTION .in +5 .br This call sets the real group and user IDs and the effective group and user IDs. The group IDs are set to the high byte of the argument, and the user IDs are set to the low byte. This call can be used to set the effective IDs to the real IDs. Only the super-user is permi.he "read (2) 3/19/82 read (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd read - read a file .in -5 .bd C .in +5 .br .bd read(descriptor, buffer, nbytes) .br .bd char buffer[]; .in -5 .bd FUNCTION .in +5 .br A file descriptor is a word returned from a successful .bd open, creat, dup, or .bd pipe call. Buffer is a memory location where at most nbytes of data will be placed. The number of bytes actually read is returned. This may well be less thantted to change the real IDs. .in -5 .bd RETURNS .in +5 .br A 0 indicates success, a -1 indicates failure. .in -5 .bd ASSEMBLER .in +5 .br .bd (setuid = 23) .br .bd (uid in hl) .br .bd sys; setuid; .in -5 .bd RETURNS .in +5 .br The carry flag is cleared on success, or set on failure.  nbytes; a read on a terminal, for example, will return at most one line. If the value 0 is returned, then the file has been exhausted. .in -5 .bd RETURNS .in +5 .br A - 1 indicates an error. A return of 0 indicates end-of-file. Any other value indicates a successful read of that many bytes. .in -5 .bd ASSEMBLER .in +5 .br .bd (read = 3) .br .bd (file descriptor in hl) .br .bd sys; read; buffer; nbytes .br .bd (number of bytes read in hl) .in -5 .bd RETURNS .in +5 .br The carry flag is cleared on suc.he "setuid (2) 3/19/82 setuid (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd signal - set disposition of signals .in -5 .bd C .in +5 .br signal(sig, func) .br int (*func)(); .in -5 .bd FUNCTION .in +5 .br A signal is a means of notifying a process of some external event. A signal can be sent from the system (in response to an attempt to execute an illegal instruction, for example), from a terminal (to abort a process), or at the request of another prcess, or set on failure. 2 ocess (via the .bd kill system call). Normally, a signal causes termination of the receiving process, but this call allows the process either to ignore it or to "catch" it via an interrupt to a specified location. There are 15 signals: .nf .in +4 .bd 15 1 -- (hangup) 2 interrupt (caused by typing DEL) 3 quit (caused by typing control \) * 4 illegal instruction * 5 -- (trace trap) 6 background (caused by typing control b) 7 record available at terminal ** 8 -- (floating point excep.he "stat (2) 3/19/82 stat (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd stat - get the status of a named file .in -5 .bd C .in +5 .nf .br stat(name, buf) char *name; struct stat *buf; .fi .in -5 .bd FUNCTION .in +5 .br .bd Stat is identical to .bd fstat, except that it operates on named files rather than open-file descriptors. Buf is the address of a 36 byte buffer, into which the following information is placed: .nf .bd 15 struct stat { ction) 9 kill (cannot be caught or ignored) 10 -- (bus error) 11 -- (memory fault) 12 bad argument to a system call * 13 write to a pipe with no one to read it 14 -- (alarm clock) 15 terminate (catchable kill) .sp .fi .bd * causes a core dump unless caught or ignored .sp .bd ** not reset when caught .in -4 .fi Signals marked "--" are not currently sent by the system. (The Unix V6 descriptions are given). A "func" of 0 tells the system to institute the default action for the given signal. Fhar minor, /* minor device */ major; /* major device */ int inumber, /* inode number */ flags; /* see below */ char nlinks, /* number of links */ uid, /* user id of owner */ gid, /* group id of owner */ size0; /* high byte of size */ int size1, /* low word of size */ addr[8]; /* block numbers */ long actime, /* time of last access */ modtime; /* " last modification */ }; The flags are as follows (values in octal): .bd 15 100000 inode is allocated 060000 2-bit file type 000000 plaor all signals but 6 and 7, this means process termination on receipt of the signal. For signal 6, the default action is to put the process into the "background" (all further signals, except 9, will be ignored, and reads on a terminal will return eof). For signal 7, the default action is to ignore the signal. .bp If "func" is 1, the signal will be ignored. If "func" is any value greater than 1, then it is taken as an address, and receipt of the signal will cause an interrupt to that address. Except as notedin file 040000 directory 020000 character-special file 060000 block-special file 010000 large file 004000 set user-id on execution 002000 set group-id on execution 001000 one writer only 000400 read (owner) 000200 write (owner) 000100 execute or search directory (owner) 000070 read, write, execute (group) 000007 read, write, execute (others) .fi The one-writer-only bit allows the file to be open for writing in no more than one process at a time. It is not necessary to have read , a signal is reset to 0 after being caught. So in general, the catching routine must issue another signal call if it wants to continue catching the signal. If a signal is caught during a slow system call (read or write to a terminal, .bd sleep , or .bd wait ), the call will terminate prematurely and return an error (number EINTR - see the Introduction). After a fork, the child inherits all signal dispositions. .bd Exec passes on all default and ignore dispositions, but resets all caught signals to defaulpermission on the file, but all directories leading to the file must be searchable. .in -5 .bd RETURNS .in +5 .br A 0 indicates success, a -1 indicates failure. .in -5 .bd ASSEMBLER .in +5 .br .bd (stat = 18) .br .bd stat; name; buf .in -5 .bd RETURNS .in +5 .br The carry flag is cleared on success, or set on failure. On success, the status is placed in the 36-byte area pointed at by buf. t action. .in -5 .bd RETURNS .in +5 .br The return value is the old signal disposition. A 0 indicates success, a -1 indicates failure (signal number out of range). .in -5 .bd ASSEMBLER .in +5 .br .bd (signal = 48) .br .bd sys; signal; sig; func; .br .bd (old value in r0) .in -5 .bd RETURNS .in +5 .br The carry flag is cleared on success, or set on failure. .he "stime (2) 3/19/82 stime (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd stime - set date and time .in -5 .bd C .in +5 .br stime(time) .br long * time; .in -5 .bd FUNCTION .in +5 .br .bd Stime sets the system's idea of the date and time. The argument is the number of seconds since 0:00 GMT, January 1, 1970. Only the super-user may make this call. .in -5 .bd RETURNS .in +5 .br A 0 indicates success, a -1 indicates failure (not super-user). .i.he "sleep (2) 3/19/82 sleep (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd sleep - stop execution for an interval .in -5 .bd C .in +5 .br sleep(seconds) .in -5 .bd FUNCTION .in +5 .br The calling process is suspended for at least the given number of seconds. .in -5 .bd RETURNS .in +5 .br The call returns after the given number of seconds. A 0 indicates success, a -1 indicates failure. The only cause of failure is an early return caused by a caun -5 .bd ASSEMBLER .in +5 .br .bd (stime = 25) .br .bd (time in hl-de: hl = high word, de = low word) .br .bd sys; stime .in -5 .bd RETURNS .in +5 .fi The carry flag is cleared on success, or set on failure. ght signal. .in -5 .bd ASSEMBLER .in +5 .br .bd sleep = 35) .br .bd (seconds in hl) .br .bd sys; sleep .in -5 .bd RETURNS .in +5 .br The carry flag is cleared on success, or set on failure. The only cause of failure is an early return caused by a caught signal. .he "stty (2) 3/19/82 stty (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd stty - set typewriter status .in -5 .bd C .in +5 .bd 10 stty(descriptor, vec) .br struct .nf { char ispeed, /* input speed */ ospeed, /* output speed */ erase, /* erase character */ kill; /* kill character */ int mode; /* see below */ } *vec; .in -5 .bd FUNCTION .in +5 .fi .bd Stty sets the status of the terminal associated with the file descriptor. The statstat.2stime.2stty.2umount.2unlink.2wait.2write.2Intro.2nice.23 us is taken from a 6-byte structure pointed at by vec. This structure is the same as that obtained by .bd gtty. Actually, this call may be made to any character device, but devices that do not like it may return an error. .bd Ispeed and .bd ospeed are one of: .nf .in +4 .sp .bd 16 0 1200 baud 1 50 baud 2 75 baud 3 110 baud 4 134.5 baud 5 150 baud 6 200 baud 7 300 baud 8 600 baud 9 1200 baud 10 1800 baud 11 2400 baud 12 4800 baud 13 9600 baud 1s last directory entry has disappeared. In order to unlink a file, a user must have write permission on its directory. Write permission is not required on the file itself. Only the super-user can unlink a directory. .in -5 .bd RETURNS .in +5 .br A 0 indicates success, a -1 indicates failure. .in -5 .bd ASSEMBLER .in +5 .br .bd (unlink = 10) .br .bd sys; unlink; name .in -5 .bd RETURNS .in +5 .br The carry flag is cleared on success, or set on failure. 4 19200 baud 15 1200 baud .in -4 .fi The next two characters specify the erase and kill characters, respectively. The mode specifies what services are performed by the system on input and output. Currently, these are: .nf .bp .in +4 .bd 5 0100000 Use the RS-232 clear-to-send line 040000 Keep all 8 bits of input data 0040 Raw input 0020 Cr -> lf mapping 0010 Echo input 0002 Expand tabs .in -4 .fi In raw mode, all characters are passed immediately to the program without waiting for .he "wait (2) 3/19/82 wait (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd wait - wait for a process to terminate .in -5 .bd C .in +5 .br wait(pstat) .br int *pstat; .in -5 .bd FUNCTION .in +5 .br This call waits for the termination of any of the caller's children. If any child has died since the last wait, return is immediate. If there are no children, an error is returned. If there are several children, several wait calls are necessary to learn a full line to be typed, there is no erase or kill processing, and there is no recognition of any special control characters. In cooked mode, the following control characters are recognized: .in +4 .nf .bd 6 ^D end-of-file (when typed alone on a line) ^\ send a quit signal to this tty's processes DEL send an interrupt signal to same ^B send a background signal to same ESC freeze the output from this tty ^S same as ESC .in -4 .fi Note that even while the tty is in raw mode, the other modes still have aof all the deaths. Wait returns the process ID of the terminated child, and fills in the user-supplied integer with the termination status. In the case of a normal termination via .bd exit, the low byte of the status is 0, and the high byte is the low byte of the child's exit argument. In the case of a signal-caused termination, the low byte of the status is the signal number, and the high byte is the child's l register. If a parent process terminates without waiting for its children, the initialization n effect. In cr->lf mode, input crs are turned into lfs, and output crs or lfs are turned into cr-lfs. In echo mode, input is echoed immediately. If the mode is also raw, it is echoed exactly as typed; otherwise, the special control characters are not echoed, the kill character is echoed as itself plus a newline, and the erase character is echoed as backspace-space-backspace. In expand-tabs mode, tabs are output as the number of spaces needed to bring the cursor to the next 0-mod-8 column. .in -5 .bd Rprocess (process id = 1) inherits the children. .in -5 .bd RETURNS .in +5 .br A positive number indicates success, a -1 indicates failure (no children). On success, the pointed-to status is filled in with the child's termination status, and the child's process ID is returned. .in -5 .bd ASSEMBLER .in +5 .br .bd (wait = 7) .br .bd sys; wait .br .bd (process id in hl) .br .bd (status in de) .in -5 .bd RETURNS .in +5 .br The carry flag is cleared on success, or set on failure (no children). On success, ETURNS .in +5 .br A 0 indicates success, a -1 indicates failure (file descriptor does not refer to a character device). .in -5 .bd ASSEMBLER .in +5 .br .bd (stty = 31) .br .bd (file descriptor in hl) .br .bd sys; stty; vec .in -5 .bd RETURNS .in +5 .br The carry flag is cleared on success, or set on failure. the child's process ID is returned in hl, and its termination status is returned in de. .he "umount (2) 3/19/82 umount (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd umount - dismount a file system .in -5 .bd C .in +5 .br umount(device) .br char *device; .in -5 .bd FUNCTION .in +5 .br .bd Umount tells the system that the given special file should no longer be treated as a file system. The file on which the device was mounted reverts to its ordinary interpretation. .bd Umount will return an error if there are still any active file.he "write (2) 3/19/82 write (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd write - write to a file .in -5 .bd C .in +5 .br write(descriptor, buf, nbytes) .br char *buf; .in -5 .bd FUNCTION .in +5 .br This call writes nbytes from the indicated buffer to the given open file. The number of bytes actually written is returned. Unlike the .bd read call, this number should be the same as requested; otherwise, an error is indicated. .in -5 .bd RETURNS s on the mounted system. This call is restricted to the super-user. .in -5 .bd RETURNS .in +5 .br A 0 indicates success, a -1 indicates failure. .in -5 .bd ASSEMBLER .in +5 .br .bd (umount = 22) .br .bd sys; umount; device .in -5 .bd RETURNS .in +5 .br The carry flag is cleared on success, or set on failure. .in +5 .br A -1 indicates an error (bad descriptor or physical IO error). Otherwise, the value nbytes is returned. .in -5 .bd ASSEMBLER .in +5 .br .bd (write = 4) .br .bd (descriptor in hl) .br .bd sys; write; buf; nbytes .in -5 .bd RETURNS .in +5 .br The carry flag is cleared on success, or set on failure. The number of characters actually written is returned in hl. .he "unlink (2) 3/19/82 unlink (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd unlink - remove a directory entry .in -5 .bd C .in +5 .br unlink(name) .br char *name; .in -5 .bd FUNCTION .in +5 .br .bd Unlink removes the indicated entry from its directory. If this was the last link to the file, the file is removed and its space is freed. If the file was open in any process, this removal is delayed until the file is closed, even though it4 .fo " -#-" .rm 65 .in 5 .bd INTRODUCTION TO SYSTEM CALLS This section of the manual lists all Micronix system calls. The syntax for these calls is in most cases identical with that for Unix Version 6 system calls, differing only in the assembly language register names. For most purposes, Section II of the Unix V6 Programmer's Manual can be used as a reference in place of this one. Call syntax for both C and assembly language is given. Familiarity with one of these languages is necessary to understand this section. Many system calls take a file name. This can be an arbitrary path name, of unlimited length, but it must be terminated by a 0-byte, and the calling process must have search permission on all directories in the path. An error during a system call never causes an automatic error message, but an error number is always available (see below), and the program can request a standard error message if it wants [see .bd perror (3)]. .ce .bd C System Calls The type of declarations gixecute an inappropriate file (such as a directory or special file), even though the user had execute permission on the file. .ti -5 .nf .bd 9 EBADF Bad file number .fi A file descriptor refers to no open file, or a read or write request is made to a file not opened for that activity. .ti -5 .nf .bd 10 ECHILD No children .fi There were no child processes to .bd wait for. .ti -5 .nf .bd 11 EAGAIN No more processes .fi .bd Fork found the system process table temporarily full. .ti -5 .nf .bd 12 ENOMEM Not even for system call arguments are not meant to be copied literally; they are simply indications of how the system will treat the arguments. A string, for example, is always acceptable in place of a .bd (char *) argument. When no declaration is given, an .bd int is expected. From C, an error is indicated by an otherwise impossible return value. This is usually -1; the individual sections specify the details. The error number is always left in the external variable, .bd errno. This variable is not clearenough core .fi During an .bd exec or .bd break, the program asked for more core than the system could supply. This is not a temporary condition: the maximum program size is a system parameter. .ti -5 .nf .bd 13 EACCES Permission denied .fi The user attempted a file access forbidden by the file's permission bits. .ti -5 .nf .bd 14 ESYS System error .fi The system has detected an "impossible" error, caused by corrupted disk, memory, or a system bug, but not yet severe enough to warrant a panic stop. This sd on successful calls, so that it remains available across message writes, etc. .ce .bd Assembly Language System Calls Syntax is given for A-Natural (Whitesmith's) assembly language. Translation to Intel or Zilog mneumonics is straightforward. For example, the .bd chmod system call in A-Natural is .ti +8 .bd sys; chmod; name; mode .bp In Intel assembly language, this looks like .in +8 .bd db sys .br .bd db chmod .br .bd dw name .br .bd dw mode .in -8 .sp 2 .fi The "sys" byte that begins each system hould be reported. .ti -5 .nf .bd 15 ENOTBLK Block device required .fi A plain file or a directory was given where a block device was required, (in .bd mount, for example). .ti -5 .nf .bd 16 EBUSY Device busy .fi An attempt was made to mount a device that was already mounted, to unmount a device on which there was an open file or a current directory, or to open a one-user-only device that is already busy. .bp .ti -5 .nf .bd 17 EEXIST File exists .fi The new file name passed to .bd link or .bd mknod is alrcall is a synonym for "restart 1". The names of the calls themselves are synonyms for 1-byte quantities that can be found in the individual sections, or by inspecting or including the files /include/an.h and /include/intel.h. Succeeding in-line arguments, if any, are always 2-byte quantities. A "name" argument is always a pointer to a null-terminated string. Registers are preserved across system calls, except for the error flag and error number (see below), and for any return values (see the individual seceady taken. .ti -5 .nf .bd 18 EXDEV Cross-device link .fi A link to a file on another device was attempted. .ti -5 .nf .bd 19 ENODEV No such device .fi An attempt was made to open a non-existent device. .ti -5 .nf .bd 20 ENOTDIR Not a directory .fi A non-directory was specified where a directory was required, as an intermediate component in a path name, for example, or as an argument to .bd chdir . .ti -5 .nf .bd 21 EISDIR Is a directory .fi An attempt was made to write on a directory. .ti -5 .nf .bd 2tions). For the sake of portability, however, it is unwise to depend on this. From assembly language, an error is always indicated by turning on the carry bit of the condition flags. Thus a system call can be followed by a jc (jump on carry) to handle an error return, or a jnc (jump on no carry) to handle an error-free return. The error number is returned in register hl. .ce .bd Error Numbers Following is a list of error numbers, their names in the system source code, the standard error message availabl2 EINVAL Invalid argument .fi An invalid argument was given to a system call: currently, unmounting a non-mounted device, mentioning an unknown signal in .bd signal, or invoking a non-existing system call. Ordinarily, the latter case generates a fatal signal; the error is returned only if the signal is caught or ignored. .ti -5 .nf .bd 23 ENFILE File table overflow .fi The system's table of open files is temporarily full. .ti -5 .nf .bd 24 EMFILE Too many open files .fi Only 16 files can be open per procee thru .bd perror, and a short explanation. .ta 5 .in +5 .ti -5 .nf .bd 0 (not used) .fi .ti -5 .nf .bd 1 EPERM Not super user .fi The current user was attempting something reserved for the super-user. .ti -5 .nf .bd 2 ENOENT No such file or directory .fi The last component of a path name does not exist. .ti -5 .nf .bd 3 ESRCH No such process .fi The process whose number was given to .bd signal does not exist, or is already dead. .ti -5 .nf .bd 4 EINTR Interrupted system call .fi A slow system call (sss .ti -5 .nf .bd 25 ENOTTY Not a typewriter .fi The file mentioned to .bd stty or .bd gtty is not a typewriter or other character-device. .ti -5 .nf .bd 26 ETXTBSY Text file busy .fi Not currently used. .ti -5 .nf .bd 27 EFBIG File too big .fi The user attempted to extend a file beyond the maximum size of 2^24 bytes. .ti -5 .nf .bd 28 ENOSPC No space left on device .fi The disk's free space has been exhausted. .ti -5 .nf .bd 29 ESPIPE Illegal seek .fi A seek was issued to a pipe. .ti -5 .nf .bd 30 ERuch as read or write on a tty, but never on a disk) was interrupted by a caught signal. .bp .ti -5 .nf .bd 5 EIO I/O error .fi A physical I/O error occurred during a read or write. .ti -5 .nf .bd 6 ENXIO No such device or address .fi An I/O call was made to a non-existent device, or beyond the limits of the device. .ti -5 .nf .bd 7 E2BIG Arg list too long .fi A call to .bd exec was made with an argument list longer than 512 bytes. .ti -5 .nf .bd 8 ENOEXEC Exec format error .fi An attempt was made to e5 OFS Read-only file system .fi An attempt was made to write to a device mounted read-only. .bp .ti -5 .nf .bd 31 EMLINK Too many links .fi The program attempted to make a 256th link to a file. .ti -5 .nf .bd 32 EPIPE Broken pipe .fi The program wrote on a pipe that had no reader. Ordinarily this generates a fatal signal; the error is returned if the signal is caught or ignored. ed by .bd alloc is overrun, or if a random number is given to .bd free. A NULL pointer (0) is returned by .bd alloc, realloc and .bd calloc if no memory is available, or if a corrupt arena is detected that was caused by storage outside the bounds of a block. If user wishes to recompile the .bd alloc routine to rigidly check the arena during every transaction, he/she is referred to the source code. .sp 2 .in -5 .bd NOTES .in +5 .br The block pointed to by .bd ptr may be destroyed if .bd realloc returns a .he "nice (2) 7/19/82 nice (2)" .fo " -#-" .in 5 .rm 65 .bd NAME .in +5 .br .bd nice - set process priority .in -5 .bd C .in +5 .br nice(arg) .in -5 .bd FUNCTION .in +5 .br The "nice" of a process is the opposite of its intuitive "priority" -- the "nicer" it is, the less cpu time it hogs. This systen entry sets the nice of the calling process to the given argument. Nice values range from -128 to 127; the normal value is 0. Only the super-user can set a n0.egative nice (== high priority). Long running background programs should be run at a positive nice as a favor to other users. A process' nice is passed to its children via the .bd fork system call. .in -5 .bd RETURNS .in +5 .br A 0 indicates success, a -1 indicates failure. .in -5 .bd ASSEMBLER .in +5 .br .bd (nice = 34) .br .bd (nice value in hl) .br .bd sys; nice; .in -5 .bd RETURNS .in +5 .br The carry flag is cleared on success, or set on failure. .he "ctime (3) 3/22/82 ctime (3)" .fo " -#-" .in 5 .rm 65 .bd SUBROUTINE(S) .in +5 .br .bd ctime, localtime, gmtime, asctime, timezone - convert time and date to ASCII .sp 2 .in -5 .bd C .in +5 .br .bd 2 char *ctime(clock) .br long *clock .sp .bd #include .sp .bd 2 struct tm *localtime(clock) .br long *clock; .sp .bd 2 struct tm *gmtime(clock) .br long *clock; .sp .bd 2 char *asctime(tm) .br struct tm *tm; .sp .bd ...alloc.3ctime.3fclose.3ferror.3fopen.3fread.3fseek.3getpwent.3gets.3putc.3puts.3scanf.3setbuf.3stdio.3system.3ttyname.3floor.3perror.3popen.3printf.3char *timezone(zone,dst) .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Ctime converts a time pointed to by .bd clock [as returned by .bd time (2)] into ASCII. It returns a pointer to a 26-character string in the following form: .sp 2 .ce .bd Wed Mar 10 12:12:59 1982\n\0 .sp All fields have constant width. .sp 2 .bd Localtime and .bd gmtime return pointers to structures containing the broken-down time. .bd Localtime corrects for the time zone and daylight savings time, if necessary. .bd Gmtime converts .he "alloc (3) 3/22/82 alloc (3)" .fo " -#-" .in 5 .rm 65 .bd SUBROUTINE(S) .in +5 .br .bd alloc, free, realloc, calloc - main memory allocator .sp 2 .in -5 .bd C .in +5 .br .bd 2 char *alloc(size) .br unsigned size; .sp .bd 2 free(ptr) .br char *ptr; .sp .bd 3 char *realloc(ptr, size) .br char *ptr; .br unsigned size; .sp .bd 2 char *calloc(nelem, elsize) .br unsigned nelem, elsize; .sp 2 .in -5 .bd FUNCTIONS .in +5 .br The routines .bd alto Greenwich Mean Time - the time that Micronix uses. .bd Asctime converts broken-down time to ASCII and returns a 26-character string. .sp The .bd include file structure declaration follows: .bp .nf .in +8 .bd 11 struct tm { /* see ctime(3) */ int tm_sec; int tm_min; int tm_hour int tm_mday; int tm_mon; int tm_year; int tm_wday; int tm_yday; int tm_isdst; }; .in -8 .sp 2 .fi The time is given using the following elements: .sp .in +8 - 24 hour clock .br - day of month, 1-31 days per month .br - loc and .bd free provide an easy-to-use memory allocation package. The .bd alloc routine returns a pointer to a block of at least .bd size bytes long, which begins on a word boundary. The argument to .bd free is a pointer to a block allocated previously by .bd alloc. This block is available for further allocation; its contents are left undisturbed. .bd Alloc allocates the first large reach of free space it finds in its circular search from the last allocated or freed block, uniting neighboring free blocmonth of year, numbered 0-11 .br - day of the week, numbered 0-6 .br - date of the year, beginning 1900 - .br - day of the year, 0-365 .br - non-zero flag indicates daylight savings .sp 2 .in -8 The program checks the system to determine if time zone and/or daylight savings time adjustments are appropriate whenever the local time is called for. (Adjustments for changes in these conversions in 1974 and 1975 are included.) .bd Timezone returns the time zone, measured in minutes westward from Greenwich, ks as it searches. If no additional space is free, .bd alloc calls .bd sbrk (see section 2) for more system memory. Block sizes pointed to by .bd ptr are changed by .bd realloc to .bd size bytes. It may also return a pointer to a block, if the block i removed Th valus o th ne an ol bloc sizes determine the changes in block content; the contents remain unchanged up to the lesser value of the old and new sizes. .bd Alloc contains a valuable search function which may be used to do storage cassociated with its first argument. If the second argument is 0, the standard name is used. A non-zero flag indicates daylight savings time. A table is built into the routine. If the required name does not appear on this table, the difference from GMT is produced. In Afghanistan, for example: .sp .ce .bd timezone(-60*4+30), 0) .sp would be appropriate because it is eastward of GMT +4:30. The string .bd GMT+4:30 is produced. .sp 2 .in -5 .bd ERRORS .in +5 .br The return values point to static data whoompaction. .bd Realloc works if .bd ptr points to a block that has been freed since the last call of .bd alloc, realloc or calloc. Compounding sequences of .bd free, alloc and realloc thereby augments .bd alloc's search strategy for storage compaction. Allocation of space for an array of .bd nelem elements of .bd elsize size is done by .bd calloc. Each of these routines returns a pointer to a space aligned for any type of storage. .sp 2 .in -5 .bd ERRORS .in +5 .br Note that chaos results if space assign6 se content is overwritten by each call. .sp 2 .in -5 .bd ALSO READ .in +5 .br time (2)nal value of .bd stream is closed. This routine may also be used to attach preopened constant names - .bd stdin, stdout, stderr, - to specified files. .bd Fdopen associates a stream with a file descriptor obtained from .bd creat, dup, open or .bd pipe (see section 2). The .bd type of the stream must agree with the mode of the open file. .bp .in -5 .bd NOTES .in +5 .br If .bd filename cannot be accessed, .bd fopen and .bd freopen return the NULL pointer. .sp 2 .in -5 .bd ALSO READ .in +5 .br open (2), f.he "fclose (3s) 3/22/82 fclose (3s)" .fo " -#-" .in 5 .rm 65 .bd SUBROUTINE(S) .in +5 .br .bd fclose, fflush - close or flush a stream .sp 2 .in -5 .bd C .in +5 .br .bd #include .sp .bd 2 fclose(stream) .br FILE *stream; .sp .bd 2 fflush(stream) .br FILE *stream; .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Fclose causes any buffers for the named .bd stream to be emptied and the file to be closed. Buffers allocated by the close (3)standard I/O system are freed. This function is performed automatically by calling .bd exit (2). .bd Fflush causes any buffered data for the named output .bd stream to be written to that file. The stream file remains open. .sp 2 .in -5 .bd ERRORS .in +5 .br These routines return an .bd EOF if .bd stream is not associated with an output file, or if buffered data cannot be transferred to that file. .sp 2 .in -5 .bd ALSO READ .in +5 .br close (2), fopen (3), setbuf (3) .he "fread (3s) 3/22/82 fread (3s)" .fo " -#-" .in 5 .rm 65 .bd SUBROUTINE(S) .in +5 .bd fread, fwrite - buffered binary I/O .sp 2 .in -5 .bd C .in +5 .br .bd #include .sp .bd 2 fread(ptr, sizeof(*ptr), nitems, stream) .br FILE *stream; .sp .bd 2 fwrite(ptr, sizeof(*ptr), nitems, stream) .br FILE *stream; .sp 2 .in -5 .bd DESCRIPTION .in +5 .br .bd Fread reads .bd nitems of .bd *ptr data from the named input stream into a block be.he "ferror (3s) 3/22/82 ferror (3s) .fo " -#-" .in 5 .rm 65 .bd SUBROUTINE(S) .in +5 .br .bd feof, ferror, clearerr, fileno - stream status inquiries .sp 2 .in -5 .bd C .in +5 .br .bd #include .sp .bd 2 feof(stream) .br FILE *stream; .sp .bd 2 ferror(stream) .br FILE *stream .sp .bd 2 clearerr(stream) .br FILE *stream .sp .bd 2 fileno(stream) .br FILE *stream .sp 2 .in -5 .bd FUNCTION .in +5 .br The following functions arginning at .bd ptr. The return is the number of items actually read. The standard output is line buffered if .bd stream is .bd stdin; any partial output line is flushed before any call to .bd read (see section 2) to satisfy the .bd fread call. .bd Fwrite appends .bd nitems (maximum) of data to the named output stream. Data is of the type .bd *ptr beginning at .bd ptr. It returns the actual number of items written. .sp 2 .in -5 .bd DIAGNOSTICS .in +5 .br A 0 is returned by .bd fread and .bd fwrite upone implemented as macros and cannot be redeclared: .bd Feof returns a non-zero when an end of file is read on the named input stream; otherwise a zero is returned. .bd Ferror returns a non-zero when an error occurs while reading or writing the named .bd stream. Error must be cleared by .bd clearerr or the error indication lasts until the stream is closed. A zero is returned if no error occurs. .bd Fileno returns an integer file descriptor associated with .bd stream [see .bd open (2)]. .sp 2 .in -5 .bd error or at end of file. .sp 2 .in -5 .bd ALSO READ .in +5 .br rea (2) writ (2) fope (3) get (3) put (3) put (3) print (3) and scanf (3).  ALSO READ .in +5 .br fopen (3), open (2).he "fseek (3s) 3/22/82 fseek (3s)" .fo " -#-" .in 5 .rm 65 .bd SUBROUTINE(S) .in +5 .br .bd fseek, ftell, rewind - reposition a stream .sp 2 .in -5 .bd C .in +5 .br .bd #include .sp .bd 3 fseek(stream, offset, ptrname) .br FILE *stream; .br long offset; .sp .bd 2 long ftell(stream) .br FILE *stream; .sp .bd rewind(stream) .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Fseek sets the position of the next input or output operat.he "fopen (3s) 3/22/82 fopen (3s)" .fo " -#-" .in 5 .rm 65 .bd SUBROUTINE(S) .in +5 .br .bd fopen, freopen, fdopen - open a stream .sp 2 .in -5 .bd C .in +5 .br .bd #include .sp .bd 2 FILE *fopen(filename, type) .br char *filename, *type; .sp .bd 3 FILE freopen(filename, type, stream) .br char *filename, *type; .br FILE *stream; .sp .bd 2 FILE *fdopen(fildes, type) .br char *type; .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Fopen oion on .bd stream. This new position is at the signed distance, which is .bd offset byte fro th beginnin o th file th curren position o a th en o th file, determined by whether .bd ptrname has a value of 0, 1 or 2. This routine also undoes any effects of the .bd unget routine. .bd Ftell returns the current value of the offset relative to the beginning of the file associated with the named .bd stream. This routine provides the only foolproof way to obtain an .bd offset for .bd fseek. pens the file specified by "filename" and associates it with a stream. It returns a pointer to be used to identify the stream in subsequent operations. .sp .bd Type is a character containing one of the following values: .sp .in +8 .bd a - append; begin new writing, or begin at end .nf of current writing. .sp .fi .bd r - open for reading .sp .bd w - create for writing .sp 2 .in -8 .bd Freopen substitutes the named file in place of an open stream; it returns the original value of .bd stream. The origi7 Rewind(stream) = fseek(stream, 0l, 0). .sp 2 .in -5 .bd ERRORS .in +5 .br A -1 is returned by .bd fseek for improper seeks. .sp 2 .in -5 .bd ALSO READ .in +5 .br lseek (2), fopen (3) .he "putc (3s) 3/23/82 putc (3s)" .fo " -#-" .in 5 .rm 65 .bd PROGRAM(S) .in +5 .br .bd puts, putchar, fputc, putw - put character or word on a stream .sp 2 .in -5 .bd C .in +5 .br .bd #include .sp .bd 3 int putc(c, stream) .br char c; .br FILE *stream; .sp .bd putchar(c) .sp .bd 2 fputc(c, stream) .br FILE *stream; .sp .bd 2 putw(w stream) .br FILE *stream; .sp 2 .in -5 .bd FUNCTIONS .in +5 .br .bd Putc appends .bd c (character).he "getpwent (3) 3/22/82 getpwent (3)" .fo " -#-" .in 5 .rm 65 .bd SUBROUTINE(S) .in +5 .br .bd getpwent, getpwuid, getpwnam, setpwent, endpwent - get password file entry .sp 2 .in -5 .bd C .in +5 .br .bd #include .sp .bd struct passwd *getpwent() .sp .bd 2 struct passwd *getpwuid(uid) .br int uid; .sp .bd 2 struct passwd *getpwnam(name) .br char *name; .sp .bd int setpwent() .sp .bd int endpwent() .sp 2 .in -5 .bd DESCRIPTIONS .in +5 . to .bd stream, the named output; it returns the character written. .bd Putchar(c) is the same as .bd putc(c, stdout). .bd Fputc acts the same as .bd putc but is a function rather than a macro. It can be used to save object text. .bd Putw appends .bd w (word) to output .bd stream and returns the word written. It does not assume or cause special alignment in the file. .bd Stdout (standard stream) is only buffered if the output refers to something other than a terminal (default). .bd Setbuf (3) changbr Each of the "get" routines - .bd getpwent, getpwuid and .bd getpwnam - each return a pointer to an object with the following structure: .sp .in +8 .nf .bd 7 struct passwd { char *name *passwd, unsigned char uid, gid; char *person, *dir, *shell; } .sp .fi .in -8 Eac pointe contain th broken-ou field o lin i th passwor file Two fields, .bd pw_quota and .bd pw_comment, are unused. All the other fields have es the default. .bd Stderr (also a standard stream) is unbuffered unconditionally (default). .bd Freopen [see .bd fopen (3)] causes it to become buffered; again, .bd setbuf changes the default. Unbuffered output streams appear on the destination file or terminal as soon as they are written. Buffered output streams save up characters and write them as a block. Blocks may be forced out prematurely with .bd fflush [see .bd fclose (3)]. .sp 2 .in -5 .bd ERRORS .in +5 .br These functions return the end of fmeanings which are described in .bd passwd (5). Routine Functions: .sp .in +5 .bd getpwent - reads the next line in the file; it will open the file, if necessary. .sp .bd setpwent - rewinds the file .sp .bd endpwent - closes the file .sp .bd getpwuid - searches from the beginning of the file until a matching user ID is found, or until an end of file is encountered. .sp .bd getpwnam - searches from the beginning of the file until a matching name is found, or until an end of file is encountered. .sp 2 .in 0 ile constant upon error. .bd Ferror (3) should be used to detect .bd putw errors. Errors may occur some time after the initial call to .bd putc. .sp 2 .in -5 .bd NOTES .in +5 .br Since .bd putc is implemented as a macro, it treats a .bd stream argument improperly. Specifically, .ce .bd putc(c, *f++); does not work sensibly. .sp 2 .in -5 .bd ALSO READ .in +5 .br fopen (3), fclose (3), getc (3), puts (3), printf (3), fread (3).in 5 .bd ERRORS .in +5 .br A zero (NULL pointer) is returned upon an error or at end of file. .sp 2 .in -5 .bd NOTES .in +5 .br All information to be saved should be copied since it is contained only in a temporary area. .sp 2 .in -5 .bd FILES .in +5 .br /etc/passwd .sp 2 .in -5 .bd ALSO READ .in +5 .br getlogin (3), passwd (5) .he "puts (3s) 3/24/82 puts (3s)" .fo " -#-" .in 5 .rm 65 .bd SUBROUTINE(S) .in +5 .br .bd puts, fputs - put a string on a stream .sp 2 .in -5 .bd C .in +5 .br .bd #include .sp .bd 2 puts(s) .br char *s; .sp .bd 3 fputs(s, stream) .br char *s; .br FILE *stream; .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Puts copies .bd s (null-terminated string) to .bd stdout, the standard output stream. It also appends a newline character. .bd F.he "gets (3s) 3/22/82 gets (3s)" .fo " -#-" .in 5 .rm 65 .bd SUBROUTINE(S) .in +5 .br .bd gets, fgets - get a string from a stream .sp 2 .in -5 .bd C .in +5 .br .bd #include .sp .bd 2 char *gets(s) .br char *s; .sp .bd 3 char *fgets(s, n, stream) .br FILE *stream; .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Gets reads a string into .bd s from the standard input stream, .bd stdin. A newline character terminates the string. This chputs copies .bd s to the named output, .bd stream. Neither of these routines copies the terminal NULL character. .sp 2 .in -5 .bd NOTES .in +5 .br To maintain backward compatibility, .bd puts appends a newline, .bd fputs does not. .sp 2 .in -5 .bd ALSO READ .in +5 .br fope (3) get (3) put (3) print (3) ferro (3) fwrit i frea (3)aracter is replaced in .bd s by a NULL character; .bd gets returns its argument. .bd Fgets reads .bd n-1 characters (or up to a newline character) from the .bd stream into the .bd s string NULL characte follow th las characte rea into .bd s; fgets returns its first argument. .sp 2 .in -5 .bd ERRORS .in +5 .br Both .bd gets and .bd fgets return the constant pointer (NULL) upon an error or at end of file. .sp 2 .in -5 .bd NOTES .in +5 .br To maintain backward compatibility, .bd fgets maintains a .he "scanf (3s) 3/24/82 scanf (3s)" .fo " -#-" .in 5 .rm 65 .bd SUBROUTINE(S) .in +5 .br .bd scanf, fscanf, sscanf - formatted input conversion .sp 2 .in -5 .bd C .in +5 .br .bd #include .sp .bd 2 scanf(format [, pointer]...) .br char *format; .sp .bd 3 fscanf(stream, format [, pointer]...) .br FILE *stream; .br char *format; .sp .bd 2 sscanf(s, format [, pointer]...) .br char *s, *format; .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Scnewline, .bd gets deletes a newline. .sp 2 .in -5 .bd ALSO READ .in +5 .br puts (3), getc (3), scanf (3), fread (3), ferror (3)8 anf reads from .bd stdin, the standard input stream. .bd Fscanf reads from the named input, .bd stream. .bd Sscanf reads from the .bd s character string. Each of these functions read and interpret characters according to a format, then store the results in its argument. A control string .bd format and a set of .bd pointer arguments indicating where the converted input is stored are arguments expected by these routines. These are described below. .sp 2 .in +4 Blanks, tabs or newlines, which match optiobd e and .bd f conversion characters may also be capitalized or preceded by .bd l to indicate a pointer to .bd double rather than .bd float. .bd Scanf returns the number of input items successfully matched and assigned. This may also be used to decide how many items were actually found. The constant end of file is returned upon end of input. This is different fro 0 whic ma b interprete t mea n conversio wa done I conversion was intended, it was frustrated by an inappropriate character in tnal white space in the input. Any ordinary character besides % that must match the next character of the input stream. Optional conversion specifications, which consist of an assignment suppressing character (*), maximum field width number, a conversion character and the % character. .in -4 The control string usually contains conversion specifications that direct interpretation of the next input field. Unless assignment suppression was indicated (using the * character), the result is placed in the variahe input. As an example: .sp .in +8 .bd 2 int i; float x; char name[50]; .br scanf("%d%f%s", &i, &x, name); .sp .in -8 with the input .sp .in +8 .bd 25 54.32E-1 McCleary .sp .in -8 assigns to .bd i the value 25, .bd x the value 5.432. Name contains "mccleary\0". Another example: .sp .in +8 .bd 2 int i; float x; char name[50]; .br scanf("%2d%f%*d%[1234567890]", &i, &x, name .sp .in -8 with the input .sp .in +8 .bd 56789 0123 56a72 .sp .in -8 assigns 56 to .bd i, 789.0 to .bd x, skips "0123" and places theble pointed to by the corresponding argument. An input field is a string of non-space characters. The field extends to the next inappropriate character, or until the field width (if specified) is exhausted. The interpretation of the input field is indicated by the conversion character. Corresponding pointer arguments are usually of a restricted type. A list and description of legal conversion characters follows: .sp 2 .in +4 .ti -1 .bd % .br A single percent sign (%) is expected. No assignment is done string "56\0" in .bd name. The next call to .bd getchar will return "a". .bp .in -5 .bd ERRORS .in +5 .br The success of matches and suppressed assignments can be determined only indirectly. .sp 2 .in -5 .bd NOTES .in +5 .br In cases of missing or illegal data, .bd scanf returns an end of file on end of input. .sp 2 .in -5 .bd ALSO READ .in +5 .br atof (3), getc (3), printf (3) . .sp .ti -1 .bd d .br Decimal integer is expected. Corresponding argument should be integer pointer. .sp .ti -1 .bd o .br Octal integer expected. Corresponding argument should be integer pointer. .sp .ti -1 .bd x .br Hexadecima intege expected Correspondin argumen shoul b intege pointer. .sp .ti -1 .bd s .br Character string expected. Corresponding argument should be a character pointer pointing to an array of characters. Array must be large enough to accept string and terminating "\0" charact.he "setbuf (3s) 3/24/82 setbuf (3s)" .fo " -#-" .in 5 .rm 65 .bd SUBROUTINE(S) .in +5 .br .bd setbuf - assign buffering to a stream .sp 2 .in -5 .bd C .in +5 .br .bd #include .sp .bd 3 setbuf(stream, buf) .br FILE *stream; .br char *buf; .sp 2 .in -5 FUNCTION .in +5 .br .bd Setbuf is used after a stream is opened, but before it is read or written to cause the .bd buf character array to be used instead of an automatically allocated buer that will be added. A space character or newline terminates the input field. .sp .ti -1 .bd c .br Character expected. Corresponding argument should be a character pointer. The normal skip-over-space characters are suppressed. Use "%ls" to read the next non-space character. Corresponding argument should refer to a character array and indicate number of characters read if a field width is given. .sp .ti -1 .bd e, f .br Floating point number is expected. Next field is converted and stored through thffer. If .bd buf is NULL (constant pointer), I/O is completely unbuffered. Size of array is determined by a the constant, BUFSIZ. An example: .sp .ce .bd char buf[BUFSIZ]; .sp A buffer is obtained from .bd alloc (3) upon the first .bd getc or .bd putc on the file. One exception is when the standard output is directed to a terminal, in which case it is line buffered. Normally, output streams directed to terminals and .bd stderr (standard error stream) are not buffered. When standard output is line bue corresponding argument which should be a pointer to a .bd float. The format for floating point numbers is an optionally signed string of digits that may contain a decimal point followed by an optional exponent field consisting of E (or e), followed by an optionally signed integer. .bp .ti -1 .bd [ .br Left bracket indicates a string not to be delimited by space characters. The string is defined by characters followed by a right bracket. A .bd ^ as the first character after the left bracket defines the iffered, it is flushed by .bd read (2) each time data is read from the standard input. .sp 2 .in -5 .bd ERRORS .in +5 .br By default, the standard error stream should be line buffered. .sp 2 .in -5 .bd ALSO READ .in +5 .br fopen (3), getc (3), putc (3), alloc (3) nput field as all characters in the set of characters following the .bd ^ sign Absenc o thi sign mean th inpu fiel i al th character withi the brackets. Corresponding argument must point to a character array. .sp 2 .in -4 The conversion characters .bd d, o and .bd x may be either capitalized or preceded by an .bd l to indicate that a pointer to .bd long rather than .bd int is in the argument list. If these are preceded by .bd h, indicates a pointer to .bd short rather than .bd int. The ..he "stdio (3s) 3/22/82 stdio (3s)" .fo " -#-" .in 5 .rm 65 .bd SUBROUTINES .in +5 .br .bd stdio - standard buffered I/O package .sp 2 .in -5 .bd C .in +5 .br .bd #include .sp .bd FILE *stdin; .br .bd FILE *stdout; .bd .br FILE *stderr; .sp 2 .in -5 .bd FUNCTION .in +5 .br This section describes two levels of buffered input/output utilities: 1) in-line macros designated by (3), and 2) higher level standard I/O utilitie)*+,-./02349 s designated by (3s) or (3m). The in-line macros, .bd getc and .bd putc handle characters quickly. Routines such as .bd gets, fgets, printf, fprintf, fwrite, fread, puts and .bd scanf and .bd fscanf use the in-line macros; both levels may be freely intermixed. Files with this type of associated buffering are called .bd streams and are declared to be a pointer to a defined type .bd FILE. Fopen (3) has the ability to create descriptive data for streams. It returns a pointer to designate the stream in allcriptor is associated with a terminal; a 0 is returned if it isn't. .bd Ttyslot returns the number of the entry in the .bd ttys file (see Section 5) for the control terminal of the current process. .sp 2 .in -5 .bd ERRORS .in +5 .br .bd Ttyname returns a 0 (NULL pointer) if the file descriptor does not describe a terminal that exists in the "/dev" directory. .bd Ttyslot returns a 0 if the "/etc/ttys" directory is inaccessible, or if it can't determine the control terminal. .sp 2 .in -5 .bd NOTES .in +5 . further transactions. Normally, there are three open streams with constant pointers declared in the .bd include file associated with a standard open file: .sp .in +4 .bd stdin - standard input file .br .bd stdout - standard output file .br .bd stderr - standard error file .sp 2 .in -4 A constant "pointer" (NULL 0) designates no stream. .sp A intege constan (end of file, or EO -1 i returne upo erro b an intege function that deal with streams or upon end of file. Routines that use the I/Obr Return values point to static data whose content is overwritten by each call. .sp 2 .in -5 .bd FILES .in +5 .br /dev/* .br /etc/ttys .sp 2 .in -5 .bd ALSO READ .in +5 .br ??ioctl (2), ttys (5) package must have the header file with the pertinent macro definitions (). The .bd include file declares all functions and constants described in the sections designated by (3s); they need no further declaration. .bp The following constants and functions are used as macros: .sp .in +8 .bd feof ferror fileno getc getchar putc .in -8 .sp It is dangerous to redeclare these names. .sp 2 .in -5 .bd ERRORS .in +5 .br The .bd EOF value is consistently returned, indicating that a .bd FIL.he "floor (3m) 3/22/82 floor (3m)" .fo " -#-" .in 5 .rm 65 .bd SUBROUTINE(S) .in +5 .br .bd fabs, floor, ceil - absolute value and floor and ceiling functions .sp 2 .in -5 .bd C .in +5 .br .bd 2 double floor(x) .br double x; .sp .bd 2 double ceil(x) .br double x; .sp .bd 2 double fabs(x) .br double x; .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Fabs returns the absolute value .bd |x|. .bd Floor returns the largest integer not grE pointer has not been initialized with .bd fopen. Thi mean tha inpu o outpu ha bee attempte o a outpu o inpu stream, or that a .bd FILE pointer designates corrupt .bd FILE data. This use of the standard library has been changed to line buffer output to a terminal by default. It attempts to flush the output whenever a .bd read (se Sectio 2 fro th standar inpu i necessary I mos cases thi make th utilit mor efficient. Th action themselve shoul b transparen unleseater than .bd x. .bd Ceil returns the smallest integer not less than .bd x. .sp 2 .in -5 .bd ALSO READ .in +5 .br abs (3) it is used with programs which use standard I/O routines .ul and .bd read (2) to read from the standard input. When large amounts of computation are done after outputting part of a line to a terminal, it is necessary to .bd fflush (3) the standard output before continuing on so that the output appears. .sp 2 .in -5 .bd ALSO READ .in +5 .br close (2), open (2), read (2), write (2).he "perror (3) 3/23/82 perror (3)" .fo " -#-" .in 5 .rm 65 .bd SUBROUTINE(S) .in +5 .br .bd perror - system error messages .sp 2 .in -5 .bd C .in +5 .br .bd 2 perror(s) .br char *s; .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Perror displays error messages on the error file. These messages describe the last error encountered during a C program system call. The .bd s argument string is printed, followed by a colon, the .he "system (3) 3/24/82 system (3)" .fo " -#-" .in 5 .rm 65 .bd SUBROUTINE(S) .in +5 .br .bd system - issue a shell command .sp 2 .in -5 .bd C .in +5 .br .bd 2 system(string) .br char *string; .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd System causes .bd string to be given to .bd sh (see shell - Section 1) as input just as if the string had been typed as a command at a terminal. Current process waits until the shell has completed then returns tmessage and a newline. The argument string defines the name of the program in which the error occurred. The message is taken from .bd errno (see Introduction to Section 2), which is set when errors have occurred but have not been cleared. .sp 2 .in -5 .bd ALSO READ .in +5 .br Intro (2) he exit status of the shell. .sp 2 .in -5 .bd ERRORS .in +5 .br An exit status of 127 means the shell could not be executed. .sp 2 .in -5 .bd ALSO READ .in +5 .br popen (3), exec (2), wait (2).he "popen (3) 3/23/82 popen (3)" .fo " -#-" .in 5 .rm 65 .bd SUBROUTINE(S) .in +5 .br .bd popen, pclose - initiates I/O to/from a process .in -5 .bd C .in +5 .sp .bd # include .sp .bd 2 FILE *popen(command, type) .br char *command, *type; .sp .bd 2 pclose(stream) .br FILE *stream; .in -5 .bd FUNCTION .in +5 .br The arguments to .bd popen are pointers to null-terminated strings. These strings contain: 1) a shel.he "ttyname (3) 3/24/82 ttyname (3)" .fo " -#-" .in 5 .rm 65 .bd SUBROUTINE(S) .in +5 .br .bd ttyname, isatty, ttyslot - find name of a terminal .sp 2 .in -5 .bd C .in +5 .br .bd char *ttyname(fildes) .sp .bd isatty(fildes) .sp .bd ttyslot() .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Ttyname returns a pointer to the null-terminated path name of the terminal associated with .bd fildes, the file descriptor. .bd Isatty returns a 1 if the file des: l command line and 2) an I/O mode, either "r" for reading or "w" for writing. A pipe is created between the calling process and the command to be executed. The value returned is a stream pointe tha may b use t writ t th standar inpu o th comman o to rea fro it standar output. Streas opene b .bd pope are close b .bd pclos. Pclose wait fo th associate proces t terminat, then return th exi statu o th command. Since ope file ar shared the typ "r comman can dd Th precisio specificatio determine th amoun o "d"s precisio o 0 results in no digits; defaul is six digits. .sp 2 .ti -1 .bd e .br Float or double .bd arg is converted in the following format: .ce .bd [-]d.ddde+dd One digit before and one number after the decimal point equal the precision specification. By default, six digits are produced. .sp 2 .ti -1 .bd g .br Float or double .bd arg is printed in one of the formats listed above, depending upon which one specifies full precision in thb use a a inpu filter, the type "w" as an output filter. .in -5 .bd ERRORS .in +5 .br .bd Popen return (NUL pointer i th shel canno b accessed o i file o processe canno b created. .bd Pclose returns -1 if .bd stream is not associated with a command opened by .bd popen. .in -5 .bd NOTES .in +5 .br Filter input may be badly positioned if user attempts buffere readin befor openin a inpu filter Simila problem wit a outpu filte ma b prevented b flushine least amount of space. .bp .ti -1 .bd c .br Character .bd arg printed; NULL characters are ignored. .sp .ti -1 .bd s .br Character .bd arg is defined as a character pointer; string characters are printed up to a NULL character, or if specified, up to point indicated by the precision specification. .sp 2 .ti -1 .bd % .br Only the .bd % is printed; arguments are not converted. .sp 2 .in 0 .in 5 .bd NOTES .in +5 .br Small or non-existent fields do not cause truncation. Fields are padded when the specified g the buffe, i.e., using .bd fflush. [Se .bd fclose (3).] .in -5 .bd READ ALSO .in +5 .br pipe (2), fopen(3), fclose (3), system (3), wait (2)field exceeds the actual width. Fields larger than 128 characters will fail. .bd Putc (3) prints the characters generated by .bd printf. .sp 2 .in -5 .bd ALSO READ .in +5 .br putc (3), scanf (3), ecvt (3) .he "printf (3s) 3/22/82 printf (3s)" .fo " -#-" .in 5 .rm 65 .bd SUBROUTINE(S) .in +5 .br .bd printf, fprintf, sprintf - formatted output conversion .in -5 .bd C .in +5 .br .bd # include .sp .bd 2 printf(format [, arg]...) .br char *format; .sp .bd 3 fprintf(stream, format [, arg] ...) .br FILE *stream; .br char *format; .sp .bd 2 sprintf(s, format [, arg ] ...) .br char *s, format; .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd ...djdma.4multio.4null.4io.4hdca.4hddma.4mem.4Printf places output on .bd stdout - the standard output stream. .bd Fprintf places output on .bd stream - the named output. .bd Sprintf places output in the .bd s string. This string is followed by a "\0" character. These functions convert, format and print their arguments under the control of the first argument. This first argument will be a character string containing 1) plain characters that are copied to the output stream, and 2) conversion specifications which enable conversion and printing of th.he "djdma (4) 4/18/82 djdma (4)" .fo " -#-" .in 5 .rm 65 .bd DEVICE .br .in +5 .bd djdma - Morrow Designs' Disk Jockey Direct .nf Memory Access floppy disk controller .fi .in -5 .bd FUNCTION .in +5 .br The DJDMA provides access for up to eight 8 inch and/or 5 1/4 inch floppy disk drives (limited to four of each type). At present, there may be only one controller board per system. Diskettes used with MOS must be formatted. The next .bd printf argument. The conversion specifications are introduced by the .bd % character. The options listed below may follow this character: .sp 2 .in +4 A minus sign (-) specifying .ul left adjustment of the converted value in the indicated field. A string of digits specifying .ul field width. Converted values with fewer characters than the indicated field width may be blank-padded to make up the difference, unless the field width begins with a 0, in which case it will be zero-padded. A periode following formats are supported. They are listed with the number of blocks per disk (a block is 512 bytes). .nf Inches Format 8 - 128 byte sectors, single-sided, 487 blocks 8 - 128 byte sectors, double-sided, 975 blocks* 8 - 256 byte sectors, single-sided, 975 blocks 8 - 256 byte sectors, double-sided, 1950 blocks 8 - 512 byte sectors, single-sided, 1125 blocks 8 - 512 byte sectors, double-sided, 2250 blocks 8 - 1024 byte sectors, single-sided, 1200 blocks 8 - 1024 by (.) may separate the field width from the next string of digits. An additional digit string may be added specifying a .ul precision, or the number of digits that will appear after the decimal point. This is used for .bd -e and .bd -f conversions, or to specify the maximum number of characters to be printed from a string. [An asterisk (*) may indicate field width or precision, in which case an integer argument indicates the field width or precision.] A .bd 1 may be specified with .bd d, o, x, or .bdte sectors, double-sided, 2400 blocks 5 1/4 - 256 byte sectors, single-sided, 35 track, 160 blocks 5 1/4 - 512 byte sectors, single-sided, 35 track, 330 blocks 5 1/4 - 512 byte sectors, double-sided, 35 track, 660 blocks 5 1/4 - 512 byte sectors, single-sided, 40 track, 380 blocks 5 1/4 - 512 byte sectors, double-sided, 40 track, 760 blocks 5 1/4 - 512 byte sectors, single-sided, 80 track, 780 blocks 5 1/4 - 512 byte sectors, double-sided, 80 track, 1560 blocks * not recom u to indicate correspondence with a long integer argument. The same thing may be accomplished with a capitalized conversion code. An characte ma b give tha specifie th typ o conversio t b executed. .in -4 .sp 2 The conversion characters are listed and described below: .sp 2 .in +4 .ti -1 .bd dox .br Integer .bd arg is converted to decimal, octal or hexadecimal notation. .sp 2 .ti -1 .bd f .br Float or double .bd arg is converted to decimal notation in the following format: .ce .bd [-]ddd.d; mended .fi Note that because of reserved tracks (usually the first two), the available space is reduced slightly. All 8 inch formats are standard 77 track. While you gain approximately 7% in additional capacity with 1024 byte sectors on an 8 inch floppy diskette, the loss in transfer speed is considerable. The optimum choice for Micronix floppy diskettes is 512-bytes, single or double. The other formats are included for backward compatibility. Alternate sectoring is optional and available by selecting he unit of motion is 1/120" for horizontal motion and 1/48" for vertical motion. If you want to move farther than 31 increments, you must send a series of motion bytes. These are accumulated and optimized, then sent all at once. Note that this scheme allows elaborate high-level interface. Even several different interfaces, each with its own set of escape sequences or what have you, all translate to common Mult/IO parallel printer motion and print byte formats. the appropriate minor device number from the table below. (Alternate sectoring is recommended because it doubles the reading speed, but does not make much difference in writing speed.) Note that alternate and non-alternate sectored media are incompatible (i.e., the sectors appear scrambled). The .bd far utility (see Section 1) can read a CP/M formatted diskette under either alternate or straight sectoring, however. The minor device numbers correspond as follows: .nf 0 8" - drive 0 1 8" - dr.in 5 .rm 65 .he "null (4) 6/25/82 null (4)" .fo " -#-" .bd DEVICE .in +5 .br .bd null - the null device .sp 2 .in -5 .bd DESCRIPTION .in +5 .br The null device has the curious property that everything written to it is completely ignored and thrown away. Reading from this device yields an end of file every time. The minor device number is ignored. The major device number is zero in the current implementation. This device may seem to be ive 1 2 8" - drive 2 3 8" - drive 3 4 5 1/4" - drive 0 5 5 1/4" - drive 1 6 5 1/4" - drive 2 7 5 1/4" - drive 3 8 8" - drive 0 with alternate sectoring 9 8" - drive 1 with alternate sectoring 10 8" - drive 2 with alternate sectoring 11 8" - drive 3 with alternate sectoring 12 5 1/4" - drive 0 with alternate sectoring 13 5 1/4" - drive 1 with alternate sectoring 14 5 1/4" - drive 2 with alternate sectoring 15 5 1/4" - drive 3 with alternate sectoring .fi Note that there are 96-tracof limited usefulness, but don't get rid of it, the shell uses it to set up the standard input of background processes. .sp 2 .in -5 .bd EXAMPLE .in +5 .ti +5 .br cat file > /dev/null To read a file but discard the results. k 5 1/4" drives and 48-track 5 1/4" drives. For example, if you have only 48 track drives, you cannot .in 5 .rm 65 .he "io (4) 7/19/82 io (4)" .fo " -#-" .bd DEVICE .in +5 .bd io - Z80 I/O space device .sp 2 .in -5 .bd DESCRIPTION .br .in +5 Under a multi-user operating system, it is not acceptable to allow user programs to execute certain instructions in an unregulated way. The Z80 instructions "in" and "out" fall into this category. It is, however, desirable to be able to perform these operations in special circumstances. .he "multio (4) 3/16/82 multio (4)" .fo " -#-" .in 5 .rm 65 .bd DEVICE .in +5 .br .bd multio - Morrow Designs Mult/IO board interface .sp 2 .in -5 .bd FUNCTION .in +5 .br The Micronix .bd multio interface supports all features of the Mult/IO and Wunderbuss I/O boards. It will run unchanged in rack mount or table top models of the Decision I. The Mult/IO board has three ACEs (Asyncronous Communication Elements) and 1 parallel port foThe "io" device allows users to access the Z80 I/O ports through the file system. Reading from the device causes the results of "in" instructions to be transferred to the user's memory space. Writing to the device causes "out" instructions to be executed using the data in the user's memory space. Seeking on the device sets the I/O address for subsequent reading/inputting or writing/outputting. There are two classes of I/O device. One allows access to all of I/O space. The other allows access only to a sir I/O device connection. The ACEs communicate via standard RS232 serial interface. The parallel port is a standard Diablo (50-pin daisy-wheel) interface. Each Mult/IO board must have its I/O port addresses set by means of switches on the circuit board. For proper operation, the base I/O address must be 48 (hex) for the first Mult/IO board. In a Micronix system in which there are possibly many Mult/IO boards, the boards form a series. In the Decision I Table Top model, the Wunderbuss I/O motherboard fungle port. Note that it would be extremely easy to crash the system through this avenue, and it is therefore recommended that the "/dev/io" file be heavily protected, perhaps mode 0 and owned by root. Examples are in order: .sp .in +5 To input a value from port 10: .sp .nf .bd f = open ("/dev/io", 0); seek (f, 10, 0); read (f, &data, 1); .sp .in -5 .fi The operation of the I/O device is dependent on the minor device number of the special file associated with it. All 256 possible minor device numbersnctions as the first of the series. Micronix expects to find the Mult/IO boards (or Wunderbuss) as I/O (hex) locations 48, 58, 68, 78, 88,... Minor device numbers 0-3 refer to the Mult/IO board addresses at I/O location 48 hex. Minor device numbers 4-7 refer to the Mult/IO board addresses at location 58 hex, and so on with 68, 78 ... The first minor device number of each group of four refers to the parallel printer on that board. Minor device numbers 0, 4, 8, etc. refer to parallel printers. Bytes se (0 - 255) have meaning. When accessed through minor device zero, it is possible to select which I/O ports you access. This is the meaning of a seek on the io device file. For example, seeking to location 87 will cause subsequent reads and writes to the file to be interpreted as references to io port 87. Unlike other devices, the file offset does not progress with reads and writes. It may only be changed by seeking. It was thought that this arrangement was more in the spirit of I/O space accesses than thent to the parallel printer device have the following format: .sp .in +3 Bit-0 is the least significant bit and bit-7 is the most significant bit in this discussion. If bit-7 is clear, the the byte is taken to mean a character to be printed. Otherwise, if bit-7 is set, the byte indicates a motion command. If bit-6 is set, the byte indicates vertical motion. If bit-5 is set, the byte indicates backwards motion. Bits 0 - 4 (the low order 5 bits) are taken to be the magnitude of motion desired. .in -3 .sp T<  more Micronix-like alternative. Non-zero minor device numbers limit access to that one I/O port whose address is the same as the minor device number. It is therefore possible to have I/O space selectively protected, while giving any user access to some certain port. For example, if you wanted to allow free access to ports 77 and 78 by any user on the system, you would issue the following commands: mknod /dev/io77 c 3 77 mknod /dev/io78 c 3 77 chmod a=rwx /dev/io77 /dev/io78 If the minor device nuthe space above the file system as swap space. Thus, the logical disk looks like: .in +5 .nf ilist file space swap space |-------|-----------------------------|------------| .ti -5 while the physical disk looks like: file space swap space ilist file space ------------|------------|-------|----------------- .in -5 .fi In a busy system, the disk heads spend most of their time over the swap space and the ilist, so this gives a performance advantage. mber is not zero, seeks are simply ignored. .in -5 .bd FILES .in +5 .br /dev/io - the device file .in 5 .rm 65 .he "mem (4) 6/25/82 mem (4)" .fo " -#-" .bd DEVICE .in +5 .br .bd mem - core memory device .sp 2 .in -5 .bd DESCRIPTION .in +5 .br This device reads and writes kernel memory (addresses 0 to FFFF). One must be exceedingly careful in protecting this device, since there are several hardware registers in this address range that will crash the system upon being read. .he "hdca (4) 8/6/82 hdca (4)" .fo " -#-" .in 5 .rm 65 .bd DEVICE .br .in +5 .bd HDCA - Morrow Designs' Winchester disk controller .in -5 .bd FUNCTION .in +5 .br The HDCA controls up to four 8 inch Winchester disk drives. Micronix currently supports 3 drive sizes: .in +5 .nf m10 10 megabytes m20 20 megabytes m26 26 megabytes .in -5 .fi The device names (in the /dev directory) for these disks depend on their position on the HDCA daisy-chain. Drive A is called "hda",...banner.5core.5device.5group.5motd.5mtab.5passwd.5rc.5signon.5ttys.5utmp.5wtmp.5dtab.5directory.5filesystem.5 drive B is called "hdb", etc. The major/minor device numbers are: .ti +5 .nf 1/0 hda 1/1 hdb 1/2 hdc 1/3 hdd .fi Unlike the HDDMA drives, Micronix can automatically detect the size of the HDCA drives, so there is no need to indicate the drive size in the device name or number. Micronix does not support a disk formatting program, so each drive must be formatted under CP/M. A sector skew of 6 is recommended, but is not critical. Since these drives are soft-sectored, there is no compatib.he "banner (5) 3/15/82 banner (5) .fo " -#-" .in 5 .rm 65 FILE .in +5 .bd banner - the log-in banner .sp 2 .in -5 .bd FUNCTION .br .in +5 The banner file is printed on each terminal just prior to the .bd Name: prompt for the user login name. This file is inessential to system operation. It may be edited to the user's preference, or deleted. .in -5 .sp 2 .bd FILES .in +5 .br /etc/banner - banner file. ility problem with different skews. .he "core (5) 3/17/82 core (5)" .fo " -#-" .in 5 .rm 65 .bd FILE .in +5 .bd core - core dump file .sp 2 .in -5 .bd FUNCTION .in +5 .br A core file is produced by the system as a result of certain fatal signals; the offending program is then terminated. The file produced is named "core" in the current directory of the dumped program at the time of the fatal signal. The format of the core dump file is as follows: The fi.he "hddma (4) 8/6/82 hddma (4)" .fo " -#-" .in 5 .rm 65 .bd DEVICE .br .in +5 .bd HDDMA - Morrow Designs' dma hard disk controller .in -5 .bd FUNCTION .in +5 .br The HDDMA controls up to four 5 1/4 inch Winchester disk drives. Micronix currently supports 3 drive sizes: .in +5 .nf m5 5 megabytes m10 10 megabytes m16 16 megabytes .in -5 .fi The device names (in the /dev directory) for these disks depend on their position on the HDDMA daisy-chain. An m5 arst 65,536 bytes are simply a "snapshot" of the program as it appeared in memory at the critical instant. Following this "memory image" is certain other pertinent information, mostly the contents of the Z80's registers: .sp .in +4 .ta 4 Task: Micronix task number .br Mask: The MPZ80 permission mode .br PC: Program counter .br SP: Stack pointer .br .ti -10 Registers: .br af .br bc .br de .br hl .br zir .br zix .br ziy .br zaf .br zbc .br zde .br zhl .sp .in -4 This ttached as drive A is called "m5a", an m16 attached as drive D is called "m16d", etc. The major/minor device numbers are as follows: .in +5 .nf 3/0 m5a 3/4 m10a 3/8 m16a 3/1 m5b 3/5 m10b 3/9 m16b 3/2 m5c 3/6 m10c 3/10 m16c 3/3 m5d 3/7 m10d 3/11 m16d .in -5 .fi Micronix does not support a disk formatting program, so each drive must be formatted under CP/M. A sector skew of 6 is recommended, but is not critical. Since these drives are soft-sectorsection assumes previous knowledge of the Z80 processor. ed, there is no compatibility problem with different skews. If you ever have to explore the surface of one of these drives without the intervention of Micronix, you should know that Micronix logically "rolls" the tracks by (number of tracks) / 2. Thus on an m5, which has 153 tracks, logical track 0 is physical track 76. The reason for this is that most Micronix systems have only one hard disk, which must serve as both the root device and the swap device. When Micronix sees that rootdev == swapdev, it uses = .he "device (5) 3/17/82 device (5)" .fo " -#-" .in 5 .rm 65 .bd FILE .in +5 .br .bd device - printer spooler device description file .sp 2 .in -5 .bd FUNCTION .in +5 .br The line printer spooler program searches for and follows the directives found in this file. The file is entered free-form, that is, order and spacing of specifiers given within this file are unimportant. The following is a list of specifiers that may appear: .sp 2.he "mtab (5) 3/15/82 mtab (5)" .fo " -#-" .in 5 .rm 65 .bd FILE .in +5 .br .bd mtab - mounted file system table .sp 2 .in -5 .bd FUNCTION .in +5 .br .bd Mtab resides in the /etc directory and contains a table of devices "mounted" by the .bd mount command. The .bd umount command removes entries. Each entry is 64 bytes long. The first 32 bytes are the null padded name of the place where the special file is mounted; the second .in +3 A baud rate given as a decimal number. Example baud rates: 9600, 1200, 300, 110, etc. All the standard baud rates are supported. The default baud rate is 9600. .sp An indication to use hardware handshaking, i.e., to transmit only when the clear-to-send pin is asserted. The indicator is simply the word "shake". By default, clear-to-send is ignored. .sp The name of the device to which to send the spooled files for printing. This must be the full path name of a character special file. Examples: /dev/tt 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. This table is present only so people can look at it. It does not matter to .bd mount if there are duplicate entries, nor to .bd umount if a name cannot be found. .sp 2 .in -5 .bd FILES .in +5 .br etc/mtab .sp 2 .in -5 .bd SEE ALSO .in +5 .br mount (1), umount (2) yA, /dev/ttyB, /dev/ttyC, /dev/pprA, /dev/ttyD, etc. Default is /dev/lp. .sp 2 .in -8 .bd FILES .in +5 .br /usr/spool/*/device .sp 2 .in -5 .bd EXAMPLE .in +5 .br A complete typical "device" file follows: .sp .ti +4 .bd /dev/ttyc 1200 .he "passwd (5) 3/15/82 passwd (5)" .fo " -#-" .in 5 .rm 65 .bd FILE .bd .in +5 .br passwd - password file .sp 2 .in -5 .bd FUNCTION .in +5 .br The name passwd has become a misnomer, but is commonly found in UNIX documentation and we hesitate to change it here. .sp .bd Passwd contains the following information: .sp .in +3 name (login name, no upper case letters) .br encrypted password .br numerical user ID .br numerical group ID .b.he "group (5) 3/15/82 group (5)" .fo " -#-" .in 5 .rm 65 .bd FILE .in +5 .bd group - the group file .sp 2 .in -5 .bd FUNCTION .in +5 .br Each user name is associated with a group number. Associated with each file is a user ID number (the owner of the file) and a group ID number (the group of the file). These numbers are used in permission determinations. The relationship between group numbers and names is established by the group fir comment .br home directory .br command interpreter program name with optional arguments .in -3 .sp This is an ASCII file. Each field within each user's entry is separated from the next by a colon. Each user is separated from the next by a newline. This file resides in the "/etc" directory. The first entry of the password file contains an entry for the super-user account. The name of this account is traditionally "root," but may be renamed to anything the user wishes. .sp 2 .in -5 .bd EXAMPLE .in +5 .ble. The format of the group file is as follows: .sp .in +3 Each line of the file defines one group name. The group name is followed by a colon, then followed by the encrypted group password, if one exists. This is followed by a colon, which is followed by the group number (in decimal), followed by a colon, followed by the group comment field which may contain anything you desire, or nothing at all. .sp 2 .in -3 Here is a sample group file: .sp .in +7 .bd sales::4: .br .bd stock::5: .sp 2 .in -7 Normally r .bd root::0:0:super:/:/bin/sh .sp .bd sally::10:1:sally:/a/sally:/bin/upm a:/cpm mbasic .sp 2 .in -5 .bd FILES .in +5 .br /etc/passwd .sp 2 .in -5 .bd SEE ALSO .in +5 .br login (5), passwd (5), group (5) group 0 is reserved for the super-user only. The .bd newuser program makes additions to this file. .sp 2 .in -5 .bd SEE ALSO .in +5 .br passwd(5) .he "rc (5) 3/16/82 rc (5)" .fo " -#-" .in 5 .rm 65 .bd FILE .in +5 .bd .br rc - multi-user start-up file .sp 2 .in -5 .bd FUNCTION .in +5 .br The .bd init (initialization) program looks for the "/etc/rc" file just before entering the multi-user mode. If such a file is found, and is readable, it is run as a shell script. That is, each of the commands in the file is executed as if from the keyboard. Typically, it is used to cl.he "motd (5) 3/15/82 motd (5)" .fo " -#-" .in 5 .rm 65 .bd FILE .in +5 .bd motd - message of the day .sp 2 .in -5 .bd FUNCTION .in +5 .br The message of the day file is printed on each users' terminal after the proper login sequence is completed. The contents of this file are inessential to system operation. This file is intended to be updated frequently by the system administrator. It may be used to inform the users of changing ean out the temporary directory, remove locked files, start up daemons, etc. The user may place whatever he desires in the file. .sp 2 .in -5 .bd FILES .in +5 .br /etc/rc system conditions or upcoming events. This file may be deleted from the system if the user so wishes. .sp 2 .in -5 .bd SEE ALSO .in +5 .br banner (5), signon (5) > .he "signon (5) 3/15/82 signon (5)" .fo " -#-" .in 5 .rm 65 .bd FILE .in +5 .br .bd signon - file for the signon prompt .sp 2 .in -5 .bd FUNCTION .in +5 .br The signon file is printed on the system console each time Micronix is booted. The contents of this file is inessential to system operation. It is merely there to display system-oriented information. It may be edited to suit the user, or deleted from the system. .sp 2 .in -5 .bd FIL.he "wtmp (5) 3/15/82 wtmp (5)" .fo " -#-" .in 5 .rm 65 .bd FILE .in +5 .br .bd wtmp - user login history .sp 2 .in -5 .bd FUNCTION .in +5 .br This file records all logins and logouts. Its format is like .bd utmp (5) with these exceptions: A null user name indicates a logout on the associated typewriter. Furthermore, the typewriter name .bd ~ indicates the system was rebooted at the indicated time; the adjacent pair of entries ES .in +5 .br /etc/signon with typewriter names .bd | and .bd } indicate the system-maintained time just before and just after a .bd date command changed the systems' idea of the time. .bd Wtmp is maintained by .bd login (1) and .bd init (1). Neither of these programs creates the file, so if is is removed, record-keeping is turned off. .sp 2 .in -5 .bd FILES .in +5 .br /usr/adm/wtmp .br /include/utmp.h .sp 2 .in -5 .bd SEE ALSO .in +5 .br utmp (5), login (1), init (1), who (1) .he "ttys (5) 3/15/82 ttys (5)" .fo " -#-" .in 5 .rm 65 .bd FILE .in +5 .br .bd ttys - typewriter (terminal) initialization data .sp 2 .in -5 .bd FUNCTION .in +5 .br The .bd ttys file is read by the .bd init program and specifies which typewriter special files are to have a process created for them which will allow users to log in. There is one line in the file for each typewriter. It is good practice to maintain entries for all .he "dtab (5) 4/14/82 dtab (5) .fo " -#-" .in 5 .rm 65 .bd FILE .in +5 .br .bd dtab - the dump table .sp 2 .in -5 .bd FUNCTION .in +5 .br Information on the times of a dump are kept in the file "/etc/dtab." This is a non-ASCII file presently used only by .bd td (1). Each entry in .bd dtab is eight bytes long and takes the form: .in +5 .nf .bd 7 struct dtab { int device, inode; long date; }; .sp 2 .in -5 .fi There is atypewriters in the system, including those that are turned off. The format of each line of the .bd ttys file may be entered free-form, i.e., in any order, with any amount of spaces between the specifiers. Four specifiers may be entered; only one is really required, though. Let's take a sample line from a .bd ttys file. .sp .ti +5 .bd ttyA 9600 on shake .sp The device name (ttyA in this example) .ul must appear on the line. If no baud rate is given, the default baud rate of 9600 is used. If no "onn entry in .bd dtab for each directory that has been dumped by .bd td. Device is the major/minor device number of the directory in question (major device number in the high byte, minor in the low byte). Inode is the inode number of the directory. Date is the time of the last recorded dump of the directory in question expressed as a 4-byte quantity representing the number of seconds elapsed since Jan. 1, 1970 at midnight. .sp 2 .in -5 .bd FILES .in +5 .br /include/dtab.h .sp 2 .in -5 .bd ALSO READ .in +5 " or "off" specifier is given, by default the port will be on. If no "shake" specifier is given, hardware handshaking will not be used. (In most cases, the "shake" option is not used and should not be specified. It is required only for some slow printers and terminals.) In the above example, ttyA is active (on) and set at 9600 baud with hardware handshaking. It is possible, however to set up three terminals that run at 9600 baud and that do not require hardware handshaking as follows: .sp .nf ttyA ttyB.br td (1)  ttyC .fi .sp 2 .in -5 .bd FILES .in +5 .br /etc/ttys .sp 2 .in -5 .bd SEE ALSO .in +5 .br init (1), stty(1), login (1) .he "directory (5) 3/15/82 directory (5)" .fo " -#-" .in 5 .rm 65 .bd FILE .in +5 .br .bd directory - the format of directories. .sp 2 .in -5 .bd FUNCTION .in +5 .br Micronix uses the standard UNIX version 6 directory format. A directory behaves like an ordinary file except that a user may write into a file, but cannot write into a directory. A directory is distinguished from a file by a bit in the flag word of its i-node entry. Directory ent.he "utmp (5) 3/15/82 utmp (5)" .fo " -#-" .in 5 .rm 65 .bd FILE .in +5 .br .bd utmp - user information .sp 2 .in -5 .bd FUNCTION .in +5 .br This file offers information on who is currently using Micronix. The file is binary. Each entry is described in the structure illustrated below: .sp .nf .bd 4 struct utmp { char line[8], /* typewriter name */ name[8]; /* login name */ .sp .bd 2 long time; /* login time */ }; ries are 16 bytes long. The first word is the i-number of the file, represented by the entry if non-zero. If the first word is zero, the entry is empty. Bytes 2 through 15 of the entry represent the 14-character file name, null padded on the right. These bytes are not cleared for empty slots. By convention, the first two entries in each directory are for "." and "..". The first is an entry for the directory itself. The second is for the parent directory. The meaning of ".." is modified for the root dire .fi Line is the name of .bd tty (null padded) on which the user is logged in. Name is the (null padded) name of the user who logged in. Time is the time of login, expressed as a 32-bit quantity representing the number of seconds since the epoch (midnight, January 1st, 1970). .in -5 .bd FILES .in +5 .br /etc/utmp .br /include/utmp.h .sp 2 .in -5 .bd SEE ALSO .in +5 .br ? ctory 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. In both cases ".." has the same meaning as ".". .sp 2 .in -5 .bd ALSO READ .in +5 .br filesystem (5) ed to set the system's idea of the time. .sp .bd I-numbers begin at 1 and the storage for i-nodes begins in block 2. Also, i-nodes are 32 bytes long, so 16 of them fit into a block. Therefore, i-node .bd i is located in block .bd (i + 31) / 16, and begins .bd 32 * ((i + 31) (mod 16)) bytes form 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. .sp .nf .bd 5 str.he "filesystem (5) 3/15/82 filesystem (5)" .fo " -#-" .in 5 .rm 65 .bd FILE .in +5 .br .bd filesystem - format of UNIX version 6 file systems .sp 2 .in -5 .bd FUNCTION .in +5 .br Every file system storage volume, (hard or floppy disk) 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. Block 1 is the super block. Starting from its first word, the format of a super-block is as follows. .nf .bd 9 struct { unsigned isize, fsize, nfree, free [100], ninode, inode [100], .sp .bd 3 char flock, ilock, fmod; .sp .bd 2 long time; }; .sp 2 .fi Isize is the number of blocks devoted to the i-list which starts just after the super-block, in block 2. Fsize is the first block not potentially available for allocation to a file. These numbers are used by the system to check for a bad block number. If an impossible block number is allocauct { int flags; char nlinks, uid, .sp .bd 2 gid, size0; .sp .bd 2 int size1, addr[8], .sp .bd 3 long actime, modtime; }; .sp 2 The flags are as follows: .sp .bd 6 100000 i-node is allocated 060000 2-bit file type: 000000 plain file 040000 directory 020000 character-type special file 060000 block-type special file .sp .bd 8 010000 large file 004000 set user-ID on execution 002000 ignored 000400 read permission for owner 000200 write permission for owner 000100 execute permission forted from the free list, or is freed, a diagnostic is written on the on-line console. Moreover, the free array is cleared to prevent further allocation from a presumably corrupted free list. The free list for each volume is maintained as follows. The free array contains, in .bd free[1], ... , free[nfree-1], up to 99 numbers of free blocks. .bd 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 owner 000070 read, write, execute permission for group 000007 read, write, execute permission for others .sp .fi Special files are recognized by their flags, not by i-number. A block-type special file is one which can potentially 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 and the low byte specifies one of several devices of that type. The device ty-block numbers listed in the next 100 words of the chain member. The first of these 100 blocks is the link to the next member of the chain. .bp To allocate a block: decrement .bd nfree and the new block is .bd free[nfree]. If the new block number is 0, there are no blocks left and an error is given. If .bd nfree becomes 0, read in the block named by the new block number, replace .bd nfree by its first word, and copy the block number in the next 100 words into the .bd free array. To free a blocpe numbers of block and character special files overlap. The address words of ordinary files and directories contain the number of the blocks in the file (if it is small) or the number of indirect blocks (if the file is large). Byte number .bd N of a file is accessed as follows: .bd N is divided by 512 to find its logical block number, use .bd b as an example, in the file. If the file is small .bd (flag 010000 is 0), .bd b must be less than .bd 8, and the physical block number is .bd addr[b]. If thk, check if .bd nfree is 100; if so, copy .bd nfree and the .bd free array into it, write it out, and set .bd nfree to 0. In any event, set .bd nfree[nfree] to the freed blocks's number and increment .bd nfree. .sp .bd Ninode is the number of free i-numbers in the inode array. To allocate an i-node: If .bd ninode is greater than 0, decrement it and return .bd inode[ninode]. If .bd ninode = 0, read the i-list and place the number of all free inodes (up to 100) into the .bd inode array, thene file is large, .bd b is divided by 256 to yield .bd i. If .bd i is less than .bd 7, then .bd 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 the number of the block for the sought byte. .sp If .bd i is equal to .bd 7, the file has become extra large and .bd 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 secon try again. To free an i-node, provided .bd ninode is less than 100, place its number into .bd inode[ninode] and increment .bd ninode. If .bd ninode is already 100, do not bother to enter the freed i-node into any table. This list of i-nodes is used 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. .sp .bd Flock and .bd ilock are flags maintained in the core copy of the file system while it is mounted; their vd-level indirect blocks points to a data block. Notice that large files are not marked by any mode bit, but by having .bd addr[7] non-zero. Even though this scheme allows for more than 33,554,432 (256 X 256 X 512) bytes per file, the length of files is stored in 24 bits. In practice, a file can be at most 16,777,216 bytes long. For block .bd b in a file to exist, it is not necessary that all blocks less than .bd b exist. A zero block number in either address words of the i-node, or in an indirect alues on disk are immaterial. The value of .bd fmod on disk is likewise immaterial; it is used as a flag to indicate that the super-block has changed and should be copied to the disk during the next periodic update of file system information. .sp .bd Time is the last time the super-block of the file system was changed and is a long representation of the number of seconds that have elapsed since midnight January 1st 1970 (GMT). During a reboot, the time of the super-block for the root file system is us@ block, indicates that the corresponding block has never been allocated. This type of missing block reads as if it contained all zero words. .sp 2 .in -5 .bd SEE ALSO .in +5 .br icheck (1), dcheck (1), fsck (1) 4 program &" will run the given program in the background at a "nice" priority of 4. .ti -8 passwd Encrypted passwords are now kept in the /etc/passwd file, along with all other user account information. Also, the entry that specifies the user's login shell can include arguments (as in ":/bin/upm a:/cpm mbasic"). .ti -8 pilot A version of Pilot has been added. This is an "author language" suited for writing interactive dialogs. .ti -8 ps The "process status" command is supported. .ti -8 ratfor Bug fixed. ..lastlog. .ti -8 rm Works with the -r (recursive) option. .ti -8 rp "Rational Pilot" has been added. This is a pre-processor that makes it easier to write structured Pilot programs. It pre-processes pilot in exactly the same way that ratfor pre-processes fortran. .ti -8 stty An option has been added to preserve all 8 tty input bits. This allows support of non-ascii 8-bit character sets. .ti -8 su The "set user" command has been added. It invokes a shell with the user-id of the named user, or if no user is named. ..new, invokes a super-user shell. Requires the user's password, if any. (The super-user password is that of the "root" account.) .ti -8 sum Works with the standard input. Has a -r option. .ti -8 upm Lets you specify the command to be run in the .upm file; TPA size has been increased to 54700 bytes; Does return status error reporting (like Illegal instruction -- core dumped); BIOS jmp table properly positioned; Tab expansion on console ouput fixed; Lst device redirection fixed; Bugs related to too many open fi.he " Whats New in Micronix 1.4" .fo " Whats New -#-" .ta 12 .in 12 .ti -8 The following programs have been added: .br cal, help, include, lord, pilot, rp, su, wall .ti -8 The following programs have been deleted: .br hd, kill (now built into shell), mode (replaced by chmod), tsort .ti -8 The following programs have been changed: .br change, chmod, clean, cp1, ddt, df, diff, entab, far, fsck, grep, init, login, lpr, ls, man, mount, passwd, ratfor, rm, sh, sort, stty, sum, umount, upm .ti -8 boot The bootstrapping programs have been extended to work without the intervention of CP/M. The stand-alone floppy will boot directly, and a boot disk can be prepared that will boot any of the hard disks without user intervention. See boot (I). .ti -8 cal The "calendar" command has been added. It prints yearly or monthly calendars. .ti -8 chmod The "change mode" command replaces the old "mode" command. This deals with file modes symbolically, not just with octal numbers. Also, the new write lock attribute is sles have been fixed. .ti -8 wall The "write all" command has been added. It broadcasts a message to all users. upported (see below). .ti -8 cu The "call up" command has been added. This allows you to communicate with other computers via modem. .ti -8 diff Works better with the -e option. .ti -8 far Is faster. Copies files of length 0 correctly; Works with Northstar CP/M 2.x 5 1/4 " single sided double density 35 track 10 hole hard sectored floppys; .ti -8 fsck Works with mis-directed parent links. .ti -8 init In version 1.3, Micronix always powered up in single user mode with a super-user shell. Under 1.4, it cter. .ti -5 2. A CP/M file's length must be an even multiple of 128 bytes. A Micronix file's length may be any number of bytes (both are constrained to maximum file sizes). CP/M text files are padded with ^Z characters at the end to round them out to an even multiple of 128. Micronix text files are not. .in -5 There is a convenient utility for converting a text file back and forth between the two formats. To make a text file suitable for Micronix: .ti +5 .bd clean file To make a text file suitable for demands the root password (if any) first. This provides more security for installations that can't physically protect their computers. You should be sure to keep a stand-alone floppy with an unprotected root account, however, in case the root password is lost. .ti -8 io The kernel's io interface has been unbundled and documented so that device drivers can be added without the source code. This is available as an option. .ti -8 iodev A character device to read and write io space has been added. .ti -8 locCP/M or .bd upm: .ti +5 .bd clean -u file The name .bd clean comes from the idea of cleaning out the excess RETURN characters and ^Z characters at the end; "-u" stands for "unclean". .bp .bd Programs that attempt 8080 instruction or interrupt manipulation, such as a program to format a hard disk, or that "move" a conventional CP/M system, such as MOVCPM or SYSGEN, will not work under .bd upm. Nor can .bd upm handle disk allocation vector CP/M calls (it returns nonsense). Otherwise, there are no restk The kernel has been extended to allow a type of file locking. A file can be marked as "one writer only", so that no more than one process can hold the file open for writing. The mark is the 01000 (octal) mode bit in the file's inode. It is reported by an l in the file's listing, and can be set with a +l argument to the chmod command. .ti -8 memdev A devive to read and write memory is supported. .ti -8 nice The kernel and the shell now support user setable priorities. For example, the command line "nice A rictions to the types of file that may be run under this program. .in -5 .bd SEE ALSO .in +5 .br Upm tutorial in User Reference Manual .in 0 NOTE: CP/M is a registered trademark of Digital Research. WordStar is a registered trademark of the MicroPro Corporation. B C D E F ddcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"!       DZ5,weSA@*G H I J K L