Testing Your SPIM Stack Routines

Tom Kelliher, CS 220

Oct. 3, 2007

Follow these instructions.

  1. Login to phoenix and cd to the directory where you stack routines file is.

  2. Assuming your stack routines are in the file project.spim, execute the command
    cat ~kelliher/pub/cs220/testStack.spim project.spim > testStack.spim
    
    (Notes: Change project.spim to the appropriate file name for you. If your routines are already in the file testStack.spim, use the mv command to rename your routines file.)

  3. Open testStack.spim in an editor and perform any editing that might be necessary.

  4. Run the program:
    spim -file testStack.spim
    
    Hopefully, all tests will pass. If not, using the error message printed and the test program itself (it's pretty well commented), fix the broken routine. (Note: Two of the tests require un-commenting and then re-commenting three lines.)



Thomas P. Kelliher 2007-10-03
Tom Kelliher