
Untitled
By: a guest on
May 11th, 2012 | syntax:
None | size: 0.64 KB | hits: 18 | expires: Never
Relate Structure variables?
struct RSI
{
int RSI;
int ESI = RSI & 0x1F;
int SI = ESI & 0x0F;
int SIL = SI & 0x08;
};
struct RSI
{
private:
int rsi;
public:
RSI(int rsi) : rsi(rsi) {}
int getRSI() const { return rsi; }
int getESI() const { return getRSI() & 0x1F; }
int getSI() const { return getESI() & 0x0F; }
int getSIL() const { return getSI() & 0x08; }
};
union RSI_t
{
int RSI;
int ESI : 5;
int SI : 4;
int SIL : 3;
};
#include <stdint.h>
union RAX_t
{
uint64_t RAX;
uint32_t EAX;
uint16_t AX;
struct {
uint8_t AL;
uint8_t AH;
};
};