Graham Kendall
Various Images

Professor Graham Kendall

Professor Dr. Graham Kendall is the Deputy Vice Chancellor (Research & Quality Assurnace, MILA University, Malaysia

Basic Betting: The Micro Bytes Back (1st Edition)

GWBASIC Emulator

This is a support page for Basic Betting: The Micro Bytes Back (1st Edition). This page provides details of how to install and use a GWBASIC emulator on a Mac. If you want to install on a PC, go to this page.

Installing GWBASIC Emulator on a Mac

There are many ways to get the emulator, and then the programs, running. Below I descibe the way I did it (it is probably the minimal actions that you need to do). Purists might want to set up their own environment, but this will get you up and running.

Go to http://robhagemans.github.io/pcbasic/, where you can download and install a GWBASIC (which is called PC-BASIC, but it runs the programs that are supplied with this book) emulator.

If you click on the GWBASIC app that is now available, it will open the GWBASIC emulator window (see Fig 1).

Fig 1: GWBASIC screen at start up

Once you have the GWBASIC window open, type files and press Enter. This will display your home folder (see Fig 2). On this (Macintosh) computer the home folder is the Z: drive. The challenge now is to locate where the Z: drive resides.

Fig 2: GWBASIC screen showing home directory

In fact, the Z: of GWBASIC is in your home folder. To access this you can use the "Go / Home" menu in Finder, or press Shift-Command-H in Finder. When I do this, I see the screen in Fig 3.

Fig 3: Mac Finder showing home directory

If you compare the GWBASIC folders/files (Fig 2) and the Finder display (Fig 3), you can see that they show the same folders/files, so we are in the right place!

Setting up your environment

We don't really want to store our files directly in our home folder, but in a subfolder. I created a folder called BETBOOK. You can either do this through Finder, or through GWBASIC. Fig 4 shows how to do this through the GWBASIC window. It is worth noting that the folder name will be uppercase and a maximum of eight characters. This is a throwback to the days of MS-DOS.

Fig 4: GWBASIC screen showing how to create a new folder through GWBASIC

Fig 5 shows my home folder with the BETBOOK folder created.

Fig 5: Mac Finder showing home directory with BETBOOK folder created

Using Finder (as it is easier) you should now copy all the files associated with this book (see here to download the files) to the BETBOOK folder. That is, copy the following program files.

  1. 001 - ROUL03.TXT
  2. 002 - ROUL04.TXT
  3. 003 - ROUL05.TXT
  4. 004 - ROUL06.TXT
  5. 005 - ROUL07.TXT
  6. 006 - ROUL08.TXT
  7. 007 - FOOT09.TXT
  8. 008 - FOOT10.TXT
  9. 009 - FOOT11.TXT
  10. 010 - RACE12.TXT
  11. 011 - RACE13.TXT

... and the following data files

  1. CH09DATA1.TXT
  2. CH09DATA2.TXT
  3. CH11DATA.TXT
  4. CH13DAT.TXT

Once you have downloaded and copied the program and data files to BETBOOK you need to switch to that folder. You do this with the CHDIR command (see Fig 6). Issuing the files commend will validate that the files are there.

Fig 6: GWBASIC screen showing how to change directory and verifying that the files for this book have been copied

Running a GWBASIC Program

You now have the environment to run GWBASIC programs. This page tells you how to run the programs in this book.