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

Combinatorial Math in MIPS 32

Good Evening! I am trying to write a program in MIPS 32 that will compute n Choose k. In the code below, I am initializing the variables to compute 8 Choose 3. I am running the code in QtSPIM and getting the following errors: Exception occurred…
mellerlite
  • 13
  • 1
  • 6
0
votes
0 answers

'SPIM: (parser) syntax error'

Excuse me I'm using a MIPS simulator. Occurs that when I'm trying to open the text file that contains my code in the simulator appears me this message: spim: (parser) syntax error on line 35 of file /home/v-wrampht3r/Desktop/MIPS.s mult $s4,…
0
votes
0 answers

Assembly Code in QTSpim is Not Properly Taking User Input

I am working on a code for my assembly language class that takes user input and stores it in memory and then prints it out again for the user. I don't know what the problem is but ever time I invoke the system call code to read the users input it…
Samuel
  • 5
  • 4
0
votes
1 answer

MIPS Assembly Language (Power2)

I am currently looking for the best method for performing an n power2 function. In short, the code in MIPS should calculate 2n. n being a positive number stored in $a0. However, as of right now my results are coming one power less. My…
Ace NA
  • 121
  • 1
  • 2
  • 8
0
votes
1 answer

print an array in reverse order, assembly

so as i was last said in my previous question: I have an exercise in my univercity and i would like to have some help! first of all i'm new in mips language! So, my exercise is asking to make a programm in qtSpim which it will read 8 integers from…
coding girl
  • 9
  • 1
  • 2
0
votes
0 answers

MIPS Assembly Language Search

I've been trying to figure out whats wrong with my program for the past two days.. got to the point where I stopped typing comments just so I could debug and get things running as smoothly as possible. My program is a binary search algorithm being…
Alexander
  • 9
  • 1
  • 3
0
votes
0 answers

MIPS Assembly QtSpim exception/bad address error

I'm trying to execute this MIPS assembly code for fibonacci sequence (trying to find 10th fibonacci number, fib(10) in main. in QtSpim and it keeps throwing errors such as: "Exception occured at PC=0x7ffff774" and "Bad Address in text read..." I'm…
0
votes
0 answers

MIPS QtSpim Data Movement Issue

I am having an issue with a program I am writing right now, here is the program exactly. .data BYTE1: .byte 0xAD BYTE2: .byte 0xDE WORD1: .word 0 WORD2: .word 0 WORD3: .word 0 WORD4: .word 0 WORD5: .word 0 MYNAME: .asciiz "SamW" .text …
Samuel
  • 5
  • 4
0
votes
1 answer

Assembly Language .asciiz Error on Mac QtSpim

I am having some issues with importing a text file into QtSpim. The following is the exact file I am entering. Program 2 .data BYTE1: .byte 0xAD BYTE2: .byte 0xDE MYNAME: .asciiz “SamW” WORD1: .word 0 …
Samuel
  • 5
  • 4
0
votes
0 answers

While loop in MIPS, lw exception

I am trying to get this simple while loop to work. I'm using a textbook and I'm not sure what I'm missing cause I copied everything. only thing I added is the "main:" on top main: sll $t1, $s3, 2 add $t1,$t1,$s6 lw $t0, 0($t1) …
Aven
  • 1
  • 2
0
votes
1 answer

Invalid language element: [variable]

Currently coding an assembly language assignment. I originally coded it with pseudo enabled in the MARS compiler and then translated the pseudo commands one by one. Currently I am having trouble with getting an error message "Invalid Language…
0
votes
1 answer

MIPS Assembly: INT to STRING function only 2 chars (cut off last char)

I wrote this function to convert an int value to ascii string. But when the input is something like 315 it'll print 31 into the string. As I'm not an expert in assembly any help with this will appreciate. Here's the code: (int_buf is where the…
pike93
  • 1
  • 3
0
votes
1 answer

Sum of two 64-bit unsigned integer QtSpim

Suppose registers $a1 and $a0 contain a 64-bit unsigned integer A = $a1 × 2^32 + $a0 and registers $a3 and $a2 contain a 64-bit unsigned integer B = $a3 × 2^32 + $a2. How would I go about computing the sum of A and B and storing it in $v1, $v0…
3rdeye7
  • 536
  • 4
  • 25
0
votes
1 answer

Subtract two input numbers

I need to subtract two numbers that the user will input. It is my first time writing in assembly that's why the code might not be at all great but I tried to make it as legible as possible. Here is my code: .data …
NickCh
  • 5
  • 1
  • 7
0
votes
0 answers

Exception in PC in Mips

I am trying to implement a binary search tree in MIPS. for the implementation, I iterate a loop which asks the user to enter a number and inserts the number into the BST. the iteration continues till the user has no more numbers to be inserted.…
Hemanth Annavarapu
  • 823
  • 3
  • 19
  • 37