<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Tue, 30 Apr 2002 18:10:19 +0100 (BST)
From   : jim <jim@...>
Subject: Re: Completely stuck on tube emulation

On Tue, 30 Apr 2002, Richard Gellman wrote:
> A BRK instruction jumps to the OS thru the BRK vector at FFFE-FFFF, this
> then jumps through the software vector in page 2, which then jumps through
> the extended software vector at page D, which causes a jump to the BRK
> handler within the current language ROM.

It's my understanding that the OS always pages in the current language on
BRK, so the extended software vector isn't needed and BRKV points directly
into the ROM. Sideways ROMs get the BRK offered them by service call 6 (?)
anyway.

A BRK is no more nor less than a software interrupt; I suspect it was
originally intended as a SWI or breakpoint instruction and Acorn's use of
it to indicate errors is non-standard. It's actually the IRQ that's a
special case, as it pushes the status register to the stack with the B
flag clear.

I'd re-check your TUBE interface code, myself. Doesn't BASIC use OSWORD 1
to get its command lines? Check exactly what's going across the TUBE when
the oscalls are made, see if it makes sense in relation to the tube
appnote.

jim
-- 
http://madeira.physiol.ucl.ac.uk/people/jim/
"... I naturally gravitated to London, that great cesspool into which all the
 loungers and idlers of the Empire are irresistibly drained."
                                - Sir Arthur Conan Doyle, "A Study in Scarlet"
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>