Esempio n. 1
0
		public static string NameControlRegister(x86ControlRegister reg)
		{
			switch (reg)
			{
				case x86ControlRegister.CR0:
					return "CR0";
				case x86ControlRegister.CR1:
					return "CR1";
				case x86ControlRegister.CR2:
					return "CR2";
				case x86ControlRegister.CR3:
					return "CR3";
				case x86ControlRegister.CR4:
					return "CR4";
				case x86ControlRegister.CR5:
					return "CR5";
				case x86ControlRegister.CR6:
					return "CR6";
				case x86ControlRegister.CR7:
					return "CR7";
				default:
					throw new Exception("Invalid Control Register!");
			}
		}
Esempio n. 2
0
		public void WriteRegister(byte o, x86ControlRegister r)
		{
			WriteModRM(x86AddressingMode.Register, o, (byte)r);
		}