noob,
I think your best bet is to write a loop that subtracts ten and
increments the "tens" register until the Carry flag is set, then
decrement the tens register, add 10 to your number, and move it to the
units register. Basically, you're doing division by hand.
- Marcel

On 3/6/07, picnoob <leeguy92@googlemail.com> wrote:
>
> hi, i need a way to seperate a number, say 54. and put 5 in a register called
> tens, and 4 in another called units.
>
> is there some binary operation to do this, or will it have to be a custom
> subroutine?
>
> i need this kinda fast, can someone help?
> --
> View this message in context: http://www.nabble.com/seperate-num-into-tens%2Bunits-tf3356654.html#a9335697
> Sent from the PIC - [PIC] mailing list archive at Nabble.com.
>
> --
> http://www.piclist.com PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist
>
-- 
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist