# HG changeset patch # User Michael Pavone # Date 1549150965 28800 # Node ID bd13d017f16f0ed5fa40270bdaa85a33a8b94697 # Parent b0e01e64d76df19e021893ce75b8bb1f379d4a18 Implemented SET instruction in Z80 core diff -r b0e01e64d76d -r bd13d017f16f z80.cpu --- 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