» Home » mips » Page 1
Compile MIPS assembly on Windows, mips-gcc
Category : Programming Languages

So I'm trying to compile some C code I've written to MIPS assembly that I can study to get an idea of how it works.
I'm currently on Win 7 so I installed Cygwin and the Berkeley College mips-gcc that in theory should do the trick.
I followed this tutorial: http://www.ocf.berkeley.edu/~davelai/al/labs/lab10/lab10.html
but when I try and compile anything I get "mips-gcc: installati


View Replies


C++ code into MIPS, the code in MIPS runs without error messages, but does not display results
Category : Coding

The assignment asked us to complete a code in MIPS. The initial MIPS code needed a function we had to translate from a C++ code. I translated the function from C++ to MIPS as required.


The code in MIPS does not display any errors when I run it. However, the code does not display anything.


I tried to debug it, but I still don't see where the problem is. I am using Notep


View Replies


In MIPS, what is HI and LO
Category : Programming Languages

I'm reading about division in MIPS and I've found that div


Divides $s by $t and stores the
quotient in $LO and the remainder in
$HI


http://www.mrc.uidaho.edu/mrc/people/jff/digital/MIPSir.html


And Wikipedia says


HI and LO are used to access the multiplier/divider results, accessed by the mfhi (move from high) and mflo commands.<


View Replies

TAGS : MIPS what

How to Get the PC on MIPS
Category : Computers
MIPS ("Million Instructons per Second") is an old way of measuring a computer's speed and power. It measures the number of instructions that your computer can handle in one second. The MIPS measurement is rarely used anymore, as it only measures a CPU's speed without taking into account other factors. For example, it does not consider program transfer speed (I/O" speed). However, yo

View Replies

TAGS : MIPS

absolute value in MIPS
Category : Programming Languages

Do you have any simple ways to make a value in a register in MIPS as an absolute value?


View Replies


MIPS program! need help- i m not sure if i m doing it right
Category : Careers & Job Searching

i m trying to write a MIPS program that will examine set of ten single digit numbers
(positive, zero,or negative) that can be inputted from the terminal. After examining the
numbers, only the negative numbers (with appropriate sign) along with their count needs to be outputted
to the terminal.


BELOW IS MY MIPS PROGRAM


.data
prompt: .asciiz

View Replies


MIPS, Recursion
Category : Programming Languages

I trying to write a MIPS program that gets an unsigned integer as argument and returns the sum of all decimal digits in the integer recursively. For example if the argument is 75080 then the sum to be returned is 20 (7+5+0+8+0). Here is my code so far. Any help would be appreciated.


My way of thinking was to divide the number by 10 leaving me with the last integer in the number, ad


View Replies

TAGS : MIPS Recursion

Recursion in MIPS
Category : Programming Languages

I want to implement a recursive program in assembly for MIPS. More specifically, I want to implement the well-known Fibonacci function.


Here's the implementation in C:


int fib(int n) {
if(n<2)
return 1;
return fib(n-1)+fib(n-2);
}

View Replies

TAGS : Recursion MIPS

How to do MIPS about .asciiz
Category : Programming Languages

I have a question, I'm writing a program that could output a string base on the user-input string.


For example,


user inputs>> Bear


outputs>> It's a mammal.


or


user inputs>> Snake


outputs>> It's a reptile.


I'm only gonna do 3 animals(easy). "Bear, Snake, Pigeon" So any other animals are invalid. And if the user i


View Replies

TAGS : MIPS about asciiz

Need help with MIPS program
Category : Careers & Job Searching

I'm working on a mips program that will run on pcspim and i need a little help. The description of the program is: Write a program that reads a string (from a keyboard), stores it in the memory, and computes and prints the frequency of each character; and then it reverses the string and prints the reversed string.


so far i have is...


.data # Data declaration

View Replies


Next
2012 / 2017 Copyrights BigHow , All Rights Reserved .