Rev 283 | Rev 375 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 283 | Rev 314 | ||
---|---|---|---|
Line 12... | Line 12... | ||
12 | 12 | ||
13 | mov ax,word os_data |
13 | mov ax,word os_data |
14 | mov ds,ax |
14 | mov ds,ax |
Line 15... | Line -... | ||
15 | mov es,ax |
- | |
16 | - | ||
17 | ; for syscall trace function |
- | |
18 | call save_registers |
15 | mov es,ax |
19 | 16 | ||
20 | ; load all registers in crossed order |
17 | ; load all registers in crossed order |
21 | mov edi,[esp+28] ; eax |
18 | mov eax, ebx |
22 | mov eax,[esp+16] ; ebx |
19 | mov ebx, ecx |
23 | mov ebx,[esp+24] ; ecx |
20 | mov ecx, edx |
24 | mov ecx,[esp+20] ; edx |
21 | mov edx, esi |
Line 25... | Line 22... | ||
25 | mov edx,[esp+4] ; esi |
22 | mov esi, edi |
26 | mov esi,[esp+0] ; edi |
23 | mov edi, [esp+28] |
27 | 24 | ||
28 | ; enable interupts - a task switch or an IRQ _CAN_ interrupt i40 handler |
25 | ; enable interupts - a task switch or an IRQ _CAN_ interrupt i40 handler |
29 | sti |
26 | sti |
30 | push eax |
27 | push eax |
31 | and edi,0xff |
28 | and edi,0xff |
Line 32... | Line 29... | ||
32 | call dword [servetable+edi*4] |
29 | call dword [servetable+edi*4] |
33 | pop eax |
30 | pop eax |
34 | cli |
31 | ; cli |
Line 35... | Line -... | ||
35 | - | ||
36 | popad |
- | |
37 | pop es ds |
- | |
38 | iretd |
- | |
39 | - | ||
40 | align 4 |
- | |
41 | save_registers: |
- | |
42 | mov esi, [0x3010] |
- | |
43 | mov eax, [esi+TASKDATA.pid] ; load PID |
- | |
44 | lea esi, [esp+4] |
- | |
45 | inc [save_syscall_count] |
- | |
46 | mov edi,[save_syscall_count] |
- | |
47 | and edi,0xF |
- | |
48 | shl edi,6 |
- | |
49 | add edi,save_syscall_data+32 |
- | |
50 | mov [edi-32],eax |
- | |
51 | mov ecx,32 / 4 |
- | |
52 | cld |
- | |
53 | rep movsd |
- | |
54 | ret |
- | |
55 | - | ||
56 | uglobal |
- | |
Line 57... | Line 32... | ||
57 | save_syscall_count dd 0x0 |
32 | |
58 | endg |
33 | popad |
59 | 34 | pop es ds |
|
60 | ;label save_syscall_data dword at 0x5000 |
35 | iretd |
Line 125... | Line 100... | ||
125 | dd user_events ; 54-User events |
100 | dd user_events ; 54-User events |
126 | dd sound_interface ; 55-Sound interface |
101 | dd sound_interface ; 55-Sound interface |
127 | dd undefined_syscall ; 56-reserved |
102 | dd undefined_syscall ; 56-reserved |
128 | dd undefined_syscall ; 57-reserved |
103 | dd undefined_syscall ; 57-reserved |
129 | dd file_system ; 58-Common file system interface |
104 | dd file_system ; 58-Common file system interface |
130 | dd sys_trace ; 59-System call trace |
105 | dd undefined_syscall ; 59-reserved |
131 | dd sys_IPC ; 60-Inter Process Communication |
106 | dd sys_IPC ; 60-Inter Process Communication |
132 | dd sys_gs ; 61-Direct graphics access |
107 | dd sys_gs ; 61-Direct graphics access |
133 | dd sys_pci ; 62-PCI functions |
108 | dd sys_pci ; 62-PCI functions |
134 | dd sys_msg_board ; 63-System message board |
109 | dd sys_msg_board ; 63-System message board |
135 | dd sys_resize_app_memory ; 64-Resize application memory usage |
110 | dd sys_resize_app_memory ; 64-Resize application memory usage |