Friday, August 10, 2012

Input Character in Assembly

.MODEL SMALL
.STACK 100H
.CODE

MAIN PROC

 MOV AH,1 ;Read character function
 INT 21H ;Character in AL
 MOV BL,AL ;Save it into BL
 
 MOV AH,2 ;Display character function
 MOV DL,BL 
 INT 21H ;Display character
 
 MOV AH,4CH ;DOS exit function
 INT 21H ; exit to dos
 
 MAIN ENDP
END MAIN

No comments:

Post a Comment