Hello Peg,
Sorry for the delay in responding. This is my second attempt - I lost the first when my log-in to the forum timed out.
peg wrote:
But my main question is:
What are the benefits of doing command line absolute assembly in CW over P&E's stuff?
I like the idea of "more powerful conditional assembly directives" as P&E are very restrictive and the limitations only discovered through trial and error.
But is there anything else?
BTW I am very put off by using the full blown CW in assembler mode, its all just too complicated and abstruse.
I guess I am probably in the position where existing HC08 projects will remain in CASM08 format, but new projects will be done in CW format, whether in assembler or C. I seem to recall it was you who once said that, adding an 'S' to the part made the P&E solution expensive.
I recently converted a couple of my simpler past CASM08 projects to CW format, as a method of learning CW assembler - so far I have not used C for an embedded project (this is another learning curve). Another reason for becoming familiar CW assembler and C, is because it now seems to be the "lingua franca" in forums (perhaps the word should be fora) such as this.
The CASM08 conditional assembly directives I previously found very limiting, with nested conditional assembly, problematic. On the other hand, the CW assembler seems to behave predictably, with capability not unlike that of the C pre-processor (perhaps expected). As a simple example, I now have a file "default.inc" used for the automatic inclusion of a default interrupt handler, for all vectors not previously defined within the code. I could never achieve this with CASM08.
Another capapably, unavailable with CASM08, is the handling of simple structures within assembly code. Sub-routines may not be referenced within the structure, but there are other ways around this.
On the down side, I also find the complexity of the CW project structure rather daunting - compared with my very simple structure for CASM08 projects, with all files required for a project in a single directory. For an assembly project I would typically have the main ASM file plus perhaps two or three INCLUDE files. So the use of the CW tools as separate entities is more in keeping with the process I am used to - absolue assembly by default, a simple directory structure, and no .PRM file to worry about. At the moment, I see no particuar reason to move away from absolute assembly.
For future projects written in C, I will obviously need to use the full-blown CW project structure. However, so far the HC08 devices I have used are the QY2 and QY4, hardly canditates for C programming, when RAM and flash resources are tight. For new projects I am currently working on, I would like to use the QB8 (but am still having difficulty in getting hold of the silicon) - I am still tossing up whether to use assembler or C, but am leaning towards assembler because at least I know the code will fit (some of these are upgrades of old HC05 projects).
Regards,
Mac