Rev 307 | Rev 1608 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 307 | Rev 1098 | ||
---|---|---|---|
Line 43... | Line 43... | ||
43 | @@: |
43 | @@: |
44 | inc esi |
44 | inc esi |
45 | jmp .next |
45 | jmp .next |
46 | .str_end: |
46 | .str_end: |
Line -... | Line 47... | ||
- | 47 | ||
- | 48 | ;;;;clean memory |
|
- | 49 | ||
- | 50 | mov ecx,dword [sf_buf.bmp_header] |
|
- | 51 | mov ebx,13 |
|
- | 52 | mov eax,68 |
|
- | 53 | mcall |
|
47 | 54 | ||
48 | ; ëç¨á«ï¥¬, ᪮«ìª® ¡ ©â 㦮 ¯à¨¡ ¢«ïâì ª ª ¦¤®© áâப¥, |
55 | ; ëç¨á«ï¥¬, ᪮«ìª® ¡ ©â 㦮 ¯à¨¡ ¢«ïâì ª ª ¦¤®© áâப¥, |
49 | ; ç⮡ë á«¥¤ãîé ï ¡ë« ¢ëà ¢¥ 4 ¡ ©â . |
56 | ; ç⮡ë á«¥¤ãîé ï ¡ë« ¢ëà ¢¥ 4 ¡ ©â . |
- | 57 | ; ¥§ã«ìâ â ¯®¬¥é ¥¬ ¢ edi. |
|
50 | ; ¥§ã«ìâ â ¯®¬¥é ¥¬ ¢ edi. |
58 | |
51 | xor edx,edx |
59 | xor edx,edx |
52 | movzx eax,word [scr_buf.width] ; eax = è¨à¨ ª à⨪¨ |
60 | movzx eax,word [scr_buf.width] ; eax = è¨à¨ ª à⨪¨ |
53 | lea eax,[eax*3] ; eax = ¡ ©â áâப㠪 à⨪¨ |
61 | lea eax,[eax*3] ; eax = ¡ ©â áâப㠪 à⨪¨ |
54 | movr ebx,4 ; ebx = 4 |
62 | mov ebx,4 ; ebx = 4 |
55 | mov edi,ebx ; edi = 4 |
63 | mov edi,ebx ; edi = 4 |
56 | div ebx ; eax = ¡ ©â áâப㠪 à⨪¨ div 4 edx = ¡ ©â... mod 4 |
64 | div ebx ; eax = ¡ ©â áâப㠪 à⨪¨ div 4 edx = ¡ ©â... mod 4 |
57 | sub edi,edx ; edi = ª®«¨ç¥á⢮ ¡ ©â |
65 | sub edi,edx ; edi = ª®«¨ç¥á⢮ ¡ ©â |
58 | test edx,edx |
66 | test edx,edx |
59 | jnz @f |
67 | jnz @f |
60 | xor edi,edi |
68 | xor edi,edi |
Line 61... | Line 69... | ||
61 | @@: |
69 | @@: |
62 | 70 | ||
63 | ; ¢ë¤¥«ï¥¬ ¯ ¬ïâì |
71 | ; ¢ë¤¥«ï¥¬ ¯ ¬ïâì |
- | 72 | ; mov ecx,[scr_buf.end_ptr] |
|
64 | mov ecx,[scr_buf.end_ptr] |
73 | ; mov [sf_buf.bmp_header],ecx |
65 | mov [sf_buf.bmp_header],ecx |
74 | |
66 | add ecx,0x36 |
75 | ; add ecx,0x36 |
67 | mov [sf_buf.bmp_area],ecx |
76 | ; mov [sf_buf.bmp_area],ecx |
68 | movsx ebx,word [scr_buf.width] |
77 | movsx ebx,word [scr_buf.width] |
69 | movsx edx,word [scr_buf.height] |
78 | movsx edx,word [scr_buf.height] |
70 | ;imul ebx,edx |
79 | ;imul ebx,edx |
71 | lea ebx,[ebx*3] |
80 | lea ebx,[ebx*3] |
72 | add ebx,edi |
81 | add ebx,edi |
- | 82 | imul ebx,edx |
|
73 | imul ebx,edx |
83 | mov ecx,ebx |
74 | add ecx,ebx |
84 | |
75 | mov [sf_buf.end],ecx |
85 | ; mov [sf_buf.end],ecx |
- | 86 | add ecx,0x36 |
|
76 | add ecx,4096 |
87 | mov ebx,12 |
- | 88 | mov eax,68 |
|
- | 89 | mcall |
|
- | 90 | ||
- | 91 | mov [sf_buf.bmp_header],eax |
|
77 | xor ebx,ebx |
92 | add eax,0x36 |
78 | inc ebx |
93 | mov [sf_buf.bmp_area],eax |
- | 94 | add eax,ecx |
|
Line 79... | Line 95... | ||
79 | movr eax,64 |
95 | sub eax,0x36 |
80 | int 0x40 |
96 | mov [sf_buf.end],eax |
81 | 97 | ||
82 | push edi |
98 | ; push edi |
- | 99 | ; § ¯®«ï¥¬ áâàãªâãàã ¤«ï á®åà ¥¨ï ä ©« |
|
83 | ; § ¯®«ï¥¬ áâàãªâãàã ¤«ï á®åà ¥¨ï ä ©« |
100 | mov ebp,fs_struc |
84 | mov edi,fs_struc |
101 | mov [ebp],dword 2 |
85 | mov [edi],dword 2 |
102 | |
86 | mov eax,[sf_buf.bmp_header] |
103 | mov eax,[sf_buf.bmp_header] |
87 | mov ebx,[sf_buf.end] |
104 | mov ebx,[sf_buf.end] |
88 | sub ebx,eax |
105 | sub ebx,eax |
Line 89... | Line 106... | ||
89 | mov [edi+12],ebx |
106 | mov [ebp+12],ebx |
90 | mov [edi+16],eax |
107 | mov [ebp+16],eax |
91 | mov [edi+21],dword file_name |
108 | mov [ebp+21],dword file_name |
92 | 109 | ||
93 | ; § ¯®«ï¥¬ § £®«®¢®ª bmp |
110 | ; § ¯®«ï¥¬ § £®«®¢®ª bmp |
94 | mov edi,[sf_buf.bmp_header] |
111 | mov ebp,[sf_buf.bmp_header] |
95 | mov [edi],word 'BM' |
112 | mov [ebp],word 'BM' |
96 | mov ebx,[sf_buf.end] |
113 | mov ebx,[sf_buf.end] |
97 | sub ebx,[sf_buf.bmp_area] |
114 | sub ebx,[sf_buf.bmp_area] |
98 | mov [edi+34],ebx ; à §¬¥à ª à⨪¨ |
115 | mov [ebp+34],ebx ; à §¬¥à ª à⨪¨ |
99 | mov [edi+10],dword 0x36 ; à §¬¥à § £®«®¢ª |
116 | mov [ebp+10],dword 0x36 ; à §¬¥à § £®«®¢ª |
100 | add ebx,0x36 |
117 | add ebx,0x36 |
101 | mov [edi+2],ebx ; à §¬¥à ä ©« |
118 | mov [ebp+2],ebx ; à §¬¥à ä ©« |
102 | mov [edi+14],dword 0x28 |
119 | mov [ebp+14],dword 0x28 |
103 | movzx eax,word [scr_buf.width] |
120 | movzx eax,word [scr_buf.width] |
104 | mov [edi+18],eax ; £®à¨§®â «ìë© à §¬¥à |
121 | mov [ebp+18],eax ; £®à¨§®â «ìë© à §¬¥à |
105 | movzx eax,word [scr_buf.height] |
122 | movzx eax,word [scr_buf.height] |
106 | mov [edi+22],eax ; ¢¥à⨪«ìë© à §¬¥à |
123 | mov [ebp+22],eax ; ¢¥à⨪«ìë© à §¬¥à |
107 | mov [edi+26],word 1 |
124 | mov [ebp+26],word 1 |
108 | mov [edi+28],word 24 |
- | |
109 | 125 | mov [ebp+28],word 24 |
|
110 | ; ª®¯¨à㥬 ¨ ¯¥à¥¢®à 稢 ¥¬ |
- | |
111 | ; mov esi,[scr_buf.ptr] |
126 | |
112 | ; mov edi,[sf_buf.bmp_area] |
- | |
113 | ; mov edx,[sf_buf.end] |
- | |
114 | ; sub edx,edi |
- | |
115 | ; movsx ecx,word [scr_buf.height] |
- | |
116 | ;.next_str: |
- | |
117 | ;push ecx |
- | |
118 | ; |
- | |
119 | ; movsx ecx,word [scr_buf.width] |
- | |
120 | ; lea ecx,[ecx*3] |
- | |
121 | ; mov ebx,ecx |
- | |
122 | ;.next_byte: |
- | |
123 | ; mov ah,[esi+ebx] |
- | |
124 | ; mov [edi+edx],ah |
- | |
125 | ; dec ebx |
- | |
126 | ; dec edx |
- | |
127 | ; loop .next_byte |
- | |
128 | ; movsx ecx,word [scr_buf.width] |
- | |
129 | ; lea ecx,[ecx*3] |
- | |
130 | ; add esi,ecx |
- | |
131 | ;pop ecx |
- | |
132 | ; loop .next_str |
- | |
133 | 127 | ; á®åà 塞 |
|
134 | mov esi,[scr_buf.end_ptr] |
128 | mov esi,[scr_buf.ptr] |
- | 129 | mov edi,[sf_buf.end] |
|
- | 130 | movzx edx,word [scr_buf.height] |
|
- | 131 | movzx ebx,word [scr_buf.width] |
|
- | 132 | lea ebx,[ebx*3] |
|
135 | mov edi,[sf_buf.bmp_area] |
133 | |
- | 134 | test ebx,11b |
|
- | 135 | jz @f |
|
- | 136 | shr ebx,2 |
|
- | 137 | inc ebx |
|
136 | movzx ecx,word [scr_buf.height] |
138 | shl ebx,2 |
137 | movzx ebx,word [scr_buf.width] |
139 | @@: |
138 | lea ebx,[ebx*3] |
140 | cld |
139 | add edi,ebx |
141 | align 4 |
140 | .next_str: |
142 | .next_str: |
141 | mov edx,ebx |
- | |
142 | .next_pixel: |
143 | sub edi,ebx |
143 | mov ah,[esi] |
144 | mov ecx,ebx |
144 | mov [edi],ah |
- | |
145 | dec esi |
- | |
146 | dec edi |
- | |
147 | dec edx |
145 | shr ecx,2 |
Line 148... | Line -... | ||
148 | jnz .next_pixel |
- | |
149 | lea edi,[2*ebx+edi] |
- | |
150 | add edi,[esp] |
- | |
151 | loop .next_str |
146 | rep movsd |
152 | 147 | sub edi,ebx |
|
153 | pop edi |
148 | dec edx |
154 | 149 | jnz .next_str |
|
Line 155... | Line 150... | ||
155 | ; á®åà 塞 |
150 | |
156 | draw_status saving |
151 | draw_status saving |
Line 157... | Line 152... | ||
157 | mov eax,70 |
152 | mov eax,70 |