Live data from Hacker News

The original source code of Microsoft GW-BASIC from 1983

devblogs.microsoft.com

161–170 of 272 posts

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

#161
post #52

Wow, what a blast from the past. I learned to program with BASICA.EXE and GW-BASIC as a kid in the late 80's. I just noticed that microsoft has also released the source to MS-DOS 2.0: https://github.com/microsoft/MS-DOS I don't think I ever imagined that I'd be able to "look behind the curtain" like this, let alone that Microsoft would come to embrace open source. From there I moved on to Turbo Pascal 3.0, and then B…

Am actually totally digging JS DOS, the emscripten build of the DOSBox emulator. The performance is phenomenal in the browser, including vsync. Here is an example (CPU intensive) of multiple 64k demos running simultaneously on a single web page ;) https://js-dos.com/6.22/64k/index.html

8 FPS on MacBook2019 and Chrome...

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

#162

Has anyone got it compiling yet? I've tried in DOSBOX, using this MASM from this (possibly sketchy?) site: http://www.mediafire.com/file/x13v7gqqmw1pom7/8086_Assembler... . The output is as follows: Microsoft (R) Macro Assembler Version 5.00 Copyright (C) Microsoft Corp 1981-1985, 1987. All rights reserved. Object filename [GWMAIN.OBJ]: Source listing [NUL.LST]: Cross-reference [NUL.CRF]: End of file encountered on i…

Mentioned it in another reply, you'd probably want to start with the MASM and LINK from the MS-DOS 2.0 release.

https://github.com/microsoft/MS-DOS/tree/master/v2.0/bin

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

#163

Wow, what a blast from the past. I learned to program with BASICA.EXE and GW-BASIC as a kid in the late 80's. I just noticed that microsoft has also released the source to MS-DOS 2.0: https://github.com/microsoft/MS-DOS I don't think I ever imagined that I'd be able to "look behind the curtain" like this, let alone that Microsoft would come to embrace open source. From there I moved on to Turbo Pascal 3.0, and then B…

Thirty years later, I still miss the Turbo Pascal / Borland Pascal, Borland C(++) experience. Few, if any, 'modern' IDEs have yet reached the simplicity and ease of that development environment.

Because the development itself has changed immensely. The closest experience today is probably the one of developing for Arduinos.

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

#164

From a comment in the source > ORIGINALLY WRITTEN ON THE PDP-10 FROM FEBRUARY 9 TO APRIL 9 1975 Wow! I did not realize that it was written so quickly. Two months that literally changed the PC landscape forever.

Well...remember it is 'just' a BASIC interpreter. Woz wrote Apple integer BASIC in the evenings while working at HP in just a few months. Guys were writing crazy stuff at the time. The original version of DOS that Microsoft bought to license to IBM for the PC was written in 6 weeks.

Also, Spinellis' obfuscated C contest winner (the dds entry with LANDER.BAS):

https://www.ioccc.org/years.html#1990

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

#165
GW-BASIC was the first Basic I wrote substantial code in! I got a kids' book with drawings and text explaing variables and such from my dad. I think I was 7 or 8. It was not long that I reached for the extensive and English-language manual for GW-BASIC which came with the computer. Being a Dutch kid, this allowed me to both learn some English AND some Basic.

Prior to that my dad had a Tandy TRS-80 model III but at that point I was 6 or 7 and my typing skills were holding me back from writing more than 3 or 4 lines of code.

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

#166

Has anyone got it compiling yet? I've tried in DOSBOX, using this MASM from this (possibly sketchy?) site: http://www.mediafire.com/file/x13v7gqqmw1pom7/8086_Assembler... . The output is as follows: Microsoft (R) Macro Assembler Version 5.00 Copyright (C) Microsoft Corp 1981-1985, 1987. All rights reserved. Object filename [GWMAIN.OBJ]: Source listing [NUL.LST]: Cross-reference [NUL.CRF]: End of file encountered on i…

I'm no assembly genius, but the GWBASIC source is for the 8088 CPU and not the 8086 (the chips are slightly different) - maybe that is why? Also, DOSBox is not 100% compatible with original hardware - Try it again in a VM under VirtualBox maybe?

The 8086 and 8088 are architecturally identical and run the exact same code. The only difference is that the 8088 runs an 8-bit external bus.

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

#167
post #57

Earlier quoted context omitted.

Well...remember it is 'just' a BASIC interpreter. Woz wrote Apple integer BASIC in the evenings while working at HP in just a few months. Guys were writing crazy stuff at the time. The original version of DOS that Microsoft bought to license to IBM for the PC was written in 6 weeks.

Expectations of complexity were much less in those days. Like, a programming language that is limited to 40 character variable names would be considered amateur hour, but back in the day it was prolly considered luxuriant. Also given the memory constraints, it also limited the amount of complexity you could put in your code.

More than luxuriant. Commodore BASIC (effectively 6502 Microsoft BASIC under license with tweaks) on the C64 only looked at the first two characters of variable names. It allowed them to be longer (don't remember how long), but would ignore subsequent letters.

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

#168
post #162

Has anyone got it compiling yet? I've tried in DOSBOX, using this MASM from this (possibly sketchy?) site: http://www.mediafire.com/file/x13v7gqqmw1pom7/8086_Assembler... . The output is as follows: Microsoft (R) Macro Assembler Version 5.00 Copyright (C) Microsoft Corp 1981-1985, 1987. All rights reserved. Object filename [GWMAIN.OBJ]: Source listing [NUL.LST]: Cross-reference [NUL.CRF]: End of file encountered on i…

Mentioned it in another reply, you'd probably want to start with the MASM and LINK from the MS-DOS 2.0 release. https://github.com/microsoft/MS-DOS/tree/master/v2.0/bin

Also, as written in the blog post, the .ASM files are not the original sources, more a temporary expansion of these for the given target. Looking at their binary form, all .ASM files end with zero characters instead of, for example, 0x1a with which .H files end. It can be that some tools (different than those originally used) have problems with the zeroes at the end?

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

#169
post #56

The funny thing about this announcement is that a week ago I just found my old QBASIC textbook that I learned how to program with back in 1998. QBASIC was my very first programming language; I was a nine year old kid who loved computers and would read anything computer-related that was available, including my mom's textbooks (she was returning to college at the time and took some courses on computing and applications…

My first attempt at coding was with a Java Programming For Dummies book around the Java 1.1 era, using applets. That was a terrible choice for 12 year old non-native english speaking me, and I never got too far. Somehow I ended up trying QBASIC a couple of years later and programming suddenly became a lot easier and fun. I especially loved that you could easily switch to graphics mode and just start drawing pixels an…

I think I had the same book!

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

#170
post #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.

Its not anomaly, just Orwell's "1984" as is.
Post reply on HN