Release 950403
[wine/multimedia.git] / include / registers.h
blob0298c238d6d3fcf5c588e52431e9d11c2efabec0
1 #ifndef __WINE_REGISTERS_H
2 #define __WINE_REGISTERS_H
4 #include <windows.h>
6 #ifndef PROCEMU
8 #include "wine.h"
10 #define EAX context->sc_eax
11 #define EBX context->sc_ebx
12 #define ECX context->sc_ecx
13 #define EDX context->sc_edx
15 #define AX *(WORD*)&context->sc_eax
16 #define BX *(WORD*)&context->sc_ebx
17 #define CX *(WORD*)&context->sc_ecx
18 #define DX *(WORD*)&context->sc_edx
20 #define AL *(BYTE*)&context->sc_eax
21 #define AH *(((BYTE*)&context->sc_eax)+1)
22 #define BL *(BYTE*)&context->sc_ebx
23 #define BH *(((BYTE*)&context->sc_ebx)+1)
24 #define CL *(BYTE*)&context->sc_ecx
25 #define CH *(((BYTE*)&context->sc_ecx)+1)
26 #define DL *(BYTE*)&context->sc_edx
27 #define DH *(((BYTE*)&context->sc_edx)+1)
29 #define CS context->sc_cs
30 #define DS context->sc_ds
31 #define ES context->sc_es
32 #define SS context->sc_ss
34 #define DI ((WORD)context->sc_edi)
35 #define SI ((WORD)context->sc_esi)
36 #define SP context->sc_esp
37 #ifndef __FreeBSD__
38 #define EFL context->sc_eflags
39 #else
40 #define EFL context->sc_efl
41 #endif
42 #define EIP context->sc_eip
44 #define SetCflag (EFL |= 0x00000001)
45 #define ResetCflag (EFL &= 0xfffffffe)
47 #else
49 #include "bx_bochs.h"
51 #define SetCflag bx_STC()
52 #define ResetCflag bx_CLC()
54 #endif /* PROCEMU */
55 #endif /* __WINE_REGISTERS_H */