Subversion Repositories Kolibri OS

Rev

Rev 5881 | Rev 7577 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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