From 79ff304abce3f4a1e876e3335dbb890846ff3f3e Mon Sep 17 00:00:00 2001 From: Ian C Date: Sat, 16 Sep 2006 23:18:20 +0000 Subject: Fixed OUT (n),A --- src/z80_decode.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3