DAT file include question
Cluso99
Posts: 18,069
Has anyone used the DAT File command?
Since it does not appear to copy in pasm statements for compiling, what is it's use?? The manual is quite skimpy in this section.
I am trying to put the debug block of code (for my debugger) into a separate file that can be simply included into the users top level object.
Since it does not appear to copy in pasm statements for compiling, what is it's use?? The manual is quite skimpy in this section.
I am trying to put the debug block of code (for my debugger) into a separate file that can be simply included into the users top level object.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Parallax Forums - If you're ready to learn, we're ready to help.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pull my finger!
Note that there's an example from Chip of a Propeller loader that uses a FILE statement to include a complete binary output file that's used to download to another Propeller.
That's exactly what I want. Hopefully the compiler will place it at the beginning. It is the debug block that must be in hub < $200. It makes it easier for users of my debugger to be able to just add a line in the DAT section of the top object to include the data.
Where it is placed seems to follow the same rules of DAT as usual, as if those 'byte' commands were placed where the FILE statement appears. I'll admit I only did limited testing. My FILE appeared immediately after the 'method link table' and before the first Spin method in the object it's used in just as DAT normally does.
(*) Added : There may be some $00 padding added after FILE to make anything which follows word or long aligned as required.
More added : Reading another thread it seems you may be using FILE "xxx.binary" in which case that will have all the prefix and postfix data bytes with the executable PASM which a normal Spin executable has. That's what was meant by having to run a utility to just strip out the bytes you need to create a file to use with the FILE command, or write your code which uses the FILE data to take that into account.
Post Edited (hippy) : 9/22/2008 2:26:30 PM GMT
Anyway, I have just embedded the source in a demo file and that code will need to be cut and pasted into any user code. Just a restriction I can't get around. I've posted all the debuggers today - 3 in all. One does PASM and the other two do SPIN (optionally with pasm of the Interpreter on the fly) using different methods. One patches the Rom Interpreter on the fly, but it is more messy. The other loads two RamInterpreters and the user code must be in cog 7. The debugger is common to all 3 modes.