Questions tagged as 'mips'

1
answer

What are the real problems for anyone working with assembly development? [closed]

I'm studying the architecture and implementation in MIPS, but since I'm not working at a low level, what I'm doing are basic exercises in any beginning of learning, I wonder what are the difficulties and real problems of an assembly developer? !...
asked by 28.08.2015 / 04:38
1
answer

Doubt to replace character in string assembly (MIPS)

I have to make a code in Assembly mips that asks for a phrase and if in the sentence it contains the character - is replaced with the character * . So far I've only been able to get to this code: .data buffer: .space 256 #...
asked by 13.12.2016 / 14:14
3
answers

Repetition loop in assembly

How can I do a repetition a certain number of times in assembly (in the MIPS )? Example in pseudocode, assuming that the variable registrador is a register that I want to receive all numbers from 1 to 6 (one at a time, obviously) va...
asked by 16.05.2017 / 20:59
0
answers

Search binary mips

I am developing a code in mips in order to perform a binary search recursively, well along the development some doubts appeared, being: Soon after my function call, I unpair my arguments, but should I also unstack my $ ra? Performing as belo...
asked by 24.10.2015 / 05:13
1
answer

Convert C code to MIPS assembly?

How can I generate the Assembly code corresponding to the code below: #include <stdio.h> #define LINHA 4 #define COLUNA 5 int tab [LINHA][COLUNA] = { 2016,2012,2008,2004,2000, 1916,1911,1908,1904,1900, 1861,1857,1852,1846,...
asked by 03.10.2017 / 21:54
1
answer

Bubble sort in assembly (MIPS)

My teacher asked us to implement Bubble Sort in the MARS environment but I can not. There are some errors in the code. Can anyone find the error? Output should be {1, 2, 3, 4, 5, 6, 7, 8} but is {1, 8, 7, 6, 5, 4, 3, 2} Code...
asked by 04.11.2016 / 22:51
1
answer

Error in assembly deviation (MIPS)

I need to transform the following c code into MIPS assembly: int i; int vetor[8]; for(i=0; i<8; i++) { if(i%2==0) vetor[i] = i * 2; else vetor[i] = vetor[i] + vetor[i-1]; } Doing this I came up with the following code...
asked by 20.04.2015 / 04:39
0
answers

Assembly Mips: Runtime exception at 0x004000ac: store address not aligned on word boundary 0x1001040e

In this code, I'm having trouble using the sw command. An error always appears as follows:    Runtime exception at 0x004000ac: store address not aligned on word   boundary 0x1001040e Honestly, I'm struggling to learn assembly mips, but I...
asked by 17.09.2015 / 06:14
1
answer

Implementation of the strcpy function of C in MIPS using the MARS simulator

Why does not the code below work?    Error in strcpy.asm line 9: Runtime exception at 0x00400014: fetch   address not aligned on word boundary 0x00000001 .text .globl main main: lw $a0, destino # Carrega o ponteiro destino par...
asked by 24.10.2016 / 20:42
0
answers

Add character if same after same MIPS

I want to make a program in MIPS where after finding a vowel, add the following consonant in it. For example, after a, add b, after and add f. In the end it looks like this:    Keyword: Olae       Final Word: Olabef This is what I...
asked by 15.06.2017 / 18:32