exercism/mips

Add all-your-base practice exercise

Closed this issue · 1 comments

This issue is to add a port to MIPS Assembly of the practice exercise all-your-base.

Note that in MIPS, function arguments are passed in 4 registers: $a0 $a1 $a2 $a3.

Therefore we shouldn't attempt to use 5 registers for arguments: inputBase, digitsAddress, digitsLength, outputBase, outputAddress.

Here are some options:
(A) Pass inputBase and outputBase in a single register (16 bits for each).
(B) Require the student to dynamically allocate the output array (using syscall 9), so outputAddress isn't passed in.
(C) Use negative digit values to terminate input/output arrays, so digitsLength isn't passed in. The "negative digit" test case is dropped.
(D) Using a single over-writable digit array for input and output.

My suggestion would be (D).

Hello. Thanks for opening an issue on Exercism. We are currently in a phase of our journey where we have paused community contributions to allow us to take a breather and redesign our community model. You can learn more in this blog post. As such, all issues and PRs in this repository are being automatically closed.

That doesn't mean we're not interested in your ideas, or that if you're stuck on something we don't want to help. The best place to discuss things is with our community on the Exercism Community Forum. You can use this link to copy this into a new topic there.


Note: If this issue has been pre-approved, please link back to this issue on the forum thread and a maintainer or staff member will reopen it.