From c950e4bc839ca2d898cd72d9dbca7efb2d92677b Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sat, 2 Feb 2019 15:42:45 -0800 Subject: Implemented SET instruction in Z80 core --- z80.cpu | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/z80.cpu b/z80.cpu index 7a6b14c..47f90c8 100644 --- a/z80.cpu +++ b/z80.cpu @@ -1791,4 +1791,42 @@ fdcb 10BBB110 res_iyd 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 -- cgit v1.2.3