My goal is to display the solution of 2 numbers entered by the user in Hexadecimal. As of right now my code gets 2 numbers from the user, then returns the solution in decimal. What i think i should do is just to get my decimal solution and convert it into Hexadecimal after the numbers have been added together. If there is another plausible way please let me know. Thanks You.
org $8000
START movea.l #MSG1, A1
move.b #13,D0
trap #15
clr.w D2
JSR Loop
move.w d2, d4
movea.l #msg2, a1
move.b #13,D0
trap #15
clr.w d2
jsr loop
movea.l #msg3, A1
move.b #13,D0
trap #15
add.w d4, d2
JSR DISP
MOVE.B #9,D0
TRAP #15
LOOP move.b #5,D0
trap #15
cmp.b #$0D, D1
BEQ BREAK
and.b #$0F, d1
mulu #10, d2
add.w d1, d2
jmp loop
Break rts
DISP clr.b d3
DISDIV divu #10, D2
move.b #16, d5
ror.l d5, d2
or.b #$30, d2
move.b d2, -(A7)
addq #1, d3
clr.w d2
ror.l d5, d2
bne DISDIV
DISDIG move.b (a7)+, D1
move.b #6,D0
trap #15 ; char out
subq.b #1, D3
bne DISDIG
rts
org $8100
MSG1 DC.B 'Please enter a two digit number ', 0
MSG2 DC.B 'Please enter another two digit number ', 0
MSG3 DC.B 'The sum of the two 2 digit numbers you entered is ', 0
end start
I am using the EASY68k Assembler.