CPE 315
Professor Stearns
Winter 2008
Lab #5 FAQ
- Which instructions access the exception registers?
mfc0 and mtc0; see page A-37 for example use.
Note: $13 accesses Cause; $14 accesses EPC
- 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.
- 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.
- How do I call HextoAscii?
With JAL, nothing else is acceptable.
- What is the starting label for the program?
__start
See overflowDemo.asm for an example.
Do not use main.
- 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