GMgKe586q6suSQnyqZLlGCooeWM

Pages

Search

Tuesday, December 21, 2010

Assembly Reading Keyboard Input

To read a keyboard input, here's a code to do it:

MOV AH,08    ; Function to read a char from keyboard
INT 21h      ; the char saved in AL
MOV AH,02    ; Function to display a char  
MOV DL,AL    ; Copy a saved char in AL to DL to output it
INT 21h

MOV AH,4Ch   ; Function to exit
MOV AL,00    ; Return 00
INT 21h


Share/Bookmark

No comments:

Post a Comment