mirror of
https://github.com/holub/mame
synced 2025-04-20 23:42:22 +03:00
i86 - Implemented POP CS and MOV CS,reg instructions that are 8086 specific [Miodrag Milanovic]
This commit is contained in:
parent
df5254338f
commit
8f7dba221c
@ -772,7 +772,17 @@ static void PREFIX86(_push_cs)(i8086_state *cpustate) /* Opcode 0x0e */
|
||||
PUSH(cpustate->sregs[CS]);
|
||||
}
|
||||
|
||||
/* Opcode 0x0f invalid */
|
||||
#ifndef I80286
|
||||
static void PREFIX86(_pop_cs)(i8086_state *cpustate) /* Opcode 0x0f */
|
||||
{
|
||||
int ip = cpustate->pc - cpustate->base[CS];
|
||||
ICOUNT -= timing.push_seg;
|
||||
POP(cpustate->sregs[CS]);
|
||||
cpustate->base[CS] = SegBase(CS);
|
||||
cpustate->pc = (ip + cpustate->base[CS]) & AMASK;
|
||||
CHANGE_PC(cpustate->pc);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void PREFIX86(_adc_br8)(i8086_state *cpustate) /* Opcode 0x10 */
|
||||
{
|
||||
@ -2714,7 +2724,14 @@ static void PREFIX(_mov_sregw)(i8086_state *cpustate) /* Opcode 0x8e */
|
||||
PREFIX(_instruction)[FETCHOP](cpustate);
|
||||
break;
|
||||
case 0x08: /* mov cs,ew */
|
||||
break; /* doesn't do a jump far */
|
||||
#ifndef I80186
|
||||
int ip = cpustate->pc - cpustate->base[CS];
|
||||
cpustate->sregs[CS] = src;
|
||||
cpustate->base[CS] = SegBase(CS);
|
||||
cpustate->pc = (ip + cpustate->base[CS]) & AMASK;
|
||||
CHANGE_PC(cpustate->pc);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -28,6 +28,9 @@ static void PREFIX86(_or_r16w)(i8086_state *cpustate);
|
||||
static void PREFIX86(_or_ald8)(i8086_state *cpustate);
|
||||
static void PREFIX86(_or_axd16)(i8086_state *cpustate);
|
||||
static void PREFIX86(_push_cs)(i8086_state *cpustate);
|
||||
#ifndef I80286
|
||||
static void PREFIX86(_pop_cs)(i8086_state *cpustate);
|
||||
#endif
|
||||
static void PREFIX86(_adc_br8)(i8086_state *cpustate);
|
||||
static void PREFIX86(_adc_wr16)(i8086_state *cpustate);
|
||||
static void PREFIX86(_adc_r8b)(i8086_state *cpustate);
|
||||
|
@ -15,7 +15,7 @@ static void (*const PREFIX86(_instruction)[256])(i8086_state *cpustate) =
|
||||
PREFIX86(_or_ald8), /* 0x0c */
|
||||
PREFIX86(_or_axd16), /* 0x0d */
|
||||
PREFIX86(_push_cs), /* 0x0e */
|
||||
PREFIX86(_invalid),
|
||||
PREFIX86(_pop_cs), /* 0x0f */
|
||||
PREFIX86(_adc_br8), /* 0x10 */
|
||||
PREFIX86(_adc_wr16), /* 0x11 */
|
||||
PREFIX86(_adc_r8b), /* 0x12 */
|
||||
|
Loading…
Reference in New Issue
Block a user