2010-10-04 01:11:42 +02:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2010-06-25 18:47:51 +02:00
|
|
|
;; ;;
|
|
|
|
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
|
|
|
|
;; Distributed under terms of the GNU General Public License ;;
|
|
|
|
;; ;;
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
|
|
$Revision$
|
|
|
|
|
|
|
|
; Old style system call converter
|
|
|
|
align 16
|
|
|
|
cross_order:
|
2010-10-04 01:11:42 +02:00
|
|
|
; load all registers in crossed order
|
|
|
|
mov eax, ebx
|
|
|
|
mov ebx, ecx
|
|
|
|
mov ecx, edx
|
|
|
|
mov edx, esi
|
|
|
|
mov esi, edi
|
|
|
|
movzx edi, byte[esp+28 + 4]
|
2011-05-30 12:11:03 +02:00
|
|
|
sub edi, 53 ; all zeroes before
|
2010-10-04 01:11:42 +02:00
|
|
|
call dword [servetable+edi*4]
|
|
|
|
ret
|
2010-06-25 18:47:51 +02:00
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; ;;
|
|
|
|
;; SYSTEM CALL ENTRY ;;
|
|
|
|
;; ;;
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
|
|
align 16
|
|
|
|
i40:
|
2010-10-04 01:11:42 +02:00
|
|
|
pushad
|
|
|
|
cld
|
|
|
|
and eax, 0x07F
|
|
|
|
call dword [servetable2 + eax * 4]
|
|
|
|
popad
|
|
|
|
iretd
|
2010-06-25 18:47:51 +02:00
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; ;;
|
2010-10-04 01:11:42 +02:00
|
|
|
;; SYSCALL ENTRY -- NEW !!! ;;
|
2010-06-25 18:47:51 +02:00
|
|
|
;; ;;
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2010-10-04 01:11:42 +02:00
|
|
|
|
2010-06-25 18:47:51 +02:00
|
|
|
align 32
|
|
|
|
syscall_entry:
|
2010-10-04 01:11:42 +02:00
|
|
|
; sti
|
2011-05-10 14:43:03 +02:00
|
|
|
push ecx
|
2011-08-14 11:08:02 +02:00
|
|
|
xor ecx, ecx
|
|
|
|
mov cl, al
|
|
|
|
and cl, 7
|
|
|
|
call dword [servetable3 + ecx * 4]
|
2010-10-04 01:11:42 +02:00
|
|
|
pop ecx
|
|
|
|
sysret
|
2010-06-25 18:47:51 +02:00
|
|
|
|
|
|
|
iglobal
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; SYSTEM FUNCTIONS TABLE ;;
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
|
|
align 4
|
|
|
|
servetable:
|
2010-10-04 01:11:42 +02:00
|
|
|
dd socket ; 53-Socket interface
|
2010-06-25 18:47:51 +02:00
|
|
|
dd 0
|
|
|
|
dd 0
|
|
|
|
dd 0
|
|
|
|
dd 0
|
2010-10-04 01:11:42 +02:00
|
|
|
dd file_system ; 58-Common file system interface
|
2010-06-25 18:47:51 +02:00
|
|
|
dd 0
|
|
|
|
dd 0
|
|
|
|
dd 0
|
2011-05-30 12:11:03 +02:00
|
|
|
dd 0 ; 62-PCI functions
|
2010-10-04 01:11:42 +02:00
|
|
|
dd sys_msg_board ; 63-System message board
|
2010-06-25 18:47:51 +02:00
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; NEW SYSTEM FUNCTIONS TABLE ;;
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
align 4
|
|
|
|
servetable2:
|
|
|
|
|
2010-10-04 01:11:42 +02:00
|
|
|
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 ; 5-DelayHs
|
2010-06-25 18:47:51 +02:00
|
|
|
dd syscall_openramdiskfile ; 6-OpenRamdiskFile
|
2010-10-04 01:11:42 +02:00
|
|
|
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
|
2010-06-25 18:47:51 +02:00
|
|
|
dd sys_wait_event_timeout ; 23-TimeOutWaitForEvent
|
2011-05-30 12:11:03 +02:00
|
|
|
dd undefined_syscall ; syscall_cdaudio ; 24-PlayCdTrack,StopCd and GetCdPlaylist
|
2010-10-04 01:11:42 +02:00
|
|
|
dd undefined_syscall ; 25-reserved
|
|
|
|
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 undefined_syscall ; 34-reserved
|
|
|
|
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 syscall_getirqowner ; 41-GetIrqOwner
|
|
|
|
dd get_irq_data ; 42-ReadIrqData
|
|
|
|
dd sys_outport ; 43-SendDeviceData
|
|
|
|
dd sys_programirq ; 44-ProgramIrqs
|
|
|
|
dd reserve_free_irq ; 45-ReserveIrq and FreeIrq
|
2010-06-25 18:47:51 +02:00
|
|
|
dd syscall_reserveportarea ; 46-ReservePortArea and FreePortArea
|
2010-10-04 01:11:42 +02:00
|
|
|
dd display_number ; 47-WriteNum
|
2010-06-25 18:47:51 +02:00
|
|
|
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
|
2010-10-04 01:11:42 +02:00
|
|
|
dd syscall_threads ; 51-Threads
|
|
|
|
dd stack_driver_stat ; 52-Stack driver status
|
|
|
|
dd cross_order ; 53-Socket interface
|
|
|
|
dd undefined_syscall ; 54-reserved
|
2010-06-25 18:47:51 +02:00
|
|
|
dd sound_interface ; 55-Sound interface
|
2010-10-04 01:11:42 +02:00
|
|
|
dd undefined_syscall ; 56-reserved
|
|
|
|
dd sys_pcibios ; 57-PCI BIOS32
|
|
|
|
dd cross_order ; 58-Common file system interface
|
|
|
|
dd undefined_syscall ; 59-reserved
|
2010-06-25 18:47:51 +02:00
|
|
|
dd sys_IPC ; 60-Inter Process Communication
|
2010-10-04 01:11:42 +02:00
|
|
|
dd sys_gs ; 61-Direct graphics access
|
2010-11-05 11:31:58 +01:00
|
|
|
dd pci_api ; 62-PCI functions
|
2010-10-04 01:11:42 +02:00
|
|
|
dd cross_order ; 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
|
2010-06-25 18:47:51 +02:00
|
|
|
dd f68 ; 68-Some internal services
|
2010-10-04 01:11:42 +02:00
|
|
|
dd sys_debug_services ; 69-Debug
|
|
|
|
dd file_system_lfn ; 70-Common file system interface, version 2
|
2010-06-25 18:47:51 +02:00
|
|
|
dd syscall_window_settings ; 71-Window settings
|
2010-10-04 01:11:42 +02:00
|
|
|
dd sys_sendwindowmsg ; 72-Send window message
|
|
|
|
times 127 - ( ($-servetable2) /4 ) dd undefined_syscall
|
|
|
|
dd sys_end ; -1-end application
|
2010-06-25 18:47:51 +02:00
|
|
|
|
2010-08-03 15:07:43 +02:00
|
|
|
align 4
|
2010-11-05 11:31:58 +01:00
|
|
|
servetable3: ; Kolibri-A special service
|
2010-10-04 01:11:42 +02:00
|
|
|
|
2011-05-30 12:11:03 +02:00
|
|
|
dd sys_rdmsr ; 0 = read MSR
|
2011-08-14 11:08:02 +02:00
|
|
|
dd sys_map1 ; 1 = get sys data (test only)
|
2010-10-17 20:19:57 +02:00
|
|
|
dd paleholder ; 2
|
2011-08-14 11:08:02 +02:00
|
|
|
dd paleholder ; 3
|
|
|
|
dd paleholder ; 4
|
|
|
|
dd paleholder ; 5
|
|
|
|
dd paleholder ; 6
|
|
|
|
dd special_srv ; 7 = special service
|
2010-10-04 01:11:42 +02:00
|
|
|
dd sys_end ; last
|
2010-08-03 15:07:43 +02:00
|
|
|
|
2010-06-25 18:47:51 +02:00
|
|
|
endg
|