253 assignment: FIBBY

FIBBY.asm

Come to class as there may be corrections, changes and additions.   Substantial accumulating late penalty.

  • Create an assembly project using emu8086
  • Submit a folder callled "FIBBY" (zipped) to D2L
  • Call the source file FIBBY.asm.
  • Follow these directions to SUBMIT a zipped folder
  • Grading Sheet.

  • Prompt and get a number from the user. Calculate and display the requested number of numbers in the fibonacci sequence (0, 1, 1, 2, 3, 5, 8, 13, 21 ...). Instructions to use may include: mov add inc sub dec xchg Use a loop: loop (cx register) [extra] Create and use a procedure: proc ret endp call The number of numbers, n, will be specified by the user. (emu library)(assume 50 >= n >= 3) scan_num Use the emu library from inside the loop to display each number. See the emu8086 library tutorial printn print_num print_num_uns
    Example: How many fibonacci numbers would you like to see? 12 First 12 fibonacci numbers are: 0 1 1 2 3 5 8 13 21 34 55 89 Note: Numbers should be calculated and not just stored and displayed! Note: You MAY simply print 0 and 1 to start the process.
    In comments answer these questions: 1. What's the biggest fibonacci # that can be stored in 16 bits unsigned? How do you know you've gotten the largest number? EXPLAIN! 2. What's the biggest fibonacci # that can be stored in 16 bits signed? How do you know you've gotten the largest number? EXPLAIN!
    ; ID: Joseph Wyatt, CIS 253 Section x, Fall ; PURPOSE: Write a program that uses a loop to calculate the requested ; number of values in the Fibonacci number sequence. ; ; DESIGN: ; ; algorithm here ; ; new <- second + first ; second becomes first , new becomes second ; repeat ; PS: there is an interesting instruction called "XCHG" Include comments and use well-named variables. Severe late penalty per class