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 / _ASIHOLD.ASM < prev    next >
Encoding:
Assembly Source File  |  1990-08-14  |  1.5 KB  |  61 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.         .xlist
  9.         include model.h
  10.         include prologue.h
  11.         include asiports.equ
  12.         .list
  13.  
  14.  
  15.         pseg    _asihold
  16.  
  17.  
  18. ;**<<  _ A S I H O L D  >>**
  19. ;
  20. ;  void _asihold(base_8250,intregister,p)
  21. ;
  22. ;  The interrupt enables for the port (in the 8250) are shut down.
  23. ;
  24. ;  Modifications:
  25. ;    ""   12-MAY-1988  12:43:54.77         (2.11)
  26. ;       Modified to take a third paramter, a pointer to the channel state
  27. ;       structure.  Added conditional assembly for the alternate method
  28. ;       of disabling/enabling transmit interrupts.
  29. ;
  30. ;
  31.         cproc   _asihold,,,,,<NODI,NOSI>
  32.         mov     dx,parm1_
  33.         add     dx,INTER        ; dx points to interrupt enable registers
  34.         in      al,dx
  35.         KILL_TIME
  36.         mov     ah,parm2_
  37.  
  38.         test   ah,ENTX         ;are we dropping transmit enable
  39.         jz     nodtx
  40.         test   al,ENTX         ;is transmit already on
  41.         jz     nodtx
  42.         and    ah,not ENTX             ;disable a different way via bit
  43.         if     _LDATA
  44.          push  ds
  45.          lds   bx,parm3_
  46.         else
  47.          mov   bx,parm3_
  48.         endif
  49.         and    [bx+chst_bits],not TXIFLAG      ;shut off tx interrupts
  50.         if     _LDATA
  51.          pop   ds
  52.         endif
  53. nodtx:
  54.         not     ah
  55.         and     al,ah           ; set bits to 0
  56.         out     dx,al
  57.         KILL_TIME
  58.         cproce
  59.         endps
  60.         end
  61.