Thread: Hex to Decimal
View Single Post
Old 21 June 2006, 18:31   #5
Galahad/FLT
Going nowhere
 
Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,014
This then...

moveq #0,d0
moveq #0,d1
move.b $300.s,d0
divu.w #$a,d0
move.b d0,d1
rol.l #4,d1
swap d0
add.b d0,d1

Converted value will be left in d1

I've never had to do it before, so forgive the non-optimisation!

Also, because its a byte conversion, its only good up to a hex value of $63 (99 in decimal). But it does as you requested
Galahad/FLT is offline  
 
Page generated in 0.05619 seconds with 11 queries