macro to easily switch between lpm/ld