BBS.INIT

The following are breakdown of routines found in BBS.INIT - this is under construction.

bbs.init Overlay

Overview

The bbs.init overlay is the main startup and idle-state overlay for Color 64 BBS. It is the first overlay run when the BBS starts and remains active while the system is waiting for a caller.

This overlay is responsible for several core system functions, including:

  • Loading system parameters
  • Starting the BBS
  • Managing the idle and waiting-for-call state
  • Reading and updating user records
  • Daily system maintenance
  • Caller log file maintenance
  • Scheduled network checks
  • Program error handling
  • Crash recovery
  • Saving system data during shutdown

Routine Summary

Lines Function Description
Overlay Control
5-85 Overlay Return Control Uses the value of OV to determine which routine should run when control returns to bbs.init.
89-104 Overlay Selection Builds the filename needed when another overlay must be loaded.
Input and Output
105-160 Character Input and Output Performs character input, output, carrier detection, and carriage return handling.
202-280 Display Text File Opens and displays a text file while checking for disk errors.
300-380 Read User Input Reads a line of text from the caller or local keyboard.
390-400 Trim Input Removes leading and trailing spaces from entered text.
Drive and Disk Control
460-489 Select Drive Selects the configured device, drive, partition, or directory and processes any associated drive commands.
505-580 Disk Status Reads the disk drive status and reports disk errors.
710-795 Get File Size Returns the size of a file in Commodore disk blocks.
User File Control
910-946 Load User Record Loads a user record from the user file.
2710-2790 Update User Record Loads, updates, and saves another user's record during Sysop maintenance.
9450 Scratch Private User File Deletes a private file associated with a user account.
Caller Log File Control
8003-8010 Buffer Caller Log Adds text to the caller log buffer.
8020-8031 Write Caller Log Writes buffered caller log data to disk.
8032-8033 Process Drive Commands Processes drive commands associated with the caller log drive.
8034-8035 Find Command Channel Locates or assigns a disk command channel for caller log operations.
8036-8040 Caller Log Error Reports and records caller log disk errors.
8100-8170 Caller Log Utilities Displays, manages, or scratches the caller log.
Time and System Maintenance
1110-1180 Read Clock and Date Reads the current time and date and detects when a new day begins.
1521-1525 Remove Empty Message Base Removes an unused message base entry.
9810-9826 Save Message Index Saves the message index and related system variables.
9991-9992 Log Program Error Records BASIC program errors and BREAK conditions.
9999 System Shutdown Saves system information, closes files, restores the environment, and shuts down the BBS.
Printer Support
12900-12920 Select Printer Output Attempts to redirect local output to the printer.
12930 Restore Screen Output Returns local output to the screen.
File Area Support
16010-16012 Select File Directory Selects the configured upload or download directory.
Caller Log Maintenance
28570-28590 Check Caller Log Size Checks the caller log size and performs maintenance when needed.
28655 Load ASCII Support Loads the ASCII support module when required during caller log processing.