DIG just divides the number by 10 and returns the remainder.
Example. Say you want to extract digits 0, 1, and 2 from 102.
102/10 = 10.2 <-- DIG 0 = 2
10/10 = 1.0 <-- DIG 1 = 0
1/10 = 0.1 <-- DIG 2 = 1
Pretty simple stuff to do with any language.
DIG just divides the number by 10 and returns the remainder.
Example. Say you want to extract digits 0, 1, and 2 from 102.
102/10 = 10.2 <-- DIG 0 = 2
10/10 = 1.0 <-- DIG 1 = 0
1/10 = 0.1 <-- DIG 2 = 1
Pretty simple stuff to do with any language.
hehe..
It wasn't easy for pic basic to do it in asm
but you are right, and I was making it a bigger problem than it is
I think the language I'm using can have decimal numbers placed in variables.
Art.
Last edited by Art; - 28th November 2005 at 00:43.
Bookmarks