summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2019-02-02 21:22:02 -0800
committerMichael Pavone <pavone@retrodev.com>2019-02-02 21:22:02 -0800
commit0d51635f43fe9a94ca1568a972c7ef6bf7afe552 (patch)
tree0bd9637994d90eef99520369288edb9b8d8b6e81
parent7b52486266a9eb523e699831c6f721d1da365d03 (diff)
Implemented ld a,r and ld a,i in new Z80 core
-rw-r--r--z80.cpu15
1 files changed, 15 insertions, 0 deletions
diff --git a/z80.cpu b/z80.cpu
index 8b589ce..1db3630 100644
--- a/z80.cpu
+++ b/z80.cpu
@@ -11,6 +11,7 @@ regs
alt 8 b' c' d' e' h' l' f' a'
i 8
r 8
+ rhigh 8
iff1 8
iff2 8
imode 8
@@ -389,8 +390,22 @@ ed 01000111 ld_i_a
ed 01001111 ld_r_a
mov a r
+ and 0x80 a rhigh
cycles 1
+ed 01011111 ld_a_r
+ cycles 1
+ and 0x7F r a
+ or rhigh a a
+ update_flags SZYH0XN0
+ mov iff2 pvflag
+
+ed 01010111 ld_a_i
+ cycles 1
+ mov i a
+ update_flags SZYH0XN0
+ mov iff2 pvflag
+
00000001 ld_bc_immed
meta high b
meta low c