CPE 315
Professor Stearns
Fall 2004
Lab #8 FAQ

  1. Which instructions access the exception registers?
    mfc0 and mtc0; see page A-37 for example use.

  2. What is an appropriate message?
    It includes some text and the EPC in hex.
    Be sure there is at least one letter in one of your EPCs.

  3. How do I set the command line options in PCSPIM?
    Under Simulator - click settings
    Uncheck: Load Exception File
    Uncheck: Mapped I/O

  4. How do I store bytes into memory?
    Use the sb instruction; it puts one byte into memory.
    e.g. sb $t0,0($a0) puts t0[7-0] into the address pointed to by $a0
    Note: bump $a0 by 1 (not the normal 4) for each store.

  5. How do I call HextoAscii?
    With JAL, nothing else is acceptable.

  6. What is the starting label for the program?
    __start
    See overflowDemo.asm for an example.
    Do not use main.

  7. What is the best way to allocate memory for the string?
    This will allocate 12 bytes - more than enough to hold the string?
    .word 0,0,0


Last updated 11/30/02