diff options
author | Ian C <ianc@noddybox.co.uk> | 2006-09-16 23:18:20 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2006-09-16 23:18:20 +0000 |
commit | 79ff304abce3f4a1e876e3335dbb890846ff3f3e (patch) | |
tree | 2148968bf4332b24bc69644f69536263c96e5d72 /src/z80_decode.c | |
parent | f76b8997620b8fb22f3b3c650c6fa9005b7d660b (diff) |
Fixed OUT (n),A
Diffstat (limited to 'src/z80_decode.c')
-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; |