←back to thread

617 points EvgeniyZh | 1 comments | | HN request time: 0s | source
Show context
zabzonk ◴[] No.43576999[source]
I've written an Intel 8080 emulator that was portable between Dec10/VAX/IBM VM CMS. That was easy - the 8080 can be done quite simply with a 256 value switch - I did mine in FORTRAN77.

Writing a BASIC interpreter, with floating point, is much harder. Gates, Allen and other collaborators BASIC was pretty damned good.

replies(4): >>43577257 #>>43577890 #>>43579471 #>>43580146 #
TMWNN ◴[] No.43579471[source]
>Writing a BASIC interpreter, with floating point, is much harder. Gates, Allen and other collaborators BASIC was pretty damned good.

The floating point routines are Monte Davidoff's work. But yes, Gates and Allen writing Altair BASIC on the Harvard PDP-10 without ever actually seeing a real Altair, then having it work on the first try after laboriously entering it with toggle switches at MITS in Albuquerque, was a remarkable achievement.

replies(2): >>43579783 #>>43585204 #
zabzonk ◴[] No.43579783[source]
Allen had to write the loader in machine code, which was toggled in on the Altair console. The BASIC interpreter itself was loaded from paper tape via the loader and a tape reader. The first BASIC program Allen ran on the Altair was apparently "2 + 2", which worked - i.e. it printed "4" I'd like to have such confidence in my own code, particularly the I/O, which must have been tricky to emulate on the Dec10.
replies(1): >>43585224 #
WalterBright ◴[] No.43585224{3}[source]
> which must have been tricky to emulate on the Dec10

I don't see why it would be tricky. I don't know how Allen's 8080 emulator on the PDP-10 worked, but it seems straightforward to emulate 8080 I/O.

replies(2): >>43585541 #>>43590732 #
1. zabzonk ◴[] No.43585541{4}[source]
Well, I found it a bit hard on my Dec10-based emulator. I never got the memory-mapped stuff to work properly - I just mocked up some of the I/O instructions. But it was actually a spare-time project, intended to let my students do stuff like sorting, searching in strings, so I didn't feel too guilty. It had an assembler, debugger and other stuff. And it was portable - completely standard FORTRAN77!