<commit_before># Copyright (C) 2001-2005, Parrot Foundation.
# This program is free software. It is subject to the same
# license as Perl itself.
#
# $Id$

=head1 NAME

examples/subs/jsr_ret.pasm - Jumping to subroutine

=head1 SYNOPSIS

    % ./parrot examples/subs/jsr_ret.pasm

=head1 DESCRIPTION

A program to demonstrate the use of the C<jump> and of the C<jsr> opcode.

=head1 SEE ALSO

F<docs/ops/core.pod>
F<docs/pdds/pdd03_calling_conventions.pod>

=cut

MAIN:       print "Example of the jump op.\n"
            print "\n"
            print "Jumping to subroutine SUB_1.\n"
            set_addr I1, SUB_1
            jump I1

RET:        print "Returned from subroutine SUB_1.\n"
            print "Jumping to subroutine SUB_2.\n"
            set_addr I3, SUB_2
            jsr I3
            print "Returned from subroutine SUB_2.\n"
            end

SUB_1:      print "Entered subroutine SUB_1.\n"
            set_addr I2, RET
            print "Returning from subroutine SUB_1.\n"
            jump I2

SUB_2:      print "Entered subroutine SUB_2.\n"
            print "Returning from subroutine SUB_2.\n"
            ret

<commit_msg>[copyright] fix a copyright notice.<commit_after># Copyright (C) 2001-2005, Parrot Foundation.
# This program is free software. It is subject to the same
# license as Parrot.
#
# $Id$

=head1 NAME

examples/subs/jsr_ret.pasm - Jumping to subroutine

=head1 SYNOPSIS

    % ./parrot examples/subs/jsr_ret.pasm

=head1 DESCRIPTION

A program to demonstrate the use of the C<jump> and of the C<jsr> opcode.

=head1 SEE ALSO

F<docs/ops/core.pod>
F<docs/pdds/pdd03_calling_conventions.pod>

=cut

MAIN:       print "Example of the jump op.\n"
            print "\n"
            print "Jumping to subroutine SUB_1.\n"
            set_addr I1, SUB_1
            jump I1

RET:        print "Returned from subroutine SUB_1.\n"
            print "Jumping to subroutine SUB_2.\n"
            set_addr I3, SUB_2
            jsr I3
            print "Returned from subroutine SUB_2.\n"
            end

SUB_1:      print "Entered subroutine SUB_1.\n"
            set_addr I2, RET
            print "Returning from subroutine SUB_1.\n"
            jump I2

SUB_2:      print "Entered subroutine SUB_2.\n"
            print "Returning from subroutine SUB_2.\n"
            ret


{'fraction_non_alphanumeric': 0.08178277801817395, 'fraction_numerical': 0.027693639117265252, 'mean_word_length': 2.0622516556291393, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5687896', 'n_tokens_mistral': 834, 'n_tokens_neox': 792, 'n_words': 245}