Subversion Repositories Kolibri OS

Rev

Rev 314 | Rev 380 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 314 Rev 375
Line 33... Line 33...
33
      popad
33
      popad
34
      pop   es ds
34
      pop   es ds
35
      iretd
35
      iretd
Line -... Line 36...
-
 
36
 
-
 
37
 
-
 
38
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 
39
;;                                                            ;;
-
 
40
;;                     SYSENTER ENTRY                         ;;
-
 
41
;;                                                            ;;
-
 
42
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 
43
 
-
 
44
uglobal
-
 
45
times	100 db ?
-
 
46
sysenter_stack:
-
 
47
endg
-
 
48
 
-
 
49
align 32
-
 
50
SYSENTER_VAR	equ	0
-
 
51
sysenter_entry:
-
 
52
	; Íàñòðàèâàåì ñòåê
-
 
53
	cli
-
 
54
	push	eax
-
 
55
	mov	eax, [ss:CURRENT_TASK]
-
 
56
	shl	eax, 8
-
 
57
	mov	eax, [ss:PROC_BASE + eax + APPDATA.pl0_stack]
-
 
58
	lea	esp, [ss:eax + RING0_STACK_SIZE]	; configure ESP
-
 
59
	mov	eax, [ss:sysenter_stack - 4]		; eax - original eax, from app
-
 
60
	sti
-
 
61
	;------------------
-
 
62
	push	ds es
-
 
63
	pushad
-
 
64
	cld
-
 
65
 
-
 
66
	mov	ax, word os_data
-
 
67
	mov	ds, ax
-
 
68
	mov	es, ax
-
 
69
 
-
 
70
        mov     eax, ebx
-
 
71
        mov     ebx, ecx
-
 
72
        mov     ecx, edx
-
 
73
        mov     edx, esi
-
 
74
        mov     esi, edi
-
 
75
        mov     edi, [esp + 28]
-
 
76
 
-
 
77
	push	eax
-
 
78
	and	edi, 0xff
-
 
79
	call	dword [servetable + edi * 4]
-
 
80
	pop	eax
-
 
81
 
-
 
82
	popad
-
 
83
	pop	es ds
-
 
84
	;------------------
-
 
85
	mov	edx, [SYSENTER_VAR]		; eip
-
 
86
	mov	ecx, [SYSENTER_VAR + 4]	; esp
-
 
87
	sysexit
-
 
88
 
-
 
89
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 
90
;;                                                            ;;
-
 
91
;;                     SYSCALL ENTRY                          ;;
-
 
92
;;                                                            ;;
-
 
93
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 
94
align 32
-
 
95
syscall_entry:
-
 
96
	cli
-
 
97
	xchg	ecx, [esp]
-
 
98
	mov	[SYSENTER_VAR + 4], esp
-
 
99
	mov	[ss:sysenter_stack - 4], eax
-
 
100
	mov	eax, [ss:CURRENT_TASK]
-
 
101
	shl	eax, 8
-
 
102
	mov	eax, [ss:PROC_BASE + eax + APPDATA.pl0_stack]
-
 
103
	lea	esp, [ss:eax + RING0_STACK_SIZE]	; configure ESP
-
 
104
	mov	eax, [ss:sysenter_stack - 4]		; eax - original eax, from app
-
 
105
	sti
-
 
106
	;------------------
-
 
107
	push	ds es
-
 
108
	pushad
-
 
109
	cld
-
 
110
 
-
 
111
	mov	ax, word os_data
-
 
112
	mov	ds, ax
-
 
113
	mov	es, ax
-
 
114
 
-
 
115
        mov     eax, ebx
-
 
116
        mov     ebx, ecx
-
 
117
        mov     ecx, edx
-
 
118
        mov     edx, esi
-
 
119
        mov     esi, edi
-
 
120
        mov     edi, [esp + 28]
-
 
121
 
-
 
122
	push	eax
-
 
123
	and	edi, 0xff
-
 
124
	call	dword [servetable + edi * 4]
-
 
125
	pop	eax
-
 
126
 
-
 
127
	popad
-
 
128
	pop	es ds
-
 
129
	;------------------
-
 
130
	mov	esp, [SYSENTER_VAR + 4]
36
 
131
	xchg	ecx, [esp]
37
 
132
	sysret
38
iglobal
133
iglobal
39
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
134
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 60... Line 155...
60
      dd syscall_getscreensize   ; 14-GetScreenSize
155
      dd syscall_getscreensize   ; 14-GetScreenSize
61
      dd sys_background          ; 15-bgr
156
      dd sys_background          ; 15-bgr
62
      dd sys_cachetodiskette     ; 16-FlushFloppyCache
157
      dd sys_cachetodiskette     ; 16-FlushFloppyCache
63
      dd sys_getbutton           ; 17-GetButton
158
      dd sys_getbutton           ; 17-GetButton
64
      dd sys_system              ; 18-System Services
159
      dd sys_system              ; 18-System Services
65
      dd undefined_syscall       ; 19-reserved
160
      dd paleholder;undefined_syscall       ; 19-reserved
66
      dd sys_midi                ; 20-ResetMidi and OutputMidi
161
      dd sys_midi                ; 20-ResetMidi and OutputMidi
67
      dd sys_setup               ; 21-SetMidiBase,SetKeymap,SetShiftKeymap,.
162
      dd sys_setup               ; 21-SetMidiBase,SetKeymap,SetShiftKeymap,.
68
      dd sys_settime             ; 22-setting date,time,clock and alarm-clock
163
      dd sys_settime             ; 22-setting date,time,clock and alarm-clock
69
      dd sys_wait_event_timeout  ; 23-TimeOutWaitForEvent
164
      dd sys_wait_event_timeout  ; 23-TimeOutWaitForEvent
70
      dd syscall_cdaudio         ; 24-PlayCdTrack,StopCd and GetCdPlaylist
165
      dd syscall_cdaudio         ; 24-PlayCdTrack,StopCd and GetCdPlaylist