org $1000
                lea msg,a1
                move.w size,d1
                move.w #1,d0
                trap #15

                lea input,a1
                move.w #10,d1
                move.w #2,d0
                trap #15


                lea msg1,a1
                move.w size1,d1
                move.w #1,d0
                trap #15

                lea input,a1
                adda.l #10,a1
                move.w #1,d1
                move.b #10,d2
         loop:  suba.l #1,a1
                subi.b #1,d2
                move.w #1,d0
                trap #15
                cmpi.b #0,d2
				bgt loop

                clr.l d1
                move.l #0,a1
                move.w #0,d0
                trap #15
                
                stop #$2700


                
	   msg: dc.b 'Please input a string(10 characters):'
	  size: dc.w 37
	  msg1: dc.b 'This is the reverse of your string:'
	 size1: dc.w 35
	 input: ds.w 10

                end $1000

    Source: geocities.com/wonlin/Assembly

               ( geocities.com/wonlin)