Summary of solutions to common errors in compilation

Assembly error set

This article is reproduced from The author is whxway. On this basis, this paper sorts the errors for easy search

Already had ELSE clause

ELSE statement already exists Use more than one ELSE statement in a condition block

Angle brackets requored around initialized list

When defining a structure variable, the initial value is not enclosed in angle brackets ()

Block nesting error

Nesting error A nested procedure, segment, structure, macro instruction, or repeating block that ends abnormally For example, in a nested statement, there is an outer closing statement, but no closing statement

Inner concluding remarks Bureau 1

Byte register illegal

Instructions requiring word registers use byte registers For example, the operand register of the pop instruction must be a word register

Circular chain of EQU aliases

A symbolic name defined with an equivalent statement and finally returned to point to itself For example:



Cannot override ES for destination

The destination operand in a string operation instruction cannot be replaced by another segment register

Cannot address with srgment register

The instruction looks for an operand, but the ASSUME statement does not indicate which segment register is associated with the segment in which the operand is located

Cannot use EVEN or ALIGN with byte alignment

BYTE is selected in the positioning type of segment definition pseudo instruction, and EVEN or ALIGN pseudo instruction cannot be used at this time

Constant expected

A constant is required

Cannot emulate cooprocessor opcode

8087 coprocessor opcode not supported by emulator

can't open ml.err

Copy the following to a document named ml.err and add it to the project directory

Copy code: 1234567891011213141516171819202122232425262728293033132334353637383940414243444546474849505152535455565758590616263646566676869707172747576777880818283848586878889992939596979810010110210310410510610710810911011111211311411611111120121 122124125127128130131132134136137138139140141142314445146714814915015152154156156157158159161616162164165 166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281 LANGUAGE-VHDLFATAL
cannot open file
I/O error closing file
I/O error writing file
I/O error reading file
out of memory
assembler limit : macro parameter name table full
invalid command-line option
nesting level too deep
unmatched macro nesting
line too long
unmatched block nesting
directive must be in control block
error count exceeds 100; stopping assembly
invalid numerical command-line argument
too many arguments
statement too complex
Internal Assembler Error
missing source filename
COFF error writing file
invalid debug and browser data; file exceeds line limit
cannot find link.exe
cannot find cvpack.exe
memory operand not allowed in context
immediate operand not allowed
cannot have more than one ELSE clause per IF block
extra characters after statement
symbol type conflict
symbol redefinition
undefined symbol
non-benign record redefinition
syntax error
syntax error in expression
invalid type expression
distance invalid for word size of current segment
PROC, MACRO, or macro repeat directive must precede LOCAL
.MODEL must precede this directive
cannot define as public or external
segment attributes cannot change
expression expected
operator expected
invalid use of external symbol
operand must be RECORD type or field
identifier not a record
record constants may not span line breaks
instruction operands must be the same size
instruction operand must have size
invalid operand size for instruction
operands must be in same segment
constant expected
operand must be a memory expression
expression must be a code address
multiple base registers not allowed
multiple index registers not allowed
must be index or base register
invalid use of register
invalid INVOKE argument
must be in segment block
DUP too complex
too many initial values for structure
statement not allowed inside structure definition
missing operand for macro operator
line too long
segment register not allowed in context
string or text literal too long
statement too complex
identifier too long
invalid character in file
missing angle bracket or brace in literal
missing single or double quotation mark in string
empty (null) string
nondigit in number
syntax error in floating-point constant
real or BCD number not allowed
text item required
forced error
forced error : value equal to 0
forced error : value not equal to 0
forced error : symbol not defined
forced error : symbol defined
forced error : string blank
forced error : string not blank
forced error : strings equal
forced error : strings not equal
[ELSE]IF2/.ERR2 not allowed : single-pass assembler
expression too complex for .UNTILCXZ
can ALIGN only to power of 2
structure alignment must be 1, 2, 4, 8, or 16
incompatible CPU mode and segment size
LOCK must be followed by a memory operation
instruction prefix not allowed
no operands allowed for this instruction
invalid instruction operands
initializer magnitude too large for specified size
cannot access symbol in given segment or group
operands have different frames
cannot access label through segment registers
jump destination too far
jump destination must specify a label
instruction does not allow NEAR indirect addressing
instruction does not allow FAR indirect addressing
instruction does not allow FAR direct addressing
jump distance not possible in current CPU mode
missing operand after unary operator
cannot mix 16- and 32-bit registers
invalid scale value
constant value too large
instruction or register not accepted in current CPU mode
reserved word expected
instruction form requires 80386/486
END directive required at end of file
too many bits in RECORD
positive value expected
index value past end of string
count must be positive or zero
count value too large
operand must be relocatable
constant or relocatable label expected
segment, group, or segment register expected
segment expected
invalid operand for OFFSET
invalid use of external absolute
segment or group not allowed
cannot add two relocatable labels
cannot add memory expression and code label
segment exceeds 64K limit
invalid type for a data declaration
HIGH and LOW require immediate operands
cannot have implicit far jump or call to near label
use of register assumed to ERROR
only white space or comment can follow backslash
COMMENT delimiter expected
conflicting parameter definition
PROC and prototype calling conventions conflict
invalid radix tag
INVOKE argument type mismatch : argument
invalid coprocessor register
instructions and initialized data not allowed in AT segments
/AT switch requires the TINY memory model
cannot have segment address references with TINY model
language type must be specified
PROLOGUE must be macro function
EPILOGUE must be macro procedure
alternate identifier not allowed with EXTERNDEF
text macro nesting level too deep
missing macro argument
EXITM used inconsistently
macro function argument list too long
VARARG parameter must be last parameter
VARARG parameter not allowed with LOCAL
VARARG parameter requires C calling convention
ORG needs a constant or local offset
register value overwritten by INVOKE
structure too large to pass with INVOKE : argument
not overriding private proc as public
too many arguments to INVOKE
too few arguments to INVOKE
invalid data initializer
RET operand too large
too many operands to instruction
cannot have more than one .ELSE clause per .IF block
expected data label
cannot nest procedures
EXPORT must be FAR
procedure declared with two visibility attributes
macro label not defined
invalid symbol type in expression
byte register cannot be first operand
word register cannot be first operand
special register cannot be first operand
coprocessor register cannot be first operand
cannot change size of expression computations
syntax error in control-flow directive
cannot use 16-bit register with a 32-bit address
constant value out of range
missing right parenthesis
type is wrong size for register
structure cannot be instanced
non-benign structure redefinition: label incorrect
non-benign structure redefinition: too few labels
OLDSTRUCTS/NOOLDSTRUCTS state cannot be changed
non-benign structure redefinition: incorrect initializers
non-benign structure redefinition: too few initializers
non-benign structure redefinition: label has incorrect offset
structure field expected
unexpected literal found in expression
divide by zero in expression
directive must appear inside a macro
cannot expand macro function
too few bits in RECORD
macro function cannot redefine itself
invalid qualified type
floating-point initializer on an integer variable
nested structure improperly initialized
invalid use of FLAT
structure improperly initialized
improper list initialization
initializer must be a string or single item
initializer must be a single item
initializer must be a single byte
improper use of list initializer
improper literal initialization
extra characters in literal initialization
must use floating-point initializer
cannot use .EXIT for OS_OS2 with .8086
invalid combination with segment alignment
INVOKE requires prototype for procedure
cannot include structure in self
symbol language attribute conflict
non-benign COMM redefinition
COMM variable exceeds 64K
parameter or local cannot have void type
cannot use TINY model with OS_OS2
expression size must be 32 bits
.EXIT does not work with 32-bit segments
.STARTUP does not work with 32-bit segments
ORG directive not allowed in unions
illegal use of segment register
cannot declare scoped code label as PUBLIC
.MSFLOAT directive is obsolete : .MSFLOAT ignored
ESC instruction is obsolete : ESC ignored
missing operator in expression
missing right parenthesis in expression
missing left parenthesis in expression
reference to forward macro definition
16 bit segments not allowed with /coff option
FAR not allowed in flat model comm variables
invalid .model parameter for flat model
ALIAS name is empty
GROUP directive not allowed with /coff option
.FPO is not compatible with nested procedures
cannot modify READONLY segment
non-unique STRUCT/UNION field used without qualification
start address on END directive ignored with .STARTUP
cannot ASSUME CS
unknown default prologue argument
too many arguments in macro call
option untranslated, directive required
invalid command-line option value, default is used
insufficent memory for /EP : /EP ignored
expected '>' on text literal
multiple .MODEL directives found : .MODEL ignored
line number information for segment without class 'CODE'
instructions and initialized data not supported in AT segments
instructions and initialized data not supported in BSS segments
directive ignored with /coff switch
/Gc switch incompatible with flat model
/AT switch incompatible with flat model
invalid command-line option
directive ignored without /coff switch
directive ignored outside a procedure
LOADDS ignored in flat model
debug information too complex for 
with /coff switch, leading underscore required for start address
@@: label defined but not referenced
expression expected, assume value 0
EXTERNDEF previously assumed to be external
length of symbol previously assumed to be different
symbol previously assumed to not be in a group
types are different
calling convention not supported in flat model
no return from procedure
conditional jump lengthened
procedure argument or local not referenced
expression may be pass-dependent
structure contains no members

Data emitted with no segment

Statement data is not within the segment

DUP nesting too deep

The operand DUP is nested too deeply

Directive illegal structure

Improper use of pseudo instruction in structure definition There are only two kinds of pseudo instruction statements in the structure definition: semicolon (;) Start the comment statement and use DB,DW, etc

Data definition pseudo instruction statement

Divdsion by 0 or overflow

Divide by 0 or overflow

End of file,not END directive

The source program file has no END file

Extra characters on line

There are redundant characters in a sentence line, which may be due to too many parameters given in the sentence

Field cannot be overridden

An attempt was made to set an initial value for a field that is not allowed to be modified in a statement defining a structure variable

Forward reference illegal

Illegal forward reference During the first scan, an undefined symbol is referenced

Forward needs override or FAR

The target of the transfer instruction is not described as FAR attribute in the source program, which can be specified by PTR

Group name must be unique

The group name should be unique The symbol used as the group name is used as another symbol

Internal error-Register already defined

This is an internal error If this error occurs, please note down the condition of the error and contact Microsoft using the Product Assistance Request form

Improper align/combin type

Positioning type / combination type usage error in segment definition

Illegak use of undefinde operand( )

Indefinite operator "improper use. For example," DB 10h dup (2) "

Illegal use of external

Error using external symbol

Illegal value for DUP count

The number of repetitions before the operator DUP is illegal or undefined

Improper operand type

Improper use of operand type For example: "MOV VAR1,VAR2" Both operands are memory operands and object code cannot be assembled

Illegal public declaration

An identifier is illegally specified as PUBLIC type

Index displacement must be constant

The displacement of index addressing must be constant

Illegal register value

Illegal register value The value of the expression register in the object code exceeds 7

Immediate mode illegal

Immediate addressing is not allowed For example, "MOV DS,CODE", where CODE is the segment name, and the segment name cannot be transferred to the segment register DS as an immediate number

Illegal size for operand

Error using operand size (bytes) For example, use a double word memory operand

Illegal uer of CS register

Segment register CS is used incorrectly in instruction For example: "MOV CS,AX"CS cannot be the destination operand

Illegal use of register

Illegal use of register error

Improper uer of segment register

Segment registers are used where segment registers are not allowed Such as "SHL DS,1"

Jump out of range by %ld byte

The jump range of conditional transfer instruction exceeds - 128 ~ 127 bytes Error factory, the message gives the number of bytes exceeded at the same time

Lefe operand must segment

The left side of the operand should be the information of the segment If DA1 and DA2 are variable names, the following statement is wrong: "MOV AX,DA1:DA2" DA1 location

A segment register name should be used on

Label cannot have segment override

Segment prefix usage error

Must be in conditional block

Not in the condition block Usually there are ENDIF or ELSE statements, but no IF statements

Missing or unreachable CS

Try to jump to execute a label that CS cannot reach It usually refers to the absence of CS associated with the code segment in the ASSUME statement

Must be in segment block

must be in segment block

Must be declared during pass 1

Must be defined during the first scan This error occurs during the first scan if a symbol is referenced before it is defined

Must be record field name

Expected record field name Another symbol appears at the location of the record field name

Must be record name or field name

Expected record name or record field name Another symbol appears at the location of the record name or record field name

Must be variable,label,or constant

It should be the variable name, label, or other information on the position of the constant

Must be stucture field name

Expected structure field name Another symbol appears at the position of the structure field name

Must have instuction agter prefix

There must be instructions after the repeated prefixes Rep, repe and repne

Must be associated with data

A code snippet related item appears at a location that must be related to the data snippet

Must be associated with code

An item related to a data segment appears at a location that must be related to the code segment

Multiple base registers

Multiple base registers are used at the same time Such as "mov ax, [Si] [BP]"

Multiple index registers

Multiple index registers are used at the same time Such as "mov ax, [Si] [di]"

Must be accumulator register

Other registers can be used where AX or AL is required For example, in and out instructions must use accumulator AX or AL

Must be index or base register

Instructions require only base or index registers, not other registers

Negative shift count

The shift expression value of the operator SHL or SHR is negative

Near JMP/CALL to different CS

Attempt to jump to an address that is not in the current segment with a branch instruction of NEAR attribute

Normal type operand expected

A normal operand is required

Override with DUP illegal

Error using DUP operator in structure variable initializer table

Override id of wrong type

An error occurred while setting the initial value in the define structure variable statement

Operand must be register

Expected register at operand position, but an identifier occurred

Operand must be segment or group

A segment or group name should be given For example, an ASSUME statement should specify a segment name or group name for a segment register and, not another label or group name

Variable name, etc

Operand must be type specifier

The type description of operands shall be given, such as NEAR,FAR,BYTE, etc

Operand not in current CS ASSUME segment

The operand is not in the current code segment It usually means that the destination address of the transfer instruction is not in the current CS segment

Operand expected

You need an operand, only an operator

Operand type must match

Operand type mismatch The length of two operands of double operand instruction is inconsistent, one is byte and the other is word

Operand must be size

The length of the operand (such as BYTE,WORD, etc.) should be specified Usually, PTR operation can be used to correct

One operand must constant

Operands must be constants

Operand must be in same segment or one constant

"-" operator is misused. For example, "MOV AL, - VAR", where VAR is the variable name and a constant should be involved in the operation Another example is the variable names of two different segments

Subtraction error

Operand combination illegal

Error combining two operands in double operand instruction

Operand must have segment

Wrong use of operator SEG

Phase error between passes

The error between two scans This error is given when a label gets different address values in the second scan If / D is used when starting MASM

Optional item to generate the list file scanned for the first time, which can help you find this error

Reserved word used as symbol

Use the reserved words specified in assembly language as identifiers

Redefinition of symbol

Symbol redefinition The same identifier is defined in two places When compiling the first scan, it is given in the second definition position of this identifier

This mistake

Reference to multidefined symbol

Directive refers to multiple defined identifiers

Symbol not defined

Symbol undefined, undefined identifier referenced in program

Symbol alread defined locally

An attempt was made to define an external identifier in an EXTRN statement with an identifier specified as an internal identifier

Segment paraneters are changed

The segment parameters are changed The same identifier is defined in different segments

Symbol has no segment

The segment attribute of the identifier is unknown

Symbol id already external

A symbol that is attempted to be defined within a module and is described in an external symbol directive

Syntax error

syntax error. Not a statement recognized by the assembler

Symbol is multidefined

Multiple definitions of symbols The same identifier is defined in two places When compiling the second scan, this error is given whenever this identifier is encountered

Symbol already defferent kind

Redefine a symbol as a different kind of symbol For example, a segment name is re used as a variable name definition

Type illegal in context

Illegal type specified For example, specify BYTE type for a procedure instead of NEAR or FAR

Too many valer for struc or record initialization

There are too many initial values when defining a structure variable or a record variable

Unkown type specifer

Unknown type specifier For example, type characters are misspelled, BYTE is written as BIT,NEAR is written as NAER, etc

Value is out of range

The value is too large and exceeds the allowable value For example: "mov Al, 100h"

Wrong type of register

Error using register

Garbled code after adding. 386

It should be Add. 386 after the model statement

If you use mask, there is an agreement here. For the program of dos16 class, you need to add a before the. 386 statement Statements such as model small; Otherwise, instructions will be created in 32-bit mode. If such code runs in 16 bit mode, it is naturally a big mistake.

Default value of simplified segment definition in small mode

After defining the stack segment, warning L4021: no stack segment still appears during compilation

terms of settlement:

Add STACK after segment definition

Here STACK means its type. For details, please refer to This article

Tags: debug

Posted by jonah on Mon, 18 Apr 2022 21:38:33 +0930