Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.asm.x86    |    Ahh, the lost art of x86 assembly    |    4,675 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 3,731 of 4,675    |
|    R.Wieser to All    |
|    Re: Locals, parameters, callee-save regi    |
|    02 Jan 19 08:50:21    |
      From: address@nospicedham.not.available              Mike,              > Use a stack frame which contains [snipping regular stuff] and the       > maximum number of called function arguments all of which (including       > the function's parameters) are accessed by MOV (no PUSH/POP)       > with ESP.              That *sounds* like it could work. Though, whats that about *arguments*       (also referred to as parameters?) and the maximum number of them ? Thats       already handled by the RET (or by the caller). No reason to store that       number again.              Also, it would effectivily forbid the user to use PUSHes and POPs himself as       that would make ESP loose its pointer to the stackframe, which means you       would not be able to jump to the procedures exit point anymore (which is       what the OPS question is all about).              In other words, having an "anchour" by copying ESP into EBP makes a *lot* of       sense.              @OP:       The same came to my mind. Being able to easily discard local (and pushed       in the function itself) data without getting into problems with the saved       registers does seem sensible. Never found why its not done that way       though.              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca