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.
Due to the error(s) found it is not very likely that the resulting code file will work correctly.
Errors are always sent to the screen. But if there are too many errors you may no longer see the first error messages, which have long gone off the top of the screen. Errors are also listed in the list file, if you have opened one during assembly. And finally you can send all errors to an error file using the .EF directive.
Version 3 of the SB-Assembler also supports warnings. Warnings are not errors, and therefore are no show stoppers like errors are. A program, which produced one or more warnings, will possibly be all right, but may need some attention from you.
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.
Version 2 and version 3 of the SB-Assembler have their own set of error messages.
Therefore you will see them listed here in separate chapters.
Each error message is preceded by the text *** Error: or *** Fatal Error:, which will tell you what type of error it is. Basically any error in the list below can be either a fatal or a non fatal error, depending on the place where the error occurred.
Somehow you have mixed up some of the program files in the assembler package.
Download the latest package from this web site and install it again.
By the way, this is a fatal 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.
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.
Can't open the binary include file. Are you sure it exists?
A source file could not be opened. It probably doesn't exist in the location you have specified. This is obviously a fatal error.
The .TW directive can't write plain text to binary target files (files of type BIN and HEX).
One or more files can't be written to. Maybe the file or the entire file system is read only.
This is always a fatal error. You are using the .CR directive to load a cross overlay which does not exist. This is probably a typo, or the particular Cross Overlay really doesn't exist.
An expression tried to divide a number by 0, which is not allowed in math.
No text was found between two delimiters, resulting in an empty string, which is not allowed.
An attempt is made to give an already existing label a different value than the first time it was declared using this assembly run. Label values are constants and can not be changed any more.
You are trying to use a label's value before the label is actually defined. Most of the time this is perfectly legal. However, there are times where this is not allowed. And this is such a time.
The assembler expected to find a binary digit but found a character which was not 0 or 1.
The assembler expected to find a decimal digit but found a character which was not 0..9.
You are trying to use a character to start a string constant which is not a legal delimiter.
The directive you are using here is not allowed at this moment. This may happen to some directives which are not allowed within a Macro definition for instance.
The format of the binary include file you are trying to read is not recognized.
The assembler expected to find a hex digit but found a character which was not 0..9 or A..F.
You try to declare a label on a program line containing a directive which does not allow labels to be defined. The label field of such a program line should be empty.
You have made some error in naming a label. A label may start with a letter A to Z, a dot . , or a colon : . As of Version 3.01 a label name may also start with an underscore. Furthermore it may contain the letters A to Z, the digits 0 to 9, a dot . , or an under score character _ . Only during definition a label may contain a colon : at the end of the name.
You have made some error in naming a Macro. A Macro name may start with a letter A to Z. As of Version 3.01 a macro name may also start with an underscore. Furthermore it may contain the letters A to Z, the digits 0 to 9, a dot . , or an under score character _ .
The assembler expected to find an octal digit but found a character which was not 0..7.
The label field can not be empty for the .EQ and .SE directives.
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.
You try to redefine a label's value 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.
You tried to expand a non existing Macro. The instruction field started with a > symbol.
The SB-Assembler finds a program line containing the .EL or .FI directive, while no pending .DO is active.
You tried to use a local label without providing a global label in your program first.
Local labels are always tied to a preceding global label.
This error is also reported after the definition of a Macro or the first declaration of a variable by using the .SE directive.
The .MA directive was found on this line, but you failed to provide a name for that Macro.
A mnemonic was found in the instruction field, but no Cross Overlay was loaded yet. This is always a fatal error. Use the .CR directive before the first line containing a processor instruction.
The .XM directive was found outside a Macro expansion. The .XM directive can only be used from within a Macro definition.
The SB-Assembler expected to find an operand in the operand field, but none was found.
The .EC directive was found without a preceding .CO directive. Probably you forgot to remove it after removing the .CO directive.
The .EM directive was found without a preceding .MA directive. You can't end a non existent Macro definition.
An operand appears to be outside its allowable range. Please refer to the operand details in the description of the directive or mnemonic.
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.
It is not possible to write code/data to the RAM memory segment. Therefore it is no use to assign a target file to the RAM memory segment.
You try to open a new include file with the same name as the current include file. This could cause an infinite loop. This is always a fatal error.
The end of the program line was reached while the assembler expected to find a closing delimiter somewhere. You must terminate a literal string with the same delimiter as you started it with.
Labels appear to have different values in pass 1 and pass 2, which is not a good sign.
You may have done something wrong with conditional assembly which includes the pass parameter ? .
If you haven't used conditional assembly using the pass parameter then there is probably a bug in the Cross Overlay causing a different number of bytes generated in pass 1 and pass 2.
Please let me know if you get this one.
You get this error during pass 2 if you use a label which was never declared during pass 1. This error is not reported during pass 1 because the label could be forward referenced.
The instruction field started with a dot, but doesn't contain a legal directive name.
That's odd, an error occurred and I don't know what caused it. Please let me know if you get this one.
This is the default message for user raised errors. You can raise a user error with the .ER directive.
The SB-Assembler expected to find a value in the operand field, but could not find one.
The address counter of the target file reached the end and wrapped back to $0000. This is not considered an error, but it probably requires some of your attention.
You provided more parameters to a directive or instruction than expected. The extra given parameters are ignored. But you may have to take a look at your code to see if the parameters which were expected are indeed the ones you have given.
The .OR directive was found while a non formatted target file was open and not empty any more. Non formatted target files don't contain address information and therefore have to be closed when you change the program counter. If you don't open a new target file after this warning all subsequent target code will get lost.
You can only open one Symbol file. Opening more than one is not allowed. Only the first opened Symbol file is active, all others are ignored.
Apparently you have just loaded a new Cross overlay, which uses a different instruction size, at a moment where the program pointer and the target pointer are no longer in sync.
If this happens the SB-Assembler can't figure out what the relationship between these two pointers is going to be.
It is highly unlikely that the target address will be what you want it to be now.
Therefore it is advised to use the .OR directive, just before the .CR directive in order to set both pointers to the same value, which will avoid this warning.
Then, after loading the multi-byte per instruction Cross Overlay you'll have to do another .OR to make sure the Target Address gets double the value as the Program Pointer.
That's odd, a warning was generated and I don't know what caused it. Please let me know if you get this one.
This is the default message for user raised warnings. You can raise a user warning with the .ER directive.
You try to use processor instructions in an EEPROM or RAM segment.
Processor instructions are only allowed in CODE segment.
See the .SM directive for details about the three memory segments.
This warning is usually given only once per assembly run.
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. This one is always fatal.
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.
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, an underscore, a dot, or a colon?
An error was found in the formatting of a Binary Include file. All records should be formatted according to the file format in use.
A checksum error was found while the assembler was reading a Binary Include file. Maybe the file is corrupted.
An expression tried to divide a number by 0, which is not allowed in math.
Congratulations! You've broken the world record of foolishness. You have nested more than 255 .DO directives! Obviously you have outsmarted the SB-Assembler.
There were no characters found in the string that was delimited by 2 adjacent delimiters. Empty strings are not allowed.
You tried to open a second error file using the .ER directive. Only one error file can be opened during an assembly run.
An attempt is made to give an already existing label a different value than the first time it was declared during this assembly run. Label values are constants and can not be changed any more.
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.
The SB-Assembler tried to open a file, but could not find it in the current or indicated directory.
Every processor's program counter (PC) is limited. You tried to save instructions beyond its range if you get this 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.
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 .
You tried to use the value of a label that was not defined yet. This is OK in most situations, but not in all.
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.
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.
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.
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.
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.
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.
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.
The end of the source file was encountered during the definition of a Macro. Macro definitions can not span multiple source files.
The SB-Assembler finds a program line containing the .EL or .FI directive, while no pending .DO is active.
The SB-Assembler finds the .EM directive in your program while you were not defining a macro with the .MA directive.
The directive you used expected to find a file name in the operand field. Give it a break and provide for one.
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.
No, or no legal string of hexadecimal bytes was found in the operand field of the .HS directive.
The directive expected to find a label name in the label field, but couldn't find one.
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.
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.
The .EC directive was encountered without a matching .CO directive.
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.
The .XM directive was found outside a macro expansion. The .XM directive can only be used from within a macro definition.
The .TA directive can not be used on a PC because the SB-Assembler can't produce 8086 code.
The SB-Assembler did not succeed in opening an important file, for various reasons.
The SB-Assembler expected to find an operand in the operand field, but could not find one.
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!
The path you provided was not found while accessing an important file.
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.
An MS-DOS read error was reported to the SB-Assembler when accessing a file. Probably you have a damaged disk.
You did not terminate the string with the same delimiter you started the string with.
The .SF directive tried to open a symbol table for the 2nd time in your program, which is not allowed.
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.
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
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.
You tried to expand a macro that was not declared. Perhaps you miss-typed its name. Macros can't be forward referenced!
The instruction field started with a dot, but doesn't contain a legal directive name.
The .BI directive was fed with a file that did not contain data according to the selected file format.
This error was forced by the .ER directive.
The SB-Assembler expected to find a value in the operand field, but could not find one.
A program can produce an error level, which can be used by a calling script to act upon when the program exits. Version 3 of the SB-Assembler can exit with one of the following exit levels:
0 | Exit without errors |
1 | One or more non-fatal errors found during pass 1 |
2 | One or more non-fatal errors found during pass 2 |
4 | Assembly quit by user |
5 | The program terminated because of a fatal error |
6 | Fatal error. Wrong Python version is used. |
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 |