tweaked for new rev of compiler, and for testing of thumb in/up switch.