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?