Compatibility with BASICA/GWBASIC

In general, although ASIC does not support all options on every BASIC statement, those it does support work like they do in BASICA/GWBASIC. The known exceptions are listed in this chapter.

INKEY$

This statement is compatible, however ASIC does provide an extension over GWBASIC/BASICA. If an extended key is pressed (e.g. F1-F10), ASIC returns the scan code for the extended key, and sets a special system variable "EXTENDED" to a value of 1. For non-extended keys, the "EXTENDED" variable will contain 0.

FILE HANDLING

ASIC provides no EOF statement or ON ERROR statements. Instead, ASIC sets a special system variable when an error occurs during file I/O. This special variable is called "ERROR" and it is set after every file I/O statement (OPEN/INPUT#/PRINT#/CLOSE, etc.) to either 0 to indicate no errors, or a non-zero value. If a non-zero value is present, an error has occurred. The specific errors are identified in chapter 10.

FILE FORMAT

ASIC Files are written with 2/4 bytes per normal/long integer in binary format, instead of string format as in BASICA/GWBASIC. Strings are written as a sequence of ASCII characters terminated by an ASCII null, or optionally with no NULL terminator.

PUNCTUATION

ASIC permits use of punctuation that it does not require to allow you to enter statements in their familiar GWBASIC/BASICA Formats. For example:

A = ABS (B(1))

This statement is valid in both ASIC and in GWBASIC/BASICA. However, ASIC ignores the parenthesis and comma. Thus ASIC will actually accept the following formats as alternatives to the above:

A = ABS B 1
A = ABS B 1,,,,,,)))))


FOR/NEXT

FOR/NEXT loops always fall through the body of the FOR at least one time in ASIC. This does not happen in BASICA/GWBASIC. For more information on this, refer to Chapter 7.

RND

RND (N) returns a value from 0-32767 for normal integers and 0-2,147,483,647 for long integers instead of 0 to 1 as in BASICA/GWBASIC.

LOCATE/CSRLIN/POS

Coordinates are specified in range 0-24 and 0-79 instead of 1-25 and 1-80.


PSET/PRESET/POINT

Coordinates are specified in row/column order instead of column/row order.


BLOAD/BSAVE

File formats are not compatible with GWBASIC/BASICA. BLOAD requires offset and the number of bytes to read.


OPENCOM/COMSTAT/SEND/RECEIVE

These statements provide serial port support in ASIC. In GWBASIC/BASICA this is provided by OPEN/INPUT#/PRINT#.

DATE$/TIME$

ASIC allows you to retrieve the system date and time, but will not allow you to set new system date/time values.


CALL/RUN

These statements perform functions similar to their GWBASIC/BASICA counterparts, but function differently. Refer to the keyword reference for the appropriate keyword for details on their operation.

EXTENSIONS OVER BASICA/GWBASIC

CODE
INT86
FIND
LTRIM$
RTRIM
ZBIT
EXTENDED
GETREGS
GETDRIVE
ENDSUB
COMMAND$
FILEPOS
LCASE$
MOD
UCASE$
ZMODE
FILELEN
SETREGS
SUB
The statements above are extensions over BASICA/GWBASIC.