LM ERICSSON PASGEN MANUAL 1(5) TN/X/Tdg Seved Torstendahl 1979-08-22 E PASCAL FOR PDP-11 UNDER RSX/IAS =============================== COMPILER GENERATION MANUAL ========================== A compiler for Pascal running under RSX/IAS is available. There is also a crosscompiler running on DEC-10. This manual describes how these compilers can be generated from the distribution set. Both compilers generate relocatable object modules acceptable to TKB of RSX/IAS and other PDP-11 linkers. It requires a library of object modules to supply the interface to the operating system. The first step is to transfer the received files to a PDP-11 with RSX-11M, RSX-11D or IAS, or to a VAX. They are normally distributed on 9-track magnetic tape written by FLX in DOS format. The necessary files are: P11PAS.OBJ * P11FIL.OBJ * P11TTY.OBJ * PASLIB.OBJ PASEIS.OBJ PASFIS.OBJ PASFPP.OBJ PASIAS.OBJ PASUPD.OBJ ( if present ) MV2PASBLD.CMD * for RSX-11M V2 MV3PASBLD.CMD * for RSX-11M V3 DV6PASBLD.CMD * for RSX-11D V6 PASBLD.ODL * FPABLD.CMD * FPABLD.ODL * PASGEN.CMD * only if a PDP-11 resident compiler is wanted. Under RSX-11M the command file PASGEN.CMD can be executed: >@PASGEN The EXTTSK parameter in the command files may need adjustment in some cases. For IAS see description below. LM ERICSSON PASGEN MANUAL 2 1979-08-22 E The files contain: P11PAS.OBJ Object modules of the general part of the compiler. Source: P11PAS.PAS . P11FIL.OBJ Object modules of the part of the compiler that is specific for RSX/IAS. Source: P11FIL.PAS . P11TTY.OBJ Object modules of the part of the compiler written in assembler. Sources in SRCFIL.PAC . PASLIB.OBJ Object modules to the runtime routine library. Sources in PASLIB.PAC . P11EXIT.MAC Source text for one module of PASLIB that must be re-assembled. PASEIS.OBJ PASFIS.OBJ PASFPP.OBJ Alternative object modules to the library for PDP-11's with extended instruction set, floating instruction set or floating point processor ( EIS, FIS or FPP ). PASIAS.OBJ Alternative object module to the library when running under IAS. PASUNM.OBJ Two object modules that should replace other modules in PASLIB when building tasks for unmapped systems. PASUPD.OBJ New object modules that replace modules from PASLIB.OBJ . PASGEN.CMD Indirect command file for creation of a compiler and a runtime library. PASBLD.CMD PASBLD.ODL PPLBLD.CMD PPLBLD.ODL Command file and overlay description for TKB to use when generating a compiler. USER.SWE USER.MAN User manual. USER.SWE is an edition of the user manual intended for lineprinters with national character sets. Lines that require complementation by hand are denoted by a period (.) in the left margin. README.1ST PASGEN.MAN Compiler generation manual. UMAN.SWE UMAN.ENG Program LIST ( see below ) can be used to generate user manuals with upper case characters only, and with special page size from these files. DEBUG.MAN Describes how to use the symbolic debugger. DBGOVLSLB.ODL DBGOVLPLB.ODL Overlay description files for testing of large programs using the symbolic debugger. Alternatives for SYSLIB and PASLIB resp. DEBUG.PAS Source code of the debugger. DEBUG.OBJ Object code of the debugger. LM ERICSSON PASGEN MANUAL 3 1979-08-22 E The full distribution set also contains the source modules: P11PAS.PAS General part of Pascal compiler. P11FIL.PAS PDP-11-specific part of compiler. P11CRS.PAS DEC-10-specific part of compiler. UNPACK.OBJ Object module for a program that can be used to unpack source modules packed by the programs pack and packlib. They have here the extension .PAC . PASLIB.PAC Source modules for the runtime library. SRCFIL.PAC Sources for special routines of the compiler and for the pack and unpack programs. Special programs: CROSS Program for editing and crossreferencing of Pascal programs. Compile and link. >RUN CROSS FILE: device and directory information not allowed, .PAS default; gives new source and a cross reference listing ( extension .CRL ). UNPACK Asks for the name of a packed file and splits it into its constituent files. LISTPACK List the names of files in a packed file. PACK Can pack arbitrary source files into a new packed file. PACKLIB Packs the sources of the runtime library into the file PASLIB.PAC . SELECT Can select a particular file from a packed library. LIST Can format the manuals to a proper page size and convert lower case to upper ( UMAN.SWE and UMAN.ENG ). Used as: >RUN LIST LIST> UMAN.ENG/UC/PW:40/-SP LIST>^Z /UC for case convertion, /PW:n for page size /-SP for not spool UPSHIFT Case convertion only. New file gets the same name. All task files are prepared under RSX-11M V3 ( PAS, CROSS, SELECT, LIST ). LM ERICSSON PASGEN MANUAL 4 1979-08-22 E CROSSCOMPILER ON DEC 10 ----------------------- To generate a crosscompiler on a DEC-10 proceed as follows: Transfer the files P11PAS.PAS and P11CRS.PAS to DEC-10 and compile them with the PASREL compiler from Hamburg. Load the produced modules and save the core image: .LOAD P11PAS,P11CRS .SAVE P11PAS 64 (64 is enough but maybe less will suffice.) When run the compiler will ask for the filename of the source. A full name including volume and p,pn is allowed. Filename extension is not necessary if it is .PAS . Two new files are produced: a list file with extension .LST and an object file with extension .OBJ . Example: .RUN P11PAS *PROG will produce the files PROG.LST and PROG.OBJ from PROG.PAS . The object file contains one PDP-11 byte/DEC-10 word and is in PDP-11 DOS format. It can be transferred to PDP-11 on a DECtape or other suitable medium. Example: .MOUNT DTA:DT/V:DTNAME/WE .R FILEX *DT:/V/Q/I=PROG.OBJ *^C This object module can then be retrieved on a PDP-11 with RSX-11M by: >FLX SY:/RS=DT:*.*/DO/FB LM ERICSSON PASGEN MANUAL 5(5) 1979-08-22 E PASGEN UNDER IAS ---------------- To generate a compiler under IAS the procedure is as follows: - transfer the files from the distribution set to a suitable user directory. - use LIBR to create the file PAS.OLB (size = 450.) from the files P11PAS.OBJ,P11FIL.OBJ and P11TTY.OBJ. - edit the file IASPASBLD.CMD to define new default values to the switches. List the file to get more detailed information. - if you have version 3.0 of IAS ( with PLAS ) PLAS you have to edit the file IASPASBLD.CMD . >EDI IASPASBLD.CMD [PAGE 1] *SC/437/435/ *ED Troubles reported, please send information about solutions! - use LIBR to create the file PASLIB.OLB and (if wanted) to update [1,1]SYSLIB.OLB from the files PASLIB.OBJ and DEBUG.OBJ . Then update SYSLIB and PASLIB from PASUPD.OBJ if this file exists. Continue to update SYSLIB and PASLIB from PASIAS.OBJ, and if the PDP-11 is equipped with EIS include PASEIS.OBJ, with FIS include PASFIS.OBJ and with FPP include PASEIS.OBJ and PASFPP.OBJ. Then update SYSLIB resp PASLIB with PASUPD.OBJ . - assemble P11EXIT.MAC and use LIBR to update SYSLIB and PASLIB with the new object file. - link the compiler with LINK or TKB using the command file IASPASBLD.CMD . - In order to get a faster compiler it is possible to proceed as above using the command file FSTPASBLD.CMD to TKB. It may be necessary to adjust the EXTTSK parameter. This compiler is faster but cannot handle as large programs as the standard compiler.