2008-12-28 15:01:01 +01:00
|
|
|
use32
|
|
|
|
db 'MENUET01'
|
2021-12-26 17:00:44 +01:00
|
|
|
dd 1, start, i_end, mem, mem, 0, selfpath
|
2008-12-28 15:01:01 +01:00
|
|
|
|
|
|
|
start:
|
2021-12-26 17:00:44 +01:00
|
|
|
;------ strcat(selfpath, '.drv')
|
|
|
|
mov eax, selfpath
|
|
|
|
@@:
|
|
|
|
inc eax
|
|
|
|
cmp [eax], byte 0
|
|
|
|
jne @b
|
2021-12-27 21:10:59 +01:00
|
|
|
mov [eax], dword '.sys'
|
2021-12-26 17:00:44 +01:00
|
|
|
|
|
|
|
;------ writing some info
|
|
|
|
mov edx, info_msg
|
|
|
|
call debug_string
|
|
|
|
mov cl, 13 ; line break symbol
|
|
|
|
int 40h
|
|
|
|
|
|
|
|
;------ init driver
|
|
|
|
mov eax, 68
|
|
|
|
mov ebx, 16
|
|
|
|
mov ecx, sz_sound
|
|
|
|
int 40h
|
|
|
|
test eax, eax
|
|
|
|
jnz .exit
|
|
|
|
|
|
|
|
mov eax, 68
|
|
|
|
mov ebx, 21
|
|
|
|
mov ecx, selfpath
|
|
|
|
int 40h
|
2008-12-28 15:01:01 +01:00
|
|
|
|
|
|
|
.exit:
|
2021-12-26 17:00:44 +01:00
|
|
|
mov eax, -1
|
|
|
|
int 40h
|
|
|
|
|
|
|
|
debug_string:
|
|
|
|
mov eax,63
|
|
|
|
mov ebx,1
|
|
|
|
@@:
|
|
|
|
mov cl,[edx]
|
|
|
|
test cl,cl
|
|
|
|
jz @f
|
|
|
|
int 40h
|
|
|
|
inc edx
|
|
|
|
jmp @b
|
|
|
|
@@:
|
|
|
|
ret
|
2008-12-28 15:01:01 +01:00
|
|
|
|
|
|
|
sz_sound db 'SOUND',0
|
2021-12-26 17:00:44 +01:00
|
|
|
info_msg db 'Trying to load the driver: '
|
|
|
|
selfpath rb 4096
|
2008-12-28 15:01:01 +01:00
|
|
|
|
|
|
|
align 4
|
|
|
|
i_end:
|
|
|
|
rb 128
|
|
|
|
mem:
|