Testing Your SPIM Stack Routines

CS 220

Dec. 5, 1997

Follow these instructions.

  1. Login to phoenix and cd to the directory where you stack routines files 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 the editor and perform any editing that might be necessary. In particular, add your name as a comment at the top of the file.

  4. Print the test program:
    lpr testStack.spim
    
    The file will print in Hoffberger Lab.

  5. 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
Thu Dec 4 10:36:13 EST 1997
Tom Kelliher