2 * 16-bit mode stack frame layout
4 * Copyright 1995 Alexandre Julliard
7 #ifndef __WINE_STACKFRAME_H
8 #define __WINE_STACKFRAME_H
15 /* 16-bit stack layout after CallFrom16() */
18 DWORD saved_ss_sp
; /* saved previous 16-bit stack */
19 DWORD ebp
; /* full 32-bit content of ebp */
20 WORD entry_ip
; /* ip of entry point */
22 WORD entry_cs
; /* cs of entry point */
24 DWORD entry_point WINE_PACKED
; /* 32-bit entry point to call */
25 WORD bp
; /* 16-bit bp */
26 WORD ip
; /* return address */
28 WORD args
[1]; /* arguments to API function */
31 /* 32-bit stack layout after CallTo16() */
34 DWORD saved_esp
; /* saved previous 32-bit stack */
35 DWORD edi
; /* saved registers */
40 DWORD ebp
; /* saved 32-bit frame pointer */
41 DWORD retaddr
; /* return address */
42 DWORD codeselector
; /* code selector for return address */
43 DWORD args
[1]; /* arguments to 16-bit function */
48 /* Saved 16-bit stack for current process (Win16 only) */
49 extern DWORD IF1632_Saved16_ss_sp
;
51 /* Saved 32-bit stack for current process (Win16 only) */
52 extern DWORD IF1632_Saved32_esp
;
54 /* Original Unix stack */
55 extern DWORD IF1632_Original32_esp
;
57 #define CURRENT_STACK16 ((STACK16FRAME *)PTR_SEG_TO_LIN(IF1632_Saved16_ss_sp))
59 #define CURRENT_DS (CURRENT_STACK16->ds)
61 #endif /* __WINE_STACKFRAME_H */