home *** CD-ROM | disk | FTP | other *** search
- page 60,132
-
- ;
- ; The Greenleaf Comm Library
- ;
- ; Copyright (C) 1984-90 Greenleaf Software Inc. All Rights Reserved.
- ;
-
- .xlist
- include model.h
- include prologue.h
- include asiports.equ
- .list
-
- pseg _asrts
-
- ;**<< _ A S R T S >>**
- ;
- ; int _asrts( ioaddress, ON/OFF,p )
- ;
- ; Explicitly turn RTS on or off. Call from asrts.
- ;
- ; MODIFICATIONS
- ; "" 20-FEB-1987 10:53:02.51
- ; Modified to update RTSACTIVE bit in structure.
- ;
- cproc _asrts,,,,,<NOSI,NODI>
- mov dx,parm1_
- add dx,MCREG ; address modem ctrl reg
- if _LDATA
- push ds
- lds bx,parm3_
- else
- mov bx,parm3_
- endif
- cli
- in al,dx ; read current value
- KILL_TIME
- push ax ; save previous value on stack
- and al,not RTS ; assume turning off
- test word ptr parm2_,1 ;check assumption
- jz resrts ;if turning off
- or al,RTS ;assummed wrong
- or word ptr [bx+chst_bits],RTSACTIVE ;set bit in structure
- jmp short setrts
- resrts: and word ptr [bx+chst_bits],not RTSACTIVE ;reset bit
- setrts: out dx,al ;set 8250
- KILL_TIME
- sti
- pop ax
- shr al,1 ;shift RTS to bit 0
- and ax,1 ;and return it's previous value
- if _LDATA
- pop ds
- endif
- cproce
-
- endps
- end