Subversion Repositories Kolibri OS

Rev

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

  1. ;08.05.2009 - bugfix
  2. ;14.04.2009 - a macros for code load library the box_lib.obj from '/sys/lib/' or current dirrectory.
  3. ; The macros for load any library/libraries:
  4. ; Copyright (c) 2009, <Lrz>
  5. ; All rights reserved.
  6. ;
  7. ; Redistribution and use in source and binary forms, with or without
  8. ; modification, are permitted provided that the following conditions are met:
  9. ;       * Redistributions of source code must retain the above copyright
  10. ;       notice, this list of conditions and the following disclaimer.
  11. ;       * Redistributions in binary form must reproduce the above copyright
  12. ;       notice, this list of conditions and the following disclaimer in the
  13. ;       documentation and/or other materials provided with the distribution.
  14. ;       * Neither the name of the <organization> nor the
  15. ;       names of its contributors may be used to endorse or promote products
  16. ;       derived from this software without specific prior written permission.
  17. ;
  18. ; THIS SOFTWARE IS PROVIDED BY Alexey Teplov aka <Lrz> ''AS IS'' AND ANY
  19. ; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  20. ; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  21. ; DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
  22. ; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  23. ; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  24. ; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  25. ; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  26. ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  27. ; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  28. ;*****************************************************************************
  29. ; This macros based on source code:
  30. ; <Lrz> - Alexey Teplov / Àëåêñåé Òåïëîâ
  31. ; Mario79, Mario - Marat Zakiyanov / Ìàðàò Çàêèÿíîâ
  32. ; Diamondz - Evgeny Grechnikov / Åâãåíèé Ãðå÷íèêîâ
  33. ;------------------------
  34. ; DESCRIPTION
  35. ; Macro load_library
  36. ; Logick of work.
  37. ; A first time we must to check system path, where I belive find a system library. System path is "/sys/lib/".
  38. ; If I cannot found my library, i must to check second way. Second way is current dirrectory.
  39. ; If we cannot load library, we must show the error message:
  40. ; "I'm sorry,the programm cannot found system library box_lib.obj."
  41. ; "The find was make on 2 ways: /sys/lib/ and current dirrectory."
  42. ;
  43. ;
  44. ;---------------------------------------------------------------------
  45. ; Macro sys_load_library
  46. ; A first time we must to check own path in current dirrectory the program, where I belive find a system library.
  47. ; If I cannot found my library, i must to check second way. Second way is system path a "/sys/lib/".
  48. ; If we cannot load library, we must show the error message:
  49. ; "I'm sorry,the programm cannot found system library box_lib.obj."
  50. ; "The find was make on 2 ways: /sys/lib/ and current dirrectory."
  51. ;
  52. ;---------------------------------------------------------------------
  53. ; How can I use it?
  54. ;---------------------------------------------------------------------
  55. ;-Example using single load library
  56. ;-universal load library/librarys
  57. ;load_library  library_name__, cur_dir_path__, library_path__, system_path__, \
  58. ;err_message_found_lib__, head_f_l__, myimport, err_message_import__, head_f_i__
  59. ;-if return code =-1 then exit, else normally work
  60. ;        cmp     eax,-1
  61. ;        jz      exit
  62. ;- Well, if you get
  63. ;
  64. ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  65. ;DATA äàííûå
  66. ;Âñåãäà ñîáëþäàòü ïîñëåäîâàòåëüíîñòü â èìåíè.
  67. ;system_path__      db '/sys/lib/'
  68. ;library_name__     db 'box_lib.obj',0
  69. ; Åñëè åñòü æåëàíèå ðàçúåäèíèòü, òî íóæíî èñïîëüçîâàòü ñëåäóþùèþ êîíñòðóêöèþ
  70. ;system_path__      db '/sys/lib/box_lib.obj',0
  71. ;... ëþáàÿ ïîñëåäîâàòåëüíîñòü äðóãèõ êîìàíä è îïðåäåëåíèé.
  72. ;library_name__     db 'box_lib.obj',0
  73. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  74.  
  75. ;err_message_found_lib__   db 'Sorry I cannot found library box_lib.obj',0
  76. ;head_f_i__:
  77. ;head_f_l__        db 'System error',0
  78. ;err_message_import__      db 'Error on load import library box_lib.obj',0
  79.  
  80. ;myimport:  
  81. ;
  82. ;edit_box_draw   dd      aEdit_box_draw
  83. ;edit_box_key    dd      aEdit_box_key
  84. ;edit_box_mouse  dd      aEdit_box_mouse
  85. ;version_ed      dd      aVersion_ed
  86. ;
  87. ;check_box_draw  dd      aCheck_box_draw
  88. ;check_box_mouse dd      aCheck_box_mouse
  89. ;version_ch      dd      aVersion_ch
  90. ;
  91. ;option_box_draw  dd      aOption_box_draw
  92. ;option_box_mouse dd      aOption_box_mouse
  93. ;version_op       dd      aVersion_op
  94.  
  95. ;                dd      0
  96. ;                dd      0
  97. ;
  98. ;aEdit_box_draw  db 'edit_box',0
  99. ;aEdit_box_key   db 'edit_box_key',0
  100. ;aEdit_box_mouse db 'edit_box_mouse',0
  101. ;aVersion_ed     db 'version_ed',0
  102.  
  103. ;aCheck_box_draw  db 'check_box_draw',0
  104. ;aCheck_box_mouse db 'check_box_mouse',0
  105. ;aVersion_ch      db 'version_ch',0
  106.  
  107. ;aOption_box_draw  db 'option_box_draw',0
  108. ;aOption_box_mouse db 'option_box_mouse',0
  109. ;aVersion_op       db 'version_op',0
  110.  
  111. ;---------------------------------------------------------------------
  112. macro @use_library
  113. {
  114.  
  115. local __sc
  116. local lp
  117. local lp1
  118. local correction
  119. local exit_
  120. ;/equ
  121. err_message1     equ    dword [esp+8]
  122. head1            equ    dword [esp+4]
  123.  
  124.  
  125. __sc.frame                equ  dword [__sc+0]
  126. __sc.grab                 equ  dword [__sc+4]
  127. __sc.grab_button          equ  dword [__sc+8]
  128. __sc.grab_button_text     equ  dword [__sc+12]
  129. __sc.grab_text            equ  dword [__sc+16]
  130. __sc.work                 equ  dword [__sc+20]
  131. __sc.work_button          equ  dword [__sc+24]
  132. __sc.work_button_text     equ  dword [__sc+28]
  133. __sc.work_text            equ  dword [__sc+32]
  134. __sc.work_graph           equ  dword [__sc+36]
  135.  
  136. ;;;;;;;;;;;CALC WIDTH & HIGHT WINDOW & CENTER MONITOR POSITION;;;;;;;;;;
  137. show_err_:
  138. ;check memory
  139.         push    dword [arrea_xx]
  140.         pop     eax
  141.         test    eax,eax
  142.         jnz     @f
  143.  
  144.         mcall   68,11
  145.         mcall   68,12,4096
  146.         push    eax
  147.         pop     dword [arrea_xx]
  148.  
  149.         push    head1
  150.         pop     dword[eax]
  151.  
  152.         push    0x0
  153.         pop     dword[eax+4]
  154.  
  155. @@:
  156.         mov     eax,48             ;get system color
  157.         mov     ebx,3
  158.         mov     ecx,__sc
  159.         mov     edx,sizeof.system_colors
  160.         mcall
  161. ;-----------------------------------
  162.         xor     eax,eax
  163.         mov     esi,err_message1
  164.         mov     ecx,30
  165. align 4
  166. lp:     add     ecx,7
  167.         lodsb
  168.         test    eax,eax
  169.         jnz     lp
  170.  
  171.         push    dword [arrea_xx]
  172.         pop     ebp
  173.  
  174. align 4
  175. @@:     add     ebp,4
  176.         mov     eax,dword [ebp]
  177.  
  178.         test    eax,eax
  179.         jnz     @b
  180.  
  181.         push    err_message1
  182.         pop     dword[ebp]
  183.  
  184.         mov     dword [ebp+4],eax
  185.  
  186.         mcall   48,5    ;get system window
  187.         cmp     word[on_x],cx
  188.         jae     @f; íå íóæíî îáíîâëÿòü
  189.  
  190.         sub     eax,ecx
  191.         shl     eax,15
  192.         mov     ax,cx
  193.         mov     dword [on_x],eax
  194.  
  195. @@:
  196.         add     word [on_y],12
  197.         sub     bx,word [on_y]
  198.         shl     ebx,15
  199.         mov     bx,word [on_y]
  200.         mov     dword [on_y],ebx
  201.  
  202.         ret
  203.  
  204.  
  205. ;;;;;;;;;;;DRAW WINDOW;;;;;;;;;;;;;;
  206. align 4
  207. start__:
  208.         mcall   40,0x5         ;set mask on events rewraw window and get id button.
  209. .red_win:
  210. ;draw_window:
  211.         mcall 12,1
  212.  
  213.         xor     eax,eax
  214.         mov     ebp,dword [arrea_xx]      ; set point
  215.         mov     ebx,dword [on_x]
  216.         mov     ecx,dword [on_y]
  217.         mov     edx,__sc.work
  218.         or      edx,0x33000000
  219.         mov     esi,__sc.grab_text
  220.         xor     edi,edi
  221.         mov     edi,dword [ebp]         ;head1
  222.         mcall
  223.  
  224.         mov     ebx,(10*65536+25-12)
  225.         add     ebp,4   ;inc index
  226.  
  227. @@:
  228.         mov     eax,4
  229.         add     bx,12
  230.         mov     ecx,__sc.grab_text
  231.         or      ecx,0x90000000
  232.         mov     edx,dword [ebp]       ;err_message1
  233.         mcall
  234.  
  235.         add     ebp,4   ;inc index
  236.  
  237.         mov     eax,dword [ebp]
  238.         test    eax,eax
  239.         jnz     @b
  240.  
  241.         mcall 12,2
  242. align 4
  243.  
  244. .still:                          ;main loop
  245.         mcall   10              ;wait event
  246.         dec  eax
  247.         jz   .red_win
  248.         sub  eax,2
  249.         jnz  .still   ;go to main loop
  250. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  251. .button:
  252.         mcall   17      ;get id button
  253.         test    ah,ah      ;if in ah 0, then go to still
  254.         jz      .still
  255.         mcall   -1
  256.         ret
  257.  
  258. align 4
  259. __sc     system_colors
  260. on_x     dd     0x0
  261. on_y     dd     0x0000004E
  262. arrea_xx dd     0x0
  263. rb      0x50
  264. end_tr:
  265.  
  266. ;---------------------------------------------------------------------
  267.  
  268. @library_name     equ    dword [esp+16]
  269. @cur_dir_path     equ    dword [esp+12]
  270. @library_path     equ    dword [esp+8]
  271. @point_dir_name   equ    dword [esp+4]
  272.  
  273. align 4
  274. @copy_path:
  275. ;        mov     ebx,@library_name
  276.         mov     esi,@cur_dir_path
  277.         mov     edi,@library_path
  278.  
  279.         xor     eax,eax
  280.         cld
  281. align 4
  282. .lp1:
  283.         lodsb
  284.         stosb
  285.         test    eax,eax
  286.         jnz     .lp1
  287.         mov     esi,edi
  288.  
  289.         std
  290. align 4
  291. .lp2:
  292.         lodsb
  293.         cmp     al,'/'
  294.         jnz     .lp2
  295.         mov     edi,esi
  296.  
  297.         add     edi,2
  298.         cld
  299. ;       mov     esi,@library_name
  300.  
  301.         mov     esi,@point_dir_name
  302.         test    esi,esi
  303.         jz      .str_lp4
  304.  
  305. align 4
  306. .lp3:
  307.         lodsb
  308.         stosb
  309.         test    eax,eax
  310.         jnz     .lp3
  311.  
  312.  
  313.         dec     edi
  314. .str_lp4:
  315.         mov     esi,@library_name
  316. align 4
  317. .lp4:
  318.         lodsb
  319.         stosb
  320.         test    eax,eax
  321.         jnz     .lp4
  322. ;---------------------------------------------------------------------
  323.         ret
  324. }
  325.  
  326.  
  327.  
  328. macro sys_load_library library_name__, cur_dir_path__, library_path__, system_path__, err_message_found_lib__, head_f_l__, myimport, err_message_import__, head_f_i__,point_dir_name__
  329. {
  330. local end_steep
  331. local exit
  332. ;---------------------------------------------------------------------  
  333. ; loading Box_Lib library
  334.  
  335.         mcall   68,19,system_path__   ; load of sys directory
  336.         test    eax,eax
  337.         jnz     end_steep
  338.  
  339. if point_dir_name__ eq
  340.   copy_path   library_name__, cur_dir_path__, library_path__,0x0
  341. else
  342.   copy_path   library_name__, cur_dir_path__, library_path__,point_dir_name__    ;the macros making way /current pach a program/+ name system library
  343. end if
  344.        
  345.         mcall   68,19,library_path__ ; load of alternative
  346.         test    eax,eax
  347.         jnz     end_steep
  348.         show_error_window  err_message_found_lib__, head_f_l__    ;show error message /create window
  349.         jmp     exit
  350.  
  351.  
  352. align 4
  353. end_steep:
  354.  
  355.         import_boxlib myimport, err_message_import__, head_f_i__  ;import
  356. exit:
  357.         test    eax,eax
  358.         jz      @f
  359.  
  360.         mcall   51,1,start__,end_tr            ; ñîçäàåì íîâûé ïîòîê ïî øàáëîíó
  361.         or      eax,-1
  362. @@:    
  363.  
  364. ;---------------------------------------------------------------------
  365. }
  366.  
  367.  
  368. macro load_library library_name__, cur_dir_path__, library_path__, system_path__, err_message_found_lib__, head_f_l__, myimport, err_message_import__, head_f_i__,point_dir_name__
  369. {
  370. local end_steep
  371. local exit
  372. ;---------------------------------------------------------------------  
  373. ; loading Box_Lib library
  374.  
  375. if point_dir_name__ eq
  376.   copy_path   library_name__, cur_dir_path__, library_path__,0x0
  377. else
  378.   copy_path   library_name__, cur_dir_path__, library_path__,point_dir_name__    ;the macros making way /current pach a program/+ name system library
  379. end if
  380.  
  381.         mcall   68,19,library_path__ ; load of alternative
  382.         test    eax,eax
  383.         jnz     end_steep
  384.        
  385.         mcall   68,19,system_path__ ; load of sys directory
  386.         test    eax,eax
  387.         jnz     end_steep
  388.  
  389.         show_error_window  err_message_found_lib__, head_f_l__    ;show error message /create window
  390.         jmp     exit
  391.  
  392. align 4
  393. end_steep:
  394.  
  395.         import_boxlib myimport, err_message_import__, head_f_i__  ;import
  396. exit:
  397.         test    eax,eax
  398.         jz      @f
  399.  
  400.         mcall   51,1,start__,end_tr            ; ñîçäàåì íîâûé ïîòîê ïî øàáëîíó
  401.         or      eax,-1
  402. @@:    
  403.        
  404. ;---------------------------------------------------------------------
  405. }
  406. macro sys_load_libraries _start,_end
  407. {
  408. local exit_lp2
  409. local lp2
  410. local lp
  411. local end_steep
  412. local next
  413. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  414. library_name__            equ [ebp]
  415. cur_dir_path__            equ [ebp+4]
  416. library_path__            equ [ebp+8]
  417. system_path__             equ [ebp+12]
  418. err_message_found_lib__   equ [ebp+16]  
  419. head_f_l__                equ [ebp+20]
  420. my_import                 equ [ebp+24]
  421. err_message_import__      equ [ebp+28]
  422. head_f_i__                equ [ebp+32]
  423. point_dir_name__          equ [ebp+36]
  424. adr_load_lib              equ dword [ebp+40]
  425. status_lib                equ dword [ebp+44]
  426.  
  427.         mov     ebp,_start
  428.         mov     ecx,((_end-_start)/ll_struc_size)
  429.  
  430. align 4
  431. lp:     push    ecx
  432.         mcall   68,19,system_path__   ; load of sys directory
  433.         test    eax,eax
  434.         jnz     end_steep
  435.  
  436.         copy_path  library_name__, cur_dir_path__, library_path__,point_dir_name__     ;the macros making way /current pach a program/+ name system library
  437.        
  438.         mcall   68,19,library_path__ ; load of alternative
  439.         test    eax,eax
  440.         jnz     end_steep
  441.  
  442.         or      status_lib,0x1          ; status of code - enable error - not found library
  443.  
  444.         show_error_window  err_message_found_lib__, head_f_l__,    ;show error message /create window
  445.         jmp      next
  446.  
  447. align 4
  448. end_steep:
  449.         mov     adr_load_lib,eax        ;save adr lib in memory
  450.         import_boxlib my_import, err_message_import__, head_f_i__  ;import
  451.  
  452.         test    eax,eax
  453.         jz      next
  454.  
  455.         or      status_lib,0x2          ; status of code - enable error - import error
  456.  
  457. next:
  458.         pop     ecx
  459.         add     ebp,ll_struc_size
  460.         dec     ecx
  461.         jnz     lp
  462.  
  463. ;----------------------------------
  464.         mov     ebp,_start
  465.         mov     ecx,((_end-_start)/ll_struc_size)
  466.  
  467. align 4
  468. lp2:
  469.         mov     eax,status_lib
  470.         test    eax,eax
  471.         jz      @f
  472.  
  473.         mcall   51,1,start__,end_tr            ; ñîçäàåì íîâûé ïîòîê ïî øàáëîíó
  474.         or      eax,-1
  475.         jmp     exit_lp2
  476.  
  477. @@:
  478.         add     ebp,ll_struc_size
  479.         dec     ecx
  480.         jnz     lp2
  481. exit_lp2:
  482. }
  483.  
  484. macro load_libraries _start,_end
  485. {
  486. local lp2
  487. local exit_lp2
  488. local lp
  489. local end_steep
  490. local next
  491. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  492. library_name__            equ [ebp]
  493. cur_dir_path__            equ [ebp+4]
  494. library_path__            equ [ebp+8]
  495. system_path__             equ [ebp+12]
  496. err_message_found_lib__   equ [ebp+16]  
  497. head_f_l__                equ [ebp+20]
  498. my_import                 equ [ebp+24]
  499. err_message_import__      equ [ebp+28]
  500. head_f_i__                equ [ebp+32]
  501. point_dir_name__          equ [ebp+36]
  502. adr_load_lib              equ dword [ebp+40]
  503. status_lib                equ dword [ebp+44]
  504.  
  505.         mov     ebp,_start
  506.         mov     ecx,((_end-_start)/ll_struc_size)
  507.  
  508. align 4
  509. lp:     push    ecx
  510.  
  511.         copy_path    library_name__, cur_dir_path__, library_path__,point_dir_name__   ;the macros making way /current pach a program/+ name system library
  512.  
  513.         mcall   68,19,library_path__  ; load of alternative
  514.         test    eax,eax
  515.         jnz     end_steep
  516.        
  517.         mcall   68,19,system_path__   ; load of sys directory
  518.         test    eax,eax
  519.         jnz     end_steep
  520.  
  521.         or      status_lib,0x1          ; status of code - enable error - not found library
  522.  
  523.         show_error_window  err_message_found_lib__, head_f_l__    ;show error message /create window
  524.         jmp      next
  525.  
  526. align 4
  527. end_steep:
  528.         mov     adr_load_lib,eax        ;save adr lib in memory
  529.  
  530.         import_boxlib my_import, err_message_import__, head_f_i__  ;import
  531.  
  532.         test    eax,eax
  533.         jz      next
  534.  
  535.         or      status_lib,0x2          ; status of code - enable error - import error
  536.  
  537. next:
  538.         pop     ecx
  539.         add     ebp,ll_struc_size
  540.         dec     ecx
  541.         jnz     lp
  542.  
  543. ;-----------------------------------------------
  544.         mov     ebp,_start
  545.         mov     ecx,((_end-_start)/ll_struc_size)
  546.  
  547. align 4
  548. lp2:
  549.         mov     eax,status_lib
  550.         test    eax,eax
  551.         jz      @f
  552.  
  553.         mcall   51,1,start__,end_tr            ; ñîçäàåì íîâûé ïîòîê ïî øàáëîíó
  554.         or      eax,-1
  555.         jmp     exit_lp2
  556.  
  557. @@:
  558.         add     ebp,ll_struc_size
  559.         dec     ecx
  560.         jnz     lp2
  561. exit_lp2:
  562.  
  563. }
  564.  
  565.  
  566. macro copy_path lib_name,dir_path,lib_path,point_dir_name
  567. {
  568.         pushad  ;save all registers
  569.         push    dword lib_name
  570.         push    dword dir_path
  571.         push    dword lib_path
  572.         push    dword point_dir_name
  573.         call    @copy_path
  574.  
  575.         add     esp,16
  576.         popad   ;restore all registers
  577. }
  578.  
  579. macro show_error_window  err_message, head
  580. {       pushad  ;save all registers
  581.         push    dword err_message
  582.         push    dword head
  583.  
  584.         call    show_err_
  585.  
  586.         add     esp,8
  587.         popad   ;restore all registers
  588.         or      eax,-1  ;óâû
  589. }
  590.  
  591.  
  592. macro import_boxlib myimport, err_message_import__, head_f_i__
  593. {
  594. local import_loop
  595. local import_find
  596. local lp
  597. local import_find_next
  598. local import_found
  599. local import_done
  600. local exit
  601. local e.exit
  602. local import_not_found
  603. ; initialize import
  604.        
  605.         mov     edx, eax
  606.         mov     esi,myimport
  607. import_loop:
  608.         lodsd
  609.         test    eax, eax
  610.         jz      import_done
  611.         push    edx
  612. import_find:
  613.         mov     ebx, [ds:edx]
  614.         test    ebx, ebx
  615.         jz      import_not_found
  616.         push    eax
  617. lp:
  618.         mov     cl, [ds:eax]
  619.         cmp     cl, [ds:ebx]
  620.         jnz     import_find_next
  621.         test    cl, cl
  622.         jz      import_found
  623.         inc     eax
  624.         inc     ebx
  625.         jmp     lp
  626. import_find_next:
  627.         pop     eax
  628.         add     edx, 8
  629.         jmp     import_find
  630. import_found:
  631.         pop     eax
  632.         mov     eax, [ds:edx+4]
  633.         mov     [esi-4], eax
  634.         pop     edx
  635.         jmp     import_loop
  636. import_not_found:
  637.         add     esp,4
  638.         show_error_window  err_message_import__, head_f_i__    ;show error message /create window
  639.         jmp     e.exit
  640. import_done:
  641.         xor     eax,eax
  642. e.exit:
  643. ;---------------------------------------------------------------------
  644. }
  645. ll_struc_size = 48;($-library_name__)    ; constant   size of struct
  646. struc l_libs library_name__, cur_dir_path__, library_path__, system_path__, err_message_found_lib__, head_f_l__, my_import, err_message_import__, head_f_i__,point_dir_name; struct for loading libraries
  647. {        
  648. .library_name__           dd library_name__        ; èìÿ çàãðóæàåìîé áèáëèîòåêè
  649. .cur_dir_path__           dd cur_dir_path__        ; óêàçàòåëü íà áóôåð â êîòîðîì ñîäåðæèòüñÿ ïóòü îò êóäà áûëà çàïóùåíà ïðîãðàììà
  650.                        
  651. .library_path__           dd library_path__        ; óêàçàòåëü íà áóôåð â êîòîðîì áóäåò ñîôîðèìèðîâàí ïóòü ê áèáëèîòåêè, åñëè íóæíî âû÷èñëèòü ïóòü äî ëèáû ñ ìåñòà çàïóñêà ïðîãðàììû, îáû÷íî íóæíî, â ñëó÷àÿõ, åñëè ëèáà ðàñïîëîæåíà â òîé æå ïàïêå
  652. .complete_path            dd system_path__         ; ïóòü êîòîðûé ÷åòêî ñîäåðæèò ïóòü
  653.  
  654. .err_message_found_lib__  dd err_message_found_lib__
  655. .head_f_l__               dd head_f_l__
  656. .my_import                dd my_import
  657. .err_message_import__     dd err_message_import__
  658. .head_f_i__               dd head_f_i__
  659. if point_dir_name eq
  660. .point_dir_name__       dd 0x0
  661. else
  662. .point_dir_name__       dd point_dir_name          ; èìÿ âëîæåííîé äèððåêòîðèè â êòîðîé õðàíÿòüñÿ ïîäãðóæàåìûå ìîäóëè.
  663. end if
  664. .adr_load_lib           dd 0x0
  665. .status_lib             dd 0x0          ;status of load library
  666. ;
  667. }
  668.