All pastes #2054440 Raw Edit

Anonymous

public cpp v1 · immutable
#2054440 ·published 2011-05-06 04:40 UTC
rendered paste body
class ACRegisters {private:	union reg_ax {		word ax;		struct {			byte al;			byte ah;		};	} _reg_ax;	union reg_bx {		word bx;		struct {			byte bl;			byte bh;		};	} _reg_bx;	union reg_cx {		word cx;		struct {			byte cl;			byte ch;		};	} _reg_cx;	union reg_dx {		word dx;		struct {			byte dl;			byte dh;		};	} _reg_d;public:	ACRegisters();	~ACRegisters();	word& ax;	byte& ah;	byte& al;	word& bx;	byte& bh;	byte& bl;			word& cx;	byte& ch;	byte& cl;	word& dx;	byte& dh;	byte& dl;};ACRegisters::ACRegisters() 		: ax(this->_reg_ax.ax)		, ah(this->_reg_ax.ah)		, al(this->_reg_ax.al)		, bx(this->_reg_bx.bx)		, bh(this->_reg_bx.bh)		, bl(this->_reg_bx.bl)		, cx(this->_reg_cx.cx)		, ch(this->_reg_cx.ch)		, cl(this->_reg_cx.cl)		, dx(this->_reg_dx.dx)		, dh(this->_reg_dx.dh)		, dl(this->_reg_dx.dl) {	this->ax = 0x0000;	this->bx = 0x0000;	this->cx = 0x0000;	this->dx = 0x0000;}