I'm writing a project that's described here:
http://inst.eecs.berkeley.edu/~cs61cl/fa09/projects/proj2.html
Basically I parse through the *format string and when I see format specifiers like "%x" I insert the correct value that's part of the argument. I'm not sure how to start on this. More specifically, I don't understand how to write to a string buffer.
In the snprintf.s file they provide, they give me a line
buffer: .space 200
so I understand to load the address in say a register $a0, but then what do I do after? Is it a syscall? how would I keep track of where I'm supposed to write to, since I'm passing a string buffer pointer to smaller functions to write the values in.
Also I'm wondering if anyone has ideas on how to parse through the string, would I be reading character by character? (byte by byte) If so, how would I recognize the format specifiers? (%x)
Thanks in advance!