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:
Alexey Teplov ( 2010-06-15 17:30:28 +00:00
parent 6bea4029b9
commit 229210896d
3 changed files with 67 additions and 48 deletions

View File

@ -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

View File

@ -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

View File

@ -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