Create a project called Practice 14. Copy the code called Expression that you can find in your textbook, page 535. Modify the code so that it will calculate the expression:
val D = valA * (valB + valC) + valC * (-valB)

Create a project called Lab 14. Using floating-point instructions write a program that prompts the user for the radius of a circle. Calculate and display the circle’s area. Calculate and display the length of the circle. Use the ReadFloat and WriteFloat procedures from the book’s library. Use the FLDPI instruction to load PI onto the register stack.
As a reminder, the area of a circle is PI * radius^2 and the length of a circle is 2 * PI * radius.

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

;// First and last name
;// Date
;// Assignment Title

INCLUDE c:\Irvine\

;// .386
;// .model flat,stdcall
;// .stack 4096
ExitProcess proto,dwExitCode:dword

.data ;// write your data in this section
radius REAL8 ?
two REAL8 2.0

.code ;// write your program here
main proc
mWrite "Please enter the circle's radius: "
call ReadFloat ; ST(0) = input number
fst radius ; radius = ST(0)
fld radius ; ST(0) = radius, ST(1) = input number
fldpi ; ST(0) = 3.14, ST(1) = radius, ST(2) = input number
fmul ; ST(0) = ST(0) * ST(1) = 3.14 * radius, ST(1) = input number
fmul ; ST(0) = ST(0) * ST(1) = area
mWrite "The area of the circle is: "
call WriteFloat...
$65.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Assembly Language Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats