2024-07-14 09:22:43 +00:00
|
|
|
SYSCALL_EXIT = 0x01
|
|
|
|
SYSCALL_FORK = 0x02
|
|
|
|
SYSCALL_READ = 0x03
|
|
|
|
SYSCALL_WRITE = 0x04
|
2024-07-13 17:02:35 +00:00
|
|
|
|
2024-07-22 15:31:24 +00:00
|
|
|
syscall_null:
|
|
|
|
ret
|
|
|
|
|
2024-07-13 17:02:35 +00:00
|
|
|
isr_syscall:
|
|
|
|
push eax
|
|
|
|
mov esi, szMsgSyscall
|
|
|
|
call klog
|
2024-07-22 15:31:24 +00:00
|
|
|
|
2024-07-13 17:02:35 +00:00
|
|
|
iret
|
|
|
|
|
|
|
|
szMsgSyscall db "syscall %x", 0
|
2024-07-22 15:31:24 +00:00
|
|
|
|
|
|
|
apSyscallTable:
|
|
|
|
dd syscall_null ; SYSCALL_NULL
|
|
|
|
dd 0 ; SYSCALL_EXIT
|
|
|
|
dd 0 ; SYSCALL_FORK
|
|
|
|
dd 0 ; SYSCALL_READ
|
|
|
|
dd 0 ; SYSCALL_WRITE
|