@Override
    public void reset(Object param) {
        /*unsigned*/ int i, j, c;

        int[] reg_name = {AL, CL, DL, BL, AH, CH, DH, BH};

        I.sregs[CS] = 0xffff;
        I.base[CS] = I.sregs[CS] << 4;
        change_pc20((I.base[CS] + I.ip));

        for (i = 0; i < 256; i++) {
            for (j = i, c = 0; j > 0; j >>= 1) {
                if ((j & 1) != 0) {
                    c++;
                }
            }
            parity_table[i] = ((c & 1) == 0 ? 1 : 0);
        }
        I.ZeroVal = I.ParityVal = 1;
        SetMD(1);						/* set the mode-flag = native mode */

        for (i = 0; i < 256; i++) {
            Mod_RM.reg.b[i] = reg_name[(i & 0x38) >> 3];
            Mod_RM.reg.w[i] = ((i & 0x38) >> 3);
        }

        for (i = 0xc0; i < 0x100; i++) {
            Mod_RM.RM.w[i] = (i & 7);
            Mod_RM.RM.b[i] = reg_name[i & 7];
        }
    }