Keep track of numbers entered in by a user in assembly

37 views Asked by At

I am creating a program to convert a number to any base. I need to keep track of the numbers entered in by the user. For instance, I ask the user what the Base should be, Lets say they chose 4 as the base, I then as them for a number in that base. So lets say the first number they enter in is 1, I validate that this is a correct number to be used under this base, than let them enter in a second number. Lets say they chose 2, it is also correct, so the full number so far is 12. Here is where I am stuck what to do...how can I keep track of this number in assembly? I can't simply add 1 & 2, that would obviously be incorrect.

Here is the psudeo code:

Ask user for base

    Loop:

        Get Number
        validate number
        if validate store
        else continue loop until enter is pressed

I have created a method to convert ascii to digit, but I am not certain how to append a store digit from 1 to 12 like in the example above. Let me know if I need to clarify.

0

There are 0 answers