Category : Communication (modem) tools and utilities
Archive   : CA29-3.ZIP
Filename : HOST.CMD

 
Output of file : HOST.CMD contained in archive : CA29-3.ZIP
LEGE "Scripted HOST mode (1.1). Press ESC to exit."
S20="_PARM"(11:14)*","*"_PARM"(0:3)
S21="ATE0Q0V1X1S0=2 S7=30 S9=10^M"
S22="****"
S23="xxxx"
S24=""
SET PARI NONE
SET DATA 8
SET STOP 1
SET MASK ON
SET CR_I CR_L
SET ASCI UP_L LF
SET SOFT ON
IF ISSC "HOSTDAT" FCALL "HOSTDAT"
S0=S22
S3=S23
SUBD S29
DLDI S28
LOG MARK ON
CLOG "* Host script loaded"
ON ESCA GOSU End
SET INAF OFF
SET ALAR OFF
SET ATIM 1
SET PORT S20(0:3)
IF FCALLED and ISFILE "HOSTTEMP.BAT"
SET RECH ON
LOG OPEN "HOSTLOG"
CLOG "* Return from drop-to-DOS"
GOTO Main_Pro
ENDI
SET BAUD S20(5:8)
TRAN "_MESCAPE"
GOTO Restart
End:
HANG
CLOG "* HOST script terminated"
SET DLDI S28
CHDI S29
RESE
CLEA
MESS "HOST terminated... type Alt-X to exit COM-AND^M^J^M^J"
TRAN "_MINIT"
DELE "\HOSTTEMP.TXT"
EXIT
Read_Com:
RGET S9 80 180
IF NOT CONNECTED
GOTO Disconne
ENDI
IF NOT SUCCESS
GOTO Timeout
ENDI
FIND S9 "NO CARRIER"
IF FOUND
GOTO Disconne
ENDI
SET FLAG(0) OFF
RETU
Timeout:
TRAN "^M^J... autodisconnect due to timeout"
MESS "^M^J... autodisconnect due to timeout"
GOTO RComm_Ex
Disconne:
MESS "^M^JCaller disconnected"
RComm_Ex:
SET FLAG(0) ON
RETU
Restart:
CHDI S29
SET RECH OFF
SET RDIS OFF
CLEA
LOCA 0,0
HANG
MESS "^M^JWaiting...!"
PAUS 3
SET BAUD S20(5:8)
TRAN S21
WAIT_IT_:
RGET S9 80 180
IF NOT SUCCESS
GOTO Wait_IT_
ENDI
FIND S9 "NO CARRIER"
IF FOUND
GOTO Restart
ENDI
FIND S9 "CONNECT"
IF NOT FOUND
GOTO WAIT_IT_
ENDI
GOSU AutoBaud
PAUS 2
RFLU
TRAN "^M^JThe Flying Scotsman greets you!!^M^J"
SET RECH ON
SET RDIS ON
LOG OPEN "HOSTLOG"
ID_Query:
MESS "^M^JID prompt: "
TRAN "^M^JEnter your ID: "
GOSU Read_Com
IF FLAG(0)
GOTO Exit
ENDI
SWIT S9
CASE "_NULL"
TRAN "You must be someone^M^J"
GOTO Exit
ENDC
ENDS
CLOG "* Host mode logon by "*S9
TRAN "^M^JEnter your password: "
LOG SUSP
SET RECH OFF
SET RDIS OFF
GOSU Read_Com
IF FLAG(0)
GOTO Exit
ENDI
LOG RESU
SET RECH ON
SET RDIS ON
SWIT S9
CASE S0
TRAN "^M^J"
ENDC
DEFA
TRAN "Sorry , but you're not authorized."
GOTO Exit
ENDC
ENDS
Main_Pro:
MESS "^M^JMain prompt: "
TRAN "^M^JC)hdir F)ilelist, P)athlist, U)pload, D)ownload, or E)xit: "
GOSU Read_Com
IF FLAG(0)
GOTO EXIT
ENDI
SWIT S9
CASE "C"
GOTO CHDIR
ENDC
CASE "D"
GOTO DOWNLOAD
ENDC
CASE "E"
TRAN "Ok... bye^M^J"
GOTO EXIT
ENDC
CASE "F"
GOTO FILELIST
ENDC
CASE "P"
GOTO PATHLIST
ENDC
CASE "U"
GOTO UPLOAD
ENDC
CASE "X"
GOTO DOS
ENDC
CASE "Y"
GOTO DROPDOS
ENDC
CASE "OFF"
TRAN "Ok... bye^M^J"
GOTO EXIT
ENDC
DEFA
FIND S9 "CHDIR"
IF FOUND
GOTO CHDIR
ENDI
FIND S9 "DOWN"
IF FOUND
GOTO DOWNLOAD
ENDI
FIND S9 "FILE"
IF FOUND
GOTO FILELIST
ENDI
FIND S9 "PATH"
IF FOUND
GOTO PATHLIST
ENDI
FIND S9 "UP"
IF FOUND
GOTO UPLOAD
ENDI
FIND S9 "DOS"
IF FOUND
GOTO DOS
ENDI
TRAN "^M^JCommand not recognized... try again"
GOTO Main_Pro
ENDC
ENDS
TRAN "^M^JThank you veddy much.^M^J"
GOTO Main_Pro
EXIT:
CLOG "* Host mode exit"
LOG CLOS
MESS "^G"
GOTO Restart
File_Que:
MESS "^M^JFname query: "
TRAN "^M^JEnter the file name: "
GOSU Read_Com
IF FLAG(0)
RETU
ENDI
ASSI S8 S9
SWIT S8
CASE "_NULL"
SET FLAG(1) ON
RETU
ENDC
ENDS
SET FLAG(1) OFF
RETU
UPLOAD:
MESS "^M^JUpload from caller"
GOSU File_Que
IF FLAG(0)
GOTO EXIT
ENDI
IF FLAG(1)
GOTO Main_Pro
ENDI
ISFI S8
IF SUCCESS
TRAN "^M^JFile already exists"
GOTO UPLOAD
ENDI
MESS "!Method prompt: "
TRAN "^M^JW)xmodem, X)modem, Y)modem (X1k), Z)modem, or K)ermit: "
GOSU Read_Com
IF FLAG(0)
GOTO Main_Pro
ENDI
SWIT S9
CASE "W"
GETF WXMODEM S8
ENDC
CASE "X"
GETF XMODEM S8
ENDC
CASE "Y"
GETF YMODEM S8
ENDC
CASE "Z"
GETF ZMODEM
ENDC
CASE "K"
GETF KERMIT
ENDC
DEFA
TRAN "^M^JInvalid transfer selection"
GOTO Main_Pro
ENDC
ENDS
GOTO EOTransf
DOWNLOAD:
MESS "^M^JDownload to caller"
GOSU File_Que
IF FLAG(0)
GOTO EXIT
ENDI
IF FLAG(1)
GOTO Main_Pro
ENDI
ISFI S8
IF NOT SUCCESS
TRAN "^M^JFile doesn't exist"
GOTO DOWNLOAD
ENDI
MESS "^M^JMethod prompt "
TRAN "^MW)xmodem, X)modem, Y)modem (X1k), Z)modem, K)ermit, or A)scii: "
GOSU Read_Com
IF FLAG(0)
GOTO Main_Pro
ENDI
SWIT S9
CASE "A"
SEND ASCII S8
ENDC
CASE "W"
SEND WXMODEM S8
ENDC
CASE "X"
SEND XMODEM S8
ENDC
CASE "Y"
SEND YMODEM S8
ENDC
CASE "Z"
SEND ZMODEM S8
ENDC
CASE "K"
SEND KERMIT S8
ENDC
DEFA
TRAN "^M^JInvalid transfer selection"
GOTO Main_Pro
ENDC
ENDS
GOTO EOTransf
EOTRANSF:
IF NOT SUCCESS
MESS "^M^JTransfer failed"
ELSE
MESS "^M^JTransfer OK"
ENDI
GOTO Main_Pro
FILELIST:
MESS "^M^JFilelist command: "
TRAN "^M^J Working..."
DOS "DIR >HOSTTEMP.TXT"
TRAN "^M^J"
SEND ASCII "HOSTTEMP.TXT"
TRAN "^M^J"
DOS "DEL HOSTTEMP.TXT"
GOTO Main_Pro
CHDIR:
MESS "^M^JCHDIR Command: "
TRAN "^M^JEnter the drive:subdirectory: "
GOSU Read_Com
IF FLAG(0)
GOTO Main_Pro
ENDI
CHDI S9
GOTO Main_Pro
PATHLIST:
MESS "^M^JPathlist command: "
TRAN "^M^J Working..."
DOS "Treed >HOSTTEMP.TXT"
TRAN "^M^J"
SEND ASCII "HOSTTEMP.TXT"
TRAN "^M^J"
DOS "DEL HOSTTEMP.TXT"
GOTO Main_Pro
DOS:
GOSU DOSPSW
IF FAILED GOTO Main_Prompt
MESS "^M^JDOS Command: "
TRAN "^M^JEnter the command: "
GOSU Read_Com
IF FLAG(0)
GOTO Main_Pro
ENDI
TRAN "^M^J Working..."
CONC S9 ">HOSTTEMP.TXT"
DOS S9
TRAN "^M^J"
SEND ASCII "HOSTTEMP.TXT"
TRAN "^M^J"
DOS "DEL HOSTTEMP.TXT"
GOTO Main_Pro
DOSPSW:
MESS "^M^JRequesting DOS password"
LOG SUSP
SET RECH OFF
SET RDIS OFF
TRAN "^M^JEnter the DOS password: "
GOSU Read_Com
IF FLAG(0)
GOTO DOSPERR
ENDI
LOG RESU
SET RECH ON
SET RDIS ON
SWIT S9
CASE S3
TRAN "^M^J"
ENDC
DEFA
TRAN "Sorry , but you're not authorized."
GOTO DOSPERR
ENDC
ENDS
LOG RESU
SET SUCC ON
RETU
DOSPERR:
LOG RESU
SET SUCC OFF
RETU
DROPDOS:
IF NULL S24
TRAN "^M^JCommand not recognized... try again"
GOTO Main_Pro
ENDI
GOSU DOSPSW
IF FAILED GOTO Main_Prompt
FOPENO "HOSTTEMP.BAT" TEXT
IF NOT SUCCESS
TRAN "File error - cannot drop to DOS^M^J"
GOTO Main_Pro
ENDI
WRIT "ECHO OFF!"
S0=S24
PRES S0
WRIT S0
WRIT "!"
WRIT "CD "*S29*"!"
WRIT "COM-AND /q/p/fHOSTART!"
WRIT "^Z"
FCLOSEO
CLOG "* Drop-to-DOS"
SET TTHR OFF
STAC CLEAR
STAC "HOSTTEMP.BAT!"
BYE
AutoBaud:
IF FIND S9 "1200"
SET BAUD 1200
RETU
ENDI
IF FIND S9 "2400"
SET BAUD 2400
RETU
ENDI
IF FIND S9 "4800"
SET BAUD 4800
RETU
ENDI
IF FIND S9 "9600"
SET BAUD 9600
RETU
ENDI
IF FIND S9 "14400" or FIND S9 "14.4"
SET BAUD 14k
RETU
ENDI
IF FIND S9 "19200" or FIND S9 "19.2"
SET BAUD 19k
RETU
ENDI
IF FIND S9 "38400" or FIND S9 "38.4"
SET BAUD 38k
RETU
ENDI
IF FIND S9 "57600" or FIND S9 "57.6"
SET BAUD 57k
RETU
ENDI
SET BAUD 300
RETU


  3 Responses to “Category : Communication (modem) tools and utilities
Archive   : CA29-3.ZIP
Filename : HOST.CMD

  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/