CP/M BASICs

37 views
Skip to first unread message

Lee Hart

unread,
Jul 2, 2024, 12:08:26 PMJul 2
to se...@googlegroups.com
I'm looking for a BASIC to include in the ROM of my Altaid 8800 (an Altair in an Altaid tin https://www.sunrise-ev.com/8080.htm). It runs CP/M, so a version that runs on CP/M would be ideal.

I have Heath's version of MBASIC 5.21 for the H89; but it doesn't run on the Altaid 8080. Does it run on an H8 with 8080, or does it need a Z80? Or is there some "trick" in it so it won't run on another CP/M machine? I also doubt that Microsoft would allow me to distribute their MBASIC (probably not).

So, I've been looking at various public domain Tiny BASICs. I settled on Palo Alto Tiny BASIC (PATB), which dates way back to 1977. It has some clever features, is well documented with commented source. I've entered the source, edited it to assemble with CP/M's ASM, and changed its I/O to use BDOS calls. It works! :-)

I'd like to add LOAD and SAVE commands so it can load and save programs on disk. But I have no experience in writing routines to create an FCB and do the various BDOS seldisk, open, read, write, etc. commands to do it. Does anyone know where to find a well-documented CP/M program source to show how to do this?

Virus-free.www.avast.com

Joseph Travis

unread,
Jul 2, 2024, 1:36:45 PMJul 2
to se...@googlegroups.com
Check out the attached book Lee.

BR,
Joe

--
You received this message because you are subscribed to the Google Groups "SEBHC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sebhc+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sebhc/CAF__8hdP-0y%2BQpWHYOK4M3H1R-_98OKKCzU8Y4YmnqnLXDWxXQ%40mail.gmail.com.

Glenn Roberts

unread,
Jul 2, 2024, 1:57:13 PMJul 2
to se...@googlegroups.com
My favorite CPM book! Thanks Joe! I have the paper version but didn’t know it was scanned. Good to have…


Sent from my iPad

On Jul 2, 2024, at 1:36 PM, Joseph Travis <jtravi...@gmail.com> wrote:



Douglas Miller

unread,
Jul 2, 2024, 2:29:24 PMJul 2
to SEBHC
There is a "fixmsoft.com" program that Magnolia Microsystems shipped with their CP/M, which I'm pretty sure "frees" a Heath-restricted copy of MBASIC.COM to run on other hardware. There are other copies of CP/M MBASIC.COM out there that don't have the same restrictions, too.

On Tuesday, July 2, 2024 at 11:08:26 AM UTC-5 Lee wrote:
...
I have Heath's version of MBASIC 5.21 for the H89; but it doesn't run on the Altaid 8080. Does it run on an H8 with 8080, or does it need a Z80? Or is there some "trick" in it so it won't run on another CP/M machine? I also doubt that Microsoft would allow me to distribute their MBASIC (probably not).
...

Virus-free.www.avast.com

Lee Hart

unread,
Jul 2, 2024, 2:52:10 PMJul 2
to se...@googlegroups.com
Thanks, Joe! I have that book, and it is excellent for general CP/M usage, and thoroughly covers the BIOS. It tells me what the BDOS functions are, but has ZERO information on exactly how to actually use them.

For example, how do you create a valid FCB? All the examples assume that the CCP has done it up for you on the command line. But there is a lot of work if a program has to create a valid filename (these characters are allowed, these are not etc.)

There is also a long sequence of events to deal with errors. Open a file; what if it doesn't exist. Then make it; but what if there's no room in the directory? What if the disk is full?

I'm a novice programmer. What I need is some kind of example, or at least a flowchart that tells me what steps need to be taken in this BASIC to LOAD and SAVE files without crashing the system.


Virus-free.www.avast.com

--
You received this message because you are subscribed to the Google Groups "SEBHC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sebhc+un...@googlegroups.com.

Lee Hart

unread,
Jul 2, 2024, 8:03:50 PMJul 2
to se...@googlegroups.com
Thanks Doug! Where might I find that "fixmsoft.com" program? I imagine it is VERY specific to the exact copy of MBASIC it was written to fix.

Further progress: Herb Johnson sent me a link to an ASM file for PATB ver.1 that Bruce Sherry patched to add CP/M LOAD, SAVE and other features. It's built on an older version (mine is PATB ver.3), but has clear examples of how he sets up the FCB and does disk I/O functions.

Alas, it doesn't work as-is, because (like the original PATB) it uses all the RST instructions to jump to routines on page 0 (0-0FFh). CP/M does *not* like programs that mess up page 0! So, I'm translating his disk functions to work in my ver.3 code. Wish me luck. :-)


Virus-free.www.avast.com

Douglas Miller

unread,
Jul 2, 2024, 8:37:42 PMJul 2
to SEBHC
I have placed a copy of it here: http://sebhc.durgadas.com/mms89/images/fixmsoft.com. I'm assuming you've got ways to transfer files onto the Altaid 8800 "drives"?

Lee Hart

unread,
Jul 3, 2024, 3:56:47 PMJul 3
to se...@googlegroups.com
Thanks Douglas! I was able to download the file (with difficulty; my antivirus program protested about downloading a .COM file). I can transfer it to my H89, and will try it on my Heath version of MBASIC 5.21 and see what happens. -)

Virus-free.www.avast.com

On Tue, Jul 2, 2024 at 7:37 PM Douglas Miller <durga...@gmail.com> wrote:
I have placed a copy of it here: http://sebhc.durgadas.com/mms89/images/fixmsoft.com. I'm assuming you've got ways to transfer files onto the Altaid 8800 "drives"?

--
You received this message because you are subscribed to the Google Groups "SEBHC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sebhc+un...@googlegroups.com.

Douglas Miller

unread,
Jul 3, 2024, 6:32:39 PMJul 3
to SEBHC
Here is the excerpt from the Magnolia Microsystem CP/M Guide on how to run it:
fixmsoft.gif
Reply all
Reply to author
Forward
0 new messages