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
0
votes
1 answer

Using QtSpim on OSX, MIPS error: "unknown character" for simple ascii declaration

I am taking my first ever Architecture class and I was given the snippet below of code to test and learn. Unfortunately, when I run the darn thing I get this error message: spim: (parser) Unknown character on line 2 of file…
mklemos
  • 69
  • 1
  • 7
0
votes
0 answers

Accessing the x number of characters in a string (MIPS)

I have this code: .text .globl __start __start:li $v0,8 li $a1,20 la $a0,str syscall print_str:li $v0,4 syscall print_endl:la $a0,Endl syscall la $a0,str sb $zero,5($a0) # <--------- # print_5chars: syscall Exit:li $v0,10 …
Trojax
  • 25
  • 1
  • 1
  • 6
0
votes
0 answers

Running on MARS but not running on Qtspim

I have a problem I made a university project on MARS and it runs ok, but our teacher told us that the program must run on QTSPIM,so my question is where are the errors that don't allow my program to run on QTspim? The errors are "exception occured…
0
votes
1 answer

Copy array elements to another array in MIPS assembly

i have to make a program that fills an array with 30 integers entered from keyboard.Then the user type 'c' to copy the array to an other array.i've done with the first step but i cant manage to copy the array to another. Here is my code …
Antonis sinotnA
  • 23
  • 1
  • 10
0
votes
0 answers

MIPS User Entered Float Value

I am trying to write a MIPS program that takes a user entered float value in degrees Fahrenheit and convert it to degrees Celsius. However, I'm having a difficult time finding the user entered float. My code up to the float read: .data getDegreesF:…
Blackwell
  • 85
  • 2
  • 10
0
votes
1 answer

MIPS "spim: (parser) syntax error"

I'm building a program on MIPS for checking if the column of a matrix is ordered in a increasing way, in a decreasing way, if all it's numbers are equal or if it's disordered. Here's the code: # #include # int m; int n; # int M[m][n]; #…
0
votes
1 answer

decimal to binary in assembly mips

I am trying to convert a decimal number to a binary number. I want to store the modulus in an array and then print the result. The result must be printed backwards. This is my code so far. When it runs, a message appears saying unaligned…
mitsos
  • 1
  • 1
  • 2
  • 3
0
votes
1 answer

read and sum array of integers in assembly

.data prompt1: .asciiz "\n\n Enter an integer please:" array: .space 24 linefeed: .asciiz "\n" enterkey: .asciiz "Press any key to end program." .text main: li $s0, 0 for: bge $s0, 6, end_for li $v0, 4 #syscall to print string la…
mitsos
  • 1
  • 1
  • 2
  • 3
0
votes
1 answer

How to add an argument in MIPS assembly?

So I have written a simple program for my comp arch class in MIPS assembly. We are now required to enhance this program so that it takes two arguments. If the arguments are both the same then the answer should be the same as that of the original…
0
votes
1 answer

MIPS Dynamic Array Error

I'm trying to allocate a dynamic array and get it to accept input from the console, but once I start entering a few of the numbers into the array it says there is an Exception 7 error. (Bad Data Address) Here is the code I use before running the…
rollerz
  • 25
  • 8
0
votes
0 answers

Add some control instructions for a mips program

I wrote a very simple program for mips that counts how many times a default word (in this case the word is "esame") appears in a default phrase that is "Esame: Programma di riconoscimento parole, realizzato per l'esame orale di calcolatori…
Riccardo
  • 289
  • 2
  • 5
  • 17
0
votes
1 answer

How to get the address of a second string in Qtspim?

.text .globl main main: ori $v0,4 #code 4 == print string lui $a0,0x1001 #$a0 == address of the string syscall ori $v0, 10 #code 10 = exit the program syscall .data string: .asciiz …
0
votes
1 answer

Java to mips assembly exercise

I have an assignment where my goal is to translate the following Java code(in the comment block at the top of the asm file) into mips assembly code. When I try to compile in QTSpim I get and error saying "Attempt to execute non-instruction at…
Jake
  • 1
  • 1
0
votes
1 answer

MIPS Assembly program not outputting the correct integers

So, my MIPS program has the user enter 3 integers and order them from least to greatest and print them out. My code is as follows: .data prompt: .asciiz "Please enter an integer: " .text main: li $v0, 4 la $a0, prompt syscall li $v0,…
user3554599
  • 81
  • 1
  • 3
  • 13
0
votes
1 answer

MIPS outputting 0.0 instead of input

completely new to MIPS and Assembly. Trying to make a simple program that reads a float and outputs it. Having a bit of trouble: .data msg2: .asciiz "please enter a value: " .text .globl main main: li $v0, 4 …