I think I fixed the problem.  After writing text, REG[40h] bit 7 has to be cleared to get out of text mode before we can do any other non-text activities.