Clear and set flags in PSW