register-pseudo code