Download Latest Version makeutil.zip (173.6 kB)
Email in envelope

Get an email when there's a new version of GCCMVS

Home / GCCCMS / GCC 3.2.3 CMS 3.0
Name Modified Size InfoDownloads / Week
Parent folder
GCCCMS-3.0-YDISK.aws.zip 2007-12-03 1.4 MB
readme-gcccms-3_2_3-3_0.txt 2007-12-03 9.5 kB
gcccms.3.0.zip 2007-12-03 14.5 MB
Totals: 3 Items   15.9 MB 0
Release Notes for GCCCMS
========================

This document contains a few hints as to how to get the GCC designed for MVS from:-

http://sourceforge.net/projects/gccmvs/

to run on VM/CMS. As far as I can tell the code should work on all versions
of VM/CMS from VM/370 through to zVM. However I have only tested it on VM/370 R6 
and zVM6.2. Note that when used on an non XA capable version of CMS an 24 bit module
is created. Otherwise an RMODE 24 AMODE 31 module is produced. Folks with zVM but without 
the High Level Assembler (or compatible product) will need to adjust the EXECS according. 

User should read the notes for the MVS version of the compiler in conjunction with this document. 
In particlar the section on conversion from ASCII to EBCDIC is relevant to VM.


Overview of changes for VM/CMS
==============================

Originally the changes to the main code required to run GCCMVS on VM/CMS were minimal.
There is only one change to the "GCC" code proper, in the include file processing.
The support library, PDPCLIB required more work, with changes being made to a number
of routines. Recently the code for MVS was updated to use diifferent access methods, but 
the CMS code was not, and is still based on the original MVS code with the following changes:-

1) The CMS assembler only supports the OS/MFT (OS/360) macro formats. The GCCMVS run time uses
   some OS/MVS macros, which had to be changed back to the MFT versions.

2) The conventions for passing  command line parameters to CMS programs is different to that in OS.

3) The low storage layout is different (PSA macro in OS, NUCON in CMS)

4) CMS execs are needed to replace the PROCS and JCL files used in GCCMVS

In addition two changes to CMS are required to build GCC on VM/370. These are as follows:-

1) The IFOX assembler needs modifying to allow more than 256 externals per program.

2) The CMS loader needs modifying to allow more than 256 externals per load module.

Neither of these changes are included with this distribution. Both may be found in
the "files" section of the Yahoo H390-VM "e-group". Note that if you are using a
recent 4-pack system these are already included.

Installing the compiler on VM
=============================

To install from scratch you need to cross compiler from another platform. Scripts are provided on 
for MS Windows or Linux. The following steps assume that you are installing on VM/370 R6 and that you 
are going to use the MVS/DOS/VM Assembler/XF some times call IFOX00. This is the assembler that is 
called by the "Assemble" command on most releases of VM. They are only a guideline and will almost 
certainly require some adjustments for your system.

1) Download the relevant GCC source as for GCCMVS

2) Download the modifications for GCCMVS and GCCCMS and apply as per the gccmvs.txt document.

3) Build a cross compiler using the "compile.bat" file. This will produce a version of GCC 
   that can produce 370 assembler on Windows. You need to pass a parameter to compile.bat
   of -DTARGET_CMS, e.g.

	COMPILE -DTARGET_CMS

4) Use the compcms.bat file to create a set of assembler source file containing the CMS version of GCC.

5) You probably need to create a new userid on VM to contain the files. If using VM/370R6 GCC proper needs 
   to be split across threee disks due to the limitations of the original CMS filing system. If you have the 
   4-pack the following sample directory entry will suffice as a template. It assumes you have added a new 
   pack to VM to hold the GCC source and object. 

	*                                              
	USER GCCCMS GCCCMS 16M 16M BG                  
	ACCOUNT GCCCMS GCCCMS                          
	OPTION ECMODE REALTIMER                        
	IPL CMS                                        
	CONSOLE 01F 3215                               
	SPOOL 00C 2540 READER A                        
	SPOOL 00D 2540 PUNCH A                         
	SPOOL 00E 1403 A                               
	LINK MAINT 190 190 RR                          
	LINK MAINT 19D 19D RR                          
	LINK MAINT 19E 19E RR                          
	MDISK 191 3330 001 101 GCCCMS MR READ WRITE    
	MDISK 291 3330 102 200 GCCCMS MR READ WRITE    
	MDISK 391 3330 302 200 GCCCMS MR READ WRITE    
	MDISK 491 3330 502 200 GCCCMS MR READ WRITE    
	MDISK 591 3330 702 100 GCCCMS MR READ WRITE

   The installation writes the data to the mini disks as follows:-

        191 		- Installation Execs, Load Maps and Modules.
        291,391,491	- GCC "C" sources, assembler and TEXT files.
        491             - "H" files used by GCC.
        591             - PDPCLIB "C" sources, Assembler and TEXT file
        591             - "H" files used by PDPCLIB

   If you have a VM system that supports the EDF filing system you can enlarge the 291 and omit the 391 and 491.
   The whole of "GCC" will then be loaded to the 291 with PDPCLIB on the 591 as before.
                                 

6) These files now need to be moved to CMS so they can be assembled. Unfortunately if you are
using Hercules you can not just load the assembler onto the reader as Hercules uses a DIFFERENT
ASCII/EBCIDIC translation code to that expected by GCC. You have a number of options options.

   a) My recomended approach is to the "CMSTAPE" program from the Yahoo H390-VM group. I have 
      included a "TAPEALL" batch file that will create an AWS tape, in CMS TAPE format, containing
      all you need to build GCC on VM. To use this:-

            1) type "TAPEALL" after running "COMPCMS" => This creates GCCCMS.AWS
            2) "Mount" this file on a tape drive in Hercules and attach this to you VM machine.
            3) On you VM terminal type:-

                    "TAPE LOAD" => Loads the file with the "EXECS" to your "C" disk
                    "STAGE0TP"  => Load the rest of the files.
                    "STAGE0CP"  => Copies the files to the minidisks expected by the other EXECS


   b) I originally used a UUENCODE program on Windows to UUENCODE the assembler source. I then "loaded" 
      the cards on the VM reader and then used "ARCUTIL" from the Yahoo H390-VM site to UUDECODE.

   c) I have loaded a compiled copy of the simple "MVSUNZIP" program to the Yahoo H390-VM group. 
      This can be used in conjunction with the "ZIPALL.BAT" file and the "tape.tdf" file to get
      the files onto VM. You can then use the STAGE0x EXECs to load the rest of the data. Assuming
      the "tape.tdf" file is mounted and attached to your 181 the following commands will restore
      exec files.
                        
		tape rew                                                               
		R; T=0.01/0.01 18:23:07                                                
		tape fsf 9                                                             
		R; T=0.01/0.01 18:23:20                                                
		fi inmove tap1 (lrecl 80 recfm fb                                      
		R; T=0.01/0.01 18:23:46                                                
		fi otmove disk gccexec zip (lrecl 80                                   
		R; T=0.01/0.01 18:24:09                                                
		move inmove otmove                                                     
		R; T=0.15/0.70 18:24:21  
		mvsunzip gccexec

      The STAGE0A through STAGE0I exec files will then copy the rest of the files. These assume that
      you have minidisks at 291, 391 491 and 591. On 3330 you need 200 cyls for the 291,391 & 491. 
      The 591 needs 100 cyls. 

7) Once you have the files on CMS you need to use the "STAGE0CP" exec to get them on the proper disks.
Then use the STAGE1n, STAGE2n and STAGE3n execs to build and verify the compiler on VM. If you don't 
want to verify your build, simply run STAGE1A, STAGE1B and STAGE3C. This will produce a GCC module.

8) In order to make loading the output of the compiler easier, I concatenated all the PDPCLIB files
together using the MKCLIB exec. This produces a "CLIB TEXT" file.

9) Copy the following files onto the "Y" disk so all users can access them. 

GCC MODULE	The "C" compiler
GCC EXEC	The driver EXEC that sets up the DD names for GCC and runs the compiler and GCCREPL
                Note. For VM/ESA or zVM use GCCXA EXEC and rename to GCC EXEC
GCC PARM	A sample PARM file.
CLIB TEXT	Objects from the run time library
CLOAD EXEC	Exec to load a "C" TEXT file.
xxx H		The "H" files from the GCCCMS 591 disk.


Using the compiler
==================

The run time has a number of differences to the GCCMVS compiler.

1) As VM parameter passing is (at least on VM/370) all upper case, 8-byte tokens a facility exists
   to read the parameters from OS DD name SYSPARM. Simply code a single question mark as the sole 
   parameter and the run-time will pass the first record from SYSPARM to the main() funtion.

2) If you omit the "DD:" from the front of a filename passed to the I/O open routines the run-time
   code will assume it has been passed a CMS file name. If the name contains a "." it will be assumed
   it seperates the filename and filetype. As the code still uses OS emulation SVC202 is used to
   issue a "filedef" command to define the file to the code.

To compile, assemble and link a program "TEST C A" use the following commnands:-

GCC TEST C A
CLOAD TEST
START


Support
=======

The best place to get support is to ask a question on the Yahoo H390-VM group.  I will try and answer.

Dave Wade
g4ugm@hotmail.com

Source: readme-gcccms-3_2_3-3_0.txt, updated 2007-12-03