home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0020 - 0029 / ibm0020-0029 / ibm0028.tar / ibm0028 / GRLF-C-1.ZIP / GCOMM / _ASIRESE.ASM < prev    next >
Encoding:
Assembly Source File  |  1990-08-14  |  1.4 KB  |  59 lines

  1.         page    60,132
  2. ;
  3. ; The Greenleaf Comm Library
  4. ;
  5. ; Copyright (C) 1984-90 Greenleaf Software Inc.  All Rights Reserved.
  6. ;
  7.  
  8.  
  9.         .xlist
  10.         include model.h
  11.         include prologue.h
  12.         include asiports.equ
  13.         .list
  14.  
  15.  
  16.         pseg    _asireset
  17.  
  18.  
  19. ;**<<  _A S I R E S E T  >>**
  20. ;
  21. ;  void _asireset(ioaddress,linecontrol,divisorlsb,divisormsb,modemcontrol)
  22. ;
  23. ;  Restore the uart at the base I/O address's line control, and baud rate
  24. ;  registers.
  25. ;
  26.         cproc   _asireset,,_asirese,,,<NOSI,NODI>
  27.         mov     cx,parm1_
  28.         mov     dx,LCREG        ;set dlab bit to 1
  29.         add     dx,cx
  30.         in      al,dx
  31.         KILL_TIME
  32.         or      al,DLAB
  33.         out     dx,al
  34.         KILL_TIME
  35.         mov     al,parm3_
  36.         mov     dx,cx           ;prepare for setting LSB
  37.         out     dx,al
  38.         KILL_TIME
  39.         inc     dx
  40.         mov     al,parm4_
  41.         out     dx,al           ;set MSB
  42.         KILL_TIME
  43.         mov     dx,LCREG
  44.         add     dx,cx           ;DX = LCREG again
  45.         mov     al,parm2_
  46.         and     al,not DLAB     ;de-assert DLAB
  47.         out     dx,al
  48.         KILL_TIME
  49.         mov     dx,MCREG
  50.         add     dx,cx           ; DX = MCREG now
  51.         mov     al,parm5_
  52.         out     dx,al           ; set modem controls
  53.         KILL_TIME
  54.  
  55.         xor     ax,ax
  56.         cproce
  57.         endps
  58.         end
  59.