• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1;;
2;; pmcall.inc
3;;
4;; Macros for the stack frame set up by pm_call, assuming ebp is left
5;; as the RM frame pointer.
6;;
7
8%ifndef PMCALL_INC
9%define PMCALL_INC
10
11%define RM_GS		word [ebp]
12%define RM_FS		word [ebp+2]
13%define RM_ES		word [ebp+4]
14%define RM_DS		word [ebp+6]
15
16%define RM_EDI		dword [ebp+8]
17%define RM_DI		word [ebp+8]
18%define RM_HDI		word [ebp+10]
19%define RM_DIL		byte [ebp+8]
20%define RM_DIH		byte [ebp+9]
21
22%define RM_ESI		dword [ebp+12]
23%define RM_SI		word [ebp+12]
24%define RM_HSI		word [ebp+14]
25%define RM_SIL		byte [ebp+12]
26%define RM_SIH		byte [ebp+13]
27
28%define RM_EBP		dword [ebp+16]
29%define RM_BP		word [ebp+16]
30%define RM_HBP		word [ebp+18]
31%define RM_BPL		byte [ebp+16]
32%define RM_BPH		byte [ebp+17]
33
34%define RM_EBX		dword [ebp+24]
35%define RM_BX		word [ebp+24]
36%define RM_HBX		word [ebp+26]
37%define RM_BL		byte [ebp+24]
38%define RM_BH		byte [ebp+25]
39
40%define RM_EDX		dword [ebp+28]
41%define RM_DX		word [ebp+28]
42%define RM_HDX		word [ebp+30]
43%define RM_DL		byte [ebp+28]
44%define RM_DH		byte [ebp+29]
45
46%define RM_ECX		dword [ebp+32]
47%define RM_CX		word [ebp+32]
48%define RM_HCX		word [ebp+34]
49%define RM_CL		byte [ebp+32]
50%define RM_CH		byte [ebp+33]
51
52%define RM_EAX		dword [ebp+36]
53%define RM_AX		word [ebp+36]
54%define RM_HAX		word [ebp+38]
55%define RM_AL		byte [ebp+36]
56%define RM_AH		byte [ebp+37]
57
58%define RM_EFLAGS	dword [ebp+40]
59%define RM_FLAGS	word [ebp+40]
60%define RM_HFLAGS	word [ebp+42]
61%define RM_FLAGSL	byte [ebp+40]
62%define RM_FLAGSH	byte [ebp+41]
63
64; Convenience macro to call a PM function
65%macro	pm_call	1
66	push dword %1
67	call _pm_call
68%endmacro
69
70%endif ; PMCALL_INC
71