Update emulator.c

Specified internal halt flag as a global variable, and corrected immData
functions.