Subversion Repositories Kolibri OS

Rev

Rev 830 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 830 Rev 1031
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,1
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
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      .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      .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      .editbox_exit
605
        jz      edit_box.editbox_exit
606
end if
606
end if
-
 
607
if enter eq 
-
 
608
else
-
 
609
        cmp     ah,13   ;ENTER - ª« ¢¨è  ))
-
 
610
        jz      edit_box.editbox_exit
-
 
611
end if
-
 
612
if tab eq 
-
 
613
else
-
 
614
        cmp     ah,9   ;TAB - ª« ¢¨è  ))
-
 
615
        jz      edit_box.editbox_exit
-
 
616
end if
-
 
617
 
-
 
618
if numl eq 
-
 
619
else
-
 
620
        cmp     ah,4   ;Num Lock - ª« ¢¨è  ))
-
 
621
        jz      edit_box.editbox_exit
-
 
622
end if
-
 
623
 
-
 
624
if capsl eq 
-
 
625
else
-
 
626
        cmp     ah,2   ;Caps Lock - ª« ¢¨è  ))
-
 
627
        jz      edit_box.editbox_exit
-
 
628
end if
-
 
629
 
-
 
630
if scrolll eq 
-
 
631
else
-
 
632
        cmp     ah,1   ;Scroll Lock - ª« ¢¨è  ))
-
 
633
        jz      edit_box.editbox_exit
-
 
634
end if
-
 
635
 
607
}
636
}
608
 
637
 
609
macro use_key_figures_only
638
macro use_key_figures_only
610
{
639
{
611
        test    word ed_flags,ed_figure_only  ; ⮫쪮 æ¨äàë ?
640
        test    word ed_flags,ed_figure_only  ; ⮫쪮 æ¨äàë ?
612
        jz      @f
641
        jz      @f
613
        cmp     ah,'0'
642
        cmp     ah,'0'
614
        jb      .editbox_exit
643
        jb      .editbox_exit
615
        cmp     ah,'9'
644
        cmp     ah,'9'
616
        ja      .editbox_exit
645
        ja      .editbox_exit
617
@@:
646
@@:
618
}
647
}
619
macro are_key_shift_press
648
macro are_key_shift_press
620
{
649
{
621
        test    word ed_flags,ed_shift_on
650
        test    word ed_flags,ed_shift_on
622
        je      @f
651
        je      @f
623
        ;‚室­ë¥ ¤ ­­ë¥ edx=ed_size;ecx=ed_pos
652
        ;‚室­ë¥ ¤ ­­ë¥ edx=ed_size;ecx=ed_pos
624
        push    eax
653
        push    eax
625
        mov     edx,ed_size
654
        mov     edx,ed_size
626
        mov     ecx, ed_pos
655
        mov     ecx, ed_pos
627
        pusha
656
        pusha
628
;;;;;;;;;;;;;;;;;;;;;
657
;;;;;;;;;;;;;;;;;;;;;
629
;clear input arrea
658
;clear input arrea
630
        mov     ebp,ed_color
659
        mov     ebp,ed_color
631
        mov     ebx,dword       ed_shift_pos
660
        mov     ebx,dword       ed_shift_pos
632
        call    .sh_cl_
661
        call    .sh_cl_
633
        mov     ebp,ed_size
662
        mov     ebp,ed_size
634
        call    .clear_bg
663
        call    .clear_bg
635
;;;;;;;;;;;;;;;;;;;;;
664
;;;;;;;;;;;;;;;;;;;;;
636
        popa 
665
        popa 
637
        call    .del_char
666
        call    .del_char
638
;;;;
667
;;;;
639
        mov     eax,dword ed_shift_pos
668
        mov     eax,dword ed_shift_pos
640
        mov     ebx,ed_size
669
        mov     ebx,ed_size
641
        sub     ebx,eax
670
        sub     ebx,eax
642
        mov     ed_size,ebx
671
        mov     ed_size,ebx
643
        pop     eax
672
        pop     eax
644
@@:
673
@@:
645
}
674
}
646
macro are_key_cur_end
675
macro are_key_cur_end
647
{
676
{
648
        mov     ecx,ed_size
677
        mov     ecx,ed_size
649
        mov     edx, ed_max
678
        mov     edx, ed_max
650
        test    word ed_flags,ed_insert
679
        test    word ed_flags,ed_insert
651
        jne     @f
680
        jne     @f
652
        cmp     ecx,edx
681
        cmp     ecx,edx
653
        jae     .editbox_exit
682
        jae     .editbox_exit
654
@@:     mov     ebx, ed_pos
683
@@:     mov     ebx, ed_pos
655
        cmp     ebx,edx
684
        cmp     ebx,edx
656
        jl      @f ; ¥á«¨ ¬¥­ìè¥ ¨«¨ à ¢­®
685
        jl      @f ; ¥á«¨ ¬¥­ìè¥ ¨«¨ à ¢­®
657
        jmp     .editbox_exit
686
        jmp     .editbox_exit
658
 
687
 
659
@@:     ; ᤢ¨£ ¥¬ ᨬ¢®«ë ¯®á«¥ ªãàá®à  ¢¯à ¢®
688
@@:     ; ᤢ¨£ ¥¬ ᨬ¢®«ë ¯®á«¥ ªãàá®à  ¢¯à ¢®
660
        mov     ecx,ed_size
689
        mov     ecx,ed_size
661
        push    edi eax
690
        push    edi eax
662
        mov     ebp,edi
691
        mov     ebp,edi
663
        mov     esi,ed_text     ; “ª § â¥«ì ­  ¡ãä¥à
692
        mov     esi,ed_text     ; “ª § â¥«ì ­  ¡ãä¥à
664
                                ;ã¤¥¬ à ¡®â âì á® áâப®©
693
                                ;ã¤¥¬ à ¡®â âì á® áâப®©
665
        add     esi,ecx         ;add ed_size ¤®¡ ¢¨¬ max size
694
        add     esi,ecx         ;add ed_size ¤®¡ ¢¨¬ max size
666
        mov     edi,esi
695
        mov     edi,esi
667
 
696
 
668
        cmp     ecx,ebx         ;…᫨ ã ­ á ¯®§¨æ¨ï ªãàá®à  = ⥪ã饬ã à §¬¥àã ­ ¯¥ç â ­­ëå ᨬ¢®«®¢ â.¥. ªãàá®à á⮨⠢ ª®­æ¥
697
        cmp     ecx,ebx         ;…᫨ ã ­ á ¯®§¨æ¨ï ªãàá®à  = ⥪ã饬ã à §¬¥àã ­ ¯¥ç â ­­ëå ᨬ¢®«®¢ â.¥. ªãàá®à á⮨⠢ ª®­æ¥
669
        je      .In_k
698
        je      .In_k
670
 
699
 
671
        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
672
        jne     .ins_v
701
        jne     .ins_v
673
;clear
702
;clear
674
pusha
703
pusha
675
        mov     edi,ebp
704
        mov     edi,ebp
676
        mov     ebp,ed_size
705
        mov     ebp,ed_size
677
        call    .clear_bg
706
        call    .clear_bg
678
popa
707
popa
679
        sub     ecx,ebx         ; ©¤¥¬ ª®«-¢® ᨬ¢®«®¢ ¤«ï ¯¥à¥¤¢¨¦¥­¨ï.
708
        sub     ecx,ebx         ; ©¤¥¬ ª®«-¢® ᨬ¢®«®¢ ¤«ï ¯¥à¥¤¢¨¦¥­¨ï.
680
        inc     edi             ;‘¬¥á⨬ ­ è¨ ᨬ¢®«ë ¢ ¯à ¢®
709
        inc     edi             ;‘¬¥á⨬ ­ è¨ ᨬ¢®«ë ¢ ¯à ¢®
681
        std
710
        std
682
        inc     ecx
711
        inc     ecx
683
   @@:  
712
   @@:  
684
        ;--------
713
        ;--------
685
        lodsb
714
        lodsb
686
        stosb
715
        stosb
687
        ;--------
716
        ;--------
688
        loop    @b
717
        loop    @b
689
.In_k:  cld
718
.In_k:  cld
690
        pop eax
719
        pop eax
691
        mov al,ah
720
        mov al,ah
692
        stosb
721
        stosb
693
        pop edi
722
        pop edi
694
; ¢áâ ¢«ï¥¬ ª®¤ ª« ¢¨è¨ â㤠, £¤¥ ªãàá®à
723
; ¢áâ ¢«ï¥¬ ª®¤ ª« ¢¨è¨ â㤠, £¤¥ ªãàá®à
695
        ; 㢥«¨ç¨¢ ¥¬ §­ ç¥­¨¥ à §¬¥à  ¨ ¯®§¨æ¨¨
724
        ; 㢥«¨ç¨¢ ¥¬ §­ ç¥­¨¥ à §¬¥à  ¨ ¯®§¨æ¨¨
696
        inc      dword ed_size
725
        inc      dword ed_size
697
        inc      dword ed_pos
726
        inc      dword ed_pos
698
        call    .draw_all2
727
        call    .draw_all2
699
        jmp     .shift
728
        jmp     .shift
700
}
729
}
701
macro use_work_key
730
macro use_work_key
702
{
731
{
703
.insert: test   word ed_flags,ed_insert ;not    word ed_insert
732
.insert: test   word ed_flags,ed_insert ;not    word ed_insert
704
         je     @f
733
         je     @f
705
         and    word ed_flags,ed_insert_cl
734
         and    word ed_flags,ed_insert_cl
706
        jmp     .editbox_exit
735
        jmp     .editbox_exit
707
@@:
736
@@:
708
        or      word ed_flags,ed_insert
737
        or      word ed_flags,ed_insert
709
        jmp     .editbox_exit
738
        jmp     .editbox_exit
710
.ins_v:
739
.ins_v:
711
        dec     dword [ebp+42];ed_size    ;processing is insert
740
        dec     dword [ebp+42];ed_size    ;processing is insert
712
        sub     esi,ecx
741
        sub     esi,ecx
713
        add     esi,ebx
742
        add     esi,ebx
714
        mov     edi,esi
743
        mov     edi,esi
715
;clear
744
;clear
716
pusha
745
pusha
717
        mov     edi,ebp
746
        mov     edi,ebp
718
        mov     ebp,ed_pos
747
        mov     ebp,ed_pos
719
        call    .clear_bg
748
        call    .clear_bg
720
popa
749
popa
721
        jmp     .In_k
750
        jmp     .In_k
722
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
751
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
723
.delete:        
752
.delete:        
724
        mov     edx,ed_size
753
        mov     edx,ed_size
725
        mov     ecx,ed_pos
754
        mov     ecx,ed_pos
726
        cmp     edx,ecx
755
        cmp     edx,ecx
727
        jg      .bac_del
756
        jg      .bac_del
728
        test    word ed_flags,ed_shift_on
757
        test    word ed_flags,ed_shift_on
729
        jne     .del_bac
758
        jne     .del_bac
730
edit_ex
759
edit_ex
731
.bac_del:       
760
.bac_del:       
732
        call    .del_char
761
        call    .del_char
733
        jmp     .draw_all
762
        jmp     .draw_all
734
;;;;;;;;;;;;;;;;;;;;;;;;;;;;        
763
;;;;;;;;;;;;;;;;;;;;;;;;;;;;        
735
;--- ­ ¦ â  ª« ¢¨è  backspace ---
764
;--- ­ ¦ â  ª« ¢¨è  backspace ---
736
.backspace:
765
.backspace:
737
        ; ¯à®¢¥à塞, ªãàá®à ã «¥¢®£® ªà ï ?
766
        ; ¯à®¢¥à塞, ªãàá®à ã «¥¢®£® ªà ï ?
738
        mov     ecx,ed_pos
767
        mov     ecx,ed_pos
739
        test    ecx,ecx
768
        test    ecx,ecx
740
        jnz     .del_bac
769
        jnz     .del_bac
741
        test    word ed_flags,ed_shift_on
770
        test    word ed_flags,ed_shift_on
742
        jne     .bac_del
771
        jne     .bac_del
743
 
772
 
744
edit_ex
773
edit_ex
745
.del_bac:
774
.del_bac:
746
        mov     edx,ed_size
775
        mov     edx,ed_size
747
        cmp     edx,ecx ;if ed_pos=ed_size
776
        cmp     edx,ecx ;if ed_pos=ed_size
748
        je      @f
777
        je      @f
749
        dec     ecx
778
        dec     ecx
750
        call    .del_char
779
        call    .del_char
751
@@:     test    word ed_flags,ed_shift_on
780
@@:     test    word ed_flags,ed_shift_on
752
        jne     .bac_del
781
        jne     .bac_del
753
        dec      dword ed_pos
782
        dec      dword ed_pos
754
.draw_all:
783
.draw_all:
755
        push    .shift;.draw_cursor_text;eax
784
        push    .shift;.draw_cursor_text;eax
756
 
785
 
757
        test    word ed_flags,ed_shift_on
786
        test    word ed_flags,ed_shift_on
758
        je      @f
787
        je      @f
759
        mov     eax,dword ed_shift_pos
788
        mov     eax,dword ed_shift_pos
760
        mov     ebx,ed_size
789
        mov     ebx,ed_size
761
        sub     ebx,eax
790
        sub     ebx,eax
762
        mov     ed_size,ebx
791
        mov     ed_size,ebx
763
 
792
 
764
        mov     ebp,ed_color
793
        mov     ebp,ed_color
765
        call    .clear_cursor
794
        call    .clear_cursor
766
        call    .check_offset
795
        call    .check_offset
767
        call    .draw_bg
796
        call    .draw_bg
768
        ret
797
        ret
769
@@:     dec      dword ed_size
798
@@:     dec      dword ed_size
770
 
799
 
771
.draw_all2:
800
.draw_all2:
772
        and    word ed_flags,ed_shift_cl
801
        and    word ed_flags,ed_shift_cl
773
        mov     ebp,ed_color
802
        mov     ebp,ed_color
774
        call    .clear_cursor
803
        call    .clear_cursor
775
        call    .check_offset
804
        call    .check_offset
776
        mov     ebp,ed_size
805
        mov     ebp,ed_size
777
        call    .clear_bg
806
        call    .clear_bg
778
        ret
807
        ret
779
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
808
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
780
;--- ­ ¦ â  ª« ¢¨è  left ---
809
;--- ­ ¦ â  ª« ¢¨è  left ---
781
.left:  mov     ebx,ed_pos
810
.left:  mov     ebx,ed_pos
782
        test    ebx,ebx
811
        test    ebx,ebx
783
        jz      .sh_st_of
812
        jz      .sh_st_of
784
        or      word ed_flags,ed_left_fl
813
        or      word ed_flags,ed_left_fl
785
        call    .sh_first_sh
814
        call    .sh_first_sh
786
        dec      dword ed_pos
815
        dec      dword ed_pos
787
        call    .sh_enable
816
        call    .sh_enable
788
        jmp     .draw_cursor_text
817
        jmp     .draw_cursor_text
789
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
818
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
790
;--- ­ ¦ â  ª« ¢¨è  right ---
819
;--- ­ ¦ â  ª« ¢¨è  right ---
791
.right: mov     ebx,ed_pos
820
.right: mov     ebx,ed_pos
792
        cmp     ebx,ed_size
821
        cmp     ebx,ed_size
793
        je      .sh_st_of
822
        je      .sh_st_of
794
        and     word ed_flags,ed_right_fl
823
        and     word ed_flags,ed_right_fl
795
        call    .sh_first_sh
824
        call    .sh_first_sh
796
        inc     dword  ed_pos
825
        inc     dword  ed_pos
797
        call    .sh_enable
826
        call    .sh_enable
798
        jmp     .draw_cursor_text
827
        jmp     .draw_cursor_text
799
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
828
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
800
.home:  
829
.home:  
801
        mov     ebx,ed_pos
830
        mov     ebx,ed_pos
802
        test    ebx,ebx
831
        test    ebx,ebx
803
        jz      .sh_st_of
832
        jz      .sh_st_of
804
        call    .sh_first_sh
833
        call    .sh_first_sh
805
        xor     eax,eax
834
        xor     eax,eax
806
        mov     ed_pos,eax
835
        mov     ed_pos,eax
807
        call    .sh_home_end
836
        call    .sh_home_end
808
        jmp     .draw_cursor_text
837
        jmp     .draw_cursor_text
809
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
838
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
810
.end:   
839
.end:   
811
        mov     ebx,ed_pos
840
        mov     ebx,ed_pos
812
        cmp     ebx,dword ed_size
841
        cmp     ebx,dword ed_size
813
        je      .sh_st_of
842
        je      .sh_st_of
814
        call    .sh_first_sh
843
        call    .sh_first_sh
815
        mov     eax,ed_size
844
        mov     eax,ed_size
816
        mov     ed_pos,eax
845
        mov     ed_pos,eax
817
        call    .sh_home_end
846
        call    .sh_home_end
818
        jmp     .draw_cursor_text
847
        jmp     .draw_cursor_text
819
}
848
}
820
 
849
 
821
macro use_mouse_func
850
macro use_mouse_func
822
{
851
{
823
;----------------------------------------------------------
852
;----------------------------------------------------------
824
;--- Ž¡à ¡®âª  .mouse_wigwag
853
;--- Ž¡à ¡®âª  .mouse_wigwag
825
;----------------------------------------------------------
854
;----------------------------------------------------------
826
.mouse_wigwag:
855
.mouse_wigwag:
827
        shr     eax,16
856
        shr     eax,16
828
        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
829
;;;;;;;;;;;;;;;;;;
858
;;;;;;;;;;;;;;;;;;
830
;;¯à®æ¥¤ãà  ®¡à ¡®âª¨ ¯®«®¦¥­¨ï ¢ë¤¥«¥­­®£® ⥪áâ , ª®£¤  ¯à®¨á室¨â ¢ë室 §  ¯à¥¤¥«ë editbox
859
;;¯à®æ¥¤ãà  ®¡à ¡®âª¨ ¯®«®¦¥­¨ï ¢ë¤¥«¥­­®£® ⥪áâ , ª®£¤  ¯à®¨á室¨â ¢ë室 §  ¯à¥¤¥«ë editbox
831
;;;;;;;;;;;;;;;;;;
860
;;;;;;;;;;;;;;;;;;
832
        test    ax,0x8000
861
        test    ax,0x8000
833
        jnz     .mleft
862
        jnz     .mleft
834
 
863
 
835
        mov     ebx,ed_left
864
        mov     ebx,ed_left
836
        cmp     eax,ebx
865
        cmp     eax,ebx
837
        jb      .mleft
866
        jb      .mleft
838
 
867
 
839
        add     ebx,ed_width
868
        add     ebx,ed_width
840
        cmp     eax,ebx
869
        cmp     eax,ebx
841
        ja      .mright 
870
        ja      .mright 
842
 
871
 
843
        sub     ebx,ed_width
872
        sub     ebx,ed_width
844
 
873
 
845
        xor     edx,edx
874
        xor     edx,edx
846
        sub     eax,ebx ; ¢ëç⨬ ¨§ ª®®à¤¨­ â ¬ë誨 ¯® ®á¨ å ª®®à¤¨­ âë ¤® editbox ¯® ®á¨ å
875
        sub     eax,ebx ; ¢ëç⨬ ¨§ ª®®à¤¨­ â ¬ë誨 ¯® ®á¨ å ª®®à¤¨­ âë ¤® editbox ¯® ®á¨ å
847
        mov     ebx,6
876
        mov     ebx,6
848
        div     ebx
877
        div     ebx
849
;;;;;;;;;;;;;;;;;;
878
;;;;;;;;;;;;;;;;;;
850
;;¯à®æ¥¤ãà  ®¡à ¡®âª¨ ¯®«®¦¥­¨ï ¢ë¤¥«¥­­®£® ⥪áâ , ¢ ¯à¥¤¥« å ®¡« á⨠editbox
879
;;¯à®æ¥¤ãà  ®¡à ¡®âª¨ ¯®«®¦¥­¨ï ¢ë¤¥«¥­­®£® ⥪áâ , ¢ ¯à¥¤¥« å ®¡« á⨠editbox
851
;;;;;;;;;;;;;;;;;;
880
;;;;;;;;;;;;;;;;;;
852
;®«ã稫¨ ª®®à¤¨­ âë ¢ eax ¬ë誨, â.¥. ªã¤  ®­  ¯¥à¥¬¥á⨫ áì
881
;®«ã稫¨ ª®®à¤¨­ âë ¢ eax ¬ë誨, â.¥. ªã¤  ®­  ¯¥à¥¬¥á⨫ áì
853
;¨á®¢ ­¨¥ § ªà è¥­ëå ¯àאַ㣮«ì­¨ª®¢ ¨ ®ç¨á⪠ ¨å
882
;¨á®¢ ­¨¥ § ªà è¥­ëå ¯àאַ㣮«ì­¨ª®¢ ¨ ®ç¨á⪠ ¨å
854
        add     eax,ed_offset   ;¤®¡ ¢¨¬ ᬥ饭¨¥
883
        add     eax,ed_offset   ;¤®¡ ¢¨¬ ᬥ饭¨¥
855
        cmp     eax,dword ed_size       ;¥á«¨ ¢ë諨 §  ¯à¥¤¥«ë, â® ­¨ç¥£® ­¥ ¤¥« âì
884
        cmp     eax,dword ed_size       ;¥á«¨ ¢ë諨 §  ¯à¥¤¥«ë, â® ­¨ç¥£® ­¥ ¤¥« âì
856
        ja      .mwigvag
885
        ja      .mwigvag
857
.mdraw: 
886
.mdraw: 
858
        mov     dword   ed_pos,eax ;á®åà ­¨¬ ­®¢®¥ §­ ç¥­¨¥
887
        mov     dword   ed_pos,eax ;á®åà ­¨¬ ­®¢®¥ §­ ç¥­¨¥
859
;¨á®¢ ­¨¥ § ªà è¥­ëå ¯àאַ㣮«ì­¨ª®¢ ¨ ®ç¨á⪠ ¨å
888
;¨á®¢ ­¨¥ § ªà è¥­ëå ¯àאַ㣮«ì­¨ª®¢ ¨ ®ç¨á⪠ ¨å
860
        mov     ecx,dword       ed_shift_pos
889
        mov     ecx,dword       ed_shift_pos
861
        mov     ebx,dword       ed_shift_pos_old
890
        mov     ebx,dword       ed_shift_pos_old
862
        mov     dword   ed_shift_pos_old,eax    ;¢­¥á¥¬ ­®¢®¥ §­ ç¥­¨¥ áâ à®© ¯®§¨æ¨¨ ªãàá®à 
891
        mov     dword   ed_shift_pos_old,eax    ;¢­¥á¥¬ ­®¢®¥ §­ ç¥­¨¥ áâ à®© ¯®§¨æ¨¨ ªãàá®à 
863
;¯à®¢¥àª  ¨ à¨á®¢ ­¨¥ § ªà è¥­ëå ®¡« á⥩
892
;¯à®¢¥àª  ¨ à¨á®¢ ­¨¥ § ªà è¥­ëå ®¡« á⥩
864
        cmp     ecx,ebx         ;¢ëïá­ï¥¬ ªã¤  ¡ë«® ¤¢¨¦¥­¨¥ ­  ®¤¨­ è £ ­ § ¤
893
        cmp     ecx,ebx         ;¢ëïá­ï¥¬ ªã¤  ¡ë«® ¤¢¨¦¥­¨¥ ­  ®¤¨­ è £ ­ § ¤
865
        je      .m1_shem        ;¤¢¨¦¥­¨ï ­¥ ¡ë«® à ­¥¥ 
894
        je      .m1_shem        ;¤¢¨¦¥­¨ï ­¥ ¡ë«® à ­¥¥ 
866
        jb      .msmaller       ;¤¢¨¦¥­¨¥ ¡ë«® ->
895
        jb      .msmaller       ;¤¢¨¦¥­¨¥ ¡ë«® ->
867
        cmp     ebx,eax         ;¤¢¨¦¥­¨¥ ¡ë«® ¤® í⮣® <- ¨ âãâ ¬ë ¯à®¢¥à塞 ᥩç á ªã¤  ¤¢¨¦¥­¨¥ ¯à®¨á室¨â
896
        cmp     ebx,eax         ;¤¢¨¦¥­¨¥ ¡ë«® ¤® í⮣® <- ¨ âãâ ¬ë ¯à®¢¥à塞 ᥩç á ªã¤  ¤¢¨¦¥­¨¥ ¯à®¨á室¨â
868
        ja      .m1_shem        ;¥á«¨ ¡ë«® ¤¢¨¦¥­¨¥ <- â® ­ã¦­® § ªà á¨âì ®¡« áâì
897
        ja      .m1_shem        ;¥á«¨ ¡ë«® ¤¢¨¦¥­¨¥ <- â® ­ã¦­® § ªà á¨âì ®¡« áâì
869
        je      .mwigvag        ;¥á«¨ ¨§¬¥­¥­¨ï ­¥ ¡ë«®, â® ­¨ç¥£® ­¥ ¤¥« âì
898
        je      .mwigvag        ;¥á«¨ ¨§¬¥­¥­¨ï ­¥ ¡ë«®, â® ­¨ç¥£® ­¥ ¤¥« âì
870
        mov     ebp,ed_color    ;âã⠭㦭® ®ç¨áâ¨âì ®¡« áâì c ed_pos ed_shift_pos_old
899
        mov     ebp,ed_color    ;âã⠭㦭® ®ç¨áâ¨âì ®¡« áâì c ed_pos ed_shift_pos_old
871
;¢å®¤­ë¥ ¯ à ¬¥âàë ebp=color ebx=ed_shift_pos
900
;¢å®¤­ë¥ ¯ à ¬¥âàë ebp=color ebx=ed_shift_pos
872
        call    .sh_cl_
901
        call    .sh_cl_
873
        jmp     .mwigvag
902
        jmp     .mwigvag
874
.msmaller:
903
.msmaller:
875
        cmp     ebx,eax
904
        cmp     ebx,eax
876
        jb      .m1_shem
905
        jb      .m1_shem
877
        mov     ebp,ed_color
906
        mov     ebp,ed_color
878
;¢å®¤­ë¥ ¯ à ¬¥âàë ebp=color ebx=ed_shift_pos
907
;¢å®¤­ë¥ ¯ à ¬¥âàë ebp=color ebx=ed_shift_pos
879
        call    .sh_cl_
908
        call    .sh_cl_
880
        jmp     .mwigvag
909
        jmp     .mwigvag
881
;alike  =
910
;alike  =
882
.m1_shem: 
911
.m1_shem: 
883
        mov     ebp,shift_color
912
        mov     ebp,shift_color
884
;¢å®¤­ë¥ ¯ à ¬¥âàë ebp=color ebx=ed_shift_pos
913
;¢å®¤­ë¥ ¯ à ¬¥âàë ebp=color ebx=ed_shift_pos
885
        mov     ebx,ecx
914
        mov     ebx,ecx
886
        call    .sh_cl_
915
        call    .sh_cl_
887
        jmp     .mwigvag
916
        jmp     .mwigvag
888
.mwigvag:
917
.mwigvag:
889
        and     word ed_flags,ed_shift_mcl
918
        and     word ed_flags,ed_shift_mcl
890
        jmp     .draw_cursor_text
919
        jmp     .draw_cursor_text
891
;       popa
920
;       popa
892
;       ret
921
;       ret
893
.mleft:
922
.mleft:
894
 
923
 
895
        mov     eax,ed_pos
924
        mov     eax,ed_pos
896
        cmp     eax,0                                        
925
        cmp     eax,0                                        
897
        jbe      .mwigvag
926
        jbe      .mwigvag
898
        dec     eax
927
        dec     eax
899
        call    .check_offset
928
        call    .check_offset
900
        push    eax
929
        push    eax
901
        mov     ebx,ed_shift_pos
930
        mov     ebx,ed_shift_pos
902
        mov     ebp,shift_color
931
        mov     ebp,shift_color
903
        call    .sh_cl_
932
        call    .sh_cl_
904
        pop     eax
933
        pop     eax
905
        jmp     .mdraw
934
        jmp     .mdraw
906
.mright:
935
.mright:
907
        mov     eax,ed_pos
936
        mov     eax,ed_pos
908
        mov     ebx,ed_size
937
        mov     ebx,ed_size
909
        cmp     eax,ebx
938
        cmp     eax,ebx
910
        jae     .mwigvag
939
        jae     .mwigvag
911
        inc     eax
940
        inc     eax
912
        call    .check_offset
941
        call    .check_offset
913
        mov     ebx,ed_shift_pos
942
        mov     ebx,ed_shift_pos
914
        mov     ebp,shift_color
943
        mov     ebp,shift_color
915
        push    eax
944
        push    eax
916
        call    .sh_cl_
945
        call    .sh_cl_
917
        pop     eax
946
        pop     eax
918
        jmp     .mdraw  
947
        jmp     .mdraw  
919
}
948
}
920
 
949
 
921
macro use_work_mouse
950
macro use_work_mouse
922
;----------------------------------------------------------
951
;----------------------------------------------------------
923
;--- € ­¥ 㤥ন¢ ¥¬ «¨ ¬ë ª« ¢¨èã ¬ë誨, ¯¥à¥¬¥é ï ªãàá®à, ¢® ¢á¥ à §­ë¥ áâ®à®­ë?
952
;--- € ­¥ 㤥ন¢ ¥¬ «¨ ¬ë ª« ¢¨èã ¬ë誨, ¯¥à¥¬¥é ï ªãàá®à, ¢® ¢á¥ à §­ë¥ áâ®à®­ë?
924
;----------------------------------------------------------
953
;----------------------------------------------------------
925
{
954
{
926
        test    word ed_flags,ed_mouse_on
955
        test    word ed_flags,ed_mouse_on
927
        jne     .mouse_wigwag
956
        jne     .mouse_wigwag
928
;----------------------------------------------------------
957
;----------------------------------------------------------
929
;--- ¯à®¢¥à塞, ¯®¯ ¤ ¥â «¨ ªãàá®à ¢ edit box -------------
958
;--- ¯à®¢¥à塞, ¯®¯ ¤ ¥â «¨ ªãàá®à ¢ edit box -------------
930
;----------------------------------------------------------
959
;----------------------------------------------------------
931
 
960
 
932
        mov     ebx,ed_top
961
        mov     ebx,ed_top
933
        cmp     ax,bx
962
        cmp     ax,bx
934
        jl      ._blur;.mouse_end_no_focus
963
        jl      ._blur;.mouse_end_no_focus
935
        
964
        
936
        add     ebx,ed_height
965
        add     ebx,ed_height
937
        cmp     ax,bx
966
        cmp     ax,bx
938
        jg      ._blur;.mouse_end_no_focus
967
        jg      ._blur;.mouse_end_no_focus
939
 
968
 
940
        shr     eax,16
969
        shr     eax,16
941
 
970
 
942
        mov     ebx,ed_left
971
        mov     ebx,ed_left
943
        cmp     ax,bx
972
        cmp     ax,bx
944
        jl      ._blur;.mouse_end_no_focus
973
        jl      ._blur;.mouse_end_no_focus
945
 
974
 
946
        add     ebx,ed_width
975
        add     ebx,ed_width
947
 
976
 
948
        cmp     ax,bx
977
        cmp     ax,bx
949
        jg      ._blur;.mouse_end_no_focus        
978
        jg      ._blur;.mouse_end_no_focus        
950
 
979
 
951
;--- ¨§¬¥­ï¥¬ ¯®§¨æ¨î ªãàá®à  ---
980
;--- ¨§¬¥­ï¥¬ ¯®§¨æ¨î ªãàá®à  ---
952
        push    eax
981
        push    eax
953
        mov     ebp,ed_color
982
        mov     ebp,ed_color
954
        call    .clear_cursor
983
        call    .clear_cursor
955
        pop     eax
984
        pop     eax
956
._mvpos:
985
._mvpos:
957
      
986
      
958
        xor     edx,edx
987
        xor     edx,edx
959
        sub     eax,ed_left
988
        sub     eax,ed_left
960
 
989
 
961
        mov     ebx,6
990
        mov     ebx,6
962
        div     bx
991
        div     bx
963
        add     eax,ed_offset
992
        add     eax,ed_offset
964
        cmp     eax,ed_size
993
        cmp     eax,ed_size
965
        jna     ._mshift
994
        jna     ._mshift
966
        mov     eax,ed_size
995
        mov     eax,ed_size
967
._mshift:
996
._mshift:
968
;;;;;;;
997
;;;;;;;
969
;;‘¥ªæ¨ï ®¡à ¡®âª¨ shift ¨ ¢ë¤¥«¥­¨ï ¯® shift
998
;;‘¥ªæ¨ï ®¡à ¡®âª¨ shift ¨ ¢ë¤¥«¥­¨ï ¯® shift
970
;;;;;;;
999
;;;;;;;
971
        test    word ed_flags,ed_shift_bac
1000
        test    word ed_flags,ed_shift_bac
972
        je      @f
1001
        je      @f
973
        mov     ebp,dword       ed_color
1002
        mov     ebp,dword       ed_color
974
        mov     ebx,dword ed_shift_pos
1003
        mov     ebx,dword ed_shift_pos
975
        push    eax
1004
        push    eax
976
        call    .sh_cl_
1005
        call    .sh_cl_
977
        and     word ed_flags,ed_shift_bac_cl
1006
        and     word ed_flags,ed_shift_bac_cl
978
        pop     eax
1007
        pop     eax
979
@@:     
1008
@@:     
980
        test    word ed_flags,ed_mouse_on
1009
        test    word ed_flags,ed_mouse_on
981
        jne     @f
1010
        jne     @f
982
        
1011
        
983
        mov     dword ed_shift_pos,eax
1012
        mov     dword ed_shift_pos,eax
984
        or      word  ed_flags,ed_mouse_on
1013
        or      word  ed_flags,ed_mouse_on
985
        mov     dword ed_pos,eax
1014
        mov     dword ed_pos,eax
986
        mov     dword [mouse_flag],edi          ;ãáâ ­®¢¨¬ ¨¤¥­â¨ä¨ª â®à
1015
        mov     dword [mouse_flag],edi          ;ãáâ ­®¢¨¬ ¨¤¥­â¨ä¨ª â®à
987
        bts     word ed_flags,1                 ;ãáâ ­®¢ª  䮪ãá 
1016
        bts     word ed_flags,1                 ;ãáâ ­®¢ª  䮪ãá 
988
        jmp     .m_sh
1017
        jmp     .m_sh
989
@@:             
1018
@@:             
990
        cmp     eax,dword ed_shift_pos  ;¥á«¨ ¯®§¨æ¨¨ ­¥ ¨§¬¥­¨«¨áì
1019
        cmp     eax,dword ed_shift_pos  ;¥á«¨ ¯®§¨æ¨¨ ­¥ ¨§¬¥­¨«¨áì
991
        je      .editbox_exit
1020
        je      .editbox_exit
992
        mov     ed_pos,eax
1021
        mov     ed_pos,eax
993
        mov     ebp,dword shift_color
1022
        mov     ebp,dword shift_color
994
        mov     ebx,dword ed_shift_pos
1023
        mov     ebx,dword ed_shift_pos
995
        call    .sh_cl_
1024
        call    .sh_cl_
996
        or      word ed_flags,ed_mous_adn_b     ;ãáâ ­®¢¨¬ ¡¨â çâ® ¬ë ¢ë¤¥«¨«¨ +shift_on +
1025
        or      word ed_flags,ed_mous_adn_b     ;ãáâ ­®¢¨¬ ¡¨â çâ® ¬ë ¢ë¤¥«¨«¨ +shift_on +
997
.m_sh:  call    .draw_text
1026
.m_sh:  call    .draw_text
998
        call    .draw_cursor
1027
        call    .draw_cursor
999
;----------------------------------------------------------
1028
;----------------------------------------------------------
1000
;--- ¯à®æ¥¤ãà  ãáâ ­®¢ª¨ 䮪ãá  ---------------------------
1029
;--- ¯à®æ¥¤ãà  ãáâ ­®¢ª¨ 䮪ãá  ---------------------------
1001
;----------------------------------------------------------
1030
;----------------------------------------------------------
1002
        jmp     .drc
1031
        jmp     .drc
1003
._blur:
1032
._blur:
1004
        test    word ed_flags,ed_always_focus
1033
        test    word ed_flags,ed_always_focus
1005
        jne     .editbox_exit
1034
        jne     .editbox_exit
1006
        btr     word ed_flags,1 ; ¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬
1035
        btr     word ed_flags,1 ; ¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬
1007
        jnc     .editbox_exit
1036
        jnc     .editbox_exit
1008
 
1037
 
1009
        mov     ebp,ed_color
1038
        mov     ebp,ed_color
1010
        call    .clear_cursor
1039
        call    .clear_cursor
1011
.drc:   call    .draw_border
1040
.drc:   call    .draw_border
1012
        jmp     .editbox_exit
1041
        jmp     .editbox_exit
1013
}
1042
}
1014
 
1043
 
1015
 
1044
 
1016
; Œ ªà®á ¢ë室 
1045
; Œ ªà®á ¢ë室 
1017
macro edit_ex
1046
macro edit_ex
1018
{
1047
{
1019
popad          
1048
popad          
1020
ret
1049
ret
1021
}
1050
}
1022
macro debug
1051
macro debug
1023
{
1052
{
1024
        ;-----------  ®â« ¤ª 
1053
        ;-----------  ®â« ¤ª 
1025
        pushad
1054
        pushad
1026
;        mov     dword [ed_buffer.2],0
1055
;        mov     dword [ed_buffer.2],0
1027
;        mov     eax,edi
1056
;        mov     eax,edi
1028
        mov eax,dword [ed_buffer.2]
1057
        mov eax,dword [ed_buffer.2]
1029
        mov edi,ed_buffer.3
1058
        mov edi,ed_buffer.3
1030
        call .str
1059
        call .str
1031
        ;à¨á®¢ ­¨¥ ä®­ 
1060
        ;à¨á®¢ ­¨¥ ä®­ 
1032
        mov eax,13
1061
        mov eax,13
1033
        mov ebx,178*65536+70
1062
        mov ebx,178*65536+70
1034
        mov ecx,28*65536+10
1063
        mov ecx,28*65536+10
1035
        xor edx,edx
1064
        xor edx,edx
1036
        int 0x40
1065
        int 0x40
1037
        ;¢ë¢®¤ §­ ç¥­¨ï ­  íªà ­
1066
        ;¢ë¢®¤ §­ ç¥­¨ï ­  íªà ­
1038
        mov eax,4
1067
        mov eax,4
1039
        mov ebx,180*65536+30
1068
        mov ebx,180*65536+30
1040
        mov ecx,0x10DDBBCC
1069
        mov ecx,0x10DDBBCC
1041
        mov edx,ed_buffer.3
1070
        mov edx,ed_buffer.3
1042
        mov esi,8
1071
        mov esi,8
1043
        int 0x40
1072
        int 0x40
1044
        popad
1073
        popad
1045
        ;----------- ®â« ¤ª 
1074
        ;----------- ®â« ¤ª 
1046
}
1075
}
1047
macro   debug_func
1076
macro   debug_func
1048
{
1077
{
1049
.str:
1078
.str:
1050
        mov ecx,0x0a ;§ ¤ ¥âáï á¨á⥬  áç¨á«¥­¨ï ¨§¬¥­ïîâáï ॣ¨áâàë ebx,eax,ecx,edx ¢å®¤­ë¥ ¯ à ¬¥âàë eax - ç¨á«®
1079
        mov ecx,0x0a ;§ ¤ ¥âáï á¨á⥬  áç¨á«¥­¨ï ¨§¬¥­ïîâáï ॣ¨áâàë ebx,eax,ecx,edx ¢å®¤­ë¥ ¯ à ¬¥âàë eax - ç¨á«®
1051
         ;¯à¥à¥¢®¤ ç¨á«  ¢ ASCII áâப㠢§®¤­ë¥ ¤ ­­ë¥ ecx=á¨á⥬  áç¨á«¥­ï edi  ¤à¥á ªã¤  § ¯¨á뢠âì, ¡ã¤¥¬ áâபã, ¯à¨ç¥¬ ª®­¥æ ¯¥à¥¬¥­­®© 
1080
         ;¯à¥à¥¢®¤ ç¨á«  ¢ ASCII áâப㠢§®¤­ë¥ ¤ ­­ë¥ ecx=á¨á⥬  áç¨á«¥­ï edi  ¤à¥á ªã¤  § ¯¨á뢠âì, ¡ã¤¥¬ áâபã, ¯à¨ç¥¬ ª®­¥æ ¯¥à¥¬¥­­®© 
1052
        cmp eax,ecx  ;áà ¢­¨âì ¥á«¨ ¢ eax ¬¥­ìè¥ ç¥¬ ¢ ecx â® ¯¥à¥©â¨ ­  @@-1 â.¥. ­  pop eax
1081
        cmp eax,ecx  ;áà ¢­¨âì ¥á«¨ ¢ eax ¬¥­ìè¥ ç¥¬ ¢ ecx â® ¯¥à¥©â¨ ­  @@-1 â.¥. ­  pop eax
1053
        jb @f
1082
        jb @f
1054
        xor edx,edx  ;®ç¨áâ¨âì edx
1083
        xor edx,edx  ;®ç¨áâ¨âì edx
1055
        div ecx      ;à §¤¥«¨âì - ®áâ â®ª ¢ edx
1084
        div ecx      ;à §¤¥«¨âì - ®áâ â®ª ¢ edx
1056
        push edx     ;¯®«®¦¨âì ¢ á⥪
1085
        push edx     ;¯®«®¦¨âì ¢ á⥪
1057
        ;dec edi             ;ᬥ饭¨¥ ­¥®¡å®¤¨¬®¥ ¤«ï § ¯¨á¨ á ª®­æ  áâப¨
1086
        ;dec edi             ;ᬥ饭¨¥ ­¥®¡å®¤¨¬®¥ ¤«ï § ¯¨á¨ á ª®­æ  áâப¨
1058
        call .str;¯¥à¥©â¨ ­  á ¬ã ᥡï â.¥. ¢ë§¢ âì á ¬ã á¥¡ï ¨ â ª ¤® ⮣® ¬®¬¥­â  ¯®ª  ¢ eax ­¥ áâ ­¥â ¬¥­ìè¥ ç¥¬ ¢ ecx
1087
        call .str;¯¥à¥©â¨ ­  á ¬ã ᥡï â.¥. ¢ë§¢ âì á ¬ã á¥¡ï ¨ â ª ¤® ⮣® ¬®¬¥­â  ¯®ª  ¢ eax ­¥ áâ ­¥â ¬¥­ìè¥ ç¥¬ ¢ ecx
1059
        pop eax
1088
        pop eax
1060
        @@: ;cmp al,10 ;¯à®¢¥à¨âì ­¥ ¬¥­ìè¥ «¨ §­ ç¥­¨¥ ¢ al 祬 10 (¤«ï á¨á⥬ë áç¨á«¥­ï 10 ¤ ­­ ï ª®¬ ­¤  - «¨è­ ï))
1089
        @@: ;cmp al,10 ;¯à®¢¥à¨âì ­¥ ¬¥­ìè¥ «¨ §­ ç¥­¨¥ ¢ al 祬 10 (¤«ï á¨á⥬ë áç¨á«¥­ï 10 ¤ ­­ ï ª®¬ ­¤  - «¨è­ ï))
1061
        ;sbb al,$69  ;- ç¥áâ­® ¤ ­­ ï ¨­áâàãªæ¨ï ¬¥­ï § áâ ¢«ï¥â § ¤ã¬ âìáï â.¥. ï ­¥ §­ î ª ª íâ® à ¡®â ¥â
1090
        ;sbb al,$69  ;- ç¥áâ­® ¤ ­­ ï ¨­áâàãªæ¨ï ¬¥­ï § áâ ¢«ï¥â § ¤ã¬ âìáï â.¥. ï ­¥ §­ î ª ª íâ® à ¡®â ¥â
1062
        ;das        ;¯®á«¥ ¤ ­­®© ª®¬ ­¤ë ª ª ¡ë ¯à®¨á室¨â 㬥­ì襭¨¥ al ­  66h  (¢ ª­¨£¥ ­ ¯¨á ­® ¤à㣮¥)
1091
        ;das        ;¯®á«¥ ¤ ­­®© ª®¬ ­¤ë ª ª ¡ë ¯à®¨á室¨â 㬥­ì襭¨¥ al ­  66h  (¢ ª­¨£¥ ­ ¯¨á ­® ¤à㣮¥)
1063
        or al,0x30  ;¤ ­­ ï ª®¬ ­¤  ª®à®ç¥  祬 ¤¢¥ ¢ëè¥ 
1092
        or al,0x30  ;¤ ­­ ï ª®¬ ­¤  ª®à®ç¥  祬 ¤¢¥ ¢ëè¥ 
1064
        stosb       ;§ ¯¨á âì í«¥¬¥­â ¨§ ॣ¨áâà  al ¢ ï祪㠯 ¬ï⨠es:edi
1093
        stosb       ;§ ¯¨á âì í«¥¬¥­â ¨§ ॣ¨áâà  al ¢ ï祪㠯 ¬ï⨠es:edi
1065
 
1094
 
1066
        ret         ;¢¥à­ãâìáï ç¥­ì ¨­â¥à¥á­ë© 室 â.ª. ¯®ª  ¢ á⥪¥ åà ­¨âìáï ª®«-¢® ¢ë§®¢®¢ â® á⮫쪮 à § ¬ë ¨ ¡ã¤¥¬ ¢ë§ë¢ âìáï
1095
        ret         ;¢¥à­ãâìáï ç¥­ì ¨­â¥à¥á­ë© 室 â.ª. ¯®ª  ¢ á⥪¥ åà ­¨âìáï ª®«-¢® ¢ë§®¢®¢ â® á⮫쪮 à § ¬ë ¨ ¡ã¤¥¬ ¢ë§ë¢ âìáï
1067
}
1096
}
1068
 
1097
 
1069
;;;;;;;;;;;;;;;
1098
;;;;;;;;;;;;;;;
1070
;For LibGui
1099
;For LibGui
1071
;;;;;;;;;;;;;;;
1100
;;;;;;;;;;;;;;;
1072
macro srt_ed_libgui
1101
macro srt_ed_libgui
1073
{
1102
{
1074
ed_width        equ [EditBox.ed_width]            ;è¨à¨­  ª®¬¯®­¥­â 
1103
ed_width        equ [EditBox.ed_width]            ;è¨à¨­  ª®¬¯®­¥­â 
1075
ed_left         equ [EditBox.ed_left]             ;¯®«®¦¥­¨¥ ¯® ®á¨ å
1104
ed_left         equ [EditBox.ed_left]             ;¯®«®¦¥­¨¥ ¯® ®á¨ å
1076
ed_top          equ [EditBox.ed_top]              ;¯®«®¦¥­¨¥ ¯® ®á¨ ã
1105
ed_top          equ [EditBox.ed_top]              ;¯®«®¦¥­¨¥ ¯® ®á¨ ã
1077
ed_color        equ [EditBox.ed_color]            ;梥â ä®­  ª®¬¯®­¥­â 
1106
ed_color        equ [EditBox.ed_color]            ;梥â ä®­  ª®¬¯®­¥­â 
1078
shift_color     equ [EditBox.shift_color]         ;=0x6a9480
1107
shift_color     equ [EditBox.shift_color]         ;=0x6a9480
1079
ed_focus_border_color   equ [EditBox.ed_focus_border_color]   ;梥â à ¬ª¨ ª®¬¯®­¥­â 
1108
ed_focus_border_color   equ [EditBox.ed_focus_border_color]   ;梥â à ¬ª¨ ª®¬¯®­¥­â 
1080
ed_blur_border_color    equ [EditBox.ed_blur_border_color]    ;梥⠭¥  ªâ¨¢­®£® ª®¬¯®­¥­â 
1109
ed_blur_border_color    equ [EditBox.ed_blur_border_color]    ;梥⠭¥  ªâ¨¢­®£® ª®¬¯®­¥­â 
1081
ed_text_color   equ [EditBox.ed_text_color]       ;梥â ⥪áâ 
1110
ed_text_color   equ [EditBox.ed_text_color]       ;梥â ⥪áâ 
1082
ed_max          equ [EditBox.ed_max]              ;ª®«-¢® ᨬ¢®«®¢ ª®â®àë¥ ¬®¦­® ¬ ªá¨¬ «ì­® ¢¢¥áâ¨
1111
ed_max          equ [EditBox.ed_max]              ;ª®«-¢® ᨬ¢®«®¢ ª®â®àë¥ ¬®¦­® ¬ ªá¨¬ «ì­® ¢¢¥áâ¨
1083
ed_text         equ [EditBox.ed_text]             ;㪠§ â¥«ì ­  ¡ãä¥à
1112
ed_text         equ [EditBox.ed_text]             ;㪠§ â¥«ì ­  ¡ãä¥à
1084
ed_flags        equ [EditBox.ed_flags]            ;ä« £¨
1113
ed_flags        equ [EditBox.ed_flags]            ;ä« £¨
1085
ed_size equ [EditBox.ed_size]                     ;ª®«-¢® ᨬ¢®«®¢
1114
ed_size equ [EditBox.ed_size]                     ;ª®«-¢® ᨬ¢®«®¢
1086
ed_pos  equ [EditBox.ed_poz]                      ;¯®§¨æ¨ï ªãàá®à 
1115
ed_pos  equ [EditBox.ed_poz]                      ;¯®§¨æ¨ï ªãàá®à 
1087
ed_offset       equ [EditBox.ed_offset]           ;ᬥ饭¨¥
1116
ed_offset       equ [EditBox.ed_offset]           ;ᬥ饭¨¥
1088
cl_curs_x       equ [EditBox.cl_curs_x]           ;¯à¥¤ë¤ã饥 ª®®à¤¨­ â  ªãàá®à  ¯® å
1117
cl_curs_x       equ [EditBox.cl_curs_x]           ;¯à¥¤ë¤ã饥 ª®®à¤¨­ â  ªãàá®à  ¯® å
1089
cl_curs_y       equ [EditBox.cl_curs_y]           ;¯à¥¤ë¤ã饥 ª®®à¤¨­ â  ªãàá®à  ¯® ã
1118
cl_curs_y       equ [EditBox.cl_curs_y]           ;¯à¥¤ë¤ã饥 ª®®à¤¨­ â  ªãàá®à  ¯® ã
1090
ed_shift_pos    equ [EditBox.ed_shift_pos]        ;¯®«®¦¥­¨¥ ªãàá®à 
1119
ed_shift_pos    equ [EditBox.ed_shift_pos]        ;¯®«®¦¥­¨¥ ªãàá®à 
1091
ed_shift_pos_old equ [EditBox.ed_shift_pos_old]   ;áâ à®¥ ¯®«®¦¥­¨¥ ªãàá®à 
1120
ed_shift_pos_old equ [EditBox.ed_shift_pos_old]   ;áâ à®¥ ¯®«®¦¥­¨¥ ªãàá®à 
1092
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1121
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1093
;Bit mask from editbox 
1122
;Bit mask from editbox 
1094
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1123
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1095
ed_figure_only= 1000000000000000b   ;®¤­¨ ᨬ¢®«ë 
1124
ed_figure_only= 1000000000000000b   ;®¤­¨ ᨬ¢®«ë 
1096
ed_always_focus= 100000000000000b
1125
ed_always_focus= 100000000000000b
1097
ed_focus=                     10b   ;䮪ãá ¯à¨«®¦¥­¨ï
1126
ed_focus=                     10b   ;䮪ãá ¯à¨«®¦¥­¨ï
1098
ed_shift_on=                1000b   ;¥á«¨ ­¥ ãáâ ­®¢«¥­ -§­ ç¨â ¢¯¥à¢ë¥ ­ ¦ â shift,¥á«¨ ¡ë« ãáâ ­®¢«¥­, §­ ç¨â ¬ë 㦥 çâ® - â® ¤¥« «¨ 㤥ন¢ ï shift
1127
ed_shift_on=                1000b   ;¥á«¨ ­¥ ãáâ ­®¢«¥­ -§­ ç¨â ¢¯¥à¢ë¥ ­ ¦ â shift,¥á«¨ ¡ë« ãáâ ­®¢«¥­, §­ ç¨â ¬ë 㦥 çâ® - â® ¤¥« «¨ 㤥ন¢ ï shift
1099
ed_shift_on_off=1111111111110111b
1128
ed_shift_on_off=1111111111110111b
1100
ed_shift=                    100b   ;¢ª«îç ¥âáï ¯à¨ ­ ¦ â¨¨ ­  shift â.¥. ¥á«¨ ­ ¦¨¬ î
1129
ed_shift=                    100b   ;¢ª«îç ¥âáï ¯à¨ ­ ¦ â¨¨ ­  shift â.¥. ¥á«¨ ­ ¦¨¬ î
1101
ed_shift_off=   1111111111111011b
1130
ed_shift_off=   1111111111111011b
1102
ed_shift_bac=              10000b   ;¡¨â ¤«ï ®ç¨á⪨ ¢ë¤¥«¥­®£® shift â.¥. ¯à¨ ãáâ ­®¢ª¥ £®¢®à¨â çâ® ¥áâì ¢ë¤¥«¥­¨¥
1131
ed_shift_bac=              10000b   ;¡¨â ¤«ï ®ç¨á⪨ ¢ë¤¥«¥­®£® shift â.¥. ¯à¨ ãáâ ­®¢ª¥ £®¢®à¨â çâ® ¥áâì ¢ë¤¥«¥­¨¥
1103
ed_shift_bac_cl=1111111111101111b   ;®ç¨á⪠ ¯à¨ 㤠«¥­¨¨ ¢ë¤¥«¥­¨ï
1132
ed_shift_bac_cl=1111111111101111b   ;®ç¨á⪠ ¯à¨ 㤠«¥­¨¨ ¢ë¤¥«¥­¨ï
1104
ed_shift_cl=    1111111111100011b
1133
ed_shift_cl=    1111111111100011b
1105
ed_shift_mcl=   1111111111111011b
1134
ed_shift_mcl=   1111111111111011b
1106
ed_left_fl=               100000b
1135
ed_left_fl=               100000b
1107
ed_right_fl=    1111111111011111b
1136
ed_right_fl=    1111111111011111b
1108
ed_offset_fl=            1000000b
1137
ed_offset_fl=            1000000b
1109
ed_offset_cl=   1111111110111111b
1138
ed_offset_cl=   1111111110111111b
1110
ed_insert=              10000000b
1139
ed_insert=              10000000b
1111
ed_insert_cl=   1111111101111111b
1140
ed_insert_cl=   1111111101111111b
1112
ed_mouse_on =          100000000b
1141
ed_mouse_on =          100000000b
1113
ed_mous_adn_b=         100011000b
1142
ed_mous_adn_b=         100011000b
1114
ed_mouse_on_off=1111111011111111b
1143
ed_mouse_on_off=1111111011111111b
1115
ed_height=14 ; ¢ëá®â 
1144
ed_height=14 ; ¢ëá®â 
1116
}
1145
}