Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone help me for these assignment? These my assignment. Don't forget to do the peer review for this assignment. These assembly language. Write a

Can someone help me for these assignment? These my assignment. Don't forget to do the peer review for this assignment. These assembly language.
Write a complete program that will input values for num1 ,num2, and num3 and display the
value of the expression ( (num1 ^ 3) * num2 + 5 * ( num2 ^ 2) ) / num3.
assume that the user enters only numbers that are greater than zero and the calculation never exceed 4 bytes size.
Sample run:
num1 = 1
num2 = 2
num3 = 3
((num1 ^ 3) * num2 + 5 * ( num2 ^ 2)) / num3 = 7 R 1
These the code I writing. Can some help me to finish it?
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
LULUI NUUJ Dougy t3.asm* + x comment @ January 28, 2020 This program input values for num1, num2, and num3 and display the value of the expression ( (num1 ^ 3) * num2 + 5 * ( num2^ 2) ) / num3. include Irvine 32.inc .data ;Size: byte (1), word (2), dword (4) str1 BYTE "num1 = ", O str2 BYTE "num2 = ", O str3 BYTE "num3 = ", O str4 BYTE "((numl ^ 3) * num2 + 5* ( num2^ 2) ) / num3 = ", O str5 BYTE "R", numi dword? num2 dword? num3 dword ? No issues found 6 - str5 BYTE " R", o num1 dword ? num2 dword ? num3 dword ? Result dword ? Remider dword ? W in . code main PROC ; OFFSET= take address of W wou ;prints out num1, takes in num1 input mov edx, offset str1 call writeString call readDec mov num1, eax ;prints out num2, takes in num2 input No issues found mov num1, eax ;prints out num2, takes in num2 input mov edx, offset str2 call writeString call readDec mov num2, eax ;prints out num3, takes in num3 input mov edx, offset str3 call writeString call readDec mov num3, eax ;prints out num4, takes in num4 input mov edx, offset str mov eax, num1 mul eax mul eax No issues found mul eax mov ebx, num2 add ebx,5 ;write = print ;read = take input ;readInt, readDec(eax) ;writeInt, writeDed exit main endp end main No issues found output from: Debug LULUI NUUJ Dougy t3.asm* + x comment @ January 28, 2020 This program input values for num1, num2, and num3 and display the value of the expression ( (num1 ^ 3) * num2 + 5 * ( num2^ 2) ) / num3. include Irvine 32.inc .data ;Size: byte (1), word (2), dword (4) str1 BYTE "num1 = ", O str2 BYTE "num2 = ", O str3 BYTE "num3 = ", O str4 BYTE "((numl ^ 3) * num2 + 5* ( num2^ 2) ) / num3 = ", O str5 BYTE "R", numi dword? num2 dword? num3 dword ? No issues found 6 - str5 BYTE " R", o num1 dword ? num2 dword ? num3 dword ? Result dword ? Remider dword ? W in . code main PROC ; OFFSET= take address of W wou ;prints out num1, takes in num1 input mov edx, offset str1 call writeString call readDec mov num1, eax ;prints out num2, takes in num2 input No issues found mov num1, eax ;prints out num2, takes in num2 input mov edx, offset str2 call writeString call readDec mov num2, eax ;prints out num3, takes in num3 input mov edx, offset str3 call writeString call readDec mov num3, eax ;prints out num4, takes in num4 input mov edx, offset str mov eax, num1 mul eax mul eax No issues found mul eax mov ebx, num2 add ebx,5 ;write = print ;read = take input ;readInt, readDec(eax) ;writeInt, writeDed exit main endp end main No issues found output from: Debug

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

What Is A Database And How Do I Use It

Authors: Matt Anniss

1st Edition

1622750799, 978-1622750795

More Books

Students also viewed these Databases questions