Beispiel #1
0
        private static void ScanSingleWord32(VirtualMachine vm)
        {
            ushort dest = vm.PhysicalMemory.GetUInt16(vm.Processor.ESBase + vm.Processor.EDI);

            Cmp.WordCompare(vm.Processor, (ushort)vm.Processor.AX, dest);

            if (!vm.Processor.Flags.Direction)
            {
                vm.Processor.EDI += 2;
            }
            else
            {
                vm.Processor.EDI -= 2;
            }
        }
Beispiel #2
0
        private static void CompareSingleWord32(VirtualMachine vm)
        {
            var    srcSegment = vm.Processor.GetOverrideBase(SegmentIndex.DS);
            ushort src        = vm.PhysicalMemory.GetUInt16(srcSegment + vm.Processor.ESI);
            ushort dest       = vm.PhysicalMemory.GetUInt16(vm.Processor.ESBase + vm.Processor.EDI);

            Cmp.WordCompare(vm.Processor, src, dest);

            if (!vm.Processor.Flags.Direction)
            {
                vm.Processor.ESI += 2;
                vm.Processor.EDI += 2;
            }
            else
            {
                vm.Processor.ESI -= 2;
                vm.Processor.EDI -= 2;
            }
        }