6809 Second Processor

From BeebWiki
Revision as of 01:12, 8 March 2015 by WikiSysop (talk | contribs) (1 revision)
Jump to: navigation, search


An Second Processor for the BBC/Master containing a Motorola 6809.

The 6809 client MOS provides the basic system required to communicate with the host computer. The BBC MOS entry block is implemented by using the BA/BS signals to remap the hardware vectors to from &FFF0 to &FEF0.

MOS API Calls

Programs communicate with the kernal and MOS via an entry block at &FFC0-&FFFF. Parameters are passed in the A, X and Y registers.

On entry, A, X, Y contain values to pass to system call
On exit,  A, X, Y contain returned data
          If an error occurs, then...

&FFF7 - OS_CLI

On entry:           On exit:
X=>command string        A=Return value

&FFF4 - OS_BYTE

On entry:           On exit
A=function          A=preserved
X=first parameter   X=returned word
Y=second parameter  Y=returned word DIV 256
                    Cy=returned carry flag

&FFF1 - OS_WORD

On entry:           On exit:
A=function          Control block updated
X=>control block    X=returned line length for OSWORD 0

&FFEE - OS_WRCH

On entry:           On exit:
A=character         A=preserved

&FFEC - OS_WRCR

On entry:           On exit:
                    A=13

&FFE7 - OS_NEWL

On entry:           On exit:
                    R1=13

&FFE3 - OS_ASCI

On entry:           On exit:
A=character         A=preserved

&FFE0 - OS_RDCH

On entry:           On exit:
                    A=character
                    Cy=carry flag

&FFDD - OS_FILE

On entry:            On exit:
A=function          A=result
X=>control block    X=preserved

&FFDA - OS_ARGS

On entry:            On exit:
A=function          A=result
Y=handle            Y=preserved
X=>data             X=preserved
                    data updated

&FFD7 - OS_BPUT

On entry:            On exit:
A=byte              A=preserved
Y=handle            Y=preserved

&FFD4 - OS_BGET

On entry:            On exit:
                    A=byte
Y=handle            Y=preserved
                    Cy=carry flag

&FFD1 - OS_GBPB

On entry:           On exit:
A=function
X=>control block    A=preserved
                    Cy=carry flag

&FFCE - OS_FIND

On entry:            On exit:
A=function          A=handle
X=>string or
Y=>handle

See also

External links

Jgharston 16:53, 6 November 2009 (UTC)