FindPrimes Assembly Debugging

Overview

In this lab you'll analyze and debug Prg6.s which is a buggy assembly version of Prg6.c, the FindPrimes program

Steps

  1. Read through Prg6.c, to be sure you understand how it works.

  2. Go through Prg6.s, and get a general feel for how it relates to the C file. Look up any opcodes you see that haven't been covered in lecture yet.

  3. Fix Prg6.s so that it works properly (like the directly compiled Prg6.c).

    1. There are 8 bugs
    2. Each can be fixed with very minor changes. You may change at most 15 characters in the entire program.
    3. Do not generate a new Prg6.s from Prg6.c. You'll find the result is quite different from the Prg6.s you've been given anyway.
  4. Get an OK from me or an LA, and then submit your fixed Prg6.s

Hints and Notes