Rev 8227 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8227 | Rev 8236 | ||
---|---|---|---|
Line 190... | Line 190... | ||
190 | macro sys_load_library library_name__, library_path__, system_path__, myimport, point_dir_name__ |
190 | macro sys_load_library library_name__, library_path__, system_path__, myimport, point_dir_name__ |
191 | { |
191 | { |
192 | local i_begin |
192 | local i_begin |
193 | local i_error |
193 | local i_error |
194 | local i_exit |
194 | local i_exit |
195 | 195 | push ebx |
|
196 | mcall SF_SYS_MISC,SSF_LOAD_DLL,system_path__ ; load of sys directory |
196 | mcall SF_SYS_MISC,SSF_LOAD_DLL,system_path__ ; load of sys directory |
197 | test eax,eax |
197 | test eax,eax |
198 | jnz i_begin |
198 | jnz i_begin |
Line 199... | Line 199... | ||
199 | 199 | ||
Line 216... | Line 216... | ||
216 | push eax |
216 | push eax |
217 | push dword library_name__ |
217 | push dword library_name__ |
218 | call l_lib_init_error_window |
218 | call l_lib_init_error_window |
219 | notify_window_run [arrea_xx] ; ᮧ¤ ¥¬ ®ª® @notify |
219 | notify_window_run [arrea_xx] ; ᮧ¤ ¥¬ ®ª® @notify |
220 | i_exit: |
220 | i_exit: |
- | 221 | pop ebx |
|
221 | } |
222 | } |
222 | ;--------------------------------------------------------------------- |
223 | ;--------------------------------------------------------------------- |
Line -... | Line 224... | ||
- | 224 | ||
- | 225 | ;output: |
|
223 | 226 | ; eax - ¥á«¨ ã¤ ç® â® 0 |
|
224 | macro load_library library_name__, library_path__, system_path__, myimport, point_dir_name__ |
227 | macro load_library library_name__, library_path__, system_path__, myimport, point_dir_name__ |
225 | { |
228 | { |
226 | local i_begin |
229 | local i_begin |
227 | local i_error |
230 | local i_error |
228 | local i_exit |
231 | local i_exit |
229 | 232 | push ebx |
|
230 | if point_dir_name__ eq |
233 | if point_dir_name__ eq |
231 | copy_path library_name__, [32], library_path__,0 |
234 | copy_path library_name__, [32], library_path__,0 |
232 | else |
235 | else |
233 | ;the macros making way /current path a program/ + name system library |
236 | ;the macros making way /current path a program/ + name system library |
Line 250... | Line 253... | ||
250 | push eax |
253 | push eax |
251 | push dword library_name__ |
254 | push dword library_name__ |
252 | call l_lib_init_error_window |
255 | call l_lib_init_error_window |
253 | notify_window_run [arrea_xx] ; ᮧ¤ ¥¬ ®ª® @notify |
256 | notify_window_run [arrea_xx] ; ᮧ¤ ¥¬ ®ª® @notify |
254 | i_exit: |
257 | i_exit: |
- | 258 | pop ebx |
|
255 | ;--------------------------------------------------------------------- |
259 | ;--------------------------------------------------------------------- |
256 | } |
260 | } |
Line 257... | Line 261... | ||
257 | 261 | ||
258 | ;description: |
262 | ;description: |
Line 439... | Line 443... | ||
439 | ;input: |
443 | ;input: |
440 | ; eax - ¤à¥á ¡¨¡«¨®â¥ª¨ ¢ ¯ ¬ï⨠|
444 | ; eax - ¤à¥á ¡¨¡«¨®â¥ª¨ ¢ ¯ ¬ï⨠|
441 | ; myimport - ¨¬¯®àâ¨àã¥¬ë¥ äãªæ¨¨ |
445 | ; myimport - ¨¬¯®àâ¨àã¥¬ë¥ äãªæ¨¨ |
442 | ;output: |
446 | ;output: |
443 | ; eax - ¥á«¨ ã¤ ç® â® 0 ¨«¨ 㪠§ â¥«ì ¨¬ï äãªæ¨¨ ª®â®àãî ¥ 㤠«®áì § £à㧨âì |
447 | ; eax - ¥á«¨ ã¤ ç® â® 0 ¨«¨ 㪠§ â¥«ì ¨¬ï äãªæ¨¨ ª®â®àãî ¥ 㤠«®áì § £à㧨âì |
- | 448 | ; ebx - à §àãè ¥âáï |
|
444 | macro import_boxlib myimport |
449 | macro import_boxlib myimport |
445 | { |
450 | { |
446 | local import_loop |
451 | local import_loop |
447 | local import_find |
452 | local import_find |
448 | local lp |
453 | local lp |
Line 450... | Line 455... | ||
450 | local import_found |
455 | local import_found |
451 | local import_done |
456 | local import_done |
452 | local exit |
457 | local exit |
453 | local import_not_found |
458 | local import_not_found |
454 | ; initialize import |
459 | ; initialize import |
455 | 460 | push esi |
|
456 | mov edx, eax |
461 | mov edx, eax |
457 | mov esi,myimport |
462 | mov esi, myimport |
- | 463 | cld |
|
458 | import_loop: |
464 | import_loop: |
459 | lodsd ;mov eax,dword[esi] ;add esi,4 ;¯®«ãç ¥¬ ¢ eax 㪠§ â¥«ì ¨¬ï ¨¬¯®àâ¨à㥬®© äãªæ¨¨ |
465 | lodsd ;mov eax,dword[esi] ;add esi,4 ;¯®«ãç ¥¬ ¢ eax 㪠§ â¥«ì ¨¬ï ¨¬¯®àâ¨à㥬®© äãªæ¨¨ |
460 | test eax, eax |
466 | test eax, eax |
461 | jz import_done ;¥á«¨ 㪠§ â¥«ì ¨¬ï äãªæ¨¨ = 0 (¢ ¯®«ì§®¢ ⥫ì᪮© ¯à®£à ¬¬¥) |
467 | jz import_done ;¥á«¨ 㪠§ â¥«ì ¨¬ï äãªæ¨¨ = 0 (¢ ¯®«ì§®¢ ⥫ì᪮© ¯à®£à ¬¬¥) |
462 | push edx ;á®åà 塞 ç «® ¡¨¡«¨®â¥çëå 㪠§ ⥫¥© äãªæ¨¨ |
468 | push edx ;á®åà 塞 ç «® ¡¨¡«¨®â¥çëå 㪠§ ⥫¥© äãªæ¨¨ |
463 | import_find: |
469 | import_find: |
464 | mov ebx, [edx] |
470 | mov ebx, [edx] |
465 | test ebx, ebx |
471 | test ebx, ebx |
466 | jz import_not_found ;¥á«¨ 㪠§ â¥«ì ¨¬ï äãªæ¨¨ = 0 (¢ ¡¨¡«¨®â¥ª¥) |
472 | jz import_not_found ;¥á«¨ 㪠§ â¥«ì ¨¬ï äãªæ¨¨ = 0 (¢ ¡¨¡«¨®â¥ª¥) |
467 | push eax ;eax - 㪠§ â¥«ì ¨¬ï íªá¯®àâ¨à㥬®© äãªæ¨¨ (¢ ¯®«ì§®¢ ⥫ì᪮© ¯à®£à ¬¬¥) |
473 | push eax ;eax - 㪠§ â¥«ì ¨¬ï íªá¯®àâ¨à㥬®© äãªæ¨¨ (¢ ¯®«ì§®¢ ⥫ì᪮© ¯à®£à ¬¬¥) |
- | 474 | align 4 |
|
468 | lp: |
475 | lp: |
469 | mov cl, [eax] |
476 | mov cl, [eax] |
470 | cmp cl, [ebx] ;áà ¢¨¢ ¥¬ ¨¬¥ äãªæ¨© ¢ ¡¨¡«¨®â¥ª¥ ¨ ¢ ¯®«ì§®¢ ⥫ì᪮© ¯à®£à ¬¬¥ |
477 | cmp cl, [ebx] ;áà ¢¨¢ ¥¬ ¨¬¥ äãªæ¨© ¢ ¡¨¡«¨®â¥ª¥ ¨ ¢ ¯®«ì§®¢ ⥫ì᪮© ¯à®£à ¬¬¥ |
471 | jnz import_find_next ;¥á«¨ §¢ ¨ï ¥ ᮢ¯ «¨ |
478 | jnz import_find_next ;¥á«¨ §¢ ¨ï ¥ ᮢ¯ «¨ |
472 | test cl, cl |
479 | test cl, cl |
Line 510... | Line 517... | ||
510 | add esp,4 |
517 | add esp,4 |
511 | jmp exit |
518 | jmp exit |
512 | import_done: |
519 | import_done: |
513 | xor eax,eax ;=0 ¢á¥ § £à㧨«®áì ã¤ ç® |
520 | xor eax,eax ;=0 ¢á¥ § £à㧨«®áì ã¤ ç® |
514 | exit: |
521 | exit: |
- | 522 | pop esi |
|
515 | } |
523 | } |
516 | ;--------------------------------------------------------------------- |
524 | ;--------------------------------------------------------------------- |
Line 517... | Line 525... | ||
517 | 525 | ||
518 | ll_struc_size = 28;($-library_name__) ; constant size of struct |
526 | ll_struc_size = 28;($-library_name__) ; constant size of struct |