40 Hz Square wave with 8kHz tone

Based on what I have now, I think you are correct about non-blocking code. What is non-blocking code?