Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Digital circuits are made from analog parts. -- Don Vonada


devel / alt.lang.asm / Borlands Tasm32 v5 and external values (in a DLL)

SubjectAuthor
* Borlands Tasm32 v5 and external values (in a DLL)R.Wieser
`* Re: Borlands Tasm32 v5 and external values (in a DLL)Rosario19
 +* Re: Borlands Tasm32 v5 and external values (in a DLL)Rosario19
 |`* Re: Borlands Tasm32 v5 and external values (in a DLL)Kerr-Mudd, John
 | `- Re: Borlands Tasm32 v5 and external values (in a DLL)Rosario19
 `* Re: Borlands Tasm32 v5 and external values (in a DLL)R.Wieser
  +* Re: Borlands Tasm32 v5 and external values (in a DLL)JJ
  |`- Re: Borlands Tasm32 v5 and external values (in a DLL)R.Wieser
  `* Re: Borlands Tasm32 v5 and external values (in a DLL)Rosario19
   +- Re: Borlands Tasm32 v5 and external values (in a DLL)Rosario19
   `- Re: Borlands Tasm32 v5 and external values (in a DLL)R.Wieser

1
Borlands Tasm32 v5 and external values (in a DLL)

<uvoqhg$1m791$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=520&group=alt.lang.asm#520

  copy link   Newsgroups: alt.lang.asm
Path: i2pn2.org!i2pn.org!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: address@is.invalid (R.Wieser)
Newsgroups: alt.lang.asm
Subject: Borlands Tasm32 v5 and external values (in a DLL)
Date: Wed, 17 Apr 2024 17:40:12 +0200
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <uvoqhg$1m791$1@dont-email.me>
Injection-Date: Wed, 17 Apr 2024 17:40:32 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="206ecdd52bf8936f03f85e75e6296f94";
logging-data="1776929"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19+Oc9TBhFAYyQkf1UXcwyUMC42iWXVymvg7KeJDTYl6A=="
Cancel-Lock: sha1:1NCP8Np63zMmAUNHom3R1+C0/sY=
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
 by: R.Wieser - Wed, 17 Apr 2024 15:40 UTC

Hello all,

I've been using Borlands Tasm32 v5 for a while now, but have a bit of a
problem with declaring strings and values inside a dll.

For instance, CRTDLL.DLL exposes "_iob", which is/should be (a pointer to)
an array of stdio control structures.

And I have no idea how to define it. :-|

Worse: when I checked _IOB points to a "JMP [...]" (indirect jump) byte
sequence (and not a pointer to the actual data).

The question is, does anyone (stil) know how to declare such an external
value / string ?

Regards,
Rudy Wieser

Re: Borlands Tasm32 v5 and external values (in a DLL)

<k77i2jd33rru11rmcqf18nlqtio9svc92v@4ax.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=521&group=alt.lang.asm#521

  copy link   Newsgroups: alt.lang.asm
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Ros@invalid.invalid (Rosario19)
Newsgroups: alt.lang.asm
Subject: Re: Borlands Tasm32 v5 and external values (in a DLL)
Date: Wed, 24 Apr 2024 16:55:02 +0200
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <k77i2jd33rru11rmcqf18nlqtio9svc92v@4ax.com>
References: <uvoqhg$1m791$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 24 Apr 2024 16:54:58 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="213c8e58b9062d975f784cca4700b33f";
logging-data="2510747"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/n2Ms4b2kAMm0xyh4mWzRCccQADKKwB4w="
Cancel-Lock: sha1:57UilEKE9LJBhrZV9mquEQdumUs=
X-Newsreader: Forte Free Agent 1.93/32.576 English (American)
 by: Rosario19 - Wed, 24 Apr 2024 14:55 UTC

On Wed, 17 Apr 2024 17:40:12 +0200, "R.Wieser" wrote:

>Hello all,
>
>I've been using Borlands Tasm32 v5 for a while now, but have a bit of a
>problem with declaring strings and values inside a dll.
>
>For instance, CRTDLL.DLL exposes "_iob", which is/should be (a pointer to)
>an array of stdio control structures.
>
>And I have no idea how to define it. :-|
>
>Worse: when I checked _IOB points to a "JMP [...]" (indirect jump) byte
>sequence (and not a pointer to the actual data).
>
>The question is, does anyone (stil) know how to declare such an external
>value / string ?
>
>Regards,
>Rudy Wieser
>

this seems to speak of write one dll in tasm
https://tolik-punkoff.com/2022/05/09/writing-win32-programs-in-assembly-language-using-tasm/

Re: Borlands Tasm32 v5 and external values (in a DLL)

<v48i2j9v59ofv2mgbgtnsdf9mvqat4j7b8@4ax.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=522&group=alt.lang.asm#522

  copy link   Newsgroups: alt.lang.asm
Path: i2pn2.org!i2pn.org!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Ros@invalid.invalid (Rosario19)
Newsgroups: alt.lang.asm
Subject: Re: Borlands Tasm32 v5 and external values (in a DLL)
Date: Wed, 24 Apr 2024 17:10:31 +0200
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <v48i2j9v59ofv2mgbgtnsdf9mvqat4j7b8@4ax.com>
References: <uvoqhg$1m791$1@dont-email.me> <k77i2jd33rru11rmcqf18nlqtio9svc92v@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 24 Apr 2024 17:10:26 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="213c8e58b9062d975f784cca4700b33f";
logging-data="2517509"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18guN5RwUDCs1ZBoMvDUhQys+oqbCMu9Xc="
Cancel-Lock: sha1:2rsjD49+JzAfYF/ujtL0RVKmOWc=
X-Newsreader: Forte Free Agent 1.93/32.576 English (American)
 by: Rosario19 - Wed, 24 Apr 2024 15:10 UTC

On Wed, 24 Apr 2024 16:55:02 +0200, Rosario19 <Ros@invalid.invalid>
wrote:

>On Wed, 17 Apr 2024 17:40:12 +0200, "R.Wieser" wrote:
>
>>Hello all,
>>
>>I've been using Borlands Tasm32 v5 for a while now, but have a bit of a
>>problem with declaring strings and values inside a dll.
>>
>>For instance, CRTDLL.DLL exposes "_iob", which is/should be (a pointer to)
>>an array of stdio control structures.
>>
>>And I have no idea how to define it. :-|
>>
>>Worse: when I checked _IOB points to a "JMP [...]" (indirect jump) byte
>>sequence (and not a pointer to the actual data).
>>
>>The question is, does anyone (stil) know how to declare such an external
>>value / string ?
>>
>>Regards,
>>Rudy Wieser
>>
>
>this seems to speak of write one dll in tasm
>https://tolik-punkoff.com/2022/05/09/writing-win32-programs-in-assembly-language-using-tasm/

here one other link of someone wrote dll in tasm
https://rootbiez.blogspot.com/2010/03/tasm-writing-dll-in-tasm32.html

that question it seems for 2011

Re: Borlands Tasm32 v5 and external values (in a DLL)

<20240424164749.ccadc173a6082dafcad2409b@127.0.0.1>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=523&group=alt.lang.asm#523

  copy link   Newsgroups: alt.lang.asm
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: admin@127.0.0.1 (Kerr-Mudd, John)
Newsgroups: alt.lang.asm
Subject: Re: Borlands Tasm32 v5 and external values (in a DLL)
Date: Wed, 24 Apr 2024 16:47:49 +0100
Organization: Dis
Lines: 41
Message-ID: <20240424164749.ccadc173a6082dafcad2409b@127.0.0.1>
References: <uvoqhg$1m791$1@dont-email.me>
<k77i2jd33rru11rmcqf18nlqtio9svc92v@4ax.com>
<v48i2j9v59ofv2mgbgtnsdf9mvqat4j7b8@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 24 Apr 2024 17:47:49 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="e51be329ed7823964ae6c4dcd8534951";
logging-data="2533435"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19JkjkavaLsCc0lBxMBIUgNbagT3UMXTos="
Cancel-Lock: sha1:jCHjQ39xhIqIfRCFWU4/B+utdrI=
SigSep: is ALWAYS dash dash space newline
GNU: Terry Pratchett
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
;X-no-Archive: Maybe
 by: Kerr-Mudd, John - Wed, 24 Apr 2024 15:47 UTC

On Wed, 24 Apr 2024 17:10:31 +0200
Rosario19 <Ros@invalid.invalid> wrote:

> On Wed, 24 Apr 2024 16:55:02 +0200, Rosario19 <Ros@invalid.invalid>
> wrote:
>
> >On Wed, 17 Apr 2024 17:40:12 +0200, "R.Wieser" wrote:
> >
> >>Hello all,
> >>
> >>I've been using Borlands Tasm32 v5 for a while now, but have a bit of a
> >>problem with declaring strings and values inside a dll.
> >>
> >>For instance, CRTDLL.DLL exposes "_iob", which is/should be (a pointer to)
> >>an array of stdio control structures.
> >>
> >>And I have no idea how to define it. :-|
> >>
> >>Worse: when I checked _IOB points to a "JMP [...]" (indirect jump) byte
> >>sequence (and not a pointer to the actual data).
> >>
> >>The question is, does anyone (stil) know how to declare such an external
> >>value / string ?
> >>
> >>Regards,
> >>Rudy Wieser
> >>
> >
> >this seems to speak of write one dll in tasm
> >https://tolik-punkoff.com/2022/05/09/writing-win32-programs-in-assembly-language-using-tasm/
>
> here one other link of someone wrote dll in tasm
> https://rootbiez.blogspot.com/2010/03/tasm-writing-dll-in-tasm32.html
>
> that question it seems for 2011

Glad to see your still posting! I'm working on a simple 'frogger' game in
<256 bytes.

--
Bah, and indeed Humbug.

Re: Borlands Tasm32 v5 and external values (in a DLL)

<v0bhdl$2f8cp$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=524&group=alt.lang.asm#524

  copy link   Newsgroups: alt.lang.asm
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: address@is.invalid (R.Wieser)
Newsgroups: alt.lang.asm
Subject: Re: Borlands Tasm32 v5 and external values (in a DLL)
Date: Wed, 24 Apr 2024 20:01:10 +0200
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <v0bhdl$2f8cp$1@dont-email.me>
References: <uvoqhg$1m791$1@dont-email.me> <k77i2jd33rru11rmcqf18nlqtio9svc92v@4ax.com>
Injection-Date: Wed, 24 Apr 2024 20:01:25 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="a746760165dd1eab69bd0fb85e4931d9";
logging-data="2597273"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+MSFfKdbJGBGkOnOv0Xbnyj8k/mAXQxeUfN61McF8Jjg=="
Cancel-Lock: sha1:8c0mgkVuJgkm74OAbZMGW9URRXQ=
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-MSMail-Priority: Normal
 by: R.Wieser - Wed, 24 Apr 2024 18:01 UTC

Rosario19,

> this seems to speak of write one dll in tasm
[snip]

> here one other link of someone wrote dll in tasm
[snip]

Thank you.

But the problem isn't writing them (I've been doing that for a while now),
but accessing values and/or strings stored in other peoples DLLs. Like that
"_iob" in CRTDLL.DLL .

Regards,
Rudy Wieser

Re: Borlands Tasm32 v5 and external values (in a DLL)

<1fkv9527gkett.sh5ec9pt03rh.dlg@40tude.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=525&group=alt.lang.asm#525

  copy link   Newsgroups: alt.lang.asm
Path: i2pn2.org!i2pn.org!newsfeed.bofh.team!paganini.bofh.team!not-for-mail
From: jj4public@outlook.com (JJ)
Newsgroups: alt.lang.asm
Subject: Re: Borlands Tasm32 v5 and external values (in a DLL)
Date: Thu, 25 Apr 2024 13:47:14 +0700
Organization: To protect and to server
Message-ID: <1fkv9527gkett.sh5ec9pt03rh.dlg@40tude.net>
References: <uvoqhg$1m791$1@dont-email.me> <k77i2jd33rru11rmcqf18nlqtio9svc92v@4ax.com> <v0bhdl$2f8cp$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Injection-Info: paganini.bofh.team; logging-data="530601"; posting-host="dUG+r5wA3qXnSzudUkHsTQ.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A";
User-Agent: 40tude_Dialog/2.0.15.84
X-Bitcoin: 1LcqwCQBQmhcWfWsVEAeyLchkAY8ZfuMnS
X-Notice: Filtered by postfilter v. 0.9.3
X-Face: \*\`0(1j~VfYC>ebz[&O.]=,Nm\oRM{of,liRO#7Eqi4|!]!(Gs=Akgh{J)605>C9Air?pa d{sSZ09u+A7f<^paR"/NH_#<mE1S"hde\c6PZLUB[t/s5-+Iu5DSc?P0+4%,Hl
 by: JJ - Thu, 25 Apr 2024 06:47 UTC

On Wed, 24 Apr 2024 20:01:10 +0200, R.Wieser wrote:
> Rosario19,
>
>> this seems to speak of write one dll in tasm
> [snip]
>
>> here one other link of someone wrote dll in tasm
> [snip]
>
> Thank you.
>
> But the problem isn't writing them (I've been doing that for a while now),
> but accessing values and/or strings stored in other peoples DLLs. Like that
> "_iob" in CRTDLL.DLL .
>
> Regards,
> Rudy Wieser

Assemblers (at least TASM) don't differentiate between external function and
external data. They only see it as external symbol - which can be anything.

Same from the DLLs' perpective, in its PE structure... It has EAT or Export
Address Table (in comparison with IAT or Import Address Table). There's no
no Exported Function Address Table, and there's no Exported Data Address
Table. What's exported/imported is up to the application to interpret, and
it doesn't have to be a function.

So in TASM declare the external symbol as usual. i.e. as if it's a function.
But in the (instructional) code, treat it as a data. After all, functions'
body is not just instructions, but also data (which is treated as
instructions).

Don't use JMP, because you're treating it as a function. Use the OFFSET
directive or LEA instruction instead.

In non ideal circumstances (or weird requirement), JMP _can_ be used, but
that instruction must not be executed. Instead, the instruction's operand
data (which is the address of the import) must be manually read. Same
result, but more roundabout way.

Re: Borlands Tasm32 v5 and external values (in a DLL)

<v0daj8$2uo6k$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=526&group=alt.lang.asm#526

  copy link   Newsgroups: alt.lang.asm
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: address@is.invalid (R.Wieser)
Newsgroups: alt.lang.asm
Subject: Re: Borlands Tasm32 v5 and external values (in a DLL)
Date: Thu, 25 Apr 2024 12:16:54 +0200
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <v0daj8$2uo6k$1@dont-email.me>
References: <uvoqhg$1m791$1@dont-email.me> <k77i2jd33rru11rmcqf18nlqtio9svc92v@4ax.com> <v0bhdl$2f8cp$1@dont-email.me> <1fkv9527gkett.sh5ec9pt03rh.dlg@40tude.net>
Injection-Date: Thu, 25 Apr 2024 12:17:12 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="d5e1d44dc411ebd3833bd22f6743ca93";
logging-data="3104980"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Kxw0t6nkmTuphMGP0RHeQOZIL3X0/CxhAiZPERAHMfQ=="
Cancel-Lock: sha1:x2fjYQhFRjg9TCKtA7YS+tJMMak=
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Priority: 3
X-RFC2646: Format=Flowed; Original
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
 by: R.Wieser - Thu, 25 Apr 2024 10:16 UTC

JJ,

> Don't use JMP, because you're treating it as a function. Use the
> OFFSET directive or LEA instruction instead.

Thats the thing : the OFFSET (or LEA) will *not* return the address of the
pointer to the DLLs data, but to the two-byte indirect-jump instruction
infront of it.

I was hoping that there was a EXTERNAL definition which would account for
those two bytes. Simply said: On definition automatically add 2 to the
value of that label.

Currently I use :

lea eax,[ExternalConstantLabel+2]
mov eax,[eax]

It works well enough, but I have to remember that "+2" every time I use that
particular label.

.... Which is just begging me to forget about it (internal labels can be used
as-is) and have my program crash in the most interresting ways :-|

Meh, I just tried to redefine that _iob label using "_iob equ [_iob+2]", but
Tasm didn't like that. Can't really blame it though.

Regards,
Rudy Wieser

Re: Borlands Tasm32 v5 and external values (in a DLL)

<ua2o2jlgkbpnjatgcb2drvcq2jfkrbrfar@4ax.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=527&group=alt.lang.asm#527

  copy link   Newsgroups: alt.lang.asm
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Ros@invalid.invalid (Rosario19)
Newsgroups: alt.lang.asm
Subject: Re: Borlands Tasm32 v5 and external values (in a DLL)
Date: Fri, 26 Apr 2024 22:10:43 +0200
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <ua2o2jlgkbpnjatgcb2drvcq2jfkrbrfar@4ax.com>
References: <uvoqhg$1m791$1@dont-email.me> <k77i2jd33rru11rmcqf18nlqtio9svc92v@4ax.com> <v0bhdl$2f8cp$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 26 Apr 2024 22:10:38 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="36d31b7be129dab48aee4b0d67bc1d3b";
logging-data="4091094"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/bTzDnjwLH+L8eWvJN619xY08z7GZ2ucs="
Cancel-Lock: sha1:jnRmW7xadZ7WCVObJuXNSOzl0mo=
X-Newsreader: Forte Free Agent 1.93/32.576 English (American)
 by: Rosario19 - Fri, 26 Apr 2024 20:10 UTC

On Wed, 24 Apr 2024 20:01:10 +0200, "R.Wieser" wrote:

>Rosario19,
>
>> this seems to speak of write one dll in tasm
>[snip]
>
>> here one other link of someone wrote dll in tasm
>[snip]
>
>Thank you.
>
>But the problem isn't writing them (I've been doing that for a while now),
>but accessing values and/or strings stored in other peoples DLLs. Like that
>"_iob" in CRTDLL.DLL .
>
>Regards,
>Rudy Wieser
>

i remember i used
loadlibrary and getprocaddress for
https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-getprocaddress

"[in] lpProcName

The function or variable name, or the function's ordinal value. If
this parameter is an ordinal value, it must be in the low-order word;
the high-order word must be zero."
i not remember how...

Re: Borlands Tasm32 v5 and external values (in a DLL)

<pk2o2j1928hb9qeb4bn6fb7crrvkpib31s@4ax.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=528&group=alt.lang.asm#528

  copy link   Newsgroups: alt.lang.asm
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Ros@invalid.invalid (Rosario19)
Newsgroups: alt.lang.asm
Subject: Re: Borlands Tasm32 v5 and external values (in a DLL)
Date: Fri, 26 Apr 2024 22:15:37 +0200
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <pk2o2j1928hb9qeb4bn6fb7crrvkpib31s@4ax.com>
References: <uvoqhg$1m791$1@dont-email.me> <k77i2jd33rru11rmcqf18nlqtio9svc92v@4ax.com> <v48i2j9v59ofv2mgbgtnsdf9mvqat4j7b8@4ax.com> <20240424164749.ccadc173a6082dafcad2409b@127.0.0.1>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 26 Apr 2024 22:15:33 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="36d31b7be129dab48aee4b0d67bc1d3b";
logging-data="4091094"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18UIQVRtjn8kOJTTAWPiNhNGDwxvnO4YSU="
Cancel-Lock: sha1:qhKs8W3CNjF0KX+AKtDwUKhL9Jw=
X-Newsreader: Forte Free Agent 1.93/32.576 English (American)
 by: Rosario19 - Fri, 26 Apr 2024 20:15 UTC

On Wed, 24 Apr 2024 16:47:49 +0100, "Kerr-Mudd, John" wrote:

>On Wed, 24 Apr 2024 17:10:31 +0200
>Rosario19 <Ros@invalid.invalid> wrote:
>
>> On Wed, 24 Apr 2024 16:55:02 +0200, Rosario19 <Ros@invalid.invalid>
>> wrote:
>>
>> >On Wed, 17 Apr 2024 17:40:12 +0200, "R.Wieser" wrote:
>> >
>> >>Hello all,
>> >>
>> >>I've been using Borlands Tasm32 v5 for a while now, but have a bit of a
>> >>problem with declaring strings and values inside a dll.
>> >>
>> >>For instance, CRTDLL.DLL exposes "_iob", which is/should be (a pointer to)
>> >>an array of stdio control structures.
>> >>
>> >>And I have no idea how to define it. :-|
>> >>
>> >>Worse: when I checked _IOB points to a "JMP [...]" (indirect jump) byte
>> >>sequence (and not a pointer to the actual data).
>> >>
>> >>The question is, does anyone (stil) know how to declare such an external
>> >>value / string ?
>> >>
>> >>Regards,
>> >>Rudy Wieser
>> >>
>> >
>> >this seems to speak of write one dll in tasm
>> >https://tolik-punkoff.com/2022/05/09/writing-win32-programs-in-assembly-language-using-tasm/
>>
>> here one other link of someone wrote dll in tasm
>> https://rootbiez.blogspot.com/2010/03/tasm-writing-dll-in-tasm32.html
>>
>> that question it seems for 2011
>
>Glad to see your still posting! I'm working on a simple 'frogger' game in
><256 bytes.

Yes, sometime i game in codegolf but now in C or APL

Re: Borlands Tasm32 v5 and external values (in a DLL)

<j63o2jdomoi2h3sshk8a69evi1aer3rv8t@4ax.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=529&group=alt.lang.asm#529

  copy link   Newsgroups: alt.lang.asm
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Ros@invalid.invalid (Rosario19)
Newsgroups: alt.lang.asm
Subject: Re: Borlands Tasm32 v5 and external values (in a DLL)
Date: Fri, 26 Apr 2024 22:23:01 +0200
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <j63o2jdomoi2h3sshk8a69evi1aer3rv8t@4ax.com>
References: <uvoqhg$1m791$1@dont-email.me> <k77i2jd33rru11rmcqf18nlqtio9svc92v@4ax.com> <v0bhdl$2f8cp$1@dont-email.me> <ua2o2jlgkbpnjatgcb2drvcq2jfkrbrfar@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 26 Apr 2024 22:22:57 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="36d31b7be129dab48aee4b0d67bc1d3b";
logging-data="4096154"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18MVJsl0oLDw6AjortJHsfrlrUMeUFvFIk="
Cancel-Lock: sha1:5V6IsN3LCoh2AEjaoQLOqNoiTNU=
X-Newsreader: Forte Free Agent 1.93/32.576 English (American)
 by: Rosario19 - Fri, 26 Apr 2024 20:23 UTC

On Fri, 26 Apr 2024 22:10:43 +0200, Rosario19 <Ros@invalid.invalid>
wrote:

>On Wed, 24 Apr 2024 20:01:10 +0200, "R.Wieser" wrote:
>
>>Rosario19,
>>
>>> this seems to speak of write one dll in tasm
>>[snip]
>>
>>> here one other link of someone wrote dll in tasm
>>[snip]
>>
>>Thank you.
>>
>>But the problem isn't writing them (I've been doing that for a while now),
>>but accessing values and/or strings stored in other peoples DLLs. Like that
>>"_iob" in CRTDLL.DLL .
>>
>>Regards,
>>Rudy Wieser
>>
>
>i remember i used
>loadlibrary and getprocaddress for
>https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-getprocaddress
>
>"[in] lpProcName
>
>The function or variable name, or the function's ordinal value. If
>this parameter is an ordinal value, it must be in the low-order word;
>the high-order word must be zero."
>i not remember how...

in this link there is a complete example, but in C. I think is
possible in assembly too

https://learn.microsoft.com/en-us/windows/win32/Dlls/using-run-time-dynamic-linking

Re: Borlands Tasm32 v5 and external values (in a DLL)

<v0ic0b$8mj3$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=530&group=alt.lang.asm#530

  copy link   Newsgroups: alt.lang.asm
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: address@is.invalid (R.Wieser)
Newsgroups: alt.lang.asm
Subject: Re: Borlands Tasm32 v5 and external values (in a DLL)
Date: Sat, 27 Apr 2024 10:11:35 +0200
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <v0ic0b$8mj3$1@dont-email.me>
References: <uvoqhg$1m791$1@dont-email.me> <k77i2jd33rru11rmcqf18nlqtio9svc92v@4ax.com> <v0bhdl$2f8cp$1@dont-email.me> <ua2o2jlgkbpnjatgcb2drvcq2jfkrbrfar@4ax.com>
Injection-Date: Sat, 27 Apr 2024 10:11:55 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="75ece773bcaa0c1d7568bfad729dd7da";
logging-data="285283"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19hp8jIXskEvu3A7+ZRh2swH7hX/s7AqWu0L2tESbzv1A=="
Cancel-Lock: sha1:RogTJLlDcwQbDzHv+p48EkXBWqc=
X-RFC2646: Format=Flowed; Original
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
 by: R.Wieser - Sat, 27 Apr 2024 08:11 UTC

Rosario19,

> The function or variable name, or the function's ordinal value.
> If this parameter is an ordinal value, it must be in the low-order
> word; the high-order word must be zero."

I know, I know. Thats not the problem.

Declaring, in Borlands Tasm32 v5, that external pointer "_iob" to mean
"[_iob+2]" (or even just "_iob+2") is.

Regards,
Rudy Wieser

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor