What is the purpose of the 8 bytes at the end of the program?
Bobb Fwed
Posts: 1,119
In the Propeller Tool, under the F8 dialogue, after your program there is "FF FF F9 FF FF FF F9 FF". They're long-aligned.
What is their purpose?
I am creating a bit of software for a firmware update, and I'm wondering if these are important. They don't show up when you "Save Binary File", but they do when you "Save EEPROM File"
What is their purpose?
I am creating a bit of software for a firmware update, and I'm wondering if these are important. They don't show up when you "Save Binary File", but they do when you "Save EEPROM File"
Comments
Am guessing they are the return address on the stack used for the top level spin program. They point to the Spin Interpreter's stop COG byte code at hub address $FFF9 (sign extended to 32 bits). This will stop the interpreter when you exit from the top level SPIN function block. I'm not entirely sure why there are two copies however.
Edit: I think I'm talking about the ABORT statement and the corresponding way you catch aborts.
BTW, the checksum byte is calculated including the 2 extra stack frame longs even though the binary file doesn't include them. If you add up the bytes in a binary file you will get $14. If you add the extra 8 bytes from the initial stack frame you will get $00.
What I am writing is not for public consumption, so anything that gets programmed with the firmware updater will be extensively tested, and will definitely include infinite loops.
Alright, thanks.
But the two longs come after the VAR block. If I only receive the .binary file, there is no way to know how much space to reserve for the VAR block (or is there?).