Questions tagged [pcspim]

57 questions
0
votes
1 answer

MIPS, ADDIU out of range in PCSPIM

I have the follow instruction, and I don't understand why the PCSPIM is giving me the following warning: spim:(parser) immediate value (61440) out of rainge (-32768..32767) on line 88 of file addiu $a, $zero, 0xF000 ^ I…
Sugihara
  • 1,091
  • 2
  • 20
  • 35
0
votes
0 answers

Error in mips assembly when trying to print new line

I'm new to assembly and I'm trying to output the division and modulus of two numbers, and so far I was successful. I can print the two numbers with space separating them be making a space character, but when I try to print a new line character '\n',…
Struggling
  • 51
  • 2
  • 11
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 / PCSPIM PROGRAM : Input 3 numbers and output highest no -> lowest no

I am relatively new to MIPS programming. I am looking for a program to Input 3 numbers from the user, and output them to the screen in order from highest to lowest.
0
votes
0 answers

Mips code with PCspim exception 7

i have written a code that permutes a string in all its possible ways. The original code is in C++, and the task of the exercise is to implement the code in C++ in MIPS.For example, if you insert "abc" the result is [abc,acb,bca,bac,cba,cab]. So in…
0
votes
0 answers

Receiving Wrong Output From Recursive Assembly Function

I was here a few days ago with an attempt to clear up some ignorance I had with assembly, specifically with registers in MIPS. Like my last post, I will preface my question with I'm still learning Assembly and I am in a University course. I don't…
LumberSzquatch
  • 1,054
  • 3
  • 23
  • 46
0
votes
1 answer

MIPS assembly, adding to jump

I'm having trouble with my assembly code: # Program testing .text .globl main main: ori $4,$0,1 addiu $4,$4,2 addiu $8,$10,4 addiu $2,$1,1 addiu $3,$1,1 addiu $5,$1,1 j main+8 …
mazie
  • 23
  • 1
  • 6
0
votes
1 answer

MIPS Branching issue

I'm doing a project in MIPS; we could create anything we wanted as long as it employed certain requirements. Anyway, I chose to do a trivia program, which has been difficult but not impossible. Ran into a problem today with my…
Sam C.
  • 1
0
votes
2 answers

How to use floating point registers in MIPS

I am trying to make a simple program for adding two floating point numbers in MIPS using SPIM simulator.The code is shown below: .data prompt1: .asciiz "\nPlease Enter first no then hit :" prompt2: .asciiz "\nPlease Enter second no then hit…
Abdul Rafay
  • 102
  • 2
  • 10
0
votes
0 answers

Forward (f) and backward (b) in label in SPIM not working

I'm using PCSpim and it doesn't seem to support labels with f and b on the end. Can anyone help me with this.
0
votes
1 answer

MIPS sorting and arrays

I did this MIPS problem that prompts the user to enter at least 4 numbers and print them in ascending order. I was wondering if someone can take a look at it and tell me what you think about it? If I wanted to get it to print in descending order…
user3538507
  • 3
  • 1
  • 4
0
votes
0 answers

PCSpim Addition Error

# PROGRAM TO ADD TWO NUMBERS .text #directive identifying the start of instructions .globl __start __start: #print la $a0, prompt #prompt goes in li $v0, 4 …
user3237662
  • 15
  • 1
  • 6
0
votes
1 answer

How to use jump in PCSpim simulation

I wrote this code (this is only a part of it): beq $t4 ,$0 ,__less3 add $s2,$t3,$0 # s2=t3 add $s3,$t2,$0 # s3=t2 j __next1 __less3: add $s2,$t2,$0 # s2=t2 add $s3,$t3,$0 # s3=t3 __next1: slt $t4, $t1, $t0 # t4=(t1
0
votes
1 answer

Excuting assembly file with PCSpim from cmd

If anyone could help me please, I have PCSpim simulator on my windows 7 PC and I want to load a file and run it from command prompt, Is it also possible to print -in cmd window- the output shown in PCSpim's console after excution? Thanks in advance.
Aws Dib
  • 35
  • 7