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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/14/11 06:21
Read: times


 
#182648 - RE: optimize LJMPs to AJMPs, etc
Responding to: ???'s previous message
Maarten Brock said:
10. AJMP/ACALL is only relevant on 2kB limited devices IMHO, otherwise they just use up expensive instructions

Jan Waclawek said:
I think Keil's assembler knows to optimize LJMPs to AJMPs where possible

The Keil Assembler has CALL and JMP "generic" mnemonics:
Keil Ax51 Manual said:
CALL JMP
Generic jumps and calls are two instruction mnemonics that do not represent a specific opcode:

JMP may assemble to SJMP, AJMP, LJMP or EJMP;

CALL may assemble to ACALL, LCALL or ECALL.

These generic mnemonics always evaluate to an instruction, not necessarily the shortest, that will reach the specified program address operand.

http://www.keil.com/support/m...ddress.htm


For the Keil C51 Compiler, the ROM directive controls which Jump & Call instructions are used:
Keil C51 Manual said:
You use the ROM directive to specify the size of the program memory. This directive affects the coding of the JMP and CALL instructions.

http://www.keil.com/support/m...51_rom.htm





List of 17 messages in thread
TopicAuthorDate
8051 core quiz            01/01/70 00:00      
   quizes are out of fashion these days...            01/01/70 00:00      
      I did it....            01/01/70 00:00      
         thanks            01/01/70 00:00      
      missed CJNE            01/01/70 00:00      
         indeed            01/01/70 00:00      
            I guess a quite frequent oversight            01/01/70 00:00      
            RE: optimize LJMPs to AJMPs, etc            01/01/70 00:00      
      Maybe?            01/01/70 00:00      
         caught again!            01/01/70 00:00      
            Most common 8051 assembly mistake?            01/01/70 00:00      
               Not just 8051?            01/01/70 00:00      
                  Different assemblers have different probabilities            01/01/70 00:00      
                     Conceptual & Typographical errors            01/01/70 00:00      
                        some assemblers do            01/01/70 00:00      
                        Readability helps            01/01/70 00:00      
                     99's            01/01/70 00:00      

Back to Subject List