Small optimization sysfunc.
git-svn-id: svn://kolibrios.org@1290 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
e463f78e27
commit
b92de5cfd2
@ -127,7 +127,7 @@ iglobal
|
||||
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 ; 26
|
||||
dd 0
|
||||
@ -140,7 +140,7 @@ iglobal
|
||||
dd 0
|
||||
dd 0
|
||||
dd 0
|
||||
dd readmousepos ; 37-GetMousePosition_ScreenRelative,.
|
||||
dd 0 ; 37-GetMousePosition_ScreenRelative,.
|
||||
dd 0 ; 38-DrawLine
|
||||
dd sys_getbackground ; 39-GetBackgroundSize,ReadBgrData,.
|
||||
dd 0
|
||||
@ -206,7 +206,7 @@ iglobal
|
||||
dd sys_setup ; 21-SetMidiBase,SetKeymap,SetShiftKeymap,.
|
||||
dd sys_settime ; 22-setting date,time,clock and alarm-clock
|
||||
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 sys_getsetup ; 26-GetMidiBase,GetKeymap,GetShiftKeymap,.
|
||||
dd undefined_syscall ; 27-reserved
|
||||
@ -219,7 +219,7 @@ iglobal
|
||||
dd undefined_syscall ; 34-reserved
|
||||
dd syscall_getpixel ; 35-GetPixel
|
||||
dd syscall_getarea ; 36-GetArea
|
||||
dd cross_order ; 37-GetMousePosition_ScreenRelative,.
|
||||
dd readmousepos ; 37-GetMousePosition_ScreenRelative,.
|
||||
dd syscall_drawline ; 38-DrawLine
|
||||
dd cross_order ; 39-GetBackgroundSize,ReadBgrData,.
|
||||
dd set_app_param ; 40-WantEvents
|
||||
|
@ -1755,14 +1755,14 @@ readmousepos:
|
||||
; eax=6 delete cursor ; reserved
|
||||
; eax=7 get mouse_z
|
||||
|
||||
cmp eax, 7
|
||||
cmp ebx, 7
|
||||
ja msset
|
||||
jmp [mousefn+eax*4]
|
||||
jmp [mousefn+ebx*4]
|
||||
msscreen:
|
||||
mov eax,[MOUSE_X]
|
||||
shl eax,16
|
||||
mov ax,[MOUSE_Y]
|
||||
mov [esp+36],eax
|
||||
mov [esp+36-4],eax
|
||||
ret
|
||||
mswin:
|
||||
mov eax,[MOUSE_X]
|
||||
@ -1780,11 +1780,11 @@ mswin:
|
||||
rol eax,16
|
||||
sub ax,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.left]
|
||||
rol eax,16
|
||||
mov [esp+36],eax
|
||||
mov [esp+36-4],eax
|
||||
ret
|
||||
msbutton:
|
||||
movzx eax,byte [BTN_DOWN]
|
||||
mov [esp+36],eax
|
||||
mov [esp+36-4],eax
|
||||
ret
|
||||
msz:
|
||||
mov edi, [TASK_COUNT]
|
||||
@ -1794,32 +1794,32 @@ msz:
|
||||
mov ax,[MOUSE_SCROLL_H]
|
||||
shl eax,16
|
||||
mov ax,[MOUSE_SCROLL_V]
|
||||
mov [esp+36],eax
|
||||
mov [esp+36-4],eax
|
||||
and [MOUSE_SCROLL_H],word 0
|
||||
and [MOUSE_SCROLL_V],word 0
|
||||
ret
|
||||
@@:
|
||||
and [esp+36],dword 0
|
||||
and [esp+36-4],dword 0
|
||||
; ret
|
||||
msset:
|
||||
ret
|
||||
|
||||
app_load_cursor:
|
||||
; add ebx, new_app_base
|
||||
cmp ebx, OS_BASE
|
||||
cmp ecx, OS_BASE
|
||||
jae msset
|
||||
stdcall load_cursor, ebx, ecx
|
||||
mov [esp+36], eax
|
||||
stdcall load_cursor, ecx, edx
|
||||
mov [esp+36-4], eax
|
||||
ret
|
||||
|
||||
app_set_cursor:
|
||||
stdcall set_cursor, ebx
|
||||
mov [esp+36], eax
|
||||
stdcall set_cursor, ecx
|
||||
mov [esp+36-4], eax
|
||||
ret
|
||||
|
||||
app_delete_cursor:
|
||||
stdcall delete_cursor, ebx
|
||||
mov [esp+36], eax
|
||||
stdcall delete_cursor, ecx
|
||||
mov [esp+36-4], eax
|
||||
ret
|
||||
|
||||
is_input:
|
||||
@ -5167,37 +5167,39 @@ align 4
|
||||
|
||||
syscall_cdaudio: ; CD
|
||||
|
||||
cmp eax, 4
|
||||
cmp ebx, 4
|
||||
jb .audio
|
||||
jz .eject
|
||||
cmp eax, 5
|
||||
cmp ebx, 5
|
||||
jnz .ret
|
||||
.load:
|
||||
call .reserve
|
||||
call LoadMedium
|
||||
call .free
|
||||
ret
|
||||
;call .free
|
||||
jmp .free
|
||||
; ret
|
||||
.eject:
|
||||
call .reserve
|
||||
call clear_CD_cache
|
||||
call allow_medium_removal
|
||||
call EjectMedium
|
||||
call .free
|
||||
ret
|
||||
; call .free
|
||||
jmp .free
|
||||
; ret
|
||||
.audio:
|
||||
call sys_cd_audio
|
||||
mov [esp+36],eax
|
||||
mov [esp+36-4],eax
|
||||
.ret:
|
||||
ret
|
||||
|
||||
.reserve:
|
||||
call reserve_cd
|
||||
mov eax, ebx
|
||||
mov eax, ecx
|
||||
shr eax, 1
|
||||
and eax, 1
|
||||
inc eax
|
||||
mov [ChannelNumber], ax
|
||||
mov eax, ebx
|
||||
mov eax, ecx
|
||||
and eax, 1
|
||||
mov [DiskNumber], al
|
||||
call reserve_cd_channel
|
||||
@ -5210,7 +5212,7 @@ syscall_cdaudio: ; CD
|
||||
mov al, [DRIVE_DATA+1]
|
||||
shr al, cl
|
||||
test al, 2
|
||||
jz .err
|
||||
jz .free;.err
|
||||
ret
|
||||
.free:
|
||||
call free_cd_channel
|
||||
@ -5218,7 +5220,7 @@ syscall_cdaudio: ; CD
|
||||
ret
|
||||
.err:
|
||||
call .free
|
||||
pop eax
|
||||
; pop eax
|
||||
ret
|
||||
|
||||
align 4
|
||||
|
Loading…
Reference in New Issue
Block a user