implement set/get regs functions, as they are frequent used