Skip to main content

halt

Function halt 

Source
pub fn halt()
Expand description

Sleep until an interrupt arrives. Never returns if no enabled interrupt can fire.

Emits halt followed by a nop, which covers the halt bug: with IME clear and an interrupt already pending, the CPU skips the sleep and reads the byte after halt twice. See https://gbdev.io/pandocs/halt.html.