![]() |
||
| Home | SwiftForth Archive | SwiftX Archive | |

Charles,
The SwiftForth system, because of the way Windows
deals with loading executable files, generally can be
expected to be resident at the same location every time
it is executed. I have never observed an EXE file being
loaded at any address other than the default, which is
where SwiftForth is loaded.
DLLs are another matter. When the DLL is created, you
can target a specific address, but Windows will not promise
to load the DLL at that address. The DLL must be completely
relocatable. This relocate-ability is built in to SwiftForth
to cover both the EXE and DLL case, and does it in a way that
will work no matter where in memory the executable image is
loaded.
Your example will work, but only if the application is saved
as an EXE file.
However, since the ANS doesn't address EXE files as sealed
applications, and since it doesn't even mention DLL files,
and since the example will always work in a program loaded
from the console IDE, I would claim that it might, kind-of,
almost be ANS ;^)
take care,
rick
On Feb 8, 2007, at 3:55 AM, Charles Melice wrote:
> Rick,
>
> Thanks for the refreshing remark about addresses in DLLs.
>
> What about the next Forth sample:
>
> ( align ) here 0 , constant X
> 314 X !
>
> In that context, can one say that this constraint does
> not respect the ANS Forth standard?
>
> Charles
>
> ----- Original Message -----
> From: "Rick VanNorman" <rick_at_neverslow.com>
> To: <sftalk_at_forth.com>
> Sent: Wednesday, February 07, 2007 3:48 PM
> Subject: [sftalk] Re: How to make 2Value?
>
>
>> Charles,
>>
>> Your solution works -- but not if you compile a DLL using it.
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and
bug reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Thu Feb 08 2007 - 04:50:33 PST
This archive was generated by hypermail 2.2.0 : Tue Dec 02 2008 - 03:04:41 PST