Gary Thompson

DIVU/DIVS Forcing a Reset

Discussion created by Gary Thompson on Feb 23, 2012
Latest reply on Mar 9, 2013 by TomE

Hi I am using the MCF51JE2256 and when I try to use the DIVU/DIVS instructions it forces a reset...any ideas what I am doing wrong? 

 

move.w #$03E8,D2 ;move in 1000 dec
divu.l D2,D0 ;divid by 1000
move.b D0,(adeci1,A5) ;store 1000 place
move.b D1,D0 ;get original byte
move.b #$64,D2 ;move in 100
divu.l D2,D0 ;divide it by 100
move.b D0,(adeci2,A5) ;save hundreds place
move.w D1,D0 ;get orginal byte
move.b #$0A,D2 ;move in 10 dec
divu.l D2,D0 ;divide by 10
move.b D0,(adeci3,A5) ;store tens place(s)

Outcomes