Subversion Repositories Kolibri OS

Rev

Rev 5593 | Rev 6078 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5593 Rev 5596
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 5593 $
8
$Revision: 5596 $
9
 
9
 
Line 32... Line 32...
32
@@:
32
@@:
33
        call    change_task
33
        call    change_task
34
        jmp     .wait
34
        jmp     .wait
35
endp
35
endp
Line -... Line 36...
-
 
36
 
-
 
37
align 4
-
 
38
proc pci_read32 stdcall, bus:dword, devfn:dword, reg:dword
-
 
39
        push    ebx
-
 
40
        xor     eax, eax
-
 
41
        xor     ebx, ebx
-
 
42
        mov     ah, byte [bus]
-
 
43
        mov     al, 6
-
 
44
        mov     bh, byte [devfn]
-
 
45
        mov     bl, byte [reg]
-
 
46
        call    pci_read_reg
-
 
47
        pop     ebx
-
 
48
        ret
-
 
49
endp
-
 
50
 
-
 
51
align 4
-
 
52
proc pci_read16 stdcall, bus:dword, devfn:dword, reg:dword
-
 
53
        push    ebx
-
 
54
        xor     eax, eax
-
 
55
        xor     ebx, ebx
-
 
56
        mov     ah, byte [bus]
-
 
57
        mov     al, 5
-
 
58
        mov     bh, byte [devfn]
-
 
59
        mov     bl, byte [reg]
-
 
60
        call    pci_read_reg
-
 
61
        pop     ebx
-
 
62
        ret
-
 
63
endp
-
 
64
 
-
 
65
align 4
-
 
66
proc pci_read8 stdcall, bus:dword, devfn:dword, reg:dword
-
 
67
        push    ebx
-
 
68
        xor     eax, eax
-
 
69
        xor     ebx, ebx
-
 
70
        mov     ah, byte [bus]
-
 
71
        mov     al, 4
-
 
72
        mov     bh, byte [devfn]
-
 
73
        mov     bl, byte [reg]
-
 
74
        call    pci_read_reg
-
 
75
        pop     ebx
-
 
76
        ret
-
 
77
endp
-
 
78
 
-
 
79
align 4
-
 
80
proc pci_write8 stdcall, bus:dword, devfn:dword, reg:dword, val:dword
-
 
81
        push    ebx
-
 
82
        xor     eax, eax
-
 
83
        xor     ebx, ebx
-
 
84
        mov     ah, byte [bus]
-
 
85
        mov     al, 8
-
 
86
        mov     bh, byte [devfn]
-
 
87
        mov     bl, byte [reg]
-
 
88
        mov     ecx, [val]
-
 
89
        call    pci_write_reg
-
 
90
        pop     ebx
-
 
91
        ret
-
 
92
endp
-
 
93
 
-
 
94
align 4
-
 
95
proc pci_write16 stdcall, bus:dword, devfn:dword, reg:dword, val:dword
-
 
96
        push    ebx
-
 
97
        xor     eax, eax
-
 
98
        xor     ebx, ebx
-
 
99
        mov     ah, byte [bus]
-
 
100
        mov     al, 9
-
 
101
        mov     bh, byte [devfn]
-
 
102
        mov     bl, byte [reg]
-
 
103
        mov     ecx, [val]
-
 
104
        call    pci_write_reg
-
 
105
        pop     ebx
-
 
106
        ret
-
 
107
endp
-
 
108
 
-
 
109
align 4
-
 
110
proc pci_write32 stdcall, bus:dword, devfn:dword, reg:dword, val:dword
-
 
111
        push    ebx
-
 
112
        xor     eax, eax
-
 
113
        xor     ebx, ebx
-
 
114
        mov     ah, byte [bus]
-
 
115
        mov     al, 10
-
 
116
        mov     bh, byte [devfn]
-
 
117
        mov     bl, byte [reg]
-
 
118
        mov     ecx, [val]
-
 
119
        call    pci_write_reg
-
 
120
        pop     ebx
-
 
121
        ret
Line 36... Line 122...
36
 
122
endp
37
 
123
 
38
handle     equ  IOCTL.handle
124
handle     equ  IOCTL.handle
39
io_code    equ  IOCTL.io_code
125
io_code    equ  IOCTL.io_code
Line 1339... Line 1425...
1339
        mov     [eax+16], edx
1425
        mov     [eax+16], edx
Line 1340... Line 1426...
1340
 
1426
 
1341
        call    free           ;release object memory
1427
        call    free           ;release object memory
Line 1342... Line -...
1342
        ret
-
 
1343
 
-
 
1344
 
1428
        ret
1345
 
1429
 
Line 1346... Line 1430...
1346
; param
1430
; param
1347
;  eñõ= size
1431
;  ecx= size
Line 1348... Line 1432...
1348
 
1432
 
Line 1389... Line 1473...
1389
        pop     edi
1473
        pop     edi
1390
        pop     esi
1474
        pop     esi
1391
        xor     eax, eax
1475
        xor     eax, eax
1392
        ret
1476
        ret
Line 1393... Line -...
1393
-
 
1394
-