Professional Documents
Culture Documents
INSTRUCTION
S
CALL, JMP,
RET
Branching instructions
• Program branching instructions
are used to
control the flow of actions in a
program
• Some instructions provide
decision making capabilities
and transfer control to other
parts of the program.
– e.g. conditional and
unconditional branches
CALL ACALL & LCALL
• The 8051 provides 2 forms for
the CALL instruction:
– Absolute Call – ACALL
• Uses an 11-bit address
• The subroutine must be within the
same 2K page.
– Long Call – LCALL
• Uses a 16-bit address
• The subroutine can be anywhere.
– Both forms push the 16-bit
address of PC on the stack and
update the stack pointer.
A b so lu te C a ll – A C A L L a d d r1 1