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 6880053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:55:31+00:00 2026-05-27T04:55:31+00:00

In MIPS, the la instruction translates into lui and ori . However, MARS Simulator

  • 0

In MIPS, the la instruction translates into lui and ori. However, MARS Simulator does not seem to do that at all. When I dump the following machine code:

.text
    la $a0, array
    la $a1, array_size
    lw $a1, 0($a1)

.data
    array: .word 0:10
    array_size: .word 10
    message: .asciiz "The sum of numbers in array is: "

I get:

00100000000001000010000000000000
00100000000001010010000000101000
10001100101001010000000000000000

Which is obviously. It is dumping la as one instruction. What does MARS do? How can I make it interpret la as lui and ori?

Thank you,

  • 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-27T04:55:31+00:00Added an answer on May 27, 2026 at 4:55 am

    What’s happening here is that your assembler is compiling these las as addi $<dest>, $0, <value>. The two-instruction sequence is only required for values which can’t be represented in a 16-bit immediate; the values you’re using here look like 0x2000 and 0x2028, so they fit in a single instruction.

    How can I make it interpret la as lui and ori?

    Load bigger constants. :) Your assembler might also have an option to force the use of the full sequence even when it’s unnecessary.

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

Sidebar

Related Questions

As you all might know that the MIPS instruction set supports clz (count leading
I don't have a syscall code in my MIPS instruction, however in the simulator
Is there some instruction in MIPS that will determine the parity of a certain
I'm using MARS MIPS simulator and using the Digital Lab Sim. The purpose of
I am running the following MIPS code in MARS simulator: add $t0, $zero, $zero
I'm trying to debug my c# application that check MIPS syntax. But its not
what does the instruction clear $t0 perform in MIPS?I mean what is the actual
I'm working with binary MIPS instructions and I found this helpful document . However,
I'm writing a MIPS assembly code that will ask the user for the file
Trying to convert this c code into MIPS and run it in SPIM. int

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.