Why use jmp $ to halt the system?
Posted: Sat Sep 01, 2007 1:20 pm
Hey everyone,
I have a question out of complete curiosity
I have seen alot of code use an infinity loop to "halt" execution. My question is "why"?
i.e., why not use HLT or a combination of CLI and HLT?
Is it just personal preference?
Using CLI in combination with HLT will completely halt the system, and is more efficient then a jmp $ instruction.
Using HLT alone halts the processor, but still allows execution of interrupts (Which can restart the processor, when needed)
Is there any specific reason?
Just curious,
Thanks
I have a question out of complete curiosity
I have seen alot of code use an infinity loop to "halt" execution. My question is "why"?
i.e., why not use HLT or a combination of CLI and HLT?
Is it just personal preference?
Using CLI in combination with HLT will completely halt the system, and is more efficient then a jmp $ instruction.
Using HLT alone halts the processor, but still allows execution of interrupts (Which can restart the processor, when needed)
Is there any specific reason?
Just curious,
Thanks