AltairZ80: i86: Don't clear segment override on REPE/REPNE
MASM generates REP CS:MOVSW as: REP CS: MOVSW The Seattle Computer Products 8086 assembler allows the segment override as a discrete opcode. This means that: CS: REP MOVSW is also possible, and in fact used in the SCP Monitor v1.6. The i86 emulator was clearing the override flags when REPE/REPNE, is encountered, which causes the segment override to be lost. Verifying the behavior of a real 80286 processor in an IBM PC/AT (5170) using MS-DOS 6.22 DEBUG shows that both instruction sequences yield the desired segment override.
This commit is contained in:
parent
e1d27aa167
commit
e91fbebe3d
1 changed files with 0 additions and 2 deletions
|
@ -4321,14 +4321,12 @@ static void i86op_lock(PC_ENV *m)
|
|||
static void i86op_repne(PC_ENV *m)
|
||||
{
|
||||
m->sysmode |= SYSMODE_PREFIX_REPNE;
|
||||
DECODE_CLEAR_SEGOVR(m);
|
||||
}
|
||||
|
||||
/*opcode=0xf3*/
|
||||
static void i86op_repe(PC_ENV *m)
|
||||
{
|
||||
m->sysmode |= SYSMODE_PREFIX_REPE;
|
||||
DECODE_CLEAR_SEGOVR(m);
|
||||
}
|
||||
|
||||
/*opcode=0xf4*/
|
||||
|
|
Loading…
Add table
Reference in a new issue