Reg read and write functions now use nbytes param