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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!