Mips count characters in string

Click For Summary
The discussion focuses on how to count characters in a string using MIPS assembly language and display the count in hexadecimal format. Participants emphasize the importance of understanding string termination, character access, and integer storage in memory. They encourage the user to explore MIPS programming examples available online for guidance. While direct assistance in writing the program is not provided, feedback on user-submitted code is welcomed. Overall, the thread serves as a resource for learning MIPS string manipulation and hexadecimal representation.
keo
Messages
1
Reaction score
0
Summary:: Count characterers in a string and display it in hexadecimal

[New user has been reminded to show their work on schoolwork problems]

Hi, how can I do this in MIPS?
Given a string of characters, the program has to count the number of characters in the string, and display it in hexadecimal.
Thank you!
 
Last edited by a moderator:
Physics news on Phys.org
1) Do you know how to count In MIPS?

2) Do you know how to look at each character in a string?

3) Do you know what character marks the end of a string?

4) Do you know about integers and how they are stored in memory?

5) If you look at a stored integer 4-bits at a time you can map it to a hex character.

To help here's a bunch of MIPS programming examples and there are many sites online with further examples. From them, you might methods of counting, accessing string characters, and displaying hex values.

Sadly, though we can't help you write your program, we can critique if you give a version and tell us why it's not working.

https://courses.cs.washington.edu/courses/cse378/03wi/lectures/mips-asm-examples.html
 
Last edited:
Thread 'Why wasn’t gravity included in the potential energy for this problem?'
I’m looking at the attached vibration problem. The solution in the manual includes the spring potential energy but does NOT include the gravitational potential energy of the hanging mass. Can someone explain why gravitational potential energy is not included when deriving the equation of motion? I tried asking ChatGPT but kept going in circles and couldn't figure out. Thanks!

Similar threads

  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 22 ·
Replies
22
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 24 ·
Replies
24
Views
3K
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K