A89: Re: when a file can't find itself


[Prev][Next][Index][Thread]

A89: Re: when a file can't find itself




> I was wondering how a program might figure out which folder it's in?  I know
> you can just search for the file and test for size and type, but what if
> there is a copy of the same file in a different folder? how do i find the
> correct one?

Compare an address within your file with the first and last one of the file
you're checking. It might also be possible to get the first address of the
program somehow but that would probably be more complicated.

--
 / Niklas Brunlid
Check out Prosit for the TI-89 / TI-92+ at http://prosit.ticalc.org
Random PQF v5.1 Quote follows:

"No, no, no, what you do is, you get a gnu, then you point it at the driver
and someone says, 'Look out, he's got a gnu!' and you say, 'Take us where
we want to go or I'll fire this gnu at you!'"
        -- "Host Age at 10,000 Feet", Nome style
           (Terry Pratchett, Truckers)





References: