Single file MS BASIC source?

Let's talk about anything related to the 6502 microprocessor.
Post Reply
User avatar
emeb
Posts: 28
Joined: 08 Mar 2019

Single file MS BASIC source?

Post 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!
User avatar
drogon
Posts: 1671
Joined: 14 Feb 2018
Location: Scotland
Contact:

Re: Single file MS BASIC source?

Post 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
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
User avatar
emeb
Posts: 28
Joined: 08 Mar 2019

Re: Single file MS BASIC source?

Post 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.
User avatar
drogon
Posts: 1671
Joined: 14 Feb 2018
Location: Scotland
Contact:

Re: Single file MS BASIC source?

Post 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
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
User avatar
emeb
Posts: 28
Joined: 08 Mar 2019

Re: Single file MS BASIC source?

Post 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.
Post Reply