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
-1
votes
2 answers

What is happening here in this divu with three operands?

I have the following line in a C code i = low + (1664525*(unsigned)high + 22695477*(unsigned)low) % (high-low+1); The code in MIPS that I have for this line is as follows lw $3,40($fp) li $2,1638400 # 0x190000 ori …
user202004
  • 151
  • 8
-1
votes
1 answer

Is my MIPS32 code to assign values input by the user to array elements correct?

I am writing a MIPS code for quicksort, and as a part of it, I need to write a main function that will first take an integer input from the user, N, which is the number of elements the user wishes to enter, and then it will ask the user for the…
user202004
  • 151
  • 8
-1
votes
1 answer

MIPS - Cannot use odd numbered registers for multipyling with double precision?

LANGUAGE SPECIFIC DOUBT, LANGUAGE IS MIPS I am aware that double precision takes up two registers. ( So If i store in $f5, then I should not mess with $f6) But it says that odd numbered registers cannot be used for double precision…
-1
votes
1 answer

MIPS Double Recursion Problem " Can't expand stack segment by 16 bytes to 524288 bytes"

I'm trying to implement a double recursion program using MIPS that follows this pseudocode: procedure DRAGON(order, sign) if order = 0 then Move forward else DRAGON(order-1; 1) Turn 90sign DRAGON(order-1;…
jiyoon
  • 201
  • 4
  • 14
-1
votes
1 answer

How to arrange an array in ascending order and print the arranged array in mips

Im relatively new to programming, and I'm having trouble getting my head around mips. I want to be able to arrange the given array in ascending order and print the arranged array. I've attempted to do this but I'm having no luck! My program is to…
Amy.C
  • 19
  • 4
-1
votes
1 answer

Return from a procedure and continue a cycle using $ra register without the JAL instruction

This cycle scan a string and for every char, if equal to one of that letter, go to a speific procedure: switch: add $t1, $zero, $t2 add $t1, $t1, $s2 # $s2 is the address of a string lb $t0, 0($t1) blt $t0,…
Kenyskrachor
  • 19
  • 1
  • 8
-1
votes
1 answer

How to set the memory adress for an instruction in MIPS?

Normally, the SPIM simulator itself allocates an address to the instructions in a program. Is there some way to manually choose where to store a particular instruction?
-1
votes
2 answers

MIPS example functions for a beginner

I have 2 functions in c that I would like to see what they would look like in mips and this is because I need some examples to study and use for reference because I am a beginner in mips. I am also using qtspim. Recursive function: int my_fib(int…
-1
votes
1 answer

Converting a C program into MIPS assembly language program

I am trying to convert a C program into a MIPS assembly program. The following is my C code for the program: (Note: Bulbs[number] is an array initialized to all zero values for a "number" entered by the user) for(int i = 1; i <= number; i++) …
-1
votes
1 answer

Using syscall 13 in MIPS-Assembler

I'm studying computer since and my task at the moment is, to learn how to program in MIPS assembler, using qtSPIM. The task, which I'm working with at the moment is, writing a program as a routine to load a picture (PGM 5, binary) from my hard drive…
Mahakala108
  • 85
  • 1
  • 11
-1
votes
4 answers

Instruction references undefined error in MIPS/QTSPIM jal 0x00000000 [main] ; 188: jal main

I had the following error in my code.Please help. Instruction references undefined symbol at 0x00400014 [0x00400014] 0x0c000000 jal 0x00000000 [main] ; 188: jal main This code convert Farenheit to Celsious and Celsius to Farenheit .data…
Bill kouts
  • 1
  • 1
  • 3
-1
votes
1 answer

MIPS - Created files become write-protected/read-only

I have a problem I cant seem to solve alone.. li $v0, 13 # open file to write la $a0, file # load file li $a1, 258 # file flag write & create li $a2, 0x1FF # mode: something i googled xD …
nofavor
  • 19
  • 2
-1
votes
1 answer

How do I determine or set the working directory of QtSpim?

I just want to run ANY kind of Spim programm using an Syscall for open, read and/or write a file, but that doesn´t work out. I am aware that probably my program and the file are not in the working directory of QtSpim, but I have no Idea how to…
-1
votes
1 answer

Entering in Command Line Arguments MIPS

I am trying to run a MIPS program and I need to enter in command line arguments. I am having issues doing this on my computer. I have installed QTSpim and tried typing "spim -f program.s arg1 arg2" into the mac terminal like we do in class, but I am…
Ellie
  • 1
-1
votes
1 answer

SPIM print ascii char

I have to write a little program in assembly for the MIPS architecture. To be more specific it should be a procedure which takes a register and prints the value of it. It is allowed to use everything excepted a call of print_int. My procedure does:…
Asker
  • 431
  • 5
  • 14
1 2 3
19
20