1
0
Fork 0

Fix LAHF and SAHF

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@867
This commit is contained in:
Sjoerd van der Berg 2003-04-04 21:05:54 +00:00
parent d9410982d0
commit fe77e30d77
2 changed files with 6 additions and 5 deletions

View file

@ -111,7 +111,7 @@ static OpCode OpCodeTable[1024]={
{D_CBW ,0 ,0 ,0 },{D_CWD ,0 ,0 ,0 },
{L_Ifw ,O_CALL_F ,S_CSIP ,0 },{L_ERROR ,0 ,0 ,0 },
{L_FLG ,0 ,S_PUSHw,0 },{L_POPw ,0 ,S_FLGw ,0 },
{L_FLG ,0 ,S_REGb ,REGI_AH},{L_REGb ,0 ,S_FLGb ,REGI_AH},
{L_REGb ,0 ,S_FLGb ,REGI_AH},{L_FLG ,0 ,S_REGb ,REGI_AH},
/* 0xa0 - 0xa7 */
{L_OP ,O_ALOP ,0 ,0 },{L_OP ,O_AXOP ,0 ,0 },
@ -469,7 +469,7 @@ static OpCode OpCodeTable[1024]={
{D_CBW ,0 ,0 ,0 },{D_CDQ ,0 ,0 ,0 },
{L_Ifd ,O_CALL_F ,S_CSIP ,0 },{L_ERROR ,0 ,0 ,0 },
{L_FLG ,0 ,S_PUSHd,0 },{L_POPd ,0 ,S_FLGd ,0 },
{L_FLG ,0 ,S_REGb ,REGI_AH},{L_REGb ,0 ,S_FLGb ,REGI_AH},
{L_REGb ,0 ,S_FLGb ,REGI_AH},{L_FLG ,0 ,S_REGb ,REGI_AH},
/* 0x2a0 - 0x2a7 */
{L_OP ,O_ALOP ,0 ,0 },{L_OP ,O_EAXOP ,0 ,0 },

View file

@ -91,9 +91,10 @@ switch (inst.code.save) {
LoadIP();
break;
case S_FLGb:
flags.type=t_UNKNOWN; \
flags.cf =(inst.op1.d & 0x001)>0;flags.pf =(inst.op1.d & 0x004)>0; \
flags.af =(inst.op1.d & 0x010)>0;flags.zf =(inst.op1.d & 0x040)>0; \
flags.of =get_OF();
flags.type=t_UNKNOWN;
flags.cf =(inst.op1.d & 0x001)>0;flags.pf =(inst.op1.d & 0x004)>0;
flags.af =(inst.op1.d & 0x010)>0;flags.zf =(inst.op1.d & 0x040)>0;
flags.sf =(inst.op1.d & 0x080)>0;
break;
case S_FLGw: