【#文档大全网# 导语】以下是®文档大全网的小编为您整理的《编程:循环输入输出字符串程序代码》,欢迎阅读!
DATA SEGMENT BUF DB 25 ACTHAR DB ?
CHAR DB 25 DUP (?) DB '$'
CR db 0Dh,0Ah,'$'
DATA ENDS
CODE SEGMENT
ASSUME CS: CODE, DS: DATA START: next:
MOV AX, DATA MOV DS, AX
MOV DX, OFFSET BUF MOV AH, 0AH INT 21H
CMP AL,0FFH JZ EXIT
MOV AH,2 MOV DL,0DH INT 21H
MOV DL,0AH INT 21H
MOV DX,OFFSET BUF+2 ;MOV DX,OFFSET CHAR
MOV BX,OFFSET ACTHAR MOV BL,[BX] ADD BX,DX
MOV BYTE PTR [BX],'$' MOV AH,09H INT 21H mov dx,offset CR
MOV AH,09H INT 21H loop next EXIT:
MOV AX,4C00H INT 21H
CODE ENDS
END START
本文来源:https://www.wddqxz.cn/a2b9e4c6aa00b52acfc7ca7d.html