Ver Mensaje Individual
  #15  
Antiguo 31-08-2006
Avatar de seoane
[seoane] seoane is offline
Miembro Premium
 
Registrado: feb 2004
Ubicación: A Coruña, España
Posts: 3.717
Reputación: 24
seoane Va por buen camino
Cita:
Empezado por roman
Una pregunta, supongo que EAX y EDX "apuntan" a Source y Dest. Ésto, ¿cómo lo sabes? Si hubiera más parámetros, ¿cuáles registros se usarían?
Cita:
Empezado por Ayuda de Delphi
Under the register convention, up to three parameters are passed in CPU registers, and the rest (if any) are passed on the stack. The parameters are passed in order of declaration (as with the pascal convention), and the first three parameters that qualify are passed in the EAX, EDX, and ECX registers, in that order. Real, method-pointer, variant, Int64, and structured types) do not qualify as register parameters, but all other parameters do. If more than three parameters qualify as register parameters, the first three are passed in EAX, EDX, and ECX, and the remaining parameters are pushed onto the stack in order of declaration.
Resumiendo, si se usa la directiva register (es la que se utiliza por defecto) a la hora de declarar la funcion, los 3 primeros parametros se pasan en los registros EAX, EDX y ECX, en ese mismo orden, y el resto en la pila.
Responder Con Cita