Subversion Repositories Kolibri OS

Rev

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

Rev 3232 Rev 3908
Line 9... Line 9...
9
 
9
 
Line 10... Line 10...
10
DEBUG           = 1
10
DEBUG           = 1
11
 
11
 
-
 
12
include 'proc32.inc'
-
 
13
include 'imports.inc'
Line 12... Line 14...
12
include 'proc32.inc'
14
include '../struct.inc'
13
include 'imports.inc'
15
 
14
 
16
 
15
VID_INTEL         = 0x8086
17
VID_INTEL         = 0x8086
Line 147... Line 149...
147
 
149
 
148
public START
150
public START
149
public service_proc
151
public service_proc
Line -... Line 152...
-
 
152
public version
-
 
153
 
-
 
154
struct  SRV
-
 
155
        srv_name        rb 16    ;ASCIIZ string
-
 
156
        magic           dd ?     ;+0x10 ;'SRV '
-
 
157
        size            dd ?     ;+0x14 ;size of structure SRV
-
 
158
        fd              dd ?     ;+0x18 ;next SRV descriptor
-
 
159
        bk              dd ?     ;+0x1C ;prev SRV descriptor
-
 
160
        base            dd ?     ;+0x20 ;service base address
-
 
161
        entry           dd ?     ;+0x24 ;service START function
-
 
162
        srv_proc        dd ?     ;+0x28 ;user mode service handler
-
 
163
        srv_proc_ex     dd ?     ;+0x2C ;kernel mode service handler
-
 
164
ends
150
public version
165
 
Line 151... Line 166...
151
 
166
 
Line -... Line 167...
-
 
167
section '.flat' code readable align 16
152
section '.flat' code readable align 16
168
 
153
 
169
proc START stdcall, state:dword
Line 154... Line 170...
154
proc START stdcall, state:dword
170
 
155
 
171
        mov     eax, [srv_entry]
156
        cmp     [state], 1
172
        cmp     [state], 1
157
        jne     .stop
173
        jne     .stop
Line -... Line 174...
-
 
174
 
-
 
175
     if DEBUG
158
 
176
        mov     esi, msgInit
159
     if DEBUG
177
        call    SysMsgBoardStr
160
        mov     esi, msgInit
178
     end if
-
 
179
 
-
 
180
        test    eax, eax
-
 
181
        jnz     .done
-
 
182
        call    detect_controller
-
 
183
        ret
161
        call    SysMsgBoardStr
184
.stop:
162
     end if
185
        test    eax, eax
163
 
186
        jz      .done
Line 164... Line 187...
164
        call    detect_controller
187
        leave
Line 235... Line 258...
235
        mov     esi, msgNewline
258
        mov     esi, msgNewline
236
        call    SysMsgBoardStr
259
        call    SysMsgBoardStr
237
     end if
260
     end if
Line 238... Line 261...
238
 
261
 
-
 
262
        stdcall GetService, dword[edi+4]
-
 
263
        test    eax, eax
Line -... Line 264...
-
 
264
        jz      .err
-
 
265
 
239
        stdcall GetService, dword[edi+4]
266
        mov     edx, [eax+SRV.entry]
Line 240... Line 267...
240
 
267
        mov     [srv_entry], edx
241
        ret
268
        ret
242
 
269
 
Line 375... Line 402...
375
        dd 0    ;terminator
402
                dd 0    ;terminator
Line 376... Line 403...
376
 
403
 
Line -... Line 404...
-
 
404
 
-
 
405
version         dd (5 shl 16) or (API_VERSION and 0xFFFF)
377
 
406
 
378
version      dd (5 shl 16) or (API_VERSION and 0xFFFF)
407
srv_entry       dd 0
379
 
408
 
380
intelac97       db 'INTELAC97', 0
409
intelac97       db 'INTELAC97', 0
381
vt823x          db 'VT823X', 0
410
vt823x          db 'VT823X', 0
Line 388... Line 417...
388
msgInit         db 'Detecting hardware...',13,10,0
417
msgInit         db 'Detecting hardware...',13,10,0
389
msgFail         db 'No compatible soundcard found!',13,10,0
418
msgFail         db 'No compatible soundcard found!',13,10,0
390
msgLoading      db 'Loading ',0
419
msgLoading      db 'Loading ',0
391
msgNewline      db 13,10,0
420
msgNewline      db 13,10,0
Line -... Line 421...
-
 
421
 
392
 
422