Category : Communication (modem) tools and utilities
Archive   : SC40.ZIP
Filename : SC40Q.SCR

 
Output of file : SC40Q.SCR contained in archive : SC40.ZIP
;
;+
; Copyright (C) 1989-92 Terry Dutcher, All Rights Reserved
;
;***************************************************************************
;
; THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS ONLY.
;
; The author disclaims all warranties on the program, including without
; limitation, all implied warranties of merchantablity and fitness.
;
; Full permission and consent is hereby given to reproduce, distribute, and
; publish and to permit others to reproduce this program and information
; relating thereto according to the terms granted in the license agreement.
;
;***************************************************************************
;
; System Title: Set-Clock Date Created: 07-Apr-89
;
; Module Name: Qmodem Script Written By: Terry Dutcher
;
; Revsion Number: 04.0Q Revision Date: 03 August 1992
;
; Purpose:
;
; To front-end the CLKSET routine by dialing the Naval Observatory
; or NIST and passign it the time/date string (and switches etc.)
;
; Change Log:
;
; 0.0 to 2.4 - Prerelease versions
; 2.5 to 2.7 - Performed all processing in the command file
; 3.0 - Use external CLKSET routine to process and set clocks.
; 3.1 - Use external configuration file
; 4.0 - build CFG file via program, pursue NIST
;
;***************************************************************************
;-
; debug on
string n0

; init the screen

graphics vt100
color 17
clrscr
window 1 1 80 24

color 113
box 1 1 80 6
atwrite 23 3 31 " S e t - C l o c k - Version 4.0 "
atwrite 13 5 31 " Copyright (C) 1992 Terry Dutcher, All Rights Reserved "
box 20 8 60 12
atwrite 25 10 31 " --- Initializing --- "
window 1 14 80 24
color 17

gotoxy 1 16
send "ATE1^M"
waitfor "OK"
send "^[[?6h"
delay 1000
send "^[[15;23r"

exist clkset.exe findcfg
assign 1 "CLKSET routine not found ! "
gosub f_error

findcfg:
exist sc40.cfg opencfg
gosub cfg_it
goto findcfg

opencfg:
openfile sc40.cfg read
readfile 1
readfile 9
readfile 8
closefile

;
; Sample SC40.CFG. The file should contain only 3 lines. The lines
; MUST start in colum 1. The 1st line is the dialing directory entry
; to get to the Naval Observatory or the NIST ACTS time services,
; The second is the start of the CLKSET command line. The number is
; the local time offset from Universal (GMT). The third is which time
; signal source.
;
; navobs ;Naval Observatory (or NIST ACTS) entry name
; clkset 5 ;clkset command w/ east coast offset
; navy ;which time signal source
;

if "$8" <> "navy" is_nist
assign 6 " Calling the Naval Observatory "
assign 5 "Unable to dial the Naval Observatory ! "
assign n0 20
goto go_on
;
is_nist:
if "$8" <> "nist" is_unkn
assign 6 " Calling the NIST - ACTS "
assign 5 "Unable to dial the NIST - ACTS ! "
assign n0 28
goto go_on
;
is_unkn:
assign 1 "Invalid or unknown time source in SC40.CFG ! "
gosub f_error

go_on:
atwrite 25 10 31 "$6"
color 16
getscr

dial "T$1"
if $online get_str
assign 1 "$5"
gosub f_error

; wait for a good string

get_str:
waitfor "*^M^J" ;wait for start of good string
getnr 1 $n0 ;get date / time string
hangup ;now hang up

; invoke clkset routine

gotoxy 1 23
display " "
assign 8 "$9 $1"
clrscr
dos "$8"

putscr
color 113
box 20 8 60 14
atwrite 27 10 31 " DOS Time and Date set to: "
atwrite 31 11 31 " $time $date "
atwrite 22 13 113 "$1"

color 17
window 1 1 80 24
gotoxy 1 23
displayln " "
delay 10000
system y

;
bookem:
;+
; BOOKEM (as in Danno) Routine. Play dragnet music.
;-
beep 587 100
delay 35
beep 659 50
delay 20
beep 698 50
delay 20
beep 587 175
return
;
f_error:
;+
; F_ERROR Routine. Prints error text and exits to DOS.
;-
color 17
window 1 1 80 24
clrscr
hangup
color 113
box 1 1 80 6
atwrite 3 4 31 " F A T A L E R R O R -- "
atwrite 32 4 31 "$1"
color 17
window 1 1 80 24
gotoxy 1 23
displayln " "
getscr
gosub bookem
delay 7000
system y
return
;
cfg_it:
;+
; CFG_IT Routine. Subroutine to create config file on the fly.
;-
gosub bookem

fnf:
atwrite 1 15 7 "Config file not found. Create it ? [Y/N] "
gotoxy 44 15
flush all
inkey 0
if "$0" = "Y" is_cfg_sc
if "$0" = "y" is_cfg_sc
if "$0" = "N" finis
if "$0" = "n" finis
goto fnf

finis:
system y

is_cfg_sc:
exist cfg-sc.exe cfg_sc
assign 1 "Configure SetClock routine not found ! "
gosub f_error

cfg_sc:
getscr
clrscr
dos "cfg-sc qmodem"
putscr
atwrite 1 15 7 " "
atwrite 1 15 7 "Continue execution ? [Y/N] "
gotoxy 27 15
flush all

inkey 0
if "$0" = "Y" do_it
if "$0" = "y" do_it
system y

do_it:
return



  3 Responses to “Category : Communication (modem) tools and utilities
Archive   : SC40.ZIP
Filename : SC40Q.SCR

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/