Rev 1031 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1031 | Rev 1034 | ||
---|---|---|---|
1 | ; ªà®á ¤«ï ¢ë¢®¤ ®á®¢ëå äãªæ¨© ª®â®àë¥ ¨á¯«ì§ãîâáï ¡®ªá®¬ |
1 | ; ªà®á ¤«ï ¢ë¢®¤ ®á®¢ëå äãªæ¨© ª®â®àë¥ ¨á¯«ì§ãîâáï ¡®ªá®¬ |
2 | macro use_general_func |
2 | macro use_general_func |
3 | { |
3 | { |
4 | ;debug_func |
4 | ;debug_func |
5 | ;---------------------------------------------------------- |
5 | ;---------------------------------------------------------- |
6 | ;--- ¯à®æ¥¤ãà ¯à®à¨á®¢ª¨ ¢ë¤¥«¥®© ç á⨠----------------- |
6 | ;--- ¯à®æ¥¤ãà ¯à®à¨á®¢ª¨ ¢ë¤¥«¥®© ç á⨠----------------- |
7 | ;---------------------------------------------------------- |
7 | ;---------------------------------------------------------- |
8 | .draw_shift: |
8 | .draw_shift: |
9 | test word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« á⨠|
9 | test word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« á⨠|
10 | jz @f |
10 | jz @f |
11 | mov ebp,shift_color |
11 | mov ebp,shift_color |
12 | mov ebx,dword ed_shift_pos |
12 | mov ebx,dword ed_shift_pos |
13 | call .sh_cl_ |
13 | call .sh_cl_ |
14 | @@: ret |
14 | @@: ret |
15 | ;---------------------------------------------------------- |
15 | ;---------------------------------------------------------- |
16 | ;--- ¯à®æ¥¤ãà ¯à®à¨á®¢ª¨ ⥪áâ -------------------------- |
16 | ;--- ¯à®æ¥¤ãà ¯à®à¨á®¢ª¨ ⥪áâ -------------------------- |
17 | ;---------------------------------------------------------- |
17 | ;---------------------------------------------------------- |
18 | .draw_text: |
18 | .draw_text: |
19 | ;--- ¢ëç¨á«ï¥¬, ᪮«ìª® ¯®¬¥é ¥âáï ᨬ¢®«®¢ --- |
19 | ;--- ¢ëç¨á«ï¥¬, ᪮«ìª® ¯®¬¥é ¥âáï ᨬ¢®«®¢ --- |
20 | ;--- çâ®¡ë ¬ãá®à ¥ à¨á®¢ âì --- |
20 | ;--- çâ®¡ë ¬ãá®à ¥ à¨á®¢ âì --- |
21 | call .get_n |
21 | call .get_n |
22 | mov esi,ed_size |
22 | mov esi,ed_size |
23 | mov ebx,ed_offset |
23 | mov ebx,ed_offset |
24 | sub esi,ebx |
24 | sub esi,ebx |
25 | cmp eax,esi |
25 | cmp eax,esi |
26 | jae @F |
26 | jae @F |
27 | mov esi,eax ;çâ®¡ë ¥ ¢ë室¨âì § ¯à¥¤¥«ë íªà |
27 | mov esi,eax ;çâ®¡ë ¥ ¢ë室¨âì § ¯à¥¤¥«ë íªà |
28 | ;--- à¨á㥬 ⥪áâ --- |
28 | ;--- à¨á㥬 ⥪áâ --- |
29 | @@: mov eax,4 |
29 | @@: mov eax,4 |
30 | mov ebx,ed_left |
30 | mov ebx,ed_left |
31 | mov edx,ed_offset |
31 | mov edx,ed_offset |
32 | add ebx,2 |
32 | add ebx,2 |
33 | shl ebx,16 |
33 | shl ebx,16 |
34 | add ebx,ed_top |
34 | add ebx,ed_top |
35 | mov ecx,ed_text_color |
35 | mov ecx,ed_text_color |
36 | add ebx,4 |
36 | add ebx,4 |
37 | add edx,ed_text |
37 | add edx,ed_text |
38 | mcall |
38 | mcall |
39 | ret |
39 | ret |
40 | ;---------------------------------------------------------- |
40 | ;---------------------------------------------------------- |
41 | ;--- ¯à®æ¥¤ãà ¯à®à¨á®¢ª¨ ä® ---------------------------- |
41 | ;--- ¯à®æ¥¤ãà ¯à®à¨á®¢ª¨ ä® ---------------------------- |
42 | ;¢å®¤ë¥ ¤ ë¥ |
42 | ;¢å®¤ë¥ ¤ ë¥ |
43 | ;eax |
43 | ;eax |
44 | ;edx - color |
44 | ;edx - color |
45 | ;---------------------------------------------------------- |
45 | ;---------------------------------------------------------- |
46 | ;¢å®¤ ⮫쪮 梥â edx |
46 | ;¢å®¤ ⮫쪮 梥â edx |
47 | .draw_bg: |
47 | .draw_bg: |
48 | mov ebx,ed_left |
48 | mov ebx,ed_left |
49 | add ebx,1 |
49 | add ebx,1 |
50 | mov edx,ed_color |
50 | mov edx,ed_color |
51 | shl ebx,16 |
51 | shl ebx,16 |
52 | add ebx,ed_width |
52 | add ebx,ed_width |
53 | sub ebx,1 |
53 | sub ebx,1 |
54 | .draw_bg_eax: |
54 | .draw_bg_eax: |
55 | mov ecx,ed_top |
55 | mov ecx,ed_top |
56 | mov eax,13 |
56 | mov eax,13 |
57 | add ecx,1 |
57 | add ecx,1 |
58 | shl ecx,16 |
58 | shl ecx,16 |
59 | add ecx,ed_height |
59 | add ecx,ed_height |
60 | dec ecx |
60 | dec ecx |
61 | mcall |
61 | mcall |
62 | ret |
62 | ret |
63 | ;---------------------------------------------------------- |
63 | ;---------------------------------------------------------- |
64 | ;--- ¯à®æ¥¤ãà ¯®«ãç¥¨ï ª®«¨ç¥á⢠ᨬ¢®«®¢ ¢ ⥪ã饩 é¨à¨¥ ª®¬¯®¥â |
64 | ;--- ¯à®æ¥¤ãà ¯®«ãç¥¨ï ª®«¨ç¥á⢠ᨬ¢®«®¢ ¢ ⥪ã饩 é¨à¨¥ ª®¬¯®¥â |
65 | ;---------------------------------------------------------- |
65 | ;---------------------------------------------------------- |
66 | .get_n: |
66 | .get_n: |
67 | mov eax,ed_width ;¯®«ã祬 è¨à¨ã ª®¬¯®¥â |
67 | mov eax,ed_width ;¯®«ã祬 è¨à¨ã ª®¬¯®¥â |
68 | xor edx,edx ;१ã«ìâ â à ᯮ«®£ ¥âáï ¢ ¯ ॠedx:eax ¢ eax - ®áâ ⮪ |
68 | xor edx,edx ;१ã«ìâ â à ᯮ«®£ ¥âáï ¢ ¯ ॠedx:eax ¢ eax - ®áâ ⮪ |
69 | sub eax,4 ;¢ëç⨬ 4 |
69 | sub eax,4 ;¢ëç⨬ 4 |
70 | mov ebx,6 ;§ £à㧬¨ ¤¥«¨â¥«ì |
70 | mov ebx,6 ;§ £à㧬¨ ¤¥«¨â¥«ì |
71 | div ebx ;à §¬¤¥«¨¬ 6 |
71 | div ebx ;à §¬¤¥«¨¬ 6 |
72 | ret |
72 | ret |
73 | ;---------------------------------------------------------- |
73 | ;---------------------------------------------------------- |
74 | ;--- ¯à®æ¥¤ãà à¨á®¢ ¨ï ªãàá®à -------------------------- |
74 | ;--- ¯à®æ¥¤ãà à¨á®¢ ¨ï ªãàá®à -------------------------- |
75 | ;---------------------------------------------------------- |
75 | ;---------------------------------------------------------- |
76 | ;¢å®¤ë¥ ebp- 梥â |
76 | ;¢å®¤ë¥ ebp- 梥â |
77 | .clear_cursor: |
77 | .clear_cursor: |
78 | mov edx,ebp |
78 | mov edx,ebp |
79 | mov ebx,cl_curs_x |
79 | mov ebx,cl_curs_x |
80 | mov ecx,cl_curs_y |
80 | mov ecx,cl_curs_y |
81 | jmp .draw_curs |
81 | jmp .draw_curs |
82 | .draw_cursor: |
82 | .draw_cursor: |
83 | mov edx,ed_text_color |
83 | mov edx,ed_text_color |
84 | mov ebx,ed_pos |
84 | mov ebx,ed_pos |
85 | mov ecx,ed_offset |
85 | mov ecx,ed_offset |
86 | sub ebx,ecx |
86 | sub ebx,ecx |
87 | 87 | ||
88 | lea ebx,[ebx*2+ebx] |
88 | lea ebx,[ebx*2+ebx] |
89 | shl ebx,1 |
89 | shl ebx,1 |
90 | ;imul ebx,6 |
90 | ;imul ebx,6 |
91 | add ebx,ed_left |
91 | add ebx,ed_left |
92 | mov ecx,ed_top |
92 | mov ecx,ed_top |
93 | inc ebx |
93 | inc ebx |
94 | add ecx,2 |
94 | add ecx,2 |
95 | mov ebp,ebx |
95 | mov ebp,ebx |
96 | shl ebx,16 |
96 | shl ebx,16 |
97 | mov bx,bp |
97 | mov bx,bp |
98 | mov ebp,ecx |
98 | mov ebp,ecx |
99 | 99 | ||
100 | shl ecx,16 |
100 | shl ecx,16 |
101 | mov cx,bp |
101 | mov cx,bp |
102 | add ecx,ed_height-4 |
102 | add ecx,ed_height-4 |
103 | 103 | ||
104 | mov cl_curs_x,ebx |
104 | mov cl_curs_x,ebx |
105 | mov cl_curs_y,ecx |
105 | mov cl_curs_y,ecx |
106 | .draw_curs: |
106 | .draw_curs: |
107 | mcall 38 |
107 | mcall 38 |
108 | ret |
108 | ret |
109 | ;---------------------------------------------------------- |
109 | ;---------------------------------------------------------- |
110 | ;--- ¯à®æ¥¤ãà à¨á®¢ ¨ï à ¬ª¨ ---------------------------- |
110 | ;--- ¯à®æ¥¤ãà à¨á®¢ ¨ï à ¬ª¨ ---------------------------- |
111 | ;---------------------------------------------------------- |
111 | ;---------------------------------------------------------- |
112 | .draw_border: |
112 | .draw_border: |
113 | ;--- 梥â à ¬ª¨ --- |
113 | ;--- 梥â à ¬ª¨ --- |
114 | test word ed_flags,ed_focus |
114 | test word ed_flags,ed_focus |
115 | mov edx,ed_focus_border_color |
115 | mov edx,ed_focus_border_color |
116 | jne @f |
116 | jne @f |
117 | mov edx,ed_blur_border_color |
117 | mov edx,ed_blur_border_color |
118 | @@: |
118 | @@: |
119 | ;--- ᢥàåã --- |
119 | ;--- ᢥàåã --- |
120 | mov eax,38 |
120 | mov eax,38 |
121 | mov ebx,ed_left |
121 | mov ebx,ed_left |
122 | mov ecx,ebx |
122 | mov ecx,ebx |
123 | shl ebx,16 |
123 | shl ebx,16 |
124 | mov bx,cx |
124 | mov bx,cx |
125 | add ebx,ed_width |
125 | add ebx,ed_width |
126 | mov ecx,ed_top |
126 | mov ecx,ed_top |
127 | mov esi,ecx |
127 | mov esi,ecx |
128 | shl ecx,16 |
128 | shl ecx,16 |
129 | mov cx,si |
129 | mov cx,si |
130 | mcall |
130 | mcall |
131 | ;--- ᨧã --- |
131 | ;--- ᨧã --- |
132 | mov esi,ecx |
132 | mov esi,ecx |
133 | add ecx,ed_height |
133 | add ecx,ed_height |
134 | mov ebp,ecx |
134 | mov ebp,ecx |
135 | shl ecx,16 |
135 | shl ecx,16 |
136 | mov cx,bp |
136 | mov cx,bp |
137 | mcall |
137 | mcall |
138 | ;--- á«¥¢ --- |
138 | ;--- á«¥¢ --- |
139 | mov cx,si |
139 | mov cx,si |
140 | mov ebp,ebx |
140 | mov ebp,ebx |
141 | sub ebx,ed_width |
141 | sub ebx,ed_width |
142 | mcall |
142 | mcall |
143 | ;--- á¯à ¢ --- |
143 | ;--- á¯à ¢ --- |
144 | mov ebx,ebp |
144 | mov ebx,ebp |
145 | shl ebx,16 |
145 | shl ebx,16 |
146 | mov bx,bp |
146 | mov bx,bp |
147 | mcall |
147 | mcall |
148 | ret |
148 | ret |
149 | ;---------------------------------------------------------- |
149 | ;---------------------------------------------------------- |
150 | ;--- ¯à®¢¥àª , § 襫 «¨ ªãàá®à § £à ¨æë ¨, ¥á«¨ ¤®, --- |
150 | ;--- ¯à®¢¥àª , § 襫 «¨ ªãàá®à § £à ¨æë ¨, ¥á«¨ ¤®, --- |
151 | ;--- ¨§¬¥ï¥¬ ᬥ饨¥ ------------------------------------ |
151 | ;--- ¨§¬¥ï¥¬ ᬥ饨¥ ------------------------------------ |
152 | ;--- ¥á«¨ ᬥ饨¥ ¡ë«® ãáâ ®¢ª ä« £ ed_offset_cl ¨ ç¥ |
152 | ;--- ¥á«¨ ᬥ饨¥ ¡ë«® ãáâ ®¢ª ä« £ ed_offset_cl ¨ ç¥ |
153 | ; ¥á«¨ ¨ç¥£® ¥ ¨§¬¥¨«®áì â® ¢ëáâ ¢«¥¨¥ ed_offset_fl |
153 | ; ¥á«¨ ¨ç¥£® ¥ ¨§¬¥¨«®áì â® ¢ëáâ ¢«¥¨¥ ed_offset_fl |
154 | ; ¢ ®¡é¥© ¡¨â®¢®© ¬ àà¨æ¥ á®áâ®ï¨ï ª®¬¯®¥â®¢ word ed_flags |
154 | ; ¢ ®¡é¥© ¡¨â®¢®© ¬ àà¨æ¥ á®áâ®ï¨ï ª®¬¯®¥â®¢ word ed_flags |
155 | ;---------------------------------------------------------- |
155 | ;---------------------------------------------------------- |
156 | .check_offset: |
156 | .check_offset: |
157 | pusha |
157 | pusha |
158 | mov ecx,ed_pos |
158 | mov ecx,ed_pos |
159 | mov ebx,ed_offset |
159 | mov ebx,ed_offset |
160 | cmp ebx,ecx |
160 | cmp ebx,ecx |
161 | ja .sub_8 |
161 | ja .sub_8 |
162 | 162 | ||
163 | push ebx |
163 | push ebx |
164 | call .get_n ;¯®«ã稬 ª®«-¢® ᨬ¢®«®¢ ¢ ¯ ॠॣ¨áâ஢ edx:eax |
164 | call .get_n ;¯®«ã稬 ª®«-¢® ᨬ¢®«®¢ ¢ ¯ ॠॣ¨áâ஢ edx:eax |
165 | pop ebx |
165 | pop ebx |
166 | mov edx,ebx |
166 | mov edx,ebx |
167 | add edx,eax ;ed_offset+width editbox |
167 | add edx,eax ;ed_offset+width editbox |
168 | inc edx ;¥®¡å®¤¨¬® ¤«ï ®¬ «ì®£® ¯®«®¦¥¨ï ªãàá®à ¢ ªà ©¥© «¥¢®© ¯®§¨æ¨¨ |
168 | inc edx ;¥®¡å®¤¨¬® ¤«ï ®¬ «ì®£® ¯®«®¦¥¨ï ªãàá®à ¢ ªà ©¥© «¥¢®© ¯®§¨æ¨¨ |
169 | cmp edx,ecx |
169 | cmp edx,ecx |
170 | ja @f |
170 | ja @f |
171 | 171 | ||
172 | mov edx,ed_size |
172 | mov edx,ed_size |
173 | cmp edx,ecx |
173 | cmp edx,ecx |
174 | je .add_end |
174 | je .add_end |
175 | 175 | ||
176 | sub edx,ecx |
176 | sub edx,ecx |
177 | cmp edx,8 |
177 | cmp edx,8 |
178 | jbe .add_8 |
178 | jbe .add_8 |
179 | add ebx,8 |
179 | add ebx,8 |
180 | jmp .chk_d |
180 | jmp .chk_d |
181 | 181 | ||
182 | .sub_8: cmp ecx,0 |
182 | .sub_8: cmp ecx,0 |
183 | je .sub_min |
183 | je .sub_min |
184 | cmp ebx,8 |
184 | cmp ebx,8 |
185 | jbe .sub_min |
185 | jbe .sub_min |
186 | sub ebx,8 ;ebx=ed_offset |
186 | sub ebx,8 ;ebx=ed_offset |
187 | jmp .chk_d |
187 | jmp .chk_d |
188 | .sub_min: |
188 | .sub_min: |
189 | xor ebx,ebx |
189 | xor ebx,ebx |
190 | jmp .chk_d |
190 | jmp .chk_d |
191 | 191 | ||
192 | .add_end:sub edx,eax |
192 | .add_end:sub edx,eax |
193 | mov ebx,edx |
193 | mov ebx,edx |
194 | jmp .chk_d |
194 | jmp .chk_d |
195 | .add_8: add ebx,edx |
195 | .add_8: add ebx,edx |
196 | .chk_d: mov ed_offset,ebx |
196 | .chk_d: mov ed_offset,ebx |
197 | call .draw_bg |
197 | call .draw_bg |
198 | and word ed_flags,ed_offset_cl |
198 | and word ed_flags,ed_offset_cl |
199 | edit_ex |
199 | edit_ex |
200 | @@: |
200 | @@: |
201 | or word ed_flags,ed_offset_fl |
201 | or word ed_flags,ed_offset_fl |
202 | edit_ex |
202 | edit_ex |
203 | } |
203 | } |
204 | 204 | ||
205 | macro use_key_func |
205 | macro use_key_func |
206 | { |
206 | { |
207 | ;¡à ¡®âª Shift ¤«ï áïâ¨ï ¢ë¤¥«¥¨ï ¥¨§¢¥á⮩ ®¡« á⨠|
207 | ;¡à ¡®âª Shift ¤«ï áïâ¨ï ¢ë¤¥«¥¨ï ¥¨§¢¥á⮩ ®¡« á⨠|
208 | .shift: ;;;;;;;SHIFT |
208 | .shift: ;;;;;;;SHIFT |
209 | test word ed_flags,ed_shift |
209 | test word ed_flags,ed_shift |
210 | je .f_exit |
210 | je .f_exit |
211 | 211 | ||
212 | @@: mov ebp,shift_color |
212 | @@: mov ebp,shift_color |
213 | or word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« á⨠|
213 | or word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« á⨠|
214 | mov ebx,dword ed_shift_pos |
214 | mov ebx,dword ed_shift_pos |
215 | call .sh_cl_ |
215 | call .sh_cl_ |
216 | jmp .draw_cursor_text |
216 | jmp .draw_cursor_text |
217 | ;;;;;;;;;;;;;;;;;;;;; |
217 | ;;;;;;;;;;;;;;;;;;;;; |
218 | .f_exit:call .check_offset |
218 | .f_exit:call .check_offset |
219 | and word ed_flags,ed_shift_cl |
219 | and word ed_flags,ed_shift_cl |
220 | call .enable_null |
220 | call .enable_null |
221 | jmp .draw_cursor_text |
221 | jmp .draw_cursor_text |
222 | .sh_cl_: |
222 | .sh_cl_: |
223 | ;;;;;;SHIFT end |
223 | ;;;;;;SHIFT end |
224 | ;®¡à ¡®âª ®ç¨á⪨, ¯à¨ «¥¢®¬ - ¯à ¢®¬ ¤¢¨¦¥¨¨ ¢ë¤¥«¥¨ï |
224 | ;®¡à ¡®âª ®ç¨á⪨, ¯à¨ «¥¢®¬ - ¯à ¢®¬ ¤¢¨¦¥¨¨ ¢ë¤¥«¥¨ï |
225 | ;¤«ï ®¡à ¡®âª¨ áïâ¨ï ¢ë¤¥«¥¨ï |
225 | ;¤«ï ®¡à ¡®âª¨ áïâ¨ï ¢ë¤¥«¥¨ï |
226 | ;¢å®¤ë¥ ¯ à ¬¥âàë ebp=color ebx=ed_shift_pos |
226 | ;¢å®¤ë¥ ¯ à ¬¥âàë ebp=color ebx=ed_shift_pos |
227 | mov eax,dword ed_pos |
227 | mov eax,dword ed_pos |
228 | cmp eax,ebx |
228 | cmp eax,ebx |
229 | 229 | ||
230 | jae .sh_n |
230 | jae .sh_n |
231 | push eax ;¬¥ì襥 ¢ eax |
231 | push eax ;¬¥ì襥 ¢ eax |
232 | push ebx ;¡®«ì襥 |
232 | push ebx ;¡®«ì襥 |
233 | jmp .sh_n1 |
233 | jmp .sh_n1 |
234 | ;¥á«¨ ¨ ç¥ |
234 | ;¥á«¨ ¨ ç¥ |
235 | .sh_n: push ebx |
235 | .sh_n: push ebx |
236 | push eax |
236 | push eax |
237 | .sh_n1: |
237 | .sh_n1: |
238 | call .check_offset |
238 | call .check_offset |
239 | call .get_n |
239 | call .get_n |
240 | mov edx,eax ;size of ed_box |
240 | mov edx,eax ;size of ed_box |
241 | mov ecx,ed_offset |
241 | mov ecx,ed_offset |
242 | add eax,ecx ;eax = w_off= ed_offset+width |
242 | add eax,ecx ;eax = w_off= ed_offset+width |
243 | mov edx,eax ;save |
243 | mov edx,eax ;save |
244 | pop ebx ;¡®«ì襥 |
244 | pop ebx ;¡®«ì襥 |
245 | pop eax ;¬¥ì襥 |
245 | pop eax ;¬¥ì襥 |
246 | 246 | ||
247 | cmp eax,ecx ;áà ¢¥¨¥ á ¬¥ì襣® á offset. |
247 | cmp eax,ecx ;áà ¢¥¨¥ á ¬¥ì襣® á offset. |
248 | jae .f_f ;¥á«¨ ¡®«ìè¥ |
248 | jae .f_f ;¥á«¨ ¡®«ìè¥ |
249 | xor eax,eax |
249 | xor eax,eax |
250 | cmp edx,ebx ;cà ¢¨¬ à §¬¥à w_off á ¡®«ì訬 |
250 | cmp edx,ebx ;cà ¢¨¬ à §¬¥à w_off á ¡®«ì訬 |
251 | jb @f |
251 | jb @f |
252 | sub ebx,ecx |
252 | sub ebx,ecx |
253 | jmp .nxt_f |
253 | jmp .nxt_f |
254 | @@: mov ebx,edx |
254 | @@: mov ebx,edx |
255 | sub ebx,ecx |
255 | sub ebx,ecx |
256 | jmp .nxt_f |
256 | jmp .nxt_f |
257 | .f_f: |
257 | .f_f: |
258 | sub eax,ecx |
258 | sub eax,ecx |
259 | cmp edx,ebx ;cà ¢¨¬ à §¬¥à w_off á ¡®«ì訬 |
259 | cmp edx,ebx ;cà ¢¨¬ à §¬¥à w_off á ¡®«ì訬 |
260 | jle @f |
260 | jle @f |
261 | sub ebx,ecx |
261 | sub ebx,ecx |
262 | sub ebx,eax |
262 | sub ebx,eax |
263 | jmp .nxt_f |
263 | jmp .nxt_f |
264 | @@: |
264 | @@: |
265 | mov ebx,edx |
265 | mov ebx,edx |
266 | sub ebx,ecx |
266 | sub ebx,ecx |
267 | sub ebx,eax |
267 | sub ebx,eax |
268 | .nxt_f: |
268 | .nxt_f: |
269 | mov edx,ebx |
269 | mov edx,ebx |
270 | lea ebx,[eax*2+eax] |
270 | lea ebx,[eax*2+eax] |
271 | shl ebx,1 |
271 | shl ebx,1 |
272 | add ebx,ed_left |
272 | add ebx,ed_left |
273 | inc ebx |
273 | inc ebx |
274 | shl ebx,16 |
274 | shl ebx,16 |
275 | lea ecx,[edx*2+edx] |
275 | lea ecx,[edx*2+edx] |
276 | shl ecx,1 |
276 | shl ecx,1 |
277 | mov bx,cx |
277 | mov bx,cx |
278 | inc ebx |
278 | inc ebx |
279 | mov edx,ebp;shift_color |
279 | mov edx,ebp;shift_color |
280 | 280 | ||
281 | call .draw_bg_eax |
281 | call .draw_bg_eax |
282 | @@: call .enable_null |
282 | @@: call .enable_null |
283 | ret |
283 | ret |
284 | ;;;;;;;;;;;;;;;;;;;;; |
284 | ;;;;;;;;;;;;;;;;;;;;; |
285 | ;áâ ®¢ª - áï⨥ ¢ë¤¥«¥¨ï ¢ ®¤¨ ᨬ¢®« |
285 | ;áâ ®¢ª - áï⨥ ¢ë¤¥«¥¨ï ¢ ®¤¨ ᨬ¢®« |
286 | ;;;;;;;;;;;;;;;;;;;;; |
286 | ;;;;;;;;;;;;;;;;;;;;; |
287 | .drw_sim: |
287 | .drw_sim: |
288 | mov eax,dword ed_pos |
288 | mov eax,dword ed_pos |
289 | call .draw_rectangle ; à¨á®¢ âì ¯àאַ㣮«ì¨ª á § ¤ ë¬ æ¢¥â®¬ |
289 | call .draw_rectangle ; à¨á®¢ âì ¯àאַ㣮«ì¨ª á § ¤ ë¬ æ¢¥â®¬ |
290 | jmp @b |
290 | jmp @b |
291 | ;;;;;;;;;;;;;;;;;;;;; |
291 | ;;;;;;;;;;;;;;;;;;;;; |
292 | ;ãªæ¨ï ãáâ ®¢ª¨ ¢ë¤¥«¥¨ï ¯à¨ ¤¢¨¦¥¨ï ¢«¥¢® ¨ ¢¯à ¢® ¨ ¦ ⨨ shift |
292 | ;ãªæ¨ï ãáâ ®¢ª¨ ¢ë¤¥«¥¨ï ¯à¨ ¤¢¨¦¥¨ï ¢«¥¢® ¨ ¢¯à ¢® ¨ ¦ ⨨ shift |
293 | ;®£¨ª : |
293 | ;®£¨ª : |
294 | ;;;;;;;;;; |
294 | ;;;;;;;;;; |
295 | .draw_wigwag: |
295 | .draw_wigwag: |
296 | ;äãªæ¨ï ãáâ ®¢ª¨ ¯¥à¥¬¥ëå |
296 | ;äãªæ¨ï ãáâ ®¢ª¨ ¯¥à¥¬¥ëå |
297 | mov ebp,shift_color |
297 | mov ebp,shift_color |
298 | call .clear_cursor |
298 | call .clear_cursor |
299 | 299 | ||
300 | or word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« á⨠|
300 | or word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« á⨠|
301 | mov ebp,shift_color |
301 | mov ebp,shift_color |
302 | mov eax,dword ed_pos |
302 | mov eax,dword ed_pos |
303 | test word ed_flags,ed_left_fl |
303 | test word ed_flags,ed_left_fl |
304 | jz .low |
304 | jz .low |
305 | jmp @f |
305 | jmp @f |
306 | ;;;;;;;;;; |
306 | ;;;;;;;;;; |
307 | ;ãªæ¨ï 㤠«¥¨ï ¢ë¤¥«¥¨ï ¯à¨ ¤¢¨¦¥¨ï ¢«¥¢® ¨ ¢¯à ¢® ¨ ¦ ⨨ shift |
307 | ;ãªæ¨ï 㤠«¥¨ï ¢ë¤¥«¥¨ï ¯à¨ ¤¢¨¦¥¨ï ¢«¥¢® ¨ ¢¯à ¢® ¨ ¦ ⨨ shift |
308 | ;®£¨ª : |
308 | ;®£¨ª : |
309 | ;;;;;;;;;; |
309 | ;;;;;;;;;; |
310 | .draw_wigwag_cl: |
310 | .draw_wigwag_cl: |
311 | ;äãªæ¨ï ãáâ ®¢ª¨ ¯¥à¥¬¥ëå |
311 | ;äãªæ¨ï ãáâ ®¢ª¨ ¯¥à¥¬¥ëå |
312 | mov ebp,ed_color |
312 | mov ebp,ed_color |
313 | call .clear_cursor |
313 | call .clear_cursor |
314 | 314 | ||
315 | mov ebp,ed_color |
315 | mov ebp,ed_color |
316 | mov eax,dword ed_pos |
316 | mov eax,dword ed_pos |
317 | test word ed_flags,ed_left_fl |
317 | test word ed_flags,ed_left_fl |
318 | jz .low |
318 | jz .low |
319 | @@: call .draw_rectangle ; à¨á®¢ âì ¯àאַ㣮«ì¨ª § ªà 訢 ¥¬®© ®¡« á⨠|
319 | @@: call .draw_rectangle ; à¨á®¢ âì ¯àאַ㣮«ì¨ª § ªà 訢 ¥¬®© ®¡« á⨠|
320 | ret |
320 | ret |
321 | .low: dec eax |
321 | .low: dec eax |
322 | jmp @b |
322 | jmp @b |
323 | ;¢å®¤®© ¯ à ¬¥âà ebx - ed_pos |
323 | ;¢å®¤®© ¯ à ¬¥âà ebx - ed_pos |
324 | .sh_first_sh: |
324 | .sh_first_sh: |
325 | test word ed_flags,ed_shift |
325 | test word ed_flags,ed_shift |
326 | je @f |
326 | je @f |
327 | mov dword ed_shift_pos_old,ebx |
327 | mov dword ed_shift_pos_old,ebx |
328 | test word ed_flags,ed_shift_on |
328 | test word ed_flags,ed_shift_on |
329 | jne @f |
329 | jne @f |
330 | mov dword ed_shift_pos,ebx |
330 | mov dword ed_shift_pos,ebx |
331 | or word ed_flags,ed_shift_on |
331 | or word ed_flags,ed_shift_on |
332 | @@: ret |
332 | @@: ret |
333 | ;¡à ¡®âª ªà ©¨å ¯®«®¦¥¨© ¢ editbox ¯à¨ ¦ ⮬ shift |
333 | ;¡à ¡®âª ªà ©¨å ¯®«®¦¥¨© ¢ editbox ¯à¨ ¦ ⮬ shift |
334 | ;¯à®¨§¢®¤¨â áï⨥ ¢ë¤¥«¥¨¥, ¥á«¨ ¥â shift |
334 | ;¯à®¨§¢®¤¨â áï⨥ ¢ë¤¥«¥¨¥, ¥á«¨ ¥â shift |
335 | ;¨ ç¥ ¢®®¡é¥ ¢ë室¨â |
335 | ;¨ ç¥ ¢®®¡é¥ ¢ë室¨â |
336 | .sh_st_of: |
336 | .sh_st_of: |
337 | test word ed_flags,ed_shift |
337 | test word ed_flags,ed_shift |
338 | jne @f |
338 | jne @f |
339 | test word ed_flags,ed_shift_bac |
339 | test word ed_flags,ed_shift_bac |
340 | je @f |
340 | je @f |
341 | mov ebp,ed_color |
341 | mov ebp,ed_color |
342 | mov ebx,dword ed_shift_pos |
342 | mov ebx,dword ed_shift_pos |
343 | call .sh_cl_ ;®ç¨á⪠¢ë¤¥«¥®£® äà £¬¥â |
343 | call .sh_cl_ ;®ç¨á⪠¢ë¤¥«¥®£® äà £¬¥â |
344 | and word ed_flags,ed_shift_cl ; ®ç¨á⪠®â ⮣® çâ® ã¡à «¨ ¢ë¤¥«¥¨¥ |
344 | and word ed_flags,ed_shift_cl ; ®ç¨á⪠®â ⮣® çâ® ã¡à «¨ ¢ë¤¥«¥¨¥ |
345 | jmp .draw_cursor_text |
345 | jmp .draw_cursor_text |
346 | @@: |
346 | @@: |
347 | and word ed_flags,ed_shift_off |
347 | and word ed_flags,ed_shift_off |
348 | edit_ex |
348 | edit_ex |
349 | ;¯à®¢¥àª á®áâ®ï¨ï shift ¡ë« «¨ ® ¦ â à ìè¥? |
349 | ;¯à®¢¥àª á®áâ®ï¨ï shift ¡ë« «¨ ® ¦ â à ìè¥? |
350 | .sh_enable: |
350 | .sh_enable: |
351 | test word ed_flags,ed_shift |
351 | test word ed_flags,ed_shift |
352 | jne .sh_ext_en ; à¨á®¢ âì § ªà è¥ë© ¯àאַ㣮«ì¨ª |
352 | jne .sh_ext_en ; à¨á®¢ âì § ªà è¥ë© ¯àאַ㣮«ì¨ª |
353 | 353 | ||
354 | test word ed_flags,ed_shift_bac |
354 | test word ed_flags,ed_shift_bac |
355 | je @f |
355 | je @f |
356 | call .check_offset |
356 | call .check_offset |
357 | 357 | ||
358 | mov ebp,ed_color |
358 | mov ebp,ed_color |
359 | mov ebx,dword ed_shift_pos |
359 | mov ebx,dword ed_shift_pos |
360 | call .sh_cl_ ;®ç¨á⪠¢ë¤¥«¥®£® äà £¬¥â |
360 | call .sh_cl_ ;®ç¨á⪠¢ë¤¥«¥®£® äà £¬¥â |
361 | call .draw_wigwag_cl |
361 | call .draw_wigwag_cl |
362 | and word ed_flags,ed_shift_cl ; 1¢ à ¥ 㦮 |
362 | and word ed_flags,ed_shift_cl ; 1¢ à ¥ 㦮 |
363 | ret |
363 | ret |
364 | 364 | ||
365 | @@: mov ebp,ed_color |
365 | @@: mov ebp,ed_color |
366 | call .clear_cursor |
366 | call .clear_cursor |
367 | call .check_offset |
367 | call .check_offset |
368 | ret |
368 | ret |
369 | .sh_ext_en: |
369 | .sh_ext_en: |
370 | call .check_offset |
370 | call .check_offset |
371 | test word ed_flags,ed_offset_fl |
371 | test word ed_flags,ed_offset_fl |
372 | je @f |
372 | je @f |
373 | ;¨á®¢ ¨¥ § ªà è¥ëå ¯àאַ㣮«ì¨ª®¢ ¨ ®ç¨á⪠¨å |
373 | ;¨á®¢ ¨¥ § ªà è¥ëå ¯àאַ㣮«ì¨ª®¢ ¨ ®ç¨á⪠¨å |
374 | mov eax,dword ed_shift_pos |
374 | mov eax,dword ed_shift_pos |
375 | mov ebx,dword ed_pos |
375 | mov ebx,dword ed_pos |
376 | mov ecx,dword ed_shift_pos_old |
376 | mov ecx,dword ed_shift_pos_old |
377 | ;¯à®¢¥àª ¨ à¨á®¢ ¨¥ § ªà è¥ëå ®¡« á⥩ |
377 | ;¯à®¢¥àª ¨ à¨á®¢ ¨¥ § ªà è¥ëå ®¡« á⥩ |
378 | cmp eax,ecx |
378 | cmp eax,ecx |
379 | je .1_shem |
379 | je .1_shem |
380 | jb .smaller |
380 | jb .smaller |
381 | cmp ecx,ebx |
381 | cmp ecx,ebx |
382 | ja .1_shem |
382 | ja .1_shem |
383 | call .draw_wigwag_cl ;clear |
383 | call .draw_wigwag_cl ;clear |
384 | jmp .sh_e_end |
384 | jmp .sh_e_end |
385 | .smaller: |
385 | .smaller: |
386 | cmp ecx,ebx |
386 | cmp ecx,ebx |
387 | jb .1_shem |
387 | jb .1_shem |
388 | call .draw_wigwag_cl ;clear |
388 | call .draw_wigwag_cl ;clear |
389 | jmp .sh_e_end |
389 | jmp .sh_e_end |
390 | ;alike = |
390 | ;alike = |
391 | .1_shem: call .draw_wigwag |
391 | .1_shem: call .draw_wigwag |
392 | .sh_e_end: and word ed_flags,ed_shift_off |
392 | .sh_e_end: and word ed_flags,ed_shift_off |
393 | ret |
393 | ret |
394 | @@: mov ebp,shift_color |
394 | @@: mov ebp,shift_color |
395 | mov ebx,dword ed_shift_pos |
395 | mov ebx,dword ed_shift_pos |
396 | call .sh_cl_ |
396 | call .sh_cl_ |
397 | jmp .sh_e_end |
397 | jmp .sh_e_end |
398 | ;äãªæ¨ï ¤«ï ®¡à ¡®âª¨ shift ¯à¨ ¦ ⨨ home and end |
398 | ;äãªæ¨ï ¤«ï ®¡à ¡®âª¨ shift ¯à¨ ¦ ⨨ home and end |
399 | .sh_home_end: |
399 | .sh_home_end: |
400 | mov ebp,ed_color |
400 | mov ebp,ed_color |
401 | call .clear_cursor |
401 | call .clear_cursor |
402 | test word ed_flags,ed_shift_bac |
402 | test word ed_flags,ed_shift_bac |
403 | je @f |
403 | je @f |
404 | mov ebp,ed_color |
404 | mov ebp,ed_color |
405 | mov ebx,dword ed_shift_pos_old |
405 | mov ebx,dword ed_shift_pos_old |
406 | call .sh_cl_ |
406 | call .sh_cl_ |
407 | 407 | ||
408 | @@: test word ed_flags,ed_shift |
408 | @@: test word ed_flags,ed_shift |
409 | je .sh_exit_ ;¢ë©â¨ |
409 | je .sh_exit_ ;¢ë©â¨ |
410 | mov ebp,shift_color |
410 | mov ebp,shift_color |
411 | mov ebx,dword ed_shift_pos |
411 | mov ebx,dword ed_shift_pos |
412 | call .sh_cl_ |
412 | call .sh_cl_ |
413 | or word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« á⨠|
413 | or word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« á⨠|
414 | jmp .sh_e_end |
414 | jmp .sh_e_end |
415 | .sh_exit_: call .check_offset |
415 | .sh_exit_: call .check_offset |
416 | ret |
416 | ret |
417 | ;äãªæ¨ï ¢¥á¥¨ï 0 ¯® ¤à¥áã ed_size+1 |
417 | ;äãªæ¨ï ¢¥á¥¨ï 0 ¯® ¤à¥áã ed_size+1 |
418 | .enable_null: |
418 | .enable_null: |
419 | pusha |
419 | pusha |
420 | mov eax,ed_size |
420 | mov eax,ed_size |
421 | mov ebx,ed_text |
421 | mov ebx,ed_text |
422 | test eax,eax |
422 | test eax,eax |
423 | add eax,ebx |
423 | add eax,ebx |
424 | jne @f |
424 | jne @f |
425 | inc eax |
425 | inc eax |
426 | @@: xor ebx,ebx |
426 | @@: xor ebx,ebx |
427 | mov [eax],bl |
427 | mov [eax],bl |
428 | edit_ex |
428 | edit_ex |
429 | ;- 㤠«¥¨¥ ᨬ¢®« |
429 | ;- 㤠«¥¨¥ ᨬ¢®« |
430 | ;å®¤ë¥ ¤ ë¥ edx=ed_size;ecx=ed_pos |
430 | ;å®¤ë¥ ¤ ë¥ edx=ed_size;ecx=ed_pos |
431 | .del_char: |
431 | .del_char: |
432 | mov esi,ed_text |
432 | mov esi,ed_text |
433 | test word ed_flags,ed_shift_on |
433 | test word ed_flags,ed_shift_on |
434 | je @f |
434 | je @f |
435 | mov eax,dword ed_shift_pos |
435 | mov eax,dword ed_shift_pos |
436 | mov ebx,esi |
436 | mov ebx,esi |
437 | cmp eax,ecx |
437 | cmp eax,ecx |
438 | jae .dh_n |
438 | jae .dh_n |
439 | 439 | ||
440 | mov ed_pos,eax ;çâ® ¡ë ¥ ¡ë«® ã¡¥£ ¨ï ªãàá®à |
440 | mov ed_pos,eax ;çâ® ¡ë ¥ ¡ë«® ã¡¥£ ¨ï ªãàá®à |
441 | mov ebp,ecx |
441 | mov ebp,ecx |
442 | sub ebp,eax |
442 | sub ebp,eax |
443 | add ebx,eax ;eax ¬¥ìè¥ |
443 | add ebx,eax ;eax ¬¥ìè¥ |
444 | sub edx,ecx |
444 | sub edx,ecx |
445 | add esi,ecx |
445 | add esi,ecx |
446 | 446 | ||
447 | mov dword ed_shift_pos,ebp |
447 | mov dword ed_shift_pos,ebp |
448 | jmp .del_ch_sh |
448 | jmp .del_ch_sh |
449 | ;¥á«¨ ¨ ç¥ |
449 | ;¥á«¨ ¨ ç¥ |
450 | .dh_n: |
450 | .dh_n: |
451 | mov ebp,eax |
451 | mov ebp,eax |
452 | sub ebp,ecx |
452 | sub ebp,ecx |
453 | add ebx,ecx |
453 | add ebx,ecx |
454 | sub edx,eax |
454 | sub edx,eax |
455 | add esi,eax |
455 | add esi,eax |
456 | mov dword ed_shift_pos,ebp |
456 | mov dword ed_shift_pos,ebp |
457 | jmp .del_ch_sh |
457 | jmp .del_ch_sh |
458 | 458 | ||
459 | @@: add esi,ecx ;㪠§ ⥫ì + ᬥ饨¥ ª ॠ«ì®¬ã ¡ãää¥àã |
459 | @@: add esi,ecx ;㪠§ ⥫ì + ᬥ饨¥ ª ॠ«ì®¬ã ¡ãää¥àã |
460 | mov ebx,esi |
460 | mov ebx,esi |
461 | inc esi |
461 | inc esi |
462 | cld |
462 | cld |
463 | 463 | ||
464 | sub edx,ecx |
464 | sub edx,ecx |
465 | .del_ch_sh: |
465 | .del_ch_sh: |
466 | 466 | ||
467 | push edi |
467 | push edi |
468 | mov edi,ebx |
468 | mov edi,ebx |
469 | @@: |
469 | @@: |
470 | lodsb |
470 | lodsb |
471 | stosb |
471 | stosb |
472 | dec edx |
472 | dec edx |
473 | jns @b |
473 | jns @b |
474 | 474 | ||
475 | pop edi |
475 | pop edi |
476 | ret |
476 | ret |
477 | ;¢ëç¨á«¨âì § ªà 訢 ¥¬ãî ®¡« áâì |
477 | ;¢ëç¨á«¨âì § ªà 訢 ¥¬ãî ®¡« áâì |
478 | ;ᮣ« 襨¥ ¢ ebp - ¯¥à¥¤ ¥âáï ed_size |
478 | ;ᮣ« 襨¥ ¢ ebp - ¯¥à¥¤ ¥âáï ed_size |
479 | .clear_bg: |
479 | .clear_bg: |
480 | call .get_n ;¯®«ãç¨âì à §¬¥à ¢ ᨬ¢®« å è¨à¨ë ª®¬¯®¥â |
480 | call .get_n ;¯®«ãç¨âì à §¬¥à ¢ ᨬ¢®« å è¨à¨ë ª®¬¯®¥â |
481 | push eax |
481 | push eax |
482 | mov ebx,ed_offset |
482 | mov ebx,ed_offset |
483 | add eax,ebx ;eax = w_off= ed_offset+width |
483 | add eax,ebx ;eax = w_off= ed_offset+width |
484 | mov ebx,ebp ;ed_size |
484 | mov ebx,ebp ;ed_size |
485 | 485 | ||
486 | cmp eax,ebx |
486 | cmp eax,ebx |
487 | jb @f |
487 | jb @f |
488 | mov eax,ed_pos |
488 | mov eax,ed_pos |
489 | sub ebx,eax |
489 | sub ebx,eax |
490 | mov ecx,ed_offset |
490 | mov ecx,ed_offset |
491 | sub eax,ecx |
491 | sub eax,ecx |
492 | jmp .nxt |
492 | jmp .nxt |
493 | @@: mov ebx,ed_pos |
493 | @@: mov ebx,ed_pos |
494 | push ebx |
494 | push ebx |
495 | sub eax,ebx |
495 | sub eax,ebx |
496 | mov ebx,eax ;It is don't optimal |
496 | mov ebx,eax ;It is don't optimal |
497 | 497 | ||
498 | pop eax ;ed_pos |
498 | pop eax ;ed_pos |
499 | mov ecx,ed_offset |
499 | mov ecx,ed_offset |
500 | sub eax,ecx |
500 | sub eax,ecx |
501 | .nxt: |
501 | .nxt: |
502 | mov ebp,eax ;¯à®¢¥àª ¢ë室 § ªà 訢 ¥¬®© ®¡« á⨠§ ¯à¥¤¥«ë ¤«¨ë |
502 | mov ebp,eax ;¯à®¢¥àª ¢ë室 § ªà 訢 ¥¬®© ®¡« á⨠§ ¯à¥¤¥«ë ¤«¨ë |
503 | add ebp,ebx |
503 | add ebp,ebx |
504 | pop edx |
504 | pop edx |
505 | cmp ebp,edx |
505 | cmp ebp,edx |
506 | je @f |
506 | je @f |
507 | inc ebx |
507 | inc ebx |
508 | 508 | ||
509 | @@: mov edx,ebx |
509 | @@: mov edx,ebx |
510 | lea ebx,[eax*2+eax] |
510 | lea ebx,[eax*2+eax] |
511 | shl ebx,1 |
511 | shl ebx,1 |
512 | add ebx,ed_left |
512 | add ebx,ed_left |
513 | inc ebx |
513 | inc ebx |
514 | shl ebx,16 |
514 | shl ebx,16 |
515 | lea ecx,[edx*2+edx] |
515 | lea ecx,[edx*2+edx] |
516 | shl ecx,1 |
516 | shl ecx,1 |
517 | mov bx,cx |
517 | mov bx,cx |
518 | mov edx,ed_color |
518 | mov edx,ed_color |
519 | call .draw_bg_eax |
519 | call .draw_bg_eax |
520 | ret |
520 | ret |
521 | ;;;;;;;;;;;;;;;;;;; |
521 | ;;;;;;;;;;;;;;;;;;; |
522 | ;;; ¡à ¡®âª ¯à¨¬¨â¨¢®¢ |
522 | ;;; ¡à ¡®âª ¯à¨¬¨â¨¢®¢ |
523 | ;;;;;;;;;;;;;;;;;;;; |
523 | ;;;;;;;;;;;;;;;;;;;; |
524 | ; à¨á®¢ âì ¯àאַ㣮«ì¨ª, 梥⠯¥à¥¤ ¥âáï ¢ ebp |
524 | ; à¨á®¢ âì ¯àאַ㣮«ì¨ª, 梥⠯¥à¥¤ ¥âáï ¢ ebp |
525 | ;¢å®¤ë¥ ¯ à ¬¥âàë: |
525 | ;¢å®¤ë¥ ¯ à ¬¥âàë: |
526 | ;eax=dword ed_pos |
526 | ;eax=dword ed_pos |
527 | ;ebp=-梥â ed_color or shift_color |
527 | ;ebp=-梥â ed_color or shift_color |
528 | .draw_rectangle: |
528 | .draw_rectangle: |
529 | mov ecx,dword ed_offset |
529 | mov ecx,dword ed_offset |
530 | sub eax,ecx |
530 | sub eax,ecx |
531 | lea ebx,[eax*2+eax] |
531 | lea ebx,[eax*2+eax] |
532 | shl ebx,1 |
532 | shl ebx,1 |
533 | inc ebx |
533 | inc ebx |
534 | add ebx,ed_left |
534 | add ebx,ed_left |
535 | shl ebx,16 |
535 | shl ebx,16 |
536 | add ebx,6 |
536 | add ebx,6 |
537 | mov edx,ebp |
537 | mov edx,ebp |
538 | call .draw_bg_eax |
538 | call .draw_bg_eax |
539 | ret |
539 | ret |
540 | ;;;;;;;;;;;;;;;;;; |
540 | ;;;;;;;;;;;;;;;;;; |
541 | ;;஢¥àª ¦ â «¨ shift |
541 | ;;஢¥àª ¦ â «¨ shift |
542 | ;;;;;;;;;;;;;;;;;; |
542 | ;;;;;;;;;;;;;;;;;; |
543 | .check_shift: |
543 | .check_shift: |
544 | pusha ;á®åà ¨¬ ¢á¥ ॣ¨áâàë |
544 | pusha ;á®åà ¨¬ ¢á¥ ॣ¨áâàë |
545 | mcall 66,3,1 |
545 | mcall 66,3 |
546 | test al,0x03 |
546 | test al,0x03 |
547 | je @f |
547 | je @f |
548 | or word ed_flags,ed_shift ;ãáâ ®¢¨¬ ä« £ |
548 | or word ed_flags,ed_shift ;ãáâ ®¢¨¬ ä« £ |
549 | @@:edit_ex |
549 | @@:edit_ex |
550 | } |
550 | } |
551 | ;¬ ªà®á ª« ¢¨è ª®â®àë¥ ¯à®¨á室¨â ॠªæ¨ï |
551 | ;¬ ªà®á ª« ¢¨è ª®â®àë¥ ¯à®¨á室¨â ॠªæ¨ï |
552 | macro use_key_process backspase,delete,left,right,home,end,insert |
552 | macro use_key_process backspase,delete,left,right,home,end,insert |
553 | { |
553 | { |
554 | if backspase eq |
554 | if backspase eq |
555 | else |
555 | else |
556 | cmp ah,8 |
556 | cmp ah,8 |
557 | jz .backspace |
557 | jz .backspace |
558 | end if |
558 | end if |
559 | if delete eq |
559 | if delete eq |
560 | else |
560 | else |
561 | cmp ah,0xb6 |
561 | cmp ah,0xb6 |
562 | jz .delete |
562 | jz .delete |
563 | end if |
563 | end if |
564 | if left eq |
564 | if left eq |
565 | else |
565 | else |
566 | cmp ah,176 |
566 | cmp ah,176 |
567 | jz .left |
567 | jz .left |
568 | end if |
568 | end if |
569 | if right eq |
569 | if right eq |
570 | else |
570 | else |
571 | cmp ah,179 |
571 | cmp ah,179 |
572 | jz .right |
572 | jz .right |
573 | end if |
573 | end if |
574 | if home eq |
574 | if home eq |
575 | else |
575 | else |
576 | cmp ah,180 |
576 | cmp ah,180 |
577 | jz .home |
577 | jz .home |
578 | end if |
578 | end if |
579 | if home eq |
579 | if home eq |
580 | else |
580 | else |
581 | cmp ah,181 |
581 | cmp ah,181 |
582 | jz .end |
582 | jz .end |
583 | end if |
583 | end if |
584 | if insert eq |
584 | if insert eq |
585 | else |
585 | else |
586 | cmp ah,185 ;insert |
586 | cmp ah,185 ;insert |
587 | jz .insert |
587 | jz .insert |
588 | end if |
588 | end if |
589 | } |
589 | } |
590 | macro use_key_no_process up,down,esc,enter,tab,numl,capsl,scrolll |
590 | macro use_key_no_process up,down,esc,enter,tab,numl,capsl,scrolll |
591 | { |
591 | { |
592 | if up eq |
592 | if up eq |
593 | else |
593 | else |
594 | cmp ah,177 |
594 | cmp ah,177 |
595 | jz edit_box.editbox_exit |
595 | jz edit_box.editbox_exit |
596 | end if |
596 | end if |
597 | if down eq |
597 | if down eq |
598 | else |
598 | else |
599 | cmp ah,178 |
599 | cmp ah,178 |
600 | jz edit_box.editbox_exit |
600 | jz edit_box.editbox_exit |
601 | end if |
601 | end if |
602 | if esc eq |
602 | if esc eq |
603 | else |
603 | else |
604 | cmp ah,27 ;ESC - ª« ¢¨è )) |
604 | cmp ah,27 ;ESC - ª« ¢¨è )) |
605 | jz edit_box.editbox_exit |
605 | jz edit_box.editbox_exit |
606 | end if |
606 | end if |
607 | if enter eq |
607 | if enter eq |
608 | else |
608 | else |
609 | cmp ah,13 ;ENTER - ª« ¢¨è )) |
609 | cmp ah,13 ;ENTER - ª« ¢¨è )) |
610 | jz edit_box.editbox_exit |
610 | jz edit_box.editbox_exit |
611 | end if |
611 | end if |
612 | if tab eq |
612 | if tab eq |
613 | else |
613 | else |
614 | cmp ah,9 ;TAB - ª« ¢¨è )) |
614 | cmp ah,9 ;TAB - ª« ¢¨è )) |
615 | jz edit_box.editbox_exit |
615 | jz edit_box.editbox_exit |
616 | end if |
616 | end if |
617 | 617 | ||
618 | if numl eq |
618 | if numl eq |
619 | else |
619 | else |
620 | cmp ah,4 ;Num Lock - ª« ¢¨è )) |
620 | cmp ah,4 ;Num Lock - ª« ¢¨è )) |
621 | jz edit_box.editbox_exit |
621 | jz edit_box.editbox_exit |
622 | end if |
622 | end if |
623 | 623 | ||
624 | if capsl eq |
624 | if capsl eq |
625 | else |
625 | else |
626 | cmp ah,2 ;Caps Lock - ª« ¢¨è )) |
626 | cmp ah,2 ;Caps Lock - ª« ¢¨è )) |
627 | jz edit_box.editbox_exit |
627 | jz edit_box.editbox_exit |
628 | end if |
628 | end if |
629 | 629 | ||
630 | if scrolll eq |
630 | if scrolll eq |
631 | else |
631 | else |
632 | cmp ah,1 ;Scroll Lock - ª« ¢¨è )) |
632 | cmp ah,1 ;Scroll Lock - ª« ¢¨è )) |
633 | jz edit_box.editbox_exit |
633 | jz edit_box.editbox_exit |
634 | end if |
634 | end if |
635 | 635 | ||
636 | } |
636 | } |
637 | 637 | ||
638 | macro use_key_figures_only |
638 | macro use_key_figures_only |
639 | { |
639 | { |
640 | test word ed_flags,ed_figure_only ; ⮫쪮 æ¨äàë ? |
640 | test word ed_flags,ed_figure_only ; ⮫쪮 æ¨äàë ? |
641 | jz @f |
641 | jz @f |
642 | cmp ah,'0' |
642 | cmp ah,'0' |
643 | jb .editbox_exit |
643 | jb .editbox_exit |
644 | cmp ah,'9' |
644 | cmp ah,'9' |
645 | ja .editbox_exit |
645 | ja .editbox_exit |
646 | @@: |
646 | @@: |
647 | } |
647 | } |
648 | macro are_key_shift_press |
648 | macro are_key_shift_press |
649 | { |
649 | { |
650 | test word ed_flags,ed_shift_on |
650 | test word ed_flags,ed_shift_on |
651 | je @f |
651 | je @f |
652 | ;å®¤ë¥ ¤ ë¥ edx=ed_size;ecx=ed_pos |
652 | ;å®¤ë¥ ¤ ë¥ edx=ed_size;ecx=ed_pos |
653 | push eax |
653 | push eax |
654 | mov edx,ed_size |
654 | mov edx,ed_size |
655 | mov ecx, ed_pos |
655 | mov ecx, ed_pos |
656 | pusha |
656 | pusha |
657 | ;;;;;;;;;;;;;;;;;;;;; |
657 | ;;;;;;;;;;;;;;;;;;;;; |
658 | ;clear input arrea |
658 | ;clear input arrea |
659 | mov ebp,ed_color |
659 | mov ebp,ed_color |
660 | mov ebx,dword ed_shift_pos |
660 | mov ebx,dword ed_shift_pos |
661 | call .sh_cl_ |
661 | call .sh_cl_ |
662 | mov ebp,ed_size |
662 | mov ebp,ed_size |
663 | call .clear_bg |
663 | call .clear_bg |
664 | ;;;;;;;;;;;;;;;;;;;;; |
664 | ;;;;;;;;;;;;;;;;;;;;; |
665 | popa |
665 | popa |
666 | call .del_char |
666 | call .del_char |
667 | ;;;; |
667 | ;;;; |
668 | mov eax,dword ed_shift_pos |
668 | mov eax,dword ed_shift_pos |
669 | mov ebx,ed_size |
669 | mov ebx,ed_size |
670 | sub ebx,eax |
670 | sub ebx,eax |
671 | mov ed_size,ebx |
671 | mov ed_size,ebx |
672 | pop eax |
672 | pop eax |
673 | @@: |
673 | @@: |
674 | } |
674 | } |
675 | macro are_key_cur_end |
675 | macro are_key_cur_end |
676 | { |
676 | { |
677 | mov ecx,ed_size |
677 | mov ecx,ed_size |
678 | mov edx, ed_max |
678 | mov edx, ed_max |
679 | test word ed_flags,ed_insert |
679 | test word ed_flags,ed_insert |
680 | jne @f |
680 | jne @f |
681 | cmp ecx,edx |
681 | cmp ecx,edx |
682 | jae .editbox_exit |
682 | jae .editbox_exit |
683 | @@: mov ebx, ed_pos |
683 | @@: mov ebx, ed_pos |
684 | cmp ebx,edx |
684 | cmp ebx,edx |
685 | jl @f ; ¥á«¨ ¬¥ìè¥ ¨«¨ à ¢® |
685 | jl @f ; ¥á«¨ ¬¥ìè¥ ¨«¨ à ¢® |
686 | jmp .editbox_exit |
686 | jmp .editbox_exit |
687 | 687 | ||
688 | @@: ; ᤢ¨£ ¥¬ ᨬ¢®«ë ¯®á«¥ ªãàá®à ¢¯à ¢® |
688 | @@: ; ᤢ¨£ ¥¬ ᨬ¢®«ë ¯®á«¥ ªãàá®à ¢¯à ¢® |
689 | mov ecx,ed_size |
689 | mov ecx,ed_size |
690 | push edi eax |
690 | push edi eax |
691 | mov ebp,edi |
691 | mov ebp,edi |
692 | mov esi,ed_text ; ª § â¥«ì ¡ãä¥à |
692 | mov esi,ed_text ; ª § â¥«ì ¡ãä¥à |
693 | ;㤥¬ à ¡®â âì á® áâப®© |
693 | ;㤥¬ à ¡®â âì á® áâப®© |
694 | add esi,ecx ;add ed_size ¤®¡ ¢¨¬ max size |
694 | add esi,ecx ;add ed_size ¤®¡ ¢¨¬ max size |
695 | mov edi,esi |
695 | mov edi,esi |
696 | 696 | ||
697 | cmp ecx,ebx ; ᫨ ã á ¯®§¨æ¨ï ªãàá®à = ⥪ã饬ã à §¬¥àã ¯¥ç â ëå ᨬ¢®«®¢ â.¥. ªãàá®à á⮨⠢ ª®æ¥ |
697 | cmp ecx,ebx ; ᫨ ã á ¯®§¨æ¨ï ªãàá®à = ⥪ã饬ã à §¬¥àã ¯¥ç â ëå ᨬ¢®«®¢ â.¥. ªãàá®à á⮨⠢ ª®æ¥ |
698 | je .In_k |
698 | je .In_k |
699 | 699 | ||
700 | test word [ebp+40],ed_insert ;IF insert is enable â.ª. edi ¨§¬¥¥ ¤à¥á㥬 ç¥à¥§ ebp |
700 | test word [ebp+40],ed_insert ;IF insert is enable â.ª. edi ¨§¬¥¥ ¤à¥á㥬 ç¥à¥§ ebp |
701 | jne .ins_v |
701 | jne .ins_v |
702 | ;clear |
702 | ;clear |
703 | pusha |
703 | pusha |
704 | mov edi,ebp |
704 | mov edi,ebp |
705 | mov ebp,ed_size |
705 | mov ebp,ed_size |
706 | call .clear_bg |
706 | call .clear_bg |
707 | popa |
707 | popa |
708 | sub ecx,ebx ; ©¤¥¬ ª®«-¢® ᨬ¢®«®¢ ¤«ï ¯¥à¥¤¢¨¦¥¨ï. |
708 | sub ecx,ebx ; ©¤¥¬ ª®«-¢® ᨬ¢®«®¢ ¤«ï ¯¥à¥¤¢¨¦¥¨ï. |
709 | inc edi ;¬¥á⨬ è¨ á¨¬¢®«ë ¢ ¯à ¢® |
709 | inc edi ;¬¥á⨬ è¨ á¨¬¢®«ë ¢ ¯à ¢® |
710 | std |
710 | std |
711 | inc ecx |
711 | inc ecx |
712 | @@: |
712 | @@: |
713 | ;-------- |
713 | ;-------- |
714 | lodsb |
714 | lodsb |
715 | stosb |
715 | stosb |
716 | ;-------- |
716 | ;-------- |
717 | loop @b |
717 | loop @b |
718 | .In_k: cld |
718 | .In_k: cld |
719 | pop eax |
719 | pop eax |
720 | mov al,ah |
720 | mov al,ah |
721 | stosb |
721 | stosb |
722 | pop edi |
722 | pop edi |
723 | ; ¢áâ ¢«ï¥¬ ª®¤ ª« ¢¨è¨ â㤠, £¤¥ ªãàá®à |
723 | ; ¢áâ ¢«ï¥¬ ª®¤ ª« ¢¨è¨ â㤠, £¤¥ ªãàá®à |
724 | ; 㢥«¨ç¨¢ ¥¬ § 票¥ à §¬¥à ¨ ¯®§¨æ¨¨ |
724 | ; 㢥«¨ç¨¢ ¥¬ § 票¥ à §¬¥à ¨ ¯®§¨æ¨¨ |
725 | inc dword ed_size |
725 | inc dword ed_size |
726 | inc dword ed_pos |
726 | inc dword ed_pos |
727 | call .draw_all2 |
727 | call .draw_all2 |
728 | jmp .shift |
728 | jmp .shift |
729 | } |
729 | } |
730 | macro use_work_key |
730 | macro use_work_key |
731 | { |
731 | { |
732 | .insert: test word ed_flags,ed_insert ;not word ed_insert |
732 | .insert: test word ed_flags,ed_insert ;not word ed_insert |
733 | je @f |
733 | je @f |
734 | and word ed_flags,ed_insert_cl |
734 | and word ed_flags,ed_insert_cl |
735 | jmp .editbox_exit |
735 | jmp .editbox_exit |
736 | @@: |
736 | @@: |
737 | or word ed_flags,ed_insert |
737 | or word ed_flags,ed_insert |
738 | jmp .editbox_exit |
738 | jmp .editbox_exit |
739 | .ins_v: |
739 | .ins_v: |
740 | dec dword [ebp+42];ed_size ;processing is insert |
740 | dec dword [ebp+42];ed_size ;processing is insert |
741 | sub esi,ecx |
741 | sub esi,ecx |
742 | add esi,ebx |
742 | add esi,ebx |
743 | mov edi,esi |
743 | mov edi,esi |
744 | ;clear |
744 | ;clear |
745 | pusha |
745 | pusha |
746 | mov edi,ebp |
746 | mov edi,ebp |
747 | mov ebp,ed_pos |
747 | mov ebp,ed_pos |
748 | call .clear_bg |
748 | call .clear_bg |
749 | popa |
749 | popa |
750 | jmp .In_k |
750 | jmp .In_k |
751 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
751 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
752 | .delete: |
752 | .delete: |
753 | mov edx,ed_size |
753 | mov edx,ed_size |
754 | mov ecx,ed_pos |
754 | mov ecx,ed_pos |
755 | cmp edx,ecx |
755 | cmp edx,ecx |
756 | jg .bac_del |
756 | jg .bac_del |
757 | test word ed_flags,ed_shift_on |
757 | test word ed_flags,ed_shift_on |
758 | jne .del_bac |
758 | jne .del_bac |
759 | edit_ex |
759 | edit_ex |
760 | .bac_del: |
760 | .bac_del: |
761 | call .del_char |
761 | call .del_char |
762 | jmp .draw_all |
762 | jmp .draw_all |
763 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
763 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
764 | ;--- ¦ â ª« ¢¨è backspace --- |
764 | ;--- ¦ â ª« ¢¨è backspace --- |
765 | .backspace: |
765 | .backspace: |
766 | ; ¯à®¢¥à塞, ªãàá®à ã «¥¢®£® ªà ï ? |
766 | ; ¯à®¢¥à塞, ªãàá®à ã «¥¢®£® ªà ï ? |
767 | mov ecx,ed_pos |
767 | mov ecx,ed_pos |
768 | test ecx,ecx |
768 | test ecx,ecx |
769 | jnz .del_bac |
769 | jnz .del_bac |
770 | test word ed_flags,ed_shift_on |
770 | test word ed_flags,ed_shift_on |
771 | jne .bac_del |
771 | jne .bac_del |
772 | 772 | ||
773 | edit_ex |
773 | edit_ex |
774 | .del_bac: |
774 | .del_bac: |
775 | mov edx,ed_size |
775 | mov edx,ed_size |
776 | cmp edx,ecx ;if ed_pos=ed_size |
776 | cmp edx,ecx ;if ed_pos=ed_size |
777 | je @f |
777 | je @f |
778 | dec ecx |
778 | dec ecx |
779 | call .del_char |
779 | call .del_char |
780 | @@: test word ed_flags,ed_shift_on |
780 | @@: test word ed_flags,ed_shift_on |
781 | jne .bac_del |
781 | jne .bac_del |
782 | dec dword ed_pos |
782 | dec dword ed_pos |
783 | .draw_all: |
783 | .draw_all: |
784 | push .shift;.draw_cursor_text;eax |
784 | push .shift;.draw_cursor_text;eax |
785 | 785 | ||
786 | test word ed_flags,ed_shift_on |
786 | test word ed_flags,ed_shift_on |
787 | je @f |
787 | je @f |
788 | mov eax,dword ed_shift_pos |
788 | mov eax,dword ed_shift_pos |
789 | mov ebx,ed_size |
789 | mov ebx,ed_size |
790 | sub ebx,eax |
790 | sub ebx,eax |
791 | mov ed_size,ebx |
791 | mov ed_size,ebx |
792 | 792 | ||
793 | mov ebp,ed_color |
793 | mov ebp,ed_color |
794 | call .clear_cursor |
794 | call .clear_cursor |
795 | call .check_offset |
795 | call .check_offset |
796 | call .draw_bg |
796 | call .draw_bg |
797 | ret |
797 | ret |
798 | @@: dec dword ed_size |
798 | @@: dec dword ed_size |
799 | 799 | ||
800 | .draw_all2: |
800 | .draw_all2: |
801 | and word ed_flags,ed_shift_cl |
801 | and word ed_flags,ed_shift_cl |
802 | mov ebp,ed_color |
802 | mov ebp,ed_color |
803 | call .clear_cursor |
803 | call .clear_cursor |
804 | call .check_offset |
804 | call .check_offset |
805 | mov ebp,ed_size |
805 | mov ebp,ed_size |
806 | call .clear_bg |
806 | call .clear_bg |
807 | ret |
807 | ret |
808 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
808 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
809 | ;--- ¦ â ª« ¢¨è left --- |
809 | ;--- ¦ â ª« ¢¨è left --- |
810 | .left: mov ebx,ed_pos |
810 | .left: mov ebx,ed_pos |
811 | test ebx,ebx |
811 | test ebx,ebx |
812 | jz .sh_st_of |
812 | jz .sh_st_of |
813 | or word ed_flags,ed_left_fl |
813 | or word ed_flags,ed_left_fl |
814 | call .sh_first_sh |
814 | call .sh_first_sh |
815 | dec dword ed_pos |
815 | dec dword ed_pos |
816 | call .sh_enable |
816 | call .sh_enable |
817 | jmp .draw_cursor_text |
817 | jmp .draw_cursor_text |
818 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
818 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
819 | ;--- ¦ â ª« ¢¨è right --- |
819 | ;--- ¦ â ª« ¢¨è right --- |
820 | .right: mov ebx,ed_pos |
820 | .right: mov ebx,ed_pos |
821 | cmp ebx,ed_size |
821 | cmp ebx,ed_size |
822 | je .sh_st_of |
822 | je .sh_st_of |
823 | and word ed_flags,ed_right_fl |
823 | and word ed_flags,ed_right_fl |
824 | call .sh_first_sh |
824 | call .sh_first_sh |
825 | inc dword ed_pos |
825 | inc dword ed_pos |
826 | call .sh_enable |
826 | call .sh_enable |
827 | jmp .draw_cursor_text |
827 | jmp .draw_cursor_text |
828 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
828 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
829 | .home: |
829 | .home: |
830 | mov ebx,ed_pos |
830 | mov ebx,ed_pos |
831 | test ebx,ebx |
831 | test ebx,ebx |
832 | jz .sh_st_of |
832 | jz .sh_st_of |
833 | call .sh_first_sh |
833 | call .sh_first_sh |
834 | xor eax,eax |
834 | xor eax,eax |
835 | mov ed_pos,eax |
835 | mov ed_pos,eax |
836 | call .sh_home_end |
836 | call .sh_home_end |
837 | jmp .draw_cursor_text |
837 | jmp .draw_cursor_text |
838 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
838 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
839 | .end: |
839 | .end: |
840 | mov ebx,ed_pos |
840 | mov ebx,ed_pos |
841 | cmp ebx,dword ed_size |
841 | cmp ebx,dword ed_size |
842 | je .sh_st_of |
842 | je .sh_st_of |
843 | call .sh_first_sh |
843 | call .sh_first_sh |
844 | mov eax,ed_size |
844 | mov eax,ed_size |
845 | mov ed_pos,eax |
845 | mov ed_pos,eax |
846 | call .sh_home_end |
846 | call .sh_home_end |
847 | jmp .draw_cursor_text |
847 | jmp .draw_cursor_text |
848 | } |
848 | } |
849 | 849 | ||
850 | macro use_mouse_func |
850 | macro use_mouse_func |
851 | { |
851 | { |
852 | ;---------------------------------------------------------- |
852 | ;---------------------------------------------------------- |
853 | ;--- ¡à ¡®âª .mouse_wigwag |
853 | ;--- ¡à ¡®âª .mouse_wigwag |
854 | ;---------------------------------------------------------- |
854 | ;---------------------------------------------------------- |
855 | .mouse_wigwag: |
855 | .mouse_wigwag: |
856 | shr eax,16 |
856 | shr eax,16 |
857 | or word ed_flags,ed_shift_bac+ed_shift_on+ed_shift |
857 | or word ed_flags,ed_shift_bac+ed_shift_on+ed_shift |
858 | ;;;;;;;;;;;;;;;;;; |
858 | ;;;;;;;;;;;;;;;;;; |
859 | ;;¯à®æ¥¤ãà ®¡à ¡®âª¨ ¯®«®¦¥¨ï ¢ë¤¥«¥®£® ⥪áâ , ª®£¤ ¯à®¨á室¨â ¢ë室 § ¯à¥¤¥«ë editbox |
859 | ;;¯à®æ¥¤ãà ®¡à ¡®âª¨ ¯®«®¦¥¨ï ¢ë¤¥«¥®£® ⥪áâ , ª®£¤ ¯à®¨á室¨â ¢ë室 § ¯à¥¤¥«ë editbox |
860 | ;;;;;;;;;;;;;;;;;; |
860 | ;;;;;;;;;;;;;;;;;; |
861 | test ax,0x8000 |
861 | test ax,0x8000 |
862 | jnz .mleft |
862 | jnz .mleft |
863 | 863 | ||
864 | mov ebx,ed_left |
864 | mov ebx,ed_left |
865 | cmp eax,ebx |
865 | cmp eax,ebx |
866 | jb .mleft |
866 | jb .mleft |
867 | 867 | ||
868 | add ebx,ed_width |
868 | add ebx,ed_width |
869 | cmp eax,ebx |
869 | cmp eax,ebx |
870 | ja .mright |
870 | ja .mright |
871 | 871 | ||
872 | sub ebx,ed_width |
872 | sub ebx,ed_width |
873 | 873 | ||
874 | xor edx,edx |
874 | xor edx,edx |
875 | sub eax,ebx ; ¢ëç⨬ ¨§ ª®®à¤¨ â ¬ë誨 ¯® ®á¨ å ª®®à¤¨ âë ¤® editbox ¯® ®á¨ å |
875 | sub eax,ebx ; ¢ëç⨬ ¨§ ª®®à¤¨ â ¬ë誨 ¯® ®á¨ å ª®®à¤¨ âë ¤® editbox ¯® ®á¨ å |
876 | mov ebx,6 |
876 | mov ebx,6 |
877 | div ebx |
877 | div ebx |
878 | ;;;;;;;;;;;;;;;;;; |
878 | ;;;;;;;;;;;;;;;;;; |
879 | ;;¯à®æ¥¤ãà ®¡à ¡®âª¨ ¯®«®¦¥¨ï ¢ë¤¥«¥®£® ⥪áâ , ¢ ¯à¥¤¥« å ®¡« á⨠editbox |
879 | ;;¯à®æ¥¤ãà ®¡à ¡®âª¨ ¯®«®¦¥¨ï ¢ë¤¥«¥®£® ⥪áâ , ¢ ¯à¥¤¥« å ®¡« á⨠editbox |
880 | ;;;;;;;;;;;;;;;;;; |
880 | ;;;;;;;;;;;;;;;;;; |
881 | ;®«ã稫¨ ª®®à¤¨ âë ¢ eax ¬ë誨, â.¥. ªã¤ ® ¯¥à¥¬¥á⨫ áì |
881 | ;®«ã稫¨ ª®®à¤¨ âë ¢ eax ¬ë誨, â.¥. ªã¤ ® ¯¥à¥¬¥á⨫ áì |
882 | ;¨á®¢ ¨¥ § ªà è¥ëå ¯àאַ㣮«ì¨ª®¢ ¨ ®ç¨á⪠¨å |
882 | ;¨á®¢ ¨¥ § ªà è¥ëå ¯àאַ㣮«ì¨ª®¢ ¨ ®ç¨á⪠¨å |
883 | add eax,ed_offset ;¤®¡ ¢¨¬ ᬥ饨¥ |
883 | add eax,ed_offset ;¤®¡ ¢¨¬ ᬥ饨¥ |
884 | cmp eax,dword ed_size ;¥á«¨ ¢ë諨 § ¯à¥¤¥«ë, â® ¨ç¥£® ¥ ¤¥« âì |
884 | cmp eax,dword ed_size ;¥á«¨ ¢ë諨 § ¯à¥¤¥«ë, â® ¨ç¥£® ¥ ¤¥« âì |
885 | ja .mwigvag |
885 | ja .mwigvag |
886 | .mdraw: |
886 | .mdraw: |
887 | mov dword ed_pos,eax ;á®åà ¨¬ ®¢®¥ § 票¥ |
887 | mov dword ed_pos,eax ;á®åà ¨¬ ®¢®¥ § 票¥ |
888 | ;¨á®¢ ¨¥ § ªà è¥ëå ¯àאַ㣮«ì¨ª®¢ ¨ ®ç¨á⪠¨å |
888 | ;¨á®¢ ¨¥ § ªà è¥ëå ¯àאַ㣮«ì¨ª®¢ ¨ ®ç¨á⪠¨å |
889 | mov ecx,dword ed_shift_pos |
889 | mov ecx,dword ed_shift_pos |
890 | mov ebx,dword ed_shift_pos_old |
890 | mov ebx,dword ed_shift_pos_old |
891 | mov dword ed_shift_pos_old,eax ;¢¥á¥¬ ®¢®¥ § 票¥ áâ ன ¯®§¨æ¨¨ ªãàá®à |
891 | mov dword ed_shift_pos_old,eax ;¢¥á¥¬ ®¢®¥ § 票¥ áâ ன ¯®§¨æ¨¨ ªãàá®à |
892 | ;¯à®¢¥àª ¨ à¨á®¢ ¨¥ § ªà è¥ëå ®¡« á⥩ |
892 | ;¯à®¢¥àª ¨ à¨á®¢ ¨¥ § ªà è¥ëå ®¡« á⥩ |
893 | cmp ecx,ebx ;¢ëïá塞 ªã¤ ¡ë«® ¤¢¨¦¥¨¥ ®¤¨ è £ § ¤ |
893 | cmp ecx,ebx ;¢ëïá塞 ªã¤ ¡ë«® ¤¢¨¦¥¨¥ ®¤¨ è £ § ¤ |
894 | je .m1_shem ;¤¢¨¦¥¨ï ¥ ¡ë«® à ¥¥ |
894 | je .m1_shem ;¤¢¨¦¥¨ï ¥ ¡ë«® à ¥¥ |
895 | jb .msmaller ;¤¢¨¦¥¨¥ ¡ë«® -> |
895 | jb .msmaller ;¤¢¨¦¥¨¥ ¡ë«® -> |
896 | cmp ebx,eax ;¤¢¨¦¥¨¥ ¡ë«® ¤® í⮣® <- ¨ âãâ ¬ë ¯à®¢¥à塞 ᥩç á ªã¤ ¤¢¨¦¥¨¥ ¯à®¨á室¨â |
896 | cmp ebx,eax ;¤¢¨¦¥¨¥ ¡ë«® ¤® í⮣® <- ¨ âãâ ¬ë ¯à®¢¥à塞 ᥩç á ªã¤ ¤¢¨¦¥¨¥ ¯à®¨á室¨â |
897 | ja .m1_shem ;¥á«¨ ¡ë«® ¤¢¨¦¥¨¥ <- ⮠㦮 § ªà á¨âì ®¡« áâì |
897 | ja .m1_shem ;¥á«¨ ¡ë«® ¤¢¨¦¥¨¥ <- ⮠㦮 § ªà á¨âì ®¡« áâì |
898 | je .mwigvag ;¥á«¨ ¨§¬¥¥¨ï ¥ ¡ë«®, â® ¨ç¥£® ¥ ¤¥« âì |
898 | je .mwigvag ;¥á«¨ ¨§¬¥¥¨ï ¥ ¡ë«®, â® ¨ç¥£® ¥ ¤¥« âì |
899 | mov ebp,ed_color ;âãâ 㦮 ®ç¨áâ¨âì ®¡« áâì c ed_pos ed_shift_pos_old |
899 | mov ebp,ed_color ;âãâ 㦮 ®ç¨áâ¨âì ®¡« áâì c ed_pos ed_shift_pos_old |
900 | ;¢å®¤ë¥ ¯ à ¬¥âàë ebp=color ebx=ed_shift_pos |
900 | ;¢å®¤ë¥ ¯ à ¬¥âàë ebp=color ebx=ed_shift_pos |
901 | call .sh_cl_ |
901 | call .sh_cl_ |
902 | jmp .mwigvag |
902 | jmp .mwigvag |
903 | .msmaller: |
903 | .msmaller: |
904 | cmp ebx,eax |
904 | cmp ebx,eax |
905 | jb .m1_shem |
905 | jb .m1_shem |
906 | mov ebp,ed_color |
906 | mov ebp,ed_color |
907 | ;¢å®¤ë¥ ¯ à ¬¥âàë ebp=color ebx=ed_shift_pos |
907 | ;¢å®¤ë¥ ¯ à ¬¥âàë ebp=color ebx=ed_shift_pos |
908 | call .sh_cl_ |
908 | call .sh_cl_ |
909 | jmp .mwigvag |
909 | jmp .mwigvag |
910 | ;alike = |
910 | ;alike = |
911 | .m1_shem: |
911 | .m1_shem: |
912 | mov ebp,shift_color |
912 | mov ebp,shift_color |
913 | ;¢å®¤ë¥ ¯ à ¬¥âàë ebp=color ebx=ed_shift_pos |
913 | ;¢å®¤ë¥ ¯ à ¬¥âàë ebp=color ebx=ed_shift_pos |
914 | mov ebx,ecx |
914 | mov ebx,ecx |
915 | call .sh_cl_ |
915 | call .sh_cl_ |
916 | jmp .mwigvag |
916 | jmp .mwigvag |
917 | .mwigvag: |
917 | .mwigvag: |
918 | and word ed_flags,ed_shift_mcl |
918 | and word ed_flags,ed_shift_mcl |
919 | jmp .draw_cursor_text |
919 | jmp .draw_cursor_text |
920 | ; popa |
920 | ; popa |
921 | ; ret |
921 | ; ret |
922 | .mleft: |
922 | .mleft: |
923 | 923 | ||
924 | mov eax,ed_pos |
924 | mov eax,ed_pos |
925 | cmp eax,0 |
925 | cmp eax,0 |
926 | jbe .mwigvag |
926 | jbe .mwigvag |
927 | dec eax |
927 | dec eax |
928 | call .check_offset |
928 | call .check_offset |
929 | push eax |
929 | push eax |
930 | mov ebx,ed_shift_pos |
930 | mov ebx,ed_shift_pos |
931 | mov ebp,shift_color |
931 | mov ebp,shift_color |
932 | call .sh_cl_ |
932 | call .sh_cl_ |
933 | pop eax |
933 | pop eax |
934 | jmp .mdraw |
934 | jmp .mdraw |
935 | .mright: |
935 | .mright: |
936 | mov eax,ed_pos |
936 | mov eax,ed_pos |
937 | mov ebx,ed_size |
937 | mov ebx,ed_size |
938 | cmp eax,ebx |
938 | cmp eax,ebx |
939 | jae .mwigvag |
939 | jae .mwigvag |
940 | inc eax |
940 | inc eax |
941 | call .check_offset |
941 | call .check_offset |
942 | mov ebx,ed_shift_pos |
942 | mov ebx,ed_shift_pos |
943 | mov ebp,shift_color |
943 | mov ebp,shift_color |
944 | push eax |
944 | push eax |
945 | call .sh_cl_ |
945 | call .sh_cl_ |
946 | pop eax |
946 | pop eax |
947 | jmp .mdraw |
947 | jmp .mdraw |
948 | } |
948 | } |
949 | 949 | ||
950 | macro use_work_mouse |
950 | macro use_work_mouse |
951 | ;---------------------------------------------------------- |
951 | ;---------------------------------------------------------- |
952 | ;--- ¥ 㤥ন¢ ¥¬ «¨ ¬ë ª« ¢¨èã ¬ë誨, ¯¥à¥¬¥é ï ªãàá®à, ¢® ¢á¥ à §ë¥ áâ®à®ë? |
952 | ;--- ¥ 㤥ন¢ ¥¬ «¨ ¬ë ª« ¢¨èã ¬ë誨, ¯¥à¥¬¥é ï ªãàá®à, ¢® ¢á¥ à §ë¥ áâ®à®ë? |
953 | ;---------------------------------------------------------- |
953 | ;---------------------------------------------------------- |
954 | { |
954 | { |
955 | test word ed_flags,ed_mouse_on |
955 | test word ed_flags,ed_mouse_on |
956 | jne .mouse_wigwag |
956 | jne .mouse_wigwag |
957 | ;---------------------------------------------------------- |
957 | ;---------------------------------------------------------- |
958 | ;--- ¯à®¢¥à塞, ¯®¯ ¤ ¥â «¨ ªãàá®à ¢ edit box ------------- |
958 | ;--- ¯à®¢¥à塞, ¯®¯ ¤ ¥â «¨ ªãàá®à ¢ edit box ------------- |
959 | ;---------------------------------------------------------- |
959 | ;---------------------------------------------------------- |
960 | 960 | ||
961 | mov ebx,ed_top |
961 | mov ebx,ed_top |
962 | cmp ax,bx |
962 | cmp ax,bx |
963 | jl ._blur;.mouse_end_no_focus |
963 | jl ._blur;.mouse_end_no_focus |
964 | 964 | ||
965 | add ebx,ed_height |
965 | add ebx,ed_height |
966 | cmp ax,bx |
966 | cmp ax,bx |
967 | jg ._blur;.mouse_end_no_focus |
967 | jg ._blur;.mouse_end_no_focus |
968 | 968 | ||
969 | shr eax,16 |
969 | shr eax,16 |
970 | 970 | ||
971 | mov ebx,ed_left |
971 | mov ebx,ed_left |
972 | cmp ax,bx |
972 | cmp ax,bx |
973 | jl ._blur;.mouse_end_no_focus |
973 | jl ._blur;.mouse_end_no_focus |
974 | 974 | ||
975 | add ebx,ed_width |
975 | add ebx,ed_width |
976 | 976 | ||
977 | cmp ax,bx |
977 | cmp ax,bx |
978 | jg ._blur;.mouse_end_no_focus |
978 | jg ._blur;.mouse_end_no_focus |
979 | 979 | ||
980 | ;--- ¨§¬¥ï¥¬ ¯®§¨æ¨î ªãàá®à --- |
980 | ;--- ¨§¬¥ï¥¬ ¯®§¨æ¨î ªãàá®à --- |
981 | push eax |
981 | push eax |
982 | mov ebp,ed_color |
982 | mov ebp,ed_color |
983 | call .clear_cursor |
983 | call .clear_cursor |
984 | pop eax |
984 | pop eax |
985 | ._mvpos: |
985 | ._mvpos: |
986 | 986 | ||
987 | xor edx,edx |
987 | xor edx,edx |
988 | sub eax,ed_left |
988 | sub eax,ed_left |
989 | 989 | ||
990 | mov ebx,6 |
990 | mov ebx,6 |
991 | div bx |
991 | div bx |
992 | add eax,ed_offset |
992 | add eax,ed_offset |
993 | cmp eax,ed_size |
993 | cmp eax,ed_size |
994 | jna ._mshift |
994 | jna ._mshift |
995 | mov eax,ed_size |
995 | mov eax,ed_size |
996 | ._mshift: |
996 | ._mshift: |
997 | ;;;;;;; |
997 | ;;;;;;; |
998 | ;;¥ªæ¨ï ®¡à ¡®âª¨ shift ¨ ¢ë¤¥«¥¨ï ¯® shift |
998 | ;;¥ªæ¨ï ®¡à ¡®âª¨ shift ¨ ¢ë¤¥«¥¨ï ¯® shift |
999 | ;;;;;;; |
999 | ;;;;;;; |
1000 | test word ed_flags,ed_shift_bac |
1000 | test word ed_flags,ed_shift_bac |
1001 | je @f |
1001 | je @f |
1002 | mov ebp,dword ed_color |
1002 | mov ebp,dword ed_color |
1003 | mov ebx,dword ed_shift_pos |
1003 | mov ebx,dword ed_shift_pos |
1004 | push eax |
1004 | push eax |
1005 | call .sh_cl_ |
1005 | call .sh_cl_ |
1006 | and word ed_flags,ed_shift_bac_cl |
1006 | and word ed_flags,ed_shift_bac_cl |
1007 | pop eax |
1007 | pop eax |
1008 | @@: |
1008 | @@: |
1009 | test word ed_flags,ed_mouse_on |
1009 | test word ed_flags,ed_mouse_on |
1010 | jne @f |
1010 | jne @f |
1011 | 1011 | ||
1012 | mov dword ed_shift_pos,eax |
1012 | mov dword ed_shift_pos,eax |
1013 | or word ed_flags,ed_mouse_on |
1013 | or word ed_flags,ed_mouse_on |
1014 | mov dword ed_pos,eax |
1014 | mov dword ed_pos,eax |
1015 | mov dword [mouse_flag],edi ;ãáâ ®¢¨¬ ¨¤¥â¨ä¨ª â®à |
1015 | mov dword [mouse_flag],edi ;ãáâ ®¢¨¬ ¨¤¥â¨ä¨ª â®à |
1016 | bts word ed_flags,1 ;ãáâ ®¢ª 䮪ãá |
1016 | bts word ed_flags,1 ;ãáâ ®¢ª 䮪ãá |
1017 | jmp .m_sh |
1017 | jmp .m_sh |
1018 | @@: |
1018 | @@: |
1019 | cmp eax,dword ed_shift_pos ;¥á«¨ ¯®§¨æ¨¨ ¥ ¨§¬¥¨«¨áì |
1019 | cmp eax,dword ed_shift_pos ;¥á«¨ ¯®§¨æ¨¨ ¥ ¨§¬¥¨«¨áì |
1020 | je .editbox_exit |
1020 | je .editbox_exit |
1021 | mov ed_pos,eax |
1021 | mov ed_pos,eax |
1022 | mov ebp,dword shift_color |
1022 | mov ebp,dword shift_color |
1023 | mov ebx,dword ed_shift_pos |
1023 | mov ebx,dword ed_shift_pos |
1024 | call .sh_cl_ |
1024 | call .sh_cl_ |
1025 | or word ed_flags,ed_mous_adn_b ;ãáâ ®¢¨¬ ¡¨â çâ® ¬ë ¢ë¤¥«¨«¨ +shift_on + |
1025 | or word ed_flags,ed_mous_adn_b ;ãáâ ®¢¨¬ ¡¨â çâ® ¬ë ¢ë¤¥«¨«¨ +shift_on + |
1026 | .m_sh: call .draw_text |
1026 | .m_sh: call .draw_text |
1027 | call .draw_cursor |
1027 | call .draw_cursor |
1028 | ;---------------------------------------------------------- |
1028 | ;---------------------------------------------------------- |
1029 | ;--- ¯à®æ¥¤ãà ãáâ ®¢ª¨ 䮪ãá --------------------------- |
1029 | ;--- ¯à®æ¥¤ãà ãáâ ®¢ª¨ 䮪ãá --------------------------- |
1030 | ;---------------------------------------------------------- |
1030 | ;---------------------------------------------------------- |
1031 | jmp .drc |
1031 | jmp .drc |
1032 | ._blur: |
1032 | ._blur: |
1033 | test word ed_flags,ed_always_focus |
1033 | test word ed_flags,ed_always_focus |
1034 | jne .editbox_exit |
1034 | jne .editbox_exit |
1035 | btr word ed_flags,1 ; ¥á«¨ ¥ ¢ 䮪ãá¥, ¢ë室¨¬ |
1035 | btr word ed_flags,1 ; ¥á«¨ ¥ ¢ 䮪ãá¥, ¢ë室¨¬ |
1036 | jnc .editbox_exit |
1036 | jnc .editbox_exit |
1037 | 1037 | ||
1038 | mov ebp,ed_color |
1038 | mov ebp,ed_color |
1039 | call .clear_cursor |
1039 | call .clear_cursor |
1040 | .drc: call .draw_border |
1040 | .drc: call .draw_border |
1041 | jmp .editbox_exit |
1041 | jmp .editbox_exit |
1042 | } |
1042 | } |
1043 | 1043 | ||
1044 | 1044 | ||
1045 | ; ªà®á ¢ë室 |
1045 | ; ªà®á ¢ë室 |
1046 | macro edit_ex |
1046 | macro edit_ex |
1047 | { |
1047 | { |
1048 | popad |
1048 | popad |
1049 | ret |
1049 | ret |
1050 | } |
1050 | } |
1051 | macro debug |
1051 | macro debug |
1052 | { |
1052 | { |
1053 | ;----------- ®â« ¤ª |
1053 | ;----------- ®â« ¤ª |
1054 | pushad |
1054 | pushad |
1055 | ; mov dword [ed_buffer.2],0 |
1055 | ; mov dword [ed_buffer.2],0 |
1056 | ; mov eax,edi |
1056 | ; mov eax,edi |
1057 | mov eax,dword [ed_buffer.2] |
1057 | mov eax,dword [ed_buffer.2] |
1058 | mov edi,ed_buffer.3 |
1058 | mov edi,ed_buffer.3 |
1059 | call .str |
1059 | call .str |
1060 | ;à¨á®¢ ¨¥ ä® |
1060 | ;à¨á®¢ ¨¥ ä® |
1061 | mov eax,13 |
1061 | mov eax,13 |
1062 | mov ebx,178*65536+70 |
1062 | mov ebx,178*65536+70 |
1063 | mov ecx,28*65536+10 |
1063 | mov ecx,28*65536+10 |
1064 | xor edx,edx |
1064 | xor edx,edx |
1065 | int 0x40 |
1065 | int 0x40 |
1066 | ;¢ë¢®¤ § 票ï íªà |
1066 | ;¢ë¢®¤ § 票ï íªà |
1067 | mov eax,4 |
1067 | mov eax,4 |
1068 | mov ebx,180*65536+30 |
1068 | mov ebx,180*65536+30 |
1069 | mov ecx,0x10DDBBCC |
1069 | mov ecx,0x10DDBBCC |
1070 | mov edx,ed_buffer.3 |
1070 | mov edx,ed_buffer.3 |
1071 | mov esi,8 |
1071 | mov esi,8 |
1072 | int 0x40 |
1072 | int 0x40 |
1073 | popad |
1073 | popad |
1074 | ;----------- ®â« ¤ª |
1074 | ;----------- ®â« ¤ª |
1075 | } |
1075 | } |
1076 | macro debug_func |
1076 | macro debug_func |
1077 | { |
1077 | { |
1078 | .str: |
1078 | .str: |
1079 | mov ecx,0x0a ;§ ¤ ¥âáï á¨á⥬ áç¨á«¥¨ï ¨§¬¥ïîâáï ॣ¨áâàë ebx,eax,ecx,edx ¢å®¤ë¥ ¯ à ¬¥âàë eax - ç¨á«® |
1079 | mov ecx,0x0a ;§ ¤ ¥âáï á¨á⥬ áç¨á«¥¨ï ¨§¬¥ïîâáï ॣ¨áâàë ebx,eax,ecx,edx ¢å®¤ë¥ ¯ à ¬¥âàë eax - ç¨á«® |
1080 | ;¯à¥à¥¢®¤ ç¨á« ¢ ASCII áâப㠢§®¤ë¥ ¤ ë¥ ecx=á¨á⥬ áç¨á«¥ï edi ¤à¥á ªã¤ § ¯¨áë¢ âì, ¡ã¤¥¬ áâபã, ¯à¨ç¥¬ ª®¥æ ¯¥à¥¬¥®© |
1080 | ;¯à¥à¥¢®¤ ç¨á« ¢ ASCII áâப㠢§®¤ë¥ ¤ ë¥ ecx=á¨á⥬ áç¨á«¥ï edi ¤à¥á ªã¤ § ¯¨áë¢ âì, ¡ã¤¥¬ áâபã, ¯à¨ç¥¬ ª®¥æ ¯¥à¥¬¥®© |
1081 | cmp eax,ecx ;áà ¢¨âì ¥á«¨ ¢ eax ¬¥ìè¥ ç¥¬ ¢ ecx â® ¯¥à¥©â¨ @@-1 â.¥. pop eax |
1081 | cmp eax,ecx ;áà ¢¨âì ¥á«¨ ¢ eax ¬¥ìè¥ ç¥¬ ¢ ecx â® ¯¥à¥©â¨ @@-1 â.¥. pop eax |
1082 | jb @f |
1082 | jb @f |
1083 | xor edx,edx ;®ç¨áâ¨âì edx |
1083 | xor edx,edx ;®ç¨áâ¨âì edx |
1084 | div ecx ;à §¤¥«¨âì - ®áâ ⮪ ¢ edx |
1084 | div ecx ;à §¤¥«¨âì - ®áâ ⮪ ¢ edx |
1085 | push edx ;¯®«®¦¨âì ¢ á⥪ |
1085 | push edx ;¯®«®¦¨âì ¢ á⥪ |
1086 | ;dec edi ;ᬥ饨¥ ¥®¡å®¤¨¬®¥ ¤«ï § ¯¨á¨ á ª®æ áâப¨ |
1086 | ;dec edi ;ᬥ饨¥ ¥®¡å®¤¨¬®¥ ¤«ï § ¯¨á¨ á ª®æ áâப¨ |
1087 | call .str;¯¥à¥©â¨ á ¬ã ᥡï â.¥. ¢ë§¢ âì á ¬ã á¥¡ï ¨ â ª ¤® ⮣® ¬®¬¥â ¯®ª ¢ eax ¥ á⠥⠬¥ìè¥ ç¥¬ ¢ ecx |
1087 | call .str;¯¥à¥©â¨ á ¬ã ᥡï â.¥. ¢ë§¢ âì á ¬ã á¥¡ï ¨ â ª ¤® ⮣® ¬®¬¥â ¯®ª ¢ eax ¥ á⠥⠬¥ìè¥ ç¥¬ ¢ ecx |
1088 | pop eax |
1088 | pop eax |
1089 | @@: ;cmp al,10 ;¯à®¢¥à¨âì ¥ ¬¥ìè¥ «¨ § 票¥ ¢ al 祬 10 (¤«ï á¨á⥬ë áç¨á«¥ï 10 ¤ ï ª®¬ ¤ - «¨è ï)) |
1089 | @@: ;cmp al,10 ;¯à®¢¥à¨âì ¥ ¬¥ìè¥ «¨ § 票¥ ¢ al 祬 10 (¤«ï á¨á⥬ë áç¨á«¥ï 10 ¤ ï ª®¬ ¤ - «¨è ï)) |
1090 | ;sbb al,$69 ;- ç¥áâ® ¤ ï ¨áâàãªæ¨ï ¬¥ï § áâ ¢«ï¥â § ¤ã¬ âìáï â.¥. ï ¥ § î ª ª íâ® à ¡®â ¥â |
1090 | ;sbb al,$69 ;- ç¥áâ® ¤ ï ¨áâàãªæ¨ï ¬¥ï § áâ ¢«ï¥â § ¤ã¬ âìáï â.¥. ï ¥ § î ª ª íâ® à ¡®â ¥â |
1091 | ;das ;¯®á«¥ ¤ ®© ª®¬ ¤ë ª ª ¡ë ¯à®¨á室¨â 㬥ì襨¥ al 66h (¢ ª¨£¥ ¯¨á ® ¤à㣮¥) |
1091 | ;das ;¯®á«¥ ¤ ®© ª®¬ ¤ë ª ª ¡ë ¯à®¨á室¨â 㬥ì襨¥ al 66h (¢ ª¨£¥ ¯¨á ® ¤à㣮¥) |
1092 | or al,0x30 ;¤ ï ª®¬ ¤ ª®à®ç¥ 祬 ¤¢¥ ¢ëè¥ |
1092 | or al,0x30 ;¤ ï ª®¬ ¤ ª®à®ç¥ 祬 ¤¢¥ ¢ëè¥ |
1093 | stosb ;§ ¯¨á âì í«¥¬¥â ¨§ ॣ¨áâà al ¢ ï祪㠯 ¬ï⨠es:edi |
1093 | stosb ;§ ¯¨á âì í«¥¬¥â ¨§ ॣ¨áâà al ¢ ï祪㠯 ¬ï⨠es:edi |
1094 | 1094 | ||
1095 | ret ;¢¥àãâìáï ç¥ì ¨â¥à¥áë© å®¤ â.ª. ¯®ª ¢ á⥪¥ åà ¨âìáï ª®«-¢® ¢ë§®¢®¢ â® á⮫쪮 à § ¬ë ¨ ¡ã¤¥¬ ¢ë§ë¢ âìáï |
1095 | ret ;¢¥àãâìáï ç¥ì ¨â¥à¥áë© å®¤ â.ª. ¯®ª ¢ á⥪¥ åà ¨âìáï ª®«-¢® ¢ë§®¢®¢ â® á⮫쪮 à § ¬ë ¨ ¡ã¤¥¬ ¢ë§ë¢ âìáï |
1096 | } |
1096 | } |
1097 | 1097 | ||
1098 | ;;;;;;;;;;;;;;; |
1098 | ;;;;;;;;;;;;;;; |
1099 | ;For LibGui |
1099 | ;For LibGui |
1100 | ;;;;;;;;;;;;;;; |
1100 | ;;;;;;;;;;;;;;; |
1101 | macro srt_ed_libgui |
1101 | macro srt_ed_libgui |
1102 | { |
1102 | { |
1103 | ed_width equ [EditBox.ed_width] ;è¨à¨ ª®¬¯®¥â |
1103 | ed_width equ [EditBox.ed_width] ;è¨à¨ ª®¬¯®¥â |
1104 | ed_left equ [EditBox.ed_left] ;¯®«®¦¥¨¥ ¯® ®á¨ å |
1104 | ed_left equ [EditBox.ed_left] ;¯®«®¦¥¨¥ ¯® ®á¨ å |
1105 | ed_top equ [EditBox.ed_top] ;¯®«®¦¥¨¥ ¯® ®á¨ ã |
1105 | ed_top equ [EditBox.ed_top] ;¯®«®¦¥¨¥ ¯® ®á¨ ã |
1106 | ed_color equ [EditBox.ed_color] ;梥â ä® ª®¬¯®¥â |
1106 | ed_color equ [EditBox.ed_color] ;梥â ä® ª®¬¯®¥â |
1107 | shift_color equ [EditBox.shift_color] ;=0x6a9480 |
1107 | shift_color equ [EditBox.shift_color] ;=0x6a9480 |
1108 | ed_focus_border_color equ [EditBox.ed_focus_border_color] ;梥â à ¬ª¨ ª®¬¯®¥â |
1108 | ed_focus_border_color equ [EditBox.ed_focus_border_color] ;梥â à ¬ª¨ ª®¬¯®¥â |
1109 | ed_blur_border_color equ [EditBox.ed_blur_border_color] ;梥⠥ ªâ¨¢®£® ª®¬¯®¥â |
1109 | ed_blur_border_color equ [EditBox.ed_blur_border_color] ;梥⠥ ªâ¨¢®£® ª®¬¯®¥â |
1110 | ed_text_color equ [EditBox.ed_text_color] ;梥â ⥪áâ |
1110 | ed_text_color equ [EditBox.ed_text_color] ;梥â ⥪áâ |
1111 | ed_max equ [EditBox.ed_max] ;ª®«-¢® ᨬ¢®«®¢ ª®â®àë¥ ¬®¦® ¬ ªá¨¬ «ì® ¢¢¥á⨠|
1111 | ed_max equ [EditBox.ed_max] ;ª®«-¢® ᨬ¢®«®¢ ª®â®àë¥ ¬®¦® ¬ ªá¨¬ «ì® ¢¢¥á⨠|
1112 | ed_text equ [EditBox.ed_text] ;㪠§ â¥«ì ¡ãä¥à |
1112 | ed_text equ [EditBox.ed_text] ;㪠§ â¥«ì ¡ãä¥à |
1113 | ed_flags equ [EditBox.ed_flags] ;ä« £¨ |
1113 | ed_flags equ [EditBox.ed_flags] ;ä« £¨ |
1114 | ed_size equ [EditBox.ed_size] ;ª®«-¢® ᨬ¢®«®¢ |
1114 | ed_size equ [EditBox.ed_size] ;ª®«-¢® ᨬ¢®«®¢ |
1115 | ed_pos equ [EditBox.ed_poz] ;¯®§¨æ¨ï ªãàá®à |
1115 | ed_pos equ [EditBox.ed_poz] ;¯®§¨æ¨ï ªãàá®à |
1116 | ed_offset equ [EditBox.ed_offset] ;ᬥ饨¥ |
1116 | ed_offset equ [EditBox.ed_offset] ;ᬥ饨¥ |
1117 | cl_curs_x equ [EditBox.cl_curs_x] ;¯à¥¤ë¤ã饥 ª®®à¤¨ â ªãàá®à ¯® å |
1117 | cl_curs_x equ [EditBox.cl_curs_x] ;¯à¥¤ë¤ã饥 ª®®à¤¨ â ªãàá®à ¯® å |
1118 | cl_curs_y equ [EditBox.cl_curs_y] ;¯à¥¤ë¤ã饥 ª®®à¤¨ â ªãàá®à ¯® ã |
1118 | cl_curs_y equ [EditBox.cl_curs_y] ;¯à¥¤ë¤ã饥 ª®®à¤¨ â ªãàá®à ¯® ã |
1119 | ed_shift_pos equ [EditBox.ed_shift_pos] ;¯®«®¦¥¨¥ ªãàá®à |
1119 | ed_shift_pos equ [EditBox.ed_shift_pos] ;¯®«®¦¥¨¥ ªãàá®à |
1120 | ed_shift_pos_old equ [EditBox.ed_shift_pos_old] ;áâ ஥ ¯®«®¦¥¨¥ ªãàá®à |
1120 | ed_shift_pos_old equ [EditBox.ed_shift_pos_old] ;áâ ஥ ¯®«®¦¥¨¥ ªãàá®à |
1121 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1121 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1122 | ;Bit mask from editbox |
1122 | ;Bit mask from editbox |
1123 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1123 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1124 | ed_figure_only= 1000000000000000b ;®¤¨ ᨬ¢®«ë |
1124 | ed_figure_only= 1000000000000000b ;®¤¨ ᨬ¢®«ë |
1125 | ed_always_focus= 100000000000000b |
1125 | ed_always_focus= 100000000000000b |
1126 | ed_focus= 10b ;䮪ãá ¯à¨«®¦¥¨ï |
1126 | ed_focus= 10b ;䮪ãá ¯à¨«®¦¥¨ï |
1127 | ed_shift_on= 1000b ;¥á«¨ ¥ ãáâ ®¢«¥ -§ ç¨â ¢¯¥à¢ë¥ ¦ â shift,¥á«¨ ¡ë« ãáâ ®¢«¥, § ç¨â ¬ë 㦥 çâ® - â® ¤¥« «¨ 㤥ন¢ ï shift |
1127 | ed_shift_on= 1000b ;¥á«¨ ¥ ãáâ ®¢«¥ -§ ç¨â ¢¯¥à¢ë¥ ¦ â shift,¥á«¨ ¡ë« ãáâ ®¢«¥, § ç¨â ¬ë 㦥 çâ® - â® ¤¥« «¨ 㤥ন¢ ï shift |
1128 | ed_shift_on_off=1111111111110111b |
1128 | ed_shift_on_off=1111111111110111b |
1129 | ed_shift= 100b ;¢ª«îç ¥âáï ¯à¨ ¦ ⨨ shift â.¥. ¥á«¨ ¦¨¬ î |
1129 | ed_shift= 100b ;¢ª«îç ¥âáï ¯à¨ ¦ ⨨ shift â.¥. ¥á«¨ ¦¨¬ î |
1130 | ed_shift_off= 1111111111111011b |
1130 | ed_shift_off= 1111111111111011b |
1131 | ed_shift_bac= 10000b ;¡¨â ¤«ï ®ç¨á⪨ ¢ë¤¥«¥®£® shift â.¥. ¯à¨ ãáâ ®¢ª¥ £®¢®à¨â çâ® ¥áâì ¢ë¤¥«¥¨¥ |
1131 | ed_shift_bac= 10000b ;¡¨â ¤«ï ®ç¨á⪨ ¢ë¤¥«¥®£® shift â.¥. ¯à¨ ãáâ ®¢ª¥ £®¢®à¨â çâ® ¥áâì ¢ë¤¥«¥¨¥ |
1132 | ed_shift_bac_cl=1111111111101111b ;®ç¨á⪠¯à¨ 㤠«¥¨¨ ¢ë¤¥«¥¨ï |
1132 | ed_shift_bac_cl=1111111111101111b ;®ç¨á⪠¯à¨ 㤠«¥¨¨ ¢ë¤¥«¥¨ï |
1133 | ed_shift_cl= 1111111111100011b |
1133 | ed_shift_cl= 1111111111100011b |
1134 | ed_shift_mcl= 1111111111111011b |
1134 | ed_shift_mcl= 1111111111111011b |
1135 | ed_left_fl= 100000b |
1135 | ed_left_fl= 100000b |
1136 | ed_right_fl= 1111111111011111b |
1136 | ed_right_fl= 1111111111011111b |
1137 | ed_offset_fl= 1000000b |
1137 | ed_offset_fl= 1000000b |
1138 | ed_offset_cl= 1111111110111111b |
1138 | ed_offset_cl= 1111111110111111b |
1139 | ed_insert= 10000000b |
1139 | ed_insert= 10000000b |
1140 | ed_insert_cl= 1111111101111111b |
1140 | ed_insert_cl= 1111111101111111b |
1141 | ed_mouse_on = 100000000b |
1141 | ed_mouse_on = 100000000b |
1142 | ed_mous_adn_b= 100011000b |
1142 | ed_mous_adn_b= 100011000b |
1143 | ed_mouse_on_off=1111111011111111b |
1143 | ed_mouse_on_off=1111111011111111b |
1144 | ed_height=14 ; ¢ëá®â |
1144 | ed_height=14 ; ¢ëá®â |
1145 | }->-> |
1145 | }->-> |