Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 743547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:52:36+00:00 2026-05-14T08:52:36+00:00

I’m having problems getting my processor to simulate correctly and I think I’ve narrowed

  • 0

I’m having problems getting my processor to simulate correctly and I think I’ve narrowed it down to the program I’m giving it.

1.  li    $R1, 0
2.  li    $R2, 0x100
3.  li    $R6, 1
4.  li    $R8, 0
5.  li    $R9, 20

6.  lw    $R3, 0($R1)
7.  lw    $R4, 4($R1)
8.  add  $R5, $R3, $R4
9.  srlv    $R5, $R5, $R6
10. sw   $R5, 0($R2)
11. addi    $R1, $R1, 4
12. addi    $R2, $R2, 4
13. addi    $R8, $R8, 1
14. slt     $R7, $R8, $R9
15. bne  $R7, $zero,  -9

It should iterate through the bottom portion 20 times and then exit. I’m particularly unsure about the branch instruction but I can’t find anything wrong with it so : /

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T08:52:36+00:00Added an answer on May 14, 2026 at 8:52 am

    So, you start with R8 as 0 and R9 as 20. Then in step 13 you add one to R8, then set R7 if R8 is less than R9 (which it will be on the first 19 iterations). Then you branch if R7 is set. Loop seems fine to me.

    I don’t recall what bnq does… Doesn’t bne work here?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 381k
  • Answers 381k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer There is not necessarily any relation between a call stack… May 14, 2026 at 10:16 pm
  • Editorial Team
    Editorial Team added an answer You can prevent an element from being selected in most… May 14, 2026 at 10:16 pm
  • Editorial Team
    Editorial Team added an answer i think you should remove pdb files of the project… May 14, 2026 at 10:16 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.