??? 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 |