| That's the developer's standard for stealing interrupt vectors. It
allows multiple applications to steal and put back the vectors without
causing other applications that steal them and put them back from being
locked out. I don't know the details, but if you need them, I can
probabally get them.
|
| >locked out. I don't know the details, but if you need them, I can
>probabally get them.
I will rip apart a small program that supports it and get what I need from
there, but if you happen to find any detailed docs on it, I would be
interested.
Jim Patterson
|
| Hi,
as far as I know, XBRA is a protocol based on a convention of
programmers that write software that modifies system-vectors,
which are of common interest.
It is the eXtended version of the BRA-protocol of Moshe BRAner
(whoever this may be ...).
It allows you to put your software into a vector-chain and(!) to
easily remove it, without affecting the other members of the chain.
To make this possible there should be an XBRA-structure directly
before the entry-point of a user-supplied handler, which has the
following format: (for example in 'C')
typedef struct
{
char xb_magic[4]; /* always "XBRA", missing in BRA-protocol */
char xb_id[4]; /* Id of your software, eg. "KB14" */
long xb_oldvec; /* next member of the chain */
} XBRA;
An XBRA-handler does its work an then branches to xb_oldvec.
'Installing' means, to store a system vector in xb_oldvec and then to
bend it to your routine, which branches to xb_oldvec after completion.
Because of the well defined position of that field, an 'unchaining'
program can copy its xb_oldvec into the xb_oldvec of its predecessor
in the chain. After that it will be bypassed automatically.
Sample Assembler "Main Program"
********************************************************************************external 'C'-Subhandler
GLOBL my_c_hdl ; external 'C-Subhandler'
GLOBL my_xbra1
my_xbra:
ASCII "XBRA"
ASCII "KB14"
xb_oldvec:
DS.L 1 ; filled in by external 'C-Subhandler'
TEXT
my_asm_hdl:
movem.l d0-d7/a0-a7,-(sp) ; save registers
jsr my_c_hdl ; call external 'C-Subhandler'
movem.l (sp)+,d0-d7/a0-a7 ; restore registers
move.l xb_oldvec,-(sp)
rts ; branch to next handler
********************************************************************************
If you are interested in detail, I can mail you a sample 'external C-Subhandler'
(discussed in note 1063.*) which is able to install and deinstall itself
within an existing (maybe empty) XBRA-queue.
I hope this will help you
Bert.
|
| > typedef struct
> {
> char xb_magic[4]; /* always "XBRA", missing in BRA-protocol */
> char xb_id[4]; /* Id of your software, eg. "KB14" */
> long xb_oldvec; /* next member of the chain */
> } XBRA;
This should be enough info for what I want to do. Thanks a million.
Jim Patterson
|