•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Assembly section within the Software Development category of DaniWeb, a massive community of 426,901 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,381 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Assembly advertiser: Programming Forums
Views: 4403 | Replies: 2
![]() |
•
•
Join Date: Oct 2004
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
Alright, I got this assembler class, and we're doing mips, and such.
Anyway, I got this problem, see.
I have to read in a number in binary (sign magnitude), convert it to decimal, then convert that to a string of ascii characters, and then print them out, with a - sign if necessary.
The only thing I have problems with is printing them out.
Say I've made a character, on the stack.
Say it's
0x33000000
ASCII, 3<null><null><null>
So it would print 3, then stop (when it hits null)
However!
I have to load an ADDRESS into $a0 to print a string.
How do I load the address of a register??
Say I have my string in $t6. I want to print that string, which is basically one ascii character, from 0-9 (maybe -), then three null characters.
How do I load the ADDRESS and not the VALUE of $t6 into $a0.
(I can't use labels)
I bet it's simple... I hope...
Anyway, I got this problem, see.
I have to read in a number in binary (sign magnitude), convert it to decimal, then convert that to a string of ascii characters, and then print them out, with a - sign if necessary.
The only thing I have problems with is printing them out.
Say I've made a character, on the stack.
Say it's
0x33000000
ASCII, 3<null><null><null>
So it would print 3, then stop (when it hits null)
However!
I have to load an ADDRESS into $a0 to print a string.
How do I load the address of a register??
Say I have my string in $t6. I want to print that string, which is basically one ascii character, from 0-9 (maybe -), then three null characters.
How do I load the ADDRESS and not the VALUE of $t6 into $a0.
(I can't use labels)
I bet it's simple... I hope...
•
•
Join Date: Jun 2004
Location: Marin, CA, USA
Posts: 434
Reputation:
Rep Power: 5
Solved Threads: 9
![]() |
•
•
•
•
•
•
•
•
DaniWeb Assembly Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Converting C to MIPS(SPIM) (Assembly)
- Optimizing MIPS in SPIM (Assembly)
- Please Helppp..i Really Need To Pass The Coursework.its Due Soon (Java)
- MIPS language question pls help.. (Assembly)
- setting the number of decimal points in double varibale (C)
- Want to know about Mac (Mac Rumors and Reports)
Other Threads in the Assembly Forum
- Next Thread: __int64 Addition with MSVC60 asm


Linear Mode