diff --git a/kernel/branches/Kolibri-F/blkdev/disk.inc b/kernel/branches/Kolibri-F/blkdev/disk.inc index 03bccc899b..f2a0a4ccd4 100644 --- a/kernel/branches/Kolibri-F/blkdev/disk.inc +++ b/kernel/branches/Kolibri-F/blkdev/disk.inc @@ -1291,15 +1291,15 @@ default_fs_functions: dd 0 ; no user functions endg -; This function is called from file_system_lfn. +; This function is called from syscall_file_system_lfn. ; This handler gets the control each time when fn 70 is called ; with unknown item of root subdirectory. ; in: esi = ebp -> path string -; out: if the handler processes path, it must not return in file_system_lfn, +; out: if the handler processes path, it must not return in syscall_file_system_lfn, ; but instead pop return address and return directly to the caller ; otherwise simply return dyndisk_handler: - push ebx edi ; save registers used in file_system_lfn + push ebx edi ; save registers used in syscall_file_system_lfn ; 1. Acquire the mutex. mov ecx, disk_list_mutex call mutex_lock @@ -1340,7 +1340,7 @@ dyndisk_handler: ; 3. Release the mutex. call mutex_unlock ; 4. Return normally. - pop edi ebx ; restore registers used in file_system_lfn + pop edi ebx ; restore registers used in syscall_file_system_lfn ret ; part of 2d: the name matches partially, but we must check that this is full ; equality. @@ -1383,7 +1383,7 @@ dyndisk_handler: jz @f mov esi, fs_dyndisk_next @@: ; Let the procedure from fs_lfn.inc do the job. - jmp file_system_lfn.maindir_noesi + jmp syscall_file_system_lfn.maindir_noesi .root: pop ecx edx @@ -1547,7 +1547,7 @@ dyndisk_handler: jmp @b ; This is a callback for enumerating partitions called from -; file_system_lfn.maindir in the case of inserted media. +; syscall_file_system_lfn.maindir in the case of inserted media. ; It just increments eax until DISK.NumPartitions reached and then ; cleans up. fs_dyndisk_next: @@ -1567,7 +1567,7 @@ fs_dyndisk_next: ret ; This is a callback for enumerating partitions called from -; file_system_lfn.maindir in the case of missing media. +; syscall_file_system_lfn.maindir in the case of missing media. ; In this case we create one pseudo-partition. fs_dyndisk_next_nomedia: cmp eax, 1 @@ -1584,7 +1584,7 @@ fs_dyndisk_next_nomedia: stc ret -; This function is called from file_system_lfn. +; This function is called from syscall_file_system_lfn. ; This handler is called when virtual root is enumerated ; and must return all items which can be handled by this. ; It is called several times, first time with eax=0 @@ -1592,7 +1592,7 @@ fs_dyndisk_next_nomedia: ; out: eax = 0 => no more items ; eax != 0 => buffer pointed to by edi contains name of item dyndisk_enum_root: - push edx ; save register used in file_system_lfn + push edx ; save register used in syscall_file_system_lfn mov ecx, disk_list_mutex ; it will be useful ; 1. If this is the first call, acquire the mutex and initialize. test eax, eax @@ -1615,11 +1615,11 @@ dyndisk_enum_root: jnz @b pop esi eax ; 5. Return with eax = item. - pop edx ; restore register used in file_system_lfn + pop edx ; restore register used in syscall_file_system_lfn ret .last: ; 6. Release the mutex and return with eax = 0. call mutex_unlock xor eax, eax - pop edx ; restore register used in file_system_lfn + pop edx ; restore register used in syscall_file_system_lfn ret diff --git a/kernel/branches/Kolibri-F/blkdev/rdsave.inc b/kernel/branches/Kolibri-F/blkdev/rdsave.inc index 722aa49efb..b7a722b283 100644 --- a/kernel/branches/Kolibri-F/blkdev/rdsave.inc +++ b/kernel/branches/Kolibri-F/blkdev/rdsave.inc @@ -27,7 +27,7 @@ sysfn_saveramdisk: ; 18.6 = SAVE FLOPPY IMAGE (HD version only) shl eax, 9 mov [ebx+12], eax pushad - call file_system_lfn_protected ;in ebx + call syscall_file_system_lfn_protected ;in ebx popad mov [esp+32], eax ret diff --git a/kernel/branches/Kolibri-F/boot/rdload.inc b/kernel/branches/Kolibri-F/boot/rdload.inc index fd3650efbb..bad0ba7158 100644 --- a/kernel/branches/Kolibri-F/boot/rdload.inc +++ b/kernel/branches/Kolibri-F/boot/rdload.inc @@ -97,7 +97,7 @@ endg read_image: mov ebx, read_image_fsinfo pushad - call file_system_lfn_protected + call syscall_file_system_lfn_protected popad ret diff --git a/kernel/branches/Kolibri-F/boot/shutdown.inc b/kernel/branches/Kolibri-F/boot/shutdown.inc index ff5388db14..bd7f46dfe8 100644 --- a/kernel/branches/Kolibri-F/boot/shutdown.inc +++ b/kernel/branches/Kolibri-F/boot/shutdown.inc @@ -69,7 +69,7 @@ yes_shutdown_param: ; load kernel.mnt to _CLEAN_ZONE mov ebx, kernel_file_load pushad - call file_system_lfn + call syscall_file_system_lfn popad @@: mov esi, OS_BASE+restart_code_start ; move kernel re-starter to 0x5000:0 diff --git a/kernel/branches/Kolibri-F/build.sh b/kernel/branches/Kolibri-F/build.sh index bdd23245b1..2cf03e6637 100755 --- a/kernel/branches/Kolibri-F/build.sh +++ b/kernel/branches/Kolibri-F/build.sh @@ -2,21 +2,11 @@ # Compile the KolibriOS kernel on Linux # 2017, The KolibriOS team -KERPACK=$HOME/kolibrios/programs/other/kpack/kerpack_linux/kerpack -KOLIBRI_IMG=$HOME/nightly/kolibri.img +KERPACK=./tools/kerpack +KOLIBRI_IMG=kolibri.img -replace=0; # Replace kernel in the image file? echo 'lang fix en' > lang.inc fasm -m 65536 bootbios.asm bootbios.bin -fasm -m 65536 kernel.asm kernel.mnt +fasm -m 65536 -s kernel.fas kernel.asm kernel.mnt $KERPACK kernel.mnt kernel.mnt - -[[ $replace -eq 1 ]] && { - mntpt=$(mktemp -d) - - sudo mount -o loop $KOLIBRI_IMG $mntpt - sudo mount -o remount,rw $mntpt - sudo cp kernel.mnt ${mntpt}/KERNEL.MNT - sudo umount $mntpt - rmdir $mntpt -} +mcopy -D o -i $KOLIBRI_IMG kernel.mnt ::kernel.mnt \ No newline at end of file diff --git a/kernel/branches/Kolibri-F/bus/pci/pci32.inc b/kernel/branches/Kolibri-F/bus/pci/pci32.inc index 132cc92b20..a20929ebba 100644 --- a/kernel/branches/Kolibri-F/bus/pci/pci32.inc +++ b/kernel/branches/Kolibri-F/bus/pci/pci32.inc @@ -56,7 +56,7 @@ endg align 4 -pci_api: +syscall_pci_api: ;cross mov eax, ebx @@ -499,7 +499,7 @@ pci_emu_dat: endg ;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= align 4 -sys_pcibios: +syscall_pcibios: cmp [pci_access_enabled], 1 jne .unsupported_func cmp [pci_bios_entry], 0 diff --git a/kernel/branches/Kolibri-F/bus/usb/init.inc b/kernel/branches/Kolibri-F/bus/usb/init.inc index fa438437a1..b1ddf80126 100644 --- a/kernel/branches/Kolibri-F/bus/usb/init.inc +++ b/kernel/branches/Kolibri-F/bus/usb/init.inc @@ -205,7 +205,7 @@ proc usb_thread_proc ; If failed, set [usb_event] to -1 and terminate myself. dbgstr 'cannot create event for USB thread' or [usb_event], -1 - jmp sys_end + jmp syscall_end @@: mov [usb_event], eax push -1 ; initial timeout: infinite diff --git a/kernel/branches/Kolibri-F/core/clipboard.inc b/kernel/branches/Kolibri-F/core/clipboard.inc index 99f1fa4aca..da46c93233 100644 --- a/kernel/branches/Kolibri-F/core/clipboard.inc +++ b/kernel/branches/Kolibri-F/core/clipboard.inc @@ -10,7 +10,7 @@ $Revision$ ;------------------------------------------------------------------------------ align 4 -sys_clipboard: +syscall_clipboard: xor eax, eax dec eax ; check availability of main list diff --git a/kernel/branches/Kolibri-F/core/debug.inc b/kernel/branches/Kolibri-F/core/debug.inc index 35a1345fca..219d366355 100644 --- a/kernel/branches/Kolibri-F/core/debug.inc +++ b/kernel/branches/Kolibri-F/core/debug.inc @@ -9,15 +9,15 @@ $Revision$ ; diamond, 2006 -sys_debug_services: +syscall_debug_services: cmp ebx, 9 ja @f - jmp dword [sys_debug_services_table+ebx*4] + jmp dword [syscall_debug_service_services_table+ebx*4] @@: ret iglobal align 4 -sys_debug_services_table: +syscall_debug_service_services_table: dd debug_set_event_data dd debug_getcontext dd debug_setcontext diff --git a/kernel/branches/Kolibri-F/core/dll.inc b/kernel/branches/Kolibri-F/core/dll.inc index d273727b06..8f1f62f495 100644 --- a/kernel/branches/Kolibri-F/core/dll.inc +++ b/kernel/branches/Kolibri-F/core/dll.inc @@ -388,7 +388,7 @@ proc get_fileinfo stdcall, file_name:dword, info:dword pushad cld call protect_from_terminate - call file_system_lfn + call syscall_file_system_lfn call unprotect_from_terminate popad ret @@ -423,7 +423,7 @@ proc read_file stdcall,file_name:dword, buffer:dword, off:dword,\ pushad lea ebx, [cmd] - call file_system_lfn_protected + call syscall_file_system_lfn_protected popad ret endp diff --git a/kernel/branches/Kolibri-F/core/exports.inc b/kernel/branches/Kolibri-F/core/exports.inc index a2d14c2d15..41e4f00aa8 100644 --- a/kernel/branches/Kolibri-F/core/exports.inc +++ b/kernel/branches/Kolibri-F/core/exports.inc @@ -75,11 +75,11 @@ __exports: user_free, 'UserFree', \ ; stdcall unmap_pages, 'UnmapPages', \ ; eax, ecx sys_msg_board_str, 'SysMsgBoardStr', \ - sys_msg_board, 'SysMsgBoard', \ + syscall_msg_board, 'SysMsgBoard', \ get_clock_ns, 'GetClockNs', \ ;retval edx:eax 64-bit value get_timer_ticks, 'GetTimerTicks', \ get_stack_base, 'GetStackBase', \ - delay_hs, 'Delay', \ ; ebx + sys_delay_hs, 'Delay', \ ; ebx set_mouse_data, 'SetMouseData', \ ; set_keyboard_data, 'SetKeyboardData', \ ; gcc fastcall register_keyboard, 'RegKeyboard', \ diff --git a/kernel/branches/Kolibri-F/core/memory.inc b/kernel/branches/Kolibri-F/core/memory.inc index fa42757764..86a6a95011 100644 --- a/kernel/branches/Kolibri-F/core/memory.inc +++ b/kernel/branches/Kolibri-F/core/memory.inc @@ -906,7 +906,7 @@ proc safe_map_page stdcall, slot:dword, req_access:dword, ofs:dword ret endp -sys_IPC: +syscall_IPC: ;input: ; ebx=1 - set ipc buffer area ; ecx=address of buffer @@ -1098,15 +1098,15 @@ sysfn_meminfo: ret align 4 -f68: +syscall_some_intrenal_services: cmp ebx, 4 jbe sys_sheduler cmp ebx, 11 - jb undefined_syscall + jb syscall_undefined cmp ebx, 29 - ja undefined_syscall + ja syscall_undefined xor eax, eax - jmp dword [f68call+ebx*4-11*4] + jmp dword [syscall_some_intrenal_servicescall+ebx*4-11*4] .11: call init_heap mov [esp+SYSCALL_STACK._eax], eax @@ -1230,27 +1230,27 @@ f68: ret align 4 -f68call: ; keep this table closer to main code +syscall_some_intrenal_servicescall: ; keep this table closer to main code - dd f68.11 ; init_heap - dd f68.12 ; user_alloc - dd f68.13 ; user_free - dd f68.14 ; get_event_ex - dd f68.fail ; moved to f68.24 - dd f68.16 ; get_service - dd f68.17 ; call_service - dd f68.18 ; loadLibUnicode - dd f68.19 ; load_dll - dd f68.20 ; user_realloc - dd f68.21 ; load_driver - dd f68.22 ; shmem_open - dd f68.23 ; shmem_close - dd f68.24 ; set exception handler - dd f68.25 ; unmask exception - dd f68.26 ; user_unmap - dd f68.27 ; load_file_umode - dd f68.28 ; loadFileUnicode - dd f68.29 ; user_ring + dd syscall_some_intrenal_services.11 ; init_heap + dd syscall_some_intrenal_services.12 ; user_alloc + dd syscall_some_intrenal_services.13 ; user_free + dd syscall_some_intrenal_services.14 ; get_event_ex + dd syscall_some_intrenal_services.fail ; moved to syscall_some_intrenal_services.24 + dd syscall_some_intrenal_services.16 ; get_service + dd syscall_some_intrenal_services.17 ; call_service + dd syscall_some_intrenal_services.18 ; loadLibUnicode + dd syscall_some_intrenal_services.19 ; load_dll + dd syscall_some_intrenal_services.20 ; user_realloc + dd syscall_some_intrenal_services.21 ; load_driver + dd syscall_some_intrenal_services.22 ; shmem_open + dd syscall_some_intrenal_services.23 ; shmem_close + dd syscall_some_intrenal_services.24 ; set exception handler + dd syscall_some_intrenal_services.25 ; unmask exception + dd syscall_some_intrenal_services.26 ; user_unmap + dd syscall_some_intrenal_services.27 ; load_file_umode + dd syscall_some_intrenal_services.28 ; loadFileUnicode + dd syscall_some_intrenal_services.29 ; user_ring align 4 proc load_pe_driver stdcall, file:dword, cmdline:dword diff --git a/kernel/branches/Kolibri-F/core/sys32.inc b/kernel/branches/Kolibri-F/core/sys32.inc index 1309e9eca8..c6edd9e0df 100644 --- a/kernel/branches/Kolibri-F/core/sys32.inc +++ b/kernel/branches/Kolibri-F/core/sys32.inc @@ -367,7 +367,7 @@ unlock_application_table: ; sysfn 64 implementation align 4 -sys_resize_app_memory: +syscall_resize_app_memory: ; in: eax = 64 - function number ; ebx = 1 - number of its only subfunction ; ecx = new amount of memory @@ -727,7 +727,7 @@ destroy_thread: pushad xchg eax, ecx mov ebx, 2 - call sys_system + call syscall_system popad @@: inc eax @@ -813,7 +813,7 @@ proc unprotect_from_terminate lock dec [edx+APPDATA.terminate_protection] ; If the result of decrement is zero, somebody has requested termination, ; but at that moment we were inside a critical area; terminate now. - jz sys_end + jz syscall_end ; Otherwise, return to the caller. ret endp diff --git a/kernel/branches/Kolibri-F/core/syscall.inc b/kernel/branches/Kolibri-F/core/syscall.inc index d78bd2516b..4f0f4adc07 100644 --- a/kernel/branches/Kolibri-F/core/syscall.inc +++ b/kernel/branches/Kolibri-F/core/syscall.inc @@ -98,89 +98,89 @@ iglobal align 4 servetable2: - dd syscall_draw_window ; 0-DrawWindow - dd syscall_setpixel ; 1-SetPixel - dd sys_getkey ; 2-GetKey - dd sys_clock ; 3-GetTime - dd syscall_writetext ; 4-WriteText - dd delay_hs_unprotected ; 5-DelayHs - dd undefined_syscall ; 6-deprecated OpenRamdiskFile - dd syscall_putimage ; 7-PutImage - dd syscall_button ; 8-DefineButton - dd sys_cpuusage ; 9-GetProcessInfo - dd sys_waitforevent ; 10-WaitForEvent - dd sys_getevent ; 11-CheckForEvent - dd sys_redrawstat ; 12-BeginDraw and EndDraw - dd syscall_drawrect ; 13-DrawRect - dd syscall_getscreensize ; 14-GetScreenSize - dd sys_background ; 15-bgr - dd sys_cachetodiskette ; 16-FlushFloppyCache - dd sys_getbutton ; 17-GetButton - dd sys_system ; 18-System Services - dd paleholder ; 19-reserved - dd sys_midi ; 20-ResetMidi and OutputMidi - dd sys_setup ; 21-SetMidiBase,SetKeymap,SetShiftKeymap,. - dd sys_settime ; 22-setting date,time,clock and alarm-clock - dd sys_wait_event_timeout ; 23-TimeOutWaitForEvent - dd syscall_cdaudio ; 24-PlayCdTrack,StopCd and GetCdPlaylist - dd syscall_putarea_backgr ; 25-Put Area to background - dd sys_getsetup ; 26-GetMidiBase,GetKeymap,GetShiftKeymap,. - dd undefined_syscall ; 27-reserved - dd undefined_syscall ; 28-reserved - dd sys_date ; 29-GetDate - dd sys_current_directory ; 30-Get/SetCurrentDirectory - dd undefined_syscall ; 31-reserved - dd undefined_syscall ; 32-reserved - dd undefined_syscall ; 33-reserved - dd syscall_getpixel_WinMap ; 34-GetPixel WinMap - dd syscall_getpixel ; 35-GetPixel - dd syscall_getarea ; 36-GetArea - dd readmousepos ; 37-GetMousePosition_ScreenRelative,. - dd syscall_drawline ; 38-DrawLine - dd sys_getbackground ; 39-GetBackgroundSize,ReadBgrData,. - dd set_app_param ; 40-WantEvents - dd undefined_syscall ; 41- deprecated GetIrqOwner - dd undefined_syscall ; 42- deprecated ReadIrqData - dd sys_outport ; 43-SendDeviceData - dd undefined_syscall ; 44- deprecated ProgramIrqs - dd undefined_syscall ; 45- deprecated ReserveIrq and FreeIrq - dd syscall_reserveportarea ; 46-ReservePortArea and FreePortArea - dd display_number ; 47-WriteNum - dd syscall_display_settings ; 48-SetRedrawType and SetButtonType - dd sys_apm ; 49-Advanced Power Management (APM) - dd syscall_set_window_shape ; 50-Window shape & scale - dd syscall_threads ; 51-Threads - dd undefined_syscall ; 52- deprecated Stack driver status - dd undefined_syscall ; 53- deprecated Socket interface - dd sys_clipboard ; 54-Custom clipboard - dd sound_interface ; 55-Sound interface - dd undefined_syscall ; 56-reserved - dd sys_pcibios ; 57-PCI BIOS32 - dd undefined_syscall ; 58-deprecated Common file system interface - dd undefined_syscall ; 59-reserved - dd sys_IPC ; 60-Inter Process Communication - dd sys_gs ; 61-Direct graphics access - dd pci_api ; 62-PCI functions - dd sys_msg_board ; 63-System message board - dd sys_resize_app_memory ; 64-Resize application memory usage - dd sys_putimage_palette ; 65-PutImagePalette - dd sys_process_def ; 66-Process definitions - keyboard - dd syscall_move_window ; 67-Window move or resize - dd f68 ; 68-Some internal services - dd sys_debug_services ; 69-Debug - dd file_system_lfn ; 70-Common file system interface, version 2 - dd syscall_window_settings ; 71-Window settings - dd sys_sendwindowmsg ; 72-Send window message - dd blit_32 ; 73-blitter; - dd sys_network ; 74-reserved for new stack - dd sys_socket ; 75-reserved for new stack - dd sys_protocols ; 76-reserved for new stack - dd sys_posix ; posix support - dd undefined_syscall ; 78-free - dd undefined_syscall ; 79-free - dd fileSystemUnicode ; 80-File system interface for different encodings + dd syscall_draw_window ; 0 - define and draw the window; + dd syscall_setpixel ; 1 - put pixel in the window; + dd syscall_getkey ; 2 - get the code of the pressed key; + dd syscall_clock ; 3 - get system time; + dd syscall_writetext ; 4 - draw text string; + dd syscall_delay_hs_unprotected ; 5 - delay; + dd syscall_undefined ; 6 - system call undefined; + dd syscall_putimage ; 7 - draw image in the window; + dd syscall_button ; 8 - define/delete the button; + dd syscall_thread_info ; 9 - information on execution thread; + dd syscall_waitforevent ; 10 - wait for event; + dd syscall_checkforevent ; 11 - check for event, no wait; + dd syscall_redrawstat ; 12 - begin/end window redraw; + dd syscall_drawrect ; 13 - draw a rectangle in the window; + dd syscall_getscreensize ; 14 - get screen size; + dd syscall_background ; 15 - working with the background; + dd syscall_cachetodiskette ; 16 - save ramdisk on a floppy; + dd syscall_getbutton ; 17 - get the identifier of the pressed button; + dd syscall_system ; 18 - system services; + dd syscall_undefined ; 19 - system call undefined; + dd syscall_midi ; 20 - reset MIDI and output MIDI; + dd syscall_setup ; 21 - setting system parameters; + dd syscall_settime ; 22 - setting date, time, clock and alarm-clock; + dd syscall_wait_event_timeout ; 23 - wait for event with timeout; + dd syscall_cdaudio ; 24 - work with a CD player; + dd syscall_putarea_backgr ; 25 - put area to background; + dd syscall_getsetup ; 26 - get system parameters; + dd syscall_undefined ; 27 - system call undefined; + dd syscall_undefined ; 28 - system call undefined; + dd syscall_date ; 29 - get date; + dd syscall_current_directory ; 30 - get/set current directory; + dd syscall_undefined ; 31 - system call undefined; + dd syscall_undefined ; 32 - system call undefined; + dd syscall_undefined ; 33 - system call undefined; + dd syscall_getpixel_WinMap ; 34 - find out who the screen point belongs to; + dd syscall_getpixel ; 35 - read the color of the pixel on the screen; + dd syscall_getarea ; 36 - read the screen area; + dd syscall_get_mouse_pos ; 37 - work with the mouse; + dd syscall_drawline ; 38 - draw a line; + dd syscall_getbackground ; 39 - get background info; + dd syscall_set_eventmask ; 40 - set event mask; + dd syscall_undefined ; 41 - system call undefined; + dd syscall_undefined ; 42 - system call undefined; + dd syscall_outport ; 43 - input / output to the port; + dd syscall_undefined ; 44 - system call undefined; + dd syscall_undefined ; 45 - system call undefined; + dd syscall_reserveportarea ; 46 - reserve port area and free port area; + dd syscall_putnumber ; 47 - print a number to the window; + dd syscall_window_styles ; 48 - window display styles; + dd syscall_apm ; 49 - Advanced Power Management (APM); + dd syscall_set_window_shape ; 50 - window shape & scale; + dd syscall_threads ; 51 - threads; + dd syscall_undefined ; 52 - system call undefined; + dd syscall_undefined ; 53 - system call undefined; + dd syscall_clipboard ; 54 - working with the clipboard; + dd syscall_sound_interface ; 55 - sound interface; + dd syscall_undefined ; 56 - system call undefined; + dd syscall_pcibios ; 57 - PCI BIOS32; + dd syscall_undefined ; 58 - system call undefined; + dd syscall_undefined ; 59 - system call undefined; + dd syscall_IPC ; 60 - Inter Process Communication(IPC); + dd syscall_dga ; 61 - direct graphics access; + dd syscall_pci_api ; 62 - PCI functions; + dd syscall_msg_board ; 63 - system message board; + dd syscall_resize_app_memory ; 64 - resize application memory usage; + dd syscall_putimage_palette ; 65 - display an image with a palette in the window; + dd syscall_process_def ; 66 - process definitions - keyboard; + dd syscall_move_window ; 67 - window move or resize; + dd syscall_some_intrenal_services ; 68 - some internal services; + dd syscall_debug_services ; 69 - debug services; + dd syscall_file_system_lfn ; 70 - file system interface; + dd syscall_window_settings ; 71 - window settings; + dd syscall_send_window_msg ; 72 - send window message; + dd syscall_blit_32 ; 73 - graphic blitter; + dd syscall_network ; 74 - work with network devices; + dd syscall_socket ; 75 - work with network sockets; + dd syscall_protocols ; 76 - network options and statistics; + dd syscall_posix_subsystem ; 77 - POSIX subsystem; + dd syscall_undefined ; 78 - system call undefined; + dd syscall_undefined ; 79 - system call undefined; + dd syscall_fs_diff_encodings ; 80 - file system interface for different encodings; - times 255 - ( ($-servetable2) /4 ) dd undefined_syscall - dd sys_end ; -1-end application + times 255 - ( ($-servetable2) /4 ) dd syscall_undefined + dd syscall_end ; -1-end application endg diff --git a/kernel/branches/Kolibri-F/core/taskman.inc b/kernel/branches/Kolibri-F/core/taskman.inc index 7d9385e41c..fd375a41f2 100644 --- a/kernel/branches/Kolibri-F/core/taskman.inc +++ b/kernel/branches/Kolibri-F/core/taskman.inc @@ -873,8 +873,8 @@ common_app_entry: mov ebx, dll_error_msg mov ebp, notifyapp call fs_execute_from_sysdir_param -; Terminate process (TODO: Need jump to .cleanup after sys_end ?) - call sys_end +; Terminate process (TODO: Need jump to .cleanup after syscall_end ?) + call syscall_end @@: ; Find APP_STARTUP_THUNK in DLL.OBJ diff --git a/kernel/branches/Kolibri-F/core/v86.inc b/kernel/branches/Kolibri-F/core/v86.inc index 50da4cdd04..97cf3bee3b 100644 --- a/kernel/branches/Kolibri-F/core/v86.inc +++ b/kernel/branches/Kolibri-F/core/v86.inc @@ -685,7 +685,7 @@ v86_exc_c: if DEBUG_SHOW_IO mov edx, ebx mov ebx, 200 - call delay_hs + call sys_delay_hs mov esi, [esp+v86_regs.size+10h+4] mov eax, [esi+V86_machine.iopm] @@: diff --git a/kernel/branches/Kolibri-F/fdo.inc b/kernel/branches/Kolibri-F/fdo.inc index 79068df888..9c0edc3104 100644 --- a/kernel/branches/Kolibri-F/fdo.inc +++ b/kernel/branches/Kolibri-F/fdo.inc @@ -23,7 +23,7 @@ $Revision$ _esp equ esp macro put_board { - call sys_msg_board + call syscall_msg_board } macro debug_func name { diff --git a/kernel/branches/Kolibri-F/fs/fs_lfn.inc b/kernel/branches/Kolibri-F/fs/fs_lfn.inc index be38a520d0..bb5be64324 100644 --- a/kernel/branches/Kolibri-F/fs/fs_lfn.inc +++ b/kernel/branches/Kolibri-F/fs/fs_lfn.inc @@ -90,7 +90,7 @@ image_of_ebx EQU esp+20 ; ret ; endp -; syscall_fileSystemUnicode: ; with user pointer correctness checking +; syscall_syscall_fs_diff_encodings: ; with user pointer correctness checking ; ; in: ebx -> f.80 parameter structure ; stdcall file_system_is_operation_safe, ebx ; jnz @f @@ -99,13 +99,13 @@ image_of_ebx EQU esp+20 ; mov dword [image_of_eax], ERROR_MEMORY_POINTER ; ret ; @@: -; jmp fileSystemUnicode +; jmp syscall_fs_diff_encodings ; temporarily commented out cause acpi driver (drivers/devman) uses sysfn70 via 0x40 ; so because drivers it kernel space, pointer checking fails ; TODO solution: add filesystem functions without pointer checking to kernel exports ; and make the driver use them, not int 0x40 -; syscall_fileSystemUnicode commented out for the same reason +; syscall_syscall_fs_diff_encodings commented out for the same reason ; syscall_file_system_lfn: ; with user pointer correctness checking ; ; in: ebx -> f.70 parameter structure ; stdcall file_system_is_operation_safe, ebx @@ -115,28 +115,28 @@ image_of_ebx EQU esp+20 ; mov dword [image_of_eax], ERROR_MEMORY_POINTER ; ret ; @@: -; jmp file_system_lfn +; jmp syscall_file_system_lfn ; System function 70 -file_system_lfn_protected: +syscall_file_system_lfn_protected: pushad call protect_from_terminate - call file_system_lfn + call syscall_file_system_lfn call unprotect_from_terminate popad mov [image_of_eax], eax mov [image_of_ebx], ebx ret -fileSystemUnicode: +syscall_fs_diff_encodings: ; in: ebx -> f.80 parameter structure mov edi, [ebx+20] mov esi, [ebx+24] jmp @f -file_system_lfn: +syscall_file_system_lfn: ; in: ebx -> f.70 parameter structure xor edi, edi lea esi, [ebx+20] @@ -512,7 +512,7 @@ uglobal addDirSeal db ? endg -sys_current_directory: ; sysfunction 30 +syscall_current_directory: ; sysfunction 30 mov eax, [current_slot] mov edi, [eax+APPDATA.cur_dir] xor eax, eax diff --git a/kernel/branches/Kolibri-F/gui/event.inc b/kernel/branches/Kolibri-F/gui/event.inc index 75e032732c..c8026f2981 100644 --- a/kernel/branches/Kolibri-F/gui/event.inc +++ b/kernel/branches/Kolibri-F/gui/event.inc @@ -326,7 +326,7 @@ wait_event_timeout: ret ;----------------------------------------------------------------------------- align 4 -get_event_ex: ;; f68:14 +get_event_ex: ;; syscall_some_intrenal_services:14 ;info: ; Waiting for any event in the EventList of the current slot ; Code event data - copied to application memory (indirectly by edi) @@ -431,7 +431,7 @@ align 4 ret ;----------------------------------------------------------------------------- align 4 -sys_sendwindowmsg: ;; f72 +syscall_send_window_msg: ;; f72 dec ebx jnz .ret ;subfunction==1 ? pushfd @@ -475,7 +475,7 @@ align 4 ret ;----------------------------------------------------------------------------- align 4 -sys_getevent: ;; f11 +syscall_checkforevent: ;; f11 mov ebx, [current_slot] ;now this is a question, what where to put...... pushfd ; this is a consequence of the general concept: let the test function have cli ; the right to hope to disable interrupts, as when called from shed @@ -485,11 +485,11 @@ sys_getevent: ;; f11 ret ;----------------------------------------------------------------------------- align 4 -sys_waitforevent: ;; f10 +syscall_waitforevent: ;; f10 or ebx, -1; infinite timeout ;-------------------------------------- align 4 -sys_wait_event_timeout: ;; f23 +syscall_wait_event_timeout: ;; f23 call unprotect_from_terminate mov edx, get_event_for_app; wait_test call Wait_events_ex ; ebx - timeout diff --git a/kernel/branches/Kolibri-F/gui/window.inc b/kernel/branches/Kolibri-F/gui/window.inc index 6b1e7e19b0..4ea86ebe6e 100644 --- a/kernel/branches/Kolibri-F/gui/window.inc +++ b/kernel/branches/Kolibri-F/gui/window.inc @@ -69,7 +69,7 @@ syscall_draw_window: ;///// system function 0 ///////////////////////////////// .exit: ret ;------------------------------------------------------------------------------ -syscall_display_settings: ;///// system function 48 /////////////////////////// +syscall_window_styles: ;///// system function 48 /////////////////////////// ;------------------------------------------------------------------------------ cmp ebx, 13 ja .ret @@ -1008,8 +1008,8 @@ align 4 jz @f push edx - call syscall_display_settings.calculateScreen - call syscall_display_settings.redrawScreen + call syscall_window_styles.calculateScreen + call syscall_window_styles.redrawScreen pop edx ;-------------------------------------- align 4 diff --git a/kernel/branches/Kolibri-F/hid/set_dtc.inc b/kernel/branches/Kolibri-F/hid/set_dtc.inc index 3c2d527cd3..b25c31c647 100644 --- a/kernel/branches/Kolibri-F/hid/set_dtc.inc +++ b/kernel/branches/Kolibri-F/hid/set_dtc.inc @@ -16,7 +16,7 @@ $Revision$ ; ebx =2 - set day of week ecx- 1-7 ; ebx =3 - set alarm-clock ecx - 00SSMMHH ; out: 0 -Ok 1 -wrong format 2 -battery low -sys_settime: +syscall_settime: cli mov al, 0x0d diff --git a/kernel/branches/Kolibri-F/kernel.asm b/kernel/branches/Kolibri-F/kernel.asm index cab36f16b7..f299750780 100644 --- a/kernel/branches/Kolibri-F/kernel.asm +++ b/kernel/branches/Kolibri-F/kernel.asm @@ -1357,7 +1357,7 @@ set_variables: align 4 ;input eax=43,bl-byte of output, ecx - number of port -sys_outport: +syscall_outport: mov edi, ecx ; separate flag for read / write and ecx, 65535 @@ -1414,7 +1414,7 @@ sys_outport: mov [esp+20], eax ret -display_number: +syscall_putnumber: ; add check pointers test bl, bl jz @f @@ -1624,7 +1624,7 @@ midi_base dw 0 endg ;----------------------------------------------------------------------------- align 4 -sys_setup: +syscall_setup: ; 1 = roland mpu midi base , base io address ; 2 = keyboard 1, base kaybap 2, shift keymap, 9 country 1eng 2fi 3ger 4rus ; 3 = not used @@ -1731,7 +1731,7 @@ sys_setup: ret ;----------------------------------------------------------------------------- align 4 -sys_getsetup: +syscall_getsetup: ; 1 = roland mpu midi base , base io address ; 2 = keyboard 1, base kaybap 2, shift keymap, 9 country 1eng 2fi 3ger 4rus ; 3 = not used @@ -1867,7 +1867,7 @@ get_timer_ticks: mov eax, [timer_ticks] ret ;----------------------------------------------------------------------------- -readmousepos: +syscall_get_mouse_pos: ; eax=0 screen relative ; eax=1 window relative ; eax=2 buttons pressed @@ -2021,7 +2021,7 @@ put_mpu_out: align 4 -sys_midi: +syscall_midi: cmp [mididp], 0 jnz sm0 mov [esp+36], dword 1 @@ -2079,7 +2079,7 @@ detect_devices: ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ret -sys_end: +syscall_end: ;-------------------------------------- cmp [_display.select_cursor], 0 je @f @@ -2174,7 +2174,7 @@ sys_system_table: sysfn_num = ($ - sys_system_table)/4 endg ;------------------------------------------------------------------------------ -sys_system: +syscall_system: dec ebx cmp ebx, sysfn_num jae @f @@ -2303,8 +2303,8 @@ sysfn_deactivate: ; 18.1 = DEACTIVATE WINDOW movzx esi, word [WIN_STACK + ecx * 2] lea esi, [WIN_POS + esi * 2] call window._.window_deactivate - call syscall_display_settings.calculateScreen - call syscall_display_settings.redrawScreen + call syscall_window_styles.calculateScreen + call syscall_window_styles.redrawScreen .nowindowdeactivate: ret ;------------------------------------------------------------------------------ @@ -2672,7 +2672,7 @@ version_end: endg ;------------------------------------------------------------------------------ align 4 -sys_cachetodiskette: +syscall_cachetodiskette: cmp ebx, 1 jb .no_floppy_save cmp ebx, 2 @@ -2692,7 +2692,7 @@ bgrlock db 0 endg ;------------------------------------------------------------------------------ align 4 -sys_background: +syscall_background: cmp ebx, 1 ; BACKGROUND SIZE jnz nosb1 test ecx, ecx @@ -3045,7 +3045,7 @@ force_redraw_background: ret ;------------------------------------------------------------------------------ align 4 -sys_getbackground: +syscall_getbackground: ; cmp eax,1 ; SIZE dec ebx jnz nogb1 @@ -3100,7 +3100,7 @@ nogb4: ret ;------------------------------------------------------------------------------ align 4 -sys_getkey: +syscall_getkey: mov [esp + 32], dword 1 ; test main buffer mov ebx, [current_slot_idx] ; TOP OF WINDOW STACK @@ -3157,7 +3157,7 @@ align 4 jmp .ret_eax ;------------------------------------------------------------------------------ align 4 -sys_getbutton: +syscall_getbutton: mov ebx, [current_slot_idx] ; TOP OF WINDOW STACK mov [esp + 32], dword 1 movzx ecx, word [WIN_STACK + ebx * 2] @@ -3177,7 +3177,7 @@ align 4 ret ;------------------------------------------------------------------------------ align 4 -sys_cpuusage: +syscall_thread_info: ; RETURN: ; @@ -3287,7 +3287,7 @@ sys_cpuusage: ret align 4 -sys_clock: +syscall_clock: cli ; Mikhail Lisovin xx Jan 2005 @@: @@ -3325,7 +3325,7 @@ sys_clock: align 4 -sys_date: +syscall_date: cli @@: @@ -3360,7 +3360,7 @@ sys_date: ; redraw status -sys_redrawstat: +syscall_redrawstat: cmp ebx, 1 jne no_widgets_away ; buttons away @@ -3776,7 +3776,7 @@ redrawscreen: push eax ;;; mov ebx,2 -;;; call delay_hs +;;; call sys_delay_hs ;mov ecx,0 ; redraw flags for apps xor ecx, ecx @@ -4048,7 +4048,7 @@ delay_ms: ; delay in 1/1000 sec ret ;----------------------------------------------------------------------------- align 4 -set_app_param: +syscall_set_eventmask: mov edi, [TASK_BASE] mov eax, ebx xchg eax, [edi + TASKDATA.event_mask] ; set new event mask @@ -4057,16 +4057,16 @@ set_app_param: ;----------------------------------------------------------------------------- ; this is for syscall -proc delay_hs_unprotected +proc syscall_delay_hs_unprotected call unprotect_from_terminate - call delay_hs + call sys_delay_hs call protect_from_terminate ret endp if 1 align 4 -delay_hs: ; delay in 1/100 secs +sys_delay_hs: ; delay in 1/100 secs ; ebx = delay time pushad @@ -4093,7 +4093,7 @@ delay_hs: ; delay in 1/100 secs else align 4 -delay_hs: ; delay in 1/100 secs +sys_delay_hs: ; delay in 1/100 secs ; ebx = delay time push ecx push edx @@ -4437,7 +4437,7 @@ sys_putimage_bpp: ; jmp [draw_pointer] ;----------------------------------------------------------------------------- align 4 -sys_putimage_palette: +syscall_putimage_palette: ; ebx = pointer to image ; ecx = [xsize]*65536 + [ysize] ; edx = [xstart]*65536 + [ystart] @@ -4842,7 +4842,7 @@ sys_msg_board_str: je @f mov ebx, 1 movzx ecx, byte [esi] - call sys_msg_board + call syscall_msg_board inc esi jmp @b @@: @@ -4884,7 +4884,7 @@ sys_msg_board_dword: mov cl, al xor ebx, ebx inc ebx - call sys_msg_board + call syscall_msg_board pop eax pop ecx loop @b @@ -4902,7 +4902,7 @@ iglobal msg_board_pos dd 42*6*65536+10 ; for printing debug output on the screen endg -sys_msg_board: +syscall_msg_board: ; ebx=1 -> write, cl = byte to write ; ebx=2 -> read, ecx=0 -> no data, ecx=1 -> data in al push eax ebx @@ -5000,17 +5000,17 @@ end if iglobal align 4 f66call: - dd sys_process_def.1 ; 1 = set keyboard mode - dd sys_process_def.2 ; 2 = get keyboard mode - dd sys_process_def.3 ; 3 = get keyboard ctrl, alt, shift - dd sys_process_def.4 ; 4 = set system-wide hotkey - dd sys_process_def.5 ; 5 = delete installed hotkey - dd sys_process_def.6 ; 6 = disable input, work only hotkeys - dd sys_process_def.7 ; 7 = enable input, opposition to f.66.6 + dd syscall_process_def.1 ; 1 = set keyboard mode + dd syscall_process_def.2 ; 2 = get keyboard mode + dd syscall_process_def.3 ; 3 = get keyboard ctrl, alt, shift + dd syscall_process_def.4 ; 4 = set system-wide hotkey + dd syscall_process_def.5 ; 5 = delete installed hotkey + dd syscall_process_def.6 ; 6 = disable input, work only hotkeys + dd syscall_process_def.7 ; 7 = enable input, opposition to f.66.6 endg ;----------------------------------------------------------------------------- align 4 -sys_process_def: +syscall_process_def: dec ebx cmp ebx, 7 jae .not_support ;if >=8 then or eax,-1 @@ -5150,15 +5150,15 @@ endg iglobal align 4 f61call: - dd sys_gs.1 ; resolution - dd sys_gs.2 ; bits per pixel - dd sys_gs.3 ; bytes per scanline + dd syscall_dga.1 ; resolution + dd syscall_dga.2 ; bits per pixel + dd syscall_dga.3 ; bytes per scanline endg align 4 -sys_gs: ; direct screen access +syscall_dga: ; direct screen access dec ebx cmp ebx, 2 ja .not_support @@ -5691,7 +5691,7 @@ apm_vf dd 0 endg align 4 -sys_apm: +syscall_apm: xor eax, eax cmp word [apm_vf], ax ; Check APM BIOS enable jne @f @@ -5743,7 +5743,7 @@ sys_apm: ; ----------------------------------------- align 4 -undefined_syscall: ; Undefined system call +syscall_undefined: ; Undefined system call mov [esp + 32], dword -1 ret diff --git a/kernel/branches/Kolibri-F/network/socket.inc b/kernel/branches/Kolibri-F/network/socket.inc index 7cd567b420..24438e8d84 100644 --- a/kernel/branches/Kolibri-F/network/socket.inc +++ b/kernel/branches/Kolibri-F/network/socket.inc @@ -245,7 +245,7 @@ macro socket_init { ; ; ;-----------------------------------------------------------------; align 4 -sys_socket: +syscall_socket: mov dword[esp+20], 0 ; Set error code to 0 diff --git a/kernel/branches/Kolibri-F/network/stack.inc b/kernel/branches/Kolibri-F/network/stack.inc index 4e7f99a43c..deeb4967ee 100644 --- a/kernel/branches/Kolibri-F/network/stack.inc +++ b/kernel/branches/Kolibri-F/network/stack.inc @@ -720,7 +720,7 @@ checksum_2: ; ; ;-----------------------------------------------------------------; align 4 -sys_network: +syscall_network: cmp bl, 255 jne @f @@ -847,7 +847,7 @@ sys_network: ; ; ;-----------------------------------------------------------------; align 4 -sys_protocols: +syscall_protocols: cmp bh, NET_DEVICES_MAX ; Check if device number exists jae .doesnt_exist diff --git a/kernel/branches/Kolibri-F/posix/posix.inc b/kernel/branches/Kolibri-F/posix/posix.inc index a1e494d983..1b53edc139 100644 --- a/kernel/branches/Kolibri-F/posix/posix.inc +++ b/kernel/branches/Kolibri-F/posix/posix.inc @@ -47,17 +47,17 @@ sys_posix_call: dd sys_futex ;5 reserved dd sys_futex ;6 reserved dd sys_futex ;7 reserved - dd sys_posix.fail ;8 sys_open - dd sys_posix.fail ;9 sys_close + dd syscall_posix_subsystem.fail ;8 sys_open + dd syscall_posix_subsystem.fail ;9 sys_close dd sys_read ;10 read() dd sys_write ;11 write() - dd sys_posix.fail ;12 sys_dup3 + dd syscall_posix_subsystem.fail ;12 sys_dup3 dd sys_pipe2 ;13 .end: endg align 4 -sys_posix: +syscall_posix_subsystem: cmp ebx, (sys_posix_call.end-sys_posix_call)/4 jae .fail diff --git a/kernel/branches/Kolibri-F/sound/playnote.inc b/kernel/branches/Kolibri-F/sound/playnote.inc index cbcd344d27..2c4bf1b227 100644 --- a/kernel/branches/Kolibri-F/sound/playnote.inc +++ b/kernel/branches/Kolibri-F/sound/playnote.inc @@ -19,7 +19,7 @@ $Revision$ align 4 -sound_interface: +syscall_sound_interface: cmp eax, ebx ; this is subfunction #55 ? jne retFunc55 ; if no then return. diff --git a/kernel/branches/Kolibri-F/tools/kerpack b/kernel/branches/Kolibri-F/tools/kerpack new file mode 100755 index 0000000000..d4906ec02a Binary files /dev/null and b/kernel/branches/Kolibri-F/tools/kerpack differ diff --git a/kernel/branches/Kolibri-F/tools/kpack b/kernel/branches/Kolibri-F/tools/kpack new file mode 100755 index 0000000000..08f10c27fe Binary files /dev/null and b/kernel/branches/Kolibri-F/tools/kpack differ diff --git a/kernel/branches/Kolibri-F/video/blitter.inc b/kernel/branches/Kolibri-F/video/blitter.inc index 2ee7366634..089c5392c5 100644 --- a/kernel/branches/Kolibri-F/video/blitter.inc +++ b/kernel/branches/Kolibri-F/video/blitter.inc @@ -197,7 +197,7 @@ purge .dy1 ret align 4 -blit_32: +syscall_blit_32: push ebp push edi push esi