Exemplo n.º 1
0
        public void Peek2Poke2()
        {
            var mem = new MemoryModule();

            mem.InitRam();

            short writeValNeg = -32765;
            short writeValPos = 32765;

            mem.Poke2(MemoryModule.ADDR_GENERAL, writeValNeg);
            mem.Poke2(MemoryModule.ADDR_GENERAL + 2, writeValPos);

            short readValNeg = mem.Peek2(MemoryModule.ADDR_GENERAL);
            short readValPos = mem.Peek2(MemoryModule.ADDR_GENERAL + 2);

            Assert.AreEqual(writeValNeg, readValNeg);
            Assert.AreEqual(writeValPos, readValPos);
        }