University of Turku

Basic and SmallBasic

BASIC is a tool for a user to write simple programs. Not only games and funny noises but also making important calculations in economics and laboratories.

It is forgoten that in many cases the program is needed only once. It doesn't matter how much time the program takes to run. Most important is that the program is easy to write. In many cases it is easier to write the program in environments like MSDOS or Notepad. Graphical environment might even make the writing harder.

But, Do not lose your hope. There is still simple programming tools for the simple calculations. One of the best is SmallBasic . It contains an editor and you run the code inside the SmallBasic environment. Allthough it is simple to start with, it still contains tools for the networking and graphics.
There is more tools than you never need. And they have promised, that there will never be a compiler.

There is versions of SmallBasic for Windows, Linux and Palm, so when you at last get rid of MSWindows, you can still keep your code.


Portability
There has been a lot of talk about portability of code. The most advertised system is JAVA. Still they don't tell you that even though the JAVA code is portable between SOME systems, there is problems. Another portable branch of languages is C, C++ and C#. You can port them, if you have the source code in your hands. The same goes with the interpreted languages, Perl, PHP, Python etc.

If your code doesn't have graphivcal parts, you should consider BASIC and even FORTRAN.
Myself I got a piece of a mathematical algorithm written for FORTRAN. I ported it to APPLE II thru RS232 and wrote about 10 % of the source code anew. After that it could be run as BASIC.
Then I ported it to VIC-20 thru RS232. Again I rewrote about 5 % and added a simple graphical output.
When I ported the code to Commodore 64 (By floppies this time) I got much more resolution. This time I had to rewrite only the calls for the graphics. We didn't need other graphic components but point and line. I wrote a small 'graphics engine' for them in assembler (240 bytes).
When I moved to the PC world, I made only some small changes, about 2 % of the code and ran it under GWBASIC, which was soon replaced by QBASIC 2.0 and then QBASIC 4.5. In QBasic 4.5 we got all the graphics we needed and even more.
It was the time, when Language C appeared to the world. We were a bit curious and my friend wrote the same program in Turbo C and I made some optimisation to the QBASIC 2.0 code. He was a bit disappointed, when the results came out: QBASIC 2.0 was a bit faster than Turbo C. QBasic 4.5 was a little bit slower than Turbo C. The funny thing is that VIC-20 was not very much slower than 4.77MHz PC

PTMUSTA at UTU.FI