This program will never work.
And if it's interrupts you're worried about, disable them before using the LCD command.