| Games-NES-Emulator documentation | Contained in the Games-NES-Emulator distribution. |
CPU::Emulator::6502::Op::STX - Store the X register in memory
Stores the X 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::STX; use strict; use warnings; use constant INSTRUCTIONS => { 0x86 => { addressing => 'zero_page', cycles => 3, code => \&stx, }, 0x96 => { addressing => 'zero_page_y', cycles => 4, code => \&stx, }, 0x8E => { addressing => 'absolute', cycles => 4, code => \&stx, }, };
sub stx { my $self = shift; $self->RAM_write( shift, $self->registers->{ x } ); }
1;