-
Notifications
You must be signed in to change notification settings - Fork 26
Description
We have a hex file that has data record with same baseSegment address

The file has address jumps between sectors but has same baseSegment address

Current class file has implementation for getting the segment info gives the correct number of segment address using getSegmentinfo(). "2" in our case, x00010000 and x00030000. The class also gives the block size for each segment address which are 47892 and 65536.
The class file while calculating the block size is assuming the start of the address is always "x0000", takes the last address in the sector (which is "x0001BB14") as its block-size (which is 47892 in our case). This calculation would be wrong as the start address is not zero always (like in our x3000xxxx sector and between our x1000xxxx sectors where it-jumps/start-with-non-zero address). These jumps should be taken into account.

If we do consider the jumps and non-zero-start-address, actual block-size should be 40992 (including the address jumps) for the first segment and 1024 for the second segment.
Each sector calculation is done as below
sectorStartAddresses: x00010000 totalSectordataLength: x2ec
sectorStartAddresses: x00011000 dataLength: x238
sectorStartAddresses: x00012000 dataLength: x378
sectorStartAddresses: x00012380 dataLength: x8544
sectorStartAddresses: x0001a8c8 dataLength: xfdc
sectorStartAddresses: x0001b8a8 dataLength: x1fc
sectorStartAddresses: x0001baa8 dataLength: x64
sectorStartAddresses: x0001bb10 dataLength: x4
Hoping to collaborate and make this code work for both cases.