What's in the first 16 bytes of the compiled binary ("initialization data")?
Keith Leinenbach
Posts: 25
What's in the first 16 bytes of the compiled binary ("initialization data")? The first 8 bytes are defined as CLKFREQ and CLKMODE, but what are the last 8?
I am curious because I wanted to know how to separate the program length from the variable length in a binary image. The Propeller Tool can differentiate these values with only a loaded binary with no code listing.
I thought it might be in the last 8 bytes, but it doesn't seem to match up.
Thanks!
Keith
I am curious because I wanted to know how to separate the program length from the variable length in a binary image. The Propeller Tool can differentiate these values with only a loaded binary with no code listing.
I thought it might be in the last 8 bytes, but it doesn't seem to match up.
Thanks!
Keith
Comments
vbase (start of VAR data) is only equal to the file size in *.binary files. For *.eeprom files, which are always 32k, it's not.
Roy
Oops on CLKMODE, only 1 byte!
Keith
These 8 bytes aren't included in a binary file, and they are added when the program is loaded to the Prop. If you add the bytes in a binary file you will get a sum of $14. If you add the 8 extra bytes to this you will get zero, so the checksum at location $0006 includes the extra bytes. The values of DCURR and DBASE normally differ by 8 due to the 8 extra bytes.
This information is not in the official Parallax documents. There is no single document with the details about how Spin operates, but you can find quite a bit of information at http://propeller.wikispaces.com/ .
Keith