Hello
If I add two numbers say, 5 and 5 to equal 10 .
I can see from the screen dump that d0 contains A
How do I go about converting A so as to display the number 10 on the screen? I guess I have to convert to ascii value, but dont know how to do this
start org $1000
move.l #$7ffe,sp ;init stack pointer
sub.l #4,sp ;stack space fr answer
move.w #5,-(sp) ;push parameter 1
move.w #5,-(sp) ;push parameter 2
bsr addit ;go to addit
add.l #4,sp ;remove parameters
move.l (sp)+,ans ;pop result into ans
move.l ans,d0 ;
move.l #248,d7 ;to display
trap #14 ;
move.b #228,d7 ;ready to exit
trap #14 ;done
addit move.w 4(sp),d0 ;get parameter 2
move.w 6(sp),d1 ;get parameter 1
add d0,d1 ;add
move.l d1,8(sp) ;result on the stack
rts ;return to caller
ans ds.l 1 ;space for answer
end