Monday, May 4, 2020

Using FreeDOS - BW-BASIC

I grew up in the 1970s and 1980s. Like many of my generation, our first home computer was an Apple II. Actually, ours was an early Apple clone, called the Franklin ACE 1000, but it was the same as an Apple II.

The Apple was a great home machine. The Apple included a BASIC interpreter, so you could write your own programs. This made the Apple II a popular system for all home hobbyists, and in schools. What a great platform to learn programming.

My brother and I taught ourselves how to program in AppleSoft BASIC. Our parents bought a few books about BASIC, and we went over them in great detail. My first games were simple math puzzles and quizzes, although I had plans to write a multi-function calculator so I could "cheat" on my math homework. But as it turns out, you need to learn a lot about math before you can write a calculator from scratch in BASIC - so by the time I was ready to write a calculator, I didn't need it.

But I wrote a lot of games in BASIC. As a hobby, I also created versions of computer programs that I saw in movies and on TV. If a TV program or movie included a computer display, I tried to make my own version. My favorite program was a version of global thermonuclear war, from WarGames (1983 movie). My version let you choose a few targets, then it would launch the missiles and tally a score.

We also had a floppy disk with some other BASIC games on it. I enjoyed the Lemonade Stand game, which is basically a finance simulation. You run a neighborhood lemonade stand, and you need to figure out how many glasses of lemonade to make every day, and at what cost, and the game figures out how many people bought your lemonade. The game included random weather.

I also played another game, which was a kind of simulation. You were the leader of a tiny ancient empire, and you had to decide how much to feed your people and how many crops to plant. It was an exercise to figure out the optimum balance of how much to keep aside for food versus how many acres you could plant.

BASIC was a great introduction to computer programming. I later learned other programming languages, but BASIC was my first language. Despite it being such a simple language compared to something like C, 12-year-old me really enjoyed writing BASIC programs on the Apple.

Later, our family upgraded to an IBM PC, and I learned BASICA and GW-BASIC - and much later, QBASIC. I wasn't a huge fan of BASICA and GW-BASIC, but I really loved QBASIC. It was a very nice BASIC programming environment. QBASIC saw me through much of university until I learned other programming languages.

When we first put together FreeDOS, I felt that FreeDOS needed a BASIC programming environment. I wanted parity with MS-DOS. The Bywater BASIC ("BW-BASIC") interpreter is a very nice BASIC programming environment that reminds me a lot of programming on the Apple:

In this video, I walk through an introduction to programming in BW-BASIC. And I introduce a set of sample BASIC programs that I wrote long ago. GUESS.BAS is a simple "guess the number" game. LEMON.BAS is a spin on the classic lemonade stand game. And TAZ.BAS is my own take on the "ruler of a tiny kingdom" game.

You can find these sample BASIC games on ibiblio:

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.