Пример #1
0
        public uint GetAddress(uint hereAddress, byte mode, VcdReader addressSection)
        {
            uint address = 0;

            switch (GetMode(mode))
            {
            case AddressMode.Self:
                address = addressSection.ReadInteger();
                break;

            case AddressMode.Here:
                address = hereAddress - addressSection.ReadInteger();
                break;

            case AddressMode.Near:
                address = near[mode - 2] + addressSection.ReadInteger();
                break;

            case AddressMode.Same:
                int index = mode - (2 + NearSlots);
                address = same[index * 256 + addressSection.ReadByte()];
                break;
            }

            Update(address);
            return(address);
        }
Пример #2
0
        public uint GetAddress(uint hereAddress, byte mode, VcdReader addressSection)
        {
            uint address = 0;
            switch (GetMode(mode)) {
            case AddressMode.Self:
                address = addressSection.ReadInteger();
                break;

            case AddressMode.Here:
                address = hereAddress - addressSection.ReadInteger();
                break;

            case AddressMode.Near:
                address = near[mode - 2] + addressSection.ReadInteger();
                break;

            case AddressMode.Same:
                int index = mode - (2 + NearSlots);
                address = same[index * 256 + addressSection.ReadByte()];
                break;
            }

            Update(address);
            return address;
        }
Пример #3
0
 public WindowReader(Stream patch, Header header)
 {
     this.header = header;
     vcdReader = new VcdReader(patch);
     lastWindowLength = 0;
     lastWindowOffset = 0;
 }
Пример #4
0
 public WindowReader(Stream patch, Header header)
 {
     this.header      = header;
     vcdReader        = new VcdReader(patch);
     lastWindowLength = 0;
     lastWindowOffset = 0;
 }
Пример #5
0
        public Header Read(Stream patch)
        {
            vcdReader = new VcdReader(patch);

            // Checks the first four bytes of the patch
            CheckStamp();

            // Now let's go to the header
            return(ReadHeader());
        }
Пример #6
0
        public Header Read(Stream patch)
        {
            vcdReader = new VcdReader(patch);

            // Checks the first four bytes of the patch
            CheckStamp();

            // Now let's go to the header
            return ReadHeader();
        }