I am trying to implement a counter in assembly where aside from doing normal tasks, I want to print the counter. So if my counter is 10 seconds, I want to perform the tasks in that 10 seconds, and print 10,9,8..and so on
The only way I can think of to do this is by checking if the current - starting
time in milliseconds is a perfect thousand, e.g it is 10,000 for 10, 9000 for 9, etc, and print those numbers.
So my question is how do I do the modulus function in ARM assembly? I am working in ARMSIM which has no division instruction.
It does have binary right shift and binary left shift, binary AND, XOR etc Is there a way of achieving this using those operations?