add a new DEBUG mode for user programs
up_n_down mem optimization