Reputation: 1
I'm a newbie, I start programming at school and our professors asks us to realize a quicksort algorithm in assembly.
It is verry hard for me, could you give me a little help please. I do not even know how to declare a function with a pointer ...
For exemple the prototype of the function in C++ is : void Quicksort(int* t, int size)
In my opinion, I have to start like this but I'm not sure at all :
.text quicksort // it indicates that the variable belong to the quicksort function?
.size quicksort // same thing
:quicksort // it indicates that we declare a function named quicksort?
Assembly is verry hard ... I already did C / C++ programming in the past and it was easier to learn, if you can help me a little bit please, thanks ...
Upvotes: 0
Views: 982
Reputation: 10921
There are a few basics that need to be realized.
The pointer in the C++ function is for an int array. In MIPS, you define arrays by their addresses in memory.
Functions are defined by setting up subroutine calls and using jal
.
You should understand the quicksort algorithm already.
If you cannot even get a hello world program running, then there is no use asking on here right now. You will have to learn the basics of assembly first.
Upvotes: 1