Added setSreg functions to prevent code duplication