Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/25/11 08:17
Read: times


 
#180766 - "standard syntax" of '51 assemblers
This is a continuation of an unrelated topic from an other thread.

Jan Waclawek said:
[...] unfortunately, both [the SDCC assembler and the GNU assembler] have not quite standard syntax.


Per Westermark said:
Define "standard syntax".

Good point.

There are several things which can go under "standard syntax":
1. instructions mnemonics (including notation of different addressing modes)
2. predefined register names
3. syntax of pseudo-ops/directives, including macros if available
4. other formal requirements such as case sensitivity, usage of TABs, syntax of labels/symbols ("no leading space" vs. "followed by semicolon" paradigms), notation of literals (constants, hexadecimal, allowed complexity and operators and method of evaluation of expressions), etc.
5. anything important I have forgotten :-)

In the world of 8051 assemblers, the norm - as Per said - is set by the original Intel assembler. Now some of the other assemblers - say the Metalink assembler - conform to it quite well in every item of the above list; while others - including the GNU and SDCC assemblers - differ significantly, but they usually differ significantly only in item 3 (less usually also in 4).

It would be very strange if an assembler would use a different mnemonics than that defined by the original developer of the chip/core (*). Given the different architectures have usually different mnemonics, this also means, that one accustomed to Motorola or any other syntax would have trouble reading a '51 program even if both were written for the respective port of the GNU assembler (i.e. they both match in items 3 and 4).

Corollary is, that the various assemblers rarely have "standard full syntax", which reduces asm programs' portability, and this is one of the greatest weakness of assembly programming as such.

Comments, please.

JW


---
(*) I did commit this crime. Back then I persuaded my colleague to write us an assembler for the Intel '196 16-bit mcu, with mnemonics resembling the 6502 which we had used extensively in the period before, as I found the Intel mnemonics less logical and harder to remember. Interestingly, we found that we - including colleagues who joined the project later - did not have any problems using the Intel manuals etc. This was a tool internal to that company, though, so the incompatibility could not cause any problems beyond our own confusion.


List of 58 messages in thread
TopicAuthorDate
"standard syntax" of '51 assemblers            01/01/70 00:00      
   Use C            01/01/70 00:00      
      Use C - prudently            01/01/70 00:00      
         I hate C            01/01/70 00:00      
            Fight!            01/01/70 00:00      
            Time in the Trade            01/01/70 00:00      
               I'd submit that there are "gotcha's"            01/01/70 00:00      
                  The tools are better for HLL            01/01/70 00:00      
                  Gotchas!            01/01/70 00:00      
               Yes. Fight.            01/01/70 00:00      
                  why fight?            01/01/70 00:00      
                     that are still language-agnostic issues            01/01/70 00:00      
                        to Jan and others            01/01/70 00:00      
                           personal experience            01/01/70 00:00      
                  HLL productivity            01/01/70 00:00      
                     show me the proof            01/01/70 00:00      
                        Productivity article            01/01/70 00:00      
                           Tautologies!            01/01/70 00:00      
                              What's up with that???            01/01/70 00:00      
                           interesting but irrelevant            01/01/70 00:00      
                              Why is that irrelevant?            01/01/70 00:00      
                                 I think part of the confusion stems from this ...            01/01/70 00:00      
                                    which packages have you seen????            01/01/70 00:00      
                                       not those in recent history            01/01/70 00:00      
                                          I don't think that's true?            01/01/70 00:00      
                                             Common that consultants have commercial compilers            01/01/70 00:00      
                                                Who benefits?            01/01/70 00:00      
                                             Why would they buy that product at all?            01/01/70 00:00      
                                                So You are Niche            01/01/70 00:00      
                                          look at the link in my post above            01/01/70 00:00      
                                             Technology front            01/01/70 00:00      
                                                Richard doesn't exactly follow the technology front....            01/01/70 00:00      
                                                   and doesn't let that stop him ....            01/01/70 00:00      
                                                      Just because the paint is dry doesn't mean it won't work            01/01/70 00:00      
                                                   Perhaps not ...            01/01/70 00:00      
                                                Technology front? In '51 asm?            01/01/70 00:00      
                              again ... I have to agree            01/01/70 00:00      
                                 as usual, Richard            01/01/70 00:00      
                                    all you have to do is to read the whole message            01/01/70 00:00      
                        Do you test your code?            01/01/70 00:00      
                           sure I do            01/01/70 00:00      
                              What you can do ...            01/01/70 00:00      
                                 sw test harness            01/01/70 00:00      
                                    I don't know about yours, but mine can do that ...            01/01/70 00:00      
                                       Why didn't you read?            01/01/70 00:00      
                                          Well, I have to admit ...            01/01/70 00:00      
                                             You are forgetting memory variables in state machines            01/01/70 00:00      
                                                I think you're going over the top.            01/01/70 00:00      
                                                   Stop and think before you write            01/01/70 00:00      
                                                      Footnote about code coverage            01/01/70 00:00      
                                                         I agree with the principle, but not with the range            01/01/70 00:00      
                                                            Lucky you            01/01/70 00:00      
                                                               where you sit determines what you see            01/01/70 00:00      
                                                                  when seeing too little - get a chair to stand on            01/01/70 00:00      
                                                                     I'm not on board with all of that            01/01/70 00:00      
                                                                        I know, lifebuoy needed            01/01/70 00:00      
                  I have to agree            01/01/70 00:00      
            As I've often said ...            01/01/70 00:00      

Back to Subject List