line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CPU::Emulator::Z80::Register8R; |
2
|
|
|
|
|
|
|
|
3
|
16
|
|
|
16
|
|
73065
|
use strict; |
|
16
|
|
|
|
|
34
|
|
|
16
|
|
|
|
|
396
|
|
4
|
16
|
|
|
16
|
|
71
|
use warnings; |
|
16
|
|
|
|
|
27
|
|
|
16
|
|
|
|
|
369
|
|
5
|
|
|
|
|
|
|
|
6
|
16
|
|
|
16
|
|
68
|
use vars qw($VERSION $AUTOLOAD); |
|
16
|
|
|
|
|
25
|
|
|
16
|
|
|
|
|
617
|
|
7
|
|
|
|
|
|
|
|
8
|
16
|
|
|
16
|
|
76
|
use base qw(CPU::Emulator::Z80::Register8); |
|
16
|
|
|
|
|
25
|
|
|
16
|
|
|
|
|
2376
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
$VERSION = '1.01'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 NAME |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
CPU::Emulator::Z80::Register8R - the R register for a Z80 |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 DESCRIPTION |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
This class is a ...::Register8 with a weird inc() method |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 METHODS |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
It has the same methods as its parent, with the following changes: |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head2 inc |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
The inc() method operates on the least significant 7 bits of the |
27
|
|
|
|
|
|
|
register only. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=cut |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub inc { |
32
|
4489
|
|
|
4489
|
1
|
32261
|
my $self = shift; |
33
|
4489
|
|
|
|
|
8617
|
my $r = $self->get(); |
34
|
4489
|
|
|
|
|
11746
|
$self->set(($r & 0b10000000) | (($r + 1) & 0b01111111)); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 BUGS/WARNINGS/LIMITATIONS |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
None known. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 AUTHOR, COPYRIGHT and LICENCE |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Copyright 2008 David Cantrell EFE |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
This software is free-as-in-speech software, and may be used, |
46
|
|
|
|
|
|
|
distributed, and modified under the terms of either the GNU |
47
|
|
|
|
|
|
|
General Public Licence version 2 or the Artistic Licence. It's |
48
|
|
|
|
|
|
|
up to you which one you use. The full text of the licences can |
49
|
|
|
|
|
|
|
be found in the files GPL2.txt and ARTISTIC.txt, respectively. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 CONSPIRACY |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
This module is also free-as-in-mason software. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=cut |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
1; |