Subversion Repositories Kolibri OS

Rev

Rev 391 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 391 Rev 396
Line -... Line 1...
-
 
1
;  07.03.2007 „®¯¨á « ã¯à ¢«¥­¨¥ á shift home + end ãá¯à ¢¨« ­¥áª®«ìª® ¡ £®¢
1
;  06.03.2007 ¥à¥¯¨á « ¯®«­®áâìî  «£®à¨â¬ ã¯à ¢«¥­¨ï shift
2
;  06.03.2007 ¥à¥¯¨á « ¯®«­®áâìî  «£®à¨â¬ ã¯à ¢«¥­¨ï shift
2
;  15.02.2007 ã«ãç襭¨¥ á­ïâ¨ï ¢ë¤¥«¥­¨ï ¨ ¯¥à¥à¨á®¢ª¨ ®ç¨é ¥¬®© ®¡« áâ¨, §­ ç¨â¥«ì­® ¯à¨ïâ­¥¥ à ¡®â ¥â ª®¬¯®­¥­â
3
;  15.02.2007 ã«ãç襭¨¥ á­ïâ¨ï ¢ë¤¥«¥­¨ï ¨ ¯¥à¥à¨á®¢ª¨ ®ç¨é ¥¬®© ®¡« áâ¨, §­ ç¨â¥«ì­® ¯à¨ïâ­¥¥ à ¡®â ¥â ª®¬¯®­¥­â
3
;  13.02.2007 ã¡à « ¯® ¢®§¬®¦­®á⨠¬¥àæ ­¨¥, ã«ãç襭  ®¡à ¡®âª  ¯¥à¥à¨á®¢ª¨ ä®­ 
4
;  13.02.2007 ã¡à « ¯® ¢®§¬®¦­®á⨠¬¥àæ ­¨¥, ã«ãç襭  ®¡à ¡®âª  ¯¥à¥à¨á®¢ª¨ ä®­ 
4
; ¤®¡ ¢¨« ä¨âçã ¢­¥á¥­¨ï 0å0 ¯®  ¤à¥áã ed_size ¨­ ç¥ ã Maxxx32 ¡ë«¨ ­¥á®áâ몮¢ª¨ ¢ ª®¤¥. à¨ç¨­  ¢ ⮬, çâ® ®¯â¨¬¨§ æ¨ï ¡ë«  ᢥ¤¥­  ª ⮬ã, çâ® ï ­¥ ç¨á⨫ ᨬ¢®«ë ¢ ¡ãä¥à¥, ª®£¤  㤠«ï«, ï ¯à®áâ® ¨å ­¥ ¢ë¢®¤¨«, ¨ ¯®â®¬, ª®£¤  ¢­®á¨«áï ­®¢ë© ᨬ¢®«, ®­ ¯®¯à®áâã § â¨à « 㦥 ¨¬¥î騩áï. …᫨ ¡ë, ¯à®£à ¬¬  ®¡à ¡ â뢠«  ª®­¥æ áâப¨ ¯® ed_size, ¯à®¡«¥¬ë ­¥ ¢®§­¨ª«®. ® ᥩç á íâ®â ­¥¤®áâ â®ª ¨á¯à ¢«¥­.
5
; ¤®¡ ¢¨« ä¨âçã ¢­¥á¥­¨ï 0å0 ¯®  ¤à¥áã ed_size ¨­ ç¥ ã Maxxx32 ¡ë«¨ ­¥á®áâ몮¢ª¨ ¢ ª®¤¥. à¨ç¨­  ¢ ⮬, çâ® ®¯â¨¬¨§ æ¨ï ¡ë«  ᢥ¤¥­  ª ⮬ã, çâ® ï ­¥ ç¨á⨫ ᨬ¢®«ë ¢ ¡ãä¥à¥, ª®£¤  㤠«ï«, ï ¯à®áâ® ¨å ­¥ ¢ë¢®¤¨«, ¨ ¯®â®¬, ª®£¤  ¢­®á¨«áï ­®¢ë© ᨬ¢®«, ®­ ¯®¯à®áâã § â¨à « 㦥 ¨¬¥î騩áï. …᫨ ¡ë, ¯à®£à ¬¬  ®¡à ¡ â뢠«  ª®­¥æ áâப¨ ¯® ed_size, ¯à®¡«¥¬ë ­¥ ¢®§­¨ª«®. ® ᥩç á íâ®â ­¥¤®áâ â®ª ¨á¯à ¢«¥­.
5
;  01.02.2007 ¤®à ¡®âª  edit_box, ¨á¯à ¢¨« ¡ £¨.
6
;  01.02.2007 ¤®à ¡®âª  edit_box, ¨á¯à ¢¨« ¡ £¨.
Line 67... Line 68...
67
ed_size equ [edi+38]                    ;ª®«-¢® ᨬ¢®«®¢
68
ed_size equ [edi+38]                    ;ª®«-¢® ᨬ¢®«®¢
68
ed_pos	equ [edi+42]                    ;¯®§¨æ¨ï ªãàá®à 
69
ed_pos	equ [edi+42]                    ;¯®§¨æ¨ï ªãàá®à 
69
ed_offset	equ [edi+46]            ;ᬥ饭¨¥
70
ed_offset	equ [edi+46]            ;ᬥ饭¨¥
70
cl_curs_x	equ [edi+50]		;¯à¥¤ë¤ã饥 ª®®à¤¨­ â  ªãàá®à  ¯® å
71
cl_curs_x	equ [edi+50]		;¯à¥¤ë¤ã饥 ª®®à¤¨­ â  ªãàá®à  ¯® å
71
cl_curs_y	equ [edi+54]		;¯à¥¤ë¤ã饥 ª®®à¤¨­ â  ªãàá®à  ¯® ã
72
cl_curs_y	equ [edi+54]		;¯à¥¤ë¤ã饥 ª®®à¤¨­ â  ªãàá®à  ¯® ã
72
ed_shift_pos	equ [edi+58]
73
ed_shift_pos	equ [edi+58]            ;¯®«®¦¥­¨¥ ªãàá®à 
73
ed_shift_pos_old equ [edi+62]
74
ed_shift_pos_old equ [edi+62]           ;áâ à®¥ ¯®«®¦¥­¨¥ ªãàá®à 
74
;==========================================================
75
;==========================================================
75
;=== ¯à®æ¥¤ãà  ¯à®à¨á®¢ª¨ =================================
76
;=== ¯à®æ¥¤ãà  ¯à®à¨á®¢ª¨ =================================
76
;==========================================================
77
;==========================================================
77
.draw:
78
.draw:
78
pusha
79
pusha
Line 91... Line 92...
91
	call	.draw_cursor
92
	call	.draw_cursor
92
@@:
93
@@:
93
	call	.draw_text
94
	call	.draw_text
94
popa
95
popa
95
ret
96
ret
96
 
-
 
97
;.str:
-
 
98
;	mov ecx,0x0a ;§ ¤ ¥âáï á¨á⥬  áç¨á«¥­¨ï ¨§¬¥­ïîâáï ॣ¨áâàë ebx,eax,ecx,edx ¢å®¤­ë¥ ¯ à ¬¥âàë eax - ç¨á«®
-
 
99
;	 ;¯à¥à¥¢®¤ ç¨á«  ¢ ASCII áâப㠢§®¤­ë¥ ¤ ­­ë¥ ecx=á¨á⥬  áç¨á«¥­ï edi  ¤à¥á ªã¤  § ¯¨á뢠âì, ¡ã¤¥¬ áâபã, ¯à¨ç¥¬ ª®­¥æ ¯¥à¥¬¥­­®© 
-
 
100
;	cmp eax,ecx  ;áà ¢­¨âì ¥á«¨ ¢ eax ¬¥­ìè¥ ç¥¬ ¢ ecx â® ¯¥à¥©â¨ ­  @@-1 â.¥. ­  pop eax
-
 
101
;	jb @f
-
 
102
;	xor edx,edx  ;®ç¨áâ¨âì edx
-
 
103
;	div ecx      ;à §¤¥«¨âì - ®áâ â®ª ¢ edx
-
 
104
;	push edx     ;¯®«®¦¨âì ¢ á⥪
-
 
105
;	;dec edi	     ;ᬥ饭¨¥ ­¥®¡å®¤¨¬®¥ ¤«ï § ¯¨á¨ á ª®­æ  áâப¨
-
 
106
;	call .str;¯¥à¥©â¨ ­  á ¬ã ᥡï â.¥. ¢ë§¢ âì á ¬ã á¥¡ï ¨ â ª ¤® ⮣® ¬®¬¥­â  ¯®ª  ¢ eax ­¥ áâ ­¥â ¬¥­ìè¥ ç¥¬ ¢ ecx
-
 
107
;	pop eax
-
 
108
;	@@: ;cmp al,10 ;¯à®¢¥à¨âì ­¥ ¬¥­ìè¥ «¨ §­ ç¥­¨¥ ¢ al 祬 10 (¤«ï á¨á⥬ë áç¨á«¥­ï 10 ¤ ­­ ï ª®¬ ­¤  - «¨è­ ï))
-
 
109
;	;sbb al,$69  ;- ç¥áâ­® ¤ ­­ ï ¨­áâàãªæ¨ï ¬¥­ï § áâ ¢«ï¥â § ¤ã¬ âìáï â.¥. ï ­¥ §­ î ª ª íâ® à ¡®â ¥â
-
 
110
;	;das	    ;¯®á«¥ ¤ ­­®© ª®¬ ­¤ë ª ª ¡ë ¯à®¨á室¨â 㬥­ì襭¨¥ al ­  66h  (¢ ª­¨£¥ ­ ¯¨á ­® ¤à㣮¥)
-
 
111
;	or al,0x30  ;¤ ­­ ï ª®¬ ­¤  ª®à®ç¥  祬 ¤¢¥ ¢ëè¥ 
-
 
112
;	stosb	    ;§ ¯¨á âì í«¥¬¥­â ¨§ ॣ¨áâà  al ¢ ï祪㠯 ¬ï⨠es:edi
-
 
113
 ;
-
 
114
;	ret	    ;¢¥à­ãâìáï ç¥­ì ¨­â¥à¥á­ë© 室 â.ª. ¯®ª  ¢ á⥪¥ åà ­¨âìáï ª®«-¢® ¢ë§®¢®¢ â® á⮫쪮 à § ¬ë ¨ ¡ã¤¥¬ ¢ë§ë¢ âìáï
-
 
115
 
-
 
116
;----------------------------------------------------------
97
;----------------------------------------------------------
117
;--- ¯à®æ¥¤ãà  ¯à®à¨á®¢ª¨ ⥪áâ  --------------------------
98
;--- ¯à®æ¥¤ãà  ¯à®à¨á®¢ª¨ ⥪áâ  --------------------------
118
;----------------------------------------------------------
99
;----------------------------------------------------------
119
.draw_text:
100
.draw_text:
120
;--- ¢ëç¨á«ï¥¬, ᪮«ìª® ¯®¬¥é ¥âáï ᨬ¢®«®¢ ---
101
;--- ¢ëç¨á«ï¥¬, ᪮«ìª® ¯®¬¥é ¥âáï ᨬ¢®«®¢ ---
Line 170... Line 151...
170
	xor	edx,edx   ;१ã«ìâ â à á¯®«®£ ¥âáï ¢ ¯ à¥ edx:eax ¢ eax - ®áâ â®ª
151
	xor	edx,edx   ;१ã«ìâ â à á¯®«®£ ¥âáï ¢ ¯ à¥ edx:eax ¢ eax - ®áâ â®ª
171
	sub	eax,4		;¢ëç⨬ 4
152
	sub	eax,4		;¢ëç⨬ 4
172
	mov	ebx,6		;§ £à㧬¨ ¤¥«¨â¥«ì
153
	mov	ebx,6		;§ £à㧬¨ ¤¥«¨â¥«ì
173
	div	ebx		;à §¬¤¥«¨¬ ­  6
154
	div	ebx		;à §¬¤¥«¨¬ ­  6
174
ret
155
ret
175
 
-
 
176
;----------------------------------------------------------
156
;----------------------------------------------------------
177
;--- ¯à®æ¥¤ãà  à¨á®¢ ­¨ï ªãàá®à  --------------------------
157
;--- ¯à®æ¥¤ãà  à¨á®¢ ­¨ï ªãàá®à  --------------------------
178
;----------------------------------------------------------
158
;----------------------------------------------------------
179
;¢å®¤­ë¥ ebp- 梥â
159
;¢å®¤­ë¥ ebp- 梥â
180
.clear_cursor:
160
.clear_cursor:
181
	mov	edx,ebp
161
	mov	edx,ebp
182
	mov	ebx,cl_curs_x
162
	mov	ebx,cl_curs_x
183
	mov	ecx,cl_curs_y
163
	mov	ecx,cl_curs_y
184
	jmp	.draw_curs
164
	jmp	.draw_curs
185
.draw_cursor:
165
.draw_cursor:
186
 
-
 
187
	mov	edx,ed_text_color
166
	mov	edx,ed_text_color
188
;@@:
-
 
189
	mov	ebx,ed_pos
167
	mov	ebx,ed_pos
190
	mov	ecx,ed_offset
168
	mov	ecx,ed_offset
191
	sub	ebx,ecx
169
	sub	ebx,ecx
Line 192... Line 170...
192
 
170
 
Line 210... Line 188...
210
	mov	cl_curs_y,ecx
188
	mov	cl_curs_y,ecx
211
.draw_curs:	         
189
.draw_curs:	         
212
	mov	eax,38
190
	mov	eax,38
213
	int	0x40
191
	int	0x40
214
ret
192
ret
215
 
-
 
216
;----------------------------------------------------------
193
;----------------------------------------------------------
217
;--- ¯à®æ¥¤ãà  à¨á®¢ ­¨ï à ¬ª¨ ----------------------------
194
;--- ¯à®æ¥¤ãà  à¨á®¢ ­¨ï à ¬ª¨ ----------------------------
218
;----------------------------------------------------------
195
;----------------------------------------------------------
219
.draw_border:
196
.draw_border:
220
;--- 梥â à ¬ª¨ ---
197
;--- 梥â à ¬ª¨ ---
221
	test	dword ed_flags,ed_focus
198
	test	word ed_flags,ed_focus
222
	mov	edx,ed_focus_border_color
199
	mov	edx,ed_focus_border_color
223
	jne     @f
200
	jne     @f
224
	mov	edx,ed_blur_border_color
201
	mov	edx,ed_blur_border_color
225
@@:
202
@@:
226
;--- ᢥàåã ---
203
;--- ᢥàåã ---
Line 301... Line 278...
301
	mov	ebx,edx
278
	mov	ebx,edx
302
	jmp	.chk_d
279
	jmp	.chk_d
303
.add_8:	add	ebx,edx
280
.add_8:	add	ebx,edx
304
.chk_d:	mov	ed_offset,ebx
281
.chk_d:	mov	ed_offset,ebx
305
	call    .draw_bg
282
	call    .draw_bg
306
	;mov	dword [esp+28],-1
283
	and	word ed_flags,ed_offset_cl
307
popa
284
popa
308
	ret
285
	ret
309
@@:
286
@@:
310
	mov	dword [esp+28],0
287
	or	word ed_flags,ed_offset_fl
311
popa
288
popa
312
	ret
289
	ret
313
;==========================================================
290
;==========================================================
314
;=== ®¡à ¡®âª  ª« ¢¨ âãàë =================================
291
;=== ®¡à ¡®âª  ª« ¢¨ âãàë =================================
315
;==========================================================
292
;==========================================================
Line 325... Line 302...
325
	mov	ebx,3
302
	mov	ebx,3
326
	int	0x40
303
	int	0x40
327
	test	al,0x03
304
	test	al,0x03
328
	je	@f
305
	je	@f
329
        or      word ed_flags,ed_shift   ;ãáâ ­®¢¨¬ ä« £
306
        or      word ed_flags,ed_shift   ;ãáâ ­®¢¨¬ ä« £
330
 
-
 
331
@@:     pop	eax   ;¢®ááâ ­®¢¨¬ áç¨â ­ë© ᨬ¢®« á ª« ¢¨ âãàë
307
@@:     pop	eax   ;¢®ááâ ­®¢¨¬ áç¨â ­ë© ᨬ¢®« á ª« ¢¨ âãàë
332
;----------------------------------------------------------
308
;----------------------------------------------------------
333
;--- ¯à®¢¥à塞, çâ® ­ ¦ â® --------------------------------
309
;--- ¯à®¢¥à塞, çâ® ­ ¦ â® --------------------------------
334
;----------------------------------------------------------
310
;----------------------------------------------------------
335
	cmp	ah,8
311
	cmp	ah,8
Line 360... Line 336...
360
	jz	@f
336
	jz	@f
361
	cmp	ah,'0'
337
	cmp	ah,'0'
362
	jb	.no_figure
338
	jb	.no_figure
363
	cmp	ah,'9'
339
	cmp	ah,'9'
364
	ja	.no_figure
340
	ja	.no_figure
365
 
-
 
366
 
-
 
367
;¯à®¢¥àª  ­  shift
341
;¯à®¢¥àª  ­  shift
368
@@:	test	word ed_flags,ed_shift_on
342
@@:	test	word ed_flags,ed_shift_on
369
	je	@f
343
	je	@f
370
	;‚室­ë¥ ¤ ­­ë¥ edx=ed_size;ecx=ed_pos
344
	;‚室­ë¥ ¤ ­­ë¥ edx=ed_size;ecx=ed_pos
371
 
-
 
372
	push	eax
345
	push	eax
373
	mov	edx,ed_size
346
	mov	edx,ed_size
374
	mov	ecx,ed_pos
347
	mov	ecx,ed_pos
375
	pusha
348
	pusha
376
        
-
 
377
	;cmp	edx,ecx
-
 
378
	;jne	.sh_cl
-
 
379
;clear
349
;clear
380
	mov	ebp,edx ;ed_size
350
	mov	ebp,edx ;ed_size
381
        call	.clear_bg
351
        call	.clear_bg
382
       	mov	ebp,ed_color
352
       	mov	ebp,ed_color
-
 
353
	mov	ebx,dword	ed_shift_pos
383
        call	.sh_cl_
354
        call	.sh_cl_
Line 384... Line 355...
384
 
355
 
385
.sh_nxt:popa 
356
.sh_nxt:popa 
386
	call	.del_char
-
 
387
        
357
	call	.del_char
388
;;;;
358
;;;;
389
        mov	eax,dword ed_shift_pos
359
        mov	eax,dword ed_shift_pos
390
        mov	ebx,ed_size
360
        mov	ebx,ed_size
391
	sub	ebx,eax
361
	sub	ebx,eax
392
	mov	ed_size,ebx
362
	mov	ed_size,ebx
393
	pop	eax
-
 
394
 
363
	pop	eax
395
        ; ¯à®¢¥à塞, ­ å®¤¨âáï «¨ ªãàá®à ¢ ª®­æ¥
364
        ; ¯à®¢¥à塞, ­ å®¤¨âáï «¨ ªãàá®à ¢ ª®­æ¥
396
@@:	mov	ecx,ed_size
365
@@:	mov	ecx,ed_size
397
	mov	edx, ed_max
366
	mov	edx, ed_max
398
	test	word ed_flags,ed_insert
367
	test	word ed_flags,ed_insert
Line 510... Line 479...
510
 
479
 
511
	mov	ebp,ed_color
480
	mov	ebp,ed_color
512
	call	.clear_cursor
481
	call	.clear_cursor
513
	call	.check_offset
482
	call	.check_offset
514
        call	.draw_bg
-
 
515
 
483
        call	.draw_bg
516
	ret
-
 
517
 
484
	ret
Line 518... Line 485...
518
@@:	dec	 dword ed_size
485
@@:	dec	 dword ed_size
519
 
486
 
520
.draw_all2:
487
.draw_all2:
521
	and    word ed_flags,ed_shift_cl
488
	and    word ed_flags,ed_shift_cl
522
	mov	ebp,ed_color
489
	mov	ebp,ed_color
523
	call	.clear_cursor
490
	call	.clear_cursor
524
	call	.check_offset
491
	call	.check_offset
525
	mov	ebp,ed_size
492
	mov	ebp,ed_size
526
	call	.clear_bg
-
 
527
	ret
493
	call	.clear_bg
528
	;jmp	.shift
494
	ret
529
;--- ­ ¦ â  ª« ¢¨è  left ---
495
;--- ­ ¦ â  ª« ¢¨è  left ---
530
.left:  mov	ebx,ed_pos
496
.left:  mov	ebx,ed_pos
531
	test	ebx,ebx
497
	test	ebx,ebx
Line 555... Line 521...
555
 	jmp	.draw_cursor_text
521
 	jmp	.draw_cursor_text
556
.end:   
522
.end:   
557
	mov	ebx,ed_pos
523
	mov	ebx,ed_pos
558
	cmp	ebx,dword ed_size
524
	cmp	ebx,dword ed_size
559
	je	.sh_st_of
525
	je	.sh_st_of
-
 
526
	call	.sh_first_sh
560
	mov	eax,ed_size
527
	mov	eax,ed_size
561
	mov	ed_pos,eax
528
	mov	ed_pos,eax
562
	call	.sh_home_end
529
	call	.sh_home_end
563
	jmp	.draw_cursor_text
530
	jmp	.draw_cursor_text
564
;Ž¡à ¡®âª  Shift ¤«ï á­ïâ¨ï ¢ë¤¥«¥­¨ï ­¥¨§¢¥áâ­®© ®¡« áâ¨
531
;Ž¡à ¡®âª  Shift ¤«ï á­ïâ¨ï ¢ë¤¥«¥­¨ï ­¥¨§¢¥áâ­®© ®¡« áâ¨
Line 566... Line 533...
566
	test    word ed_flags,ed_shift
533
	test    word ed_flags,ed_shift
567
        je	.f_exit
534
        je	.f_exit
Line 568... Line 535...
568
 
535
 
569
@@:	mov	ebp,shift_color
536
@@:	mov	ebp,shift_color
-
 
537
	or	word ed_flags,ed_shift_bac ;ãáâ ­®¢ª  ä« £ , ¢ë¤¥«¥­­®© ®¡« áâ¨
570
	or	word ed_flags,ed_shift_bac ;ãáâ ­®¢ª  ä« £ , ¢ë¤¥«¥­­®© ®¡« áâ¨
538
	mov	ebx,dword	ed_shift_pos
571
	call	.sh_cl_
539
	call	.sh_cl_
572
        jmp	.draw_cursor_text
540
        jmp	.draw_cursor_text
573
;;;;;;;;;;;;;;;;;;;;;
541
;;;;;;;;;;;;;;;;;;;;;
574
.f_exit:call	.check_offset
542
.f_exit:call	.check_offset
Line 577... Line 545...
577
	jmp	.draw_cursor_text
545
	jmp	.draw_cursor_text
578
.sh_cl_:
546
.sh_cl_:
579
;;;;;;SHIFT end
547
;;;;;;SHIFT end
580
;®¡à ¡®âª  ®ç¨á⪨, ¯à¨ «¥¢®¬ - ¯à ¢®¬ ¤¢¨¦¥­¨¨ ¢ë¤¥«¥­¨ï
548
;®¡à ¡®âª  ®ç¨á⪨, ¯à¨ «¥¢®¬ - ¯à ¢®¬ ¤¢¨¦¥­¨¨ ¢ë¤¥«¥­¨ï
581
;¤«ï ®¡à ¡®âª¨ á­ïâ¨ï ¢ë¤¥«¥­¨ï
549
;¤«ï ®¡à ¡®âª¨ á­ïâ¨ï ¢ë¤¥«¥­¨ï
582
;	or	word ed_flags,ed_shift_bac ;ãáâ ­®¢ª  ä« £ , ¢ë¤¥«¥­­®© ®¡« áâ¨
550
;¢å®¤­ë¥ ¯ à ¬¥âàë ebp=color ebx=ed_shift_pos
583
	mov 	eax,dword	ed_pos
551
	mov 	eax,dword	ed_pos
584
	mov	ebx,dword	ed_shift_pos
552
;	mov	ebx,dword	ed_shift_pos
585
	cmp	eax,ebx
553
	cmp	eax,ebx
586
	jae	.sh_n
554
	jae	.sh_n
587
	push	eax  ;¬¥­ì襥 ¢ eax
555
	push	eax  ;¬¥­ì襥 ¢ eax
588
	push	ebx  ;¡®«ì襥
556
	push	ebx  ;¡®«ì襥
589
	jmp	.sh_n1
557
	jmp	.sh_n1
590
	             ;¥á«¨ ¨­ ç¥
558
	             ;¥á«¨ ¨­ ç¥
591
.sh_n: 	push	ebx  
559
.sh_n: 	push	ebx  
592
	push	eax
560
	push	eax
593
.sh_n1: 
561
.sh_n1: 
594
	call	.check_offset
562
	call	.check_offset
595
;	test	eax,eax
-
 
596
;	jz      .drw_sim
-
 
597
	call	.get_n
563
	call	.get_n
598
	mov	edx,eax	;size of ed_box
564
	mov	edx,eax	;size of ed_box
599
;	push	eax
-
 
600
	mov	ecx,ed_offset
565
	mov	ecx,ed_offset
601
	add	eax,ecx	;eax = w_off= ed_offset+width
566
	add	eax,ecx	;eax = w_off= ed_offset+width
602
	mov	edx,eax ;save
567
	mov	edx,eax ;save
603
	pop	ebx     ;¡®«ì襥
568
	pop	ebx     ;¡®«ì襥
604
	pop	eax     ;¬¥­ì襥
569
	pop	eax     ;¬¥­ì襥
Line 611... Line 576...
611
	sub	ebx,ecx
576
	sub	ebx,ecx
612
	jmp     .nxt_f
577
	jmp     .nxt_f
613
@@:	mov	ebx,edx
578
@@:	mov	ebx,edx
614
	sub	ebx,ecx	
579
	sub	ebx,ecx	
615
	jmp     .nxt_f
580
	jmp     .nxt_f
616
 
-
 
617
.f_f:	
581
.f_f:	
618
	sub	eax,ecx
582
	sub	eax,ecx
619
	cmp	edx,ebx		;cà ¢­¨¬ à §¬¥à w_off á ¡®«ì訬
583
	cmp	edx,ebx		;cà ¢­¨¬ à §¬¥à w_off á ¡®«ì訬
620
	jle	@f
584
	jle	@f
621
	sub	ebx,ecx
585
	sub	ebx,ecx
Line 637... Line 601...
637
	mov	bx,cx
601
	mov	bx,cx
638
	inc	ebx
602
	inc	ebx
639
	mov	edx,ebp;shift_color
603
	mov	edx,ebp;shift_color
Line 640... Line 604...
640
 
604
 
641
	call	.draw_bg_eax
-
 
642
@@:	;and    word ed_flags,1111111111111011b
605
	call	.draw_bg_eax
643
	call	.enable_null
-
 
644
	;mov	dword	ed_shift_pos,0
606
@@:	call	.enable_null
645
	ret
607
	ret
646
;;;;;;;;;;;;;;;;;;;;;
608
;;;;;;;;;;;;;;;;;;;;;
647
;“áâ ­®¢ª - á­ï⨥ ¢ë¤¥«¥­¨ï ¢ ®¤¨­ ᨬ¢®«
609
;“áâ ­®¢ª - á­ï⨥ ¢ë¤¥«¥­¨ï ¢ ®¤¨­ ᨬ¢®«
648
;;;;;;;;;;;;;;;;;;;;;
610
;;;;;;;;;;;;;;;;;;;;;
649
.drw_sim:
611
.drw_sim:
650
	mov	eax,dword	ed_pos
612
	mov	eax,dword	ed_pos
651
	call    .draw_rectangle   ;­ à¨á®¢ âì ¯àאַ㣮«ì­¨ª á § ¤ ­­ë¬ 梥⮬
613
	call    .draw_rectangle   ;­ à¨á®¢ âì ¯àאַ㣮«ì­¨ª á § ¤ ­­ë¬ 梥⮬
652
        jmp     @b
614
        jmp     @b
653
;;;;;;;;;;;;;;;;;;;;;
-
 
654
 
-
 
655
;;;;;;;;;;
615
;;;;;;;;;;;;;;;;;;;;;
656
;”ãªæ¨ï ãáâ ­®¢ª¨ ¢ë¤¥«¥­¨ï ¯à¨ ¤¢¨¦¥­¨ï ¢«¥¢® ¨ ¢¯à ¢® ¨ ­ ¦ â¨¨ shift
616
;”ãªæ¨ï ãáâ ­®¢ª¨ ¢ë¤¥«¥­¨ï ¯à¨ ¤¢¨¦¥­¨ï ¢«¥¢® ¨ ¢¯à ¢® ¨ ­ ¦ â¨¨ shift
657
;‹®£¨ª : 
617
;‹®£¨ª : 
658
;;;;;;;;;;
618
;;;;;;;;;;
659
.draw_wigwag:
619
.draw_wigwag:
Line 662... Line 622...
662
	call	.clear_cursor
622
	call	.clear_cursor
Line 663... Line 623...
663
 
623
 
664
	or	word ed_flags,ed_shift_bac ;ãáâ ­®¢ª  ä« £ , ¢ë¤¥«¥­­®© ®¡« áâ¨
624
	or	word ed_flags,ed_shift_bac ;ãáâ ­®¢ª  ä« £ , ¢ë¤¥«¥­­®© ®¡« áâ¨
665
	mov	ebp,shift_color
625
	mov	ebp,shift_color
666
	mov 	eax,dword	ed_pos
-
 
667
	;mov	ebx,dword	ed_shift_pos
626
	mov 	eax,dword	ed_pos
668
	test	word ed_flags,ed_left_fl
627
	test	word ed_flags,ed_left_fl
669
	jz      .low
-
 
670
;	sub	eax,2
-
 
671
	;dec	eax
628
	jz      .low
672
	jmp	@f
629
	jmp	@f
673
;;;;;;;;;;
630
;;;;;;;;;;
674
;”ãªæ¨ï 㤠«¥­¨ï ¢ë¤¥«¥­¨ï ¯à¨ ¤¢¨¦¥­¨ï ¢«¥¢® ¨ ¢¯à ¢® ¨ ­ ¦ â¨¨ shift
631
;”ãªæ¨ï 㤠«¥­¨ï ¢ë¤¥«¥­¨ï ¯à¨ ¤¢¨¦¥­¨ï ¢«¥¢® ¨ ¢¯à ¢® ¨ ­ ¦ â¨¨ shift
675
;‹®£¨ª : 
632
;‹®£¨ª : 
Line 679... Line 636...
679
	mov	ebp,ed_color
636
	mov	ebp,ed_color
680
	call	.clear_cursor
637
	call	.clear_cursor
Line 681... Line 638...
681
 
638
 
682
	mov	ebp,ed_color
639
	mov	ebp,ed_color
683
	mov 	eax,dword	ed_pos
-
 
684
	;mov	ebx,dword	ed_shift_pos
640
	mov 	eax,dword	ed_pos
685
	test	word ed_flags,ed_left_fl
641
	test	word ed_flags,ed_left_fl
686
	jz      .low
642
	jz      .low
687
	;dec	eax
643
	;dec	eax
688
@@:     call	.draw_rectangle  ;­ à¨á®¢ âì ¯àאַ㣮«ì­¨ª § ªà è¨¢ ¥¬®© ®¡« áâ¨
644
@@:     call	.draw_rectangle  ;­ à¨á®¢ âì ¯àאַ㣮«ì­¨ª § ªà è¨¢ ¥¬®© ®¡« áâ¨
Line 697... Line 653...
697
	test	word ed_flags,ed_shift_on
653
	test	word ed_flags,ed_shift_on
698
	jne	@f
654
	jne	@f
699
	mov	dword ed_shift_pos,ebx
655
	mov	dword ed_shift_pos,ebx
700
       	or	word ed_flags,ed_shift_on
656
       	or	word ed_flags,ed_shift_on
701
@@:    	ret
657
@@:    	ret
702
 
-
 
703
;Ž¡à ¡®âª  ªà ©­¨å ¯®«®¦¥­¨© ¢ editbox ¯à¨ ­ ¦ â®¬ shift
658
;Ž¡à ¡®âª  ªà ©­¨å ¯®«®¦¥­¨© ¢ editbox ¯à¨ ­ ¦ â®¬ shift
704
;¯à®¨§¢®¤¨â á­ï⨥ ¢ë¤¥«¥­¨¥, ¥á«¨ ­¥â shift
659
;¯à®¨§¢®¤¨â á­ï⨥ ¢ë¤¥«¥­¨¥, ¥á«¨ ­¥â shift
705
;¨­ ç¥ ¢®®¡é¥ ¢ë室¨â
660
;¨­ ç¥ ¢®®¡é¥ ¢ë室¨â
706
.sh_st_of:
661
.sh_st_of:
707
	test    word ed_flags,ed_shift
662
	test    word ed_flags,ed_shift
708
	jne	@f
663
	jne	@f
709
	test    word ed_flags,ed_shift_bac
664
	test    word ed_flags,ed_shift_bac
710
        je      @f
665
        je      @f
711
       	mov	ebp,ed_color
666
       	mov	ebp,ed_color
-
 
667
	mov	ebx,dword	ed_shift_pos
712
	call	.sh_cl_  ;®ç¨á⪠ ¢ë¤¥«¥­®£® äà £¬¥­â 
668
	call	.sh_cl_  ;®ç¨á⪠ ¢ë¤¥«¥­®£® äà £¬¥­â 
713
	call	.draw_wigwag_cl	
-
 
714
	and	word ed_flags,ed_shift_cl ; ®ç¨á⪠ ®â ⮣® çâ® ã¡à «¨ ¢ë¤¥«¥­¨¥ 
669
	and	word ed_flags,ed_shift_cl ; ®ç¨á⪠ ®â ⮣® çâ® ã¡à «¨ ¢ë¤¥«¥­¨¥ 
715
	jmp     .draw_cursor_text
670
	jmp     .draw_cursor_text
716
@@:
671
@@:
717
     	;-----------  ®â« ¤ª 
-
 
718
;	pushad
-
 
719
;	mov	dword [ed_buffer.3],0
-
 
720
;	mov eax,ebx;word ed_flags
-
 
721
;	mov edi,ed_buffer.3
-
 
722
;	call .str
-
 
723
;	;à¨á®¢ ­¨¥ ä®­ 
-
 
724
;	mov eax,13
-
 
725
;	mov ebx,178*65536+70
-
 
726
;	mov ecx,28*65536+10
-
 
727
;	xor edx,edx
-
 
728
;	int 0x40
-
 
729
;	;¢ë¢®¤ §­ ç¥­¨ï ­  íªà ­
-
 
730
;	mov eax,4
-
 
731
;	mov ebx,180*65536+30
-
 
732
;	mov ecx,0x10DDBBCC
-
 
733
;	mov edx,ed_buffer.3
-
 
734
;	mov esi,8
-
 
735
;	int 0x40
-
 
736
;	popad
-
 
737
	;----------- ®â« ¤ª 
-
 
738
        and	word ed_flags,ed_shift_off
672
        and	word ed_flags,ed_shift_off
739
	popa
673
	popa
740
	ret	
674
	ret	
Line 741... Line 675...
741
 
675
 
Line 747... Line 681...
747
	test    word ed_flags,ed_shift_bac
681
	test    word ed_flags,ed_shift_bac
748
        je      @f
682
        je      @f
749
       	call	.check_offset
683
       	call	.check_offset
Line 750... Line 684...
750
 
684
 
-
 
685
	mov	ebp,ed_color
751
	mov	ebp,ed_color
686
	mov	ebx,dword	ed_shift_pos
752
	call	.sh_cl_  ;®ç¨á⪠ ¢ë¤¥«¥­®£® äà £¬¥­â 
687
	call	.sh_cl_  ;®ç¨á⪠ ¢ë¤¥«¥­®£® äà £¬¥­â 
753
	call	.draw_wigwag_cl	
688
	call	.draw_wigwag_cl	
754
	and	word ed_flags,ed_shift_cl ; 1¢ à ­¥ ­ã¦­® 
689
	and	word ed_flags,ed_shift_cl ; 1¢ à ­¥ ­ã¦­® 
Line 758... Line 693...
758
	call	.clear_cursor
693
	call	.clear_cursor
759
	call	.check_offset
694
	call	.check_offset
760
	ret
695
	ret
761
.sh_ext_en:	
696
.sh_ext_en:	
762
       	call	.check_offset
697
       	call	.check_offset
763
	test	eax,eax
698
	test	word ed_flags,ed_offset_fl
764
	jnz	@f
699
	jne	@f
765
;¨á®¢ ­¨¥ § ªà è¥­ëå ¯àאַ㣮«ì­¨ª®¢ ¨ ®ç¨á⪠ ¨å
700
;¨á®¢ ­¨¥ § ªà è¥­ëå ¯àאַ㣮«ì­¨ª®¢ ¨ ®ç¨á⪠ ¨å
766
        mov 	eax,dword	ed_shift_pos
701
        mov 	eax,dword	ed_shift_pos
767
	mov	ebx,dword	ed_pos
702
	mov	ebx,dword	ed_pos
768
	mov	ecx,dword	ed_shift_pos_old
703
	mov	ecx,dword	ed_shift_pos_old
769
;¯à®¢¥àª  ¨ à¨á®¢ ­¨¥ § ªà è¥­ëå ®¡« á⥩
704
;¯à®¢¥àª  ¨ à¨á®¢ ­¨¥ § ªà è¥­ëå ®¡« á⥩
Line 782... Line 717...
782
;alike  =
717
;alike  =
783
.1_shem: call	.draw_wigwag
718
.1_shem: call	.draw_wigwag
784
.sh_e_end:	and	word ed_flags,ed_shift_off
719
.sh_e_end:	and	word ed_flags,ed_shift_off
785
	ret
720
	ret
786
@@:	mov	ebp,shift_color
721
@@:	mov	ebp,shift_color
-
 
722
	mov	ebx,dword	ed_shift_pos
787
	call	.sh_cl_
723
	call	.sh_cl_
788
	jmp	.sh_e_end
724
	jmp	.sh_e_end
789
;äã­ªæ¨ï ¤«ï ®¡à ¡®âª¨ shift ¯à¨ ­ ¦ â¨¨ home and end
725
;äã­ªæ¨ï ¤«ï ®¡à ¡®âª¨ shift ¯à¨ ­ ¦ â¨¨ home and end
790
.sh_home_end:
726
.sh_home_end:
791
	mov	ebp,ed_color
727
	mov	ebp,ed_color
792
	call	.clear_cursor
728
	call	.clear_cursor
793
	test    word ed_flags,ed_shift_bac
729
	test    word ed_flags,ed_shift_bac
794
        je      @f
730
        je      @f
795
	mov	ebp,ed_color
731
	mov	ebp,ed_color
-
 
732
	mov	ebx,dword	ed_shift_pos_old
796
	call	.sh_cl_
733
	call	.sh_cl_
Line 797... Line 734...
797
 
734
 
798
@@:	test    word ed_flags,ed_shift
735
@@:	test    word ed_flags,ed_shift
799
	je	.sh_exit_ ;­ à¨á®¢ âì § ªà è¥­ë© ¯àאַ㣮«ì­¨ª (®¡« áâì)
-
 
800
    	call	.check_offset
736
	je	.sh_exit_ ;­ à¨á®¢ âì § ªà è¥­ë© ¯àאַ㣮«ì­¨ª (®¡« áâì)
-
 
737
        mov	ebp,shift_color
801
        mov	ebp,shift_color
738
        mov	ebx,dword	ed_shift_pos
802
	call	.sh_cl_
739
	call	.sh_cl_
803
	or	word ed_flags,ed_shift_bac ;ãáâ ­®¢ª  ä« £ , ¢ë¤¥«¥­­®© ®¡« áâ¨
740
	or	word ed_flags,ed_shift_bac ;ãáâ ­®¢ª  ä« £ , ¢ë¤¥«¥­­®© ®¡« áâ¨
804
	jmp	.sh_e_end
741
	jmp	.sh_e_end
805
.sh_exit_:	ret
-
 
806
 
-
 
807
 
-
 
808
;	test    word ed_flags,ed_shift_bac
-
 
809
;        je      @f
-
 
810
 
-
 
811
 
-
 
812
 
-
 
813
 
-
 
814
 
-
 
815
 
-
 
816
 
-
 
817
 
742
.sh_exit_: 	call	.check_offset
818
 
743
	ret
819
;äã­ªæ¨ï ¢­¥á¥­¨ï 0 ¯®  ¤à¥áã ed_size+1
744
;äã­ªæ¨ï ¢­¥á¥­¨ï 0 ¯®  ¤à¥áã ed_size+1
820
.enable_null:
745
.enable_null:
821
        pusha
746
        pusha
822
        mov	eax,ed_size
747
        mov	eax,ed_size
Line 825... Line 750...
825
	inc	eax
750
	inc	eax
826
	xor	ebx,ebx
751
	xor	ebx,ebx
827
	mov 	[eax],bl
752
	mov 	[eax],bl
828
	popa
753
	popa
829
	ret
754
	ret
830
 
-
 
831
        ;- 㤠«¥­¨¥ ᨬ¢®« 
755
;- 㤠«¥­¨¥ ᨬ¢®« 
832
	;‚室­ë¥ ¤ ­­ë¥ edx=ed_size;ecx=ed_pos
756
;‚室­ë¥ ¤ ­­ë¥ edx=ed_size;ecx=ed_pos
833
.del_char:
757
.del_char:
834
	mov     esi,ed_text
758
	mov     esi,ed_text
835
        test	word ed_flags,ed_shift_on
759
        test	word ed_flags,ed_shift_on
Line 874... Line 798...
874
	dec edx
798
	dec edx
875
	jns @b
799
	jns @b
Line 876... Line 800...
876
	
800
	
877
	pop edi
801
	pop edi
878
	ret
-
 
879
 
802
	ret
880
;¢ëç¨á«¨âì § ªà è¨¢ ¥¬ãî ®¡« áâì
803
;¢ëç¨á«¨âì § ªà è¨¢ ¥¬ãî ®¡« áâì
881
;ᮣ« è¥­¨¥ ¢ ebp - ¯¥à¥¤ ¥âáï ed_size
804
;ᮣ« è¥­¨¥ ¢ ebp - ¯¥à¥¤ ¥âáï ed_size
882
.clear_bg:
805
.clear_bg:
883
	call	.get_n  ;¯®«ãç¨âì à §¬¥à ¢ ᨬ¢®« å è¨à¨­ë ª®¬¯®­¥­â 
806
	call	.get_n  ;¯®«ãç¨âì à §¬¥à ¢ ᨬ¢®« å è¨à¨­ë ª®¬¯®­¥­â 
Line 928... Line 851...
928
; à¨á®¢ âì ¯àאַ㣮«ì­¨ª, 梥⠯¥à¥¤ ¥âáï ¢ ebp
851
; à¨á®¢ âì ¯àאַ㣮«ì­¨ª, 梥⠯¥à¥¤ ¥âáï ¢ ebp
929
;¢å®¤­ë¥ ¯ à ¬¥âàë:
852
;¢å®¤­ë¥ ¯ à ¬¥âàë:
930
;eax=dword ed_pos
853
;eax=dword ed_pos
931
;ebp=-梥â ed_color or shift_color 
854
;ebp=-梥â ed_color or shift_color 
932
.draw_rectangle:
855
.draw_rectangle:
933
;        mov	eax,dword ed_pos
-
 
934
	mov	ecx,dword ed_offset
856
	mov	ecx,dword ed_offset
935
	sub     eax,ecx
857
	sub     eax,ecx
936
        lea	ebx,[eax*2+eax]
858
        lea	ebx,[eax*2+eax]
937
	shl	ebx,1
859
	shl	ebx,1
938
	inc	ebx
860
	inc	ebx
Line 1012... Line 934...
1012
;----------------------------------------------------------
934
;----------------------------------------------------------
1013
	bts	word ed_flags,1
935
	bts	word ed_flags,1
1014
	jc	@f
936
	jc	@f
1015
	call	.draw_cursor
937
	call	.draw_cursor
1016
	jmp	.drc
938
	jmp	.drc
1017
 
-
 
1018
 
-
 
1019
._blur:
939
._blur:
1020
	test	word ed_flags,ed_always_focus
940
	test	word ed_flags,ed_always_focus
1021
	jne	@f
941
	jne	@f
1022
	btr	word ed_flags,1 ; ¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬
942
	btr	word ed_flags,1 ; ¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬
1023
	jnc     @f
943
	jnc     @f
Line 1040... Line 960...
1040
	;call    .clear_cursor
960
	;call    .clear_cursor
1041
;@@:
961
;@@:
1042
;popa
962
;popa
1043
;ret
963
;ret
1044
}
964
}
1045
ed_figure_only= 1000000000000000b
965
ed_figure_only= 1000000000000000b   ;®¤­¨ ᨬ¢®«ë 
1046
ed_always_focus= 100000000000000b
966
ed_always_focus= 100000000000000b
1047
ed_focus=10b
967
ed_focus=                     10b   ;䮪ãá ¯à¨«®¦¥­¨ï
1048
ed_shift_on=                1000b   ;¥á«¨ ­¥ ãáâ ­®¢«¥­ -§­ ç¨â ¢¯¥à¢ë¥ ­ ¦ â shift,¥á«¨ ¡ë« ãáâ ­®¢«¥­, §­ ç¨â ¬ë 㦥 çâ® - â® ¤¥« «¨ 㤥ন¢ ï shift
968
ed_shift_on=                1000b   ;¥á«¨ ­¥ ãáâ ­®¢«¥­ -§­ ç¨â ¢¯¥à¢ë¥ ­ ¦ â shift,¥á«¨ ¡ë« ãáâ ­®¢«¥­, §­ ç¨â ¬ë 㦥 çâ® - â® ¤¥« «¨ 㤥ন¢ ï shift
1049
ed_shift=                    100b   ;¢ª«îç ¥âáï ¯à¨ ­ ¦ â¨¨ ­  shift â.¥. ¥á«¨ ­ ¦¨¬ î
969
ed_shift=                    100b   ;¢ª«îç ¥âáï ¯à¨ ­ ¦ â¨¨ ­  shift â.¥. ¥á«¨ ­ ¦¨¬ î
1050
ed_shift_off=   1111111111111011b
970
ed_shift_off=   1111111111111011b
1051
ed_shift_bac=              10000b   ;¡¨â ¤«ï ®ç¨á⪨ ¢ë¤¥«¥­®£® shift â.¥. ¯à¨ ãáâ ­®¢ª¥ £®¢®à¨â çâ® ¥áâì ¢ë¤¥«¥­¨¥
971
ed_shift_bac=              10000b   ;¡¨â ¤«ï ®ç¨á⪨ ¢ë¤¥«¥­®£® shift â.¥. ¯à¨ ãáâ ­®¢ª¥ £®¢®à¨â çâ® ¥áâì ¢ë¤¥«¥­¨¥
1052
ed_shift_cl=    1111111111100011b
972
ed_shift_cl=    1111111111100011b
1053
ed_left_fl=               100000b
973
ed_left_fl=               100000b
1054
ed_right_fl=    1111111111011111b
974
ed_right_fl=    1111111111011111b
-
 
975
ed_offset_fl=            1000000b
-
 
976
ed_offset_cl=   1111111110111111b
1055
ed_insert=              10000000b
977
ed_insert=              10000000b
1056
ed_insert_cl=   1111111101111111b
978
ed_insert_cl=   1111111101111111b
1057
ed_height=14 ; ¢ëá®â 
979
ed_height=14 ; ¢ëá®â 
1058
shift_color=0x6a9480
980
shift_color=0x6a9480
1059
macro draw_edit_boxes start,end
981
macro draw_edit_boxes start,end
Line 1079... Line 1001...
1079
macro key_edit_boxes start,end
1001
macro key_edit_boxes start,end
1080
{
1002
{
1081
	mov	edi,start
1003
	mov	edi,start
1082
	mov	ecx,((end-start)/ed_struc_size)
1004
	mov	ecx,((end-start)/ed_struc_size)
1083
@@:
1005
@@:
-
 
1006
;	push	eax
1084
	call	edit_box.key
1007
	call	edit_box.key
-
 
1008
;	pop	eax
1085
	add	edi,ed_struc_size
1009
	add	edi,ed_struc_size
1086
	loop	@b
1010
	loop	@b
1087
}
1011
}
1088
ed_struc_size=66
1012
ed_struc_size=66
1089
struc  edit_box width,left,top,color,focus_border_color,\
1013
struc  edit_box width,left,top,color,focus_border_color,\
1090
       blur_border_color,text_color,max,text,flags,size
1014
       blur_border_color,text_color,max,text,flags
1091
{
1015
{
1092
.width dd width
1016
.width dd width
1093
.left dd left
1017
.left dd left
1094
.top dd top
1018
.top dd top
1095
.color dd color
1019
.color dd color
Line 1097... Line 1021...
1097
.blur_border_color dd blur_border_color
1021
.blur_border_color dd blur_border_color
1098
.text_color dd text_color
1022
.text_color dd text_color
1099
.max dd max
1023
.max dd max
1100
.text dd text
1024
.text dd text
1101
.flags dw flags+0
1025
.flags dw flags+0
1102
.size dd size+0
1026
.size dd 0
1103
.pos dd 0
1027
.pos dd 0
1104
.offset dd 0
1028
.offset dd 0
1105
.cl_curs_x dd 0
1029
.cl_curs_x dd 0
1106
.cl_curs_y dd 0
1030
.cl_curs_y dd 0
1107
.shift   dd 0
1031
.shift   dd 0