Undocumented 8.1 commands: Difference between revisions
No edit summary |
No edit summary |
||
| Line 128: | Line 128: | ||
| style="vertical-align: top;" | Message scanning used: <code>.01</code> | | style="vertical-align: top;" | Message scanning used: <code>.01</code> | ||
After each read, BASIC code manually checked for a message delimiter: <code>IF @0 = CHR$(14) THEN ...</code>. The byte <code>{0E}</code> ('''CHR$(14)''') acted as the message record separator. When this character was encountered, the system incremented or decremented message counters, control flow moved to the next message record, and the loop continued scanning until completion. The delimiter (end of message) detection was handled explicitly in BASIC. | After each read, BASIC code manually checked for a message delimiter: <code>IF @0 = CHR$(14) THEN ...</code>. The byte <code>{0E}</code> ('''CHR$(14)''') acted as the message record separator. When this character was encountered, the system incremented or decremented message counters, control flow moved to the next message record, and the loop continued scanning until completion. The delimiter (end of message) detection was handled explicitly in BASIC. | ||
| style="vertical-align: top;" | In Version 8.1, <code>.01</code> is replaced in message routines by: <code>.31</code>. The <code>.31</code> command performs the disk input operation and internally detects the message delimiter. Instead of BASIC checking <code>@0 = CHR$(14)</code>, Version 8.1 uses the ML variable <code>IF !55 THEN ...</code>. When <code>!55</code> becomes non-zero, the system has reached the end of the current message record, message counters are updated, and control moves to the next message or exits the loop. Delimiter detection is now handled inside the ML routine rather than in BASIC. | | style="vertical-align: top;" | In Version 8.1, <code>.01</code> is replaced in message routines by: <code>.31</code>. | ||
The <code>.31</code> command performs the disk input operation and internally detects the message delimiter. Instead of BASIC checking <code>@0 = CHR$(14)</code>, Version 8.1 uses the ML variable <code>IF !55 THEN ...</code>. When <code>!55</code> becomes non-zero, the system has reached the end of the current message record, message counters are updated, and control moves to the next message or exits the loop. Delimiter detection is now handled inside the ML routine rather than in BASIC. | |||
<strong>!55 – Message Record Delimiter Flag</strong> | <strong>!55 – Message Record Delimiter Flag</strong> | ||
Revision as of 21:11, 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
Observation (no conclusion): This is one of the more intriguing finds and it’s a hot mess – lines 3140, 3555 and 1525 are obviously the topics of interest. I can’t tell you what’s going on here, but here are some observations from my research:
|
| 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
Researching / Unknown |

























