Index: /soft/giet_vm/giet_kernel/giet.s
===================================================================
--- /soft/giet_vm/giet_kernel/giet.s	(revision 345)
+++ /soft/giet_vm/giet_kernel/giet.s	(revision 346)
@@ -41,11 +41,11 @@
  *  - $3 is used to store the syscall address
  *  - $4, $5, $6, $7 contain the arguments values.
- *  - The return address (EPC) and the SR are saved in the stack.
+ *  - The return address (EPC) and the (SR) are saved in the stack.
  *  - Interrupts are enabled before branching to the syscall.
  *  - All syscalls must return to the syscall handler.
  *  - $2, $3, $4, $5, $6, $7 as well as $26 & $27 can be modified.
  *
- * In case of undefined system call, an error message displays the value of EPC
- * on the TTY corresponding to the processor, and the user program is killed.
+ * In case of undefined system call, an error message displays
+ * the value of EPC on the kernel TTY, and the user program is killed.
  */
 
@@ -55,29 +55,29 @@
 
 _sys_handler:
-    addiu   $29,    $29,    -24     /* 2 slots for SR&EPC, 4 slots for args passing */
-    mfc0    $27,    $14             /* load EPC */
-    addiu   $27,    $27,    4       /* increment EPC for return address */
-    sw      $27,    20($29)         /* save it in the stack */
+    addiu   $29,    $29,    -24     /* 2 slots for SR & EPC, 4 slots for args */
+    mfc0    $27,    $14             /* $27 <= EPC                             */
+    addiu   $27,    $27,    4       /* increment EPC for return address       */
+    sw      $27,    20($29)         /* save EPC in the stack                  */
+    mfc0    $27,    $12             /* $27 <= SR                              */
+    sw      $27,    16($29)         /* save SR in the stack                   */
 
-    andi    $26,    $2,     0x3F    /* $26 <= syscall index (i < 64) */
-    sll     $26,    $26,    2       /* $26 <= index * 4 */
-    la      $27,    _syscall_vector /* $27 <= &_syscall_vector[0] */
-    addu    $27,    $27,    $26     /* $27 <= &_syscall_vector[i] */
-    lw      $3,     0($27)          /* $3  <= syscall address */
+    andi    $26,    $2,     0x3F    /* $26 <= syscall index (i < 64)          */
+    sll     $26,    $26,    2       /* $26 <= index * 4                       */
+    la      $27,    _syscall_vector /* $27 <= &_syscall_vector[0]             */
+    addu    $27,    $27,    $26     /* $27 <= &_syscall_vector[i]             */
+    lw      $3,     0($27)          /* $3  <= syscall address                 */
+    li      $27,    0xFFFFFFED      /* Mask for UM & EXL bits                 */
+    mfc0    $26,    $12             /* $26 <= SR                              */
+    and     $26,    $26,    $27     /* UM = 0 / EXL = 0                       */
+    mtc0    $26,    $12             /* interrupt enabled                      */
+    jalr    $3                      /* jump to the proper syscall             */
 
-    li      $27,    0xFFFFFFED      /* Mask for UM & EXL bits */
-    mfc0    $26,    $12             /* $26 <= SR */
-    and     $26,    $26,    $27     /* UM = 0 / EXL = 0 */
-    mtc0    $26,    $12             /* interrupt enabled */
-    jalr    $3                      /* jump to the proper syscall */
-
-    mfc0    $26,    $12             /* load SR */
-    ori     $26,    $26,    0x2     /* set EXL bit */
-    mtc0    $26,    $12
-
-    lw      $26,    20($29)         /* load EPC from stack */
-    mtc0    $26,    $14             /* restore EPC */
-    addiu   $29,    $29,    24      /* restore stack pointer */
-    eret                            /* exit GIET */
+    mtc0    $0,     $12             /* SR <= 0 : interrupt disabled           */
+    lw      $26,    16($29)         /* $26 <= SR from stack                   */
+    mtc0    $26,    $12             /* restore SR                             */
+    lw      $26,    20($29)         /* $26 <= EPC from stack                  */
+    mtc0    $26,    $14             /* restore EPC                            */
+    addiu   $29,    $29,    24      /* restore stack pointer                  */
+    eret                            /* exit GIET                              */
 
     .endfunc
Index: /soft/giet_vm/giet_kernel/irq_handler.c
===================================================================
--- /soft/giet_vm/giet_kernel/irq_handler.c	(revision 345)
+++ /soft/giet_vm/giet_kernel/irq_handler.c	(revision 346)
@@ -71,5 +71,5 @@
     {
         static_scheduler_t* psched = (static_scheduler_t*)_get_sched();
-        unsigned int        entry;
+        unsigned int        entry = 0;
         unsigned int        isr_type;
         unsigned int        channel;
