diff --git a/kernel/trunk/core/memory.inc b/kernel/trunk/core/memory.inc index 37cd8190d2..78f9a137b1 100644 --- a/kernel/trunk/core/memory.inc +++ b/kernel/trunk/core/memory.inc @@ -949,53 +949,72 @@ endp sys_IPC: ;input: -; eax=1 - set ipc buffer area -; ebx=address of buffer -; ecx=size of buffer +; ebx=1 - set ipc buffer area +; ecx=address of buffer +; edx=size of buffer ; eax=2 - send message ; ebx=PID ; ecx=address of message ; edx=size of message - cmp eax,1 - jne @f - call set_ipc_buff - mov [esp+36], eax - ret + dec ebx + jnz @f + + mov eax,[current_slot] + 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 - jne @f - stdcall sys_ipc_send, ebx, ecx, edx - mov [esp+36], eax - ret + dec ebx + jnz @f + + stdcall sys_ipc_send, ecx, edx, esi + mov [esp+32], eax + ret @@: - xor eax, eax - not eax - mov [esp+36], eax - ret + or eax,-1 + mov [esp+32], eax + ret -align 4 -proc set_ipc_buff +;align 4 +;proc set_ipc_buff - mov eax,[current_slot] - pushf - cli - mov [eax+APPDATA.ipc_start],ebx ;set fields in extended information area - mov [eax+APPDATA.ipc_size],ecx - - add ecx, ebx - add ecx, 4095 - and ecx, not 4095 - -.touch: mov eax, [ebx] - add ebx, 0x1000 - cmp ebx, ecx - jb .touch - - popf - xor eax, eax - ret -endp +; mov eax,[current_slot] +; pushf +; cli +; mov [eax+APPDATA.ipc_start],ebx ;set fields in extended information area +; mov [eax+APPDATA.ipc_size],ecx +; +; add ecx, ebx +; add ecx, 4095 +; and ecx, not 4095 +; +;.touch: mov eax, [ebx] +; add ebx, 0x1000 +; cmp ebx, ecx +; jb .touch +; +; popf +; xor eax, eax +; ret +;endp proc sys_ipc_send stdcall, PID:dword, msg_addr:dword, msg_size:dword locals diff --git a/kernel/trunk/core/syscall.inc b/kernel/trunk/core/syscall.inc index 538593c317..89b5280d0a 100644 --- a/kernel/trunk/core/syscall.inc +++ b/kernel/trunk/core/syscall.inc @@ -157,12 +157,12 @@ iglobal dd 0 dd socket ; 53-Socket interface dd 0 - dd sound_interface ; 55-Sound interface + dd 0 dd 0 dd 0 dd file_system ; 58-Common file system interface dd 0 - dd sys_IPC ; 60-Inter Process Communication + dd 0 dd sys_gs ; 61-Direct graphics access dd sys_pci ; 62-PCI functions dd sys_msg_board ; 63-System message board @@ -228,12 +228,12 @@ iglobal dd stack_driver_stat ; 52-Stack driver status dd cross_order ; 53-Socket interface dd undefined_syscall ; 54-reserved - dd cross_order ; 55-Sound interface + dd sound_interface ; 55-Sound interface dd undefined_syscall ; 56-reserved dd sys_pcibios ; 57-PCI BIOS32 dd cross_order ; 58-Common file system interface 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 ; 62-PCI functions dd cross_order ; 63-System message board diff --git a/kernel/trunk/sound/playnote.inc b/kernel/trunk/sound/playnote.inc index aa3e0f6b16..065bbc809f 100644 --- a/kernel/trunk/sound/playnote.inc +++ b/kernel/trunk/sound/playnote.inc @@ -21,22 +21,22 @@ $Revision$ align 4 sound_interface: - cmp eax, edi ; this is subfunction #55 ? - jne retFunc55 ; if no then return. + cmp eax,ebx ; this is subfunction #55 ? + jne retFunc55 ; if no then return. cmp byte [sound_flag],0 jne retFunc55 movzx eax, byte [countDelayNote] - or al, al ; player is busy ? - jnz retFunc55 ; return counter delay Note + or al, al ; player is busy ? + jnz retFunc55 ; return counter delay Note - mov [memAdrNote],edx + mov [memAdrNote],esi;edx call get_pid mov [pidProcessNote],eax xor eax, eax ; Ok! EAX = 0 retFunc55: - mov [esp+36], eax ; return value EAX for application + mov [esp+32], eax ; return value EAX for application ret iglobal