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 _asireset
-
-
- ;**<< _A S I R E S E T >>**
- ;
- ; void _asireset(ioaddress,linecontrol,divisorlsb,divisormsb,modemcontrol)
- ;
- ; Restore the uart at the base I/O address's line control, and baud rate
- ; registers.
- ;
- cproc _asireset,,_asirese,,,<NOSI,NODI>
- mov cx,parm1_
- mov dx,LCREG ;set dlab bit to 1
- add dx,cx
- in al,dx
- KILL_TIME
- or al,DLAB
- out dx,al
- KILL_TIME
- mov al,parm3_
- mov dx,cx ;prepare for setting LSB
- out dx,al
- KILL_TIME
- inc dx
- mov al,parm4_
- out dx,al ;set MSB
- KILL_TIME
- mov dx,LCREG
- add dx,cx ;DX = LCREG again
- mov al,parm2_
- and al,not DLAB ;de-assert DLAB
- out dx,al
- KILL_TIME
- mov dx,MCREG
- add dx,cx ; DX = MCREG now
- mov al,parm5_
- out dx,al ; set modem controls
- KILL_TIME
-
- xor ax,ax
- cproce
- endps
- end