Undocumented 8.1 commands: Difference between revisions
No edit summary |
No edit summary |
||
| Line 176: | Line 176: | ||
[[File:38_39_40_41_ex3_81.png|center|300px]] | [[File:38_39_40_41_ex3_81.png|center|300px]] | ||
|} | |} | ||
< | |||
'''Message Relink Commands in v8.1''' | |||
: | {| class="wikitable" | ||
|- | |||
! Command !! Purpose | |||
|- | |||
: | | .38 || Initialize / bind relink iterator operands | ||
: | |- | ||
:: | | .39 || Perform iterator scan step | ||
: | |- | ||
: | | .40 || Advance iterator (skip / continue) | ||
|- | |||
| .41 || Finalize relink process | |||
* | |} | ||
''' .38 – Relink Iterator Initialization (v8.1) ''' | |||
---- | |||
The <code>.38</code> command was introduced in Color64 v8.1 as part of the internal message relinking system and is the entry point of the entire process. It does not perform file I/O directly and does not read or write messages itself. Instead, it initializes and binds internal machine-language structures used by the message relinking iterator. | |||
It is designed to be used as the first step in a command sequence: | |||
: .38 → .39 → .40 / .41 | |||
This sequence replaces the more BASIC-driven record scanning logic found in v8.0. | |||
---- | |||
'''What .38 Does''' | |||
* Binds specific BASIC variables/arrays to ML-side descriptors | |||
* Registers operands for the relink iterator | |||
* Initializes scratch registers used by subsequent .39 operations | |||
* Prepares the ML environment for scanning and linking old message records | |||
In BBS.MSGS, this binding typically associates: | |||
: Slot 0 → MN (message number) | |||
: Slot 1 → MR% (message read flags array) | |||
The ML iterator then uses internal scratch registers such as: | |||
: ;0K | |||
: ;1K | |||
: ;0F | |||
These are later examined by BASIC to determine loop control and branching. | |||
---- | |||
In v8.0, message scanning and linking logic was performed directly in BASIC, including character comparisons and explicit loop control. | |||
In v8.1, this logic was moved into machine language for speed and structural cleanliness. BASIC now acts primarily as a decision layer while ML handles the iteration mechanics. | |||
---- | |||
'''Important Notes''' | |||
* .38 must precede .39 in relink routines | |||
* .38 does not itself advance or scan records | |||
* It prepares the ML environment used by the iterator | |||
* It is not a general-purpose file command | |||
* It is specific to the message relinking system | |||
---- | |||
'''Summary''' | |||
The <code>.38</code> command initializes the v8.1 message relink iterator by binding | |||
BASIC variables to ML-side structures. It marks the transition from the | |||
BASIC-driven record scanning model of v8.0 to the ML-driven iterator model of | |||
v8.1. | |||
It should be understood as a setup command rather than an action command. | |||
|} | |} | ||
| Line 271: | Line 331: | ||
| <strong>√bbs.msgs</strong> | | <strong>√bbs.msgs</strong> | ||
< | The <code>.32</code> command appears in v8.1 message handling code immediately before operations that read or process an individual message record. | ||
Unlike .31 (which performs record scanning) and .38 (which initializes the relink iterator), .32 establishes the active message context for the current record. | |||
It functions as a message-record “attach” or “open” operation. | |||
---- | |||
'''Observed Behavior in BBS.MSGS (v8.1)''' | |||
In the message display and processing routines, .32 appears: | |||
* After a message number has been determined | |||
* Before message text is accessed | |||
* Before read-status flags are modified | |||
* Before counters such as remaining private messages are updated | |||
The command does not itself loop or branch. It prepares the ML side so that subsequent operations operate on the correct message record. | |||
---- | |||
'''Functional Interpretation''' | |||
Based on comparison with v8.0 behavior: | |||
{| class="wikitable | |||
|- | |||
! 8.0 | |||
! 8.1 | |||
|- | |||
| | |||
* BASIC manually calculated offsets | |||
* BASIC performed sequential file positioning | |||
* BASIC handled record boundaries | |||
| | |||
* .31 scans | |||
* .32 selects/attaches the current record | |||
* ML maintains internal pointers to that record | |||
* BASIC then performs logic based on ML flags | |||
|} | |||
Therefore: | |||
.32 most likely performs one or more of the following internally: | |||
* Positions the file pointer to the current message record | |||
* Loads message header metadata into ML buffers | |||
* Prepares message body reading context | |||
* Updates internal state registers used by !55 and related flags | |||
---- | |||
'''Relationship to Other Commands''' | |||
{| class="wikitable" | |||
|- | |||
! Command !! Role in Message Processing | |||
|- | |||
| .31 || Scan for next message record boundary | |||
|- | |||
| .32 || Attach/open current message record | |||
|- | |||
| .38 || Initialize relink iterator | |||
|- | |||
| .39 || Execute relink scan step | |||
|- | |||
| .40 || Advance relink iterator | |||
|- | |||
| .41 || Finalize relink | |||
|} | |||
---- | |||
'''Important Notes''' | |||
* .32 does not itself advance to the next message. | |||
* It operates on the message selected by the iterator or scan routine. | |||
* It prepares the environment for message content access. | |||
* It is specific to message-handling routines and does not appear to be a general-purpose file command. | |||
---- | |||
'''Summary''' | |||
The <code>.32</code> command establishes the active message record context in | |||
Color64 v8.1. It represents the shift from BASIC-managed record positioning | |||
(v8.0) to ML-managed record attachment (v8.1). | |||
It should be understood as a message “open/attach” primitive used internally | |||
by BBS.MSGS. | |||
|} | |} | ||
Revision as of 21:48, 18 February 2026
At the time of this revision for Color 64 v8.1a, there are notably several ML related commands and variables that are not documented as well as some basic shortcuts and appear to have been introduced from the 8.1 upgrade. I find that comparing 8.0 code with 8.1 helps you along in figuring out what these undocumented items perform. Below are some of my notes and observations of what the code was in 8.0 and the observed shortcuts implemented in 8.1 Please note it is a work-in-progress and I don’t have all the answers (yet), so some of this is just “observation” without any conclusion!
Getting to understand some of the modified BASIC can be easy. If you have the ML loaded into your system, you can write your own program to test out the modified BASIC by having your first line call the ML routine: SYS49923
10 SYS49923 20 #"Test of program" 30 etc....
Below are some of my observations.
| Topic | Found in |
|---|---|
| Simple Addition | All overlays
Color 64 allows simple addition without using < var >=< same var >+< value > So "a=a+12" can alternately just be: "a+12". This only works with numbers (not strings) and other times, this just fails completely. Buyer beware. |
| Topic | Found in | ||||||
|---|---|---|---|---|---|---|---|
| Use of "THEN" in IF | all
Conclusion: “then” statements are not required for “if/then” – if <condition> <action> is legal in most cases. |
| Topic | Found in | ||||||
|---|---|---|---|---|---|---|---|
| .36 | √bbs.init
Conclusion: Undetermined, although notice line in 8.0 version that line 13645 has been dropped for the 8.1 variant. This command only occurs on this line in the overlays as part of the command prompt. When I dropped everything in line 13640 and just had “.36:return”, there was no box printed (of course), but the command entry functioned normally. This was also true if I just omitted everything except “return” – so I’m not sure what “.36” brings to the table. |
| Topic | Found in | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| .31 and !55 | √bbs.msgs
Conclusion: .31 – Message-Aware Disk Input (Version 8.1) Earlier documentation listed the ML command .31 as "not used." Analysis of Version 8.1 confirms this is incorrect. In Color 64 v8.1, the Comparison: Version 8.0 vs Version 8.1
|
| Topic | Found in | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| .38 / .39 / .40 / .41 and “;” variables | √bbs.msgs
Message Relink Commands in v8.1
.38 – Relink Iterator Initialization (v8.1) The It is designed to be used as the first step in a command sequence:
This sequence replaces the more BASIC-driven record scanning logic found in v8.0. What .38 Does
In BBS.MSGS, this binding typically associates:
The ML iterator then uses internal scratch registers such as:
These are later examined by BASIC to determine loop control and branching. In v8.0, message scanning and linking logic was performed directly in BASIC, including character comparisons and explicit loop control. In v8.1, this logic was moved into machine language for speed and structural cleanliness. BASIC now acts primarily as a decision layer while ML handles the iteration mechanics. Important Notes
Summary The It should be understood as a setup command rather than an action command. |
| Topic | Found in | ||||||
|---|---|---|---|---|---|---|---|
| if...£ | √bbs.msgs
Observation: Observe the 8.1 authors reversed the checks in variable comparisons as the conditions, with end-result being the same. Conclusion: Serves as an “not” function “(lv is not less than cm%(2,2) and lv not less than cm%(29,2) and fr does not equal 1, then print (P)rivate)” Another example:
|
| Topic | Found in | ||||||
|---|---|---|---|---|---|---|---|
| @ | √bbs.msgs
Conclusion: Seems to serve as an “if” keyword - but testing this theory in a traditional sense resulted in a syntax error. |
| Topic | Found in | ||||||
|---|---|---|---|---|---|---|---|
| [var$] | √bbs.msgs
Conclusion: Can serve as an empty variable check (null) |
| Topic | Found in | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| .32 | √bbs.msgs
The Unlike .31 (which performs record scanning) and .38 (which initializes the relink iterator), .32 establishes the active message context for the current record. It functions as a message-record “attach” or “open” operation. Observed Behavior in BBS.MSGS (v8.1) In the message display and processing routines, .32 appears:
The command does not itself loop or branch. It prepares the ML side so that subsequent operations operate on the correct message record. Functional Interpretation Based on comparison with v8.0 behavior:
Therefore: .32 most likely performs one or more of the following internally:
Relationship to Other Commands
Important Notes
Summary The It should be understood as a message “open/attach” primitive used internally by BBS.MSGS. |

























