Mark, most people here, including myself, won't be able to help you with assembly language. Only a few here have gone to the dark side and know assembly .

You said that the RETURN command in your subroutine doesn't seem to be working. It is very important to know the line where the program isn't working anymore. What I ussually do is to write a line of code to turn on an LED for 5 seconds. Then, I move that line toward the end of the program until the LED doesn't turn on anymore. Put this line before entering the subroutine and then inside the subroutine and let us know what you find out.