TITLE CAFDTR Cafard DTR control
       SUBTTL Written by Mark Crispin/MRC

; Copyright (C) 1985, 1987 Mark Crispin.  All rights reserved.

       SEARCH MACSYM,MONSYM    ; system definitions
       SALL                    ; suppress macro expansions
       .DIRECTIVE FLBLST       ; sane listings for ASCIZ, etc.

;;; These symbols are defined by DEC in Edits 7435/7436 to TOPS-20.
;;;Some systems (notably Stanford and older PANDA monitors) used
;;;400003 and 400004 respectively.  These should be migrated to the
;;;DEC values...
IFNDEF .MOHUP,.MOHUP==:62       ; lower DTR
IFNDEF .MOUHU,.MOUHU==:63       ; raise DTR

A=1                             ; JSYS, temporary AC's
B=2

       .PSECT CODE

; $DTRON - Assert DTR
; Accepts:
;       A/ designator of line to assert DTR on
;       CALL $DTRON
; Returns +1: Always

$DTRON::SAVEAC <A,B>
       MOVX B,.MOUHU           ; turn DTR on
       MTOPR%
        ERJMP .+1
       RET

; $DTROF - Drop DTR
; Accepts:
;       A/ designator of line to drop DTR on
;       CALL $DTROF
; Returns +1: Always

$DTROF::SAVEAC <A,B>
       MOVX B,.MOHUP           ; turn DTR off
       MTOPR%
        ERJMP .+1
       RET

       END