Added registerAs syscall. Fixed bugs in Send/Receive/Reply.