Subversion Repositories Kolibri OS

Rev

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_pci_version
4
public_stdcall _msys_get_pci_version,0
4
_msys_get_pci_version:
-
 
5
  mov   edx,ebx
5
  mov   edx,ebx
6
  mov   eax,62
6
  mov   eax,62
7
  xor   ebx,ebx
7
  xor   ebx,ebx
8
  int   0x40
8
  int   0x40
9
  movzx eax,ax
9
  movzx eax,ax
10
  mov   ebx,edx
10
  mov   ebx,edx
11
  ret
11
  ret
Line 12... Line 12...
12
  
12
  
13
public _msys_get_last_pci_bus
-
 
14
_msys_get_last_pci_bus:
13
public_stdcall _msys_get_last_pci_bus,0
15
  mov   edx,ebx
14
  mov   edx,ebx
16
  mov   eax,62
15
  mov   eax,62
17
  xor   ebx,ebx
16
  xor   ebx,ebx
18
  inc   ebx
17
  inc   ebx
19
  int   0x40
18
  int   0x40
20
  movzx eax,al
19
  movzx eax,al
21
  mov   ebx,edx
20
  mov   ebx,edx
Line 22... Line 21...
22
  ret  
21
  ret  
23
  
-
 
24
public _msys_get_pci_access_mechanism
22
  
25
_msys_get_pci_access_mechanism:
23
public_stdcall _msys_get_pci_access_mechanism,0
26
  mov   edx,ebx
24
  mov   edx,ebx
27
  mov   eax,62
25
  mov   eax,62
28
  mov   ebx,2
26
  mov   ebx,2
29
  int   0x40
27
  int   0x40
30
  movzx eax,al  
28
  movzx eax,al  
Line 31... Line 29...
31
  mov   ebx,edx
29
  mov   ebx,edx
32
  ret
-
 
33
  
30
  ret
34
public _msys_pci_read_config_byte
31
  
35
_msys_pci_read_config_byte:
32
public_stdcall _msys_pci_read_config_byte,16
36
;arg1 - bus
33
;arg1 - bus
37
;arg2 - dev
34
;arg2 - dev
Line 47... Line 44...
47
  mov   cl,[esp+16]
44
  mov   cl,[esp+16]
48
  int   0x40
45
  int   0x40
49
  mov   ebx,edx
46
  mov   ebx,edx
50
  ret   16
47
  ret   16
Line 51... Line 48...
51
  
48
  
52
public _msys_pci_read_config_word
-
 
53
_msys_pci_read_config_word:
49
public_stdcall _msys_pci_read_config_word,16
54
;arg1 - bus
50
;arg1 - bus
55
;arg2 - dev
51
;arg2 - dev
56
;arg3 - fn
52
;arg3 - fn
57
;arg4 - reg
53
;arg4 - reg
Line 65... Line 61...
65
  mov   cl,[esp+16]
61
  mov   cl,[esp+16]
66
  int   0x40
62
  int   0x40
67
  mov   ebx,edx
63
  mov   ebx,edx
68
  ret   16
64
  ret   16
Line 69... Line 65...
69
  
65
  
70
public _msys_pci_read_config_dword
-
 
71
_msys_pci_read_config_dword:
66
public_stdcall _msys_pci_read_config_dword,16
72
;arg1 - bus
67
;arg1 - bus
73
;arg2 - dev
68
;arg2 - dev
74
;arg3 - fn
69
;arg3 - fn
75
;arg4 - reg
70
;arg4 - reg
Line 83... Line 78...
83
  mov   cl,[esp+16]
78
  mov   cl,[esp+16]
84
  int   0x40
79
  int   0x40
85
  mov   ebx,edx
80
  mov   ebx,edx
86
  ret   16
81
  ret   16
Line 87... Line 82...
87
  
82
  
88
public _msys_pci_write_config_byte
-
 
89
_msys_pci_write_config_byte:
83
public_stdcall _msys_pci_write_config_byte,20
90
;arg1 - bus
84
;arg1 - bus
91
;arg2 - dev
85
;arg2 - dev
92
;arg3 - fn
86
;arg3 - fn
93
;arg4 - reg
87
;arg4 - reg
Line 103... Line 97...
103
  movzx edx,byte [esp+24]
97
  movzx edx,byte [esp+24]
104
  int   0x40
98
  int   0x40
105
  pop   ebx
99
  pop   ebx
106
  ret   20
100
  ret   20
Line 107... Line 101...
107
  
101
  
108
public _msys_pci_write_config_word
-
 
109
_msys_pci_write_config_word:
102
public_stdcall _msys_pci_write_config_word,20
110
;arg1 - bus
103
;arg1 - bus
111
;arg2 - dev
104
;arg2 - dev
112
;arg3 - fn
105
;arg3 - fn
113
;arg4 - reg
106
;arg4 - reg
Line 123... Line 116...
123
  movzx edx,word [esp+24]
116
  movzx edx,word [esp+24]
124
  int   0x40
117
  int   0x40
125
  pop   ebx
118
  pop   ebx
126
  ret   20
119
  ret   20
Line 127... Line 120...
127
  
120
  
128
public _msys_pci_write_config_dword
-
 
129
_msys_pci_write_config_dword:
121
public_stdcall _msys_pci_write_config_dword,20
130
;arg1 - bus
122
;arg1 - bus
131
;arg2 - dev
123
;arg2 - dev
132
;arg3 - fn
124
;arg3 - fn
133
;arg4 - reg
125
;arg4 - reg