End Of Program Code

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
Ron
Posts: 225
Joined: Wed Apr 11, 2007 6:15 pm
Has thanked: 2 times
Contact:

End Of Program Code

Post by Ron »

Hi,

I have been looking at the hex files and have found the same code at the end of each of about 8 programs.

The value is 0011.

Is this an end of program code?

If yes, is there any way for a program to extend past this marker and still have the program run?

I am trying to get a read flash command working in a PC application via RS232 and I want it to stop at the end of the actual program hex code. Right now I have it going to the last valid address.

I am hoping there is a common code in all files that is an end of program code, this way I can simply compare each byte as I read it and compare it to the "end of program code".

Thank you,

Ron

User avatar
Steve
Matrix Staff
Posts: 3427
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: End Of Program Code

Post by Steve »

The HEX files themselves have an end-of-file marker - :00000001FF - but this is not transfered into the chip itself.

As far as I know, there is no way of knowing where the end of the actual file is. You could assume that past the end of the program, all memory locations are not programmed (i.e. all 1's - 0x3FFF or 0xFFFF, depending on the chip family). But this may not be correct.

Post Reply