Question

Write a program using 8086 assembly Language (with proper comments) that accepts three different digits as input from the keyboard. Each digit is first converted to a binary equivalent. The binary values of these three digits are compared and the middle value is put in the AL register. This AL register is multiplied with each value of a byte array of size 6, which is stored in the memory. The result of the multiplication is stored in the same memory location. You may assume the byte array has the values 02h, 06h, 08h, 03h, 01h, 05h. Make suitable assumptions, if any.

07 Aug 2023
Answer :
Word Count : 768

here's an 8086 assembly language program that fulfills your requirements. The program takes three different digits as input, converts them to binary equivalents, compares the binary values, and then multiplies the middle value with each element of a byte array. I'll provide comments to explain each part of the code.

ORG 100h   ; Set the origin address

MOV AH, 0   ; Clear AH register

; Accept three digits as input
MOV DX, 0   ; Clear DX register (will be used to store the input)
MOV AH, 1   ; Set AH to read character input
INT 21h     ; Read the first digit
SUB DL, '0' ; Convert ASCII to binary
MOV BX, DX  ; Store the first digit in BX

MOV AH, 1   ; Set AH to read character input
INT 21h     ; Read the second digit
SUB DL, '0' ; Convert ASCII to binary
MOV CX, DX  ; Store the second digit in CX

MOV AH, 1   ; Set AH to read character input
INT 21h     ; Read the third digit
SUB DL, '0' ; Convert ASCII to binary
MOV SI, DX  ; Store the third digit in SI

; Compare the binary values and find the middle value
CMP BX, CX  ; Compare first digit

_____ ____ ___ ___ ______ _______ ______ _______ ___ _____.
______ __________ _______ __________ ____ _______ _______ ______ __________.
__________ ___ ________ _______ ___ _______ ________ _______.
___ __________ _______ ______ ______.
____ __________ ___ __________ _____ _________ ________ ____.
____ ____ ___ ___ _____ _________ _________ ___ __________ ___ __________.
____ _________ ________ ____ __________ _________ ______.
________ ___ ______ __________ ________ ______ ______ __________ _______.
_________ _________ _____ ________ __________ ______.
________ ______ ___ ___ ____ ______ _________.
____ _______ ____ ____ ________ ___ ____ ________ ___ ____.
__________ ______ ___ _____ ___ _________ ______ ________.
_________ __________ ______ ________ __________ _______ _________ ___ ___.
_____ __________ ___ ______ _____ ______ ______ _________.
________ __________ ____ __________ ______.
_________ ____ ______ ______ ____ ________ __________ ____ ____.
__________ ____ ___ _____ ___ ___.
______ _______ ______ _____ _____ _________ _______ _________ ___ __________ ___.
____ ___ ____ ____ ____ _________ _____.
_________ _____ ____ _____ _____ _________ ___ ________ ____ ____ _______.
_________ ______ ____ __________ _________ ________.
_____ ____ ______ ___ __________ _________ _____ __________ _____ ____ _______.
________ _______ ___ ____ __________ ___ ____ ____ _________ ___ __________ ___.
__________ __________ _______ ______ _________ _______.
___ ___ ________ ____ __________ ____ ________ ________ ________.
_____ ______ ________ _________ ____ _________ ________ _____ ____ ________ _______.
________ _________ ___ ________ ________ _______ _____ __________ ______ ____.
___ ___ _________ _________ ___ ___ ______ _______ _______.
_____ ________ _____ _________ ____ __________ ____ ____ ___ _____ _________ ________.
____ _____ _________ __________ _________ ______ ___.
__________ ____ _______ _________ ________ ____ ____ __________ ____ ____ ____.
____ __________ ________ _______ ___ _______ _______ _________ __________.
___ _______ __________ ________ ____ ________ __________ ___ _______ ___ ____ ___.
________ _____ _____ _________ __________ _________ _______.
____ ________ ____ ________ _____ ______ _________ ___.
_____ ________ __________ ____ ______ _________.
_________ _______ _______ ___ __________ _________ _____ _________ _________ ____.
________ _____ ____ ______ ___ ______ ____ ____ ________ __________.
________ ______ ___ ________ __________ ______ ______.
___ _______ ____ ________ __________ ____ _______ ___ ___ ___.
________ _________ __________ _________ ______ ____ _____ __________ _________ _______ __________ _________.
_________ ____ ____ _______ _________ _________ ____ ____ ______.
___ _______ _______ _____ _____ ____ _______.
_____ _______ _____ _________ _____ ______ ______.
___ ______ ______ ________ ____ ___ ___ _________ __________.
________ __________ _________ _______ _______ ___ ___ ______.
_________ ____ ______ ________ ____ _____ ___ ____ _________ ___.
_____ _____ _____ ________ ______ __________ ________ ___ _________ _____.
____ _________ ____ ________ _________ ______ ______ _____ __________ ______ _________.
___ _____ ________ _______ ___ ________ ____ ________ _____ ________ ______.
_______ ___ ____ ________ ________ ________ _________ __________ __________ ________.
______ _____ __________ ________ _________ ____ ________ ________ _______ _________ _________.
__________ _________ _________ _____ _______ _____ ________ __________ ______.
________ ___ _________ _____ ______.
______ _____ ________ ___ ___ ____.
____ ____ ___ _______ __________ __________ ______ ____ __________ _____.
____ _________ ____ ______ ______ ______ ________ ______ ________ __________ _____.
_______ ___ _____ _____ __________ _____ ______ __________.
_____ _____ ___ _______ ______ __________ _____ ______ ______ __________.
_____ ________ _____ ________ ___ ________.
______ _________ _________ __________ _______ ____ _______ ______.
________ ____ _____.
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 MCS 12 2023 2024 - Write a program using 8086 assembly Language (with proper comments) th | IGNOU Academy
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→