Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is in Assembly language on windows Create three procedures that will convert a given value in one of the following temperatures: Celsius Kelvin Newton

This is in Assembly language on windows
Create three procedures that will convert a given value in one of the following temperatures:
Celsius
Kelvin
Newton
To Fahrenheit.
The procedures should be named
C2F
K2F
N2F
The following equations can be used to convert different temperature types to Fahrenheit :
Kelvin - F =(K -273.15)*1.8000+32
Celsius - F = C *9/5+32
Newton - F = N *60/11+32
You should pass the all values to the procedures using the floating point stack. You should return the converted temperature back using the floating point stack. In other words, the converted temperature should be at ST(0)
Once you have the procedures written test them in main by getting a value in on of the three temperatures from the keyboard. You might want to store it in a real variable. Convert the value to the three different temperatures and output them.
Your output should look like the following
Enter a value in C
38.1
In Fahrenheit that value is 100.58
Enter a value in K
45.95
In Fahrenheit that value is -376.96
Enter a value in N
23.98
In Fahrenheit that value is 162.8
Press any key to close this window ...
You may have to use global variables to hold the constants needed for the arithmetic.
Required:
The temperature conversion procedures must be in a separate asm file called conversion.asm. This means you should have main.asm and conversion.asm. You can use constant values in the data segment of conversion.asm but you MUST pass the temperature to be converted to the procedure through the floating point stack and return the converted value back to main on the floating points stack.
NOTE:
You are not to use any .IF .ELSE, .WHILE, or .ENDW instructions. You are to use pure old fashion assembly language to solve this.

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_2

Step: 3

blur-text-image_3

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

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

Students also viewed these Databases questions

Question

Discuss five types of employee training.

Answered: 1 week ago

Question

Identify the four federally mandated employee benefits.

Answered: 1 week ago