home *** CD-ROM | disk | FTP | other *** search
- FilePoll 0.02
- -------------
-
- FilePoll is hot on the heels of StartUp and performs a related function, it
- polls the wimp while loading a file.
-
- This is the spin off from something else I'm trying to write, to poll the
- wimp during all loads, which means patching the OS_File vector, but you have
- all sorts of problems with re-entrancy, eg. RMLoad will call OS_File, which
- if you start polling other tasks while loading the module, and another task
- calls RMLoad aswell then all sorts of nasties can happen, never mind what
- state the RMA is in during a RMLoad. I hope to get away with only polling
- the wimp if OS_File is called from User mode, which should mean the app
- itself made the call, though the things you want to have polling, like
- loading sprite areas is disabled ! I'm telling you all this so you can go
- away and think about it aswell !!!!
-
- Anyway, what FilePoll does it emulate the loading/calling of a absolute
- file, reading in chunks and polling the wimp. It only copes with files with
- a Absolute filetype, it won't cope with any other filetype, infact it
- ignores the filetype and just treats the given file as absolute. The size of
- the chunk read in at a time is either &400 or filesize/32, whichever is
- larger You may like you change the code to give bigger/smaller chunks, I
- think filesize/32 is about right though.
-
- FilePoll has to have somewhere to exist while it loads the absolute file,
- so it reads the length of the file and moves itself to above where the file
- will end up, this means that slightly (and I mean slightly, only a couple of
- hundred bytes) more memory is required, this should be catered for by the
- page size steps, but if not add a 1 to the wimpslot (you'll get a Abort on
- data transfer if there isn't space).
-
- You call the thing by /FilePoll -<fsp>, so it's best to have it in your
- library, the fsp being the absolute file, so for a !Run file you just have
- to change the Run <Obey$Dir>.!RunImage to /FilePoll -<Obey$Dir>.!RunImage.
- The enviroment string is altered before the actual absolute code is called
- and Obey$Dir is preserved, so the absolute code shouldn't notice anything
- different.
-
- I can't think off hand of anything objecting to FilePoll, but you never
- know, if a app doesn't like it then just put the old plain Run back in.
-
- Remember to check that the file you are running is a absolute file,
- FilePoll assumes it is !
-
- For bootup purposes it's best to keep !Run as normal and have a !RunPoll
- which calls FilePoll and run that on bootup instead of the normal !Run,
- which is when you really should use FilePoll.
-
- (c)1992 G.W.Babb
-
- Normal copyright stuff applies, you can distribute where you want aslong as
- it isn't for profit. You must distribute as-is, though the source is
- included for your enjoyment, which you may expand upon and distribute as you
- please.
-