Rev 629 | Rev 987 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 629 | Rev 824 | ||
---|---|---|---|
Line -... | Line 1... | ||
- | 1 | diff16 'tp-common.asm',0,$ |
|
- | 2 | ||
1 | ;----------------------------------------------------------------------------- |
3 | ;----------------------------------------------------------------------------- |
2 | proc clear_selection ;//////////////////////////////////////////////////////// |
4 | proc clear_selection ;//////////////////////////////////////////////////////// |
3 | ;----------------------------------------------------------------------------- |
5 | ;----------------------------------------------------------------------------- |
4 | push eax ebx |
6 | push eax ebx |
5 | mov eax,[cur_editor.SelStart.Y] |
7 | mov eax,[cur_editor.SelStart.Y] |
Line 419... | Line 421... | ||
419 | add ebx,ecx |
421 | add ebx,ecx |
420 | mov [edi-4],bx |
422 | mov [edi-4],bx |
421 | add edi,[sel.begin.x] |
423 | add edi,[sel.begin.x] |
422 | lea esi,[esi+eax+4] |
424 | lea esi,[esi+eax+4] |
423 | mov ecx,[cur_editor.Lines] |
425 | mov ecx,[cur_editor.Lines] |
424 | add ecx,[ecx-4] |
426 | add ecx,[cur_editor.Lines.Size] ;*** add ecx,[ecx-4] |
425 | sub ecx,esi |
427 | sub ecx,esi |
426 | cld |
428 | cld |
427 | rep movsb |
429 | rep movsb |
428 | mov eax,[sel.end.y] |
430 | mov eax,[sel.end.y] |
429 | sub eax,[sel.begin.y] |
431 | sub eax,[sel.begin.y] |
Line 445... | Line 447... | ||
445 | sub [esi],cx |
447 | sub [esi],cx |
446 | lea edi,[esi+4] |
448 | lea edi,[esi+4] |
447 | add edi,[sel.begin.x] |
449 | add edi,[sel.begin.x] |
448 | lea esi,[edi+ecx] |
450 | lea esi,[edi+ecx] |
449 | mov ecx,[cur_editor.Lines] |
451 | mov ecx,[cur_editor.Lines] |
450 | add ecx,[ecx-4] |
452 | add ecx,[cur_editor.Lines.Size] ;*** add ecx,[ecx-4] |
451 | sub ecx,esi |
453 | sub ecx,esi |
452 | cld |
454 | cld |
453 | rep movsb |
455 | rep movsb |
Line 454... | Line 456... | ||
454 | 456 | ||
Line 463... | Line 465... | ||
463 | mov ecx,[cur_editor.Lines.Count] |
465 | mov ecx,[cur_editor.Lines.Count] |
464 | call get_line_offset |
466 | call get_line_offset |
465 | movzx eax,word[esi] |
467 | movzx eax,word[esi] |
466 | lea esi,[esi+eax+4] |
468 | lea esi,[esi+eax+4] |
467 | mov eax,[cur_editor.Lines] |
469 | mov eax,[cur_editor.Lines] |
468 | add eax,[eax-4] |
470 | add eax,[cur_editor.Lines.Size] ;*** add eax,[eax-4] |
469 | sub esi,eax |
471 | sub esi,eax |
470 | lea eax,[esi+4096] |
472 | lea eax,[esi+4096] |
471 | call editor_realloc_lines |
473 | call editor_realloc_lines |
Line 472... | Line 474... | ||
472 | 474 | ||
Line 585... | Line 587... | ||
585 | ;----------------------------------------------------------------------------- |
587 | ;----------------------------------------------------------------------------- |
586 | proc mem.Alloc,size ;///////////////////////////////////////////////////////// |
588 | proc mem.Alloc,size ;///////////////////////////////////////////////////////// |
587 | ;----------------------------------------------------------------------------- |
589 | ;----------------------------------------------------------------------------- |
588 | push ebx ecx |
590 | push ebx ecx |
589 | mov ecx,[size] |
591 | mov ecx,[size] |
590 | add ecx,4 |
592 | ;*** add ecx,4 |
591 | mcall 68,12 |
593 | mcall 68,12 |
592 | add ecx,-4 |
594 | ;*** add ecx,-4 |
593 | mov [eax],ecx |
595 | ;*** mov [eax],ecx |
594 | add eax,4 |
596 | ;*** add eax,4 |
595 | pop ecx ebx |
597 | pop ecx ebx |
596 | ret |
598 | ret |
597 | endp |
599 | endp |
Line 598... | Line 600... | ||
598 | 600 | ||
Line 601... | Line 603... | ||
601 | ;----------------------------------------------------------------------------- |
603 | ;----------------------------------------------------------------------------- |
602 | push ebx ecx edx |
604 | push ebx ecx edx |
603 | mov ecx,[size] |
605 | mov ecx,[size] |
604 | or ecx,ecx |
606 | or ecx,ecx |
605 | jz @f |
607 | jz @f |
606 | add ecx,4 |
608 | ;*** add ecx,4 |
607 | @@: mov edx,[mptr] |
609 | @@: mov edx,[mptr] |
608 | or edx,edx |
610 | or edx,edx |
609 | jz @f |
611 | jz @f |
610 | add edx,-4 |
612 | ;*** add edx,-4 |
611 | @@: mcall 68,20 |
613 | @@: mcall 68,20 |
612 | or eax,eax |
614 | or eax,eax |
613 | jz @f |
615 | jz @f |
614 | add ecx,-4 |
616 | ;*** add ecx,-4 |
615 | mov [eax],ecx |
617 | ;*** mov [eax],ecx |
616 | add eax,4 |
618 | ;*** add eax,4 |
617 | @@: pop edx ecx ebx |
619 | @@: pop edx ecx ebx |
618 | ret |
620 | ret |
619 | endp |
621 | endp |
Line 620... | Line 622... | ||
620 | 622 | ||
Line 623... | Line 625... | ||
623 | ;----------------------------------------------------------------------------- |
625 | ;----------------------------------------------------------------------------- |
624 | push ebx ecx |
626 | push ebx ecx |
625 | mov ecx,[mptr] |
627 | mov ecx,[mptr] |
626 | or ecx,ecx |
628 | or ecx,ecx |
627 | jz @f |
629 | jz @f |
628 | add ecx,-4 |
630 | ;*** add ecx,-4 |
629 | @@: mcall 68,13 |
631 | @@: mcall 68,13 |
630 | pop ecx ebx |
632 | pop ecx ebx |
631 | ret |
633 | ret |
632 | endp |
634 | endp |