You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

nap.c 370B

123456789101112
  1. #include <realmode.h>
  2. #include <bios.h>
  3. /**************************************************************************
  4. * Save power by halting the CPU until the next interrupt
  5. **************************************************************************/
  6. void cpu_nap ( void ) {
  7. __asm__ __volatile__ ( REAL_CODE ( "sti\n\t"
  8. "hlt\n\t"
  9. "cli\n\t" ) : : );
  10. }