From: idg10@cl.cam.ac.uk (I.D. Griffiths)
Subject: Re: Monty Pythons most used sentence
Reply-To: idg10@phx.cam.ac.uk
Organization: U of Cambridge Computer Lab, UK
Date: Tue, 26 Jan 1993 12:55:07 GMT

In article <1k11shINNgps@info2.rus.uni-stuttgart.de>, zrzs0111@helpdesk.rus.uni-stuttgart.de (Helmut Springer) writes:
|> "And now to something completely different"
|> 
|> Has someone build a module with a "save, easy useable, not crunshing"
|> method to request memory (for RISCOS 2.00)?
|> If you request memory with OS_Module, the memory can't given back, if a 
|> other module gets loaded.
Yes and no.  If you give it back, and something else asks for some space in
the RMA, then it will get the hole you left rather than allocating a big
chunk, so it's not completely stupid.  Just fairly stupid.


|> If you request memory with WIMP_SlotSize, you may run into programs which
|> sits already in the memory (cause of BBC 6502 compatibility ?) and twice
|> this method has no garbage collection ...

Yerwhat?  There is no way that memory allocation via Wimp_SlotSize will
allocate you memory already owned by another task (unless it has illegally
stolen a page of memory by going direct to the MEMC) since it only gives
you memory that was previously sitting in either the Free or the Next slot.
And what do you mean "(cause of BBC 6502 compatibility ?)"?  I don't understand.

Well garbage collection only applies if you're using a memory management scheme
where the client requesting blocks doesn't later de-allocate them.  The
answer is to make sure you release all memory as and when you finish
with it...

|> It seams, that good old MSDOS v. 2.00 has better memory allocation routines
|> than this one on the archimedes 8-(
Oh yes?  What was that then?


|> "And now to something completely different"
|> 
|> Has someone find a method to replace OS_ReportError with a WIMP-tasking
|> errorviewer ? 
|> With the old (RISCOS 2.0) version of a errorviewer the machine freeze ....

Well, write your own?  If you're writing in C, it's not to difficult to
produce a dbox which does the same thing.  (The only thing you need to do
is split up the text into several lines.)

Come to think of it, isn't there an option on the ReportError swi to return
immediately so you can just keep polling it?  So why not use that?


|> "And now to something completely different"
|> 
|> Has someone find a method for a "forkviewer" ?  A program that shows text
|> but do not block the calling obeyscript.
|> Example:
|>    obeycommand1 
|>    ;eg. running a compiler
|>    forkview file
|>    ;eg. viewing a file with warnings
|>    obeycommand2
|>    ;e.g. running a linker 
|> 
Do you mean like *Type?
I don't see the problem.  Obey files don't get stopped by running applications.
It's a well known problem that if you stick any lines (empty or not) after the
Run <Foo$Dir>.!RunImage in a !Run file then that file remains open until the
application terminates, so presumably the Obey mechanism is quite happy to
nest stuff.

Or do you mean that it should fork a wimp application to view the text?
Well if you have a wimp app that views text, e.g. !ViewText, then try

  obeycommand1
  WimpTask !ViewText file
  obeycommand2

(I'm pretty sure WimpTask is the command to launch another task)
Actually, the problem with this is that it will need a wimppoll to happen before
the new task is run, so this will only work if your obey file is being run
in a taskwindow.
The way to get around this is to write a small wimp app which starts off,
executes the command using WimpTask, does a wimp poll asking for a null and
then exits.


|> "And now to something completely different"
> 
|> so long
|> 
|> "And now to something completely different"
|> 

Oh PLEASE!  The phrase is:
"And now for something completely different"

(The third word was wrong in every instance in your message.)

Ian Griffiths
Newsgroups: comp.sys.acorn