Back Home

Navigation

Home

SB-Assembler
News
Download
Quick Start
Source Files
Running SBASM
Expressions
Labels
Directives
Macros
Error Messages
How To?
History
Known Bugs

Cross-Overlays

This page has not been adapted to SB-Assembler Version 3 yet.

Error Messages

The SB-Assembler is just another program that tries to understand the commands you give it. It will not always succeed in understanding you. That's why I've added some error messages to warn you that there is something wrong in your source files.
Please note that the SB-Assembler can only warn you for syntax errors, value errors, and non-existing properties. It can't warn you for logical errors in your program. A program that does not report any errors is not necessarily a working program! It only tells you that the program obeyed to the rules of the SB-Assembler.

There are two main types of errors, fatal and non-fatal errors. Fatal errors are so severe that it's no use to continue the assembly process. The SB-Assembler will report such an error and quit immediately.
Non-fatal errors are still errors that would prevent your program from working correctly, but they are not serious enough to quit the assembly process at once. The SB-Assembler will not start pass 2 of the assembly process if errors are found in your program during pass 1. No code will be generated if pass 2 is not started and the previous code file is unchanged. If an error occurs during pass 2 some code may have been generated and a previous code file will be overwritten. It is not very likely that the resulting code file will work correctly.

There is a standard list of error messages originating from the SB-Assembler itself. Some Cross-Overlays may add some specific error messages to the standard list. Details about Cross specific errors can be found in the description of the particular Cross Overlay.

Non fatal errors

*** Bad opcode error

There was some kind of error detected in the instruction field (mnemonic or directive).
A misspelled mnemonic or directive may cause this error. Or it could be caused by loading a wrong Cross-Overlay.

*** Bad operand error

There was some kind of error detected in the operand field (parameters). Consult the description of the mnemonic or directive to learn the rules of the operands in question.
A missing comma to separate operands may also cause this error to appear. Or perhaps you typed a space behind the comma which is not allowed for commas that should separate operands.

*** Bad symbol error

The label name in the label field does not obey to the rules. Perhaps the label name started with something else than a letter from A to Z, a dot or a colon?

*** Binary format error

An error was found in the formatting of a Binary Include file. All records should be formatted according to the file format in use.

*** Checksum error

A checksum error was found while the assembler was reading a Binary Include file. Maybe the file is corrupted.

*** Divide by 0 error

An expression tried to divide a number by 0, which is not allowed in math.

*** .DO nested too deep error

Congratulations! You've broken the world record of foolishness. You have nested more than 255 .DO directives! Obviously you have outsmarted the SB-Assembler.

*** Empty string error

There were no characters found in the string that was delimited by 2 adjacent delimiters. Empty strings are not allowed.

*** Error file already open error

You tried to open a second error file using the .ER directive. Only one error file can be opened during an assembly run.

*** Extra definition error

An attempt is made to give an already existing label a different value than the first time it was used during this assembly run. Label values are constants and can not be changed anymore.

*** Extra Macro definition error

You try to define a macro with the .MA directive with the same name as an already existing macro. Choose a different name for one of the macro definitions.

*** Illegal declaration error

You tried to create a label in the symbol table during pass 2. This is a little too late. All labels must be declared at the end of pass 1.

*** Illegal directive in Macro error

You've used one of the forbidden directives from within a macro definition. This error is given during the definition of the macro, between the .MA and .EM directives.
This is a list of all illegal directives from within a macro definition:   .MA, .IN, .CH, .BI, .EN, .CO and .EC .

*** Illegal forward reference error

You tried to use the value of a label that was not defined yet. This is OK in most situations, but not in all.

*** Illegal hex digit error

The .BI or .HS directives report this error when they stumble over a character other than a hexadecimal digit. Legal hexadecimal digits are the numbers 0 to 9 and the letters A to F.

*** Illegal label declaration error

You try to declare a label on a program line containing the .EL or .FI directives. The label field of such program lines should remain empty.

*** Illegal mnemonic error

The maximum length of mnemonics in the SB-Assembler is 10 characters. You typed more than 10 characters so it can't possibly be a mnemonic.

*** Illegal or missing Macro name error

You try to define a Macro using the .MA directive. But the SB-Assembler could not find a legal macro name on that line. Macro names should start with a letter from A to Z. The macro name is expected in the label field, or optionally in the operand field.

*** Label not a constant error

You try to redefine a label's value automatically or by using the .EQ directive that originally was declared using the .SE directive.
Once a label is declared as a variable it cannot be changed to a constant any more.

*** Label not a variable error

You try to redefine a label's value by using the .SE directive that originally was declared automatically or by using the .EQ directive.
Once a label is declared as a constant it cannot be changed to a variable any more.

*** Missing .DO error

The SB-Assembler finds a program line containing the .EL or .FI directive, while no pending .DO is active.

**** Missing .MA directive error

The SB-Assembler finds the .EM directive in your program while you were not defining a macro with the .MA directive.

*** Missing file name error

The directive you used expected to find a file name in the operand field. Give it a break and provide for one.

*** Missing global label error

You tried to define a Local label while you never declared a Global label yet. This error is also reported directly after the definition of a macro or the first declaration of a variable by using the .SE directive. You should declare at least one Global label before you can use Local labels again.

*** Missing hex string error

No, or no legal string of hexadecimal bytes was found in the operand field of the .HS directive.

*** Missing label error

The directive expected to find a label name in the label field, but couldn't find one.

*** No comment block error

The .EC directive was encountered without a matching .CO directive.

*** No Macro expanding error

The .XM directive was found outside a macro expansion. The .XM directive can only be used from within a macro definition.

*** Not implemented in MS-DOS version error

The .TA directive can not be used on a PC because the SB-Assembler can't produce 8086 code.

*** Operand expected error

The SB-Assembler expected to find an operand in the operand field, but could not find one.

*** Overflow error

A constant number in any of the available radixes (not an expression!) was larger than 32 bits. Values larger than $FFFFFFFF result in this error message.
Please note that expressions will never generate an Overflow Error!

*** Range error

The expression in the operand field produced a number out of the expected range. Please consult the particular directive or mnemonic that caused this error and check the allowed range.

*** String not terminated error

You did not terminate the string with the same delimiter you started the string with.

*** Symbol file already open error

The .SF directive tried to open a symbol table for the 2nd time in your program, which is not allowed.

*** Undefined label error

This error is reported during pass 2 if you used a label that was never declared during pass 1. This error is not reported during pass 1 because the label could be forward referenced.

*** Undefined Macro error

You tried to expand a macro that was not declared. Perhaps you miss-typed its name. Macros can't be forward referenced!

*** Unknown directive error

The instruction field started with a dot, but doesn't contain a legal directive name.

*** User error

This error was forced by the .ER directive.

*** Value expected error

The SB-Assembler expected to find a value in the operand field, but could not find one.

Fatal errors

*** Access denied error

The system does not allow you to create, alter or erase a particular file. Perhaps the file is read only or in use by another program.

*** Bad operand error

The operand didn't obey to the required syntax, which is totally unacceptable for .BS, .NO, .OR, .PH and .TF directives.

*** File not found error

The SB-Assembler tried to open a file, but could not find it in the current or indicated directory.

*** Illegal address error

Every processor's program counter (PC) is limited. You tried to save instructions beyond its range if you get this error.

*** Incompatible Cross-overlay version number error

The SB-Assembler tried to use an out dated Cross Overlay. I try to keep overlay files backwards compatible as much as I can. But this is not always possible for major release changes. Download the latest version of the SB-Assembler if you get this error message.

*** Macro definition not terminated error

The end of the source file was encountered during the definition of a Macro. Macro definitions can not span multiple source files.

*** Missing or illegal file name error

The directive requires a file name in the operand field. No file name, or a file name that is not MS-DOS compatible was given.

*** Nested include error

You tried to open a new .INclude file or .BInary include file from within an other .INclude file. Include file nesting is not allowed with the SB-Assembler.

*** No Cross Assembler overlay loaded error

The SB-Assembler tried to decipher a mnemonic while there was no Cross-Overlay loaded into the SB-Assembler. Please use the .CR directive to load the appropriate Cross-Overlay.

*** Open error

The SB-Assembler did not succeed in opening an important file, for various reasons.

*** Path not found error

The path you provided was not found while accessing an important file.

*** Range error

You tried to use an operand that was out of range at a critical stage in your program.

*** Read error

An MS-DOS read error was reported to the SB-Assembler when accessing a file. Probably you have a damaged disk.

*** Symbol table full error

Although the SB-Assembler has very modest memory requirements you managed to fill the whole free MS-DOS conventional memory below 640k. If you're running under windows and have your DOS based text editor running in the same dos box you better start your editor in a separate dos box to leave more memory free for the SB-Assembler.

*** Target address out of range error

Your program has grown to a size that can't be handled by the current target file format any more. Please use a different format or resize or relocate your program

*** Undefined label error

This error is reported during pass 2 if you used an undefined label at a critical point.

*** Unknown file format error

The .BI directive was fed with a file that did not contain data according to the selected file format.

*** User error

This fatal error was forced by the .ER F directive.

Error Levels

Every MS-Dos program will report an error level to the system when it exits. This error level could be used in a batch file to act appropriately to different exit reasons.
The SB-Assembler generates the following error levels:

00 = Exit without errors
01 = One or more non-fatal errors found during pass 1
02 = One or more non-fatal errors found during pass 2
03 = Syntax error found on command line, or help was requested
04 = The user stopped the SB-Assembler with the ESC key
05 = The program terminated because of a fatal error
06 = Out of memory
07 = DOS version is too old
 

© 2002, San Bergmans, Oisterwijk, The Netherlands
http://www.sbprojects.com