31.01.2013 Views

using the bootstrap loader

using the bootstrap loader

using the bootstrap loader

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

WRITING A CUSTOM FIRST-STAGE DRIVER<br />

5-28<br />

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

* This example reads <strong>the</strong> general purpose register of <strong>the</strong> *<br />

* unit definition record within <strong>the</strong> interconnect space *<br />

* found on <strong>the</strong> board in slot number three. Note that *<br />

* this code does no checking of status after each call to *<br />

* BS$GET$INTERCONNECT. The programmer must ensure <strong>the</strong> *<br />

* value returned is correct. *<br />

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

SAMPLE_BS$GET$INTERCONNECT: DO;<br />

DECLARE slot$number BYTE;<br />

DECLARE record$offset WORD;<br />

DECLARE unit$def$rec BYTE;<br />

DECLARE rec$length$reg$off BYTE;<br />

DECLARE gen$status$reg$off BYTE;<br />

DECLARE record$found BYTE;<br />

DECLARE eot$rec BYTE;<br />

DECLARE status WORD;<br />

DECLARE value BYTE;<br />

DECLARE slot LITERALLY '3R';<br />

DECLARE udr LITERALLY 'OFER';<br />

DECLARE gsro LITERALLY 'OAH' ;<br />

DECLARE eotrec LITERALLY , OFFH' ;<br />

DECLARE rlro LITERALLY 'OIR';<br />

DECLARE ro LITERALLY '020H';<br />

CODE: DO;<br />

slot$number<br />

unit$def$rec<br />

gen$status$reg$off =<br />

eot$rec<br />

rec$length$reg$off =<br />

slot;<br />

udr;<br />

gsro;<br />

eotrec;<br />

rlro;<br />

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

* Set up to read <strong>the</strong> first nonheader record within <strong>the</strong> *<br />

* interconnect space. This is done by establishing *<br />

* record$offset past <strong>the</strong> interconnect space header *<br />

* record, which in this case is 32 bytes long. *<br />

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

record$offset = ro;<br />

Bootstrap Loader<br />

(<br />

(<br />

\<br />

(

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

Saved successfully!

Ooh no, something went wrong!