Allowable "COMMENTS" with the SDS assembler -- as68000 |
The following "comment markers" are possible with a number of different compilers and assemblers
Comment markers are "assembler directives" and are software tool dependent. I therefore put the following simple file through the SDS as68000 tool with my favourite comment markers and "watched for smoke".
* Comments starting with * ; Comments starting with ; // C++ style Comments starting with // ! Comments starting with ! * Comments starting with * but indented ; Comments starting with ; but indented // C++ style Comments starting with // but indented ! Comments starting with ! but indented
The results in the listing file were informative
* Comments starting with * ; Comments starting with ; ! Comments starting with ! ----ERROR----> expected label or instruction * Comments starting with * but indented ----ERROR----> expected label or instruction ; Comments starting with ; but indented ! Comments starting with ! but indented ----ERROR----> expected label or instruction
It is your choice of what comment field marker you would like to use. I tend to use the ; (semicolon) simply because it is valid everywhere. The fact that it is accepted is useful as I often, unintentionally, add ";" after statements, especially if I have recently been doing a lot of "C" and "C++" programming!
However I also like using // comment markers as they looks "nicer" in my source files (.s extension). The fact that the comments don't appear in the listing files (.lst extension) does not matter. I only use my listing files when I have errors to find in my code. My code is planned so perfectly that I never have to look in the listing files any way!
I do use the * (star) comment field marker for marking different sections of the code. However, that's often an "after-thought" after I have got the code running and I'm preparing the file for archiving or as a teaching example.
Last modified: July 13, 1996 05:36 AM by M. Smith. Copyright -- M. R. Smith