| |
Make Stack Frame
86/88 |
N |
186 |
Y |
286 |
Y |
386 |
Y |
486 |
Y |
ENTER locals, level |
Ovfl |
N |
Dir |
N |
Int |
N |
Trap |
N |
Sign |
N |
Zero |
N |
Aux |
N |
Prty |
N |
Carry |
N |
Modifies stack for entry to procedure for high level language.
Operand "locals" specifies the amount of storage to be allocated
on the stack. "Level" specifies the nesting level of the routine.
Paired with the LEAVE instruction, this is an efficient method of
entry and exit to procedures.
------------------------------------ Timing ----------------------------------
OpCode Instruction 386 286 86
C8 iw 00 ENTER imm16, 0 10 11
C8 iw 01 ENTER imm16, 1 12 15
C8 iw ib ENTER imm16, imm8 15+4(n-1) 12+4(n-1)
------------------------------------ Logic -----------------------------------
PUSH BP
frame = SP
if (level > 0) then
for each level
BP = BP - 4
PUSH [BP]
PUSH frame
BP = frame
See Also LEAVE |