Subversion Repositories Kolibri OS

Rev

Rev 3374 | Rev 5881 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3374 IgorA 1
;13.03.2013 - use @notify
2
;08.06.2010 - new macros @use_library_mem
3
;08.05.2009 - bugfix
1108 Lrz 4
;14.04.2009 - a macros for code load library the box_lib.obj from '/sys/lib/' or current dirrectory.
5
; The macros for load any library/libraries:
6
; Copyright (c) 2009, 
7
; All rights reserved.
8
;
9
; Redistribution and use in source and binary forms, with or without
10
; modification, are permitted provided that the following conditions are met:
11
;       * Redistributions of source code must retain the above copyright
12
;       notice, this list of conditions and the following disclaimer.
13
;       * Redistributions in binary form must reproduce the above copyright
14
;       notice, this list of conditions and the following disclaimer in the
15
;       documentation and/or other materials provided with the distribution.
16
;       * Neither the name of the  nor the
17
;       names of its contributors may be used to endorse or promote products
18
;       derived from this software without specific prior written permission.
19
;
20
; THIS SOFTWARE IS PROVIDED BY Alexey Teplov aka  ''AS IS'' AND ANY
21
; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22
; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
; DISCLAIMED. IN NO EVENT SHALL  BE LIABLE FOR ANY
24
; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25
; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26
; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27
; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
;*****************************************************************************
31
; This macros based on source code:
3374 IgorA 32
;  - Alexey Teplov / Алексей Теплов
33
; Mario79, Mario - Marat Zakiyanov / Марат Закиянов
34
; Diamondz - Evgeny Grechnikov / Евгений Гречников
1108 Lrz 35
;------------------------
36
; DESCRIPTION
37
; Macro load_library
38
; Logick of work.
39
; A first time we must to check system path, where I belive find a system library. System path is "/sys/lib/".
40
; If I cannot found my library, i must to check second way. Second way is current dirrectory.
41
; If we cannot load library, we must show the error message:
42
; "I'm sorry,the programm cannot found system library box_lib.obj."
43
; "The find was make on 2 ways: /sys/lib/ and current dirrectory."
44
;
45
;
46
;---------------------------------------------------------------------
47
; Macro sys_load_library
48
; A first time we must to check own path in current dirrectory the program, where I belive find a system library.
49
; If I cannot found my library, i must to check second way. Second way is system path a "/sys/lib/".
50
; If we cannot load library, we must show the error message:
51
; "I'm sorry,the programm cannot found system library box_lib.obj."
52
; "The find was make on 2 ways: /sys/lib/ and current dirrectory."
53
;
54
;---------------------------------------------------------------------
55
; How can I use it?
56
;---------------------------------------------------------------------
57
;-Example using single load library
58
;-universal load library/librarys
1127 Lrz 59
;load_library  library_name__, cur_dir_path__, library_path__, system_path__, \
60
;err_message_found_lib__, head_f_l__, myimport, err_message_import__, head_f_i__
1108 Lrz 61
;-if return code =-1 then exit, else normally work
62
;        cmp     eax,-1
63
;        jz      exit
64
;- Well, if you get
65
;
66
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
3374 IgorA 67
;DATA данные
68
;Всегда соблюдать последовательность в имени.
1127 Lrz 69
;system_path__      db '/sys/lib/'
70
;library_name__     db 'box_lib.obj',0
3374 IgorA 71
; Если есть желание разъединить, то нужно использовать следующию конструкцию
1127 Lrz 72
;system_path__      db '/sys/lib/box_lib.obj',0
3374 IgorA 73
;... любая последовательность других команд и определений.
1127 Lrz 74
;library_name__     db 'box_lib.obj',0
1108 Lrz 75
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
76
 
1127 Lrz 77
;err_message_found_lib__   db 'Sorry I cannot found library box_lib.obj',0
78
;head_f_i__:
79
;head_f_l__        db 'System error',0
80
;err_message_import__      db 'Error on load import library box_lib.obj',0
1108 Lrz 81
 
82
;myimport:
83
;
84
;edit_box_draw   dd      aEdit_box_draw
85
;edit_box_key    dd      aEdit_box_key
86
;edit_box_mouse  dd      aEdit_box_mouse
87
;version_ed      dd      aVersion_ed
88
;
89
;check_box_draw  dd      aCheck_box_draw
90
;check_box_mouse dd      aCheck_box_mouse
91
;version_ch      dd      aVersion_ch
92
;
93
;option_box_draw  dd      aOption_box_draw
94
;option_box_mouse dd      aOption_box_mouse
95
;version_op       dd      aVersion_op
96
 
97
;                dd      0
98
;                dd      0
99
;
100
;aEdit_box_draw  db 'edit_box',0
101
;aEdit_box_key   db 'edit_box_key',0
102
;aEdit_box_mouse db 'edit_box_mouse',0
103
;aVersion_ed     db 'version_ed',0
104
 
105
;aCheck_box_draw  db 'check_box_draw',0
106
;aCheck_box_mouse db 'check_box_mouse',0
107
;aVersion_ch      db 'version_ch',0
108
 
109
;aOption_box_draw  db 'option_box_draw',0
110
;aOption_box_mouse db 'option_box_mouse',0
111
;aVersion_op       db 'version_op',0
112
 
113
;---------------------------------------------------------------------
114
macro @use_library
115
{
1127 Lrz 116
local lp1
4987 IgorA 117
local lp2
118
local lp3
119
local lp4
3374 IgorA 120
local file_name
1488 IgorA 121
 
3374 IgorA 122
library_fun_memory_alloc equ 0 ;не использовать в макросах проверку на функции 'lib_init'
1108 Lrz 123
 
124
align 4
3374 IgorA 125
arrea_xx dd 0
126
file_name db '/rd/1/@notify',0
1127 Lrz 127
 
128
align 4
3374 IgorA 129
run_notify_struct:
130
	.Function dd 7
131
	.Position dd 0
132
	.Flags dd ?
133
	.Count dd 0
134
	.Buffer dd 0
135
		db 0
136
	.FileName dd file_name
1108 Lrz 137
;---------------------------------------------------------------------
138
 
1204 Lrz 139
@library_name     equ    dword [esp+16]
140
@cur_dir_path     equ    dword [esp+12]
141
@library_path     equ    dword [esp+8]
142
@point_dir_name   equ    dword [esp+4]
143
 
1108 Lrz 144
align 4
145
@copy_path:
1204 Lrz 146
;        mov     ebx,@library_name
1108 Lrz 147
        mov     esi,@cur_dir_path
148
        mov     edi,@library_path
149
 
150
        xor     eax,eax
151
        cld
1204 Lrz 152
align 4
1108 Lrz 153
.lp1:
154
        lodsb
155
        stosb
156
        test    eax,eax
157
        jnz     .lp1
158
        mov     esi,edi
159
 
160
        std
1204 Lrz 161
align 4
1108 Lrz 162
.lp2:
163
        lodsb
164
        cmp     al,'/'
165
        jnz     .lp2
166
        mov     edi,esi
1204 Lrz 167
 
1108 Lrz 168
        add     edi,2
1204 Lrz 169
        cld
170
;	mov     esi,@library_name
1108 Lrz 171
 
1204 Lrz 172
	mov	esi,@point_dir_name
173
	test	esi,esi
174
	jz      .str_lp4
1108 Lrz 175
 
1204 Lrz 176
align 4
1108 Lrz 177
.lp3:
178
        lodsb
179
        stosb
180
        test    eax,eax
181
        jnz     .lp3
1204 Lrz 182
 
183
 
184
	dec 	edi
185
.str_lp4:
186
	mov     esi,@library_name
187
align 4
188
.lp4:
189
        lodsb
190
        stosb
191
        test    eax,eax
192
        jnz     .lp4
1108 Lrz 193
;---------------------------------------------------------------------
1127 Lrz 194
        ret
1108 Lrz 195
}
196
 
197
 
198
 
1488 IgorA 199
macro @use_library_mem mem_alloc,mem_free,mem_realloc,dll_load
200
{
201
@use_library
202
library_fun_memory_alloc equ mem_alloc
203
library_fun_memory_free equ mem_free
204
library_fun_memory_realloc equ mem_realloc
205
library_fun_dll_load equ dll_load
206
}
207
 
208
 
1204 Lrz 209
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__
1108 Lrz 210
{
211
local end_steep
212
local exit
213
;---------------------------------------------------------------------
214
; loading Box_Lib library
215
 
1127 Lrz 216
        mcall   68,19,system_path__   ; load of sys directory
1108 Lrz 217
        test    eax,eax
218
        jnz     end_steep
219
 
1204 Lrz 220
if point_dir_name__ eq
221
  copy_path   library_name__, cur_dir_path__, library_path__,0x0
222
else
223
  copy_path   library_name__, cur_dir_path__, library_path__,point_dir_name__    ;the macros making way /current pach a program/+ name system library
224
end if
1108 Lrz 225
 
1127 Lrz 226
        mcall   68,19,library_path__ ; load of alternative
1108 Lrz 227
        test    eax,eax
228
        jnz     end_steep
1127 Lrz 229
        show_error_window  err_message_found_lib__, head_f_l__    ;show error message /create window
1108 Lrz 230
        jmp     exit
231
 
232
 
233
align 4
234
end_steep:
235
 
1127 Lrz 236
        import_boxlib myimport, err_message_import__, head_f_i__  ;import
1108 Lrz 237
exit:
1127 Lrz 238
        test    eax,eax
239
        jz      @f
240
 
3374 IgorA 241
        notify_window_run [arrea_xx] ; создаем окно @notify
1127 Lrz 242
        or      eax,-1
243
@@:
244
 
1108 Lrz 245
;---------------------------------------------------------------------
246
}
247
 
248
 
1204 Lrz 249
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__
1108 Lrz 250
{
251
local end_steep
252
local exit
253
;---------------------------------------------------------------------
254
; loading Box_Lib library
255
 
1204 Lrz 256
if point_dir_name__ eq
257
  copy_path   library_name__, cur_dir_path__, library_path__,0x0
258
else
259
  copy_path   library_name__, cur_dir_path__, library_path__,point_dir_name__    ;the macros making way /current pach a program/+ name system library
260
end if
1108 Lrz 261
 
1127 Lrz 262
        mcall   68,19,library_path__ ; load of alternative
1108 Lrz 263
        test    eax,eax
264
        jnz     end_steep
265
 
1127 Lrz 266
        mcall   68,19,system_path__ ; load of sys directory
1108 Lrz 267
        test    eax,eax
268
        jnz     end_steep
269
 
1127 Lrz 270
        show_error_window  err_message_found_lib__, head_f_l__    ;show error message /create window
1108 Lrz 271
        jmp     exit
272
 
273
align 4
274
end_steep:
275
 
1127 Lrz 276
        import_boxlib myimport, err_message_import__, head_f_i__  ;import
1108 Lrz 277
exit:
1127 Lrz 278
        test    eax,eax
279
        jz      @f
280
 
3374 IgorA 281
        notify_window_run [arrea_xx] ; создаем окно @notify
1127 Lrz 282
        or      eax,-1
283
@@:
284
 
1108 Lrz 285
;---------------------------------------------------------------------
286
}
287
macro sys_load_libraries _start,_end
288
{
1127 Lrz 289
local exit_lp2
290
local lp2
1108 Lrz 291
local lp
292
local end_steep
293
local next
294
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1127 Lrz 295
library_name__            equ [ebp]
296
cur_dir_path__            equ [ebp+4]
297
library_path__            equ [ebp+8]
298
system_path__             equ [ebp+12]
299
err_message_found_lib__   equ [ebp+16]
300
head_f_l__                equ [ebp+20]
1204 Lrz 301
my_import                 equ [ebp+24]
1127 Lrz 302
err_message_import__      equ [ebp+28]
303
head_f_i__                equ [ebp+32]
1204 Lrz 304
point_dir_name__          equ [ebp+36]
305
adr_load_lib              equ dword [ebp+40]
306
status_lib                equ dword [ebp+44]
1108 Lrz 307
 
308
        mov     ebp,_start
309
        mov     ecx,((_end-_start)/ll_struc_size)
310
 
311
align 4
312
lp:     push    ecx
1127 Lrz 313
        mcall   68,19,system_path__   ; load of sys directory
1108 Lrz 314
        test    eax,eax
315
        jnz     end_steep
316
 
1204 Lrz 317
        copy_path  library_name__, cur_dir_path__, library_path__,point_dir_name__     ;the macros making way /current pach a program/+ name system library
1108 Lrz 318
 
1127 Lrz 319
        mcall   68,19,library_path__ ; load of alternative
1108 Lrz 320
        test    eax,eax
321
        jnz     end_steep
322
 
323
        or      status_lib,0x1          ; status of code - enable error - not found library
324
 
1204 Lrz 325
        show_error_window  err_message_found_lib__, head_f_l__,    ;show error message /create window
1108 Lrz 326
        jmp      next
327
 
328
align 4
329
end_steep:
330
        mov     adr_load_lib,eax        ;save adr lib in memory
1127 Lrz 331
        import_boxlib my_import, err_message_import__, head_f_i__  ;import
1108 Lrz 332
 
333
        test    eax,eax
334
        jz      next
335
 
336
        or      status_lib,0x2          ; status of code - enable error - import error
337
 
338
next:
339
        pop     ecx
340
        add     ebp,ll_struc_size
341
        dec     ecx
342
        jnz     lp
1127 Lrz 343
 
344
;----------------------------------
345
        mov     ebp,_start
346
        mov     ecx,((_end-_start)/ll_struc_size)
347
 
348
align 4
349
lp2:
350
        mov     eax,status_lib
351
        test    eax,eax
352
        jz      @f
353
 
3374 IgorA 354
        notify_window_run [arrea_xx] ; создаем окно @notify
1127 Lrz 355
        or      eax,-1
356
        jmp     exit_lp2
357
 
358
@@:
359
        add     ebp,ll_struc_size
360
        dec     ecx
361
        jnz     lp2
362
exit_lp2:
1108 Lrz 363
}
364
 
365
macro load_libraries _start,_end
366
{
1127 Lrz 367
local lp2
368
local exit_lp2
1108 Lrz 369
local lp
370
local end_steep
371
local next
372
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1127 Lrz 373
library_name__            equ [ebp]
374
cur_dir_path__            equ [ebp+4]
375
library_path__            equ [ebp+8]
376
system_path__             equ [ebp+12]
377
err_message_found_lib__   equ [ebp+16]
378
head_f_l__                equ [ebp+20]
1204 Lrz 379
my_import                 equ [ebp+24]
1127 Lrz 380
err_message_import__      equ [ebp+28]
381
head_f_i__                equ [ebp+32]
1204 Lrz 382
point_dir_name__          equ [ebp+36]
383
adr_load_lib              equ dword [ebp+40]
384
status_lib                equ dword [ebp+44]
1108 Lrz 385
 
386
        mov     ebp,_start
387
        mov     ecx,((_end-_start)/ll_struc_size)
388
 
389
align 4
390
lp:     push    ecx
391
 
1204 Lrz 392
        copy_path    library_name__, cur_dir_path__, library_path__,point_dir_name__   ;the macros making way /current pach a program/+ name system library
1108 Lrz 393
 
1127 Lrz 394
        mcall   68,19,library_path__  ; load of alternative
1108 Lrz 395
        test    eax,eax
396
        jnz     end_steep
397
 
1127 Lrz 398
        mcall   68,19,system_path__   ; load of sys directory
1108 Lrz 399
        test    eax,eax
400
        jnz     end_steep
401
 
402
        or      status_lib,0x1          ; status of code - enable error - not found library
403
 
1127 Lrz 404
        show_error_window  err_message_found_lib__, head_f_l__    ;show error message /create window
1108 Lrz 405
        jmp      next
406
 
407
align 4
408
end_steep:
409
        mov     adr_load_lib,eax        ;save adr lib in memory
410
 
1127 Lrz 411
        import_boxlib my_import, err_message_import__, head_f_i__  ;import
1108 Lrz 412
 
413
        test    eax,eax
414
        jz      next
415
 
416
        or      status_lib,0x2          ; status of code - enable error - import error
417
 
418
next:
419
        pop     ecx
420
        add     ebp,ll_struc_size
421
        dec     ecx
422
        jnz     lp
1127 Lrz 423
 
424
;-----------------------------------------------
425
        mov     ebp,_start
426
        mov     ecx,((_end-_start)/ll_struc_size)
427
 
428
align 4
429
lp2:
430
        mov     eax,status_lib
431
        test    eax,eax
432
        jz      @f
433
 
3374 IgorA 434
        notify_window_run [arrea_xx] ; создаем окно @notify
1127 Lrz 435
        or      eax,-1
436
        jmp     exit_lp2
437
 
438
@@:
439
        add     ebp,ll_struc_size
440
        dec     ecx
441
        jnz     lp2
442
exit_lp2:
443
 
1108 Lrz 444
}
445
 
446
 
1204 Lrz 447
macro copy_path lib_name,dir_path,lib_path,point_dir_name
1108 Lrz 448
{
449
        pushad  ;save all registers
450
        push    dword lib_name
451
        push    dword dir_path
452
        push    dword lib_path
1204 Lrz 453
        push	dword point_dir_name
1108 Lrz 454
        call    @copy_path
455
 
1204 Lrz 456
        add     esp,16
1108 Lrz 457
        popad   ;restore all registers
458
}
459
 
3374 IgorA 460
; готовим текст для показа через @notify:
461
; 1) выделяем память в [arrea_xx]
462
; 2) копируем err_message и head в [arrea_xx]
1108 Lrz 463
macro show_error_window  err_message, head
3374 IgorA 464
{
465
local lp0
466
local lp1
1108 Lrz 467
 
3374 IgorA 468
pushad
469
	mcall 68,11
470
	mcall 68,12,4096
471
	push eax
472
	pop dword [arrea_xx]
1108 Lrz 473
 
3374 IgorA 474
	mov edi,eax
475
	mov esi,dword head
476
	cld
477
align 4
478
lp0:
479
	movsb
480
	cmp byte[esi],0
481
	jne lp0
482
	mov word[edi],'. '
483
	add edi,2
484
	mov esi,dword err_message
485
align 4
486
lp1:
487
	movsb
488
	cmp byte[esi],0
489
	jne lp1
490
	mov byte[edi],0
491
popad
492
	or eax,-1  ;увы
1108 Lrz 493
}
494
 
3374 IgorA 495
; включаем показ сообщения через @notify:
496
macro notify_window_run message
497
{
498
push eax ebx
499
	mov eax,message ;параметры для командной строки
500
	mov [run_notify_struct.Flags], eax
501
	mov eax,70 ;run @notify
502
	mov ebx,run_notify_struct
503
	int 0x40
504
pop ebx eax
505
}
1108 Lrz 506
 
3374 IgorA 507
 
508
;входные параметры:
509
;eax - адрес библиотеки в памяти
510
;myimport - импортируемые функции
1127 Lrz 511
macro import_boxlib myimport, err_message_import__, head_f_i__
1108 Lrz 512
{
513
local import_loop
514
local import_find
515
local lp
516
local import_find_next
517
local import_found
518
local import_done
519
local exit
520
local e.exit
521
local import_not_found
522
; initialize import
523
 
524
        mov     edx, eax
525
        mov     esi,myimport
526
import_loop:
3374 IgorA 527
        lodsd	;mov eax,dword[esi] ;add esi,4 ;получаем в eax указатель на имя импортируемой функции
1108 Lrz 528
        test    eax, eax
3374 IgorA 529
        jz      import_done ;если указатель на имя функции = 0 (в пользовательской программе)
530
        push    edx ;сохраняем начало библиотечных указателей на функции
1108 Lrz 531
import_find:
532
        mov     ebx, [ds:edx]
533
        test    ebx, ebx
3374 IgorA 534
        jz      import_not_found ;если указатель на имя функции = 0 (в библиотеке)
535
        push    eax ;eax - указатель на имя экспортируемой функции (в пользовательской программе)
1108 Lrz 536
lp:
537
        mov     cl, [ds:eax]
3374 IgorA 538
        cmp     cl, [ds:ebx] ;сравниваем имена функций в библиотеке и в пользовательской программе
539
        jnz     import_find_next ;если названия не совпали
1108 Lrz 540
        test    cl, cl
3374 IgorA 541
        jz      import_found ;если названия совпали, и уже конец строки (cl=0)
1108 Lrz 542
        inc     eax
543
        inc     ebx
544
        jmp     lp
545
import_find_next:
546
        pop     eax
3374 IgorA 547
        add     edx, 8 ;8 = 4 байта указатель на название и 4 байта указатель на функцию
1108 Lrz 548
        jmp     import_find
549
import_found:
3374 IgorA 550
        pop     ebx ;востанавливаем указатель на имя функции (который был в eax) и освобождаем стек
551
        mov     eax, [ds:edx+4] ;eax = указатель на функцию (в библиотеке)
552
        mov     [esi-4], eax ;копируем указатель (на функцию) в программу, -4 ставим потому что esi было сдвинуто командой lodsd
553
        pop     edx ;устанавливаем edx на начало библиотечных функций
554
;--- проверяем совпадает ли имя экспортированной функции с 'lib_init'
1488 IgorA 555
if library_fun_memory_alloc eq 0
556
else
557
		cmp dword[ebx],'lib_'
558
		jne		import_loop
559
		cmp dword[ebx+4],'init'
560
		jne		import_loop
3374 IgorA 561
;--- если имя функции совпало с 'lib_init' попадаем сюда
562
		;подключение функций для работы с памятью
1488 IgorA 563
		;push eax
564
		;call dll.Init
565
		pushad
566
		mov esi,eax
567
		mov	eax,library_fun_memory_alloc
568
		mov	ebx,library_fun_memory_free
569
		mov	ecx,library_fun_memory_realloc
570
		mov	edx,library_fun_dll_load
571
		call dword esi
572
		popad
573
end if
1108 Lrz 574
        jmp     import_loop
575
import_not_found:
576
        add     esp,4
1127 Lrz 577
        show_error_window  err_message_import__, head_f_i__    ;show error message /create window
1108 Lrz 578
        jmp     e.exit
579
import_done:
3374 IgorA 580
        xor     eax,eax ;=0 все загрузилось удачно
1108 Lrz 581
e.exit:
582
;---------------------------------------------------------------------
583
}
1204 Lrz 584
ll_struc_size = 48;($-library_name__)    ; constant   size of struct
585
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
1108 Lrz 586
{
3374 IgorA 587
.library_name__           dd library_name__        ; имя загружаемой библиотеки
588
.cur_dir_path__           dd cur_dir_path__        ; указатель на буфер в котором содержиться путь от куда была запущена программа
1127 Lrz 589
 
3374 IgorA 590
.library_path__           dd library_path__        ; указатель на буфер в котором будет софоримирован путь к библиотеки, если нужно вычислить путь до либы с места запуска программы, обычно нужно, в случаях, если либа расположена в той же папке
591
.complete_path            dd system_path__         ; путь который четко содержит путь
1127 Lrz 592
 
593
.err_message_found_lib__  dd err_message_found_lib__
594
.head_f_l__               dd head_f_l__
1204 Lrz 595
.my_import                dd my_import
1127 Lrz 596
.err_message_import__     dd err_message_import__
597
.head_f_i__               dd head_f_i__
1204 Lrz 598
if point_dir_name eq
599
.point_dir_name__	dd 0x0
600
else
3374 IgorA 601
.point_dir_name__	dd point_dir_name	   ; имя вложенной дирректории в кторой храняться подгружаемые модули.
1204 Lrz 602
end if
1127 Lrz 603
.adr_load_lib           dd 0x0
604
.status_lib             dd 0x0          ;status of load library
1108 Lrz 605
;
606
}