Question

Write and run (using appropriate calling program) a near procedure in 8086-assembly language, which is passed a single parameter by the calling program. The procedure checks if the input parameter is divisible by 5 or not. If the input parameter is divisible by 5, then a value of 1 is returned to the calling program, else a value 0 is returned. The calling program based on the returned value prints “Divisible” or “NOT Divisible”. You may assume that the parameter value would always be greater than or equal to 1. Make and state suitable assumptions, if any.

15 Sep 2022
Answer :
Word Count : 384

code for the procedure in 8086 assembly language:

 

DivBy5 PROC NEAR

MOV AX, [BP + 4] ; Load the input parameter into AX

CMP AX, 0 ; Check if the input is zero or not

JE Exit ; If zero, jump to exit

MOV DX, 0 ; Clear DX register

DIV 5 ; Divide the input parameter by 5

CMP DX, 0 ; Check if there is any remainder

JNE NotDivisible ; If there is a remainder, jump to NotDivisible

MOV AX, 1 ; If the input parameter is divisible by 5, load 1 into _______ __________ __________ _____ _____ ______ ____.
______ _________ ______ _________ ______ _______ ____ ______ ________ ______.
_______ _____ _______ ___ ____ ____.
_______ ______ ________ _______ ______ _________ _______ ______ ___ _______ ________.
______ ________ ____ ____ _____ _____ _________.
_______ ________ ___ ______ _________ ____.
_____ ________ ________ ____ _____ _________ _________.
__________ ________ __________ __________ ______ __________ __________ _____ __________.
_____ ________ ____ ____ ______ ____ ___ _______ ___.
______ _____ ____ _______ _________ ____ _________ _______ _____.
_________ __________ ____ ___ _____ _____ _______ ________ ____ ________.
___ _________ _________ _______ ____ _____ ___ ________ ______ __________.
_________ _______ _________ _________ _______ _________ __________ ________ _________ ______ _________.
_________ ___ __________ _____ _________ ___ ______ _______ ________ _____.
_____ __________ ______ _______ _________ _____ ______ ___ ____ _________.
____ _______ __________ ____ ________.
_____ _________ ____ ________ _______ ___ _________.
_________ _________ _________ __________ __________ __________.
_______ _______ _________ __________ _______ _________ _____ ___.
__________ _________ ___ ___ ____ _____ ______ _____ __________ ______.
_____ _________ ___ _____ _____ _________ _______ _____ ________.
___ _________ _______ ____ ____ ______.
______ ____ ___ _______ _____ __________.
__________ _______ _________ _________ _____ ______ _____ _____ ___.
_________ _____ _______ ______ ______ __________ ______.
______ __________ ________ _____ _______.
_____ __________ ________ ________ ________ _____ ________ _____ _____ __________ ____ _______.
_________ ___ ____ ________ _________.
__________ ______ __________ ___ ___ __________ ____.
______ ___ ____ _________ ______ ___ ______ ________.
________ __________ _____ _____ _______ ________ ____ ___ _________ ___ _________.
_____ _______ ____ _______ _________ _____ ____.
_____ __________ _______ _________ _______.
_____ _______ __________ ____ _______ __________.
_______ __________ ___ _______ _______ _____ ______ ________ _____.
_____ ________ __________ ________ ___ _____.
___ ______.
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 (using appropriate calling program) a near procedure in
🟢
WhatsApp Chat Fast live messaging
Email Us Business enquiries & support