Friday, July 14, 2017

8086 programming

How 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,@DATA
MOV DS,AX

MOV CX,LEN
MOV AH,02
MOV BX,OFFSET STR1
L1: MOV DL,[BX]
INC BX
INT 21H
LOOP L1

MOV AX,4C00H
INT 21H
MAIN ENDP
END MAIN

0 comments:

Post a Comment