diff options
Diffstat (limited to 'usr.bin/oemu/cpu.c')
-rw-r--r-- | usr.bin/oemu/cpu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/usr.bin/oemu/cpu.c b/usr.bin/oemu/cpu.c index 9b8c622..8ec106a 100644 --- a/usr.bin/oemu/cpu.c +++ b/usr.bin/oemu/cpu.c @@ -163,6 +163,12 @@ cpu_kick(struct oemu_cpu *cpu, struct sysmem *mem) break; } + /* Is this a halt instruction? */ + if (inst->opcode == INST_HLT) { + printf("HALTED\n"); + break; + } + if (regs->ip >= MEMORY_SIZE) { break; } |