Appendix A

ASEM-51 Error Messages


A.1 Assembly Errors:

Assembly errors apply to the consistency of the assembly language program in syntax and semantics. If one of these errors is detected, it is flagged in the list file, and program execution continues. When assembly is finished, ASEM terminates with exit code 1:

Error MessageMeaning
address below segment base Attempt to set the location counter of the current segment below the segment base address.
address out of range The address of a jump or call instruction cannot be reached with the selected addressing mode.
already a macro parameter In a macro definition, a local symbol is equal to a previously defined parameter name.
argument exceeds end of line A macro argument contains more opening than closing angle brackets.
attempt to divide by zero During evaluation of an assembly time expression, the assembler has to divide by zero.
binary operator expected In this position of an expression, only binary operators are allowed.
comma expected There should be a ',' character in the marked position.
commands after END statement The END statement is followed by further assembler statements.
constant out of range A numerical constant is greater than 65535.
duplicate local symbol In a macro definition, a local symbol is defined multiple times or equal to a previously defined parameter name.
duplicate parameter name The parameter names of a macro are not all different.
ENDIF statement expected There are pending IFxx constructions, which are not terminated with an ENDIF meta instruction.
ENDM statement expected There are macro definitions, which are not terminated with an ENDM instruction.
expression out of range The result of an expression is too big or too small for that purpose.
file name expected There should be a valid file name in this position.
forward reference to macro A macro has been called, before it has been defined.
forward reference to register A register type symbol has been used, before it has been EQU'd or SET.
illegal character A statement contains characters, which are not allowed in MCS-51 assembly language.
illegal constant There are syntax errors in a numeric constant.
illegal control statement A statement is starting with an unknown keyword beginning with a $.
illegal operand In this position of an expression, a valid operand had been expected.
illegal statement syntax A statement contains a syntax element, which is not allowed in this context.
invalid base address A DATA address that is not bit-addressable has been used on the left side of a '.' operator.
invalid bit number A number greater than 7 has been used on the right side of a '.' operator.
invalid instruction The instruction has previously been disabled with the $PHILIPS control.
macro type operand A macro type symbol is used as an operand in a numeric expression.
maximum line length exceeded During macro expansion, the replacement of parameters and/or local symbols increases the resulting line length to more than 255 characters.
misplaced LOCAL instruction In a macro definition, a LOCAL instruction is preceded by body lines.
misplaced macro instruction A macro instruction is used outside of a macro definition, or otherwise misplaced in the program structure.
misplaced macro operator A macro operator (<, >, !, %, &) has been used in a wrong position.
module name already defined There are more than one NAME statements in the program.
must be known on first pass The result of an expression must fully evaluate on pass 1 of assembly.
must be preceded by $SAVE A $RESTORE control occurs without a preceding $SAVE control.
must be preceded by IFxx An ELSEIFxx, ELSE or ENDIF meta instruction occurs without a preceding IFxx meta instruction.
no END statement found The program ends without an END statement.
not allowed in BIT segment Instruction is not allowed in a BIT segment.
only allowed in BIT segment Instruction is only allowed in a BIT segment.
only allowed in CODE segment Instruction is only allowed in a CODE segment.
operand expected An instruction ends, before it is syntactically complete.
phase error A symbol is evaluating to different values on pass 1 and pass 2, or a macro has been defined different on pass 1 and pass 2.
Note: This is a serious, internal assembler error, and should be reported to the author immediately!
preceded by non-control lines A primary control occurs after statements that are no assembler controls.
register type operand A register type symbol is used as an operand in a numeric expression.
segment limit exceeded The location counter exceeds the boundaries of the current segment.
segment type mismatch The segment type of an operand does not match the type of the instruction.
string exceeds end of line A character string is not properly terminated with a quote.
symbol already defined Attempt to redefine a symbol, which is already defined.
symbol name expected There should be a valid symbol name in this position.
symbol not defined A symbol is referenced, which has never been defined.
too many closing parentheses An expression contains more closing than opening parentheses.
too many opening parentheses An expression contains more opening than closing parentheses.
too many operands An instruction contains more operands than expected.
unary operator expected In this position of an expression, only unary operators are allowed.
user-defined error A user-defined error message has been forced with the $ERROR control.


A.2 Runtime Errors:

Runtime errors are operational errors, or I/O errors. If one of these errors is detected, it is flagged on the console, and ASEM is aborting with exit code 2:

Error MessageMeaning
access denied No privilege for attempted operation.
ambiguous option name Not enough characters specified.
argument missing Option requires an argument.
device or resource busy Attempt to write to a busy device. (Linux)
disk full No more free disk space.
disk write-protected Attempt to write to a write-protected disk.
drive not ready Disk drive is off, or no media mounted.
duplicate file name Attempt to overwrite an input or output file.
fatal I/O error General (unknown) disk or device I/O error.
file not found Source or include file not found. (DOS/Windows)
illegal option syntax Option is not correctly specified.
invalid argument Option has an illegal argument.
no input file There is no file name in the command line.
no such file or directorySource or include file not found. (Linux)
not a directory Path contains a non-directory name. (Linux)
out of memory Heap overflow!
path not found Disk or directory not found. (DOS/Windows)
symbol is predefined A /DEFINE option specifies a predefined symbol.
too many open files No more free file handles.
too many parameters More than three file names have been specified.
unknown option Option is not implemented.

Only DOS command line options are mentioned above for simplification. Under Linux, they have to be replaced by the corresponding Linux options.



[contents] [up] [back] [next]