Groups | Search | Server Info | Login | Register


Groups > comp.os.os2.programmer.misc > #1861

Re: loader

Subject Re: loader
Newsgroups comp.os.os2.programmer.misc
References (3 earlier) <urc9ed$13job$1@dont-email.me> <urd1vu$18mln$1@dont-email.me> <urggi7$24i42$1@dont-email.me> <1555304872.730765612.509768.peter_flass-yahoo.com@news.eternal-september.org> <urme2j$3maq2$1@dont-email.me>
From Dave Yeo <dave.r.yeo@gmail.com>
Message-ID <nkODN.101569$GX69.2827@fx46.iad> (permalink)
Date 2024-02-28 14:20 -0800

Show all headers | View raw


Paul Edwards wrote:
> He seemed annoyed that he couldn't access doscalls
> functions by name instead of ordinal and asked me if
> there was a reason for that. Anyone know?

There's also the RESIDENTNAME key word. From the toolkits documentation, 
Tools Reference. Ignore the pwords stuff, doesn't apply to protected 
mode as far as I know.
...
Export-Definition Syntax

entryname [=internalname] [@ord[RESIDENTNAME]] [pwords]

<entryname>
The function name as it is known to other modules.

<internalname>
The actual name of the export function as it appears within the module 
itself; by default, this name is the same as <entryname>.

<ord>
The function's ordinal position within the module definition table. If 
this field is used, the function's entry point can be invoked by name or 
by ordinal. Use of ordinal positions is faster and may save space.

RESIDENTNAME
Indicates that the function's name be kept resident in memory at all 
times. This keyword is applicable only if <ord> is used. If <ord> is not 
used, OS/2 automatically keeps the names of all exported functions 
resident in memory by default.

<pwords>
The total size of the function's parameters, as measured in words (bytes 
divided by two). This field is required only if the function executes 
with I/O privilege. When a function with I/O privilege is called, OS/2 
consults <pwords> to determine how many words to copy from the caller's 
stack to the I/O-privileged function's stack.

Example

EXPORTS
   SampleRead = read2bin @8
   StringIn = str1       @4 RESIDENTNAME
   CharTest  6

This example defines three export functions:

SampleRead
StringIn
CharTest

The first two functions can be accessed either by their exported names 
or by an ordinal number. Note that in the module's own source code, 
these functions are actually defined as read2bin and str1, respectively. 
The last function runs with I/O privilege and therefore is given with 
the total size of the parameters - six words.
...
Dave

Back to comp.os.os2.programmer.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

loader Paul Edwards <mutazilah@gmail.com> - 2024-02-20 16:10 +0800
  Re: loader Peter Flass <peter_flass@yahoo.com> - 2024-02-20 17:45 -0700
    Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-02-21 10:51 +0800
  Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-02-24 06:14 +0800
    Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-02-24 11:38 +0800
  Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-02-24 15:24 +0800
    Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-02-24 15:46 +0800
      Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-02-24 16:30 +0800
        Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-02-24 23:30 +0800
        Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-02-24 23:28 +0800
          Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-02-26 06:56 +0800
            Re: loader Peter Flass <peter_flass@yahoo.com> - 2024-02-27 15:41 -0700
              Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-02-28 12:50 +0800
                Re: loader Dave Yeo <dave.r.yeo@gmail.com> - 2024-02-28 14:04 -0800
                Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-02-29 06:56 +0800
                Re: loader Dave Yeo <dave.r.yeo@gmail.com> - 2024-02-28 19:11 -0800
                Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-02-29 11:46 +0800
                Re: loader Dave Yeo <dave.r.yeo@gmail.com> - 2024-02-28 23:02 -0800
                Re: loader Paul Edwards <mutazilah@gmail.com> - 2024-03-01 07:15 +0800
                Re: loader Dave Yeo <dave.r.yeo@gmail.com> - 2024-02-28 14:20 -0800
              Re: loader Dave Yeo <dave.r.yeo@gmail.com> - 2024-02-28 13:52 -0800
                Re: loader Peter Flass <peter_flass@yahoo.com> - 2024-02-28 17:43 -0700

csiph-web