Exemple #1
0
        public void Signed_8bit()
        {
            TestContext.WriteLine("signed 8bit");

            var val0  = (sbyte)cpu.signed(0);
            var val7f = (sbyte)cpu.signed(0x7F);
            var val80 = (sbyte)cpu.signed(0x80);
            var valff = (sbyte)cpu.signed(0xFF);

            //ushort valUndef = cpu.signed();
            Assert.That(val0, Is.EqualTo(0));
            Assert.That(val7f, Is.EqualTo(0x7f));
            Assert.That(val80, Is.EqualTo(-128));
            Assert.That(valff, Is.EqualTo(-1));
            //Assert.That(valUndef, Is.EqualTo(undefined));
        }