Computer Science 251
Computer Organization and Architecture

Dickinson College
Fall Semester 2005
Grant Braught

Class #10 - Assembly Language Programming Exercises

Main Ideas For Today

In Class Exercises For Today

  1. Write an assembly language program that performs the same task as the following HLL code:

  2. Write an assembly language program that reads a number in from STDIN and writes its complement (i.e. -1 times the number) out to STDOUT.

  3. Write an assembly language program that is equivalent to the following HLL program:

  4. Write an assembly language program that is equivalent to the following HLL program:

  5. Write an assembly language program that reads a value from STDIN and then displays on STDOUT all Fibonacci numbers less than or equal to the specified value. Recall that each Fibonacci number is found by adding the two previous Fibonacci numbers and that the first two Fibonacci numbers are 1 by definition. So the first several Fibonacci numbers are 1, 1, 2, 3, 5, 8, 13, etc...