[Coco] new problem with unpack

Wayne Campbell asa.rand at gmail.com
Thu Oct 31 15:41:30 EDT 2013


On Thu, Oct 31, 2013 at 11:49 AM, Aaron Wolfe <aawolfe at gmail.com> wrote:

> Just a quick question, I haven't read carefully enough probably, but you
> aren't trying to access a file path opened in one module from a different
> module are you? I wouldn't think that could work.  Ignore me if this is
> irrelevant.
>

Actually, this is not only what I am doing, it also works very well.
Basic09 allows you to pass a file path variable to another procedure and
that procedure will act on the open file. That is how getHeader works. It
gets the header from the open filepath, determines the parts it needs to
determine, and passes control back to unpack with one of three outcomes:

1. file is not executable, close path and end with error report
2. file is executable and module is not I-Code, skip module and continue
3. file is executable and module is I-Code, process module and continue


> Also to add another possible mechanism for sharing data between processes
> check out "data" modules.  These can be accessed from multiple processes
> simultaneously and can be used to implement simple locking/synchronization
> mechanisms.  You could (for instance) have one program load the data
> module, chain to a program that parses it, chain to another that outputs
> it.  Stuff like that, with each step in the chain having access to all the
> memory used by any of the steps.
>

You and I discussed this before. I can think of many uses for data modules,
but I need to learn more about compiling them and setting entry and exit
points so different processes can make use of different parts of the same
data module.

Wayne



More information about the Coco mailing list