From bdc68077f4d73356e807d2e88df30f29c355451d Mon Sep 17 00:00:00 2001 From: pavelyakov Date: Fri, 24 Aug 2018 23:55:36 +0000 Subject: [PATCH] Added Implementation of the function in the system - EAX = 81 git-svn-id: svn://kolibrios.org@7319 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/core/syscall.inc | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/kernel/trunk/core/syscall.inc b/kernel/trunk/core/syscall.inc index 83f6354018..8c77bcefb6 100644 --- a/kernel/trunk/core/syscall.inc +++ b/kernel/trunk/core/syscall.inc @@ -179,8 +179,52 @@ iglobal dd undefined_syscall ; 78-free dd undefined_syscall ; 79-free dd fileSystemUnicode ; 80-File system interface for different encodings + dd setInt0x40 ; 81-Implementation of the function in the system times 255 - ( ($-servetable2) /4 ) dd undefined_syscall dd sys_end ; -1-end application endg + +; Author Pavel Iakovlev +; Return EAX = 0 security kernel, error set function +; Return Else EAX > 0 success set function +align 4 +setInt0x40: + + ; !!! kernel security !!! + mov eax, dword [servetable2 + ebx * 4] + cmp eax, undefined_syscall + jne errorSet0x40 + ; ----------------------- + + pushad + add edx, 16 + stdcall kernel_alloc, edx + mov dword[tempPointerAlloc], eax + popad + + + push ebx + mov eax, dword[tempPointerAlloc] + mov ebx, eax + add eax, edx + loopCopyMemory: + mov dh, byte[ecx] + mov byte[ebx], dh + inc ebx + inc ecx + cmp ebx, eax + jne loopCopyMemory + + pop ebx + mov eax, dword[tempPointerAlloc] + mov dword [servetable2 + ebx * 4], eax + jmp successSet0x40 + errorSet0x40: + xor eax, eax + successSet0x40: + ret + +tempPointerAlloc dd ? +;------------------- \ No newline at end of file