Jeff, this exact approach is something I have on my long list of to-do's - I
don't have an answer for you, but certainly want to see what others respond.
However, in the interim, I would like to suggest as a debug tool a program
called examdiff... if you store a "before" and "after" snapshot of the exe
file, this will let you see precisely where the differences are.
- Roger
----- Original Message -----
From: "Jeff" <jma_at_mfire.com>
To: <sftalk_at_forth.com>
Sent: Thursday, December 11, 2003 10:52 PM
Subject: [sftalk] Editting an exe
> This is driving me nuts, so hopefully the gurus can help. I'm working
> on a registration system for my product. One of the checks is that in
> the program there is:
>
> CREATE foo 0 ,
>
> Now, later on in the code is a check function:
>
> : is-registered ( -- flag ) foo @ 0<> ;
>
> Of course it is more complicated than this, but you get the idea. Now,
> on my web server, I directly edit the final EXE file and replace the 0
> with a different value that is specific to the end-user. I'm finding
> the location to put it with a hex editor, searching on "foo" and
> moving 12 bytes downstream of the name (where there is 4 00 bytes).
>
> However, when executed foo @ still returns 0. I assume that I'm just
> writing the constant into the wrong memory location, but what worries
> me is that perhaps SF is doing something I'm not expecting and that I
> can't do what I want.
>
> Thanks for any suggestions.
>
> --
> Best regards,
> Jeff mailto:jma_at_mfire.com
>
>
> ----------------------------------------------------------------------
> 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
> ----------------------------------------------------------------------
>
----------------------------------------------------------------------
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 Fri Dec 12 2003 - 06:19:09 PST
Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!
This archive was generated 08-Feb-2012. Archive updated nightly.