Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 134 → Rev 135

/programs/media/gifview/trunk/gif_lite.inc
4,7 → 4,7
; This include file will contain functions to handle GIF image format
;
; Created: August 15, 2004
; Last changed: September 9, 2004
; Last changed: August 25, 2006
 
; Change COLOR_ORDER in your program
; if colors are displayed improperly
88,7 → 88,7
mov [.img_count],eax
inc eax
cmp dword[esi],'GIF8'
jne .er ; signature
jne .ex ; signature
mov ecx,[esi+0xa]
inc eax
add esi,0xd
123,7 → 123,7
jmp .block_skip
.noextblock:
cmp byte[edi],0x2c ; image beginning
jne .er
jne .ex
inc [.img_count]
inc edi
mov esi,[.cur_info]
211,9 → 211,6
call .Gif_output
pop ebx eax
jmp .add
.er:
pop edi
jmp .ex
.end:
mov eax,[.cur_info]
mov [eax],edi
/programs/media/gifview/trunk/gifview.asm
4,7 → 4,7
; Uses GIF_LITE 2.0
;
; Created: August 31, 2004
; Last changed: September 9, 2004
; Last changed: August 25, 2006
;
; COMPILE WITH FASM
 
50,9 → 50,9
mov edi,filename
mov ecx,[inp_pos]
rep movsb
mov byte[edi],al
stosb
openfile2:
mov eax,58
mov eax,70
mov ebx,file_info
int 0x40
cmp eax,6
60,8 → 60,8
test eax,eax
jnz ok2
temp:
cmp ebx,64
jbe ok2
; cmp ebx,64
; jbe ok2
 
and [entered],0
xor eax,eax
68,11 → 68,11
mov [imgcount],eax
mov esi,filename
mov edi,fn_input
mov ecx,256 ;[filename_len]
rep movsb
mov ecx,256/4 ;[filename_len]
rep movsd
 
mov edi,fn_input
mov ecx,50
mov ecx,256
xor eax,eax
repne scasb
sub edi,fn_input
101,16 → 101,22
call draw_window
 
still:
cmp [imgcount], 1
jnz .delay
mov eax, 10
int 0x40
jmp @f
.delay:
mov ebx,DELAY
mov eax,23
int 0x40
 
cmp eax,1
je red
cmp eax,2
je key
cmp eax,3
je button
@@:
dec eax
jz red
dec eax
jz key
dec eax
jz button
mov eax,[imgcount]
cmp eax,1
je still
167,7 → 173,7
jz wait_input
dec [inp_pos]
jmp wait_input
jmp still
; jmp still
 
;****************************************
;******* DRAW CONTENTS OF INPUT LINE ****
290,9 → 296,9
file_info:
dd 0
dd 0
dd 0x100000/512;0x200000
dd workarea
dd Image;0x100000
dd 0
dd 0x100000;0x200000
dd workarea;0x100000
I_END: ; ª®­¥æ ¯à®£à ¬¬ë
filename:
; db '/hd/1/gif/smileys/sm112000.gif',0
300,7 → 306,7
; db '/hd/1/gif/explode1.gif',0
; db '/hd/1/gif/tapeta.gif',0
; db '/hd/1/gif/meos.gif',0
rb 256
rb 257
;filename_len dd 0
entered rd 1
 
/programs/media/gifview/trunk/macros.inc
123,8 → 123,10
end if
}
 
macro __mov reg,a { ; mike.dld
if ~a eq
macro __mov reg,a,b { ; mike.dld
if (~a eq)&(~b eq)
mpack reg,a,b
else if (~a eq)&(b eq)
mov reg,a
end if
}
141,10 → 143,6
 
 
 
 
 
 
 
; optimize the code for size
__regs fix <eax,ebx,ecx,edx,esi,edi,ebp,esp>
 
176,7 → 174,7
 
macro mov arg1,arg2
{
if (arg1 in __regs) & (arg2 eqtype 0)
if (arg1 in __regs) & ((arg2 eqtype 0) | (arg2 eqtype '0'))
if (arg2) = 0
xor arg1,arg1
else if (arg2) = 1