I implement some basic function based on nachos.