Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

segment of instructions (MC68000) Question...

zajebisciezajebiscie Member Posts: 3
i'm using shift operations to divide a long word in register D3 by three and storing the result in memory address specified by A2: Below is my MC68000 program..is this correct?

Move.L D1, D2, D3, -(SP)

CLR.L D5

MOVE.B #1, D4


Loop LSR.L D2, D3

ROXR.L #1,D5

BCS DONE

SUBI.B #1, D2

BLT Loop

CLR.B D4


DONE MOVE.L (SP)+, D3, D2, D1

RTS

END

Sign In or Register to comment.