UT PCSpim - Fall '97 - this file is constantly
updated.
The template file provides a basic format for writing MIPS assembly
programs. Some example files adapted from the Maccabe text Computer
Systems are provided below.
NEWS
- 12/04/97: For external interrupts, the cause register is (always/sometimes?)
100 for input and 200 for output. Our exception handler does not currently deal
with these values.
- 12/03/97: User's Manual documentation error in the example that goes with the SLE
instruction. Note, that the SLE instruction's definition is correct.
- 12/1/97: Here's the Exam2 MIPS reference
card
- 12/01/97: How to debug your error/break exception handler without setting
a breakpoint in an exception handler. (explanation)
Note that the exception handler cannot handle an interrupt after a branch
instruction. (duplicated from the newsgroup).
- 10/31/97: Bug in the display of SP: See my explanation
(duplicated from the newsgroup).
- 10/27/97: if you ever get a dialog box when "opening" the
file, indicating a parser syntax error on the last line of your source
file, then just add a carriage return to that line. (Hint: that's one of
the reasons we provided you with a template file.)
- 10/23/97: User's Manual documentation error for both the readhex and
printhex. See correction.
- 10/22/97: Advice: be sure that whenever you run a program, that you
check the messages window to verify that the following line is included:
"loaded C:\PROGRA~1\PCSPIM\trap.handler". If you do not have
the trap.handler file loaded, your program will not run. (Depending upon
whether you followed the installation instructions, you may have to manually
copy the trap.handler file into the directory you are using for PCSPIM.)
- 10/16/97: If you get an error where your PC = 00000000, then it's a
user error and easily solvable. See my explanation
(duplicated from the newsgroup).
- 10/14/97: NO, there is no editor in PCSPIM. It is NOT an integrated
development environment. The user's manual advises you to have 2 windows
open: the notepad window(save the file with a .asm extension) and the PCSPIM
window.... I just use the taskbar (at the bottom of the screen) to switch
between windows, and do not "minimize" either.
- 10/13/97 UT's PCSPIM requires lower case for assembler directive names
and instruction mnemonics!
- 10/8/97 The UT version of PCSPIM User's Manual is at the Student Union
University Duplicating office for $2.47 plus tax. (I expect you to use
this. It has installation instructions, complete reference, advice on how
to run a program, etc.)
The installation file should be downloaded and set up using the procedures
described in the installation instructions for UTSpim.
Installation Instructions - Chapter
3 of the UT PCSPIM User's Manual
Example assembly files
Chapter 5 Examples
- ex5-19.asm
- Calculates the length of a NULL terminated string
- ex5-23.asm
- Increments age field of structure with index i
Chapter 6 Examples
- ex6-5.asm
- Implements subroutine to calculate string length
- ex6-7.asm
- Implements "strange" subroutine, using value/result parameter
passing
- ex6-9.asm
- Implements "strange" subroutine, using pass-by-reference for
first parameter
- ex6-17.asm
- Implements "strange" subroutine, by passing parameters on stack
- ex6-19.asm
- Code fragment for call to "strange" using current stack frame
- ex6-20.asm
- Code fragment for call to "strange" using frame pointer
- ex6-21.asm
- Implements "strange" subroutine, by saving and restoring stack
pointer
Technical Problems and Bug Reports
If technical problems regarding installation or execution of UT's PCSpim
are encountered, please report them to dragon@cs.utexas.edu.
Include version of UT PCSpim (see the last 2 lines on the "About PCSPIM
dialog box"), the platform on which it is being run, and the nature
of the problem. Please include "UT-PCSpim problem" on the subject
line of email.
Or if you have suggestions for future changes to UT PCSPIM, send
them to me as well: "UT-PCSPIM suggestion".