let's see - I said that the external was the important declaration.
The assembler would declare it unreachable if the symbol did not
exist in the current module unless you used external, SO it is not
the same thing...
At 03:45 PM 10/12/2006, Chuck Guzis wrote:
On 10/12/2006 at 6:18 PM Steve Thatcher wrote:
actually we are both wrong, the macro was used to
make the call external
if needed. The near declaration was required to tell the assembler what
addressing to use. If the label was in the module being assembled, then
the assembler knew what size to use.
Let's see--I said:
>The INVOKE macro cited merely declares the
target of the call to be NEAR
>if not already defined.
Which is pretty much the same thing--right? If the symbol's not already
defined (at pass 2), then it doesn't exist in the same module and is
therefore defined as an external NEAR by the macro.
If the symbol was defined later in the same module, it would be defined as
of pass 2 (hence, the IF2 conditional--a plain old IF would cause serious
problems by defining the symbol during pass 1, only to have the darned
thing crop up later).
If the CALL target needed is FAR, it would have to be defined as such.
Later versions of MASM use the PROTO definition to define things in
advance, not only with regard to the NEAR or FAR call distance, but also as
to the type and number of arguments.
Cheers,
Chuck