1
2#include <asm.inc>
3#include <ks386.inc>
4
5
6// cpu 486
7.code
8
9EXTERN _check:PROC
10
11PUBLIC _continuePoint
12_continuePoint:
13 push ss
14 push 0
15 pushfd
16 push cs
17 push offset _continuePoint
18 push ebp
19
20 push eax
21 push ecx
22 push edx
23 push ebx
24 push esi
25 push edi
26
27 push ds
28 push es
29 push fs
30 push gs
31
32 // TODO: floating point state
33 sub esp, 112
34
35 // Debug registers
36 sub esp, 24
37
38 push HEX(00010007)
39
40 // Fill the Esp field
41 lea eax, [esp + HEX(0CC)]
42 lea ecx, [esp + HEX(0C4)]
43 mov [ecx], eax
44
45 // Call the function that will compare the current context with the expected one
46 cld
47 push esp
48 call _check
49
50 // check() must not return
51 int 3
52
53// EOF
54END
55