http://blog.csdn.net/sustzombie/archive/2010/06/12/5667563.aspx
虽然有错误,但是可以参考
http://www.ibm.com/developerworks/library/l-embdev/index.html