From c6ec8026bc3131ae20b0552e7c97cb1315053e59 Mon Sep 17 00:00:00 2001 From: Roberto Fresca Date: Mon, 6 Oct 2008 21:57:27 +0000 Subject: [PATCH] Fixed the i8051 AJMP opcode to take 2 bytes instead of 3. Please also credit Grull Osgo. --- src/emu/cpu/i8051/8051dasm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emu/cpu/i8051/8051dasm.c b/src/emu/cpu/i8051/8051dasm.c index b511fcea5ff..11cb5e2e1d6 100644 --- a/src/emu/cpu/i8051/8051dasm.c +++ b/src/emu/cpu/i8051/8051dasm.c @@ -244,7 +244,7 @@ unsigned i8051_dasm(char *dst, unsigned pc, const UINT8 *oprom, const UINT8 *opr case 0xc1: case 0xe1: addr = opram[PC++ - pc]; - addr|= (PC++ & 0xf800) | ((op & 0xe0) << 3); + addr|= (PC & 0xf800) | ((op & 0xe0) << 3); sprintf(dst, "ajmp $%04X", addr); break;