home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / hamradio / s920603.zip / ECVEC.ASM < prev    next >
Assembly Source File  |  1992-04-03  |  2KB  |  101 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.     inc    sp
  39.     inc    sp
  40.     jmp    doret
  41.  
  42. ; ec1vec - Ethernet interrupt handler
  43.     public    ec1vec
  44.     label    ec1vec far
  45.     push    ds        ; save on user stack
  46.     mov    ds,cs:dbase    ; establish interrupt data segment
  47.  
  48.     mov    Sssave,ss    ; stash user stack context
  49.     mov    Spsave,sp
  50.  
  51.     mov    ss,cs:dbase
  52.     lea    sp,Stktop
  53.  
  54.     push    ax        ; save user regs on interrupt stack
  55.     push    bx
  56.     push    cx
  57.     push    dx
  58.     push    bp
  59.     push    si
  60.     push    di
  61.     push    es
  62.     call    eoi
  63.  
  64.     mov    ax,1        ; arg for service routine
  65.     push    ax
  66.     call    ecint
  67.     inc    sp
  68.     inc    sp
  69.     jmp    doret
  70.  
  71. ; ec2vec - Ethernet interrupt handler
  72.     public    ec2vec
  73.     label    ec2vec far
  74.     push    ds        ; save on user stack
  75.     mov    ds,cs:dbase    ; establish interrupt data segment
  76.  
  77.     mov    Sssave,ss    ; stash user stack context
  78.     mov    Spsave,sp
  79.  
  80.     mov    ss,cs:dbase
  81.     lea    sp,Stktop
  82.  
  83.     push    ax        ; save user regs on interrupt stack
  84.     push    bx
  85.     push    cx
  86.     push    dx
  87.     push    bp
  88.     push    si
  89.     push    di
  90.     push    es
  91.     call    eoi
  92.  
  93.     mov    ax,2        ; arg for service routine
  94.     push    ax
  95.     call    ecint
  96.     inc    sp
  97.     inc    sp
  98.     jmp    doret
  99.  
  100.     end
  101.