Date : Sun, 29 Nov 2009 22:33:52 +0100
From : kortink@... (John Kortink)
Subject: Tube - I/O processor memory questions
On Sun, 29 Nov 2009 20:20:10 +0000, Kevin Bracey
<kevin@...> wrote:
>Exactly what memory is available on the I/O processor for a
>language running on the language processor?
>
>I just found myself wanting to reset a file pointer, and
>apparently OSARGS needs its block on the I/O processor zero
>page!
No, second processor zero page. When you subsequently
call OSARGS (on the second processor), the block is
transferred to the I/O processor for you, the call is
relayed, and any results are transferred back to the
second processor (and update the block if necessary).
This happens for practically all OS calls.
>How awkward is that? Okay, I can transfer my file pointer
>across with OSWORD 6.
>
>But... Can I happily use I/O 00.8F?
No.
>Are they all available to me, or has the Tube code got
>the rights to some of it it?
You should consider all language workspace to
be confiscated. I.e. &00-&8F and &400-&7FF.
But on the second processor the allocation of
language workspace is the same as on the I/O
processor (without the Tube active). E.g.
&70-&8F would be free if you run BASIC.
>Likewise for &400-&7FF - how much, if any, of that is available to me?
See above. None on I/O processor. Language
dependent on second processor.
>I understand that all of the I/O processor's OSHWM-HIMEM is available.
>But is there any straightforward way of reading those settings from the
>language processor? Presumably if I have some service code, if it asks
>for OSHWM/HIMEM, it will get the I/O values, so I could use a user
>OSWORD to get it to ask for me.
You will have to, yes. The second processor returns
its own OSHWM/HIMEM values via OSBYTE.
>And on a similar note - what does service code do if it needs some zero
>page? There isn't anything obviously allocated for general non-language
>use, just the few areas specifically allocated.
See above. On the I/O processor with the Tube active,
it's basically guesswork. You're not expected to run
any code there. That's the second processor's job.
John Kortink
--
Email : kortink@...
Homepage : http://www.inter.nl.net/users/J.Kortink
GoMMC, the ultimate BBC B/Master/Electron storage system :
http://web.inter.nl.net/users/J.Kortink/home/hardware/gommc
ReCo6502, the Acorn 6502 Second Processor on steroids :
http://web.inter.nl.net/users/J.Kortink/home/hardware/reco6502