HLT

From: Jens Gruschel (nospam_at_pegtop.net)
Date: 06/23/04


Date: Wed, 23 Jun 2004 19:43:56 +0200

Just curious...

What happens if I execute a HLT command on Windows NT? I tried it with good
old DOS DEBUG and the DOS box froze. So I guess in protected mode the HLT
only halts the current process. But what's happening behind the scenes? Is
there an interrupt that tells the OS that the process has been halted? A
friend of mine told me that Windows NT simply doesn't allow HLT (to halt the
whole CPU). But I think this answer is too simple, because it doesn't say
how this is prevented, and there is nothing that stops you from coding "asm
hlt end;", right? Has it something to do with the GDT for the current
process? Is it similar to the question how direct port access / memory
access violations are treated? I know a bit how the MMU works, so I have a
slight idea how it might work, but I'm very curious about your
explainatins...

Jens



Relevant Pages

  • Re: HLT
    ... > What happens if I execute a HLT command on Windows NT? ... > old DOS DEBUG and the DOS box froze. ... So I guess in protected mode the HLT ... HLT is a privileged instruction so you can't execute it without ...
    (borland.public.delphi.language.basm)
  • Re: HLT
    ... > What happens if I execute a HLT command on Windows NT? ... So I guess in protected mode the HLT ... > there an interrupt that tells the OS that the process has been halted? ... want to Halt the system. ...
    (borland.public.delphi.language.basm)
  • Re: Power-saving patch to NTP
    ... HLT instructions are a complete red herring here. ... No mainstream Linux, and probably no Linux has not used ... started to do so too with Windows 2000. ... HLT makes the CPU enter C1-state, ...
    (comp.protocols.time.ntp)