News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Question about function use

Started by Gunner, January 22, 2011, 02:39:00 AM

Previous topic - Next topic

Gunner

If I have one parameter to a function and the pointer is already in esi, do I need to push esi?  Both work, but I am guessing the last one is better with a less push?

original:

invoke ParseLine, [esi]

ParseLine proc uses esi edi ebx pArray:DWORD

mov esi, pArray



call ParseLine

ParseLine proc uses esi edi ebx

mov esi, [esi]
~Rob (Gunner)
- IE Zone Editor
- Gunners File Type Editor
http://www.gunnerinc.com

jj2007

"Less push" is better. And you don't need "use esi" except if your proc changes esi and you need the old value.

Gunner

~Rob (Gunner)
- IE Zone Editor
- Gunners File Type Editor
http://www.gunnerinc.com