home *** CD-ROM | disk | FTP | other *** search
- FLATWARE Presents: Documentation, Utah-style!
-
- This file is the beta-version documentation for the following programs:
-
- FOSIL006.Com
-
-
-
- What it does:
-
- FOSIL006.Com will do a number of "usefull" things. Most important is
- the ability to initialize and deinitialize the FOSSIL driver. The
- program will also send a string to the modem on any com port, if there
- is a CD. The program has the ability to turn the DTR on and off on any
- port and it can also enable and disable the watchdog function of the
- FOSSIL driver on any port. FOSIL006.Com has the ability to use any of
- the standard com ports (com1: through com16:), although the acutal
- ability to use the higher com ports depends on the FOSSIL driver.
-
-
- Who needs it:
-
- 99.9% of all SysOp's will never need this program. However, for the
- three of us who do, it is indespensable. The people who may need this
- program are SysOps who run Opus (or any BBS which uses the FOSSIL *and*
- is capable of running "doors" or outside programs) and DoubleDOS with
- doors or outside programs running in the *other* DoubleDOS partition.
- This program is only needed *if* the doors use the FOSSIL driver.
- However, to these people, the doors usually won't run right if this
- program (or programs like it) isn't used.
-
-
- Get to the point!:
-
- Here's the problem: Opus (for example) drops out to dos to run the
- batch file which switches partitions and runs the doors "on the other
- side" of DoubleDOS. Fine. The batch file "sends" the command to the
- other side to start another batch file in the other partition. Still
- fine. The door runs, and it uses the FOSSIL, and everything *usually*
- works well. Then...the program exits back to the batch file and the
- batch file tells the other partition to start up again (see examples
- somewhere else in this file (probably)). No problem. The other side
- fires back up and exits back to Opus. Oops! Opus comes up, pukes and
- dies. Well, that's what has happened in my case, anyway. Here's what
- is going wrong: When the FOSSIL-usin' program in the other partition
- starts up, it "steals" the FOSSIL away from the other partition, and
- when it exits, Opus can't get the FOSSIL back. This makes Opus go nuts.
-
- Here's the fix: Turn off the FOSSIL in the Opus partition *before* you
- switch over to the other side, *then* turn the FOSSIL back on over there
- before you run the door. That way the door doesn't have to steal the
- FOSSIL away. After the door exits, turn the FOSSIL off in the "other"
- partition (where you just ran the door from) and switch back to Opus.
- Before you exit back to Opus from the batch file, turn the FOSSIL on
- again, and Opus will be happy.
-
- Here's how: Turning the FOSSIL on and off is where my program comes in.
- Here are examples of how to use FOSIL006.Com with Kram Mail:
-
- ---Kram.Bat:
-
- Rem * Batch file to run Kram Mail from the other DDOS partition on com1:
- echo off
-
- Rem Check for activity in the other partition
- FlipStat.Com
- if errorlevel 1 goto busy
- Rem FlipStat will exit with errorlevel 1 or better if all is not well
-
- Rem Turn the FOSSIL off before you change over
- FOSIL006.Com f 0
-
- Rem Send the command to start the batch file in the other partition
- Send Kram1.Bat
-
- Rem Watch the other side or it won't work right
- Switch
-
- Rem Run a "child process" here while Kram Mail runs over there
- Command.Com
-
- Rem all done over there, fire the FOSSIL up again and exit back to Opus
- FOSIL006.Com n 0
-
- Rem Skip the message about being busy, and we're all done
- goto End
-
- Rem Tell the user that the program is not available right now
- :Busy
- FOSIL006.Com s 0 Sorry, Kram Mail is not available now, please try later.
-
- Rem If the other side is busy, we can just fall through and exit because
- Rem we checked the FlipStat before we turned the FOSSIL off, so we don't
- Rem need to turn it back on again.
-
- :End
-
- Rem *ALWAYS* put an exit at the end of your batch files. With Opus, if
- Rem don't, you'll get those crazy message numbers.
-
- exit
-
- ---
-
- ---Kram1.Bat
-
- Rem Batch file to run Kram Mail from the other DDOS partition on com1:
- echo off
-
- Rem Turn the other partition off just in case there isn't enough ram to
- Rem run the shell "child" over there.
- Suspend.Com
-
- Rem Turn the FOSSIL on now over here since it should be available.
- FOSIL006.Com n 0
-
- Rem Run the door, and you're almost done
- KramMail
-
- Rem Turn the FOSSIL off and we're outta here
- FOSIL006.Com f 0
-
- Rem Well, turn the other side back on
- Resume.Com
-
- Rem Kill the child process over there
- Send exit
-
- Rem And put the display back in the right place
- Switch
-
- Rem *Now* you can quit
-
- exit
-
- ---
-
-
- New stuff on the block:
-
- There have been a couple of changes since v0.004. The program is "space-
- smart" now. That means that it knows how to deal with spaces in the command
- line. So now you can do something like this:
-
- FOSIL006 F 0
-
- And the program will parse the line properly. There is a special note here.
- For the most part, the command line used with versions 0.004 and earlier can
- still be used by version 0.006. However, when you are sending a string
- to the modem, the format has changed slightly. Here is another example:
-
- FOSIL006 S 0 Please wait for the door to open.
- ^-------,
- Look at this space -' It is now manditory to put a space between the port
- number and the first character of the string. If you don't put the space
- there, the program will hack off the first character of your string.
-
- Note:
- Only the first space of the string is ignored. If you put more than one space
- at the beginning of the string, all but the first space will be sent to the
- modem. One more example:
-
- FOSIL006 S 0 Please wait for the door to open.
-
- Would send " Please wait for the door to open." to the modem.
-
-
- Added features:
-
- Two new actions have been added to the program. Command and Get baud rate.
- Both of these actions are listed in the Actions List.
-
-
- Actions list:
-
- This section gives you a basic idea of what each of the commands does. The
- general format for FOSIL006 is:
-
- FOSIL006 A P [string]
-
- Boot the system
- This action will reboot the computer. Basically the same as a "three-
- fingered salute". While it seems pointless (at least to me) to
- specify a port on a re-boot, you must. In other words, when you
- reboot your computer with this action, you must still type
-
- FOSIL006 B 0
-
- or the program will report an error and exit without re-booting.
-
- C Send command
- This is the sister-action to Send string. When the program is requested
- to send a command, then if there is a carrier detected (CD or DCD), then
- the program will not send the command. However, if there is NO carrier
- detected, then the command will be sent to the modem.
-
- Disable watchdog
- This action will turn the FOSSIL watchdog function off, if it was turned
- on. When turned on, the watchdog function will reboot the computer if
- the user hangs up.
-
- Enable watchdog
- This action will turn the FOSSIL watchdog function on. It is advisable to
- turn the watchdog function on, anytime a user goes outside of the BBS.
-
- F Disable FOSSIL
- This action will turn the FOSSIL off. There is a big section somewhere
- else in this doc file which describes, in some detail, the usefullness
- of this action.
-
- Get baud rate
- This action will return the current baud rate to which the FOSSIL is set.
- The FOSSIL driver *MUST* be active when this action is used
- (FOSIL006 N 0). When using this action, the program will exit with
- the errorlevel set to the value of the baud rate of the FOSSIL. The
- following values are returned for their baud rate equvalents:
-
- baud errorlevel
- 38,400 38
- 19,200 192
- 9,600 96
- 4,800 48
- 2,400 24
- 1,200 12
- 600 60
- 300 30
-
- Please note that errorlevels for baud rates 38,400, 600, and 300 are
- different from the rest. 38,400 baud should be errorlevel 384, however
- the largest errorlevel which can be returned is 255. 300 baud should be
- errorlevel 3, and 600 baud should be errorlevel 6, however these values
- are reserved for error exits.
-
- NOTE: It seems that Get baud rate only works with X00 v1.20c and
- newer. Evidently, earlier versions of X00 did not return the
- correct baud rate.
-
- Lower DTR
- This action will drop the DATA TERMINAL READY line to the modem. The
- usual effect of this action will either hang up on a caller, or render the
- modem incapable of answering the phone.
-
- N Initialize FOSSIL
- This action will turn the FOSSIL on. There is a big section somewhere
- else in this doc file which describes, in some detail, the usefullness
- of this action.
-
- Raise DTR
- This action will raise the DATA TERMINAL READY line to the modem. The
- purpose of this action is usually to allow the modem to answer the phone.
- With some modems, if the DTR line is low, the modem will not accept
- commands from the computer.
-
- Send string
- This action will send the [string] listed in the command line format
- (above) to the user, if there is a carrier detected on the given comm
- port. The command is also echoed to the local terminal. If there is
- a carrier detected, then the word "Sending:" will appear on the local
- monitor, in front of the string.
-
-
- The action letter is not case-sensitive.
-
-
- "P" is the port number. This is the com port, and it is a single digit,
- 0-9 and A-F, where 0 is com1:.
-
- [string] is the user-defined string which will be sent to the port if
- the C or S actions are used.
-
- If you run the program without a command line, you will get a brief
- summary of all commands.
-
- If you ask FOSIL006.Com to turn the FOSSIL driver on, and it can't (for
- any reason), the program will exit with an errorlevel 1.
-
- If you run FOSIL006.Com with incorrect parameters, the program will
- display an error message and exit with errorlevel 2.
-
- If you run FOSIL006.Com with a bad action request, it will display an
- error message, and exit with errorlevel 3.
-
- If you run FOSIL006.Com with a bad port number, it will display an error
- message and exit with errorlevel 4.
-
- If you ask FOSIL006.Com to send a string to the modem, and you don't
- specify a string, it will display an error message and exit with
- errorlevel 5.
-
- If you ask FOSIL006.Com to send a command to the modem, and you don't
- specify a string, it will display an error message and exit with
- errorlevel 6.
-
- If you ask FOSIL006.Com to activate the watchdog function and there is
- no carrier detected on the requested comm port, then the program will
- display an error message and exit with errorlevel 7.
-
- So that's:
- errorlevel 7 if there is no carrier detected on a watchdog init
- errorlevel 6 if there is no string on a "command" request
- errorlevel 5 if there is no string on a "send" request
- errorlevel 4 if there is a bad port number
- errorlevel 3 if there is a bad action request
- errorlevel 2 if there are bad parameters
- errorlevel 1 if FOSIL006 n P can't init the FOSSIL driver on port P
-
-
- About the Send action. This was an after thought, really. I needed a
- way to send information to the com port when a user was online, so I
- could say something like, "Hold on a minute, the game will take a little
- while to load...". At first I just used the "echo Hold on... > com1:"
- command from the batch file. This had a real drawback because I use
- some of the doors when I am in local mode. When I use the doors in
- local mode, and that line echos the string out to the com port, then the
- modem sees the string in command mode. Sometimes, if you are really
- unlucky, you can send a command to the modem to dial the phone or do
- some other annoying thing. What the send command does when you call it
- is that it looks at the com port and if there is a carrier detected
- (CD), then the program will send the string (according to the command
- line format above) to the modem. If there is no CD (ie., nobody online)
- then the program will only print the string on the local screen. It
- will work on any com port (I think--I don't have 10 com ports to test it
- with <ahem>). If the send action does see a CD on the requested com
- port, then the program will print "Sending:" on the line before the
- string. That way you can tell when the program is sending stuff out to
- the modem (you can watch the modem, too, but not if you have an internal
- <grin>).
-
- It has been my experence that if you do not turn the FOSSIL on and off
- properly, when the FOSSIL-usin' program in the other partition runs, it
- will steal the FOSSIL and not give it back. I don't know how it does
- that. If you do not turn the FOSSIL off on the side where it is active,
- before you try to turn it on, on the other side, FOSIL006.Com will not
- be able to turn the FOSSIL on. It simply doesn't have access to the
- FOSSIL. Make sure that you turn the FOSSIL off on one side before you
- turn it on on the other side, or it won't work.
-
- With the current versions of both OPUS!COMM and X00, you can specify how
- many ports to support at any one time. If you tell the FOSSIL to
- only use one port, it will *not* limit the FOSSIL to only com1:. It
- only limits the FOSSIL to one port at any one given time. *huh*? What
- I mean is that you can limit the FOSSIL to one port, but it can be *any*
- port you want (and have installed on your machine). If you look at the
- format for calling FOSIL006.Com, you will notice that you can specify
- which com port to use (through com16:). You must be kinda carefull with
- this. If you tell FOSIL006.Com to turn on a port which doesn't exist,
- *boom*! It will lock up your system, and it'll be big-red-switch time.
- Also, when you turn the FOSSIL on with a certain port (ie. FOSIL006 n 2
- for com3:) you must turn it off of *that* port (ie. FOSIL006 f 2 *if*
- you did a FOSIL006 n 2 before) before you can use the FOSSIL with any
- other port.
-
- This program is not perfect. There are a lot of things which I would
- like to see it do (although it has come a long way since I first started
- coding it!). For starters, the program can't do more than one thing at
- a time. For instance, you can't turn on the FOSSIL, send a string, then
- turn the FOSSIL back off without running the program three times. Also,
- the program can't tell if the FOSSIL is running when it sends a string.
- So there are still lots of places to go with it, but in the mean time,
- let me know what you think of it.
-
- This program is still in beta test (and may be forever). That way I
- don't have to admit that I have a release version with a bug in it
- <grin>. If you find problems with this program, please send me a note
- and explain, in as much detail as possible, what is going on. If you
- could send me your batch files, it would really help, too. For bug
- reports and latest updates, I can be reached at:
-
- Flatland Center, Home of FLATWARE Opus 1:302/1.0 1-801-563-5359, HST
-
- This program is Copyright, (C) 1989, by Dave Bell. It has been released
- for public consumption. You may not sell this program or make profit
- via its distribution. No contribution is requested for its use. It is
- free of charge! Enjoy...
-
- Dave Bell, SysOp
- Flatland Center
- November 5, 1989
-
-