home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 024 / psi110g.zip / ECVEC.ASM < prev    next >
Assembly Source File  |  1993-09-16  |  2KB  |  102 lines

  1. ; 3C501 (Ethernet) interrupt hooks
  2.  
  3. ;%    .MODEL  MEMMOD,C
  4. include asmglobal.h        
  5.     LOCALS
  6.     %MACS
  7.     .LALL
  8.  
  9.     extrn   Stktop,Spsave,Sssave,ecint:proc,doret:proc,eoi:proc
  10.  
  11.     .CODE
  12. dbase   dw      @Data           ; save loc for ds (must be in code segment)
  13.  
  14. ; ec0vec - Ethernet interrupt handler
  15.     public  ec0vec
  16.     label   ec0vec far
  17.     push    ds              ; save on user stack
  18.     mov     ds,cs:dbase     ; establish interrupt data segment
  19.  
  20.     mov     Sssave,ss       ; stash user stack context
  21.     mov     Spsave,sp
  22.  
  23.     mov     ss,cs:dbase
  24.     lea     sp,Stktop
  25.  
  26.        ; push    ax              ; save user regs on interrupt stack
  27.        ; push    bx
  28.        ; push    cx
  29.        ; push    dx
  30.        ; push    bp
  31.        ; push    si
  32.        ; push    di
  33.     PUSHALL
  34.     push    es
  35.     call    eoi
  36.  
  37.     mov     ax,0            ; arg for service routine
  38.     push    ax
  39.     call    ecint
  40.     pop     ax
  41.     jmp     doret
  42.  
  43. ; ec1vec - Ethernet interrupt handler
  44.     public  ec1vec
  45.     label   ec1vec far
  46.     push    ds              ; save on user stack
  47.     mov     ds,cs:dbase     ; establish interrupt data segment
  48.  
  49.     mov     Sssave,ss       ; stash user stack context
  50.     mov     Spsave,sp
  51.  
  52.     mov     ss,cs:dbase
  53.     lea     sp,Stktop
  54.  
  55.        ; push    ax              ; save user regs on interrupt stack
  56.        ; push    bx
  57.        ; push    cx
  58.        ; push    dx
  59.        ; push    bp
  60.        ; push    si
  61.        ; push    di
  62.     PUSHALL
  63.     push    es
  64.     call    eoi
  65.  
  66.     mov     ax,1            ; arg for service routine
  67.     push    ax
  68.     call    ecint
  69.     pop     ax
  70.     jmp     doret
  71.  
  72. ; ec2vec - Ethernet interrupt handler
  73.     public  ec2vec
  74.     label   ec2vec far
  75.     push    ds              ; save on user stack
  76.     mov     ds,cs:dbase     ; establish interrupt data segment
  77.  
  78.     mov     Sssave,ss       ; stash user stack context
  79.     mov     Spsave,sp
  80.  
  81.     mov     ss,cs:dbase
  82.     lea     sp,Stktop
  83.  
  84.        ; push    ax              ; save user regs on interrupt stack
  85.        ; push    bx
  86.        ; push    cx
  87.        ; push    dx
  88.        ; push    bp
  89.        ; push    si
  90.        ; push    di
  91.     PUSHALL
  92.     push    es
  93.     call    eoi
  94.  
  95.     mov     ax,2            ; arg for service routine
  96.     push    ax
  97.     call    ecint
  98.     pop     ax
  99.     jmp     doret
  100.  
  101.     end
  102.