Error Messages

This chapter contains compiler messages, run-time error messages, and File
I/O Error Codes.


                              COMPILER ERRORS

     These messages indicate errors in your source program.  Those which
begin with "** E" indicate "fatal" errors, which prevent ASIC from
successfully compiling your program.  Warnings begin with "* W" and
indicate possible errors and informative messages which will not prevent
ASIC from generating an executable ".COM" or ".EXE" file.


                               FATAL ERRORS

** E001 **  File Extensions must be '.ASI', '.PRJ' or omitted

ASIC requires source programs to have the extension ".ASI".  Rename your
source file with the DOS "RENAME" command to the name "file.ASI", where
"file" is your source program name.  Then resubmit the compile.
The ".ASI" extension is the only valid one for the ASIC Editor, but the
command line compiler will also accept a ".PRJ" extension.

** E002 ** File Name specified is too long

The source file may be identified by a file name up to 124 characters long
including disk drive specifiers and sub directory names.  Move the source
program to a directory which may be specified within this length.

** E003 ** Error Opening File:  xxxxxxxx.xxx

The file indicated by "xxxxxxxx.xxx" could not be opened by ASIC.  This
error can be issued when ASIC attempts to read your source file, or when it
writes any one of the possible output files (".COM", ".EXE", ".LST", or
".SYM").  If indicated file is your source program name, verify the
spelling, and either make sure it is in the same directory as ASIC, or
specify the full path name for the file.  If the indicated file is an
output file, the error is usually a result of a write protect tab on the
diskette or insufficient disk space.

** E004 ** DIM Statements must precede all others except REMs

In ASIC, DIM statements must appear before all other statement types,
except REM or SUB statements (or blank lines).

** E005 ** Too many characters in source line

Source program lines in ASIC are limited to 120 characters.  Change the
indicated source line, so that it fits within this limit.

** E006 ** Unmatched Quote ('"') in source line

A string constant was found with either no opening or closing quote mark.
Quotation marks must be matched in pairs within source lines.

** E007 ** Token in source line > 82 characters long

Individual tokens in ASIC are limited to 82 characters in length,
regardless of type.  A token is a group of letters and/or numbers delimited
on either side by a space or math symbol.  Example, even though string
constants are limited to 80 characters, ASIC considers the "token" to
include the quotation marks.  In this case, however, ASIC detected a token
longer than the longest possible token, the string constant.  Check for
"tokens" or "words" more than 82 characters long in the indicated source
line.

** E008 ** More than 30 tokens in source line

Since all ASIC statements require less than 30 tokens, ASIC will flag any
statement which contains more than this number.  A token is a group of
letters and/or numbers delimited on either side by a space or math symbol.

** E009 ** Keyword Unknown:  xxxxxxxxx

ASIC detected the symbol indicated by "xxxxxxxx" in your source line, but
it was not a valid variable name, constant, label, or ASIC Function Name.

** E010 ** Symbol Table Space Exhausted

The symbol table is used by ASIC to keep track of your variables, constants
and labels.  It is also used to hold information used in FOR/NEXT
processing, and internal system subroutine generation.  Reduce the number
of LABELS, VARIABLE NAMES, or CONSTANTS in your program, and recompile.

** E011 ** Symbol Incomplete Reference Space Exhausted

This table is a sister table to the Symbol Table, it contains references to
LABEL type symbols which have been defined in the symbol table.  Try to
reduce the number of references made to LABEL symbols within the program
and recompile.

** E012 ** No keywords in source line

Every ASIC source program line must contain an ASIC keyword (eg. "PRINT",
"=", "GOSUB", etc).

** E013 ** Syntax Error

The "catch-all" error for ASIC.  This error is usually issued when ASIC has
identified an error in the parameters for an ASIC keyword.  The best way to
find this error is to refer to the entry in the Keyword Reference (chapter
7) for that particular keyword.

** E014 ** Undefined Symbol:  xxxxxx

ASIC detected a LABEL "xxxxxx" which was referenced, but never defined in
the program.  A label is considered to be defined when it is the first
token on the source line.  A reference to a label occurs when a label name
appears elsewhere in the source statement

     Example:           PRINTIT:   PRINT "hello"      <---Defined
                              GOTO PRINTIT:      <--Referenced

** E015 ** Compiled Code Exceeds 64k-Can't fit in .COM file

Your source program is too large to fit in the .COM file format.  Recompile
using the "Build EXE" option.  See Chapter 5 for more information.

** E016 ** Integer Constant Not in range +32767 to -32767

The above range of numbers is the maximum which can be contained in integer
format in ASIC.  Reduce the constant so that it falls within the specified
range.

** E017 ** Duplicate Label:    xxxxxx

The indicated label "xxxxxx" was defined more than once in the program.
Reduce the multiple definitions to a single definition and then recompile.

** E018 ** Second FOR defined for variable with no intervening NEXT

FOR/NEXT Statements cannot be nested with the same variable name.

          VALID                              INVALID

          FOR I=1 TO 10                      FOR I=1 TO 10
               FOR J=1 TO 20                      FOR I=1 TO 20
               NEXT J                             NEXT I
          NEXT I                             NEXT I


** E019 ** For/Next Table Space Exhausted

An unlimited of FOR/NEXT statements can exist, however, they can be
"nested" to a maximum depth of 25.

** E020 ** NEXT without FOR

A NEXT statement was found, however it was not preceded in the source
program with a matching FOR statement.

** E021 ** FOR without NEXT at Source Line NNNNN

The indicated source line NNNNN contains a FOR statement, for which no NEXT
statement was ever found.

** E022 ** Invalid Option:  x

An invalid compile option was specified.  Review Chapter 5 for a list of
valid compile options.

** E023 ** More than 63000 bytes in Data Segment

An ASIC program can be up to 64k bytes in size.  Of this total, 63000 bytes
can contain program variables and constants, leaving at least 1k for
program code.  Reduce the number of variables and constants in your
program.

** E024 ** Too many arrays defined

A single ASIC source program can contain up to 25 arrays.

** E025 ** Re-DIMension of previously DIMensioned variable

Only one DIM statement can be specified per array name.

** E026 ** Invalid subscript on Array

A subscript was found which is not valid.  Either ASIC expected more or
less subscripts than were present, or ASIC detected a subscript which was
itself an array.  Subscripts on arrays may only be non-array variables
and/or integer constants.

** E030 ** Code Segment Memory Exhausted

ASIC will attempt to allocate 64k of memory to use a work space to hold the
code generated by your program statements.  This message indicates that the
amount of memory it was able to allocate was not sufficient to hold the
code generated by the program you are trying to compile.

** E031 ** Data Segment Memory Exhausted

ASIC will attempt to allocate 64k of memory to use a work space to hold the
data segment for your program.  This message indicates that the amount of
memory it was able to allocate was not sufficient to hold the data
generated by the program you are trying to compile.

** E032 ** Insufficient Memory to Run ASIC

You don't have enough memory to run ASIC.  If you have any TSRs loaded, try
removing them and re-compiling.

** E033 ** Edit Buffer Memory Allocation Failed

ASIC attempted to allocate memory for the edit buffer in the integrated
environment, but was unable to.  If you have any TSRs loaded, remove them
from memory, and try again.

** E034 ** DATA Statements Must Precede All Except DIMs or REMs

If you wish to use the DATA statement in ASIC, you must place them all at
the beginning of your program following any SUB DIM and/or REM statements
(or blank lines).

** E035 ** Requires 32 Bit Math--Recompile W/Math Option

The compiler found a statement containing long (32bit) integer variables or
constants.  You must compile with the Extended Math Option turned on to be
able to use long integer math.  Turn on the "Extended Math" Option from the
Compile Menu in the ASIC Integrated Environment, and recompile the program.
If you are compiling from the MS DOS command line, recompile using switch
"E".

** E036 ** Error Allocating Debugger Screen Memory

ASIC was unable to allocate memory to save the screen output from your
programs when you run your program in debugging mode in the ASIC integrated
environment.  You could try removing some TSRs from your AUTOEXEC.BAT file.
Then try running ASIC again.

** E037 ** IF Statements Nested Deeper Than 25 Levels

An unlimited number of block IF statements may be used in your program,
however, they may be nested to a maximum depth of 25 levels.  See the IF
statement documentation in Chapter 7 for more information.

** E038 ** ELSE Statement Without Preceding IF Statement.

ASIC found an ELSE statement but did not find a preceding block IF
statement.  See the IF Statement documentation in Chapter 7 for more
information.

** E039 ** ENDIF Statement Without Preceding IF Statement.

ASIC found an ENDIF statement with no preceding matching IF statement.  See
the IF statement documentation in Chapter 7 for more information.

** E040 ** Block IF Statement Without Matching ENDIF Statement.

When using the block IF format of the IF statement, you must always specify
a matching ENDIF statement.  See the IF Statement documentation in Chapter
7 for more information.

** E041 ** WHILE Statements Nested Deeper Than 25 Levels

An unlimited number of WHILE statements may be used in your program,
however, they may be nested to a maximum depth of 25 levels.  See the WHILE
statement in Chapter 7 for more information.

** E042 ** WEND Statement Without Preceding WHILE Statement

ASIC found a WEND statement with no preceding matching WHILE statement.
See the WHILE statement documentation in Chapter 7 for more information.

** E043 ** WHILE Statement Without Matching WEND Statement

Each WHILE statement must be followed by a matching WEND statement.  See
the WHILE statement documentation in Chapter 7 for more information.

** E044 ** This statement format is only valid when producing OBJ files.

You used a format of a statement which does not make sense with the current
compiler option.  For example, you specified "CALL SUB" when compiling with
the B/EXE or B/COM option.  This is invalid, since CALL SUB will generate a
reference for the linker to resolve the SUB procedure name.  ASIC will not
resolve the SUB reference when using the B/COM or B/EXE option, since no
OBJ file is produced with these options.  Recompile with the B/OBJ option
(select the OBJ option in the integrated environment).

** E047 ** Requires Decimal Math--Recompile w/DEC Option

Your program contains a statement containing a decimal variable or constant
(eg, A@ or 1.234).  To use decimal numbers, you must turn on the "Decimal
Math" option from the "Compile" menu, or, if you are compiling from the
command line, by specifying the command line option "DEC".  Turn on this
option, and recompile your program.

** E048 ** 999999999999.99999 Is Max Constant Size

You specified a decimal constant in your program which exceeds the maximum
size that ASIC can handle.  Modify your program until the constant is
within +/-999,999,999,999.99999 and recompile your program.

** E050 ** SUB statements must be the first line of a source file

You included a SUB statement in a program, but it is not located at the
beginning of the source file.  Move the SUB statement to the very first
line of the source program.

** E051 ** Must compile with OBJ compile option when using SUB

Your program contains a SUB statement.  When compiling SUB modules, you
must use the "Object Output File" compile option.  Select this option from
the advanced compile menu in the editor.  If compiling from the command
line, specify "B/OBJ".

** E052 ** Turn off DEBUG option when compiling SUB programs

Your program contains a SUB statement.  You cannot generate Debugging Code
for SUB modules.  Turn off the "Debugging Code" compile option and
recompile the program.


                            NON-FATAL WARNINGS

* W002 * Printer Not Ready - 'P' Option Ignored

You selected the "Printer" option, but ASIC was not able to access the
printer.  Make sure the printer is online before compiling with the 'P'
option.

* W004 * Edit Buffer Full--File Truncated

While loading a file, the edit buffer filled before ASIC reached end-of-
file.  The file is truncated in memory.  IF YOU SAVE THE FILE AFTER
RECEIVING THIS MESSAGE, PART OF THE FILE WILL BE LOST ON DISK.  IT IS
RECOMMENDED THAT YOU EITHER EXIT ASIC IMMEDIATELY, OR THAT YOU SAVE THE
TRUNCATED FILE UNDER A NEW NAME SO THAT THE ORIGINAL FILE IS NOT DAMAGED.

* W005 *  Edit Buffer Full

ASIC issues this message when the edit buffer is full and you attempt to
insert a line.  Delete some unnecessary source lines to create space in the
edit buffer.

* W006 * Source/Dest of Block Copy/Move May Not Overlap

You attempted to move or copy a block of lines to a destination line which
was within the source block of lines.  Execution of this block move/copy
would result in an endless series of copies or moves.  Move the cursor
outside of the highlighted block of lines, and try again.

* W007 * Source Program Modified.  Recompile? (Y/N)

You selected the RUN or TRACE option of ASIC.  ASIC has noticed that you
have modified the source.  You should answer "Y" here to cause ASIC to
recompile your program before running it.  If you instead answer "N", ASIC
will execute the existing copy of the compiled program, which will not
contain your latest changes.

* W009 * File has been modified.  Save File Now? (Y/N)

You have told ASIC to exit back to DOS, but the edit buffer has been
modified.  You should answer "Y" so that ASIC will save your changes back
to disk.  If you answer "N" here, any changes you have made to your program
since the last SAVE command will be lost.

* W010 * Too Much Debugging Info-Truncating

ASIC could not handle all of the debugging information it found.  This
error should not occur.

* W011 * Variable Not Found

During the processing of a Watch, Unwatch, or Modify Command, you specified
a variable name which ASIC could not find in the debugging information.
Checking your spelling for possible errors.  Also, verify that you have
compiled your program with the Debugging compiler option turned ON.

* W012 * Maximum Number of Variables Are Being Watched

You are already "watching" the maximum number of variables that this
version of ASIC supports.  "Unwatch" one of the variables in the watch
window.  This will allow you to "Watch" a new one.

* W013 * There Are No Variables Being Watched

You selected the "Unwatch" command.  However, there are no variables in the
watch window to "Unwatch".  Before this command may be used, you must first
have added a variable to the Watch window using the "Watch variable"
command.

* W014 * Unable to Load/Run Program

When ASIC attempted to load and run either the compiler or your program it
detected an error.  This is due to one of two reasons.  First, ASIC could
not find the program on disk.  If compiling, make sure that the ASICC.EXE
file is in the same directory as the ASIC.EXE file, and make that directory
current.  The second reason that you might get this error is that there may
be insufficient memory available on your PC.  In this case, you either need
to free up more memory (by removing TSRs etc), or you could execute your
program or the compiler from the DOS command line.  For more information on
compiling from the command line, see Chapter 5--Stand-alone Compiler
Options.

* W015 * Can't Set Breakpoint--No Code Generated For That Source Line

You attempted to set a breakpoint and either 1) You haven't compiled with
the Debugging Compiler Option turned on, or 2)  You have tried to set a
breakpoint on a line which did not generate any object code.  Thus,
breakpoints cannot be set on REM or DATA statements, for example.  If you
are sure that you have compiled with the above option turned on, then try
setting the breakpoint on another nearby statement.

* W018 * Your Program Must Be Running To Use This Function

You selected a function which is only operable when you are running a
program (which was compiled with the debugging compiler option turned on).
After your program terminates, this function is not available.

* W019 * Function Unavailable Until You Terminate Your Program

You selected a function while your program was running in debugging mode.
Before you can execute this function you must either Abort your program, or
allow it to Run until normal termination.  Both the Run and the Abort
Options are available on the "Run" Menu.

* W020 * Invalid Debug (.DBG) File Format

ASIC attempted to access the symbolic debugging information file created by
the compiler for your program.  It was able to locate the file, but
detected an error in the format while reading it.  Make sure that the
version number of both the ASIC Integrated Editor and the ASIC Compiler are
the same.  The version number is displayed on the top line of the editor
screen, following the word "ASIC".  It is also displayed on the compiler
status screen while a compile is executing.

* W021 * Maximum Number of Breakpoints Already Set

You have attempted to set another breakpoint, but the maximum number that
this version of ASIC can support are already in use.  Remove one of the
existing breakpoints you have set.  This will free one up for your use
elsewhere.

* W022 * Can't Open ASIC.IDX File

You requested online help for an ASIC keyword.  This function requires a
file called "ASIC.IDX" provided with your ASIC package, and ASIC could not
find this file in the current disk directory.  Copy this file from your
ASIC package to the directory in which you are running ASIC and try again.

* W023 * Can't Open ASIC.DOC File

You requested online help for an ASIC keyword or menu option.  This
function requires a file called "ASIC.DOC" provided with your ASIC package,
and ASIC could not find this file in the current disk directory.  Copy this
file from your ASIC package to the directory in which you are running ASIC
and try again.

* W024 * Can't Open ASICM.IDX File

You requested online help for an ASIC menu option.  This function requires
a file called "ASICM.IDX" which was provided with your ASIC package, and
ASIC could not find this file in the current disk directory.  Copy this
file from your ASIC package to the directory in which you are running ASIC
and try again.

* W025 * No Help Available For Selected Item

There is no online help available for the item you selected.  The
information should be available in the ASIC Manual.

* W026 * Unable To Write ASIC.CFG File

You told ASIC to save your current Integrated Environment Options.  ASIC
attempted to do so, but was not able to.  Your options were not saved to
disk.  This is usually caused by one of two things: 1)  The disk is full,
or 2)  The disk is write-protected.  If the disk is full, delete some
unneeded files and try again.  If the disk is write-protected, remove the
write-protect tab from the disk and try again.

* W027 * Debugger Can't Fully Save User Screen--Insufficient Memory

ASIC was not able to allocate enough memory to save the screen output from
your program while it was running in debugging mode in the integrated
environment.  As a result, the screen displays may become garbled.  You
should normally only see this message when your program is using a high
resolution EGA/VGA graphic mode on machines with very low memory, or you
have many TSRs installed.  Either purchase more memory, go to a lesser
graphics mode, remove some TSRs from the AUTOEXEC.BAT file, or run your
program outside of the integrated environment.

* W028 * Not Enough Memory To Build Full File List

After you selected the Open or Save options from the File menu, ASIC
attempted to build a list of existing file names in memory, but was unable
to due to lack of memory.  Exit from the editor and try to free up more
memory by removing TSR's, etc.

* W029 * Out of Memory -- Allocating Debug Symbols

The editor was trying to read the debugging information for your program,
but was unable to allocate enough memory to store the information.  If you
proceed, the Watch, Unwatch, Modify Variable, Trace, and Breakpoint
commands may perform erratically.  Exit the editor and try to free up more
memory by removing TSR's, etc.

* W030 * Stack Size Must Be 16-32767

You selected the Stack Option off of the Advanced Options Menu, and entered
a stack size that is too small or too large.  Your entry was ignored--the
stack size was not updated.

* W031 * Unable To Save Program Options

ASIC attempted to save program compile options to disk, but was not able
to.  This is usually caused by a disk that is full or has the write protect
tab set.

* W032 * Unable to run COMMAND.COM

ASIC was unable to locate the COMMAND.COM file.  Because of this, it was
unable to complete your request.


                              RUN TIME ERRORS

Divide Overflow

This message indicates that your program attempted to divide by zero.

                         SYSTEM ERROR CODE VALUES
After most commands which access the disk, ASIC sets a special "ERROR"
variable to indicate success or failure of that command.  After you execute
one of these commands, you can reference this variable as a regular
variable in your program, to determine the outcome of the command(eg. "IF
ERROR = 000 THEN OKAY:").

ERROR Codes Set by BLOAD

000       No Error
002       File Not Found
003       Path Not Found or File Doesn't Exist
004       File Not Found
005       File Access Denied
006-255   Read Past End of File

ERROR Codes Set by BSAVE

000       No Error
002       File Not Found
004       File Not Found
005       File Access Denied
006-255   Disk Full

ERROR Codes Set by CALL

000-254   Return Code from Program (Zero If Not Set by User Program)
255       Error Loading/Running Program

ERROR Codes Set by CHDIR

000       No Error
003       Path Not Found

ERROR Codes Set by CLOSE

000       No Error
006       Invalid Handle
095       Cannot Close File -- File is not Open

ERROR Codes Set by FILEPOS

000       No Error
001       Invalid Function Number
006       Invalid Handle
098       File mode not Random or Append

ERROR Codes Set by FIND

000       No Error
002       File Not Found018       No More Files Match Search Criteria

ERROR Codes Set by GETDIR

000       No Error
015       Invalid Disk Drive Specification

ERROR Codes Set by INPUT (when using ";" option)

000       No Error
001       Invalid Input

ERROR Codes Set by INPUT#

000       No Error
005       Read Access Denied
006       Invalid File Handle
096       Input String Truncated at 80 characters
          (this error code is not set when you specify NONULL)
098       File Not Open for Input or Random Modes
099       End of File

ERROR Codes Set by KILL

000       No Error
002       File Not Found
005       Access Denied

ERROR Codes Set by MKDIR

000       No Error
003       Path Not Found
005       Access Denied

ERROR Codes Set by NAME

000       No Error
002       File Not Found
003       Path Not Found or File Doesn't Exist
005       Access Denied
017       Not Same Disk Drive

ERROR Codes Set by OPEN --- Mode Input

000       No Error
002       File Not Found
004       File Not Found
005       File Access Denied
254       File Number Already in Use

ERROR Codes Set by OPEN --- Mode Output, Append, or Random

000       No Error
001       Invalid Append Function
003       Path Not Found
004       No File Handle Available
005       File Access Denied
006       Invalid Append Handle
254       File Number Already in Use

ERROR Codes Set by PRINT#

000       No Error
005       File Access Denied
006       Invalid File Handle
097       File Not Open for Output, Append, or Random Modes
255       Disk Full

ERROR Codes Set by RMDIR

000       No Error
003       Path Not Found
005       Access Denied
006       Can't Delete Current Directory
016       Can't Delete Current Directory

ERROR Codes Set by RUN

000-254   Return Code from Program (Zero If Not Set by User Program)
255       Error Loading/Running Program

ERROR Codes Set by DECIMAL Math Routines

000       No Error
001       Division By Zero