home *** CD-ROM | disk | FTP | other *** search
- ;
- ; BBS.cmd - simple Bulletin Board emulation for ProComm v 2.4.2
- ; Condensed program
- ;
- Setup:
- GoSu SetCommParam
- StartOfSession:
- If Conn
- Else
- GoTo StartOfSession
- EndI
- GoSu Login
- Assi S9 "!"
- GoSu LoginOK
- GoSu OpeningStatement
- GoTo MainMenu
-
- SetCommParam:
- Set Port COM1
- Set Baud 9600
- Set Data 8
- Set Dupl Half
- Set Pari None
- Set CR_I CR_L
- Set CR_O CR_L
- Set Flow On
- Set Alar Off
- Set Soun Off
- Set ASCI Line 1
- Set ASCI Echo On
- Retu
-
- CheckUsers:
- Swit S6
- Case "VERNON"
- Find S7 "VED"
- If Foun
- Assi S9 "OK"
- Retu
- EndI
- EndC
- Case "******"
- Find S7 "******"
- If Foun
- Assi S9 "OK"
- Retu
- EndI
- EndC
- Case "******"
- Find S7 "******"
- If Foun
- Assi S9 "OK"
- Retu
- EndI
- EndC
- Case "******"
- Find S7 "******"
- If Foun
- Assi S9 "OK"
- Retu
- EndI
- EndC
- Case "******"
- Find S7 "******"
- If Foun
- Assi S9 "OK"
- Retu
- EndI
- EndC
- Case "******"
- Find S7 "******"
- If Foun
- Assi S9 "OK"
- Retu
- EndI
- EndC
- Case "******"
- Find S7 "******"
- If Foun
- Assi S9 "OK"
- Retu
- EndI
- EndC
- Case "******"
- Find S7 "******"
- If Foun
- Assi S9 "OK"
- Retu
- EndI
- EndC
- Case "******"
- Find S7 "******"
- If Foun
- Assi S9 "OK"
- Retu
- EndI
- EndC
- Case "******"
- Find S7 "******"
- If Foun
- Assi S9 "OK"
- Retu
- EndI
- EndC
- EndS
- Assi S9 "BAD"
- Retu
-
- OpeningStatement:
- IsFi S6
- If Succ
- Send ASCII S6
- EndI
- Tran "!Press any key to begin ..."
- If Conn
- Else
- GoTo EndOfComm
- EndI
- RGet S6 1 120
- If Fail
- GoTo TimeOut
- EndI
- Retu
-
- Login:
- Assi S8 "pass 1"
- Tran "! ! ! ! ! ! ! ! ! !CONNECTION ESTABLISHED! !"
- LoginLoop:
- Tran "!Username : "
- If Conn
- Else
- GoTo EndOfComm
- EndI
- RGet S6 8 60
- If Fail
- GoTo TimeOut
- EndI
- Tran "!Password : "
- If Conn
- Else
- GoTo EndOfComm
- EndI
- RGet S7 20 60
- If Fail
- GoTo TimeOut
- EndI
- GoSu CheckUsers
- Find S9 "OK"
- If Foun
- Retu
- Else
- Swit S8
- Case "pass 1"
- Assi S8 "pass 2"
- GoTo TryAgain
- EndC
- Case "pass 2"
- Assi S8 "pass 3"
- GoTo TryAgain
- EndC
- Case "pass 3"
- GoTo TimeOut
- EndC
- EndS
- EndI
- TryAgain:
- Tran "!Invalid login ...!"
- GoTo LoginLoop
-
- LoginOK:
- Assi S7 " "
- Tran "! !Welcome "
- Tran S6
- Tran "!"
- Tran S9
- Retu
-
- MainMenu:
- Tran "! ! ! ! ! ! ! ! ! !"
- Tran "! ! ! ----- M A I N M E N U -----! !"
- Tran " 1. Directory of Files!"
- Tran " 2. Download Files!"
- Tran " 3. Upload Files!"
- Tran " 4. Leave a Message with SYSOP!"
- Tran " 5. Log Out!"
- Tran " ?. HELP! !"
- Tran " Make a selection -> "
- If Conn
- Else
- GoTo EndOfComm
- EndI
- RGet S6 1 240
- Tran "!"
- If Fail
- GoTo TimeOut
- EndI
- Swit S6
- Case "1"
- GoSu FileDir
- EndC
- Case "2"
- GoSu DownMenu
- EndC
- Case "3"
- GoSu UpMenu
- EndC
- Case "4"
- GoSu SysopMessage
- EndC
- Case "5"
- GoSu LogOut
- EndC
- Case "?"
- GoSu HelpMain
- EndC
- Defa
- Tran "^G Invalid key was pressed.!"
- EndC
- EndS
- GoTo MainMenu
-
- HelpMain:
- Tran "! ! ! *** H E L P ***"
- Tran "! 1. Directory of Files - displayes all the files available"
- Tran "! for download by you. Use Ctrl-S to stop the scrolling and"
- Tran "! Ctrl-Q to resume."
- Tran "!"
- Tran "! 2. Download Files - displays the Download Menu, that allows"
- Tran "! you to download available files. See this menu for additional"
- Tran "! information."
- Tran "!"
- Tran "! 3. Upload Files - displays the Upload Menu. See this menu"
- Tran "! for additional information."
- Tran "!"
- Tran "! 4. Leave a message for SYSOP - allows you to send a message"
- Tran "! to the Systems Operator. Type in the text when prompted and"
- Tran "! press Ctrl-Z when done. You have five minutes in which to"
- Tran "! enter information."
- Tran "! !Press any key ..."
- If Conn
- Else
- GoTo EndOfComm
- EndI
- RGet S6 1 120
- If Fail
- GoTo TimeOut
- EndI
- Retu
-
- DownMenu:
- Assi S7 "Xmodem"
- DownLoop:
- Tran "! ! ! ! ! ! ! ! ! !"
- Tran "! ! ! ----- D O W N L O A D -----! !"
- Tran " 1. Directory of Files!"
- Tran " 2. Protocol("
- Tran S7
- Tran ")!"
- Tran " 3. Download a file!"
- Tran " 4. Retu to MAIN MENU!"
- Tran " 5. Log Out!"
- Tran " ?. HELP! !"
- Tran " Make a selection -> "
- If Conn
- Else
- GoTo EndOfComm
- EndI
- RGet S6 1 240
- Tran "!"
- If Fail
- GoTo TimeOut
- EndI
- Swit S6
- Case "1"
- GoSu FileDir
- EndC
- Case "2"
- GoSu ChooseProtocol
- EndC
- Case "3"
- GoSu FileDown
- EndC
- Case "4"
- Retu
- EndC
- Case "5"
- GoSu LogOut
- EndC
- Case "?"
- GoSu HelpDown
- EndC
- Defa
- Tran "^G Invalid key was pressed.!"
- EndC
- EndS
- GoTo DownLoop
-
- HelpDown:
- Tran "! ! ! *** H E L P ***"
- Tran "! 1. Directory of Files - displayes all the files available"
- Tran "! for download by you. Use Ctrl-S to stop the scrolling and"
- Tran "! Ctrl-Q to resume."
- Tran "!"
- Tran "! 2. Protocol - displays the Protocol Menu, that allows"
- Tran "! you to select the Download File Transfer mode. The mode"
- Tran "! that appears in the parentheses is the currently selected"
- Tran "! protocol. See this menu for additional information."
- Tran "!"
- Tran "! 3. Download a File - enter the name of a file to download."
- Tran "! If the file exists, you will be prompted to prepare for"
- Tran "! download. NOTE: make sure you have the proper protocol set."
- Tran "! When the transfer is complete, the Download Menu should"
- Tran "! appear."
- Tran "! !Press any key ..."
- If Conn
- Else
- GoTo EndOfComm
- EndI
- RGet S6 1 120
- If Fail
- GoTo TimeOut
- EndI
- Retu
-
- UpMenu:
- Assi S7 "Xmodem"
- UpLoop:
- Tran "! ! ! ! ! ! ! ! ! !"
- Tran "! ! ! ----- U P L O A D -----! !"
- Tran " 1. Protocol("
- Tran S7
- Tran ")!"
- Tran " 2. Upload a file!"
- Tran " 3. Retu to MAIN MENU!"
- Tran " 4. Log Out!"
- Tran " ?. HELP! !"
- Tran " Make a selection -> "
- If Conn
- Else
- GoTo EndOfComm
- EndI
- RGet S6 1 240
- Tran "!"
- If Fail
- GoTo TimeOut
- EndI
- Swit S6
- Case "1"
- GoSu ChooseProtocol
- EndC
- Case "2"
- GoSu FileUp
- EndC
- Case "3"
- Retu
- EndC
- Case "4"
- GoSu LogOut
- EndC
- Case "?"
- GoSu HelpUp
- EndC
- Defa
- Tran "^G Invalid key was pressed.!"
- EndC
- EndS
- GoTo UpLoop
-
- HelpUp:
- Tran "! ! ! *** H E L P ***"
- Tran "! 1. Protocol - displays the Protocol Menu, that allows"
- Tran "! you to select the Upload File Transfer mode. The mode"
- Tran "! that appears in the parentheses is the currently selected"
- Tran "! protocol. See this menu for additional information."
- Tran "!"
- Tran "! 2. Upload a File - enter the name of a file to upload."
- Tran "! If the file does not exist, you will be prompted to prepare"
- Tran "! for upload. NOTE: make sure you have the proper protocol set."
- Tran "! When the transfer is complete, the Upload Menu should appear."
- Tran "! !Press any key ..."
- If Conn
- Else
- GoTo EndOfComm
- EndI
- RGet S6 1 120
- If Fail
- GoTo TimeOut
- EndI
- Retu
-
- ChooseProtocol:
- Tran "! ! ! ! ! ! ! ! ! !"
- Tran "! ! ! ----- P R O T O C O L -----! !"
- Tran " 1. Xmodem!"
- Tran " 2. ASCII!"
- Tran " 3. Kermit!"
- Tran " 4. Retu to Previous MENU!"
- Tran " 5. Log Out!"
- Tran " ?. HELP! !"
- Tran " Current("
- Tran S7
- Tran ")! !"
- Tran " Make a selection -> "
- If Conn
- Else
- GoTo EndOfComm
- EndI
- RGet S6 1 240
- Tran "!"
- If Fail
- GoTo TimeOut
- EndI
- Swit S6
- Case "1"
- Assi S7 "Xmodem"
- EndC
- Case "2"
- Assi S7 "ASCII"
- EndC
- Case "3"
- Assi S7 "Kermit"
- EndC
- Case "4"
- Retu
- EndC
- Case "5"
- GoSu LogOut
- EndC
- Case "?"
- GoSu HelpProto
- EndC
- Defa
- Tran "^G Invalid key was pressed.!"
- EndC
- EndS
- GoTo ChooseProtocol
-
- HelpProto:
- Tran "! ! ! *** H E L P ***"
- Tran "! 1. Xmodem - this file transfer protocol is the most widely"
- Tran "! used. Used for binary files (ARC,COM,EXE) as well as text"
- Tran "! (TXT,DOC) files. Data is sent in Blocks."
- Tran "!"
- Tran "! 2. ASCII - this file transfer protocol is used to send text"
- Tran "! files (TXT,DOC) ONLY. It cannot transfer binary (ARC,COM,EXE)"
- Tran "! files."
- Tran "!"
- Tran "! 3. Kermit - this file transfer protocol is used for binary"
- Tran "! (ARC,COM,EXE) as well as text (TXT,DOC) files. Data is sent"
- Tran "! in Packets."
- Tran "! !Press any key ..."
- If Conn
- Else
- GoTo EndOfComm
- EndI
- RGet S6 1 120
- If Fail
- GoTo TimeOut
- EndI
- Retu
-
- FileDir:
- IsFi "BBSDIR.TXT"
- If Fail
- Tran "!Directory not available at this time."
- Else
- Tran "! !Directory of Files!"
- Send ASCII "BBSDIR.TXT"
- Tran "!Press any key ..."
- If Conn
- Else
- GoTo EndOfComm
- EndI
- RGet S6 1 120
- If Fail
- GoTo TimeOut
- EndI
- EndI
- Retu
-
- FileDown:
- Tran "! !Enter the filename to download!-> "
- If Conn
- Else
- GoTo EndOfComm
- EndI
- RGet S6 12 120
- If Fail
- GoTo TimeOut
- EndI
- IsFi S6
- If Fail
- Tran "!^G!FILE NOT FOUND!Press any key ..."
- If Conn
- Else
- GoTo EndOfComm
- EndI
- RGet S6 1 120
- If Fail
- GoTo TimeOut
- EndI
- Retu
- EndI
- Tran "!Prepare for download and press <CR> when ready.!"
- Tran "Process will abort if not started in one minute. "
- Wait "^M" 120
- If Wait
- Else
- GoTo TimeOut
- EndI
- Swit S7
- Case "Xmodem"
- Send Xmodem S6
- EndC
- Case "ASCII"
- Send ASCII S6
- EndC
- Case "Kermit"
- Send Kermit S6
- EndC
- EndS
- Retu
-
- FileUp:
- Tran "! !Enter the filename to upload!-> "
- If Conn
- Else
- GoTo EndOfComm
- EndI
- RGet S6 12 120
- If Fail
- GoTo TimeOut
- EndI
- IsFi S6
- If Succ
- Tran "!^G!FILE ALREADY EXISTS!Press any key ..."
- If Conn
- Else
- GoTo EndOfComm
- EndI
- RGet S6 1 120
- If Fail
- GoTo TimeOut
- EndI
- Retu
- EndI
- Tran "!Prepare for upload and press <CR> when ready.!"
- Tran "Process will abort if not started in one minute. "
- Wait "^M" 120
- If Wait
- Else
- GoTo TimeOut
- EndI
- Swit S7
- Case "Xmodem"
- GetF Xmodem S6
- EndC
- Case "ASCII"
- GetF ASCII S6
- EndC
- Case "Kermit"
- GetF Kermit S6
- EndC
- EndS
- Retu
-
- LogOut:
- Tran "!Are you sure you want to LOG OUT ? <Y/N> "
- If Conn
- Else
- GoTo EndOfComm
- EndI
- RGet S6 1 30
- If Fail
- GoTo TimeOut
- EndI
- Find S6 "Y"
- If Foun
- Tran "! !"
- Tran S5
- Tran "Logging out. Disconnecting ..."
- GoTo EndOfComm
- EndI
- Retu
-
- SysopMessage:
- Tran "! !Do you wish to leave a message ? <Y/N> "
- If Conn
- Else
- GoTo EndOfComm
- EndI
- RGet S6 1 60
- If Fail
- GoTo TimeOut
- EndI
- Find S6 "Y"
- If Foun
- Tran "! !Enter your message below. Press Ctrl-Z when done.!"
- Tran "You have five minutes!"
- If Conn
- Else
- GoTo EndOfComm
- EndI
- Log Open "BBSMESG.TXT"
- Wait "^Z" 540
- Tran "!Message saved!"
- Log Clos
- EndI
- Retu
-
- TimeOut:
- Tran "^G! ! !Time Out has occurred. Disconnecting ..."
-
- EndOfComm:
- Hang
- GoTo StartOfSession