How to get string and display the string in a new line?
TITLE READ AND WRITE STRING
.MODEL SMALL
.STACK 32
.DATA
MAXCHR DB 20H
ACTCHR DB ?
STR1 DB 20 DUP('$')
.CODE
MAIN PROC FAR
MOV AX,@DATA
MOV DS,AX
MOV AH,0AH
MOV DX,OFFSET MAXCHR
INT 21H
MOV AH,02H
MOV DL,0DH
INT 21H
MOV DL,0AH
INT 21H
MOV CL,ACTCHR
MOV CH,00H
MOV BX,OFFSET STR1
L1: MOV DL,[BX]
INC BX
INT 21H
LOOP L1
MOV AX,4C00H
INT 21H
END MAIN
0 comments:
Post a Comment