Question

Write and run following programs using 8086 assembly language.

(a) Write and run an Assembly language program that converts a packed 4 digit BCD number that has been stored in two consecutive byte locations in the memory, into an equivalent binary number. The output should be stored in DX register. For example, if two consecutive byte locations have BCD values (12) and (34) then output will be binary equivalent of (1234)to which is (0000 0100 1101 0010)2. This binary value will be stored in DX register.

(b) Write and run (using appropriate calling program) a near procedure in 8086 assembly language that checks if the input parameter has a value less than 5. If the value is less than 5 then subroutines displays the line "Parameter value is less than 5" else it displays "Parameter value is >-5".

(c) Write and run an 8086 assembly language program that finds the factorial of the value stored in BH register. You may assume that BH register will store a maximum value 8. Thus, you need not handle the overflow.

 

29 May 2025
Answer :
Word Count : 569
We are solving manually, without Python, and we will write the 8086 assembly programs step by step for each part. I will show exact assembly logic, explain, and give the numerical conversion results where needed. --- ### (a) Convert 4-digit Packed BCD to Binary and Store in DX Example Input: Memory: ``` [2000H] = 12H ; high 2 BCD digits → 1 and 2 [2001H] = 34H ; low 2 BCD digits → 3 and 4 ``` Equivalent Decimal: 1234 Equivalent Binary: 0000 0100 1101 0010 (4D2H) Program: ```assembly ORG 1000H MOV SI, 2000H ; SI points to memory where BCD digits are stored MOV AL, [SI] ; AL = first byte (12H) MOV AH, AL ; Copy to AH for splitting AND AL, 0FH ; AL = lower nibble = 2 SHR AH, 4 ; AH = upper nibble = 1 __________ _____ __________ __________ ____ _________ ______ _____ __________ ____ ________.
__________ _____ ________ ____ _________ _________ ______ ____ __________.
______ ___ _________ ____ _____ __________ ________ ________.
__________ __________ _____ __________ __________.
_____ _____ ___ _________ _________ ___ _____.
_____ ___ ______ ___ _______ ___ ______.
_____ _____ _____ ___ _____ _______ ___ _______ ______ ________ ____.
______ ________ _________ ______ ________ ________.
___ ____ ____ ____ _______ ____ ______ ___ _________.
___ ____ _______ ________ ____ ________ ____ ____ ___ ___.
_________ ____ ____ _________ _____ _____ ______ ____ ________ __________ _______.
_________ __________ ____ _________ _________ ___ _______ _________ __________ ______ ____.
________ __________ __________ _________ _______ ______ _____ ______ _____ ______ _________ _________.
________ _________ _______ ______ _______.
______ ___ _____ ______ _______ ______ ________ _______.
________ __________ ____ __________ ________ _______ _______ ________ ___ __________.
_____ _______ ________ ______ ________ _____ __________ ___ ___ _______ _________ ________.
_____ ____ _________ __________ _______ _________ ____ ___ _______ ________.
__________ ___ _____ _________ ____ ________ _________ _______ __________ _____ _____ _______.
_______ ____ ___ _________ _____ _____ _______ _______ ___ _________ ___ ____.
____ ____ _________ ______ _________ _____ ___ _____ ______ ___ __________.
_________ _______ ________ _________ ______ ___ _________ ___ ______ ______ ___.
___ ________ _______ ___ ____ ___ ____ ___ _____ ________ _______.
___ ___ _______ _____ _______ ___ ____ _________ ______ ______ _________.
_______ _________ ___ ___ ____ _____.
_______ _______ ____ ____ ____.
________ __________ _______ _______ _____ ____.
______ ___ _______ ____ __________ ____ ____ _______ _________.
______ ______ _________ _____ ____ _____ ____ __________.
____ ___ ________ ______ ____ _____ ____ ________ ___.
_______ ______ _______ _______ ________ ____ __________ ______ ___ _________ __________ _________.
_______ ________ __________ _______ ___ ____ _____ _____ _________.
__________ ______ ____ ____ ________ ________ ________ __________ _______ ___ __________ ___.
________ ______ ______ ______ _______ _____.
_______ _____ __________ ______ ________ ___ _______ ______.
__________ ___ ____ _______ _______ __________ __________ ________.
_____ ________ __________ ________ ____.
___ ______ ___ _______ _________ ___.
__________ _________ _____ _______ __________ __________.
__________ _______ _______ _______ ____ _____ ________ ___.
____ _______ _______ ________ ________ ________ _______ ______ _____ ____ _______ _______.
___ ______ ____ ______ ________ ________ _______ ____ ________ _______ ________ ___.
_______ ___ _____ __________ _________.
_________ __________ ____ ________ ______ ________ __________ _____ ___ ______.
__________ _____ ______ _____ ______ _____ _________ ____ _________ __________.
__________ _________ ________ ________ ____ _____ ______ ___ _____.
______ __________ ___ __________ ________.
______ ____ ____ __________ _________ _____ _______ _______ ___.
__________ ____.
Get Full Answer on WhatsApp
IGNOU NEWS
Assignment Submission Last Date Extended Till 30 June 2026 Click Here★★★IGNOU June 2026 TEE Date Sheet Released Click Here★★★
Top
📞
Call Support Instant phone assistance Write and run following programs using 8086 assembly language.(a)
🟢
WhatsApp Chat Fast live messaging
Email Us Business enquiries & support