Question: In my x86 assembly language class we have been given the task of writing a fahrenheit to celsius temperature converter using the formula: C =

In my x86 assembly language class we have been given the task of writing a fahrenheit to celsius temperature converter using the formula: C = (5/9) * (F - 32) as well as using floating point numbers. Our teacher provided the following templates to use for our codes.

In my x86 assembly language class we have been given the taskof writing a fahrenheit to celsius temperature converter using the formula: C

So far this is what I have been able to come up with, any help would be appreciated.

= (5/9) * (F - 32) as well as using floating point

#define CRT SECURE NO WARNINGS #include #define ASM float f2c(float); int main float fahren; printf("Enter degree in Fahrenheit: scanf("f", &fahren) printf("%f degrees in Fahrenheit is "); %f degrees in Celsus. ", fahren, f2c (fahren)); getchar(); getchar() return 0; #1f !ASM float f2c(float f) return 5.0/9(f 32); #endif .586 MODEL FLAT DATA five DWORD 5 nine DWORD 9 ttwo DWORD 32 result DWORD? CODE f2c PROC push ebp mov ebp, esp TODO Your code goes here mov pop ret eax, result ebp f2c ENDP END .586 . MODEL FLAT DATA five DWORD !5 nineDWORD 9 ttwo DWORD 32 result DWORD ? . CODE f2c PROC push ebp mov ebp, esp TODO YOUR CODE HERE finit fild five fild nine fdiv st (0), st (1) fild ttwo fsub st (0), fmulst (0), st (1) st (2) 8 result mov poP ret eax, result ebp f2c ENDP END #define CRT SECURE NO WARNINGS #include #define ASM float f2c(float); int main float fahren; printf("Enter degree in Fahrenheit: scanf("f", &fahren) printf("%f degrees in Fahrenheit is "); %f degrees in Celsus. ", fahren, f2c (fahren)); getchar(); getchar() return 0; #1f !ASM float f2c(float f) return 5.0/9(f 32); #endif .586 MODEL FLAT DATA five DWORD 5 nine DWORD 9 ttwo DWORD 32 result DWORD? CODE f2c PROC push ebp mov ebp, esp TODO Your code goes here mov pop ret eax, result ebp f2c ENDP END .586 . MODEL FLAT DATA five DWORD !5 nineDWORD 9 ttwo DWORD 32 result DWORD ? . CODE f2c PROC push ebp mov ebp, esp TODO YOUR CODE HERE finit fild five fild nine fdiv st (0), st (1) fild ttwo fsub st (0), fmulst (0), st (1) st (2) 8 result mov poP ret eax, result ebp f2c ENDP END

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!