I'm writing a MiPS program that will examine a list of 15 test scores. And it is going to input from the terminal. The passing criterion is the score of 50. The outputs to the terminal will include the scores in each category and the number of students passing and failing. I should use input prompts and output statement. Please I need so...
There appears to be no definitive standardized stack frame and C language calling conventions (register usage and such) for the MIPS-32 Processor Architecture. That is, it appears to be completely up to the assembler/compiler tool chain to define their own stack frame and calling conventions. I've struggled to find a definitive reference...
I'm writing some mips code that reads in ~4kb per iteration of a loop. The problem is that the mp3 file that I'm reading from contains multiple instances of 1A, so syscall 14 stops and won't read anymore without reaching the actual end of the file. Is there any way around this? Also, does anyone have a complete list of the flags that can...
How do I take a single ASCII character and convert it to its decimal equivelant in MIPs?
Do I simply have to have some conditions to subtract a certain amount from the ascii code to make it its decimal representation?
...
i m writing a MiPS program that will examine a list of 15 test scores. And it is going to input from the terminal.Well, the passing criterion is the score of 50. the ouptuts to the terminal will include the scores in each category and the number of students passing and failing. with input prompts and output statements...Below is the prog...
Hello,
I am writing certain code in MIPS and I've come to the point where the requirement is to store the result, temporarily, in HI and LO special registers (both are 8 bytes wide). These instructions are at my disposal:
divu s,t lo <-- s div t ; hi <-- s mod t
multu s,t hi / lo < -- s * t ;
So, divu stores result of divisi...
Can someone please help me with this assembly code? an explanation of what goes in with each step will be great. thanks!
the following code used to implement the instruction
sllv $s0, $s1, $s2
which uses the least significant 5 bits of the value in register $s2
to specify the amount register $s1 should be shifted left:
...
I'm looking for a decompiler capable of transforming MIPS machine code into C code. Any suggestions?
...
What exactly do this instruction? I know that it try to align data with a multiple of a especific number but, why would you need to do this? Is there an equivalent instruccion in other assemblers?
...
I'm trying to implement a function to backtrace a crashed user space process in kernel. Since, I'm working in Kernel, I don't have the luxury of any libraries and provided backtrace function doesn't support MIPS architecture. I'm just wondering if I can emulate what GDB does.
The version of the kernel is 2.6.21.
...
I am not sure how to print out a floating point single with one decimal place.
I get '88.09999847' instead of '88.1'. Please advise
For example: if I have register $f10 = '88.09999847'
mov.s $f12, $f10
li $v0, 2
syscall
I get output as "88.09999847"
How do I round up to one decimal place and print out "88.1"
Any help w...
A decade or two ago, it was worthwhile to write numerical code to avoid using multiplies and divides and use addition and subtraction instead. A good example is using forward differences to evaluate a polynomial curve instead of computing the polynomial directly.
Is this still the case, or have modern computer architectures advanced t...
I'm doing some work involving MIPS assembly, and I keep coming across these four floating-point load/store pseudoinstructions: l.s, l.d, s.s, s.d. I found some documentation online and figured out that there are four "actual" instructions that seem to do the same thing: lwc1, ldc1, swc1, and sdc1.
My only question is, what's the differe...
Hi ,
Please point me the tools or the way to monitor which thead in running in the millisecond level? Thanks.
Suppose I have 3 thread running , and I want infomation like below:
0 - 20ms thread1
20 - 40ms thread2
40 - 50ms thread1
50 - 70ms thread3
NOTES: I perfer to solve this problem without hacking into kernel.
EDIT :
...
Hi,
I am curious about the things happend before main() is called , such like load the executable into memory , dynamic load of shared library. Do you have any suggestions how to understand these things by a hand-on exercise?
The tools amd things I know of ,and using now, includes:
strace
disassemble
readelf
/proc/pid/map
NOTES: ...
does anyone have a mips,linux execve shellcode that allows passing arguments to /bin/sh so i can execute like /bin/sh -c "echo test;echo worked", mipsel if possible ?
...
I'm using the VxWorks MIPS compiler and I have some third party source that needs to be compiled as c++ but all the extensions are .c. There must be a switch I can pass into the compiler in this case to force C++ compilation but I can't find it.
Any suggestions?
...
So I am learning MIPS using the SPIM simulator and im stuck on this problem.
I want to add two 64 bit numbers which are stored in four 32 bit registers. So I add the LO bytes and then the carry and the HI bytes. But there is no adc/addc command i.e. add with carry.
So I would have to add the carry bit in the status register. But, how e...
In our project, we take two floats from the user, store them in integer registers, and treat them as a IEEE 754 single precision floats, manipulating the bits by masking. So after I multiply the 23 bits of fraction value, should I take into account the result placed in the LO register if I want to return a single precision float (32 bits...
Hello,
My program asks the user if the number he/she is thinking of is in a list. The user inputs a y or an n. How can I check if a user has entered y or n in assembly? Is it sufficient to put the user input into a register and branch if equal to 121 (decimal ASCII code for 'y') or branch if the value is equal to 110 (decimal ASCII code...