汇编语言的小问题(显示字符串)
DATASSEGMENTSTRING:DB"MYNAMEISLIUGUANYU",10,13,'$';此处输入数据段代码DATASENDSSTACKSSEGMENTSTA...
DATAS SEGMENT
STRING: DB "MY NAME IS LIU GUANYU",10,13,'$' ;此处输入数据段代码
DATAS ENDS
STACKS SEGMENT STACK
DW 120 DUP(?) ;此处输入堆栈段代码
STACKS ENDS
EXTRA SEGMENT
QQ: DB 22 DUP(?)
EXTRA ENDS
CODES SEGMENT
ASSUME CS:CODES,DS:DATAS,ES:EXTRA
START:
MOV AX,DATAS
MOV DS,AX ;此处输入代码段代码
MOV AX,EXTRA
MOV ES,AX
LEA SI,STRING
LEA DI,QQ
MOV CX,22
CLD
REP MOVSB
MOV DS,AX
LEA DX,QQ
MOV AH,9
INT 21H
MOV AX,4C00H
CODES ENDS
END START
帮忙改一下吧,你肯定会的 展开
STRING: DB "MY NAME IS LIU GUANYU",10,13,'$' ;此处输入数据段代码
DATAS ENDS
STACKS SEGMENT STACK
DW 120 DUP(?) ;此处输入堆栈段代码
STACKS ENDS
EXTRA SEGMENT
QQ: DB 22 DUP(?)
EXTRA ENDS
CODES SEGMENT
ASSUME CS:CODES,DS:DATAS,ES:EXTRA
START:
MOV AX,DATAS
MOV DS,AX ;此处输入代码段代码
MOV AX,EXTRA
MOV ES,AX
LEA SI,STRING
LEA DI,QQ
MOV CX,22
CLD
REP MOVSB
MOV DS,AX
LEA DX,QQ
MOV AH,9
INT 21H
MOV AX,4C00H
CODES ENDS
END START
帮忙改一下吧,你肯定会的 展开
展开全部
;已修改好,用MASM5.0编译通过。
;错误处自己对照看
DATAS SEGMENT
STRING DB "MY NAME IS LIU GUANYU",10,13,'$' ;此处输入数据段代码
cxcx equ $-string
DATAS ENDS
STACKS SEGMENT STACK
DW 120 DUP(?) ;此处输入堆栈段代码
STACKS ENDS
EXTRA SEGMENT
QQ DB 22 DUP(?)
EXTRA ENDS
CODES SEGMENT
ASSUME CS:CODES,DS:DATAS,ES:EXTRA
START:
MOV AX,DATAS
MOV DS,AX ;此处输入代码段代码
MOV AX,EXTRA
MOV ES,AX
LEA SI,STRING
LEA DI,QQ
MOV CX,cxcx
CLD
REP MOVSB
MOV DS,AX
LEA DX,QQ
MOV AH,9
INT 21H
MOV AX,4C00H
int 21h
CODES ENDS
END START
;错误处自己对照看
DATAS SEGMENT
STRING DB "MY NAME IS LIU GUANYU",10,13,'$' ;此处输入数据段代码
cxcx equ $-string
DATAS ENDS
STACKS SEGMENT STACK
DW 120 DUP(?) ;此处输入堆栈段代码
STACKS ENDS
EXTRA SEGMENT
QQ DB 22 DUP(?)
EXTRA ENDS
CODES SEGMENT
ASSUME CS:CODES,DS:DATAS,ES:EXTRA
START:
MOV AX,DATAS
MOV DS,AX ;此处输入代码段代码
MOV AX,EXTRA
MOV ES,AX
LEA SI,STRING
LEA DI,QQ
MOV CX,cxcx
CLD
REP MOVSB
MOV DS,AX
LEA DX,QQ
MOV AH,9
INT 21H
MOV AX,4C00H
int 21h
CODES ENDS
END START
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询