Jump to content

Category:Aquarius BASIC

From Rosetta Code
Language
Aquarius BASIC
This programming language may be used to instruct a computer to perform a task.
Execution method: Interpreted
Lang tag(s): basic,aquariusbasic
See Also:


Listed below are all of the tasks on Rosetta Code which have been solved using Aquarius BASIC.
Aquarius BASIC is an implementation of BASIC. Other implementations of BASIC.

Aquarius BASIC refers to the more or less stripped-down releases of Microsoft BASIC for the Mattel/Radofin Aquarius, a home computer released in 1983.

The built-in ROM BASIC was seriously restricted since the system only included 4K of RAM and 8K of ROM by default. Minus the RAM used for video and system management, only about 1.7K of RAM were usable by default; the optionally available Extended Microsoft BASIC that came on ROM cartridge was somewhat more generous, and RAM expansion cartridges were available.

BASIC lines can be a maximum of 72 characters long. Only the first two characters of a variable name are significant, so e.g. ABC and ABBA will contain the same value:

10 ABC=3
20 ABBA=5
30 PRINT ABC;ABBA
RUN
 5 5

The Aquarius features a text-mode screen of 40x25 characters with 16 colors. BASIC only uses 38x24 characters, i.e. the row at the top and the two outermost columns on each side are not accessible when editing, PRINTing, or LISTing. However, all 40x25 characters can be modified via POKEs from BASIC to screen memory.

Screen character memory starts at 0x3000 (12288); color RAM (with high nibble = foreground color; low nibble = background color) starts at 0x3400 (12288 + 1024 = 13312). Border color can be set by POKEing to the top left character, e.g. POKE 13312,7 will turn the border color to white. BASIC programs start at 0x3901.[1]

BASIC can set and unset 80x72-resolution pixels on the Aquarius with the PSET and PRESET commands (each text character consists of 2x3 pixels). This program for instance draws an ellipsis:

10 PRINT CHR$(11);
20 PI=3.141593 : R=30
30 FOR I=0 TO 360
40 X=R*SIN(I*PI/180)
50 Y=R*COS(I*PI/180)
60 PSET(39+X,35+Y)
70 NEXT

The Aquarius character set cannot be redefined.

By default, the total space for string variables is only 50 bytes! This can be increased with CLEAR, e.g. CLEAR 200 will reserve 200 bytes for strings. You can check with PRINT FRE("a") how much unused string space is still available.

Emulators of the Mattel Aquarius include MAME and AquaLite.

See Also

Cookies help us deliver our services. By using our services, you agree to our use of cookies.