[RTL]
[reactos.git] / lib / sdk / crt / except / i386 / seh.s
index 15a8cc5..57049a4 100644 (file)
@@ -8,24 +8,29 @@
 
 /* INCLUDES ******************************************************************/
 
-#include <ndk/asm.h>
-.intel_syntax noprefix
+#include <reactos/asm.h>
 
 #define DISPOSITION_DISMISS         0
 #define DISPOSITION_CONTINUE_SEARCH 1
 #define DISPOSITION_COLLIDED_UNWIND 3
 
+#define EXCEPTION_EXIT_UNWIND 4
+#define EXCEPTION_UNWINDING 2
+
+
+EXTERN _RtlUnwind@16:PROC
+
 /* GLOBALS *******************************************************************/
 
-.globl __global_unwind2
-.globl __local_unwind2
-.globl __abnormal_termination
-.globl __except_handler2
-.globl __except_handler3
+PUBLIC __global_unwind2
+PUBLIC __local_unwind2
+PUBLIC __abnormal_termination
+PUBLIC __except_handler2
+PUBLIC __except_handler3
 
 /* FUNCTIONS *****************************************************************/
 
-.func unwind_handler
+.code
 _unwind_handler:
 
     /* Check if we were unwinding and continue search if not */
@@ -56,9 +61,8 @@ _unwind_handler:
 
 unwind_handler_return:
     ret
-.endfunc
 
-.func _global_unwind2
+
 __global_unwind2:
 
     /* Create stack and save all registers */
@@ -85,9 +89,8 @@ glu_return:
     mov esp, ebp
     pop ebp
     ret
-.endfunc
 
-.func _abnormal_termination
+
 __abnormal_termination:
 
     /* Assume false */
@@ -112,9 +115,8 @@ __abnormal_termination:
     /* Return */
 ab_return:
     ret
-.endfunc
 
-.func _local_unwind2
+
 __local_unwind2:
 
     /* Save volatiles */
@@ -175,9 +177,8 @@ unwind_return:
     pop esi
     pop ebx
     ret
-.endfunc
 
-.func _except_handler2
+
 __except_handler2:
 
     /* Setup stack and save volatiles */
@@ -256,7 +257,7 @@ except_loop2:
     mov [ebx+12], eax
 
     /* Call except handler */
-    call [edi+ecx*4+8]
+    call dword ptr [edi+ecx*4+8]
 
 except_continue2:
     /* Reload try level and except again */
@@ -297,9 +298,8 @@ except_return2:
     mov esp, ebp
     pop ebp
     ret
-.endfunc
 
-.func _except_handler3
+
 __except_handler3:
 
     /* Setup stack and save volatiles */
@@ -437,4 +437,5 @@ except_return3:
     mov esp, ebp
     pop ebp
     ret
-.endfunc
+
+END