[Coco] Absolute Memory Location

coco at jechar.ca coco at jechar.ca
Mon Aug 17 12:12:21 EDT 2020


On 2020-08-15 22:36, Jeff Teunissen wrote:
> OS9 does have named pipes, but they're not enabled by default. You
> need the version of PipeMan that supports them. You can also get
> shared memory by linking to a "data module". Every CoCo OS9 boot file
> has a data module named "Init" in it containing the name of the boot
> drive and a few other things.
> 
> On Sat, Aug 15, 2020 at 9:46 PM <coco at jechar.ca> wrote:
>> 
>> Trying to implement some inter-process communication was hoping
>> to not have to settle for having to write to a temporary disk
>> file and then read it. It seems there should be some memory only
>> way to pass info.
>> 
>> NOW THIS IS FANTASY but it is the sort of thing that would be
>> useful.
>> 
>> For example if there was a function like this:
>> 
>> DIM block:BYTE
>> DIM rokey$,rwkey$:STRING[200]
>> 
>> RUN BUFFS("CREATE",block,rokey$,rwkey$)
>> 
>> Where block,rokey$ and rwkey$ cannot be set but only read
>> except that if rwkey$="NO" means that no other process can
>> write to the memory.
>> 
>> Then if you say
>> 
>> returnval$="UNPROCESSED"
>> key$=rwkey$
>> SHELL "someProgram "+returnval$+key$
>> 
>> in "someProgram" say your code assigns returnval$="NEW VALUE"
>> 
>> looping through
>> BPOKE key$,address,bytevalue
>> 
>> Where BPOKE lets you poke into the buffer with the given rwkey
>> 
>> There would also be a x = BPEEK(key$,byteval) where key$ may be
>> either rwkey or rokey
>> 
>> Of course the OS would have to manage the keys to make sure that
>> there were no duplication although duplication would be unlikely
>> in a 200 character key.
>> 
>> Also If the key is to be so long there should be some way that the
>> first time the key is checked by BPEEK or BPOKE and checks out as
>> ok then additional calls from the same process do not need to recheck.
>> 
>> Also note valid values for address would be 0 to 8191 since these
>> buffers are 8K blocks.
>> 
>> Finally RUN BUFFS("CLOSE",block)
>> where you can only close the block if you opened it in the
>> first palace.
>> 
>> But of course RUN BUFFS() , BPEEK and BPOKE are a FANTASY.
>> 
>> I think  I heard of something called "NAMED PIPES" that might
>> work if OS9 has them.
>> 
>> On 2020-08-15 19:40, Rick Ulland wrote:
>> > Not really.
>> >
>> > Really.
>> >
>> > In EDECB you have LPOKE, but there you own the machine and are free to
>> > crash it. Basic09 runs underneath the OS9 system - you do not know
>> > what is going on outside your process space and are not free to change
>> > anything out there. You can hack some things. Your users will hate
>> > you.
>> >
>> > This might be the X=Y problem. What are you wanting to do that
>> > requires smashing an absolute memory location to a fixed value from
>> > inside Basic?
>> >
>> > -rick
>> >
>> >
>> >
>> > On 8/15/20 4:27 PM, coco at jechar.ca wrote:
>> >>
>> >>  Is there any assembly program or syscall that can let you
>> >>  put values in an ABSOLUTE location ( Specified MMU bank and
>> >>  ADDRESS ). This program would need to be callable from Basic09.
>> >>
>> >>  Charlie.
>> >>
>> 
>> --
>> Coco mailing list
>> Coco at maltedmedia.com
>> https://pairlist5.pair.net/mailman/listinfo/coco

How do you create a data module and link to it can it
be done in Basic09 ?


More information about the Coco mailing list