CPU::Emulator::6502::Op::INY - Increment the Y registers


Games-NES-Emulator documentation Contained in the Games-NES-Emulator distribution.

Index


Code Index:

NAME

Top

CPU::Emulator::6502::Op::INY - Increment the Y registers

SYNOPSIS

Top

DESCRIPTION

Top

METHODS

Top

iny( )

Increments the Y register by 1.

AUTHOR

Top

Brian Cassidy <bricas@cpan.org>

COPYRIGHT AND LICENSE

Top

SEE ALSO

Top

* CPU::Emulator::6502

Games-NES-Emulator documentation Contained in the Games-NES-Emulator distribution.
package CPU::Emulator::6502::Op::INY;

use strict;
use warnings;

use constant INSTRUCTIONS => {
    0xC8 => {
        cycles => 2,
        code => \&iny,
    }
};

sub iny {
    my $self = shift;
    my $reg = $self->registers;

    $reg->{ y } = ( $reg->{ y } + 1 ) & 0xff;
    $self->set_nz( $reg->{ y } );
}

1;