changeset 1729:bd13d017f16f

Implemented SET instruction in Z80 core
author Michael Pavone <pavone@retrodev.com>
date Sat, 02 Feb 2019 15:42:45 -0800
parents b0e01e64d76d
children 71f7827ff30a
files z80.cpu
diffstat 1 files changed, 39 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/z80.cpu	Sat Feb 02 15:35:15 2019 -0800
+++ b/z80.cpu	Sat Feb 02 15:42:45 2019 -0800
@@ -1791,4 +1791,42 @@
 	z80_res_index B tmp
 	
 fdcb 10BBBRRR res_iyd_reg
-	z80_res_index B main.R
\ No newline at end of file
+	z80_res_index B main.R
+	
+cb 11BBBRRR set_reg
+	local tmp 8
+	lsl 1 B tmp
+	or main.R tmp main.R
+	
+cb 11BBB110 set_hl
+	z80_fetch_hl
+	cycles 1
+	local tmp 8
+	lsl 1 B tmp
+	or scratch1 tmp scratch1
+	z80_store_hl
+	
+z80_set_index
+	arg bit 8
+	arg tmp 8
+	lsl 1 bit tmp
+	mov wz scratch1
+	ocall read_8
+	cycles 1
+	or scratch1 tmp tmp
+	mov tmp scratch1
+	z80_store_index
+	
+ddcb 11BBB110 set_ixd
+	local tmp 8
+	z80_set_index B tmp
+	
+ddcb 11BBBRRR set_ixd_reg
+	z80_set_index B main.R
+	
+fdcb 11BBB110 set_iyd
+	local tmp 8
+	z80_set_index B tmp
+	
+fdcb 11BBBRRR set_iyd_reg
+	z80_set_index B main.R
\ No newline at end of file