home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / network / src_1218.zip / ECVEC.ASM < prev    next >
Assembly Source File  |  1991-01-27  |  2KB  |  98 lines

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