Question: Need help Asap on . fibonacci loop asm file keep getting an undefined symbol Error for FirstN edit code please also show proof that the
Need help Asap on fibonacci loop asm file keep getting an undefined symbol Error for FirstN edit code please also show proof that the program is working. INCLUDE C:IrvineIrvineinc
data
welcome BYTE
CSC Project : Fibonacci Numbers Again
Author: Jack
Hello, user! Lets Write some Fibonacci Numbers.
tell me when to stop! OK
prompt BYTE "What number you want to stop at
Num BYTE
;hello Byte "HELLO",
n DWORD ; first variable, used in calculations n
n DWORD ; second variable
message BYTE
code
main PROC ; start of the MAIN prodecure
mov edx, OFFSET welcome ; mov address of prompt into edx
call WriteString ; call proc to write out what is pointed to by edx
CALL CRLF ; printout a new line
CALL CRLF ; printout a new line
mov edx, OFFSET prompt ; mov address of prompt into edx
call WriteString ; call proc to write out what is pointed to by edx
call ReadDec ; user vale is put into eax
mov Num, al ; mov lowest bits in to Num BYTE
mov ecx, ; zero out the whole ecx register
mov cl Num ; move lower bits of eax into lower bits of ecx
mov cl al ; store given value in Num
mov al Num ; number of times to go through loop loop loops at ecx DWORD
mov edx, OFFSET FirstN ; mov address of prompt into edx
call WriteString ; call proc to write out what is pointed to by edx
TOPOFLOOP: ; start of loop
mov eax, ecx ; copy loop counter to eax never change ecx in loop
;
mov eax, n ; mov first value into eax
call writeDec ; write out loop value of loop counter
mov eax, n ; eax n
add eax, n ; eax n n n calcuate the rd value new send value
mov ebx n ; save ns value in register
mov n ebx ; save ns value into nnew first value
mov n eax ; new n n
mov n ebx ; new n old n
;
mov edx, OFFSET message ; mov address of prompt into edx
call WriteString ; call proc to write out what is pointed to by edx
loop TOPOFLOOP ; go to topofloop if and only if ecx
; the loop instructionautomatically decrements ecx
CALL CRLF
CALL CRLF
exit ; Exit to the operating system
main ENDP ; end of MAIN procedure
END main ; program tell MASM to execute start the MAIN procedure
EXIT
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
