Added longer example from http://forum.43oh.com/topic/2700-a-simple-shell-step-by-step-ez430-rf5000/#entry22559 by original author