Rev 109 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 109 | Rev 135 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | ; Written in pure assembler by Ivushkin Andrey aka Willow |
2 | ; Written in pure assembler by Ivushkin Andrey aka Willow |
3 | ; |
3 | ; |
4 | ; Uses GIF_LITE 2.0 |
4 | ; Uses GIF_LITE 2.0 |
5 | ; |
5 | ; |
6 | ; Created: August 31, 2004 |
6 | ; Created: August 31, 2004 |
7 | ; Last changed: September 9, 2004 |
7 | ; Last changed: August 25, 2006 |
8 | ; |
8 | ; |
9 | ; COMPILE WITH FASM |
9 | ; COMPILE WITH FASM |
Line 10... | Line 10... | ||
10 | 10 | ||
11 | WND_COLOR equ 0x02aabbcc |
11 | WND_COLOR equ 0x02aabbcc |
Line 48... | Line 48... | ||
48 | mov [imgcount],eax |
48 | mov [imgcount],eax |
49 | mov esi,fn_input |
49 | mov esi,fn_input |
50 | mov edi,filename |
50 | mov edi,filename |
51 | mov ecx,[inp_pos] |
51 | mov ecx,[inp_pos] |
52 | rep movsb |
52 | rep movsb |
53 | mov byte[edi],al |
53 | stosb |
54 | openfile2: |
54 | openfile2: |
55 | mov eax,58 |
55 | mov eax,70 |
56 | mov ebx,file_info |
56 | mov ebx,file_info |
57 | int 0x40 |
57 | int 0x40 |
58 | cmp eax,6 |
58 | cmp eax,6 |
59 | je temp |
59 | je temp |
60 | test eax,eax |
60 | test eax,eax |
61 | jnz ok2 |
61 | jnz ok2 |
62 | temp: |
62 | temp: |
63 | cmp ebx,64 |
63 | ; cmp ebx,64 |
64 | jbe ok2 |
64 | ; jbe ok2 |
Line 65... | Line 65... | ||
65 | 65 | ||
66 | and [entered],0 |
66 | and [entered],0 |
67 | xor eax,eax |
67 | xor eax,eax |
68 | mov [imgcount],eax |
68 | mov [imgcount],eax |
69 | mov esi,filename |
69 | mov esi,filename |
70 | mov edi,fn_input |
70 | mov edi,fn_input |
71 | mov ecx,256 ;[filename_len] |
71 | mov ecx,256/4 ;[filename_len] |
Line 72... | Line 72... | ||
72 | rep movsb |
72 | rep movsd |
73 | 73 | ||
74 | mov edi,fn_input |
74 | mov edi,fn_input |
75 | mov ecx,50 |
75 | mov ecx,256 |
76 | xor eax,eax |
76 | xor eax,eax |
77 | repne scasb |
77 | repne scasb |
78 | sub edi,fn_input |
78 | sub edi,fn_input |
Line 99... | Line 99... | ||
99 | red: |
99 | red: |
Line 100... | Line 100... | ||
100 | 100 | ||
Line 101... | Line 101... | ||
101 | call draw_window |
101 | call draw_window |
- | 102 | ||
- | 103 | still: |
|
- | 104 | cmp [imgcount], 1 |
|
- | 105 | jnz .delay |
|
- | 106 | mov eax, 10 |
|
- | 107 | int 0x40 |
|
102 | 108 | jmp @f |
|
103 | still: |
109 | .delay: |
104 | mov ebx,DELAY |
110 | mov ebx,DELAY |
105 | mov eax,23 |
111 | mov eax,23 |
106 | int 0x40 |
112 | int 0x40 |
107 | 113 | @@: |
|
108 | cmp eax,1 |
114 | dec eax |
109 | je red |
115 | jz red |
110 | cmp eax,2 |
116 | dec eax |
111 | je key |
117 | jz key |
112 | cmp eax,3 |
118 | dec eax |
113 | je button |
119 | jz button |
114 | mov eax,[imgcount] |
120 | mov eax,[imgcount] |
115 | cmp eax,1 |
121 | cmp eax,1 |
116 | je still |
122 | je still |
Line 165... | Line 171... | ||
165 | backsp: |
171 | backsp: |
166 | test edi,edi |
172 | test edi,edi |
167 | jz wait_input |
173 | jz wait_input |
168 | dec [inp_pos] |
174 | dec [inp_pos] |
169 | jmp wait_input |
175 | jmp wait_input |
170 | jmp still |
176 | ; jmp still |
Line 171... | Line 177... | ||
171 | 177 | ||
172 | ;**************************************** |
178 | ;**************************************** |
173 | ;******* DRAW CONTENTS OF INPUT LINE **** |
179 | ;******* DRAW CONTENTS OF INPUT LINE **** |
174 | ;**************************************** |
180 | ;**************************************** |
Line 288... | Line 294... | ||
288 | rb 256-(inp_end-fn_input) |
294 | rb 256-(inp_end-fn_input) |
Line 289... | Line 295... | ||
289 | 295 | ||
290 | file_info: |
296 | file_info: |
291 | dd 0 |
297 | dd 0 |
- | 298 | dd 0 |
|
292 | dd 0 |
299 | dd 0 |
293 | dd 0x100000/512;0x200000 |
- | |
294 | dd workarea |
300 | dd 0x100000;0x200000 |
295 | dd Image;0x100000 |
301 | dd workarea;0x100000 |
296 | I_END: ; ª®¥æ ¯à®£à ¬¬ë |
302 | I_END: ; ª®¥æ ¯à®£à ¬¬ë |
297 | filename: |
303 | filename: |
298 | ; db '/hd/1/gif/smileys/sm112000.gif',0 |
304 | ; db '/hd/1/gif/smileys/sm112000.gif',0 |
299 | ; db '/hd/1/gif/test.gif',0 |
305 | ; db '/hd/1/gif/test.gif',0 |
300 | ; db '/hd/1/gif/explode1.gif',0 |
306 | ; db '/hd/1/gif/explode1.gif',0 |
301 | ; db '/hd/1/gif/tapeta.gif',0 |
307 | ; db '/hd/1/gif/tapeta.gif',0 |
302 | ; db '/hd/1/gif/meos.gif',0 |
308 | ; db '/hd/1/gif/meos.gif',0 |
303 | rb 256 |
309 | rb 257 |
304 | ;filename_len dd 0 |
310 | ;filename_len dd 0 |
Line 305... | Line 311... | ||
305 | entered rd 1 |
311 | entered rd 1 |
306 | 312 |