Page 3 of 6

Re: Any updates on the license problem?

Posted: Thu Jul 30, 2020 11:45 am
by cjs
BigEd wrote:
It's an odd choice, to use an EhBasic forum to declare that Basic is a poor language in one or another respect. It's off topic in a very strong way.
Well, if discussing infelicities of "standard" BASIC is off-topic, complain about the post to which I was replying. I was merely indicating why people might walk out when someone suggested BASIC could be made better by not needing line numbers, which is also clearly off topic for this entire forum, according to your definition.

As for the other arguments, they range from just as off-topic for this thread to irrelevant. (Yes, disorganized programmers can produce bad code in any language. That doesn't mean that having a language designed to make good programming easy is unimportant. It mystifies me how someone would use that argument to justify bad language features.) So I agree that this thread is not the place to pursue them. The only thing I'll suggest here is that if you can't produce a list of serious problems for any language you know reasonably well, you're not a good programmer. If you really don't know where BASIC stands as a language, one good place to start your understanding would be to go and write something like a unit test framework for BASIC and compare that to the ones you could write even for other microcomputer languages of the day, such as Pascal, Logo or LISP.

Re: Any updates on the license problem?

Posted: Thu Jul 30, 2020 5:26 pm
by BigDumbDinosaur
cjs wrote:
BigEd wrote:
It's an odd choice, to use an EhBasic forum to declare that Basic is a poor language in one or another respect. It's off topic in a very strong way.
Well, if discussing infelicities of "standard" BASIC is off-topic, complain about the post to which I was replying. I was merely indicating why people might walk out when someone suggested BASIC could be made better by not needing line numbers, which is also clearly off topic for this entire forum, according to your definition.
What Ed was apparently saying is the EhBASIC forum is about a specific implementation of BASIC, not the language itself. Whether or not BASIC is a "poor language" is really a somewhat-unrelated topic, as well as a matter of opinion.
Quote:
As for the other arguments, they range from just as off-topic for this thread to irrelevant. (Yes, disorganized programmers can produce bad code in any language. That doesn't mean that having a language designed to make good programming easy is unimportant. It mystifies me how someone would use that argument to justify bad language features.)
I think you are manufacturing a controversy where one doesn't exist. No one was justifying bad language features—indeed, every known computer programming language has them, some worse than others. What was being said is incompetent programmers are the problem in many cases, not the language itself.
Quote:
The only thing I'll suggest here is that if you can't produce a list of serious problems for any language you know reasonably well, you're not a good programmer.
A programmer's valuable time is better spent writing good code than grousing about language deficiencies. If you don't like, say, BASIC, don't use it. There are many other languages available about which one can complain. I personally find C++ to be a cumbersome hack—a design-by-committee language, but don't sit around beefing about it.
Quote:
If you really don't know where BASIC stands as a language, one good place to start your understanding would be to go and write something like a unit test framework for BASIC and compare that to the ones you could write even for other microcomputer languages of the day, such as Pascal, Logo or LISP.
You are pinning your argument on a microcomputer implementation of BASIC. I agree that such an implementation is lacking compared to some other languages. However, BASIC was originally designed for use on timesharing systems, an application that was very widespread during the heyday of proprietary minicomputers, such as MAI Basic 4, Point Four, NCR, etc. (plus, timesharing BASIC was ported to UNIX and Linux). Despite perceived limitations of BASIC (e.g., no structure, which is mostly a limitation of microcomputer implementations), hundreds of thousands of business applications have been written using Business BASIC (as it is called, to contrast it with the less capable microcomputer implementations). Contrary to what you may be thinking, Business BASIC remains in widespread use, especially in the financial sector. I, in fact, still do some development in it.

Any interpreted language will run into limitations when implemented on any 6502-based machine. Incorporating the full scope of a modern timesharing BASIC would overwhelm the machine's resources, so the programmer has to be realistic about what can or can't be provided. The late Lee Davison, the author of EhBASIC, was confronted with that reality and, I think, did an admirable job of dealing with it. It could be a more powerful BASIC could be implemented on a 65C816 system with extended memory, but no one to date that I know of has undertaken such an endeavor.

Re: Any updates on the license problem?

Posted: Thu Jul 30, 2020 6:58 pm
by GARTHWILSON
I looked into EhBASIC years ago (although admittedly not very seriously) and it did appear that Lee did a really good job considering the small amount of memory the code had to fit into.  The BASIC I used the most was on my HP-71B hand-held computer which way, way better, in ways most BASIC users could never imagine; but with the LEX (Language EXtension) files, it amounts to over 170KB.  Is EhBASIC simple enough for the serious user to add capability to it (like the HP-71's LEX files), or would that require re-writing most of it?  And a question that's relevant to the topic title is this:  If the expansion can be done without a re-write, what are the licensing implications?

Re: Any updates on the license problem?

Posted: Thu Jul 30, 2020 7:21 pm
by BigEd
(I've started a thread on the subject of language extensions. It would be truly excellent, IMHO, if new ideas could be introduced as new threads - it makes for a much better experience reading and searching the forum.)

Re: Any updates on the license problem?

Posted: Thu Jul 30, 2020 10:05 pm
by BigDumbDinosaur
GARTHWILSON wrote:
If the expansion can be done without a re-write, what are the licensing implications?
Ultimately, it is Dartmouth College who owns the intellectual property rights to BASIC. Microsoft's rights are limited to their implementation, of which EhBASIC appears to be a derivative. So there is a bit of a problem in that regard if the desire is to extend EhBASIC.

I think the only way to produce a truly unencumbered BASIC interpreter would be with "clean room" code.

Re: Any updates on the license problem?

Posted: Wed Feb 01, 2023 5:41 am
by kakemoms
EhBasic is said to be derived from MS Basic, Dartmouth Basic and so on... but does anyone have a reference to what original source codes were used and were they can be found?

I can see that GW Basic has been open sourced in its 8088 form, but I haven't seen any 6502 source published by them.

Re: Any updates on the license problem?

Posted: Wed Feb 01, 2023 9:29 am
by John West
kakemoms wrote:
EhBasic is said to be derived from MS Basic, Dartmouth Basic and so on... but does anyone have a reference to what original source codes were used and were they can be found?
Looking at the EhBASIC source, it seems pretty clear that it was derived from a disassembly, and the code looks similar enough to what I know of Commodore 64's BASIC that I'd call it Microsoft.

Most of the labels are of the form LAB_<address>. The addresses increase according to the amount of code between them most of the time, with exceptions in the places that have been modified. You don't write source code like that unless you've already got the binary.

Here's EhBASIC's error-printing code, with "out of memory" immediately before the general routine:

Code: Select all

LAB_OMER
      LDX   #$0C              ; error code $0C ("Out of memory" error)

; do error #X, then warm start

LAB_XERR
      JSR   LAB_CRLF          ; print CR/LF

      LDA   LAB_BAER,X        ; get error message pointer low byte
      LDY   LAB_BAER+1,X      ; get error message pointer high byte
      JSR   LAB_18C3          ; print null terminated string from memory

      JSR   LAB_1491          ; flush stack and clear continue flag
      LDA   #<LAB_EMSG        ; point to " Error" low addr
      LDY   #>LAB_EMSG        ; point to " Error" high addr
LAB_1269
      JSR   LAB_18C3          ; print null terminated string from memory
      LDY   Clineh            ; get current line high byte
      INY                     ; increment it
      BEQ   LAB_1274          ; go do warm start (was immediate mode)

                              ; else print line number
      JSR   LAB_2953          ; print " in line [LINE #]"
and here's Microsoft's original

Code: Select all

OMERR:	LDXI	ERROM
ERROR:
IFN	REALIO,<
	LSR	CNTWFL>		;FORCE OUTPUT.
IFN	EXTIO,<
	LDA	CHANNL		;CLOSE NON-TERMINAL CHANNEL.
	BEQ	ERRCRD
	JSR	CQCCHN		;CLOSE IT.
	LDAI	0
	STA	CHANNL>
ERRCRD: JSR	CRDO		;OUTPUT CRLF.
	JSR	OUTQST		;PRINT A QUESTION MARK
IFE LNGERR,<
	LDA	ERRTAB,X,	;GET FIRST CHR OF ERR MSG.
	JSR	OUTDO		;OUTPUT IT.
	LDA	ERRTAB+1,X,	;GET SECOND CHR.
	JSR	OUTDO>		;OUTPUT IT.
IFN LNGERR,<
GETERR: LDA	ERRTAB,X
	PHA
	ANDI	127		;GET RID OF HIGH BIT.
	JSR	OUTDO		;OUTPUT IT.
	INX
	PLA			;LAST CHAR OF MESSAGE?
	BPL	GETERR>		;NO. GO GET NEXT AND OUTPUT IT.
TYPERR: JSR	STKINI		;RESET THE STACK AND FLAGS.
	LDWDI	ERR		;GET PNTR TO " ERROR".
ERRFIN: JSR	STROUT		;OUTPUT IT.
	LDY	CURLIN+1
	INY			;WAS NUMBER 64000?
	BEQ	READY		;YES, DON'T TYPE LINE NUMBER.
	JSR	INPRT
In both cases, they continue on into the code that prints READY and waits for input. They're doing the same things, in the same order, with the same instructions in many cases. But there are differences: EhBASIC uses a string-printing routine to print the error message, while Microsoft loops over the characters. The test for whether or not to print "in <line number>" is identical.

Identifying which version of Microsoft BASIC was used as the base might be possible - the addresses in the labels give very strong clues (the difference between two tells you how many bytes of code were originally between them) - but would require considerably more work than I'm willing to put in. My guess (based purely on the addresses being so low in memory) would be one of the Apple II versions. https://www.pagetable.com/?p=46 is a good place to start exploring.

Re: Any updates on the license problem?

Posted: Wed Feb 01, 2023 6:41 pm
by barnacle
Of which: has anyone a link to a manual for those early Microsoft basics? I keep ending up with mbasic or basic-80 or even (horror!) visual basic.

Neil

Re: Any updates on the license problem?

Posted: Thu Feb 02, 2023 5:53 am
by barrym95838
The first MS BASIC I used was TRS-80 Model I Level II. A not-so-great scan of the same reference guide I remember is here.

The second MS BASIC I used was Applesoft BASIC on my ][+. There's a pretty good PDF of the manual I remember here.

While poking around, I stumbled upon an in-browser emulation of "MS BASIC 2.00.00" running on what appears to be a first-generation Macintosh. The mouse doesn't track exactly right on my PC, but the functionality seems to be there, at first glance anyway, and the user interface is clumsy by today's standards but still intuitive.
msbasic2.00.00.PNG
msbasic2.00.00.PNG (8.62 KiB) Viewed 11746 times
(... looks like it offers 64-bit MS floats ... nice!)

Re: Any updates on the license problem?

Posted: Thu Feb 02, 2023 6:27 am
by kakemoms
John West wrote:
Identifying which version of Microsoft BASIC was used as the base might be possible - the addresses in the labels give very strong clues (the difference between two tells you how many bytes of code were originally between them) - but would require considerably more work than I'm willing to put in. My guess (based purely on the addresses being so low in memory) would be one of the Apple II versions. https://www.pagetable.com/?p=46 is a good place to start exploring.
Well, it may not be possible to identify which basic, at which point it would be uncertain wether its Commodore Basic or some other version from MS. Commodore Basic is currently owned by Cloanto which CAN issue a license (look at the Commander X16 project). Unfortunately, the only OS version of MS Basic is GW Basic for 8088, and they still only allow it for hobbyist and non-commercial...

Its amazing how well-protected datacode is. I've had several patents over the years... max 20 year protection at a huge cost.

Re: Any updates on the license problem?

Posted: Thu Feb 02, 2023 8:40 am
by barnacle
Thanks Mike... it had simply not occurred to me to search for equipment manuals rather than just 'basic'. A search for 'microtan 65 basic manual' dropped me straight here: https://www.geoff.org.uk/microtan/basic_manual.htm which is exactly the system I used to use back in the day.

And conveniently, one which I believe can be generated from the source at Pagetable: https://www.pagetable.com/?p=774

Neil

(hurriedly edited upon being advised of Mr Barry's first name... Sorry!)

Re: Any updates on the license problem?

Posted: Wed Sep 03, 2025 8:11 pm
by jds
With the release of MS-Basic source under the MIT License I believe that this now means that EhBasic is legal as a derivative work, if that is the case, so that issue now goes away. Scanning through this topic it appears that Lee licensed EhBasic for non-commercial use, so anyone that did have concerns about using EhBasic should now be ok to use and modify it for non-commercial purposes.

Re: Any updates on the license problem?

Posted: Wed Sep 03, 2025 8:56 pm
by BigEd
Interesting point. It would be necessary to add the MIT license, I think, and acknowledge the copyright holder. I'm not absolutely sure who could do that, as Lee no longer can.

Re: Any updates on the license problem?

Posted: Wed Sep 03, 2025 9:01 pm
by BigDumbDinosaur
BigEd wrote:
Interesting point. It would be necessary to add the MIT license, I think, and acknowledge the copyright holder. I'm not absolutely sure who could do that, as Lee no longer can.

Isn’t there someone currently maintaining Lee’s code?

Re: Any updates on the license problem?

Posted: Thu Sep 04, 2025 8:33 am
by BigEd
Yes, but my (rather pedantic) point is that one cannot just change licenses - either one is the original copyright holder, or the existing license allows the change.

Edit: the point being that current EhBasic is partly copyright Microsoft and partly copyright Lee. Microsoft changing their story is only part of the thing.