All files mentioned are available at:
http://www.autometer.de/unix4fun/z80pack/ftp/altair/
Sometime around 2009 I found a PDF document on the Internet, that
starts with a Reference Manual for Altair 4K and 8K BASIC. Filename
of that is AltairBasic_1975.pdf. I cannot remember anymore where I
found this, sorry, I just archived it for later use in 2009, and
use of it is now.
Someone appended a few pages with handwritten notices. I can't read
and understand everything written, English is not my native language
and I have problems to guess about the parts I can't read. If anyone
can read/guess it completely I would appreciate a machine readable file
with the text, thanks.
Then someone added a listing of an assembly of an 8K BASIC interpreter.
This source was typed in by someone, the filename is
basic8k78.org.
Looks like it was written for a cross assembler running on some minicomputer,
I can't remember about an assembler using the syntax in this source. It
was not written for the 8080 microcomputer systems, their assemblers all
followed the Intel syntax pretty close.
To get the thing assembled I used Microsoft m80 and for that I had to
make modifications, mostly for the character literals used like 'A+128.
This is not accepted by any assembler I know, so changed that all to
'A'+128 and so on. The file with this modifications done is named
basic8k78-1.mac and it assembles error free with m80.
This BASIC interpreter uses some ROM monitor for I/O, which I don't know
and I don't have. So I added tty I/O functions with the appropriate names
for the Altair 88-SIO2. The name of this file is basic8k78-2.mac.
If you build an Intel hex file from this last version with:
m80 basic,basic=basic
l80 basic,basic/n/x/e
on a CP/M system you will get the file with name basic8k78.hex.
And if you run that on the Altair machine it looks like that:
11704 BYTES FREE
BASIC, Version of 02/03/78
START
OK
*
It is a working BASIC interpreter and runs small BASIC test programs. It
might still have bugs from typing in the source.
Now the big question is: where does this come from? The early Altair BASIC
version were written by Microsoft and if one compares this 8k source
with the annotated BASIC 4K 3.2 here:
http://altairbasic.org/
one finds some similarities e.g. in the tables for all the BASIC commands.
In the strings with the commands bit 7 is set in the last character. In the
table with arithmetic ops the precedence for +- is 79H in both versions.
Anyone any idea about this?