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

I had no problems. You may be editing the wrong data, try using
something more definitive than four 0 bytes like $12345678. Also, the
data offset is dependent on the name length - in the example foo, it
is 10 bytes.
Mike
-----Original Message-----
From: sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com]On
Behalf
Of Jeff
Sent: Thursday, December 11, 2003 7:52 PM
To: sftalk_at_forth.com
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 - 07:42:05 PST
This archive was generated by hypermail 2.2.0 : Wed Nov 19 2008 - 03:04:21 PST