Subversion Repositories Kolibri OS

Rev

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

Rev 211 Rev 214
Line 1... Line 1...
1
;
1
DRV_ENTRY equ 1
2
;   This file is part of the Infinity sound AC97 driver.
-
 
3
;   (C) copyright Serge 2006
2
DRV_EXIT  equ -1
4
;   email: infinity_sound@mail.ru
3
 
5
;
-
 
6
;   This program is free software; you can redistribute it and/or modify
-
 
7
;   it under the terms of the GNU General Public License as published by
-
 
8
;   the Free Software Foundation; either version 2 of the License, or
-
 
9
;   (at your option) any later version.
-
 
10
;
-
 
11
;   This program is distributed in the hope that it will be useful,
-
 
12
;   but WITHOUT ANY WARRANTY; without even the implied warranty of
-
 
13
;   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-
 
14
;   GNU General Public License for more details.
-
 
Line 15... Line 4...
15
 
4
align 4
16
align 4
5
proc attach_int_handler stdcall, irq:dword, handler:dword
Line 17... Line 6...
17
proc attach_int_handler stdcall, irq:dword, handler:dword
6
 
Line 711... Line 700...
711
             exports   dd ?   ;fake exports table
700
                       dd ?
712
                       dd ?
701
           endl
713
           endl
702
 
Line 714... Line 703...
714
 
703
           stdcall load_file, [file_name]
-
 
704
 
715
           stdcall load_file, [file_name]
705
           test eax, eax
716
           test eax, eax
706
           jz .fail
Line 717... Line 707...
717
           jz .fail
707
 
Line 807... Line 797...
807
           mov [start], eax
797
 
Line 808... Line 798...
808
 
798
           stdcall kernel_free, [coff]
Line 809... Line 799...
809
           stdcall kernel_free, [coff]
799
 
810
 
800
           mov ebx, [start]
811
           mov ebx, [start]
801
           stdcall ebx, DRV_ENTRY
812
           call ebx
802
           test eax, eax
Line 813... Line 803...
813
           test eax, eax
803
           jnz .ok
814
           jnz .ok
804
 
815
 
805
           stdcall kernel_free, [img_base]
816
           stdcall kernel_free, [img_base]
806
           xor eax, eax
817
           xor eax, eax
807
           ret
818
           ret
808
.ok:
-
 
809
           mov ebx, [img_base]
-
 
810
           mov [eax+SRV.base], ebx
819
.ok:
811
           mov ecx, [start]
820
           mov ebx, [img_base]
812
           mov [eax+SRV.entry], ecx
821
           mov [eax+SRV.base], ebx
813
           ret
822
           ret
814
.fail:
823
.fail:
815
           xor eax, eax
Line 928... Line 920...
928
.fail:
920
           xor eax, eax
929
           xor eax, eax
921
           ret
930
           ret
922
endp
931
endp
923
 
Line -... Line 924...
-
 
924
align 4
-
 
925
proc stop_all_services
-
 
926
           pushf
-
 
927
           cli
-
 
928
           mov eax, [srv_map]
-
 
929
           not eax
-
 
930
           mov [srv_map], eax
-
 
931
.next:
-
 
932
           bsf eax, [srv_map]
-
 
933
           jnz .find
-
 
934
           popf
-
 
935
           ret
-
 
936
.find:
-
 
937
           btr [srv_map], eax
-
 
938
           shl eax,0x02
-
 
939
           lea eax,[srv_tab+eax+eax*8]   ;srv_tab+eax*36
-
 
940
           mov ebx, [eax+SRV.entry]
-
 
941
           stdcall ebx, dword -1
-
 
942
           jmp .next
-
 
943
endp
-
 
944
 
Line 932... Line 945...
932
 
945
 
933
 
946
drv_sound      db '/rd/1/drivers/unisound.obj', 0
-
 
947
drv_infinity   db '/rd/1/drivers/infinity.obj', 0
Line 934... Line 948...
934
drv_sound      db '/rd/1/drivers/unisound.obj', 0
948
drv_ati2d      db '/rd/1/drivers/ati2d.obj', 0
935
drv_infinity   db '/rd/1/drivers/infinity.obj', 0
949
 
-
 
950
szSound        db 'SOUND',0
Line 936... Line 951...
936
 
951
szInfinity     db 'INFINITY',0
937
szSound        db 'SOUND',0
952
szHMouse       db 'ATI2D',0
938
szInfinity     db 'INFINITY',0
953
 
Line 939... Line 954...
939
 
954
szSTART        db 'START',0
940
szSTART        db 'START',0
955
szEXPORTS      db 'EXPORTS',0
941
szEXPORTS      db 'EXPORTS',0
956
szIMPORTS      db 'IMPORTS',0
Line -... Line 957...
-
 
957
 
-
 
958
msg_unresolved db 'unresolved ',0
-
 
959
msg_module     db 'in module ',0
942
szIMPORTS      db 'IMPORTS',0
960
msg_CR         db  13,10,0
943
 
961
 
944
msg_unresolved db 'unresolved ',0
962
align 4
945
msg_module     db 'in module ',0
963
set_hw_cursor    dd 0
-
 
964
 
946
msg_CR         db  13,10,0
965
align 16