各位大神帮我看一下这error A2105: Expected: instruction or directive怎么解决
没办法,刚开始学汇编,看的是华南理工大学出版的《80X86汇编语言程序设计》不过实在是很吃力,不知大神们有什么经验传授一下。这是我写的一个汇编小程序(新手,刚学汇编,勿笑哦),
.MODEL SMALL
.DATA
TABLE DW ONE
DW TWO
DW THREE
DW FOUR
DW FIVE
DW SIX
DW SEVEN
DW EIGHT
DW NINE
.CODE
ONE PROC NEAR
MOV AH,2
MOV DL,'A'
INT 21H
RET
ONE ENDP
TWO PROC NEAR
MOV AH,2
MOV DL,'B'
INT 21H
RET
TWO ENDP
THREE PROC NEAR
MOV AH,2
MOV DL,'C'
INT 21H
RET
THREE ENDP
FOUR PROC NEAR
MOV AH,2
MOV DL,'D'
INT 21H
RET
FOUR ENDP
FIVE PROC NEAR
MOV AH,2
MOV DL,'E'
INT 21H
RET
FIVE ENDP
SIX PROC NEAR
MOV AH,2
MOV DL,'F'
INT 21H
RET
SIX ENDP
SEVEN PROC NEAR
MOV AH,2
MOV DL,'G'
INT 21H
RET
SEVEN ENDP
EIGHT PROC NEAR
MOV AH,2
MOV DL,'H'
INT 21H
RET
EIGHT ENDP
NINE PROC NEAR
MOV AH,2
MOV DL,'I'
INT 21H
RET
NINE ENDP
.STARTUP
TOP: MOV AH,1
INT 21H
CALL NEWLINE
SUB AL,31H
JB TOP
CMP AL,8
JA TOP
MOV AH,0
MOV BX,AX
ADD BX,BX
CALL TABLE[BX]
CALL NEWLINE
CALL NEWLINE
LOOP TOP
.EXIT
NEWLINE PROC
PUSH AX
PUSH DX
MOV DL,0DH
MOV AH,2
INT 21H
MOV DL,0AH
MOV AH,2
INT 21H
POP DX
POP AX
RET
NEWLINE ENDP
END
用MASM编译的时候出现两个错误:
1.ASM(68): error A2105: Expected: instruction or directive
1.ASM(83): error A2105: Expected: instruction or directive
就是
.STARTUP
TOP: MOV AH,1
INT 21H
CALL NEWLINE
SUB AL,31H
JB TOP
CMP AL,8
JA TOP
MOV AH,0
MOV BX,AX
ADD BX,BX
CALL TABLE[BX]
CALL NEWLINE
CALL NEWLINE
LOOP TOP
.EXIT
就是上面的代码开头 的.STARTUP和结尾的 .EXIT有错误,但我百度了很久,也试着改很多次,总是出现错误,求各位大神、高手们指点下小弟,到底是出现什么问题了,拜托各位了!