Rolled back reg_di,reg_do changes. Limited testing ok