Mega88 basic function and simulation