| Games-NES-Emulator documentation | Contained in the Games-NES-Emulator distribution. |
CPU::Emulator::6502::Op::STY - Store the Y register in memory
Stores the Y register in memory address $addr.
Brian Cassidy <bricas@cpan.org>
Copyright 2007 by Brian Cassidy
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Games-NES-Emulator documentation | Contained in the Games-NES-Emulator distribution. |
package CPU::Emulator::6502::Op::STY; use strict; use warnings; use constant INSTRUCTIONS => { 0x84 => { addressing => 'zero_page', cycles => 3, code => \&sty, }, 0x94 => { addressing => 'zero_page_x', cycles => 4, code => \&sty, }, 0x8c => { addressing => 'absolute', cycles => 4, code => \&sty, }, };
sub sty { my $self = shift; $self->RAM_write( shift, $self->registers->{ y } ); }
1;