我是靠谱客的博主 个性柚子,最近开发中收集的这篇文章主要介绍汇编常见错误解决方法总结汇编错误集合,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

汇编错误集合

本文转载自https://www.cnblogs.com/cway/p/12794979.html 作者为whxway 本文在此基础上对错误进行排序,方便查找

Already had ELSE clause

已有ELSE语句.在一个条件块里使用多于一个的ELSE语句

Angle brackets requored around initialized list

定义结构体变量时,初始值未用尖括号()括起来

Block nesting error

嵌套出错.嵌套的过程,段,结构,宏指令或重复块等非正常结束.例如在嵌套语句中有外层的结束语句,而无

内层的结束语局1

Byte register illegal

要求用字寄存器的指令使用了字节寄存器.如PUSH,POP指令的操作数寄存器必须是字寄存器

Circular chain of EQU aliases

用等值语句定义的符号名,最后又返回指向它自己.如:

A EQU B

B EQU A

Cannot override ES for destination

串操作指令中目的操作数不能用其他段寄存器替代ES

Cannot address with srgment register

指令中寻找一个操作数,但ASSUME语句中未指明哪个段寄存器与该操作数所在段有关联

Cannot use EVEN or ALIGN with byte alignment

在段定义伪指令的定位类型中选用BYTE,这时不能使用EVEN或ALIGN伪指令

Constant expected

要求给出一个常数.

Cannot emulate cooprocessor opcode

仿真器不能支持的8087协处理器操作码

can’t open ml.err

把下面的复制到一个文档,命名为ml.err添加到工程目录

复制代码123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281LANGUAGE-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
SEVERE
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
expected
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
N/A
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
N/A
missing macro argument
EXITM used inconsistently
macro function argument list too long
N/A
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
N/A
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
N/A
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
N/A
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
D/T
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
LEVEL 1
cannot modify READONLY segment
N/A
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
LEVEL 2
@@: 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
LEVEL 3
N/A
no return from procedure
N/A
conditional jump lengthened
procedure argument or local not referenced
expression may be pass-dependent
structure contains no members

Data emitted with no segment

语句数据没有在段内

DUP nesting too deep

操作数DUP的嵌套太深

Directive illegal structure

在结构体定义中的伪指令使用不当.结构定义中的伪指令语句仅二种:分号(;)开始的注释语句和用DB,DW等

数据定义伪指令语句

Divdsion by 0 or overflow

除以0或溢出

End of file,not END directive

源程序文件无END文件

Extra characters on line

一语句行有多余字符,可能是语句中给出的参数太多

Field cannot be overridden

在定义结构变量语句中试图对一个不允许修改的字段设置初值

Forward reference illegal

非法的向前引用.在第一遍扫描期间,引用一个未定义符号.

Forward needs override or FAR

转移指令的目标没有在源程序中说明为FAR属性,可用PTR指定

Group name must be unique

组名应是唯一的.作为组名的符号作为其他符号使用

Internal error-Register already defined

这是一个内部错误.如出现该错误,请记下发生错误的条件,并使用Product Assistance Request 表与Microsoft公司联系

Improper align/combin type

段定义时的定位类型/组合类型使用出错

Illegak use of undefinde operand( )

不定操作符" “使用不当.例如"DB 10H DUP( 2)”

Illegal use of external

外部符号使用出错

Illegal value for DUP count

操作符DUP前的重复次数是非法的或未定义

Improper operand type

操作数类型使用不当.例如:“MOV VAR1,VAR2”.两个操作数均为存储器操作数,不能汇编出目标代码

Illegal public declaration

一个标识符被非法的指定为PUBLIC类型

Index displacement must be constant

变址寻址的位移量必须是常数

Illegal register value

非法的寄存器值.目标代码中表达寄存器的值超过7

Immediate mode illegal

不允许使用立即数寻址.例如"MOV DS,CODE"其中CODE是段名,不能把段名作为立即数传送给段寄存器DS

Illegal size for operand

使用操作数大小(字节数)出错.例如:使用双字的存储器操作数

Illegal uer of CS register

指令中错误使用了段寄存器CS.如:"MOV CS,AX"CS不能做目的操作数

Illegal use of register

非法使用寄存器出错

Improper uer of segment register

不允许使用段寄存器的位置上使用了段寄存器.如"SHL DS,1"

Jump out of range by %ld byte

条件转移指令跳转范围超过-128~ 127个字节.出错厂,信息同时给出超过的字节数

Lefe operand must segment

操作数的左边应该是段的信息.如设DA1,DA2均是变量名,下列语句就是错误的:“MOV AX,DA1:DA2”.DA1位置

上应使用某段寄存器名

Label cannot have segment override

段前缀使用出错

Must be in conditional block

没有在条件块里.通常是有ENDIF或ELSE语句,而无IF 语句

Missing or unreachable CS

试图跳转去执行一个CS达不到的标号.通常是指缺少ASSUME语句中CS与代码段相关联

Must be in segment block

指令语句没有在段内

Must be declared during pass 1

必须在第一遍扫描期间定义.在第一遍扫描期间,如一个符号在未定义前就引用,就会出现这种错误.

Must be record field name

应为记录字段名.在记录字段名位置上出现另外的符号

Must be record name or field name

应为记录名或记录字段名.在记录名或记录字段名位置上出现另外的符号

Must be variable,label,or constant

应该是变量名,标号,或常数的位置上出现了其他信息

Must be stucture field name

应该为结构字段名.在结构字段名位置上出现了另外的符号

Must have instuction agter prefix

在重复前缀REP,REPE,REPNE后面必须有指令

Must be associated with data

在必须与数据段有关的位置上出现了代码段有关的项

Must be associated with code

在必须与代码段有关的位置上出现了数据段有关的项

Multiple base registers

同时使用了多个基址寄存器.如"MOV AX ,[SI][BP]"

Multiple index registers

同时使用了多个变址寄存器.如"MOV AX ,[SI][DI]"

Must be accumulator register

要求用AX或AL的位置上使用可其他寄存器.如IN,OUT指令必须使用累加器AX或AL

Must be index or base register

指令仅要求使用基址寄存器或变址寄存器,而不能使用其他寄存器.

Negative shift count

运算符SHL或SHR的移位表达式值为负数

Near JMP/CALL to different CS

试图用NEAR属性的转移指令跳转到不在当前段的一个地址

Normal type operand expected

要求给出一个正常的操作数.

Override with DUP illegal

在结构变量初始值表中使用DUP操作符出错

Override id of wrong type

在定义结构变量语句中设置初值时类型出错

Operand must be register

操作数位置上应是寄存器,但出现了标识符

Operand must be segment or group

应该给出一个段名或组名.例如ASSUME语句中应为某段寄存器和指定一个段名或组名,而不应是别的标号或

变量名等

Operand must be type specifier

操作数应给出类型说明,如NEAR,FAR,BYTE等

Operand not in current CS ASSUME segment

操作数不在当前代码段内.通常指转移指令的目标地址不在当前CS段内

Operand expected

需要一个操作数,只有操作符

Operand type must match

操作数类型不匹配.双操作数指令的两个操作数长度不一致,一个是字节,一个是字

Operand must be size

应指明操作数的长度(如BYTE,WORD等).通常使用PTR运算即可改正

One operand must constant

操作数必须是常数.

Operand must be in same segment or one constant

"—“运算符用错.例如"MOV AL,—VAR”,其中VAR是变量名,应有一常数参加运算.又如两个不同段的变量名

相减出错

Operand combination illegal

双操作数指令中两个操作数组合出错

Operand must have segment

运算符SEG用错.

Phase error between passes

两次扫描间的遍错.一个标号在二次扫描时得到不同的地址值,就会给出这种错误.若在启动MASM时使用/D

任选项,产生第一遍扫描的列表文件,它可帮助你查找这种错误

Reserved word used as symbol

把汇编语言规定的保留字作标识符使用

Redefinition of symbol

符号重定义.同一标识符在两个位置上定义.在汇编第一遍扫描时,在这个标识符的第二个定义位置上给出

这个错误

Reference to multidefined symbol

指令引用了多重定义的标识符

Symbol not defined

符号未定义,在程序中引用了未定义的标识符

Symbol alread defined locally

以被指定为内部的标识符,企图在EXTRN语句中又定义外部标识

Segment paraneters are changed

段参数被改变.如同一标识符定义在不同段内

Symbol has no segment

不知道标识符的段属性

Symbol id already external

在模块内试图定义的符号,它已在外部符号伪指令中说明

Syntax error

语法错误.不是汇编程序所能识别的一个语句

Symbol is multidefined

符号多重定义.同一标识符在两个位置上定义.在汇编第二遍扫描时,每当遇到这个标识符都给出这个错误

Symbol already defferent kind

重新定义一个符号为不同种类符号.例如一个段名重新被当作变量名定义使用

Type illegal in context

指定非法类型.例如对一个过程指定BYTE类型,而不是NEAR或FAR

Too many valer for struc or record initialization

在定义结构变量或记录变量时,初始值太多

Unkown type specifer

未知的类型说明符.例如类型字符拼错,把BYTE写成BIT,NEAR写成NAER等

Value is out of range

数值太大,超过允许值.例如:“MOV AL ,100H”

Wrong type of register

使用寄存器出错

加上.386之后出现乱码

应该在.model语句之后加.386

使用的是 Masm 的话,这里有个约定。对 dos16 类的程序,需要在 .386 语句之前,加上个 .model small 之类的语句;否则,将会以 32 位的模式来创建指令,这样的代码在 16 位模式下运行,自然就是错大了。

小模式下简化段定义的缺省值

img

定义堆栈段之后编译仍然出现warning L4021: no stack segment

解决办法:
img
在段定义后面加上STACK
img
这里STACK是对其类型的意思,具体可以参考https://blog.csdn.net/sxhelijian/article/details/69338661这篇文章

最后

以上就是个性柚子为你收集整理的汇编常见错误解决方法总结汇编错误集合的全部内容,希望文章能够帮你解决汇编常见错误解决方法总结汇编错误集合所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(51)

评论列表共有 0 条评论

立即
投稿
返回
顶部