汇编重复定义错误如何解决
DATASEGMENTNUMDB01000101BBUFDB0DH,0AH,'(NUM)='STRDB4DUP(?)DATAENDSSTACKSEGMENTSTACKDB...
DATA SEGMENT
NUM DB 01000101B
BUF DB 0DH,0AH,'(NUM)='
STR DB 4DUP(?)
DATA ENDS
STACK SEGMENT STACK
DB 200DUP(0)
STACK ENDS
CODE SEGMENT
ASSUME DS:DATA,SS:STACK,CS:CODE
START:
MOV AX,DATA
MOV DS,AX
LEA LI,STR
MOV AL,NUM
MOV CL,4
SHR AL,CL
OR AL,30H
MOV [DI],AL
INC DI
MOV AL,NUM
AND AL,0FH
OR AL,30H
MOV [DI],AL
INC DI
MOV BYTE PTR [DI],'H'
INC DI
MOV BYTE PTR[DI],'$'
LEA DX,BUF
MOV AH,9
INT 21H
MOV AH,4CH
INT 21H
CODE ENDS
END START
提示第一行重复定义 展开
NUM DB 01000101B
BUF DB 0DH,0AH,'(NUM)='
STR DB 4DUP(?)
DATA ENDS
STACK SEGMENT STACK
DB 200DUP(0)
STACK ENDS
CODE SEGMENT
ASSUME DS:DATA,SS:STACK,CS:CODE
START:
MOV AX,DATA
MOV DS,AX
LEA LI,STR
MOV AL,NUM
MOV CL,4
SHR AL,CL
OR AL,30H
MOV [DI],AL
INC DI
MOV AL,NUM
AND AL,0FH
OR AL,30H
MOV [DI],AL
INC DI
MOV BYTE PTR [DI],'H'
INC DI
MOV BYTE PTR[DI],'$'
LEA DX,BUF
MOV AH,9
INT 21H
MOV AH,4CH
INT 21H
CODE ENDS
END START
提示第一行重复定义 展开
1个回答
2013-11-17
展开全部
DATA SEGMENT
NUM DB 01000101B
BUF DB 0DH,0AH,'(NUM)='
STR DB 4 DUP(?);4跟DUP间要加空格
DATA ENDS
STACK SEGMENT STACK
DB 200 DUP(0);同样200跟DUP间要加空格
STACK ENDS
CODE SEGMENT
ASSUME DS:DATA,SS:STACK,CS:CODE
START:
MOV AX,DATA
MOV DS,AX
LEA DI,STR;LI改DI
MOV AL,NUM
MOV CL,4
SHR AL,CL
OR AL,30H
MOV [DI],AL
INC DI
MOV AL,NUM
AND AL,0FH
OR AL,30H
MOV [DI],AL
INC DI
MOV BYTE PTR [DI],'H'
INC DI
MOV BYTE PTR[DI],'$'
LEA DX,BUF
MOV AH,9
INT 21H
MOV AH,4CH
INT 21H
CODE ENDS
END START
NUM DB 01000101B
BUF DB 0DH,0AH,'(NUM)='
STR DB 4 DUP(?);4跟DUP间要加空格
DATA ENDS
STACK SEGMENT STACK
DB 200 DUP(0);同样200跟DUP间要加空格
STACK ENDS
CODE SEGMENT
ASSUME DS:DATA,SS:STACK,CS:CODE
START:
MOV AX,DATA
MOV DS,AX
LEA DI,STR;LI改DI
MOV AL,NUM
MOV CL,4
SHR AL,CL
OR AL,30H
MOV [DI],AL
INC DI
MOV AL,NUM
AND AL,0FH
OR AL,30H
MOV [DI],AL
INC DI
MOV BYTE PTR [DI],'H'
INC DI
MOV BYTE PTR[DI],'$'
LEA DX,BUF
MOV AH,9
INT 21H
MOV AH,4CH
INT 21H
CODE ENDS
END START
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询