Live data from Hacker News

The original source code of Microsoft GW-BASIC from 1983

devblogs.microsoft.com

241–250 of 272 posts

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

#241

Not sure whether it was exactly this version, but on an early job in the mid 80s, used a Microsoft BASIC compiler on a PC in a shared office. At least by default, when compiling, it would ring the "bell" on every syntax error. And by "ring", I mean loudly . BEEP BEEP BEEP BEEP BEEP BEEP BEEP. Which I discovered sitting at the PC, surrounded by secretaries, who commenced withering stares. That's the first day I rememb…

Supposedly IBM's fault that the original PC speaker failed to think of niceties like a mute button. As late as the 486 era I remember how often it was reminded to people to just disconnect the PC Speaker. I also recall there were also crazy case mods where people would add a switch to their cases to add an on/off button.

Yeah, once I bought my first PC, I rapidly realized that just disconnecting the speaker was the way to go.

That said, I totally blame Microsoft for thinking that ringing the bell was in any way acceptable. Even if the PCs of the day had a soothing, quiet 'ding' sound, emitting that for every compiler diagnostic was the height of stupidity. As it was, I recall the original PC bell sound as more like gear grinding, if your head was one of the gears.

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

#243
post #144

Earlier quoted context omitted.

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.

I've been toying with Turbo Pascal 5.5 running on FreeDOS on an old laptop. There's something really relaxing about it, compared to modern programming.

Turbo Pascal 5.5 with objects was the pinnacle of my programming enjoyment. Python 3 is catching up.

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

#244

Earlier quoted context omitted.

Supposedly IBM's fault that the original PC speaker failed to think of niceties like a mute button. As late as the 486 era I remember how often it was reminded to people to just disconnect the PC Speaker. I also recall there were also crazy case mods where people would add a switch to their cases to add an on/off button.

Yeah, once I bought my first PC, I rapidly realized that just disconnecting the speaker was the way to go. That said, I totally blame Microsoft for thinking that ringing the bell was in any way acceptable. Even if the PCs of the day had a soothing, quiet 'ding' sound, emitting that for every compiler diagnostic was the height of stupidity. As it was, I recall the original PC bell sound as more like gear grinding, if…

Once per compiler diagnostic isn't quite so bad as POSIX and macOS apps I know that will ring the bell for every wrong key stroke. ;)

(Even if more POSIX terminals these days make the bell actually sound like a bell or use a simple visual "nudge" instead and not the poor buzzsaw of an early DAC wired to a cheap speaker because it was free parts just laying around during the invention of the IBM PC, it's still amazing that terminals ever had a bell signal, as annoying as it can be, much less that apps intentionally used it or that it will forever be ambered into Unicode even. Learning to type a bell was a rite of passage for DOS kids, maybe with pseudo-terminals coming back into fashion it will be a thing kids learn again.)

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

#245
post #194

Earlier quoted context omitted.

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…

Alas, that easy graphics programming environment - so critical to my early engagement with programming as well -is nowhere to be found. Even in the Python ecosystem, nothing approaches the simplicity of "SCREEN 12" and immediately being able to use POINT, LINE, CIRCLE etc.

Python ecosystem is precisely the one that does approach this level of simplicity, because it has turtle graphics out of the box. Here's one complete example from the docs:

   from turtle import *
   color('red', 'yellow')
   begin_fill()
   while True:
       forward(200)
       left(170)
       if abs(pos()) 

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

#246
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…

> There's nothing like the joy of programming for the very first time The first time I had an idea of what programming was, was when I saw my brother trying to explain to me that the window had code that ran it. Of course, I ignored him... We later did Delphi at school, which was maybe a crazy pedagogical decision. The only thing I would say pedagogically useful was that you wrote PUBLIC and PRIVATE for variables, bu…

C doesn't have "public" and "private" at all. Java has them for both functions and variables (so long as they are members), as does Delphi. The only difference between the two in that regard is that Java requires visibility on every declaration, while in Delphi using the keyword sets it for all following declarations, until another keyword changes it.

On the whole, I don't see a problem with doing Delphi (or Free Pascal + Lazarus) in school, especially if students have studied Pascal earlier - it teaches them many of the same concepts they'll later see in the likes of Java and C++, and it gives them powerful tools to create "real" GUI apps. There are better options these days, but it's not the worst one.

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

#247

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.

Free Pascal is still around, and still includes a text mode IDE written in their own fork of Turbo Vision.

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

#248

Earlier quoted context omitted.

And I think most if not all MSBASIC ports for early PC's had a memory leak if you did not break out a FOR loop in the right way. I am a bit rusty but this sows the problem: 10 L = 4720 FOR I =1 TO 1000 STEP 2 30 PRINT I% 35 IF I = l GOTO 6999 40 NEXT 6999 STOP What you needed to do was set I to the end condition as part of the break out of the loop. There was also a lot of aggressive compression done to reduce progra…

There was a bug in the TRS-80 basic (which was indeed Microsoft). It had an "on x goto" command that allowed the program to move to different lines depending on the value of a variable: ON X GOTO 200,300,400,500 depending if x=1, x=2,x=3... They'd obviously used the same parser for the standard "If a=1 then goto 200" construct, which allowed an undocumented shortcut of "If a=1, 200" which a few people noticed and sta…

This was legal in BASIC from the very first versions of the language:

   IF a=1 THEN 200
and when they added ON..GOTO, they basically made these two mirrored syntactically. So you could do:

   IF a=1 GOTO 200

   ON a THEN 100,200,300
(I suspect it was simply treated as identical token?)

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

#249

Earlier quoted context omitted.

ooh I never worked on TRS80's - so they had a version of the Arithmetic IF :-) I could have Told BillG that was bad idea back when I was 19

x = x + (x :D No If needed. Atari Basic would allow crazy things like: 10 Goto ((x Goes to either line 50 or 150, depending on the comparison result being 1, or 0) Or... Goto (100*x) Faster On goto with no checking, lol. Bill Gates was not involved with the original Atari Basic. That could be purchased on a cartridge for running MS Basic programs.

Did Atari BASIC use 1 for TRUE? Most BASICs used -1 (i.e. all bits 1), because this allowed the same operators to work for both bitwise and Boolean logic, in the absence of a dedicated Boolean data type.

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

#250
post #99

Earlier quoted context omitted.

Microsoft BASIC was all over the place in the late 70's and early 80's. Before MS-DOS, Microsoft was basically a programming languages company (and they still are today). They licensed their BASIC to many other companies, even Apple. https://en.wikipedia.org/wiki/Microsoft_BASIC

In my opinion this was not good. Basic was considered harmful and was possibly the first computer thing to be considered harmful. Line numbers, REM statements, the GOTO statement and much else had to be unlearned by anyone moving on to a professional set of programming tools. At the time we felt enabled rather than held back. But many Microsoft products were like that. The OS on a BBC micro was far ahead of DOS. Then…

At the time when BASIC only had line numbers and GOTO, it was comparable to many other popular languages out there.

By 80s, when structured programming became the norm, BASIC became more structured as well, with loops and subprograms.

Post reply on HN