Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-06 - 43,50423/dtsort.lst
There are no other files named dtsort.lst in the archive.
DTSORT SORT DECTAPE DIRECTORIES ALPHABETICALY	MACRO %50(272) 15:48 26-APR-77 PAGE 1
DTSORT	MAC	26-APR-77 15:47	

     1					TITLE DTSORT SORT DECTAPE DIRECTORIES ALPHABETICALY
     2
     3			000000			SW=0
     4			000001			CNT=1
     5			000002			TST=2
     6			000003			BP=3
     7
     8	000000'	047 00 0 00 000000 	START:	RESET
     9	000001'	041 00 0 00 000317 		INIT	317		; USE 0 FOR I/O
    10	000002'	63 41 55 00 00 00 		SIXBIT 'SAM'
    11	000003'	000000	000000			0
    12	000004'	254 00 0 00 000371'		JRST	ERR1		; OH-OH
    13	000005'	400 01 0 00 000000 		SETZ	1,		; CHECK FOR DECTAPE
    14	000006'	047 01 0 00 000004 		CALLI	1, 4
    15	000007'	607 01 0 00 000100 		TLNN	1, (1B11)
    16	000010'	254 00 0 00 000373'		JRST	ERR2		; NOT A DECTAPE
    17	000011'	074 00 0 00 000144 		USETI	^D100		; GET DIRECTORY
    18	000012'	056 00 0 00 000113'		IN	IOWRD
    19	000013'	334 00 0 00 000000 		SKIPA
    20	000014'	254 00 0 00 000375'		JRST	ERR3		; HAD AN ERROR
    21	000015'	201 02 0 00 000001 		MOVEI	TST, 1		; SET UP MAP CROSS REFERENCE
    22	000016'	202 02 0 02 000314'	NXTMAP:	MOVEM	TST, DTMAP-1(TST)
    23	000017'	350 00 0 00 000002 		AOS	TST
    24	000020'	302 02 0 00 000027 		CAIE	TST, ^D23	; DO ALL 22?
    25	000021'	254 00 0 00 000016'		JRST	NXTMAP	; NO
    26	000022'	400 00 0 00 000000 	BEGSRT:	SETZ	SW,		; YE OLDE BUBBLE SORT
    27
    28	000023'	400 01 0 00 000000 		SETZ	CNT,
    29	000024'	200 02 0 01 000240'	NEXT:	MOVE	TST, FNAME(CNT)	; GET FIRST NAME
    30	000025'	322 02 0 00 000071'		JUMPE	TST, TESTM	; THIS IS ZERO CHECK NEXT ONE
    31	000026'	336 00 0 01 000241'		SKIPN	FNAME+1(CNT)	; NEXT ONE ZERO?
    32	000027'	254 00 0 00 000037'		JRST	TSTEND		; YES, GO ON
    33	000030'	315 02 0 01 000241'		CAMGE	TST, FNAME+1(CNT)
    34	000031'	254 00 0 00 000037'		JRST	TSTEND		; AC < NEXT ONE WE ARE OK
    35	000032'	312 02 0 01 000241'		CAME	TST, FNAME+1(CNT) ; ARE THEY EQUAL
    36	000033'	254 00 0 00 000036'		JRST	SWAPIT		; NO, SWITCH EM
    37	000034'	200 02 0 01 000266'		MOVE	TST, FEXT(CNT)	; YES, TEST EXTENSION
    38	000035'	313 02 0 01 000267'		CAMLE	TST, FEXT+1(CNT)
    39	000036'	264 00 0 00 000074'	SWAPIT:	JSR	SWITCH		; AC > NEXT ONE SWITCH IT
    40	000037'	350 00 0 00 000001 	TSTEND:	AOS	CNT
    41	000040'	302 01 0 00 000025 		CAIE	CNT, ^D21	; DO ALL 22?
    42	000041'	254 00 0 00 000024'		JRST	NEXT		; NO
    43	000042'	326 00 0 00 000022'		JUMPN	SW, BEGSRT	; GO BACK AND DO IT AGAIN IF WE HAD A SWITCH
    44	000043'	201 01 0 00 000001 		MOVEI	CNT, 1		; REMAP OUR MAP
    45	000044'	200 02 0 01 000314'	REMAP:	MOVE	TST, DTMAP-1(CNT)	; EG IF FILE # 24 IS NOW OUR FIRST FILE
    46	000045'	202 01 0 02 000342'		MOVEM	CNT, NEWMAP-1(TST) ; LOC 24  OF REMAP WILL BE SET TO A ONE
    47	000046'	350 00 0 00 000001 		AOS	CNT
    48	000047'	302 01 0 00 000027 		CAIE	CNT, ^D23
    49	000050'	254 00 0 00 000044'		JRST	REMAP
    50	000051'	200 03 0 00 000401'		MOVE	BP, [POINT 5, DIR, 4]
    51	000052'	201 01 0 00 001105 		MOVEI	CNT, ^D581	; REBUILD MAP (OR MAP THE MAP)
    52	000053'	135 02 0 00 000003 	NXTBYT:	LDB	TST, BP		; TAKE A NUMBER PLEASE
    53	000054'	303 02 0 00 000026 		CAILE	TST, ^D22	; LESS THAN 23
    54	000055'	254 00 0 00 000061'		JRST	TSTBPC		; NO NOT A REAL FILE
    55	000056'	322 02 0 00 000061'		JUMPE	TST, TSTBPC	; OR IS IT ZERO?

DTSORT SORT DECTAPE DIRECTORIES ALPHABETICALY	MACRO %50(272) 15:48 26-APR-77 PAGE 1-1
DTSORT	MAC	26-APR-77 15:47	

    56	000057'	200 02 0 02 000342'		MOVE	TST, NEWMAP-1(TST)	; GET NEW VALUE
    57	000060'	137 02 0 00 000003 		DPB	TST, BP		; STUFF IT
    58	000061'	133 00 0 00 000003 	TSTBPC:	IBP	BP		; ALL DONE?
    59	000062'	367 01 0 00 000053'		SOJG	CNT, NXTBYT
    60	000063'	075 00 0 00 000144 		USETO	^D100		; REWRITE THE DIRECTORY
    61	000064'	057 00 0 00 000113'		OUT	IOWRD
    62	000065'	334 00 0 00 000000 		SKIPA
    63	000066'	254 00 0 00 000377'		JRST	ERR4		; OH-OH WE JUST SCREWED UP A TAPE!
    64	000067'	070 00 0 00 000000 		CLOSE			; THATS ALL FOLKS
    65	000070'	047 00 0 00 000012 		EXIT
    66
    67	000071'	336 00 0 01 000241'	TESTM:	SKIPN	FNAME+1(CNT)	; IS NEXT ONE ZERO ALSO
    68	000072'	254 00 0 00 000037'		JRST	TSTEND		; YES
    69	000073'	254 00 0 00 000036'		JRST	SWAPIT		; NO, SWITCH IT
    70
    71	000074'	000000	000000		SWITCH:	0
    72	000075'	200 02 0 01 000240'		MOVE	TST, FNAME(CNT)	; SWITCH FILE NAMES
    73	000076'	200 03 0 01 000241'		MOVE	BP, FNAME+1(CNT)
    74	000077'	202 03 0 01 000240'		MOVEM	BP, FNAME(CNT)
    75	000100'	202 02 0 01 000241'		MOVEM	TST, FNAME+1(CNT)
    76	000101'	200 02 0 01 000266'		MOVE	TST, FEXT(CNT)	; SWITCH EXTENSIONS
    77	000102'	200 03 0 01 000267'		MOVE	BP, FEXT+1(CNT)
    78	000103'	202 03 0 01 000266'		MOVEM	BP, FEXT(CNT)
    79	000104'	202 02 0 01 000267'		MOVEM	TST, FEXT+1(CNT)
    80	000105'	200 02 0 01 000315'		MOVE	TST, DTMAP(CNT)	; ADJUST THE MAP
    81	000106'	200 03 0 01 000316'		MOVE	BP, DTMAP+1(CNT)
    82	000107'	202 03 0 01 000315'		MOVEM	BP, DTMAP(CNT)
    83	000110'	202 02 0 01 000316'		MOVEM	TST, DTMAP+1(CNT)
    84	000111'	474 00 0 00 000000 		SETO	SW,		; SET SWITCH MADE FLAG
    85	000112'	254 00 1 00 000074'		JRST	@ SWITCH
    86
    87	000113'	777600	000114'		IOWRD:	IOWD ^D128, DIR
    88	000114'	000000	000000			0
    89
    90	000115'				DIR:	BLOCK ^D82
    91	000237'	000000	000000		SLTEND:	0
    92	000240'				FNAME:	BLOCK ^D22
    93	000266'				FEXT:	BLOCK ^D22
    94	000314'	000000	000000			0
    95
    96	000315'				DTMAP:	BLOCK ^D22
    97	000343'				NEWMAP:	BLOCK ^D22
    98
    99					ERR1:	OUTSTR	[ASCIZ /? DEVICE "SAM" NOT ASSIGNED
   100	000371'	051 03 0 00 000402'	/]
   101	000372'	047 00 0 00 000012 		EXIT
   102					ERR2:	OUTSTR [ASCIZ /? DEVICE "SAM" IS NOT A DECTAPE
   103	000373'	051 03 0 00 000410'	/]
   104	000374'	047 00 0 00 000012 		EXIT
   105					ERR3:	OUTSTR [ASCIZ /? INPUT ERROR ON DIRECTORY
   106	000375'	051 03 0 00 000417'	/]
   107	000376'	047 00 0 00 000012 		EXIT
   108					ERR4:	OUTSTR [ASCIZ /? OUTPUT ERROR ON DIRECTORY
   109	000377'	051 03 0 00 000425'	/]
   110	000400'	047 00 0 00 000012 		EXIT

DTSORT SORT DECTAPE DIRECTORIES ALPHABETICALY	MACRO %50(272) 15:48 26-APR-77 PAGE 1-2
DTSORT	MAC	26-APR-77 15:47	

   111
   112	000401'					LIT
   113	000401'	37 05 0 00 000115'
   114	000402'	077 040 104 105 126 
   115	000403'	111 103 105 040 042 
   116	000404'	123 101 115 042 040 
   117	000405'	116 117 124 040 101 
   118	000406'	123 123 111 107 116 
   119	000407'	105 104 015 012 000 
   120	000410'	077 040 104 105 126 
   121	000411'	111 103 105 040 042 
   122	000412'	123 101 115 042 040 
   123	000413'	111 123 040 116 117 
   124	000414'	124 040 101 040 104 
   125	000415'	105 103 124 101 120 
   126	000416'	105 015 012 000 000 
   127	000417'	077 040 111 116 120 
   128	000420'	125 124 040 105 122 
   129	000421'	122 117 122 040 117 
   130	000422'	116 040 104 111 122 
   131	000423'	105 103 124 117 122 
   132	000424'	131 015 012 000 000 
   133	000425'	077 040 117 125 124 
   134	000426'	120 125 124 040 105 
   135	000427'	122 122 117 122 040 
   136	000430'	117 116 040 104 111 
   137	000431'	122 105 103 124 117 
   138	000432'	122 131 015 012 000 
   139			000000'			END	START

NO ERRORS DETECTED

PROGRAM BREAK IS 000433
CPU TIME USED 00:01.566

3K CORE USED

DTSORT SORT DECTAPE DIRECTORIES ALPHABETICALY	MACRO %50(272) 15:48 26-APR-77 PAGE S-1
DTSORT	MAC	26-APR-77 15:47		SYMBOL TABLE

BEGSRT		000022'		
BP		000003		
CNT		000001		
DIR		000115'		
DTMAP		000315'		
ERR1		000371'		
ERR2		000373'		
ERR3		000375'		
ERR4		000377'		
EXIT	047000	000012		
FEXT		000266'		
FNAME		000240'		
IOWRD		000113'		
NEWMAP		000343'		
NEXT		000024'		
NXTBYT		000053'		
NXTMAP		000016'		
OUTSTR	051140	000000		
REMAP		000044'		
RESET	047000	000000		
SLTEND		000237'		
START		000000'		
SW		000000		
SWAPIT		000036'		
SWITCH		000074'		
TESTM		000071'		
TST		000002		
TSTBPC		000061'		
TSTEND		000037'		


BEGSRT	    26#	    43
BP	     6#	    50	    52	    57	    58	    73	    74	    77	    78	    81	    82
CNT	     4#	    28	    29	    31	    33	    35	    37	    38	    40	    41	    44	    45	    46	    47
	    48	    51	    59	    67	    72	    73	    74	    75	    76	    77	    78	    79	    80	    81
	    82	    83
DIR	    50	    87	    90#
DTMAP	    22	    45	    80	    81	    82	    83	    96#
ERR1	    12	    99#
ERR2	    16	   102#
ERR3	    20	   105#
ERR4	    63	   108#
FEXT	    37	    38	    76	    77	    78	    79	    93#
FNAME	    29	    31	    33	    35	    67	    72	    73	    74	    75	    92#
IOWRD	    18	    61	    87#
NEWMAP	    46	    56	    97#
NEXT	    29#	    42
NXTBYT	    52#	    59
NXTMAP	    22#	    25
REMAP	    45#	    49
SLTEND	    91#
START	     8#	   139
SW	     3#	    26	    43	    84
SWAPIT	    36	    39#	    69
SWITCH	    39	    71#	    85
TESTM	    30	    67#
TST	     5#	    21	    22	    23	    24	    29	    30	    33	    35	    37	    38	    45	    46	    52
	    53	    55	    56	    57	    72	    75	    76	    79	    80	    83
TSTBPC	    54	    55	    58#
TSTEND	    32	    34	    40#	    68
EXIT	    65	   101	   104	   107	   110
OUTSTR	    99	   102	   105	   108
RESET	     8