	The Tandy Trader BBS Version 3.0 SysOp Documentation
			James E. Howard
			 Mar 14, 1988

I. General Description and History of TT-BBS

	1. This BBS was written over a period exceeding a year.
The core of this system is the MiniBBS/BAS written by Michael
Bernstein. MiniBBS allows file transfer using xmodem protocol
and limited private mail to the SysOp. I have added a much more
secure and versatile file transfer section with extensive error
checking as well as a very sophisticated message base. My goal
was to achieve this in a single fast running module calling
only text files, the host program and an xmodem utility.

	Many modifications were made to the MiniHost/Cmd
version distributed with MiniBBS. Generally, it will do exactly
what the original version did before plus will patch itself
automatically for Model I or III use and, if instructed, will
patch itself for 4MHz use in a Model 4 (in Model III mode).
Several minor changes have been made in line input to replace
the DEL (ASCII 127) with a "regular" backspace (ASCII 8).
Additional routines were added to MiniHOST. One replaces
the PRINT command from BASIC so that a string can be printed
with the trailing blanks stripped off. The other routine gets
the free space of LDOS disks. If this last routine not used,
the system should run under most TRS operating systems. Another
adds a sound routine to page the sysop through the cassette
port of Model I/III computers or the speaker of model 4's.
A new baud rate detect scheme was also added to MiniHost to
eliminate the need for special modem cables and to extend
support to include up to 2400 baud modems. This scheme will
work with all 100% Hayes compatables at 300/1200/2400 without
change. Modem initialization strings are changed in Hayes/Bas
to reflect the new baud rate detect setup.

	Major changes in version 3 include adding City,State
to an extended user log as well as word-wrapping text, menus
and message display. The word-wrap is in BASIC subroutines
added to the end of the program and in a completely rewritten
substitute PRINT command in MINIHOST/CMD. Another change in
version 3 allows MESSAGE/DAT to be twice as large (3.8 megs).
The next version should allow the message numbers to be twice
are large also (up to 65,535).

All modifications are shown in the source code of MiniHost for
Z80 programmers.

***************************************************************
* Users of verion 2 will need to switch to the new            *
* MINIHOST/CMD, TTBBS/BAS, HELPxxxx/TXT files, NOTEA/TXT (the *
* user document) and USERSORT/BAS. You must convert your user *
* log to the extended format by running CONVUSER/BAS on your  *
* old USERS/DAT. The new blank fields in the new USERS/DAT    *
* will be filled in by users automatically when they call the *
* system the next time. The old USERS/DAT will be renamed /OLD*
***************************************************************

I. System requirements

	1. Computer

		This system is designed to run on a TRS-80
Model I,III or 4(in III mode). A minimum of 48k RAM is
required.

	2. Disk Drives

		This system will run with as little as one SSDD
floppy disk but two or more are recommended. The BBS will support
a hard drive without change.

	3. Operating System

		This system was written under LDOS 5.1.4 and
tested with LDOS 5.1.3 in a Model I and with both LDOS 5.1.4
and 5.3.0 in a Model 4P(in III mode). If lines 144 and 145 are
removed to skip checking the free space, it may run under
most any TRS type Dos. The BASIC must allow line numbers after
the RESTORE statement.

	4. Modem

		The modem is assumed to be 100% Hayes compatible.
The system will support 300/1200/2400 operation. It might work
with other types of autoanswer modems but this has not been
tested. Modem switch information can be obtained by listing
HAYES/BAS. No special cable is required.

III. SysOp Functions

	1. Startup Screen

		The startup screen is very abbreviated. All
that is displayed is the status of the chat toggle, and it will
disappear after a second or two.

You have these options by pressing (BREAK) and number:

		(1) Local entry - Enter the BBS just like a
caller. Be sure to take the phone off hook first.

		(2) List Messages - List the log file
(sometimes called dayfile) of callers and Private to SysOp
messages (BBS/DAT). You will get the option to list to printer
and this is recommended. You may kill the file after printing.
You will not need this option if you setup the BBS to print
this file automatically to a line printer.

		(3) Enter BASIC - Enter BASIC interpreter

		(4) Enter DOS - Go to Dos Ready

		(5) Toggle Chat - Turn chat noise maker on/off

************************************************************
* Note: You must reboot the system after entering BASIC or *
* DOS before taking callers again!                         *
************************************************************

	2. File Transfer

		The SysOp's file transfer will bypass the error
checking for regular users. You may download any file on the
system and upload as you desire. A second way for file
transfers would be by the use of the DOS COMMAND in the Utility
Menu to call the XMODEM30/CMD program directly:

XMODEM30 R FILENAME/EXT:d for the receiving of files by bbs.
XMODEM30 S FILENAME/EXT:d for sending a file from bbs.

	3. Chat

		To answer a user calling you for a chat, just
press down the (space bar). To exit chat press (clear) or
(shift)(clear). Press (clear) or (shift)(clear) to invoke a
chat at any prompt to the user. Except in Model I's, a "C" will
stay in the upper right hand corner of the screen if a users
calls for a chat. This will be cleared after the chat (or after
the caller hangs up).

	4. DOS commands

		You may do limited DOS commands remotely
or from the keyboard without crashing the system. Be careful!
I would stick with library commands like DIR and LIST or using
the xmodem30 program to transfer files. Normally my use of this
is limited to file transfer or remotely listing the BBS/DAT
file to check on BBS activity.

Note: The (break) key is filtered out so don't count on using
it! Ldos 5.3 uses the spacebar to page directories or listings.

	5. Deleting messages

		When the SysOp is reading messages, pausing
between them, he may press "D" to delete the current message.
Since the message will essentially be gone forever, you are
asked to verify with (Y/N) first! The only way to recover the
message is to reset a bit in the flags byte in the MESSAGE/DIR
file. See Technical section for bit used.

IV. Initialization of BBS

		The BBS comes in two library files, TTBBS1V3/ARC
and TTBBS2V3/ARC. The 1st library has all necessary files for
off-line preview of the system. The 2nd file contains
reference material and utilities. To get the system up and
running quickly for experimentation it is necessary to
unlibrary TTBBS1V3/ARC onto a system disk and place it into
drive:0. Next place a formated data disk in drive:1.
From Dos ready type:

		MINIHOST (enter)
		BASIC RUN "TTBBS (enter)

		Next press the (1) key for local entry to the
BBS and use Jim Howard for the name and PASSWORD for the
password. To set the system up properly read on....

	1. Files needed to operate:

		a) TTBBS/BAS - The BBS program in BASIC
		b) HAYES/BAS - Program to setup modem, load and
		 run TTBBS/BAS
		c) MINIHOST/CMD - Host driver which holds all
		 machine code
		d) XMODEM30/CMD - Xmodem file transfer utility
		e) TITLE/TXT - Title displayed to caller *
		f) NOTEA/TXT - Bulletin about system *
		g) NOTEB/TXT - System notes to caller *
		h) NOTEC/TXT - The User Documentation
		i) HELPMESS/TXT - Help file for message base
		j) HELPFILE/TXT - Help file for file transfer
		k) HELPMAIN/TXT - Help file for main menu
		l) HELPREAD/TXT - Help file for reading messages
		m) HELPEDIT/TXT - Help file for editing messages
		n) HELPUTIL/TXT - Help file for utility menu
		o) CATALOGA/TXT - Catalog of files (LRL=64) *
		p) USERS/DAT - File of users (LRL=80) * &
		q) MESSAGE/DIR - Message headings (LRL=80) &
		r) MESSAGE/DAT - Message text (LRL=60) &
		s) BBS/DAT - File of caller activity &

	* - You maintain this file using ASCII text editor (ie
		TED or a word processing program)
	& - The system uses this file and updates it when
		necessary. You may edit it using a file editor
		(ie FED or other file zapper)

	2. Reference files:

		b) MINIHOST/SRC - Source code for MiniHost/Cmd
		c) SYSOP/TXT - The SysOp Documentation

	3. Utility files:

		a) Strip/Cmd - Strips off bytes off end of file
		b) Strip/Doc - Docs for Strip/Cmd
		c) Md5/Cmd - PDS file for RAMDISK (4 in 3 mode)
		d) Md5/Doc - Docs for Md5/Cmd
		e) RTCFiltr/Cmd - Clock filter (4 in 3 mode)
		f) RTCFiltr/Doc - Docs for RTCFiltr/Cmd
		g) CatSort/Bas - Sorts Catalog?/Txt files
		h) UserSort/Bas - Sorts Users/Dat file
		i) TTShrink/Bas - Compresses message base
		j) ConvUser/Bas - Convert version 1 & 2 Users/Dat to
				version 3.

	4. Initial Setup of the BBS (assuming a two disk
	drives and LDOS operating system)

		a) FORMAT three disks (number 1,2,3)

		disk 1 - boot up system in drive:0 then is
		replaced with disk 2.
		disk 2 - replaces disk 1 after BBS software is
		loaded.
		disk 3 - data disk for message base, etc

		b) Copy system files to disks 1 & 2

			1) With Master Ldos disk in drive:0
			type:
				BACKUP SYS0/SYS:0 :1 (S)
				BACKUP /SYS:0 :1 (S)

			2) Create more room on disk 2 by:
				PURGE :1 (S,Q=Y)
			(then say "Y" to SYS0, SYS5, SYS9, &
			SYS13)

		c) Copy the following files to disk 1

			1) BASIC/CMD (or LBASIC/CMD)
			2) BASIC/OV3 (or LBASIC/OV3)
			3) HAYES/BAS
			4) MINIHOST/CMD
			5) TTBBS/BAS
			6) MODELA/III (if Model 4P only)

		d) Copy the following files to disk 2

			1) BASIC/OV3 (or LBASIC/OV3)
			2) NOTEA/TXT
			3) NOTEB/TXT
			4) NOTEC/TXT
			5) TITLE/TXT
			6) CATALOGA/DAT
			7) HELPFILE/TXT
			8) HELPMAIN/TXT
			9) HELPMESS/TXT
			10) HELPEDIT/TXT
			11) HELPREAD/TXT
			12) HELPMAIN/TXT
			13) USERS/DAT
			14) XMODEM30/CMD

		MESSAGE/DIR will be created on disk 2 in
		drive:0
		BBS/DAT will be created on disk 2 in drive:0
		MESSAGE/DAT will be created on disk 3 in
		drive:1

		e) Create a /JCL file to boot up the BBS on
disk 1. If you are running a Model I or III, leave off the "F"
for FAST after the MiniHost command. The "F" patches the host
for a 4 MHz CPU speed. You might even setup the AUTO command to
execute your /Jcl file for you.

		BUILD BBS (enter)
Sample		MINIHOST F (enter)
/Jcl		BASIC (F=3) RUN"HAYES/BAS" (enter)(break)

Sample		AUTO DO BBS/JCL (enter)
AUTO

V. File Maintenance.

	It takes a lot of time to maintain a BBS. Plan on an
hour or so per day. You will have to maintain several files
even after the initial setup of the BBS program.

	1) Users/Dat - This will will have to be maintained at
least partly by you. New users will have to be added (in
alphabetical order by name). Study the technical section to see
what information goes where. You will need to use a work proces-
sing program or other text editor. I like TED that comes with
Ldos because it doesn't append stray characters to the end of
the file which makes for trouble when the BBS tries to read
the file. Use STRIP/CMD to remove stray characters if necessary.
Another approach is to use a database like the original PROFILE
to maintain your user log. That's what I do and I have expanded
the length (lrl) to include room for address, phone number, etc.
All the information needed to add a new user can be found in
BBS/DAT when the person answers the registration questions.
UserSort/Bas is a utility that sorts the Users/Dat file.

	2) Catalog?/Dat - These files will also have to be
maintained by you using a word processing or text editor.
You will need a file for each catalog, named CATALOGA/TXT,
CATALOGB/TXT, etc. Each should be in alphabetical order also
and have no stray characters at the ends of the file. When a
user uploads a file, the name will be changed to a different
one. The format is two Z's followed by the day and time. The
extension is /UPL. You will need to look in the BBS/DAT for the
real name of the program and rename the file. Be very careful
to check out all files uploaded for any sign of trouble.
(copyrighted, for wrong computer, etc). I recommend removing
all extra line feeds in text files. The BBS will add them back
in during ASCII transfer anyway. CatSort/Bas is a utility
program that sorts all the Catalog files at once. Due to
searching restrictions, each catalog MUST have at least two
files.

	I would recommend that you place the names of all new
files in the Noteb/Txt section, especially if your catalog is
very large. That way users can find the new files faster.

	3) Message/Dir & Message/Dir - The message base files
will need to be shortened when they grow too large. Use the
utility program TTShrink/Bas to do this. This program does not
make a backup so make your own first! It corrects the internal
pointers, moves information to the front of the file then cuts
off the end of the file. It never makes a second file, just
modifies the old one. This utility program will only run on
Ldos due to the use of SET EOF function to shorten random
length files. It could be easily changed to write a new file.

VI. Modifications needed to customize the Tandy Trader BBS.

	1) Required changes:

		a) Change drive numbers in lines 2 & 3 to
whatever drives you are using. I would recommend in a two drive
system to put all BBS files on drive 0 except MESSAGE/DAT. Put
that file on drive 1 with the downloads. I normally run the
system on a hard drive, but have tested it using two double
sided drives (Drive:0 was a 40 track and drive:1 was a a 80
track) and found that I could have over 1500 messages online
and still have room for a dozen or so long downloads.
If you have more drives, use the extra ones for downloads. A
single sided 180k disk (drive:1) dedicated to messages should
hold the text of around 400 7-8 line messages and require only
32k from drive:0 for the headings. Remember: You don't need
BASIC/CMD, TTBBS/BAS or HAYES/BAS after you boot up the BBS.
That's why you replace the disk in drive:0 AFTER booting up and
gain all that wasted space. The UP$=":0" in line 2 assigns the
upload drive number.

		b) If you change the number of bases, then the
variable in line 2 called NB will have to be changed to ** ONE
LESS ** than the number of bases. Names of bases are changed in
line 3 and could carry on into lines 4 & 5.

		In like manner, change the number of bulletins
by changing variable NL in line 2 and and change the number
of catalogs by changing variable NC. Add the respective names
of bases and catalogs into the proper string arrays in
lines 3/4/5.

		In line 3, BP$="NNNNNPRNNN" assigns the ability
to have private messages. As set up, the first 5 and last 3
bases have (N)o private messages, the 6th (P)ermits optional
private messages and the 7th base (R)equires private messages.
		In line 41, unregistered caller are assigned
access to bases. Variable BF$="YYYYYY****" means access on the
1st six bases, and no access to the last four. If you want to
toggle off but still allow unregistered callers to toggle back
on a base, use the letter "N". An "*" can not be toggled!
		In line 2, SO$="A" gives read only access to
the system to users not in the user log. If you want to allow
them public message entry access but no file transfer
privileges change the "A" to "L". DO NOT MAKE THIS "R" OR "Z"!

		c) Line 44 must be adjusted to account for the
disk space you have allotted for MESSAGE/DAT (message text). If
you use the whole drive:1 of a two DDSS disk system then it
will hold about 174k characters. This is 174 x 1024 or
178,176 characters. Divide that by 60 characters per line and
you get 2,969.6 lines (round off to 2900 lines). Divide by 100,
and make the denominator into 29.00 instead of 655.35.
65535 is the max # of lines permitted on the system but it
requires 4 megs of disk space! Make sure that you
have allotted enough room for MESSAGE/DIR to match your
MESSAGE/DAT. On my system I need one /DIR entry for every 8 or
so message lines. Taking into account that the LRL's are
different, you will need about 17% of the space for you
headings in /DIR as for text in /TXT. A 174k text disk in
drive:1 would require saving at least 30k on drive:0 for
headings. You can use the Dos library command:

		CREATE MESSAGE/DIR:0 (SIZE=30)

to preallocate 30K of space so you (or an uploading user) won't
steal the disk space needed. You could also preallocate the
/DAT file. Doing this will not stop the file from growing
past the SIZE point, but will not let any other files use the
space.

		d) If your system is running at 2Mhz then line
170 should have INT(K/7) towards the end. Running at 4MHZ
requires an INT(K/14).

		e) Write your own NOTEA/TXT, NOTEB/TXT and
TITLE/TXT at least. Use your word processing program. If your
word processing program adds nulls or other characters to the
end of each file, you will want to strip them off using
STRIP/CMD (see STRIP/DOC). The way to find out if you have
extra bytes on the end of a file is to list the file (with
Ldos now) using the (H) parameter. The last byte should be a
carriage return (0D). If not, then use Strip/Cmd to eliminate
all characters after the 0D. (Strip/Cmd for Ldos 5.1.x)
Follow the formating requirements of entering messages for
proper display as these files will be displayed with word-wrap!


		f) If you are not running LDOS remove
lines 144 & 145. These lines calculate and display the upload
space on Ldos disks.

		g) If you want the BBS/DAT file printing on
your printer all the time, use "*PR" instead of the filename
in line 2. (Ldos only)

		h) Change the SysOp name from Jim Howard to
your name in lines 230 and 243.

		i) If updating from version 1 or 2, be sure to
run CONVUSER/BAS to extend your USERS/DAT file from lrl=64 to
lrl=80. All this program does is to rewrite the file with spaces
padding the 64th to 79th character. The TTBBS/BAS program will
prompt callers for the data if it is blank.

	2) Optional changes:

		a) If you like, go through the BASIC program,
TTBBS/BAS and change the name of the BBS in lines 56, 75,
107, 397 and 414.

		b) Change references in all /TXT files to
personalize your BBS. Be sure to save lots of copies of
"working" BBS files as you go. Sometimes too many changes can
get the system so fouled up that it won't run.

VI. Technical Section

	USERS/DAT (LRL=80)	** you must create this file		 	 				yourself! **

	Sample entry: (MUST BE IN ALPHABETICAL ORDER!)

JOHN WILLIAMS YYYNYYY***PASSWORD06/204360N3Y 1536R64ORLANDO, FL  (CR)
RICH ANDERSON YYYYYYY***BREAKER 05/27 030Y0Y    0L80TOLEDO, OH   (CR)

	John is a registered user with a password of PASSWORD.
He is allowed access to the first seven bases but chooses not
to read base 4. His last call was on June 20th and he has 43
minutes left for that day. Each new day he gets 60 minutes on
the system. He in not in the xpert mode and needs linefeeds and
3 nulls. The last message he read was number 1536. John's screen
width is 64 columns and he is from Orlando, Florida.

	Rich on the other hand needs to reregister for some
reason. He has not read the first messages yet! He used up all
his 30 minutes on May 27th and has not called back. He is in
the expert mode of menu prompting. He doesn't need nulls
but does need linefeeds. Rich has all the allowed bases
turned on but that is because the SysOp probably set up his
user log entry that way and he never changed it! Rich has an
80 column monitor and calls from Toledo, Ohio.

Note: The above example doesn't have the required spaces after the
name or city,state but you must make sure that your Users/Dat does
and that the carriage return is in the 80th position in the line!

N2$	NAME		20 ASCII CHARACTERS (UPPER CASE)
J1$	BASES		10 ASCII CHARACTERS
				Y = BASE TOGGLED ON
				N = BASE TOGGLED OFF
				* = NO ACCESS ALLOWED TO BASE
P2$	PASSWORD	8 ASCII CHARACTERS (UPPER CASE)
D2$	DATE LAST CALL	5 ASCII CHARACTERS (MM/DD)
M2$	TIME LEFT	2 ASCII CHARACTERS (0-99 MINUTES)
T2$	TIME/DAY MAX	2 ASCII CHARACTERS (0-99 MINUTES)
X2$	XPERT FLAG	1 ASCII CHARACTER (Y=eXpert, N=NOVICE)
Z2$	NULLS		1 ASCII CHARACTER (# NULLS 0-9)
L2$	LINE FEEDS	1 ASCII CHARACTER (Y=YES, N=NO)
R2$	LAST READ	5 ASCII CHARACTERS (LAST MSG # READ)
S2$	ACCESS		1 ASCII CHARACTER (A=UNREGISTERED,
				L=NEEDS TO REGISTER (MSGS ONLY),
				R=REGISTERED USER,
				Z=SYSOP ACCESS)
WW$	SCREEN WIDTH	2 ASCII CHARACTERS (32-80 COLUMNS)
J3$	CITY,STATE	20 ASCII CHARACTERS (UPPER CASE)
	RESERVED	1 ASCII BLANK
	CARRIAGE RETURN 1 ASCII CHARACTER (REQUIRED)

	TOTAL		80 ASCII CHARACTERS

Note: The number of bases can be easily expanded by adding
characters to J1$ and making minor changes to the TTBBS/BAS
program.


	CATALOGA/DAT (LRL=64)		** you must create
,				these files yourself! **

	Sample entry: (MUST BE IN ALPHABETICAL ORDER)

SYSOP DOC 45 The sysop documentation of TT-BBS (C/R)

	FILENAME	8 ASCII CHARACTERS (UPPERCASE)
	BLANK		1 ASCII BLANK
	EXTENSION	3 ASCII CHARACTERS (UPPERCASE)
	SECTORS		4 ASCII NUMBERS (RIGHT JUSTIFIED)
	BLANK		1 ASCII BLANK
	DESCRIPTION	46 ASCII CHARACTERS (LEFT JUSTIFIED)
	CARRIAGE RETURN 1 ASCII CHARACTER

	TOTAL			64 ASCII CHARACTERS


	MESSAGE/DAT (LRL=60)

MF$	TEXT		60 ASCII CHARACTERS (UPPER/
					LOWER CASE)


	MESSAGE/DIR (LRL=80)

M1$	FROM		20 ASCII CHARACTERS
M2$	TO		20 ASCII CHARACTERS
M3$	SUBJECT		20 ASCII CHARACTERS
M4$	DATE		5 BINARY BYTES
				1 - MONTH (1-12)
				1 - DAY (1-31)
				1 - YEAR (ADD TO 1900)
				1 - HOUR (0-23)
				1 - MINUTE (0-59)
M9$	BASE		1 BINARY (0-9)
MA$	NEXT		2 BINARY (PTR TO NEXT MSG IN
				/DIR OR 0)
MB$	PREVIOUS	2 BINARY (PTR TO PREV MSG IN
				/DIR OR 0)
MC$	TOP		2 BINARY (PTR TO TOP OF CHAIN IN
				/DIR OR SELF
MD$	RESERVED	2 BINARY 0
M5$	DATA POINTER	2 BINARY (PTR TO 1ST LINE OF
				TEXT IN /DAT)
M6$	LENGTH		1 BINARY (LENGTH TEXT IN LINES)
M7$	MESSAGE NUMBER	2 BINARY (1-32767)
M8$	FLAGS		1 BINARY 7TH BIT - ACTIVE=SET,
					DELETED=RESET
			 	6TH BIT - RECEIVED=SET
					NOT RECEIVED=RESET
			 	5TH BIT - PRIVATE=SET,
					PUBLIC=RESET
			 	BITS 0-4 RESERVED

	TOTAL			80 BINARY/ASCII CHARACTERS

		* * END OF SYSOP DOCUMENTATION * *
