Date : Tue, 01 Dec 2009 00:50:29 +0000
From : jgh@... (Jonathan Graham Harston)
Subject: Tube - I/O processor memory questions
Kevin Bracey wrote:
> Exactly what memory is available on the I/O processor for a language
> running on the language processor?
None. A language is only allowed to use memory in the language
processor. It is absolutely forbidden to use any other memory.
> I just found myself wanting to reset a file pointer, and apparently
> OSARGS needs its block on the I/O processor zero page! How awkward is
No it doesn't. It needs its block in zero page in the memory of
where the call is made - ie in the language processor is calling
from the language processor.
You make the standard OSARGS call from the laguage processor using
the registers set up as appropriately for that language processor.
ie, 6502: LDX #data:LDY handle:LDA call:JSR &FFDA
Z80: LD HL,data:LD E,handle:LD A,call:CALL &FFDA
32016: MOV R3,data:MOV R2,handle:MOV R1,call:SVC &0C
> But... Can I happily use I/O 00.8F? Are they all available to me, or has
No that's for language use, the Tube system is the language.
> the Tube code got the rights to some of it it? Likewise for &400-&7FF -
Again, no, that's for language use, and the Tube system is the
language.
If you are transient code running in the I/O processor, use the
memory locations allocated and documented as available for such use
- &A8 to &AF.
> 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
Again, use the memory locations documented as being there for you
use - &A8 to &AF, remembering to preserve and restore them.
--
J.G.Harston - jgh@... - mdfs.net/User/JGH
There are three food groups: brown, green and ice cream.