.;GENSRC.CMD -- FILE TO HELP GENERATE SOURCE MODULES
.;
	.DISABLE LOWERCASE
	.ENABLE SUBSTITUTION
	.ENABLE ESCAPE
	.ENABLE GLOBAL
	.SETF DATAM
	.IFDF $MORM .GOTO GMOD
	.XQT TEC @[17,377]DATTIM
	.SETF DATAM
	.SETT $SAVE
	.SETF $MORM
	.GOTO A
.INP:
.R2:	.ASKS S
	.IFT <ESCAPE> .GOTO R1
	.DATA #0 '$CC''SEP''S'
	.GOTO R2
.R1:	.RETURN
.1A:	;
	; YOU HAVE THE FOLLOWING SOURCE MODULE TYPES
	;	1) MAC
	;	2) FTN
	;	3) PAS
	;	4) Z80
	;
.A:	.ASKN $TYP WHAT TYPE OF SOURCE
	.IFT <ESCAPE> .GOTO 1A
	.IF $TYP NE 0 .GOTO 2A
	.SETF SAVE
	; NO TRACE WILL BE GENERATED
	.GOTO A
.2A:	@[17,377]SDEF'$TYP'
	.ASKS [1:9.] $FILE FILE NAME (NO (.) OR EXSTENSION)
	.OPEN #0 '$FILE'.'$EXT'
	.ASKS  $TITL MODULE NAME
	.DATA #0 '$TITLE''$TITL'
	.IF $IDENT EQ "" .GOTO 3A
	.ASKS [1:6] AIDENT IDENT
	.DATA #0 '$IDENT''AIDENT'
.3A:	.ASKS NAME YOUR NAME
	.WAIT TEC
	@[17,377]DATTIM
.ENABLE DATA #0
'$PCE'
'$PCS''$CC'
'$CC'
'$CC' WRITTEN BY 'NAME'
'$CC' SOFTWARE SUPPORT GROUP (R.S.)
'$CC' '$DATE'
'$CC' FERMILAB
'$CC'
'$CC'
'$CC' '$VER'
'$CC' EDIT NUMBER = 0001
'$CC' EDITED BY: 'NAME'  '$DATE' '$TIME'
'$CC'
.DISABLE DATA #0
	.ASK B DO YOU WANT A FILE DISCRIPTION IN THE FILE HEADER
	.IFF B .GOTO DD1
	; TYPE <ESC> TO STOP INSERTING DISCRIPTION
	.DATA #0 '$CC'
	.DATA #0 '$CC' FILE DISCRIPTION
	.DATA #0 '$CC'
	.SETS SEP "	"
	.GOSUB INP
	.SETF DATAM
	.ASK B IS THIS A DATA MODULE
	.IFF B .GOTO DD1
	.IF $TYP = 4 .SETT DATAM
	.IF $TYP = 1 .SETT DATAM
.DD1:
.ENABLE DATA #0
'$CC'
'$CC' MODIFICATIONS:
'$CC'
'$CC'
'$FORM'
'$PCE'
'$PCS''$SC'
.DISABLE DATA #0
.GMOD:
	.IFT DATAM .CHAIN [17,377]SDATA
	.ASKS [1:6] $TITL ENTRY NAME
	.ASKS M ONE LINE DISCRIPTION OF MODULE
	.DATA #0 '$CC'  **-'$TITL'-'M'
	.DATA #0 '$CC'
	;START TYPING DISCRIPTION OF MODULE. 
	;TYPE <ESC> TO ESCAPE
	.SETS SEP " "
	.GOSUB INP
.2B:	;ENTER INPUTS
.ENABLE DATA #0
'$CC'
'$CC' INPUTS:
.DISABLE DATA #0
	.SETS SEP "	"
	.GOSUB INP
.4B:
.ENABLE DATA #0
'$CC'
'$CC' OUTPUTS:
.DISABLE DATA #0
	;OUTPUTS
	.GOSUB INP
.6B:	
	;SIDE EFFECTS
.ENABLE DATA #0
'$CC'
'$CC' SIDE EFFECTS:
'$CC'
'$CC'    MODIFIED EXTERNALS
'$CC'
'$CC'    OTHER SIDE EFFECTS
.DISABLE DATA #0
	.GOSUB INP
.8B:	.SETS $SR1GS "'$SREGS'"
	.SETS $SR1GR "'$SREGR'"
	.IF $TYP = 2 .GOTO 2C
	.ASK $REGSY USING REGISTER SYMBOL STANDARD
	.ASK B STANDARD REGISTER USAGE
	.IFT B .GOTO 1C
	;REGISTER USAGE
	.SETS $SR1GR ""
	.SETS $SR1GS ""
.ENABLE DATA #0
'$CC'
'$CC' REGISTER USAGE:
.DISABLE DATA #0
.9B:	.GOSUB	INP
	.GOTO 2C
.1C:	
.ENABLE DATA #0
'$CC'
'$CC' STANDARD REGISTER USAGE
.DISABLE DATA
.2C:
.ENABLE DATA #0
'$CC'
'$EC''$PCE'
.DISABLE DATA #0
	.ASK $MORM DOES THIS FILE HAVE ANOTHER MODULE
	.CHAIN [17,377]SCONF'$TYP'
