Subversion Repositories Kolibri OS

Rev

Rev 9478 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9478 Rev 9503
1
use32
1
use32
2
db 'MENUET01'
2
db 'MENUET01'
3
dd 1, start, i_end, mem, mem, 0, selfpath
3
dd 1, start, i_end, mem, mem, 0, selfpath
4
 
4
 
5
start:
5
start:
6
;------ strcat(selfpath, '.drv')
6
;------ strcat(selfpath, '.drv')
7
		mov  eax, selfpath
7
		mov  eax, selfpath
8
	@@:
8
	@@:
9
		inc  eax
9
		inc  eax
10
		cmp  [eax], byte 0
10
		cmp  [eax], byte 0
11
		jne  @b
11
		jne  @b
12
		mov  [eax], dword '.drv'
12
		mov  [eax], dword '.sys'
13
 
13
 
14
;------ writing some info
14
;------ writing some info
15
		mov  edx, info_msg 
15
		mov  edx, info_msg 
16
		call debug_string
16
		call debug_string
17
		mov  cl, 13 ; line break symbol
17
		mov  cl, 13 ; line break symbol
18
		int  40h
18
		int  40h
19
 
19
 
20
;------ init driver		
20
;------ init driver		
21
		mov  eax, 68
21
		mov  eax, 68
22
		mov  ebx, 16
22
		mov  ebx, 16
23
		mov  ecx, sz_sound
23
		mov  ecx, sz_sound
24
		int  40h
24
		int  40h
25
		test eax, eax
25
		test eax, eax
26
		jnz  .exit
26
		jnz  .exit
27
 
27
 
28
		mov  eax, 68
28
		mov  eax, 68
29
		mov  ebx, 21
29
		mov  ebx, 21
30
		mov  ecx, selfpath
30
		mov  ecx, selfpath
31
		int  40h
31
		int  40h
32
 
32
 
33
.exit:
33
.exit:
34
		mov  eax, -1
34
		mov  eax, -1
35
		int  40h
35
		int  40h
36
		
36
		
37
debug_string:
37
debug_string:
38
		mov  eax,63
38
		mov  eax,63
39
		mov  ebx,1
39
		mov  ebx,1
40
	@@:
40
	@@:
41
		mov  cl,[edx]
41
		mov  cl,[edx]
42
		test cl,cl
42
		test cl,cl
43
		jz   @f
43
		jz   @f
44
		int  40h
44
		int  40h
45
		inc  edx
45
		inc  edx
46
		jmp  @b
46
		jmp  @b
47
	@@:
47
	@@:
48
		ret
48
		ret
49
 
49
 
50
sz_sound  db 'SOUND',0
50
sz_sound  db 'SOUND',0
51
info_msg  db 'Trying to load the driver: '
51
info_msg  db 'Trying to load the driver: '
52
selfpath  rb 4096
52
selfpath  rb 4096
53
 
53
 
54
align 4
54
align 4
55
i_end:
55
i_end:
56
rb 128
56
rb 128
57
mem:
57
mem: