From: csbrod@medusa.informatik.uni-erlangen.de (Claus Brod )
Newsgroups: comp.sys.atari.st
Subject: Re: XBRA

larserio@IFI.UIO.NO (LarsErikOsterud) writes:

>I see that some resident programs use a standard called XBRA.
>Can anyone tell me more about this standard ?

Any program that steals some system vector must use XBRA to notify other
programs that it linked into a vector. To cut it short, an example in
assembler:

        ...
        code to switch to supervisor mode
        ...
        move.l $472,o_hdv               ; get old vector value
        move.l #my_routine,$472         ; link in own routine
        ...
        code to switch to user mode
        ...
        lotsa stuff, then, somewhere in your program:

        dc.b "XBRA"                     ; XBRA id
        dc.b "????"                     ; four printable characters to
                                        ; identify your program
o_hdv:  dc.l    0                       ; here you store the old vector value

my_routine:
        ...
        own code that sits in the redirected vector
        ...


This way, a linked XBRA list is created if several programs link into
the same vector. As there is a standard place for the old value of the
vector, a program can retrieve this old value and thereby remove itself
from the chain. Programs can also detect if they already are linked
into a certain vector. Every program has to use some unique ID (????
in the example above) that consists of four printable characters.
If you want to use some ID, please let ATARI know that. In fact, I don't
know if ATARI monitors XBRA IDs right now; to be sure, mail your new
XBRA IDs to Julian Reschke (sorry, forgot his e-mail address - Julian,
would you please help out).


----------------------------------------------------------------------
Claus Brod, Am Felsenkeller 2,                  Things. Take. Time.
D-8772 Marktheidenfeld, West Germany            (Piet Hein)
csbrod@medusa.informatik.uni-erlangen.de
----------------------------------------------------------------------


