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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/06/07 06:31
Read: times


 
#136720 - Just a bit of semantics
Responding to: ???'s previous message
Hi Richard and Mike,

Richard wrote
The first field is a mnemonic (text) label, the second is the opcode, and the third and fourth, delimited with a comma, are the arguments. The fifth field (VERY IMPORTANT!) is the comment.


As I was taught, the second field you describe is the instruction, not the opcode. It is the mneumonic. The label should be an actual word. And I believe that this is what Mike is refering to, as was Michael before him, by "text baded" instructions.

Also, at least as I was taught, the opcode is the actual binary or hexadecimal number that the mneumonic and arguments are translated into.

I agree with you, though perhaps not as adamantly, about comments.

Mike,

Concerning writing your own assembler, I would like to offer a suggestion. Write a simple program in assmebler mneumonics and assmble it yourself into actual opcodes. This is an excellent learning exercise. You will quickly learn why assemblers and compilers have to make multiple passes. You will also gain a newfound understanding of things like linking and mapping. I even recommend that you translate your assembled code into Intel HEX for downloading into your ยต-controller. There is real value in doing the exercise.

However, I would not recommend that you write your own assembler. I'm not saying don't, if you want to for your own reasons. I'm just saying it isn't going to give you any particular insight into th 805x that the exercise I just discussed.

Moreover, and this is important, pay attention to Michael's admonition about reinventing the wheel. To do this once or twice as a learning exercise is fine, but once you are past learning the 805x and are ready to start using the 805x, you need to avoid the temptation to reinvent everything. Those who came before us did a pretty good job. And I can tell you that for my money, you aren't going to find a better freeware development tool set than the Keil demo software (as long as you can live with the limitations).

That's my 2 cents worth.

Joe


List of 43 messages in thread
TopicAuthorDate
8051 opcodes            01/01/70 00:00      
   A disassembler?            01/01/70 00:00      
   Visit The Chart            01/01/70 00:00      
      answer            01/01/70 00:00      
         Text-based instructions?            01/01/70 00:00      
            Just a bit of semantics            01/01/70 00:00      
               Just a bit of spelling            01/01/70 00:00      
               We must have learned it differently            01/01/70 00:00      
                  I learned the same was as Joseph            01/01/70 00:00      
                     nobody disputes the definition of mnemonic            01/01/70 00:00      
                        Clarification?            01/01/70 00:00      
                           Late in the conversation            01/01/70 00:00      
                              Yes, we\'re getting lost ...            01/01/70 00:00      
                                 I DID find an assembler for me            01/01/70 00:00      
                                    Yes, that's a good one!            01/01/70 00:00      
                        I doubt it            01/01/70 00:00      
                           BIOS Code In Assembler            01/01/70 00:00      
                              even more a coincidence            01/01/70 00:00      
                                 Me too....            01/01/70 00:00      
                           in college...            01/01/70 00:00      
                              Yes, but was that for a BS degree?            01/01/70 00:00      
                                 yep            01/01/70 00:00      
                                 it's not exactly learning asm which is needed...            01/01/70 00:00      
                                    send me his resume            01/01/70 00:00      
                                       we have to teach him every day            01/01/70 00:00      
            .            01/01/70 00:00      
         I have to tell you an Assembler Story            01/01/70 00:00      
            Very true            01/01/70 00:00      
               Learning Is Great !!            01/01/70 00:00      
                  Why didnt you mention to them..            01/01/70 00:00      
                     I Discussed Endlessly            01/01/70 00:00      
                  I once wrote an assembler            01/01/70 00:00      
                     2 pieces            01/01/70 00:00      
                        well,            01/01/70 00:00      
                        Suggestions            01/01/70 00:00      
                        Why would you want to write your own?            01/01/70 00:00      
                     Me too            01/01/70 00:00      
               Compiler?            01/01/70 00:00      
                  My reasoning            01/01/70 00:00      
         SDCC (again)            01/01/70 00:00      
   Is this a continuation...            01/01/70 00:00      
      Must not be...            01/01/70 00:00      
         I think there's room for doubt            01/01/70 00:00      

Back to Subject List