Extra commands
This commit is contained in:
parent
ee40bed389
commit
5188e5cb3a
1 changed files with 7 additions and 1 deletions
|
@ -78,7 +78,7 @@ int emulate8080(State8080* state) {
|
|||
uint32_t res = h1 + bc;
|
||||
state->h = (res & 0xff) >> 8;
|
||||
state->l = res & 0xff;
|
||||
state->cc.cy = ((res & 0xffff0000) > 0);
|
||||
state->cc.cy = ((res & 0xffff0000) != 0);
|
||||
break;
|
||||
|
||||
case 0x0d: // DCR C
|
||||
|
@ -134,6 +134,12 @@ int emulate8080(State8080* state) {
|
|||
state->h = opcode[1];
|
||||
state->pc += 1;
|
||||
break;
|
||||
case 0x29: // DAD H
|
||||
uint32_t h1 = (state->h << 8) | state->l;
|
||||
uint32_t res = hl + hl;
|
||||
state->h = (res & 0xff00) >> 8;
|
||||
state->l = res & 0xff;
|
||||
state->cc.cy = ((res & 0xffff0000) != 0);
|
||||
case 0x31: // LXI SP, word
|
||||
state->sp = (opcode[2] << 8) | opcode[1]);
|
||||
state->pc += 2;
|
||||
|
|
Loading…
Reference in a new issue