Graphical and textual output from an ADAM application can have problems with synchronisation. This is because the message output arrives at the terminal via the command process and is buffered, whereas the graphical output is sent directly to the terminal. The effect of this is that graphical output to the terminal can get corrupted by message output. This problem can be avoided by using the subroutine MSG_SYNC, which flushes the textual output buffer of the command process:
CALL MSG_SYNC( STATUS )
MSG_SYNC should be called immediately before any graphical output to avoid any corruption.
MERS (MSG and ERR) Message and Error Reporting Systems