Rev 350 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 350 | Rev 391 | ||
---|---|---|---|
Line -... | Line 1... | ||
- | 1 | ; |
|
1 | ; |
2 | ; |
2 | ; |
3 | ; |
3 | ; ¤®¡ ¢¨« ä¨âçã ¢¥á¥¨ï 0å0 ¯® ¤à¥áã ed_size ¨ ç¥ ã Maxxx32 ¡ë«¨ ¥á®áâ몮¢ª¨ ¢ ª®¤¥. à¨ç¨ ¢ ⮬, çâ® ®¯â¨¬¨§ æ¨ï ¡ë« ᢥ¤¥ ª ⮬ã, çâ® ï ¥ ç¨á⨫ ᨬ¢®«ë ¢ ¡ãä¥à¥, ª®£¤ 㤠«ï«, ï ¯à®áâ® ¨å ¥ ¢ë¢®¤¨«, ¨ ¯®â®¬, ª®£¤ ¢®á¨«áï ®¢ë© ᨬ¢®«, ® ¯®¯à®áâã § â¨à « 㦥 ¨¬¥î騩áï. ᫨ ¡ë, ¯à®£à ¬¬ ®¡à ¡ âë¢ « ª®¥æ áâப¨ ¯® ed_size, ¯à®¡«¥¬ë ¥ ¢®§¨ª«®. ® ᥩç á íâ®â ¥¤®áâ ⮪ ¨á¯à ¢«¥. |
4 | ; ¤®¡ ¢¨« ä¨âçã ¢¥á¥¨ï 0å0 ¯® ¤à¥áã ed_size ¨ ç¥ ã Maxxx32 ¡ë«¨ ¥á®áâ몮¢ª¨ ¢ ª®¤¥. à¨ç¨ ¢ ⮬, çâ® ®¯â¨¬¨§ æ¨ï ¡ë« ᢥ¤¥ ª ⮬ã, çâ® ï ¥ ç¨á⨫ ᨬ¢®«ë ¢ ¡ãä¥à¥, ª®£¤ 㤠«ï«, ï ¯à®áâ® ¨å ¥ ¢ë¢®¤¨«, ¨ ¯®â®¬, ª®£¤ ¢®á¨«áï ®¢ë© ᨬ¢®«, ® ¯®¯à®áâã § â¨à « 㦥 ¨¬¥î騩áï. ᫨ ¡ë, ¯à®£à ¬¬ ®¡à ¡ âë¢ « ª®¥æ áâப¨ ¯® ed_size, ¯à®¡«¥¬ë ¥ ¢®§¨ª«®. ® ᥩç á íâ®â ¥¤®áâ ⮪ ¨á¯à ¢«¥. |
4 | ; |
5 | ; |
5 | ; |
6 | ; |
Line 67... | Line 68... | ||
67 | ed_pos equ [edi+42] ;¯®§¨æ¨ï ªãàá®à |
68 | ed_pos equ [edi+42] ;¯®§¨æ¨ï ªãàá®à |
68 | ed_offset equ [edi+46] ;ᬥ饨¥ |
69 | ed_offset equ [edi+46] ;ᬥ饨¥ |
69 | cl_curs_x equ [edi+50] ;¯à¥¤ë¤ã饥 ª®®à¤¨ â ªãàá®à ¯® å |
70 | cl_curs_x equ [edi+50] ;¯à¥¤ë¤ã饥 ª®®à¤¨ â ªãàá®à ¯® å |
70 | cl_curs_y equ [edi+54] ;¯à¥¤ë¤ã饥 ª®®à¤¨ â ªãàá®à ¯® ã |
71 | cl_curs_y equ [edi+54] ;¯à¥¤ë¤ã饥 ª®®à¤¨ â ªãàá®à ¯® ã |
71 | ed_shift_pos equ [edi+58] |
72 | ed_shift_pos equ [edi+58] |
72 | ed_height=14 ; ¢ëá®â |
- | |
73 | shift_color=0x6a9480 |
73 | ed_shift_pos_old equ [edi+62] |
74 | ed_insert=100000b |
- | |
75 | ed_insert_cl=1111111111011111b |
- | |
76 | ;========================================================== |
74 | ;========================================================== |
77 | ;=== ¯à®æ¥¤ãà ¯à®à¨á®¢ª¨ ================================= |
75 | ;=== ¯à®æ¥¤ãà ¯à®à¨á®¢ª¨ ================================= |
78 | ;========================================================== |
76 | ;========================================================== |
79 | .draw: |
77 | .draw: |
80 | pusha |
78 | pusha |
Line 144... | Line 142... | ||
144 | ;--- ¯à®æ¥¤ãà ¯à®à¨á®¢ª¨ ä® ---------------------------- |
142 | ;--- ¯à®æ¥¤ãà ¯à®à¨á®¢ª¨ ä® ---------------------------- |
145 | ;¢å®¤ë¥ ¤ ë¥ |
143 | ;¢å®¤ë¥ ¤ ë¥ |
146 | ;eax |
144 | ;eax |
147 | ;edx - color |
145 | ;edx - color |
148 | ;---------------------------------------------------------- |
146 | ;---------------------------------------------------------- |
149 | .draw_bg_eax: |
- | |
150 | mov ecx,ed_top |
- | |
151 | add ecx,1 |
- | |
152 | shl ecx,16 |
- | |
153 | mov cx,13 |
- | |
154 | mov eax,13 |
- | |
155 | int 0x40 |
- | |
156 | ret |
- | |
157 | - | ||
158 | jmp @f |
- | |
159 | ;¢å®¤ ⮫쪮 梥â edx |
147 | ;¢å®¤ ⮫쪮 梥â edx |
160 | .draw_bg: |
148 | .draw_bg: |
161 | mov ebx,ed_left |
149 | mov ebx,ed_left |
162 | add ebx,1 |
150 | add ebx,1 |
163 | shl ebx,16 |
151 | shl ebx,16 |
164 | mov bx,ed_width |
152 | mov bx,ed_width |
165 | sub ebx,1 |
153 | sub ebx,1 |
166 | - | ||
- | 154 | mov edx,ed_color |
|
167 | @@: |
155 | .draw_bg_eax: |
168 | mov ecx,ed_top |
156 | mov ecx,ed_top |
169 | mov eax,13 |
157 | mov eax,13 |
170 | add ecx,1 |
158 | add ecx,1 |
171 | shl ecx,16 |
159 | shl ecx,16 |
172 | mov edx,ed_color |
- | |
173 | mov cx,ed_height |
160 | mov cx,ed_height |
174 | sub ecx,1 |
161 | dec ecx |
175 | int 0x40 |
162 | int 0x40 |
176 | ret |
163 | ret |
Line 177... | Line 164... | ||
177 | 164 | ||
178 | ;---------------------------------------------------------- |
165 | ;---------------------------------------------------------- |
Line 187... | Line 174... | ||
187 | ret |
174 | ret |
Line 188... | Line 175... | ||
188 | 175 | ||
189 | ;---------------------------------------------------------- |
176 | ;---------------------------------------------------------- |
190 | ;--- ¯à®æ¥¤ãà à¨á®¢ ¨ï ªãàá®à -------------------------- |
177 | ;--- ¯à®æ¥¤ãà à¨á®¢ ¨ï ªãàá®à -------------------------- |
- | 178 | ;---------------------------------------------------------- |
|
191 | ;---------------------------------------------------------- |
179 | ;¢å®¤ë¥ ebp- 梥â |
192 | .clear_cursor: |
180 | .clear_cursor: |
193 | mov edx,ed_color |
- | |
194 | test word ed_flags,ed_shift |
- | |
195 | je @f |
- | |
196 | mov edx,shift_color |
- | |
197 | @@: |
181 | mov edx,ebp |
198 | mov ebx,cl_curs_x |
182 | mov ebx,cl_curs_x |
199 | mov ecx,cl_curs_y |
183 | mov ecx,cl_curs_y |
200 | jmp .draw_curs |
184 | jmp .draw_curs |
Line 201... | Line 185... | ||
201 | .draw_cursor: |
185 | .draw_cursor: |
202 | 186 | ||
203 | mov edx,ed_text_color |
187 | mov edx,ed_text_color |
204 | @@: |
188 | ;@@: |
205 | mov ebx,ed_pos |
189 | mov ebx,ed_pos |
Line 206... | Line 190... | ||
206 | mov ecx,ed_offset |
190 | mov ecx,ed_offset |
Line 315... | Line 299... | ||
315 | 299 | ||
316 | .add_end:sub edx,eax |
300 | .add_end:sub edx,eax |
317 | mov ebx,edx |
301 | mov ebx,edx |
318 | jmp .chk_d |
302 | jmp .chk_d |
319 | .add_8: add ebx,edx |
- | |
320 | - | ||
321 | ; ;----------- ®â« ¤ª |
- | |
322 | ; pushad |
- | |
323 | ; mov [data_of_code],0 |
- | |
324 | ; mov eax,ebx;ed_offset |
- | |
325 | ; mov edi,data_of_code |
- | |
326 | ; call .str |
- | |
327 | ; ;à¨á®¢ ¨¥ ä® |
- | |
328 | ; mov eax,13 |
- | |
329 | ; mov ebx,178*65536+36 |
- | |
330 | ; mov ecx,28*65536+10 |
- | |
331 | ; xor edx,edx |
- | |
332 | ; int 0x40 |
- | |
333 | ; ;¢ë¢®¤ § 票ï íªà |
- | |
334 | ; mov eax,4 |
- | |
335 | ; mov ebx,180*65536+30 |
- | |
336 | ; mov ecx,0x10DDBBCC |
- | |
337 | ; mov edx,data_of_code |
- | |
338 | ; mov esi,4 |
- | |
339 | ; int 0x40 |
- | |
340 | ; popad |
- | |
341 | ; ;----------- ®â« ¤ª |
- | |
342 | 303 | .add_8: add ebx,edx |
|
343 | .chk_d: mov ed_offset,ebx |
- | |
344 | 304 | .chk_d: mov ed_offset,ebx |
|
345 | call .draw_bg |
305 | call .draw_bg |
346 | mov dword [esp+28],-1 |
306 | ;mov dword [esp+28],-1 |
347 | popa |
307 | popa |
348 | ret |
- | |
349 | 308 | ret |
|
350 | @@: |
309 | @@: |
351 | mov dword [esp+28],0 |
310 | mov dword [esp+28],0 |
352 | popa |
311 | popa |
353 | ret |
312 | ret |
Line 356... | Line 315... | ||
356 | ;========================================================== |
315 | ;========================================================== |
357 | .key: |
316 | .key: |
358 | pusha |
317 | pusha |
359 | test word ed_flags,ed_focus ; ¥á«¨ ¥ ¢ 䮪ãá¥, ¢ë室¨¬ |
318 | test word ed_flags,ed_focus ; ¥á«¨ ¥ ¢ 䮪ãá¥, ¢ë室¨¬ |
360 | je @b |
319 | je @b |
361 | - | ||
362 | ;஢¥àª ¦ âë shift |
320 | ;஢¥àª ¦ âë shift |
363 | xor ecx,ecx |
321 | xor ecx,ecx |
364 | push eax |
322 | push eax |
365 | inc ecx |
323 | inc ecx |
366 | mov eax,66 |
324 | mov eax,66 |
Line 414... | Line 372... | ||
414 | push eax |
372 | push eax |
415 | mov edx,ed_size |
373 | mov edx,ed_size |
416 | mov ecx,ed_pos |
374 | mov ecx,ed_pos |
417 | pusha |
375 | pusha |
Line 418... | Line 376... | ||
418 | 376 | ||
419 | cmp edx,ecx |
377 | ;cmp edx,ecx |
420 | jne .sh_cl |
378 | ;jne .sh_cl |
- | 379 | ;clear |
|
- | 380 | mov ebp,edx ;ed_size |
|
421 | ;clear |
381 | call .clear_bg |
422 | mov ebp,ed_color |
382 | mov ebp,ed_color |
423 | call .sh_cl_ |
- | |
424 | jmp .sh_nxt |
- | |
425 | .sh_cl: mov ebp,edx ;ed_size |
- | |
Line 426... | Line 383... | ||
426 | call .clear_bg |
383 | call .sh_cl_ |
427 | 384 | ||
Line 428... | Line 385... | ||
428 | .sh_nxt: popa |
385 | .sh_nxt:popa |
429 | call .del_char |
386 | call .del_char |
430 | 387 | ||
431 | ;;;; |
388 | ;;;; |
432 | mov eax,ed_shift_pos |
389 | mov eax,dword ed_shift_pos |
433 | mov ebx,ed_size |
390 | mov ebx,ed_size |
Line 485... | Line 442... | ||
485 | pusha |
442 | pusha |
486 | mov edi,ebp |
443 | mov edi,ebp |
487 | mov ebp,ed_size |
444 | mov ebp,ed_size |
488 | call .clear_bg |
445 | call .clear_bg |
489 | popa |
446 | popa |
490 | - | ||
491 | - | ||
492 | sub ecx,ebx ; ©¤¥¬ ª®«-¢® ᨬ¢®«®¢ ¤«ï ¯¥à¥¤¢¨¦¥¨ï. |
447 | sub ecx,ebx ; ©¤¥¬ ª®«-¢® ᨬ¢®«®¢ ¤«ï ¯¥à¥¤¢¨¦¥¨ï. |
493 | inc edi ;¬¥á⨬ è¨ á¨¬¢®«ë ¢ ¯à ¢® |
448 | inc edi ;¬¥á⨬ è¨ á¨¬¢®«ë ¢ ¯à ¢® |
494 | std |
449 | std |
495 | inc ecx |
450 | inc ecx |
496 | @@: |
451 | @@: |
Line 546... | Line 501... | ||
546 | .draw_all: |
501 | .draw_all: |
547 | push .shift;.draw_cursor_text;eax |
502 | push .shift;.draw_cursor_text;eax |
Line 548... | Line 503... | ||
548 | 503 | ||
549 | test word ed_flags,ed_shift_on |
504 | test word ed_flags,ed_shift_on |
550 | je @f |
505 | je @f |
551 | mov eax,ed_shift_pos |
506 | mov eax,dword ed_shift_pos |
552 | mov ebx,ed_size |
507 | mov ebx,ed_size |
553 | sub ebx,eax |
508 | sub ebx,eax |
Line -... | Line 509... | ||
- | 509 | mov ed_size,ebx |
|
554 | mov ed_size,ebx |
510 | |
555 | 511 | mov ebp,ed_color |
|
556 | call .clear_cursor |
512 | call .clear_cursor |
Line 557... | Line 513... | ||
557 | call .check_offset |
513 | call .check_offset |
Line 558... | Line 514... | ||
558 | call .draw_bg |
514 | call .draw_bg |
Line 559... | Line 515... | ||
559 | 515 | ||
560 | ret |
516 | ret |
- | 517 | ||
561 | 518 | @@: dec dword ed_size |
|
562 | @@: dec dword ed_size |
519 | |
563 | 520 | .draw_all2: |
|
564 | .draw_all2: |
521 | and word ed_flags,ed_shift_cl |
565 | and word ed_flags,ed_shift_cl |
522 | mov ebp,ed_color |
566 | call .clear_cursor |
523 | call .clear_cursor |
567 | call .check_offset |
524 | call .check_offset |
568 | mov ebp,ed_size |
- | |
569 | call .clear_bg |
525 | mov ebp,ed_size |
570 | ret |
526 | call .clear_bg |
571 | ;jmp .shift |
527 | ret |
- | 528 | ;jmp .shift |
|
572 | ;--- ¦ â ª« ¢¨è left --- |
529 | ;--- ¦ â ª« ¢¨è left --- |
573 | .left: call .sh_enable |
530 | .left: mov ebx,ed_pos |
574 | mov ebx,ed_pos |
531 | test ebx,ebx |
- | 532 | jz .sh_st_of |
|
575 | test ebx,ebx |
533 | or word ed_flags,ed_left_fl |
576 | jz .nd_k |
- | |
577 | call .clear_cursor |
534 | call .sh_first_sh |
578 | dec dword ed_pos |
535 | dec dword ed_pos |
579 | jmp .nd_k |
536 | call .sh_enable |
- | 537 | jmp .draw_cursor_text |
|
580 | ;--- ¦ â ª« ¢¨è right --- |
538 | ;--- ¦ â ª« ¢¨è right --- |
581 | .right: call .sh_enable |
539 | .right: mov ebx,ed_pos |
582 | mov ebx,ed_pos |
540 | cmp ebx,ed_size |
583 | cmp ebx,ed_size |
541 | je .sh_st_of |
- | 542 | and word ed_flags,ed_right_fl |
|
584 | je .nd_k |
543 | call .sh_first_sh |
585 | call .clear_cursor |
544 | inc dword ed_pos |
586 | inc dword ed_pos |
545 | call .sh_enable |
587 | jmp .nd_k |
546 | jmp .draw_cursor_text |
588 | .home: call .sh_enable |
547 | .home: |
589 | mov ebx,ed_pos |
548 | mov ebx,ed_pos |
590 | test ebx,ebx |
549 | test ebx,ebx |
591 | jz .nd_k |
- | |
592 | call .clear_cursor |
550 | jz .sh_st_of |
- | 551 | call .sh_first_sh |
|
593 | xor eax,eax |
552 | xor eax,eax |
594 | mov ed_pos,eax |
553 | mov ed_pos,eax |
595 | jmp .nd_k |
554 | call .sh_home_end |
596 | - | ||
597 | .end: call .sh_enable |
555 | jmp .draw_cursor_text |
598 | mov ebx,ed_pos |
556 | .end: |
599 | cmp ebx,dword ed_size |
557 | mov ebx,ed_pos |
600 | je .nd_k |
- | |
601 | call .clear_cursor |
558 | cmp ebx,dword ed_size |
602 | mov eax,ed_size |
- | |
603 | mov ed_pos,eax |
- | |
- | 559 | je .sh_st_of |
|
604 | .nd_k: call .check_offset |
560 | mov eax,ed_size |
605 | ;test eax,eax |
561 | mov ed_pos,eax |
606 | ;jz .draw_bg_cursor_text |
562 | call .sh_home_end |
Line 607... | Line 563... | ||
607 | call .draw_cursor |
563 | jmp .draw_cursor_text |
- | 564 | ;¡à ¡®âª Shift ¤«ï áïâ¨ï ¢ë¤¥«¥¨ï ¥¨§¢¥á⮩ ®¡« á⨠|
|
608 | 565 | .shift: ;;;;;;;SHIFT |
|
609 | .shift: ;;;;;;;SHIFT |
566 | test word ed_flags,ed_shift |
610 | test word ed_flags,ed_shift |
567 | je .f_exit |
611 | je .f_exit |
- | |
- | 568 | ||
612 | 569 | @@: mov ebp,shift_color |
|
613 | mov ebp,shift_color |
570 | or word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« á⨠|
614 | call .sh_cl_ |
571 | call .sh_cl_ |
615 | jmp .draw_cursor_text |
- | |
616 | ;;;;;;;;;;;;;;;;;;;;; |
572 | jmp .draw_cursor_text |
617 | 573 | ;;;;;;;;;;;;;;;;;;;;; |
|
- | 574 | .f_exit:call .check_offset |
|
618 | .f_exit: and word ed_flags,ed_shift_cl |
575 | and word ed_flags,ed_shift_cl |
619 | call .enable_null |
576 | call .enable_null |
620 | jmp .draw_cursor_text |
577 | jmp .draw_cursor_text |
621 | 578 | .sh_cl_: |
|
622 | .sh_cl_: |
579 | ;;;;;;SHIFT end |
623 | ;;;;;;SHIFT end |
580 | ;®¡à ¡®âª ®ç¨á⪨, ¯à¨ «¥¢®¬ - ¯à ¢®¬ ¤¢¨¦¥¨¨ ¢ë¤¥«¥¨ï |
624 | ;¤«ï ®¡à ¡®âª¨ áïâ¨ï ¢ë¤¥«¥¨ï |
581 | ;¤«ï ®¡à ¡®âª¨ áïâ¨ï ¢ë¤¥«¥¨ï |
Line 633... | Line 590... | ||
633 | ;¥á«¨ ¨ ç¥ |
590 | ;¥á«¨ ¨ ç¥ |
634 | .sh_n: push ebx |
591 | .sh_n: push ebx |
635 | push eax |
592 | push eax |
636 | .sh_n1: |
593 | .sh_n1: |
637 | call .check_offset |
594 | call .check_offset |
- | 595 | ; test eax,eax |
|
- | 596 | ; jz .drw_sim |
|
638 | call .get_n |
597 | call .get_n |
639 | mov edx,eax ;size of ed_box |
598 | mov edx,eax ;size of ed_box |
640 | ; push eax |
599 | ; push eax |
641 | mov ecx,ed_offset |
600 | mov ecx,ed_offset |
642 | add eax,ecx ;eax = w_off= ed_offset+width |
601 | add eax,ecx ;eax = w_off= ed_offset+width |
643 | mov edx,eax ;save |
602 | mov edx,eax ;save |
644 | pop ebx ;¡®«ì襥 |
603 | pop ebx ;¡®«ì襥 |
645 | pop eax ;¬¥ì襥 |
604 | pop eax ;¬¥ì襥 |
Line 646... | Line -... | ||
646 | - | ||
647 | 605 | ||
648 | cmp eax,ecx ;áà ¢¥¨¥ á ¬¥ì襣® á offset. |
606 | cmp eax,ecx ;áà ¢¥¨¥ á ¬¥ì襣® á offset. |
649 | jae .f_f ;¥á«¨ ¡®«ìè¥ |
607 | jae .f_f ;¥á«¨ ¡®«ìè¥ |
650 | xor eax,eax |
608 | xor eax,eax |
651 | cmp edx,ebx ;cà ¢¨¬ à §¬¥à w_off á ¡®«ì訬 |
609 | cmp edx,ebx ;cà ¢¨¬ à §¬¥à w_off á ¡®«ì訬 |
Line 675... | Line 633... | ||
675 | inc ebx |
633 | inc ebx |
676 | shl ebx,16 |
634 | shl ebx,16 |
677 | lea ecx,[edx*2+edx] |
635 | lea ecx,[edx*2+edx] |
678 | shl ecx,1 |
636 | shl ecx,1 |
679 | mov bx,cx |
637 | mov bx,cx |
680 | 638 | inc ebx |
|
681 | mov edx,ebp;shift_color |
639 | mov edx,ebp;shift_color |
Line 682... | Line 640... | ||
682 | 640 | ||
683 | call .draw_bg_eax |
641 | call .draw_bg_eax |
684 | and word ed_flags,1111111111111011b |
642 | @@: ;and word ed_flags,1111111111111011b |
- | 643 | call .enable_null |
|
685 | call .enable_null |
644 | ;mov dword ed_shift_pos,0 |
- | 645 | ret |
|
- | 646 | ;;;;;;;;;;;;;;;;;;;;; |
|
- | 647 | ;áâ ®¢ª - áï⨥ ¢ë¤¥«¥¨ï ¢ ®¤¨ ᨬ¢®« |
|
- | 648 | ;;;;;;;;;;;;;;;;;;;;; |
|
- | 649 | .drw_sim: |
|
- | 650 | mov eax,dword ed_pos |
|
- | 651 | call .draw_rectangle ; à¨á®¢ âì ¯àאַ㣮«ì¨ª á § ¤ ë¬ æ¢¥â®¬ |
|
- | 652 | jmp @b |
|
Line -... | Line 653... | ||
- | 653 | ;;;;;;;;;;;;;;;;;;;;; |
|
- | 654 | ||
- | 655 | ;;;;;;;;;; |
|
- | 656 | ;ãªæ¨ï ãáâ ®¢ª¨ ¢ë¤¥«¥¨ï ¯à¨ ¤¢¨¦¥¨ï ¢«¥¢® ¨ ¢¯à ¢® ¨ ¦ ⨨ shift |
|
- | 657 | ;®£¨ª : |
|
- | 658 | ;;;;;;;;;; |
|
- | 659 | .draw_wigwag: |
|
- | 660 | ;äãªæ¨ï ãáâ ®¢ª¨ ¯¥à¥¬¥ëå |
|
Line -... | Line 661... | ||
- | 661 | mov ebp,shift_color |
|
- | 662 | call .clear_cursor |
|
- | 663 | ||
- | 664 | or word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« á⨠|
|
- | 665 | mov ebp,shift_color |
|
- | 666 | mov eax,dword ed_pos |
|
- | 667 | ;mov ebx,dword ed_shift_pos |
|
- | 668 | test word ed_flags,ed_left_fl |
|
- | 669 | jz .low |
|
- | 670 | ; sub eax,2 |
|
- | 671 | ;dec eax |
|
- | 672 | jmp @f |
|
- | 673 | ;;;;;;;;;; |
|
- | 674 | ;ãªæ¨ï 㤠«¥¨ï ¢ë¤¥«¥¨ï ¯à¨ ¤¢¨¦¥¨ï ¢«¥¢® ¨ ¢¯à ¢® ¨ ¦ ⨨ shift |
|
686 | ret |
675 | ;®£¨ª : |
- | 676 | ;;;;;;;;;; |
|
- | 677 | .draw_wigwag_cl: |
|
- | 678 | ;äãªæ¨ï ãáâ ®¢ª¨ ¯¥à¥¬¥ëå |
|
- | 679 | mov ebp,ed_color |
|
- | 680 | call .clear_cursor |
|
- | 681 | ||
- | 682 | mov ebp,ed_color |
|
- | 683 | mov eax,dword ed_pos |
|
- | 684 | ;mov ebx,dword ed_shift_pos |
|
- | 685 | test word ed_flags,ed_left_fl |
|
- | 686 | jz .low |
|
- | 687 | ;dec eax |
|
- | 688 | @@: call .draw_rectangle ; à¨á®¢ âì ¯àאַ㣮«ì¨ª § ªà 訢 ¥¬®© ®¡« á⨠|
|
- | 689 | ret |
|
687 | 690 | .low: dec eax |
|
688 | 691 | jmp @b |
|
689 | ;¯à®¢¥àª á®áâ®ï¨ï shift ¡ë« «¨ ® ¦ â à ìè¥? |
692 | ;¢å®¤®© ¯ à ¬¥âà ebx - ed_pos |
- | 693 | .sh_first_sh: |
|
690 | .sh_enable: |
694 | test word ed_flags,ed_shift |
691 | test word ed_flags,ed_shift |
695 | je @f |
692 | je @f |
- | |
693 | test word ed_flags,ed_shift_on |
696 | mov dword ed_shift_pos_old,ebx |
694 | jne .sh_ext_en |
697 | test word ed_flags,ed_shift_on |
- | 698 | jne @f |
|
- | 699 | mov dword ed_shift_pos,ebx |
|
- | 700 | or word ed_flags,ed_shift_on |
|
- | 701 | @@: ret |
|
- | 702 | ||
- | 703 | ;¡à ¡®âª ªà ©¨å ¯®«®¦¥¨© ¢ editbox ¯à¨ ¦ ⮬ shift |
|
- | 704 | ;¯à®¨§¢®¤¨â áï⨥ ¢ë¤¥«¥¨¥, ¥á«¨ ¥â shift |
|
- | 705 | ;¨ ç¥ ¢®®¡é¥ ¢ë室¨â |
|
- | 706 | .sh_st_of: |
|
- | 707 | test word ed_flags,ed_shift |
|
- | 708 | jne @f |
|
- | 709 | test word ed_flags,ed_shift_bac |
|
- | 710 | je @f |
|
- | 711 | mov ebp,ed_color |
|
- | 712 | call .sh_cl_ ;®ç¨á⪠¢ë¤¥«¥®£® äà £¬¥â |
|
- | 713 | call .draw_wigwag_cl |
|
- | 714 | and word ed_flags,ed_shift_cl ; ®ç¨á⪠®â ⮣® çâ® ã¡à «¨ ¢ë¤¥«¥¨¥ |
|
- | 715 | jmp .draw_cursor_text |
|
- | 716 | @@: |
|
- | 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 |
|
695 | push dword ed_pos |
737 | ;----------- ®â« ¤ª |
Line -... | Line 738... | ||
- | 738 | and word ed_flags,ed_shift_off |
|
- | 739 | popa |
|
- | 740 | ret |
|
- | 741 | ||
- | 742 | ;¯à®¢¥àª á®áâ®ï¨ï shift ¡ë« «¨ ® ¦ â à ìè¥? |
|
696 | pop dword ed_shift_pos |
743 | .sh_enable: |
697 | or word ed_flags,ed_shift_on |
744 | test word ed_flags,ed_shift |
- | 745 | jne .sh_ext_en ; à¨á®¢ âì § ªà è¥ë© ¯àאַ㣮«ì¨ª |
|
- | 746 | ||
698 | ret |
747 | test word ed_flags,ed_shift_bac |
699 | 748 | je @f |
|
- | 749 | call .check_offset |
|
700 | @@: test word ed_flags,ed_shift_bac |
750 | |
701 | je @f |
751 | mov ebp,ed_color |
- | 752 | call .sh_cl_ ;®ç¨á⪠¢ë¤¥«¥®£® äà £¬¥â |
|
- | 753 | call .draw_wigwag_cl |
|
- | 754 | and word ed_flags,ed_shift_cl ; 1¢ à ¥ 㦮 |
|
- | 755 | ret |
|
- | 756 | ||
702 | mov ebp,ed_color |
757 | @@: mov ebp,ed_color |
- | 758 | call .clear_cursor |
|
- | 759 | call .check_offset |
|
- | 760 | ret |
|
- | 761 | .sh_ext_en: |
|
- | 762 | call .check_offset |
|
- | 763 | test eax,eax |
|
- | 764 | jnz @f |
|
- | 765 | ;¨á®¢ ¨¥ § ªà è¥ëå ¯àאַ㣮«ì¨ª®¢ ¨ ®ç¨á⪠¨å |
|
- | 766 | mov eax,dword ed_shift_pos |
|
- | 767 | mov ebx,dword ed_pos |
|
- | 768 | mov ecx,dword ed_shift_pos_old |
|
- | 769 | ;¯à®¢¥àª ¨ à¨á®¢ ¨¥ § ªà è¥ëå ®¡« á⥩ |
|
- | 770 | cmp eax,ecx |
|
- | 771 | je .1_shem |
|
- | 772 | jb .smaller |
|
- | 773 | cmp ecx,ebx |
|
- | 774 | ja .1_shem |
|
- | 775 | call .draw_wigwag_cl ;clear |
|
- | 776 | jmp .sh_e_end |
|
- | 777 | .smaller: |
|
- | 778 | cmp ecx,ebx |
|
- | 779 | jb .1_shem |
|
- | 780 | call .draw_wigwag_cl ;clear |
|
703 | call .sh_cl_ ;®ç¨á⪠¢ë¤¥«¥®£® äà £¬¥â |
781 | jmp .sh_e_end |
- | 782 | ;alike = |
|
- | 783 | .1_shem: call .draw_wigwag |
|
- | 784 | .sh_e_end: and word ed_flags,ed_shift_off |
|
- | 785 | ret |
|
- | 786 | @@: mov ebp,shift_color |
|
- | 787 | call .sh_cl_ |
|
- | 788 | jmp .sh_e_end |
|
- | 789 | ;äãªæ¨ï ¤«ï ®¡à ¡®âª¨ shift ¯à¨ ¦ ⨨ home and end |
|
- | 790 | .sh_home_end: |
|
- | 791 | mov ebp,ed_color |
|
- | 792 | call .clear_cursor |
|
- | 793 | test word ed_flags,ed_shift_bac |
|
- | 794 | je @f |
|
- | 795 | mov ebp,ed_color |
|
- | 796 | call .sh_cl_ |
|
- | 797 | ||
- | 798 | @@: test word ed_flags,ed_shift |
|
- | 799 | je .sh_exit_ ; à¨á®¢ âì § ªà è¥ë© ¯àאַ㣮«ì¨ª (®¡« áâì) |
|
- | 800 | call .check_offset |
|
- | 801 | mov ebp,shift_color |
|
- | 802 | call .sh_cl_ |
|
- | 803 | or word ed_flags,ed_shift_bac ;ãáâ ®¢ª ä« £ , ¢ë¤¥«¥®© ®¡« á⨠|
|
- | 804 | 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 | ||
704 | @@: and word ed_flags,ed_shift_cl |
815 | |
705 | ; ret |
816 | |
706 | .sh_ext_en: |
817 | |
707 | ret |
818 | |
708 | ;äãªæ¨ï ¢¥á¥¨ï 0 ¯® ¤à¥áã ed_size+1 |
819 | ;äãªæ¨ï ¢¥á¥¨ï 0 ¯® ¤à¥áã ed_size+1 |
Line 733... | Line 844... | ||
733 | sub ebp,eax |
844 | sub ebp,eax |
734 | add ebx,eax ;eax ¬¥ìè¥ |
845 | add ebx,eax ;eax ¬¥ìè¥ |
735 | sub edx,ecx |
846 | sub edx,ecx |
736 | add esi,ecx |
847 | add esi,ecx |
Line 737... | Line -... | ||
737 | - | ||
738 | 848 | ||
739 | mov ed_shift_pos,ebp |
849 | mov dword ed_shift_pos,ebp |
740 | jmp .del_ch_sh |
850 | jmp .del_ch_sh |
741 | ;¥á«¨ ¨ ç¥ |
851 | ;¥á«¨ ¨ ç¥ |
742 | .dh_n: |
852 | .dh_n: |
743 | mov ebp,eax |
853 | mov ebp,eax |
744 | sub ebp,ecx |
854 | sub ebp,ecx |
745 | add ebx,ecx |
855 | add ebx,ecx |
746 | sub edx,eax |
856 | sub edx,eax |
747 | add esi,eax |
857 | add esi,eax |
748 | mov ed_shift_pos,ebp |
858 | mov dword ed_shift_pos,ebp |
Line 749... | Line 859... | ||
749 | jmp .del_ch_sh |
859 | jmp .del_ch_sh |
750 | 860 | ||
751 | @@: add esi,ecx ;㪠§ ⥫ì + ᬥ饨¥ ª ॠ«ì®¬ã ¡ãää¥àã |
861 | @@: add esi,ecx ;㪠§ ⥫ì + ᬥ饨¥ ª ॠ«ì®¬ã ¡ãää¥àã |
Line 810... | Line 920... | ||
810 | shl ecx,1 |
920 | shl ecx,1 |
811 | mov bx,cx |
921 | mov bx,cx |
812 | mov edx,ed_color |
922 | mov edx,ed_color |
813 | call .draw_bg_eax |
923 | call .draw_bg_eax |
814 | ret |
924 | ret |
- | 925 | ;;;;;;;;;;;;;;;;;;; |
|
- | 926 | ;;; ¡à ¡®âª ¯à¨¬¨â¨¢®¢ |
|
- | 927 | ;;;;;;;;;;;;;;;;;;;; |
|
- | 928 | ; à¨á®¢ âì ¯àאַ㣮«ì¨ª, 梥⠯¥à¥¤ ¥âáï ¢ ebp |
|
- | 929 | ;¢å®¤ë¥ ¯ à ¬¥âàë: |
|
- | 930 | ;eax=dword ed_pos |
|
- | 931 | ;ebp=-梥â ed_color or shift_color |
|
- | 932 | .draw_rectangle: |
|
- | 933 | ; mov eax,dword ed_pos |
|
- | 934 | mov ecx,dword ed_offset |
|
- | 935 | sub eax,ecx |
|
- | 936 | lea ebx,[eax*2+eax] |
|
- | 937 | shl ebx,1 |
|
815 | 938 | inc ebx |
|
- | 939 | add ebx,ed_left |
|
- | 940 | shl ebx,16 |
|
- | 941 | mov bx,6 |
|
- | 942 | mov edx,ebp |
|
- | 943 | call .draw_bg_eax |
|
816 | 944 | ret |
|
817 | ;========================================================== |
945 | ;========================================================== |
818 | ;=== ®¡à ¡®âª ¬ëè¨ ======================================= |
946 | ;=== ®¡à ¡®âª ¬ëè¨ ======================================= |
819 | ;========================================================== |
947 | ;========================================================== |
820 | .mouse: |
948 | .mouse: |
821 | pusha |
949 | pusha |
Line 861... | Line 989... | ||
861 | add bx,ed_width |
989 | add bx,ed_width |
862 | cmp ax,bx |
990 | cmp ax,bx |
863 | jg ._blur;.mouse_end_no_focus |
991 | jg ._blur;.mouse_end_no_focus |
864 | ;--- ¨§¬¥ï¥¬ ¯®§¨æ¨î ªãàá®à --- |
992 | ;--- ¨§¬¥ï¥¬ ¯®§¨æ¨î ªãàá®à --- |
865 | push eax |
993 | push eax |
- | 994 | mov ebp,ed_color |
|
866 | call .clear_cursor |
995 | call .clear_cursor |
867 | pop eax |
996 | pop eax |
868 | xor dx,dx |
997 | xor dx,dx |
869 | sub ax,ed_left |
998 | sub ax,ed_left |
870 | add ax,2 |
999 | add ax,2 |
Line 890... | Line 1019... | ||
890 | ._blur: |
1019 | ._blur: |
891 | test word ed_flags,ed_always_focus |
1020 | test word ed_flags,ed_always_focus |
892 | jne @f |
1021 | jne @f |
893 | btr word ed_flags,1 ; ¥á«¨ ¥ ¢ 䮪ãá¥, ¢ë室¨¬ |
1022 | btr word ed_flags,1 ; ¥á«¨ ¥ ¢ 䮪ãá¥, ¢ë室¨¬ |
894 | jnc @f |
1023 | jnc @f |
- | 1024 | mov ebp,ed_color |
|
895 | call .clear_cursor |
1025 | call .clear_cursor |
896 | .drc: call .draw_border |
1026 | .drc: call .draw_border |
897 | @@: |
1027 | @@: |
898 | popa |
1028 | popa |
899 | ret |
1029 | ret |
Line 913... | Line 1043... | ||
913 | ;ret |
1043 | ;ret |
914 | } |
1044 | } |
915 | ed_figure_only=1000000000000000b |
1045 | ed_figure_only= 1000000000000000b |
916 | ed_always_focus=100000000000000b |
1046 | ed_always_focus= 100000000000000b |
917 | ed_focus=10b |
1047 | ed_focus=10b |
- | 1048 | ed_shift_on= 1000b ;¥á«¨ ¥ ãáâ ®¢«¥ -§ ç¨â ¢¯¥à¢ë¥ ¦ â shift,¥á«¨ ¡ë« ãáâ ®¢«¥, § ç¨â ¬ë 㦥 çâ® - â® ¤¥« «¨ 㤥ন¢ ï shift |
|
918 | ed_shift_on=1000b |
1049 | ed_shift= 100b ;¢ª«îç ¥âáï ¯à¨ ¦ ⨨ shift â.¥. ¥á«¨ ¦¨¬ î |
919 | ed_shift=100b |
- | |
920 | ed_shift_bac=10000b |
1050 | ed_shift_off= 1111111111111011b |
- | 1051 | ed_shift_bac= 10000b ;¡¨â ¤«ï ®ç¨á⪨ ¢ë¤¥«¥®£® shift â.¥. ¯à¨ ãáâ ®¢ª¥ £®¢®à¨â çâ® ¥áâì ¢ë¤¥«¥¨¥ |
|
921 | ed_shift_cl=1111111111100011b |
1052 | ed_shift_cl= 1111111111100011b |
- | 1053 | ed_left_fl= 100000b |
|
- | 1054 | ed_right_fl= 1111111111011111b |
|
- | 1055 | ed_insert= 10000000b |
|
- | 1056 | ed_insert_cl= 1111111101111111b |
|
- | 1057 | ed_height=14 ; ¢ëá®â |
|
- | 1058 | shift_color=0x6a9480 |
|
922 | macro draw_edit_boxes start,end |
1059 | macro draw_edit_boxes start,end |
923 | { |
1060 | { |
924 | mov edi,start |
1061 | mov edi,start |
925 | mov ecx,((end-start)/ed_struc_size) |
1062 | mov ecx,((end-start)/ed_struc_size) |
926 | @@: |
1063 | @@: |
Line 946... | Line 1083... | ||
946 | @@: |
1083 | @@: |
947 | call edit_box.key |
1084 | call edit_box.key |
948 | add edi,ed_struc_size |
1085 | add edi,ed_struc_size |
949 | loop @b |
1086 | loop @b |
950 | } |
1087 | } |
951 | ed_struc_size=62 |
1088 | ed_struc_size=66 |
952 | struc edit_box width,left,top,color,focus_border_color,\ |
1089 | struc edit_box width,left,top,color,focus_border_color,\ |
953 | blur_border_color,text_color,max,text,flags,size |
1090 | blur_border_color,text_color,max,text,flags,size |
954 | { |
1091 | { |
955 | .width dd width |
1092 | .width dd width |
956 | .left dd left |
1093 | .left dd left |
Line 966... | Line 1103... | ||
966 | .pos dd 0 |
1103 | .pos dd 0 |
967 | .offset dd 0 |
1104 | .offset dd 0 |
968 | .cl_curs_x dd 0 |
1105 | .cl_curs_x dd 0 |
969 | .cl_curs_y dd 0 |
1106 | .cl_curs_y dd 0 |
970 | .shift dd 0 |
1107 | .shift dd 0 |
- | 1108 | .shift_old dd 0 |
|
971 | } |
1109 | } |
Line 972... | Line 1110... | ||
972 | 1110 | ||
973 | macro edit_boxes_set_sys_color start,end,color_table |
1111 | macro edit_boxes_set_sys_color start,end,color_table |
974 | { |
1112 | { |