Question

Write a program in 8086 assembly language to evaluates 6*(x^2) + 5x + 9 if flag = = 1 or 4*(x^2) + 7 if flag = = 0. Assume x is a 16-bit unsigned integer.

30 Nov 2017
Answer :
Word Count : 481

To write a program in 8086 assembly language that evaluates the expression 6*(x^2) + 5x + 9 if the flag is 1, or 4*(x^2) + 7 if the flag is 0, you can use conditional branching based on the value of the flag. Here's an example of how to implement this in 8086 assembly language:

```assembly
ORG 100h      ; Standard org directive for .COM executable files

section .data
x db 02h       ; Initialize x as 2 (you can change this value)
flag db 01h    ; Initialize flag as 1 (you can change this value)

section .text
global _start
_start:
    ; Load flag into AL register
    mov al, [flag]

    ; Compare AL to 1
    cmp al, 01h
    jnz flag_is_zero  ; Jump to flag_is_zero label if

__________ _______ _______ ___ ____ ___ __________ _____ ______.
____ ________ _______ __________ ___ __________ _______ ________.
_________ _________ _____ ____ _____ ______ ____ ________ ______.
_____ __________ _____ _____ _____ ___ ___ _________.
______ ________ _________ ________ __________.
_____ __________ __________ ______ ____ ______ ____ ___ _________ __________ __________ __________.
_________ ________ __________ _____ ____ ____ _________ ____.
_______ ________ ________ _______ ________ ______ __________.
______ __________ _________ _________ ____ ______.
_________ _________ __________ __________ __________ ________ ___ __________ ______ _____.
_________ __________ ______ ____ _________ ________.
___ __________ ________ _________ ___.
_____ ___ _______ _______ ________ ________ ______ ___ _____ ______ ________ _____.
_______ ______ ___ ______ __________ ________ ________ _____ ____.
_____ ___ ________ _____ ______ _______ _________ _________ _______ ________.
_______ ________ _____ _______ __________ ___ __________ __________ ___.
_______ _______ ______ ____ _____.
__________ ___ _____ ______ _______ _____ __________ _____ ____ ____ ____.
______ _____ ______ __________ ______.
______ ________ _______ ____ ________ ______ _______ ___ ______.
_______ ______ __________ _________ _______ _______ _____ _________ _____ _____.
___ ______ __________ _____ ______ ________.
_____ ____ _______ ___ _____ _______ ___ ______ ___.
__________ _________ __________ _______ _____ ___ ___ ____ _______ _________ ________ _____.
________ _________ ________ _________ _____ __________ ________ _______ ______ __________.
______ __________ _____ _____ _______ ___ ________ _______ ____ _____ ______ ____.
_____ ________ ______ __________ __________ _________ _______ _________ ________ ________ _________ _____.
____ _________ ____ ____ ______ _____ __________ ________ ____ ______ __________.
________ _______ ___ ___ _______ _____ ___ ________.
_________ __________ _______ ________ ______ _______ ___ ___ _____.
__________ ____ _________ ____ __________ ___ ______ ____ _________ ____ ____.
____ _____ _____ ____ __________ _________.
___ _________ _________ _____ ____.
____ ______ ____ ________ ______.
_____ ________ __________ ____ ________ ________.
__________ ________ _____ ______ ______ _____ ___ _____ ___ ______.
________ ___ ___ _______ ______ ___ __________ _______ __________ ________.
___ ________ _______ _____ ______ __________.
______ ______ ________ ______ _______ ________ ____ _________.
_____ __________ _______.
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 MCSL 17 2010 - Write a program in 8086 assembly language to evaluates 6(x^2) + 5x + | IGNOU Academy
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→