Question
Starting with the windows32 framework in 80x86 assembly language, write a complete program that will input values for a , b and c and display
Starting with the windows32 framework in 80x86 assembly language, write a complete program that will input values for a, b and c and display the value of the expression
(a+b*c)/(2*b)
Input and output must be consistent with the samples shown below. Include full source code with comments and screenshots of working program. Expression value can be rounded down to the whole number to avoid fractional outputs. If you are super motivated, challenge youself to print the expression in its more accurate decimal (fractional) format. In the example below, that value would be 8.9 and not 8. That, however, is an optional feature.
586
.MODEL FLAT
INCLUDE io.h ; header file for input/output
.STACK 4096
.DATA
x DWORD ?
y DWORD ?
prompt1 BYTE "First number", 0
prompt2 BYTE "Second number", 0
inArea BYTE 20 DUP (?)
mean BYTE 11 DUP (?), 0
meanLbl BYTE "Harmonic mean", 0
meanOut BYTE 4 DUP(?), '.', 2 DUP (?), 0
.CODE
_MainProc PROC
input prompt1, inArea, 20 ; read ASCII characters
atod inArea ; convert to integer
mov x, eax ; store in memory
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started