1
0
Fork 0

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:
Sjoerd van der Berg 2004-01-11 12:31:12 +00:00
parent 73879ec6b7
commit 4a016f2b4b
4 changed files with 6 additions and 2 deletions

View file

@ -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:

View file

@ -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--) {

View file

@ -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 */
{

View file

@ -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--) {