summaryrefslogtreecommitdiff
path: root/asm/int_syscall_handler.asm
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-11-20 23:28:17 +0100
committerMichal Idziorek <m.i@gmx.at>2014-11-20 23:28:17 +0100
commita822afc278e7855dea55bcd0de2e402d5bf43508 (patch)
tree3ce639618b5548389096e5e340a36025e0371af7 /asm/int_syscall_handler.asm
parentb9af856ae4a65e09b401cdbc7858c6cd4b1b0b5f (diff)
fixed loading and runnnng progs (clear bss)
Diffstat (limited to 'asm/int_syscall_handler.asm')
-rw-r--r--asm/int_syscall_handler.asm8
1 files changed, 8 insertions, 0 deletions
diff --git a/asm/int_syscall_handler.asm b/asm/int_syscall_handler.asm
index 23b9f84..a2236fe 100644
--- a/asm/int_syscall_handler.asm
+++ b/asm/int_syscall_handler.asm
@@ -1,5 +1,6 @@
global int_syscall_handler
+[extern syscall_exit]
[extern syscall_write]
[extern syscall_read]
[extern syscall_readdir]
@@ -20,6 +21,9 @@ int_syscall_handler:
push ecx
push edx
+ cmp eax, 60
+ je call_exit
+
cmp eax, 61
je call_write
@@ -104,6 +108,10 @@ call_sbrk:
call syscall_sbrk
jmp done
+call_exit:
+ call syscall_exit
+ jmp done
+
;;; THIS CALLS NEED REENABLE INTERRUPTS BEFORE calling workers
call_read: