Question
1. Write a 64-bit x86 assembly language program that computes the surface area and volume of a cone in square cm and cubic cm respectively.
1. Write a 64-bit x86 assembly language program that computes the surface area and volume of a cone in square cm and cubic cm respectively. The program has the main procedure and a procedure computeResults. The main procedure prompts for and reads the radius r and the length l of the slant side of the cone both in cm, it then passes these two values to the computeResults procedure. It finally prints the values returned by the computeResults procedure. The computeResults procedure receives the radius r and the length l of the slant side of the cone, it then returns the surface area and the volume of the cone.
volume - T Note: Your program must define a variable Pl with a value of 3.141592 .The computeResults procudure must not contain scanf or printf statements; the printing of the results must be in the main procedure. The main procedure must display an appropriate error message and terminate if the input is invalid. Sample program runs: Enter the radius [cm] and the slant 1ength [cm] of the cone: 7.00 -8.00 Error: Invalid input Enter the radius [cm] and the slant 1ength [cm] of the cone: 8.50 6.00 Error: Invalid input Enter the radius [cm] and the slant length [cm] of the cone: 3.50 7.56 Area-121.61 square cm Volume 85. 96 cubic cm volume - T Note: Your program must define a variable Pl with a value of 3.141592 .The computeResults procudure must not contain scanf or printf statements; the printing of the results must be in the main procedure. The main procedure must display an appropriate error message and terminate if the input is invalid. Sample program runs: Enter the radius [cm] and the slant 1ength [cm] of the cone: 7.00 -8.00 Error: Invalid input Enter the radius [cm] and the slant 1ength [cm] of the cone: 8.50 6.00 Error: Invalid input Enter the radius [cm] and the slant length [cm] of the cone: 3.50 7.56 Area-121.61 square cm Volume 85. 96 cubic cm
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