Halt simulation when the processor stopped on WAIT instruction
with interrupts disabled.
Use pread, pwrite for sdcard file i/o.