added asm stub, and cpp implementation