Bare Bones - hlt instruction inside or outside the for loop
Posted: Sun Jan 20, 2013 12:12 am
In the bare bones tutorial, this code executes if the kernel returns
If I understand correctly, the only way for the CPU to get out of the halt state is if there is an interrupt. But since we've disabled interrupts that can't happen. So is the above code the same as moving the hlt outside the loop?
Code: Select all
cli
.hang:
hlt ; halt machine should kernel return
jmp .hang