switch(ins) {
case 0x22: case 0x23: case 0x24: case 0x25:
case 0x26: case 0x27:
- vbra=true; PRINTF(L_SYS_EMU,"WARN: V-flag not yet calculated"); break;
+ vbra=true; break;
case 0x75:
case 0x8D:
case 0xC0: case 0xC1: case 0xC2: case 0xC3:
switch(ins) {
case 0x22: case 0x23: case 0x24: case 0x25:
case 0x26: case 0x27:
- vbra=true; PRINTF(L_SYS_EMU,"WARN: V-flag not yet calculated"); indirect=true; break;
+ vbra=true; indirect=true; break;
case 0xC3:
case 0xCE: case 0xCF:
case 0xD0: case 0xD1: case 0xD2: case 0xD3:
case 0x5C:
case 0x6C:
case 0x7C:
- op++; tst(op); break;
+ op++; cc.v=(op==0x80); tst(op); break;
case 0x3A: // DEC
case 0x4A:
case 0x5A:
case 0x6A:
case 0x7A:
- op--; tst(op); break;
+ op--; cc.v=(op==0x7f); tst(op); break;
case 0x33: // COM
case 0x43:
case 0x53:
case 0x50:
case 0x60:
case 0x70:
- op=~op+1; cc.c=(op!=0); tst(op); break;
+ op=~op+1; cc.c=(op!=0); cc.v=(op==0x80); tst(op); break;
case 0x42: // MUL
case 0x52:
{
cc.h=res_half > 0x0f;
cc.c=res > 0xff;
res&=0xff;
+ cc.v=((op+c)&0x80) ? ((a&0x80) && !(res&0x80)) : (!(a&0x80) && (res&0x80));
tst(res);
return res;
}
short res=(short)op1 - (short)op2 - (short)c;
cc.c=res < 0;
res&=0xff;
+ cc.v=((op2+c)&0x80) ? (!(op1&0x80) && (res&0x80)) : ((op1&0x80) && !(res&0x80));
tst(res);
return res;
}