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 / _ASIRESU.ASM < prev    next >
Encoding:
Assembly Source File  |  1990-08-14  |  1.9 KB  |  81 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.         if      _LCODE
  15.          ReferFunc     _asiprime
  16.         endif
  17.  
  18.         pseg    _asiresume
  19.  
  20.         if      _LCODE eq 0
  21.          ReferFunc     _asiprime
  22.         endif
  23.  
  24.  
  25. ;**<<  _ A S I R E S U M E  >>**
  26. ;
  27. ;  void _asiresume(port,intregister,p)
  28. ;
  29. ;  Interrupts are re-enabled.
  30. ;
  31. ;  Modifications:
  32. ;    ""   12-MAY-1988  12:33:06.70         (2.11)
  33. ;       Modified to take a third paramter, a pointer to the channel state
  34. ;       structure.  Added conditional assembly for the alternate method
  35. ;       of disabling/enabling transmit interrupts.
  36. ;
  37.         cproc   _asiresume,,_asiresu,,,<NOSI,NODI>
  38.         mov     dx,parm1_
  39.         add     dx,INTER        ; dx points to interrupt enable registers
  40.         in      al,dx
  41.         KILL_TIME
  42.         mov     ah,parm2_
  43.  
  44.         test   ah,ENTX         ;are we enabling transmit enable interrupts
  45.         jz     noetx
  46.         test   al,ENTX         ;is transmit already enabled?
  47.         jz     noetx
  48.         push   ax
  49.         push   dx
  50.         if     _LDATA
  51.          push  ds
  52.          lds   bx,parm3_
  53.         else
  54.          mov   bx,parm3_
  55.         endif
  56. ;;;      or     [bx+chst_bits],TXIFLAG  ;turn on tx interrupts
  57.         if     _LDATA
  58.          push  ds
  59.          push  bx
  60.          call _asiprime
  61.          add   sp,4
  62.         else
  63.          push  bx
  64.          call _asiprime
  65.          add   sp,2
  66.         endif
  67.         if     _LDATA
  68.          pop   ds
  69.         endif
  70.         pop    dx
  71.         pop    ax
  72.  
  73. noetx:  or      al,ah           ; set bits to 1
  74.         out     dx,al
  75.         KILL_TIME
  76. xex:
  77.         cproce
  78.         endps
  79.         end
  80.  
  81.