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