merge nullenv into emul.c