Subversion Repositories Kolibri OS

Rev

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

Rev 292 Rev 295
Line -... Line 1...
-
 
1
;  26.01.2007 ­®à¬ «ì­ ï à ¡®â  ª®¬¯ ­¥­â  ¨á¯à ¢¨« äãªæ¨î .check_offset
1
;  23.01.2007 ¯®ä¨ªá¥« ¡ £¨ ¢ë§¢ ­ë¥ ­¥ ¯à ¢¨«ì­ë¬ ª®¤®¬ )).
2
;  24.01.2007 ¯®ä¨ªá¥« ¡ £¨ ¢ë§¢ ­ë¥ ­¥ ¯à ¢¨«ì­ë¬ ª®¤®¬ )).
2
;  22.01.2007 ¨§¡ ¢¨«áï ®â £«îª®¢ ¯à¨ à ¡®â¥ á ¢ë¤¥«¥­¨¥¬ ¨ 㤠«¥­¨¥, ª®à४⭠ï à ¡®â  ª« ¢¨è¥© del & backspase
3
;  22.01.2007 ¨§¡ ¢¨«áï ®â £«îª®¢ ¯à¨ à ¡®â¥ á ¢ë¤¥«¥­¨¥¬ ¨ 㤠«¥­¨¥, ª®à४⭠ï à ¡®â  ª« ¢¨è¥© del & backspase
3
;  20.01.2007 ॠ«¨§®¢ « ¢ë¤¥«¥­¨¥ ⥪áâ  ¯® shift
4
;  20.01.2007 ॠ«¨§®¢ « ¢ë¤¥«¥­¨¥ ⥪áâ  ¯® shift
4
;  12.12.2006 ॠ«¨§®¢ « ¯®¤¤¥à¦ªã ª­®¯ª¨ insert ¨ ᥣ®¤ï ª®¬¯®­¥­â ¯®ç⨠ࠡ®â ¥â!!!!
5
;  12.12.2006 ॠ«¨§®¢ « ¯®¤¤¥à¦ªã ª­®¯ª¨ insert ¨ ᥣ®¤ï ª®¬¯®­¥­â ¯®ç⨠ࠡ®â ¥â!!!!
5
;  07.12.2006 ¯à®¤®«¦ ¥âáï à ¡®â  ­ ¤ ¯¥à¥à ¡®âª®© ª®¬¯®­¥­â ,¨§¬¥­¥­¨ï¬ ¯®¤¢¥à£«¨áì ¬­®£¨¥ ä㭪樨, ¯¥à¥à ¡®â ­ ¢ë¢®¤ ⥪áâ ,   â ª  ¦¥  «£®à¨â¬ ¢­¥á¥­¨ï ᨬ¢®«®¢.
6
;  07.12.2006 ¯à®¤®«¦ ¥âáï à ¡®â  ­ ¤ ¯¥à¥à ¡®âª®© ª®¬¯®­¥­â ,¨§¬¥­¥­¨ï¬ ¯®¤¢¥à£«¨áì ¬­®£¨¥ ä㭪樨, ¯¥à¥à ¡®â ­ ¢ë¢®¤ ⥪áâ ,   â ª  ¦¥  «£®à¨â¬ ¢­¥á¥­¨ï ᨬ¢®«®¢.
6
;  03.09.2006 ¯® ¢®§¬®¦­®á⨠®âª § «áï ®â 16 ¡¨â­®©  à¨ä¬¥â¨ª¨, ¤®¡ ¢¨« ­®¢ë¥ ¡ £¨
7
;  03.09.2006 ¯® ¢®§¬®¦­®á⨠®âª § «áï ®â 16 ¡¨â­®©  à¨ä¬¥â¨ª¨, ¤®¡ ¢¨« ­®¢ë¥ ¡ £¨
Line 279... Line 280...
279
;--- eax = 1, ¥á«¨ ­¥ ¨§¬¥­¨«®áì ¨«¨ eax = 0, ¥á«¨
280
;--- eax = 1, ¥á«¨ ­¥ ¨§¬¥­¨«®áì ¨«¨ eax = 0, ¥á«¨
280
; ¨§¬¥­¨«®áì
281
; ¨§¬¥­¨«®áì
281
;----------------------------------------------------------
282
;----------------------------------------------------------
282
.check_offset:
283
.check_offset:
283
	pushad
284
	pushad
-
 
285
	mov	ecx,ed_pos
284
	push	dword ed_offset          ;á®åà ­¨¬ ᬥ饭¨¥
286
	mov	ebx,ed_offset
-
 
287
	cmp	ebx,ecx
-
 
288
	ja	.sub_8
-
 
289
 
-
 
290
	push	ebx
285
	call	.get_n			;¯®«ã稬 ª®«-¢® ᨬ¢®«®¢ ¢ ¯ à¥ ॣ¨áâ஢ edx:eax 
291
	call	.get_n			;¯®«ã稬 ª®«-¢® ᨬ¢®«®¢ ¢ ¯ à¥ ॣ¨áâ஢ edx:eax 
286
	mov	ebx,eax
-
 
287
	mov	eax,ed_pos
-
 
288
	xor 	edx,edx
-
 
289
	idiv	ebx
-
 
290
	xor 	edx,edx
-
 
291
	imul    eax,ebx
-
 
292
	mov	ed_offset,eax
-
 
293
	pop	ebx
292
	pop	ebx
-
 
293
	mov	edx,ebx
-
 
294
	add	edx,eax		;ed_offset+width editbox
294
	cmp	ax,bx
295
	cmp	edx,ecx
295
	je	@f
296
	ja	@f
296
;;;;;;;; ¤ ­­ë¥ ¤«ï § ªà è¨¢ ­¨ï ¢á¥© ¯®«®áë ¯àאַ㣮«ì­¨ª 
-
 
-
 
297
 
297
	mov	ebx,ed_left
298
	mov	edx,ed_size
298
	inc	ebx
299
	sub	edx,eax
299
	shl	ebx,16
300
	cmp	edx,8
300
	mov	bx,ed_width
301
	jbe	.add_8
301
	dec 	ebx
302
	mov	ebx,edx
302
	mov	edx,ed_color
303
;	add	ebx,8
303
	call    .draw_bg_eax
304
	jmp	.chk_d
-
 
305
 
304
	mov	dword [esp+28],0
306
.sub_8: cmp	ecx,0
305
@@:	popad
307
	je	.sub_min
306
	ret
308
	cmp	ebx,8
307
;==========================================================
309
        jbe	.sub_min
308
;=== ®¡à ¡®âª  ª« ¢¨ âãàë =================================
-
 
309
;==========================================================
310
	sub	ebx,8	;ebx=ed_offset
310
.key:
311
	jmp	.chk_d
311
pusha
312
.sub_min:
312
	test	word ed_flags,ed_focus ; ¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬
-
 
313
	je     .no_figure ;@f
313
        xor	ebx,ebx
-
 
314
	jmp	.chk_d
-
 
315
 
-
 
316
.add_8:	mov	ebx,edx
314
;	;-----------  ®â« ¤ª 
317
;	;-----------  ®â« ¤ª 
315
;	pushad
318
;	pushad
316
;	mov	[data_of_code],0
319
;	mov	[data_of_code],0
317
;	mov eax,edi;word ed_flags
320
;	mov eax,ebx;ed_offset
318
;	mov edi,data_of_code
321
;	mov edi,data_of_code
319
;	call .str
322
;	call .str
320
;	;à¨á®¢ ­¨¥ ä®­ 
323
;	;à¨á®¢ ­¨¥ ä®­ 
321
;	mov eax,13
324
;	mov eax,13
322
;	mov ebx,178*65536+36
325
;	mov ebx,178*65536+36
Line 331... Line 334...
331
;	mov esi,4
334
;	mov esi,4
332
;	int 0x40
335
;	int 0x40
333
;	popad
336
;	popad
334
;	;----------- ®â« ¤ª 
337
;	;----------- ®â« ¤ª 
Line -... Line 338...
-
 
338
 
-
 
339
.chk_d:	mov	ed_offset,ebx
-
 
340
 
-
 
341
	call    .draw_bg
-
 
342
	mov	dword [esp+28],-1
-
 
343
	popad
-
 
344
	ret
-
 
345
 
-
 
346
@@:
-
 
347
	mov	dword [esp+28],0
-
 
348
	popad
-
 
349
	ret
-
 
350
 
-
 
351
 
-
 
352
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 
353
;	mov	ebx,eax
-
 
354
;	mov	eax,ed_pos
-
 
355
;	xor 	edx,edx
-
 
356
;	idiv	ebx
-
 
357
;	xor 	edx,edx
-
 
358
;	imul    eax,ebx
-
 
359
;	mov	ed_offset,eax
-
 
360
;	pop	ebx
-
 
361
;	cmp	ax,bx
-
 
362
;	je	@f
-
 
363
;;;;;;;; ¤ ­­ë¥ ¤«ï § ªà è¨¢ ­¨ï ¢á¥© ¯®«®áë ¯àאַ㣮«ì­¨ª 
-
 
364
;	mov	ebx,ed_left
-
 
365
;	inc	ebx
-
 
366
;	shl	ebx,16
-
 
367
;	mov	bx,ed_width
-
 
368
;	dec 	ebx
-
 
369
;	mov	edx,ed_color
-
 
370
;	call    .draw_bg_eax
-
 
371
;	mov	dword [esp+28],0
-
 
372
;@@:	popad
-
 
373
;	ret
-
 
374
;==========================================================
-
 
375
;=== ®¡à ¡®âª  ª« ¢¨ âãàë =================================
-
 
376
;==========================================================
-
 
377
.key:
-
 
378
pusha
-
 
379
	test	word ed_flags,ed_focus ; ¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬
-
 
380
	je     .no_figure ;@f
335
 
381
 
336
	xor	ecx,ecx
382
	xor	ecx,ecx
337
	push	eax	
383
	push	eax	
338
	inc	ecx
384
	inc	ecx
339
	mov	eax,66
385
	mov	eax,66
Line 451... Line 497...
451
	stosb
497
	stosb
452
	pop edi
498
	pop edi
453
; ¢áâ ¢«ï¥¬ ª®¤ ª« ¢¨è¨ â㤠, £¤¥ ªãàá®à
499
; ¢áâ ¢«ï¥¬ ª®¤ ª« ¢¨è¨ â㤠, £¤¥ ªãàá®à
454
	; 㢥«¨ç¨¢ ¥¬ §­ ç¥­¨¥ à §¬¥à  ¨ ¯®§¨æ¨¨
500
	; 㢥«¨ç¨¢ ¥¬ §­ ç¥­¨¥ à §¬¥à  ¨ ¯®§¨æ¨¨
455
	inc	 dword ed_size
501
	inc	 dword ed_size
456
	call	.draw_all2
-
 
457
	inc	 dword ed_pos
502
	inc	 dword ed_pos
-
 
503
	call	.draw_all2
458
	jmp    .shift;.draw_cursor_text
504
	jmp	.shift;.draw_cursor_text
459
.delete:	
505
.delete:	
460
	mov	edx,ed_size
506
	mov	edx,ed_size
461
	mov	ecx,ed_pos
507
	mov	ecx,ed_pos
462
	cmp	edx,ecx
508
	cmp	edx,ecx
Line 507... Line 553...
507
 
553
 
508
.draw_all2:
554
.draw_all2:
509
	and    word ed_flags,ed_shift_cl
555
	and    word ed_flags,ed_shift_cl
510
	call	.clear_cursor
556
	call	.clear_cursor
-
 
557
	call	.check_offset
-
 
558
;;;;;;;;;;;;;;;
-
 
559
	cmp	eax,0
-
 
560
	je      @f
-
 
561
	call	.draw_bg
-
 
562
	ret
511
	call	.check_offset
563
;;;;;;;;;;;;;;;
512
	call	.get_n
564
@@:	call	.get_n
513
	push	eax
565
	push	eax
514
	mov	ebx,ed_offset
566
	mov	ebx,ed_offset
515
	add	eax,ebx	;eax = w_off= ed_offset+width
567
	add	eax,ebx	;eax = w_off= ed_offset+width
Line 589... Line 641...
589
	;jz	.draw_bg_cursor_text
641
	;jz	.draw_bg_cursor_text
590
	call	.draw_cursor
642
	call	.draw_cursor
Line 591... Line 643...
591
 
643
 
Line 592... Line 644...
592
.shift: ;;;;;;;SHIFT
644
.shift: ;;;;;;;SHIFT
593
		
645
		
594
    	call	.draw_bg
646
    	call	.draw_bg	;­¥ ®¯â¨¬ «ì­®
595
	test      word ed_flags,ed_shift
647
	test      word ed_flags,ed_shift
596
        je	.f_exit
648
        je	.f_exit
597
;;;;;;SHIFT end
649
;;;;;;SHIFT end