[Coco] Allen, Allen, my buddy, you're gonna love this.

Allen Huffman alsplace at pobox.com
Thu Aug 14 00:15:16 EDT 2025


You have my attention:

> On Aug 13, 2025, at 6:09 PM, Juan Castro via Coco <coco at maltedmedia.com> wrote:
> 
> 10 LOF
> 20 MKN
> 30 AS
> 40 LPEEK
> 50 BUTTON
> 60 HPOINT
> 70 ERNO
> 80 ERLIN


Let me wrap my brain around this. I combined the program like this so it would tokenize and there would be no line numbers in between.

10 LOF MKN AS LPEEK BUTTON HPOINT ERNO ERLIN

I saved it out to a virtual disk, then used my HEX dump program (I was trying to remember how to do direct access, so I googled and found an article on my blog!):

0 'HEXDUMP.BAS
10 LINE INPUT "FILENAME:";F$
20 OPEN "D",#1,F$,1
30 FIELD #1,1 AS BT$
40 OF=0:C=0
50 FOR R=1 TO LOF(1)
60 IF C=0 THEN PRINT:PRINT USING"####   ";OF;
70 GET #1,R
80 BT=ASC(BT$)
90 IF BT<&H10 THEN PRINT "0";
100 PRINT HEX$(BT);" ";
110 C=C+1:IF C>7 THEN C=0
120 OF=OF+1
140 NEXT
150 CLOSE #1

When I run that, I see this:

FF 00 1F 26 1E 00 0A FF
A5 20 4D 4B 4E 20 FF A7
20 FF A9 20 FF AA 20 FF
AB 20 FF AC 20 FF AD 00
00 00

Looking for the space (ASCII 32, so $20 hex) breaks this ...

10 LOF MKN AS LPEEK BUTTON HPOINT ERNO ERLIN

Into this…

FF AF 20 LOF (DECB)
4D  4B 4E 20 MKN? Was this just a test to see it put the letters in?
FF A7 20 AS (AS was from DECB too wasn’t it?)

…what is FF A8? Ah, I see. A8 is SUPPOSED to be LPEEK, according to Super Extended Color BASIC Unravelled...

FF A9 20 LPEEK (supposed to be A8)
FF AA 20 BUTTON (A9)
FF AB 20 HPOINT (AA)
FF AC 20 ERNO (AB)
FF AD 00 ERLIN (AC)

> These are (according to the Unravelled books) secondary tokens FFA5 to
> FFAC. So they should show up in the binary. BUUUUUUT if you bring the
> binary .BAS file to a PC and explore its contents with an hex editor, this
> is what you'll find:


So SECB is tokening these wrong, and de-tokenizing them wrong the same way?

I see it does this when checking for these extended tokens:

SUBB #$52  SUBTRACT OUT THE NON-ENHANCED BASIC TOKENS

That must work since it finds the tokens. I see it checks ranges, then when it thinks it is in the CoCo 3 range for these keywords, it points X to the token table for them and goes back to the normal ROM stuff outside of CoCo 3.

I guess one would have to look at what else goes there and see if it is a base-0 versus base-1 issue that was overlooked.

Okay, following...


--
Allen Huffman - PO Box 7634 - Urbandale IA 50323 - 515-999-0227 (vmail/TXT only)
http://www.subethasoftware.com - https://www.facebook.com/subethasoftware




More information about the Coco mailing list