Questions tagged [mips32]

Use this tag for questions related to the 32 bits version of the MIPS architecture instruction set. See also [tag:MIPS].

632 questions
-1
votes
2 answers

Looping through strings 1 character at a time in MIPS

I'm having issues grasping the concept of string and characters in MIPS. If I'm trying to loop through two strings, and concatenate two characters at a time, how would I do this? Lets say I have String1 = "St" String2 = "ack" How could I loop…
Parker
  • 8,539
  • 10
  • 69
  • 98
-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
1 answer

mips assembly print each ten characters in an array in a new line

I am facing a problem trying to print out an array of 100 characters in ten lines (ten characters per line) in order to form a square shaped text using Assembly language MIPS. the code is printing the first ten characters right and then error…
LazerDance
  • 177
  • 1
  • 8
-1
votes
1 answer

debugging MIPS decimal to 8bit binary program

I am trying to write a program which takes in integers one at a time and converts them to 8 bit binary, until 0 is entered and the program terminates, in MIPS. My code is outputting zeros for even input and 1s for odd. I can't figure out why this…
Julia
  • 1
  • 2
-1
votes
2 answers

MIPS32 word array

I'm trying to translate a simple C function (that tells you whether a word, made by a char array, is a palindrome) into MIPS 32 but I'm having trouble using getting to load non-multiple-of-4 positions of the array. Apparently, `li t0,0(a0)` loads…
-1
votes
1 answer

MiPS32bits What is the highest and lowest value?

Which major and minor address that the beq instruction can achieve in 32-bit mips. With the value 0x000C0000 stored.
-1
votes
1 answer

Fetch address not aligned on word boundary ,MIPS32

Ok so i have this simple mips32 program: .text .globl main main: lw $s3,10 move $a0,$s3 li $v0,1 syscall li $v0,10 syscall #program termination All i want to do is to load to register $s3 number 10 and then print it.Mars assembles this without…
-1
votes
1 answer

Is there a coding convention to MIPS?

I would like to get linked with a C compiler. What is the convention to pass values to function using MIPS? Is there a coding convention or RFC-Like document?
ALUFTW
  • 1,914
  • 13
  • 24
-1
votes
1 answer

Convert 2 digit hex op code format into 6 binary digit opcode

I was going through an old exam paper and was doing a question to convert sw $6, -4($7) into machine code in hex. I was used to the format where the opcode is 6 digits long and set. If you Google, the opcode for sw is 101011. However, in this exam…
Dhruv Ghulati
  • 2,976
  • 3
  • 35
  • 51
-1
votes
1 answer

significant bits understanding

To find significant bit you could up to the highest order bit. ex. i need help understanding significant bits (USING 32bits): 0000 0000 1000 1001 0111 0000 0001 1000 this one (the one above) has 24 significant bits. But my professor told me the…
mazie
  • 23
  • 1
  • 6
-1
votes
1 answer

vhd xlinix something is wrong same values it must be with muxes

I have a problem with my program in xilinx vhd. I have to create a processor that supports the classic instructions of MIPS32 add, sub, and, or, lw, sw, sine and cosine. Sine and Cosine will take as argument a number and will return the cos or sin…
vhdstack
  • 9
  • 4
-1
votes
1 answer

Why are 32-bit mips instructions stored in 64-bit space?

MIPS 32 uses instructions of 32 bits. But when almost all instructions are done, the CPU adds +4 to the PC. As far as I know, 4 words means 64 bits, so, how can this be possible? Am I forgetting something or does mips32 wastes 2 empty words every…
Nathan Parker
  • 308
  • 2
  • 14
-1
votes
2 answers

Integer Implementation of Floating-Point Addition In MIPS

Abstract Your goal for this project is to implement software emulation of floating point addition for 32-bit (single-precision) floating point numbers in MIPs. Input/Output Your program will prompt the user for two floating point numbers. It…
user3526834
  • 11
  • 1
  • 3
-1
votes
1 answer

MIPS32 SPIM: Read int then print it

I'm having trouble understanding why I am getting syntax error in line 20, sw $v0, $t0. $v0 should be the integer returned from the previous call to read int, and $t0 is a temporary register. Thanks! .data msg: .asciiz "Hello world.\n" promptint:…
MT.
  • 3
  • 2
-1
votes
2 answers

how to fetch the MIPS-opcode from the hex

How do I calculate the leftmost 6 bits from numbers like 0x71014802 These 6 bits tell us what MIPS instruction this code represents. The answer is 0x1c but how does the book calculate it? Example: 0x10001A08 = 000011 00000 10000 01000 00000…
user3025956
  • 41
  • 1
  • 5