fix: correction dans la fonction "decompressrle" Modifications de "projfile" et de "execfile" afin de pouvoir gérer les appels récurant en libraire.

This commit is contained in:
Nicolas Hordé 2007-03-28 21:28:44 +00:00
parent ab40064c1f
commit db544a7cbe
1 changed files with 27 additions and 15 deletions

View File

@ -158,17 +158,19 @@ PROC execfile FAR
ARG @file:word ARG @file:word
pushad pushad
push ds es fs gs push ds es fs gs
call projfile,[@file] mov di,[@file]
jc @@reallyerrornoblock call uppercase,di
call projfile,di
;jc @@reallyerrornoblock
call [cs:mbfind],di
jc @@reallyerror
call [cs:mbchown],ax,[word ptr ss:bp+4] call [cs:mbchown],ax,[word ptr ss:bp+4]
jc @@reallyerror jc @@reallyerror
call [cs:mbloadfuncs],ax
jc @@reallyerror
call [cs:mbloadsection],ax
jc @@reallyerror
push ax
push ax push ax
pop ds pop ds
cmp [ds:0x0],'EC'
jne @@reallyerror
push ax
push cs push cs
push offset @@arrive push offset @@arrive
push ds push ds
@ -191,9 +193,10 @@ PROC execfile FAR
sti sti
db 0CBh db 0CBh
@@arrive: @@arrive:
cli ;cli
pop ax ;pop ax
call [cs:mbfree],ax ;call [cs:mbfree],ax
call [cs:mbfree]
pop gs fs es ds pop gs fs es ds
popad popad
clc clc
@ -208,8 +211,8 @@ PROC execfile FAR
endp execfile endp execfile
;============projfile (Fonction 17)=============== ;============projfile (Fonction 17)===============
;Charge le fichier ds:%0 sur un bloc mémoire -> eax taille -> es bloc ;Charge le fichier ds:%0 sur un bloc mémoire -> eax taille
;-> ax bloc mémoire ;-> eax taille fichier
;<- Flag Carry si erreur ;<- Flag Carry si erreur
;===================================================== ;=====================================================
PROC projfile FAR PROC projfile FAR
@ -236,12 +239,20 @@ USES cx,si,di,ds,es
mov eax,[es:(find di).result.filesize] mov eax,[es:(find di).result.filesize]
call [cs:mbcreate],di,ax call [cs:mbcreate],di,ax
jc @@errorload jc @@errorload
call [cs:mbchown],ax,[word ptr ss:bp+4]
jc @@errorload
mov ds,ax mov ds,ax
mov cx,[es:(find di).result.filegroup] mov cx,[es:(find di).result.filegroup]
mov eax,[es:(find di).result.filesize] mov eax,[es:(find di).result.filesize]
call loadway,cx,eax,0 call loadway,cx,eax,0
jc @@errorload jc @@errorload
mov ax,ds cmp [ds:0x0],'EC'
jne @@notace
call [cs:mbloadfuncs],ds
jc @@errorload
call [cs:mbloadsection],ds
jc @@errorload
@@notace:
clc clc
ret ret
@@errorload: @@errorload:
@ -364,7 +375,7 @@ PROC cmpnames FAR
jmp @@itok jmp @@itok
endp cmpnames endp cmpnames
;charge le fichier de de groupe CX et de taille eax ;charge le fichier de de groupe %0 et de taille %1
PROC loadway NEAR PROC loadway NEAR
ARG @sector:word,@size:dword,@offset:word ARG @sector:word,@size:dword,@offset:word
USES eax,bx,cx,dx,si,di,ds,es USES eax,bx,cx,dx,si,di,ds,es
@ -871,7 +882,7 @@ invert:
;===================================================== ;=====================================================
PROC decompressrle FAR PROC decompressrle FAR
ARG @seg1:word,@off1:word,@seg2:word,@off2:word,@size:word ARG @seg1:word,@off1:word,@seg2:word,@off2:word,@size:word
USES ax,cx,dx,si,di,ds,es USES ecx,dx,si,di,ds,es
mov ds,[@seg1] mov ds,[@seg1]
mov es,[@seg2] mov es,[@seg2]
mov si,[@off1] mov si,[@off1]
@ -906,6 +917,7 @@ PROC decompressrle FAR
dec dx dec dx
jnz @@decompression jnz @@decompression
@@thenen: @@thenen:
xor eax,eax
mov ax,di mov ax,di
sub ax,[@off2] sub ax,[@off2]
clc clc