Small optimization sysfunc.

git-svn-id: svn://kolibrios.org@1290 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Alexey Teplov ( 2009-11-28 05:56:54 +00:00
parent e463f78e27
commit b92de5cfd2
2 changed files with 31 additions and 29 deletions

View File

@ -127,7 +127,7 @@ iglobal
dd 0 dd 0
dd 0 dd 0
dd 0 dd 0
dd syscall_cdaudio ; 24-PlayCdTrack,StopCd and GetCdPlaylist dd 0 ; 24-PlayCdTrack,StopCd and GetCdPlaylist
dd 0 ; 25 dd 0 ; 25
dd 0 ; 26 dd 0 ; 26
dd 0 dd 0
@ -140,7 +140,7 @@ iglobal
dd 0 dd 0
dd 0 dd 0
dd 0 dd 0
dd readmousepos ; 37-GetMousePosition_ScreenRelative,. dd 0 ; 37-GetMousePosition_ScreenRelative,.
dd 0 ; 38-DrawLine dd 0 ; 38-DrawLine
dd sys_getbackground ; 39-GetBackgroundSize,ReadBgrData,. dd sys_getbackground ; 39-GetBackgroundSize,ReadBgrData,.
dd 0 dd 0
@ -206,7 +206,7 @@ iglobal
dd sys_setup ; 21-SetMidiBase,SetKeymap,SetShiftKeymap,. dd sys_setup ; 21-SetMidiBase,SetKeymap,SetShiftKeymap,.
dd sys_settime ; 22-setting date,time,clock and alarm-clock dd sys_settime ; 22-setting date,time,clock and alarm-clock
dd sys_wait_event_timeout ; 23-TimeOutWaitForEvent dd sys_wait_event_timeout ; 23-TimeOutWaitForEvent
dd cross_order ; 24-PlayCdTrack,StopCd and GetCdPlaylist dd syscall_cdaudio ; 24-PlayCdTrack,StopCd and GetCdPlaylist
dd undefined_syscall ; 25-reserved dd undefined_syscall ; 25-reserved
dd sys_getsetup ; 26-GetMidiBase,GetKeymap,GetShiftKeymap,. dd sys_getsetup ; 26-GetMidiBase,GetKeymap,GetShiftKeymap,.
dd undefined_syscall ; 27-reserved dd undefined_syscall ; 27-reserved
@ -219,7 +219,7 @@ iglobal
dd undefined_syscall ; 34-reserved dd undefined_syscall ; 34-reserved
dd syscall_getpixel ; 35-GetPixel dd syscall_getpixel ; 35-GetPixel
dd syscall_getarea ; 36-GetArea dd syscall_getarea ; 36-GetArea
dd cross_order ; 37-GetMousePosition_ScreenRelative,. dd readmousepos ; 37-GetMousePosition_ScreenRelative,.
dd syscall_drawline ; 38-DrawLine dd syscall_drawline ; 38-DrawLine
dd cross_order ; 39-GetBackgroundSize,ReadBgrData,. dd cross_order ; 39-GetBackgroundSize,ReadBgrData,.
dd set_app_param ; 40-WantEvents dd set_app_param ; 40-WantEvents

View File

@ -1755,14 +1755,14 @@ readmousepos:
; eax=6 delete cursor ; reserved ; eax=6 delete cursor ; reserved
; eax=7 get mouse_z ; eax=7 get mouse_z
cmp eax, 7 cmp ebx, 7
ja msset ja msset
jmp [mousefn+eax*4] jmp [mousefn+ebx*4]
msscreen: msscreen:
mov eax,[MOUSE_X] mov eax,[MOUSE_X]
shl eax,16 shl eax,16
mov ax,[MOUSE_Y] mov ax,[MOUSE_Y]
mov [esp+36],eax mov [esp+36-4],eax
ret ret
mswin: mswin:
mov eax,[MOUSE_X] mov eax,[MOUSE_X]
@ -1780,11 +1780,11 @@ mswin:
rol eax,16 rol eax,16
sub ax,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.left] sub ax,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.left]
rol eax,16 rol eax,16
mov [esp+36],eax mov [esp+36-4],eax
ret ret
msbutton: msbutton:
movzx eax,byte [BTN_DOWN] movzx eax,byte [BTN_DOWN]
mov [esp+36],eax mov [esp+36-4],eax
ret ret
msz: msz:
mov edi, [TASK_COUNT] mov edi, [TASK_COUNT]
@ -1794,32 +1794,32 @@ msz:
mov ax,[MOUSE_SCROLL_H] mov ax,[MOUSE_SCROLL_H]
shl eax,16 shl eax,16
mov ax,[MOUSE_SCROLL_V] mov ax,[MOUSE_SCROLL_V]
mov [esp+36],eax mov [esp+36-4],eax
and [MOUSE_SCROLL_H],word 0 and [MOUSE_SCROLL_H],word 0
and [MOUSE_SCROLL_V],word 0 and [MOUSE_SCROLL_V],word 0
ret ret
@@: @@:
and [esp+36],dword 0 and [esp+36-4],dword 0
; ret ; ret
msset: msset:
ret ret
app_load_cursor: app_load_cursor:
; add ebx, new_app_base ; add ebx, new_app_base
cmp ebx, OS_BASE cmp ecx, OS_BASE
jae msset jae msset
stdcall load_cursor, ebx, ecx stdcall load_cursor, ecx, edx
mov [esp+36], eax mov [esp+36-4], eax
ret ret
app_set_cursor: app_set_cursor:
stdcall set_cursor, ebx stdcall set_cursor, ecx
mov [esp+36], eax mov [esp+36-4], eax
ret ret
app_delete_cursor: app_delete_cursor:
stdcall delete_cursor, ebx stdcall delete_cursor, ecx
mov [esp+36], eax mov [esp+36-4], eax
ret ret
is_input: is_input:
@ -5167,37 +5167,39 @@ align 4
syscall_cdaudio: ; CD syscall_cdaudio: ; CD
cmp eax, 4 cmp ebx, 4
jb .audio jb .audio
jz .eject jz .eject
cmp eax, 5 cmp ebx, 5
jnz .ret jnz .ret
.load: .load:
call .reserve call .reserve
call LoadMedium call LoadMedium
call .free ;call .free
ret jmp .free
; ret
.eject: .eject:
call .reserve call .reserve
call clear_CD_cache call clear_CD_cache
call allow_medium_removal call allow_medium_removal
call EjectMedium call EjectMedium
call .free ; call .free
ret jmp .free
; ret
.audio: .audio:
call sys_cd_audio call sys_cd_audio
mov [esp+36],eax mov [esp+36-4],eax
.ret: .ret:
ret ret
.reserve: .reserve:
call reserve_cd call reserve_cd
mov eax, ebx mov eax, ecx
shr eax, 1 shr eax, 1
and eax, 1 and eax, 1
inc eax inc eax
mov [ChannelNumber], ax mov [ChannelNumber], ax
mov eax, ebx mov eax, ecx
and eax, 1 and eax, 1
mov [DiskNumber], al mov [DiskNumber], al
call reserve_cd_channel call reserve_cd_channel
@ -5210,7 +5212,7 @@ syscall_cdaudio: ; CD
mov al, [DRIVE_DATA+1] mov al, [DRIVE_DATA+1]
shr al, cl shr al, cl
test al, 2 test al, 2
jz .err jz .free;.err
ret ret
.free: .free:
call free_cd_channel call free_cd_channel
@ -5218,7 +5220,7 @@ syscall_cdaudio: ; CD
ret ret
.err: .err:
call .free call .free
pop eax ; pop eax
ret ret
align 4 align 4