Questions tagged [qtspim]

QtSpim is a user interface built on the Qt UI framework for Spim, a self-contained simulator that runs MIPS32 programs.

QtSpim is a user interface built on the Qt UI framework for Spim, a self-contained simulator that runs MIPS32 programs.

http://spimsimulator.sourceforge.net/

287 questions
2
votes
1 answer

MIPS bad address/ Exception

The code is a recursive block for calculating the factorial of a number. I am getting an exception at PC (bad address in text). I am taking a look at the trace but am not sure where the problem really is, other than the fact that my PC is showing…
Rahul Krishnan
  • 43
  • 2
  • 11
2
votes
0 answers

Generate random integer in MIPS which compiles with QtSpim

So I've seen a lot of questions on generating random integers in a MIPS program using MARS and syscall 42 and that's ok. The problem is that I need to generate a random integer for a program compiled with QtSpim, which has no syscall for 42 or…
Ion Farima
  • 309
  • 1
  • 4
  • 12
2
votes
0 answers

QtSpim syntax error with .byte

Every assembly mips source with a .byte declaration displays a syntax error. I must use, for given indications, .byte to declare variable and arrays of integer. Il I replace .byte instrunction with .word there isn't problems, but I need to use…
azkidenz
  • 53
  • 1
  • 6
2
votes
1 answer

Finding out number of vowels in given string in MIPS

I have to write a program to count the number of vowels in a string in MIPS. My current code is giving me a memory out of bounds error in QtSPim. I'm at the beginner level in MIPS, so any help would be appreciated. Code so far: .data str:…
Emaan Hasan
  • 21
  • 1
  • 2
2
votes
1 answer

MIPS questions about writing assembly to call functions on an array

I currently am taking a course in assembly and am having trouble with the following assignment. Write a program that reads (with an appropriate prompt) a sequence of 20 integers and stores them in an array, and then calls the following three…
Derek Mei
  • 345
  • 1
  • 3
  • 9
2
votes
1 answer

MIPS function with multiple arguments

I know how to make a function in MIPS that takes in 4 arguments because I know I can just put the arguments into the registers $a0-$a3. But suppose you want more than 4 arguments, how do you get around the fact that there is only 4 argument…
Struggling
  • 51
  • 2
  • 11
2
votes
1 answer

Declaring an array at a specific memory address in MIPS

How can I declare an array at memory location 100(Decimal) in a MIPS program?
Pranav
  • 107
  • 2
  • 11
2
votes
1 answer

Does MIPS polling work in QtSpim? (spim simulator)

This is the school homework. I was asked to write a I/O mapping program in assembly. I am stuck at level 1 where i simply read from keyboard and write to monitor using polling method.…
william
  • 7,284
  • 19
  • 66
  • 106
2
votes
1 answer

MIPS print float syscall only prints zero

I have a very unusual problem that I can't figure out, and couldn't find a solution anywhere. I have written a code for calculating exponentiation of floating point numbers in MIPS. The Algorithm works fine but in the end when the syscall should…
Taha Rushain
  • 635
  • 1
  • 9
  • 26
2
votes
1 answer

How to declare string variable in assembly?

How can I declare a string variable without initialization in MIPS assembly? And then it receives an amount from the user. For example: string judge;
Amin
  • 241
  • 2
  • 11
2
votes
2 answers

Printing the x char in a string (MIPS)

My program is supposed to do the following: -Getting continiously an integer from the user (x), -printing the character at the x position in the string. -The program exits when the user inputs 0. .text .globl __start __start: li…
Trojax
  • 25
  • 1
  • 1
  • 6
2
votes
1 answer

“Unaligned address in store” error when saving a word

I'm writing a program in assembly that takes one character of user input at a time and inserts it into an alphabetized string using recursion. I've been staring at this for a long time now, but it still seems like it should work. Some other eyes on…
2
votes
1 answer

How do I convert Mips pseudo-instructions?

I was asked to write a program in mips assembly language to perform some basic arithmetic such as converting a temperature in Celsius to Fahrenheit. I ended up receiving a poor grade on this assignment because I used pseudo-instructions. I was…
user3657834
  • 249
  • 4
  • 9
  • 21
2
votes
2 answers

Least significant bit mips

How can i change least significant bit in a register in Mips? In another post How to get LSB bit in MIPS? it saws how to get it but i want to change it.
konsalex
  • 425
  • 5
  • 15
2
votes
1 answer

When reading file in MIPS, it reads last line twice

I was able to (partly) successfully read in a file in MIPs. Below is my current code. In QtSpim, when I run it, I get a pointer to the file in $a1, but the last few characters of the file are repeated twice. The number of characters that is repeated…
user2549327
1
2
3
19 20