Question: How would I make a bubble sort in RISC-5 Assembly to find the median of the constant nums array? i provided what the cpp file
How would I make a bubble sort in RISC-5 Assembly to find the median of the constant nums array?
i provided what the cpp file should look like and how to print out the answer.
The .S file is where the bubble sort should be made and to find the median using RISC-V Assembly
cpp file
extern "C"{
int Median(const int array[], int array_size, int *buffer);
}
int main(int argc, char*argv[]){
const int nums[]={10,15,5,1,2,4,6,7};
int size = sizeof(nums)/sizeof(nums[0]);
int buffer;
printf("%d ", Median(nums,size,&buffer);
return 0;
}
.S file
.section .text
.global Median
Median:
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
