Implement the following C++ code in assembly language. Substitute calls to WriteString for the printf() function calls:
double X;
double Y;
if(x<Y)
printf("X is lower\n");
else
printf("X is not lower\n");
NOTE:- IN CASE OF ANY QUERY PLEASE DO ASK IN COMMENT....HAPPY LEARNING
ANSWER:-
.data mssg1 BYTE "X is lower",0dh,0ah,0 mssg2 BYTE "X is not lower",0dh,0ah,0 X = 20.0 Y = 24.0 .code main PROC compare: mov eax, X cmp eax, Y jl xlower mov eax, Y cmp eax, X jmp xhigher xlower: mov edx, OFFSET mssg1 Call WriteString jmp compare xhigher: mov edx, OFFSET mssg2 Call WriteString exit main ENDP END main
----------------------I hope my answer met all your requirements......Thank You---------------------------
Get Answers For Free
Most questions answered within 1 hours.