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

  • SEARCH
  • Home
  • 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 178097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:10:18+00:00 2026-05-11T14:10:18+00:00

I am just starting to lean MIPS assembly, and I am trying to write

  • 0

I am just starting to lean MIPS assembly, and I am trying to write a simple while loop. It will be equivilent to the C code:

int A[5];

for(i=0;i<5;i++) A[i]=i;

So I know I can use beq to make a while loop, but I don’t know how to increment the memory address each time to go to the next register. I think maybe the slt operand may be useful, but I don’t know.

  • 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. 2026-05-11T14:10:18+00:00Added an answer on May 11, 2026 at 2:10 pm

    assuming $3 points to A[]

    lis $4 .word 4 lis $5 .word 1 add $7, $4, $5 ;$7 = 5 add $6, $0, $0 ;$6 = 0  loop: sw $6, 0($3) add $3, $4, $3 ;point to next 'int' add $6, $5, $6 ;add 1 to our counter bne $7, $6, loop ;we will stop at 5 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just starting out trying to write a federated claims provider I'm using the
Just starting out, this should be a simple one but I haven't been able
Just starting to poke around iPhone development. I am trying to add an external
Just starting out with C#, so this may be overly simple that I keep
I just starting trying out PhoneGap today. I've heard about it before, and I've
Im just starting getting into Objective-C, i'm trying to sort an array so it
I Just starting out w/ ASP.NET MVC 3 and I am trying to render
Just starting up with iPhone development. I'm not sure why this code works. I've
Just starting out using MVC3 and hit a problem trying to build a drop-down
Just starting android development and trying to create a UI here.. but getting the

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.