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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
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.

List of 42 messages in thread
TopicAuthorDate
Problem with ACALL instruction            01/01/70 00:00      
   It is an absolute paged call...            01/01/70 00:00      
      my question is different            01/01/70 00:00      
         The Opcode is Selected...            01/01/70 00:00      
   not using an assembler?            01/01/70 00:00      
      still confused...            01/01/70 00:00      
         Not possible, use LCALL            01/01/70 00:00      
            Why should anyone WANT to know the hex            01/01/70 00:00      
               he'd want to know it because ...            01/01/70 00:00      
                  Unnecessary complication            01/01/70 00:00      
         compiler results error            01/01/70 00:00      
            There is no compiler involved. Just an assembler.            01/01/70 00:00      
         3 top bits of 11-bit address            01/01/70 00:00      
            only good for calls within the same 2K block            01/01/70 00:00      
            one more question...            01/01/70 00:00      
               Read your instruction set            01/01/70 00:00      
                  i am making an assembler.            01/01/70 00:00      
                     Now I understand. Far more interesting.            01/01/70 00:00      
                        Absolute Assembler            01/01/70 00:00      
                           what is an absolute assembler            01/01/70 00:00      
                              Which do you love.            01/01/70 00:00      
                                 actually I didn't            01/01/70 00:00      
                                    Linking assemblers are more complicated            01/01/70 00:00      
                     why not?            01/01/70 00:00      
               ajmp            01/01/70 00:00      
                  Reconsider Robert....            01/01/70 00:00      
                     positive offset...            01/01/70 00:00      
                        No !!!            01/01/70 00:00      
                           let's try this way            01/01/70 00:00      
                              abc?            01/01/70 00:00      
                                 I do not know how micro            01/01/70 00:00      
                                    can any1 tell abc??            01/01/70 00:00      
                                       As easy as 'abc'            01/01/70 00:00      
                                       How to get ABC            01/01/70 00:00      
                           whats the operand here?            01/01/70 00:00      
                              neither!!!!            01/01/70 00:00      
                                 is that an error?            01/01/70 00:00      
                                    error, not necessarily, but ..            01/01/70 00:00      
                                    it is not an error, but it is poor practice            01/01/70 00:00      
                        Not offset            01/01/70 00:00      
                           Oops, I was wrong earlier            01/01/70 00:00      
   Problem solved            01/01/70 00:00      

Back to Subject List