Please check SmileBASIC Source for details