change <tab> and <ret> to more generic TAB and RET
refactor addr-to-location code for generic re-use