Page 1 of 1

Getting Microsoft BASIC source

Posted: Tue Jan 27, 2015 7:15 pm
by James_Parsons
Hi, none of ya'll probably remember me. Bu I am looking for a copy of Microsoft BASIC source code. I believe I have found it here: http://www.pagetable.com/?p=774 , but I am not too sure. Can anyone verify that this is Microsoft BASIC and not some sort of fraud?

Re: Getting Microsoft BASIC source

Posted: Tue Jan 27, 2015 7:44 pm
by BigEd
Hi James, yes, I remember you! Pagetable.com is Michael Steil's site, he's extremely credible. You can be sure this is the real thing. He's posted several analyses about various basics (and a lot more of interest to 6502 fans and Commodore fans)

Re: Getting Microsoft BASIC source

Posted: Tue Jan 27, 2015 8:24 pm
by GARTHWILSON
There's also this one: Create your own Version of Microsoft BASIC for 6502, on the same site. (It's on my links page.)

Re: Getting Microsoft BASIC source

Posted: Fri Jan 30, 2015 3:24 pm
by Benoit0123
For reference purposes only (because it does not seem to be downloadable), there is also the Applesoft II listing which was a flavor of Microsoft BASIC customized by Apple (for Hires instructions handling) here:
http://www.txbobsc.com/scsc/scdocumentor/
The reader also benefits from wise comments about easter eggs and buried bugs within the code.
This is a constant reference material for people like I who design Applesoft extensions as a hobby.

HTHATS,
BenoƮt

Re: Getting Microsoft BASIC source

Posted: Fri Jan 30, 2015 7:06 pm
by James_Parsons
Wow, cool Benoit. The Apple II is the only apple product I like :P

Re: Getting Microsoft BASIC source

Posted: Wed Feb 25, 2015 2:45 am
by Simon
I started my version of the code from the pagetable site although I found the way it was presented there hard to follow and I don't know how to use CC65 so couldn't assemble it. In the end I found that Grant Searle on his site had a version all in one file that I found easier to follow: http://searle.hostei.com/grant/6502/Simple6502.html

That version is based on the OSI version of BASIC which is probably the simplest and most closely matched what I wanted to do. I then added my own IO routines to it and after MUCH fiddling got things working: http://www.asciimation.co.nz/bb/2013/10 ... -and-basic

I've progressed a lot since then and now have a fully functioning machine with extended basic, keyboard, video, sound, serial in/out and general IO including an analog joystick port! I just need to make a case for it all. I also found the Apple BASIC listing very useful so I could see how someone else had modified the original MS BASIC to do what they wanted.

Simon

Re: Getting Microsoft BASIC source

Posted: Thu Jan 07, 2021 7:42 am
by zhen
I'm not sure what the etticuite is on reviving dead threads, but I found this thread useful.
Grant Searle's version which is unified and cc65 ready was really easy to use, but with 1 problem.
Updated link:
http://searle.x10host.com/6502/Simple6502.html
There is a bug in the ctrl-c handling code which causes LIST/RUN commands to not work.
The ISCNTC always runs into STOP no matter what, so LIST/RUN just simple exits right away.
The original code here: http://www.pagetable.com/?p=46
does not have the bug.
The fix is to simply copy the code from the original source.
Here is a diff:

Code: Select all

diff --git a/Microsoft Basic/osi_bas.s b/Microsoft Basic/osi_bas.s
index 0270d39..59cf91f 100644
--- a/Microsoft Basic/osi_bas.s
+++ b/Microsoft Basic/osi_bas.s
@@ -1289,14 +1289,23 @@ SETDA:
         sta     DATPTR
         sty     DATPTR+1
         rts
+RET2:
+       rts
 ; ----------------------------------------------------------------------------
 ; SEE IF CONTROL-C TYPED
 ; ----------------------------------------------------------------------------

 ISCNTC:
-; MODIFIED CALL BY G.SEARLE FROM THE ORIGINAL OSI CODE
-        jsr     MONISCNTC
-; runs into "STOP"
+        jsr     MONISCNTC
+        nop
+        nop
+        nop
+        nop
+        lsr     a
+        bcc     RET2
+        jsr     GETLN
+        cmp     #$03
+;!!! *used*to* run into "STOP"
 ; ----------------------------------------------------------------------------
 ; "STOP" STATEMENT
 ; ----------------------------------------------------------------------------

Re: Getting Microsoft BASIC source

Posted: Thu Jan 07, 2021 9:06 am
by BigEd
(Welcome! Reviving old threads is fine here, when genuinely continuing the same topic.)

Re: Getting Microsoft BASIC source

Posted: Sun Jan 31, 2021 4:52 pm
by cbmeeks
Also, if I could do a little self-promotion, I've put MS BASIC in a 6502 build where it will assemble for various systems like Microtan, OSI, etc.

https://github.com/cbmeeks/6502-Builds

Hope it's helpful.