modernization component

git-svn-id: svn://kolibrios.org@282 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Alexey Teplov ( 2007-01-19 14:36:00 +00:00
parent 15170454cc
commit 983c7036a5
2 changed files with 237 additions and 48 deletions

View File

@ -1,3 +1,4 @@
; <Lrz> 19.01.2007 ॠ«¨§®¢ « ¢ë¤¥«¥­¨¥ ⥪áâ  ¯® shift
; <Lrz> 12.12.2006 ॠ«¨§®¢ « ¯®¤¤¥à¦ªã ª­®¯ª¨ insert ¨ ᥣ®¤ï ª®¬¯®­¥­â ¯®ç⨠ࠡ®â ¥â!!!! ; <Lrz> 12.12.2006 ॠ«¨§®¢ « ¯®¤¤¥à¦ªã ª­®¯ª¨ insert ¨ ᥣ®¤ï ª®¬¯®­¥­â ¯®ç⨠ࠡ®â ¥â!!!!
; <Lrz> 07.12.2006 ¯à®¤®«¦ ¥âáï à ¡®â  ­ ¤ ¯¥à¥à ¡®âª®© ª®¬¯®­¥­â ,¨§¬¥­¥­¨ï¬ ¯®¤¢¥à£«¨áì ¬­®£¨¥ ä㭪樨, ¯¥à¥à ¡®â ­ ¢ë¢®¤ ⥪áâ ,   â ª  ¦¥  «£®à¨â¬ ¢­¥á¥­¨ï ᨬ¢®«®¢. ; <Lrz> 07.12.2006 ¯à®¤®«¦ ¥âáï à ¡®â  ­ ¤ ¯¥à¥à ¡®âª®© ª®¬¯®­¥­â ,¨§¬¥­¥­¨ï¬ ¯®¤¢¥à£«¨áì ¬­®£¨¥ ä㭪樨, ¯¥à¥à ¡®â ­ ¢ë¢®¤ ⥪áâ ,   â ª  ¦¥  «£®à¨â¬ ¢­¥á¥­¨ï ᨬ¢®«®¢.
; <Lrz> 03.09.2006 ¯® ¢®§¬®¦­®á⨠®âª § «áï ®â 16 ¡¨â­®©  à¨ä¬¥â¨ª¨, ¤®¡ ¢¨« ­®¢ë¥ ¡ £¨ ; <Lrz> 03.09.2006 ¯® ¢®§¬®¦­®á⨠®âª § «áï ®â 16 ¡¨â­®©  à¨ä¬¥â¨ª¨, ¤®¡ ¢¨« ­®¢ë¥ ¡ £¨
@ -52,16 +53,18 @@ ed_color equ [edi+12] ;梥
ed_focus_border_color equ [edi+16] ;梥â à ¬ª¨ ª®¬¯®­¥­â  ed_focus_border_color equ [edi+16] ;梥â à ¬ª¨ ª®¬¯®­¥­â 
ed_blur_border_color equ [edi+20] ;梥⠭¥  ªâ¨¢­®£® ª®¬¯®­¥­â  ed_blur_border_color equ [edi+20] ;梥⠭¥  ªâ¨¢­®£® ª®¬¯®­¥­â 
ed_text_color equ [edi+24] ;梥â ⥪áâ  ed_text_color equ [edi+24] ;梥â ⥪áâ 
ed_flags equ [edi+28] ;ä« £¨ ed_max equ [edi+28] ;ª®«-¢® ᨬ¢®«®¢ ª®â®àë¥ ¬®¦­® ¬ ªá¨¬ «ì­® ¢¢¥áâ¨
ed_max equ [edi+32] ;ª®«-¢® ᨬ¢®«®¢ ª®â®àë¥ ¬®¦­® ¬ ªá¨¬ «ì­® ¢¢¥á⨠ed_text equ [edi+32] ;㪠§ â¥«ì ­  ¡ãä¥à
ed_size equ [edi+36] ;ª®«-¢® ᨬ¢®«®¢ ed_flags equ [edi+36] ;ä« £¨
ed_pos equ [edi+40] ;¯®§¨æ¨ï ªãàá®à  ed_size equ [edi+38] ;ª®«-¢® ᨬ¢®«®¢
ed_offset equ [edi+44] ;ᬥ饭¨¥ ed_pos equ [edi+42] ;¯®§¨æ¨ï ªãàá®à 
ed_text equ [edi+48] ;㪠§ â¥«ì ­  ¡ãä¥à ed_offset equ [edi+46] ;ᬥ饭¨¥
cl_curs_x equ [edi+52] ;¯à¥¤ë¤ã饥 ª®®à¤¨­ â  ªãàá®à  ¯® å cl_curs_x equ [edi+50] ;¯à¥¤ë¤ã饥 ª®®à¤¨­ â  ªãàá®à  ¯® å
cl_curs_y equ [edi+56] ;¯à¥¤ë¤ã饥 ª®®à¤¨­ â  ªãàá®à  ¯® ã cl_curs_y equ [edi+54] ;¯à¥¤ë¤ã饥 ª®®à¤¨­ â  ªãàá®à  ¯® ã
ed_insert equ [edi+60] ;word ed_insert equ [edi+58] ;word
ed_shift_pos equ [edi+60]
ed_height=14 ; ¢ëá®â  ed_height=14 ; ¢ëá®â 
shift_color=0x6a9480
;========================================================== ;==========================================================
;=== ¯à®æ¥¤ãà  ¯à®à¨á®¢ª¨ ================================= ;=== ¯à®æ¥¤ãà  ¯à®à¨á®¢ª¨ =================================
;========================================================== ;==========================================================
@ -77,7 +80,7 @@ pusha
.draw_cursor_text: .draw_cursor_text:
;--- à¨á㥬 ªãàá®à --- ;--- à¨á㥬 ªãàá®à ---
;--- ¬®¦¥â ¥£® ­¥ ­ ¤® à¨á®¢ âì ---- ;--- ¬®¦¥â ¥£® ­¥ ­ ¤® à¨á®¢ âì ----
test dword ed_flags,1 test word ed_flags,ed_focus
je @f je @f
call .draw_cursor call .draw_cursor
@@: @@:
@ -85,6 +88,25 @@ pusha
popa popa
ret ret
.str:
mov ecx,0x0a ;§ ¤ ¥âáï á¨á⥬  áç¨á«¥­¨ï ¨§¬¥­ïîâáï ॣ¨áâàë ebx,eax,ecx,edx ¢å®¤­ë¥ ¯ à ¬¥âàë eax - ç¨á«®
;¯à¥à¥¢®¤ ç¨á«  ¢ ASCII áâப㠢§®¤­ë¥ ¤ ­­ë¥ ecx=á¨á⥬  áç¨á«¥­ï edi  ¤à¥á ªã¤  § ¯¨á뢠âì, ¡ã¤¥¬ áâபã, ¯à¨ç¥¬ ª®­¥æ ¯¥à¥¬¥­­®©
cmp eax,ecx ;áà ¢­¨âì ¥á«¨ ¢ eax ¬¥­ìè¥ ç¥¬ ¢ ecx â® ¯¥à¥©â¨ ­  @@-1 â.¥. ­  pop eax
jb @f
xor edx,edx ;®ç¨áâ¨âì edx
div ecx ;à §¤¥«¨âì - ®áâ â®ª ¢ edx
push edx ;¯®«®¦¨âì ¢ á⥪
;dec edi ;ᬥ饭¨¥ ­¥®¡å®¤¨¬®¥ ¤«ï § ¯¨á¨ á ª®­æ  áâப¨
call .str;¯¥à¥©â¨ ­  á ¬ã ᥡï â.¥. ¢ë§¢ âì á ¬ã á¥¡ï ¨ â ª ¤® ⮣® ¬®¬¥­â  ¯®ª  ¢ eax ­¥ áâ ­¥â ¬¥­ìè¥ ç¥¬ ¢ ecx
pop eax
@@: ;cmp al,10 ;¯à®¢¥à¨âì ­¥ ¬¥­ìè¥ «¨ §­ ç¥­¨¥ ¢ al 祬 10 (¤«ï á¨á⥬ë áç¨á«¥­ï 10 ¤ ­­ ï ª®¬ ­¤  - «¨è­ ï))
;sbb al,$69 ;- ç¥áâ­® ¤ ­­ ï ¨­áâàãªæ¨ï ¬¥­ï § áâ ¢«ï¥â § ¤ã¬ âìáï â.¥. ï ­¥ §­ î ª ª íâ® à ¡®â ¥â
;das ;¯®á«¥ ¤ ­­®© ª®¬ ­¤ë ª ª ¡ë ¯à®¨á室¨â 㬥­ì襭¨¥ al ­  66h (¢ ª­¨£¥ ­ ¯¨á ­® ¤à㣮¥)
or al,0x30 ;¤ ­­ ï ª®¬ ­¤  ª®à®ç¥ 祬 ¤¢¥ ¢ëè¥
stosb ;§ ¯¨á âì í«¥¬¥­â ¨§ ॣ¨áâà  al ¢ ï祪㠯 ¬ï⨠es:edi
ret ;¢¥à­ãâìáï ç¥­ì ¨­â¥à¥á­ë© 室 â.ª. ¯®ª  ¢ á⥪¥ åà ­¨âìáï ª®«-¢® ¢ë§®¢®¢ â® á⮫쪮 à § ¬ë ¨ ¡ã¤¥¬ ¢ë§ë¢ âìáï
;---------------------------------------------------------- ;----------------------------------------------------------
;--- ¯à®æ¥¤ãà  ¯à®à¨á®¢ª¨ ⥪áâ  -------------------------- ;--- ¯à®æ¥¤ãà  ¯à®à¨á®¢ª¨ ⥪áâ  --------------------------
;---------------------------------------------------------- ;----------------------------------------------------------
@ -116,22 +138,22 @@ ret
;eax ;eax
;---------------------------------------------------------- ;----------------------------------------------------------
.draw_bg_eax: .draw_bg_eax:
pusha ;pusha
mov ecx,ed_top mov ecx,ed_top
add ecx,1 add ecx,1
shl ecx,16 shl ecx,16
mov cx,13 mov cx,13
; sub ecx,1 ; sub ecx,1
mov edx,[esp+4] ;color
mov edx,ed_color ; mov edx,ed_color
mov eax,13 mov eax,13
int 0x40 int 0x40
popa ;popa
ret ret 4
jmp @f jmp @f
.draw_bg: .draw_bg:
pusha ;pusha
mov ebx,ed_left mov ebx,ed_left
add ebx,1 add ebx,1
shl ebx,16 shl ebx,16
@ -148,7 +170,7 @@ pusha
mov edx,ed_color mov edx,ed_color
mov eax,13 mov eax,13
int 0x40 int 0x40
popa ;popa
ret ret
;---------------------------------------------------------- ;----------------------------------------------------------
@ -167,10 +189,15 @@ ret
;---------------------------------------------------------- ;----------------------------------------------------------
.clear_cursor: .clear_cursor:
mov edx,ed_color mov edx,ed_color
test word ed_flags,ed_shift
je @f
mov edx,shift_color
@@:
mov ebx,cl_curs_x mov ebx,cl_curs_x
mov ecx,cl_curs_y mov ecx,cl_curs_y
jmp .draw_curs jmp .draw_curs
.draw_cursor: .draw_cursor:
mov edx,ed_text_color mov edx,ed_text_color
@@: @@:
mov ebx,ed_pos mov ebx,ed_pos
@ -207,7 +234,7 @@ ret
;---------------------------------------------------------- ;----------------------------------------------------------
.draw_border: .draw_border:
;--- 梥â à ¬ª¨ --- ;--- 梥â à ¬ª¨ ---
test dword ed_flags,1 test dword ed_flags,ed_focus
mov edx,ed_focus_border_color mov edx,ed_focus_border_color
jne @f jne @f
mov edx,ed_blur_border_color mov edx,ed_blur_border_color
@ -271,6 +298,7 @@ ret
shl ebx,16 shl ebx,16
mov bx,ed_width mov bx,ed_width
dec ebx dec ebx
push dword ed_color
call .draw_bg_eax call .draw_bg_eax
mov dword [esp+28],0 mov dword [esp+28],0
@@: popad @@: popad
@ -280,8 +308,20 @@ ret
;========================================================== ;==========================================================
.key: .key:
pusha pusha
test dword ed_flags,1 ; ¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬ test word ed_flags,ed_focus ; ¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬
je .no_figure ;@f je .no_figure ;@f
push eax
mov ecx,1
mov eax,66
mov ebx,3
int 0x40
xor ebx,ebx
test al,0x03
je @f
or word ed_flags,ed_shift
@@: pop eax
;---------------------------------------------------------- ;----------------------------------------------------------
;--- ¯à®¢¥à塞, çâ® ­ ¦ â® -------------------------------- ;--- ¯à®¢¥à塞, çâ® ­ ¦ â® --------------------------------
;---------------------------------------------------------- ;----------------------------------------------------------
@ -324,6 +364,7 @@ pusha
popa popa
ret ret
.insert: not word ed_insert .insert: not word ed_insert
jmp .no_figure jmp .no_figure
.ins_v: .ins_v:
pop eax edi pop eax edi
@ -366,10 +407,16 @@ pusha
; ¢áâ ¢«ï¥¬ ª®¤ ª« ¢¨è¨ â㤠, £¤¥ ªãàá®à ; ¢áâ ¢«ï¥¬ ª®¤ ª« ¢¨è¨ â㤠, £¤¥ ªãàá®à
; 㢥«¨ç¨¢ ¥¬ §­ ç¥­¨¥ à §¬¥à  ¨ ¯®§¨æ¨¨ ; 㢥«¨ç¨¢ ¥¬ §­ ç¥­¨¥ à §¬¥à  ¨ ¯®§¨æ¨¨
inc dword ed_size inc dword ed_size
push dword ed_pos
push dword ed_size
; push .return
call .draw_all2 call .draw_all2
inc dword ed_pos inc dword ed_pos
;.return:
jmp .draw_cursor_text jmp .draw_cursor_text
.delete: .delete:
mov edx,ed_size mov edx,ed_size
mov ecx,ed_pos mov ecx,ed_pos
@ -399,7 +446,8 @@ pusha
dec dword ed_pos dec dword ed_pos
.draw_all: .draw_all:
; mov eax,.draw_cursor_text push dword ed_pos
push dword ed_size
push .draw_cursor_text;eax push .draw_cursor_text;eax
dec dword ed_size dec dword ed_size
.draw_all2: .draw_all2:
@ -409,19 +457,19 @@ pusha
push eax push eax
mov ebx,ed_offset mov ebx,ed_offset
add eax,ebx ;eax = w_off= ed_offset+width add eax,ebx ;eax = w_off= ed_offset+width
mov ebx,ed_size mov ebx,[esp+8] ;ed_size
cmp eax,ebx cmp eax,ebx
jb @f jb @f
mov eax,ed_pos mov eax,[esp+12] ; ed_pos
sub ebx,eax sub ebx,eax
mov ecx,ed_offset mov ecx,ed_offset
sub eax,ecx sub eax,ecx
jmp .nxt jmp .nxt
@@: mov ebx,ed_pos @@: mov ebx,[esp+12];ed_pos
push ebx push ebx
sub eax,ebx sub eax,ebx
mov ebx,eax ;don't optimal mov ebx,eax ;It is don't optimal
pop eax ;ed_pos pop eax ;ed_pos
mov ecx,ed_offset mov ecx,ed_offset
@ -444,11 +492,18 @@ pusha
lea ecx,[edx*2+edx] lea ecx,[edx*2+edx]
shl ecx,1 shl ecx,1
mov bx,cx mov bx,cx
push dword ed_color
call .draw_bg_eax call .draw_bg_eax
ret ret 8
;--- ­ ¦ â  ª« ¢¨è  left --- ;--- ­ ¦ â  ª« ¢¨è  left ---
.left: .left: test word ed_flags,ed_shift
mov ebx,ed_pos 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 test ebx,ebx
jz .nd_k jz .nd_k
call .clear_cursor call .clear_cursor
@ -456,14 +511,25 @@ pusha
jmp .nd_k jmp .nd_k
;--- ­ ¦ â  ª« ¢¨è  right --- ;--- ­ ¦ â  ª« ¢¨è  right ---
.right: .right:
mov ebx,ed_pos 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 cmp ebx,ed_size
je .nd_k je .nd_k
call .clear_cursor call .clear_cursor
inc dword ed_pos inc dword ed_pos
jmp .nd_k jmp .nd_k
.home: .home:
mov ebx,ed_pos ; test word ed_flags,ed_shift
; je @f
; push dword ed_pos
; pop dword ed_shift_pos
@@: mov ebx,ed_pos
test ebx,ebx test ebx,ebx
jz .nd_k jz .nd_k
call .clear_cursor call .clear_cursor
@ -472,16 +538,124 @@ pusha
jmp .nd_k jmp .nd_k
.end: .end:
mov ebx,ed_pos ; 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 cmp ebx,dword ed_size
je @f je @f
call .clear_cursor call .clear_cursor
mov eax,ed_size mov eax,ed_size
mov ed_pos,eax mov ed_pos,eax
.nd_k: call .check_offset .nd_k: call .check_offset
test eax,eax ;test eax,eax
jz .draw_bg_cursor_text ;jz .draw_bg_cursor_text
call .draw_cursor 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
je .f_exit
;;;;;;SHIFT end
mov eax,dword ed_pos
mov ebx,dword ed_shift_pos
cmp eax,ebx
jae .sh_n
push eax ;¬¥­ì襥 ¢ eax
push ebx ;¡®«ì襥
jmp .sh_n1
;¥á«¨ ¨­ ç¥
.sh_n: push ebx
push eax
.sh_n1:
; jmp .draw_all2
;;;;;;;;;;;;;;;;;;;;;;;;;
;call .clear_cursor
call .check_offset
call .get_n
mov edx,eax ;size of ed_box
; push eax
mov ecx,ed_offset
add eax,ecx ;eax = w_off= ed_offset+width
mov ebp,eax ;save
pop ebx ;¡®«ì襥
pop eax ;¬¥­ì襥
cmp eax,ecx ;áà ¢­¥­¨¥ á ¬¥­ì襣® á offset.
jae .f_f ;¥á«¨ ¡®«ìè¥
xor eax,eax
cmp ebp,ebx ;cà ¢­¨¬ à §¬¥à w_off á ¡®«ì訬
jb @f
sub ebx,ecx
jmp .nxt_f
@@: mov ebx,ebp
sub ebx,ecx
jmp .nxt_f
.f_f:
sub eax,ecx
cmp ebp,ebx ;cà ¢­¨¬ à §¬¥à w_off á ¡®«ì訬
jle @f
sub ebx,ecx
sub ebx,eax
jmp .nxt_f
@@:
mov ebx,ebp
sub ebx,ecx
sub ebx,eax
.nxt_f:
; 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
inc ebx
shl ebx,16
lea ecx,[edx*2+edx]
shl ecx,1
mov bx,cx
; 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
;;;;;;;;;;;;;;;;;;;;;
.f_exit: and word ed_flags,ed_shift_cl
jmp .draw_cursor_text
@@: @@:
popa popa
ret ret
@ -522,9 +696,6 @@ pusha
;---------------------------------------------------------- ;----------------------------------------------------------
test eax,1 test eax,1
jnz .mouse_left_button jnz .mouse_left_button
; or eax,1
; jc @f
; btr dword ed_flags,2
@@: popa @@: popa
ret ret
@ -572,10 +743,7 @@ pusha
@@: @@:
mov ed_pos,ax mov ed_pos,ax
call .check_offset call .check_offset
; test eax,eax
; jz .draw_bg_cursor_text
call .draw_cursor call .draw_cursor
call .focus call .focus
.mouse_pressed: .mouse_pressed:
@ -591,13 +759,13 @@ ret
.blur: .blur:
pusha pusha
._blur: ._blur:
btr dword ed_flags,0 btr dword ed_flags,1
jnc @f jnc @f
call .clear_cursor call .clear_cursor
jmp .blur_end jmp .blur_end
.focus: .focus:
pusha pusha
bts dword ed_flags,0 bts dword ed_flags,1
jc @f jc @f
call .draw_cursor call .draw_cursor
.blur_end: .blur_end:
@ -622,6 +790,9 @@ ret
} }
ed_figure_only=1000000000000000b ed_figure_only=1000000000000000b
ed_focus=10b ed_focus=10b
ed_shift_on=1000b
ed_shift=100b
ed_shift_cl=0011b
macro draw_edit_boxes start,end macro draw_edit_boxes start,end
{ {
mov edi,start mov edi,start
@ -651,7 +822,7 @@ macro key_edit_boxes start,end
add edi,ed_struc_size add edi,ed_struc_size
loop @b loop @b
} }
ed_struc_size=62 ed_struc_size=64
struc edit_box width,left,top,color,focus_border_color,\ struc edit_box width,left,top,color,focus_border_color,\
blur_border_color,text_color,max,text,flags,size blur_border_color,text_color,max,text,flags,size
{ {
@ -662,15 +833,16 @@ struc edit_box width,left,top,color,focus_border_color,\
.focus_border_color dd focus_border_color .focus_border_color dd focus_border_color
.blur_border_color dd blur_border_color .blur_border_color dd blur_border_color
.text_color dd text_color .text_color dd text_color
.flags dd flags+0
.max dd max .max dd max
.text dd text
.flags dw flags+0
.size dd size+0 .size dd size+0
.pos dd 0 .pos dd 0
.offset dd 0 .offset dd 0
.text dd text
.cl_curs_x dd 0 .cl_curs_x dd 0
.cl_curs_y dd 0 .cl_curs_y dd 0
.insert dw 0 .insert dw 0
.shift dd 0
} }
macro edit_boxes_set_sys_color start,end,color_table macro edit_boxes_set_sys_color start,end,color_table

View File

@ -12,8 +12,8 @@ use32 ;
dd start ;  ¤à¥á, ­  ª®â®àë© á¨á⥬  ¯¥à¥¤ ñâ ã¯à ¢«¥­¨¥ dd start ;  ¤à¥á, ­  ª®â®àë© á¨á⥬  ¯¥à¥¤ ñâ ã¯à ¢«¥­¨¥
; ¯®á«¥ § £à㧪¨ ¯à¨«®¦¥­¨ï ¢ ¯ ¬ïâì ; ¯®á«¥ § £à㧪¨ ¯à¨«®¦¥­¨ï ¢ ¯ ¬ïâì
dd i_end ; à §¬¥à ¯à¨«®¦¥­¨ï dd i_end ; à §¬¥à ¯à¨«®¦¥­¨ï
dd (i_end+0x100) and not 3 ; Ž¡ê¥¬ ¨á¯®«ì§ã¥¬®© ¯ ¬ïâ¨, ¤«ï á⥪  ®â¢¥¤¥¬ 0å100 ¡ ©â ¨ ¢ë஢­¨¬ ­  £à­¨æã 4 ¡ ©â  dd i_end and not 3 ; Ž¡ê¥¬ ¨á¯®«ì§ã¥¬®© ¯ ¬ïâ¨, ¤«ï á⥪  ®â¢¥¤¥¬ 0å100 ¡ ©â ¨ ¢ë஢­¨¬ ­  £à­¨æã 4 ¡ ©â 
dd (i_end+0x100) and not 3 ; à á¯®«®¦¨¬ ¯®§¨æ¨î á⥪  ¢ ®¡« á⨠¯ ¬ïâ¨, áࠧ㠧  ⥫®¬ ¯à®£à ¬¬ë. ‚¥à設  á⥪  ¢ ¤¨ ¯ §®­¥ ¯ ¬ïâ¨, 㪠§ ­­®¬ ¢ëè¥ dd i_end and not 3 ; à á¯®«®¦¨¬ ¯®§¨æ¨î á⥪  ¢ ®¡« á⨠¯ ¬ïâ¨, áࠧ㠧  ⥫®¬ ¯à®£à ¬¬ë. ‚¥à設  á⥪  ¢ ¤¨ ¯ §®­¥ ¯ ¬ïâ¨, 㪠§ ­­®¬ ¢ëè¥
dd 0x0,0x0 ; 㪠§ â¥«ì ­  áâபã á ¯ à ¬¥âà ¬¨. dd 0x0,0x0 ; 㪠§ â¥«ì ­  áâபã á ¯ à ¬¥âà ¬¨.
; ¥á«¨ ¯®á«¥ § ¯ã᪠ ­¥à ¢­® ­ã«î, ¯à¨«®¦¥­¨¥ ¡ë«® ; ¥á«¨ ¯®á«¥ § ¯ã᪠ ­¥à ¢­® ­ã«î, ¯à¨«®¦¥­¨¥ ¡ë«®
; § ¯ã饭® á ¯ à ¬¥âà ¬¨ ¨§ ª®¬ ­¤­®© áâப¨ ; § ¯ã饭® á ¯ à ¬¥âà ¬¨ ¨§ ª®¬ ­¤­®© áâப¨
@ -28,6 +28,20 @@ start: ;
mov eax,40 ;ãáâ ­®¢¨âì ¬ áªã ¤«ï ®¦¨¤ ¥¬ëå ᮡë⨩ mov eax,40 ;ãáâ ­®¢¨âì ¬ áªã ¤«ï ®¦¨¤ ¥¬ëå ᮡë⨩
mov ebx,0x27 ;á¨á⥬  ¡ã¤¥â ॠ£¨à®¢ âì ⮫쪮 ­  á®®¡é¥­¨¥ ® ¯¥à¥à¨á®¢ª¥,­ ¦ â  ª­®¯ª , ®¯à¥¤¥«ñ­­ ï à ­¥¥, ᮡë⨥ ®â ¬ëè¨ (çâ®-â® á«ã稫®áì - ­ ¦ â¨¥ ­  ª­®¯ªã ¬ëè¨ ¨«¨ ¯¥à¥¬¥é¥­¨¥; á¡à á뢠¥âáï ¯à¨ ¯à®ç⥭¨¨) ¨ ­ ¦ â¨¥ ª« ¢¨è¨ mov ebx,0x27 ;á¨á⥬  ¡ã¤¥â ॠ£¨à®¢ âì ⮫쪮 ­  á®®¡é¥­¨¥ ® ¯¥à¥à¨á®¢ª¥,­ ¦ â  ª­®¯ª , ®¯à¥¤¥«ñ­­ ï à ­¥¥, ᮡë⨥ ®â ¬ëè¨ (çâ®-â® á«ã稫®áì - ­ ¦ â¨¥ ­  ª­®¯ªã ¬ëè¨ ¨«¨ ¯¥à¥¬¥é¥­¨¥; á¡à á뢠¥âáï ¯à¨ ¯à®ç⥭¨¨) ¨ ­ ¦ â¨¥ ª« ¢¨è¨
int 0x40 int 0x40
; mov eax,66 ; keyboard mode definitions
; mov ebx,1 ; set
; xor ecx,ecx
; inc ecx ; return scancodes
; int 0x40
; mov eax,26 ; get setup for keyboard
; inc ebx
; mov ebx,2
; mov ecx,1 ; base keymap
; mov edx,keymap
; int 0x40
red_win: red_win:
call draw_window ;¯¥à¢®­ ç «ì­® ­¥®¡å®¤¨¬® ­ à¨á®¢ âì ®ª­® call draw_window ;¯¥à¢®­ ç «ì­® ­¥®¡å®¤¨¬® ­ à¨á®¢ âì ®ª­®
still: ;®á­®¢­®© ®¡à ¡®â稪 still: ;®á­®¢­®© ®¡à ¡®â稪
@ -75,7 +89,7 @@ draw_window: ;
add eax,4 ;¥á«¨ ¯à¥¤¯®« £ ¥âáï ¨á¯®«ì§®¢ âì ᪠«ïà­ë© ¯à®æ¥áá®à, â® ¬®¦­® ¨á¯®«ì§®¢ âì ¤ ­­î ¨­áâàãªæ¨î add eax,4 ;¥á«¨ ¯à¥¤¯®« £ ¥âáï ¨á¯®«ì§®¢ âì ᪠«ïà­ë© ¯à®æ¥áá®à, â® ¬®¦­® ¨á¯®«ì§®¢ âì ¤ ­­î ¨­áâàãªæ¨î
mov ebx,8*65536+8 ; [ª®®à¤¨­ â  ¯® ®á¨ x]*65536 + [ª®®à¤¨­ â  ¯® ®á¨ y] mov ecx,0x10DDEEFF ; 0xX0RRGGBB, £¤¥ RR, GG, BB § ¤ îâ 梥â ⥪áâ  mov ebx,8*65536+8 ; [ª®®à¤¨­ â  ¯® ®á¨ x]*65536 + [ª®®à¤¨­ â  ¯® ®á¨ y] mov ecx,0x10DDEEFF ; 0xX0RRGGBB, £¤¥ RR, GG, BB § ¤ îâ 梥â ⥪áâ 
mov edx,hed ; 㪠§ â¥«ì ­  ­ ç «® áâப¨ mov edx,hed ; 㪠§ â¥«ì ­  ­ ç «® áâப¨
mov esi,i_end - hed ; ¤«¨­  áâப¨, ¤®«¦­  ¡ëâì ­¥ ¡®«ìè¥ 255 mov esi,i_end1 - hed ; ¤«¨­  áâப¨, ¤®«¦­  ¡ëâì ­¥ ¡®«ìè¥ 255
int 0x40 ;¢ë¢¥á⨠⥪áâ int 0x40 ;¢ë¢¥á⨠⥪áâ
draw_edit_boxes editboxes,editboxes_end ;à¨á®¢ ­¨¥ edit box'®¢ draw_edit_boxes editboxes,editboxes_end ;à¨á®¢ ­¨¥ edit box'®¢
@ -102,5 +116,8 @@ ed_buffer:
;text_b: db 'Š®«-¢® ᨬ¢®«®¢' ;text_b: db 'Š®«-¢® ᨬ¢®«®¢'
;buffer: dd 0 ;buffer: dd 0
buffer_end: buffer_end:
hed db 'EDITBOX optimization and retype <Lrz> date 12.12.2006' hed db 'EDITBOX optimization and retype <Lrz> date 19.01.2007'
i_end: i_end1:
rb 2048
i_end:
keymap: