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

Create successful ePaper yourself

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

Obsolete Entry Points, PROCs, and Routines<br />

Normal Return<br />

The output ID$ generates may be one or more lines; this depends on the length of the<br />

processor/program description and specified options. For each line of ID$ output, a print<br />

control word is constructed (line-spacing, image-length, image-address) and stored<br />

sequentially in the ID$ packet starting with word 10. The number of print control words<br />

constructed is stored in S6 or word 0 of the ID$ packet.<br />

If the normal return occurs, the first print control word is returned in A0.<br />

The following procedure simplifies printing of the ID$ output:<br />

I$DPRINT pktaddr<br />

where pktaddr is the address of the ID$ packet.<br />

This procedure performs an APRINT$ for each print control word. It may be called from<br />

the I$D PROC by setting option bit 4.<br />

All output from ID$ is directed to the current print file.<br />

Example of Calling ID$<br />

The following example calls the ID$ routine to generate an ASCII identification line:<br />

$ASCII<br />

$INCLUDE ‘MAXR$’<br />

$(0)<br />

IDPAC I$DPKT ‘IDLINE$ ‘Math Quiz Program (Level 8)’026<br />

$(1)<br />

START I$D IDPAC . Generate and print the ID line<br />

J ERROR . Jump ahead if error return<br />

.<br />

. (Program code)<br />

.<br />

J DONE . Program complete<br />

ERROR L$SNAP ‘ID$’,2 . Dump the A-registers<br />

DONE ER EXIT$<br />

$END START<br />

This MASM routine uses the ID$ routine to create and print the following identification<br />

line:<br />

Math Quiz Program (Level 8) 840425 1147:31<br />

In this example, ID$ generates the ASCII identification line in the 11-word data area at<br />

location IDLINE. The I$DPKT procedure generates the ID$ packet (see Example 2 in the<br />

previous subsection).<br />

J–12 7833 1733–004

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

Saved successfully!

Ooh no, something went wrong!