QuickBasic compiler clone

0. Contents

This is the documentation of qbc-0.4.0.
   1. Purpose
      1.1. Features not omitted
      1.2. Features supported if possible
      1.3. Features not considered to be supported
      1.4. Features which are gained for free
         1.4.1. Memory allocation
         1.4.2. Hardware services
      1.5. Extra features
         1.5.1. Multitasking
   2. Copying
   3. Requirements
   4. "I want to start programming"
   5. Downloading

1. Purpose

This is a DEVELOPMENT PROJECT. It is NOT A FINISHED PRODUCT.

Purpose is to provide tools for running QuickBASIC programs in Linux and other non-MS-DOS -environments.

It currently seems like it will become a QuickBASIC to C++ translator. In fact, it already translates a large subset of QuickBASIC to C++. However, the resulting code is not maintainable, and the library which it requires, is not finished. But it is being developed, in hopes it will one day enable running complicated DOS-specific QuickBASIC programs such as this, under Linux.

1.1. Features not omitted

These features are often missing from other BASIC implementations, because they are difficult to implement or not seemed as important.

1.2. Features supported if possible

Some of these features require emulation of PC-style hardware without direct hardware access.

1.3. Features not considered to be supported

These QuickBASIC features are not seen as important, and will not be supported (unless somebody has too much time).

1.4. Features which are gained for free

1.4.1. Memory allocation

In modern operating systems, the memory allocation is designed so that the user doesn't have to care about it. We don't have to meddle with EMS/XMS or any other kind of perverse system the hardware requires for memory allocation.
So if you want to say DIM area(1048576) AS INTEGER, it's fine!
Things like VARPTR$ and SADD() will have to be adjusted a bit though.

1.4.2. Hardware services

In *nix systems, all the devices have been designed so that you can use them by just opening the appropriate file from /dev directory. For example, if you wanted to record and play with your soundcard, you could do OPEN "/dev/dsp" FOR BINARY AS #1, and that's fine. You read there (record), you write there (play).
Of course this won't work in Windows systems.
Other examples could be floppy disks, frame buffer consoles etc.
This isn't the whole truth. Some devices require you to do ioctls before you can do anything useful. This will be considered.

1.5. Extra features

There are no plans for extra features yet, but internationalizations like UTF-8 support would be nice.

1.5.1. Multitasking

QuickBasic programs are usually designed to take 100% of the CPU time all the time. This badly fits to multitasking environments we nowadays have in modern operating systems.
But history is history, and we have to support it.
But we don't have to limit ourselves to it. Even if we couldn't detect and convert Ti#=TIMER:WHILE TIMER<Ti#+1:WEND style loops to USLEEP 1000000, we could support things like USLEEP and FORK. Just maybe.
See your favourite POSIX manual if you don't know what those functions mean.

2. Copying

qbc has been written by Joel Yliluoma, a.k.a. Bisqwit,
and is distributed under the terms of the General Public License (GPL).

3. Requirements

At least these GNU tools are required: flex, gcc, make.
It also utilizes clamp (C++ lambda preprocessor), but it is included in the archive.

4. "I want to start programming"

Then learn programming. It's a slow journey which requires patience and eagerness to learn new things.

If you want to start programming with BASIC, go and see DarkBasic.

5. Downloading

The official home page of qbc is at http://iki.fi/bisqwit/source/qbc.html.
Check there for new versions.

Generated from progdesc.php (last updated: Wed, 24 Jan 2007 18:06:38 +0200)
with docmaker.php (last updated: Sun, 12 Jun 2005 06:08:02 +0300)
at Wed, 14 Feb 2007 00:43:02 +0200