Question

b) Write and run a 8086 Assembly language program that converts a three digit ASCII number stored in three consecutive byte locations in the memory, into a binary number. The output should be stored in DX register. For example, if three consecutive byte locations contain '345' (please note they are three ASCII digits), then the DX should get binary equivalent of decimal number 543, which is (0000 0010 0001 1111)2. This binary value will be stored in DX register.

13 Sep 2020
Answer :
Word Count : 558

The task is to write an 8086 Assembly language program that converts a three-digit ASCII number, stored in three consecutive byte locations in memory, into its corresponding binary representation and stores the result in the DX register. For example, if the memory contains the ASCII values of '3', '4', and '5', the program should convert it into the binary equivalent of the decimal number 345, and store that value in the DX register.

Here's the 8086 Assembly program that accomplishes this task:

```assembly
.model small
.stack 100h
.data
    num db '345'  ; The ASCII digits stored in consecutive memory locations

.code
start:
  _________ __________ ___ __________ __________ ___ _______ _______.
____ __________ _________ _____ _____.
___ _____ ________ ______ ___ ______ __________ ____ ____.
______ __________ ________ ________ ________.
________ _________ ______ ___ ________ _______ _____.
__________ _______ __________ ______ __________ ____.
___ ______ ____ ______ _____ ________.
_________ _________ ______ ______ _______ _____ __________.
___ ____ ___ ____ _________ ______ ________ _______ _________ _______ ____ __________.
___ _______ _________ __________ ______ __________ __________ ___ ________ __________.
__________ _______ _______ ________ _____ _________ ____ ___ ______ ______ ___ _______.
______ ______ ___ _________ _______.
__________ __________ _____ _______ _____ _____ ____ __________ ________.
________ _____ _________ ____ ______ _____ ____.
________ _________ ________ ________ ____ ____.
_________ ___ _______ ______ ________.
_____ __________ _____ ______ __________ _______ _________.
______ ___ _______ ___ ________ _______ ____ ________ ______ ________ _____.
______ ________ __________ _______ __________ _________.
________ ___ ___ ___ ____ _________ _________ ________ ________ ___.
________ _______ _____ ____ ________ _______.
_____ _________ _______ ____ __________.
_______ ____ __________ __________ ________ __________.
_________ _______ __________ ____ _______ ____ __________ _______ ________ ________.
_____ _________ _______ ___ ________ _________ _____.
______ ________ __________ __________ _____ ____ _______.
__________ ________ ___ _______ _______ ___ ________.
__________ ____ ____ ______ ___ ___ _____ ________ _____.
_____ _______ ______ _____ _____.
____ _______ _____ _____ _____.
__________ _____ ________ _____ __________ ____ ________ ____ ________ ____.
______ ___ ________ ________ ___ _________.
_______ _____ ______ _____ _______ ________ _____ _____.
_____ _____ ___ _______ ________ ___ ______ _________ _______ _________ ________.
___ __________ _____ __________ _______ ____ _______ ____ __________.
____ _____ __________ ______ ______ ____ ________ _____ _____.
______ ____ ___ __________ ____ ______ ______ _________ ___.
______ ________ _______ _______ _____ ___ _______ ______ ____ __________.
___ _________ _____ _______ ______ ____.
____ ____ ______ _________ __________ __________ _______ ______.
___ ___ ______ ____ __________ __________ ___ __________ _________ _________ ___ _______.
____ ________ ______ ____ ____ _____ ________ ____ ________ ___.
____ _________ _____ ______ _____.
_______ _____ ____ ___ ______.
______ _______ ______ ____ ___.
_____ _______ _______ ___ __________ _________ ____.
_________ ________ ___ ____ __________ _______ ____ _______ ______ ______ ________.
________ ____ ____ ___ ___ ____ _______ ___ _______ ____ __________.
______ ___ ____ ________ ______.
__________ _______ ___ _____ _____ _______ _________ ________ __________.
________ _________ ________ _____ ____ ___ _________ ______ _________ _________.
_________ ________ ________ ______ _______ ______.
____ ______ _______ __________ ______ ____ ____ _________ ____ ______ ____ ________.
_________ _____ _______ ____ ______ __________ _____ _______ _________ _____ _____ ____.
______ ______ ________ _____ _________ ___ __________ ______ _____ _______ _________ ___.
_______ ___ ____ __________ ________ _______ _______ ____ ___.
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 b) Write and run a 8086 Assembly language program that converts a thre
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→