<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Thu, 03 Dec 2009 00:07:55 +0000
From   : jgh@... (Jonathan Graham Harston)
Subject: Tube - I/O processor memory questions

Kevin Bracey wrote:
> > None. A language is only allowed to use memory in the language
> > processor. It is absolutely forbidden to use any other memory.
> >
> Says who? All the docs I've seen state unambiguously that the I/O
> OSHWM-HIMEM area is normally available for the user or language. It was
 
No, a language is only allowed to use memory in the **LANGUAGE**
processor, that's why it's called the language processor.
 
> Where's that documented? The references I've seen just have it down as
 
AUG.
 
> for "operating system scratch space" or the like.
 
An how else does third party software get called other than through
an operating system call?
 
Kevin Bracey wrote:
> Jonathan Graham Harston wrote:
> > Why re-invent the wheel? Just use OSWORD &FF -
> One thing - surely the use of &70-&7F isn't legal - we've established it
> belongs to the Tube code... Also, what's the point of the 900->2500
 
Yes, and what else is OSWORD &FF? It's Tube transfer code that
extends the Tube functionality, and when a CoPro is active, the
Tube system is the "current language" on the I/O processor.
 
> copy? In that form, couldn't you just as well run it at FFFF2500?
 
Because the first thing the *RUNnable version does is check that a
CoPro is active. If one isn't active, then loading to &2500 is
loading to language memory, trashing whatever the language has
there.
 
> far-fetched to me having just spent ages faffing around using them
> trying to get my command-line across the Tube. (Or are you going to tell
 
http://beebwiki.jonripley.com/Reading_command_line
 
Kevin Bracey wrote:
> I can think of some mechanisms that involve attempting to make calls to
 
ROMmable Z80-BASIC sets up a temporary intercept on OSGBPB to
implement OSGBPB 9,0 to return the command line. You're welcome to
rip the code from mdfs.net/bbcbasic/Z80Basic
 
> Which has left me pondering how best to handle Break. Not really
> investigated that yet, but I need to try to reacquire the file I was
 
No, the whole point of Break is aborting what you are doing. You
abandon the file, not try and reaquire it. The number of times I've
fought with software, repeated pressing break - die, damn you, die!
- and it constantly keeps regrabbing things is soooo annoying.
 
> In my case, the parameter (which is another filename) is critical -
> there's nothing I can do without an input file.
[...]
> case, if they don't deign to give a proper filename, what's my correct
> response to drop out to a Supervisor prompt? Just do an RTS? Is that
 
You parse your startup command at the *command stage, and bomb out
with an error there, *NOT* at the language entry stage. Once the
language has been entered, the language is responsible for handling
all and every error ganerated.
 
.cmd_mylanguage
\ do some checks
Bxx cmd_mylang_ok
JSR error:EQUB 220:EQUS "Syntax: MyLang <filename>":BRK
.cmd_mylang_ok
LDX &F4:LDA #142:JMP OSBYTE
 
> what provokes "Language?" on a BBC?
 
That's an error generated when there are no language ROMs present.
 
Kevin Bracey wrote:
> > Entry is with C=0 for reset triggered start (hard/soft/power on).
>
> Doesn't seem to, sadly. Experiments show C set in both cases on the
 
Checking the code shows C to be set when entering an image either
at Break or of as a result of OSBYTE 142 or a *command, so C=0 can
be seen to mean "entered a break on the I/O processor", and C=1 can
be seen to mean "not ^ ^ ^ ^ ^".
 
> Tube. I think we can count that as a cunning hack, rather than a proper
> API. Not found it in my manuals either.
 
It's not a hack, it's documented, and the MOS code has specific
SEC/CLC instructions to explicity set the state.
 
> distinction between *RUNning and restarting after Break. The Tube seems
> to try to re-enter the last thing you *RAN (*RUNned?) after a Break; not
> something I've seen documented.
 
It's in the various Tube documentation. On Soft Break the last CAO
(Currently Active Object - code with an image header, the same as a
ROM header) will be re-entered. On Hard Break the default language
is copied across and made the CAO and entered.
 
-- 
J.G.Harston - jgh@...                - mdfs.net/User/JGH
There are three food groups: brown, green and ice cream.
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>