[iyonix-support] Re: RM comands

  • From: Martin Hodgson <marthodgson@xxxxxxxxxx>
  • To: iyonix-support@xxxxxxxxxxxxx
  • Date: Fri, 20 May 2011 09:11:15 +0000 (GMT)

In article <51d6071915john@xxxxxxxxxxxxxxxx>,
   John Harrison <john@xxxxxxxxxxxxxxxx> wrote:
> Druk

> > > I put a Filer_Run command in the !Run files of the more used 26 bit
> > > apps.

> > That wont work, please read yesterday's "suggestions".

> I read all the suggestions, and tried them all in turn, but that was the
> only one I could get to work.  

[Snip]

I have only just caught up with my emails, so apologies for entering this
rather late on.

I resolved this problem in October 2004, with help from some of the people
still here, and especially from Adrian Lees.

The basic problem is that one wants Aemulor to be loaded when needed, then
quit when finished with, so it doesn't interfere with 32 bit apps
unnecessarily. If you have more than one 26 bit app running, then you want
Aemulor to only quit when the last 26 bit app is quit. "Would the last one
to leave please put out the lights".

So, take the !Run file of your 26 bit application, rename it !Run2, and
(optionally) filetype it as Obey26.


Then create another Obey (NOT Obey26) file, name it !Run and enter the
following :


|| Test to see if Aemulor is loaded; if not, then load it
RMEnsure Aemulor 0 RMLoad ADFS::4.$.Apps.!AemulorPro

|| Increment a system variable, Aemu$tasks by one, since we are about to  ||run 
this application.
SetEval Aemu$tasks <Aemu$tasks> +1

|| Then run the application
Run <Obey$Dir>.!Run2


|| On quitting :

SetEval Aemu$tasks <Aemu$tasks> -1
IF Aemu$tasks =0 THEN RMKILL Aemulor



|| NOTES : This application's !Run file has been renamed to !Run2.
|| This new !Run file has been added to load Aemulor, since this
|| application requires Aemulor so as to run on a 32 bit RISC OS.
|| It checks to see if Aemulor was running first, presumably loaded by
|| some other application. If not, then it loads Aemulor.
|| Also it increments the Aemu$Tasks variable so we know another 26 bit ||app 
is running.
|| Then, on quitting, it decrements Aemu$tasks by one, then checks its ||value.
|| If aemu$tasks now equals zero, Aemulor can also be quit (RMKilled).
|| Otherwise it is left running, for the remaining 26 bit apps.

|| Note that if you load this application, then another which also  ||requires 
Aemulor
|| but does not have one of these !Run files to reset Aemu$tasks, then
|| quitting this application, may also cause the second one to be  ||terminated.

Note that I keep Aemulor in the Apps directory on my hard disc.

Also , if you use !Eureka, this leaves a 26 bit module behind when it
quits. You need to add :
AemuExecute RMKill EurekaUtils

Hope this helps. I use this little file in all my 26 bit apps. Just rename
the original !Run file, and drop this in.

Martin Hodgson

---
To alter your preferences or leave the group, 
visit //www.freelists.org/list/iyonix-support
Other info via //www.freelists.org/webpage/iyonix-support
List-related queries to iyonix-support-moderators@xxxxxxxxxxxxx

Other related posts: