C ASSEMBLER ERROR MESSAGES

This appendix contains the following sections:

Overview
Fatal Errors
Assembly Errors
Assembly Warnings

1 Overview

This appendix describes the error messages and warnings produced by the assembler asm51. There are three types of messages: fatal errors, assembly errors and assembly warnings.

2 Fatal Errors

The following errors cause the assembler to exit immediately.

assertion failed

This signifies an internal assembler error. If you get this message from the assembler please contact your local TASKING representative.

cannot open file

The file file cannot be opened because the file does not exist or the file permissions do not allow access.

can't reopen file

The file file cannot be opened because the file does not exist or the file permissions do not allow access.

can't create file

The file file cannot be created because the parent directory does not exist, the directory is not writable or file already exists and does not allow write access.

write error on output file

An error occurred during a write to the output file.

3 Assembly Errors

The following errors may occur during the assembly process and cause the assembler to stop at the end of the current pass. For errors marked (FATAL), the assembler stops immediately because it is impossible to continue.

ERROR 0: INTERNAL ERROR

Something is wrong with the assembler. Assistance can be obtained from your local TASKING representative.

ERROR 1: SYNTAX ERROR

The current line contains a syntax error.

ERROR 3: ARITHMETIC OVERFLOW IN NUMERIC CONSTANT

A number with more than 20 digits is used.

ERROR 4: ATTEMPT TO DIVIDE BY ZERO

Division by zero error during expression evaluation.

ERROR 5: EXPRESSION WITH FORWARD REFERENCE NOT ALLOWED

A forward reference was used in the expression defining an equate.

ERROR 7: SYMBOL ALREADY DEFINED

An attempt was made to define a symbol which is already defined.

ERROR 12: ILLEGAL CHARACTER IN NUMERIC CONSTANT

Unexpected letters were found in a numerical constant.

ERROR 15: ILLEGAL CHARACTER

A non-ASCII character was encountered in the input.

ERROR 17: ARITHMETIC OVERFLOW IN LOCATION COUNTER

The location counter overflowed to a value greater than 0FFFFH.

ERROR 18: UNDEFINED SYMBOL: "symbol"

The symbol was not defined local and not declared external.

ERROR 19: VALUE WILL NOT FIT INTO A BYTE

The value of a DB expression is not between -256 and +255.

ERROR 20: OPERATION INVALID IN THIS SEGMENT

A DS , DBIT , DB or DW assembler directive was used in the wrong segment.

ERROR 21: UNTERMINATED STRING

A string without a terminating single or double quote was encountered.

ERROR 22: STRING LONGER THAN TWO CHARACTERS NOT ALLOWED IN THIS CONTEXT

A string, used in an expression, may not be longer than two characters.

ERROR 27: ABSOLUTE EXPRESSION EXPECTED

An absolute expression, not containing any relocatable symbols, is required here.

ERROR 28: REFERENCE NOT TO CURRENT SEGMENT

Conditional instructions cannot have a destination address outside the current segment.

ERROR 31: EXTERNAL REFERENCE NOT ALLOWED IN THIS CONTEXT

External references are not allowed in equate definitions or ORG assembler directives.

ERROR 32: SEGMENT REFERENCE NOT ALLOWED IN THIS CONTEXT

Segment names are not allowed in equate definitions.

ERROR 33: TOO MANY RELOCATABLE SEGMENTS

The total number of segments may not exceed 253.

ERROR 35: LOCATION COUNTER MAY NOT POINT BELOW SEGMENT BASE

The location counter may not be set to a value below the segment base address.

ERROR 40: BYTES OF BIT ADDRESS NOT IN BITADDRESSABLE DATA SEGMENT

DATA segment must be declared BITADDRESSABLE to enable bit selections.

ERROR 42: BAD REGISTER BANK NUMBER

The register bank number must be 0, 1, 2 or 3.

ERROR 43: INVALID SIMPLE RELOCATABLE EXPRESSION

An expression defining the value for an ORG directive may not contain relocatable symbols defined in other segments.

ERROR 44: INVALID RELOCATION EXPRESSION

An expression must not contain references to different segment types.

ERROR 45: INPAGE RELOCATED SEGMENT OVERFLOW
(SEGMENT "segment")

The size of a segment with the INPAGE attribute exceeds 256.

ERROR 46: INBLOCK RELOCATED SEGMENT OVERFLOW
(SEGMENT "segment")

The size of a segment with the INBLOCK attribute exceeds 2048.

ERROR 48: ILLEGAL RELOCATION FOR THIS SEGMENT TYPE

One of the segment attributes is not allowed for this segment type:

- PAGE and INPAGE are allowed for CODE and XDATA only.

- INBLOCK is valid for CODE only,

- BITADDRESSABLE is valid for DATA only.

ERROR 50: OUT OF MEMORY (FATAL)

There is not enough memory to continue.

ERROR 52: DUPLICATE SEGMENT NAME, SEGMENT ALREADY DEFINED

Each relocatable segment must be declared exactly once.

ERROR 53: ILLEGAL SEGMENT NAME, SYMBOL ALREADY DEFINED

The name used in a segment definition is already used in another declaration.

ERROR 54: SEGMENT NAME USED BEFORE DECLARATION

A segment should be declared before it is first used.

ERROR 55: NUMERICAL ARGUMENT EXPECTED FOR CONTROL "control_name"

The assembler control control_name requires a numerical argument.

ERROR 56: STRING ARGUMENT EXPECTED FOR CONTROL "control"

The assembler control control requires an argument enclosed in parenthesis.

ERROR 57: ILLEGAL CONTROL "control_name"

The assembler control control_name does not exist.

ERROR 58: LABEL ALREADY DECLARED EXTERNAL

An attempt was made to define a label which is already declared external.

ERROR 59: LABEL "label" ALREADY DECLARED LOCAL

The label declared external is already declared local.

ERROR 60: INCOMPATIBLE EXPRESSION TYPES

The operands of a binary operation have incompatible expression types.

ERROR 61: INCOMPATIBLE SEGMENT TYPES

The operands of a binary operation are incompatible, because they are defined in different memory spaces.

ERROR 62: WRONG EXPRESSION TYPE

This error is generated if:

- A bit selection is attempted from a byte which is not in DATA space.

- The type of the expression defining the value for a typed equate does not match the equate type.

- The expression defining the value for an ORG directive has the wrong memory space attribute.

ERROR 63: LOW/HIGH NOT ALLOWED HERE

An expression involving the LOW/HIGH operators and relocatable symbols may not be used as operand in another expression. Thus in a relocatable expression, the operators LOW and HIGH must be at the outermost level.

ERROR 64: FILE INCLUSION MUST BE DONE BY THE MACRO PROCESSOR

The $INCLUDE(file) control must be interpreted by the macro preprocessor, where the control will be erased when the file is included. The assembler signals an error if the control is still there, because the user apparently forgot to invoke the preprocessor.

ERROR 65: UNRECOVERABLE SYNTAX ERROR, PARSER TERMINATED

The parser encountered a syntax error from which it cannot recover, so the parsing is aborted. This error only occurs under very rare circumstances. Normally, error number 1 is generated for a syntax error.

ERROR 66: VALUE DOESN'T FIT

This error is generated when the expression defining a byte value evaluates into a number less than -256 or greater than +255.

ERROR 67: BAD BRANCH OFFSET

The offset for a branch or jump is too large to fit in the instruction.

ERROR 69: BAD OPERAND

This type of operand is not allowed for this instruction.

ERROR 70: BAD REGISTER

Generated if an indirect register (R0 or R1) is required, but another register is used.

ERROR 72: ILLEGAL EQUATE

The assembler cannot evaluate the defining expression of the equate.

ERROR 74: ILLEGAL OPERATOR

This error is caused by an illegal operation involving a relocatable subexpression. The only operations possible on a relocatable (sub-)expression are adding and subtracting an absolute value, and performing the LOW or HIGH operation.

ERROR 77: NON-BIT ADDRESSABLE BYTE

The byte used for a bit selection is not a bit-addressable memory location.

ERROR 79: RELOCATION OVERFLOW

More than 10 external symbols are used on one source line.

ERROR 80: INVALID ADDRESS FOR THIS MEMORY TYPE

The expression does not correspond to a valid address in the memory space associated with the expression.

ERROR 81: OVERLAY NOT POSSIBLE FOR CODE SEGMENT

The OVERLAY attribute is invalid for segments in CODE memory space.

ERROR 82: PHASING ERROR

The value of a symbol in pass 3 is different from its value in pass 2. This error only occurs under very rare circumstances.

ERROR 83: INVALID SEGMENT ATTRIBUTES

The number of segment attributes, excluding the OVERLAY attribute, is greater than one.

ERROR 84: TOO MANY EXTERNALS IN EXPRESSION

Is is not allowed to have two external references in one expression. Make at least one of the symbols global.

ERROR 85: TOO MANY CONTROLS ON COMMAND LINE (FATAL)

The total length of the controls given on the command line exceeds 256 characters.

ERROR 86: STRING TOO LONG

A string longer than 200 characters is encountered.

ERROR 87: BAD BIT NUMBER

A bit number which is not in the range 0-7 is used.

ERROR 88: SHORT RELOCATED SEGMENT OVERFLOW
(SEGMENT "segment")

The size of a segment with the SHORT attribute exceeds 256.

ERROR 90: ILLEGAL EQUATE: REDEFINITION OF SYMBOL, USE SET

Only the SET directive can be used to redefine a symbol.

ERROR 92: NO EXTERNAL MEMORY, OPERATION NOT ALLOWED

With the NOEXTERNALMEMORY control specified, the MOVX instruction is not allowed.

ERROR 93: SFR include file "file" not found

NOEXTERNALMEMORYThe .sfr file you specified with the -D option cannot be found in the search path. Check whether the specified .sfr file exists or change the search path with the -D option.

ERROR 94: MOV A,ACC IS AN INVALID INSTRUCTION

NOEXTERNALMEMORY-D -D The content of the accumulator after the execution of this instruction is undefined.

ERROR 95: maximum line length (line) exceeded

NOEXTERNALMEMORY-D -D A line longer than 1500 characters is encountered.

4 Assembly Warnings

The following warnings may occur during the assembly process. Warnings do not cause the assembler to stop premature.

WARNING 2: OVERLAPPING RANGES IN SEGMENT

Two parts of the same segment overlap.

WARNING 3: PRIMARY CONTROL "control" NOT VALID ON THIS PLACE

A primary control may be used only at the beginning of a source file.

WARNING 4: PRIMARY CONTROL "control" ALREADY SET

A primary control may not be set more than once.

WARNING 5: UNEXPECTED CONTROL (INTERNAL ERROR)

The assembler encountered an assembler control it does not recognize. This error indicates an inconsistency in the assembler.

WARNING 6: PAGEWIDTH TOO SMALL, SET TO 64

The page width specified with the PAGEWIDTH(width) control is too small to produce a reasonable listing, so it is set to 64.

WARNING 7: PREMATURE END-OF-FILE (NO END STATEMENT)

The END statement is missing.

WARNING 8: TEXT FOUND BEYOND END STATEMENT - IGNORED

The END statement is not on the last line of the source file. The remaining lines are ignored, although they appear in the listing.

WARNING 9: SYMBOL TABLE GENERATION NOT IMPLEMENTED

The generation of a symbol table is not implemented.

WARNING 12: BIT TABLE OVERFLOW

The bit table used for jump optimizations is full, so that no further optimizations take place.

WARNING 14: CANNOT ALLOCATE MEMORY FOR COREFILE

The assembler attempts to speed up disk I/O by using a large buffer in memory. If the allocation of the buffer fails, this warning is generated. If no further errors occur, the output file is created normally.

WARNING 15: XREF/NOXREF CONTROLS NOT IMPLEMENTED


Copyright © 2002 Altium BV