Monday, May 28, 2018


A near procedure in 8086 assembly language that accepts an ASCII value as a parameter in AL register and displays this value on the output screen

DATA SEGMENT
MSG1 DB 10,13,"ENTER ANY ASCII VALUE : $"
MSG2 DB 10,13,"PRINTING AL VALUE : $"
DATA ENDS
CODE SEGMENT
ASSUME DS:DATA,CS:CODE
START:
MOV AX,DATA
MOV DS,AX
LEA DX,MSG1
MOV AH,9
INT 21H
CALL PRINT_AL
MOV AH,4CH
INT 21H
CODE ENDS
PRINT_AL PROC NEAR
MOV AH,1
INT 21H
MOV BL,AL
LEA DX,MSG2
MOV AH,9
INT 21H
MOV DL,BL
MOV AH,2
INT 21H
RET
PRINT_AL ENDP
END START

No comments:

Post a Comment

Sacred Thought

5 May 2024 Hari Om Verse 50-51, chapter two:  In this chapter two Shree krishna explains a simple way of living. Free from desires and void ...