Exemple #1
0
        public FDSChunk(BinaryReader r)
        {
            if (r.ReadByte() != 3)
            {
                throw new InvalidOperationException("Bad Block Code");
            }
            Number  = r.ReadByte();
            ID      = r.ReadByte();
            Name    = FTXT.E.GetString(r.ReadBytes(8));
            Address = r.ReadUInt16();
            int size = r.ReadUInt16();

            FileKind = (FileKindE)r.ReadByte();

            if (r.ReadByte() != 4)
            {
                throw new InvalidOperationException("Bad Block Code");
            }
            Data = r.ReadBytes(size);
        }
Exemple #2
0
		public FDSChunk(BinaryReader r)
		{
			if (r.ReadByte() != 3)
				throw new InvalidOperationException("Bad Block Code");
			Number = r.ReadByte();
			ID = r.ReadByte();
			Name = FTXT.E.GetString(r.ReadBytes(8));
			Address = r.ReadUInt16();
			int size = r.ReadUInt16();
			FileKind = (FileKindE)r.ReadByte();

			if (r.ReadByte() != 4)
				throw new InvalidOperationException("Bad Block Code");
			Data = r.ReadBytes(size);
		}