Question: Assembly Language Lab1_Ex2.asm 9 sum 1 ;Assembly example 2 3.586 4 MODEL FLAT 5.STACK 4096 ; reserve 4KB stack 6 7 .DATA i reserve storage

Assembly Language

Lab1_Ex2.asm
9 sum 1 ;Assembly example 2 3.586 4 MODEL FLAT 5.STACK 4096 ; reserve 4KB stack 6 7 .DATA i reserve storage for data 8 number DWORD -107 DWORD? 10 11 . CODE 12 mainCRTStartup PROC 13 start: 14 mov eax, number; place number in EAX 15 add eax, 160 ; add 160 to number 16 mov sum, eax ; sum to memory 17 18 mov 19 ret 20 mainCRTStartup ENDP 21 22 END 23 24 eax, 0 Exercise 1: 1- What is the type of statement is line 1? 2- What is the type of statement is line 7? 3- What is the type of statement is line 15? Exercise 2: Download Lab1_Ex2.asm code from the Blackboard. Using the debugger: Place a breakpoint in line 25 and fill the values in the below table each time the break point is hit. EAX ECX EDX 1/2 ;Assembly Lab 1 ; Calculation of Fibonacci numbers .586 . MODEL FLAT .STACK 4096 s reserve 4KB stack ; reserve storage for data .DATA previous current number DWORD - 105 DWORD ? DWORD 8 ; the Fibonacci term to calculate CODE mainCRTStartup PROC start: mov ecx, number mov eax, 1 mov previous, o mov current,o L1: add eax,previous mov edx, current mov previous, edx mov current, eax loop 11 ret mainCRTStartup ENDP ; eax = current + previous ; previous = current END
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
