Zilog Z16F2810 Manuel d'utilisateur Page 95

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 216
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 94
UM018809-0611 CALL Instruction
ZNEO
®
CPU Core
User Manual
79
CALL
Definition
CALL Procedure
Syntax
CALL dst
Operation
SPSP4
(SP)PC
PCdestination address
Description
A CALL instruction decrements the Stack Pointer (R15) by four and stores the current Program
Counter value on the top of the stack. The pushed PC value points to the first instruction follow-
ing the CALL instruction. Then the destination address is loaded into the Program Counter and
execution of the procedure begins. After the procedure completes, it uses a RET instruction to
pop the previous PC value and return from the procedure.
In assembly language, the destination is specified as a label or 32-bit address operand. When pos-
sible, the ZNEO CPU assembler automatically calculates a relative offset and generates relative
CALL opcodes to produce more efficient object code. For a relative CALL, the destination
address is the PC value plus two times the relative operand value.
In the CALL (Rs) syntax, if the contents of Rs are odd the least significant bit is discarded, so that
the call destination address is always an even number.
To invoke a 32-bit addressed call explicitly, use the CALLA instruction.
Flags
Flags are not affected by this instruction.
Syntax and Opcodes
Instruction, Operands Word 0 Word 1 Word 2
CALL (Rs) {F21H, Rs}
CALL rel12 {DH, rel12}
CALL rel24 {F1H, rel[23:16]} rel[15:0]
Vue de la page 94
1 2 ... 90 91 92 93 94 95 96 97 98 99 100 ... 215 216

Commentaires sur ces manuels

Pas de commentaire