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 _asdtr
-
-
- ;**<< _ A S D T R >>**
- ;
- ; int _asdtr( ioaddress, ctrl )
- ;
- ; Turn DTR explicitly ON or OFF. Return previous condition.
- ;
- cproc _asdtr,,,,,<NOSI,NODI>
- mov dx,parm1_
- add dx,MCREG ; address modem ctrl reg
- cli
- in al,dx ; read current value
- KILL_TIME
- push ax ; save value
- and al,not DTR ; assume turning off
- test word ptr parm2_,1 ;check assumption
- jz setdtr ;if turning off
- or al,DTR ;assummed wrong
- setdtr: out dx,al ;set 8250
- KILL_TIME
- sti
- pop ax ;get initial value back
- and ax,DTR ;and return only DTR bit
- cproce
- endps
- end
-