System Tracing

From Color 64 BBS Wiki
Revision as of 19:23, 22 July 2026 by Admin (talk | contribs)

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.
10645-10647 Regenerate Message Index Prompt Prompts the Sysop during startup to optionally regenerate the message index by deleting the saved index file.
10800-10820 Load Message Index Loads the saved message index during startup. If the index file is missing or cannot be opened, processing automatically branches to the regeneration routine.
11210-11500 Regenerate Message Index Rebuilds the message index from the public message directory, sorts the results, and rebuilds the associated message information.
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 for caller log entry during crash.
9999 System Shutdown Saves system information, closes files, restores the environment, and shuts down the BBS.
BBS Entry Processing
12950-12990 Modem polling Monitors the modem while the BBS is in the Wait For Caller state and detects incoming calls.
13010-13060 Network ops - NW1 Calling OV 5 for NW1
13650-13695 Logoff processing Cleanup items for logoff
13899 Local Login from console Invoked by pressing F1 on Sysop Menu at WFC
13910-13930 Login processing (initial) Initial login processing for user
18110-19099 New User Processing Processing for new user registration and creation
18500 Open Password File
19110-19120 Invalid Sign-on Detected Processing for invalid credentials
19510-19595 Present Membership List Display membership list to user
File Area Support
16010-16012 Select File Directory Selects the configured upload or download directory.
Maintenance Duties
20010-22000 User File/Password Manager Editing of the User database (Password Maintenance)
24005-24400 Date & Time Modification System Date and Time Edit by Sysop
26210-26320 Time Limits Reset routine **resume**
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.