CPE 315
Professor Stearns
Fall 2004
Lab #8 FAQ
- Which instructions access the exception registers?
mfc0 and mtc0; see page A-37 for example use.
- 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 set the command line options in PCSPIM?
Under Simulator - click settings
Uncheck: Load Exception File
Uncheck: Mapped I/O
- 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 11/30/02