Example #1
0
        public void alu_Rcl16()
        {
            _alu.FlagC = false;
            Assert.AreEqual(_alu.Rcl16(1, 2), 1 << 2);
            Assert.IsFalse(_alu.FlagC);

            Assert.AreEqual(_alu.Rcl16(0x8000, 1), 0);
            Assert.IsTrue(_alu.FlagC);

            _alu.FlagC = false;
            Assert.AreEqual(_alu.Rcl16(0x8000, 2), 1);
            Assert.IsFalse(_alu.FlagC);

            _alu.FlagC = true;
            Assert.AreEqual(_alu.Rcl16(0, 1), 1);
            Assert.IsFalse(_alu.FlagC);
        }