??? 04/13/08 22:17 Read: times |
#153207 - Unnecessary complication Responding to: ???'s previous message |
Richard Erlacher said:
He wants to understand it.
If you're one of those individuals who simply types in the code and doesn't concern himself with what really happens, how the instruction really works, then you get what you deserve. It's possible to "get by" with that, but knowing and understanding what you're doing is a better way to proceed. RE If I am writing some assembly code, I obey the documentation about valid operations and valid range in the arguments. I write the statements. If I am writing an 8051 assembler, I read the manufacturer's documentation. This states the bits in the opcode. If I am writing a disassembler, I take great note of the bit patterns. I would imagine that with your simulator project, you take great note of the opcode bitfields. Uttam is writing assembly code. It seems sensible to write: ACALL address or LCALL address instead of having to calculate the bits in the opcode and the value of the operand. And handle the legal range. DB opcode, operand I would agree that you can handle this with a macro. It just seems unnecessary when you already have a working assembler. David. |