Code optimisations

This commit is contained in:
pagefault
2001-09-07 23:33:19 +00:00
parent 8d3423737e
commit d7151e66d1
4 changed files with 44 additions and 22 deletions

View File

@@ -251,7 +251,8 @@ NEWSYM copy640x480x16bwin
.fslloop .fslloop
mov dword[edi],0 mov dword[edi],0
add edi,4 add edi,4
loop .fslloop dec ecx
jnz .fslloop
add edi,[AddEndBytes] add edi,[AddEndBytes]
inc ebx inc ebx
dec dl dec dl
@@ -844,7 +845,8 @@ Process2xSaIwin:
.nextb .nextb
mov dword[ebx],0FFFFFFFFh mov dword[ebx],0FFFFFFFFh
add ebx,4 add ebx,4
loop .nextb dec ecx
jnz .nextb
pop ebx pop ebx
jmp .returninterp jmp .returninterp
.ignorehr .ignorehr
@@ -896,7 +898,8 @@ Process2xSaIwin:
.loop .loop
mov dword[es:edi],0 mov dword[es:edi],0
add edi,4 add edi,4
loop .loop dec ecx
jnz .loop
pop es pop es
emms emms
ret ret
@@ -1091,7 +1094,8 @@ MMXInterpolwin:
.fslloop .fslloop
mov dword[edi],0 mov dword[edi],0
add edi,4 add edi,4
loop .fslloop dec ecx
jnz .fslloop
add edi,[AddEndBytes] add edi,[AddEndBytes]
inc ebx inc ebx
mov ecx,64 mov ecx,64
@@ -1282,7 +1286,8 @@ NEWSYM interpolate640x480x16bwin
add esi,2 add esi,2
add edi,4 add edi,4
add edx,4 add edx,4
loop .a dec ecx
jnz .a
add esi,66 add esi,66
add edi,[AddEndBytes] add edi,[AddEndBytes]
add edi,4 add edi,4
@@ -1314,7 +1319,8 @@ NEWSYM interpolate640x480x16bwin
add esi,2 add esi,2
add edi,4 add edi,4
add edx,4 add edx,4
loop .c dec ecx
jnz .c
add edi,4 add edi,4
add edi,[AddEndBytes] add edi,[AddEndBytes]
mov edx,[spritetablea] mov edx,[spritetablea]
@@ -1324,7 +1330,8 @@ NEWSYM interpolate640x480x16bwin
mov [edi],eax mov [edi],eax
add edx,4 add edx,4
add edi,4 add edi,4
loop .d dec ecx
jnz .d
add esi,66 add esi,66
inc dword[InterPtr] inc dword[InterPtr]
add edi,[AddEndBytes] add edi,[AddEndBytes]
@@ -1384,7 +1391,8 @@ NEWSYM interpolate640x480x16bwin
.fslloop .fslloop
mov dword[edi],0 mov dword[edi],0
add edi,4 add edi,4
loop .fslloop dec ecx
jnz .fslloop
add edi,[AddEndBytes] add edi,[AddEndBytes]
inc ebx inc ebx
dec dl dec dl
@@ -1421,7 +1429,8 @@ NEWSYM interpolate640x480x16bwin
.fslloop2 .fslloop2
mov dword[edi],0 mov dword[edi],0
add edi,4 add edi,4
loop .fslloop2 dec ecx
jnz .fslloop2
add edi,[AddEndBytes] add edi,[AddEndBytes]
dec byte[lineleft] dec byte[lineleft]
jnz near .loopab jnz near .loopab

View File

@@ -654,7 +654,8 @@ NEWSYM Get_Dir
;.noslash ;.noslash
mov [eax],dl mov [eax],dl
inc eax inc eax
loop .loop dec ecx
jnz .loop
popad popad
ret ret
@@ -897,7 +898,8 @@ NEWSYM vidpastecopyscr ; GUI screen render
mov bx,[GUICPC+ebx*2] mov bx,[GUICPC+ebx*2]
mov [eax+edx*2],bx mov [eax+edx*2],bx
dec edx dec edx
loop .loop dec ecx
jnz .loop
.no16bconv .no16bconv
popad popad
jmp DrawScreen jmp DrawScreen

View File

@@ -251,7 +251,8 @@ NEWSYM copy640x480x16bwin
.fslloop .fslloop
mov dword[edi],0 mov dword[edi],0
add edi,4 add edi,4
loop .fslloop dec ecx
jnz .fslloop
add edi,[AddEndBytes] add edi,[AddEndBytes]
inc ebx inc ebx
dec dl dec dl
@@ -844,7 +845,8 @@ Process2xSaIwin:
.nextb .nextb
mov dword[ebx],0FFFFFFFFh mov dword[ebx],0FFFFFFFFh
add ebx,4 add ebx,4
loop .nextb dec ecx
jnz .nextb
pop ebx pop ebx
jmp .returninterp jmp .returninterp
.ignorehr .ignorehr
@@ -896,7 +898,8 @@ Process2xSaIwin:
.loop .loop
mov dword[es:edi],0 mov dword[es:edi],0
add edi,4 add edi,4
loop .loop dec ecx
jnz .loop
pop es pop es
emms emms
ret ret
@@ -1091,7 +1094,8 @@ MMXInterpolwin:
.fslloop .fslloop
mov dword[edi],0 mov dword[edi],0
add edi,4 add edi,4
loop .fslloop dec ecx
jnz .fslloop
add edi,[AddEndBytes] add edi,[AddEndBytes]
inc ebx inc ebx
mov ecx,64 mov ecx,64
@@ -1282,7 +1286,8 @@ NEWSYM interpolate640x480x16bwin
add esi,2 add esi,2
add edi,4 add edi,4
add edx,4 add edx,4
loop .a dec ecx
jnz .a
add esi,66 add esi,66
add edi,[AddEndBytes] add edi,[AddEndBytes]
add edi,4 add edi,4
@@ -1314,7 +1319,8 @@ NEWSYM interpolate640x480x16bwin
add esi,2 add esi,2
add edi,4 add edi,4
add edx,4 add edx,4
loop .c dec ecx
jnz .c
add edi,4 add edi,4
add edi,[AddEndBytes] add edi,[AddEndBytes]
mov edx,[spritetablea] mov edx,[spritetablea]
@@ -1324,7 +1330,8 @@ NEWSYM interpolate640x480x16bwin
mov [edi],eax mov [edi],eax
add edx,4 add edx,4
add edi,4 add edi,4
loop .d dec ecx
jnz .d
add esi,66 add esi,66
inc dword[InterPtr] inc dword[InterPtr]
add edi,[AddEndBytes] add edi,[AddEndBytes]
@@ -1384,7 +1391,8 @@ NEWSYM interpolate640x480x16bwin
.fslloop .fslloop
mov dword[edi],0 mov dword[edi],0
add edi,4 add edi,4
loop .fslloop dec ecx
jnz .fslloop
add edi,[AddEndBytes] add edi,[AddEndBytes]
inc ebx inc ebx
dec dl dec dl
@@ -1421,7 +1429,8 @@ NEWSYM interpolate640x480x16bwin
.fslloop2 .fslloop2
mov dword[edi],0 mov dword[edi],0
add edi,4 add edi,4
loop .fslloop2 dec ecx
jnz .fslloop2
add edi,[AddEndBytes] add edi,[AddEndBytes]
dec byte[lineleft] dec byte[lineleft]
jnz near .loopab jnz near .loopab

View File

@@ -818,7 +818,8 @@ NEWSYM Get_Dir
.noslash .noslash
mov [eax],dl mov [eax],dl
inc eax inc eax
loop .loop dec ecx
jnz .loop
popad popad
push edx push edx
call _getdrive call _getdrive
@@ -1183,7 +1184,8 @@ NEWSYM vidpastecopyscr ; GUI screen render
mov bx,[GUICPC+ebx*2] mov bx,[GUICPC+ebx*2]
mov [eax+edx*2],bx mov [eax+edx*2],bx
dec edx dec edx
loop .loop dec ecx
jnz .loop
.no16bconv .no16bconv
popad popad
jmp DrawScreen jmp DrawScreen