Question

Write a NEAR subroutine using 8086 assembly Language (with proper comments) that returns the average value of the values stored in a byte array of length 3. All three values of the byte array are passed to the subroutine in the stack. You should write both the calling program and subroutine.

07 Aug 2023
Answer :
Word Count : 482

Below is the assembly code for both the calling program and the subroutine to calculate the average value of a byte array of length 3, using the 8086 assembly language. I'll provide comments to explain each part of the code.

; Calling Program
ORG 100h    ; Set the origin address

MOV AH, 0   ; Clear AH register
MOV AL, 20  ; Load first value into AL
PUSH AX     ; Push first value onto the stack

MOV AL, 30  ; Load second value into AL
PUSH AX     ; Push second value onto the stack

MOV AL, 40  ; Load third value into AL
PUSH AX  

________ ____ _______ _______ __________.
_________ ______ _______ __________ ____ ____ ________ _____ ______ ___ ________ _______.
__________ ______ ________ _______ _____ __________ _______.
_____ __________ _______ __________ _________.
______ __________ _____ ________ ______ ________ _________ ________ ____ ________.
____ _________ __________ _________ ________ ________.
_________ _______ _____ _________ ____.
___ _________ __________ _______ ________ ________.
___ _________ ____ ___ ________ __________ _____ _____ _______ ____ ____ ___.
_________ __________ _____ _________ ____ __________ ______.
____ __________ ___ _________ ______ ________ _______.
__________ _______ _______ ________ ___ ______ __________ ________ ___ _____.
________ _________ ________ ______ __________ _____.
__________ ____ ____ __________ __________ ______ __________ ______ ___ ___.
_____ _______ _____ __________ _________ _____ _________ __________.
__________ _______ _______ _______ _________ ____ ________ ________.
_____ ________ _________ ________ _______ __________ ____ ________ _________ __________ ____.
___ _____ _______ _____ ___ ______ ___ ______ _______ _______.
____ ___ ______ ______ ___ ___ _________ __________ _________.
______ __________ ___ ______ ________ ______ _____ ______ _______ _______ _______.
__________ ____ __________ ________ __________ ____ _________.
_________ ____ _____ ____ ______ _____ _______ ___ ______ ________.
_______ _______ ____ _____ ___.
_______ __________ _____ __________ __________ ____ ________ ______.
___ ____ _________ ___ ____ _______ _________ ___ __________.
_________ ________ ____ _______ _____ _________ ________ _____ ______ ________ ___.
______ ____ ____ _________ _________ ______ ______ ____ _____ __________ ________ _______.
__________ ____ _________ ________ _______.
_______ ___ __________ _________ _____ __________ _______.
_____ _________ _________ __________ ____ ___ _______ ______ _____ ___ __________ ________.
___ ______ ____ ______ ________ __________ _________ _____ _________ ____ _________ ___.
__________ ____ _______ ____ ___ _____ ________ _________.
__________ _____ ______ ____ _________ _________ ________ ______ _________ ___.
__________ __________ ________ _____ __________ ______ ____ ____ _____ ____ ______ ___.
_________ _____ ______ ________ _______ ___ _______ ____ ______ ______ ___.
_______ ______ ________ __________ ______ ________ ________ ___ _________ ____ _______ _________.
________ _______ _______ _______ _______ _____ ____ ______.
_______ __________ ______ ______ __________ _______ __________ ____ ___ __________ ______ ___.
_________ __________ _____ __________ ________ _____ _____ _____ __________ ______ ________ _____.
___ ____ ____ __________ ____ __________ _______ ____ _________ _______ ____.
_________ _________ ________ __________ ______ ________.
_________.
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 NEAR subroutine using 8086 assembly Language (with proper comm | IGNOU Academy
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→