summaryrefslogtreecommitdiff
path: root/userland/libc/systemcall.s
blob: 51b00ec569081aa62c4f8248326172da48926fa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
.global syscall
.global s_syscall
syscall:
  push %ebp
  mov %esp,%ebp
  push %edi
  push %esi
  push %ebx
  mov 0x1C(%ebp), %edi
  mov 0x18(%ebp), %esi
  mov 0x14(%ebp), %edx
  mov 0x10(%ebp), %ecx
  mov 0xc(%ebp), %ebx
  mov 0x8(%ebp), %eax
  int $0x80
  pop %ebx
  pop %esi
  pop %edi
  leave
  ret

s_syscall:
  push %ebp
  mov %esp,%ebp
  movl 0x8(%ebp), %eax
  int $0x80
  leave
  ret