kolibrios-gitea/programs/media/animage/trunk/files.inc
heavyiron 4daae89053 *kernel - fixes in 15.2 by Mario79 and 67 by mike.dld
updated sysfunc.txt
*programs 
         new icons and logo for CPUID and ICON
         added new version of @ICON and ICONMNGR
         fixes in iconedit and calendar from DedOK
         new algoritm of fill background in pic4
         all apps (fasm-writen only) rewriten to use common macros.inc for easy recompile in fastcall mode (there is a bug in https; run need rewrite to use common macros.inc)
         small fixes in build_all.bat script
         

git-svn-id: svn://kolibrios.org@485 a494cfbc-eb01-0410-851d-a64ba20cac60
2007-05-10 13:48:35 +00:00

135 lines
3.5 KiB
PHP

;-----------------------------------------------------------
;-----------load heading of file in memory------------------
;-----------------------------------------------------------
load_heading_of_file:
mov [where_load_file],ebx
mov [full_file_path],eax
mov esi,[full_file_path]
mov edi,filepath
mov ecx,256
rep movsd
xor eax,eax
mov ecx,[where_load_file]
mov edx,filepath
mov [file_information],eax
mov [file_information+4],eax
mov [file_information+8],eax
mov [file_information+12],dword 512
mov [file_information+16],ecx
mov [file_information+20],al
mov [file_information+21],edx
mov eax,70
mov ebx,file_information
mcall
ret
;-----------------------------------------------------------
;--------load file in memory--------------------------------
;-----------------------------------------------------------
load_file:
mov [where_load_file],ebx
mov [full_file_path],eax
mov esi,[full_file_path]
mov edi,filepath
mov ecx,256
rep movsd
xor eax,eax
mov ebx,bufer_for_info
mov ecx,filepath
mov [file_information],dword 5
mov [file_information+4],eax
mov [file_information+8],eax
mov [file_information+12],eax
mov [file_information+16],ebx
mov [file_information+20],al
mov [file_information+21],ecx
mov eax,70
mov ebx,file_information
mcall
test eax,eax
jnz error_load_file
xor eax,eax
mov ebx,[bufer_for_info+32]
mov ecx,[where_load_file]
mov edx,filepath
mov [file_information],eax
mov [file_information+4],eax
mov [file_information+8],eax
mov [file_information+12],ebx
mov [file_information+16],ecx
mov [file_information+20],al
mov [file_information+21],edx
mov eax,70
mov ebx,file_information
mcall
error_load_file:
ret
;-----------------------------------------------------------
;---------------save in file from memory--------------------
;-----------------------------------------------------------
save_file:
mov [size_to_save],ecx
mov [pointer_to_data],ebx
mov [full_file_path],eax
mov esi,[full_file_path]
mov edi,filepath
mov ecx,256
rep movsd
xor eax,eax
mov ebx,[size_to_save]
mov ecx,[pointer_to_data]
mov edx,filepath
mov [file_information],dword 2
mov [file_information+4],eax
mov [file_information+8],eax
mov [file_information+12],ebx
mov [file_information+16],ecx
mov [file_information+20],al
mov [file_information+21],edx
mov eax,70
mov ebx,file_information
mcall
ret
;----------------------------------------------------------
;-------------file information structure-------------------
;----------------------------------------------------------
file_information:
dd 5
dd 0
dd 0
dd 0
dd bufer_for_info
dd 0
dd filepath
filepath rb 1040
bufer_for_info rd 10
full_file_path dd 0
where_load_file dd 0
size_to_save dd 0
pointer_to_data dd 0