Subversion Repositories Kolibri OS

Rev

Rev 1064 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1064 Rev 1068
Line -... Line 1...
-
 
1
;08.05.2009 - bugfix 
1
;14.04.2009 - a macros for code load library the box_lib.obj from '/sys/lib/' or current dirrectory.
2
;14.04.2009 - a macros for code load library the box_lib.obj from '/sys/lib/' or current dirrectory.
2
; The macros for load any library/libraries:
3
; The macros for load any library/libraries:
3
; Copyright (c) 2009, 
4
; Copyright (c) 2009, 
4
; All rights reserved.
5
; All rights reserved.
5
;
6
;
Line 37... Line 38...
37
; If I cannot found my library, i must to check second way. Second way is current dirrectory.
38
; If I cannot found my library, i must to check second way. Second way is current dirrectory.
38
; If we cannot load library, we must show the error message:
39
; If we cannot load library, we must show the error message:
39
; "I'm sorry,the programm cannot found system library box_lib.obj."
40
; "I'm sorry,the programm cannot found system library box_lib.obj."
40
; "The find was make on 2 ways: /sys/lib/ and current dirrectory."
41
; "The find was make on 2 ways: /sys/lib/ and current dirrectory."
41
; 
42
;
42
; ebx,library_name
-
 
43
; esi,cur_dir_path
-
 
44
; edi,library_path
43
; 
45
;---------------------------------------------------------------------
44
;---------------------------------------------------------------------
46
; Macro test_load_library
45
; Macro sys_load_library
47
; A first time we must to check own path in current dirrectory the program, where I belive find a system library.
46
; A first time we must to check own path in current dirrectory the program, where I belive find a system library.
48
; If I cannot found my library, i must to check second way. Second way is system path a "/sys/lib/".
47
; If I cannot found my library, i must to check second way. Second way is system path a "/sys/lib/".
49
; If we cannot load library, we must show the error message:
48
; If we cannot load library, we must show the error message:
50
; "I'm sorry,the programm cannot found system library box_lib.obj."
49
; "I'm sorry,the programm cannot found system library box_lib.obj."
51
; "The find was make on 2 ways: /sys/lib/ and current dirrectory."
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
Line -... Line 79...
-
 
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
show_err_:
-
 
115
local red_win
-
 
116
local still
-
 
117
local button
-
 
118
local __sc
-
 
119
local start
-
 
120
local ex_lp
-
 
121
local lp
-
 
122
local correction
-
 
123
;/equ
-
 
124
err_message1     equ    dword [esp+8]
-
 
125
head1            equ    dword [esp+4]
-
 
126
 
-
 
127
 
-
 
128
__sc.frame                equ  dword [__sc+0]
-
 
129
__sc.grab                 equ  dword [__sc+4]
-
 
130
__sc.grab_button          equ  dword [__sc+8]
-
 
131
__sc.grab_button_text     equ  dword [__sc+12] 
-
 
132
__sc.grab_text            equ  dword [__sc+16]
-
 
133
__sc.work                 equ  dword [__sc+20]
-
 
134
__sc.work_button          equ  dword [__sc+24]
-
 
135
__sc.work_button_text     equ  dword [__sc+28]
-
 
136
__sc.work_text            equ  dword [__sc+32]
-
 
137
__sc.work_graph           equ  dword [__sc+36]
-
 
138
 
-
 
139
;local on_x
-
 
140
;local on_y
-
 
141
 
-
 
142
;;;;;;;;;;;CALC WIDTH & HIGHT WINDOW & CENTER MONITOR POSITION;;;;;;;;;;
-
 
143
        mov     eax,48             ;get system color
-
 
144
        mov     ebx,3
-
 
145
        mov     ecx,__sc
-
 
146
        mov     edx,sizeof.system_colors
-
 
147
        mcall
-
 
148
;---------------------------------------------------------------------
-
 
149
;get with text imul on 6 pix
-
 
150
        xor     eax,eax
-
 
151
        mov     esi,err_message1
-
 
152
        mov     ecx,30
-
 
153
align 4
-
 
154
lp:     lodsb
-
 
155
        test    eax,eax
-
 
156
        jz      ex_lp
-
 
157
        add     ecx,7
-
 
158
        jmp     lp
-
 
159
;---------------------------------------------------------------------
-
 
160
ex_lp:
-
 
161
        mcall   48,5    ;get system window
-
 
162
        sub     eax,ecx
-
 
163
        sub     bx,90
-
 
164
 
-
 
165
        shl     eax,15
-
 
166
        shl     ebx,15
-
 
167
 
-
 
168
        mov     ax,cx
-
 
169
 
-
 
170
        mov     bx,90
-
 
171
 
-
 
172
        mov     dword [on_x],eax
-
 
173
        mov     dword [on_y],ebx
-
 
174
 
-
 
175
;        mov     eax,dword [esp+4]
-
 
176
;        mov     dword [header_xx],eax
-
 
177
 
-
 
178
;        mov     eax,dword [esp+8]        
-
 
179
;        mov     dword [message_xx],eax        
-
 
180
 
-
 
181
        jmp     start
-
 
182
__sc     system_colors
-
 
183
on_x    dd      ?
-
 
184
on_y    dd      ?
-
 
185
message_xx      dd      ?
-
 
186
header_xx       dd      ?
-
 
187
;;;;;;;;;;;DRAW WINDOW;;;;;;;;;;;;;;
-
 
188
start:
-
 
189
        mcall   40,0x5         ;set mask on events rewraw window and get id button.
-
 
190
red_win:
-
 
191
;draw_window:
-
 
192
        mcall 12,1
-
 
193
 
-
 
194
        xor     eax,eax
-
 
195
        mov     ebx,dword [on_x]
-
 
196
        mov     ecx,dword [on_y]
-
 
197
        mov     edx,__sc.work
-
 
198
        or      edx,0x33000000
-
 
199
        mov     esi,__sc.grab_text
-
 
200
        mov     edi,head1
-
 
201
        mcall
-
 
202
 
-
 
203
        mov     eax,4
-
 
204
        mov     ebx,(10*65536+25)
-
 
205
        mov     ecx,__sc.grab_text
-
 
206
        or      ecx,0x90000000
-
 
207
        mov     edx,err_message1
-
 
208
        mcall
-
 
209
        mcall 12,2
-
 
210
align 4
-
 
211
still:                          ;main loop
-
 
212
        mcall   10              ;wait event
-
 
213
        dec  eax
-
 
214
        jz   red_win
-
 
215
        sub  eax,2
-
 
216
        jnz  still   ;go to main loop
-
 
217
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 
218
button:
-
 
219
        mcall   17      ;get id button
-
 
220
        test    ah,ah      ;if in ah 0, then go to still
-
 
221
        jz      still
-
 
222
        or      dword [esp+40],-1; modify eax in stack (pushad)
-
 
223
        ret
-
 
224
 
-
 
225
;---------------------------------------------------------------------
-
 
226
@library_name     equ    dword [esp+12]
-
 
227
@cur_dir_path     equ    dword [esp+8]
-
 
228
@library_path     equ    dword [esp+4]
-
 
229
 
-
 
230
align 4
-
 
231
@copy_path:
-
 
232
        mov     ebx,@library_name
-
 
233
        mov     esi,@cur_dir_path
-
 
234
        mov     edi,@library_path
-
 
235
 
-
 
236
        xor     eax,eax
-
 
237
        cld
-
 
238
.lp1:
-
 
239
        lodsb
-
 
240
        stosb
-
 
241
        test    eax,eax
-
 
242
        jnz     .lp1
-
 
243
        mov     esi,edi
-
 
244
 
-
 
245
        std
-
 
246
.lp2:
-
 
247
        lodsb
-
 
248
        cmp     al,'/'
-
 
249
        jnz     .lp2
-
 
250
        mov     edi,esi
-
 
251
        mov     esi,ebx
-
 
252
        add     edi,2
-
 
253
 
-
 
254
 
-
 
255
        cld
-
 
256
.lp3:
-
 
257
        lodsb
-
 
258
        stosb
-
 
259
        test    eax,eax
-
 
260
        jnz     .lp3
-
 
261
;--------------------------------------------------------------------- 
-
 
262
	ret
-
 
263
}
-
 
264
 
-
 
265
 
52
 
266
 
53
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
267
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
54
{
268
{
-
 
269
local end_steep
55
local end_steep
270
local exit
56
;---------------------------------------------------------------------  
271
;---------------------------------------------------------------------  
Line 57... Line 272...
57
; loading Box_Lib library 
272
; loading Box_Lib library 
58
 
273
 
59
        mcall   68,19,system_path   ; load of sys directory
274
        mcall   68,19,system_path   ; load of sys directory
Line 60... Line -...
60
        test    eax,eax
-
 
61
        jnz     end_steep 
-
 
62
 
-
 
63
        mov     ebx,library_name
-
 
64
        mov     esi,cur_dir_path
275
        test    eax,eax
Line 65... Line 276...
65
        mov     edi,library_path
276
        jnz     end_steep 
66
 
277
 
67
        copy_path       ;the macros making way /current pach a program/+ name system library
278
        copy_path   library_name, cur_dir_path, library_path    ;the macros making way /current pach a program/+ name system library
68
        
-
 
69
        mcall   68,19,library_path ; load of alternative
279
        
-
 
280
        mcall   68,19,library_path ; load of alternative
-
 
281
        test    eax,eax
Line -... Line 282...
-
 
282
        jnz     end_steep
70
        test    eax,eax
283
        show_error_window  err_message_found_lib, head_f_l    ;show error message /create window
Line 71... Line 284...
71
        jnz     end_steep
284
        jmp     exit
-
 
285
 
72
 
286
 
73
        show_error_window  err_message_found_lib, head_f_l    ;show error message /create window
287
align 4
Line 74... Line 288...
74
 
288
end_steep:
75
end_steep:
289
 
76
 
290
        import_boxlib myimport, err_message_import, head_f_i  ;import
-
 
291
exit:
77
        import_boxlib myimport, err_message_import, head_f_i  ;import
292
;---------------------------------------------------------------------
78
;---------------------------------------------------------------------
293
}
79
}
-
 
80
 
-
 
81
 
-
 
Line 82... Line 294...
82
macro test_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
294
 
Line 83... Line 295...
83
{
295
 
84
local end_steep
296
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
85
;---------------------------------------------------------------------  
297
{
Line 86... Line 298...
86
; loading Box_Lib library 
298
local end_steep
87
        mov     ebx,library_name
299
local exit
88
        mov     esi,cur_dir_path
300
;---------------------------------------------------------------------  
Line 89... Line 301...
89
        mov     edi,library_path
301
; loading Box_Lib library 
-
 
302
 
Line -... Line 303...
-
 
303
        copy_path  library_name, cur_dir_path, library_path     ;the macros making way /current pach a program/+ name system library
90
 
304
 
Line 91... Line 305...
91
        copy_path       ;the macros making way /current pach a program/+ name system library
305
        mcall   68,19,library_path ; load of alternative
-
 
306
        test    eax,eax
92
 
307
        jnz     end_steep 
93
        mcall   68,19,library_path ; load of alternative
308
        
94
        test    eax,eax
-
 
95
        jnz     end_steep 
309
        mcall   68,19,system_path ; load of sys directory
96
        
310
        test    eax,eax
-
 
311
        jnz     end_steep
97
        mcall   68,19,system_path ; load of sys directory
312
 
-
 
313
        show_error_window  err_message_found_lib, head_f_l    ;show error message /create window
98
        test    eax,eax
314
        jmp     exit
-
 
315
 
-
 
316
align 4
-
 
317
end_steep:
-
 
318
 
99
        jnz     end_steep
319
        import_boxlib myimport, err_message_import, head_f_i  ;import
-
 
320
exit:
-
 
321
;---------------------------------------------------------------------
-
 
322
}
-
 
323
macro sys_load_libraries _start,_end
-
 
324
{
-
 
325
local lp
-
 
326
local end_steep
-
 
327
local next
-
 
328
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line -... Line 329...
-
 
329
library_name            equ [ebp]
-
 
330
cur_dir_path            equ [ebp+4]
-
 
331
library_path            equ [ebp+8]
-
 
332
system_path             equ [ebp+12]
-
 
333
err_message_found_lib   equ [ebp+16]   
100
 
334
head_f_l                equ [ebp+20]
101
        show_error_window  err_message_found_lib, head_f_l    ;show error message /create window
335
my_import               equ [ebp+24] 
102
 
336
err_message_import      equ [ebp+28]
Line 103... Line -...
103
end_steep:
-
 
104
 
-
 
105
        import_boxlib myimport, err_message_import, head_f_i  ;import
-
 
106
;---------------------------------------------------------------------
-
 
107
}
337
head_f_i                equ [ebp+32]
Line 108... Line 338...
108
 
338
adr_load_lib            equ dword [ebp+36]
109
macro load_libraries library_name, cur_dir_path, library_path, system_path, err_message_found_lib, head_f_l, myimport, err_message_import, head_f_i
339
status_lib              equ dword [ebp+40]
110
{
340
 
Line -... Line 341...
-
 
341
;        show_error_window  err_message_found_lib, head_f_l    ;show error message /create window
-
 
342
;        int 0x40
111
local end_steep
343
 
-
 
344
        mov     ebp,_start
Line -... Line 345...
-
 
345
        mov     ecx,((_end-_start)/ll_struc_size)
112
;---------------------------------------------------------------------  
346
 
-
 
347
align 4
-
 
348
lp:     push    ecx
Line -... Line 349...
-
 
349
        mcall   68,19,system_path   ; load of sys directory
-
 
350
        test    eax,eax
-
 
351
        jnz     end_steep 
113
; loading Box_Lib library 
352
 
-
 
353
        copy_path  library_name, cur_dir_path, library_path     ;the macros making way /current pach a program/+ name system library
-
 
354
        
-
 
355
        mcall   68,19,library_path ; load of alternative
114
 
356
        test    eax,eax
-
 
357
        jnz     end_steep
-
 
358
 
115
        mcall   68,19,system_path   ; load of sys directory
359
        or      status_lib,0x1          ; status of code - enable error - not found library
Line -... Line 360...
-
 
360
 
-
 
361
        show_error_window  err_message_found_lib, head_f_l    ;show error message /create window
-
 
362
        jmp      next
-
 
363
 
-
 
364
align 4
-
 
365
end_steep:
-
 
366
        mov     adr_load_lib,eax        ;save adr lib in memory
-
 
367
        import_boxlib my_import, err_message_import, head_f_i  ;import
-
 
368
 
-
 
369
        test    eax,eax
-
 
370
        jz      next
-
 
371
 
-
 
372
        or      status_lib,0x2          ; status of code - enable error - import error
-
 
373
 
-
 
374
next:
-
 
375
        pop     ecx
-
 
376
        add     ebp,ll_struc_size
Line -... Line 377...
-
 
377
        dec     ecx
-
 
378
        jnz     lp
Line -... Line 379...
-
 
379
}
-
 
380
 
Line 116... Line -...
116
        test    eax,eax
-
 
117
        jnz     end_steep 
-
 
118
 
-
 
119
        mov     ebx,library_name
-
 
120
        mov     esi,cur_dir_path
-
 
121
        mov     edi,library_path
-
 
122
 
381
macro load_libraries _start,_end
Line 123... Line -...
123
        copy_path       ;the macros making way /current pach a program/+ name system library
-
 
124
        
382
{
125
        mcall   68,19,library_path ; load of alternative
-
 
126
        test    eax,eax
-
 
127
        jnz     end_steep
-
 
128
 
-
 
129
        show_error_window  err_message_found_lib, head_f_l    ;show error message /create window
383
local lp
130
 
384
local end_steep
131
end_steep:
-
 
Line 132... Line -...
132
 
-
 
133
        import_boxlib myimport, err_message_import, head_f_i  ;import
-
 
134
;---------------------------------------------------------------------
-
 
135
}
-
 
136
 
-
 
137
 
385
local next
138
 
386
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
139
 
387
library_name            equ [ebp]
Line -... Line 388...
-
 
388
cur_dir_path            equ [ebp+4]
-
 
389
library_path            equ [ebp+8]
-
 
390
system_path             equ [ebp+12]
-
 
391
err_message_found_lib   equ [ebp+16]   
-
 
392
head_f_l                equ [ebp+20]
-
 
393
my_import               equ [ebp+24] 
-
 
394
err_message_import      equ [ebp+28]
-
 
395
head_f_i                equ [ebp+32]
-
 
396
adr_load_lib            equ dword [ebp+36]
-
 
397
status_lib              equ dword [ebp+40]
Line 140... Line -...
140
macro copy_path 
-
 
141
{
-
 
142
local copy_path
-
 
143
;---------------------------------------------------------------------
-
 
144
;        mov     ebx,library_name
398
 
145
;        mov     esi,cur_dir_path
399
        mov     ebp,_start
-
 
400
        mov     ecx,((_end-_start)/ll_struc_size)
146
;        mov     edi,library_path
401
 
-
 
402
align 4
-
 
403
lp:     push    ecx
-
 
404
 
-
 
405
        copy_path    library_name, cur_dir_path, library_path   ;the macros making way /current pach a program/+ name system library
-
 
406
 
-
 
407
        mcall   68,19,library_path  ; load of alternative
147
 
408
        test    eax,eax
Line -... Line 409...
-
 
409
        jnz     end_steep 
148
copy_path:
410
        
149
        xor     eax,eax
411
        mcall   68,19,system_path   ; load of sys directory
-
 
412
        test    eax,eax
150
        cld
413
        jnz     end_steep
151
.lp1:
414
 
152
        lodsb
415
        or      status_lib,0x1          ; status of code - enable error - not found library
Line 153... Line -...
153
        stosb
-
 
154
        test    eax,eax
-
 
155
        jnz     .lp1
-
 
156
        mov     esi,edi
-
 
157
 
-
 
158
        std
-
 
159
.lp2:
-
 
160
        lodsb
-
 
161
        cmp     al,'/'
-
 
162
        jnz     .lp2
-
 
163
        mov     edi,esi
-
 
164
        mov     esi,ebx
416
 
Line 165... Line 417...
165
        add     edi,2
417
        show_error_window  err_message_found_lib, head_f_l    ;show error message /create window
166
 
418
        jmp      next
-
 
419
 
-
 
420
align 4
167
 
421
end_steep:
168
        cld
422
        mov     adr_load_lib,eax        ;save adr lib in memory
169
.lp3:
423
 
170
        lodsb
424
        import_boxlib my_import, err_message_import, head_f_i  ;import
-
 
425
 
171
        stosb
426
        test    eax,eax
-
 
427
        jz      next
172
        test    eax,eax
428
 
-
 
429
        or      status_lib,0x2          ; status of code - enable error - import error
173
        jnz     .lp3
430
 
Line -... Line 431...
-
 
431
next:
174
;--------------------------------------------------------------------- 
432
        pop     ecx
175
}
433
        add     ebp,ll_struc_size
176
 
434
        dec     ecx
177
macro show_error_window  err_message, head
435
        jnz     lp
178
{
436
}
179
local red_win
437
 
180
local still
438
 
181
local button
439
macro copy_path lib_name,dir_path,lib_path
182
 
440
{
-
 
441
        pushad  ;save all registers
-
 
442
        push    dword lib_name
183
        mcall   40,0x5         ;set mask on events rewraw window and get id button.
443
        push    dword dir_path
-
 
444
        push    dword lib_path
184
red_win:
445
 
185
;draw_window:
446
        call    @copy_path
186
        mcall 12, 1
447
 
187
        mcall 0, <0,300>, <0,100>, 0x33AABBCC, 0x805080D0, head
448
        add     esp,12
188
        mcall 4, <10,10>, 0x90000000, err_message; _found_lib
449
        popad   ;restore all registers
189
        mcall 12, 2
450
}
190
align 4
451
 
191
still:                          ;main loop
452
macro show_error_window  err_message, head
192
        mcall   10              ;wait event
453
{       pushad  ;save all registers
193
        dec  eax
454
        push    dword err_message
194
        jz   red_win
455
        push    dword head
195
        
456
 
196
        sub  eax,2
457
        call    show_err_
197
        jnz  still   ;go to main loop
458
 
198
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
459
        add     esp,8
199
button:
460
        popad   ;restore all registers
Line 242... Line 503...
242
        pop     eax
503
        pop     eax
243
        mov     eax, [ds:edx+4]
504
        mov     eax, [ds:edx+4]
244
        mov     [esi-4], eax
505
        mov     [esi-4], eax
245
        pop     edx
506
        pop     edx
246
        jmp     import_loop
507
        jmp     import_loop
247
exit:
508
import_not_found:
248
        add     esp,4
509
        add     esp,4
249
 
-
 
250
        show_error_window  err_message_import, head_f_i    ;show error message /create window
510
        show_error_window  err_message_import, head_f_i    ;show error message /create window
251
 
-
 
-
 
511
        jmp     e.exit
252
import_done:
512
import_done:
-
 
513
        xor     eax,eax
-
 
514
e.exit: 
253
;---------------------------------------------------------------------
515
;---------------------------------------------------------------------
254
}
516
}
255
517
ll_struc_size = 44;($-library_name)    ; constant   size of struct
-
 
518
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; struct for loading libraries
-
 
519
{        
-
 
520
.library_name            dd library_name
-
 
521
.cur_dir_path            dd cur_dir_path
-
 
522
.library_path            dd library_path
-
 
523
.system_path             dd system_path
-
 
524
.err_message_found_lib   dd err_message_found_lib
-
 
525
.head_f_l                dd head_f_l
-
 
526
.my_import               dd my_import
-
 
527
.err_message_import      dd err_message_import
-
 
528
.head_f_i                dd head_f_i
-
 
529
.adr_load_lib            dd 0x0
-
 
530
.status_lib              dd 0x0          ;status of load library
-
 
531
;
-
 
532
 
-
 
533
}
-
 
534