示例#1
0
 private void Given_FnType(ushort iName, ushort iTypeReturn)
 {
     writer.WriteByte(0x23); // TID_FUNCTION
     writer.WriteBeUInt16(iName);
     writer.WriteBeUInt16(0);
     writer.WriteByte(0);    // C near fn.
     writer.WriteBeUInt16(iTypeReturn);
 }
 private void Given_Bundle(byte nEntries, byte iSeg, params BundleEntry[] entries)
 {
     writer.WriteByte(nEntries);
     writer.WriteByte(iSeg);
     foreach (var entry in entries)
     {
         writer.WriteByte(entry.flags);
         if (entry.flags == 0)
         {
             break;
         }
         if (entry.iSeg != 0)
         {
             writer.WriteBeUInt16(0xCD3F);   // INT 3F [sic]
             writer.WriteByte(entry.iSeg);
         }
         writer.WriteLeUInt16(entry.offset);
     }
 }