Page 1 of 1

Single file MS BASIC source?

Posted: Mon Jun 10, 2019 11:51 pm
by emeb
I seem to recall someone had ca65-syntax source for MS 6502 BASIC in a single .s file somewhere, but searching only turns up the mist64 implementation that's spread out over many smaller files. Anyone have a link for the single-file version? I've seen Grant Searle's version too, but I thought there was one on github somewhere.

TIA!

Re: Single file MS BASIC source?

Posted: Tue Jun 11, 2019 8:21 am
by drogon
emeb wrote:
I seem to recall someone had ca65-syntax source for MS 6502 BASIC in a single .s file somewhere, but searching only turns up the mist64 implementation that's spread out over many smaller files. Anyone have a link for the single-file version? I've seen Grant Searle's version too, but I thought there was one on github somewhere.

TIA!
Do you want MS Basic or is ehBasic (which is more or less MS Basic) good enough?

There are many ehBasics out there - the one I'm using has some 65C02 "updates" and is a single file in ca65 format. I can't take responsibility for the 65C02 tweaks though, that was our member: floobydust memberlist.php?mode=viewprofile&u=1600

-Gordon

Re: Single file MS BASIC source?

Posted: Tue Jun 11, 2019 8:12 pm
by emeb
Quote:
Do you want MS Basic or is ehBasic (which is more or less MS Basic) good enough?

There are many ehBasics out there - the one I'm using has some 65C02 "updates" and is a single file in ca65 format. I can't take responsibility for the 65C02 tweaks though, that was our member: floobydust memberlist.php?mode=viewprofile&u=1600
For now I'm mainly interested in MS Basic - mainly because my Load/Save routines are tightly coupled to the MS internals. I should look at ehBasic at some point to see if it'd be better, but inertia is my guide for now.

I've steeled myself, gone ahead and just grabbed the mist64 multi-file project and I'll use that.

Thanks.

Re: Single file MS BASIC source?

Posted: Tue Jun 11, 2019 8:26 pm
by drogon
emeb wrote:
Quote:
Do you want MS Basic or is ehBasic (which is more or less MS Basic) good enough?

There are many ehBasics out there - the one I'm using has some 65C02 "updates" and is a single file in ca65 format. I can't take responsibility for the 65C02 tweaks though, that was our member: floobydust memberlist.php?mode=viewprofile&u=1600
For now I'm mainly interested in MS Basic - mainly because my Load/Save routines are tightly coupled to the MS internals. I should look at ehBasic at some point to see if it'd be better, but inertia is my guide for now.

I've steeled myself, gone ahead and just grabbed the mist64 multi-file project and I'll use that.

Thanks.
Not applicable to you if you have existing tokenised code, but I tackled the load/save issue in my implementation by LISTing to a text file, then importing text as if it had been typed. Slightly slower than a binary memory dump, but effective... ehBasic does have hooks for load/save though, but I've not used them.

-Gordon

Re: Single file MS BASIC source?

Posted: Tue Jun 11, 2019 10:32 pm
by emeb
drogon wrote:
...I tackled the load/save issue in my implementation by LISTing to a text file, then importing text as if it had been typed. Slightly slower than a binary memory dump, but effective... ehBasic does have hooks for load/save though, but I've not used them.
That's exactly how I do it too, but I built my own implementation of LIST in order to redirect to SPI flash without all the other crud that Basic wraps around it. The MS LIST function doesn't return to the caller but cleans the stack and goes back to the inline loop so I couldn't use it directly. Instead, I copied the core of the MS code for LIST, added a parameter to it for where to save and then at completion it returns to my code to finish up the flash write process.