; RETURN.ASM -- A subroutine advances one letter, then returns to its caller.
CHROUT      equ     $a002       ; Address of the ROM character-output vector.
CR          equ     13

            org     $3f00
start       lda     #'A         ; Begin with the letter A ($41).
call        jsr     nextletter  ; Save the address of 'display' on the S stack.
display     jsr     [CHROUT]    ; The subroutine has left the new letter in A.
            lda     #CR
            jsr     [CHROUT]
            rts                 ; Finish the main program and return to BASIC.

nextletter  inca                ; ASCII B follows ASCII A.
back        rts                 ; Retrieve the saved address and resume at display.
            end     start
