Subversion Repositories Kolibri OS

Rev

Rev 3605 | Rev 9568 | 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   SF_SYSTEM_SET,SSF_ACCESS_PCI,1 ;à §à¥è¨âì ­¨§ª®ã஢­¥¢ë© ¤®áâ㯠ª PCI
  31. ; mcall   SF_PCI,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. include 'lang.inc'      ; language support
  39.  
  40. ; ¥¦¨¬ë Legacy, Native ¨ ¯à. ¬¥­ïîâáï ç¥à¥§ BIOS.
  41. include '../../../config.inc'           ;for nightbuild
  42. include '../../../macros.inc'
  43. include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
  44. include '../../../KOSfuncs.inc'
  45. include '../../../load_lib.mac'
  46.         @use_library
  47. ;---------------------------------------------------------------------
  48. macro ab {
  49.         add     ebx,455*65536
  50.         }
  51. ;---------------------------------------------------------------------
  52. macro sb {
  53.         sub     ebx,455*65536-12
  54.         }
  55. ;---------------------------------------------------------------------
  56. macro ad {
  57.         add     ebx,12
  58.         }
  59. ;---------------------------------------------------------------------
  60. macro wba num,text {
  61. @@:
  62.         bt      di,num
  63.         jnc     @f
  64.         ad
  65.         mcall   SF_DRAW_TEXT,,0x80000000,text
  66.         }
  67. ;---------------------------------------------------------------------
  68. macro wba num,text {
  69. @@:
  70.         bt      di,num
  71.         jnc     @f
  72.         ad
  73.         mcall   SF_DRAW_TEXT,,0x80000000,text
  74.         }
  75. ;---------------------------------------------------------------------
  76. macro sc num,text {
  77.         cmp     al,num
  78.         jne     @f
  79.         mov     edx,text
  80. @@:
  81.         }
  82. ;---------------------------------------------------------------------
  83. macro mz text,str1,str2,str3 {
  84.         mcall   SF_DRAW_TEXT,,0x80444444,text
  85.         ab
  86.         mov     edx,ebx
  87.         push    ebx
  88.         str1
  89.         str2
  90.         str3
  91.         mcall   SF_DRAW_NUMBER,0x800a0000,,,0x0
  92.         pop     ebx
  93.         sb
  94.         }
  95. ;---------------------------------------------------------------------
  96. START:
  97. ;       load_library    boxlib_name,buf_cmd_lin,system_path,Box_lib_import
  98.         mcall   SF_SYS_MISC,SSF_HEAP_INIT
  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
  122. ;skin_path_ready:
  123. ;---------------------------------------------------------------------
  124. ;OpenDialog     initialisation
  125.         push    dword OpenDialog_data
  126.         call    [OpenDialog_Init]
  127.  
  128.         push    dword OpenDialog_data2
  129.         call    [OpenDialog_Init]
  130.  
  131. ; prepare for PathShow
  132.         push    dword PathShow_data_1
  133.         call    [PathShow_prepare]
  134.  
  135.         push    dword PathShow_data_2
  136.         call    [PathShow_prepare]
  137. ;---------------------------------------------------------------------
  138.  
  139.         mcall   SF_SET_EVENTS_MASK,0x27
  140. ;---------------------------------------------------------------------
  141. redraw_all:
  142. redraw:
  143.         call    draw_window
  144. ;---------------------------------------------------------------------
  145. still:
  146.         mcall   SF_WAIT_EVENT
  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   SF_MOUSE_GET,SSF_BUTTON
  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   SF_DRAW_RECT,<125,420>,<83,15>,0xFFFFED
  177.         mcall   SF_DRAW_RECT,,<100,15>,
  178. ; draw for PathShow
  179.         push    dword PathShow_data_1
  180.         call    [PathShow_draw]
  181.  
  182.         push    dword PathShow_data_2
  183.         call    [PathShow_draw]
  184.         popa
  185.         ret
  186. ;---------------------------------------------------------------------
  187. draw_window:
  188.         mcall   SF_REDRAW,SSF_BEGIN_DRAW
  189.         xor     esi,esi
  190.         mcall   SF_CREATE_WINDOW,<100,580>,<100,350>,0x34ffffff,,title
  191.         mcall   SF_DEFINE_BUTTON,<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   SF_DRAW_TEXT,<4,6>,0x80ffffff,menu_text
  199.  
  200.         mcall   ,<260,6>,0x80000000,page_text
  201.         movzx   ecx, byte [page_num]
  202.         mcall   SF_DRAW_NUMBER,0x800a0000,,<300,6>,0x0
  203.  
  204.         mcall   SF_DRAW_LINE,<2,535>,<20,20>,0x00aabbaa
  205.         bt      [flags],2
  206.         jnc     @f
  207.         call    show_ControlBlock
  208.         mcall   SF_DRAW_TEXT,<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   SF_REDRAW,SSF_END_DRAW
  226.         ret
  227. ;---------------------------------------------------------------------
  228. key:
  229.         mcall   SF_GET_KEY
  230. ;       push    edit1
  231. ;       call    [edit_box_key]
  232. ;       push    edit1
  233. ;       call    [edit_box_draw]
  234.         jmp     still
  235. ;---------------------------------------------------------------------
  236. button:
  237.         mcall   SF_GET_BUTTON
  238.         cmp     ah,1
  239.         jne     @f
  240. close:
  241.         mcall   SF_TERMINATE_PROCESS
  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],SSF_READ_FILE
  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   SF_FILE,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],SSF_CREATE_FILE
  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   SF_FILE,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   SF_SET_PORTS,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   SF_SLEEP,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   SF_SLEEP,10
  525.         pop     bx
  526.  
  527.         mov     ax,bx
  528.         add     dx,6
  529.         out     dx,al
  530.         pop     edx ecx
  531.         mcall   SF_SET_PORTS,1
  532.         ret
  533. ;---------------------------------------------------------------------
  534. .error:
  535.         bts     [flags],3
  536.         pop     edx ecx
  537.         mcall   SF_SET_PORTS,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   SF_SLEEP,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   SF_SLEEP,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   SF_SLEEP,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   SF_SET_PORTS,1
  648.         ret
  649. ;---------------------------------------------------------------------
  650. .error:
  651.         bts     [flags],3
  652.         pop     edx ecx
  653.         mcall   SF_SET_PORTS,1
  654.         ret
  655. ;---------------------------------------------------------------------
  656. show_ControlBlock:
  657.         mcall   SF_DRAW_TEXT,<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   SF_DEFINE_BUTTON,<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   SF_DRAW_TEXT,<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   SF_DRAW_TEXT,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   SF_DRAW_TEXT,,0x80000000,t.222.12.1
  716. @@:
  717.         bt      di,4
  718.         jc      @f
  719.         mcall   SF_DRAW_TEXT,,0x80000000,t.222.12.0
  720. @@:
  721.         sb
  722.         mcall   SF_DRAW_TEXT,,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   SF_DRAW_NUMBER,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   SF_DRAW_TEXT,,0x80444444,t.chs
  737.         ab
  738.         mov     edx,ebx
  739.         push    ebx
  740.         movzx   ecx, word [InfoArray+2]
  741.         xchg    ch,cl
  742.         mcall   SF_DRAW_NUMBER,0x80050000,,,0x0
  743.         add     edx,35*65536
  744.         movzx   ecx, word [InfoArray+6]
  745.         xchg    ch,cl
  746.         mcall   SF_DRAW_NUMBER,0x80040000,,,0x0
  747.         add     edx,15*65536
  748.         movzx   ecx, word [InfoArray+12]
  749.         xchg    ch,cl
  750.         mcall   ;SF_DRAW_NUMBER,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   SF_DRAW_NUMBER,0x800a0000,,,0x0
  764.         pop     ebx
  765.  
  766.         mov     ax,[InfoArray+48*2]
  767.         bt      ax,8
  768.         jnc     @f
  769.         sb
  770.         mcall   SF_DRAW_TEXT,,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   SF_DRAW_TEXT,,0x80444444,t.49.13.1
  781.         ab
  782.         mcall   ,,0x80000000,t.sup
  783. @@:
  784.         bt      di,13
  785.         jc      @f
  786.         sb
  787.         mcall   SF_DRAW_TEXT,,0x80444444,t.49.13.0
  788.         ab
  789. @@:
  790.         bt      di,11
  791.         jnc     @f
  792.         sb
  793.         mcall   SF_DRAW_TEXT,,0x80444444,t.49.11.1
  794.         ab
  795.         mcall   ,,0x80000000,t.sup
  796. @@:
  797.         bt      di,11
  798.         jc      @f
  799.         sb
  800.         mcall   SF_DRAW_TEXT,,0x80444444,t.49.11.0
  801.         ab
  802.         mcall   ,,0x80000000,t.sup
  803. @@:
  804.         bt      di,10
  805.         jnc     @f
  806.         sb
  807.         mcall   SF_DRAW_TEXT,,0x80444444,t.49.10.1
  808.         ab
  809. @@:
  810.         bt      di,9
  811.         jnc     @f
  812.         sb
  813.         mcall   SF_DRAW_TEXT,,0x80444444,t.49.9
  814.         ab
  815.         mcall   ,,0x80000000,t.sup
  816. @@:
  817.         bt      di,8
  818.         jnc     @f
  819.         sb
  820.         mcall   SF_DRAW_TEXT,,0x80444444,t.49.8
  821.         ab
  822.         mcall   ,,0x80000000,t.sup
  823. @@:
  824.         sb
  825.         mcall   SF_DRAW_TEXT,,0x80444444,t.47
  826. ;        add     ebx,10
  827. ;        mcall   SF_DRAW_TEXT,,0x80444444,t.47_
  828.         ab
  829.         mov     edx,ebx
  830.         movzx   ecx, word [InfoArray+47*2]
  831.         xchg    ch,cl
  832.         mcall   SF_DRAW_NUMBER,0x80050000,,,0x80000000
  833.         mov     ebx,edx
  834.  
  835.  
  836. ;PART 2 of 11
  837.         sb
  838.         mcall   SF_DRAW_TEXT,,0x80444444,t.59
  839. ;        add     ebx,10
  840. ;        mcall   SF_DRAW_TEXT,,0x80444444,t.59_
  841.         ab
  842.         mov     edx,ebx
  843.         movzx   ecx, word [InfoArray+59*2]
  844.         xchg    ch,cl
  845.         mcall   SF_DRAW_NUMBER,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   SF_DRAW_TEXT,,0x80444444,t.63.10
  857.         ab
  858.         mcall   ,,0x80000000,t.sel
  859. @@:
  860.         bt      di,9
  861.         jnc     @f
  862.         sb
  863.         mcall   SF_DRAW_TEXT,,0x80444444,t.63.9
  864.         ab
  865.         mcall   ,,0x80000000,t.sel
  866. @@:
  867.         bt      di,8
  868.         jnc     @f
  869.         sb
  870.         mcall   SF_DRAW_TEXT,,0x80444444,t.63.8
  871.         ab
  872.         mcall   ,,0x80000000,t.sel
  873. @@:
  874.         bt      di,2
  875.         jnc     @f
  876.         sb
  877.         mcall   SF_DRAW_TEXT,,0x80444444,t.63.2
  878.         ab
  879.         mcall   ,,0x80000000,t.sup
  880. @@:
  881.         bt      di,1
  882.         jnc     @f
  883.         sb
  884.         mcall   SF_DRAW_TEXT,,0x80444444,t.63.1
  885.         ab
  886.         mcall   ,,0x80000000,t.sup
  887. @@:
  888.         bt      di,0
  889.         jnc     @f
  890.         sb
  891.         mcall   SF_DRAW_TEXT,,0x80444444,t.63.0
  892.         ab
  893.         mcall   ,,0x80000000,t.sup
  894. @@:
  895.  
  896. ;PART 3 of 11
  897.         sb
  898.         mcall   SF_DRAW_TEXT,,0x80444444,t.75.0_4
  899.         ab
  900.         mov     edx,ebx
  901.         push    ebx
  902.         movzx   ecx, byte [InfoArray+75*2+1]
  903.         mcall   SF_DRAW_NUMBER,0x800a0000,,,0x0
  904.         pop     ebx
  905.  
  906. ;words 76-79 - SATA
  907. ;.word80:
  908. ;        sb
  909. ;        mcall   SF_DRAW_TEXT,,0x80444444,t.80
  910. ;        ab
  911. ;        mov     cx,[InfoArray+80*2]
  912. ;        test    cx,cx
  913. ;        jnz     @f
  914. ;        mcall   SF_DRAW_TEXT,,0x80444444,t.unk
  915. ;        ret
  916. ;@@:     cmp     cx,-1
  917. ;        jne     @f
  918. ;        mcall   SF_DRAW_TEXT,,0x80444444,t.unk
  919. ;        ret
  920. ;@@:     xchg    ch,cl
  921. ;        mov     edx,ebx
  922. ;        mcall   SF_DRAW_NUMBER,0x800a0000,,,0x0
  923. ;        mov     ebx,edx
  924.         sb
  925.         mcall   SF_DRAW_TEXT,,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   SF_DRAW_TEXT,,0x80000000,t.80.8
  933.         jmp     .end
  934. ;---------------------------------------------------------------------
  935. @@:
  936.         bt      di,7
  937.         jnc     @f
  938.         mcall   SF_DRAW_TEXT,,0x80000000,t.80.7
  939.         jmp     .end
  940. ;---------------------------------------------------------------------
  941. @@:
  942.         bt      di,6
  943.         jnc     @f
  944.         mcall   SF_DRAW_TEXT,,0x80000000,t.80.6
  945.         jmp     .end
  946. ;---------------------------------------------------------------------
  947. @@:
  948.         bt      di,5
  949.         jnc     @f
  950.         mcall   SF_DRAW_TEXT,,0x80000000,t.80.5
  951.         jmp     .end
  952. ;---------------------------------------------------------------------
  953. @@:
  954.         bt      di,4
  955.         jnc     @f
  956.         mcall   SF_DRAW_TEXT,,0x80000000,t.80.4
  957.         jmp     .end
  958. @@:
  959.         ret
  960. ;---------------------------------------------------------------------
  961. .page2:
  962. ;PART 4 of 11
  963.         mcall   SF_DRAW_TEXT,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   SF_DRAW_TEXT,,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   SF_DRAW_TEXT,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   SF_DRAW_TEXT,,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   SF_DRAW_TEXT,,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   SF_DRAW_TEXT,,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   SF_DRAW_TEXT,,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   SF_DRAW_NUMBER,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   SF_DRAW_TEXT,,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   SF_DRAW_NUMBER,0x800a0000,,,0x0
  1148.         pop     ebx
  1149.         ad
  1150. @@:
  1151.         mz      t.89,<movzx   ecx, word [InfoArray+89*2]>,
  1152.         mz      t.90,<movzx   ecx, word [InfoArray+90*2]>,
  1153.         mz      t.91,<movzx   ecx, word [InfoArray+91*2]>,<xchg    ch,cl>
  1154.         mz      t.92,<movzx   ecx, word [InfoArray+92*2]>,<xchg    ch,cl>
  1155. ;WORD 94
  1156.         mz      t.94.8_15,<movzx   ecx, byte [InfoArray+94*2+1]>,
  1157.         mz      t.94.0_7,<movzx   ecx, byte [InfoArray+94*2]>,
  1158.         mz      t.95,<movzx   ecx, word [InfoArray+95*2]>,<xchg    ch,cl>
  1159.         mz      t.96,<movzx   ecx, word [InfoArray+96*2]>,<xchg    ch,cl>
  1160.         mz      t.97,<movzx   ecx, word [InfoArray+97*2]>,<xchg    ch,cl>
  1161.         mz      t.98_99,<mov   cx,[InfoArray+98*2]>,<bswap ecx>,<mov   cx,[InfoArray+98*2+2]>
  1162.         mz      t.100_103,<mov  ecx,[InfoArray+100*2]>,<bswap ecx>,<ror ecx,16>
  1163.         mz      t.104,<movzx   ecx, word [InfoArray+104*2]>,
  1164.  
  1165. ;PART 6 of 11 ?
  1166.         mcall   SF_DRAW_TEXT,,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   SF_DRAW_TEXT,,0x80444444,t.106.13
  1174.         add     ebx,15
  1175. @@:
  1176.         bt      di,12
  1177.         jnc     @f
  1178.         mcall   SF_DRAW_TEXT,,0x80444444,t.106.12
  1179.         add     ebx,15
  1180. @@:
  1181.         mcall   SF_DRAW_TEXT,,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   SF_DRAW_NUMBER,0x800a0000,,,0x0
  1188.         mov     ebx,edx
  1189.         sb
  1190.  
  1191.         mz      t.107,<movzx     ecx,word [InfoArray+107*2]>,
  1192. ;108 - 111 ¤®¡ ¢¨âì
  1193.         mz      t.117_118,<mov     ecx,[InfoArray+117*2]>,
  1194.         ret
  1195. ;---------------------------------------------------------------------
  1196. .page5:
  1197. ;        mcall   SF_DRAW_TEXT,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   SF_DRAW_TEXT,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   SF_DRAW_NUMBER,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   SF_DRAW_TEXT,,,
  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   SF_DRAW_NUMBER,0x800a0000,,,0x0
  1244.         mov     ecx,[esp]
  1245.         add     ecx,4
  1246.         movzx   ecx, byte [ecx]
  1247.         add     edx,30*65536
  1248.         mcall   SF_DRAW_NUMBER,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
  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
  1332.  
  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
  1338.         .48.0   db 'Trusted Computing feature set is',0
  1339.         .49.13.1        db 'Standby timer values are',0
  1340.         .49.13.0        db 'Standby timer values shall be managed by the device',0
  1341.         .49.11.1        db 'IORDY',0
  1342.         .49.11.0        db 'IORDY may be',0
  1343.         .49.10.1        db 'IORDY potrebbe essere disabilitato',0
  1344.         .49.9   db 'LBA',0
  1345.         .49.8   db 'DMA',0
  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
  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.db 'Free-fall Control feature set is',0 ;1 sup
  1511. .119.db 'The Segmented feature for DOWNLOAD MICROCODE is',0 ;1 sup
  1512. .119.db 'READ and WRITE DMA EXT GPL optional commands are',0 ;1 sup
  1513. .119.db 'WRITE UNCORRECTABLE EXT is',0 ;1 sup
  1514. .119.db 'Write-Read-Verify feature set is',0 ;1 sup
  1515. .120    db 'Command set/feature enabled/supported',0
  1516. .120.db 'Free-fall Control feature set is',0 ;1 enb
  1517. .120.db 'The Segmented feature for DOWNLOAD MICROCODE is',0 ;1 sup
  1518. .120.db 'READ and WRITE DMA EXT GPL optional commands are',0 ;1 sup
  1519. .120.db 'WRITE UNCORRECTABLE EXT is',0 ;1 sup
  1520. .120.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.db 'Enhanced security erase',0 ;1 sup
  1526. .128.db 'Security count expired',0 ;1
  1527. .128.db 'Security frozen',0 ;1
  1528. .128.db 'Security locked',0 ;1
  1529. .128.db 'Security enabled',0 ;1
  1530. .128.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.db 'Data Tables',0 ;1 sup
  1537. .206.db 'Features Control',0 ;1 sup
  1538. .206.db 'Error Recovery Control',0 ;1 sup
  1539. .206.db 'Write Same',0 ;1 sup
  1540. .206.db 'Long Sector Access',0 ;1 sup
  1541. .206.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.db 'NV Cache feature set',0 ;1 enb
  1550. .214.db 'NV Cache Power Mode feature set',0 ;1 enb
  1551. .214.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
  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
  1646.  
  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
  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. align 4
  1664. l_libs_start:
  1665.  
  1666. library01  l_libs system_dir_Boxlib+9, library_path, system_dir_Boxlib, Box_lib_import
  1667.  
  1668. library02  l_libs system_dir_ProcLib+9, library_path, system_dir_ProcLib, ProcLib_import
  1669.  
  1670. end_l_libs:
  1671. ;---------------------------------------------------------------------
  1672.  
  1673.  
  1674. ;edit1 edit_box 200,2,85,0xaaaaaa,0x6a9480,0,0xAABBCC,0,128,file_name,ed_focus,10,10
  1675. op1 option_box option_group1,72,44,6,9,0xffffff,0x0,0,0,0
  1676. op2 option_box option_group1,94,44,6,9,0xffffff,0x0,0,0,0
  1677. op3 option_box option_group1,132,44,6,9,0xffffff,0x0,0,0,0
  1678. op4 option_box option_group1,154,44,6,9,0xffffff,0x0,0,0,0
  1679. option_group1   dd op1
  1680. Option_boxs     dd op1,op2,op3,op4,0
  1681. ;---------------------------------------------------------------------
  1682. ;file_name      db '/rd/1/hdd_',0
  1683. ;times 128 db (0)
  1684. ;---------------------------------------------------------------------
  1685. struct f70
  1686.         func_n  dd ?
  1687.         param1  dd 0
  1688.         param2  dd 0
  1689.         param3  dd ?
  1690.         param4  dd ?
  1691.         rezerv  db 0
  1692.         name    dd filename_area
  1693. ends
  1694. ;---------------------------------------------------------------------
  1695. func_70 f70
  1696. ;       Info_name       dd filename_area        ;file_name
  1697. ;---------------------------------------------------------------------
  1698. ;       SMART_name      dd filename_area2       ;file_name
  1699. ;---------------------------------------------------------------------
  1700. align 4
  1701. ProcLib_import:
  1702. OpenDialog_Init         dd aOpenDialog_Init
  1703. OpenDialog_Start        dd aOpenDialog_Start
  1704. ;OpenDialog__Version    dd aOpenDialog_Version
  1705.         dd      0
  1706.         dd      0
  1707. aOpenDialog_Init        db 'OpenDialog_init',0
  1708. aOpenDialog_Start       db 'OpenDialog_start',0
  1709. ;aOpenDialog_Version    db 'Version_OpenDialog',0
  1710. ;---------------------------------------------------------------------
  1711. align 4
  1712. Box_lib_import:
  1713. ;init_lib               dd a_init
  1714. ;version_lib            dd a_version
  1715.  
  1716.  
  1717. edit_box_draw           dd aEdit_box_draw
  1718. edit_box_key            dd aEdit_box_key
  1719. edit_box_mouse          dd aEdit_box_mouse
  1720. ;version_ed             dd aVersion_ed
  1721.  
  1722. ;check_box_draw         dd aCheck_box_draw
  1723. ;check_box_mouse        dd aCheck_box_mouse
  1724. ;version_ch             dd aVersion_ch
  1725.  
  1726. option_box_draw         dd aOption_box_draw
  1727. option_box_mouse        dd aOption_box_mouse
  1728. ;version_op             dd aVersion_op
  1729.  
  1730. ;scrollbar_ver_draw     dd aScrollbar_ver_draw
  1731. ;scrollbar_ver_mouse    dd aScrollbar_ver_mouse
  1732. ;scrollbar_hor_draw     dd aScrollbar_hor_draw
  1733. ;scrollbar_hor_mouse    dd aScrollbar_hor_mouse
  1734. ;version_scrollbar      dd aVersion_scrollbar
  1735.  
  1736. ;dinamic_button_draw    dd aDbutton_draw
  1737. ;dinamic_button_mouse   dd aDbutton_mouse
  1738. ;version_dbutton        dd aVersion_dbutton
  1739.  
  1740. ;menu_bar_draw          dd aMenu_bar_draw
  1741. ;menu_bar_mouse         dd aMenu_bar_mouse
  1742. ;menu_bar_activate      dd aMenu_bar_activate
  1743. ;version_menu_bar       dd aVersion_menu_bar
  1744.  
  1745. ;FileBrowser_draw       dd aFileBrowser_draw
  1746. ;FileBrowser_mouse      dd aFileBrowser_mouse
  1747. ;FileBrowser_key        dd aFileBrowser_key
  1748. ;Version_FileBrowser    dd aVersion_FileBrowser
  1749.  
  1750. PathShow_prepare        dd sz_PathShow_prepare
  1751. PathShow_draw           dd sz_PathShow_draw
  1752. ;Version_path_show      dd szVersion_path_show
  1753.                         dd 0
  1754.                         dd 0
  1755.  
  1756. ;a_init                 db 'lib_init',0
  1757. ;a_version              db 'version',0
  1758.  
  1759. aEdit_box_draw          db 'edit_box',0
  1760. aEdit_box_key           db 'edit_box_key',0
  1761. aEdit_box_mouse         db 'edit_box_mouse',0
  1762. ;aVersion_ed            db 'version_ed',0
  1763.  
  1764. ;aCheck_box_draw        db 'check_box_draw',0
  1765. ;aCheck_box_mouse       db 'check_box_mouse',0
  1766. ;aVersion_ch            db 'version_ch',0
  1767.  
  1768. aOption_box_draw        db 'option_box_draw',0
  1769. aOption_box_mouse       db 'option_box_mouse',0
  1770. ;aVersion_op            db 'version_op',0
  1771.  
  1772. ;aScrollbar_ver_draw    db 'scrollbar_v_draw',0
  1773. ;aScrollbar_ver_mouse   db 'scrollbar_v_mouse',0
  1774. ;aScrollbar_hor_draw    db 'scrollbar_h_draw',0
  1775. ;aScrollbar_hor_mouse   db 'scrollbar_h_mouse',0
  1776. ;aVersion_scrollbar     db 'version_scrollbar',0
  1777.  
  1778. ;aDbutton_draw          db 'dbutton_draw',0
  1779. ;aDbutton_mouse         db 'dbutton_mouse',0
  1780. ;aVersion_dbutton       db 'version_dbutton',0
  1781.  
  1782. ;aMenu_bar_draw         db 'menu_bar_draw',0
  1783. ;aMenu_bar_mouse                db 'menu_bar_mouse',0
  1784. ;aMenu_bar_activate     db 'menu_bar_activate',0
  1785. ;aVersion_menu_bar      db 'version_menu_bar',0
  1786.  
  1787. ;aFileBrowser_draw      db 'FileBrowser_draw',0
  1788. ;aFileBrowser_mouse     db 'FileBrowser_mouse',0
  1789. ;aFileBrowser_key       db 'FileBrowser_key',0
  1790. ;aVersion_FileBrowser   db 'version_FileBrowser',0
  1791.  
  1792. sz_PathShow_prepare     db 'PathShow_prepare',0
  1793. sz_PathShow_draw        db 'PathShow_draw',0
  1794. ;szVersion_path_show    db 'version_PathShow',0
  1795. ;---------------------------------------------------------------------
  1796. PathShow_data_1:
  1797. .type                   dd 0    ;+0
  1798. .start_y                dw 85   ;+4
  1799. .start_x                dw 128  ;+6
  1800. .font_size_x            dw 6    ;+8     ; 6 - for font 0, 8 - for font 1
  1801. .area_size_x            dw 415  ;+10
  1802. .font_number            dd 0    ;+12    ; 0 - monospace, 1 - variable
  1803. .background_flag        dd 0    ;+16
  1804. .font_color             dd 0x0  ;+20
  1805. .background_color       dd 0x0  ;+24
  1806. .text_pointer           dd fname_Info   ;+28
  1807. .work_area_pointer      dd text_work_area       ;+32
  1808. .temp_text_length       dd 0    ;+36
  1809. ;---------------------------------------------------------------------
  1810. PathShow_data_2:
  1811. .type                   dd 0    ;+0
  1812. .start_y                dw 104  ;+4
  1813. .start_x                dw 127  ;+6
  1814. .font_size_x            dw 6    ;+8     ; 6 - for font 0, 8 - for font 1
  1815. .area_size_x            dw 415  ;+10
  1816. .font_number            dd 0    ;+12    ; 0 - monospace, 1 - variable
  1817. .background_flag        dd 0    ;+16
  1818. .font_color             dd 0x0  ;+20
  1819. .background_color       dd 0x0  ;+24
  1820. .text_pointer           dd fname_SMART  ;+28
  1821. .work_area_pointer      dd text_work_area2      ;+32
  1822. .temp_text_length       dd 0    ;+36
  1823. ;---------------------------------------------------------------------
  1824. OpenDialog_data:
  1825. .type                   dd 0
  1826. .procinfo               dd procinfo     ;+4
  1827. .com_area_name          dd communication_area_name      ;+8
  1828. .com_area               dd 0    ;+12
  1829. .opendir_pach           dd temp_dir_pach        ;+16
  1830. .dir_default_pach       dd communication_area_default_pach      ;+20
  1831. .start_path             dd open_dialog_path     ;+24
  1832. .draw_window            dd draw_window  ;+28
  1833. .status                 dd 0    ;+32
  1834. .openfile_pach          dd fname_Info   ;+36
  1835. .filename_area          dd filename_area        ;+40
  1836. .filter_area            dd Filter
  1837. .x:
  1838. .x_size                 dw 420 ;+48 ; Window X size
  1839. .x_start                dw 10 ;+50 ; Window X position
  1840. .y:
  1841. .y_size                 dw 320 ;+52 ; Window y size
  1842. .y_start                dw 10 ;+54 ; Window Y position
  1843.  
  1844. OpenDialog_data2:
  1845. .type                   dd 0
  1846. .procinfo               dd procinfo     ;+4
  1847. .com_area_name          dd communication_area_name2     ;+8
  1848. .com_area               dd 0    ;+12
  1849. .opendir_pach           dd temp_dir_pach2       ;+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_SMART  ;+36
  1855. .filename_area          dd filename_area2       ;+40
  1856. .filter_area            dd Filter2
  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. communication_area_name2:
  1865.         db 'FFFFFFFF_open_dialog',0
  1866.  
  1867. communication_area_name:
  1868.         db 'FFFFFFFF_open_dialog2',0
  1869. open_dialog_path:
  1870. if __nightbuild eq yes
  1871.     db '/sys/MANAGERS/opendial',0
  1872. else
  1873.     db '/sys/File Managers/opendial',0
  1874. end if
  1875. communication_area_default_pach:
  1876.         db '/sys',0
  1877.  
  1878. Filter:
  1879. dd      Filter.end - Filter
  1880. .1:
  1881. db      'INFO',0
  1882. .end:
  1883. db      0
  1884.  
  1885. Filter2:
  1886. dd      Filter.end - Filter
  1887. .1:
  1888. db      'SMART',0
  1889. .end:
  1890. db      0
  1891.  
  1892. default_Info:
  1893.         db '/sys/default.info',0
  1894. default_SMART:
  1895.         db '/sys/default.smart',0
  1896. ;---------------------------------------------------------------------
  1897. page_num db 1
  1898. flags dw 100b
  1899. ;¡¨â 0: 0/1 - InfoBlock ­¥/¯à®ç¨â ­
  1900. ;1: 0/1 - SmartBlock ­¥/¯à®ç¨â ­
  1901. ;2: 1 - ¯®ª § ControlBlock
  1902. ;3: 1 - ¯à¨ ¯®¯ë⪥ ç⥭¨ï ¢®§­¨ª«  ®è¨¡ª  (¯à¥¢ë襭® ¢à¥¬ï ®¦¨¤ ­¨ï)
  1903. ;4: 0/1 - á®å࠭塞/§ £à㦠¥¬ InfoBlock/Smart
  1904. ;5: 0/1 - ¢ë¡®à Master/Slave
  1905. ;6: 1 - ¯®ª § Tests
  1906. ;7: 1 - ¯®ª § InfoBlock
  1907. ;8: 1 - ¯®ª § Smart
  1908. ;9: 1 - ¢ëª«îç ¥¬ ¨«¨ ¢ª«îç ¥¬ SMART
  1909. ;10: 1 - ¢ª«îç ¥¬ SMART
  1910. ;---------------------------------------------------------------------
  1911. IM_END:
  1912. ;---------------------------------------------------------------------
  1913. align 16
  1914. InfoArray: times 256 dw 0
  1915. SmartArray: times 512 dw 0
  1916.  
  1917. ;buf_cmd_lin    rb 0
  1918. ;threath_buf    rb 0x400
  1919. align 4
  1920. ;---------------------------------------------------------------------
  1921. cur_dir_path:
  1922.         rb 4096
  1923. ;---------------------------------------------------------------------
  1924. fname_Info:
  1925.         rb 4096            ; filename
  1926. ;---------------------------------------------------------------------
  1927. fname_SMART:
  1928.         rb 4096            ; filename
  1929. ;---------------------------------------------------------------------
  1930. text_work_area:
  1931.         rb 1024
  1932. ;---------------------------------------------------------------------
  1933. text_work_area2:
  1934.         rb 1024
  1935. ;---------------------------------------------------------------------
  1936. procinfo:
  1937.         rb 1024
  1938. ;---------------------------------------------------------------------
  1939. temp_dir_pach:
  1940.         rb 4096
  1941. ;---------------------------------------------------------------------
  1942. temp_dir_pach2:
  1943.         rb 4096
  1944. ;---------------------------------------------------------------------
  1945. filename_area:
  1946.         rb 256
  1947. ;---------------------------------------------------------------------
  1948. filename_area2:
  1949.         rb 256
  1950. ;---------------------------------------------------------------------
  1951. library_path:
  1952.         rb 4096
  1953. ;---------------------------------------------------------------------
  1954.         rb 4096
  1955. stacktop:
  1956. ;---------------------------------------------------------------------
  1957. I_END:
  1958. ;---------------------------------------------------------------------
  1959.