ConPLAN

APPENDIX A    LINKING PLAN/COBOL AND BS2000 ASSEMBLER

The following example of a BS2000 assembler module called by a ConPLAN program illustrates the basic link mechanism required to interface emulated PLAN with BS2000 Assembler. The passing of two parameters is shown, as well as  two extra lines of code (at label "BS2000"), which make the module suitable to be also called through the standard BS2000 program interface.

ASSMODUL CSECT
ASSMODUL AMODE 31
         GPARMOD 31
*
*        E N T R Y
*
         BASR  13,0             LOAD BASE ADDRESS
         USING *,13             ALLOCATE BASE REGISTER
         STM   0.15.SAVEREG     SAVE CALLER REGISTER SET
         C     0,=A(C'PLAN')    WAS MODULE CALLED BY PLAN?
         BE    PLAN             BRANCH IF YES

* CALLED VIA SIEMENS STANDARD PROGRAM INTERFACE (ASSEMBF, COBOL...)
BS2000   L     2,0(1)           R2: ADDRESS OF PARAM 1
         B     LODPARAM
*
* CALLED VIA CONPLAN INTERFACE
PLAN     XR    2,2              R2 <- 0
         ICM   2,B'0111',0(1)   R2: ADDRESS OF PARAM 1
*
*
LODPARAM L     3,0(2)           R3: PARAM 1           
         L     4,3(2)           R4: PARAM 2
         L     5,6(2)           R5: RETURN CODE
*
*----------------------------------------------------------------------
*
*   P R O C E S S I N G
*          ...
*          ... 
*          ...
*          ...
*
*----------------------------------------------------------------------
*
*
*        E X I T
*
RETURN   ST    5,6(2)           STORE RETURN CODE IN USER FIELD
         LM    0,15,SAVEREG     RESTORE CALLER REGISTER SET
         BR    14               RETURN TO CALLING PROGRAM
*
SAVEREG  DS    16F              CALLER DECLARES REGISTER SAVE AREA   
 

 

The example shows how with the inclusion of some extra coding any module can be made suitable for linking to emulated PLAN programs as well as to the standard Siemens program interface (ASSEMBF, COBOL etc.).
ConPLAN enables the called program to identify the caller by storing the EBCDIC characters 'PLAN' in reg. 8 before branching to the subroutine. 
Note: ConPLAN does not provide a register save area (reg. 13)


APPENDIX B    Syntax Notation

The following notation is used throughout in descriptions of command and statement syntax:

(  )    The description of a key in brackets indicates that this key must be pressed; e.g. (K1) means function key K1 should be pressed

[  ]    Square brackets indicate that the enclosed entry is optional; e.g. /DO P.SPIN [,outfile] means the parameter outfile may be specified or not

< >    Angle brackets indicate a reference to the contents of a specified data item; e.g. <x1> refers to the contents of accumulator x1

...    Ellipses indicate an entry may be repeated as many times as required.

CAPS   Capital letters indicate portions of statements or commands which must be entered as shown; e.g. SRC.ASS.prog indicates prog to be a variable parameter whereas SRC.ASS. is invariable.

All other punctuation, such-as commas, colons, slash marks and equal signs must be entered as shown.


APPENDIX C    MEMORY MAP OF A CONVERTED PLAN PROGRAM

The following picture shows how converted PLAN segments are structured within the linked BS2000 program phase.

Emulated ICL accumulators
L = 8*3 bytes
 

      Eight 24-bit ICL words emulate
      ICL registers 0-7

Emulated Reserved Area
L = 45*3 bytes
 

      Emulated PLAN Communication
      area 

Emulator work area
 

 

logical ICL data area W
(word structure)

 

    mapped to
    Physical ASSEMBF data area B
    (byte structure)
    combines
    #LOWER and #UPPER
 

SDRDP I/O-buffers

      One buffer per SDRDP-accessed
      file is created in reverse
      order, starting at X'7FFF'*3
 

Program code



      Start address: X'8000'*3

Literals
 

      Max. length of area: 16kb



Run-time system