Rev 145 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 145 | Rev 159 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | format ELF |
1 | format ELF |
- | 2 | include "public_stdcall.inc" |
|
2 | section '.text' executable |
3 | section '.text' executable |
3 | public _msys_get_irq_owner |
4 | public_stdcall _msys_get_irq_owner,4 |
4 | _msys_get_irq_owner: |
- | |
5 | ;arg1 - irq |
5 | ;arg1 - irq |
6 | mov edx,ebx |
6 | mov edx,ebx |
7 | mov eax,41 |
7 | mov eax,41 |
8 | mov ebx,[esp+4] |
8 | mov ebx,[esp+4] |
9 | int 0x40 |
9 | int 0x40 |
10 | mov ebx,edx |
10 | mov ebx,edx |
11 | ret 4 |
11 | ret 4 |
Line 12... | Line 12... | ||
12 | 12 | ||
13 | public _msys_get_data_read_by_irq |
- | |
14 | _msys_get_data_read_by_irq: |
13 | public_stdcall _msys_get_data_read_by_irq,12 |
15 | ;arg1 - irq |
14 | ;arg1 - irq |
16 | ;arg2 - *size |
15 | ;arg2 - *size |
17 | ;arg3 - data |
16 | ;arg3 - data |
18 | mov edx,ebx |
17 | mov edx,ebx |
Line 35... | Line 34... | ||
35 | .not_an_owner: |
34 | .not_an_owner: |
36 | mov eax,2 |
35 | mov eax,2 |
37 | mov ebx,edx |
36 | mov ebx,edx |
38 | ret |
37 | ret |
Line 39... | Line 38... | ||
39 | 38 | ||
40 | public _msys_send_data_to_device |
- | |
41 | _msys_send_data_to_device: |
39 | public_stdcall _msys_send_data_to_device,8 |
42 | ;arg1 - port |
40 | ;arg1 - port |
43 | ;arg2 - data |
41 | ;arg2 - data |
44 | mov edx,ebx |
42 | mov edx,ebx |
45 | mov eax,63 |
43 | mov eax,63 |
46 | mov ebx,[esp+8] |
44 | mov ebx,[esp+8] |
47 | mov ecx,[esp+4] |
45 | mov ecx,[esp+4] |
48 | int 0x40 |
46 | int 0x40 |
49 | mov ebx,edx |
47 | mov ebx,edx |
Line 50... | Line 48... | ||
50 | ret 8 |
48 | ret 8 |
51 | - | ||
52 | public _msys_receive_data_from_device |
49 | |
53 | _msys_receive_data_from_device: |
50 | public_stdcall _msys_receive_data_from_device,8 |
54 | ;arg1 - port |
51 | ;arg1 - port |
55 | ;arg2 - data |
52 | ;arg2 - data |
56 | mov edx,ebx |
53 | mov edx,ebx |
Line 61... | Line 58... | ||
61 | mov ecx,[esp+8] |
58 | mov ecx,[esp+8] |
62 | mov [ecx],bl |
59 | mov [ecx],bl |
63 | mov ebx,edx |
60 | mov ebx,edx |
64 | ret 8 |
61 | ret 8 |
Line 65... | Line 62... | ||
65 | 62 | ||
66 | public _msys_program_irq |
- | |
67 | _msys_program_irq: |
63 | public_stdcall _msys_program_irq,8 |
68 | ;arg1 - intrtable |
64 | ;arg1 - intrtable |
69 | ;arg2 - irq |
65 | ;arg2 - irq |
70 | mov edx,ebx |
66 | mov edx,ebx |
71 | mov eax,44 |
67 | mov eax,44 |
72 | mov ebx,[esp+4] |
68 | mov ebx,[esp+4] |
73 | mov ecx,[esp+8] |
69 | mov ecx,[esp+8] |
74 | int 0x40 |
70 | int 0x40 |
75 | mov ebx,edx |
71 | mov ebx,edx |
Line 76... | Line 72... | ||
76 | ret 8 |
72 | ret 8 |
77 | - | ||
78 | public _msys_reserve_irq |
73 | |
79 | _msys_reserve_irq: |
74 | public_stdcall _msys_reserve_irq,4 |
80 | ;arg1 - irq |
75 | ;arg1 - irq |
81 | mov edx,ebx |
76 | mov edx,ebx |
82 | mov eax,45 |
77 | mov eax,45 |
83 | xor ebx,ebx |
78 | xor ebx,ebx |
84 | mov ecx,[esp+4] |
79 | mov ecx,[esp+4] |
85 | int 0x40 |
80 | int 0x40 |
Line 86... | Line 81... | ||
86 | mov ebx,edx |
81 | mov ebx,edx |
87 | ret 4 |
- | |
88 | 82 | ret 4 |
|
89 | public _msys_free_irq |
83 | |
90 | _msys_free_irq: |
84 | public_stdcall _msys_free_irq,4 |
91 | ;arg1 - irq |
85 | ;arg1 - irq |
92 | mov edx,ebx |
86 | mov edx,ebx |
93 | mov eax,45 |
87 | mov eax,45 |
94 | xor ebx,ebx |
88 | xor ebx,ebx |
95 | inc ebx |
89 | inc ebx |
96 | mov ecx,[esp+4] |
90 | mov ecx,[esp+4] |
Line 97... | Line 91... | ||
97 | int 0x40 |
91 | int 0x40 |
98 | mov ebx,edx |
- | |
99 | ret 4 |
92 | mov ebx,edx |
100 | 93 | ret 4 |
|
101 | public _msys_reserve_port_area |
94 | |
102 | _msys_reserve_port_area: |
95 | public_stdcall _msys_reserve_port_area,8 |
103 | ;arg1 - start |
96 | ;arg1 - start |
Line 109... | Line 102... | ||
109 | mov edx,[esp+12] |
102 | mov edx,[esp+12] |
110 | int 0x40 |
103 | int 0x40 |
111 | pop ebx |
104 | pop ebx |
112 | ret 8 |
105 | ret 8 |
Line 113... | Line 106... | ||
113 | 106 | ||
114 | public _msys_free_port_area |
- | |
115 | _msys_free_port_area: |
107 | public_stdcall _msys_free_port_area,8 |
116 | ;arg1 - start |
108 | ;arg1 - start |
117 | ;arg2 - end |
109 | ;arg2 - end |
118 | push ebx |
110 | push ebx |
119 | mov eax,46 |
111 | mov eax,46 |