2007-05-11 21:38:23 +02:00
|
|
|
|
;-------------------------------------------------------------------------
|
|
|
|
|
;
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>䨣<EFBFBD><EFBFBD><EFBFBD>樨
|
|
|
|
|
;
|
|
|
|
|
;
|
|
|
|
|
; SPraid
|
|
|
|
|
;
|
|
|
|
|
;-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
conf_file_loaded: db 0 ; 䫠<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>㧪<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>䨣<EFBFBD>
|
|
|
|
|
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD>㧪<EFBFBD> <EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD>
|
|
|
|
|
proc load_conf_file
|
|
|
|
|
pushad
|
|
|
|
|
invoke ini.load,.fname
|
|
|
|
|
mov [conf_file_loaded],byte 1
|
|
|
|
|
popad
|
|
|
|
|
ret
|
|
|
|
|
.fname db '%sys%/sys.conf',0
|
2007-05-15 14:03:26 +02:00
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
|
2007-05-15 20:05:31 +02:00
|
|
|
|
proc set_kernel_conf
|
2007-05-15 14:03:26 +02:00
|
|
|
|
locals
|
|
|
|
|
par db 30 dup(?)
|
|
|
|
|
endl
|
2007-05-15 20:05:31 +02:00
|
|
|
|
pushad
|
2007-05-15 14:03:26 +02:00
|
|
|
|
;[gui]
|
|
|
|
|
;mouse_speed
|
|
|
|
|
mov eax,ebp
|
|
|
|
|
add eax,par-ebp
|
2007-05-15 20:05:31 +02:00
|
|
|
|
push eax
|
|
|
|
|
invoke ini.get_str, ugui, ugui_mouse_speed, eax, ugui_mouse_speed_def
|
|
|
|
|
pop eax
|
|
|
|
|
stdcall strtoint,eax
|
2007-05-15 14:03:26 +02:00
|
|
|
|
push eax
|
|
|
|
|
pop edx
|
|
|
|
|
call _mouse_speed
|
2007-05-15 20:05:31 +02:00
|
|
|
|
|
|
|
|
|
popad
|
|
|
|
|
ret
|
2007-05-15 14:03:26 +02:00
|
|
|
|
|
|
|
|
|
;mouse_delay
|
|
|
|
|
mov eax,ebp
|
|
|
|
|
add eax,par-ebp
|
2007-05-15 20:05:31 +02:00
|
|
|
|
push eax
|
2007-05-15 14:03:26 +02:00
|
|
|
|
invoke ini.get_str, ugui, ugui_mouse_delay, eax, ugui_mouse_delay_def
|
2007-05-15 20:05:31 +02:00
|
|
|
|
pop eax
|
2007-05-15 14:03:26 +02:00
|
|
|
|
stdcall strtoint,eax
|
|
|
|
|
push eax
|
|
|
|
|
pop edx
|
|
|
|
|
call _mouse_delay
|
|
|
|
|
|
|
|
|
|
;[dev]
|
|
|
|
|
;sb16
|
|
|
|
|
mov eax,ebp
|
|
|
|
|
add eax,par-ebp
|
2007-05-15 20:05:31 +02:00
|
|
|
|
push eax
|
2007-05-15 14:03:26 +02:00
|
|
|
|
invoke ini.get_str, udev, udev_sb16, eax, udev_sb16_def
|
2007-05-15 20:05:31 +02:00
|
|
|
|
pop eax
|
2007-05-15 14:03:26 +02:00
|
|
|
|
stdcall strtoint,eax
|
|
|
|
|
push eax
|
|
|
|
|
pop ecx
|
|
|
|
|
call _sb16
|
|
|
|
|
|
|
|
|
|
;sound_dma
|
|
|
|
|
mov eax,ebp
|
|
|
|
|
add eax,par-ebp
|
2007-05-15 20:05:31 +02:00
|
|
|
|
push eax
|
2007-05-15 14:03:26 +02:00
|
|
|
|
invoke ini.get_str, udev, udev_sound_dma, eax, udev_sound_dma_def
|
2007-05-15 20:05:31 +02:00
|
|
|
|
pop eax
|
2007-05-15 14:03:26 +02:00
|
|
|
|
stdcall strtoint,eax
|
|
|
|
|
push eax
|
|
|
|
|
pop ecx
|
|
|
|
|
call _sound_dma
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;midibase
|
|
|
|
|
mov eax,ebp
|
|
|
|
|
add eax,par-ebp
|
2007-05-15 20:05:31 +02:00
|
|
|
|
push eax
|
2007-05-15 14:03:26 +02:00
|
|
|
|
invoke ini.get_str, udev, udev_midibase, eax, udev_midibase_def
|
2007-05-15 20:05:31 +02:00
|
|
|
|
pop eax
|
2007-05-15 14:03:26 +02:00
|
|
|
|
stdcall strtoint,eax
|
|
|
|
|
push eax
|
|
|
|
|
pop ecx
|
|
|
|
|
call _midibase
|
2007-05-15 20:05:31 +02:00
|
|
|
|
|
|
|
|
|
popad
|
|
|
|
|
ret
|
2007-05-15 14:03:26 +02:00
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
ugui db 'gui',0
|
|
|
|
|
ugui_mouse_speed db 'mouse_speed',0
|
2007-05-15 20:05:31 +02:00
|
|
|
|
ugui_mouse_speed_def db '2',0
|
2007-05-15 14:03:26 +02:00
|
|
|
|
ugui_mouse_delay db 'mouse_delay',0
|
2007-05-15 20:05:31 +02:00
|
|
|
|
ugui_mouse_delay_def db '0x00A',0
|
2007-05-15 14:03:26 +02:00
|
|
|
|
|
|
|
|
|
udev db 'dev',0
|
|
|
|
|
udev_sb16 db 'sb16',0
|
2007-05-15 20:05:31 +02:00
|
|
|
|
udev_sb16_def db '0x220',0
|
2007-05-15 14:03:26 +02:00
|
|
|
|
udev_sound_dma db 'sound_dma',0
|
2007-05-15 20:05:31 +02:00
|
|
|
|
udev_sound_dma_def db '1',0
|
2007-05-15 14:03:26 +02:00
|
|
|
|
udev_midibase db 'midibase',0
|
2007-05-15 20:05:31 +02:00
|
|
|
|
udev_midibase_def db '0x320',0
|
2007-05-15 14:03:26 +02:00
|
|
|
|
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD> DWord <EFBFBD> eax (<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᨬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>।<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>⥬<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
2007-05-15 20:05:31 +02:00
|
|
|
|
|
2007-05-15 14:03:26 +02:00
|
|
|
|
proc strtoint stdcall,strs
|
|
|
|
|
pushad
|
|
|
|
|
|
|
|
|
|
mov eax,[strs]
|
|
|
|
|
inc eax
|
|
|
|
|
mov bl,[eax]
|
|
|
|
|
cmp bl,'x'
|
|
|
|
|
je .hex
|
|
|
|
|
cmp bl,'X'
|
|
|
|
|
je .hex
|
|
|
|
|
jmp .dec
|
|
|
|
|
.hex:
|
|
|
|
|
inc eax
|
|
|
|
|
stdcall strtoint_hex,eax
|
|
|
|
|
jmp .exit
|
|
|
|
|
.dec:
|
|
|
|
|
dec eax
|
|
|
|
|
stdcall strtoint_dec,eax
|
|
|
|
|
.exit:
|
2007-05-15 20:05:31 +02:00
|
|
|
|
mov [esp+28],eax
|
2007-05-15 14:03:26 +02:00
|
|
|
|
popad
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD> DWord <EFBFBD> eax <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>筮<EFBFBD><EFBFBD>
|
|
|
|
|
proc strtoint_dec stdcall,strs
|
|
|
|
|
pushad
|
2007-05-15 20:05:31 +02:00
|
|
|
|
xor edx,edx
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov esi,[strs]
|
|
|
|
|
@@:
|
|
|
|
|
lodsb
|
|
|
|
|
or al,al
|
|
|
|
|
jnz @b
|
|
|
|
|
mov ebx,esi
|
|
|
|
|
mov esi,[strs]
|
|
|
|
|
dec ebx
|
|
|
|
|
sub ebx,esi
|
|
|
|
|
mov ecx,1
|
|
|
|
|
|
|
|
|
|
@@:
|
|
|
|
|
dec ebx
|
|
|
|
|
or ebx,ebx
|
|
|
|
|
jz @f
|
|
|
|
|
imul ecx,ecx,10 ; <EFBFBD><EFBFBD><EFBFBD>冷<EFBFBD>
|
|
|
|
|
jmp @b
|
|
|
|
|
@@:
|
|
|
|
|
|
|
|
|
|
xchg ebx,ecx
|
|
|
|
|
|
2007-05-15 14:03:26 +02:00
|
|
|
|
|
|
|
|
|
xor ecx,ecx
|
2007-05-15 20:05:31 +02:00
|
|
|
|
|
2007-05-15 14:03:26 +02:00
|
|
|
|
|
|
|
|
|
@@:
|
|
|
|
|
xor eax,eax
|
|
|
|
|
lodsb
|
|
|
|
|
cmp al,0
|
2007-05-15 20:05:31 +02:00
|
|
|
|
je .eend
|
2007-05-15 14:03:26 +02:00
|
|
|
|
|
|
|
|
|
sub al,30h
|
|
|
|
|
imul ebx
|
|
|
|
|
add ecx,eax
|
2007-05-15 20:05:31 +02:00
|
|
|
|
push ecx
|
|
|
|
|
xchg eax,ebx
|
|
|
|
|
mov ecx,10
|
|
|
|
|
div ecx
|
|
|
|
|
xchg eax,ebx
|
|
|
|
|
pop ecx
|
2007-05-15 14:03:26 +02:00
|
|
|
|
jmp @b
|
|
|
|
|
|
2007-05-15 20:05:31 +02:00
|
|
|
|
.eend:
|
|
|
|
|
mov [esp+28],ecx
|
2007-05-15 14:03:26 +02:00
|
|
|
|
popad
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD> DWord <EFBFBD> eax <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>᭠<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>筮<EFBFBD><EFBFBD>
|
|
|
|
|
proc strtoint_hex stdcall,strs
|
|
|
|
|
pushad
|
2007-05-15 20:05:31 +02:00
|
|
|
|
xor edx,edx
|
|
|
|
|
|
|
|
|
|
mov esi,[strs]
|
|
|
|
|
mov ebx,1
|
|
|
|
|
add esi,1
|
|
|
|
|
|
|
|
|
|
@@:
|
|
|
|
|
lodsb
|
|
|
|
|
or al,al
|
|
|
|
|
jz @f
|
|
|
|
|
shl ebx,4
|
|
|
|
|
jmp @b
|
|
|
|
|
@@:
|
2007-05-15 14:03:26 +02:00
|
|
|
|
xor ecx,ecx
|
|
|
|
|
mov esi,[strs]
|
|
|
|
|
|
|
|
|
|
@@:
|
|
|
|
|
xor eax,eax
|
|
|
|
|
lodsb
|
|
|
|
|
cmp al,0
|
2007-05-15 20:05:31 +02:00
|
|
|
|
je .eend
|
2007-05-15 14:03:26 +02:00
|
|
|
|
|
|
|
|
|
cmp al,'a'
|
|
|
|
|
jae .bm
|
|
|
|
|
cmp al,'A'
|
|
|
|
|
jae .bb
|
|
|
|
|
jmp .cc
|
2007-05-15 20:05:31 +02:00
|
|
|
|
.bm: ; 57h
|
2007-05-15 14:03:26 +02:00
|
|
|
|
sub al,57h
|
|
|
|
|
jmp .do
|
|
|
|
|
|
2007-05-15 20:05:31 +02:00
|
|
|
|
.bb: ; 37h
|
2007-05-15 14:03:26 +02:00
|
|
|
|
sub al,37h
|
|
|
|
|
jmp .do
|
|
|
|
|
|
2007-05-15 20:05:31 +02:00
|
|
|
|
.cc: ; 30h
|
2007-05-15 14:03:26 +02:00
|
|
|
|
sub al,30h
|
|
|
|
|
|
|
|
|
|
.do:
|
|
|
|
|
imul ebx
|
|
|
|
|
add ecx,eax
|
2007-05-15 20:05:31 +02:00
|
|
|
|
shr ebx,4
|
2007-05-15 14:03:26 +02:00
|
|
|
|
|
|
|
|
|
jmp @b
|
2007-05-15 20:05:31 +02:00
|
|
|
|
|
|
|
|
|
.eend:
|
|
|
|
|
mov [esp+28],ecx
|
2007-05-15 14:03:26 +02:00
|
|
|
|
popad
|
|
|
|
|
ret
|
2007-05-15 20:05:31 +02:00
|
|
|
|
endp
|
2007-05-15 14:03:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; <EFBFBD><EFBFBD>⠭<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> setup
|
|
|
|
|
|
|
|
|
|
_mouse_speed:
|
|
|
|
|
mov eax,18
|
|
|
|
|
mov ebx,19
|
|
|
|
|
mov ecx,1
|
|
|
|
|
int 0x40
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
_mouse_delay:
|
|
|
|
|
mov eax,18
|
|
|
|
|
mov ebx,19
|
|
|
|
|
mov ecx,3
|
|
|
|
|
int 0x40
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
_sb16:
|
|
|
|
|
mov eax,21
|
|
|
|
|
mov ebx,4
|
|
|
|
|
int 0x40
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
_sound_dma:
|
|
|
|
|
mov eax,21
|
|
|
|
|
mov ebx,10
|
|
|
|
|
int 0x40
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_midibase:
|
|
|
|
|
mov eax,21
|
|
|
|
|
mov ebx,1
|
|
|
|
|
int 0x40
|
|
|
|
|
ret
|