John Delmark Aguilar
Would you like to react to this message? Create an account in a few clicks or log in to continue.
John Delmark Aguilar

Personal Forum
 
HomeSearchLatest imagesRegisterLog in

 

 Display Message and Character input

Go down 
AuthorMessage
dElmARk
Admin
Admin
dElmARk


Posts : 92
Join date : 09/04/2012

Display Message and Character input Empty
PostSubject: Display Message and Character input   Display Message and Character input Icon_minitimeMon Dec 10, 2012 12:33 pm

Code:
Title "EXP. 4 - program 2" 

.MODEL SMALL

.DATA
    MESSAGE DB 'Enter Character: ','$' 
    MESSAGE2 DB 'the character you typed is: ','$' 
     
.STACK 200 

.CODE
    MOV AX, @DATA
    MOV DS,AX     
    INT 21H          ;Display message
    MOV AH,02        ;Function 02h, display character
    MOV DL,AL        ;Load character to be displayed
    INT 21H
    LEA DX, MESSAGE
    MOV AH,09H
    INT 21H
    MOV AH,08H        ;Function read without echo
    INT 21H          ;Character read is returned in AL register. No Echo on the display
    MOV BL,AL        ;Save character in BL register
    LEA DX, MESSAGE2
    MOV AH,09H        ;Display MESSAGE2   
    INT 21H
    MOV AH,02        ;Function 02h, displa character
    MOV DL,BL        ;Load character to be displayed from BL
    INT 21H
    MOV AH,4CH ;Exit to DOS
    INT 21H
   
END
Back to top Go down
https://delmark.forumtl.com
 
Display Message and Character input
Back to top 
Page 1 of 1
 Similar topics
-
» Display Message and String input *10 Characters Only*
» Displaying Message

Permissions in this forum:You cannot reply to topics in this forum
John Delmark Aguilar :: dElmARk Productions :: Assembly Language-
Jump to: