All i need to do is calculate a remainder after division like the following:
A0 = D1/10 // D1 being some number
D0 = D1 mod 10
but there is no modulo operation in the ARM K40 kwikstik so the only thing i found was to use the div() external function
So D0 = D1 % 10 does not work in C?
If you want to call assembly from C, and you are asking which registers are used, you should probably refer to the ARM Cortex-M4 technical reference manual from ARM Inc. Online free. But here is the abridged version:
Arguments passed into a function are passed, in order, in registers R0 through R3. Arguments larger than 32 bits span multiple registers. If there is not enough room in 4 32-bit registers for all the function arguments then they are passed on the stack instead.
The same logic applies for values returned from a function, registers R0 through R3 with the stack used instead if that will not work.
Registers R0-R3, as well as R12, are always assumed to be "dirtied" by a function call. A calling function is responsible for pushing these prior to making a call and then popping to restore them when the call returns.
A _called_ function is responsible for pushing any other registers on the stack prior to using them and popping them off again to restore them before returning.
This is all per ARM. If that is what you were asking.
There is a pretty good short assembly language tutorial online at
http://www.coranac.com/tonc/text/asm.htm
if you want to dig a little deeper and maybe see what other pitfalls there are with register selection.