/kernel/trunk/core/memory.inc |
---|
949,54 → 949,73 |
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 |
@@: |
cmp eax, 2 |
jne @f |
stdcall sys_ipc_send, ebx, ecx, edx |
mov [esp+36], eax |
ret |
@@: |
xor eax, eax |
not eax |
mov [esp+36], eax |
ret |
dec ebx |
jnz @f |
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 |
mov [eax+APPDATA.ipc_start],ecx ;set fields in extended information area |
mov [eax+APPDATA.ipc_size],edx |
add ecx, ebx |
add ecx, 4095 |
and ecx, not 4095 |
add edx, ecx |
add edx, 4095 |
and edx, not 4095 |
.touch: mov eax, [ebx] |
add ebx, 0x1000 |
cmp ebx, ecx |
.touch: mov eax, [ecx] |
add ecx, 0x1000 |
cmp ecx, edx |
jb .touch |
popf |
xor eax, eax |
mov [esp+32], ebx ;ebx=0 |
ret |
endp |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;2 |
@@: |
dec ebx |
jnz @f |
stdcall sys_ipc_send, ecx, edx, esi |
mov [esp+32], eax |
ret |
@@: |
or eax,-1 |
mov [esp+32], eax |
ret |
;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 |
proc sys_ipc_send stdcall, PID:dword, msg_addr:dword, msg_size:dword |
locals |
dst_slot dd ? |
/kernel/trunk/core/syscall.inc |
---|
157,12 → 157,12 |
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 |
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 |
/kernel/trunk/sound/playnote.inc |
---|
21,7 → 21,7 |
align 4 |
sound_interface: |
cmp eax, edi ; this is subfunction #55 ? |
cmp eax,ebx ; this is subfunction #55 ? |
jne retFunc55 ; if no then return. |
cmp byte [sound_flag],0 |
31,12 → 31,12 |
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 |