| Games-NES-Emulator documentation | Contained in the Games-NES-Emulator distribution. |
CPU::Emulator::6502::Op::STA - Store accumulator in memory
Stores the accumulator 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::STA; use strict; use warnings; use constant INSTRUCTIONS => { 0x80 => { addressing => 'zero_page', cycles => 3, code => \&sta, }, 0x95 => { addressing => 'zero_page_x', cycles => 4, code => \&sta, }, 0x8D => { addressing => 'absolute', cycles => 4, code => \&sta, }, 0x9D => { addressing => 'absolute_x', cycles => 5, code => \&sta, }, 0x99 => { addressing => 'absolute_y', cycles => 5, code => \&sta, }, 0x81 => { addressing => 'indirect_x', cycles => 6, code => \&sta, }, 0x91 => { addressing => 'indirect_y', cycles => 6, code => \&sta, }, };
sub sta { my $self = shift; $self->RAM_write( shift, $self->registers->{ acc } ); }
1;