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
CF
KF
NF
The following equations can be used to convert different temperature types to Fahrenheit :
Kelvin F K
Celsius F C
Newton F N
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
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
In Fahrenheit that value is
Enter a value in K
In Fahrenheit that value is
Enter a value in N
In Fahrenheit that value is
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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
