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