Google
 

Trailing-Edge - PDP-10 Archives - AP-D489C-SB - sort.rbw
There are no other files named sort.rbw in the archive.
.VARIABLE TWENTY 2 1
\\
.LM0;.RM70;.F;.J;.FLAG CAP;.SP1;.TS5
<SORT.BWR -- ^BEWARE FILE FOR <SORT
.BR
^APR 1978
.FG30
^^COPYRIGHT (C) 1978 BY
.BR
DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
.B2
THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE
INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER
COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY
TRANSFERRED.
.B1
THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
CORPORATION.
.B1
DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL\\.
.AUTOPARAGRAPH			!PARAGRAPHS START WITH A LEADING SPACE
.T <SORT.BWR
.PARAGRAPH 0, 1, 1		!SET NORMAL PARAGRAPHING
.AUTOPARAGRAPH			!PARAGRAPHS START WITH A SPACE
.TAB STOPS 9, 17, 25, 33, 41, 49, 57, 63, 69  !USUAL TTY TABBING
.PG.LM0.RM70.SP1.F.J
<SORT.BWR -- ^BEWARE FILE FOR <SORT
.B3.LM0.RM70
.IF TWENTY
^BECAUSE OF THE NATIVE MODE COMMAND SCANNER VERSION 4 IS NOT COMPATIBLE
WITH VERSION 3. ^IN PARTICULAR THIS MEANS THAT ALL <BATCH AND <FORTRAN
<SORT COMMANDS WILL HAVE TO BE REWRITTEN.
.B 3
.ENDIF TWENTY
<BUG <FIXES:
.B 1
.LM 5
^BUG FIXES FOUND TOO LATE TO BE INCLUDED IN THIS RELEASE.
.BR
^THESE FIXES ARE INCLUDED IN THE <*.NEW FILES FOR YOU CONVENIENCE.
.LM 0
.B 3
^EDIT 303
.B 1
.LITERAL
File 1)	DSK:SRTPRM.302[4,150]	created: 1534 29-Mar-1978
File 2)	DSK:SRTPRM.MAC[4,150]	created: 1056 04-Apr-1978

1)1	SUBTTL	D.M.NIXON/DMN/DPL/DZN	29-MAR-78
1)	;COPYRIGHT (C) 1975, 1978 BY
****
2)1	SUBTTL	D.M.NIXON/DMN/DPL/DZN	4-Apr-78
2)	;COPYRIGHT (C) 1975, 1978 BY
**************
1)1	DECEVR==302		;DEC EDIT VERSION
1)	V%SORT==:<CUSTVR>B2+<DECVER>B11+<DECMVR>B17+DECEVR
****
2)1	DECEVR==303		;DEC EDIT VERSION
2)	V%SORT==:<CUSTVR>B2+<DECVER>B11+<DECMVR>B17+DECEVR
**************
1)5	SUBTTL	DEFINITIONS -- Accumulators
****
2)4	;SORT/MERGE %4(302) Released
2)	;303	Fix compares of two character EBCDIC alphanumeric keys in the middle of a word.
2)5	SUBTTL	DEFINITIONS -- Accumulators
**************
.END LITERAL
.PG
.LITERAL
File 1)	DSK:SRTCMP.302[4,150]	created: 0848 17-Mar-1978
File 2)	DSK:SRTCMP.MAC[4,150]	created: 1106 04-Apr-1978

1)1	SUBTTL	D.M.NIXON/DZN	4-Mar-78
1)	;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
****
2)1	SUBTTL	D.M.NIXON/DZN	4-Apr-78
2)	;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
**************
1)33		.HWFRMT
1)	MSKE12==BYTE	(9)	0,0,377,0
1)	MSKE13==BYTE	(9)	0,0,0,377
1)		.MFRMT
1)34	;	CODE GENERATION FOR COMPARISON OF EBCDIC KEYS
****
2)33	$EDIT 303;[303] Change @MSKE12	DZN	4-Apr-78
2)		SEGMENT	LOW10			;[303]
2)		.HWFRMT
2)	;MSKE10==BYTE	(9)	377,000,000,000
2)	;MSKE11==BYTE	(9)	000,377,000,000
2)	MSKE12==BYTE	(9)	000,000,377,000
2)	MSKE13==BYTE	(9)	000,000,000,377
2)	;MSKE20==BYTE	(9)	377,377,000,000
2)	MSKE21:	BYTE	(9)	000,377,377,000	;[303]
2)	;MSKE22==BYTE	(9)	000,000,377,377
2)	;MSKE30:BYTE	(9)	377,377,377,000
2)	;MSKE31:BYTE	(9)	000,377,377,377
2)	;MSKE40:BYTE	(9)	377,377,377,377
2)		.MFRMT
2)		SEGMENT	HIGH			;[303]
2)34	;	CODE GENERATION FOR COMPARISON OF EBCDIC KEYS
**************
1)35		$LSH$	-9
1)		$JCAI$
1)	EBC22:	CAIGE	P3,2+2		;TEST FOR SPECIAL END CASES
****
2)35	$EDIT 303;[303] Replace @EBC21+1	DZN	4-Apr-78
2)		$AND$	MSKE21		;[303] MAKE SURE BYTES 0 AND 3 ARE ZERO
2)		$JCAM$			;[303]   ..
2)	EBC22:	CAIGE	P3,2+2		;TEST FOR SPECIAL END CASES
**************
.END LITERAL
.PAGE
^EDIT 304
.B 1
.LITERAL
File 1)	DSK:SRTPRM.302[4,150]	created: 1534 29-Mar-1978
File 2)	DSK:SRTPRM.MAC[4,150]	created: 1031 06-Apr-1978

1)1	SUBTTL	D.M.NIXON/DMN/DPL/DZN	29-MAR-78
1)	;COPYRIGHT (C) 1975, 1978 BY
****
2)1	SUBTTL	D.M.NIXON/DMN/DPL/DZN	5-Apr-78
2)	;COPYRIGHT (C) 1975, 1978 BY
**************
1)1	DECMVR==0		;DEC MINOR VERSION
1)	DECEVR==302		;DEC EDIT VERSION
1)	V%SORT==:<CUSTVR>B2+<DECVER>B11+<DECMVR>B17+DECEVR
****
2)1	DECMVR==1		;DEC MINOR VERSION
2)	DECEVR==304		;DEC EDIT VERSION
2)	V%SORT==:<CUSTVR>B2+<DECVER>B11+<DECMVR>B17+DECEVR
**************
1)5	SUBTTL	DEFINITIONS -- Accumulators
****
2)4	;SORT %4(302) Released
2)	;304	Fix ?SRTRIE errors on EBCDIC fixed-length files.
2)5	SUBTTL	DEFINITIONS -- Accumulators
**************



File 1)	DSK:SORT.302[4,150]	created: 1519 29-Mar-1978
File 2)	DSK:SORT.MAC[4,150]	created: 1406 05-Apr-1978

1)1	SUBTTL	D.M.NIXON/DZN/DLC	27-Mar-78
1)	IFN FTOPS20,<
****
2)1	SUBTTL	D.M.NIXON/DZN/DLC	5-Apr-78
2)	IFN FTOPS20,<
**************
1)42		BLT	T3,1(R)			;TRANSFER RECORD FRAGMENT
1)		MOVNI	T1,4			;4 BYTES PER WORD
****
2)42	$EDIT 304;[304] Replace @GETEML+14	DZN	5-Apr-78
2)		BLT	T3,0(R)			;[304] TRANSFER RECORD FRAGMENT
2)		MOVNI	T1,4			;4 BYTES PER WORD
**************
.END LITERAL
.PAGE
^EDIT 305 <TOPS-20 ONLY
.B 1
.LITERAL
File 1)	DSK:SRTPRM.MAC	created: 1340 11-APR-1978
File 2)	DSK:SRTPRM.305	created: 1429 11-APR-1978

1)1	SUBTTL	D.M.NIXON/DMN/DPL/DZN	29-MAR-78
1)	;COPYRIGHT (C) 1975, 1978 BY
****
2)1	SUBTTL	D.M.NIXON/DMN/DPL/DZN	10-APR-78
2)	;COPYRIGHT (C) 1975, 1978 BY
**************
1)1	DECEVR==302		;DEC EDIT VERSION
1)	V%SORT==:<CUSTVR>B2+<DECVER>B11+<DECMVR>B17+DECEVR
****
2)1	DECEVR==305		;DEC EDIT VERSION
2)	V%SORT==:<CUSTVR>B2+<DECVER>B11+<DECMVR>B17+DECEVR
**************
1)5	SUBTTL	DEFINITIONS -- Accumulators
****
2)4	;SORT/MERGE %4(302) Released
2)	;305	ON TOPS-20 FIX BLOCKING FACTOR PROBLEMS
2)5	SUBTTL	DEFINITIONS -- Accumulators
**************
1)11	FILBUF:!BLOCK	1		;(TOPS10) WHERE BUFFERS START (BUFPTR)
1)					;(TOPS20) BUFFER SIZE (PGS),,1ST PAGE
1)					;(TOPS20)  EXCEPT MAGTAPE, WHICH HAS:
1)					;(TOPS20) BUF SIZE (WORDS),,1ST WORD
1)	FILBLK:!BLOCK	1		;FILE BLOCKING FACTOR
1)	FILFLG:!BLOCK	1		;SEE FI.??? FLAGS ABOVE
****
2)11	FILBUF:!BLOCK	1		;WHERE BUFFERS START (BUFPTR)
2)	FILBLK:!BLOCK	1		;FILE BLOCKING FACTOR
2)	FILBSZ:!BLOCK	1		;[305] FILE BLOCK SIZE
2)	FILFLG:!BLOCK	1		;SEE FI.??? FLAGS ABOVE
**************
.END LITERAL
.IF TWENTY
.B 3
.LITERAL
File 1)	DSK:SRTJSS.MAC	created: 1219 11-APR-1978
File 2)	DSK:SRTJSS.305	created: 1621 11-APR-1978

1)1	SUBTTL	D.L. CAMPBELL/DZN	29-Mar-78
1)	;	"JSYS SAVES"
****
2)1	SUBTTL	D.L. CAMPBELL/DZN	10-APR-78
2)	;	"JSYS SAVES"
**************
1)9		HRLZM T1,FILBLK(F)	;STORE AS AOBJN WORD
****
2)9		SUBI T1,1		;[305] ADJUST FOR OFF-BY-ONE CODE
2)		HRLZM T1,FILBLK(F)	;STORE AS AOBJN WORD
**************
1)10		HLRZ T1,FILPGN(F)	;GET JFN
****
2)10		SKIPE X.BLKF(P1)	;[305] IF BLOCKED FILE,
2)		CALL BLKSET		;[305]  SET UP FOR IT
2)		HLRZ T1,FILPGN(F)	;GET JFN
**************
1)10		$ERROR (?,IBS,<Invalid byte size for >,+)
****
2)10		CAIN T1,^D9		;[305] 9-BIT BYTES?
2)		JRST INDSK9		;[305] YES, HANDLE IT
2)		$ERROR (?,IBS,<Invalid byte size for >,+)
**************
1)10	INDSK1:	MOVEI T1,MODASCII	;ARE WE SORTING ASCII RECORDS?
1)		CAME T1,IOMODE		; ..
1)		JRST [$ERROR (?,FMC,<File's mode conflicts with mode switch>)]
1)		MOVE T1,T4		;YES, GET BYTE COUNT IN T1
****
2)10	INDSK9:	MOVX T1,MODEBCDIC	;[305] IF FILE HAS 9-BIT BYTES,
2)		CAME T1,IOMODE		;[305]  I/O MODE HAD BETTER BE EBCDIC
2)		JRST E$$FMC		;[305] FILE MODE CONFLICT
2)		MOVEM T4,FILEOF(F)	;[305] STUFF BYTE COUNT INTO FCB
2)		JRST INDSK3		;[305] REJOIN COMMON CODE
2)	INDSK1:	MOVEI T1,MODASCII	;ARE WE SORTING ASCII RECORDS?
2)		CAME T1,IOMODE		; ..
2)		JRST E$$FMC		;[305] File's mode conflicts with mode switch
2)		MOVE T1,T4		;YES, GET BYTE COUNT IN T1
**************
1)14	SUBTTL	I/O ROUTINES -- INIINP - Initialize Next Input File -- Others
****
2)13	;[305] BLKSET - SET UP FOR BLOCKED FILE.  COMPUTES NUMBER OF WORDS IN
2)	;[305]  A BLOCK (ALWAYS AN INTEGRAL MULTIPLE OF 128 WORDS).
2)	BLKSET:	MOVE T1,RECORD		;[305] GET BYTES PER RECORD
2)		IMUL T1,X.BLKF(P1)	;[305]  TIMES RECORDS PER BLOCK
2)		IDIV T1,IOBPW		;[305]  DIVIDED BY BYTES PER WORD
2)		SKIPE T2		;[305] WHICH, AFTER ROUNDING,
2)		ADDI T1,1		;[305]  IS WORDS PER BLOCK
2)		ANDI T1,777600		;[305] LOSE LOW-ORDER BITS
2)		ADDI T1,200		;[305] ROUND UP TO NEXT WHOLE BLOCK SIZE
2)		MOVEM T1,FILBSZ(F)	;[305] SAVE IN FCB
2)		RET			;[305]
2)14	SUBTTL	I/O ROUTINES -- INIINP - Initialize Next Input File -- Others
**************
1)17		HRLZM T1,FILBLK(F)	;STORE AS AOBJN WORD
****
2)17		SUBI T1,1		;[305] ADJUST FOR OFF-BY-ONE CODE
File 1)	DSK:SRTJSS.MAC	created: 1219 11-APR-1978
File 2)	DSK:SRTJSS.NEW	created: 1621 11-APR-1978

2)		HRLZM T1,FILBLK(F)	;STORE AS AOBJN WORD
**************
1)18		HLRZ T1,FILPGN(F)	;GET JFN
****
2)18		SKIPE X.BLKF(P1)	;[305] IF BLOCKED FILE,
2)		CALL BLKSET		;[305]  SET UP FOR IT
2)		HLRZ T1,FILPGN(F)	;GET JFN
**************
1)40	CLRBUF:	MOVX T1,FI.DSK		;FILTER OUT BUGS
1)		TDNN T1,FILFLG(F)	; ..
1)		JRST E$$CCN		;NON-DISK DEVICE
1)		HRRZ T4,FILPTR(F)	;GET ADDR FILPTR CURRENTLY POINTS AT
1)		MOVX T1,777600		;ROUND FILPTR UP TO NEXT
1)		ANDM T1,FILPTR(F)	; TOPS-10 SIZE DISK BLOCK
1)		MOVX T1,200		; (128 WORDS)
1)		ADD T1,CBPTR		; RESTORING GOOD LH TO BYTE PTR
1)		ADDB T1,FILPTR(F)	; ..
1)		HRRZS T1		;GET ADDR FILPTR POINTS TO
1)		HRRZ T3,FILBUF(F)	;GET PAGE BUFFER STARTS ON
****
2)40	CLRBUF:	MOVE T1,FILFLG(F)	;[305] FILTER OUT BUGS
2)		TXNN T1,FI.DSK		;[305]  ..
2)		JRST E$$CCN		;NON-DISK DEVICE
2)		TXNN T1,FI.OUT		;[305] OUTPUT FILE?
2)		SKIPE FILEOF(F)		;[305]  OR INPUT AND STILL HAVE BYTES LEFT?
2)		JRST CLRBF1		;[305] YES TO EITHER, GO ON
2)		SETZM FILCNT(F)		;[305] NO, THIS IS END-OF-FILE
2)		RET			;[305] RETURN TO GETBUF
2)	CLRBF1:	HRRZ T1,FILBUF(F)	;[305] GET FIRST PAGE OF BUFFER
2)		LSH T1,POW2(PGSIZ)	;[305] COMPUTE ADDRESS
2)		HRRZ T2,FILPTR(F)	;[305] GET R.H. OF BYTE POINTER
2)		SUB T2,T1		;[305] COMPUTE OFFSET INTO BUFFER
2)		MOVE T4,FILBSZ(F)	;[305] GET BLOCK SIZE
2)		IDIVI T2,(T4)		;[305] BUMP UP TO NEXT BLOCK
2)		ADDI T2,1		;[305]  ..
2)		IMULI T2,(T4)		;[305]  ..
2)		ADD T2,T1		;[305] ADD BASE ADDRESS OF BUFFER
2)		ADD T2,CBPTR		;[305] MAKE REASONABLE L.H. OF BYTE POINTER
2)		MOVEM T2,FILPTR(F)	;[305] SAVE NEW FILE POINTER
2)		HRRZ T1,T2		;[305] GET ADDR FILPTR POINTS TO
2)		HRRZ T3,FILBUF(F)	;GET PAGE BUFFER STARTS ON
**************
1)55	E$$CFF:	$ERROR (?,CFF,<CLOSE failure for file >,+)
****
2)55	E$$FMC:	$ERROR (?,FMC,<File's mode conflicts with mode switch FOR >,+)
2)		HRRZ T2,X.JFN(P1)		;[305] 
2)		$MORE (FILESPEC,T2)
2)		$DIE
2)	E$$CFF:	$ERROR (?,CFF,<CLOSE failure for file >,+)
**************
.END LITERAL
.ENDIF TWENTY
.B 3
^^[END OF SORT.BWR]\\