Question: Please use assembly language in the simplest form possible. Please don't copy the previous work, I am looking to check the code itself. Find the

Please use assembly language in the simplest form possible. Please don't copy the previous work, I am looking to check the code itself.

Find the infinite series for SIN(X) in a calculus book and implement it in a subroutine called SIN. Use EPOWER as an example of how to do this.

EPOWER is as follows:

;Program SIN.ASM: Software driver program for SIN procedure.

.MODEL SMALL .DATA X DB 0,1,0,0,0 TEMP DB 5 DUP(?) ETOX DB 5 DUP(?) ZERO DB 0,0,0,0,0

.CODE .STARTUP CALL EPOWER .EXIT

EPOWER PROC FAR LEA SI,ZERO ;predefined constant 0 LEA DI,ETOX CALL FAR PTR COPY ;clear result MOV CX,10 ;init loop counter

NEXTERM: LEA SI,X ;compute numerator MOV AL,CL CALL FAR PTR POWER LEA BX,TEMP ;save numerator CALL FAR PTR SAVE MOV AL,CL ;compute denominator CALL FAR PTR FACTORIAL LEA SI,TEMP ;divide to generate term XCHG BP,DI CALL FAR PTR DIVIDE XCHG BP,DI ;add current term to result LEA SI,ETOX CALL FAR PTR ADDER LEA BX,ETOX ;save result CALL FAR PTR SAVE LOOP NEXTERM RET

If possible, please use the Taylor Expansion. Example,

algebraic formula : x - (x^3/3!) + (x^5/5!)

RPN : x x x * x * 3 2 * / - x x * x * x * x * 5 4 * 3 * 2 * / +...

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To implement the sine function using a Taylor series in assembly language you can follow the structure provided in the EPOWER routine as an example He... View full answer

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!