Skip to content
brickpool edited this page May 12, 2019 · 3 revisions

Error messages

Error messages cause the parser to immediately stop assembling your file.

Code or data emission to undeclared segment

A statement that generated code or data is outside of any segment declared with the SEGMENT directive. For example:

SEGMENT DATA
  ...
ENDS
; no segment statement
  LBL A         ; error, code without segment declaration

Declaration needs name

You have used a directive that needs a symbol name, but none has been supplied. For example:

SEGMENT
  str EQU '123' ; error, SEGMENT needs a name
ENDS

Expecting SEGMENT keyword

The structure statement for defining segments expects the keyword SEGMENT.

Expecting segment or group quantity

A statement required a segment name, but did not find one. For example:

SEGMENT DATA
  AA EQU 0
  BB FOO 1      ; error, FOO is not data segment keyword
ENDS

Missing or illegal language ID

You have entered something other than one of the allowed language identifiers after the MODEL directive. See the online documentation for a complete description of the MODEL directive.

Model must be specified first

You used one of the simplified segmentation directives without first specifying a memory model. For example:

SEGMENT CODE    ; error, no MODEL first

You must always specify a memory model using the MODEL directive before using any of the other simplified segmentation directives.

Illegal instruction

A source line starts with a symbol that is neither one of the known directives nor a valid instruction mnemonic.

RET             ; should be "RTN"

Illegal origin address

You have entered an invalid address to set the current segment location. You can enter either a constant or an expression using the location counter, or a symbol in the current segment.

Illegal segment address

This error appears if an label specified as a constant segment address; for example:

SEGMENT CODE
A001:           ; error, label looks like an address
  LBL A
ENDS

Labels can't start with numeric characters

You have entered a symbol that is neither a valid number nor a valid symbol name, such as 123ABC.

Need expression

An statement is missing the expression after the type specifier. For example:

SEGMENT CODE
  AA EQU 'a'
  BB EQU        ; error, BB has no expression after EQU
ENDS

Open segment

A segment started with the SEGMENT directive has not been ended with the ENDS directive. For example:

SEGMENT DATA
END             ; no ENDS before END

This usually happens when you forgot ENDS or type END instead of ENDS to end a segment.

Symbol already defined

The indicated symbol has previously been declared with the same type. For example:

AA EQU 1
AA EQU          ; error, A already defined

Symbol already different kind

The indicated symbol has already been declared before with a different type. For example:

SEGMENT DATA
  ret EQU 1
  ...
ENDS
SEGMENT CODE
  ...
ret:              ; error, ret already defined
  RTN
ENDS

Unknown character

The current source line contains a character that is not part of the set of characters that make up the Assembler symbol names or expressions. For example:

SEGMENT DATA
  AA EQU 'A?'     ; error, question mark is illegal character
  ...
ENDS

Unexpected end of file (no END directive)

The source file does not have an C directive as its last statement. All source files must have an END statement.

Unmatched ENDS

The ENDS directive has a name that does not match either the SEGMENT directive that opened a segment definition. For example:

SEGMENT program CODE
ENDS main       ; error, code should be "program"

Clone this wiki locally