You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Hi and thanks for writing and sharing your use case. This is a little side project that I dip in and out of from time to time.
I need some more time to understand the issue you're having because I've not looked at the code for several months.
I think your needs require some extra functionality as the base segment address doesn't (according to my understanding) indicate anything other than an offset address for a register in an Intel architecture processor. Intel HEX file format is very simple with no meta-data. It simply records data at 16-bit addresses (which could be for any type of processor architecture), the contents of two possible Intel processor registers, and the start address of the code.
I'll take a look when I have a moment and post an update.
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.
The text was updated successfully, but these errors were encountered: