CONVERT C CODE INTO ASSEMBLY LANGUAGE BY EDITING BETWEEN THE RED LINES Required
ID: 3727419 • Letter: C
Question
CONVERT C CODE INTO ASSEMBLY LANGUAGE BY EDITING BETWEEN THE RED LINES
Required Task 2: In mathematics, the Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence: 0,1,1, 2, 3, 5, 8,13, 21, 34, The next number is found by adding up the two numbers before it. . The 2 is found by adding the two numbers before it (1+1) Similarly, the 3 is found by adding the two numbers before it (1+2), And the 5 is (2+3), and so on . Your code must be able to compute the Fibonacci number required. For example, if your function is called with the number 20, it should return the 20 Fibonacci number (i.e. 6765). Similarly, if the function isExplanation / Answer
TITLE Fibonacci (fibonacci.asm) 02 03 06 07 INCLUDE Irvine32.inc 08 .data 09 prev DWORD ? 10 next DWORD ? 11 value DWORD ? 12 count DWORD ? 13 total DWORD ? 14 15 myMessage BYTE "Fibonacci Program",0dh,0ah,0 16 17 .code 18 main PROC 19 mov ecx,12 20 mov value, 1 21 mov prev, -1 22 mov eax, 1 23 L1: 24 mov count,ecx 25 mov ebx, value 26 add ebx, prev 27 mov total, ebx 28 mov ebx, value 29 mov prev, ebx 30 mov eax, total 31 mov value, eax 32 call DumpRegs 33 loop L1 34 35 36 37 38 mov edx,OFFSET myMessage 39 call WriteString 40 41 exit 42 main ENDP 43 44 END main
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.