Exemplo n.º 1
0
 private byte[] CreateMsdosHeader()
 {
     ImageWriter stm = new LeImageWriter(new byte[16]);
     stm.WriteByte(0x4D);    // MZ
     stm.WriteByte(0x5A);
     stm.WriteBytes(0xCC, 4);
     stm.WriteLeUInt16(0x0090);
     stm.WriteBytes(0xCC, 0x12);
     stm.WriteByte(0x00);
     stm.WriteByte(0x00);
     stm.WriteByte(0x05);
     stm.WriteByte(0x21);
     stm.WriteString("PKLITE", Encoding.ASCII);
     stm.WriteBytes(0xCC, 0x0C);
     return stm.Bytes;
 }
Exemplo n.º 2
0
 private void Given_IndirectTable_UInt32(Address address,  Address addrIndirect, params uint[] entries)
 {
     ImageSegment seg;
     program.SegmentMap.Segments.TryGetValue(address, out seg);
     var writer = new LeImageWriter(seg.MemoryArea, address);
     foreach (uint entry in entries)
     {
         writer.WriteLeUInt32(entry);
     }
     writer = new LeImageWriter(seg.MemoryArea, addrIndirect);
     for (int i = 0; i< entries.Length; ++i)
     {
         writer.WriteByte((byte)i);
     }
 }