;SET some stuff

SET J, jump

ADD J, 1

;Will run testsub1 on first pass

;But on second pass, target is changed to testsub2

:jump

JSR testsub1

;go to end after second pass

SET PC, end

;Set a test value, modify the JSR target

;clear the stack, then go back to beginning

:testsub1

SET I, 0xdddd

SET [J], testsub2

SET A, POP

SET PC, jump

;change test value to desired final value

;exit sub normally with a POP

:testsub2

SET I, 0xeeee

SET PC, POP

:end

;see if the code gets here

SET B, 0xeeee