+ unsigned int dst, cnt;
+ unsigned char flags;
+
+ /* ASL, dest, count
+ while (count != 0)
+ C = dest.80H; dest <<= 1; if sign chg then set V=1
+ this is a confusing one...
+ */
+
+ flags = get_psw();
+ flags &= ~BIT_ALL; /* clear these bits */
+
+ switch(operands) {
+ //{0,0xc150,0xf300,' ',2,ASL, REG_REG }, // ASL Rd, Rs 1 1 0 0 S S 0 1 d d d d s s s s
+ case REG_REG :
+ cnt = reg1(RI_0F) & 0x1f;
+ switch (code & 0xc00) {
+ case 0: // byte
+ dst = reg1(RI_F0);
+ dst <<= cnt;
+ set_reg1(RI_F0,dst);
+ if (dst & 0x100)
+ flags |= BIT_C;
+ if ((dst & 0xff) == 0)
+ flags |= BIT_Z;
+ break;
+ case 1: // word
+ dst = reg2(RI_F0);
+ dst <<= cnt;
+ set_reg2(RI_F0,dst);
+ if (dst & 0x10000)
+ flags |= BIT_C;
+ if ((dst & 0xffff) == 0)
+ flags |= BIT_Z;
+ break;
+ case 3: // dword
+ //dst = reg4(RI_F0);
+ dst = reg2(RI_F0) | (reg2(RI_F0 + 2) << 16);
+ if ((cnt != 0) && (dst & (0x80000000 >> (cnt-1)))) {
+ flags |= BIT_C;
+ }
+ dst <<= cnt;
+ set_reg2(RI_F0,dst & 0xffff);
+ set_reg2(RI_F0+2, (dst>>16) & 0xffff);
+ if (dst == 0)
+ flags |= BIT_Z;
+ break;
+ }
+ break;
+
+ case REG_DATA4 :
+ case REG_DATA5 :
+ switch (code & 0xc00) {
+ case 0: // byte
+ dst = reg1(RI_F0);
+ cnt = operands & 0x0f;
+ dst <<= cnt;
+ set_reg1(RI_F0,dst);
+ if (dst & 0x100)
+ flags |= BIT_C;
+ if ((dst & 0xff) == 0)
+ flags |= BIT_Z;
+ break;
+ case 1: // word
+ dst = reg2(RI_F0);
+ cnt = operands & 0x0f;
+ dst <<= cnt;
+ set_reg2(RI_F0,dst);
+ if (dst & 0x10000)
+ flags |= BIT_C;
+ if ((dst & 0xffff) == 0)
+ flags |= BIT_Z;
+ break;
+ case 3: // dword
+ dst = reg1(RI_F0 & 0xe);
+ cnt = operands & 0x1f;
+ if ((cnt != 0) && (dst & (0x80000000 >> (cnt-1)))) {
+ flags |= BIT_C;
+ }
+ dst <<= cnt;
+ set_reg2(RI_F0,dst & 0xffff);
+ set_reg2(RI_F0+2, (dst>>16) & 0xffff);
+ if (dst == 0)
+ flags |= BIT_Z;
+ break;
+ }
+ break;
+ }
+ set_psw(flags);
+