some basic chip code for AT89S51/52