Getting Your BASIC programs to work in 2018 !

Last century it wasn't always that easy to get some BASIC programs to work on the 'new' IBM PC. A lot of the programs were written in some weird dialect of BASIC. Some were hardware and graphic specific...

Now you can use FreeBASIC on all three common platforms and even the Raspberry Pi. So if BASIC is your 'thing', you can revive some programs that you thought were no longer to be useful.

I have just taken an hour or so to re-process a program for a band pass filter. It now works 100% under Linux and compiles with FBC.

As I completed it and proved it, I thought I should share the methodology with people in similar situations. It is not difficult to use the standard applications such as FreeBASIC and Geany. But I had to go back in my DOS applications to find a way of compiling the program without thousands of errors.

If I used Quick BASIC, there was no 'issue' in running the program. But when I tried to compile it using 'fbc -lang qb bpfs.bas', it spat at me errors that went off the screen!

Most of the errors were that most of the variables were not declared or DIMensioned. The spell checker doesn't like that. But it means the arrays need to have a DIM statement prior to use. Hmm, how do you fix this? 

Visual BASIC had an OPTION EXPLICIT that you could put at the beginning of the program. So that you would be reminded every time you tried to use a variable. VB doesn't work under Linux... But how about VB for DOS? Yes it does work in DOSbox and Visual Basic does have the OPTION EXPLICIT statement. So I added the source file to a new project in VBDOS and inserted an OPTION EXPLICIT up top that stopped running or compiling where a variable had not been declared. Note all the variables and declare them at the beginning of the program. Then run and compile. If it compiles 100%, then you know it will compile with FBC.

Just one thing that might trip you up. In GWBASIC and QBASIC, if you use a variable anywhere in the program, it defaults to type SINGLE. If you use the '$' in the program for STRING, you must declare it without the dollar sign 'AS STRING'. Oh and don't forget - if the filename is in capitals, you must type it in capitals after fbc -lang qb FILENAME.BAS...

Both DOSbox and FreeBASIC will work on a Windwoes, MAC or Linux PC. Both are free downloads. And your programs will end up working on all three systems.


Very few things didn't work when I moved to Linux. Now there is one less...

There are things that couldn't work. There were things that I didn't need. Then there were applications or hardware that just didn't work, try as I might.

I still haven't got round to writing a driver module for my Microtek slide scanner. I kept a Windwoes 98 PC alive just to use it to scan slides.

Then there was the QX3 Intel microscope. This had nothing for Linux. It would only grudgingly work in Windows XP. When reading glasses and magnifying glass did not work, I would reach for the QX3. Only to find that I had put it on the top-most shelf. Out of reach...

Now I have a fully working QX3. With pictures of transistors and high precision voltage regulators. That I could not read satisfactorily with reading glasses and magnifier.

It is all thanks to the Linux community. Persistence pays off.

This only 10 times magnification. Makes them easy to identify, even when the paint is obscure.

The link? Sure! Here it is :-


This is the latest thing to make me realise that moving to Linux was a good idea! All those old USB and Serial/SCSI scanners? Try 'simplescan' under Linux...

In fact if your are like me with a Windows 9x PC just scanning, try booting on a live Ubuntu/lubuntu CD or stick. Then try running 'Simple Scan'.