5 ms·
When I was in college, I had to take an assembly language course. It was on MIPS: 32 registers. One assignment said, roughly: - Read ten numbers into an array
by i_k_k 3y ago
When I was in college, I had to take an assembly language course. It was on MIPS: 32 registers.
One assignment said, roughly:
- Read ten numbers into an array.
- Sort the numbers into the array.
Nothing said I needed to read the array, so I read in the numbers, both to the array and registers, hardcoded a bubble sort on the registers, and wrote the result to the array. End of program.
I was being cute. I got full marks with a note to stop being cute.