Discussion:
Altair 4K basic port and Z80 bug
(too old to reply)
Zach Zwergel
2014-09-21 17:38:53 UTC
Permalink
Hi,
Is there a way to port Altair 4K to CP/M and to patch out the Z80 bug?
If that cannot be done, how about 8K?
--
Best Regards,
Zach Z.

--Born in the 1990s, but like older computers!--

--- news://freenews.netfront.net/ - complaints: ***@netfront.net ---
Mr. Emmanuel Roche, France
2014-09-21 18:41:48 UTC
Permalink
Post by Zach Zwergel
Is there a way to port Altair 4K to CP/M and to patch out the Z80 bug?
If that cannot be done, how about 8K?
Hahaha! Just half-an-hour ago, I wrote a long message to someone else explaining why! Funny coincidence!

Ok. The Intel 8080 CPU uses some locations at the beginning of its memory for "Restart instructions" (the 8086, and its family, do the same).

However, CP/M uses COMmand files, which are "memory images" of the RAM, starting at 100H. The first 256 bytes are named "Page Zero", following the 2 "00" numbers as in 100H.

Among the standard uses of this "Page Zero" is to contain the location of the BDOS ("CALL BDOS" or "CALL 0005H"), the BIOS, and (important for I/O) the "DMA Buffer".

So, it is difficult for CP/M to run without this "Page Zero" initialized the way it was standard. (The famous "IOBYTE" was coming from Intel usage on their microcomputers, since Gary worked several years at Intel.)

Now, it so happens that "Altair 4K BASIC Version 3.2", "Altair 8K BASIC Version 4.0", "Altair Extended BASIC", and "Altair Disk BASIC" all use the famous Intel 8080 RST instructions for some of the most-often used subroutines of the BASIC interpreter...

So, they cannot be run under CP/M: you need to use an "emulator" (like the "AltairZ80" emulator of Peter Schorn) of the hardware under which they used to run.

However, CP/M was the de facto standard. So, Microsoft made versions of its "Altair Disk BASIC" running under CP/M.

Apparently, the oldest version surviving is "OBASIC" (version 4.51), which stands for "Old BASIC" (this name was given to it when the standard Version 5.xx of CP/M 2.2 was introduced).

OBASIC is slightly different than MBASIC, but only in the details of the commands dealing with disk files.

So, OBASIC is the oldest version of Altair/Microsoft BASIC able to run under CP/M.

Hope that helps.

Yours Sincerely,
Mr. Emmanuel Roche, France
Zach Zwergel
2014-09-21 18:46:02 UTC
Permalink
Post by Mr. Emmanuel Roche, France
Post by Zach Zwergel
Is there a way to port Altair 4K to CP/M and to patch out the Z80 bug?
If that cannot be done, how about 8K?
Hahaha! Just half-an-hour ago, I wrote a long message to someone else explaining why! Funny coincidence!
Ok. The Intel 8080 CPU uses some locations at the beginning of its memory for "Restart instructions" (the 8086, and its family, do the same).
However, CP/M uses COMmand files, which are "memory images" of the RAM, starting at 100H. The first 256 bytes are named "Page Zero", following the 2 "00" numbers as in 100H.
Among the standard uses of this "Page Zero" is to contain the location of the BDOS ("CALL BDOS" or "CALL 0005H"), the BIOS, and (important for I/O) the "DMA Buffer".
So, it is difficult for CP/M to run without this "Page Zero" initialized the way it was standard. (The famous "IOBYTE" was coming from Intel usage on their microcomputers, since Gary worked several years at Intel.)
Now, it so happens that "Altair 4K BASIC Version 3.2", "Altair 8K BASIC Version 4.0", "Altair Extended BASIC", and "Altair Disk BASIC" all use the famous Intel 8080 RST instructions for some of the most-often used subroutines of the BASIC interpreter...
So, they cannot be run under CP/M: you need to use an "emulator" (like the "AltairZ80" emulator of Peter Schorn) of the hardware under which they used to run.
However, CP/M was the de facto standard. So, Microsoft made versions of its "Altair Disk BASIC" running under CP/M.
Apparently, the oldest version surviving is "OBASIC" (version 4.51), which stands for "Old BASIC" (this name was given to it when the standard Version 5.xx of CP/M 2.2 was introduced).
OBASIC is slightly different than MBASIC, but only in the details of the commands dealing with disk files.
So, OBASIC is the oldest version of Altair/Microsoft BASIC able to run under CP/M.
Hope that helps.
Yours Sincerely,
Mr. Emmanuel Roche, France
OK. Is there any source for IMSAI 4K BASIC?
--
Best Regards,
Zach Z.

--Born in the 1990s, but like older computers!--

--- news://freenews.netfront.net/ - complaints: ***@netfront.net ---
Mr. Emmanuel Roche, France
2014-09-21 18:56:19 UTC
Permalink
Post by Zach Zwergel
OK. Is there any source for IMSAI 4K BASIC?
Are you serious, Zach?

Aren't you able to use Google?

http://altairbasic.org/

Mr. Emmanuel Roche, France
Zach Zwergel
2014-09-21 19:00:16 UTC
Permalink
Post by Mr. Emmanuel Roche, France
Post by Zach Zwergel
OK. Is there any source for IMSAI 4K BASIC?
Are you serious, Zach?
Aren't you able to use Google?
Yes, I am able to use Google.
Post by Mr. Emmanuel Roche, France
http://altairbasic.org/
Mr. Emmanuel Roche, France
This is still about ALTAIR. I would like IMSAI.
There is a difference. I'll try to search
"IMSAI 4k BASIC source code".
I will let you know after I search.
--
Best Regards,
Zach Z.

--Born in the 1990s, but like older computers!--

--- news://freenews.netfront.net/ - complaints: ***@netfront.net ---
Mr. Emmanuel Roche, France
2014-09-21 19:11:09 UTC
Permalink
Post by Zach Zwergel
This is still about ALTAIR. I would like IMSAI.
There is a difference. I'll try to search
"IMSAI 4k BASIC source code".
I will let you know after I search.
You are difficult to follow.

http://www.autometer.de/unix4fun/z80pack/ftp/imsai/basic4k.asm

Mr. Emmanuel Roche, France
Udo Munk
2014-09-21 19:12:51 UTC
Permalink
Post by Zach Zwergel
This is still about ALTAIR. I would like IMSAI.
There is a difference. I'll try to search
"IMSAI 4k BASIC source code".
I will let you know after I search.
The IMSAI BASIC sources are here:
http://www.autometer.de/unix4fun/z80pack/ftp/imsai/

In the Altair directory you'll find source for a 8K BASIC,
author unknown.
Udo Munk
2014-09-21 19:30:45 UTC
Permalink
Post by Mr. Emmanuel Roche, France
However, CP/M uses COMmand files, which are "memory images" of the RAM, starting at 100H.
The first 256 bytes are named "Page Zero", following the 2 "00" numbers as in 100H.
Among the standard uses of this "Page Zero" is to contain the location of the BDOS ("CALL BDOS"
or "CALL 0005H"), the BIOS, and (important for I/O) the "DMA Buffer".
So, it is difficult for CP/M to run without this "Page Zero" initialized the way it was standard.
(The famous "IOBYTE" was coming from Intel usage on their microcomputers, since Gary
worked several years at Intel.)
Other BASIC vendors like IMSAI and MWC got their products working for CP/M as well as
standalone versions, see sources, that doesn't look difficult. I don't know how close
Microsoft OBASIC is to MITS BASIC, I never used it.
Zach Zwergel
2014-09-21 19:58:52 UTC
Permalink
Post by Udo Munk
Post by Mr. Emmanuel Roche, France
However, CP/M uses COMmand files, which are "memory images" of the RAM, starting at 100H.
The first 256 bytes are named "Page Zero", following the 2 "00" numbers as in 100H.
Among the standard uses of this "Page Zero" is to contain the location of the BDOS ("CALL BDOS"
or "CALL 0005H"), the BIOS, and (important for I/O) the "DMA Buffer".
So, it is difficult for CP/M to run without this "Page Zero" initialized the way it was standard.
(The famous "IOBYTE" was coming from Intel usage on their microcomputers, since Gary
worked several years at Intel.)
Other BASIC vendors like IMSAI and MWC got their products working for CP/M as well as
standalone versions, see sources, that doesn't look difficult. I don't know how close
Microsoft OBASIC is to MITS BASIC, I never used it.
It looks like IMSAI uses the RST x method too! :-(
--
Best Regards,
Zach Z.

--Born in the 1990s, but like older computers!--

--- news://freenews.netfront.net/ - complaints: ***@netfront.net ---
Udo Munk
2014-09-21 20:06:30 UTC
Permalink
Post by Zach Zwergel
It looks like IMSAI uses the RST x method too! :-(
Of course, everyone did at that time. But also see the equates at the top
of the source, there is one for CP/M. If that is set to TRUE the thing works
with CP/M. An appropriate assembled version is on the z80pack IMDOS
disk images. The nice thing also is that you can save your BASIC programs
into CP/M files instead on paper tape.
dottor Piergiorgio M. d' Errico
2014-09-22 20:38:06 UTC
Permalink
Post by Zach Zwergel
Post by Udo Munk
Post by Mr. Emmanuel Roche, France
However, CP/M uses COMmand files, which are "memory images" of the
RAM, starting at 100H.
The first 256 bytes are named "Page Zero", following the 2 "00" numbers as in 100H.
Among the standard uses of this "Page Zero" is to contain the
location of the BDOS ("CALL BDOS"
or "CALL 0005H"), the BIOS, and (important for I/O) the "DMA Buffer".
So, it is difficult for CP/M to run without this "Page Zero"
initialized the way it was standard.
(The famous "IOBYTE" was coming from Intel usage on their
microcomputers, since Gary
worked several years at Intel.)
Other BASIC vendors like IMSAI and MWC got their products working for CP/M as well as
standalone versions, see sources, that doesn't look difficult. I don't know how close
Microsoft OBASIC is to MITS BASIC, I never used it.
It looks like IMSAI uses the RST x method too! :-(
anyway, both altairz80 and altairsim/imsaisim should (see below) work
with 4k basic, provided one flips the fourth frontpanel switch (d sr 8
on altairz80, using the virtual frontpanel on altairsim/imsaisim, the
first works, but I don't have tested this on the latter pair (sorry, Udo) )

Best regards from Italy,
dott. Piergiorgio.
Udo Munk
2014-09-23 09:05:10 UTC
Permalink
Post by dottor Piergiorgio M. d' Errico
anyway, both altairz80 and altairsim/imsaisim should (see below) work
with 4k basic, provided one flips the fourth frontpanel switch (d sr 8
on altairz80, using the virtual frontpanel on altairsim/imsaisim, the
first works, but I don't have tested this on the latter pair (sorry, Udo) )
For the 4K version 3.2 you need to set switch 11 to the upper position,
so that it uses the SIO at port 16/17 connected to the console window. For
the later versions they modified this, so that this is the default port
used. Details about the front panel switch settings are in the Altair
BASIC manuals.

Udo Munk
2014-09-21 19:33:47 UTC
Permalink
Post by Zach Zwergel
Hi,
Is there a way to port Altair 4K to CP/M and to patch out the Z80 bug?
If that cannot be done, how about 8K?
There have been patches for the Z80, I tried a while to finde one, but
didn't.
Loading...