add function memtest.
modify memtest_sub with asm code.