diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/z80_decode.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/z80_decode.c b/src/z80_decode.c index 5fe52ea..c134b7b 100644 --- a/src/z80_decode.c +++ b/src/z80_decode.c @@ -2290,7 +2290,13 @@ void Z80_Decode(Z80 *cpu, Z80Byte opcode) case 0xd3: /* OUT (n),A */ TSTATE(11); if (cpu->pwrite) - cpu->pwrite(cpu,FETCH_BYTE,cpu->AF.b[HI]); + { + Z80Word port; + + port=FETCH_BYTE; + port|=(Z80Word)cpu->AF.b[HI]<<8; + cpu->pwrite(cpu,port,cpu->AF.b[HI]); + } else cpu->PC++; break; |