Chapter 3
Functions
ENTER
[ Syntax ]
ENTER
src
[ Operation ]
SP
M(SP)
FB
SP
[ Function ]
• This instruction generates a stack frame.
• The diagrams below show the stack area status before and after the ENTER instruction is executed at
the beginning of a called subroutine.
Before instruction execution
SP
Return address (L)
Return address (M)
Return address (H)
Argument of function
[ Selectable src ]
#IMM8
[ Flag Change ]
Flag
U
I
O B
Change
[ Description Example ]
ENTER
#3
[ Related Instructions ]
Build stack frame
ENTER function
SP
–
2
FB
SP
SP
–
src
Direction in
which address
increases
src
S
Z
D
C
EXITD
[ Instruction Code/Number of Cycles ]
src
represents the size of the stack frame.
After instruction execution
SP
Auto variable area
FB
Return address (L)
Return address (M)
Return address (H)
Argument of function
72
3.2 Functions
ENTER
Number of bytes
indicated by
FB (L)
FB (H)
Page=177
src