optimize get/set sx functions

by sacrificing a small rodent, we found some instructions here and there
Merge pull request #3 from kaffeemonster/sx_opt

optimize get/set sx functions