18.08.2013 Views

(SYSLIB) Programming Reference Manual - Public Support Login ...

(SYSLIB) Programming Reference Manual - Public Support Login ...

(SYSLIB) Programming Reference Manual - Public Support Login ...

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.

Interface to Selected Extended Mode Executive Requests<br />

F.3. Example<br />

The following example uses the EM$APRINT PROC to print a line of ASCII characters<br />

from an EMOM:<br />

$ASCII<br />

$EXTEND<br />

$OBJ<br />

$INCLUDE ‘MAXR$’<br />

$INCLUDE ‘OM$DEF’<br />

$INCLUDE ‘EM2CB$P’<br />

.<br />

OM$USE_LV LVBANK,,B2<br />

.<br />

$(0) $BANK OM$DATA_EMB,050000 ‘DBA . EM data bank<br />

DSTART<br />

APRTPKT EM$APRINTPKT APRTBUF,APRTBUFL . Packet<br />

APRTBUF ‘Print an ASCII line.’ . ASCII image to print<br />

APRTBUFL $EQU $-APRTBUF . Word length<br />

.<br />

$(1) $BANK OM$CODE_EMB,01000 ‘IBANK’ . EM code bank<br />

START$*<br />

LBU B2,R0 . Load Link Vector<br />

bank<br />

. virtual address into<br />

B2<br />

OM$LOAD_BDR B3,DSTART,,B2 . Base data bank on B3<br />

.<br />

EM$APRINT APRTPKT,B3 . Print ASCII start<br />

line<br />

.<br />

RTN . Program completed<br />

$END<br />

In this example, the EM$APRINTPKT PROC generates the packet for the EM$APRINT<br />

PROC. The ASCII line to be printed is at label APRTBUF. The data bank containing the<br />

image and the packet is based on B3. The EM$APRINT PROC performs the ER<br />

APRINT$.<br />

F–6 7833 1733–004

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

Saved successfully!

Ooh no, something went wrong!