;------------------------------------------------------------------------------\r
\r
.386\r
- .model flat\r
+ .model flat,C\r
.code\r
\r
-_SetJump PROC\r
+InternalAssertJumpBuffer PROTO C\r
+\r
+;------------------------------------------------------------------------------\r
+; UINTN\r
+; EFIAPI\r
+; SetJump (\r
+; OUT BASE_LIBRARY_JUMP_BUFFER *JumpBuffer\r
+; );\r
+;------------------------------------------------------------------------------\r
+SetJump PROC\r
+ push [esp + 4]\r
+ call InternalAssertJumpBuffer ; To validate JumpBuffer\r
pop ecx\r
+ pop ecx ; ecx <- return address\r
mov edx, [esp]\r
mov [edx], ebx\r
mov [edx + 4], esi\r
mov [edx + 8], edi\r
mov [edx + 12], ebp\r
mov [edx + 16], esp\r
- mov [edx + 20], ecx\r
+ mov [edx + 20], ecx ; eip value to restore in LongJump\r
xor eax, eax\r
jmp ecx\r
-_SetJump ENDP\r
+SetJump ENDP\r
\r
END\r