-#define ao_arch_block_interrupts() __asm clr ea __endasm
-#define ao_arch_release_interrupts() __asm setb ea __endasm
-#define cli() ao_arch_block_interrupts()
-#define sei() ao_arch_release_interrupts()
+/* Idle the CPU, waking when an interrupt occurs */
+#define ao_arch_wait_interrupt() do { \
+ ao_arch_release_interrupts(); \
+ (PCON = PCON_IDLE); \
+ ao_arch_block_interrupts(); \
+ } while (0)