File Channels
-------------
#5 			Serial Port

MBBS Variables
--------------------------------------------------------
A			Value read from the disk error channel.
B1			Constant - 56577, Data Port Register B
            If PEEK(B1) = 87, RI is high. (phone is ringing)
B2          Constant - 56579, Data Direction Register B
B$(5)		Message sub-board filenames 
BN$(5)		Message sub-board names
BN$			Sub-board number
BN			int version of sub-board number.
BX$(1)		Border Message #1.  Saved as rec #5 in the "bbfe" file.
BX$(2)      Border Message #2.  Saved as rec #6 in the "bbfe" file.
BX$(3)      Border Message #3.  Saved as rec #7 in the "bbfe" file.
BS			Block Size for file transfers. Hard coded to 255.
C$			User number.
C1$			Caller #.  Saved as rec # 4 in the "bbfe" file.
C1          Numeric version of the above.
CM$			Command entered at the main or message editor menu.
CH$			Input character to echo (in input routines)
CH			ASCII version of CH$
DC
DI$			Text to output to modem/console.
DT$			Message posting date
DX$			Date string
ES$			Error String if file open fails for downloads
F		 	Size in blocks of the file to be downloaded.
F9			Message Editor mode.
			0 = Normal message, 1 = email, 2 = feedback.
F$			User Name
FC			
FD
FM
FX			Number of feedback sent this call.
FZ$			"am" or "pm"
HH$			Current time, hour.
J$			Constant - chr$(10) (linefeed)  
			This gets reset to chr$(0) if the user doesn't need linefeeds.
JM          0 = no key pressed during output, 1 = key pressed during output.
KB$			Keyboard input 
KI          -1 = Local Mode, 0 = User Online.
KS			1 = Upper Case mode, 2 = Upper/Lower case mode.
L			Current user access level.
LF
LI$			String input from the user (see 52300)
LN			Message line count.
LO			Line number to replace.
LO$			File type, "p", "w" or "s"
LU$(1)      Last user #1.  Saved as rec #11 in the "bbfe" file.
LU$(2)      Last user #1.  Saved as rec #12 in the "bbfe" file.
LU$(3)      Last user #1.  Saved as rec #13 in the "bbfe" file.
MC			Mail count
MD			Mail waiting flag.
MJ			Message Base code jump target.
            1 = 6020, 2 = 20108, 3 = 22024
ML$(50)		Message editor text.
MM$			Current time, minutes.
MM$(?)		Contains message titles.
MN$			0 = AM, 1 = PM, saved as rec #1 in the "bbfe" file.
MN			Numeric version of MN$
MO$			Character input from modem.
N2$
N4			Current Border message to display.
N5$(1)		User associated with Border Message #1.  Saved as rec #8 in the "bbfe" file.
N5$(2)		User associated with Border Message #2.  Saved as rec #9 in the "bbfe" file.
N5$(3)		User associated with Border Message #2.  Saved as rec #10 in the "bbfe" file.
N6			Number of times the border has been changed during the current call.
NB$			Board to post a message on.
PC$			Prompt character for message editor.
PG          0 = page mode off, -1 (1?) page mode on.
PK$			Program name to download.
PW			-1 = echo a masking character for password entry, 0 = no output masking character.
SI			Constant - 54272 - SID Registers
T%(255)     ASCII/PETSCII output translation array.
T			Time in minutes for file transfer.
T$			Title of new message, also time in minutes for a file transfer.
TM$			Current time in HH:MM
TY			Program type to download - 1 = program, 2 = seq file, 3 = WordPro file
U			User ID number.
U$(1)		User's Name
U$(2)		User's City, State
U$(5)       User's Password
U$(6)       Last call date
U$(8)       Expert Mode 
UN			Record to position currently opened REL file to.
UU
V
V$(0)
V$(1)       User Name
V$(2)		User's City, State
V$(3)       User's phone number. (nnn-nnn-nnnn)
V$(4)		User's security level.
V$(5)       User's password.
V$(6)		Last call date (from DX$)
V$(7)       Call units remaining (starts with 150)
V$(8)       Expert mode "on" or "off" - defaults to "on".
W$			Character to output (See code @ 52000)
W			ASCII value of character to output (See code @ 52000)
X$			Current line number of the message buffer being displayed. (see 20800)
XZ
Z1$			3 letter month name.  Saved as rec #2 in the bbfe file.
Z2$     	Day number (1..31).  Saved as rec #3 in the bbfe file.
Z2 			Numeric version of Z2$
ZX$			Text to convert to upper (3000) or lower (3100) case.
ZY
ZZ


Subroutine Targets
------------------
1000		Caps input routine
			Forces input to upper case.
			
3000		Convert input string (ZX$) to upper case

3100		Convert input string (ZX$) to lower case

3200		Set board title based on selected board.

4000		Punter Downloads.

8000		Get current time in HH:MM

9600		Check for duplicate user name.
			N2$ contains name to search for.
			
10000		BBS entry point after caller connects.

10400		Read user account.
			If the record isn't present, just return.
			
13000		Change Border.

15000		User's Status

17005		New user info - displays "nmsg" file.

17050		System info - displays "smsg" file.

17075		Other BBSs - displays "omsg" file.

19000		Change Password

19500		Display command menu.

20000		Post Message.

20525		Message Editor: Replace Line

20600		Message Editor: Continue Entering Text

20620		Message Editor: Clear message contents and start over.

20800		Message Editor: List current editor buffer.

24000		Count number of messages in current sub-board, report count.

21000		Save Message.
21500		Save Message.

22000		Remove Message.

23000		Leave Feedback

24000		Read in message titles

24600		Save message titles

25000		Upper/Lower case switch

36000		Position pointer in REL file

40000		Input routine.
			Clears keyboard buffer (POKE 198,0)
			If there is a user online and the carrier is lost, re-run the BBS
			If F1 has been pressed, enter chat mode (52500)
			
42000		Log off

43000		Write EMail

44000		Read EMail

45000		EMail Main code

50000		Constructs ASCII/PETSCII translation tables.

52000		String Output entry point.
			if KS = 1 (Upper case only), code enters at line 
			52010
			if KS = 2 (Mixed case), code enters at line 52100.
			
52010		Outputs string DI$ to both screen and modem.
            Converts output to upper case.
			Converts PETSCII to ASCII via T%() array.
			
52100 		Outputs string DI$ to both screen and modem.
			No case conversion is made.
			Converts PETSCII to ASCII via T%() array.

52200		Yes/No input routine. 
			Checks for carrier loss.
			Y = 1, Yes. 
			Y = 0, No.
52300		Upper case input mode.  Value returned in LI$
			Clears keyboard buffer before checking for characters.
			Will re-run BBS if carrier is lost.
			Prevents entry of more than 79 characters.
			Input translated via F%() array (ASCII/PETSCII filter)
			
52500		Chat Mode - entered by pressing F1 at the console.