News:

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

ARG in 32 bit

Started by gedumer, April 17, 2007, 01:03:53 AM

Previous topic - Next topic

gedumer

Your GoAsm docs state that ARG is valid for both 32 and 64 bit, but GoAsm rejects it for 32 bit. I got the impression that ARG was a way of making 32 bit code compile for 64 bit apps.

1rDirEctoALgran0

You are right !  :thumbu
you must use the x86 or x64 option.

Regards

API.ZIP is an excerpt of my GoDevTool Memento CHM help file. :green2

[attachment deleted by admin]

jorgon

Hi gedumer

Welcome to the GoAsm forum.

You are quite right about this.  I should have made it clearer in the GoAsm manual that use of ARG is only intended for 32/64 bit compatible code (either x86 or x64).
I think I made this strict to ensure that users didn't use ARG willy-nilly in 32-bit source code, bearing in mind it would only really be a PUSH which is more obvious and is a proper mnemonic.

However now you mention it, it occurs to me it may be a little arrogant to dictate to users in this way.  Although I still think the rule is a valid one, I am willing to consider whether to relax the rule to enable you to use ARG instead of PUSH in ordinary 32-bit source code.  It might for example, enable you when writing 32-bit code to distinguish in your own source between API parameters (use ARG) and simple preservation of registers (use PUSH).  On the other hand, people might start to use ARG instead of PUSH to preserve registers and then as the source is handed round, people might not really understand what they are doing with ARG and why.  A bit like the misuse of PROC in MASM.  That would go against the GoAsm philosophy of source code clarity and understanding.
Author of the "Go" tools (GoAsm, GoLink, GoRC, GoBug)