Subversion Repositories Kolibri OS

Rev

Rev 1622 | Rev 3604 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

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