当前位置: 代码迷 >> 汇编语言 >> error a2028:operator expected,该如何解决
  详细解决方案

error a2028:operator expected,该如何解决

热度:5819   发布时间:2013-02-26 00:00:00.0
error a2028:operator expected
写了一个比较数的程序
老是标题上的那个错误
请问是什么原因呢STACK SEGMENT PARA STACK 'STACK'
DW 100 DUP(?)
STACK ENDS


DATA SEGMENT
DATA1 DW 0A236H,2FF3H,0F23AH,0056H,403EH,1F51H,10F5H,111EH,23F0H,0BB00H
MAX DW 1 DUP(?)
MIN DW 1 DUP(?)
DATA ENDS


CODE SEGMENT
ASSUME CS:CODE,DS:DATA,ES:DATA,SS:STACK
MOV BX,OFFSET DATA1
MOV AX,[BX]
INC BX
INC BX
MOV CX 9
AGAIN: CMP AX,[BX]
JG NEXT
MOV AX,[BX]
NEXT: INC BX
INC BX
DEC CX
JNE AGAIN
MOV MAX,AX
HLT
CODE ENDS
END AGAIN

------解决方案--------------------------------------------------------
STACK SEGMENT PARA STACK 'STACK' 
DW 100 DUP(?) 
STACK ENDS 
DATA SEGMENT 
DATA1 DW 0A236H,2FF3H,0F23AH,0056H,403EH,1F51H,10F5H,111EH,23F0H,0BB00H 
MAX DW 1 DUP(?) 
MIN DW 1 DUP(?) 
DATA ENDS 
CODE SEGMENT 
ASSUME CS:CODE,DS:DATA,ES:DATA,SS:STACK 
MOV BX,OFFSET DATA1 
MOV AX,[BX] 
INC BX 
INC BX 
MOV CX,9 ;这里少了个逗号
AGAIN: CMP AX,[BX] 
JG NEXT 
MOV AX,[BX] 
NEXT: INC BX 
INC BX 
DEC CX 
JNE AGAIN 
MOV MAX,AX 
HLT 
CODE ENDS 
END AGAIN
  相关解决方案