•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Assembly section within the Software Development category of DaniWeb, a massive community of 392,099 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 3,831 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:
Views: 744 | Replies: 4
![]() |
•
•
Join Date: Oct 2007
Location: Cherry Hill, NJ
Posts: 1,809
Reputation:
Rep Power: 11
Solved Threads: 184
•
•
Join Date: Nov 2007
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
Sure, if you have enough room. For example, you can store two 8-bit values in a single 16-bit register. (By "string elements" do you mean "characters"?)
A better question, though, is why do you want to do this? It doesn't sound safe.
Thanks for your reply. I am concatenating strings, I have only being using mips these past few days so maybe it is not the best way of going about it.
•
•
Join Date: Oct 2007
Location: Cherry Hill, NJ
Posts: 1,809
Reputation:
Rep Power: 11
Solved Threads: 184
A string is way too large to hold in a single register.
Remember, a register holds the address of a string somewhere else in memory. So to concatenate two strings you need two addresses. Find the end of the target string (by modifying the address to point to the end), then copy the characters from the source addresses to the target addresses.
Hope this helps.
Remember, a register holds the address of a string somewhere else in memory. So to concatenate two strings you need two addresses. Find the end of the target string (by modifying the address to point to the end), then copy the characters from the source addresses to the target addresses.
Hope this helps.
•
•
Join Date: Nov 2007
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
A string is way too large to hold in a single register.
Remember, a register holds the address of a string somewhere else in memory. So to concatenate two strings you need two addresses. Find the end of the target string (by modifying the address to point to the end), then copy the characters from the source addresses to the target addresses.
Hope this helps.
Thanks for your help, I'll give it a go!
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Assembly Marketplace
Similar Threads
- (reformatted) How to return Multi-Dimensional Arrays (C++)
- What relation does **indirection operator have with Multidimensional Arrays (C++)
- Arrays (C++)
- How to Return Multidimensional Arrays (C++)
- C file input/output 2D arrays. (C)
- passing arrays in visual basic (Visual Basic 4 / 5 / 6)
Other Threads in the Assembly Forum
- Previous Thread: incorrect output without DEBUG
- Next Thread: help me with doing this recursively in MIPS



Linear Mode