Set and use the global direction flag variable
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1563
This commit is contained in:
parent
73879ec6b7
commit
4a016f2b4b
4 changed files with 6 additions and 2 deletions
|
@ -404,9 +404,11 @@ l_M_Ed:
|
|||
goto nextopcode;
|
||||
case D_CLD:
|
||||
SETFLAGBIT(DF,false);
|
||||
cpu.direction=1;
|
||||
goto nextopcode;
|
||||
case D_STD:
|
||||
SETFLAGBIT(DF,true);
|
||||
cpu.direction=-1;
|
||||
goto nextopcode;
|
||||
case D_WAIT:
|
||||
case D_NOP:
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
count_left=0;
|
||||
}
|
||||
}
|
||||
add_index=GETFLAG(DF) ? -1 : 1;
|
||||
add_index=cpu.direction;
|
||||
if (count) switch (inst.code.op) {
|
||||
case R_OUTSB:
|
||||
for (;count>0;count--) {
|
||||
|
|
|
@ -1064,9 +1064,11 @@
|
|||
break;
|
||||
CASE_B(0xfc) /* CLD */
|
||||
SETFLAGBIT(DF,false);
|
||||
cpu.direction=1;
|
||||
break;
|
||||
CASE_B(0xfd) /* STD */
|
||||
SETFLAGBIT(DF,true);
|
||||
cpu.direction=-1;
|
||||
break;
|
||||
CASE_B(0xfe) /* GRP4 Eb */
|
||||
{
|
||||
|
|
|
@ -46,7 +46,7 @@ static void DoString(STRING_OP type) {
|
|||
count_left=0;
|
||||
}
|
||||
}
|
||||
add_index=GETFLAG(DF) ? -1 : 1;
|
||||
add_index=cpu.direction;
|
||||
if (count) switch (type) {
|
||||
case R_OUTSB:
|
||||
for (;count>0;count--) {
|
||||
|
|
Loading…
Add table
Reference in a new issue