Need help with assemble code

This current assignment that I am doing is a little too challenging for me. It has a list of 4 requirements that progressively build on each other. I have managed to get requirement 2 working. I am not sure if it is acceptable to post the assignment specs here or not so I will paraphrase them.

This is the segment of code where I think I have the problem, if more code is need I am happy to add all of it, but thought just for starter this would be a good place to be.

Sorry I am not very good at this, my whole assignment is a mismatch of bits of code found here and there, I am sure there is quite a bit of it that does absolutely nothing. I really do apologise for my ignorance, but I am giving this assignment 120% effort, I am just not getting it very well.

CONVERT MOVE.W D2,D0;get the number ASR.W D1,D0;shift the number first right bit AND.W #$000F,D0;discard the other bits for this exercise ;(we can only work on one digit at a time) ADD.W #'0',D0;convert to ascii by adding zero CMP.W #'9',D0; check if the number is greater than 9 (hex digit max)
        BLE        NEXT_BIT;if it is greater than nine move the bit left
        ADD.W    #$07,D0; add seven to the value to take to the next bit

NEXT_BIT TRAP #14;complete the outch function and display character
SUBQ.W #04,D1; subtract 4 to point to the next digit
BGE CONVERT;repeat convert subroutine if there are more digits to process
MOVE.W D2,D0

        MOVE.W     (SP)+,D1;restore stack registers
        MOVE.W    (SP)+,D2
        MOVE.W    (SP)+,D7
        
        RTS        ;;return from subroutine</blockquote>