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
Friday, July 14, 2017
Home »
8086 Programming
» 8086 Programming
8086 Programming
Related Posts:
- 8086 programmingHow to display a string using character reading function? TITLE DISPLAY STRING USING CHARACTER READING FUNCTION .MODEL SMALL .STACK 32 .DATA STR1 DB "....THE KING OF JUNGLE...." LEN DW $-STR1 .CODE MAIN PROC FAR MOV AX,@D… Read More
- 8086 ProgrammingHow to display a string terminated by $? TITLE DISPLAY A STRING .MODEL SMALL .STACK 32 .DATA STR1 DB ".....THE KING OF JUNGLE......$" .CODE MAIN PROC FAR MOV AX, @DATA MOV DS,AX MOV AH,09 MOV DX, OFFSET STR1 INT 21H … Read More
- 8086 ProgrammingHow 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 MO… Read More
- 8086 ProgrammingHow to get sentence as input and display each word in new line? TITLE MULTILINE .MODEL SMALL .STACK 32 .DATA MAXCHR DB 50H ACTCHR DB ? STR1 DB 50 DUP(?) .CODE MAIN PROC FAR MOV AX,@DATA MOV DS,AX MOV AH,0AH MOV DX,O… Read More
- 8086 ProgrammingHow to add numbers stored in consecutive memory? TITLE ADD THE DATA OF TABLE .MODEL SMALL .STACK 32 .DATA TABLE DW 1234H,4563H,7944H,1234H SUM DW ? .CODE MAIN PROC FAR MOV AX,@DATA MOV DS,AX MOV CX,04H MOV SI,OFFSE… Read More
0 comments:
Post a Comment