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

MIPS for-loop (Check if 0 using only beq or bne)

I am new to MIPS and trying to write a program that has variables that are either a zero or a one (These variables are either print or sum) and then four other variables that are just random numbers. If the variable sum or print is a one then…
MDRIV3
  • 39
  • 1
  • 6
0
votes
1 answer

How do I read in and store variables from another file

For example if the file I am trying to read has: sum: .word 0 How would I read the value for sum and store it into another files variable?
MDRIV3
  • 39
  • 1
  • 6
0
votes
0 answers

MIPS - print a simply double array

I want to print a double array, this is my simply code: .data myarraydouble: .space 24 newline: .asciiz "\n" .text main: addi $t0,$zero,0 #set counter to 0 li.d $f2, 1.393701 #$f2 = 1.393701 …
robertina
  • 64
  • 11
0
votes
2 answers

read_double is not equal to print_double

I simply wanna print the double number I digit but for example if I digit 2,1 it returns 2. MY CODE: li $v0, 7 # select read_double syscall # run read_double jal p4 # run println mov.d $f12,$f0 li $v0, 3 # select…
robertina
  • 64
  • 11
0
votes
1 answer

product of floating point numbers

I have to multiply and print two double precision floating point numbers, my code is the following: li $v0, 7 # $v0 =7 syscall # run read_double jal p4 # run println mfc1 $v0, $f4 # $v0 = $f4 li.d $f2,…
robertina
  • 64
  • 11
0
votes
1 answer

assembly floating point code error

these are my code lines: li $v0, 6 # select read_float syscall # run read_float jal p4 # run println mfc1 $f4, $v0 The compiler gives the following error: spim: (parser) syntax error on line 132 of file…
robertina
  • 64
  • 11
0
votes
0 answers

QtSpim: (parser) syntax error on line 6

I just start to learning mips assembly programming and use QtSpim emulator. The example code is copied from a tutorial. But when loaded using QtSpim, it complains following error: spim: (parser) syntax error on line 6 of file…
longbowk
  • 219
  • 5
  • 14
0
votes
0 answers

QtSpim - How can I change .ascii value in .data?

I load address of the .ascii with "flores" and I want change this to my name. I can put only my forename next to flores, but I want replace "flores" to "kyanoz" User data segment [10000000]..[10040000] [10000000]..[1000ffff] 00000000 [10010000] …
amjalca
  • 3
  • 3
0
votes
1 answer

MIPS Help: Recursive Functions

I'm trying to code this recursive function into MIPS. My problem is I'm not sure how I can do the recursive step. I'm pretty sure I got the rest correct. int recur(int n) { if(n == 1 || n == 2) { return 2; } else { …
James
  • 13
  • 1
  • 2
0
votes
0 answers

Sorting array assembly

I don't know what's wrong with this code. Thanks in advance .data array: .space 40 prompt: .asciiz "Enter an integer (0 to quit):" text: .asciiz "After sorting, the list of integers is:" .text .globl main main: …
0
votes
0 answers

Assembly Program working in Qtspim but not PCSpim-Cache

I have the following assembly program which compiles and runs correctly in QTSpim and displays the correct result in the QTSspim console. However, I wish to observe the data segment in PCSpim-cache but it does not compile correctly and display the…
Daniel
  • 66
  • 1
  • 9
0
votes
1 answer

is it possible to add -1 value in add instruction in MIPS32

is it this instruction is correct Using SPIM ? add $t1,$zero,-1 after run program the $t1 is fill by "ffffffff"
Hary Coder
  • 13
  • 5
0
votes
0 answers

MIPS Print data in a recursive function

I am struggling with a problem in MIPS programming. I have the following recursive function: F(n) = 14F(n - 1) + 2F(n - 2) - 5n I implemented it using a recursive function, it prints me the right answer. My problem is: I want to print in console…
0
votes
1 answer

Mars MIPS Simulator 4.5 Locks up on User Input read-string syscall

Does anyone use the Mars SPIM simulator ? I have used it for small MIPS 32 programs in school and I like to debug with Mars. However, I have an program that works on the QtSPIM simulator, but locks up the Mars simulator. I have removed the…
0
votes
1 answer

End character of user input string

I am writing a program that takes a Roman Numeral (up to 12 characters) and converts it to a decimal value. I am able to do this conversion successfully and read each value character by character, however my value is always 1000 greater than actual…
Jimmy M.
  • 325
  • 3
  • 13