add stack

add stack pointer
& code sort