Example #1
0
        public override void Process(Cpu cpu)
        {
            uint address = cpu.DecodeArgument(0);
            uint value   = cpu.DecodeArgument(1);

            cpu.MemoryBus.Write(address, value);   //Write back Result
        }
Example #2
0
        public override void Process(Cpu cpu)
        {
            uint addressSrcPtr = cpu.DecodeArgument(0);
            uint addressSrc    = cpu.MemoryBus.Read(cpu.MemoryBus.Read(addressSrcPtr));  // Dereference
            uint addressDst    = cpu.DecodeArgument(1);

            cpu.MemoryBus.Write(addressDst, addressSrc);   //Write back Result
        }
Example #3
0
        public override void Process(Cpu cpu)
        {
            uint addressSrc = cpu.DecodeArgument(0);
            uint addressDst = cpu.DecodeArgument(1);

            uint result = cpu.MemoryBus.Read(addressSrc);

            cpu.MemoryBus.Write(addressDst, result);   //Write back Result
        }
Example #4
0
        public override void Process(Cpu cpu)
        {
            uint addressA = cpu.DecodeArgument(0); //Number A Address
            uint addressB = cpu.DecodeArgument(1); //Number A Address

            uint a = cpu.MemoryBus.Read(addressA); //Read Value From RAM

            uint result = a ^ 0x80000000;          //Access Bit Sign Directly (interpret UINT as float)

            cpu.MemoryBus.Write(addressB, result); //Write back Result
        }
Example #5
0
        public override void Process(Cpu cpu)
        {
            uint a       = cpu.MemoryBus.Read(cpu.DecodeArgument(0));
            uint address = cpu.DecodeArgument(1);

            bool jmp = Calculate(a, 0);

            if (jmp)
            {
                cpu.SetState(address - InstructionSize);
            }
        }
Example #6
0
        public override void Process(Cpu cpu)
        {
            uint addressA = cpu.DecodeArgument(0); //Number A Address
            uint addressB = cpu.DecodeArgument(1); //Number B Address

            uint a = cpu.MemoryBus.Read(addressA); //Read Value From RAM
            uint b = cpu.MemoryBus.Read(addressB); //Read Value From RAM

            uint result = Calculate(a, b);         //Calculate Value

            cpu.MemoryBus.Write(addressA, result); //Write back Result
        }
Example #7
0
        public override void Process(Cpu cpu)
        {
            uint addr = cpu.DecodeArgument(0);
            uint val  = cpu.MemoryBus.Read(addr);

            cpu.Push(val);
        }
        public override void Process(Cpu cpu)
        {
            uint a       = cpu.DecodeArgument(0);
            uint address = cpu.MemoryBus.Read(a);

            cpu.PushState(address - InstructionSize);
        }
Example #9
0
        public override void Process(Cpu cpu)
        {
            uint addr = cpu.DecodeArgument(0);

            uint val = cpu.Pop();

            cpu.MemoryBus.Write(addr, val);
        }
Example #10
0
        public override void Process(Cpu cpu)
        {
            uint addr = cpu.DecodeArgument(0);

            uint val = cpu.GetInternalInterruptHandler();

            cpu.MemoryBus.Write(addr, val);
        }
Example #11
0
        public override void Process(Cpu cpu)
        {
            uint addressA = cpu.DecodeArgument(0);                   //Number A Address

            uint a = cpu.MemoryBus.Read(addressA);                   //Read Value From RAM

            uint result = (this as MathInstruction).Calculate(a, 1); //Calculate Value

            cpu.MemoryBus.Write(addressA, result);                   //Write back Result
        }
Example #12
0
 public override void Process(Cpu cpu)
 {
     cpu.FireInterrupt(cpu.DecodeArgument(0));
 }
Example #13
0
        public override void Process(Cpu cpu)
        {
            uint address = cpu.DecodeArgument(0);

            cpu.SetState(address - InstructionSize);
        }
 public override void Process(Cpu cpu)
 {
     cpu.SetInternalInterruptHandler(cpu.MemoryBus.Read(cpu.DecodeArgument(0)));
 }