Question: ( 2 ) ( 1 0 points ) Fibonacci Numbers # 5 on page 1 5 0 . Upload source code as Ch 4 _
points Fibonacci Numbers # on page Upload source code as Chasm.
Use dup to create an array of integers.
Must use a loop to calculate the remaining Fibonacci numbers.
Include a screen shot of the memory of the array after the loop completes.
This is what i have so far but the code won't make it past "store new number in array" Im not sure what im doing wrong. It keeps throwing an exception.
; Chasm Find the first fibonacci numbers.
model flat,stdcall
stack
ExitProcess proto,dwExitCode:dword
data
fArr word Dup
code
main proc
mov ecx, ;set up loop counter, we already know the first numbs.
mov si ;bcs of word size starts at third array space
mov fArr ;move h into first array space
mov fArr ;move h into second space. bcs of word size is the second space
lp: mov axfArr si ;fn
mov bxfArr si ;fn
add axbx ;add new number to previous number
mov fArrsi ax ;store new number in the array
add si ;move word size over to the next space
loop lp
invoke ExitProcess,
main endp
end main
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
