Subversion Repositories Kolibri OS

Rev

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

Rev 488 Rev 494
Line 16... Line 16...
16
  mov [conf_file_loaded],byte 1
16
  mov [conf_file_loaded],byte 1
17
  popad
17
  popad
18
  ret
18
  ret
19
  .fname db '%sys%/sys.conf',0
19
  .fname db '%sys%/sys.conf',0
20
endp
20
endp
21
21
 
-
 
22
 
-
 
23
proc set_kentel_conf
-
 
24
locals
-
 
25
  par db 30 dup(?)
-
 
26
endl
-
 
27
  ;[gui]
-
 
28
  ;mouse_speed
-
 
29
  mov eax,ebp
-
 
30
  add eax,par-ebp
-
 
31
  invoke ini.get_str, ugui, ugui_mouse_speed, eax, ugui_mouse_speed_def
-
 
32
  stdcall strtoint,eax
-
 
33
  push eax
-
 
34
  pop edx
-
 
35
  call _mouse_speed
-
 
36
  
-
 
37
  ;mouse_delay
-
 
38
  mov eax,ebp
-
 
39
  add eax,par-ebp
-
 
40
  invoke ini.get_str, ugui, ugui_mouse_delay, eax, ugui_mouse_delay_def
-
 
41
  stdcall strtoint,eax
-
 
42
  push eax
-
 
43
  pop edx
-
 
44
  call _mouse_delay
-
 
45
 
-
 
46
  ;[dev]
-
 
47
  ;sb16
-
 
48
  mov eax,ebp
-
 
49
  add eax,par-ebp
-
 
50
  invoke ini.get_str, udev, udev_sb16, eax, udev_sb16_def
-
 
51
  stdcall strtoint,eax
-
 
52
  push eax
-
 
53
  pop ecx
-
 
54
  call _sb16
-
 
55
  
-
 
56
  ;sound_dma
-
 
57
  mov eax,ebp
-
 
58
  add eax,par-ebp
-
 
59
  invoke ini.get_str, udev, udev_sound_dma, eax, udev_sound_dma_def
-
 
60
  stdcall strtoint,eax
-
 
61
  push eax
-
 
62
  pop ecx
-
 
63
  call _sound_dma  
-
 
64
  
-
 
65
  
-
 
66
  ;midibase
-
 
67
  mov eax,ebp
-
 
68
  add eax,par-ebp
-
 
69
  invoke ini.get_str, udev, udev_midibase, eax, udev_midibase_def
-
 
70
  stdcall strtoint,eax
-
 
71
  push eax
-
 
72
  pop ecx
-
 
73
  call _midibase
-
 
74
  
-
 
75
endp
-
 
76
 
-
 
77
ugui db 'gui',0
-
 
78
ugui_mouse_speed db 'mouse_speed',0
-
 
79
ugui_mouse_speed_def db '',0
-
 
80
ugui_mouse_delay db 'mouse_delay',0
-
 
81
ugui_mouse_delay_def db '',0
-
 
82
 
-
 
83
udev db 'dev',0
-
 
84
udev_sb16 db 'sb16',0
-
 
85
udev_sb16_def db '',0
-
 
86
udev_sound_dma db 'sound_dma',0
-
 
87
udev_sound_dma_def db '',0
-
 
88
udev_midibase db 'midibase',0
-
 
89
udev_midibase_def db '',0
-
 
90
 
-
 
91
; ª®­¢¥à祭¨¥ áâப¨ ¢ DWord ¢ eax (¯® ¢â®à®¬ã ᨬ¢®«ã ®¯à¥¤¥«ï¥â á¨á⥬ã áç¨á«¥­¨ï)
-
 
92
proc strtoint stdcall,strs
-
 
93
  pushad
-
 
94
  
-
 
95
  mov eax,[strs]
-
 
96
  inc eax
-
 
97
  mov bl,[eax]
-
 
98
  cmp bl,'x'
-
 
99
  je .hex
-
 
100
  cmp bl,'X'
-
 
101
  je .hex
-
 
102
  jmp .dec
-
 
103
.hex:
-
 
104
  inc eax
-
 
105
  stdcall strtoint_hex,eax
-
 
106
  jmp .exit
-
 
107
.dec:
-
 
108
  dec eax
-
 
109
  stdcall strtoint_dec,eax
-
 
110
.exit:
-
 
111
  mov [esi+28],eax
-
 
112
  popad
-
 
113
  ret  
-
 
114
endp
-
 
115
 
-
 
116
; ª®­¢¥à祭¨¥ áâப¨ ¢ DWord ¢ eax ¤«ï ¤¥áïâ¨ç­®£®
-
 
117
proc strtoint_dec stdcall,strs
-
 
118
  pushad
-
 
119
  
-
 
120
  xor ecx,ecx
-
 
121
  mov ebx,1 ; ¯®à冷ª
-
 
122
  mov esi,[strs]
-
 
123
 
-
 
124
@@:  
-
 
125
  xor eax,eax
-
 
126
  lodsb
-
 
127
  cmp al,0
-
 
128
  je .end
-
 
129
  
-
 
130
  sub al,30h
-
 
131
  imul ebx
-
 
132
  add ecx,eax
-
 
133
  imul ebx,ebx,10
-
 
134
 
-
 
135
  jmp @b
-
 
136
  
-
 
137
.end:
-
 
138
  mov [esi+28],ecx
-
 
139
  popad
-
 
140
  ret
-
 
141
endp
-
 
142
 
-
 
143
; ª®­¢¥à祭¨¥ áâப¨ ¢ DWord ¢ eax ¤«ï è¥á­ ¤æ â¨à¨ç­®£®
-
 
144
proc strtoint_hex stdcall,strs
-
 
145
  pushad
-
 
146
  
-
 
147
  xor ecx,ecx
-
 
148
  mov ebx,1 ; ¯®à冷ª
-
 
149
  mov esi,[strs]
-
 
150
 
-
 
151
@@:  
-
 
152
  xor eax,eax
-
 
153
  lodsb
-
 
154
  cmp al,0
-
 
155
  je .end
-
 
156
  
-
 
157
  cmp al,'a'
-
 
158
  jae .bm
-
 
159
  cmp al,'A'
-
 
160
  jae .bb
-
 
161
  jmp .cc
-
 
162
.bm:	; 57h
-
 
163
  sub al,57h
-
 
164
  jmp .do
-
 
165
 
-
 
166
.bb:	; 37h
-
 
167
  sub al,37h
-
 
168
  jmp .do
-
 
169
 
-
 
170
.cc:	; 30h
-
 
171
  sub al,30h
-
 
172
  
-
 
173
.do:  
-
 
174
  imul ebx
-
 
175
  add ecx,eax
-
 
176
  imul ebx,ebx,16
-
 
177
 
-
 
178
  jmp @b
-
 
179
  
-
 
180
.end:
-
 
181
  mov [esi+28],ecx
-
 
182
  popad
-
 
183
  ret
-
 
184
endp
-
 
185
 
-
 
186
 
-
 
187
; ãáâ ­®¢ª¨ ¨§ setup
-
 
188
 
-
 
189
_mouse_speed:
-
 
190
    mov  eax,18
-
 
191
    mov  ebx,19
-
 
192
    mov  ecx,1
-
 
193
    int 0x40
-
 
194
 ret
-
 
195
 
-
 
196
_mouse_delay:
-
 
197
    mov  eax,18
-
 
198
    mov  ebx,19
-
 
199
    mov  ecx,3
-
 
200
    int 0x40
-
 
201
 ret
-
 
202
 
-
 
203
_sb16:
-
 
204
    mov  eax,21
-
 
205
    mov  ebx,4
-
 
206
    int 0x40
-
 
207
 ret
-
 
208
    
-
 
209
_sound_dma:
-
 
210
    mov  eax,21
-
 
211
    mov  ebx,10
-
 
212
    int 0x40
-
 
213
 ret
-
 
214
 
-
 
215
 
-
 
216
_midibase:
-
 
217
    mov  eax,21
-
 
218
    mov  ebx,1
-
 
219
    int 0x40
-
 
220
 ret
-
 
221
22
222