banner



How To Set A Register To A Value In Mips

Easy fashion to clear registers in mips assembly?

  • Thread starter TGCid
  • Start appointment
  • #1
This is my outset time experience with mips assembly. I am using spim. We are doing the program where after some manipulation, the programme loops back to the beginning unless a quit command is given. My trouble is that I don't know what registers I messed with but later on the 1st loop, some weird behaviors would occur. I think information technology is the error of the registers non being reset. How would yous reset all the registers dorsum to the way it was when y'all first run the code? Thanks.
  • #2
Ummm, copy all the values in the registers into the stack before modifying them. Technically, the only ones y'all need to copy are the caller-saved ones, but practically there is no difference. When you need to recall the values just read them from the stack.
her209
  • #4
Brings back bad memories of my Bone class.
  • #5
Originally posted past: Marty
Ummm, copy all the values in the registers into the stack before modifying them. Technically, the just ones yous need to copy are the caller-saved ones, but practically there is no divergence. When y'all need to recall the values only read them from the stack.
What he said. I don't have any experience with MIPS; at our schoolhouse, CPE'south use MIPS, and EE's programme for the MC68000. But from what you've described, it seems comparable (the only difference I can remember is, I believe, MIPS has more address registers than the 68.
  • #half dozen
this is totally off topic but maybe this isn't the right forum for this ;)
  • Advertising
  • Cookies Policies
  • Privacy
  • Term & Conditions
  • About us

How To Set A Register To A Value In Mips,

Source: https://forums.anandtech.com/threads/easy-way-to-clear-registers-in-mips-assembly.985558/

Posted by: acostaeyseld.blogspot.com

0 Response to "How To Set A Register To A Value In Mips"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel