Question: 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

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!