Ok, What’s The Problem?
The symptom is that the LCD output is garbled sometimes. It doesn’t completely clear or the text is misplaced. The cause seems to be the timer interrupt routine doing output to the parallel port. In the first picture, where I’ve disabled interrupts, below I see the control and data signals for the LCD look perfect. Specifically, I see D/C come high for data and stay that way while 504 bytes are sent. In the second picture I see D/C go low for a bit then come back. The changes are timed exactly with OUT’s (the top signal) which must be coming from the interrupt routine because they’re 1ms apart.
I went through the monitor and no-op’d all the OUT instructions that were being issued just to clear the timer interrupt and things now seem ok with interrupts enabled. I’m not happy with the approach but it works. The monitor is handy and has a lot of capability but it seems like a complicated thing to share cycles and memory with.