Question

Write and run an 8086-assembly language program that accepts two input digits from the keyboard and converts it into a two-digit packed BCD number. This resultant number should be stored in a byte location in the memory. For example, if you input digit ‘3’ and ‘5’ then it should be converted to packed BCD number 35, which is 001101012. This result should be stored in a byte memory location

15 Sep 2022
Answer :
Word Count : 250

8086 assembly language program that accepts two input digits from the keyboard and converts them into a two-digit packed BCD number:


;Accept two input digits from the keyboard
mov ah,1 ;function code for keyboard input
int 21h ;call DOS function
mov dl,al ;save first digit in DL

mov ah,1 ;function code for keyboard input
int 21h ;call DOS function

;Convert the two digits into a packed BCD number
mov al,dl ;load first digit into AL
and al,0fh

_________ _____ _________ _____ ____ ______.
______ ______ ________ ______ ___ ______ ___ ___.
______ ___ ________ _____ ____ _________ _______ ____ _____ ________.
__________ _________ ___ ____ ________ ___ _________ ___.
______ _______ __________ _________ ______ _________ _____.
________ _________ _____ _______ _______ _____ __________ __________ ________ ____ _________ ______.
_________ ____ ________ _____ ____ __________ ___ ____ ______ ___.
_________ _________ ______ ______ ______ _________ ______ ______ _______ ____ ____ _____.
________ ________ ___ _______ ______ ____ _________.
___ __________ ___ _______ ________ _____ ________ _________ ______.
__________ ____ __________ _____ _______ _________ ___ ________ ________ ____ ____ _______.
___ __________ _____ _____ ____ _________ ____ __________ ___ _______.
_________ ____ ___ __________ ________ _______ ______ ______.
____ __________ ______ __________ _______ _____.
______ ______ _________ ______ ________.
_________ __________ ____ __________ _______ ____ ____.
_____ ___ _______ ___ ________ _________ ___ _____ __________ ______.
_____ __________ ____ _______ _____.
_________ _____ _________ _____ ____ __________.
_________ __________ _________ ________ __________ _______.
__________.
IGNOU ACADEMY
Your IGNOU journey, made easier.
  • Solved Assignments
  • Study Notes
  • Guess Papers
  • Question Papers
Skip in 10
Top
📞
Call Support Instant phone assistance IGNOU MCSL 17 2022 2023 - Write and run an 8086-assembly language program that accepts two input | IGNOU Academy
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→