Rev 3604 | Rev 9568 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1622 | mario79 | 1 | ; v. 0.2 |
2 | ; last update: 19/09/2010 |
||
3 | ; written by: Marat Zakiyanov aka Mario79, aka Mario |
||
4 | ; changes: select path with OpenDialog |
||
5 | ; show 2 different path for Info and SMART files |
||
6 | ; draw number of page |
||
7 | ;--------------------------------------------------------------------- |
||
8 | ; v. 0.11: 15.09.2009 staper@inbox.ru |
||
9 | ;--------------------------------------------------------------------- |
||
10 | ; Макросы load_lib.mac, editbox_ex и библиотеку box_lib.obj создали: |
||
11 | ; |
||
12 | ; Mario79, Mario - Marat Zakiyanov / Марат Закиянов |
||
13 | ; Diamondz - Evgeny Grechnikov / Евгений Гречников и др. |
||
14 | ;--------------------------------------------------------------------- |
||
15 | use32 |
||
16 | org 0 |
||
17 | |||
18 | db 'MENUET01' |
||
19 | dd 1 |
||
20 | dd START |
||
21 | dd IM_END |
||
22 | dd I_END ;(i_end+200) and not 3 |
||
23 | dd stacktop ;(i_end+200) and not 3 |
||
24 | dd 0x0 ;buf_cmd_lin |
||
25 | dd cur_dir_path |
||
26 | |||
27 | PRIMARY_CHANNEL equ 0x1f7 |
||
28 | SECONDARY_CHANNEL equ 0x177 |
||
29 | ; Ручной поиск портов по шине PCI (преимущественно для SATA): |
||
30 | ; mcall 21,12,1 ;разрешить низкоуровневый доступ к PCI |
||
31 | ; mcall 62,0x0006,((((0x1f shl 3) + 01) shl 8) + 0x10) ;см. ф-ю 62 |
||
32 | ; ax = 1 - стандартные порты (константы выше), или нестандартные (168-16f,1e8-1ef) |
||
33 | ; Пример: |
||
34 | ; Fnc 02: 10-0x1c01,14-0x18f5,18-0x18f9,1c-0x18f1,BMA-0x1811,00000000 |
||
35 | ; Fnc 01: 10-1,14-1,18-1,1c-1,BMA-0x18e1,0x18d1 |
||
36 | ; Регистр по смещению 0х10 для функции 02 содержит 0x1c01 (порты 0х1с00-0х1с07) |
||
37 | |||
3604 | fedesco | 38 | include 'lang.inc' ; language support |
39 | |||
1622 | mario79 | 40 | ; Режимы Legacy, Native и пр. меняются через BIOS. |
1702 | Lrz | 41 | include '../../../config.inc' ;for nightbuild |
1622 | mario79 | 42 | include '..\..\..\macros.inc' |
43 | include '../../../develop/libraries/box_lib/trunk/box_lib.mac' |
||
44 | include '../../../develop/libraries/box_lib/load_lib.mac' |
||
45 | @use_library |
||
46 | ;--------------------------------------------------------------------- |
||
47 | macro ab { |
||
48 | add ebx,455*65536 |
||
49 | } |
||
50 | ;--------------------------------------------------------------------- |
||
51 | macro sb { |
||
52 | sub ebx,455*65536-12 |
||
53 | } |
||
54 | ;--------------------------------------------------------------------- |
||
55 | macro ad { |
||
56 | add ebx,12 |
||
57 | } |
||
58 | ;--------------------------------------------------------------------- |
||
59 | macro wba num,text { |
||
60 | @@: |
||
61 | bt di,num |
||
62 | jnc @f |
||
63 | ad |
||
64 | mcall 4,,0x80000000,text |
||
65 | } |
||
66 | ;--------------------------------------------------------------------- |
||
67 | macro wba num,text { |
||
68 | @@: |
||
69 | bt di,num |
||
70 | jnc @f |
||
71 | ad |
||
72 | mcall 4,,0x80000000,text |
||
73 | } |
||
74 | ;--------------------------------------------------------------------- |
||
75 | macro sc num,text { |
||
76 | cmp al,num |
||
77 | jne @f |
||
78 | mov edx,text |
||
79 | @@: |
||
80 | } |
||
81 | ;--------------------------------------------------------------------- |
||
82 | macro mz text,str1,str2,str3 { |
||
83 | mcall 4,,0x80444444,text |
||
84 | ab |
||
85 | mov edx,ebx |
||
86 | push ebx |
||
87 | str1 |
||
88 | str2 |
||
89 | str3 |
||
90 | mcall 47,0x800a0000,,,0x0 |
||
91 | pop ebx |
||
92 | sb |
||
93 | } |
||
94 | ;--------------------------------------------------------------------- |
||
95 | START: |
||
96 | ; load_library boxlib_name,cur_dir_path,buf_cmd_lin,system_path,\ |
||
97 | ; err_message_found_lib,head_f_l,Box_lib_import,err_message_import,head_f_i |
||
98 | mcall 68,11 |
||
99 | |||
100 | load_libraries l_libs_start,end_l_libs |
||
101 | |||
102 | cmp eax,-1 |
||
103 | jz close |
||
104 | ;--------------------------------------------------------------------- |
||
105 | mov edi,filename_area |
||
106 | mov esi,default_Info+5 ;default.info |
||
107 | call copy_str_1 |
||
108 | |||
109 | mov edi,filename_area2 |
||
110 | mov esi,default_SMART+5 ;default.smart |
||
111 | call copy_str_1 |
||
112 | |||
113 | mov edi,fname_Info |
||
114 | mov esi,default_Info ;/sys/default.info |
||
115 | call copy_str_1 |
||
116 | |||
117 | mov edi,fname_SMART ;/sys/default.smart |
||
118 | ; cmp byte [edi], 0 |
||
119 | ; jne skin_path_ready |
||
120 | mov esi,default_SMART |
||
121 | call copy_str_1 |
||
3604 | fedesco | 122 | ;skin_path_ready: |
1622 | mario79 | 123 | ;--------------------------------------------------------------------- |
124 | ;OpenDialog initialisation |
||
125 | push dword OpenDialog_data |
||
126 | call [OpenDialog_Init] |
||
127 | |||
128 | push dword OpenDialog_data2 |
||
129 | call [OpenDialog_Init] |
||
3604 | fedesco | 130 | |
1622 | mario79 | 131 | ; prepare for PathShow |
132 | push dword PathShow_data_1 |
||
133 | call [PathShow_prepare] |
||
3604 | fedesco | 134 | |
1622 | mario79 | 135 | push dword PathShow_data_2 |
136 | call [PathShow_prepare] |
||
137 | ;--------------------------------------------------------------------- |
||
138 | |||
139 | mcall 40,0x27 |
||
140 | ;--------------------------------------------------------------------- |
||
141 | redraw_all: |
||
142 | redraw: |
||
143 | call draw_window |
||
144 | ;--------------------------------------------------------------------- |
||
145 | still: |
||
146 | mcall 10 |
||
147 | dec al |
||
148 | jz redraw_all |
||
149 | dec al |
||
150 | jz key |
||
151 | dec al |
||
152 | jz button |
||
153 | ;--------------------------------------------------------------------- |
||
154 | mouse: |
||
155 | bt [flags],2 |
||
156 | jnc still |
||
157 | mcall 37,2 |
||
158 | test al,al |
||
159 | jz still |
||
160 | push dword Option_boxs |
||
161 | call [option_box_mouse] |
||
162 | jmp still |
||
163 | ;--------------------------------------------------------------------- |
||
164 | copy_str_1: |
||
165 | xor eax,eax |
||
166 | cld |
||
167 | @@: |
||
168 | lodsb |
||
169 | stosb |
||
170 | test eax,eax |
||
171 | jnz @b |
||
172 | ret |
||
173 | ;--------------------------------------------------------------------- |
||
174 | draw_PathShow: |
||
175 | pusha |
||
176 | mcall 13,<125,420>,<83,15>,0xFFFFED |
||
177 | mcall 13,,<100,15>, |
||
178 | ; draw for PathShow |
||
179 | push dword PathShow_data_1 |
||
180 | call [PathShow_draw] |
||
3604 | fedesco | 181 | |
1622 | mario79 | 182 | push dword PathShow_data_2 |
183 | call [PathShow_draw] |
||
184 | popa |
||
185 | ret |
||
186 | ;--------------------------------------------------------------------- |
||
187 | draw_window: |
||
188 | mcall 12,1 |
||
189 | xor esi,esi |
||
190 | mcall 0,<100,580>,<100,350>,0x34ffffff,,title |
||
191 | mcall 8,<1,30>,<1,15>,2,0x365732 |
||
192 | mcall ,<35,38>,,3, |
||
193 | ; mcall ,<77,38>,,6, |
||
194 | mcall ,<120,45>,,7, |
||
195 | |||
196 | mcall ,<195,20>,,4, ;влево,вправо |
||
197 | mcall ,<217,20>,,5, |
||
198 | mcall 4,<4,6>,0x80ffffff,menu_text |
||
199 | |||
200 | mcall ,<260,6>,0x80000000,page_text |
||
201 | movzx ecx, byte [page_num] |
||
202 | mcall 47,0x800a0000,,<300,6>,0x0 |
||
203 | |||
204 | mcall 38,<2,535>,<20,20>,0x00aabbaa |
||
205 | bt [flags],2 |
||
206 | jnc @f |
||
207 | call show_ControlBlock |
||
208 | mcall 4,<4,125>,0x80FF0000,[error_text] |
||
209 | jmp .end |
||
210 | @@: |
||
211 | bt [flags],6 |
||
212 | jnc @f |
||
213 | call show_TestBlock |
||
214 | jmp .end |
||
215 | @@: |
||
216 | bt [flags],7 |
||
217 | jnc @f |
||
218 | call show_InfoBlock |
||
219 | jmp .end |
||
220 | @@: |
||
221 | bt [flags],8 |
||
222 | jnc .end |
||
223 | call show_SmartBlock |
||
224 | .end: |
||
225 | mcall 12,2 |
||
226 | ret |
||
227 | ;--------------------------------------------------------------------- |
||
228 | key: |
||
229 | mcall 2 |
||
230 | ; push edit1 |
||
231 | ; call [edit_box_key] |
||
232 | ; push edit1 |
||
233 | ; call [edit_box_draw] |
||
234 | jmp still |
||
235 | ;--------------------------------------------------------------------- |
||
236 | button: |
||
237 | mcall 17 |
||
238 | cmp ah,1 |
||
239 | jne @f |
||
240 | close: |
||
241 | mcall -1 |
||
242 | @@: |
||
243 | cmp ah,2 |
||
244 | jne @f |
||
245 | call get_InfoBlock |
||
246 | mov ax,[flags] |
||
247 | btr ax,2 |
||
248 | btr ax,6 |
||
249 | bts ax,7 |
||
250 | btr ax,8 |
||
251 | mov [flags],ax |
||
252 | mov [page_num],1 |
||
253 | jmp redraw |
||
254 | ;--------------------------------------------------------------------- |
||
255 | @@: |
||
256 | cmp ah,3 |
||
257 | jne @f |
||
258 | call get_SmartBlock |
||
259 | mov [page_num],1 |
||
260 | mov ax,[flags] |
||
261 | btr ax,2 |
||
262 | btr ax,6 |
||
263 | btr ax,7 |
||
264 | bts ax,8 |
||
265 | mov [flags],ax |
||
266 | jmp redraw |
||
267 | ;--------------------------------------------------------------------- |
||
268 | @@: |
||
269 | cmp ah,4 |
||
270 | jne @f |
||
271 | cmp [page_num],1 |
||
272 | je still |
||
273 | dec [page_num] |
||
274 | jmp redraw |
||
275 | ;--------------------------------------------------------------------- |
||
276 | @@: |
||
277 | cmp ah,5 |
||
278 | jne @f |
||
279 | cmp [page_num],5 |
||
280 | je still |
||
281 | inc [page_num] |
||
282 | jmp redraw |
||
283 | ;--------------------------------------------------------------------- |
||
284 | @@: |
||
285 | cmp ah,6 |
||
286 | jne @f |
||
287 | mov ax,[flags] |
||
288 | btr ax,2 |
||
289 | btr ax,6 |
||
290 | btr ax,7 |
||
291 | btr ax,8 |
||
292 | mov [flags],ax |
||
293 | jmp redraw |
||
294 | ;--------------------------------------------------------------------- |
||
295 | @@: |
||
296 | cmp ah,7 |
||
297 | jne @f |
||
298 | mov ax,[flags] |
||
299 | bts ax,2 |
||
300 | btr ax,6 |
||
301 | btr ax,7 |
||
302 | btr ax,8 |
||
303 | mov [flags],ax |
||
304 | @@: |
||
305 | cmp ah,8 |
||
306 | jne @f |
||
307 | bts [flags],9 |
||
308 | call get_SmartBlock |
||
309 | jmp still |
||
310 | ;--------------------------------------------------------------------- |
||
311 | @@: |
||
312 | cmp ah,9 ; Save Info |
||
313 | jne @f |
||
314 | ; invoke OpenDialog |
||
315 | mov [OpenDialog_data.type],dword 1 |
||
316 | push dword OpenDialog_data |
||
317 | call [OpenDialog_Start] |
||
318 | cmp [OpenDialog_data.status],1 |
||
319 | jne still |
||
320 | ; prepare for PathShow |
||
321 | push dword PathShow_data_1 |
||
322 | call [PathShow_prepare] |
||
323 | call draw_PathShow |
||
324 | |||
325 | btr [flags],4 |
||
326 | jmp save_file |
||
327 | ;--------------------------------------------------------------------- |
||
328 | @@: |
||
329 | cmp ah,10 ; Load Info |
||
330 | jne @f |
||
331 | ; invoke OpenDialog |
||
332 | mov [OpenDialog_data.type],dword 0 |
||
333 | push dword OpenDialog_data |
||
334 | call [OpenDialog_Start] |
||
335 | cmp [OpenDialog_data.status],1 |
||
336 | jne still |
||
337 | ; prepare for PathShow |
||
338 | push dword PathShow_data_1 |
||
339 | call [PathShow_prepare] |
||
340 | call draw_PathShow |
||
341 | |||
342 | btr [flags],4 |
||
343 | jmp open_file |
||
344 | ;--------------------------------------------------------------------- |
||
345 | @@: |
||
346 | cmp ah,11 ; Save SMART |
||
347 | jne @f |
||
348 | ; invoke OpenDialog |
||
349 | mov [OpenDialog_data2.type],dword 1 |
||
350 | push dword OpenDialog_data2 |
||
351 | call [OpenDialog_Start] |
||
352 | cmp [OpenDialog_data2.status],1 |
||
353 | jne still |
||
354 | ; prepare for PathShow |
||
355 | push dword PathShow_data_2 |
||
356 | call [PathShow_prepare] |
||
357 | call draw_PathShow |
||
358 | |||
359 | bts [flags],4 |
||
360 | jmp save_file |
||
361 | ;--------------------------------------------------------------------- |
||
362 | @@: |
||
363 | cmp ah,12 ; Load SMART |
||
364 | jne redraw |
||
365 | ; invoke OpenDialog |
||
366 | mov [OpenDialog_data2.type],dword 0 |
||
367 | push dword OpenDialog_data2 |
||
368 | call [OpenDialog_Start] |
||
369 | cmp [OpenDialog_data2.status],1 |
||
370 | jne still |
||
371 | ; prepare for PathShow |
||
372 | push dword PathShow_data_2 |
||
373 | call [PathShow_prepare] |
||
374 | call draw_PathShow |
||
375 | |||
376 | bts [flags],4 |
||
377 | jmp open_file |
||
378 | ;--------------------------------------------------------------------- |
||
379 | open_file: |
||
380 | mov [func_70.func_n],0 |
||
381 | mov [func_70.param3],512 |
||
382 | mov [func_70.param4],InfoArray |
||
383 | mov [func_70.name],filename_area |
||
384 | bt [flags],4 |
||
385 | jnc @f |
||
386 | mov [func_70.param4],SmartArray |
||
387 | mov [func_70.param3],1024 |
||
388 | mov [func_70.name],filename_area2 |
||
389 | @@: |
||
390 | mcall 70,func_70 |
||
391 | test al,al ;файл найден? |
||
392 | jnz .1 |
||
393 | mov ax,[flags] |
||
394 | bts ax,0 |
||
395 | btr ax,7 |
||
396 | btr ax,8 |
||
397 | btr ax,6 |
||
398 | btr ax,2 |
||
399 | bt ax,4 |
||
400 | jc @f |
||
401 | bts ax,7 |
||
402 | mov [flags],ax |
||
403 | jmp good |
||
404 | @@: |
||
405 | bts ax,8 |
||
406 | mov [flags],ax |
||
407 | jmp redraw_all |
||
408 | .1: |
||
409 | bt [flags],4 |
||
410 | jnc @f |
||
411 | mov [error_text],error_open_file_string_SMART |
||
412 | jmp redraw_all |
||
413 | @@: |
||
414 | mov [error_text],error_open_file_string_Info |
||
415 | jmp redraw_all |
||
416 | ;--------------------------------------------------------------------- |
||
417 | save_file: ;сохраняем файл |
||
418 | mov [func_70.func_n],2 |
||
419 | mov [func_70.param3],512 |
||
420 | mov [func_70.param4],InfoArray |
||
421 | mov [func_70.name],filename_area |
||
422 | bt [flags],4 |
||
423 | jnc @f |
||
424 | mov [func_70.param4],SmartArray |
||
425 | mov [func_70.param3],1024 |
||
426 | mov [func_70.name],filename_area2 |
||
427 | @@: |
||
428 | mcall 70,func_70 |
||
429 | test al,al ;сохранён удачно? |
||
430 | jz good |
||
431 | bt [flags],4 |
||
432 | jnc @f |
||
433 | mov [error_text],error_save_file_string_SMART |
||
434 | jmp redraw_all |
||
435 | @@: |
||
436 | mov [error_text],error_save_file_string_Info |
||
437 | jmp redraw_all |
||
438 | ;--------------------------------------------------------------------- |
||
439 | good: |
||
440 | mov [error_text],no_error_text |
||
441 | jmp redraw_all |
||
442 | ;--------------------------------------------------------------------- |
||
443 | ports_: |
||
444 | mov eax,[option_group1] |
||
445 | cmp eax,op1 |
||
446 | jne @f |
||
447 | mov edx,PRIMARY_CHANNEL |
||
448 | btr [flags],5 |
||
449 | jmp .0 |
||
450 | ;--------------------------------------------------------------------- |
||
451 | @@: |
||
452 | cmp eax,op2 |
||
453 | jne @f |
||
454 | mov edx,PRIMARY_CHANNEL |
||
455 | bts [flags],5 |
||
456 | jmp .0 |
||
457 | ;--------------------------------------------------------------------- |
||
458 | @@: |
||
459 | cmp eax,op3 |
||
460 | jbe @f |
||
461 | mov edx,SECONDARY_CHANNEL |
||
462 | btr [flags],5 |
||
463 | jmp .0 |
||
464 | ;--------------------------------------------------------------------- |
||
465 | @@: |
||
466 | mov edx,SECONDARY_CHANNEL |
||
467 | bts [flags],5 |
||
468 | .0: |
||
469 | mov ecx,edx |
||
470 | sub ecx,7 |
||
471 | mcall 46,0 |
||
472 | ret |
||
473 | ;--------------------------------------------------------------------- |
||
474 | get_InfoBlock: |
||
475 | call ports_ |
||
476 | push ecx edx |
||
477 | xor ecx,ecx |
||
478 | .1: |
||
479 | in al,dx ;Проверить готовность |
||
480 | dec cx ;необходимо проверять и бит 7, однако работает ... |
||
481 | jz .error |
||
482 | bt ax,6 |
||
483 | jnc .1 |
||
484 | |||
485 | dec dx |
||
486 | in al,dx |
||
487 | mov bx,ax ;сохраняем бит выбора устройтсва |
||
488 | btr ax,4 |
||
489 | bt [flags],5 |
||
490 | jnc @f |
||
491 | bts ax,4 |
||
492 | @@: |
||
493 | out dx,al |
||
494 | inc dx |
||
495 | mov al,0xec |
||
496 | out dx,al |
||
497 | |||
498 | push bx |
||
499 | mcall 5,10 |
||
500 | pop bx |
||
501 | xor cx,cx |
||
502 | .2: |
||
503 | in al,dx ;Проверить готовность |
||
504 | dec cx |
||
505 | jz .error |
||
506 | bt ax,6 |
||
507 | jnc .2 |
||
508 | |||
509 | mov esi,InfoArray ;Получить информацию |
||
510 | xor edi,edi |
||
511 | sub dx,7 |
||
512 | .3: |
||
513 | in ax,dx |
||
514 | xchg al,ah |
||
515 | mov [esi+edi*2],ax |
||
516 | inc edi |
||
517 | cmp edi,256 |
||
518 | jne .3 |
||
519 | bts [flags],0 |
||
520 | btr [flags],2 |
||
521 | btr [flags],3 |
||
522 | |||
523 | push bx |
||
524 | mcall 5,10 |
||
525 | pop bx |
||
526 | |||
527 | mov ax,bx |
||
528 | add dx,6 |
||
529 | out dx,al |
||
530 | pop edx ecx |
||
531 | mcall 46,1 |
||
532 | ret |
||
533 | ;--------------------------------------------------------------------- |
||
534 | .error: |
||
535 | bts [flags],3 |
||
536 | pop edx ecx |
||
537 | mcall 46,1 |
||
538 | ret |
||
539 | ;--------------------------------------------------------------------- |
||
540 | get_SmartBlock: |
||
541 | call ports_ |
||
542 | push ecx edx |
||
543 | xor ecx,ecx |
||
544 | .1: |
||
545 | in al,dx ;Проверить готовность |
||
546 | dec cx |
||
547 | jz .error |
||
548 | bt ax,6 |
||
549 | jnc .1 |
||
550 | |||
551 | dec dx |
||
552 | in al,dx |
||
553 | mov cx,ax ;сохраняем бит выбора устройтсва |
||
554 | btr ax,4 |
||
555 | bt [flags],5 |
||
556 | jnc @f |
||
557 | bts ax,4 |
||
558 | @@: |
||
559 | out dx,al |
||
560 | inc dx |
||
561 | |||
562 | bt [flags],9 ;S.M.A.R.T. on/off |
||
563 | jnc @f |
||
564 | sub dx,3 |
||
565 | mov al,0x4f |
||
566 | out dx,al |
||
567 | inc dx |
||
568 | mov al,0xc2 |
||
569 | out dx,al |
||
570 | sub dx,4 |
||
571 | mov al,0xd8 |
||
572 | btc [flags],10 |
||
573 | jnc .2 |
||
574 | inc al |
||
575 | .2: |
||
576 | out dx,al |
||
577 | add dx,6 |
||
578 | mov al,0xb0 |
||
579 | out dx,al |
||
580 | dec dx |
||
581 | mov ax,cx |
||
582 | out dx,ax |
||
583 | btr [flags],9 |
||
584 | btr [flags],1 |
||
585 | jmp .end |
||
586 | ;--------------------------------------------------------------------- |
||
587 | @@: |
||
588 | sub dx,3 |
||
589 | mov al,0x4f |
||
590 | out dx,al |
||
591 | inc dx |
||
592 | mov al,0xc2 |
||
593 | out dx,al |
||
594 | sub dx,4 |
||
595 | mov al,0xd0 |
||
596 | out dx,al |
||
597 | add dx,6 |
||
598 | mov al,0xb0 |
||
599 | out dx,al |
||
600 | |||
601 | mcall 5,10 |
||
602 | |||
603 | mov esi,SmartArray ;Получить информацию |
||
604 | xor edi,edi |
||
605 | sub dx,7 |
||
606 | .3: |
||
607 | in ax,dx |
||
608 | xchg al,ah |
||
609 | mov [esi+edi*2],ax |
||
610 | inc edi |
||
611 | cmp edi,256 |
||
612 | jne .3 |
||
613 | |||
614 | mcall 5,10 |
||
615 | |||
616 | add dx,4 |
||
617 | mov al,0x4f |
||
618 | out dx,al |
||
619 | inc dx |
||
620 | mov al,0xc2 |
||
621 | out dx,al |
||
622 | sub dx,4 |
||
623 | mov al,0xd1 |
||
624 | out dx,al |
||
625 | add dx,6 |
||
626 | mov al,0xb0 |
||
627 | out dx,al |
||
628 | |||
629 | mcall 5,10 |
||
630 | |||
631 | sub dx,7 |
||
632 | .4: |
||
633 | in ax,dx |
||
634 | xchg al,ah |
||
635 | mov [esi+edi*2],ax |
||
636 | inc edi |
||
637 | cmp edi,256*2 |
||
638 | jne .4 |
||
639 | |||
640 | bts [flags],1 |
||
641 | btr [flags],3 |
||
642 | mov ax,cx |
||
643 | add dx,6 |
||
644 | out dx,al |
||
645 | .end: |
||
646 | pop edx ecx |
||
647 | mcall 46,1 |
||
648 | ret |
||
649 | ;--------------------------------------------------------------------- |
||
650 | .error: |
||
651 | bts [flags],3 |
||
652 | pop edx ecx |
||
653 | mcall 46,1 |
||
654 | ret |
||
655 | ;--------------------------------------------------------------------- |
||
656 | show_ControlBlock: |
||
657 | mcall 4,<4,30>,0x80000000,ctrl_text1 |
||
658 | mcall ,<4,45>,,ctrl_text2 |
||
659 | push dword Option_boxs |
||
660 | call [option_box_draw] |
||
661 | ; push dword edit1 |
||
662 | ; call [edit_box_draw] |
||
663 | call draw_PathShow |
||
664 | |||
665 | mcall 8,<3,80>,<60,15>,8,0xf0f0f0 |
||
666 | mcall ,<50,30>,<82,15>,9, ; Save Info |
||
667 | mcall ,<90,30>,,10, ; Load Info |
||
668 | mcall ,<50,30>,<100,15>,11, ; Save SMART |
||
669 | mcall ,<90,30>,,12, ; Load SMART |
||
670 | mcall 4,<4,87>,0x80000000,edbx_text1 |
||
671 | mcall ,<7,64>,,smrt_text1 |
||
672 | mcall ,<4,105>,,edbx_text2 |
||
673 | show_TestBlock: |
||
674 | ret |
||
675 | ;--------------------------------------------------------------------- |
||
676 | show_InfoBlock: |
||
677 | bt [flags],0 |
||
678 | jnc .end |
||
679 | bt [flags],3 |
||
680 | jc .end |
||
681 | mov al,[page_num] |
||
682 | dec al |
||
683 | jz .page1 |
||
684 | dec al |
||
685 | jz .page2 |
||
686 | dec al |
||
687 | je .page3 |
||
688 | dec al |
||
689 | jz .page4 |
||
690 | dec al |
||
691 | jz .page5 |
||
692 | .end: |
||
693 | ret |
||
694 | ;--------------------------------------------------------------------- |
||
695 | .page1: |
||
696 | ;TABLE 1 of 11 |
||
697 | mcall 4,5*65536+25,0x80444444,t.10_19 |
||
698 | ab ; add ebx,300*65536 |
||
699 | mcall ,,0x0,(InfoArray+10*2),((19-10)+1)*2 |
||
700 | sb ; sub ebx,300*65536-12 |
||
701 | mcall ,,0x80444444,t.23_26 |
||
702 | ab |
||
703 | mcall ,,0x0,(InfoArray+23*2),((26-23)+1)*2 |
||
704 | sb |
||
705 | mcall ,,0x80444444,t.27_46 |
||
706 | ab |
||
707 | mcall ,,0x0,(InfoArray+27*2),((46-27)+1)*2 |
||
708 | sb |
||
709 | mcall ,,0x80444444,t.type |
||
710 | ab |
||
711 | mov di,[InfoArray+222*2] |
||
712 | @@: |
||
713 | bt di,4 |
||
714 | jnc @f |
||
715 | mcall 4,,0x80000000,t.222.12.1 |
||
716 | @@: |
||
717 | bt di,4 |
||
718 | jc @f |
||
719 | mcall 4,,0x80000000,t.222.12.0 |
||
720 | @@: |
||
721 | sb |
||
722 | mcall 4,,0x80444444,t.60_61 |
||
723 | ab |
||
724 | mov edx,ebx |
||
725 | push ebx |
||
726 | mov ecx, [InfoArray+60*2] |
||
727 | bswap ecx |
||
728 | ror ecx,16 |
||
729 | mcall 47,0x800a0000,,,0x0 |
||
730 | shr ecx,11 ;LBA in MB |
||
731 | add edx,70*65536 |
||
732 | mcall ,,,,0x459a |
||
733 | pop ebx |
||
734 | |||
735 | sb ;CHS |
||
736 | mcall 4,,0x80444444,t.chs |
||
737 | ab |
||
738 | mov edx,ebx |
||
739 | push ebx |
||
740 | movzx ecx, word [InfoArray+2] |
||
741 | xchg ch,cl |
||
742 | mcall 47,0x80050000,,,0x0 |
||
743 | add edx,35*65536 |
||
744 | movzx ecx, word [InfoArray+6] |
||
745 | xchg ch,cl |
||
746 | mcall 47,0x80040000,,,0x0 |
||
747 | add edx,15*65536 |
||
748 | movzx ecx, word [InfoArray+12] |
||
749 | xchg ch,cl |
||
750 | mcall ;47,0x80040000,,,0x0 |
||
751 | add edx,20*65536 |
||
752 | push ebx edx |
||
753 | xor edx,edx |
||
754 | movzx eax,word[InfoArray+2] |
||
755 | xchg ah,al |
||
756 | movzx ebx, word [InfoArray+6] |
||
757 | xchg bh,bl |
||
758 | mul ebx |
||
759 | mul ecx |
||
760 | xchg eax,ecx |
||
761 | pop edx ebx |
||
762 | shr ecx,11 |
||
763 | mcall 47,0x800a0000,,,0x0 |
||
764 | pop ebx |
||
765 | |||
766 | mov ax,[InfoArray+48*2] |
||
767 | bt ax,8 |
||
768 | jnc @f |
||
769 | sb |
||
770 | mcall 4,,0x80444444,t.48.0 |
||
771 | ab |
||
772 | mcall ,,0x80000000,t.sup |
||
773 | @@: |
||
774 | mov ax,[InfoArray+49*2] |
||
775 | xchg al,ah |
||
776 | mov di,ax |
||
777 | bt di,13 |
||
778 | jnc @f |
||
779 | sb |
||
780 | mcall 4,,0x80444444,t.49.13.1 |
||
781 | ab |
||
782 | mcall ,,0x80000000,t.sup |
||
783 | @@: |
||
784 | bt di,13 |
||
785 | jc @f |
||
786 | sb |
||
787 | mcall 4,,0x80444444,t.49.13.0 |
||
788 | ab |
||
789 | @@: |
||
790 | bt di,11 |
||
791 | jnc @f |
||
792 | sb |
||
793 | mcall 4,,0x80444444,t.49.11.1 |
||
794 | ab |
||
795 | mcall ,,0x80000000,t.sup |
||
796 | @@: |
||
797 | bt di,11 |
||
798 | jc @f |
||
799 | sb |
||
800 | mcall 4,,0x80444444,t.49.11.0 |
||
801 | ab |
||
802 | mcall ,,0x80000000,t.sup |
||
803 | @@: |
||
804 | bt di,10 |
||
805 | jnc @f |
||
806 | sb |
||
807 | mcall 4,,0x80444444,t.49.10.1 |
||
808 | ab |
||
809 | @@: |
||
810 | bt di,9 |
||
811 | jnc @f |
||
812 | sb |
||
813 | mcall 4,,0x80444444,t.49.9 |
||
814 | ab |
||
815 | mcall ,,0x80000000,t.sup |
||
816 | @@: |
||
817 | bt di,8 |
||
818 | jnc @f |
||
819 | sb |
||
820 | mcall 4,,0x80444444,t.49.8 |
||
821 | ab |
||
822 | mcall ,,0x80000000,t.sup |
||
823 | @@: |
||
824 | sb |
||
825 | mcall 4,,0x80444444,t.47 |
||
826 | ; add ebx,10 |
||
827 | ; mcall 4,,0x80444444,t.47_ |
||
828 | ab |
||
829 | mov edx,ebx |
||
830 | movzx ecx, word [InfoArray+47*2] |
||
831 | xchg ch,cl |
||
832 | mcall 47,0x80050000,,,0x80000000 |
||
833 | mov ebx,edx |
||
834 | |||
835 | |||
836 | ;PART 2 of 11 |
||
837 | sb |
||
838 | mcall 4,,0x80444444,t.59 |
||
839 | ; add ebx,10 |
||
840 | ; mcall 4,,0x80444444,t.59_ |
||
841 | ab |
||
842 | mov edx,ebx |
||
843 | movzx ecx, word [InfoArray+59*2] |
||
844 | xchg ch,cl |
||
845 | mcall 47,0x80050000,,,0x0 |
||
846 | mov ebx,edx |
||
847 | |||
848 | mov ax,[InfoArray+63*2] |
||
849 | xchg al,ah |
||
850 | mov di,ax |
||
851 | bt di,10 |
||
852 | jnc @f |
||
853 | mov edx,ebx |
||
854 | ; push ebx |
||
855 | sb |
||
856 | mcall 4,,0x80444444,t.63.10 |
||
857 | ab |
||
858 | mcall ,,0x80000000,t.sel |
||
859 | @@: |
||
860 | bt di,9 |
||
861 | jnc @f |
||
862 | sb |
||
863 | mcall 4,,0x80444444,t.63.9 |
||
864 | ab |
||
865 | mcall ,,0x80000000,t.sel |
||
866 | @@: |
||
867 | bt di,8 |
||
868 | jnc @f |
||
869 | sb |
||
870 | mcall 4,,0x80444444,t.63.8 |
||
871 | ab |
||
872 | mcall ,,0x80000000,t.sel |
||
873 | @@: |
||
874 | bt di,2 |
||
875 | jnc @f |
||
876 | sb |
||
877 | mcall 4,,0x80444444,t.63.2 |
||
878 | ab |
||
879 | mcall ,,0x80000000,t.sup |
||
880 | @@: |
||
881 | bt di,1 |
||
882 | jnc @f |
||
883 | sb |
||
884 | mcall 4,,0x80444444,t.63.1 |
||
885 | ab |
||
886 | mcall ,,0x80000000,t.sup |
||
887 | @@: |
||
888 | bt di,0 |
||
889 | jnc @f |
||
890 | sb |
||
891 | mcall 4,,0x80444444,t.63.0 |
||
892 | ab |
||
893 | mcall ,,0x80000000,t.sup |
||
894 | @@: |
||
895 | |||
896 | ;PART 3 of 11 |
||
897 | sb |
||
898 | mcall 4,,0x80444444,t.75.0_4 |
||
899 | ab |
||
900 | mov edx,ebx |
||
901 | push ebx |
||
902 | movzx ecx, byte [InfoArray+75*2+1] |
||
903 | mcall 47,0x800a0000,,,0x0 |
||
904 | pop ebx |
||
905 | |||
906 | ;words 76-79 - SATA |
||
907 | ;.word80: |
||
908 | ; sb |
||
909 | ; mcall 4,,0x80444444,t.80 |
||
910 | ; ab |
||
911 | ; mov cx,[InfoArray+80*2] |
||
912 | ; test cx,cx |
||
913 | ; jnz @f |
||
914 | ; mcall 4,,0x80444444,t.unk |
||
915 | ; ret |
||
916 | ;@@: cmp cx,-1 |
||
917 | ; jne @f |
||
918 | ; mcall 4,,0x80444444,t.unk |
||
919 | ; ret |
||
920 | ;@@: xchg ch,cl |
||
921 | ; mov edx,ebx |
||
922 | ; mcall 47,0x800a0000,,,0x0 |
||
923 | ; mov ebx,edx |
||
924 | sb |
||
925 | mcall 4,,0x80444444,t.80__ |
||
926 | mov ax,[InfoArray+80*2] |
||
927 | ab |
||
928 | xchg al,ah |
||
929 | mov di,ax |
||
930 | bt di,8 |
||
931 | jnc @f |
||
932 | mcall 4,,0x80000000,t.80.8 |
||
933 | jmp .end |
||
934 | ;--------------------------------------------------------------------- |
||
935 | @@: |
||
936 | bt di,7 |
||
937 | jnc @f |
||
938 | mcall 4,,0x80000000,t.80.7 |
||
939 | jmp .end |
||
940 | ;--------------------------------------------------------------------- |
||
941 | @@: |
||
942 | bt di,6 |
||
943 | jnc @f |
||
944 | mcall 4,,0x80000000,t.80.6 |
||
945 | jmp .end |
||
946 | ;--------------------------------------------------------------------- |
||
947 | @@: |
||
948 | bt di,5 |
||
949 | jnc @f |
||
950 | mcall 4,,0x80000000,t.80.5 |
||
951 | jmp .end |
||
952 | ;--------------------------------------------------------------------- |
||
953 | @@: |
||
954 | bt di,4 |
||
955 | jnc @f |
||
956 | mcall 4,,0x80000000,t.80.4 |
||
957 | jmp .end |
||
958 | @@: |
||
959 | ret |
||
960 | ;--------------------------------------------------------------------- |
||
961 | .page2: |
||
962 | ;PART 4 of 11 |
||
963 | mcall 4,5*65536+25,0x80444444,t.82 |
||
964 | add ebx,10*65536 |
||
965 | mov ax,[InfoArray+82*2] |
||
966 | xchg al,ah |
||
967 | mov di,ax |
||
968 | bt di,14 |
||
969 | jnc @f |
||
970 | ad |
||
971 | mcall 4,,0x80000000,t.82.14 |
||
972 | wba 13,t.82.13 |
||
973 | wba 12,t.82.12 |
||
974 | wba 10,t.82.10 |
||
975 | wba 9,t.82.9 |
||
976 | wba 8,t.82.8 |
||
977 | wba 7,t.82.7 |
||
978 | wba 6,t.82.6 |
||
979 | wba 5,t.82.5 |
||
980 | wba 4,t.82.4 |
||
981 | wba 3,t.82.3 |
||
982 | wba 1,t.82.1 |
||
983 | wba 0,t.82.0 |
||
984 | @@: |
||
985 | mov ax,[InfoArray+83*2] |
||
986 | xchg al,ah |
||
987 | mov di,ax |
||
988 | |||
989 | wba 13,t.83.13 |
||
990 | wba 12,t.83.12 |
||
991 | wba 11,t.83.11 |
||
992 | wba 10,t.83.10 |
||
993 | wba 9,t.83.9 |
||
994 | wba 8,t.83.8 |
||
995 | wba 6,t.83.6 |
||
996 | wba 5,t.83.5 |
||
997 | wba 3,t.83.3 |
||
998 | wba 2,t.83.2 |
||
999 | wba 1,t.83.1 |
||
1000 | wba 0,t.83.0 |
||
1001 | @@: |
||
1002 | |||
1003 | ;PART 5 of 11 |
||
1004 | mov ebx,290*65536+25 |
||
1005 | mov ax,[InfoArray+84*2] |
||
1006 | xchg al,ah |
||
1007 | mov di,ax |
||
1008 | wba 13,t.84.13 |
||
1009 | wba 8,t.84.8 |
||
1010 | wba 7,t.84.7 |
||
1011 | wba 6,t.84.6 |
||
1012 | wba 5,t.84.5 |
||
1013 | wba 4,t.84.4 |
||
1014 | wba 3,t.84.3 |
||
1015 | wba 2,t.84.2 |
||
1016 | wba 1,t.84.1 |
||
1017 | wba 0,t.84.0 |
||
1018 | @@: |
||
1019 | ret |
||
1020 | ;--------------------------------------------------------------------- |
||
1021 | .page3: |
||
1022 | mcall 4,5*65536+25,0x80444444,t.85 |
||
1023 | add ebx,10*65536 |
||
1024 | mov ax,[InfoArray+85*2] |
||
1025 | xchg al,ah |
||
1026 | mov di,ax |
||
1027 | bt di,14 |
||
1028 | jnc @f |
||
1029 | ad |
||
1030 | mcall 4,,0x80000000,t.85.14 |
||
1031 | wba 13,t.85.13 |
||
1032 | wba 12,t.85.12 |
||
1033 | wba 10,t.85.10 |
||
1034 | ; ad |
||
1035 | ; mcall 4,,0x80000000,t.85.10_ |
||
1036 | wba 9,t.85.9 |
||
1037 | wba 8,t.85.8 |
||
1038 | wba 7,t.85.7 |
||
1039 | wba 6,t.85.6 |
||
1040 | wba 5,t.85.5 |
||
1041 | wba 4,t.85.4 |
||
1042 | wba 3,t.85.3 |
||
1043 | wba 1,t.85.1 |
||
1044 | wba 0,t.85.0 |
||
1045 | @@: |
||
1046 | mov ax,[InfoArray+86*2] |
||
1047 | xchg al,ah |
||
1048 | mov di,ax |
||
1049 | bt di,13 |
||
1050 | jnc @f |
||
1051 | ad |
||
1052 | mcall 4,,0x80000000,t.86.13 |
||
1053 | wba 12,t.86.12 |
||
1054 | wba 11,t.86.11 |
||
1055 | wba 10,t.86.10 |
||
1056 | wba 9,t.86.9 |
||
1057 | wba 8,t.86.8 |
||
1058 | wba 6,t.86.6 |
||
1059 | wba 5,t.86.5 |
||
1060 | wba 3,t.86.3 |
||
1061 | wba 2,t.86.2 |
||
1062 | wba 1,t.86.1 |
||
1063 | wba 0,t.86.0 |
||
1064 | @@: |
||
1065 | ret |
||
1066 | ;--------------------------------------------------------------------- |
||
1067 | .page4: |
||
1068 | mov ebx,5*65536+25 |
||
1069 | mov ax,[InfoArray+88*2] |
||
1070 | xchg al,ah |
||
1071 | xor di,di |
||
1072 | bt ax,8 |
||
1073 | jnc @f |
||
1074 | mov di,1 |
||
1075 | @@: |
||
1076 | bt ax,9 |
||
1077 | jnc @f |
||
1078 | mov di,2 |
||
1079 | @@: |
||
1080 | bt ax,10 |
||
1081 | jnc @f |
||
1082 | mov di,3 |
||
1083 | @@: |
||
1084 | bt ax,11 |
||
1085 | jnc @f |
||
1086 | mov di,4 |
||
1087 | @@: |
||
1088 | bt ax,12 |
||
1089 | jnc @f |
||
1090 | mov di,5 |
||
1091 | @@: |
||
1092 | bt ax,13 |
||
1093 | jnc @f |
||
1094 | mov di,6 |
||
1095 | @@: |
||
1096 | test di,di |
||
1097 | jz @f |
||
1098 | mcall 4,,0x80444444,t.88 |
||
1099 | mov edx,ebx |
||
1100 | push ebx |
||
1101 | add edx,90*65536 |
||
1102 | movzx ecx, word di |
||
1103 | dec cl |
||
1104 | mcall 47,0x800a0000,,,0x0 |
||
1105 | pop ebx |
||
1106 | ad |
||
1107 | @@: |
||
1108 | xor di,di |
||
1109 | mov ax,[InfoArray+88*2] |
||
1110 | xchg al,ah |
||
1111 | bt ax,0 |
||
1112 | jnc @f |
||
1113 | mov di,1 |
||
1114 | @@: |
||
1115 | bt ax,1 |
||
1116 | jnc @f |
||
1117 | mov di,2 |
||
1118 | @@: |
||
1119 | bt ax,2 |
||
1120 | jnc @f |
||
1121 | mov di,3 |
||
1122 | @@: |
||
1123 | bt ax,3 |
||
1124 | jnc @f |
||
1125 | mov di,4 |
||
1126 | @@: |
||
1127 | bt ax,4 |
||
1128 | jnc @f |
||
1129 | mov di,5 |
||
1130 | @@: |
||
1131 | bt ax,5 |
||
1132 | jnc @f |
||
1133 | mov di,6 |
||
1134 | @@: |
||
1135 | bt ax,6 |
||
1136 | jnc @f |
||
1137 | mov di,7 |
||
1138 | @@: |
||
1139 | test di,di |
||
1140 | jz @f |
||
1141 | mcall 4,,0x80444444,t.88.1_6 |
||
1142 | mov edx,ebx |
||
1143 | push ebx |
||
1144 | add edx,90*65536 |
||
1145 | movzx ecx, word di |
||
1146 | dec cl |
||
1147 | mcall 47,0x800a0000,,,0x0 |
||
1148 | pop ebx |
||
1149 | ad |
||
1150 | @@: |
||
1151 | mz t.89, |
||
1152 | mz t.90, |
||
1153 | mz t.91, |
||
1154 | mz t.92, |
||
1155 | ;WORD 94 |
||
1156 | mz t.94.8_15, |
||
1157 | mz t.94.0_7, |
||
1158 | mz t.95, |
||
1159 | mz t.96, |
||
1160 | mz t.97, |
||
1161 | mz t.98_99, |
||
1162 | mz t.100_103, |
||
1163 | mz t.104, |
||
1164 | |||
1165 | ;PART 6 of 11 ? |
||
1166 | mcall 4,,0x80444444,t.106 |
||
1167 | add ebx,12 |
||
1168 | mov ax,[InfoArray+106*2] |
||
1169 | xchg ah,al |
||
1170 | mov di,ax |
||
1171 | bt di,13 |
||
1172 | jnc @f |
||
1173 | mcall 4,,0x80444444,t.106.13 |
||
1174 | add ebx,15 |
||
1175 | @@: |
||
1176 | bt di,12 |
||
1177 | jnc @f |
||
1178 | mcall 4,,0x80444444,t.106.12 |
||
1179 | add ebx,15 |
||
1180 | @@: |
||
1181 | mcall 4,,0x80444444,t.106.0_3 |
||
1182 | ab |
||
1183 | shl di,12 |
||
1184 | shr di,12 |
||
1185 | movzx ecx,di |
||
1186 | mov edx,ebx |
||
1187 | mcall 47,0x800a0000,,,0x0 |
||
1188 | mov ebx,edx |
||
1189 | sb |
||
1190 | |||
1191 | mz t.107, |
||
1192 | ;108 - 111 добавить |
||
1193 | mz t.117_118, |
||
1194 | ret |
||
1195 | ;--------------------------------------------------------------------- |
||
1196 | .page5: |
||
1197 | ; mcall 4,5*65536+25,0x80444444,t.85 |
||
1198 | ret |
||
1199 | ;--------------------------------------------------------------------- |
||
1200 | show_SmartBlock: |
||
1201 | bt [flags],1 |
||
1202 | jnc .end |
||
1203 | bt [flags],3 |
||
1204 | jc .end |
||
1205 | |||
1206 | cmp byte [SmartArray+2],0 |
||
1207 | je .end |
||
1208 | mcall 4,5*65536+25,0x80444444,s.title |
||
1209 | ad |
||
1210 | movzx ax, byte [SmartArray+2] |
||
1211 | cmp ax,30 ;максимум 30 атрибутов |
||
1212 | jg .end |
||
1213 | push ax |
||
1214 | push dword (3+SmartArray) |
||
1215 | @@: |
||
1216 | xor edx,edx |
||
1217 | call .find |
||
1218 | push edx |
||
1219 | |||
1220 | mov edx,ebx |
||
1221 | movzx ecx,al |
||
1222 | mcall 47,0x80030000,,,0x0 |
||
1223 | mov ebx,edx |
||
1224 | add ebx,30*65536 |
||
1225 | pop edx |
||
1226 | test edx,edx |
||
1227 | jnz .0 |
||
1228 | mov edx,s.0 |
||
1229 | .0: mov eax,[esp] |
||
1230 | mov al,[eax+2] |
||
1231 | mov ecx,0x80000000 |
||
1232 | and al,1 |
||
1233 | jz .1 |
||
1234 | ; mov ecx,0x80ff0000 |
||
1235 | .1: mcall 4,,, |
||
1236 | sub ebx,30*65536 |
||
1237 | |||
1238 | mov ecx,[esp] |
||
1239 | inc ecx |
||
1240 | movzx ecx, byte [ecx] |
||
1241 | add ebx,400*65536 |
||
1242 | mov edx,ebx |
||
1243 | mcall 47,0x800a0000,,,0x0 |
||
1244 | mov ecx,[esp] |
||
1245 | add ecx,4 |
||
1246 | movzx ecx, byte [ecx] |
||
1247 | add edx,30*65536 |
||
1248 | mcall 47,0x800a0000,,,0x0 |
||
1249 | mov ebx,edx |
||
1250 | sub ebx,(30+400)*65536 |
||
1251 | |||
1252 | ad |
||
1253 | add dword [esp],12 |
||
1254 | dec word [esp+4] |
||
1255 | jnz @b |
||
1256 | add esp,6 |
||
1257 | .end: |
||
1258 | ret |
||
1259 | ;--------------------------------------------------------------------- |
||
1260 | .find: |
||
1261 | mov eax, dword [esp+4] |
||
1262 | mov al,[eax] |
||
1263 | sc 1,s.1 |
||
1264 | sc 2,s.2 |
||
1265 | sc 3,s.3 |
||
1266 | sc 4,s.4 |
||
1267 | sc 5,s.5 |
||
1268 | sc 6,s.6 |
||
1269 | sc 7,s.7 |
||
1270 | sc 8,s.8 |
||
1271 | sc 9,s.9 |
||
1272 | sc 10,s.10 |
||
1273 | sc 11,s.11 |
||
1274 | sc 12,s.12 |
||
1275 | sc 13,s.13 |
||
1276 | sc 190,s.190 |
||
1277 | sc 191,s.191 |
||
1278 | sc 192,s.192 |
||
1279 | sc 193,s.193 |
||
1280 | sc 194,s.194 |
||
1281 | sc 195,s.195 |
||
1282 | sc 196,s.196 |
||
1283 | sc 197,s.197 |
||
1284 | sc 198,s.198 |
||
1285 | sc 199,s.199 |
||
1286 | sc 200,s.200 |
||
1287 | sc 201,s.201 |
||
1288 | sc 202,s.202 |
||
1289 | sc 203,s.203 |
||
1290 | sc 204,s.204 |
||
1291 | sc 205,s.205 |
||
1292 | sc 206,s.206 |
||
1293 | sc 207,s.207 |
||
1294 | sc 208,s.208 |
||
1295 | sc 209,s.209 |
||
1296 | sc 220,s.220 |
||
1297 | sc 221,s.221 |
||
1298 | sc 222,s.222 |
||
1299 | sc 223,s.223 |
||
1300 | sc 224,s.224 |
||
1301 | sc 225,s.225 |
||
1302 | sc 226,s.226 |
||
1303 | sc 227,s.227 |
||
1304 | sc 228,s.228 |
||
1305 | sc 230,s.230 |
||
1306 | sc 231,s.231 |
||
1307 | sc 240,s.240 |
||
1308 | sc 250,s.250 |
||
1309 | ret |
||
1310 | ;--------------------------------------------------------------------- |
||
1311 | ;DATA AREA |
||
3604 | fedesco | 1312 | if lang eq it |
1313 | t: |
||
1314 | .sup db 'supportato',0 |
||
1315 | .sel db 'selzionato',0 |
||
1316 | .enb db 'abilitato',0 |
||
1317 | .unk db 'sconosciuto',0 |
||
1318 | .type db 'Tipo',0 |
||
1319 | .chs db 'CHS',0 |
||
1320 | else |
||
1321 | t: |
||
1322 | .sup db 'supported',0 |
||
1323 | ;.usp db 'unsupported',0 |
||
1324 | .sel db 'selected',0 |
||
1325 | ;.usl db 'not selected',0 |
||
1326 | .enb db 'enabled',0 |
||
1327 | ;.dis db 'disabled',0 |
||
1328 | .unk db 'unknown',0 |
||
1329 | .type db 'Type',0 |
||
1330 | .chs db 'CHS',0 |
||
1331 | end if |
||
1622 | mario79 | 1332 | |
3604 | fedesco | 1333 | if lang eq it |
1334 | .10_19 db 'Numero seriale',0 |
||
1335 | .23_26 db 'Versione firmware',0 |
||
1336 | .27_46 db 'Numero modello',0 |
||
1337 | .47 db 'Max. number of sectors that shall be transferred per DRQ data block',0 |
||
3605 | fedesco | 1338 | .48.0 db 'Trusted Computing feature set is',0 |
1339 | .49.13.1 db 'Standby timer values are',0 |
||
3604 | fedesco | 1340 | .49.13.0 db 'Standby timer values shall be managed by the device',0 |
3605 | fedesco | 1341 | .49.11.1 db 'IORDY',0 |
1342 | .49.11.0 db 'IORDY may be',0 |
||
3604 | fedesco | 1343 | .49.10.1 db 'IORDY potrebbe essere disabilitato',0 |
3605 | fedesco | 1344 | .49.9 db 'LBA',0 |
1345 | .49.8 db 'DMA',0 |
||
3604 | fedesco | 1346 | else |
1347 | .10_19 db 'Serial number',0 |
||
1348 | .23_26 db 'Firmware revision',0 |
||
1349 | .27_46 db 'Model number',0 |
||
1350 | .47 db 'Max. number of sectors that shall be transferred per DRQ data block',0 |
||
1351 | ;.47 db 'Maximum number of logical sectors that shall be transferred per DRQ',0 |
||
1352 | ;.47_ db 'data block on READ/WRITE MULTIPLE commands',0 |
||
1353 | .48.0 db 'Trusted Computing feature set is',0 ;1 sup |
||
1354 | .49.13.1 db 'Standby timer values are',0 ;sup |
||
1355 | .49.13.0 db 'Standby timer values shall be managed by the device',0 |
||
1356 | .49.11.1 db 'IORDY',0 ;sup |
||
1357 | .49.11.0 db 'IORDY may be',0 ;sup |
||
1358 | .49.10.1 db 'IORDY may be disabled',0 |
||
1359 | .49.9 db 'LBA',0 ;1 sup |
||
1360 | .49.8 db 'DMA',0 ;1 sup |
||
1361 | end if |
||
1622 | mario79 | 1362 | |
1363 | ;.53 db 'Free-fall Control Sensitivity',0 |
||
1364 | ;.53.6_15 db 'Sensitivity level',0 |
||
1365 | .59 db 'Current number of sectors that shall be transferred per DRQ data block',0 |
||
1366 | ;.59 db 'Current setting for number of logical sectors that shall be',0 |
||
1367 | ;.59_ db 'transferred per DRQ data block on READ/WRITE MULTIPLE commands',0 |
||
1368 | .60_61 db 'Total number of user addressable logical sectors',0 |
||
1369 | .63.10 db 'Multiword DMA mode 2 is',0 ;1 sel |
||
1370 | .63.9 db 'Multiword DMA mode 1 is',0 ;1 sel |
||
1371 | .63.8 db 'Multiword DMA mode 0 is',0 ;1 sel |
||
1372 | .63.2 db 'Miltiword DMA mode 2 and below are',0 ;sup |
||
1373 | .63.1 db 'Miltiword DMA mode 1 and below are',0 ;sup |
||
1374 | .63.0 db 'Miltiword DMA mode 0 is',0 ;sup |
||
1375 | .64.0_7 db 'PIO modes',0 ;sup |
||
1376 | |||
1377 | ;.65 - .68 добавить |
||
1378 | |||
1379 | .75.0_4 db 'Maximum queue depth -1 ',0 |
||
1380 | .76 db 'Serial ATA Capabilities:',0 |
||
1381 | .76.10 db 'Supports Phy Event Counters',0 ;1 |
||
1382 | .76.9 db 'Supports receit of host initiated power management request',0 ;1 |
||
1383 | .76.8 db 'Supports native Command Queuing',0 ;1 |
||
1384 | .76.2 db 'Supports SATA Gen2 Signaling Speed (3.0Gb/s)',0 |
||
1385 | .76.1 db 'Supports SATA Gen1 Signaling Speed (1.5Gb/s)',0 |
||
1386 | .78 db 'SATA Features Supported',0 |
||
1387 | .78_ db 'Device supports:',0 |
||
1388 | .78.6 db 'Software Setting Preservation',0 ;1 |
||
1389 | .78.4 db 'in-order data delivery',0 ;1 |
||
1390 | .78.3 db 'initiating power management',0 ;1 |
||
1391 | .78.2 db 'DMA Setup auto-activation',0 ;1 |
||
1392 | .78.1 db 'non-zero buffer offsets',0 ;1 |
||
1393 | .79 db 'SATA Features Enabled:',0 |
||
1394 | .79.6 = .78.6;1 enb |
||
1395 | .79.4 = .78.4;1 enb |
||
1396 | .79.3 = .78.3;1 enb |
||
1397 | .79.2 = .78.2;1 enb |
||
1398 | .79.1 = .78.1;1 enb |
||
1399 | .80 db 'Major revision number',0 |
||
1400 | .80__ db 'supports:',0 |
||
1401 | .80.8 db 'ATA8-ACS',0 ;1 |
||
1402 | .80.7 db 'ATA/ATAPI-7',0 ;1 |
||
1403 | .80.6 db 'ATA/ATAPI-6',0 ;1 |
||
1404 | .80.5 db 'ATA/ATAPI-5',0 ;1 |
||
1405 | .80.4 db 'ATA/ATAPI-4',0 ;1 |
||
1406 | .81 db 'Minor revision number',0 |
||
1407 | |||
1408 | .82 db 'Command set/feature supported:',0 |
||
1409 | .82.14 db 'NOP command',0 ;1 sup |
||
1410 | .82.13 db 'READ BUFFER command',0 ;1 sup |
||
1411 | .82.12 db 'WRITE BUFFER command',0 ;1 sup |
||
1412 | .82.10 db 'Host Protected Area feature set',0 ;1 sup |
||
1413 | .82.9 db 'DEVICE RESET command',0 ;1 sup |
||
1414 | .82.8 db 'SERVICE interrupt',0 ;1 sup |
||
1415 | .82.7 db 'release interrupt',0 ;1 sup |
||
1416 | .82.6 db 'read look-ahead',0 ;1 sup |
||
1417 | .82.5 db 'volatile write cache',0 ;1 sup |
||
1418 | .82.4 db 'PACKET feature set',0 ;1 sup |
||
1419 | .82.3 db 'Mandatory Power Management feature set',0 ;1 sup |
||
1420 | .82.1 db 'Security feature set',0 ;1 sup |
||
1421 | .82.0 db 'SMART feature set',0 ;1 sup |
||
1422 | ;.83 db 'Command sets supported:',0 |
||
1423 | .83.13 db 'FLUSH CACHE EXT command',0 ;1 sup |
||
1424 | .83.12 db 'Mandatory FLUSH CACHE command',0 ;1 sup |
||
1425 | .83.11 db 'Device Configuration Overlay feature set',0 ;1 sup |
||
1426 | .83.10 db '48-bit Address feature set',0 ;1 sup |
||
1427 | .83.9 db 'Automatic Acoustic Management feature set',0 ;1 sup |
||
1428 | .83.8 db 'SET MAX security extension',0 ;1 sup |
||
1429 | .83.6 db 'SET FEATURES subcommand required to spin-up after power-up',0 ;1 |
||
1430 | .83.5 db 'Power-Up In Standby feature set',0 ;1 sup |
||
1431 | .83.3 db 'Advanced Power Management feature set',0 ;1 sup |
||
1432 | .83.2 db 'CFA feature set',0 ;1 sup |
||
1433 | .83.1 db 'READ/WRITE DMA QUEUED',0 ;1 sup |
||
1434 | .83.0 db 'DOWNLOAD MICROCODE command',0 ;1 sup |
||
1435 | |||
1436 | ;.84 db 'Command set/feature supported:',0 |
||
1437 | .84.13 db 'IDLE IMMEDIATE with UNLOAD FEATURE',0 ;1 sup |
||
1438 | .84.8 db '64-bit World wide name supported',0 ;1 sup |
||
1439 | .84.7 db 'WRITE DMA QUEUED FUA EXT command',0 ;1 sup |
||
1440 | .84.6 db 'WRITE DMA FUA EXT and WRITE MULTIPLE FUA EXT commands',0 ;1 sup |
||
1441 | .84.5 db 'General Purpose Logging feature set',0 ;1 sup |
||
1442 | .84.4 db 'Streaming feature set',0 ;1 sup |
||
1443 | .84.3 db 'Media Card Pass Through Command feature set',0 ;1 sup |
||
1444 | .84.2 db 'Media serial number',0 ;1 sup |
||
1445 | .84.1 db 'SMART self-test',0 ;1 sup |
||
1446 | .84.0 db 'SMART error logging',0 ;1 sup |
||
1447 | .85 db 'Command set/feature enabled/supported:',0 |
||
1448 | .85.14 = .82.14 ;1 sup |
||
1449 | .85.13 = .82.13 ;1 sup |
||
1450 | .85.12 = .82.12 ;1 sup |
||
1451 | .85.10 db 'Host Protected Area has been established',0;1 (i.e., the maximum LBA is less than the maximum native LBA) |
||
1452 | .85.9 = .82.9; 1 sup |
||
1453 | .85.8 = .82.8; 1 enb |
||
1454 | .85.7 = .82.7; 1 enb |
||
1455 | .85.6 = .82.6; 1 enb |
||
1456 | .85.5 = .82.5; 1 enb |
||
1457 | .85.4 = .82.4; 1 sup |
||
1458 | .85.3 = .82.3; 1 sup |
||
1459 | .85.1 = .82.1; 1 enb |
||
1460 | .85.0 = .82.0; 1 enb |
||
1461 | |||
1462 | ;.86 db 'Command set/feature enabled/supported:',0 |
||
1463 | .86.13 = .83.13; 1 sup |
||
1464 | .86.12 db 'FLUSH CACHE command',0 ;1 sup |
||
1465 | .86.11 db 'Device Configuration Overlay',0 ;1 sup |
||
1466 | .86.10 = .83.10 ;1 sup |
||
1467 | .86.9 = .83.9 ;1 enb |
||
1468 | .86.8 db 'SET MAX security extension enabled by SET MAX SET PASSWORD',0 ;1 |
||
1469 | .86.6 = .83.6 ;1 |
||
1470 | .86.5 = .83.5 ;1 enb |
||
1471 | .86.3 = .83.3 ;1 enb |
||
1472 | .86.2 = .83.2 ;l sup |
||
1473 | .86.1 = .83.1 ;1 sup |
||
1474 | .86.0 = .83.0 ;1 sup |
||
1475 | ;.87 db 'Command set/feature enabled/supported:',0 |
||
1476 | ;.87.x см..84 |
||
1477 | |||
1478 | .88 db 'Ultra DMA mode selected',0 |
||
1479 | ;бит 14 установлен - mode 6 is selected, 13-5, 12-4, 11-3, 10-2, 9-1, 8-0 |
||
1480 | .88.1_6 db 'Ultra DMA mode and below are supported',0 ;бит 1-1, ..., 6-6 |
||
1481 | ;.88.0: db 'Ultra DMA mode 0 is',0 ;1 sup |
||
1482 | .89 db 'Time required for security erase unit completion',0 |
||
1483 | .90 db 'Time required for Enhanced security erase completion',0 |
||
1484 | .91 db 'Current advanced power management value',0 |
||
1485 | .92 db 'Master Password Identifier',0 |
||
1486 | |||
1487 | ;.93 db 'Hardware reset result',0 ;добавить |
||
1488 | .94.8_15 db 'Vendor"s recommended acoustic management value',0 |
||
1489 | .94.0_7 db 'Current automatic acoustic management value',0 |
||
1490 | .95 db 'Stream Minimum Request Size',0 |
||
1491 | .96 db 'Streaming Transfer Time - DMA',0 |
||
1492 | .97 db 'Streaming Access Latency - DMA and PIO',0 |
||
1493 | .98_99 db 'Streaming Performance Granularity',0 |
||
1494 | .100_103 db 'Total Number of User Addressable Sectors for the 48-bit Address feature set',0 |
||
1495 | .104 db 'Streaming Transfer Time - PIO',0; |
||
1496 | |||
1497 | .106 db 'Physical sector size / Logical Sector Size:',0 |
||
1498 | .106.13 db 'Device has multiple logical sectors per physical sector',0 ;1 |
||
1499 | .106.12 db 'Device Logical Sector Longer than 256 Words',0 ;1 |
||
1500 | .106.0_3 db '2^X logical sectors per physical sector',0 |
||
1501 | .107 db 'Inter-seek delay for ISO-7779 acoustic testing in microseconds',0 |
||
1502 | .108.12_15 db 'NAA (3:0)',0 |
||
1503 | .108.0_11 db 'IEEE OUI (23:12)',0 |
||
1504 | .109.4_15 db 'IEEE OUI (11:0)',0 |
||
1505 | .109.0_3 db 'Unique ID (35:32)',0 |
||
1506 | .110 db 'Unique ID (31:16)',0 |
||
1507 | .111 db 'Unique ID (15:0)',0; |
||
1508 | .117_118 db 'Words per Logical Sector',0 |
||
1509 | .119 db 'Supported Settings:',0 |
||
1510 | .119.5 db 'Free-fall Control feature set is',0 ;1 sup |
||
1511 | .119.4 db 'The Segmented feature for DOWNLOAD MICROCODE is',0 ;1 sup |
||
1512 | .119.3 db 'READ and WRITE DMA EXT GPL optional commands are',0 ;1 sup |
||
1513 | .119.2 db 'WRITE UNCORRECTABLE EXT is',0 ;1 sup |
||
1514 | .119.1 db 'Write-Read-Verify feature set is',0 ;1 sup |
||
1515 | .120 db 'Command set/feature enabled/supported',0 |
||
1516 | .120.5 db 'Free-fall Control feature set is',0 ;1 enb |
||
1517 | .120.4 db 'The Segmented feature for DOWNLOAD MICROCODE is',0 ;1 sup |
||
1518 | .120.3 db 'READ and WRITE DMA EXT GPL optional commands are',0 ;1 sup |
||
1519 | .120.2 db 'WRITE UNCORRECTABLE EXT is',0 ;1 sup |
||
1520 | .120.1 db 'Write-Read-Verify feature set is',0 ;1 enb |
||
1521 | |||
1522 | .128 db 'Security status',0 |
||
1523 | .128.8.0 db 'Security level = High',0 |
||
1524 | .128.8.1 db 'Security level = Maximum',0 |
||
1525 | .128.5 db 'Enhanced security erase',0 ;1 sup |
||
1526 | .128.4 db 'Security count expired',0 ;1 |
||
1527 | .128.3 db 'Security frozen',0 ;1 |
||
1528 | .128.2 db 'Security locked',0 ;1 |
||
1529 | .128.1 db 'Security enabled',0 ;1 |
||
1530 | .128.0 db 'Security supported',0 ;1 |
||
1531 | |||
1532 | ;.160 добавить |
||
1533 | |||
1534 | .176_205 db 'Current media serial number',0 |
||
1535 | .206 db 'SCT Command Transport:',0 |
||
1536 | .206.5 db 'Data Tables',0 ;1 sup |
||
1537 | .206.4 db 'Features Control',0 ;1 sup |
||
1538 | .206.3 db 'Error Recovery Control',0 ;1 sup |
||
1539 | .206.2 db 'Write Same',0 ;1 sup |
||
1540 | .206.1 db 'Long Sector Access',0 ;1 sup |
||
1541 | .206.0 db '',0 ;1 sup |
||
1542 | .209 db 'Alignment of logical blocks within a larger physical block',0 |
||
1543 | .209.0_13 db '"Logical sector" offset within the first physical sector where the first logical sector is placed.',0; |
||
1544 | .210_211 db 'Write-Read-Verify Sector Count Mode 3 Only',0 |
||
1545 | .212_213 db 'Verify Sector Count Mode 2 Only',0 |
||
1546 | .214 db 'NV Cache Capabilities:',0 |
||
1547 | .214.12_15 db 'NV Cache feature set version',0 |
||
1548 | .214.8_11 db 'NV Cache Power Mode feature set version',0 |
||
1549 | .214.4 db 'NV Cache feature set',0 ;1 enb |
||
1550 | .214.1 db 'NV Cache Power Mode feature set',0 ;1 enb |
||
1551 | .214.0 db 'NV Cache Power Mode feature set',0 ;1 sup |
||
1552 | .215 db 'NV Cache Size in Logical Blocks (15:0)',0 |
||
1553 | |||
1554 | .216 db 'NV Cache Size in Logical Blocks (31:16)',0 |
||
1555 | .217 db 'Nominal media rotation rate',0 |
||
1556 | .219 db 'NV Cache Options',0 |
||
1557 | .219.0_7 db 'Device Estimated Time to Spin Up in Seconds',0 |
||
1558 | .220.0_7 db 'Write-Read-Verify feature set current mode',0; |
||
1559 | .222 db 'Transport Major revision number',0 |
||
1560 | .222.12.0 db 'Parallel',0 |
||
1561 | .222.12.1 db 'Serial',0 |
||
1562 | ;.222.0_11 добавить |
||
1563 | .223 db 'Transport Major revision number',0 |
||
1564 | .234 db 'Minimum number of 512 byte units per DOWNLOAD MICROCODE command for mode 03h',0 |
||
1565 | .235 db 'Maximum number of 512 byte units per DOWNLOAD MICROCODE command for mode 03h',0 |
||
1566 | .255 db 'Integrity word',0 |
||
1567 | .255.8_15 db 'Checksum',0 |
||
1568 | .255.0_7 db 'Signature',0 |
||
1569 | ;--------------------------------------------------------------------- |
||
1570 | s: |
||
1571 | .title db 'ID/Name/Value/Wrst',0 |
||
1572 | .0 db '?',0 |
||
1573 | .1 db 'Raw Read Error Rate',0 |
||
1574 | .2 db 'Throughput Performance',0 |
||
1575 | .3 db 'Spin Up Time',0 |
||
1576 | .4 db 'Start/Stop Count',0 |
||
1577 | .5 db 'Reallocated Sector Count',0 |
||
1578 | .6 db 'Read Channel Margin',0 |
||
1579 | .7 db 'Seek Error Rate',0 |
||
1580 | .8 db 'Seek Time Performance',0 |
||
1581 | .9 db 'Power-On Hours Count',0 |
||
1582 | .10 db 'Spin Retry Count',0 |
||
1583 | .11 db 'Recalibration Retries',0 |
||
1584 | .12 db 'Device Power Cycle Count',0 |
||
1585 | .13 db 'Soft Read Error Rate',0 |
||
1586 | ;?? db 'Emergency Re-track (Hitachi)',0 |
||
1587 | ;?? db 'ECC On-The-Fly Count (Hitachi)',0 |
||
1588 | ;96 db '? (Maxtor) |
||
1589 | ;97 db '? (Maxtor) |
||
1590 | ;98 db '? (Maxtor) |
||
1591 | ;99 db '? (Maxtor) |
||
1592 | ;100 db '? (Maxtor) |
||
1593 | ;101 db '? (Maxtor) |
||
1594 | .190 db 'Airflow Temperature (WDC)',0 |
||
1595 | .191 db 'G-Sense Error Rate',0 |
||
1596 | .192 db 'Power-Off Retract Cycle',0 |
||
1597 | .193 db 'Load/Unload Cycle Count',0 |
||
1598 | .194 db 'Temperature',0 |
||
1599 | .195 db 'Hardware ECC Recovered',0 |
||
1600 | .196 db 'Reallocation Events Count',0 |
||
1601 | .197 db 'Current Pending Sector Count',0 |
||
1602 | .198 db 'Uncorrectable Sector Count',0 |
||
1603 | .199 db 'UltraDMA CRC Error Rate',0 |
||
1604 | .200 db 'Write Error Rate (WD - MultiZone Error Rate)',0 |
||
1605 | .201 db 'TA Counter Detected (or Soft read error rate ?)',0 |
||
1606 | .202 db 'TA Counter Increased (or Data Address Mark errors ?)',0 |
||
1607 | .203 db 'Run out cancel',0 |
||
1608 | .204 db 'Soft ECC correction',0 |
||
1609 | .205 db 'Thermal asperity rate (TAR)',0 |
||
1610 | .206 db 'Flying height',0 |
||
1611 | .207 db 'Spin high',0 |
||
1612 | .208 db 'Spin buzz',0 |
||
1613 | .209 db 'Offline seek performance',0 |
||
1614 | .220 db 'Disk Shift',0 |
||
1615 | .221 db 'G-Sense Error Rate (Hitachi - Shock Sense Error Rate)',0 |
||
1616 | .222 db 'Loaded Hours',0 |
||
1617 | .223 db 'Load/Unload Retry Count',0 |
||
1618 | .224 db 'Load Friction',0 |
||
1619 | .225 db 'Load/Unload Cycle Count',0 |
||
1620 | .226 db 'Load-in Time',0 |
||
1621 | .227 db 'Torque Amplification Count',0 |
||
1622 | .228 db 'Power-Off Retract Count',0 |
||
1623 | ;229 db '? (IBM DTTA)',0 |
||
1624 | .230 db 'GMR Head Amplitude',0 |
||
1625 | .231 db 'Temperature',0 |
||
1626 | .240 db 'Head Flying Hours (Hitachi)',0 |
||
1627 | .250 db 'Read Error Retry Rate',0 |
||
1628 | ;--------------------------------------------------------------------- |
||
1629 | title db 'Hard Disk Drive INFOrmer v0.2',0 |
||
1630 | menu_text db 'Info SMART Tests Control < >',0 |
||
1631 | ctrl_text1 db 'Ports: 1f0-1f7 170-177',0 |
||
1632 | ctrl_text2 db 'Device: 0 1 0 1',0 |
||
1633 | edbx_text1 db 'Info: Save Load',0 |
||
1634 | edbx_text2 db 'SMART: Save Load',0 |
||
1635 | smrt_text1 db 'SMART on/off',0 |
||
1636 | page_text db 'Page:',0 |
||
1637 | ;system_path db '/sys/lib/' |
||
1638 | ;boxlib_name db 'box_lib.obj',0 |
||
1639 | ;head_f_i: |
||
1640 | ;head_f_l db 'error',0 |
||
1641 | ;err_message_found_lib db 'box_lib.obj was not found',0 |
||
1642 | ;err_message_import db 'box_lib.obj was not imported ',0 |
||
3604 | fedesco | 1643 | if lang eq it |
1644 | error_open_file_string_Info db 'Non riesco ad aprire Info file!',0 |
||
1645 | error_save_file_string_Info db 'Non riesco a salvare Info file!',0 |
||
1622 | mario79 | 1646 | |
3604 | fedesco | 1647 | error_open_file_string_SMART db 'Non riesco ad aprire SMART file!',0 |
1648 | error_save_file_string_SMART db 'Non riesco a salvare SMART file!',0 |
||
1649 | else |
||
1650 | error_open_file_string_Info db 'Can not open Info file!',0 |
||
1651 | error_save_file_string_Info db 'Can not save Info file!',0 |
||
1652 | |||
1653 | error_open_file_string_SMART db 'Can not open SMART file!',0 |
||
1654 | error_save_file_string_SMART db 'Can not save SMART file!',0 |
||
1655 | end if |
||
1622 | mario79 | 1656 | no_error_text db 0 |
1657 | align 4 |
||
1658 | error_text dd no_error_text |
||
1659 | ;--------------------------------------------------------------------- |
||
1660 | system_dir_Boxlib db '/sys/lib/box_lib.obj',0 |
||
1661 | system_dir_ProcLib db '/sys/lib/proc_lib.obj',0 |
||
1662 | ;--------------------------------------------------------------------- |
||
1663 | head_f_i: |
||
1664 | head_f_l db 'System error',0 |
||
1665 | |||
3604 | fedesco | 1666 | if lang eq it |
1667 | err_message_found_lib1 db 'box_lib.obj - Non trovato!',0 |
||
1668 | err_message_found_lib2 db 'proc_lib.obj - Non trovato!',0 |
||
1622 | mario79 | 1669 | |
3604 | fedesco | 1670 | err_message_import1 db 'box_lib.obj - Import errato!',0 |
1671 | err_message_import2 db 'proc_lib.obj - Import errato!',0 |
||
1672 | |||
1673 | else |
||
1674 | err_message_found_lib1 db 'box_lib.obj - Not found!',0 |
||
1675 | err_message_found_lib2 db 'proc_lib.obj - Not found!',0 |
||
1676 | |||
1677 | err_message_import1 db 'box_lib.obj - Wrong import!',0 |
||
1678 | err_message_import2 db 'proc_lib.obj - Wrong import!',0 |
||
1679 | end if |
||
1622 | mario79 | 1680 | ;--------------------------------------------------------------------- |
1681 | align 4 |
||
1682 | l_libs_start: |
||
1683 | |||
1684 | library01 l_libs system_dir_Boxlib+9, cur_dir_path, library_path, system_dir_Boxlib, \ |
||
1685 | err_message_found_lib1, head_f_l, Box_lib_import, err_message_import1, head_f_i |
||
1686 | |||
1687 | library02 l_libs system_dir_ProcLib+9, cur_dir_path, library_path, system_dir_ProcLib, \ |
||
1688 | err_message_found_lib2, head_f_l, ProcLib_import, err_message_import2, head_f_i |
||
1689 | |||
1690 | end_l_libs: |
||
1691 | ;--------------------------------------------------------------------- |
||
1692 | |||
1693 | |||
1694 | ;edit1 edit_box 200,2,85,0xaaaaaa,0x6a9480,0,0xAABBCC,0,128,file_name,ed_focus,10,10 |
||
1695 | op1 option_box option_group1,72,44,6,9,0xffffff,0x0,0,0,0 |
||
1696 | op2 option_box option_group1,94,44,6,9,0xffffff,0x0,0,0,0 |
||
1697 | op3 option_box option_group1,132,44,6,9,0xffffff,0x0,0,0,0 |
||
1698 | op4 option_box option_group1,154,44,6,9,0xffffff,0x0,0,0,0 |
||
1699 | option_group1 dd op1 |
||
1700 | Option_boxs dd op1,op2,op3,op4,0 |
||
1701 | ;--------------------------------------------------------------------- |
||
1702 | ;file_name db '/rd/1/hdd_',0 |
||
1703 | ;times 128 db (0) |
||
1704 | ;--------------------------------------------------------------------- |
||
1705 | struct f70 |
||
1706 | func_n dd ? |
||
1707 | param1 dd 0 |
||
1708 | param2 dd 0 |
||
1709 | param3 dd ? |
||
1710 | param4 dd ? |
||
1711 | rezerv db 0 |
||
1712 | name dd filename_area |
||
1713 | ends |
||
1714 | ;--------------------------------------------------------------------- |
||
1715 | func_70 f70 |
||
1716 | ; Info_name dd filename_area ;file_name |
||
1717 | ;--------------------------------------------------------------------- |
||
1718 | ; SMART_name dd filename_area2 ;file_name |
||
1719 | ;--------------------------------------------------------------------- |
||
1720 | align 4 |
||
1721 | ProcLib_import: |
||
1722 | OpenDialog_Init dd aOpenDialog_Init |
||
1723 | OpenDialog_Start dd aOpenDialog_Start |
||
1724 | ;OpenDialog__Version dd aOpenDialog_Version |
||
1725 | dd 0 |
||
1726 | dd 0 |
||
1727 | aOpenDialog_Init db 'OpenDialog_init',0 |
||
1728 | aOpenDialog_Start db 'OpenDialog_start',0 |
||
1729 | ;aOpenDialog_Version db 'Version_OpenDialog',0 |
||
1730 | ;--------------------------------------------------------------------- |
||
1731 | align 4 |
||
3604 | fedesco | 1732 | Box_lib_import: |
1622 | mario79 | 1733 | ;init_lib dd a_init |
1734 | ;version_lib dd a_version |
||
1735 | |||
1736 | |||
1737 | edit_box_draw dd aEdit_box_draw |
||
1738 | edit_box_key dd aEdit_box_key |
||
1739 | edit_box_mouse dd aEdit_box_mouse |
||
1740 | ;version_ed dd aVersion_ed |
||
1741 | |||
1742 | ;check_box_draw dd aCheck_box_draw |
||
1743 | ;check_box_mouse dd aCheck_box_mouse |
||
1744 | ;version_ch dd aVersion_ch |
||
1745 | |||
1746 | option_box_draw dd aOption_box_draw |
||
1747 | option_box_mouse dd aOption_box_mouse |
||
1748 | ;version_op dd aVersion_op |
||
1749 | |||
1750 | ;scrollbar_ver_draw dd aScrollbar_ver_draw |
||
1751 | ;scrollbar_ver_mouse dd aScrollbar_ver_mouse |
||
1752 | ;scrollbar_hor_draw dd aScrollbar_hor_draw |
||
1753 | ;scrollbar_hor_mouse dd aScrollbar_hor_mouse |
||
1754 | ;version_scrollbar dd aVersion_scrollbar |
||
1755 | |||
1756 | ;dinamic_button_draw dd aDbutton_draw |
||
1757 | ;dinamic_button_mouse dd aDbutton_mouse |
||
1758 | ;version_dbutton dd aVersion_dbutton |
||
1759 | |||
1760 | ;menu_bar_draw dd aMenu_bar_draw |
||
1761 | ;menu_bar_mouse dd aMenu_bar_mouse |
||
1762 | ;menu_bar_activate dd aMenu_bar_activate |
||
1763 | ;version_menu_bar dd aVersion_menu_bar |
||
1764 | |||
1765 | ;FileBrowser_draw dd aFileBrowser_draw |
||
1766 | ;FileBrowser_mouse dd aFileBrowser_mouse |
||
1767 | ;FileBrowser_key dd aFileBrowser_key |
||
1768 | ;Version_FileBrowser dd aVersion_FileBrowser |
||
1769 | |||
1770 | PathShow_prepare dd sz_PathShow_prepare |
||
1771 | PathShow_draw dd sz_PathShow_draw |
||
1772 | ;Version_path_show dd szVersion_path_show |
||
1773 | dd 0 |
||
1774 | dd 0 |
||
1775 | |||
1776 | ;a_init db 'lib_init',0 |
||
1777 | ;a_version db 'version',0 |
||
1778 | |||
1779 | aEdit_box_draw db 'edit_box',0 |
||
1780 | aEdit_box_key db 'edit_box_key',0 |
||
1781 | aEdit_box_mouse db 'edit_box_mouse',0 |
||
1782 | ;aVersion_ed db 'version_ed',0 |
||
1783 | |||
1784 | ;aCheck_box_draw db 'check_box_draw',0 |
||
1785 | ;aCheck_box_mouse db 'check_box_mouse',0 |
||
1786 | ;aVersion_ch db 'version_ch',0 |
||
1787 | |||
1788 | aOption_box_draw db 'option_box_draw',0 |
||
1789 | aOption_box_mouse db 'option_box_mouse',0 |
||
1790 | ;aVersion_op db 'version_op',0 |
||
1791 | |||
1792 | ;aScrollbar_ver_draw db 'scrollbar_v_draw',0 |
||
1793 | ;aScrollbar_ver_mouse db 'scrollbar_v_mouse',0 |
||
1794 | ;aScrollbar_hor_draw db 'scrollbar_h_draw',0 |
||
1795 | ;aScrollbar_hor_mouse db 'scrollbar_h_mouse',0 |
||
1796 | ;aVersion_scrollbar db 'version_scrollbar',0 |
||
1797 | |||
1798 | ;aDbutton_draw db 'dbutton_draw',0 |
||
1799 | ;aDbutton_mouse db 'dbutton_mouse',0 |
||
1800 | ;aVersion_dbutton db 'version_dbutton',0 |
||
1801 | |||
1802 | ;aMenu_bar_draw db 'menu_bar_draw',0 |
||
1803 | ;aMenu_bar_mouse db 'menu_bar_mouse',0 |
||
1804 | ;aMenu_bar_activate db 'menu_bar_activate',0 |
||
1805 | ;aVersion_menu_bar db 'version_menu_bar',0 |
||
1806 | |||
1807 | ;aFileBrowser_draw db 'FileBrowser_draw',0 |
||
1808 | ;aFileBrowser_mouse db 'FileBrowser_mouse',0 |
||
1809 | ;aFileBrowser_key db 'FileBrowser_key',0 |
||
1810 | ;aVersion_FileBrowser db 'version_FileBrowser',0 |
||
1811 | |||
1812 | sz_PathShow_prepare db 'PathShow_prepare',0 |
||
1813 | sz_PathShow_draw db 'PathShow_draw',0 |
||
1814 | ;szVersion_path_show db 'version_PathShow',0 |
||
1815 | ;--------------------------------------------------------------------- |
||
1816 | PathShow_data_1: |
||
1817 | .type dd 0 ;+0 |
||
1818 | .start_y dw 85 ;+4 |
||
1819 | .start_x dw 128 ;+6 |
||
1820 | .font_size_x dw 6 ;+8 ; 6 - for font 0, 8 - for font 1 |
||
1821 | .area_size_x dw 415 ;+10 |
||
1822 | .font_number dd 0 ;+12 ; 0 - monospace, 1 - variable |
||
1823 | .background_flag dd 0 ;+16 |
||
1824 | .font_color dd 0x0 ;+20 |
||
1825 | .background_color dd 0x0 ;+24 |
||
1826 | .text_pointer dd fname_Info ;+28 |
||
1827 | .work_area_pointer dd text_work_area ;+32 |
||
1828 | .temp_text_length dd 0 ;+36 |
||
1829 | ;--------------------------------------------------------------------- |
||
1830 | PathShow_data_2: |
||
1831 | .type dd 0 ;+0 |
||
1832 | .start_y dw 104 ;+4 |
||
1833 | .start_x dw 127 ;+6 |
||
1834 | .font_size_x dw 6 ;+8 ; 6 - for font 0, 8 - for font 1 |
||
1835 | .area_size_x dw 415 ;+10 |
||
1836 | .font_number dd 0 ;+12 ; 0 - monospace, 1 - variable |
||
1837 | .background_flag dd 0 ;+16 |
||
1838 | .font_color dd 0x0 ;+20 |
||
1839 | .background_color dd 0x0 ;+24 |
||
1840 | .text_pointer dd fname_SMART ;+28 |
||
1841 | .work_area_pointer dd text_work_area2 ;+32 |
||
1842 | .temp_text_length dd 0 ;+36 |
||
1843 | ;--------------------------------------------------------------------- |
||
1844 | OpenDialog_data: |
||
1845 | .type dd 0 |
||
1846 | .procinfo dd procinfo ;+4 |
||
1847 | .com_area_name dd communication_area_name ;+8 |
||
1848 | .com_area dd 0 ;+12 |
||
1849 | .opendir_pach dd temp_dir_pach ;+16 |
||
1850 | .dir_default_pach dd communication_area_default_pach ;+20 |
||
1851 | .start_path dd open_dialog_path ;+24 |
||
1852 | .draw_window dd draw_window ;+28 |
||
1853 | .status dd 0 ;+32 |
||
1854 | .openfile_pach dd fname_Info ;+36 |
||
1855 | .filename_area dd filename_area ;+40 |
||
1856 | .filter_area dd Filter |
||
1857 | .x: |
||
1858 | .x_size dw 420 ;+48 ; Window X size |
||
1859 | .x_start dw 10 ;+50 ; Window X position |
||
1860 | .y: |
||
1861 | .y_size dw 320 ;+52 ; Window y size |
||
1862 | .y_start dw 10 ;+54 ; Window Y position |
||
1863 | |||
1864 | OpenDialog_data2: |
||
1865 | .type dd 0 |
||
1866 | .procinfo dd procinfo ;+4 |
||
1867 | .com_area_name dd communication_area_name2 ;+8 |
||
1868 | .com_area dd 0 ;+12 |
||
1869 | .opendir_pach dd temp_dir_pach2 ;+16 |
||
1870 | .dir_default_pach dd communication_area_default_pach ;+20 |
||
1871 | .start_path dd open_dialog_path ;+24 |
||
1872 | .draw_window dd draw_window ;+28 |
||
1873 | .status dd 0 ;+32 |
||
1874 | .openfile_pach dd fname_SMART ;+36 |
||
1875 | .filename_area dd filename_area2 ;+40 |
||
1876 | .filter_area dd Filter2 |
||
1877 | .x: |
||
1878 | .x_size dw 420 ;+48 ; Window X size |
||
1879 | .x_start dw 10 ;+50 ; Window X position |
||
1880 | .y: |
||
1881 | .y_size dw 320 ;+52 ; Window y size |
||
1882 | .y_start dw 10 ;+54 ; Window Y position |
||
1883 | |||
1884 | communication_area_name2: |
||
1885 | db 'FFFFFFFF_open_dialog',0 |
||
1886 | |||
1887 | communication_area_name: |
||
1888 | db 'FFFFFFFF_open_dialog2',0 |
||
1889 | open_dialog_path: |
||
1702 | Lrz | 1890 | if __nightbuild eq yes |
1891 | db '/sys/MANAGERS/opendial',0 |
||
1892 | else |
||
1893 | db '/sys/File Managers/opendial',0 |
||
1894 | end if |
||
1622 | mario79 | 1895 | communication_area_default_pach: |
1896 | db '/sys',0 |
||
1897 | |||
1898 | Filter: |
||
1899 | dd Filter.end - Filter |
||
1900 | .1: |
||
1901 | db 'INFO',0 |
||
1902 | .end: |
||
1903 | db 0 |
||
1904 | |||
1905 | Filter2: |
||
1906 | dd Filter.end - Filter |
||
1907 | .1: |
||
1908 | db 'SMART',0 |
||
1909 | .end: |
||
1910 | db 0 |
||
1911 | |||
1912 | default_Info: |
||
1913 | db '/sys/default.info',0 |
||
1914 | default_SMART: |
||
1915 | db '/sys/default.smart',0 |
||
1916 | ;--------------------------------------------------------------------- |
||
1917 | page_num db 1 |
||
1918 | flags dw 100b |
||
1919 | ;бит 0: 0/1 - InfoBlock не/прочитан |
||
1920 | ;1: 0/1 - SmartBlock не/прочитан |
||
1921 | ;2: 1 - показ ControlBlock |
||
1922 | ;3: 1 - при попытке чтения возникла ошибка (превышено время ожидания) |
||
1923 | ;4: 0/1 - сохраняем/загружаем InfoBlock/Smart |
||
1924 | ;5: 0/1 - выбор Master/Slave |
||
1925 | ;6: 1 - показ Tests |
||
1926 | ;7: 1 - показ InfoBlock |
||
1927 | ;8: 1 - показ Smart |
||
1928 | ;9: 1 - выключаем или включаем SMART |
||
1929 | ;10: 1 - включаем SMART |
||
1930 | ;--------------------------------------------------------------------- |
||
1931 | IM_END: |
||
1932 | ;--------------------------------------------------------------------- |
||
1933 | align 16 |
||
1934 | InfoArray: times 256 dw 0 |
||
1935 | SmartArray: times 512 dw 0 |
||
1936 | |||
1937 | ;buf_cmd_lin rb 0 |
||
1938 | ;threath_buf rb 0x400 |
||
1939 | align 4 |
||
1940 | ;--------------------------------------------------------------------- |
||
1941 | cur_dir_path: |
||
1942 | rb 4096 |
||
1943 | ;--------------------------------------------------------------------- |
||
1944 | fname_Info: |
||
1945 | rb 4096 ; filename |
||
1946 | ;--------------------------------------------------------------------- |
||
1947 | fname_SMART: |
||
1948 | rb 4096 ; filename |
||
1949 | ;--------------------------------------------------------------------- |
||
1950 | text_work_area: |
||
1951 | rb 1024 |
||
1952 | ;--------------------------------------------------------------------- |
||
1953 | text_work_area2: |
||
1954 | rb 1024 |
||
1955 | ;--------------------------------------------------------------------- |
||
1956 | procinfo: |
||
1957 | rb 1024 |
||
1958 | ;--------------------------------------------------------------------- |
||
1959 | temp_dir_pach: |
||
1960 | rb 4096 |
||
1961 | ;--------------------------------------------------------------------- |
||
1962 | temp_dir_pach2: |
||
1963 | rb 4096 |
||
1964 | ;--------------------------------------------------------------------- |
||
1965 | filename_area: |
||
1966 | rb 256 |
||
1967 | ;--------------------------------------------------------------------- |
||
1968 | filename_area2: |
||
1969 | rb 256 |
||
1970 | ;--------------------------------------------------------------------- |
||
1971 | library_path: |
||
1972 | rb 4096 |
||
1973 | ;--------------------------------------------------------------------- |
||
1974 | rb 4096 |
||
1975 | stacktop: |
||
1976 | ;--------------------------------------------------------------------- |
||
1977 | I_END: |
||
3604 | fedesco | 1978 | ;--------------------------------------------------------------------->4,105>7,64>4,87>90,30>100,15>50,30>90,30>82,15>50,30>60,15>3,80>4,45>4,30>4,125>20,20>2,535>300,6>260,6>4,6>217,20>195,20>120,45>77,38>35,38>1,15>1,30>100,350>100,580>100,15>83,15>125,420> |