Browse Source

PUSH

master
Ben Kurtovic 8 years ago
parent
commit
3381c36c89
2 changed files with 15 additions and 5 deletions
  1. +11
    -1
      src/z80_ops.inc.c
  2. +4
    -4
      src/z80_tables.inc.c

+ 11
- 1
src/z80_ops.inc.c View File

@@ -218,7 +218,17 @@ static uint8_t z80_inst_ld_dd_nn(Z80 *z80, uint8_t opcode)

// LD SP, IY

// PUSH qq
/*
PUSH qq (0xC5, 0xD5, 0xE5, 0xF5):
Push qq onto the stack, and decrement SP by two.
*/
static uint8_t z80_inst_push_qq(Z80 *z80, uint8_t opcode)
{
uint8_t pair = extract_pair(opcode);
stack_push(z80, pair);
z80->regfile.pc++;
return 11;
}

// PUSH IX



+ 4
- 4
src/z80_tables.inc.c View File

@@ -199,7 +199,7 @@ static DispatchTable instruction_table = {
[0xC2] = z80_inst_jp_cc_nn,
[0xC3] = z80_inst_jp_nn,
[0xC4] = z80_inst_call_cc_nn,
[0xC5] = z80_inst_unimplemented, // TODO
[0xC5] = z80_inst_push_qq,
[0xC6] = z80_inst_unimplemented, // TODO
[0xC7] = z80_inst_unimplemented, // TODO
[0xC8] = z80_inst_unimplemented, // TODO
@@ -215,7 +215,7 @@ static DispatchTable instruction_table = {
[0xD2] = z80_inst_jp_cc_nn,
[0xD3] = z80_inst_out_n_a,
[0xD4] = z80_inst_call_cc_nn,
[0xD5] = z80_inst_unimplemented, // TODO
[0xD5] = z80_inst_push_qq,
[0xD6] = z80_inst_unimplemented, // TODO
[0xD7] = z80_inst_unimplemented, // TODO
[0xD8] = z80_inst_unimplemented, // TODO
@@ -231,7 +231,7 @@ static DispatchTable instruction_table = {
[0xE2] = z80_inst_jp_cc_nn,
[0xE3] = z80_inst_unimplemented, // TODO
[0xE4] = z80_inst_call_cc_nn,
[0xE5] = z80_inst_unimplemented, // TODO
[0xE5] = z80_inst_push_qq,
[0xE6] = z80_inst_unimplemented, // TODO
[0xE7] = z80_inst_unimplemented, // TODO
[0xE8] = z80_inst_unimplemented, // TODO
@@ -247,7 +247,7 @@ static DispatchTable instruction_table = {
[0xF2] = z80_inst_jp_cc_nn,
[0xF3] = z80_inst_di,
[0xF4] = z80_inst_call_cc_nn,
[0xF5] = z80_inst_unimplemented, // TODO
[0xF5] = z80_inst_push_qq,
[0xF6] = z80_inst_unimplemented, // TODO
[0xF7] = z80_inst_unimplemented, // TODO
[0xF8] = z80_inst_unimplemented, // TODO


Loading…
Cancel
Save