updated for all hex values. Note invalid reg section is error prone