31.01.2013 Views

using the bootstrap loader

using the bootstrap loader

using the bootstrap loader

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

WRITING A CUSTOM FIRST-STAGE DRIVER<br />

/************************************************************<br />

* This example illustrates how a host CPU board *<br />

* broadcasts a control message to all system boards *<br />

* having a port$id of IF4H. During message *<br />

* broadcasting, <strong>the</strong> host$id portion of socket is *<br />

* ignored. *<br />

* *<br />

The control message sent is located in p$control$msg *<br />

* (Peripheral Command Message. *<br />

************************************************************/<br />

SAMPLE_BS$BROADCAST: DO;<br />

DECLARE socket DWORD;<br />

DECLARE socket$o structure<br />

(host$id WORD,<br />

port$id WORD) AT (@socket);<br />

DECLARE p$control$msg(20) BYTE;<br />

DECLARE exception WORD;<br />

DECLARE slot LITERALLY 'IH' ;<br />

DECLARE port LITERALLY 'IF4H';<br />

CODE: DO;<br />

socket$o.host$id<br />

socket$o.port$id<br />

slot;<br />

port;<br />

CALL BS$BROADCAST<br />

(socket,@p$control$msg(O),@exception);<br />

Bootstrap Loader 5-25

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!