File COCALC

Directory of image this file is from
This file as a plain text file

*20
//DOCALC
/A FRAMEWORK FOR BRINGING IN 2 FILES,
/DOING SOMETHING, & STORING 1 OUTPUT FILE.
/F1: DATA DF6,  PBK QN7,DF16 (INFILE)
/F2: DATA DF7,  PBK QN7,DF17 (INFILE)
/F3: DATA DF10. PBK QN7,DF20 (OUTFILE)
	 
	LMODE
	SEGMNT 5
	*20
/TYPE NAME.
D0,	
BEG,	LIF 4
	MESOUT
	 MM0		/SYSTTST
	 
/ASK FOR INUNITS & OUTUNITS.
D00,	
	LIF 4
	INUNITS
	LIF 4
	OUTUNITS
	 
/GET FILE NAMES.
D1,	
	LIF 4
	MESOUT
	 MM1		/2 INPUT, 1 OUTPUT FILES
	 
	LIF 4
	TABSET
	 0		/TABLE 0
	 LDF 5		/WHICH DF
	 3400		/START LO FOR NAMES
KP3,	 3		/NUM OF NAMES
	 
	LIF 4
	INTABLE		/GET NAMES
	 0
	 
	LIF 4
	TABINI
	 0
	 
/BRING IN FIRST ENSEMBLE FILE & PUT DATA
/IN DF6 & PBLOCK IN DF16, QN7.  
	LDF 4
	LDA I
	7116
	STA
	WORD1		/PBLOCK
	LDA I
	4406
	STA
	WORD2		/DATA
	 
	LIF 4
	TABGET
	 0
	 JMP WARN
	 JMP WARN
	 
/NOW GET SECOND FILE. PUT DATA IN DF7 &
/PBLOCK IN QN7 OF DF17.
	LDF 4
	LDA I
	7117
	STA
	WORD1		/PBLOCK
	LDA I
	4407
	STA
	WORD2		/DATA
	 
	LIF 4
	TABGET
	 0
	 JMP WARN
	 JMP WARN
/AT THIS POINT, FILES ARE IN MEMORY.
/NOW FOLLOWS SPECIALIZED CODING.
/*********************************
	 
	 
/************************************
	 
/ALL DUN WITH CALCULATIONS, NOW STORE
/FINAL FILES.
	LDF 4
	LDA I
	7120
	STA
	WORD1		/PBLOCK
	LDA I
	4410
	STA
	WORD2		/DATA
	 
	LIF 4
	TABPUT
	 0
	 JMP WARN
	 JMP WARN
	 
/ALL DUN, DEASSIGN & RECYCLE.
	LIF 4
	DEASS
	 
	JMP BEG		/*** END PROGRAM
	 
/END MAIN PROGRAMMING, SUBROUTINES FOLLOW.
	 
/FPP SUBROUTINES.
	NORM=JMP .
	FMUL
	P42		/MULFAC
	FMUL
	P43		/UV\V
	FDIV
	ADSCL		/ADC FACTOR
	JMP 0		/LEAVE
	 
	UNNORM=JMP .
	FDIV
	P42		/MULFAC
	FDIV
	P43		/UV\V
	FMUL
	ADSCL		/ADC FACTOR
	JMP 0		/LEAVE
	 
	FIXFAC=JMP .
	FIX
	FAC
	JMP 0		/LEAVE
/END FPP SUBROUTINES.
	 
/ROUTINE TO WARN OF INPUT OR OUTPUT
/FILE IRREGULARITY.
WARN,	LIF 4
	MESOUT
	 MM2		/FILE HANDLING ERROR
	 
	JMP BEG		/RECYCLE
/END WARN.
	 
	 
/MESSAGES.
MM0,	TEXT %NAME%
	4543
MM1,	TEXT %ENTER 2 INPUT & 1 OUTPUT FILENAME.%
	4543
MM2,	TEXT %FILE HANDLING ERROR %
	4543
/END MESSAGES.
	 
	 
/CONSTANTS & BUFFERS.
FPTEMP,	0
	0
	0
FP2,	2
	2000
	0
ADSCL,	10
	3770
KM1,	-1
KP1,	1
/END CONSTANTS & BUFFERS.
AAEND5,	0
//END DOCALC.



Feel free to contact me, David Gesswein djg@pdp8online.com with any questions, comments on the web site, or if you have related equipment, documentation, software etc. you are willing to part with.  I am interested in anything PDP-8 related, computers, peripherals used with them, DEC or third party, or documentation. 

PDP-8 Home Page   PDP-8 Site Map   PDP-8 Site Search