I discovered that Color 64 (as well as Commodore 64 Kernal) does not use RAM location 2 at all, so I am using that address location to hold flags to utilize within the Color 64 BBS system. This particular mod will use two flags, one for SYSOP in or out of office using bit 1, the other to indicate if Sysop desires email notifications to be received using bit 2.
NOTE 1: Watch for any games that use location 2 to store data. I’ve found one to date! If you find one that does, just create two variables to store the values prior to the game execution, then restore the data after game completion.
NOTE 2: Email notifications requires the use of a python script on another local computer to the network. Please refer to email notification article.
The code below will toggle these two flags: SYSOP in or out when the left arrow " ← " is pressed locally and Email Notifications (yes/no) when the up arrow “↑” is pressed.
ALWAYS backup your files before performing these mods. That said, these mods have been running on my BBS for several months without issue.
1: √BBS.INIT
As in my previous post, line number 12510 is going to get moved to make room; I’m moving it to line 12518.
- Renumber line 12510 to 12518. Then, renumber line 12515 to 12519.
- Enter:
12510 geta$:ifa$="←"andpeek(2)and1thenpoke2,peek(2)and254:goto12518
12511 ifa$="←"thenpoke2,peek(2)or1
12513 ifa$="↑"andpeek(2)and2thenpoke2,peek(2)and253:goto12518
12514 ifa$="↑"thenpoke2,peek(2)or2
- For line 12518, remove GET statement and resume with the rest of the normal code with:
12518 ifa$<"-REVERSE CAPITAL E-“ora$>”-REVERSE CAPITAL L-"then12040:£poke53280,.
What Does it do?
This will check to see if left or up arrows are pressed. If left arrow, code will check to see if Bit 1 is set or not at memory location 2 and toggle. If up arrow, the same will occur for Bit 2.
For status display in √BBS.INIT:
4. Enter:
12061 print"-home–down 22 times-Sysop: “;
12062 ifpeek(2)and1thenprint"In “;:£print"Out”;
12063 print” Email Notify “;:ifpeek(2)and2thenprint"Yes”:£print"No "
Line 12065 now resumes normal code (ifm3andpeek(653)=4…)
What does it do?
This prints near the lower portion of the Waiting For Call screen the status of the two flags.
Note that line 12062 "In " has a space → “In < space >” and similarly line 12063 needs a space with "No "; otherwise, you could get a Sysop status of “Int” and a email notification status of “Nos”.
We will be adding one line to the code that was shown in our email notification routine to support our flag for enabling/disabling, right at line 35700 in √BBS.INIT:
Modify line 35700 to:
35700 ifpeek(2)and2then35701:£return
What does it do?
This will check our Email Notification flag to abort the routine if the flag is set to “No” or allow it to continue with line 35701.
√BBS.MSGS
This only deals with SYSOP in/out status. The sysop status is displayed to the user using two SEQ files that you’ll need to create. If they don’t exist, the system will continue on, but kinda defeats the purpose of having SYSOP IN or OUT status! Instead of SEQ files, you could always replace with a #“Sysop is in!” / #“Sysop is out!” statement.
- Here we will modify line 50 to read:
50 iflmthen51:£goto55
- Add:
51 f$=“√welcome2”:gosub205:ifpeek(2)and1thenf$=“√sysopin”:goto54
53 f$=“√sysopout”
54 gosub205:gosub13523:gosub8510:gosub9005
and then your original 8.1 code will continue with…
55 goto13100
Note: I have an extra gosub in my code (gosub 100 at line 54) which is unrelated to this modification.
What does it do?
LM is a flag that identifies to scan for mail when a user logs in, so this is tripped in √BBS.MSGS as we enter from the initial login. It is here that I stuffed extra code to display additional messages, including SYSOP IN or OUT. F$ denotes the filename, and the display file routine (gosub205) is called. But - please note - this will only be tripped with existing users. No scan is done for initial users, so the LM flag won’t work in this scenario. There’s probably a better solution out there, but I like where this code sits for now.
OPTIONAL: Also, for being able to adjust these flags remotely, I added a mod to √BBS.XFER.
√BBS.XFER
- Add following lines:
19100 #"Sysop is now ";:ifpeek(2)and1thenpoke2,peek(2)and254:#“out!”:return
19101 poke2,peek(2)or1:#“in!”:return
19120 #"Email Notification is now ";
19121 ifpeek(2)and2thenpoke2,peek(2)and253:#“Off”:£poke2,peek(2)or2:#“On”
19122 return
- then add…
22103 ifi$="sysop"thengosub19100:goto22020
22104 ifi$="email"thengosub19120:goto22020
This permits the two commands, “sysop” and “email” to be used in dos wedge to toggle the two flags.