1,5 → 1,4 |
; <Lrz> 22.01.2007 ¨§¡ ¢¨«áï ®â £«îª®¢ ¯à¨ à ¡®â¥ á ¢ë¤¥«¥¨¥¬ ¨ 㤠«¥¨¥, ª®à४â ï à ¡®â ª« ¢¨è¥© del & backspase |
; <Lrz> 20.01.2007 ॠ«¨§®¢ « ¢ë¤¥«¥¨¥ ⥪áâ ¯® shift |
; <Lrz> 19.01.2007 ॠ«¨§®¢ « ¢ë¤¥«¥¨¥ ⥪áâ ¯® shift |
; <Lrz> 12.12.2006 ॠ«¨§®¢ « ¯®¤¤¥à¦ªã ª®¯ª¨ insert ¨ ᥣ®¤ï ª®¬¯®¥â ¯®çâ¨ à ¡®â ¥â!!!! |
; <Lrz> 07.12.2006 ¯à®¤®«¦ ¥âáï à ¡®â ¤ ¯¥à¥à ¡®âª®© ª®¬¯®¥â ,¨§¬¥¥¨ï¬ ¯®¤¢¥à£«¨áì ¬®£¨¥ äãªæ¨¨, ¯¥à¥à ¡®â ¢ë¢®¤ ⥪áâ , â ª ¦¥ «£®à¨â¬ ¢¥á¥¨ï ᨬ¢®«®¢. |
; <Lrz> 03.09.2006 ¯® ¢®§¬®¦®á⨠®âª § «áï ®â 16 ¡¨â®© à¨ä¬¥â¨ª¨, ¤®¡ ¢¨« ®¢ë¥ ¡ £¨ |
145,12 → 144,12 |
shl ecx,16 |
mov cx,13 |
; sub ecx,1 |
; pop edx ;color |
mov edx,[esp+4] ;color |
; mov edx,ed_color |
mov eax,13 |
int 0x40 |
;popa |
ret |
ret 4 |
|
jmp @f |
.draw_bg: |
299,7 → 298,7 |
shl ebx,16 |
mov bx,ed_width |
dec ebx |
mov edx,ed_color |
push dword ed_color |
call .draw_bg_eax |
mov dword [esp+28],0 |
@@: popad |
357,10 → 356,7 |
cmp ah,'9' |
ja .no_figure |
@@: ; ¯à®¢¥à塞, 室¨âáï «¨ ªãàá®à ¢ ª®æ¥ |
mov ecx,ed_size |
mov edx, ed_max |
cmp ecx,edx |
jae .no_figure |
mov ebx, ed_pos |
cmp ebx,edx |
jl @f ; ¥á«¨ ¬¥ìè¥ ¨«¨ à ¢® |
412,23 → 408,23 |
; 㢥«¨ç¨¢ ¥¬ § 票¥ à §¬¥à ¨ ¯®§¨æ¨¨ |
inc dword ed_size |
|
;push dword ed_pos |
;push dword ed_size |
push dword ed_pos |
push dword ed_size |
; push .return |
call .draw_all2 |
inc dword ed_pos |
;.return: |
jmp .shift;.draw_cursor_text |
jmp .draw_cursor_text |
.delete: |
|
mov edx,ed_size |
mov ecx,ed_pos |
|
cmp edx,ecx |
jg @f |
test word ed_flags,ed_shift_on |
jne .del_bac |
popa |
ret |
.bac_del: |
|
@@: call .del_char |
jmp .draw_all |
|
439,35 → 435,21 |
mov ecx,ed_pos |
test ecx,ecx |
jnz @f |
test word ed_flags,ed_shift_on |
jne .bac_del |
|
;jmp @b |
|
popa |
ret |
.del_bac: |
|
@@: cmp edx,ecx ;if ed_pos=ed_size |
je @f |
dec ecx |
call .del_char |
@@: test word ed_flags,ed_shift_on |
jne .bac_del |
@@: |
dec dword ed_pos |
|
.draw_all: |
push .shift;.draw_cursor_text;eax |
|
test word ed_flags,ed_shift_on |
je @f |
mov eax,ed_shift_pos |
mov ebx,ed_size |
sub ebx,eax |
mov ed_size,ebx |
jmp .draw_all2 |
|
@@: dec dword ed_size |
|
push dword ed_pos |
push dword ed_size |
push .draw_cursor_text;eax |
dec dword ed_size |
.draw_all2: |
call .clear_cursor |
call .check_offset |
475,16 → 457,16 |
push eax |
mov ebx,ed_offset |
add eax,ebx ;eax = w_off= ed_offset+width |
mov ebx,ed_size |
mov ebx,[esp+8] ;ed_size |
|
cmp eax,ebx |
jb @f |
mov eax,ed_pos |
mov eax,[esp+12] ; ed_pos |
sub ebx,eax |
mov ecx,ed_offset |
sub eax,ecx |
jmp .nxt |
@@: mov ebx,ed_pos |
@@: mov ebx,[esp+12];ed_pos |
push ebx |
sub eax,ebx |
mov ebx,eax ;It is don't optimal |
510,13 → 492,18 |
lea ecx,[edx*2+edx] |
shl ecx,1 |
mov bx,cx |
mov edx,ed_color |
push dword ed_color |
call .draw_bg_eax |
ret |
; jmp .shift |
ret 8 |
;--- ¦ â ª« ¢¨è left --- |
.left: call .sh_enable |
mov ebx,ed_pos |
.left: test word ed_flags,ed_shift |
je @f |
test word ed_flags,ed_shift_on |
jne @f |
push dword ed_pos |
pop dword ed_shift_pos |
or word ed_flags,ed_shift_on |
@@: mov ebx,ed_pos |
test ebx,ebx |
jz .nd_k |
call .clear_cursor |
523,15 → 510,26 |
dec dword ed_pos |
jmp .nd_k |
;--- ¦ â ª« ¢¨è right --- |
.right: call .sh_enable |
mov ebx,ed_pos |
.right: |
test word ed_flags,ed_shift |
je @f |
test word ed_flags,ed_shift_on |
jne @f |
push dword ed_pos |
pop dword ed_shift_pos |
or word ed_flags,ed_shift_on |
@@: mov ebx,ed_pos |
cmp ebx,ed_size |
je .nd_k |
call .clear_cursor |
inc dword ed_pos |
jmp .nd_k |
.home: call .sh_enable |
mov ebx,ed_pos |
.home: |
; test word ed_flags,ed_shift |
; je @f |
; push dword ed_pos |
; pop dword ed_shift_pos |
@@: mov ebx,ed_pos |
test ebx,ebx |
jz .nd_k |
call .clear_cursor |
539,8 → 537,12 |
mov ed_pos,eax |
jmp .nd_k |
|
.end: call .sh_enable |
mov ebx,ed_pos |
.end: |
; test word ed_flags,ed_shift |
; je @f |
; push dword ed_pos |
; pop dword ed_shift_pos |
@@: mov ebx,ed_pos |
cmp ebx,dword ed_size |
je @f |
call .clear_cursor |
552,6 → 554,27 |
call .draw_cursor |
|
.shift: ;;;;;;;SHIFT |
;----------- ®â« ¤ª |
pushad |
mov [data_of_code],0 |
mov ax,word ed_flags |
mov edi,data_of_code |
call .str |
;à¨á®¢ ¨¥ ä® |
mov eax,13 |
mov ebx,178*65536+36 |
mov ecx,28*65536+10 |
xor edx,edx |
int 0x40 |
;¢ë¢®¤ § 票ï íªà |
mov eax,4 |
mov ebx,180*65536+30 |
mov ecx,0x10DDBBCC |
mov edx,data_of_code |
mov esi,4 |
int 0x40 |
popad |
;----------- ®â« ¤ª |
|
call .draw_bg |
test word ed_flags,ed_shift |
605,7 → 628,14 |
sub ebx,ecx |
sub ebx,eax |
.nxt_f: |
mov edx,ebx |
; mov ebp,eax ;¯à®¢¥àª ¢ë室 § ªà 訢 ¥¬®© ®¡« á⨠§ ¯à¥¤¥«ë ¤«¨ë |
; add ebp,ebx |
; pop edx |
; cmp ebp,edx |
; je .ff |
; inc ebx |
|
.ff: mov edx,ebx |
lea ebx,[eax*2+eax] |
shl ebx,1 |
add ebx,ed_left |
614,8 → 644,12 |
lea ecx,[edx*2+edx] |
shl ecx,1 |
mov bx,cx |
mov edx,shift_color |
; mov ebp,ed_color |
; not ebp |
push dword shift_color |
call .draw_bg_eax |
; pop edx |
; or word ed_flags,ed_shift |
and word ed_flags,1111111111111011b |
jmp .draw_cursor_text |
;;;;;;;;;;;;;;;;;;;;; |
622,85 → 656,26 |
|
.f_exit: and word ed_flags,ed_shift_cl |
jmp .draw_cursor_text |
|
.sh_enable: |
test word ed_flags,ed_shift |
je @f |
test word ed_flags,ed_shift_on |
jne @f |
push dword ed_pos |
pop dword ed_shift_pos |
or word ed_flags,ed_shift_on |
@@: ret |
|
@@: |
popa |
ret |
;- 㤠«¥¨¥ ᨬ¢®« |
;å®¤ë¥ ¤ ë¥ edx=ed_size;ecx=ed_pos |
.del_char: |
mov esi,ed_text |
|
|
test word ed_flags,ed_shift_on |
je @f |
mov eax,dword ed_shift_pos |
mov ebx,esi |
cmp eax,ecx |
jae .dh_n |
|
mov ed_pos,eax ;çâ® ¡ë ¥ ¡ë«® ã¡¥£ ¨ï ªãàá®à |
mov ebp,ecx |
sub ebp,eax |
add ebx,eax ;eax ¬¥ìè¥ |
sub edx,ecx |
add esi,ecx |
|
|
mov ed_shift_pos,ebp |
jmp .del_ch_sh |
;¥á«¨ ¨ ç¥ |
.dh_n: |
mov ebp,eax |
sub ebp,ecx |
add ebx,ecx |
sub edx,eax |
add esi,eax |
mov ed_shift_pos,ebp |
jmp .del_ch_sh |
|
@@: add esi,ecx ;㪠§ ⥫ì + ᬥ饨¥ ª ॠ«ì®¬ã ¡ãää¥àã |
mov ebx,esi |
inc esi |
cld |
|
sub edx,ecx |
.del_ch_sh: |
;----------- ®â« ¤ª |
pushad |
mov [data_of_code],0 |
mov eax,ed_pos;word ed_flags |
mov edi,data_of_code |
call .str |
;à¨á®¢ ¨¥ ä® |
mov eax,13 |
mov ebx,178*65536+36 |
mov ecx,28*65536+10 |
xor edx,edx |
int 0x40 |
;¢ë¢®¤ § 票ï íªà |
mov eax,4 |
mov ebx,180*65536+30 |
mov ecx,0x10DDBBCC |
mov edx,data_of_code |
mov esi,4 |
int 0x40 |
popad |
;----------- ®â« ¤ª |
|
mov ecx,edx |
push edi |
mov edi,ebx |
@@: |
lodsb |
stosb |
dec edx |
dec ecx |
jns @b |
|
pop edi |