internal-addreg function

For internal use