Zilog Z80380 Manual do Utilizador Página 65

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 116
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 64
UM004001-COR1103 4–1
380 C-COMPILER USERS MANUAL
CHAPTER 4
RUN TIME ENVIRONMENT
FUNCTION CALLS
The C-compiler imposes a strict set of rules on function calls. Except for special runtime-
support functions, any function that calls or is called by a C-function must follow these rules.
Failure to adhere to these rules can disrupt the C-environment and cause a program to fail.
FUNCTION CALL STEPS
A function performs the following tasks when it calls another function:
1. The caller saves the registers that are in use.
2. The caller pushes the arguments on the stack in reverse order (the rightmost declared
argument is pushed first, and the leftmost is pushed last). This places the leftmost argument
on top of the stack when the function is called.
3. The caller calls the function.
4. When the called function is complete, the caller pops the arguments off the stack.
Vista de página 64
1 2 ... 60 61 62 63 64 65 66 67 68 69 70 ... 115 116

Comentários a estes Manuais

Sem comentários