Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Intelx86 assemebly language program .386 .model flat .code start PROC ; this is a comment - code starts here ; this is a comment -

Intelx86 assemebly language program

.386

.model flat

.code

start PROC

; this is a comment - code starts here

; this is a comment - code ends here

ret

start endp

end start

image text in transcribed
1 are already familiar with the Fibbonaci Sequence and how to calculate the nth number: 0,1,1,2,3,5,8,13 The sequence starts with the starting numbers 0 and 1 ; each succeeding number is simply the sum of the previous two numbers. In class, I demonstrated a program that calculated the nth Fibonacci number. It had two variables under the data section called nlterations which was initialized to an integer that we would like n to be, and nthFibNumber which was initialized to 0, but later set to contain the nth Fibonacci number. It utilized a loop called fibloop that stored n/ terations in ecx and decremented in each iteration. Once ecx reached zero, it exited the loop. Modify this program in the following way: - Rather than using 0 and 1 as startring numbers, declare your own custom numbers to construct your own Fibonacci sequence. In the data section, declare two seed numbers called seedZero and seedOne that can be set to any integer. a. Copy-paste the code that you've written into this section: b. Test your program by setting seedZero and seedOne to 5 and 7 respectively. Also set nlterations to 8 to signify that you are retrieving the nth custom Fibonacci number. Add a breakpoint to debug (as we've done in video) and examine the registers to ensure that the correct value is being placed in nthFibNumber. Take a screenshot of the registers and place it here

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions