+ added the Z80 individual flag bits as subregisters

git-svn-id: trunk@45342 -
This commit is contained in:
nickysn 2020-05-11 19:17:31 +00:00
parent b98cc1ebff
commit 4abc498f2f
11 changed files with 116 additions and 8 deletions

View File

@ -29,7 +29,7 @@ interface
cpuBase,cgBase;
type
TRegNameTable = array[tregisterindex] of string[14];
TRegNameTable = array[tregisterindex] of string[19];
TRegisterIndexTable = array[tregisterindex] of tregisterindex;
function findreg_by_number_table(r:Tregister;const regnumber_index:TRegisterIndexTable):tregisterindex;

View File

@ -27,6 +27,18 @@ NR_HL_ = tregister($05030005);
NR_SP = tregister($05030008);
NR_F = tregister($05010009);
NR_F_ = tregister($0501000a);
NR_CARRYFLAG = tregister($050f0006);
NR_ADDSUBTRACTFLAG = tregister($05100006);
NR_PARITYOVERFLOWFLAG = tregister($05110006);
NR_HALFCARRYFLAG = tregister($05130006);
NR_ZEROFLAG = tregister($05150006);
NR_SIGNFLAG = tregister($05160006);
NR_CARRYFLAG_ = tregister($050f000a);
NR_ADDSUBTRACTFLAG_ = tregister($0510000a);
NR_PARITYOVERFLOWFLAG_ = tregister($0511000a);
NR_HALFCARRYFLAG_ = tregister($0513000a);
NR_ZEROFLAG_ = tregister($0515000a);
NR_SIGNFLAG_ = tregister($0516000a);
NR_PC = tregister($0503000b);
NR_I = tregister($0501000c);
NR_R = tregister($0501000d);

View File

@ -27,6 +27,18 @@
20,
23,
24,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
21,
25,
22

View File

@ -1,2 +1,2 @@
{ don't edit, this file is generated from z80reg.dat }
31
43

View File

@ -27,6 +27,18 @@ tregister($05030005),
tregister($05030008),
tregister($05010009),
tregister($0501000a),
tregister($050f0006),
tregister($05100006),
tregister($05110006),
tregister($05130006),
tregister($05150006),
tregister($05160006),
tregister($050f000a),
tregister($0510000a),
tregister($0511000a),
tregister($0513000a),
tregister($0515000a),
tregister($0516000a),
tregister($0503000b),
tregister($0501000c),
tregister($0501000d)

View File

@ -22,11 +22,23 @@
20,
26,
27,
29,
30,
41,
42,
22,
23,
24,
21,
25,
28
40,
28,
34,
29,
35,
30,
36,
31,
37,
32,
38,
33,
39

View File

@ -2,6 +2,8 @@
0,
7,
20,
29,
35,
11,
21,
1,
@ -10,6 +12,8 @@
22,
2,
15,
28,
34,
3,
16,
9,
@ -20,13 +24,21 @@
27,
5,
18,
31,
37,
10,
24,
29,
41,
12,
13,
6,
19,
28,
30,
25
36,
40,
42,
33,
39,
25,
32,
38

View File

@ -27,6 +27,18 @@
20,
23,
24,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
21,
25,
22

View File

@ -27,6 +27,18 @@
'sp',
'f',
'f''',
'carryflag',
'addsubtractflag',
'parityoverflowflag',
'halfcarryflag',
'zeroflag',
'signflag',
'carryflag''',
'addsubtractflag''',
'parityoverflowflag''',
'halfcarryflag''',
'zeroflag''',
'signflag''',
'pc',
'i',
'r'

View File

@ -27,6 +27,18 @@ RS_HL_ = 5;
RS_SP = 8;
RS_F = 9;
RS_F_ = 10;
RS_CARRYFLAG = 6;
RS_ADDSUBTRACTFLAG = 6;
RS_PARITYOVERFLOWFLAG = 6;
RS_HALFCARRYFLAG = 6;
RS_ZEROFLAG = 6;
RS_SIGNFLAG = 6;
RS_CARRYFLAG_ = 10;
RS_ADDSUBTRACTFLAG_ = 10;
RS_PARITYOVERFLOWFLAG_ = 10;
RS_HALFCARRYFLAG_ = 10;
RS_ZEROFLAG_ = 10;
RS_SIGNFLAG_ = 10;
RS_PC = 11;
RS_I = 12;
RS_R = 13;

View File

@ -44,6 +44,18 @@ SP,$05030008,sp,20,20
; Flags
F,$05010009,f,23,23
F_,$0501000a,f'',24,24
CARRYFLAG,$050f0006,carryflag,-1,-1
ADDSUBTRACTFLAG,$05100006,addsubtractflag,-1,-1
PARITYOVERFLOWFLAG,$05110006,parityoverflowflag,-1,-1
HALFCARRYFLAG,$05130006,halfcarryflag,-1,-1
ZEROFLAG,$05150006,zeroflag,-1,-1
SIGNFLAG,$05160006,signflag,-1,-1
CARRYFLAG_,$050f000a,carryflag'',-1,-1
ADDSUBTRACTFLAG_,$0510000a,addsubtractflag'',-1,-1
PARITYOVERFLOWFLAG_,$0511000a,parityoverflowflag'',-1,-1
HALFCARRYFLAG_,$0513000a,halfcarryflag'',-1,-1
ZEROFLAG_,$0515000a,zeroflag'',-1,-1
SIGNFLAG_,$0516000a,signflag'',-1,-1
; Program counter
PC,$0503000b,pc,21,21