Correcting the "RAW to RAW" module to new invoke.

git-svn-id: svn://kolibrios.org@1956 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2011-06-13 16:59:37 +00:00
parent ec36dbd452
commit eafcca76fb
2 changed files with 33 additions and 31 deletions

View File

@ -145,9 +145,10 @@ convert:
;------------------------------- ;-------------------------------
; xor eax,eax ; xor eax,eax
; mov [raw_pointer_2],eax ; mov [raw_pointer_2],eax
mov eax,image_file ; mov eax,image_file
; call [plugin_convert] ; call [plugin_convert]
call [convert_Start] push dword image_file
call [convert_Start]
mov ebx,[raw_pointer] mov ebx,[raw_pointer]
mov eax,[ebx+12] mov eax,[ebx+12]

View File

@ -41,11 +41,12 @@ include '../../../../macros.inc'
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
START: START:
pushad pushad
mov eax,dword [esp+36]
mov [pointer],eax mov [pointer],eax
mov eax,[eax+4] mov eax,[eax+4]
mov [image_file],eax mov [image_file],eax
mov esi,[eax+28] mov esi,[eax+28]
add esi,eax add esi,eax
mov edi,esi mov edi,esi
mov ecx,[eax+32] mov ecx,[eax+32]
; xor ebx,ebx ; xor ebx,ebx
@ -80,7 +81,7 @@ START:
@@: @@:
popad popad
ret ret 4
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
.less_8b: .less_8b:
mov edx,[image_file] mov edx,[image_file]
@ -94,8 +95,8 @@ START:
mov eax,ecx mov eax,ecx
shr ecx,2 shr ecx,2
test eax,3 test eax,3
jz @f jz @f
inc ecx inc ecx
@@: @@:
mov esi,[raw_area] mov esi,[raw_area]
mov edi,[image_file] mov edi,[image_file]
@ -109,15 +110,15 @@ START:
mov ebx,[pointer] mov ebx,[pointer]
mov [ebx+4],eax mov [ebx+4],eax
popad popad
ret ret 4
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
.16b: .16b:
cmp [eax+18],word 3 cmp [eax+18],word 3
je @f ;.convert_16_in_8 je @f ;.convert_16_in_8
cmp [eax+18],word 4 cmp [eax+18],word 4
jne .16b_1 jne .16b_1
@@: @@:
xor ebx,ebx xor ebx,ebx
mov bx,[eax+18] mov bx,[eax+18]
xchg eax,ecx xchg eax,ecx
@ -128,7 +129,7 @@ START:
shr ecx,1 shr ecx,1
mov [eax+16],word 8 mov [eax+16],word 8
mov ebx,[eax+12] mov ebx,[eax+12]
shr ebx,1 shr ebx,1
mov [eax+12],ebx mov [eax+12],ebx
@ -160,29 +161,29 @@ START:
jmp .16b_end jmp .16b_end
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
.16b_1: .16b_1:
cmp [eax+18],word 1 cmp [eax+18],word 1
je @f ;.convert_16_in_8_1 je @f ;.convert_16_in_8_1
cmp [eax+18],word 2 cmp [eax+18],word 2
jne .16b_end jne .16b_end
@@: @@:
shr ecx,1 shr ecx,1
mov [eax+16],word 8 mov [eax+16],word 8
mov ebx,[eax+12] mov ebx,[eax+12]
shr ebx,1 shr ebx,1
mov [eax+12],ebx mov [eax+12],ebx
.convert_16_in_8_1: .convert_16_in_8_1:
cld cld
lodsw lodsw
; shr ax,8 ; shr ax,8
; mov al,ah ; mov al,ah
stosb stosb
dec ecx dec ecx
jnz .convert_16_in_8_1 jnz .convert_16_in_8_1
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
.16b_end: .16b_end:
xor eax,eax xor eax,eax
mov [raw_area],eax mov [raw_area],eax
jmp .ret_ok jmp .ret_ok
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
@ -213,14 +214,14 @@ START:
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
.2b: .2b:
call .get_memory call .get_memory
; jmp .ret_ok ; jmp .ret_ok
; shr ecx,1 ; shr ecx,1
mov edx,ebx mov edx,ebx
mov eax,ebx mov eax,ebx
shr ebx,2 shr ebx,2
test eax,3 test eax,3
jz @f jz @f
inc ebx inc ebx
@@: @@:
mov ebp,ebx mov ebp,ebx
.2b_1: .2b_1:
@ -266,8 +267,8 @@ START:
mov eax,ebx mov eax,ebx
shr ebx,3 shr ebx,3
test eax,7 test eax,7
jz @f jz @f
inc ebx inc ebx
@@: @@:
mov ebp,ebx mov ebp,ebx
.1b_1: .1b_1:
@ -353,11 +354,11 @@ Convert24b:
mov eax,[eax+4] mov eax,[eax+4]
mov [image_file],eax mov [image_file],eax
mov esi,[eax+28] mov esi,[eax+28]
add esi,eax add esi,eax
mov ebp,[eax+20] mov ebp,[eax+20]
add ebp,eax add ebp,eax
mov ecx,[eax+4] mov ecx,[eax+4]
imul ecx,[eax+8] imul ecx,[eax+8]
@ -382,7 +383,7 @@ Convert24b:
mov eax,[raw_area] mov eax,[raw_area]
mov [ebx+20],eax ; store RAW pointer mov [ebx+20],eax ; store RAW pointer
popad popad
ret ret 4
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
.32b: .32b: