SPIM print ascii char

313 views Asked by At

I have to write a little program in assembly for the MIPS architecture. To be more specific it should be a procedure which takes a register and prints the value of it. It is allowed to use everything excepted a call of print_int. My procedure does: 1. Split up the given register into digits 2. Convert them into ascii 3. Store them on the stack I now have values like 52 or 53 on the stack and I want to print them with print_string but how can I achieve this? Thanks for your help.

1

There are 1 answers

0
Sep Roland On BEST ANSWER

You write 3. Store them on the stack. Since you are allowed to use everything excepted a call of print_int why don't you store them in succesive memory bytes before using print_string to ouput the result.