Use this tag for questions related to the 32 bits version of the MIPS architecture instruction set. See also [tag:MIPS].
Questions tagged [mips32]
632 questions
0
votes
2 answers
Loading integers larger than 32-bits in MIPS assembly
I am working on a school project (if you couldn't figure that out just by the fact that I'm using MIPS and QTSpim), and my group chose to make a calculator for large (128-bit) numbers. We know how to do operations on 128-bit numbers, but what we're…

Michelle
- 663
- 1
- 8
- 17
-1
votes
1 answer
fibonacci sequence in mips assembly
So, I have been trying for two days to write a program in mips assembly to exercise for my exams in a few days but yeah, my brain keeps lagging and I don't understand how it should work and what I should do, very confusing. All the versions of the…

mariajuana
- 1
- 3
-1
votes
1 answer
How would I write a MIPS behavioral simulator for the machine code created using the assembler code provided?
This MIPS simulator will read in a text file consisting of LC3100 machine code instructions (represented as decimal values), and execute the program, then display the values of register files and memory after each instruction is completed.
I do not…
-1
votes
1 answer
MIPS move command
I am new to MIPS so wanted to know if the move command removes the value from the original register in which it was stored?
For eg. move $t1, $v0
Value in $vo will be copied or entirely moved to $t1?

Vg135
- 1
- 1
-1
votes
2 answers
What is happening here in this divu with three operands?
I have the following line in a C code
i = low + (1664525*(unsigned)high + 22695477*(unsigned)low) % (high-low+1);
The code in MIPS that I have for this line is as follows
lw $3,40($fp)
li $2,1638400 # 0x190000
ori …

user202004
- 151
- 8
-1
votes
1 answer
Is my MIPS32 code to assign values input by the user to array elements correct?
I am writing a MIPS code for quicksort, and as a part of it, I need to write a main function that will first take an integer input from the user, N, which is the number of elements the user wishes to enter, and then it will ask the user for the…

user202004
- 151
- 8
-1
votes
1 answer
MIPS Hexadecimal Number to Binary
I am attempting to convert the number 0x20014924 to a binary number. I am getting an unexpected binary readout:
0000 0001 0011 0001 0110 0111 0100 1100 actual output
0010 0000 0000 0001 0100 1001 0010 0100 expected output.
Any suggestions on…

Carl Sullivan
- 1
- 1
-1
votes
1 answer
Load ARM (MIPS-MIPS32) Linux filesystem on VMware?
I have a Linux firmware for the MIPS architecture. Would it be possible to load up a firmware image like this in VMWare?
I am trying to get into reverse-engineering, but have hit a wall.
Here is the binwalk output:
8212 0x2014 …

nigel239
- 1,485
- 1
- 3
- 23
-1
votes
1 answer
Can someone explain these questions on shifting right arithmetic or shifting left logical?
This was on an exam and I'll admit that I had no idea what was going on, shifts weren't discussed prior to the exam. They're both starting in hexadecimal and then the instructions shift one to the left logical and the other to the right arithmetic.…
user16951674
-1
votes
1 answer
MIPS Assembly Program Syntax Mistake
I'm writing a MIPS program for enter a number and print N, N-1, N-2, ..., 1 on MARS 4.5
My code look have right logic but syntax is quite weak.
The problem is program not working:
Input: 3
Expected: 321
Actual: "-- program is finished running…

Tu Le Anh
- 91
- 1
- 7
-1
votes
3 answers
How do I read a value from an array from memory and then increment the counter in MIPS?
So I am writing a piece of code that prints out elements of an array within a for loop.
The C version of this code looks like this:
for(i=0; i

Ishaan Aggarwal
- 15
- 3
-1
votes
1 answer
MIPS-32 Opcode Format: Uppercase or Lowercase?
I'm currently taking a course in computer organization and I've been studying MIPS-32 architecture. I've noticed that the book we use lists the Opcodes all in lowercase, whereas the Professor lists the Opcodes all in uppercase. I looked this up on…

Chronollo
- 322
- 1
- 9
-1
votes
1 answer
Is there any way to create a counter by self-modifying in MIPS?
I want to create a subroutine like this:
first time call: return 0
second time call: return 1
third time call: return 2
...
but we should not use register and memory to save the current number. we have to solve this by changing the code…

mh hssoleyman
- 1
- 3
-1
votes
1 answer
What does %call16 and .reloc mean in mips?
I have converted a c code into mips32 using gcc compiler but there are some parts that I did not understand.
This is c code:
int main()
{
float fibSquared;
int F[10] = {0};
F[0] = 0;
F[1] = 1;
for(int i = 2; i < 10 ; i++)
F[i] = F[i-1] +…

GAM
- 57
- 1
- 4
-1
votes
1 answer
Substring question on mips assembly language
Please help as soon as possible...
Write a MIPS assembly language program that prompts the user to input two strings (each should be no longer than 50 characters including the null terminator). Your program should determine whether the second string…