Thread: Hex to Decimal
View Single Post
Old 21 June 2006, 15:24   #2
Galahad/FLT
Going nowhere
 
Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,014
This what you want?

lea converted_string(pc),a2
move.l d0,d2
moveq #8-1,d3
nextconversion:
rol.l #4,d2
move.l d2,d4
and.l #$f,d4
add.l #"0",d4
cmp.l #"9",d4
bls.s skip_addition
addq.l #7,d4
skip_addition:
move.b d4,(a2)+
dbra d3,nextconversion

converted_string: dcb.b 8+2,0
Galahad/FLT is offline  
 
Page generated in 0.05632 seconds with 11 queries