z80:Opcodes:CALL
From Learn @ Cemetech
Revision as of 22:22, 5 February 2016 by Maintenance script (talk | contribs) (Initial automated import)
Pushes the address after the CALL instruction (PC+3) onto the stack and jumps to the label. Can also take conditions.
Syntax
call label ;unconditional call call cond.,label ;conditional call
Allowed Instructions
call label ;always calls call c,label ;calls if C flag is set call nc,label ;calls if C flag is reset call z,label ;calls if Z flag is set call nz,label ;calls if Z flag is reset call m,label ;calls if S flag is set call p,label ;calls if S flag is reset call pe,label ;calls if P/V is set call po,label ;calls if P/V is reset
Effects
Flags are preserved.
Uses
The most common use of CALL is to create routines that can be used multiple times.
T-States
cc is condition: NZ, Z, NC, C, PO, PE, P, M
XX | 17 |
condition true | condition false | |
cc,XX | 17 | 10 |
See Also
BIT,CP,CPD,CPDR,CPI,CPIR,DJNZ,JP,JR,RET