The hlt instruction

If you are needing help, or have questions for the different assembly languages available.

Moderator: Moderators

Post Reply
michael
Posts: 29
Joined: Thu Nov 15, 2007 12:06 am

The hlt instruction

Post by michael » Fri Jan 04, 2008 11:07 pm

Sorry I just keep asking the complicated questions :P Well when the hlt instruction is um executed will the cpu just:

Not increase the instruction pointer and therefore execute hlt until an interupt occurs, or

Actully turn off the cpu/put it in idle?

Cuz i heard thats what Vista does, well that and downclock the cpu when its not in use but I think thats asking a litle to much :lol:

User avatar
Mike
Site Admin
Posts: 465
Joined: Sat Oct 20, 2007 7:58 pm
Contact:

Post by Mike » Sun Jan 06, 2008 4:23 pm

Hey,

Sorry I just keep asking the complicated questions :)

No worries--That is what we are here for ;)

HLT does indeed temporally stop the processor. In other words, it is in an idle state until an interrupt happens to take it out of the idle state, or the NMI pin is activated.
Lead Programmer for BrokenThorn Entertainment, Co.
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com

Liza
Posts: 3
Joined: Fri Nov 07, 2008 4:12 pm

increase the instruction

Post by Liza » Fri Nov 07, 2008 4:16 pm

Well when the hlt instruction is um executed will the cpu just:

Not increase the instruction pointer and therefore execute hlt until an interupt occurs, or

Actully turn off the cpu/put it in idle?

User avatar
Mike
Site Admin
Posts: 465
Joined: Sat Oct 20, 2007 7:58 pm
Contact:

Post by Mike » Sat Nov 08, 2008 3:57 pm

Actully turn off the cpu/put it in idle?

HLT puts the processor into its HALT state. Only an enabled interrupt (Including NMI), debug exception, BINIT# signal, INIT# signal, or a RESET# signal can resume operation.

If a processor supports hyperthreading, or this is a multi-processor system, only the logical processor that executes HLT will be halted. The other processors continue execution. The system software or executive would need to HLT all logical processors in order to put each logical processor into a HLT state.

Post Reply