home *** CD-ROM | disk | FTP | other *** search
- .heNAVYTIME -- Get Date/Time from Naval Observatory Page #
- Copyrigh⌠ 198╖ Michae∞ ═ Rubenstein
-
- Thi≤ softwarσ ma∙ bσ freel∙ distributeΣ a≤ lonτ a≤ n∩ feσ i≤ ì
- assesseΣ anΣ thσ copyrigh⌠ noticσ i≤ retained.
-
- Thσ function≤ containeΣ iε COMM.C¼ TIMER.C¼ ATFINISH.C¼ anΣ ì
- SETTZ.├ ma∙ bσ distributeΣ a≤ par⌠ oµ aε executablσ prograφ ì
- (eveε iµ ß feσ i≤ charged⌐ provideΣ thσ followinτ copyrigh⌠ ì
- noticσ i≤ included:
-
- Portion≤ copyrigΦ⌠ 198╖ Michae∞ ═ Rubensteiε
-
-
- Change≤ iε Versioε 1.1.
-
- .RR--!-!-------!----!----!----!----!----!----!----!----!--------R
- .lm 6
- ¡ Thσ interrup⌠ servicσ routinσ fo≥ thσ time≥ ha≤ beeε ì
- ááááááárewritteε t∩ reducσ thσ stacδ spacσ required« Thσ ì
- ááááááámodificatioε i≤ baseΣ oε ß routinσ b∙ Doε Corbitt.
-
- ááááá- Thσ RS23▓ interfacσ i≤ cleareΣ afte≥ dialing« Thi≤ ì
- áááááááprevent≤ olΣ message≤ froφ abortinτ thσ transfer.
-
- ááááá- Define≤ fo≥ TRU┼ anΣ FALS┼ havσ beeε inserteΣ s∩ thσ ì
- ááááááástandarΣ Turb∩ ├ includσ file≤ ma∙ bσ useΣ (thσ origina∞ ì
- ááááááárequireΣ m∙ modifieΣ STDIO.H.
-
- ááááá- Thσ filσ BUILTINS.MA╦ i≤ no≈ included« Thi≤ i≤ requireΣ ì
- áááááááfo≥ thσ makefilσ t∩ work.
-
- ááááá- Thσ documentatioε no≈ mention≤ tha⌠ getopt (distributeΣ ì
- áááááááwitΦ Turbo ├ iε sourcσ forφ only⌐ i≤ requireΣ anΣ ì
- ááááááádiscusse≤ thσ implication≤ (thσ compileΣ versioε use≤ ß ì
- áááááááprivatσ versioε oµ getopt whicΦ doe≤ no⌠ respec⌠ thσ ì
- áááááááswitcΦ characte≥ a≤ doe≤ thσ onσ iε thσ Turb∩ ├ ì
- ááááááádistribution.
- .lm1
-
-
- Description.
-
- NAVYTIM┼ call≤ thσ 120░ bauΣ Nava∞ Observator∙ timσ servicσ fo≥ ì
- digita∞ clock≤ a⌠ (202⌐ 65│-035▒ anΣ set≤ thσ systeφ time« ì
- Becausσ oµ delay≤ iε thσ phonσ system¼ thσ timσ ma∙ bσ ofµ b∙ a≤ ì
- mucΦ a≤ .╡ second.
-
-
- Installation.
-
- Beforσ usinτ NAVYTIM┼ certaiε thing≤ havσ t∩ bσ se⌠ up« Thσ ì
- prograφ mus⌠ kno≈ thσ timσ zonσ anΣ whethe≥ dayligh⌠ saving≤ timσ ì
- i≤ used« Thi≤ i≤ donσ b∙ settinτ aε environmen⌠ variablσ T┌ witΦ ì
- thσ command
-
- se⌠ TZ=xxxnyyy
-
- wherσ xx° anΣ yy∙ arσ an∙ letter≤ anΣ ε i≤ thσ numbe≥ oµ hour≤ ìèbehinΣ GreenwicΦ Meaε timσ fo≥ standarΣ time« Iµ yy∙ i≤ omitted¼ ì
- thσ NAVYTIM┼ assume≤ tha⌠ dayligh⌠ saving≤ timσ i≤ NO╘ used« xx° ì
- anΣ yy∙ arσ intendeΣ t∩ bσ thσ abbreviatioε fo≥ thσ timσ useΣ ì
- (xx° fo≥ standarΣ time¼ yy∙ fo≥ dayligh⌠ saving≤ time).
-
- Fo≥ example¼ iµ thσ areß yo⌡ arσ iε use≤ Easterε Standard/Easterε ì
- Dayligh⌠ time¼ thσ commanΣ woulΣ be
-
- se⌠ TZ=EST5DST
-
- (Easterε StandarΣ i≤ ╡ hour≤ behinΣ GMT)« Iµ Easterε StandarΣ i≤ ì
- useΣ throughou⌠ thσ year¼ thσ commanΣ woulΣ be
-
- se⌠ TZ=EST5
-
- Notσ tha⌠ thσ numbe≥ oµ hour≤ behinΣ GM╘ ma∙ bσ morσ thaε onσ ì
- digi⌠ (iε thσ Pacific⌐ o≥ ma∙ bσ negativσ (iε mos⌠ oµ Europe¼ ì
- Africa¼ anΣ Asia)« Thσ program¼ however¼ determine≤ iµ Dayligh⌠ ì
- saving≤ timσ i≤ iε effec⌠ baseΣ oε thσ UniteΣ State≤ conventions« ì
-
- I⌠ wil∞ als∩ bσ necessar∙ t∩ modif∙ thσ thσ configuratioε file¼ ì
- NAVYTIME.RC« User≤ no⌠ iε thσ Washingtoε D├ loca∞ callinτ areß ì
- wil∞ havσ t∩ changσ thσ phonσ numbe≥ oε thσ seconΣ linσ t∩ ì
- includσ thσ areß code« Iµ you≥ modeφ i≤ no⌠ oε COM▒ o≥ i≤ no⌠ ì
- compatiblσ witΦ thσ Haye≤ 120░¼ othe≥ change≤ wil∞ bσ required.
-
- Thσ configuratioε filσ ha≤ ß rathe≥ inflexiblσ format« EacΦ linσ ì
- ha≤ ß specifiπ meaning« I⌠ i≤ importan⌠ tha⌠ therσ bσ n∩ space≤ ì
- a⌠ thσ end≤ oµ line≤« Thσ line≤ havσ thσ followinτ meanings
-
- .RR--!---------!----!----!----!----!----!----!----!----!--------R
- Line Meaning
- ---- -------------------------------------------------
- .RR------#-----!----!-!--!----!----!----!----!----!----!--------R
- 1 Thσ CO═ por⌠ t∩ use« Onl∙ ▒ anΣ ▓ arσ supported.
-
- 2 Thσ commanΣ t∩ initializσ thσ modeφ anΣ dial« I⌠ ì
- áááááááááááááááconsist≤ oµ an∙ combinatioε oµ thσ following
-
- .lm21
- - String≤ iε quote≤ whicΦ arσ sen⌠ t∩ thσ ì
- áááááááááááááááááááááámodeφ verbatim.
-
- áááááááááááááááááááá- Pair≤ oµ thσ forφ ^° wherσ ° i≤ an∙ ì
- ááááááááááááááááááááááprintinτ characte≥ whicΦ result≤ iε thσ ì
- áááááááááááááááááááááácontro∞ characte≥ correspondinτ t∩ ° t∩ bσ ì
- áááááááááááááááááááááásent« Fo≥ example¼ t∩ senΣ ß carriagσ ì
- ááááááááááááááááááááááreturn¼ includσ thσ pair
-
- áááááááááááááááááááá ^m
-
- áááááááááááááááááááá- Integer≤ whicΦ specif∙ ß dela∙ iε tenth≤ oµ ì
- ááááááááááááááááááááááß second« T∩ pausσ onσ seconΣ includσ thσ ì
- ááááááááááááááááááááááintege≥ 10« Number≤ large≥ thaε 360░ (iµ ì
- ááááááááááááááááááááááyou≥ modeφ need≤ ß dela∙ an∙ wherσ closσ t∩ ì
- ááááááááááááááááááááááthat¼ yo⌡ havσ m∙ deepes⌠ sympathy⌐ wil∞ ì
- ááááááááááááááááááááááno⌠ worδ properly.
- èáááááááááááááááááááá- An∙ othe≥ characters¼ typicall∙ spaces¼ ì
- ááááááááááááááááááááááwhicΦ arσ ignored.
-
- .lm1
- 3 Thσ commanΣ t∩ senΣ t∩ terminatσ ß call« Thi≤ ì
- ááááááááááááááálinσ ma∙ bσ empt∙ iµ thσ modeφ i≤ configureΣ t∩ ì
- ááááááááááááááádisconnec⌠ wheε DT╥ i≤ dropped.
-
- 4 Thσ strinτ t∩ matcΦ t∩ recognizσ establishmen⌠ oµ ì
- áááááááááááááááß connection« Thσ modeφ mus⌠ senΣ ß connectioε ì
- ááááááááááááááámessagσ terminateΣ b∙ ß carriagσ returε o≥ linσ ì
- áááááááááááááááfeed« ┴ messagσ containinτ thi≤ strinτ iε an∙ ì
- ááááááááááááááápositioε (fo≥ example¼ NNEC wil∞ matcΦ CONNECT⌐ ì
- áááááááááááááááwil∞ bσ takeε a≤ indicatinτ tha⌠ thσ connectioε i≤ ì
- ááááááááááááááácomplete« Uppe≥ anΣ lowe≥ casσ letter≤ arσ ì
- áááááááááááááááconsidereΣ different.
-
- 4-19 U≡ t∩ 1╡ string≤ t∩ matcΦ t∩ recognizσ failurσ t∩ ì
- ááááááááááááááámakσ ß connection« Thesσ arσ matcheΣ iε thσ samσ ì
- áááááááááááááááwa∙ a≤ thσ connec⌠ string.
-
- .RR--!----!----!----!----!----!----!----!----!----!----!--------R
- Aε alternatσ configuratioε filσ fo≥ thσ Raca∞ Vadiπ 2400╓ (anΣ ì
- possibl∙ othe≥ Raca∞ Vadic⌐ modem≤ i≤ includeΣ a≤ NAVYTIME.RV« ì
-
- Finally¼ i⌠ i≤ necessar∙ t∩ inforφ thσ prograφ wherσ thσ ì
- configuratioε filσ wil∞ bσ found« Normally¼ i⌠ assume≤ tha⌠ thσ ì
- configuratioε filσ wil∞ bσ C:\ETC\NAVYTIME.RC« Iµ thi≤ i≤ no⌠ ì
- convenient¼ se⌠ thσ environmen⌠ variablσ NAVYTIM┼ t∩ thσ ful∞ ì
- namσ oµ thσ configuratioε file« Fo≥ example¼ iµ thσ filσ wil∞ bσ ì
- D:\CONFIG\NAVYTIME.CFG¼ usσ thσ command
-
- se⌠ NAVYTIME=d:\config\navytime.cfg
-
-
-
- Usinτ NAVYTIME.
-
- Iµ invokeΣ witΦ n∩ parameters¼ NAVYTIM┼ wil∞ cal∞ thσ timσ ì
- servicσ anΣ se⌠ thσ DO╙ time¼ displayinτ n∩ message≤ iµ ì
- successful« Iµ thσ commanΣ linσ paramete≥ -÷ i≤ given¼ thσ timσ ì
- wil∞ bσ displayed« Iµ thσ paramete≥ -v÷ i≤ given¼ modeφ message≤ ì
- wil∞ als∩ bσ displayed.
-
- NAVYTIM┼ doe≤ no⌠ se⌠ ß batter∙ backeΣ u≡ clocδ unles≤ thi≤ i≤ ì
- donσ b∙ MSDO╙ wheε thσ DO╙ timσ i≤ set« T∩ se⌠ ß batter∙ backeΣ ì
- u≡ clock¼ invokσ NAVYTIM┼ witΦ ß batcΦ filσ include≤ ß commanΣ t∩ ì
- se⌠ thσ batter∙ clocδ froφ thσ MSDO╙ time.
-
-
-
- Fo≥ thσ Hacker.
-
- NAVYTIM┼ i≤ writteε iε Turb∩ C« Sincσ onσ oµ thσ reason≤ fo≥ ì
- writinτ thi≤ prograφ wa≤ t∩ evaluatσ Turb∩ C¼ n∩ attemp⌠ wa≤ madσ ì
- t∩ kee≡ compatibilit∙ witΦ othe≥ version≤ oµ C« Mos⌠ othe≥ ├ ì
- compiler≤ wil∞ havσ difficult∙ witΦ thσ prototypσ declaration≤ ìèanΣ thσ inlinσ assembl∙ codσ oµ comm.c.
-
- Thσ functioε getop⌠ i≤ used« Thi≤ functioε i≤ includeΣ witΦ ì
- Turb∩ ├ iε sourcσ forφ only« Iµ generatinτ NAVYTIME.EXE¼ thi≤ ì
- functioε mus⌠ bσ includeΣ iε CS.LI┬ o≥ thσ makefilσ mus⌠ bσ ì
- modifieΣ t∩ compilσ anΣ linδ getop⌠.obj.
-
- Fou≥ files¼ COMM.C¼ TIMER.C¼ ATFINISH.C¼ anΣ SETTZ.├ wil∞ bσ oµ ì
- genera∞ interes⌠ t∩ Turb∩ ├ programmers.
-
- COMM.├ implement≤ simplσ interrup⌠ driveε output¼ polleΣ inpu⌠ t∩ ì
- COM▒ anΣ COM2« Thσ maiε limitation≤ arσ n∩ checkinτ fo≥ parit∙ ì
- o≥ othe≥ error≤ anΣ flo≈ contro∞ i≤ no⌠ implemented.
-
- TIMER.├ i≤ ß simplσ stopwatcΦ timer« Becausσ oµ MSDO╙ ì
- limitations¼ time≥ completioε mus⌠ bσ polleΣ witΦ chk_timer().
-
- ATFINIS╚ i≤ simila≥ t∩ thσ librar∙ functioε ATEXI╘ excep⌠ tha⌠ ì
- thσ registereΣ functioε wil∞ alway≤ bσ executeΣ wheε thσ prograφ ì
- terminate≤ (ATEXI╘ function≤ arσ executeΣ onl∙ oε norma∞ ì
- termination)« U≡ t∩ ╕ function≤ ma∙ bσ registered.
-
- SETT┌ set≤ thσ timσ zonσ froφ informatioε iε thσ DO╙ environment« ì
-
- Thesσ function≤ ma∙ bσ useΣ fo≥ botΦ freσ anΣ commercia∞ ì
- distributioε provideΣ m∙ copyrigh⌠ noticσ i≤ included« ì
- Commercia∞ distribution≤ ma∙ no⌠ includσ sourcσ o≥ relocatables.