20. PRINT

*------------------------------------------------------------------------------
* NAME          PRINT
*------------------------------------------------------------------------------
* DEPENDENCY    None
* PURPOSE       To send the string at (A1) to the channel in A0.
* DESCRIPTION   This routine prints a QDOS string (word then bytes) to the
*               channel ID passed in A0. The string starts at A1.
* INPUTS :
*               A0.L = Channel ID
*               A1.L = Address of a QDOS format string to be printed.
* OUTPUTS :
*               D0 = Error code
*               A0 = Channel id (preserved)
*               A1 = Address of buffer (preserved)
*               Z flag set if no errors, unset otherwise.
*------------------------------------------------------------------------------
print           move.l a1, -(a7)        ; Preserve the buffer address
                movea.w ut_mtext,a2     ; Print a string utility
                jsr     (a2)            ; Print it
                move.l  (a7)+,a1        ; Restore the buffer address
                tst.l   d0              ; Check for errors
                rts