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); }
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; }
public WindowReader(Stream patch, Header header) { this.header = header; vcdReader = new VcdReader(patch); lastWindowLength = 0; lastWindowOffset = 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()); }
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(); }