QuickBasic compiler clone

0. Contents

This is the documentation of qbc-0.2.0.
   1. Purpose
   2. Goals
      2.1. Features not omitted
      2.2. Features supported if possible
      2.3. Features not considered to be supported
      2.4. Features which are gained for free
         2.4.1. Memory allocation
         2.4.2. Hardware services
      2.5. Extra features
         2.5.1. Multitasking
   3. Copying
   4. Requirements
   5. "I want to start programming"
   6. Downloading

1. Purpose

Tokenizes and parses QuickBasic code. This is under development.

Latest snapshots of the lexer and parser are available:
qb.l // 2003-11-17 (6 kB)
qb.y // 2003-11-17 (11 kB)

If you are interested in joining the development, please contact me.

2. Goals

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

Several ideas are, what this should become.

2.1. Features not omitted

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

2.2. Features supported if possible

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

2.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).

2.4. Features which are gained for free

2.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.

2.4.2. Hardware services

In *nix systems, all the devices have been designed so that you can use them by just opening the appropiate 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.

2.5. Extra features

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

2.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.

3. Copying

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

4. Requirements

At least these GNU tools are required: flex, bison, gcc, make.

5. "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.

6. 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: Mon, 17 Nov 2003 03:32:42 +0200)
with docmaker.php (last updated: Thu, 13 Feb 2003 15:11:29 +0200)
at Mon, 17 Nov 2003 03:33:11 +0200