Live data from Hacker News

Microsoft GW-Basic Interpreter Source Code

github.com

51–60 of 101 posts

Re: Microsoft GW-Basic Interpreter Source Code

#51

--------- ---- -- ---- ----- --- ---- ----- COPYRIGHT 1975 BY BILL GATES AND PAUL ALLEN --------- ---- -- ---- ----- --- ---- ----- ORIGINALLY WRITTEN ON THE PDP-10 FROM FEBRUARY 9 TO APRIL 9 1975 BILL GATES WROTE A LOT OF STUFF. PAUL ALLEN WROTE A LOT OF OTHER STUFF AND FAST CODE.

According to Paul Allen's book [1] about his time at Microsoft (admittedly a biased source), his particularly critical contribution was an 8088 emulator/simulator for the PDP-10. That allowed them to write and even interactively debug (if I remember right) BASIC for the 8088 on the PDP. It would've been hopeless to develop directly on a microcomputer, so they would've had to have written on the minicomputer, transfer…

So I might be able to use a PiDP-11 microcomputer, presuming it is compatible with thd PDP-10, to run an 8088 emulator, on which I could run early DOS programs?

Re: Microsoft GW-Basic Interpreter Source Code

#52

Earlier quoted context omitted.

Assembly language isn't that hard. I wrote a FORTH interpreter with a pretty good standard library in 3000 lines of 6809 assembly that pretty much worked right the first time. Today you could spend as much time getting the build to work with npm or maven for something very simple. Macro assemblers are nowhere near as much fun on the x86 (and other 80's era micros) as they are on something like the IBM 360 or AVR8 wit…

Was the FORTH interpreter for your own use or did you sell it? I ask because it's always fun to see someone on HN that wrote products I saw in the pages of Rainbow long ago.

It was for my own use.

It was unusual in quite a few ways. For one thing it was subroutine threaded which made it a little faster than most FORTHs, also it used self-modifying code in an inner loop to save a cycle in an important place.

Most FORTHs at the time used block-based disk I/O because you could do that without a real operating system and have some nice benefits such being able to copy a block of source code to the screen buffer to edit in place, easy memory allocation, etc.

OS-9 had a handle-based API for filesystem access basically the same as UNIX and MS-DOS 2.0 so my FORTH used that. OS-9 had a choice of text editors, including a vi clone so I didn't feel the need to embed an editor in the interpreter.

Re: Microsoft GW-Basic Interpreter Source Code

#53

Earlier quoted context omitted.

Updating comments as needed is just something I consider part of being a professional programmer.

This is why I've always been an advocate of inline code comments. With just the slightest amount of professionalism, you can keep them up to date, and only a real psychopath would update code without updating the comments directly above it. (So, of course, 50% of programmers don't...)

I can’t count the number of PRs I’ve rejected because code was changed but the corresponding inline comments were not.

Re: Microsoft GW-Basic Interpreter Source Code

#54

--------- ---- -- ---- ----- --- ---- ----- COPYRIGHT 1975 BY BILL GATES AND PAUL ALLEN --------- ---- -- ---- ----- --- ---- ----- ORIGINALLY WRITTEN ON THE PDP-10 FROM FEBRUARY 9 TO APRIL 9 1975 BILL GATES WROTE A LOT OF STUFF. PAUL ALLEN WROTE A LOT OF OTHER STUFF AND FAST CODE.

According to Paul Allen's book [1] about his time at Microsoft (admittedly a biased source), his particularly critical contribution was an 8088 emulator/simulator for the PDP-10. That allowed them to write and even interactively debug (if I remember right) BASIC for the 8088 on the PDP. It would've been hopeless to develop directly on a microcomputer, so they would've had to have written on the minicomputer, transfer…

Yes.

There's an even more extraordinary story about them travelling to demonstrate their implementation of BASIC to the MITS team.

They realise they have not written a bootloader for the Altair, and Allen writes out a bootloader on the plane, which works when they get to MITS.

https://en.wikipedia.org/wiki/Altair_BASIC#Origin_and_develo...

My first encounter with a real Microsoft BASIC wasn't for another 15 years; the interpreter-only QBASIC that came with Halvorson & Rygmyr's Learn BASIC Now, which was a great book I gave away and now feel the urge to repurchase for nostalgia's sake. I used it for my GCSE Computer Science project.

Re: Microsoft GW-Basic Interpreter Source Code

#55

Earlier quoted context omitted.

According to Paul Allen's book [1] about his time at Microsoft (admittedly a biased source), his particularly critical contribution was an 8088 emulator/simulator for the PDP-10. That allowed them to write and even interactively debug (if I remember right) BASIC for the 8088 on the PDP. It would've been hopeless to develop directly on a microcomputer, so they would've had to have written on the minicomputer, transfer…

So I might be able to use a PiDP-11 microcomputer, presuming it is compatible with thd PDP-10, to run an 8088 emulator, on which I could run early DOS programs?

PDP-11 and PDP-10 are completely different. The 11 was in the DEC 16-bit series and the 10 was in the DEC 36-bit series.

Re: Microsoft GW-Basic Interpreter Source Code

#58

Earlier quoted context omitted.

According to Paul Allen's book [1] about his time at Microsoft (admittedly a biased source), his particularly critical contribution was an 8088 emulator/simulator for the PDP-10. That allowed them to write and even interactively debug (if I remember right) BASIC for the 8088 on the PDP. It would've been hopeless to develop directly on a microcomputer, so they would've had to have written on the minicomputer, transfer…

Yes. There's an even more extraordinary story about them travelling to demonstrate their implementation of BASIC to the MITS team. They realise they have not written a bootloader for the Altair, and Allen writes out a bootloader on the plane, which works when they get to MITS. https://en.wikipedia.org/wiki/Altair_BASIC#Origin_and_develo... My first encounter with a real Microsoft BASIC wasn't for another 15 years; th…

Interesting! Could you explain in a bit more detail how you used it for your CS project?

Re: Microsoft GW-Basic Interpreter Source Code

#60

Earlier quoted context omitted.

According to Paul Allen's book [1] about his time at Microsoft (admittedly a biased source), his particularly critical contribution was an 8088 emulator/simulator for the PDP-10. That allowed them to write and even interactively debug (if I remember right) BASIC for the 8088 on the PDP. It would've been hopeless to develop directly on a microcomputer, so they would've had to have written on the minicomputer, transfer…

Using a minicomputer as a dev environment for micros was particularly popular in the late 1970s and early 1980s. See Infocom https://www.filfre.net/2013/03/the-top-of-its-game/ which used virtual machine technology to deliver games developed on a Decsystem 20 to many different kinds of Micro. When Microsoft BASIC came out in 1976 it was rare for a micro to fill out the 16-bit address space with a full 64k. I had a TR…

I had an obscure machine ("Interact") in the early 80's that had an 8080, 16 kb of memory, and a cassette drive. There was an assembler for it. If I remember right, you read the editor from tape, edit and save your file, then read the assembler from tape, it reads the tape with your code and then writes the output to tape.

I have no idea what the people ("Micro Video") producing software for this thing did, but I can't imagine they used this on-machine assembler.

(The tape loading mechanism was basically blocks of address + data. They put loading screens on the tapes by populating video memory first.)

Post reply on HN