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