diff options
author | Ian C <ianc@noddybox.co.uk> | 2006-09-16 23:17:51 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2006-09-16 23:17:51 +0000 |
commit | 9e7e165b9be32bb411fdec110d4a0a0947d4c93b (patch) | |
tree | e71559cbed4fa9dedb60379ed3e4a6138b86cad5 /z80_decode.c | |
parent | 61b364c3dfeb99579304d83273c06846ed2e75f8 (diff) |
Fixed OUT (n),A
Diffstat (limited to 'z80_decode.c')
-rw-r--r-- | z80_decode.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/z80_decode.c b/z80_decode.c index 5fe52ea..c134b7b 100644 --- a/z80_decode.c +++ b/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; |