The Let's Play Archive

Compute!'s Gazette

by Chokes McGee

Part 33: ManxomeBromide - The Basics of BASIC

Randalor posted:

But I would love a "Here's what all this shit actually means" post in English. As dumbed down as much as possible without being condescending (well, unless it's humorous condescending. And with pictures. And Alice. Cravats)

ToxicFrog posted:

I've been programming for nearly 25 years now (15 of those professionally) and I can't read C=64 BASIC either.

I'm probably going to end up aiming too high and too low with this, but here's my attempt to give a 50,000 foot tour aimed at people who both have and have not coded in the modern era:

Tech Post: The Basics of BASIC

BASIC as a language has evolved significantly over the years, evolving from a kind of simple interpreted FORTRAN through Yet Another Language Vaguely Like Pascal into Yet Another Language Vaguely Like Java. It was invented at Dartmouth, but any BASIC that any of us here used was either directly written by Microsoft, was replaced by one directly written by Microsoft, or which was modeled directly on a Microsoft BASIC. There was a notion of a "standard BASIC" and every microcomputer implemented a system-specific variant of it that took better advantage of the system it was running on, and which usually omitted some features that were accepted as A Thing BASICs Were Supposed To Do, but turns out they never did.

The only concession C64 BASIC makes to the platform is a notion of, well, text control emojis. Those are the weird symbols we've been typing in to change the colors or move the cursor around the screen or clear the screen. Everything else, you're on your own. Fortunately, you don't need much more, because all of the C64's hardware is controllable via writing and reading values to known memory addresses, and BASIC turns out to be able to do that just fine. The concept of "device drivers", much less "hardware abstraction layer", won't be reaching personal computing for a long time to come.

Anyway, as a language, it bears almost no resemblance to any programming language in modern use, including the ones we still call Basic. It has a warm spot in many of our hearts, though, because it gave you the experience of turning on a computer, commanding it to work out problems for you, and then getting those answers back. The closest experience you can get to that nowadays is with a language like Python, but the most common way of getting that feeling from a computer seems to be Excel.

So, here's a rundown of the way the language works. Stuff in italics is where I draw direct comparisons to stuff modern programmers would be aware of. I'm simplifying this and ignoring some edge cases, which in some cases means I'm stating blatant lies. Fear not; they're not important blatant lies.


This isn't enough to actually write any BASIC programs of any complexity, but there's no shortage of books teaching that if you actually wanted to learn it. (Just learn Python instead, seriously.) Hopefully though this is enough to be able to work the general structure behind what otherwise looks like a GIANT WALL OF TEXT.

Culka posted:

Related to all the programming, commodore 64 still has a somewhat active demoscene community around it developing new demos. I say developing, but actually mean making the hardware do things that it was never meant to do. For example:

Making games run well using clever tricks is one thing, but this is pure wizardry.

The best part of this is that it's totally casual about throwing in things like scrolling a single line diagonally two directions at once, which looks pretty nice but doesn't call attention to itself unless you've tried to do scrolling work on the C64 yourself, at which point it becomes purest I thought I had worked out the trick there when I saw it, but on a rewatch, nope, what I thought they were doing totally wouldn't work.