Hi guys.
My task is to write a wombat 1 machine language program in CPUSIM that outputs the radix(only base 2 to 8 inclusive) reperesentation of a number. We have to ask the user for 2 inputs - first is the value to convert(cannot be negative) and second is the radix base. Then do division and note each remainder and display in the correct order. We were also told that not all values will be able to be converted and that we have the choice of how many spaces to set aside for the remainders.
I've managed to get a working program but can't figure out displaying remainders in the correct order. Currently, my program does not store the remainder. As soon as it is calculated, it is displayed. But the instructions specifically state to display in correct order. My division part and remainder calculation is in a loop which means that if I create a storage space for the remainder, it will be overriden on each loop. So I thought of jumping out of the loop to another location and storing it in a permanent space. Then comes the problem of the other remainders.
If you want my code, pm me please. I'll send it as a private message. Sorry if i'm not posting it up, but this is an assignment question and last time I posted my code on a forum, another classmate found it, copied it, and we both got zero for plagiarism. Please understand.
Really appreciate it if someone could help me out.
Thanks
Jed