Google
 

Trailing-Edge - PDP-10 Archives - -
There are no other files named in the archive.
/THIS PROGRAM CAN:
/	1. PACK PDP-8 TAPE BLOCKS OF 201 WORDS, IN SUCCESSIVE
/	   BLOCKS OF 600 WORDS, WHICH ARE TRANSMITTED TO A
/	   PDP-10 DECTAPE.
/	2. UNPACK A PDP-10 DECTAPE BLOCKS OF 600 WORDS
/	   INTO BLOCKS OF 201 WORDS, WHICH ARE TRANSMITTED
/	   TO A PDP-8 TAPE.
/THE FUNCTIONS 1 AND 2 ARE INVERSE TO EACH OTHER.
/FOUR QUESTIONS ARE PRINTED ON THE TELETYPE
/	1  8 TO 10?	REPLY Y OR N CR LF
/	2  INPUT=	REPLY D CR LF
/	3  OUTPUT=	REPLY CR LF
/	4  READY?	REPLY Y OR N CR LF
/	(D=DIGIT)
/BLOCK #26 THROUGH #2701 LOCATED ON AN PDP-8 DECTAPE,
/ARE ONE TO ONE MAPPED ON THE AREA: STARTING IN
/BLOCK #7 WORD 151 (DECIMAL) ENDING IN
/BLOCK #495 (DECIAML) AT WORD 66 (DECIMAL)
*20
MONE,	-1
D75,	-76
LCT,	0
BMIN24,	-30
BLOC22,	-5427
BLOC23,	-5630
BLOC24,	-6031
B8,	10
OVTS10,	31
OVIN10,	-151
BUFOR,	BUFB+RES
BUFL,	BUFB+6000
BUFRST,	BUFOR+226
	RES=201
DBLOCK,	DBLOCK+1
	0
DTMA,	7755		/ADDRESS FOR DATA BREAK
D600,	600
DTWCT,	7754		/WORD COUNT
TRIALS,	-3
BLKN23,	27
BLKN24,	30
BLKNR3,	-3
INUNIT,	0	/IN AND OUT DRIVE NUMBERS ARE STORED IN THIS
OUTUNT,	0	/AND TEH PRESENT LOCATION
READ,	30
WRITE,	50	/THI S VALUES CONTROL THE DECTAPE
FIRST,	0
CNT1,	-46		/OCTAL=38 DECIMAL
CNT2,	-7
CNT3,	-6
COUNT,	0
Y,	-331
N,	-316
CR,	-215
LF,	-212
UPP,	-270		/VALUE OF CHAR 7+1
THR,	11
FBL8,	26		/FIRST BLOCK TRANSMITTED FROM AN 8 TAPE
FBL10,	7		/FIRST TO TAPE BLOCK.
BLKNR8,	0
BKNR10,	0
DIR,	0
OVLAP8,	-227	/-151 DECIMAL
OVLTS8,	151	/THIS IS 105 DECIMAL
OVLTST,	31	/25 DECIMAL
OVLINC,	0
OVLSTD,	0
OVLP10,	-125	/-85 DECIMAL
OVLAP,	0
BUF,	BUFFER
DD600,	-6001
BUFA,	BUFB+5777
BUFP,	BUFOR-67
SIZE8,	-202
MV8,	-103
SIZE10,	-601

*200
STRT,	CLA		/CLEAN ACCU
	TLS		/SET OUT TELETYPE FLAG
FRESH,	TAD MESS		/LOAD MESSAGE ADDRESS
	DCA 10		/ACCU 10 ADDRESSES AREA
	TAD CNT1		/LENGTH OFF MESSAGE.
	JMS PRT		/PRINT MESSAGE
	JMS INM1		/GET FORMAT FUNCTION
	TAD CNT2		/LENGTH OF NEXT MESSAGE
	JMS PRT
	JMS INM		/GET DRIVE # INPUT TAPE
	DCA INUNIT	/UNIT #IS IN FIRST THREE BITS
	JMS CARRET
	TAD CNT2
	JMS PRT
	JMS INM		/GET DRIVE # OUTPUT TAPE
	DCA OUTUNT	/UNIT # OF OUT PUT DRIVE
	JMS CARRET
	TAD D75	/-62 TIMES THE DECTAPES MUST BE READ
	DCA LCT	/THIS LOC WILL BE USED FOR COUNTING
	TAD FBL8		/26 OCTAL IS FIRST 8 BLOCK
	DCA BLKNR8
	TAD FBL10
	DCA BKNR10
	TAD DIR ;SZA   ;JMP  DIR1
	ISZ LCT
	TAD OVLAP8	/-22 DECIMAL
	DCA OVLAP
	TAD OVLTS8	/+127 DECIMAL
	DCA OVLTST
	TAD BMIN24	/-24 DECIMAL
	DCA OVLINC	/INCREMENT OF OVLAP VALUE
	TAD OVLTS8
	DCA OVLSTD	/RESTART VALUE OF OVLAP
	JMP IO8C
DIR1,	TAD OVLP10
	DCA OVLAP
	TAD MONE
	DCA FIRST
	TAD OVTS10
	DCA OVLTST		/TEST VALUE=+1
	TAD BLKN24
	DCA OVLINC	/INCREMENT VALUE
	TAD OVIN10	/RESTART OVLAP VALUE
	DCA OVLSTD
	JMP ENTR		/READ A TEN BLOCK
STRTP,	CLA
	TAD BLKNR3
	DCA TRIALS	/REFRESH RETRY COUNT
	TAD READY
	DCA 10
	TAD CNT3
	JMS PRT
	JMS INCH
	TAD Y
	SZA
	JMP NOFIN
	HLT
NOFIN,	JMS CARRET
	JMP FRESH
FIN,	CLA IAC
	DCA NRBLKS
	TAD OUTUNT
	DCA UNIT
	TAD WRITE
	DCA FUNC
	TAD DIR
	SPA
	JMP C8TO10
	TAD BUFP
	DCA STADR
	TAD BLKNR8
	DCA BLKNR
	TAD SIZE8
	DCA BLOCKL
	JMS DTIO
	JMP STRTP
C8TO10,	TAD MV8
	DCA COUNT
	TAD BUF
	TAD MONE
	DCA 12
	TAD BUFA
	DCA 11
	JMS MOVE
	TAD BUF
	DCA STADR
	TAD BKNR10
	DCA BLKNR
	TAD SIZE10
	DCA BLOCKL
	JMS DTIO
	JMP STRTP
	JMP FRESH
*400
/THE NEXT CODE PREPARES THE TRANSMISSION
/OF BLOCKS SO THE PDP-8 DECTAPE

IO8C,	CLA
	TAD OVLAP		/-(NU OF WORDS+1
	DCA COUNT
	TAD DIR
	SZA
	JMP BUF108		/TRANSFER REGISTERS 11 AND 12 MUST
			/BE LOADED IN A DIFFERENT WAY.
	TAD BUFA
	DCA 11
	TAD MONE
	TAD BUF
	DCA 12
	JMS MOVE
	TAD INUNIT
	DCA UNIT
	TAD READ
	DCA FUNC
	TAD OVLAP	;CMA
	TAD BUF		/BUF=START OF AREA ADDRESS:
IO3,	DCA STADR		/DEPOSIT START OF BUFFER AREA:
/START HERE TESTING IF ALL IO DONE AND GO TO READY
/IF THIS IS ALL RIGHT, OVLAP=-NR1 THIS IS FOR COUNTING:
	TAD OVLAP
	TAD OVLTST	/IF ZERO THEN TRUE.
	SZA
	SMA CLA
	JMP IO4		/NORMAL CASE 3 BLOCKS:
CRIT0,	TAD DIR
	SZA
	JMP NORMAL
CRIT,	CLA	/IN THE FOLLOWING LINES A STEPDOWN IS TREATED
	TAD BLKN23	/23 BLOCKS MUST BE READ IN THIS CASE
	DCA NRBLKS
	TAD BLOC23
	DCA BLOCKL
	TAD OVLAP
	TAD OVLSTD
IO6,	DCA OVLAP
IO5,	CLA
	TAD BLKNR8	/GET BLOCK #
	DCA BLKNR
	JMS DTIO		/TRANSMIT BLOCKS
	CLA
	TAD BLKNR
	DCA BLKNR8	/SAVE NEW BLOCK NUMBER
	TAD DIR
	SZA
	JMP IOR10
	JMP ENTR
BUF108,	TAD OUTUNT
	DCA UNIT
	TAD WRITE
	DCA FUNC
	TAD FIRST
	SPA
	JMP PREPF
	CLA IAC
	TAD BUFOR
	TAD OVLAP
	JMP IO3		/SAVE START ADDRESS OF BUFFER:
PREPF,	CLA IAC
	DCA FIRST
	TAD FBL8
	DCA NRBLKS
	TAD BUFRST
	DCA STADR
	TAD BLOC22
	DCA BLOCKL
	JMP IO5+1
IO4,	TAD DIR
	SZA
	JMP CRIT
NORMAL,	TAD BLKN24	/-3
	DCA NRBLKS	/INSERT PARAMETER
	TAD BLOC24
	DCA BLOCKL
	TAD OVLAP
	TAD OVLINC	/INCREMENT OVERLAP VALUE
	JMP IO6
IOR10,	CLA
	TAD OVLAP
	TAD BUFOR
	DCA 12
	TAD BUFL
	TAD OVLAP
	DCA 11
	JMS MOVE
ENTR,	CLA
	TAD BKNR10
	DCA BLKNR
	TAD B8
	DCA NRBLKS
	TAD DIR
	SZA
	JMP NN
	TAD OUTUNT
	DCA UNIT
	TAD WRITE
	DCA FUNC
	TAD BUF		/BUFFER ADDRESS
RET,	DCA STADR
	TAD DD600		/-600. OCTAL
	DCA BLOCKL
	JMS DTIO
	CLA
	TAD BLKNR
	DCA BKNR10	/SAVE NEW BLOCK#
	JMP LOOPR
NN,	TAD INUNIT
	DCA UNIT
	TAD READ
	DCA FUNC
	TAD BUFOR
	JMP RET
LOOPR,	ISZ LCT
	JMP IO8C
	JMP FIN
*600
PRT,	0
	DCA COUNT	/PRINT THE NUMBER OF CHARAC-
REST,	CLA
	TSF			/TERS, WHICH IS CONTAINED IN
	JMP .-1		/ACCU, THE CHARACTERS ARE IN
	TAD I 10		/AN AREA, ADDRESSES BY AUTO
	TLS		/INDEX REGISTER 10
	ISZ COUNT
	JMP REST
	CLA
	JMP I PRT
INM1,	0		/GET ANSWER YES OR NO.
	JMS INCH		/TO QUESTION 1, IF THERE.
	TAD Y		/IS A 10 TO 8 CONVERSION
	SZA		/THEN DIR=0 ELSE DIR=1
	CLA IAC
	DCA DIR		/THE ROUTINE CARRET CHECKS THE
	JMS CARRET	/CARR. RETURN LINE FEED SEQUENCE
	JMP I INM1

INM,	0
	JMS INCH
	TAD UPP		/SUBTRACT VALUE OF SEVEN CHAR+1
	SMA
	JMP ERROR		/CHAR VALUE TOO HIGH
	TAD THR		/ADD OCTAL 1
	SPA
	JMP ERROR		/LESS THEN 0 CHARACTERS
	TAD MONE		/SUBTRACT ONE
	CLL RTR;RTR	/MOVE BIT 9-11 TO BIT 0-2
	JMP I INM		/RETURN

INCH,	0
	KSF		/SKIP IF CHAR TYPED IN
	JMP .-1
	KRB
	TSF	/ECHO CHARACTER
	JMP .-1	/WAIT FOR READY FLAG
	TLS
	JMP I INCH	/RETURN
CARRET,	0
	JMS INCH
	TAD CR		/IS IT A CARRIAGE RETURN
	SZA
	JMP ERROR		/NO
	JMS INCH
	TAD LF
	SZA
	JMP ERROR
	JMP I CARRET
ERROR,	CLA
	TAD E1
	DCA 10
	TAD E2
	JMS PRT
	JMP STRTP
E1,	E1
	"E;"R;"R;"0;"R;215;212
E2,	-7
MESS,	MESS
	"8;" ;"T;"O;"1;"0
	" ;"C;"O;"N;"V;"E
	"R;"S;"I;"O;"N;"?
	" ;"R;"E;"P;"L;"Y
	" ;"Y;" ;"O;"R;" 
	"N;" ;"C;"R;"L;"F;215;212
	" ;"I;"N;"P;"U;"T
	"=;
	"O;"U;"T;"P;"U;"T
	"=
READY,	.
	"R;"E;"A;"D;"Y;"?
*1000
UNIT,	0		/THIS IS THE FIRST PARLOCATION OF THE FOLLOWING
FUNC,	0
BLKNR,	0		/ROUTINE, INCREMENTED BLOCK#
STADR,	0		/FIRST MEM LOC
BLOCKL,	0		/LENGTH OF DECTAPE BLOCK
NRBLKS,	0		/NUMBER OF BLOCKS TO BE READ
DTIO,	0

/THE FOLLOWING CODE LOCATES A BLOCK # AND ENTERS IT IS
/FORWARD DIRECTION (CODE FROM CHUCK MCTHOMAS)
	CLA
	TAD DBLOCK	/ADDRESS FOR DATA BREAK IS
	DCA I  Z DTMA	/TRANSMITTED TO DATA BREAK-LOCATION
DTREV,	TAD UNIT		/IO FUNCTION
	TAD SEARCH
	TAD D600	/REVERSE MOTION
	DTCA	/START SEARCHING
WAIT1,	JMS DTWAIT	/WAIT FOR COMPLETION
	JMP DTFOR		/ERROR RETURN END OF TAPE ACCU=0
	CLA CLL CML RTL	/+2INTO ACCU
	TAD I Z  DBLOCK
	CMA		/-CURRENT BLOCK-3
	TAD BLKNR		/3 TO THE LEFT?
	SPA CLA		/YES, MORE THAN 2 TO THE LEFT
	JMP WAIT1
DTFOR,	TAD REVERS
WAIT2,	JMS DTWAIT
	JMP RETRY		/ERROR RETURN
	TAD I Z  DBLOCK
	CIA
	TAD BLKNR		/OBJECT BLOCK?
	SZA CLA		/YES
	JMP WAIT2
/AT THIS PLACE THE DATA TRANSFER CAN START, AFTER TRANSFERRING
/A BLOCK, A RETURN TO DT FOR IS MADE IF MORE BLOCKS
/ARE TO BE READ
	TAD NRBLKS
	TAD BLKNR
	DCA BLKNR
	TAD BLOCKL	/LOAD BLOCK LENGTH (NEGATIVE!)
	DCA I Z  DTWCT	/LOAD IN BREAK ADDRESS
	CMA		/GLIB, (ACCU)=-1
	TAD STADR		/START ADDRESS-1
	DCA I Z  DTMA	/DT MEMORY ADDRESS
	TAD FUNC
	TAD CONT
	JMS DTWAIT	/WAIT FOR TRANSFER.
	JMP RETRY		/ERROR
	CLA
	TAD STOP
	DTXA
	JMP I DTIO
DTWAIT,	0
	DTXA
	DTSF	/TEST FLAGS
	JMP .-1
	DTRB	/READ B REGISTER
	SMA CLA		/ERRORS?
	ISZ DTWAIT	/NORMAL RETURN.
	JMP I Z  DTWAIT
RETRY,	ISZ TRIALS	/NUMBER OF RETRIALS
	JMP DTIO+1
	TAD STOP
	DTXA
	DTCA
	CLA
	TAD EDT1
	DCA 10
	TAD EDT2
	JMS PRT
	JMP STRTP
EDT1,	EDT1
	"E;"R;"R;"O;"R;" ;"D;"T;212;215
EDT2,	-12
CONT,	100
SEARCH,	10
STOP,	200
REVERS,	400
MOVE,	0
	ISZ COUNT
	SKP
	JMP I MOVE
	TAD I 11
	DCA I 12
	JMP MOVE+1
*1200
	BUFB=.

BUFFER,	0
$