forked from KolibriOS/kolibrios
update 'load_lib.mac', update 'info3ds', fix 'kol_f_edit'
git-svn-id: svn://kolibrios.org@8083 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -81,36 +81,18 @@
|
||||
|
||||
;myimport:
|
||||
;
|
||||
;edit_box_draw dd aEdit_box_draw
|
||||
;edit_box_key dd aEdit_box_key
|
||||
;edit_box_mouse dd aEdit_box_mouse
|
||||
;version_ed dd aVersion_ed
|
||||
;
|
||||
;check_box_draw dd aCheck_box_draw
|
||||
;check_box_mouse dd aCheck_box_mouse
|
||||
;version_ch dd aVersion_ch
|
||||
;
|
||||
;option_box_draw dd aOption_box_draw
|
||||
;option_box_mouse dd aOption_box_mouse
|
||||
;version_op dd aVersion_op
|
||||
|
||||
; dd 0
|
||||
; dd 0
|
||||
;
|
||||
;edit_box_draw dd aEdit_box_draw
|
||||
;edit_box_key dd aEdit_box_key
|
||||
;edit_box_mouse dd aEdit_box_mouse
|
||||
;version_ed dd aVersion_ed
|
||||
; dd 0,0
|
||||
;aEdit_box_draw db 'edit_box',0
|
||||
;aEdit_box_key db 'edit_box_key',0
|
||||
;aEdit_box_mouse db 'edit_box_mouse',0
|
||||
;aVersion_ed db 'version_ed',0
|
||||
|
||||
;aCheck_box_draw db 'check_box_draw',0
|
||||
;aCheck_box_mouse db 'check_box_mouse',0
|
||||
;aVersion_ch db 'version_ch',0
|
||||
|
||||
;aOption_box_draw db 'option_box_draw',0
|
||||
;aOption_box_mouse db 'option_box_mouse',0
|
||||
;aVersion_op db 'version_op',0
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
macro @use_library
|
||||
{
|
||||
local lp1
|
||||
@@ -136,13 +118,70 @@ run_notify_struct:
|
||||
.Buffer dd 0
|
||||
db 0
|
||||
.FileName dd file_name
|
||||
;---------------------------------------------------------------------
|
||||
|
||||
@library_name equ dword [esp+16]
|
||||
@cur_dir_path equ dword [esp+12]
|
||||
@library_path equ dword [esp+8]
|
||||
@point_dir_name equ dword [esp+4]
|
||||
|
||||
;description:
|
||||
; <20><>⮢<EFBFBD><E2AEA2> ⥪<><E2A5AA> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>१ @notify:
|
||||
; 1) <20>뤥<EFBFBD>塞 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> [arrea_xx] <20><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ࠧ<>
|
||||
; 2) <20><><EFBFBD><EFBFBD><EFBFBD>㥬 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20>㭪樨 <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞 <20><><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <20> ⥪<><E2A5AA> ᮮ<>饭<EFBFBD><E9A5AD> <20> [arrea_xx]
|
||||
;input:
|
||||
; ebp+8 - head message
|
||||
; ebp+12 - error message
|
||||
; ebp+16 - 0 <20><><EFBFBD> <20><><EFBFBD> <20>㭪樨, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> 㤠<><E3A4A0><EFBFBD><EFBFBD> <20><>ᯮ<EFBFBD><E1AFAE><EFBFBD><EFBFBD><E0AEA2><EFBFBD>
|
||||
;output:
|
||||
; eax = -1
|
||||
align 4
|
||||
l_lib_init_error_window:
|
||||
push ebp
|
||||
mov ebp,esp
|
||||
cmp dword[arrea_xx],0
|
||||
jne .no_msg ;<3B> ࠭<><E0A0AD><EFBFBD> <20>뫮 ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><>㣮<EFBFBD> ᮮ<>饭<EFBFBD><E9A5AD>
|
||||
pushad
|
||||
|
||||
mcall 68,11
|
||||
mcall 68,12,4096
|
||||
mov [arrea_xx],eax
|
||||
|
||||
mov edi,eax
|
||||
mov esi,[ebp+8]
|
||||
align 4
|
||||
@@:
|
||||
movsb
|
||||
cmp byte[esi],0
|
||||
jne @b
|
||||
mov word[edi],0xa0d
|
||||
add edi,2
|
||||
|
||||
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞 <20><><EFBFBD> <20>㭪樨 <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
mov esi,[ebp+16]
|
||||
or esi,esi
|
||||
jz .lp1
|
||||
mov word[edi-2],0x2020
|
||||
@@:
|
||||
movsb
|
||||
cmp byte[esi],0
|
||||
jne @b
|
||||
mov word[edi],0xa0d
|
||||
add edi,2
|
||||
.lp1:
|
||||
|
||||
mov esi,[ebp+12]
|
||||
align 4
|
||||
@@:
|
||||
movsb
|
||||
cmp byte[esi],0
|
||||
jne @b
|
||||
mov byte[edi],0
|
||||
popad
|
||||
.no_msg:
|
||||
or eax,-1
|
||||
pop ebp
|
||||
ret 12
|
||||
|
||||
align 4
|
||||
@copy_path:
|
||||
mov esi,@cur_dir_path
|
||||
@@ -200,11 +239,9 @@ align 4
|
||||
stosb
|
||||
test eax,eax
|
||||
jnz .lp4
|
||||
;---------------------------------------------------------------------
|
||||
ret
|
||||
}
|
||||
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
|
||||
macro @use_library_mem mem_alloc,mem_free,mem_realloc,dll_load
|
||||
{
|
||||
@@ -215,92 +252,93 @@ library_fun_memory_realloc equ mem_realloc
|
||||
library_fun_dll_load equ dll_load
|
||||
}
|
||||
|
||||
|
||||
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__
|
||||
{
|
||||
local end_steep
|
||||
local exit
|
||||
;---------------------------------------------------------------------
|
||||
; loading Box_Lib library
|
||||
local i_begin
|
||||
local i_error
|
||||
local i_exit
|
||||
|
||||
mcall 68,19,system_path__ ; load of sys directory
|
||||
test eax,eax
|
||||
jnz end_steep
|
||||
mcall 68,19,system_path__ ; load of sys directory
|
||||
test eax,eax
|
||||
jnz i_begin
|
||||
|
||||
if point_dir_name__ eq
|
||||
copy_path library_name__, cur_dir_path__, library_path__,0x0
|
||||
copy_path library_name__, cur_dir_path__, library_path__,0
|
||||
else
|
||||
copy_path library_name__, cur_dir_path__, library_path__,point_dir_name__ ;the macros making way /current pach a program/+ name system library
|
||||
end if
|
||||
|
||||
mcall 68,19,library_path__ ; load of alternative
|
||||
test eax,eax
|
||||
jnz end_steep
|
||||
show_error_window err_message_found_lib__, head_f_l__ ;show error message /create window
|
||||
jmp exit
|
||||
|
||||
|
||||
;the macros making way /current path a program/ + name system library
|
||||
copy_path library_name__, cur_dir_path__, library_path__,point_dir_name__
|
||||
end if
|
||||
mcall 68,19,library_path__ ; load of alternative
|
||||
test eax,eax
|
||||
jnz i_begin
|
||||
push eax
|
||||
push dword err_message_found_lib__
|
||||
push dword head_f_l__
|
||||
jmp i_error
|
||||
align 4
|
||||
end_steep:
|
||||
|
||||
import_boxlib myimport, err_message_import__, head_f_i__ ;import
|
||||
exit:
|
||||
test eax,eax
|
||||
jz @f
|
||||
|
||||
notify_window_run [arrea_xx] ; ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> @notify
|
||||
or eax,-1
|
||||
@@:
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
i_begin:
|
||||
import_boxlib myimport
|
||||
test eax,eax
|
||||
jz i_exit
|
||||
push eax
|
||||
push dword err_message_import__
|
||||
push dword head_f_i__
|
||||
i_error:
|
||||
call l_lib_init_error_window
|
||||
notify_window_run [arrea_xx] ; ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> @notify
|
||||
i_exit:
|
||||
}
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
|
||||
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__
|
||||
{
|
||||
local end_steep
|
||||
local exit
|
||||
;---------------------------------------------------------------------
|
||||
; loading Box_Lib library
|
||||
local i_begin
|
||||
local i_error
|
||||
local i_exit
|
||||
|
||||
if point_dir_name__ eq
|
||||
copy_path library_name__, cur_dir_path__, library_path__,0x0
|
||||
copy_path library_name__, cur_dir_path__, library_path__,0
|
||||
else
|
||||
copy_path library_name__, cur_dir_path__, library_path__,point_dir_name__ ;the macros making way /current pach a program/+ name system library
|
||||
end if
|
||||
|
||||
mcall 68,19,library_path__ ; load of alternative
|
||||
test eax,eax
|
||||
jnz end_steep
|
||||
|
||||
mcall 68,19,system_path__ ; load of sys directory
|
||||
test eax,eax
|
||||
jnz end_steep
|
||||
|
||||
show_error_window err_message_found_lib__, head_f_l__ ;show error message /create window
|
||||
jmp exit
|
||||
;the macros making way /current path a program/ + name system library
|
||||
copy_path library_name__, cur_dir_path__, library_path__,point_dir_name__
|
||||
end if
|
||||
mcall 68,19,library_path__ ; load of alternative
|
||||
test eax,eax
|
||||
jnz i_begin
|
||||
|
||||
mcall 68,19,system_path__ ; load of sys directory
|
||||
test eax,eax
|
||||
jnz i_begin
|
||||
push eax
|
||||
push dword err_message_found_lib__
|
||||
push dword head_f_l__
|
||||
jmp i_error
|
||||
align 4
|
||||
end_steep:
|
||||
|
||||
import_boxlib myimport, err_message_import__, head_f_i__ ;import
|
||||
exit:
|
||||
test eax,eax
|
||||
jz @f
|
||||
|
||||
notify_window_run [arrea_xx] ; ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> @notify
|
||||
or eax,-1
|
||||
@@:
|
||||
|
||||
i_begin:
|
||||
import_boxlib myimport
|
||||
test eax,eax
|
||||
jz i_exit
|
||||
push eax
|
||||
push dword err_message_found_lib__
|
||||
push dword head_f_l__
|
||||
i_error:
|
||||
call l_lib_init_error_window
|
||||
notify_window_run [arrea_xx] ; ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> @notify
|
||||
i_exit:
|
||||
;---------------------------------------------------------------------
|
||||
}
|
||||
|
||||
;description:
|
||||
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>㧪<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪ <20><> <20><><EFBFBD>⥬<EFBFBD><E2A5AC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
; ⮣<><E2AEA3> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> ⥪<>饩 <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20>ணࠬ<E0AEA3><E0A0AC><EFBFBD>
|
||||
macro sys_load_libraries _start,_end
|
||||
{
|
||||
local exit_lp2
|
||||
local lp2
|
||||
local lp
|
||||
local cycle0
|
||||
local end_steep
|
||||
local next
|
||||
local cycle0n
|
||||
local cycle1
|
||||
local cycle1n
|
||||
local cycle1e
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
library_name__ equ [ebp]
|
||||
cur_dir_path__ equ [ebp+4]
|
||||
@@ -315,70 +353,76 @@ point_dir_name__ equ [ebp+36]
|
||||
adr_load_lib equ dword [ebp+40]
|
||||
status_lib equ dword [ebp+44]
|
||||
|
||||
mov ebp,_start
|
||||
mov ecx,((_end-_start)/ll_struc_size)
|
||||
|
||||
mov ebp,_start
|
||||
mov ecx,(_end-_start)/ll_struc_size
|
||||
align 4
|
||||
lp: push ecx
|
||||
cycle0:
|
||||
push ecx
|
||||
mcall 68,19,system_path__ ; load of sys directory
|
||||
test eax,eax
|
||||
jnz end_steep
|
||||
|
||||
copy_path library_name__, cur_dir_path__, library_path__,point_dir_name__ ;the macros making way /current pach a program/+ name system library
|
||||
;the macros making way /current path a program/ + name system library
|
||||
copy_path library_name__, cur_dir_path__, library_path__,point_dir_name__
|
||||
|
||||
mcall 68,19,library_path__ ; load of alternative
|
||||
test eax,eax
|
||||
jnz end_steep
|
||||
or status_lib,1 ; status of code - enable error - not found library
|
||||
|
||||
or status_lib,0x1 ; status of code - enable error - not found library
|
||||
|
||||
show_error_window err_message_found_lib__, head_f_l__, ;show error message /create window
|
||||
jmp next
|
||||
push eax
|
||||
push dword err_message_found_lib__
|
||||
push dword head_f_l__
|
||||
call l_lib_init_error_window
|
||||
jmp cycle0n
|
||||
|
||||
align 4
|
||||
end_steep:
|
||||
mov adr_load_lib,eax ;save adr lib in memory
|
||||
import_boxlib my_import, err_message_import__, head_f_i__ ;import
|
||||
|
||||
test eax,eax
|
||||
jz next
|
||||
|
||||
or status_lib,0x2 ; status of code - enable error - import error
|
||||
|
||||
next:
|
||||
pop ecx
|
||||
add ebp,ll_struc_size
|
||||
dec ecx
|
||||
jnz lp
|
||||
|
||||
;----------------------------------
|
||||
mov ebp,_start
|
||||
mov ecx,((_end-_start)/ll_struc_size)
|
||||
end_steep:
|
||||
mov adr_load_lib,eax ;save adr lib in memory
|
||||
import_boxlib my_import
|
||||
test eax,eax
|
||||
jz cycle0n
|
||||
or status_lib,2 ; status of code - enable error - import error
|
||||
push eax
|
||||
push dword err_message_import__
|
||||
push dword head_f_i__
|
||||
call l_lib_init_error_window
|
||||
cycle0n:
|
||||
pop ecx
|
||||
add ebp,ll_struc_size
|
||||
dec ecx
|
||||
jnz cycle0
|
||||
|
||||
;<3B>뢮<EFBFBD> ᮮ<>饭<EFBFBD><E9A5AD> <20><> <20>訡<EFBFBD><E8A8A1> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>㧪<EFBFBD>
|
||||
mov ebp,_start
|
||||
mov ecx,(_end-_start)/ll_struc_size
|
||||
align 4
|
||||
lp2:
|
||||
mov eax,status_lib
|
||||
test eax,eax
|
||||
jz @f
|
||||
|
||||
notify_window_run [arrea_xx] ; ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> @notify
|
||||
or eax,-1
|
||||
jmp exit_lp2
|
||||
|
||||
@@:
|
||||
add ebp,ll_struc_size
|
||||
dec ecx
|
||||
jnz lp2
|
||||
exit_lp2:
|
||||
cycle1:
|
||||
mov eax,status_lib
|
||||
test eax,eax
|
||||
jz cycle1n
|
||||
notify_window_run [arrea_xx] ; ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> @notify
|
||||
mov eax,-1
|
||||
jmp cycle1e
|
||||
align 4
|
||||
cycle1n:
|
||||
add ebp,ll_struc_size
|
||||
dec ecx
|
||||
jnz cycle1
|
||||
cycle1e:
|
||||
}
|
||||
|
||||
;description:
|
||||
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>㧪<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪ <20><> ⥪<>饩 <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20>ணࠬ<E0AEA3><E0A0AC><EFBFBD>, <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
; ⮣<><E2AEA3> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD>⥬<EFBFBD><E2A5AC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
macro load_libraries _start,_end
|
||||
{
|
||||
local lp2
|
||||
local exit_lp2
|
||||
local lp
|
||||
local cycle0
|
||||
local end_steep
|
||||
local next
|
||||
local cycle0n
|
||||
local cycle1
|
||||
local cycle1n
|
||||
local cycle1e
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
library_name__ equ [ebp]
|
||||
cur_dir_path__ equ [ebp+4]
|
||||
@@ -393,64 +437,64 @@ point_dir_name__ equ [ebp+36]
|
||||
adr_load_lib equ dword [ebp+40]
|
||||
status_lib equ dword [ebp+44]
|
||||
|
||||
mov ebp,_start
|
||||
mov ecx,((_end-_start)/ll_struc_size)
|
||||
mov ebp,_start
|
||||
mov ecx,(_end-_start)/ll_struc_size
|
||||
align 4
|
||||
cycle0:
|
||||
push ecx
|
||||
|
||||
;the macros making way /current path a program/ + name system library
|
||||
copy_path library_name__, cur_dir_path__, library_path__,point_dir_name__
|
||||
|
||||
mcall 68,19,library_path__ ; load of alternative
|
||||
test eax,eax
|
||||
jnz end_steep
|
||||
|
||||
mcall 68,19,system_path__ ; load of sys directory
|
||||
test eax,eax
|
||||
jnz end_steep
|
||||
or status_lib,1 ; status of code - enable error - not found library
|
||||
|
||||
push eax
|
||||
push dword err_message_found_lib__
|
||||
push dword head_f_l__
|
||||
call l_lib_init_error_window
|
||||
jmp cycle0n
|
||||
|
||||
align 4
|
||||
lp: push ecx
|
||||
|
||||
copy_path library_name__, cur_dir_path__, library_path__,point_dir_name__ ;the macros making way /current pach a program/+ name system library
|
||||
|
||||
mcall 68,19,library_path__ ; load of alternative
|
||||
test eax,eax
|
||||
jnz end_steep
|
||||
|
||||
mcall 68,19,system_path__ ; load of sys directory
|
||||
test eax,eax
|
||||
jnz end_steep
|
||||
|
||||
or status_lib,0x1 ; status of code - enable error - not found library
|
||||
|
||||
show_error_window err_message_found_lib__, head_f_l__ ;show error message /create window
|
||||
jmp next
|
||||
end_steep:
|
||||
mov adr_load_lib,eax ;save adr lib in memory
|
||||
import_boxlib my_import
|
||||
test eax,eax
|
||||
jz cycle0n
|
||||
or status_lib,2 ; status of code - enable error - import error
|
||||
push eax
|
||||
push dword err_message_import__
|
||||
push dword head_f_i__
|
||||
call l_lib_init_error_window
|
||||
cycle0n:
|
||||
pop ecx
|
||||
add ebp,ll_struc_size
|
||||
dec ecx
|
||||
jnz cycle0
|
||||
|
||||
;<3B>뢮<EFBFBD> ᮮ<>饭<EFBFBD><E9A5AD> <20><> <20>訡<EFBFBD><E8A8A1> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>㧪<EFBFBD>
|
||||
mov ebp,_start
|
||||
mov ecx,(_end-_start)/ll_struc_size
|
||||
align 4
|
||||
end_steep:
|
||||
mov adr_load_lib,eax ;save adr lib in memory
|
||||
|
||||
import_boxlib my_import, err_message_import__, head_f_i__ ;import
|
||||
|
||||
test eax,eax
|
||||
jz next
|
||||
|
||||
or status_lib,0x2 ; status of code - enable error - import error
|
||||
|
||||
next:
|
||||
pop ecx
|
||||
add ebp,ll_struc_size
|
||||
dec ecx
|
||||
jnz lp
|
||||
|
||||
;-----------------------------------------------
|
||||
mov ebp,_start
|
||||
mov ecx,((_end-_start)/ll_struc_size)
|
||||
|
||||
cycle1:
|
||||
mov eax,status_lib
|
||||
test eax,eax
|
||||
jz cycle1n
|
||||
notify_window_run [arrea_xx] ; ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> @notify
|
||||
mov eax,-1
|
||||
jmp cycle1e
|
||||
align 4
|
||||
lp2:
|
||||
mov eax,status_lib
|
||||
test eax,eax
|
||||
jz @f
|
||||
|
||||
notify_window_run [arrea_xx] ; ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> @notify
|
||||
or eax,-1
|
||||
jmp exit_lp2
|
||||
|
||||
@@:
|
||||
add ebp,ll_struc_size
|
||||
dec ecx
|
||||
jnz lp2
|
||||
exit_lp2:
|
||||
|
||||
cycle1n:
|
||||
add ebp,ll_struc_size
|
||||
dec ecx
|
||||
jnz cycle1
|
||||
cycle1e:
|
||||
}
|
||||
|
||||
|
||||
@@ -468,41 +512,6 @@ pushad ;save all registers
|
||||
popad ;restore all registers
|
||||
}
|
||||
|
||||
; <20><>⮢<EFBFBD><E2AEA2> ⥪<><E2A5AA> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>१ @notify:
|
||||
; 1) <20>뤥<EFBFBD>塞 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> [arrea_xx]
|
||||
; 2) <20><><EFBFBD><EFBFBD><EFBFBD>㥬 err_message <20> head <20> [arrea_xx]
|
||||
macro show_error_window err_message, head
|
||||
{
|
||||
local lp0
|
||||
local lp1
|
||||
|
||||
pushad
|
||||
mcall 68,11
|
||||
mcall 68,12,4096
|
||||
push eax
|
||||
pop dword[arrea_xx]
|
||||
|
||||
mov edi,eax
|
||||
mov esi,head
|
||||
cld
|
||||
align 4
|
||||
lp0:
|
||||
movsb
|
||||
cmp byte[esi],0
|
||||
jne lp0
|
||||
mov word[edi],0xa0d
|
||||
add edi,2
|
||||
mov esi,dword err_message
|
||||
align 4
|
||||
lp1:
|
||||
movsb
|
||||
cmp byte[esi],0
|
||||
jne lp1
|
||||
mov byte[edi],0
|
||||
popad
|
||||
or eax,-1 ;<3B><><EFBFBD>
|
||||
}
|
||||
|
||||
; <20><><EFBFBD><EFBFBD>砥<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> ᮮ<>饭<EFBFBD><E9A5AD> <20><>१ @notify:
|
||||
macro notify_window_run message
|
||||
{
|
||||
@@ -516,10 +525,12 @@ pop ebx eax
|
||||
}
|
||||
|
||||
|
||||
;<EFBFBD>室<EFBFBD><EFBFBD><EFBFBD> <20><>ࠬ<EFBFBD><E0A0AC><EFBFBD><EFBFBD>:
|
||||
;eax - <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
;myimport - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㥬<EFBFBD><E3A5AC> <20>㭪樨
|
||||
macro import_boxlib myimport, err_message_import__, head_f_i__
|
||||
;input:
|
||||
; eax - <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
; myimport - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㥬<EFBFBD><E3A5AC> <20>㭪樨
|
||||
;output:
|
||||
; eax - <20> 㤠筮 <20><> 0 <20><><EFBFBD> 㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><><EFBFBD> <20>㭪樨 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> 㤠<><E3A4A0><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>㧨<EFBFBD><E3A7A8>
|
||||
macro import_boxlib myimport
|
||||
{
|
||||
local import_loop
|
||||
local import_find
|
||||
@@ -528,7 +539,6 @@ local import_find_next
|
||||
local import_found
|
||||
local import_done
|
||||
local exit
|
||||
local e.exit
|
||||
local import_not_found
|
||||
; initialize import
|
||||
|
||||
@@ -540,13 +550,13 @@ import_loop:
|
||||
jz import_done ;<3B> 㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><><EFBFBD> <20>㭪樨 = 0 (<28> <20><><EFBFBD>짮<EFBFBD><ECA7AE>⥫<EFBFBD><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC>)
|
||||
push edx ;<3B><><EFBFBD>࠭塞 <20><>砫<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 㪠<><E3AAA0>⥫<EFBFBD><E2A5AB> <20><> <20>㭪樨
|
||||
import_find:
|
||||
mov ebx, [ds:edx]
|
||||
mov ebx, [edx]
|
||||
test ebx, ebx
|
||||
jz import_not_found ;<3B> 㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><><EFBFBD> <20>㭪樨 = 0 (<28> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD>)
|
||||
push eax ;eax - 㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><><EFBFBD> <20><>ᯮ<EFBFBD><E1AFAE><EFBFBD><EFBFBD>㥬<EFBFBD><E3A5AC> <20>㭪樨 (<28> <20><><EFBFBD>짮<EFBFBD><ECA7AE>⥫<EFBFBD><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC>)
|
||||
lp:
|
||||
mov cl, [ds:eax]
|
||||
cmp cl, [ds:ebx] ;<3B>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20>㭪権 <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD> <20> <20> <20><><EFBFBD>짮<EFBFBD><ECA7AE>⥫<EFBFBD><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC>
|
||||
mov cl, [eax]
|
||||
cmp cl, [ebx] ;<3B>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20>㭪権 <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD> <20> <20> <20><><EFBFBD>짮<EFBFBD><ECA7AE>⥫<EFBFBD><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC>
|
||||
jnz import_find_next ;<3B> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> ᮢ<><E1AEA2><EFBFBD><EFBFBD>
|
||||
test cl, cl
|
||||
jz import_found ;<3B> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᮢ<><E1AEA2><EFBFBD><EFBFBD>, <20> 㦥 <20><><EFBFBD><EFBFBD><EFBFBD> <20><>ப<EFBFBD> (cl=0)
|
||||
@@ -559,7 +569,7 @@ import_find_next:
|
||||
jmp import_find
|
||||
import_found:
|
||||
pop ebx ;<3B><><EFBFBD>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><><EFBFBD> <20>㭪樨 (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20> eax) <20> <20><EFBFBD><E1A2AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>⥪
|
||||
mov eax, [ds:edx+4] ;eax = 㪠<><E3AAA0>⥫<EFBFBD> <20><> <20>㭪<EFBFBD><E3ADAA><EFBFBD> (<28> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD>)
|
||||
mov eax, [edx+4] ;eax = 㪠<><E3AAA0>⥫<EFBFBD> <20><> <20>㭪<EFBFBD><E3ADAA><EFBFBD> (<28> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD>)
|
||||
mov [esi-4], eax ;<3B><><EFBFBD><EFBFBD><EFBFBD>㥬 㪠<><E3AAA0>⥫<EFBFBD> (<28><> <20>㭪<EFBFBD><E3ADAA><EFBFBD>) <20> <20>ணࠬ<E0AEA3><E0A0AC>, -4 <20>⠢<EFBFBD><E2A0A2> <20><>⮬<EFBFBD> <20><><EFBFBD> esi <20>뫮 ᤢ<><E1A4A2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> lodsd
|
||||
pop edx ;<3B><>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> edx <20><> <20><>砫<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>㭪権
|
||||
;--- <20><EFBFBD><E0AEA2>塞 ᮢ<><E1AEA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <20><>ᯮ<EFBFBD><E1AFAE><EFBFBD><EFBFBD><E0AEA2><EFBFBD><EFBFBD><EFBFBD> <20>㭪樨 <20> 'lib_init'
|
||||
@@ -585,13 +595,13 @@ end if
|
||||
jmp import_loop
|
||||
import_not_found:
|
||||
add esp,4
|
||||
show_error_window err_message_import__, head_f_i__ ;show error message /create window
|
||||
jmp e.exit
|
||||
jmp exit
|
||||
import_done:
|
||||
xor eax,eax ;=0 <20><><EFBFBD> <20><><EFBFBD><EFBFBD>㧨<EFBFBD><E3A7A8><EFBFBD><EFBFBD> 㤠筮
|
||||
e.exit:
|
||||
exit:
|
||||
}
|
||||
;---------------------------------------------------------------------
|
||||
}
|
||||
|
||||
ll_struc_size = 48;($-library_name__) ; constant size of struct
|
||||
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
|
||||
{
|
||||
@@ -607,11 +617,11 @@ struc l_libs library_name__, cur_dir_path__, library_path__, system_path__, err_
|
||||
.err_message_import__ dd err_message_import__
|
||||
.head_f_i__ dd head_f_i__
|
||||
if point_dir_name eq
|
||||
.point_dir_name__ dd 0x0
|
||||
.point_dir_name__ dd 0
|
||||
else
|
||||
.point_dir_name__ dd point_dir_name ; <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>४<EFBFBD><E0A5AA>ਨ <20> <20><><EFBFBD>ன <20>࠭<EFBFBD><E0A0AD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>㦠<EFBFBD><E3A6A0><EFBFBD><EFBFBD> <20><><EFBFBD>㫨.
|
||||
end if
|
||||
.adr_load_lib dd 0x0
|
||||
.status_lib dd 0x0 ;status of load library
|
||||
.adr_load_lib dd 0
|
||||
.status_lib dd 0 ;status of load library
|
||||
;
|
||||
}
|
||||
|
Reference in New Issue
Block a user