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

I get a "Attempt to execute non instruction" in qtspim?

Could someone help me figure out what's wrong with my code? I am trying to read an integer, store its value and print it to the screen/ .text main: li $v0, 5 la $a0, testInteger syscall li $v0, 4 la $a0, resultString syscall li $v0, 1 la…
user2966769
0
votes
1 answer

Qtspim (MIPS emulator) extra code showing up?

I installed Qtspim to try out some MIPS commands. I've written a few text files, saved with a ".asm" extension, with some commands. Here's one: .text .globl main main: addi $t0, $zero, 3 addi $t1, $zero, 5 add $t2, $t0, $t1 li $v0,…
Alexis5814
  • 39
  • 1
  • 6
0
votes
1 answer

Start from a given address in MIPS

How can i start from the address of static data 0x10008000 and move to 0x10008008? I don't know if i am wrong but those addresses are for 3 registers, and you can't store in the address 0x10008001.
konsalex
  • 425
  • 5
  • 15
0
votes
1 answer

MIPS output includes previous output when running through program again

Hello I have a program that will alphabetize a 20 character string the user enters, while also filtering out characters that are not lower case letters. I have the program alphabetizing with a recursive loop, then have a more simple filter set up to…
0
votes
0 answers

What does the following QtSPIM/MIPS code do

What does the following QtSPIM/MIPS code do. Describe by referring to the functions of various blocks of the code (Block1, Block2, …). Answer the questions in front of certain instructions. Block1: .text main: li $s4, 0 la $a0, input li $v0,…
0
votes
2 answers

writing MIPS CODES using qtspim

I want to print type 123 in console of Qtspim. and then print out "the answer = 123". Why my mips code does not work?? # messages.asm .data str: .asciiz "the answer = " .text main: li $v0,5 syscall li $v0, 4 # system call code for…
0
votes
1 answer

Comments in MIPS accurate?

Are my comments for this MIPS program accurately explaining what each statement line is doing? .data str1: .asciiz "Enter the first integer: " str2: .asciiz "Enter the second integer: " str3: .asciiz "The sum is " newline: .asciiz "\n" .text …
Honinbo Shusaku
  • 1,411
  • 2
  • 27
  • 45
0
votes
1 answer

MIPS: Finding the MIN value of three ints. Getting wrong output. Why?

.data prompt: .asciiz "Enter in 3 integers, one per line, last one being a negative number: " sum: .asciiz "The sum is: " min: .asciiz "The minimum is: " max: .asciiz "The maximum is: " mean: .asciiz "The mean is: " variance: .asciiz…
0
votes
0 answers

Exception 4 on mips bubblesort

So i have to write a bubblesort programm in mips using QtSpim for a class but i get an Exception 4 [Adress error in inst/data fetch]. I have searched in other topics and use the .align 2 directive before defining an array for 5 integers but it still…
Velix
  • 53
  • 1
  • 5
0
votes
1 answer

MIPS 32 always stores 10 mul and li in $t

This is part of my code, and I don't know why, $t1 always ends up with 10, when it should be 16. At this point, the data is the following: $t5 = 4 $t3 = 1 $t2 = 0 and $t1 is 0 (and $t0 is an address) This is the part of the code: mul $t1, $t3 ,…
0
votes
1 answer

Mips exception at PC

Currently trying to develop a mips program for generating a math sequence. However, i keep getting a Mips exception at PC. terms: addi $sp, $sp, -12 #decrement the stack pointer by 12 sw $ra, 8($sp) sw $s1, 4($sp) sw $s0, 0($sp)…
Rob
  • 169
  • 1
  • 3
  • 12
0
votes
1 answer

Assembly - Qtspim

.data hello: .asciiz "hello " msg: .asciiz "Enter ur Name: " buffer: .space 10 .text .globl main main: li $v0 , 4 la $a0 , msg syscall li $v0 , 8 la $a0 , buffer li $a1 , 20 move $t0 , $a0 syscall li $v0 , 4 la $a0 , hello syscall li $v0 ,…
0
votes
1 answer

Mips: "Hello World" encounter error

I am trying to display "Hello World" (from an example found on internet) in Mips and see how it works, but I end up with errors.I first had the following error :"spim: (parser) Label is defined for the second time on line 6 of file C:Program Files…
T4000
  • 231
  • 1
  • 7
  • 24
-1
votes
1 answer

Identify original text, assembled code and machine code in QtSPIM simulator

I am using QtSPIM to learn assembly language. An screenshot of PC SPIM text segment How can I identify which part of this line is the original text, assembled code and machine code? What are the major difference between assembled code and machine…
-1
votes
1 answer

QtSpim probably misbehaves when loading a value of a .byte element

I have a university assignment and I have been given this data: .data a: .word 10 e: .word 3, 2, 1, 0 c: .word -1 d: .byte -1,0,0,0 The question is: What's the value $4 is holding if we implement the code ... and why: la $10,d addi $10,$10,-12 lw…
stratakos
  • 25
  • 7