/// <summary>
        /// This function adds the current record's data to the memory image.
        /// </summary>
        public void SaveRecordData()
        {
            var memaddress = AddressOffset + Address;

            // if new address segment starts, save the previous one first
            if (memaddress != (SegmentEndAddress + 1u))
            {
                FlushSegment();
                SegmentStartAddress = memaddress;
            }

            MemoryBlocks.Add(Data);
            SegmentEndAddress = memaddress + (uint)Data.Length - 1u;
        }