MITS Altair BASIC for Propeller anyone ?
heater
Posts: 3,370
Surprising myself in a big way I have just managed to get the 8080 emulation for the Propeller to run MITS Altair Basic.
You can now enter, edit and run programs written in one of Microsoft's first basics on your Prop Demo board! See attached screen shot.
This is mostly the same as the CP/M for the Prop package (2.1) but:
1. Altair extended basic v4 is loaded into memory instead of CP/M.
2. Added emulation of the 8080 RST instructions as the BASICS use them even if CP/M does not.
3. Added emulation of the Altair's front panel switch register which is used by BASICS to determine serial port configuration.
This build still includes disk emulation on an sd card but will run with no sd card present.
To run this:
1. Unzip the thing somewhere
2. Make altair_sim.spin the top level file
3. Compile all CTRL-F10
4. Run PropTerminal to talk to it (Included in the zip)
5. Hit return when prompted for "MEMORY SIZE ?"
6. Hit "Y" and return when prompted for "WANT SIN-COS-TAN-ATAN
7. Enter your favourite BASIC program and RUN.
Also included is the earlier 8K and 4K basics which you can try by editing a line in altair_mem.spin, look for "OPTIONS" in the comments there.
I promised myself years ago not to get involved in MS products again but, well, this is another test of the 8080 emulation and at least it fits within the HUB RAM.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
You can now enter, edit and run programs written in one of Microsoft's first basics on your Prop Demo board! See attached screen shot.
This is mostly the same as the CP/M for the Prop package (2.1) but:
1. Altair extended basic v4 is loaded into memory instead of CP/M.
2. Added emulation of the 8080 RST instructions as the BASICS use them even if CP/M does not.
3. Added emulation of the Altair's front panel switch register which is used by BASICS to determine serial port configuration.
This build still includes disk emulation on an sd card but will run with no sd card present.
To run this:
1. Unzip the thing somewhere
2. Make altair_sim.spin the top level file
3. Compile all CTRL-F10
4. Run PropTerminal to talk to it (Included in the zip)
5. Hit return when prompted for "MEMORY SIZE ?"
6. Hit "Y" and return when prompted for "WANT SIN-COS-TAN-ATAN
7. Enter your favourite BASIC program and RUN.
Also included is the earlier 8K and 4K basics which you can try by editing a line in altair_mem.spin, look for "OPTIONS" in the comments there.
I promised myself years ago not to get involved in MS products again but, well, this is another test of the 8080 emulation and at least it fits within the HUB RAM.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
zip
628K
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
Thing is microsoft started out quite well squeezing BASIC into only 4K RAM. Quite a feat in itself. But then things snowballed exponentially, 8K BASIC then extended BASIC at 16K. Pretty much using everything Moores Law had to offer as soon as possible. Till we come to Vista which seemed to be launched ahead of the transistor count.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Prop Tools under Development or Completed (Index)
http://forums.parallax.com/showthread.php?p=753439
My cruising website http://www.bluemagic.biz
Easy to do when you "appropriate" someone else's code from a printout in a dumpster.
Your achievement however, is something incredibly impressive. Well done indeed! Can't wait to drag out some of my old CPM disks and have a play.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cardinal Fang! Fetch the comfy chair.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
Because from what I understand MITS basic was orignaly written by:
Paul Allen - The BASIC interpreter stuff.
Monde Davidoff - The floating point stuff.
Bill Gates - Some dinky I/O routines for the Altair.
The last of which has given everybody grief over the years trying to run it on other hardware or simulators including myself and PropAltair. Still can't get the 4K version to run. Thanks Bill.
Perhaps we will never know exactly, the source has been "lost". Which is odd considering how much money made out of it.
P.S. Reminds me of the time in 1976 my friend and I walked into the computer lab at the University of Manchester Institute of Science and Technology (UMIST) one weekend. We were from another Uni. There was nobody around. My friend started fishing around in the trash cans and eventually pulled out a listing with a login sequence including password on it. We were soon into their main frame[noparse]:)[/noparse]
Also saw my first ever EPROM, on a bench in that lab that day.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Post Edited (heater) : 1/14/2009 12:56:46 PM GMT
humanoido
But here www.ittybittycomputers.com/IttyBitty/TinyBasic/ he suggests some one else did. His link for it does not work. Do you have a copy or a link to it and/or info?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Numerous. Not that I can remotely claim they pretend to be unbiased, but the story has been around a *long, long* time.
www.freedomunderground.org/view.php?v=3&t=3&aid=14022
macosx.com/forums/317703-post12.html
www.dhanapalan.com/blog/2008/06/22/bill-gates-and-the-importance-of-source-code/
www.dynamicobjects.com/d2r/archives/002646.html
www.daniweb.com/forums/post23101-3.html
www.vanwensveen.nl/rants/microsoft/IhateMS_1.html
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cardinal Fang! Fetch the comfy chair.
1. For sure learning to code is greatly aided by reading the code of those who have come before. From a dumpster or not.
2. Fishing a BASIC interpreter for a PDP10 out of a dumpster and using it as inspiration as to how to write one for an 8080 is not exactly a trivial exercise and far from "appropriating".
3. The thing about unauthorized use of the university computer, well we all tried to do that at uni. How else could you progress at the time?
It's interesting to compare the software industry development with that of the steam engine. James Watt is generally credited with being the great inventor there and the firm Boulton and Watt made piles of money out of it. Everyone at the time knew how to make a steam engine, they were all busy trying copying each other whilst at the same time locking ideas up with patents and royalties. Stifling progress as they did so.
Meanwhile the "true" inventor of the steam engine was a young unknown boy name of Humphrey Potter who devised away to make the engine push up and down repeatedly, continuously by itself rather than rely on an operator (a young boy) opening and closing valves ten times a minute. He of course got no credit or reward, rather he was fired and replaced by his own invention!
I also consider young Potters invention to be the first use of "feedback" rather than the oft quoted steam regulator of Watt.
Read about my hero Humphrey Potter here: http://inventors.about.com/od/nstartinventors/a/Newcomen_2.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Nicely done! I had a feeling you would get this working. [noparse]:)[/noparse]
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card connected? - PropDOS
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
Safety Tip: Life is as good as YOU think it is!
May God forgive me.
It will also run 8K and Extended BASICS, just edit two lines in altair_mem.spin, look for "OPTIONS".
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Next thing you know we'll be dealing with SPAM, popup ads..
Peter Venkman: "Human sacrifice, dogs and cats living together... mass hysteria! "
Nice Job! Looking forward to playing with this...
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card connected? - PropDOS
Post Edited (Oldbitcollector) : 1/16/2009 3:01:16 PM GMT
William Henry Gates III
1180 Alvarado SE,
#114,
Albuquerque,
New Mexico,
87108
As requested by same in 1976 www.blinkenlights.com/classiccmp/gateswhine.html
Which, by the way, is demanding money not due to him. These basics contain the string "COPYRIGHT 1976 BY MITS INC."
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Prop Tools under Development or Completed (Index)
http://forums.parallax.com/showthread.php?p=753439
My cruising website http://www.bluemagic.biz
Post Edited (Cluso99) : 1/17/2009 3:43:43 PM GMT
By the way how much exactly was your basic ?
I miss those paper tapes. Wish I had a punch and reader now.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
discussion page, reconstructed (with help from Volume 17 of the CP/M User's
Group archives), is found here:
MINOL-Tiny BASIC with Strings in 1.75K Bytes
web.archive.org/web/19980702115208/http://www.signiform.com/erik/pubs/minol.htm
Note the letter by Erik T. Mueller This information was updated 27 times. While the original posting from "Dr.
Dobb's Journal of Computer Calisthenics and Orthodontia" no longer links the
Tiny Basic listing or file, just scroll down farther on the page and provided is a
listing of the 8080/8085 Tiny Basic code manually typed which can be copied
and pasted from the html page!
You can consult the more recent versions as archived links here (as I chose
the oldest link from Jul 02, 1998).
web.archive.org/web/*/http://www.signiform.com/erik/pubs/minol.htm
The newest link is here, from Sep 28, 2007.
web.archive.org/web/20070928040139/http://www.signiform.com/erik/pubs/minol.htm
Thanks to the Internet Archive WayBack Machine.
www.archive.org/web/web.php
At originally only 1.75K, a working version on the Prop would be absolutely remarkable.
humanoido
Post Edited (humanoido) : 1/16/2009 3:52:58 PM GMT
I was just reading a about a guys original 1975 Altair who states that he was getting 350K instructions per second. So propAltair is doing a fairly accurate emulation of the speed of an 8080 [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
This makes the HUB RAM look huge !
This is the end of the line for stand alone BASICs from me, time to get back to the "real work" of improving CP/M on the Prop.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Post Edited (heater) : 1/17/2009 9:09:53 AM GMT
Hopefully that CP/M board will get to you heater in the next week and you can see if it is possible to squeeze it into a propeller.
I'm working on making complex code easier to write. Coloured text and cut and paste and quick compiles have certainly sped up the edit/test/edit/test cycle. Back in the CP/M day the text editors were much more cumbersome by comparison. And my dad was telling me that back in his day (1960s) you had paper tape and you would "load" a program, which in practice meant a girl would go and get a roll of tape and feed it into a machine which would spit it across to the other side of the room and another girl would grab the tape and roll it all up and file it away. Serves me right for complaining about compiles that take more than 10 seconds!
Languages. A can of worms I know. I've got frustrated with the smaller languages and I'm working with s-basic at present because it is much more structured than other forms of basic, and so you can add new keywords as functions and hence enlarge the language as needed. It looks more like spin than mbasic for instance. But with modern programming like richtextboxes in .net, you can add things like syntax colouring and dop in functions from a menu. The attached screenshot is a vb.net program, with a VT100 terminal in the top window talking to a N8VEM CP/M board, and in the lower windows is the s-basic program. Compile is a single step process which sends the program to the N8VEM via xmodem and then runs the sbasic compiler. You can write little programs and store them in the on-board ramdisk - eg a program to change the baud rate, and another to change the serial port. Just for fun, the N8VEM board is on the other side of the house and is communicating via wireless modules.
I can see a convergence of ideas here. Either CP/M being emulated fully on the Prop. Or an Prop operating system evolving to the stage of being able to write and compile programs on its own board.
It's been fascinating to get them running on the Prop, in fact it's diverted me for too long from the real business CP/M. The real honour goes to people like Erik T. Mueller for creating things like Minol in 2K bytes back in 1976. And here we are today complaining that the COGs don't have enough registers and the HUB ram is too small. Young people today, I don't know.....
Paper tapes and punch cards is where I started out back in uni. Was just a tad before micros started to arrive on the scene.
Wireless communication, colour syntax highlighting, wow, you must have the most sophisticated CP/M development environment ever created ! Here I'm still doing most of my debugging via the 8 LEDs on a Prop demo board, just like the old days.
When I get the external RAM sorted full scale CP/M will be running on the Prop. As for a self hosting prop operating system I think others here are working on it.
By the way if I took the time to figure out how to use Digital Researches ASM and the WM editor I think I can already do program development for CP/M. They both seem to run in 24K.
Just now I'm stuck by a CPU instruction set test program by MICROCOSM ASSOCIATES that fails on PropAltair. And Guess what ? It trips up on that pesky DAA opcode.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Problem is propaltairs DAA instruction fails (Test currently disabled), this is driving me nuts. As far as I can tell the DAA implementation is as per my 8080 assembly language programming manual. The tests I made for it worked and it gives the correct results when used by the survey.com program, the only program I know that uses it for real.
Searching around the net it seems many have had trouble with this in their simulator attempts. The z80 does not set flags exactly as 8080. The 8080 is considered buggy in this respect. But I could not find exactly what the issue is.
Anyone have any info on this ?
Otherwise emulation seems to be solid.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
I think you may know this people: http://www.altairkit.com
There is a forum where issues are discussed, http://www.stockly.com/forums/index.php, maybe they can run some test cases for you. I mean, they have real 8080s. (I only have a Z180 around, and DAA works as per the manual, well better because the Z80 manual I got a couple years ago had some mistakes in the DAA instruction description).
I wanted to convert that tiny basic to propeller assembler. Someone did it but I mean I wanted . I have some problem with the 8080 opcodes, I know only the Z80 nomenclature.
I hope it helps. Btw, great achivement !
I've just found an Manual from Radio Shack that covers both 8080 and 8085 programming. It does mention differences in flag handling between the two. Which, as I said, is different from z80. The issue seems to be that the half carry flag may or may not be set by logical operations depending on cpu and phase of the moon. Neither of my manuals actually have all the details of this.
Looking at the code for DAA in the GNU 8085 simulator I can't see how that conforms to any manual description !
Baa ! I might just leave it as it is for now and get on with something else.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.