- AUTHOR, COPYRIGHT and LICENCE
CPU::Emulator::Z80::Register16 - a 16 bit register for a Z80
This class implements a 16-bit register for a Z80.
Returns an object. Takes two or three named parameters:
mandatory, a reference to the CPU this register lives in, mostly so that operations on the register can get at the flags register.
and either of:
The value to initialise the register to;
- get, set
Subroutines to call when getting/setting the register instead of the default get/set methods. The 'get' subroutine will be passed no parameters, the 'set' subroutine will be passed the new value. Consequently, they are expected to be closures if they are to be of any use.
Get the register's current value.
Set the register's value to whatever is passed in as a parameter.
Add the specified value to the register, frobbing flags
Subtract the specified value from the register.
These use the implementation from the parent class
AUTHOR, COPYRIGHT and LICENCE
Copyright 2008 David Cantrell <email@example.com>
This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively.
This module is also free-as-in-mason software.