System Tracing: Difference between revisions

From Color 64 BBS Wiki
No edit summary
No edit summary
 
Line 469: Line 469:
| Session Event Summary
| Session Event Summary
| Adds message and private-mail activity to the session event buffer.
| Adds message and private-mail activity to the session event buffer.
|}
= bbs.xfer Overlay =
== Overview ==
The '''bbs.xfer''' overlay provides the primary file transfer functions of Color 64 BBS. It manages uploads and downloads using XMODEM and Punter protocols, maintains download directories and upload descriptions, performs transfer accounting, and provides several SYSOP utilities including DOS commands, file copying, and SYSOP chat.
This overlay is responsible for several transfer-related functions, including:
* Uploading and downloading files
* Multi-file downloads
* Upload descriptions
* Download directory maintenance
* Download credit accounting
* Transfer time estimation
* Upload hold processing
* SYSOP DOS utility
* SYSOP chat
* Loading Games and Profile overlays
== Routine Summary ==
{| class="wikitable sortable"
! Lines
! Function
! Description
|-
! colspan="3" | Overlay Control
|-
| 1-106
| Overlay Return Control
| Uses the value of OV to determine where processing begins when bbs.xfer is loaded or resumed.
|-
| 89-104
| Overlay Selection
| Builds the filename needed when another Color 64 overlay must be loaded.
|-
| 35651-35652
| Additional Overlay Selection
| Loads bbs.games or bbs.profile when requested.
|-
| 9991-9999
| Error and BREAK Handling
| Records the program error or BREAK condition, closes open files, and returns control to bbs.init.
|-
! colspan="3" | Shared System Routines
|-
| 110-1180
| Shared System Routines
| Provides keyboard input, text-file display, disk selection, disk-status handling, confirmation prompts, and date/time processing.
|-
| 19010-19099
| Logoff and Cleanup
| Calculates remaining time, displays the logoff file, and removes temporary upload files.
|-
! colspan="3" | File Transfer Processing
|-
| 15915-15940
| Modem Response Handling
| Sends modem commands and waits for the expected modem response.
|-
| 16020-16050
| Configure Punter Block Size
| Allows the SYSOP to configure the Punter transfer block size.
|-
| 16060-16085
| Load Transfer Module
| Loads the XMODEM or Punter machine-language transfer module.
|-
| 16110-16230
| Select File Directory
| Displays the configured upload or download directories and selects an accessible directory.
|-
| 16300-16498
| Upload Processing
| Validates filenames, checks for duplicates, creates upload descriptions, performs file transfers, processes upload confirmation, updates download directories, and records upload statistics.
|-
| 16505-16610
| Download Processing
| Validates download requests, displays upload descriptions, performs file transfers, updates download credits, and records completed downloads.
|-
| 16680-16695
| Transfer Completion
| Waits for transfer completion, checks disk status, and processes transfer errors.
|-
| 16700-16720
| Transfer Abort Handling
| Displays aborted-transfer messages and waits for caller acknowledgement.
|-
| 16750-16760
| Upload Description Editor
| Creates and edits the upload description associated with a transferred file.
|-
| 16800-16990
| Transfer Estimation and Setup
| Calculates transfer size and estimated transfer time, verifies available online time and download credits, displays transfer statistics, and initializes protocol-specific transfer options.
|-
! colspan="3" | File Directory Management
|-
| 402-445
| Display File Directory
| Displays download directory listings and available disk space.
|-
| 6005-6999
| Download Directory Maintenance
| Adds, edits, scratches, releases, and updates download-directory entries.
|-
| 12800-14170
| File Maintenance Commands
| Performs SYSOP file maintenance including release, scratch, description editing, and related download-directory operations.
|-
| 15605-15690
| Multi-file Download Preparation
| Builds the multi-file download queue, validates requested files, and calculates cumulative transfer time and download credits.
|-
! colspan="3" | SYSOP Utilities
|-
| 19100-19122
| SYSOP Status
| Toggles SYSOP availability and email notification status.
|-
| 22010-22655
| SYSOP DOS Utility
| Provides direct DOS command access, directory display, file viewing, file copying, device selection, and Message Maker access.
|-
| 22701-22712
| Explicit SYSOP Status
| Sets the SYSOP in-office or out-of-office status.
|-
! colspan="3" | Caller and SYSOP Functions
|-
| 35700-35932
| SYSOP Chat
| Provides direct communication between the local SYSOP and the remote caller.
|-
! colspan="3" | Logging and Session Events
|-
| 8003-8010
| Buffer Caller Log
| Adds transfer-related activity to the caller log buffer.
|-
| 8020-8031
| Write Caller Log
| Writes buffered caller log information to disk.
|-
| 8032-8040
| Caller Log Drive Handling
| Processes drive commands and records nonfatal caller-log disk errors.
|-
| 35950
| Session Event Summary
| Adds upload and download activity to the session event buffer.
|}
|}



Latest revision as of 03:29, 27 July 2026

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.

bbs.msgs Overlay

Overview

The bbs.msgs overlay provides the primary public-message and private-mail functions of Color 64 BBS. It also contains the shared message editor and several supporting caller and SYSOP functions.

This overlay is responsible for several message-related functions, including:

  • Reading and posting public messages
  • Organizing messages by category and subject
  • Editing, scratching, linking, and changing message categories
  • Sending and reading private mail
  • Holding, deleting, forwarding, and replying to private mail
  • Sending feedback
  • Displaying SYSOP News
  • Displaying the membership list
  • Providing SYSOP chat
  • Processing commands while the overlay is active

Routine Summary

Lines Function Description
Overlay Control
1-106 Overlay Return Control Uses the value of OV to determine where processing begins when bbs.msgs is loaded or resumed.
89-104 Overlay Selection Builds the filename needed when another Color 64 overlay must be loaded.
9991-9999 Error and BREAK Handling Records the error or BREAK condition, closes open files, and returns control to bbs.init.
13010-13525 Main Command Processing Accepts caller commands, checks access levels, runs local message functions, or loads another overlay.
35651-35652 Additional Overlay Selection Loads bbs.games or bbs.profile when requested.
Input, Output, and File Control
110-1180 Shared System Routines Provides keyboard input, text-file display, disk selection, disk-status handling, confirmation prompts, and date and time processing.
60050-60051 Open Sequential File Opens a sequential file and optionally checks the resulting disk status.
Message Creation and Editing
1260-1598 Create and Store Message Creates message headers and stores completed public messages, private mail, feedback, and forwarded mail.
1300-2975 Message Editor Provides message entry, word wrap, listing, editing, insertion, deletion, MCI control, autosignatures, sending, and aborting.
36000-36010 Load Autosignature Loads the current caller's saved signature for use in the message editor.
Public Message Control
3005-3690 Read Public Messages Displays message categories, determines unread messages, follows subject chains, and processes message-reader commands.
3900-3945 Display Public Message Reads and displays the message header, routing information, subject, and message body.
4005-4095 Scratch Public Message Deletes an authorized public message and repairs the message index and subject links.
4210-4298 Change Message Category Moves an authorized message to another accessible category and updates its filename and message-index entry.
4510-4590 Change Message Link Removes a message from its current subject chain and links it to another subject.
4610-4697 Select Existing Subject Allows a caller posting a message to browse existing subjects and add the new message as a reply.
5010-5180 Edit Public Message Loads an authorized public message into the editor and stores the revision under its original message number.
36500 Message Ownership Error Informs the caller that the selected message does not belong to them.
Post Office and Private Mail
3710-3750 Post Office Menu Provides access to private mail, public-message posting, feedback, and the membership list.
7010-7021 Send Feedback Sends feedback to the SYSOP or allows an authorized caller to select another private-mail recipient.
9005-9450 Read Private Mail Scans the caller's mailbox and provides reread, delete, hold, forward, and autoreply functions.
9500-9650 Hold and Forward Mail Rebuilds held mail, forwards private mail, and supports local carbon copies.
12820-12885 Select Mail Recipient Resolves member names and numbers, verifies recipients, and routes local or network private mail.
Caller and SYSOP Functions
8510-8560 Display SYSOP News Displays SYSOP News dated on or after the current caller's last-called date.
12800-12816 Temporary User Settings Allows the local SYSOP to temporarily change the online caller's access level, time, transfer totals, or local/remote state.
13600-13695 Online Status and Connection Handling Displays caller status, checks remaining time, processes shared input, and handles a lost connection.
15915-15940 Modem Response Handling Sends modem commands and waits for the expected response.
18500 Open Password File Opens the password file for member-name and member-number verification.
19010-19099 Logoff and Cleanup Calculates remaining time, displays the logoff file, and removes temporary private-mail files.
19510-19595 Membership List Displays the complete membership list or searches it using a caller-supplied pattern.
35700-35932 SYSOP Chat Provides direct communication between the local SYSOP and the remote caller.
Logging and Session Events
8003-8010 Buffer Caller Log Adds message-related activity to the caller log buffer.
8020-8031 Write Caller Log Writes buffered caller log information to disk.
8032-8040 Caller Log Drive Handling Processes drive commands and records nonfatal caller-log disk errors.
35950 Session Event Summary Adds message and private-mail activity to the session event buffer.

bbs.xfer Overlay

Overview

The bbs.xfer overlay provides the primary file transfer functions of Color 64 BBS. It manages uploads and downloads using XMODEM and Punter protocols, maintains download directories and upload descriptions, performs transfer accounting, and provides several SYSOP utilities including DOS commands, file copying, and SYSOP chat.

This overlay is responsible for several transfer-related functions, including:

  • Uploading and downloading files
  • Multi-file downloads
  • Upload descriptions
  • Download directory maintenance
  • Download credit accounting
  • Transfer time estimation
  • Upload hold processing
  • SYSOP DOS utility
  • SYSOP chat
  • Loading Games and Profile overlays

Routine Summary

Lines Function Description
Overlay Control
1-106 Overlay Return Control Uses the value of OV to determine where processing begins when bbs.xfer is loaded or resumed.
89-104 Overlay Selection Builds the filename needed when another Color 64 overlay must be loaded.
35651-35652 Additional Overlay Selection Loads bbs.games or bbs.profile when requested.
9991-9999 Error and BREAK Handling Records the program error or BREAK condition, closes open files, and returns control to bbs.init.
Shared System Routines
110-1180 Shared System Routines Provides keyboard input, text-file display, disk selection, disk-status handling, confirmation prompts, and date/time processing.
19010-19099 Logoff and Cleanup Calculates remaining time, displays the logoff file, and removes temporary upload files.
File Transfer Processing
15915-15940 Modem Response Handling Sends modem commands and waits for the expected modem response.
16020-16050 Configure Punter Block Size Allows the SYSOP to configure the Punter transfer block size.
16060-16085 Load Transfer Module Loads the XMODEM or Punter machine-language transfer module.
16110-16230 Select File Directory Displays the configured upload or download directories and selects an accessible directory.
16300-16498 Upload Processing Validates filenames, checks for duplicates, creates upload descriptions, performs file transfers, processes upload confirmation, updates download directories, and records upload statistics.
16505-16610 Download Processing Validates download requests, displays upload descriptions, performs file transfers, updates download credits, and records completed downloads.
16680-16695 Transfer Completion Waits for transfer completion, checks disk status, and processes transfer errors.
16700-16720 Transfer Abort Handling Displays aborted-transfer messages and waits for caller acknowledgement.
16750-16760 Upload Description Editor Creates and edits the upload description associated with a transferred file.
16800-16990 Transfer Estimation and Setup Calculates transfer size and estimated transfer time, verifies available online time and download credits, displays transfer statistics, and initializes protocol-specific transfer options.
File Directory Management
402-445 Display File Directory Displays download directory listings and available disk space.
6005-6999 Download Directory Maintenance Adds, edits, scratches, releases, and updates download-directory entries.
12800-14170 File Maintenance Commands Performs SYSOP file maintenance including release, scratch, description editing, and related download-directory operations.
15605-15690 Multi-file Download Preparation Builds the multi-file download queue, validates requested files, and calculates cumulative transfer time and download credits.
SYSOP Utilities
19100-19122 SYSOP Status Toggles SYSOP availability and email notification status.
22010-22655 SYSOP DOS Utility Provides direct DOS command access, directory display, file viewing, file copying, device selection, and Message Maker access.
22701-22712 Explicit SYSOP Status Sets the SYSOP in-office or out-of-office status.
Caller and SYSOP Functions
35700-35932 SYSOP Chat Provides direct communication between the local SYSOP and the remote caller.
Logging and Session Events
8003-8010 Buffer Caller Log Adds transfer-related activity to the caller log buffer.
8020-8031 Write Caller Log Writes buffered caller log information to disk.
8032-8040 Caller Log Drive Handling Processes drive commands and records nonfatal caller-log disk errors.
35950 Session Event Summary Adds upload and download activity to the session event buffer.