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.

<strong>SYSLIB</strong> Access Methods<br />

3.3. Common Bank Call Using Auto Switch Method<br />

The Auto Switch method of referencing the common bank version of the <strong>SYSLIB</strong><br />

routines requires the calling program to be explicitly aware of its own addressing<br />

structure. The program must know what banks are based and the addressing range of<br />

each bank. To access one of the <strong>SYSLIB</strong> routines, the calling program bases the<br />

particular <strong>SYSLIB</strong> common bank that contains the routine. (See Appendix D and<br />

Appendix E for the list of the <strong>SYSLIB</strong> common banks, the routines that are contained in<br />

them, and the addressing limits of the bank.) The program then executes an LMJ<br />

instruction to the common bank entry-point address minus 1. The calling program must<br />

ensure that none of the banks it has based overlap the <strong>SYSLIB</strong> addressing space.<br />

The advantage to this system is that the program may force the <strong>SYSLIB</strong> common bank<br />

to remain based so that multiple calls to routines in that bank can avoid the expense of<br />

basing the bank again and again. When the I$BJ method of accessing the common bank<br />

routines is used, it unbases the active bank of the calling program, bases the <strong>SYSLIB</strong><br />

common bank, executes the <strong>SYSLIB</strong> routine, then unbases the <strong>SYSLIB</strong> common bank<br />

and bases the calling program once again.<br />

The disadvantage to the Auto Switch method is that the structure of the calling program<br />

needs to be rigidly defined. Any changes to the program must always take into<br />

consideration what banks are based at what times and the addressing range of the<br />

banks. For these reasons, the use of the Auto Switch method is not encouraged. The<br />

Auto Switch calling method can only be used on systems that can base more than one<br />

bank simultaneously using the LIJ instruction.<br />

For the <strong>SYSLIB</strong> routines that have procedures to generate the calling code, the Auto<br />

Switch calling sequence is generated by appropriately setting a parameter on the<br />

procedure call.<br />

7833 1733–004 3–5

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

Saved successfully!

Ooh no, something went wrong!