Friday, November 14, 2014

Getting input from keyboard, then showing that as output


Objectives
-to learn how to get input from keyboard
-to learn how to store the data into a variable
-to learn how to show the data from the variable
getting input from keyboard,assembly language programming,primary level programming

.MODEL SMALL
.STACK 100H

.CODE
MAIN PROC

MOV AH,2
MOV DL,'?'
INT 21H

;get the input
MOV AH,1
INT 21H
MOV BL,AL

;carriage return
MOV AH,2
MOV DL,0DH
INT 21H
MOV DL,0AH
INT 21H

MOV DL,BL
INT 21H

;exit dos
MOV AH,4CH
INT 21H

MAIN ENDP
END MAIN

No comments:

Post a Comment