CPE 315
Professor Stearns
Winter 2008
Lab #5 FAQ

  1. Which instructions access the exception registers?
    mfc0 and mtc0; see page A-37 for example use.
    Note: $13 accesses Cause; $14 accesses EPC

  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 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.

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

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

  6. 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 2/22/08