alarm[0] = 4 x -= 1 if (x < -512) x = 0