We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.

www.vustudents.ning.com

 www.bit.ly/vucodes + Link For Assignments, GDBs & Online Quizzes Solution www.bit.ly/papersvu + Link For Past Papers, Solved MCQs, Short Notes & More

please discuss and solve this assignment    It is tough because , I got same solution of assignment no 1 replace of assignment 2 ....So discuss it seriously and Solve this problem...Thanks

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

Views: 7412

Attachments:

### Replies to This Discussion

Koi idea share kr do

Here is the Complete Solution of CS401 assignment:

https://youtu.be/4FiugHhilNI

Ye assignment 1 ka solution hai.

2 ka nahi

; This is recursive Fibonacci series plz add it into your code area.
Fibonacci proc

PUSH BP ; save previous frame pointer

MOV BP, SP ; set current frame pointer &n sp;

MOV AX, [BP+8] ; get argument N

CMP AX, 1 ; N&lt;=1?

JA Recurse ; no, compute it recursively

MOV CX, 1 ; yes, Fib(1)--&gt; 1

JMP exit

Recurse:

DEC AX ; = N-1

MOV DX, AX ; = N-1

PUSH DX ; save N-1

PUSH AX ; set argument = N-1

CALL Fibonacci ; compute Fib(N-1) to

POP AX ; pop N-1

DEC AX ; = N-2

PUSH CX ; save Fib(N-1)

PUSH AX ; set argument = N-2

CALL Fibonacci ; compute Fib(N-2) to

POP AX ; = Fib(N-1)

ADD CX, AX ; = Fib(N-1)+FIB(N-2)

exit:

MOV SP, BP ; reset stack to value at function entry

POP BP ; restore caller&apos;s frame pointer
RET ; and return

This is not assignmnet 2 please discuss of assignment 2 idea please, assignment 2 of Computer Architecture and Assembly Language Programming– CS401 is attached.

Question: [15 Marks]
Write a program using a recursive function to calculate the Fibonacci of the last digit of your VU roll number,
i.e. If you roll number is BC123456789 you will calculate the Fibonacci of 9. The calculated Fibonacci
number is stored in the AX register.
Fibonacci(0) = 0
Fibonacci(1) = 1
Fibonacci(n) = Fibonacci(n-1)+ Fibonacci(n+2)
Source:- https://en.wikipedia.org/wiki/Fibonacci_number
Explain each instruction of program with comments and also provide/paste snapshot of your assembled and
debugged program result which will be run in AFD (A Full Screen Debugger) window showing the executed
code and final result i.e. value in AX.
Note: You will only use subroutine to solve the above problem. Marks will not be awarded for using any
other approach.
Note 1: keep name of assembly file according to your VU id , i.e. if your VU id is BC123456789 , you will
keep name of the assembly code file as 23456789.asm i.e. you will use last 8 digits of your id for the code
file name.
Note 2: If the arrays, files names in the screen shots will not be according to your VU id you will get zero
marks.
Note 3: In solution file you will write the assembly code and paste two screen shots.
Note 4: You will only use NASM assembler and AFD debugger only.
Example Run
1) First screen shot will be shown as below according to your VU Id
2) Your final screen shot AX will contain the value of Fab(last digit of your id) ,

Attachments:

Dear Fellows,

All of you are requested, Please post Only One Discussion for Current Assignment/GDB/Online Quiz and everyone reply/share/discussed his/her data on that same discussion, so that all members get solution & discuss easily on Current Assignment/GDB/Online Quiz.

So please don’t post two or more discussions for one Current Assignment/GDB/Online Quiz, hope you’ll understand and cooperate with us.

plaese upload here assignment No 2

This is the solution for the assignment # 1 .....

Here is assignment # 2 Solution file..

any one doubt then clear me..

Attachments:

is it correct solution?

## Latest Activity

48 minutes ago
50 minutes ago
50 minutes ago
52 minutes ago
1 hour ago
Muhammad Bilal liked +++ Aman Chaudhry +++'s discussion Jeena parta Hai...
1 hour ago

1

2

3

## HELP SUPPORT

This is a member-supported website. Your contribution is greatly appreciated!