Heh. Jim saw the screenshot to my BBS maze game and wrote an actual game (a 10-LINER) using the maze. Unlike my early prototype, which had no goal or any point, his version has both ;-)
You can play it online here:
Heh. Jim saw the screenshot to my BBS maze game and wrote an actual game (a 10-LINER) using the maze. Unlike my early prototype, which had no goal or any point, his version has both ;-)
You can play it online here:
While looking for something completely unrelated, I ended up going through some of my old BBS disks. In addition to my *ALLRAM* tape-based BBS, I worked on several other BBSes that were never completed.
One one of those disks was something called MAZE.BAS. But why would a maze game be on a BBS disk?
Running it showed me this…

The player “P” can move around the maze while the enemy “*” tries to get to you. It uses “A-S” for left and right, and “W-Z” for up and down.
Ah, now I remember. I had learned about VIDTEXT/VIDEOTEXT/whatever having control codes to move the cursor around the screen, so I was going to write a maze game to run online in the BBS. If you had a compatible terminal program, you could play an actual “action” game rather than just some text adventure or simulation.
The numbers at the bottom were diagnostics messages. X/Y and movement direction for Up/Down and Left/Right.
Interesting.
Here is the listing…
0 'PALETTE12,63:PALETTE13,0
9 CLS
10 PRINT" #####
11 PRINT" ########## ##########
12 PRINT" # # #
13 PRINT" ### ###### ####### ###### ###
14 PRINT" # # # #
15 PRINT" # ### ################# ### #
16 PRINT" # # # #
17 PRINT" ####### #### #### #######
18 PRINT" # #
19 PRINT" # ###### # # ###### #
20 PRINT" # # ### # #
21 PRINT" # #### #### #
22 PRINT" ### ####### ###
23 PRINT" #### ####
24 PRINT" ###########
25 MX=15:MY=1:PX=15:PY=13
30 POKE1024+(PY*32+PX),80:POKE1024+(MY*32+MX),96
31 PRINT@512-32,PX;PY;XP;YP,MX;MY;X;Y;
35 X=SGN(PX-MX):Y=SGN(PY-MY):Z=(1024+(MY*32+MX))
36 IFPEEK(Z+(Y*32))=96 THENMY=MY+Y ELSEIFPEEK(Z+Y*32+X)=96 THENMX=MX+X:GOTO39
37 IFPEEK(Z+X)=96 THENMX=MX+X:GOTO39
39 POKE1024+(MY*32+MX),42
40 A$=INKEY$:IFA$=""THEN55
45 IFA$="W"THENYP=-1:XP=0 ELSEIFA$="Z"THENYP=+1:XP=0
50 IFA$="A"THENXP=-1:YP=0 ELSEIFA$="S"THENXP=+1:YP=0
55 IFPEEK(1024+(PY*32+PX)+(32*YP)+XP)=96 THENPOKE(1024+PY*32+PX),96:PX=PX+XP:PY=PY+YP
60 GOTO30
999 GOTO999
Using what I know about BASIC today, I would tackle this in quite a different manner.
Maybe I will, as a benchmark exercise.
Until then…
While going through some random disk images, I found some text files that seem to be the Sub-Etha Software ads, before we took them to the printshop to have them typeset by a professional.
First, this looks like the first ad we planned to run in Rainbow magazine, before we got a deal to do a quarter page inside. Note the company name was going to be Forty-Two Technology and the phone # listed was before I had a dedicated line.
Multi-Basic-- Ever wonder why, with 128K or 512K, you cannot use even 32K under RS-Dos? Well now there's MultiBasic, making possible, without adding ANY commands, the use of ALL of your CoCo3's memory by basic. Have several programs loaded in memory at once, able to call subroutines from each other, move between each other, even load other programs from disk, all without variable loss or interruption of program flow.
Shadow BBS-- Finally, a CoCo3 RS-Dos BBS with power, speed, and flair. Uses RS232 Pak or serial port. Features include full ANSI, X/Y Modem, 28 line 40/80 column support, 240 byte onscreen status window, software clock, up to 255 independently numbered message areas, borderlines, one-liner discussions, surveys, auto-messages, doors to external programs, user profiles, full sysop utilities, much, much more! See for yourself, call ShadowBBS HQ at (409)63-REALM. Order thru BBS or thru: Forty-Two Technology, PO Box 4242, Lufkin, TX 75901. (409)637-7604.
Next up is the prototype for the ad we did run, featuring MultiBASIC and SHADOW BBS by Terry Todd. We didn’t have a dedicated phone number yet, so the 632-4200 was just a made up one for the mockup.
_____________________________________________________________
| |
| |
| |
| |
| |
| |
| MULTIBASIC - Use all 128K/512K of your CoCo 3 without |
| learning ANY new commands! Have several programs loaded |
| at once sharing subroutines and variables! Load programs |
| without losing variables, and more! INTRO. PRICE: $24.95 |
| |
| SHADOW BBS - An RS-Dos BBS with Power, Speed, and Flair! |
| ANSI, X/Y Modem, Clock, Surveys, AutoMessage, Up to 255 |
| Msg Areas, User Profiles, Doors, Borderlines, Full SysOp |
| Utilities, and Much, Much More! Runs on 128K CoCo 3 with |
| Disk Drive(s), Serial Port OR RS232 pak! Call and see |
| for yourself! (409) 63-REALM INTRO. PRICE: $34.95 |
| |
| Sub-Etha Software Call or write for information! |
| P.O. Box 152442 Add $2.00 S&H and $3.00 C.O.D. |
| Lufkin, TX 75901 Texas residents add 8.25% tax. |
| (409) 632-4200 "Don't Panic!" |
|___________________________________________________________|
Next, another prototype… Much closer to what ended up being typeset and published – and even has the real phone number. These blank spots at the top where were the logo was going to go. I did these ASCII ones to show them exactly what we wanted.
_____________________________________________________________
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| Ever wonder why, with a 128K or 512K CoCo 3 you cannot |
| even use 32K under RS-Dos? Well, now there's MultiBasic, |
| making possible without adding ANY commands the use of |
| your CoCo 3's "hidden" memory by Basic. Have several |
| programs loaded in memory at once able to call |
| subroutines from each other. Move between programs and |
| load other programs from disk without variable loss or |
| interruption of program flow. A "must-have" utility for |
| Basic programmers! |
| |
| INTRODUCTORY PRICE ............................... $24.95 |
| |
| |
| /) Shadow BBS (\ |
| Complete RS-Dos BBS with Low Hardware Requirements! |
| |
| Finally, an RS-Dos CoCo 3 BBS with power, speed, and |
| flair! Uses RS232 Pak OR serial port! Features include |
| ANSI, X/Y Modem file transfers, 28 line 40/80 column |
| support, 240 byte on-screen status window, software |
| clock, up to 255 independently numbered message areas, |
| borderlines, one-liner discussions, surveys, automessage, |
| doors to external programs, user profiles, full SysOp |
| utilities, and much, much more! And unlike most BBSs |
| you've seen, no hard drive, RS232 Pak, or memory upgrade |
| is required! Shadow BBS will run on a 128K CoCo 3 with |
| one disk drive and a modem, yet it is capable of taking |
| advantage of all the hardware your system includes. A |
| full appreciation of Shadow BBS comes not, however, from |
| it's many features or it's low hardware requirements, but |
| from the flair and smoothness of the program itself. We |
| want you to see what this incredible BBS can do. Call |
| The Shadow's Realm, the official Shadow BBS HQ system, at |
| (409) 63-REALM (300/1200 Baud, 24 Hrs.) and see for |
| yourself! |
| |
| INTRODUCTORY PRICE ............................... $34.95 |
| |
| |
| Sub-Etha Software Call or Write for Information! |
| P.O. Box 142442 Add $2.00 S&H and $2.50 C.O.D. |
| Lufkin, Texas 75915 Texas residents add 8.25% tax. |
| (409) 639-ETHA [3842] "Don't Panic!" |
|___________________________________________________________|
And this one, AD4.txt, is another variation:
_____________________________________________________________
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|___________________________________________________________|
|| ||
|| *: MultiBasic :* ||
|| More Memory for Basic without Learning New Commands! ||
|| ||
|| Ever wonder why, with a 128K or 512K CoCo 3 you cannot ||
|| even use 32K under RS-Dos? Well, now there's ||
|| MultiBasic, making possible without adding ANY commands ||
|| the use of your CoCo 3's "hidden" memory by Basic. ||
|| Have several programs loaded in memory at once able to ||
|| call subroutines from each other. Move between ||
|| programs and load other programs from disk without ||
|| variable loss or interruption of program flow. A ||
|| "must-have" utility for Basic programmers! ||
|| ||
|| INTRODUCTORY PRICE ............................. $24.95 ||
|| ||
|| ||
|| *: Shadow BBS :* ||
|| Complete RS-Dos BBS with Low Hardware Requirements! ||
|| ||
|| Finally, an RS-Dos CoCo 3 BBS with power, speed, and ||
|| flair! Uses RS232 Pak OR serial port! Features include ||
|| ANSI, X/Y Modem file transfers, 28 line 40/80 column ||
|| support, 240 byte on-screen status window, software ||
|| clock, up to 255 independently numbered message areas, ||
|| borderlines (quotes), one-liner discussions, surveys, ||
|| automessage, doors to external programs, user profiles, ||
|| full SysOp utilities, and much, much more! And unlike ||
|| most BBSs you've seen, no hard drive, RS232 Pak, or ||
|| memory upgrade is required! Shadow BBS will run on a ||
|| 128K CoCo 3 with one disk drive and a modem, yet it is ||
|| capable of taking advantage of all the hardware your ||
|| system includes. A full appreciation of Shadow BBS ||
|| comes not, however, from it's many features or it's low ||
|| hardware requirements, but from the flair and ||
|| smoothness of the program itself. We want you to see ||
|| what this incredible BBS can do. Call The Shadow's ||
|| Realm, the official Shadow BBS HQ system, at (409) ||
|| 63-REALM (300/1200 Baud, 24 Hrs.) and see for yourself! ||
|| ||
|| INTRODUCTORY PRICE ............................. $34.95 ||
||_________________________________________________________||
| |
| Sub-Etha Software Call or Write for Information! |
| P.O. Box 152442 Add $2.50 S&H and $3.50 C.O.D. |
| Lufkin, Texas 75915 Texas residents add 8.25% tax. |
| (409) 639-ETHA [3842] "Don't Panic -- We Ship Fast!" |
|___________________________________________________________|
I guess by this next one we trusted the typesetting person, since it was just the raw text:
Happy Holidays From...
SUB-ETHA SOFTWARE
"In Support of the CoCo"
Thanks to those who stopped by our booth at the CoCo Fest!
*: MiniBanners :*
Multiple Line Banners on ANY Printer!
NEW! Create single or multiple line banners with adjustable heights and
widths. Up to 16 lines of text with independently sized characters. Even
works with daisy wheel and non-graphic printers! Includes over 30 fonts!
INTRODUCTORY PRICE ................................................ $14.95
*: MultiBasic :*
More Memory for Basic without Learning New Commands!
PRETTY NEW! Tired of being limited to 22K for Basic? We were too, so we
created MultiBasic, a utility which allows you to use the "hidden" memory of
your CoCo 3 without learning ANY new commands. Load multiple programs, disk
chain, share subroutines and variables, all without interrupting program flow.
HOLIDAY PRICE ..................................................... $24.95
*: Shadow BBS :*
Complete RS-Dos BBS with Low Hardware Requirements!
ALSO PRETTY NEW! Finally, an RS-Dos BBS with power, speed, and flair. Uses
RS232 Pak OR serial port. Does not require a hard drive or memory upgrade!
Features: SysOp Utilities, Up to 255 Msg Areas, X/Y Modem, ANSI, Status
Window, Clock, AutoMessage, User Surveys and Profiles, and too much more to
mention here! A full appreciation of Shadow BBS comes not, however, from it's
many features or low hardware requirements, but from the flair and smoothness
of the program itself. We want you to see what this BBS can do. Call the
Shadow's Realm, the official Shadow BBS HQ, at (409) 63-REALM (300-2400 Baud,
24 Hrs.) and see for yourself!
HOLIDAY PRICE ..................................................... $34.95
I wonder what else I will find as I go through these things…
There is a whole generation that has no idea how much cool stuff folks did with text and backspace.
One of my favorites was the “spinning cursor.” Thanks to slow speeds of 300 baud modems, you could get some interesting effects by printing a letter, then printing a character like a slash (“/”), then a backspace, then a dash (“-“), then a backspace, then a backslash (“\”), then a backspace, then a vertical bar (“|”) or exclamation mark (“!”) if your system did not have the vertical bar. Then a backspace and the next letter of the message.
Apparently I got nostalgic about this effect some time ago. I just found this “Spinning Cursor” C project I wrote on the Online GDB compiler:
https://onlinegdb.com/56zozL_gRp
Go there and you can RUN the project and see it in all its glory…
I have not gotten time to play with this, but this article is a deep dive in to writing assembly language subroutines for Color BASIC:
QBasic lives? I wanted to try out the BASIC to 6809 program:
https://nowhereman999.wordpress.com/2024/07/27/coco-basic-to-6809-compiler/
It is written in a modern implementation of QBASIC:
https://www.qb64phoenix.com
That runs on Windows, Mac and Linux and compiles executables. Interesting cross-platform way to do code ;-)
Back in the early 1980s, a friend of mine had TRS-80 Model III in their house. His mother was a writer, and had gotten it to use for writing books.
I believe it was this TRS-80 where I saw a version of Monopoly that taught me a strategy I had never learned as a kid:
The computer bought EVERYTHING it landed on, even if it had to mortgage properties to do so.
This simple strategy was a gamble, since you could end up with too many mortgaged properties and no source of income from rent. But. by doing this, the computer would end up owning so many random pieces it made it difficult to own a monopoly yourself.
And since then, that is how I played Monopoly. When it worked, it created some awfully long games (if no one had a monopoly to quickly drive other players bankrupt when they landed on their hotels).
In more modern times, I have watched YouTube videos concerning Monopoly strategies. They will break down the statistical odds of landing on any particular piece of property. For example, you know a pair of dice can produce values from 2 to 12. If truly random, the odds of getting a “1 and 1” should be the same as getting a “3 and 5.” Rather than focus on dice rolls, the strategies take into consideration things that alter locations: Go To Jail, Advance to Go, Take a Ride on Reading, etc.
These cards existing means there are more chances for a player to end up on Go, Reading Railroad, Jail, etc. This means the property squares after those spots have more chances of being landed on.
But I digress… As Internet Rabbit Holes do, this led me to watch other videos about statistics in things like card games. In a randomly shuffled deck, there should be as much chance for the first card to be Ace of Spaces as there is for it to be Three of Clubs. It is random, after all.
For that first card drawn, that is a 1 out of 52 chance to be any card in the deck. (52 cards in the deck.)
But as a game plays on, there are fewer cards, so the odds of getting any of the remaining cards increases. For the second card drawn, you now know there is a 0% chance of getting whatever the first card is, and a 1 in 51 chance of getting any of the rest.
And so it continues…
For games like Blackjack or 21, you do not really care if it is a Ten of Diamonds or a King of Hearts or a Queen of Clubs or a Jack of Spades. They all have the value of 10 in the game. Thus, the likelihood of drawing a ten card is much higher than any other card in the deck.
You have four suits (clubs, spades, hearts, diamonds) so there are four of each card – Aces, Two through Ten, Jacks, Queens, and Kings. This means there are 16 cards in the deck that could be a value of 10 in the game. When you draw the first card, you should have a 16 in 52 chance of it being a ten card. That is about a 33% chance!
If you pay attention to what cards have been seen (either by you having it, or seeing it face up with another player), you can eliminate those cards from the possibilities — changing the odds of what you will get.
This is basically what I understand card counting to be. If you play a game, and you know you’ve seen three Kings so far (either in your hand, or played by others), you now know instead of four chances to draw a King, you only have one.
I know this has been done before, and quite possible even on a Radio Shack Color Computer, but I thought it might be fun to create a program that displays the percentage likelihood of drawing a particular card from a deck. I suppose it could have the Blackjack/21 rule, where it treads 10, Jack, Queen and King the same, versus a “whole deck” rule where each card is unique (where you really need an 8 of Clubs to complete some run in poker or whatever game that does that; I barely know blackjack, and have never played poker).
I plan to play with this when I get time, but I decided to post this now in case others might want to work on it as well.
I envision a program that displays all the cards on the screen with a percentage below it. As cards are randomly drawn, that card’s percentage goes to 0% and all the others are adjusted.
It might be fun to visualize.
More to come, when time allows…
Grade school (and junior high, and high school, and college) would have been easier if I could remember all the “facts” I read in text books, or that my teachers told me. But, most of them left my mind moments after they entered. Yet, somehow I can remember…
POKE 113,0:EXEC 40999
I also remember things like:
POKE 65495,0
And even…
FOR A=0 TO 255:POKE 140,0:EXEC 43345:NEXT
Those Radio Shack Color Computer BASIC commands seem to be forever stored in my long term memory. Even some 6809 assembly remained after decades of non-use:
START LDX #1024
LOOP INC ,X+
CMPX #1535
BNE LOOP
BRA START
Why do I still remember this!?
Another thing that is etched in to my memory is M1PQ.
In my junior high school English class (around 1981-1982) I met a boy named Jimmy. Jimmy was my gateway in to home computers, Hitchhiker’s Guide to the Galaxy, phone phreaking and much more. I believe he also introduced me to bulletin board systems.
Neither of us had a home computer (as we called them back then) yet, but we’d visit the local Radio Shack (so long ago, it not only existed, but has a space in the name separating the words). Using a TRS-80 Model III and their 300 baud modem, we’d dial in to local Houston, Texas BBSes. Radio Shack is also where I learned to program BASIC. I recall using a book Jimmy had, and writing programs out on paper, then going in on Saturday to type them in and see if they worked. (Back then, Radio Shacks and most everything else was closed on Sunday in Texas due to “Blue Laws,” whatever they were.)
At the time, few “home computers” existed. The IBM-PC, if it existed at all, would have been brand new and not generally known by non-business customers. If a school had a “computer room” it would have been most likely populated with Apple 2 machines or TRS-80s. (Though one of my schools had some Commodore PETs.)
Most of the bulletin board systems I dialed in to ran on Apple 2s using software called NET-WORKS. Here is the Wikipedia entry:
https://en.wikipedia.org/wiki/Net-Works_II
The BBS Documentary website has a disk image of it:
http://software.bbsdocumentary.com/APPLE/II/NETWORKS/
And as I wrote up this article, I even found a website about this BBS, including some documentation!
https://www.callapple.org/documentation/networksii-bbs/
In those early days, many BBSes did not have the concept of “username” and “password.” Some just used a password! I guess we were more honest back then, since if you registered and tried a password someone else already had, the BBS would just say “that password is already taken.” Security? What’s that?
Some systems used a username and password, similar to today, but you didn’t even get to choose your password. They used a user number encoded in to a randomly generated password. Apple 2 Net-Works (and, I believe, BBS Express for the Atari 8-bits) did that. For example, if you were user 42, your randomly assigned password might be “A42BC”. I have never seen the source, but it appeared to just chose three random letters and stuck the user number after the first letter. I recall my BBS Express password was a similar format, but “A42BCD” with an extra character.
But Apple Net-Works had a flaw. When you first ran the software to configure it, it would assign a password for the SysOp (system operator) who would be in control of the BBS. It would generate the password M1PQ. SysOps who did not realize this would be using a password that hackers would most certainly try as their first guess.
I don’t know where I learned about this, but probably on some hacker or phreaker BBS … which was probably running the Net-Works software ;-)
At the time, I thought this was some kind of secret backdoor built in to the software, but today I expect it may have been caused by the non randomness of random.
See also: my article on the RND command in Color BASIC.
If you powered up an Apple 2 fresh, and printed ten random numbers between 1-100, I expect you’d get the same series of numbers each time you powered up and did that. (Any Apple 2 users here who can confirm?)

If Apple BASIC worked like that, then perhaps it was just code not taking any steps to seed the random number generator so each time it ran from a fresh power up, it would generate the same sequences of “random” numbers.
Either way, M1PQ was a well-known SysOp password for the NET-WORKS BBS software.
You can see I have even referenced it here on this site:

The reason I mention this is convoluted. Yesterday I received a letter from Change Healthcare, which I had never heard of. It was informing me of a data breach that happened this past February 2024. I was affected, and could sign up for free credit monitoring.
I had never heard of this company, and suspected this to be a scam. What a clever way to get folks to give out their personal information — “hey, sign up to free credit monitoring. Just give us your social security number, date of birth, and account numbers to monitor.” Yeah, right.
But some searching led to many news articles about the data breach, including one on my insurance provider’s website. Apparently they used Change Healthcare and thus, this alert was legit.
I decided to sign up for the credit monitoring. During that process, I saw that the site had some tools you could use. One was a password verifier. I typed in “monkey123” (a famous password of modern times) and it said it was medium strength. Well, that password verifier sucks, I thought. But then I noticed it explained this password was in leaks and should not be used.
Interesting. Instead of just telling you the quality of your password, it could tell you if that particular password has been found in a data breach.
So naturally, I had to type in M1PQ:

Somewhere, out there, someone actually used M1PQ – the most infamous default password from the early 1980s BBS scene – on the internet, somewhere, and it got leaked.
So, kids, don’t use M1PQ. It wasn’t a good password in 1984, and it is not a good password in 2024.
Yet, it’s one password I have never forgotten.
And so it begins…
I want to visualize some playing card statistics, and the easiest way I could think of to do this was to write a program in BASIC. Of course.
There are many approaches I can take, so as I put figure it out I will “show my work” and experiments that help me figure out which one will work best.
For my task, I will greatly simplify a deck of cards by ignoring suits (I just care if it’s an Ace, a Five, a King or whatever). I figure I can store it as a 52-character string representing each card:
A123456789JQKA123456789JQKA123456789JQKA123456789JQK
I could “shuffle” this “deck” and end up with a string in “random” order. I believe I have touched on randomizing a list in the past, and had some great suggestions in comments on how to do it better. Forgetting all of that, let’s just say I end up with as string that gets randomized.
But I digress…
The next question will be: “How many Kings are left in the deck?”
Some of you will already see I am heading down a poor path for doing this, but let’s start there anyway.
One way of counting a specific character in a string is to loop through it and use MID$ to pull out an individual character. Something like this:
FOR A=1 TO LEN(A$)
IF MID$(A$,A,1)="S" THEN C=C+1
NEXT
That would count all the “S” characters that appear in the string. Since every time MID$ is used it has to build a new string representing that portion of the original string, this should be our slowest way to do this. On a system with tons of strings in use, string manipulation gets real slow. For such a simple program, this might be fast enough.
Another approach, which was originally shown to me during a word wrap article as a submission, would be to use VARPTR to get the memory location of the 5-byte string ID memory, and then go to the memory where the string bytes are stored and use PEEK to look for them. You can find details in my earlier article on VARTPR.
The memory location that VARPTR returns will have the length of string as the first byte (byte 0), then an empty byte (byte 1, always 0), then the next two bytes will be the address where the string is stored (bytes 2 and 3) followed by a zero (byte 4). Knowing this, something like this would do the same thing as MID$:
A=VARPTR(A$)
SL=PEEK(A)
SS=PEEK(A+2)*256+PEEK(A+3)
FOR A=SS TO SS+SL-1
IF PEEK(A)=ASC("S") THEN C=C+1
NEXT
And do it faster.
VARPTR is a legal BASIC function, but it still seems nasty to reach in to string memory to do this. Thus, I came up with the idea of using INSTR. This function returns the start location of a matching string in another string, or 0 if not found:
PRINT INSTR("ABCDEFG","D")
That should print 4, since a “D” is located at the 4th position in the string.
You can also add an additional parameter which is where in the string to start searching. Doing this:
PRINT INSTR(5,"ABCDEFG","D")
…would print 0, because it starts scanning at the 5th character (just past the D) of the string, and then won’t find anymore.
I could start using INSTR with a position of 1 (first character), and if it comes back with a value other than 0, I found one. That value will be the position of the found character. I could then loop back and use that position + 1 to scan again at the character after the match. Repeat until a 0 (no more found) is returned. That lets the scan for characters be done by the assembly code of the BASIC ROM and is even faster. It looks like this:
F=0
xxx F=INSTR(F+1,A$,T$):IF F>0 THEN C=C+1:GOTO xxx
And we put them all together in a benchmark test program…
10 ' COUNTSTR.BAS
20 A$="THIS IS A STRING I AM GOING TO USE FOR TESTING. I WANT IT TO BE VERY LONG SO IT TAKES A LONG TIME TO PARSE."
30 T$="S":T=ASC(T$)
40 '
50 ' MID$
60 '
70 PRINT "MID$:";TAB(9);
80 TIMER=0:C=0
90 FOR A=1 TO LEN(A$)
100 IF MID$(A$,A,1)=T$ THEN C=C+1
110 NEXT
120 PRINT C,TIMER
130 '
140 ' VARPTR
150 '
160 PRINT "VARPTR:";TAB(9);
170 TIMER=0:C=0
180 A=VARPTR(A$)
190 SL=PEEK(A)
200 SS=PEEK(A+2)*256+PEEK(A+3)
210 FOR A=SS TO SS+SL-1
220 IF PEEK(A)=T THEN C=C+1
230 NEXT
240 PRINT C,TIMER
250 '
260 ' INSTR
270 '
280 PRINT "INSTR:";TAB(9);
290 TIMER=0:C=0:F=0
300 F=INSTR(F+1,A$,T$):IF F>0 THEN C=C+1:GOTO 300
310 PRINT C,TIMER
And running prints:

Wow, using INSTR is six times faster than MID$? And four times faster than VARPTR. Nice.
Now you know a bit about what I need to do. I need to represent cards in a deck (and be able to “draw” cards from that deck) and calculate how many of a specific card remain in the deck.
Since I do not need to track or show the suits (hearts, spaced, clubs, diamonds), I figure I could use one byte in a string.
To be continued … but in the meantime, do you have a better approach? Comment away!
Hat tip to Boisy P. for posting this link in one of the Facebook CoCo groups.
NEAT!!!!
https://microcorelabs.wordpress.com/2024/07/16/mcl6809-drop-in-motorola-6809e-emulator/