Zilog Z80380 Uživatelský manuál Strana 66

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 116
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 65
Function Calls Run Time Environment
4–2 UM004001-COR1103
FIGURE 4-1. FRAME LAYOUT
RESPONSIBILITIES OF A CALLED FUNCTION
A called function must perform the following tasks.
1. Push the frame pointer (IX) onto the stack.
2. Allocate the local frame.
3. Execute the code for the function.
4. If the function returns a scalar value it is placed in the accumulator (HL register for scalars
greater than eight bits and the
A register for eight-bit scalars).
5. Deallocate the local frame.
6. Restore the caller’s frame pointer.
7. Return.
ParameterN
.
.
.
Parameter 1
Parameter 0
Return address
Callers frame pointer (IX)
Locals
Temporaries
Low Address
Stack Pointer
Frame Pointer
Run Time Stack
High Address
Zobrazit stránku 65
1 2 ... 61 62 63 64 65 66 67 68 69 70 71 ... 115 116

Komentáře k této Příručce

Žádné komentáře