Slide 1 Slide 2 Slide 3 Slide 4 Slide 5 Slide 6 Slide 7 Slide 8 Slide 9 Slide 10 Slide 11 Slide 12 Slide 13 Slide 14 Slide 15 Slide 16 Slide 17 Slide 18 Slide 19 Slide 20 Slide 21 Slide 22 Slide 23 Product List
CPU-Slide16

ENTER and EXITD are optimized instructions that are useful when a subroutine is called using the C-language. In this very common operation, a stack frame must be created. This frame is an area on the stack that hold’s the auto variables used during the subroutine. These two instructions maximize the execution efficiency of subroutine calls and minimize the code space these operations require. The 3-byte ENTER instruction creates the proper stack frame. The format of this instruction is the ENTER op-code (2 bytes) followed by a byte that indicates the auto variable area the routine requires. The instructions then creates a stack frame by saving the FRAME BASE (FB) pointer onto the stack, setting FB to the top of the frame, and relocating the STACK POINTER (SP) appropriately.

PTM Published on: 2011-12-30