Question: I currently have some code written where I pass the balance and rate on the floating - point stack, but not the term. I am

I currently have some code written where I pass the balance and rate on the floating-point stack, but not the term. I am having a hard time understanding how to modify my code to pass balance, rate, and term on the floating-point stack. If anyone could explain what sort of modifications I could make to satisfy these requirements, I would be really appreciative! Thank you!INCLUDE asmLib.inc yearlyBalance PROTO.data promptBalance BYTE "Enter your balance ",0 promptRate BYTE "Enter the interest rate (like 5.0)",0 promptYears BYTE "Enter the number of years ",0 balance REAL8? rate REAL8? term DWORD ?.code main PROCmov edx, OFFSET promptBalance call writeLine call readFloat fstp balance mov edx, OFFSET promptRate call writeLine call readFloat fstp rate mov edx, OFFSET promptYears call writeLine call readInt mov term, eax fld balance fld rate push term call yearlyBalance exit main ENDP END mainINCLUDE asmLib.inc .dataoutputYears BYTE "Year: ",0 outCol BYTE ": ",0 dollarSign BYTE "$",0 divisor REAL8100.0.codeyearlyBalance PROC mov ecx, \[esp +4\] fdiv divisor fld1 fadd fld ST(1) mov ebx, 1 l1: cmp ebx, ecx jg ex ; Loop bodymov edx, offset outputYears call writeString mov eax, ebx call writeInt mov edx, offset outCol call writeString mov edx, offset dollarSign call writeString fmul ST(0), ST(1) call writeFloat endl inc ebx jmp l1 ex:ret yearlyBalance 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!