forked from KolibriOS/kolibrios
55 and 60 system functions have call without shift registers.
git-svn-id: svn://kolibrios.org@1496 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
6bea4029b9
commit
229210896d
@ -949,53 +949,72 @@ endp
|
|||||||
|
|
||||||
sys_IPC:
|
sys_IPC:
|
||||||
;input:
|
;input:
|
||||||
; eax=1 - set ipc buffer area
|
; ebx=1 - set ipc buffer area
|
||||||
; ebx=address of buffer
|
; ecx=address of buffer
|
||||||
; ecx=size of buffer
|
; edx=size of buffer
|
||||||
; eax=2 - send message
|
; eax=2 - send message
|
||||||
; ebx=PID
|
; ebx=PID
|
||||||
; ecx=address of message
|
; ecx=address of message
|
||||||
; edx=size of message
|
; edx=size of message
|
||||||
|
|
||||||
cmp eax,1
|
dec ebx
|
||||||
jne @f
|
jnz @f
|
||||||
call set_ipc_buff
|
|
||||||
mov [esp+36], eax
|
mov eax,[current_slot]
|
||||||
ret
|
pushf
|
||||||
|
cli
|
||||||
|
mov [eax+APPDATA.ipc_start],ecx ;set fields in extended information area
|
||||||
|
mov [eax+APPDATA.ipc_size],edx
|
||||||
|
|
||||||
|
add edx, ecx
|
||||||
|
add edx, 4095
|
||||||
|
and edx, not 4095
|
||||||
|
|
||||||
|
.touch: mov eax, [ecx]
|
||||||
|
add ecx, 0x1000
|
||||||
|
cmp ecx, edx
|
||||||
|
jb .touch
|
||||||
|
|
||||||
|
popf
|
||||||
|
mov [esp+32], ebx ;ebx=0
|
||||||
|
ret
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;2
|
||||||
@@:
|
@@:
|
||||||
cmp eax, 2
|
dec ebx
|
||||||
jne @f
|
jnz @f
|
||||||
stdcall sys_ipc_send, ebx, ecx, edx
|
|
||||||
mov [esp+36], eax
|
stdcall sys_ipc_send, ecx, edx, esi
|
||||||
ret
|
mov [esp+32], eax
|
||||||
|
ret
|
||||||
@@:
|
@@:
|
||||||
xor eax, eax
|
or eax,-1
|
||||||
not eax
|
mov [esp+32], eax
|
||||||
mov [esp+36], eax
|
ret
|
||||||
ret
|
|
||||||
|
|
||||||
align 4
|
;align 4
|
||||||
proc set_ipc_buff
|
;proc set_ipc_buff
|
||||||
|
|
||||||
mov eax,[current_slot]
|
; mov eax,[current_slot]
|
||||||
pushf
|
; pushf
|
||||||
cli
|
; cli
|
||||||
mov [eax+APPDATA.ipc_start],ebx ;set fields in extended information area
|
; mov [eax+APPDATA.ipc_start],ebx ;set fields in extended information area
|
||||||
mov [eax+APPDATA.ipc_size],ecx
|
; mov [eax+APPDATA.ipc_size],ecx
|
||||||
|
;
|
||||||
add ecx, ebx
|
; add ecx, ebx
|
||||||
add ecx, 4095
|
; add ecx, 4095
|
||||||
and ecx, not 4095
|
; and ecx, not 4095
|
||||||
|
;
|
||||||
.touch: mov eax, [ebx]
|
;.touch: mov eax, [ebx]
|
||||||
add ebx, 0x1000
|
; add ebx, 0x1000
|
||||||
cmp ebx, ecx
|
; cmp ebx, ecx
|
||||||
jb .touch
|
; jb .touch
|
||||||
|
;
|
||||||
popf
|
; popf
|
||||||
xor eax, eax
|
; xor eax, eax
|
||||||
ret
|
; ret
|
||||||
endp
|
;endp
|
||||||
|
|
||||||
proc sys_ipc_send stdcall, PID:dword, msg_addr:dword, msg_size:dword
|
proc sys_ipc_send stdcall, PID:dword, msg_addr:dword, msg_size:dword
|
||||||
locals
|
locals
|
||||||
|
@ -157,12 +157,12 @@ iglobal
|
|||||||
dd 0
|
dd 0
|
||||||
dd socket ; 53-Socket interface
|
dd socket ; 53-Socket interface
|
||||||
dd 0
|
dd 0
|
||||||
dd sound_interface ; 55-Sound interface
|
dd 0
|
||||||
dd 0
|
dd 0
|
||||||
dd 0
|
dd 0
|
||||||
dd file_system ; 58-Common file system interface
|
dd file_system ; 58-Common file system interface
|
||||||
dd 0
|
dd 0
|
||||||
dd sys_IPC ; 60-Inter Process Communication
|
dd 0
|
||||||
dd sys_gs ; 61-Direct graphics access
|
dd sys_gs ; 61-Direct graphics access
|
||||||
dd sys_pci ; 62-PCI functions
|
dd sys_pci ; 62-PCI functions
|
||||||
dd sys_msg_board ; 63-System message board
|
dd sys_msg_board ; 63-System message board
|
||||||
@ -228,12 +228,12 @@ iglobal
|
|||||||
dd stack_driver_stat ; 52-Stack driver status
|
dd stack_driver_stat ; 52-Stack driver status
|
||||||
dd cross_order ; 53-Socket interface
|
dd cross_order ; 53-Socket interface
|
||||||
dd undefined_syscall ; 54-reserved
|
dd undefined_syscall ; 54-reserved
|
||||||
dd cross_order ; 55-Sound interface
|
dd sound_interface ; 55-Sound interface
|
||||||
dd undefined_syscall ; 56-reserved
|
dd undefined_syscall ; 56-reserved
|
||||||
dd sys_pcibios ; 57-PCI BIOS32
|
dd sys_pcibios ; 57-PCI BIOS32
|
||||||
dd cross_order ; 58-Common file system interface
|
dd cross_order ; 58-Common file system interface
|
||||||
dd undefined_syscall ; 59-reserved
|
dd undefined_syscall ; 59-reserved
|
||||||
dd cross_order ; 60-Inter Process Communication
|
dd sys_IPC ; 60-Inter Process Communication
|
||||||
dd cross_order ; 61-Direct graphics access
|
dd cross_order ; 61-Direct graphics access
|
||||||
dd cross_order ; 62-PCI functions
|
dd cross_order ; 62-PCI functions
|
||||||
dd cross_order ; 63-System message board
|
dd cross_order ; 63-System message board
|
||||||
|
@ -21,22 +21,22 @@ $Revision$
|
|||||||
align 4
|
align 4
|
||||||
sound_interface:
|
sound_interface:
|
||||||
|
|
||||||
cmp eax, edi ; this is subfunction #55 ?
|
cmp eax,ebx ; this is subfunction #55 ?
|
||||||
jne retFunc55 ; if no then return.
|
jne retFunc55 ; if no then return.
|
||||||
|
|
||||||
cmp byte [sound_flag],0
|
cmp byte [sound_flag],0
|
||||||
jne retFunc55
|
jne retFunc55
|
||||||
|
|
||||||
movzx eax, byte [countDelayNote]
|
movzx eax, byte [countDelayNote]
|
||||||
or al, al ; player is busy ?
|
or al, al ; player is busy ?
|
||||||
jnz retFunc55 ; return counter delay Note
|
jnz retFunc55 ; return counter delay Note
|
||||||
|
|
||||||
mov [memAdrNote],edx
|
mov [memAdrNote],esi;edx
|
||||||
call get_pid
|
call get_pid
|
||||||
mov [pidProcessNote],eax
|
mov [pidProcessNote],eax
|
||||||
xor eax, eax ; Ok! EAX = 0
|
xor eax, eax ; Ok! EAX = 0
|
||||||
retFunc55:
|
retFunc55:
|
||||||
mov [esp+36], eax ; return value EAX for application
|
mov [esp+32], eax ; return value EAX for application
|
||||||
ret
|
ret
|
||||||
|
|
||||||
iglobal
|
iglobal
|
||||||
|
Loading…
Reference in New Issue
Block a user