MSDOS Source code leaked

Chuck Guzis cclist at
Thu Oct 12 17:45:38 CDT 2006

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.


More information about the cctalk mailing list