#include "../../bootpack.h"

using namespace naskfunc;

CCr0::CCr0() {
}

CCr0& CCr0::operator =(dword cr) {
	store_cr0(cr);
	return *this;
}

CCr0& CCr0::operator |=(dword val) {
	dword cr = load_cr0();
	cr |= val;
	store_cr0(cr);
	return *this;
}

CCr0& CCr0::operator &=(dword val) {
	dword cr = load_cr0();
	cr &= val;
	store_cr0(cr);
	return *this;
}

CCr0::operator dword() const {
	return load_cr0();
}

CCr0 driver::cr0;
