Live data from Hacker News

The original source code of Microsoft GW-BASIC from 1983

devblogs.microsoft.com

121–130 of 272 posts

Re: The original source code of Microsoft GW-BASIC from 1983

#121
post #49

Earlier quoted context omitted.

Well, some of us think that acts like Kanye, Jay-Z, Amy Weinstein, the Beatles, and Led Zeppelin were pretty great even though they had the crassness and audacity to make it to the top of the charts

Please don't mix Kanye and Jay-Z with Beatles and Led Zeppelin, they are in different leagues.

Sounds like you don't know music.

Re: The original source code of Microsoft GW-BASIC from 1983

#122
post #7

It's really enjoyable to look at the source. These days one I feel it's quite rare to see assembly code not as an output from a tool like IDA Pro. If I remember correctly, the size of a compiled GWBASIC.EXE file was about 80 kB. What feels weird though is seeing all the files on GitHub last modified "38 years ago," which by the way, also includes the file CODE_OF_CONDUCT.md.

Another temporal anomaly is the license file. It's using the MIT license, but the timestamp is about 4 years before the MIT license existed.

Re: The original source code of Microsoft GW-BASIC from 1983

#123

My mom's IBM 8088 had GW-BASIC built into its BIOS. You could turn on the computer and go straight into it without having any storage medium present.

Interesting. Was that the original IBM PC? I thought it needed DOS for some reason.

I've always thought that using BASIC as the default command line was really weird... Like on an Apple II or TRS-80. You could type in a command to load something from a disk or run a program, or type a line number to start programming. How did that make sense to anyone?? To my 11yo self, it was confusing and I've never changed my mind.

Re: The original source code of Microsoft GW-BASIC from 1983

#125

Looking at this source code I'm astonished by how many lines of code it is. I've never written more than the most basic (ha) of assembly language programs in my lifetime. How does all this assemble into a 60k binary?! Also, wasn't it true that Steve Wozniak was able to bootstrap the entire Apple I BASIC in hexadecimal from his own memory? How can that be? I'm reeling.

I wrote an implementation of BASIC for work a year or two ago, and there's a massive nest of case statements to figure out the resulting data types of operations. Grey(er) beard in the next office pointed out I was probably replacing one page of code in the thing I was emulating.

Re: The original source code of Microsoft GW-BASIC from 1983

#126

Earlier quoted context omitted.

I learned BASIC as a kid (first on a mainframe terminal with line numbers), and use Python today. I think the language is not as important as other issues: 1. Computers are so much more advanced now, that the obvious gap between beginner and commercial software is vast. This can be discouraging. When I learned BASIC, I could write programs that didn't look any more crappy than typical commercial software, even if the…

thanks for the interesting & thoughtful view. I learned BASIC as a kid in the mid-eighties and already then felt a big obvious gap between what I could write in BASIC and commercial software like Nintendo NES games or even Commodore 64 games, that were written in assembly language.

Assembly language was easier too. ;-) I found a book, I think it was published by Howard Sams but sold at Radio Shack, on the Z80 microprocessor. Now I had no particular reason to favor the Z80, but it was available so I bought it. There was another book on TTL logic. The Z80 book was so well written that I gained a grasp of how a microprocessor works, back when there weren't things like pipelines and microcode to blow your mind. But I learned about how pointers work, buses, etc.

The closest thing I'm aware of today, that are actually useful, are the 8 bit PIC chips.

Re: The original source code of Microsoft GW-BASIC from 1983

#127
My first foray into BASIC was BBC BASIC. I was an 11 year old in the eighties and attending comprehensive secondary school in the UK.

We had a school 'computer room' which hosted ten BBC Micros. The mathematics teacher at the time ran an after school computer club and it was alleged that the last 30 minutes were unstructured and some students had managed to get a cassette tape copy of Elite (now Elite Dangerous) loaded onto some Micros. This absolutely blew my mind and I had to get in there somehow. The problem was I knew nothing about computers and I had no computer at home to practise on (this was also not likely to change as I was part of a financially stretched single parent family).

What I did manage to do however, was get a copy of Computer Weekly from WH Smiths. This particular edition was running a monthly section on 'Programming in Basic'. Now as said I had no computer, but I was not deterred into letting that stop me, so I wrote my first program on some A4 paper. As with many first time programmers, It was a text based adventure game with a multiple choice engine:

You find yourself facing the dragon. Do you?

A, Fight the dragon B, Run away C, Use the magic potion the elf gave you. D, Do nothing.

The program itself consisted of nothing more than print statements, capturing user input and then conditionals leading to "goto line X" statements. Quite soon this got hugely un-manageable and I realised this programming stuff was not as easy as I thought. Somehow though, I summoned the confidence to take it to the math teacher for his feedback and thought perhaps he might see some promise in me sufficient to get me into the club. He leafed through a few pages and said I could join. He later told me that he was more impressed that someone would attempt such an effort, more than myself showing any sort of genius.

Years later now, that snotty nosed inquisitive 11 year old is now a Principal Engineer with a long career spent building many, many systems with many engineers. I have always remained a software engineer , while colleagues have drifted off into management. I will be honest, I am still as excited about tech as I was when I was young upstart. I am also still all to willing to take risks, fail and bite off more that I can chew. In reflection that sense of false bravado is what has led to my career being as successful as it has been. It's never been about how beautiful my code is or how well I understand the deep idiomatic nature of whatever the new language is. It’s been my naive over confident nature to always take on more than I can handle.

Re: The original source code of Microsoft GW-BASIC from 1983

#128
post #61
post #33

Earlier quoted context omitted.

C# and .net core don't have as much cruft, and the simple dev environment in code or visual studio are invaluable - especially the debuggers which are imo one of the most important learning tools.

Argueably MS already provide a complete language pre-installed in PowerShell. However would be nice if they more of a beginners IDE for simple programming.

The command-line C# compiler csc.exe is also pre-installed as part of the .NET Framework. There's also all the WSH languages (VBScript and JScript).

Re: The original source code of Microsoft GW-BASIC from 1983

#129
I could not find the original macrotized version. As history tells it there was a version of this code that was written in a bunch of macros that were parsable by humans and they emitted assembly code for a wide variety of machines and architectures (from the 8080 to the 80286).

When I wrote the BASIC interpreter that runs in your web browser (using Java) I modelled it after GW-BASIC as this was the BASIC that had the most number of test cases I could find.

Given that we've got DOSBox for running DOS in your browser this should be portable to that sort of environment right? I know playing HAMMURABI and TREK isn't very engaging to the cool kids these days but they were a big component of the early microcomputer "revolution."

Post reply on HN