John Delmark Aguilar

Delmark - Profiling
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 Display Message and Character input

View previous topic View next topic Go down 
AuthorMessage
dElmARk
Admin
Admin
avatar

Posts : 92
Join date : 09/04/2012

PostSubject: Display Message and Character input   Mon Dec 10, 2012 5:33 am

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
View user profile http://delmark.meabout.com
 
Display Message and Character input
View previous topic View next topic Back to top 
Page 1 of 1

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