home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / os2 / programm / 6607 < prev    next >
Encoding:
Internet Message Format  |  1992-11-21  |  1.2 KB

  1. Path: sparky!uunet!cs.utexas.edu!usc!rpi!psinntp!psinntp!dg-rtp!salzo!dburton
  2. From: dburton@salzo.Cary.NC.US (David Burton)
  3. Newsgroups: comp.os.os2.programmer
  4. Subject: Executing HLT in an application
  5. Message-ID: <JsgkuB1w165w@salzo.Cary.NC.US>
  6. Date: Fri, 20 Nov 92 21:01:06 EST
  7. Organization: SalzoBoard BBS
  8. Lines: 22
  9.  
  10.  
  11. The CPU in my notebook computer consumes much less power (i.e., goes
  12. into a standby mode) when executing a HLT (halt) instruction.  I've
  13. written a little utility that can tell when the CPU is being little-
  14. utilized, and it slows down the clock to save power when it detects
  15. that situation.  However, it would save even more if it executed the
  16. HLT instruction.  That'd be no problem except that...
  17.  
  18. ...the darn HLT instruction is privileged.
  19.  
  20. Of course, there is no good reason for it to be privileged... it is no
  21. more "dangerous" than "JMP $".  However, Intel goofed (and Cyrix 
  22. dutifully
  23. cloned the goof), so there's nothing that I can do about it.
  24.  
  25. My question, then, is, "what is the best way to get a few bytes of
  26. ring 0 code executed by my application?"  A device driver?  Or is there
  27. a better/simpler way?
  28.  
  29. All advice will be appreciated...
  30.  
  31. -Dave
  32.