4. OPERATING CONPLAN
The use of ConPLAN requires a
sequence of steps to turn an ICL PLAN source into an executable BS2000
program. The most convenient way to convert and test a PLAN module is by the
use of the BS2000 procedure P.PLAN which performs editing, conversion,
assemby, linkage and loading of the converted ICL program.
4.1 Data Converter SPIN (SPool-IN)
If the ICL program sources are not yet available in machine-readable format on a BS2000 computer, the first step of the conversion procdure will usually be to transfer the required program sources from the ICL system to a BS2000 user-id. The most convenient way of performing this step is to copy the PLAN sources onto a standard ICL magnetic tape and, using the data converter SPIN, import this tape into BS2000 (note: SPIN was written in ICL PLAN and itself converted by ConPLAN to BS2000 assembler).
SPIN generates a BS2000 EDT-compatible SAM-file in EBCDIC with the attributes
FCBTYPE=SAM, BLKSIZE=bln, RECFORM=V, SPACE=(size,l000)
If the block size of the input file is larger than 512 ICL words, an output file with BLKSIZE=(STD,2) will be generated. To execute SPIN requires the procedure P.SPIN and the module C.SPIN to be available as catalogued files. The command is:
/DO P. SPIN [,[outfile], BLKSIZE=bln] where:
Upon execution, C.SPIN requests the tape label of the ICL tape. The correct label needs to be entered at this point, as the ConPLAN data management system CDMS will not allow the label to be ignored. If the label is not known, a dummy one can be specified; after attempting to open the tape file, the CDMS issues a warning, displaying both true and dummy labels. The procedure run should then be aborted via the operator console by acknowledging the BS2000 "mount correct tape"- message with tsn.N and restarted, this time specifying the correct label.
sources on tape are copied into a single SAM file. In order for
ConPLAN to process the sources further they need to be broken up into individual SAM-files, one source segment per file. The names of these files
must conform to the P.PLAN naming standard, which requires them to be named SRC.PLAN.prog, where prog is the program name specified in the PLAN #PROGRAM directive.
|prog||The name of the PLAN segment. The segment is to be catalogued as SRC.PLAN.prog|
|func||A function code which controls the entry into P.PLAN. The following entry points are
|ED||Load the PLAN segment SRC.PLAN.prog into EDT. The source can then be edited. To leave EDT, store the edited program, then enter EDT-command HALT (default).|
|CO||Convert the PLAN source SRC.PLAN.prog by executing C.ConPLAN. The result of the conversion is the SAM file SRC.ASS.prog|
|AS||Assemble the converted source SRC.ASS.prog and write the created module "prog" into the LMS library LIB.LMS.APPL|
|LI||Link the module "prog" and write the linked module into the file C.prog|
|LO||Load the relocatable module C.prog with IDA=Y|
|EX||Execute the relocatable module C.prog with IDA=N|
|ida||YES||Create symbolic dictionary at assembly time (default).|
|NO||No symbolic dictionary|
|gcode||NOGEN||Machine instructions generated by $PLAN will not be listed (default)|
|GEN||All machine instructions generated by $PLAN will be listed|
The module C.ConPLAN should only be executed through the conversion procedure P.PLAN as certain parameter settings require complementary settings when executing ASSEMBF. These settings effect the depth of macro-expansion printed on the resulting assembler listing (for details see 4.2 - Conversion Procedure P.PLAN).
the file name
SRC.PLAN.prog where prog is the PLAN program name, specified in the #PROGRAM directive.
If required, other file names can be assigned by use of the LINK-names
for the input file
In general it will not be necessary to change PLAN sources manually, provided they are syntactically correct. It is necessary for program sources to be written in strict adherence with the rules described in the official ICL PLAN manual. Attention should be paid to the following points:
|Address labels||A label is only recognized if it begins in col. 1 of the input record. In PLAN, if a referenced symbol is undefined, the compiler will allocate a location in LOWER memory. ConPLAN does not check the availability of the required symbols. However, the "UNDEFINED"-flags issued by ASSEMBF at compilation time allow the user to manually insert the missing data items in the original source and repeat the conversion|
|Instructions||An instruction is only recognized if it begins in col. 7|
|Accumulators||Accumulator numbers are to begin in col. 13|
|Operands||Operands are only recognized if they begin in col. 16. No spaces are allowed between operands unless the preceding operand is a character string.|
|Literals||The form '/addr.ptr', indicating a count of 0, would be tolerated by PLAN compilers but not by ConPLAN. It must be correctly written '8/addr.ptr' in order to be recognized.|
After execution, ConPLAN reads control statements from the source SYSDTA, until either encountering EOF or reading the statement "END". Control statements must begin in column 1 of the input record.
NOGEN | GEN
NOGEN and GEN control the
assembler listing of macros whose names begin with the character $. NOGEN
suppresses the listing of the expansion of such macros but
instructs ASSEMBF to enter the their memory address into the field "LOCTN" of the assembler listing. This feature creates a
more compact print output while at the same time providing the memory addresses
needed for testing with the BS2000 interactive debugging aids.
GEN forces the expansion of all macros beginning with the character $ (i.e. affecting mainly the emulator-macro $PLAN). The assembler listing generated will be several times longer than with NOGEN. Note that the extended listing will only be needed when debugging the emulator itself.
END terminates the input of control statements.