[Coco] Porting GW-BASIC to the CoCo

Francis Swygert farna at att.net
Tue Jun 23 06:53:45 EDT 2020

Date: Mon, 22 Jun 2020 16:07:12 -0400
From: coco at jechar.ca
Original Subject: Re: [Coco] New version of SDCX

On 2020-06-22 11:51, Lee wrote:
> Wasn't the OP asking about porting GW-BASIC (the interpreter) to the 
> CoCo,
> not so much GW-BASIC programs being ported to run under DECB?
> -----
> Lee

Yes that is what I am asking, lots of GW-BASIC programs ran in text mode 
CGA such programs would have no Issues runing on a coco if the 
were ported but even with the source code the issues of translating from
8086 to 6809 or 6309 might be to much of a problem or perhaps memory 
be the issue 64K vs. 640K.
I had made a post about the difficulty of porting a GW-BASIC program to a CoCo3. All text, and 90% of the code had to be re-written with some commands requiring short subroutines. My point is that because of that I think it would be difficult to translate the interpreter as well. GW-BASIC takes advantage of the IBM PC architecture and capabilities, and some things just aren't available to the CoCo3. Memory doesn't appear to be a problem, as most BASICs appear to be made to run in 64K or less -- at least most BASICs in the early 80s when both CoCo and GW were written. By the way, both are versions of Microsoft BASIC written for their respective platforms. Then Disk Extended Color BASIC came along to add disk functionality rather than a true Operating System. That in itself might make porting GW-BASIC impossible, as IIRC GW makes some calls to the OS -- I know it does for disk I/O, which is one of the things I had to write short routines for. Disk functionality takes up some space in the ROM area, and might make GW too big or require leaving some functions out. If GW is limited to simple graphics or just text that would help...

I may be wrong -- Color BASIC was originally written for a 4K machine and grew from there, being added to rather than re-written so there was backwards compatibility. Another item worth mentioning is that any GW-BASIC program, especially for text only, is going to be OLD. There are likely better CoCo equivalents to anything useful. The genealogy program I re-wrote was something lacking on the CoCo. I don't recall now, but the checkbook program I wrote may have been based on a GW-BASIC program also. I wasn't that much of a programmer -- doing something sophisticated completely from scratch was beyond my capabilities. I don't recall if it was a "souped up" version of some simple DECB program or it was a port of a GW-BASIC program... more likely the later, maybe a combo of the two??? Too long ago to remember!! Might be in the code... if I based my work off someone else's I always mentioned it in remarks at the beginning of the code. I'm not currently running an emulator or CoCo, but someone could look in the list database at "Checks 3" by FARNA Sytems if they are curious. 

More information about the Coco mailing list