Google
 

Trailing-Edge - PDP-10 Archives - BB-H311B-RM - rsx20f-swskit/listings/save.lis
There is 1 other file named save.lis in the archive. Click here to see a list.
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06
TABLE OF CONTENTS

     2-    2	TITLE PAGE
     3-   70	GENERAL DESCRIPTION OF SAVE FUNCTION
     4-  142	MACROS AND PARAMETERS
     5-  240	DEVICE REGISTER DEFINITIONS
     6-  333	SAVE TASK IMPURE DATA AREA
     7-  389	PURE DATA
     8-  443	PARSE COMMAND LINE
     9-  544	SETUP SAVE FILE
    10-  713	DISMOUNT ALL MOUNTED VOLUMES
    11-  755	SAVE SYSTEM STATE
    12-  862	WRITE SAVE FILE AND BOOT
    13-  879	RESTORE SYSTEM STATE
    14-  919	RESTORE -- SETUP CTY LINE # AND DH-11 TABLES
    15-  982	RESTORE -- REDIRECT SY0: TO BOOT DEVICE
    16- 1035	RESTORE -- CHECK BOOT DB & LOOK FOR RP06'S
    17- 1093	RESTORE -- CHECK ALL THE DTE-20'S
    18- 1157	RESTORE -- RESTART SYSTEM AND TYPE HERALD
    19- 1200	RESTORE -- TYPE SY0: REDIRECT MESSAGE AND MOUNT SY0:
    20- 1244	RESTORE -- READ HOM BLOCKS ON BOOT DB
    21- 1335	RESTORE -- CKECK STATE OF KLINIK LINE
    22- 1427	RESTORE -- REQUEST KL INITIALIZATION TASK AND/OR EXIT
    23- 1461	COMMAND PARSER ROUTINES
    24- 1545	TYPEOUT ROUTINES
    25- 1743	FILE I/O ROUTINES
    26- 1816	DRIVER TABLES
    27- 1858	RX-11 FLOPPY DISK ROUTINES
    28- 1877	RX-11 BOOTSTRAP
    29- 2048	RX-11 WRITE ROUTINE
    30- 2173	RP04/RP06 DISK ROUTINES
    31- 2206	RP04/RP06 BOOTSTRAP
    32- 2292	RP04/RP06 WRITE ROUTINE
    33- 2350	TC-11 DECTAPE ROUTINES
    34- 2366	TC-11 BOOTSTRAP
    35- 2483	TC-11 WRITE ROUTINE
    36- 2567	END STATEMENT
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 1
RSXDC -- RSX20F CONDITIONAL DEFINITION MODULE

     29						.LIST	MEB
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 2
RSXDC -- RSX20F CONDITIONAL DEFINITION MODULE

      1						.TITLE	SAVE -- MCR FUNCTION 'SAV' FOR RSX-20F
      2						.SBTTL	TITLE PAGE
      3						.IDENT	/013400/
      4					;
      5					;                             COPYRIGHT (C) 1975, 1978 BY
      6					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      7					;
      8					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
      9					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
     10					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     11					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     12					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     13					;
     14					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     15					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     16					;       CORPORATION.
     17					;
     18					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     19					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     20					;
     21					;		MODULE: MCR FUNCTION -- SAV
     22					;
     23					;		VERSION: VX13-40
     24					;
     25					;		AUTHOR: TOM PORCHER
     26					;
     27					;		DATE: 10-SEP-75
     28					;
     29					;
     30					;	THIS MODULE CONTAINS:
     31					;
     32					;	-- GENERAL FUNCTIONAL DESCRIPTION
     33					;
     34					;	-- COMMAND PARSER FOR SAV
     35					;
     36					;	-- CODE TO SAVE MACHINE STATE
     37					;
     38					;	-- CODE TO WRITE BOOTSTRAP AND SAVE FILE
     39					;
     40					;	-- CODE TO RESTORE SAVED SYSTEM AND RESTART
     41					;
     42					;	-- RX-11 FLOPPY DISK I/O DRIVER ROUTINES
     43					;
     44					;	-- RP DISK I/O DRIVER ROUTINES
     45					;
     46					;	-- TC-11 DECTAPE I/O DRIVER ROUTINES
     47					;
     48					; MODIFICATIONS:
     49					;
     50					;	NO.	DATE		PROGRAMMER	PURPOSE
     51					;	---	----		----------	-------
     52					;	001	23-MAY-77	R. BELANGER	SUPPORT KLINIK ACTIVITY
     53					;						ON REBOOT.
     54					;	002	31-MAY-77	R. BELANGER	MODIFY TO SAVE ONLY IMAGE
     55					;						OF EXEC AND SAVE TASK.
     56					;	003	01-JUN-77	A. PECKHAM	MODIFY REFERENCE TO SYSTEM
     57					;						VERSION NUMBER.
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 2-1
TITLE PAGE

     58					;	004	01-JUL-77	R. BELANGER	ADD KLINIK EVENT LOGGING
     59					;	005	10-NOV-77	R. BELANGER	ADD CODE TO RESET DL11'S (SETDL)
     60					;	006	09-MAY-78	R. BELANGER	MODIFY "MNTSY" TO MOUNT A
     61					;						SECOND FLOPPY
     62					;	007	25-JUN-79	K. LEFEBVRE	ADD DEFAULT BIT TO
     63					;						.KLIWD INITIALIZATION
     64					;   TCO 4.2333	16-JUL-79	R. BELANGER	ADD KL10 ENVIRONMENTAL
     65					;						REPORTING SUPPORT.
     66					;						BRING SAVE VERSION IN LINE WITH
     67					;						RSX-20F VERSION.
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 3
TITLE PAGE

     69
     70						.SBTTL	GENERAL DESCRIPTION OF SAVE FUNCTION
     71					;
     72					;+
     73					;
     74					;	SAV IS INVOKED BY THE COMMAND 'MCR SAV' TO THE
     75					; RSX-20F CONSOLE COMMAND LANGUAGE.  IT ACCEPTS ONE LINE FROM THE
     76					; CONSOLE WHICH HAS THE FOLLOWING FORMAT:
     77					;
     78					;	[$<SP>] [<ALPHA> <ALPHA> [$<DIGIT>]] [":"] [$<SP>] ["/" <MODIFIER>] <EOL>
     79					;
     80					;	WHERE	$<THING> MEANS ANY NUMBER OF <THING>S
     81					;		[<THING>] MEANS OPTIONAL <THING>
     82					;		"<THING>" MEANS LITERALLY <THING>
     83					;		<SP> IS SPACE, <EOL> IS ANY END-OF-LINE SEQUENCE,
     84					;		<DIGIT> IS ONE OF 0,1,2,3,4,5,6,7
     85					;		<ALPHA> IS ONE OF A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z
     86					;		<MODIFIER> IS ONE OF WB,WS,AB,EX,MO,DM,RH,PI
     87					;
     88					;
     89					; **** NOTE THAT SAVE MUST BE CALLED ONLY WHEN THE SYSTEM IS QUIESCENT,
     90					; **** I.E. WITH NO PENDING INTERRUPTS, AND THE DTE QUEUED PROTOCOL NOT
     91					; **** RUNNING.
     92					;
     93					;	SAVE FINDS THE PHYSICAL DISK ADDRESS OF FILE (5,5) WHICH IS
     94					; THE SYSTEM IMAGE FILE.  IF THE FILE IS NOT ALLOCATED, IT IS ALLOCATED
     95					; TO THE SIZE OF THE CURRENT SYSTEM (.MSIZE) CONTIGUOUSLY.  SAVE
     96					; THEN TURNS OFF THE INTERRUPT SYSTEM (PRIORITY 7) AND SAVES THE
     97					; STATE OF THE SYSTEM HARDWARE (KT-11 IF ANY), THEN COPIES LOW CORE
     98					; (FIRST 256. WORDS) INTO A SAVE AREA.  THE PROPER BOOT FOR THE
     99					; REQUESTED DEVICE IS WRITTEN INTO LOW CORE.  THE SYSTEM IMAGE FILE IS WRITTEN,
    100					; USING THE DISK ROUTINES IN SAVE INSTEAD OF THE SYSTEM DISK DRIVERS TO PRESERVE
    101					; THE INTEGRITY OF THE SYSTEM IMAGE.  IF WRITE BOOT (/WB) WAS SPECIFIED, THE PROPER
    102					; BOOTSTRAP IS ALSO WRITTEN ON BLOCK ZERO OF THE SPECIFIED DEVICE.
    103					; SAVE THEN ENTERS THE RESTORE CODE, AS IF THE SYSTEM HAD JUST BEEN
    104					; LOADED, SPECIFYING NO SYSTEM INITIALIZATION.
    105					;
    106					;	WHEN THE BOOTSTRAP ROM IS INITIATED (BY ONE OF THE BUTTONS)
    107					; BLOCK ZERO OF THE DEVICE IS READ INTO THE FIRST 256. WORDS OF MEMORY.
    108					; THIS CODE THEN READS THE REMAINDER OF THE SYSTEM INTO CORE, READING
    109					; OVER ITSELF, SINCE THE BOOTSTRAP IS ALSO  CONTAINED IN THE FIRST
    110					; BLOCK OF THE SYSTEM IMAGE.  THE BOOTSTRAP THEN TRANSFERS CONTROL
    111					; (IN USER MODE) TO THE RESTORE CODE, CONTINUING EXECUTION OF THE
    112					; SAVE TASK.
    113					;
    114					;	THE SYSTEM STATE IS RESTORED BY FIRST RESTORING LOW CORE FROM
    115					; THE SAVE AREA.  THE KT-11 REGISTERS ARE RESTORED (IF THEY WERE SAVED).
    116					; A POWER-RECOVERY
    117					; IS SIMULATED BY SETTING EV.PR IN .SERFG, AND INTERRUPTS ARE
    118					; RE-ENABLED, AT PRIORITY ZERO.  THE TOPS HOM BLOCKS ARE
    119					; READ FROM RP BOOT UNIT (IF RP BOOT) TO FIND WHERE THE RSX-20F FILE SYSTEM
    120					; IS ON THAT PACK.  WARNINGS ARE PRINTED IF THE HOM BLOCKS CANNOT BE READ,
    121					; THE HOM BLOCKS ARE INCONSISTENT, OR THE RSX-20F FILE SYSTEM IS NOT SET UP.
    122					; IF NO HOM BLOCKS ARE FOUND, THE PACK IS ASSUMED TO BE ENTIRELY AN RSX-20F
    123					; FILE SYSTEM.
    124					;
    125					;	IF THE PARAMETER FROM THE ROM
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 3-1
GENERAL DESCRIPTION OF SAVE FUNCTION

    126					; INDICATES SYSTEM INITIALIZATION IS NECCESARY (BP.LD1!BP.LD0 = 00 OR 11)
    127					; A REQUEST FOR THE SYSTEM INITIALIZATION TASK SYSINI IS MADE.
    128					; A SYSTEM RESTART MESSAGE IS ALSO PRINTED.  THE SAVE TASK THEN EXITS.
    129					;
    130					;	AVAILABLE MODIFIERS:
    131					; /WB	(OFF) WRITE BOOT
    132					; /WS	(ON)  WRITE SAVE FILE
    133					; /AB	(OFF) SAVE TO FIXED DISK ADDRESS (NEAR END OF VOLUME) (ONLY IF FTABS DEFINED)
    134					; /EX	(ON)  EXIT AFTER SAVE COMPLETE
    135					; /MO	(OFF) MOUNT VOLUME BEFORE CREATING SAVE FILE
    136					; /DM	(OFF) DISMOUNT VOLUME AFTER CREATING SAVE FILE
    137					; /RH	(ON)  READ HOM BLOCKS TO FIND RSX-20F FILE SYSTEM
    138					;
    139					;-
    140					;
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 4
MACROS AND PARAMETERS

    142						.SBTTL	MACROS AND PARAMETERS
    143					;
    144					; ASSEMBLY CONDITIONS
    145					;
    146						.LIST	MEB
    147						.ENABLE	AMA
    148					;
    149					; MISC. .MCALLS
    150					;
    151					.MCALL $DEF,QIOSY$,ALUN$S,QIOW$S,GTIM$S,EXIT$S,RQST$S,CLEF$S,MRKT$S,WTSE$S
    152					.MCALL CALL,RETURN,PUSH,POP,MTPI,MFPI,MFPS,MTPS,.INH,.ENB,.INH6,.ENB6
    153	000000					$DEF
    154	000000					QIOSY$
    155					;
    156					; MACROS
    157					;
    158					.MACRO	TYPE	MSG,ARG
    159						.PSECT	TEXT
    160					$$$=.
    161						.ASCIZ	"MSG"
    162						.PSECT
    163						PUSH	#$$$
    164					.IF NB <ARG>
    165						CALL	TYP'ARG
    166					.IFF
    167						CALL	TYPMSG
    168					.ENDC
    169					.ENDM	TYPE
    170					;
    171					.MACRO	ERROR	MSG
    172						TYPE	<"<11>"MSG"<5>">
    173					.ENDM	ERROR
    174					;
    175					.MACRO	WARN	MSG
    176						TYPE	<"<12>"MSG"<1>">
    177					.ENDM	WARN
    178					;
    179					;
    180					; PARAMETERS
    181					;
    182					; DEFINE "FTABS= 1" TO ALLOW FOR /AB (ABSOLUTE SAVE)
    183					;
    184					; LUN ASSIGNMENTS
    185					;
    186		000001 			CTYLUN=	1			;LUN FOR CTY
    187		000002 			DSKLUN=	2			;LUN FOR SAVE DEVICE
    188					;
    189					; EVENT FLAGS
    190					;
    191		000001 			E.FQIO=	1			; (1) QIO WAIT REQUEST
    192		000001 			 EF.QIO=BIT0
    193					;
    194		000002 			E.FTMO= 2			; +++001 (2) TIME OUT FLAG
    195		000002 			 EF.TMO=BIT1
    196					;
    197		000003 			E.FLOG= 3			; +++004 (3) KLINIK LOG DONE FLAG
    198		000004 			 E.FLOG=BIT2			; +++004
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 4-1
MACROS AND PARAMETERS

    199					;
    200					; BOOTSTRAP ROM PARAMETER BITS
    201					;
    202		100000 			BP.ERR=	BIT15			;INDEFINITE ERROR RETRY
    203		074000 			BP.CLN=	BIT14!BIT13!BIT12!BIT11	;CONSOLE LINE NUMBER (WITHIN DH/DL)
    204		003400 			BP.UNT=	BIT10!BIT9!BIT8		;BOOT UNIT NUMBER OR DH UNIT NUMBER
    205		000200 			BP.RP4=	BIT7			;LOAD FROM RP04/RP06
    206		000170 			BP.CSP=	BIT6!BIT5!BIT4!BIT3	;CONSOLE SPEED IF DH, 1 IF DL, 0 IF DEFAULT
    207		000004 			BP.LD1=	BIT2			;LOAD CONDITION BITS
    208		000002 			BP.LD0=	BIT1			; . . .
    209									; .EQ. 00 -- AUTO DEADSTART ENTIRE SYSTEM
    210									; .EQ. 01 -- DEADSTART RSX20F ONLY
    211									; .EQ. 10 -- REBOOT RSX20F
    212									; .EQ. 11 -- OPERATOR CONTROLLED (RE)START
    213		000001 			BP.SWR=	BIT0			;SWITCH REGISTER BUTTON PUSHED
    214					;
    215					; PS BITS
    216					;
    217		140000 			PS.USR=	BIT15!BIT14
    218		030000 			PS.PUS=	BIT13!BIT12
    219		004000 			PS.REG=	BIT11
    220					;
    221					; WORDS IN HOM BLOCK
    222					;
    223		000000 			HOMNAM=	0			;SIXBIT/HOM/
    224		105755 			 SXBTHM= 105755			; TRUNCATED TO 16 BITS
    225		000061 			HOMFE0=	61			;ADDRESS OF -11 FILE SYSTEM
    226		000062 			HOMFE1=	62			;SIZE OF FILE SYSTEM
    227					;
    228					; EXTEND CONTROL BITS FOR QUEUE I/O FUNCTION IO.EXT
    229					;  IN BYTE I.EXTD+1 OF REQUEST
    230					;
    231		000001 			EX.AC1=	BIT0			;ALLOCATE CONTIGUOUS SPACE
    232		000004 			EX.FCO=	BIT2			;MAKE FILE CONTIGUOUS
    233		000200 			EX.ENA=	BIT7			;ENABLE EXTEND
    234					;
    235					; ACCESS CONTROL BITS FOR QUEUE I/O ACCESS FUNCTIONS
    236					;  IN BYTE I.ACTL OF REQUEST
    237					;
    238		000200 			AC.ENA=	BIT7			;ENABLE ACCESS
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 5
DEVICE REGISTER DEFINITIONS

    240						.SBTTL	DEVICE REGISTER DEFINITIONS
    241					;
    242					; RX-11 DEVICE REGISTER DEFINITIONS
    243					;
    244		177170 			RXCS=	177170			;CONTROL AND STATUS REGISTER
    245		100000 				RXERR=	BIT15		;ERROR
    246		040000 				RXINIT=	BIT14		;INITIALIZE RX-11
    247		000200 				RXTREQ=	BIT7		;TRANSFER REQUEST
    248		000040 				RXDONE=	BIT5		;TRANSFER DONE
    249		000020 				RXUNIT=	BIT4		;UNIT SELECT
    250		000016 				RXFUNC=	BIT3!BIT2!BIT1	;FUNCTION:
    251		000000 					RXFILL=	0*BIT1	; FILL SECTOR BUFFER
    252		000002 					RXEMPT=	1*BIT1	; EMPTY SECTOR BUFFER
    253		000004 					RXWRIT=	2*BIT1	; WRITE SECTOR
    254		000006 					RXREAD=	3*BIT1	; READ SECTOR
    255		000016 					RXRERR=	7*BIT1	; READ ERROR REGISTER
    256		000001 				RXGO=	BIT0		;START FUNCTION
    257		177172 			RXDB=	177172			;MULTI-PURPOSE DATA BUFFER REGISTER (BYTE)
    258					;
    259					; RP04/RP06 DEVICE REGISTER DEFINITIONS
    260					;
    261		176700 			RPCS1=	176700			;CONTROL/STATUS REGISTER 1
    262		040000 				RPTRE=	BIT14		;TRANSFER ERROR
    263		020000 				RPMCPE=	BIT13		;MASSBUS CONTROL PARITY ERROR
    264		004000 				RPDVA=	BIT11		;DRIVE AVAILABLE (TO -11)
    265		000200 				RPRDY=	BIT7		;READY FOR FUNCTION
    266		000076 				RPFUNC=	BIT5!BIT4!BIT3!BIT2!BIT1 ;FUNCTION:
    267		000000 					RPNOOP=	0*BIT1	; NO-OP
    268		000020 					RPPRST=	10*BIT1	; READ-IN PRESET
    269		000060 					RPWRIT=	30*BIT1	; WRITE DATA
    270		000070 					RPREAD=	34*BIT1	; READ DATA
    271		000001 				RPGO=	BIT0		;START FUNCTION
    272		176702 			RPWC=	176702			;WORD COUNT REGISTER
    273		176704 			RPBA=	176704			;UNIBUS ADDRESS REGISTER
    274		176706 			RPDA=	176706			;TRACK (HIGH BYTE) SECTOR (LOW BYTE)
    275		176710 			RPCS2=	176710			;CONTROL/STATUS REGISTER 2
    276		000007 				RPUNIT=	BIT2!BIT1!BIT0	;UNIT #
    277		176712 			RPDS=	176712			;DRIVE STATUS REGISTER
    278		100000 				RPATA=	BIT15		;DRIVE ATTENTION ACTIVE
    279		040000 				RPERR=	BIT14		;DRIVE ERROR
    280		010000 				RPMOL=	BIT12		;MEDIUM ON-LINE
    281		001000 				RPPGM=	BIT9		;PROGRAMMABLE (A/B) MODE
    282		000400 				RPDPR=	BIT8		;DRIVE PRESENT
    283		176726 			RPDT=	176726			;DRIVE TYPE REGISTER
    284		000020 				RPDT04=	20		;TYPE= RP04
    285		000022 				RPDT06=	22		;TYPE= RP06
    286		176732 			RPOF=	176732			;OFFSET REGISTER
    287		010000 				RPFM22=	BIT12		;22-SECTOR FORMAT
    288		004000 				RPECCI=	BIT11		;INHIBIT ERROR CORRECTION
    289		176734 			RPDC=	176734			;DESIRED CYLINDER
    290					;
    291					; TC-11 DECTAPE DEVICE REGISTER DEFINITIONS
    292					;
    293		177340 			TCST=	177340			;STATUS REGISTER
    294		100000 				TCENDZ=	BIT15		;END-ZONE ERROR
    295		177342 			TCCM=	177342			;COMMAND REGISTER
    296		100000 				TCERR=	BIT15		;ERROR
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 5-1
DEVICE REGISTER DEFINITIONS

    297		004000 				TCREV=	BIT11		;REVERSE DIRECTION (TOWARD FOWARD END-ZONE)
    298		003400 				TCUNIT=	BIT10!BIT9!BIT8	;UNIT SELECT
    299		000200 				TCRDY=	BIT7		;READY
    300		000016 				TCFUNC=	BIT3!BIT2!BIT1	;FUNCTION:
    301		000000 					TCSATM=	0*BIT1	; STOP ALL TAPE MOTION
    302		000002 					TCRNUM=	1*BIT1	; READ BLOCK NUMBERS
    303		000004 					TCREAD=	2*BIT1	; READ DATA
    304		000010 					TCSTOP=	4*BIT1	; STOP SELECTED TAPE
    305		000014 					TCWRIT=	6*BIT1	; WRITE DATA
    306		000001 				TCGO=	BIT0		;START FUNCTION
    307		177344 			TCWC=	177344			;WORD COUNT REGISTER
    308		177346 			TCBA=	177346			;BUS ADDRESS REGISTER
    309		177350 			TCDT=	177350			;DATA REGISTER
    310					;
    311					; DTE-20 DEVICE REGISTER DEFINITIONS
    312					;
    313		000774 			DTVECA=	774			;DTE-20 #0 INTERRUPT VECTOR (THEY GO DOWN!)
    314		174400 			DTEXPA=	174400			;EXTERNAL PAGE ADDRESS OF DTE #0
    315		000040 			DTEXPZ=	40			;SIZE OF ADDRESS BLOCK FOR DTE
    316					;
    317		000034 			DTSTAT=	34			;STATUS REGISTER
    318		004000 				DT11DB=	BIT11		;(READ/WRITE) TO -11 DOORBELL
    319		002000 				DTCL11=	BIT10		;(WRITE) CLEAR TO -11
    320		000040 				DTINON=	BIT5		;(WRITE) INTERRUPT ENABLE
    321		000010 				DTINOF=	BIT3		;(WRITE) INTERRUPT DISABLE
    322		000010 				DTRSMD=	BIT3		;(READ) RESTRICTED MODE
    323					;
    324					; DH-11 DEVICE REGISTER DEFINITIONS
    325					;
    326		160020 			DHEXPA=	160020			;EXTERNAL PAGE ADDRESS OF FIRST DH-11
    327		000020 			DHEXPZ=	20			;SIZE OF ADDRESS SPACE FOR ONE DH
    328					;
    329					; KL-11 LINE CLOCK REGISTER DEFINITION
    330					;
    331		177546 			LKS=	177546
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 6
SAVE TASK IMPURE DATA AREA

    333						.SBTTL	SAVE TASK IMPURE DATA AREA
    334					;
    335					; VARIABLES
    336					;
    337	000000				SPSAVE::	.BLKW	1		;SAVE'S SP IN IMAGE
    338	000002				DRVADR:	.BLKW	1		;ADDRESS OF DRIVER TABLE ENTRY FOR DEVICE
    339	000004				DSKADR:	.BLKW	2		;PHYSICAL DISK ADDRESS OF SAVE FILE
    340	000010				DSKSIZ:	.BLKW	2		;SIZE OF SAVE FILE *** MUST FOLLOW DSKADR ***
    341	000014				MEMSIZ:	.BLKW	1		;SIZE OF SYSTEM IN 32. WORD BLOCKS
    342	000016				RADIX:	.BLKW	1		;OUTPUT RADIX FOR TYPNUM
    343	000020				GTIMBF:	.BLKW	8.		;GET TIME PARAMETERS RETURN BLOCK
    344	000040				CMDCLR:				;START OF AREA TO CLEAR ON STARTUP
    345	000040				PUDADR:	.BLKW	1		;ADDRESS OF SAVE DEVICE PUD ENTRY
    346	000042				DEVNAM:	.BLKW	1		;DEVICE NAME
    347	000044				DEVUNT:	.BLKB	1		;DEVICE UNIT #
    348	000045				PUDIDX:	.BLKB	1		;PUD INDEX FOR THE SAVE DEVICE
    349	000046				WBFLAG:	.BLKB	1		;WRITE BOOT FLAG: 0 DON'T WRITE BOOT
    350									;		  1 WRITE BOOT (/WB SPECFIED)
    351	000047				WSFLAG:	.BLKB	1		;1-- WRITE SAVE FILE
    352					.IF DF FTABS
    353					ABFLAG:	.BLKB	1		;1-- SAVE AT ABSOLUTE PLACE ON DISK
    354					.ENDC ; .IF DF FTABS
    355	000050				EXFLAG:	.BLKB	1		;1-- EXIT WHEN DONE WITH SAVE
    356	000051				MOFLAG:	.BLKB	1		;1-- MOUNT DEVICE BEFORE CREATING SAVE FILE
    357	000052				DMFLAG:	.BLKB	1		;1-- DISMOUNT ALL DEVICES AFTER CREATING SAVE FILE
    358	000053				RHFLAG:	.BLKB	1		;1-- READ HOME BLOCKS
    359	000054				RNFLAG:	.BLKB	1		;1-- RP NOT READY
    360	000055				RPFLAG:	.BLKB	1		;1-- RP NOT IN A/B MODE
    361	000056				QEFLAG:	.BLKB	1		;NON-ZERO-- QIO ERROR CODE FROM FILQIO
    362	000057				ACFLAG:	.BLKB	1		;FLAG ACCESS DONE
    363	000060				WEFLAG:	.BLKB	1		;WRITE ERROR FLAG: 0 WRITE OK
    364									;		   1 WRITE ERROR DURING SAVE
    365	000061				DEFLAG:	.BLKB	1		;DTE-20 # NOT AT PRI 6 (-1 IF ALL OK)
    366	000062				ALTDXF:	.BLKW	1		; +++006 ALTERNATE DX MOUNT FLAG
    367		000024 			CMDCLN=.-CMDCLR			;LENGTH OF AREA TO CLEAR
    368					;
    369					; SAVE AREA FOR LOW CORE
    370					;
    371						.EVEN
    372	000064				LOWCOR:
    373					;
    374					; MISC. BUFFERS (OVERWRITTEN BY LOW CORE)
    375					;
    376	000064				HOMBUF:				;BUFFER FOR HOM BLOCKS
    377	000064				TYPBUF:	.BLKB	100.		;BUFFER FOR CTY OUTPUT
    378	000230				CTYBUF:	.BLKB	80.		;BUFFER FOR INPUT FROM CTY
    379		000120 			CTYBFL=	.-CTYBUF
    380	000350	   000 				.BYTE	0		;TO MAKE ASCIZ ALWAYS
    381						.EVEN
    382	000352					.BLKB	<256.*2.>-<.-LOWCOR> ;REST OF LOW CORE
    383	001064				QIOSTS:	.BLKW	2		;QIO STATUS BLOCK
    384	001070				LOGBUF:				; +++004 KLINIK LOG BUFFER
    385	001070	000004 				.WORD	4		; +++004
    386	001072	000000G				.WORD	DV.LOG		; +++004
    387	001074	000000 				.WORD	0		; +++004
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 7
PURE DATA

    389						.SBTTL	PURE DATA
    390					;
    391					; FILE ID BLOCK
    392					;
    393	001076	000005 	000005 		FIDBLK:	.WORD	5,5		;FILE ID 5, FIL SEQ # 5 IS SYSTEM SAVE FILE
    394					;
    395					; ATTRIBUTE CONTROL BLOCK
    396					;
    397	001102	   367 			ATCBLK:	.BYTE	-9.		;ATTRIBUTE 9 (STATISTICS BLOCK), READ
    398	001103	   010 				.BYTE	8.		;8. BYTES OF STATISTICS (FILE ADDR AND SIZE)
    399	001104	000004'				.WORD	DSKADR		;STORE IN DSKADR AND DSKSIZ
    400	001106	   000 	   000 			.BYTE	0,0		;END OF ATTRIBUTE CONTROL BLOCK
    401					;
    402					; MOUNT/DISMOUNT FUNCTION BLOCKS
    403					;
    404	001110	   001 			MNTBLK:	.BYTE	1		;FUNCTION: MOUNT
    405	001111	   001 				.BYTE	1		;LENGTH OF STRING
    406	001112	001114'				.WORD	1$		;ADDRESS OF STRING
    407	001114	   072 			1$:	.ASCII	/:/
    408						.EVEN
    409					;
    410	001116	   002 			DMTBLK:	.BYTE	2		;FUNCTION: DISMOUNT
    411	001117	   000 				.BYTE	0		;NO STRING
    412					;
    413					; TASK NAME FOR KL INITIALIZATION TASK
    414					;
    415	001120	131574 	043251 		KLINIT:	.RAD50	/...KLI/	;KL INITIALIZATION TASK NAME
    416					;
    417					; TABLE OF SPEED WORDS FOR CONSOLE DH FROM BOOT PARAMETER, BP.SPD
    418					;
    419					.MACRO SPD A,B
    420						 .WORD	<A*BIT10>!<A*BIT6>!<B>
    421					.ENDM SPD
    422	001124				DHSTAB:
    423	001124					SPD	0,0		;(0) CONSOLE NOT SPECIFIED
	001124	000000 				 .WORD	<0*BIT10>!<0*BIT6>!<0>
    424	001126					SPD	0,0		;(1) DL-11 LINE, NO SPEED
	001126	000000 				 .WORD	<0*BIT10>!<0*BIT6>!<0>
    425	001130					SPD	0,0		;(2) DL-11 LINE, NO SPEED
	001130	000000 				 .WORD	<0*BIT10>!<0*BIT6>!<0>
    426	001132					SPD	3,BIT2!BIT1!BIT0 ;(3) 110 BAUD, 8 DATA BITS, 2 STOP BITS
	001132	006307 				 .WORD	<3*BIT10>!<3*BIT6>!<BIT2!BIT1!BIT0>
    427	001134					SPD	4,BIT2!BIT1	;(4) 134.5 BAUD, 7 DATA BITS, 2 STOP BITS
	001134	010406 				 .WORD	<4*BIT10>!<4*BIT6>!<BIT2!BIT1>
    428	001136					SPD	5,BIT2!BIT1!BIT0 ;(5) 150 BAUD, 8 DATA BITS, 2 STOP BITS
	001136	012507 				 .WORD	<5*BIT10>!<5*BIT6>!<BIT2!BIT1!BIT0>
    429	001140					SPD	6,BIT2!BIT1!BIT0 ;(6) 200 BAUD, 8 DATA BITS, 2 STOP BITS
	001140	014607 				 .WORD	<6*BIT10>!<6*BIT6>!<BIT2!BIT1!BIT0>
    430	001142					SPD	7,BIT1!BIT0	;(7) 300 BAUD, 8 DATA BITS, 1 STOP BIT
	001142	016703 				 .WORD	<7*BIT10>!<7*BIT6>!<BIT1!BIT0>
    431	001144					SPD	10,BIT1!BIT0	;(10) 600 BAUD, 8 DATA BITS, 1 STOP BIT
	001144	021003 				 .WORD	<10*BIT10>!<10*BIT6>!<BIT1!BIT0>
    432	001146					SPD	11,BIT1!BIT0	;(11) 1200 BAUD, 8 DATA BITS, 1 STOP BIT
	001146	023103 				 .WORD	<11*BIT10>!<11*BIT6>!<BIT1!BIT0>
    433	001150					SPD	12,BIT1!BIT0	;(12) 1800 BAUD, 8 DATA BITS, 1 STOP BIT
	001150	025203 				 .WORD	<12*BIT10>!<12*BIT6>!<BIT1!BIT0>
    434	001152					SPD	13,BIT1!BIT0	;(13) 2400 BAUD, 8 DATA BITS, 1 STOP BIT
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 7-1
PURE DATA

	001152	027303 				 .WORD	<13*BIT10>!<13*BIT6>!<BIT1!BIT0>
    435	001154					SPD	14,BIT1!BIT0	;(14) 4800 BAUD, 8 DATA BITS, 1 STOP BIT
	001154	031403 				 .WORD	<14*BIT10>!<14*BIT6>!<BIT1!BIT0>
    436	001156					SPD	15,BIT1!BIT0	;(15) 9600 BAUD, 8 DATA BITS, 1 STOP BIT
	001156	033503 				 .WORD	<15*BIT10>!<15*BIT6>!<BIT1!BIT0>
    437	001160					SPD	0,0		;(16) DL-11, 8 DATA BITS, NO SPEED
	001160	000000 				 .WORD	<0*BIT10>!<0*BIT6>!<0>
    438	001162					SPD	0,0		;(17) DL-11, NO SPEED
	001162	000000 				 .WORD	<0*BIT10>!<0*BIT6>!<0>
    439
    440	001164				SAVLMT::			; +++002 SAVE IMAGE LIMITS
    441	001164	000000 	000000 			.LIMIT			; +++002
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 8
PARSE COMMAND LINE

    443						.SBTTL	PARSE COMMAND LINE
    444					;
    445					; REQUEST FOR SAVE BY MCR SAV COMMAND CALLS SAVE HERE
    446					;
    447	001170				SAVE::
    448					;
    449					; SETUP COMMAND DEFAULTS
    450					;
    451	001170	012701 	000040'			MOV	#CMDCLR,R1	;GET START OF AREA TO CLEAR
    452	001174	012705 	000024 			MOV	#CMDCLN,R5	;AND LENGTH OF AREA, IN BYTES
    453	001200				10$:
    454	001200	105021 				CLRB	(R1)+		;CLEAR A BYTE
    455	001202	077502 				SOB	R5,10$		;CLEAR 'EM ALL
    456	001204	105237 	000047'			INCB	WSFLAG		;DEFAULT TO WRITE SAVE FILE
    457	001210	105237 	000050'			INCB	EXFLAG		; AND TO EXIT WHEN DONE
    458	001214	105237 	000053'			INCB	RHFLAG		; AND TO READ HOME BLOCKS
    459	001220	105237 	000052'			INCB	DMFLAG		; AND TO DISMOUNT ALL VOLUMES
    460					;
    461					; SETUP TO READ A LINE FROM THE CTY
    462					;
    463	001224					ALUN$S	#CTYLUN,#"TT,#0	;ASSIGN CTY TO LUN 1
	001224	005046 				CLR	-(SP)
	001226	012746 	052124 			MOV	#"TT,-(SP)
	001232	012746 	000001 			MOV	#CTYLUN,-(SP)
	001236	012746 				MOV	(PC)+,-(SP)
	001240	   007 	   004 			.BYTE	7.,4
	001242	104375 				EMT	375
    464	001244	103530 				BCS	EXITA		;GIVE UP IF NO CTY!!!!
    465	001246					TYPE	^\SAV>\		;TYPE PROMPT MESSAGE
	000000	   123 	   101 	   126 		.ASCIZ	"SAV>"
	000003	   076 	   000
	001246	012746 	000000'			MOV	#$$$,-(SP)
	001252	004737 	005740'			JSR	PC,TYPMSG
    466	001256					QIOW$S	#IO.RLB,#CTYLUN,#E.FQIO,,#QIOSTS,,<#CTYBUF,#CTYBFL>
	001256	012746 	000120 			MOV	#CTYBFL,-(SP)
	001262	012746 	000230'			MOV	#CTYBUF,-(SP)
	001266	005046 				CLR	-(SP)
	001270	012746 	001064'			MOV	#QIOSTS,-(SP)
	001274	005046 				CLR	-(SP)
	001276	112716 	000001 			MOVB	#E.FQIO,(SP)
	001302	012746 	000001 			MOV	#CTYLUN,-(SP)
	001306	012746 	001000 			MOV	#IO.RLB,-(SP)
	001312	012746 				MOV	(PC)+,-(SP)
	001314	   003 	   010 			.BYTE	3,$$$T1
	001316	104375 				EMT	375
    467	001320	103502 				BCS	EXITA		;GIVE UP IF FAILURE
    468	001322	105737 	001064'			TSTB	QIOSTS+0	;ERROR STATUS
    469	001326	002477 				BLT	EXITA		;YES-- THAT'S ENOUGH
    470	001330	122737 	000003 	001065'		CMPB	#'C-100,QIOSTS+1 ;THIS TERMINATED BY ^C?
    471	001336	001473 				BEQ	EXITA		;YES-- GIVE UP FAST
    472	001340					TYPE	<"<1>">		;INSURE A <CR><LF>
	000005	   001 	   000 			.ASCIZ	""<1>""
	001340	012746 	000005'			MOV	#$$$,-(SP)
	001344	004737 	005740'			JSR	PC,TYPMSG
    473	001350	013704 	001066'			MOV	QIOSTS+2,R4	;GET # CHARACTERS TYPED AT ME
    474	001354	105064 	000230'			CLRB	CTYBUF(R4)	;CLEAR LAST BYTE OF INPUT (MAKE ASCIZZZ)
    475	001360	012704 	000230'			MOV	#CTYBUF,R4	;POINT TO START OF INPUT TO PARSE
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 8-1
PARSE COMMAND LINE

    476					;
    477					; NOW TO PARSE THE LINE
    478					;
    479	001364					CALL	GETNB		;GET NON-BLANK CHARACTER
	001364	004737 	005606'			JSR	PC,GETNB
    480	001370	001677 				BEQ	SAVE		;BACK TO SAVE IF NULL COMMAND
    481	001372					CALL	GETNAM		;GET A DEVICE NAME
	001372	004737 	005630'			JSR	PC,GETNAM
    482	001376	103471 				BCS	SYNERR		;NO SUCH LUCK
    483	001400	010037 	000042'			MOV	R0,DEVNAM	;SAVE THE TYPED NAME
    484	001404	001411 				BEQ	20$		;NULL NAME-- GO ON FOR MODIFIERS
    485	001406					CALL	GETNUM		;GET UNIT NUMBER OF DEVICE (IF ANY)
	001406	004737 	005674'			JSR	PC,GETNUM
    486	001412	103463 				BCS	SYNERR		;TOO BIG-- COMPLAIN
    487	001414	110037 	000044'			MOVB	R0,DEVUNT	;SAVE THE UNIT NUMBER
    488	001420	122724 	000072 			CMPB	#':,(R4)+	; : FOLLOWING DEVICE?
    489	001424	001401 				BEQ	20$		;YES-- IGNORE IT
    490	001426	105744 				TSTB	-(R4)		;NO-- GO BACK TO LOOK AT IT AGAIN
    491					;
    492					; LOOK FOR ALL MODIFIERS
    493					;
    494	001430				20$:
    495	001430					CALL	GETNB		;SKIP BLANKS AFTER UNIT
	001430	004737 	005606'			JSR	PC,GETNB
    496	001434	001457 				BEQ	CMDONE		;END OF COMMAND-- ALL OK
    497	001436	122700 	000057 			CMPB	#'/,R0		;THIS A MODIFIER?
    498	001442	001047 				BNE	SYNERR		;NO-- BAD CHARACTER
    499	001444	105724 				TSTB	(R4)+		;YES-- SKIP OVER IT
    500	001446	012702 	000001 			MOV	#1,R2		;ASSUME NOT /-(SW)
    501	001452	122714 	000055 			CMPB	#'-,(R4)	;THIS /-(SW)?
    502	001456	001002 				BNE	30$		;NO-- GO ON
    503	001460	105724 				TSTB	(R4)+		;YES-- SKIP OVER -
    504	001462	005002 				CLR	R2		;AND SET TO CLEAR THE FLAG
    505	001464				30$:
    506	001464					CALL	GETNAM		;GET THE MODIFIER
	001464	004737 	005630'			JSR	PC,GETNAM
    507	001470	103434 				BCS	SYNERR		;TOO LONG-- GIVE UP
    508	001472	012701 	001532'			MOV	#MODTBL,R1	;GET ADDRESS OF SWITCH TABLE
    509	001476	012705 	000006 			MOV	#MODTLN,R5	; AND LENGTH OF IT
    510	001502				40$:
    511	001502	020021 				CMP	R0,(R1)+	;THIS MODIFIER MATCH?
    512	001504	001002 				BNE	50$		;NO-- LOOP FOR MORE
    513	001506	110231 				MOVB	R2,@(R1)+	;YES-- SET THE FLAG AS REQUESTED
    514	001510	000747 				BR	20$		;LOOP FOR ALL MODIFIERS
    515					;
    516	001512				50$:
    517	001512	005721 				TST	(R1)+		;NO-- SKIP OVER FLAG ADDRESS
    518	001514	077506 				SOB	R5,40$		;NO-- LOOP FOR ALL MODIFIERS
    519	001516					ERROR	<ILLEGAL MODIFIER /"<2>">
	000007	   011 	   111 	   114 		.ASCIZ	""<11>"ILLEGAL MODIFIER /"<2>""<5>""
	000012	   114 	   105 	   107
	000015	   101 	   114 	   040
	000020	   115 	   117 	   104
	000023	   111 	   106 	   111
	000026	   105 	   122 	   040
	000031	   057 	   002 	   005
	000034	   000
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 8-2
PARSE COMMAND LINE

	001516	012746 	000007'			MOV	#$$$,-(SP)
	001522	004737 	005740'			JSR	PC,TYPMSG
    520	001526				EXITA:
    521	001526	000137 	005576'			JMP	EXIT		;TOO FAR TO HOP
    522					;
    523					; MODIFIER TABLE
    524					;
    525	001532				MODTBL:
    526					.IRP	ARG,<WB,WS,EX,MO,DM,RH>
    527						.ASCII	/ARG/
    528						.EVEN
    529						.WORD	ARG'FLAG
    530					.ENDM
	001532	   127 	   102 			.ASCII	/WB/
	001534	000046'				.WORD	WBFLAG
	001536	   127 	   123 			.ASCII	/WS/
	001540	000047'				.WORD	WSFLAG
	001542	   105 	   130 			.ASCII	/EX/
	001544	000050'				.WORD	EXFLAG
	001546	   115 	   117 			.ASCII	/MO/
	001550	000051'				.WORD	MOFLAG
	001552	   104 	   115 			.ASCII	/DM/
	001554	000052'				.WORD	DMFLAG
	001556	   122 	   110 			.ASCII	/RH/
	001560	000053'				.WORD	RHFLAG
    531					.IF DF FTABS
    532						.ASCII	/AB/
    533						.EVEN
    534						.WORD	ABFLAG
    535					.ENDC ; .IF DF FTABS
    536		000006 			MODTLN=<.-MODTBL>/4
    537					;
    538					; COMMAND ERRORS
    539					;
    540	001562				SYNERR:
    541	001562	010400 				MOV	R4,R0		;POINT INPUT STRING TO OUTPUT STRING
    542	001564					ERROR	<SYNTAX ERROR: "<4>">
	000035	   011 	   123 	   131 		.ASCIZ	""<11>"SYNTAX ERROR: "<4>""<5>""
	000040	   116 	   124 	   101
	000043	   130 	   040 	   105
	000046	   122 	   122 	   117
	000051	   122 	   072 	   040
	000054	   004 	   005 	   000
	001564	012746 	000035'			MOV	#$$$,-(SP)
	001570	004737 	005740'			JSR	PC,TYPMSG
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 9
SETUP SAVE FILE

    544						.SBTTL	SETUP SAVE FILE
    545					;
    546					; THE COMMAND STRING IS NOW PARSED.  CHECK OUT THE DEVICE HE SPECIFIED.
    547					;
    548	001574				CMDONE:
    549	001574	013701 	000044'			MOV	DEVUNT,R1	;GET SPECIFIED UNIT
    550	001600	013700 	000042'			MOV	DEVNAM,R0	;GET DEVICE SPECIFIED
    551	001604	001003 				BNE	10$		;SPECIFIED-- GO ASSIGN IT
    552	001606	012700 	054523 			MOV	#"SY,R0		;NONE-- DEFAULT TO SYSTEM DEVICE
    553	001612	005001 				CLR	R1		; SY0:
    554					;
    555	001614				10$:
    556	001614					ALUN$S	#DSKLUN,R0,R1	;ASSIGN THE DEVICE TO LUN 2
	001614	010146 				MOV	R1,-(SP)
	001616	010046 				MOV	R0,-(SP)
	001620	012746 	000002 			MOV	#DSKLUN,-(SP)
	001624	012746 				MOV	(PC)+,-(SP)
	001626	   007 	   004 			.BYTE	7.,4
	001630	104375 				EMT	375
    557	001632	103403 				BCS	DNSERR		;OOPS-- DEVICE NOT IN SYSTEM
    558	001634					CALL	FINDEV		;FIND PUD ENTRY ADDRESS FOR DEVICE
	001634	004737 	006520'			JSR	PC,FINDEV
    559	001640	103006 				BCC	DEVCHK		;OK-- CHECK THE DEVICE OUT
    560	001642				DNSERR:
    561	001642	012705 	000042'			MOV	#DEVNAM,R5	;POINT TO DEVICE NAME/UNIT #
    562	001646					ERROR	<DEVICE "<3>" NOT IN SYSTEM>
	000057	   011 	   104 	   105 		.ASCIZ	""<11>"DEVICE "<3>" NOT IN SYSTEM"<5>""
	000062	   126 	   111 	   103
	000065	   105 	   040 	   003
	000070	   040 	   116 	   117
	000073	   124 	   040 	   111
	000076	   116 	   040 	   123
	000101	   131 	   123 	   124
	000104	   105 	   115 	   005
	000107	   000
	001646	012746 	000057'			MOV	#$$$,-(SP)
	001652	004737 	005740'			JSR	PC,TYPMSG
    563	001656				DEVCHK:
    564	001656	016505 	000000G			MOV	U.RP(R5),R5	; BUT GET REAL DEVICE
    565	001662	016537 	000000G	000042'		MOV	U.DN(R5),DEVNAM	;SAVE THE REAL DEVICE NAME
    566	001670	116537 	000000G	000044'		MOVB	U.UN(R5),DEVUNT	;SAVE THE REAL UNIT #
    567	001676	012700 	006706'			MOV	#DRVTAB,R0	;GET ADR OF DRIVER TABLE
    568	001702				10$:
    569	001702	026037 	000000 	000042'		CMP	DRVNAM(R0),DEVNAM ;MATCH?
    570	001710	001411 				BEQ	DEVOK		;YES-- GO ON
    571	001712	062700 	000020 			ADD	#DRVSIZ,R0	;BUMP TO NEXT DRIVER ENTRY
    572	001716	020027 	006766'			CMP	R0,#DRVTAB+DRVTBZ ;BEYOND END?
    573	001722	103767 				BLO	10$		;NO-- LOOP UNTIL WE FIND DEVICE
    574	001724					ERROR	<ILLEGAL DEVICE "<3>">
	000110	   011 	   111 	   114 		.ASCIZ	""<11>"ILLEGAL DEVICE "<3>""<5>""
	000113	   114 	   105 	   107
	000116	   101 	   114 	   040
	000121	   104 	   105 	   126
	000124	   111 	   103 	   105
	000127	   040 	   003 	   005
	000132	   000
	001724	012746 	000110'			MOV	#$$$,-(SP)
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 9-1
SETUP SAVE FILE

	001730	004737 	005740'			JSR	PC,TYPMSG
    575	001734				DEVOK:
    576	001734	023727 	000042'	041104 		CMP	DEVNAM,#"DB	;THIS AN RP04/RP06?
    577	001742	001402 				BEQ	10$		;YES-- OK
    578	001744	105037 	000053'			CLRB	RHFLAG		;NO-- DON'T READ HOM BLOCKS
    579	001750				10$:
    580	001750	010037 	000002'			MOV	R0,DRVADR	;SAVE DRIVER TABLE ENTRY ADDRESS
    581	001754	010537 	000040'			MOV	R5,PUDADR	;SAVE THE PUD ADDRESS OF THE SAVE DEVICE
    582	001760	010500 				MOV	R5,R0		;COPY THE PUD ADDRESS
    583	001762	162700 	000000G			SUB	#.PUDBA,R0	;MAKE R0 INDEX INTO THE PUD
    584	001766	012701 	000000G			MOV	#U.SZ,R1	;COMPUTE AN INDEX
    585	001772					CALL	$DIV		; INTO THE PUD
	001772	004737 	000000G			JSR	PC,$DIV
    586	001776	110037 	000045'			MOVB	R0,PUDIDX	;SAVE THE INDEX
    587					;
    588					; MOUNT THE SPECIFIED VOLUME IF /MO TYPED
    589					;
    590	002002				DEVMNT:
    591	002002	105737 	000051'			TSTB	MOFLAG		;/MO?
    592	002006	001424 				BEQ	SETFIL		;NO-- DON'T MOUNT THE DEVICE
    593	002010	005765 	000000G			TST	U.VA(R5)	;IS THE VOLUME MOUNTED?
    594	002014	001015 				BNE	MOUNTD		;YES-- GO ON
    595					;
    596	002016					CALL	FNDACP		;FIND ACP ADDRESS
	002016	004737 	006556'			JSR	PC,FNDACP
    597	002022	010265 	000000G			MOV	R2,U.ACP(R5)	;SAVE THE ADDRESS SO MOUNT DOESN'T COMPLAIN
    598					;
    599	002026	012702 	001110'			MOV	#MNTBLK,R2	;SET TO MOUNT VOLUME
    600	002032					CALL	FILMNT		;DO THE MOUNT
	002032	004737 	006576'			JSR	PC,FILMNT
    601	002036	103010 				BCC	SETFIL		;OK-- GO ON
    602	002040					ERROR	<MOUNT ERROR "<7>">
	000133	   011 	   115 	   117 		.ASCIZ	""<11>"MOUNT ERROR "<7>""<5>""
	000136	   125 	   116 	   124
	000141	   040 	   105 	   122
	000144	   122 	   117 	   122
	000147	   040 	   007 	   005
	000152	   000
	002040	012746 	000133'			MOV	#$$$,-(SP)
	002044	004737 	005740'			JSR	PC,TYPMSG
    603	002050				MOUNTD:
    604	002050					WARN	<DEVICE "<3>" ALREADY MOUNTED>
	000153	   012 	   104 	   105 		.ASCIZ	""<12>"DEVICE "<3>" ALREADY MOUNTED"<1>""
	000156	   126 	   111 	   103
	000161	   105 	   040 	   003
	000164	   040 	   101 	   114
	000167	   122 	   105 	   101
	000172	   104 	   131 	   040
	000175	   115 	   117 	   125
	000200	   116 	   124 	   105
	000203	   104 	   001 	   000
	002050	012746 	000153'			MOV	#$$$,-(SP)
	002054	004737 	005740'			JSR	PC,TYPMSG
    605					;
    606					; SET UP DISK ADDRESS TO SPECIFIC PLACE IF /AB (ABSOLUTE) SPECIFIED
    607					;
    608	002060				SETFIL:
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 9-2
SETUP SAVE FILE

    609					.IF DF FTABS
    610						TSTB	ABFLAG		;ABSOLUTE DISK SAVE?
    611						BNE	FILABS		;YES-- SET UP ABSOLUTE FILE
    612					.ENDC ; .IF DF FTABS
    613					;	BR	FILFND		;NO-- FIND FILE (5,5)
    614					;
    615					; FIND SAVE FILE (5,5) AND EXTEND IT IF NECESSARY
    616					;
    617	002060				FILFND:
    618	002060	012701 	001076'			MOV	#FIDBLK,R1	;ADDRESS OF FILE-ID BLOCK FOR (5,5)
    619					;
    620					; DO AN ACCESS FOR EXTEND TO FIND IF FILE EXISTS AND WHERE IT IS
    621					;
    622	002064	012700 	007400 			MOV	#IO.ACE,R0	;SET TO ACCESS FOR EXTEND
    623	002070	012702 	001102'			MOV	#ATCBLK,R2	;SET UP ATTRIBUTE CONTROL BLOCK ADDRESS
    624	002074	005003 				CLR	R3		;NO EXTEND CONTROOL
    625	002076	005004 				CLR	R4		; . .
    626	002100	012705 				MOV	(PC)+,R5	;ENABLE ACCESS
    627	002102	   000 	   200 			.BYTE	0,AC.ENA	; . .
    628	002104					CALL	FILQIO		;DO IT TO (5,5)
	002104	004737 	006612'			JSR	PC,FILQIO
    629	002110	103444 				BCS	15$		;ERROR-- JUST CLOSE FILE
    630					;
    631					; FIND OUT HOW BIG THE SAVE FILE SHOULD BE AND SEE IF IT IS BIG ENOUGH
    632					;  CURRENT SIZE IS RETURNED IN DSKSIZ+0, DSKSIZ+2 BY ACCESS
    633					;
    634	002112	013704 	001166'			MOV	SAVLMT+2,R4	; +++002 GET UPPER TASK LIMIT
    635	002116	062704 	003777 			ADD	#3777,R4	; +++002 ROUND UP
    636	002122	042704 	003777 			BIC	#3777,R4	; +++002 TO NEXT K OF WORDS
    637	002126	000241 				CLC			; +++002 CLEAR SIGN BIT AND
    638	002130	006004 				ROR	R4		; +++002 CONVERT TO 32. WORD BLOCKS
    639	002132	006204 				ASR	R4		; +++002
    640	002134	006204 				ASR	R4		; +++002
    641	002136	006204 				ASR	R4		; +++002
    642	002140	006204 				ASR	R4		; +++002
    643	002142	006204 				ASR	R4		; +++002
    644	002144	010437 	000014'			MOV	R4,MEMSIZ	;SAVE THIS FOR WRITING FILE
    645	002150	006204 				ASR	R4		;CONVERT 32. WORD BLOCKS TO 64. WORD BLOCKS
    646	002152	006204 				ASR	R4		; 128. WORD BLOCKS
    647	002154	006204 				ASR	R4		; 256. WORD BLOCKS
    648	002156	105737 	000010'			TSTB	DSKSIZ+0	;IS FILE BIGGER THAN 2**16 BLOCKS????
    649	002162	003017 				BGT	15$		;YES-- CERTAINLY BIG ENOUGH
    650	002164	163704 	000012'			SUB	DSKSIZ+2,R4	;NO-- FIND HOW MUCH MORE  SPACE WE NEED
    651	002170	003414 				BLE	15$		;BIG ENOUGH-- JUST CLOSE
    652	002172	113737 	000057'	000056'		MOVB	ACFLAG,QEFLAG	;ERROR IF WE WERE HERE BEFORE
    653	002200	001010 				BNE	15$		;SO GIVE ERROR
    654					;
    655					; FILE IS NOT BIG ENOUGH-- DO AN EXTEND ON IT, EXTEND INCREMENT IN R4
    656					;
    657	002202	012700 	011400 			MOV	#IO.EXT,R0	;NOT ENOUGH-- SET TO EXTEND FILE
    658	002206	012703 				MOV	(PC)+,R3	;MAKE FILE CONTIGUOUS,
    659	002210	   000 	   205 			.BYTE	0,EX.ENA!EX.AC1!EX.FCO ; HIGH EXTEND INCREMENT= 0
    660	002212	005002 				CLR	R2		;NO ATTRIB
    661	002214	005005 				CLR	R5		; AND NO ACCESS
    662	002216					CALL	FILQIO		;DO IT TO (5,5), EXTEND INCREMENT IN R4
	002216	004737 	006612'			JSR	PC,FILQIO
    663					;
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 9-3
SETUP SAVE FILE

    664					; DEACCESS FILE.  R5= 0 IF EXTEND DONE, QEFLAG= -VE IF ERROR OCCURED
    665					;
    666	002222				15$:
    667	002222	012700 	010000 			MOV	#IO.DAC,R0	;DE-ACCESS FILE
    668	002226	005002 				CLR	R2		;NO ATTRIBUTE CONTROL BLOCK
    669	002230	005003 				CLR	R3		;NO EXTEND BITS
    670	002232	005004 				CLR	R4		; . .
    671	002234					CALL	FILQIO		;DO IT TO (5,5)
	002234	004737 	006612'			JSR	PC,FILQIO
    672	002240	103004 				BCC	FILCHK		;NO ERRRORS-- GO CHECK OUT THE FILE
    673	002242					ERROR	<CREATE SAVE FILE (5,5) ERROR "<7>">
	000206	   011 	   103 	   122 		.ASCIZ	""<11>"CREATE SAVE FILE (5,5) ERROR "<7>""<5>""
	000211	   105 	   101 	   124
	000214	   105 	   040 	   123
	000217	   101 	   126 	   105
	000222	   040 	   106 	   111
	000225	   114 	   105 	   040
	000230	   050 	   065 	   054
	000233	   065 	   051 	   040
	000236	   105 	   122 	   122
	000241	   117 	   122 	   040
	000244	   007 	   005 	   000
	002242	012746 	000206'			MOV	#$$$,-(SP)
	002246	004737 	005740'			JSR	PC,TYPMSG
    674	002252				FILCHK:
    675	002252	105237 	000057'			INCB	ACFLAG		;FLAG ONE ACCESS
    676	002256	005705 				TST	R5		;DID WE DO AN EXTEND?
    677	002260	001677 				BEQ	FILFND		;YES-- GO BACK AND RE-ACCESS
    678	002262	005000 				CLR	R0		;GET HIGH
    679	002264	153700 	000004'			BISB	DSKADR+0,R0	; DISK ADDRESS (WITHOUT SIGN-EXTEND)
    680	002270	013701 	000006'			MOV	DSKADR+2,R1	;AND ALSO LOW PART
    681	002274	001006 				BNE	FILOK		;NON-ZERO-- WE HAVE A FILE
    682	002276	005700 				TST	R0		;ZERO-- HIGH PART ZERO TOO?
    683	002300	001004 				BNE	FILOK		;NO-- FILE MUST BE CONTIGUOUS (LUCKILY)
    684	002302					ERROR	<SAVE FILE (5,5) NOT CONTIGUOUS>
	000247	   011 	   123 	   101 		.ASCIZ	""<11>"SAVE FILE (5,5) NOT CONTIGUOUS"<5>""
	000252	   126 	   105 	   040
	000255	   106 	   111 	   114
	000260	   105 	   040 	   050
	000263	   065 	   054 	   065
	000266	   051 	   040 	   116
	000271	   117 	   124 	   040
	000274	   103 	   117 	   116
	000277	   124 	   111 	   107
	000302	   125 	   117 	   125
	000305	   123 	   005 	   000
	002302	012746 	000247'			MOV	#$$$,-(SP)
	002306	004737 	005740'			JSR	PC,TYPMSG
    685	002312				FILOK:
    686	002312	013705 	000002'			MOV	DRVADR,R5	;GET ADDRESS OF DRIVER TABLE ENTRY
    687	002316					CALL	@DRVSET(R5)	;CALL PROPER ROUTINE TO SET ADDRESS
	002316	004775 	000002 			JSR	PC,@DRVSET(R5)
    688					.IF DF FTABS
    689						BR	FILSET		;SAVE ADDRESSES AND GO ON
    690					;
    691					; SAVE TO ABSOLUTE DISK ADDRESS-- SET UP DSKADR+0, DSKADR+2
    692					;
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 9-4
SETUP SAVE FILE

    693					FILABS:
    694						MOV	SAVLMT+2,R5	; +++002 GET UPPER TASK LIMIT
    695						ADD	#3777,R5	; +++002 ROUND UP
    696						BIC	#3777,R5	; +++002 TO NEXT K OF WORDS
    697						CLC			; +++002 CLEAR SIGN BIT AND
    698						ROR	R5		; +++002 CONVERT TO 32. WORD BLOCKS
    699						ASR	R5		; +++002
    700						ASR	R5		; +++002
    701						ASR	R5		; +++002
    702						ASR	R5		; +++002
    703						ASR	R5		; +++002
    704						MOV	R5,MEMSIZ	;SAVE THIS FOR WRITING FILE
    705						MOV	DRVADR,R5	;GET ADDRESS OF DRIVER TABLE ENTRY
    706						CALL	@DRVABS(R5)	;CALL PROPER ABSOLUTE SET ROUTINE
    707					.ENDC ; .IF DF FTABS
    708	002322				FILSET:
    709	002322	010037 	000004'			MOV	R0,DSKADR+0	;SAVE THE ADDRESS
    710	002326	010137 	000006'			MOV	R1,DSKADR+2	; BOTH HALVES
    711					;	BR	FILDMO		;GO DISMOUNT (IF /DM)
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 10
DISMOUNT ALL MOUNTED VOLUMES

    713						.SBTTL	DISMOUNT ALL MOUNTED VOLUMES
    714					;
    715					; DO DISMOUNT OF ALL VOLUMES IF /DM SPECIFIED
    716					;
    717	002332				FILDMO:
    718	002332	105737 	000052'			TSTB	DMFLAG		;HE WANT IT DISMOUNTED?
    719	002336	001472 				BEQ	SYSAVE		;NO-- JUST GO SAVE SYSTEM
    720	002340	012702 	001116'			MOV	#DMTBLK,R2	;YES-- SET TO DISMOUNT
    721	002344	012705 	000000G			MOV	#.PUDBA,R5	;START AT BEGINNINING OF THE PUD
    722	002350				FILDM1:
    723	002350	020565 	000000G			CMP	R5,U.RP(R5)	;REDIRECTED?
    724	002354	001056 				BNE	FILDMX		;YES-- WE'LL FIND THE REAL ONE
    725	002356	005765 	000000G			TST	U.VA(R5)	;IS VOLUME MOUNTED?
    726	002362	001453 				BEQ	FILDMX		;NO-- JUST GO ON
    727	002364					ALUN$S	#DSKLUN,U.DN(R5),U.UN(R5) ;YES-- ASSIGN THIS DEVICE
	002364	016546 	000000G			MOV	U.UN(R5),-(SP)
	002370	016546 	000000G			MOV	U.DN(R5),-(SP)
	002374	012746 	000002 			MOV	#DSKLUN,-(SP)
	002400	012746 				MOV	(PC)+,-(SP)
	002402	   007 	   004 			.BYTE	7.,4
	002404	104375 				EMT	375
    728	002406	013700 	000000G			MOV	$DSW,R0		;(IN CASE OF ERROR)
    729	002412	103420 				BCS	DMOERR		;OOPS-- THIS CAN'T HAPPEN!!!!
    730					;
    731	002414	016500 	000000G			MOV	U.ACP(R5),R0	;GET THE ACP ADDRESS OF THE VOLUME
    732	002420	001410 				BEQ	FILDM2		;OOPS-- MOUNTED WITH NO ACP????
    733	002422	126037 	000000G	000045'		CMPB	S.DI(R0),PUDIDX	;IS THIS ACP ON THE SAVE DEVICE?
    734	002430	001404 				BEQ	FILDM2		;YES-- THAT'S OK
    735	002432					ERROR	<ACP FOR "<3>" NOT ON "<10>">
	000310	   011 	   101 	   103 		.ASCIZ	""<11>"ACP FOR "<3>" NOT ON "<10>""<5>""
	000313	   120 	   040 	   106
	000316	   117 	   122 	   040
	000321	   003 	   040 	   116
	000324	   117 	   124 	   040
	000327	   117 	   116 	   040
	000332	   010 	   005 	   000
	002432	012746 	000310'			MOV	#$$$,-(SP)
	002436	004737 	005740'			JSR	PC,TYPMSG
    736	002442				FILDM2:
    737	002442					PUSH	R5		;SAVE THE PUD POINTER
	002442	010546 				MOV	R5,-(SP)
    738	002444					CALL	FILMNT		;DO THE DISMOUNT FUNCTION
	002444	004737 	006576'			JSR	PC,FILMNT
    739	002450					POP	R5		;RESTORE THE POINTER
	002450	012605 				MOV	(SP)+,R5
    740	002452	103004 				BCC	FILDM3		;OK-- GO ON TO NEXT ENTRY
    741	002454				DMOERR:
    742	002454					ERROR	<"<3>" DISMOUNT ERROR "<7>">
	000335	   011 	   003 	   040 		.ASCIZ	""<11>""<3>" DISMOUNT ERROR "<7>""<5>""
	000340	   104 	   111 	   123
	000343	   115 	   117 	   125
	000346	   116 	   124 	   040
	000351	   105 	   122 	   122
	000354	   117 	   122 	   040
	000357	   007 	   005 	   000
	002454	012746 	000335'			MOV	#$$$,-(SP)
	002460	004737 	005740'			JSR	PC,TYPMSG
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 10-1
DISMOUNT ALL MOUNTED VOLUMES

    743	002464				FILDM3:
    744	002464	005765 	000000G			TST	U.VA(R5)	;DID IT REALLY DISMOUNT THE VOLUME?
    745	002470	001404 				BEQ	FILDM4		;YES-- OK
    746	002472					ERROR	<"<3>" CANNOT BE DISMOUNTED>
	000362	   011 	   003 	   040 		.ASCIZ	""<11>""<3>" CANNOT BE DISMOUNTED"<5>""
	000365	   103 	   101 	   116
	000370	   116 	   117 	   124
	000373	   040 	   102 	   105
	000376	   040 	   104 	   111
	000401	   123 	   115 	   117
	000404	   125 	   116 	   124
	000407	   105 	   104 	   005
	000412	   000
	002472	012746 	000362'			MOV	#$$$,-(SP)
	002476	004737 	005740'			JSR	PC,TYPMSG
    747	002502				FILDM4:
    748	002502					TYPE	<["<3>" DISMOUNTED]"<1>">
	000413	   133 	   003 	   040 		.ASCIZ	"["<3>" DISMOUNTED]"<1>""
	000416	   104 	   111 	   123
	000421	   115 	   117 	   125
	000424	   116 	   124 	   105
	000427	   104 	   135 	   001
	000432	   000
	002502	012746 	000413'			MOV	#$$$,-(SP)
	002506	004737 	005740'			JSR	PC,TYPMSG
    749	002512				FILDMX:
    750	002512	062705 	000000G			ADD	#U.SZ,R5	;OK-- BUMP TO NEXT ENTRY IN THE PUD
    751	002516	020527 	000000G			CMP	R5,#.PUDEA	;AT THE END OF THE PUD?
    752	002522	103712 				BLO	FILDM1		;NOPE-- BACK FOR SOME MORE
    753					;	BR	SYSAVE		;YES-- ON TO SAVE THE SYSTEM
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 11
SAVE SYSTEM STATE

    755						.SBTTL	SAVE SYSTEM STATE
    756					;
    757					; GET CURRENT TIME STUFF FOR TYPE-OUT
    758					;
    759	002524				SYSAVE:
    760	002524					GTIM$S	#GTIMBF		;GET CURRENT TIME PARAMETERS FOR SAVE FILE
	002524	012746 	000020'			MOV	#GTIMBF,-(SP)
	002530	012746 				MOV	(PC)+,-(SP)
	002532	   073 	   002 			.BYTE	59.,2
	002534	104375 				EMT	375
    761					;
    762					; SEE IF QUEUED PROTOCOL IS RUNNING.  IF SO, WE CANNOT CONTINUE.
    763					;
    764	002536	032737 	000000C	000002G		BIT	#EF.PR1!EF.PR2,.COMEF+2 ;IS ANY PROTOCOL RUNNING ?
    765	002544	001404 				BEQ	SYSAV1		;NO-- ALL OK
    766	002546					ERROR	<DTE-20 PROTOCOL RUNNING>
	000433	   011 	   104 	   124 		.ASCIZ	""<11>"DTE-20 PROTOCOL RUNNING"<5>""
	000436	   105 	   055 	   062
	000441	   060 	   040 	   120
	000444	   122 	   117 	   124
	000447	   117 	   103 	   117
	000452	   114 	   040 	   122
	000455	   125 	   116 	   116
	000460	   111 	   116 	   107
	000463	   005 	   000
	002546	012746 	000433'			MOV	#$$$,-(SP)
	002552	004737 	005740'			JSR	PC,TYPMSG
    767					;
    768					; RAISE PRIORITY TO 7 TO LOCK OUT INTERRUPTS
    769					;
    770	002556				SYSAV1:
    771	002556	012737 	000401 	000000G		MOV	#401,.NOERR	;DIS-ALLOW KL ERROR REPORTING
    772	002564					.INH			;;;AND RAISE TO PRIORITY 7
	002564	013746 	177776 			MOV	PS,-(SP)
	002570	112737 	000340 	177776 		MOVB	#PR7,@#PS	;;
    773					;
    774					; TURN THE CLOCK OFF
    775					;
    776	002576	005037 	177546 			CLR	@#LKS		;;;CLEAR CLOCK STATUS
    777					;
    778					; FIX UP BOTH BOOTS TO POINT TO US AND THE RIGHT FILE
    779					;
    780	002602	013705 	000002'			MOV	DRVADR,R5	;;;GET DRIVER TABLE ENTRY ADDRESS
    781	002606	013775 	000014'	000010 		MOV	MEMSIZ,@DRVMSZ(R5) ;;;SET SIZE OF MEMORY
    782	002614	013775 	000004'	000012 		MOV	DSKADR+0,@DRVAD1(R5) ;;;SET FIRST HALF OF DISK ADDRESS
    783	002622	013775 	000006'	000014 		MOV	DSKADR+2,@DRVAD2(R5) ;;; AND SECOND HALF
    784					.IF DF M$$MGE
    785						MOV	UPAR0,@DRVUP0(R5) ;;;ALSO OUR PAGE ADDRESS
    786					.ENDC
    787					;
    788					; SET BOOT PARAMTER IN R0 WITH LOAD FLAGS= 01 (SO KLINIT WON'T BE CALLED)
    789					;
    790	002630	113700 	000044'			MOVB	DEVUNT,R0	;;;GET THE DEVICE UNIT #
    791	002634	000300 				SWAB	R0		;;;SET IT TO BITS 10-8
    792	002636	056500 	000016 			BIS	DRVBTP(R5),R0	;;;SET PROPER BIT IN BOOT PARAMETER WORD
    793	002642	052700 	000002 			BIS	#BP.LD0,R0	;;;SET FLAGS= 01
    794					;
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 11-1
SAVE SYSTEM STATE

    795					; SAVE KT-11 STUFF, IF ANY
    796					;
    797	002646	042737 	030000 	177776 		BIC	#PS.PUS,@#PS	;;;SET PREVIOUS MODE KERNAL
    798					.IF DF M$$MGE
    799						MOV	#KPDR0,R1	;;;ADDRESS KERNAL DR'S
    800						MOV	#KPAR0,R2	;;; AND KERNAL AR'S
    801						MOV	#UPDR0,R3	;;; USER DR'S
    802						MOV	#UPAR0,R4	;;; AND AR'S
    803						MOV	#8.,R5		;;;8 REGITERS PER SET
    804					30$:
    805						PUSH	<(R1)+,(R2)+,(R3)+,(R4)+> ;;;SAVE ALL ON STACK
    806						SOB	R5,30$		;;;ALL OF 'EM
    807						PUSH	<R1,R2,R3,R4>	;;;SAVE ADDR'S TO RESTORE
    808					;
    809					; SAVE STACK LIMIT AND KERNAL SP
    810					;
    811						PUSH	STKLIM		;;;SAVE STACK LIMIT
    812						MFPI	SP		;;; AND KERNAL STACK
    813					;
    814					; POINT TO ABSOLUTE ZERO, USING UPAR1, FOR COPY OF BOOT
    815					;
    816						MOV	#77406,UPDR1	;;;MAP MAXIMUM SIZE (4096 WORDS)
    817						CLR	UPAR1		;;; TO REAL ABSOLUTE ZERO
    818						MOV	#20000,R1	;;; FROM 20000 IN VIRTUAL SPACE
    819					.IFF
    820	002654	005001 				CLR	R1		;;;ADDRESS ABSOLUTE 0 (NO KT-11)
    821					.ENDC
    822					;
    823					; COPY LOW CORE (FIRST 256. WORDS) TO SAVE AREA LOWCOR, AND
    824					;  COPY PROPER BOOT TO LOW CORE.
    825					;
    826					; NOTE THAT R1 POINTS TO ABSOLUTE ZERO, KT-11 OR NOT
    827					;
    828	002656	013705 	000002'			MOV	DRVADR,R5	;;;GET DRIVER ADDRESS BACK
    829	002662	016503 	000004 			MOV	DRVBOT(R5),R3	;;;GET ADDRESS OF BOOT CODE
    830	002666	012702 	000064'			MOV	#LOWCOR,R2	;;;POINT TO SAVE AREA
    831	002672	012704 	000400 			MOV	#256.,R4	;;;COPY 256. WORDS
    832	002676				41$:
    833	002676	011122 				MOV	(R1),(R2)+	;;;MOVE A WORD TO SAVE AREA
    834	002700	012321 				MOV	(R3)+,(R1)+	;;; AND COPY A WORD OF BOOT
    835	002702	077403 				SOB	R4,41$		;;;COPY ALL 256
    836					;
    837	002704	010041 				MOV	R0,-(R1)	;;;SAVE BOOT PARAMETER AT LOCATION 776
    838	002706					PUSH	<R1,R2>		;;;SAVE POINTERS FOR RESTORE
	002706	010146 				MOV	R1,-(SP)
	002710	010246 				MOV	R2,-(SP)
    839					;
    840					; WHAT'S ON THE STACK?
    841					;
    842					;	SP+00	R2 (RESTORE POINTER TO SAVE AREA)
    843					;	SP+02	R1 (RESTORE POINTER TO LOW CORE)
    844					; KT-11 ONLY:
    845					;	SP+04	KERNAL SP
    846					;	SP+06	STKLIM
    847					;	SP+10	POINTERS TO KT-11 REGISTERS TO RESTORE
    848					;	SP+12
    849					;	SP+14
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 11-2
SAVE SYSTEM STATE

    850					;	SP+16
    851					;	SP+20	KT-11 REGISTERS
    852					;	...
    853					;	SP+116
    854					;
    855					;	SP+NN	(BOTTOM OF STACK) USER PS FROM .INH
    856					;
    857					; SO LET'S SAVE SP IN SPSAVE
    858					;
    859	002712	010637 	000000'			MOV	SP,SPSAVE	;;;SAVE SP UNTIL WE RESTORE
    860					;	BR	WTSAVE		;;;NOW WRITE SAVE FILE AND BOOT
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 12
WRITE SAVE FILE AND BOOT

    862						.SBTTL	WRITE SAVE FILE AND BOOT
    863					;
    864					; WRITE SAVE FILE.  DSK ADDRESS IS IN DSKADR+0 AND DSKADR+2
    865					;
    866	002716				WTSAVE:
    867	002716	105337 	000047'			DECB	WSFLAG		;;;WRITE SAVE FILE?
    868	002722	002012 				BGE	10$		;;;YES-- GO DO IT
    869	002724	105337 	000046'			DECB	WBFLAG		;;; /WB SPECIFIED?
    870	002730	002414 				BLT	RESTORE		;;;NO-- ALL DONE WITH SAVE-- BRING SYSTEM BACK UP
    871	002732	005037 	000004'			CLR	DSKADR+0	;;;YES-- WRITE BOOT TO BLOCK 0
    872	002736	005037 	000006'			CLR	DSKADR+2	;;; . . .
    873	002742	012737 	000010 	000014'		MOV	#256.*2/100,MEMSIZ ;;;GET # 100 BYTE BLOCKS TO WRITE
    874	002750				10$:
    875	002750	013705 	000002'			MOV	DRVADR,R5	;;;GET ADDRESS OF DEVICE DRIVER TABLE ENTRY
    876	002754					CALL	@DRVWRT(R5)	;;;CALL PROPER WRITE ROUTINE
	002754	004775 	000006 			JSR	PC,@DRVWRT(R5)
    877	002760	000756 				BR	WTSAVE		;;;GO BACK AND DO WRITE AGAIN
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 13
RESTORE SYSTEM STATE

    879						.SBTTL	RESTORE SYSTEM STATE
    880					;
    881					; TRANSFER HERE ON TWO CONDITIONS:
    882					;	1) FROM BOOTSTRAP WITH FRESHLY BOOT'ED SYSTEM
    883					;	2) FROM SAVE COMPLETING A WRITE OF THE SYSTEM IMAGE
    884					;
    885					; THE ACTION IS THE SAME IN EITHER CASE.
    886					;
    887	002762				RESTORE::
    888	002762	013706 	000000'			MOV	SPSAVE,SP	;;;RESTORE OUR STACK
    889					;
    890					; RESTORE LOW CORE FROM SAVE AREA
    891					;
    892	002766					POP	<R2,R1>		;;;RESTORE SAVED POINTERS TO CORE
	002766	012602 				MOV	(SP)+,R2
	002770	012601 				MOV	(SP)+,R1
    893					.IF DF M$$MGE
    894						MOV	#77406,UPDR1	;;;MAP ALL OF
    895						CLR	UPAR1		;;; LOW CORE TO 20000
    896					.IFTF
    897	002772	012100 				MOV	(R1)+,R0	;;;GET BOOT PARAMETER FROM LOCATION 776
    898	002774	012705 	000400 			MOV	#256.,R5	;;;RESTORE ALL 256 WORDS
    899	003000				20$:
    900	003000	014241 				MOV	-(R2),-(R1)	;;;RESTORE A WORD
    901	003002	077502 				SOB	R5,20$		;;;LOOP FOR WHOLE BLOCK
    902					;
    903					; RESTORE KT-11 REGISTERS (IF ANY)
    904					;
    905					.IFT
    906						MTPI	SP		;;;RESTORE KERNAL SP
    907						POP	STKLIM		;;; AND STACK LIMIT
    908					;
    909						POP	<R4,R3,R2,R1>	;;;RESTORE SAVED POINTERS TO KT-11
    910						MOV	#8.,R5		;;;8 REGISTERS PER SET
    911					30$:
    912						POP	<-(R4),-(R3),-(R2),-(R1)> ;;;RESTORE 4 REGISTERS
    913						SOB	R5,30$		;;;LOOP FOR ALL REGISTERS
    914					.ENDC
    915	003004	005037 	000062'			CLR	ALTDXF		;;; +++006 RESET THE FLOPPY FLAG
    916	003010	010037 	000000G			MOV	R0,.BTPRM	;;;SAVE THE BOOT PARAMETER WORD IN EXEC
    917					;	BR	SETCTY		;;;ONWARD!!
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 14
RESTORE -- SETUP CTY LINE # AND DH-11 TABLES

    919						.SBTTL	RESTORE -- SETUP CTY LINE # AND DH-11 TABLES
    920					;
    921					; SET THE CTY TO THE LINE INDICATED BY THE BOOT PARAMETER, NOW IN R0
    922					;
    923	003014				SETCTY:
    924	003014	010005 				MOV	R0,R5		;;;ALSO SAVE BOOT PARAM FOR US TO USE
    925	003016	042700 	177607 			BIC	#^C<BP.CSP>,R0	;;;TRIM TO CONSOLE SPEED, BITS 6-3
    926	003022	001450 				BEQ	SETDL		;;; +++005 CTY NOT SPEC-- LEAVE IT ALONE
    927	003024	012704 	000000G			MOV	#DLTBL,R4	;;;ASSUME DL-11
    928	003030	006200 				ASR	R0		;;;SHIFT THE SPEED FIELD
    929	003032	006200 				ASR	R0		;;; OVER TO A WORD INDEX INTO TABLE, BITS 4-1
    930	003034	016003 	001124'			MOV	DHSTAB(R0),R3	;;;GET THE SPEED WORD FOR THE SPECIFIED TYPE
    931	003040	001406 				BEQ	50$		;;;NOT A DH-11-- GO ON FOR DL-11
    932					;
    933	003042	010504 				MOV	R5,R4		;;;DH-11-- GET THE PARAM AGAIN
    934	003044	042704 	174377 			BIC	#^C<BP.UNT>,R4	;;;TRIM TO DH UNIT NUMBER, BITS 10-8
    935	003050	006204 				ASR	R4		;;;SHIFT INTO PLACE, 16*8=128 BYTES PER DH UNIT, BITS 9-7
    936	003052	062704 	000000G			ADD	#DHTBL,R4	;;;GET DH UNIT TABLE ADDRESS
    937	003056				50$:
    938	003056	010500 				MOV	R5,R0		;;;GET THE WORD BACK
    939	003060	042700 	103777 			BIC	#^C<BP.CLN>,R0	;;;GET JUST LINE NUMBER, BITS 14-11
    940	003064	000300 				SWAB	R0		;;;MAKE THAT 8 BYTES PER LINE, BITS 6-3
    941	003066	060004 				ADD	R0,R4		;;;GET TABLE ADDRESS OF NEW CTY
    942					;
    943	003070	006200 				ASR	R0		;;;GET LINE NUMBER *4
    944	003072	006200 				ASR	R0		;;; LINE NUMBER *2, WORD INDEX
    945	003074	016037 	000000G	000000G		MOV	BITTBL(R0),$BTMSK ;;;GET THE BIT FOR THE LINE TO DH BIT MASK FOR CTY
    946	003102	006200 				ASR	R0		;;;GET LINE NUMBER WITHIN DH UNIT
    947	003104	010037 	000000G			MOV	R0,$UNIT	;;;STORE THAT UNIT NUMBER
    948					;
    949	003110	013700 	000000G			MOV	CTYPTR,R0	;;;GET OLD CTY TABLE ENTRY POINTER
    950	003114	042760 	000000G	000000G		BIC	#TT.CTY,STSW1(R0) ;;;MARK NOT THE CTY ANY MORE
    951	003122	010437 	000000G			MOV	R4,CTYPTR	;;;SET THE NEW CTY TABLE ENTRY
    952	003126	010437 	000000C			MOV	R4,.DQPBA+<Q.SZ*<D.CCTY-1>>+Q.DA ;;;SET THE -10 CTY POINTER TO US, ALSO
    953	003132	052764 	000000G	000000G		BIS	#TT.CTY,STSW1(R4) ;;;SET THIS AS THE CTY
    954	003140	010364 	000000G			MOV	R3,STSW0(R4)	;;;SET DH PARAMETERS FROM SPEED
    955					;
    956					; RESET DL11 TABLE FOR CONFIGURATION
    957					;
    958	003144				SETDL:
    959	003144	012737 	000000G	000000C		MOV	#KBS0,DLTBL+TTYEXP
    960	003152	012737 	000000G	000000C		MOV	#KBS1,DLTBL+TTYEXP+10
    961	003160	012737 	175630 	000000C		MOV	#175630,DLTBL+TTYEXP+20
    962	003166	012737 	175640 	000000C		MOV	#175640,DLTBL+TTYEXP+30
    963	003174	012737 	175650 	000000C		MOV	#175650,DLTBL+TTYEXP+40
    964					;
    965					; RESET DH TABLE SO THAT WE CAN CONFIGURE UP
    966					;
    967	003202				SETDH:
    968	003202	012700 	160020 			MOV	#DHEXPA,R0	;;;GET EXT PAGE ADDR OF FIRST DH
    969	003206	012701 	000000C			MOV	#DHTBL+TTYEXP,R1	;;; AND TABLE ADDRESS FOR SAME
    970	003212				10$:
    971	003212	012702 	000020 			MOV	#16.,R2		;;;# LINES PER DH
    972	003216				20$:
    973	003216	010011 				MOV	R0,(R1)		;;;SET THIS DH EXTERNAL PAGE ADDRESS
    974	003220	062701 	000010 			ADD	#8.,R1		;;;BUMP TO NEXT TABLE ENTRY
    975	003224	077204 				SOB	R2,20$		;;;LOOP FOR ALL LINES IN THIS DH
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 14-1
RESTORE -- SETUP CTY LINE # AND DH-11 TABLES

    976					;
    977	003226	062700 	000020 			ADD	#DHEXPZ,R0	;;;BUMP TO NEXT DH
    978	003232	020127 	000000G			CMP	R1,#TTYEND	;;;END OF TABLE YET?
    979	003236	103765 				BLO	10$		;;;NO-- DO NEXT DH
    980					;	BR	REDSY		;;;CONTINUE . .
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 15
RESTORE -- REDIRECT SY0: TO BOOT DEVICE

    982						.SBTTL	RESTORE -- REDIRECT SY0: TO BOOT DEVICE
    983					;
    984					; IF THIS WAS A SAVE TO SY, REDIRECT SY TO POINT TO BOOT UNIT
    985					;
    986	003240				REDSY:
    987	003240	010501 				MOV	R5,R1		;;;GET BACK THE BOOT PARAM
    988	003242	106301 				ASLB	R1		;;;SHIFT BITS 6-4 INTO 7-5
    989	003244	120127 	000060 			CMPB	R1,#3*BIT4	;;;IS SPEED FIELD 0-2?
    990	003250	103401 				BLO	10$		;;;YES-- UNIT # IS OK
    991	003252	005001 				CLR	R1		;;;NO-- 3-17-- UNIT # IS ZERO
    992	003254				10$:
    993	003254	000301 				SWAB	R1		;;;BRING UNIT # INTO BITS 2-0
    994	003256	042701 	177770 			BIC	#^C<7>,R1	;;;TRIM TO THREE BITS
    995					;
    996	003262	013700 	000042'			MOV	DEVNAM,R0	;;;GET DEVICE NAME
    997	003266					CALL	FINDEV		;;;ATTEMPT TO FIND BOOT DEVICE
	003266	004737 	006520'			JSR	PC,FINDEV
    998	003272	103004 				BCC	30$		;;;GOT IT-- OK
    999	003274	013705 	000040'			MOV	PUDADR,R5	;;;NOT FOUND-- GET OLD PUD ENTRY ADDRESS
   1000	003300	110165 	000000G			MOVB	R1,U.UN(R5)	;;;MAKE IT THE NEW UNIT #
   1001	003304				30$:
   1002	003304	010504 				MOV	R5,R4		;;;SAVE THE PUD ENTRY ADDRESS
   1003	003306	005037 	000040'			CLR	PUDADR		;;;ASSUME FAILURE
   1004	003312	012700 	054523 			MOV	#"SY,R0		;;;GET THE
   1005	003316	005001 				CLR	R1		;;; PUD ENTRY ADDRESS
   1006	003320					CALL	FINDEV		;;;  FOR SY0:
	003320	004737 	006520'			JSR	PC,FINDEV
   1007	003324	103547 				BCS	DTECHK		;;;OOPS-- GIVE UP
   1008	003326	010465 	000000G			MOV	R4,U.RP(R5)	;;;REDIRECT SY0 TO BOOT DEVICE
   1009	003332	010405 				MOV	R4,R5		;;;GET BOOT PUD ENTRY ADDRESS BACK
   1010	003334	010537 	000040'			MOV	R5,PUDADR	;;; AND SAVE IT
   1011					;
   1012					; UPDATE ALL TASKS FROM OLD SAVE DEVICE TO NEW SYSTEM DEVICE
   1013					;
   1014	003340				40$:
   1015	003340	010500 				MOV	R5,R0		;;;COPY THE PUD ADDRESS
   1016	003342	162700 	000000G			SUB	#.PUDBA,R0	;;;MAKE IT INDEX INTO PUD
   1017	003346	012701 	000000G			MOV	#U.SZ,R1	;;;SET ENTRY SIZE AS DIVISOR
   1018	003352					CALL	$DIV		;;;COMPUTE PUD INDEX FOR NEW SY INTO R0
	003352	004737 	000000G			JSR	PC,$DIV
   1019					;
   1020	003356	013703 	000000G			MOV	.STDTA,R3	;;;GET THE ADDRESS OF THE BEGINNING OF SYSTEM TASK DIRECTORY
   1021	003362	010304 				MOV	R3,R4		;;;COPY IT AGAIN
   1022	003364	063704 	000000G			ADD	.STDTZ,R4	;;;FIND ADDRESS OF LAST ENTRY IN STD
   1023	003370				45$:
   1024	003370	012302 				MOV	(R3)+,R2	;;;GET AN STD ENTRY ADDRESS
   1025	003372	032762 	000000G	000000G		BIT	#SF.FX,S.FW(R2)	;;;FIXED TASK (I.E. NOT DISK-LOADED)?
   1026	003400	001006 				BNE	47$		;;;YES-- DON'T CHANGE IT'S DISK
   1027	003402	126237 	000000G	000045'		CMPB	S.DI(R2),PUDIDX	;;;IS THIS TASK FROM ORIGINAL SAVE DEVICE?
   1028	003410	001002 				BNE	47$		;;;NO-- GO ON
   1029	003412	110062 	000000G			MOVB	R0,S.DI(R2)	;;;YES-- UPDATE DISK INDICATOR TO NEW SYSTEM DEVICE
   1030	003416				47$:
   1031	003416	020304 				CMP	R3,R4		;;;AT END OF STD YET?
   1032	003420	101763 				BLOS	45$		;;;NO-- KEEP LOOPING FOR ALL TASKS
   1033					;	BR	RP4CHK		;;;MORE & MORE
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 16
RESTORE -- CHECK BOOT DB & LOOK FOR RP06'S

   1035						.SBTTL	RESTORE -- CHECK BOOT DB & LOOK FOR RP06'S
   1036					;
   1037					; CHECK THE RP TO MAKE SURE IT IS ON-LINE AND IN A/B MODE
   1038					;
   1039	003422				RP4CHK:
   1040	003422	105737 	000053'			TSTB	RHFLAG		;;;SHOULD WE CHECK THE RP?
   1041	003426	001417 				BEQ	RP6CHK		;;;NO-- JUST GO ON
   1042	003430	116537 	000000G	176710 		MOVB	U.UN(R5),RPCS2	;;;YES-- SET TO PROPER UNIT #
   1043	003436	032737 	010000 	176712 		BIT	#RPMOL,RPDS	;;;IS THE RP ON-LINE?
   1044	003444	001002 				BNE	35$		;;;YES-- GO ON
   1045	003446	105237 	000054'			INCB	RNFLAG		;;;NO-- REMEMBER THAT IT ISN'T
   1046	003452				35$:
   1047	003452	032737 	001000 	176712 		BIT	#RPPGM,RPDS	;;;PROGRAMMABLE MODE (A/B)?
   1048	003460	001002 				BNE	RP6CHK		;;;YES-- ALL OK
   1049	003462	105237 	000055'			INCB	RPFLAG		;;;NO-- REMEMBER THAT IT ISN'T
   1050					;
   1051					; CHECK TO FIND ALL THE RP06'S MASQUERADING AS RP04'S
   1052					;
   1053	003466				RP6CHK:
   1054	003466	042737 	030000 	177776 		BIC	#PS.PUS,@#PS	;;;INSURE PREVIOUS KERNAL
   1055	003474	012704 	000006 			MOV	#6,R4		;;;POINT TO TIME-OUT TRAP
   1056	003500					MFPI	(R4)		;;;SAVE PS OF TRAP
	003500	011446 				MOV	(R4),-(SP)
   1057	003502					MFPI	-(R4)		;;; AND PC
	003502	014446 				MOV	-(R4),-(SP)
   1058	003504					MTPS	#80$,(R4)+	;;;SET NEW PC
	003504	012724 	003634'			MOV	#80$,(R4)+
   1059	003510					MTPS	@#PS,(R4)	;;; AND PS AS CURRENT STATE
	003510	013714 	177776 			MOV	@#PS,(R4)
   1060	003514	012700 	041104 			MOV	#"DB,R0		;;;WE ARE CHECKING DB'S
   1061	003520	012701 	000007 			MOV	#7,R1		;;; AND THERE ARE 8 OF THEM
   1062	003524				10$:
   1063	003524					CALL	FINDEV		;;;FIND THIS DB UNIT IN PUD
	003524	004737 	006520'			JSR	PC,FINDEV
   1064	003530	103436 				BCS	70$		;;;NOT THERE-- CARRY ON
   1065	003532	012765 	050700 	000000G		MOV	#50700,U.LBN(R5) ;;;ASSUME RP04-- SET LOW PART OF VOLUME SIZE
   1066	003540	112765 	000002 	000000G		MOVB	#2,U.LBH(R5)	;;; AND HIGH PART
   1067	003546	110137 	176710 			MOVB	R1,RPCS2+0	;;;SELECT THIS UNIT
   1068	003552	032737 	001400 	176712 		BIT	#RPDPR!RPPGM,RPDS ;;;DRIVE EXIST FOR US?
   1069	003560	001422 				BEQ	70$		;;;NO-- SKIP IT
   1070	003562	012702 	023420 			MOV	#10000.,R2	;;;SET TIME-OUT COUNT IF PORT BUSY
   1071	003566				20$:
   1072	003566	032737 	004000 	176700 		BIT	#RPDVA,RPCS1	;;;DRIVE AVAILABLE AT THIS TIME?
   1073	003574	001004 				BNE	30$		;;;YES-- CHECK IT OUT
   1074	003576	112737 	000001 	176700 		MOVB	#RPNOOP+RPGO,RPCS1+0 ;;;NO-- DO NOOP TO GET IT
   1075	003604	077210 				SOB	R2,20$		;;;LOOP UNTIL WE HAVE IT
   1076	003606				30$:
   1077	003606	123727 	176726 	000022 		CMPB	RPDT+0,#RPDT06	;;;THIS AN RP06?
   1078	003614	002404 				BLT	70$		;;;NO-- SIZE IS OK
   1079	003616	006365 	000000G			ASL	U.LBN(R5)	;;;YES-- DOUBLE
   1080	003622	106165 	000000G			ROLB	U.LBH(R5)	;;; THE VOLUME SIZE
   1081	003626				70$:
   1082	003626	005301 				DEC	R1		;;;COUNT DOWN TO NEXT UNIT #
   1083	003630	002335 				BGE	10$		;;;NOT DONE-- LOOP FOR ALL 8
   1084	003632	000401 				BR	90$		;;;ALL DONE-- GO ON
   1085					;
   1086	003634				80$:
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 16-1
RESTORE -- CHECK BOOT DB & LOOK FOR RP06'S

   1087	003634	022626 				CMP	(SP)+,(SP)+	;;;TIME-OUT TRAP-- REMOVE TRAP FROM STACK
   1088	003636				90$:
   1089	003636					MTPI	-(R4)		;;;RESTORE TRAP AT 4 PC
	003636	012644 				MOV	(SP)+,-(R4)
   1090	003640					MTPI	2(R4)		;;; AND PS
	003640	012664 	000002 			MOV	(SP)+,2(R4)
   1091					;	BR	DTECHK		;;;CARRY ON
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 17
RESTORE -- CHECK ALL THE DTE-20'S

   1093						.SBTTL	RESTORE -- CHECK ALL THE DTE-20'S
   1094					;
   1095					; CHECK TO MAKE SURE THAT ALL DTE-20'S ARE AT PRIORITY 6
   1096					;
   1097	003644				DTECHK:
   1098	003644	005000 				CLR	R0		;;;RESET DTE #
   1099	003646	012701 	001000 			MOV	#DTVECA+4,R1	;;;POINT TO HIGHEST DTE VECTOR ADDRESS
   1100	003652	012702 	174400 			MOV	#DTEXPA,R2	;;; ALSO TO EXTERNAL PAGE ADDRESS FOR #0
   1101	003656	005003 				CLR	R3		;;;RESET POINTER TO THE PRIVILEDGED DTE
   1102	003660	105337 	000061'			DECB	DEFLAG		;;;SAY DTE-20 OK
   1103					;
   1104	003664	042737 	030000 	177776 		BIC	#PS.PUS,@#PS	;;;INSURE PREVIOUS KERNAL
   1105	003672	012704 	000006 			MOV	#6,R4		;;;POINT TO TIMEOUT VECTOR
   1106	003676					MFPI	(R4)		;;;SAVE THE PS
	003676	011446 				MOV	(R4),-(SP)
   1107	003700					MFPI	-(R4)		;;; AND PC FOR TIMEOUT
	003700	014446 				MOV	-(R4),-(SP)
   1108	003702					MTPS	#60$,(R4)+	;;;SET WHERE TO GO ON NON-EX DTE
	003702	012724 	004004'			MOV	#60$,(R4)+
   1109	003706					MTPS	@#PS,(R4)	;;; AND HOW TO GET THERE
	003706	013714 	177776 			MOV	@#PS,(R4)
   1110	003712				10$:
   1111	003712					MFPI	-(R1)		;;;SAVE PS OF THIS DTE VECTOR
	003712	014146 				MOV	-(R1),-(SP)
   1112	003714					MFPI	-(R1)		;;; AND PC
	003714	014146 				MOV	-(R1),-(SP)
   1113	003716					MTPS	#50$,(R1)+	;;;WHERE TO GO IF IT INTERRUPTS
	003716	012721 	003776'			MOV	#50$,(R1)+
   1114	003722					MTPS	@#PS,(R1)	;;; AND HOW SUCH
	003722	013711 	177776 			MOV	@#PS,(R1)
   1115					;
   1116	003726	005712 				TST	(R2)		;;;DTE EXIST? (TRAP IF NOT TO 60$)
   1117	003730	032762 	000010 	000034 		BIT	#DTRSMD,DTSTAT(R2) ;;;THIS PRIVILEDGED DTE-20?
   1118	003736	001402 				BEQ	20$		;;;YES-- THIS IS THE ONE
   1119	003740	005703 				TST	R3		;;;NO-- FOUND A DTE YET?
   1120	003742	001001 				BNE	30$		;;;YES-- DON'T REMEMBER THIS ONE
   1121	003744				20$:
   1122	003744	010203 				MOV	R2,R3		;;;FIRST OR PRIV DTE-- SAVE IT
   1123	003746				30$:
   1124	003746	012762 	004040 	000034 		MOV	#DT11DB!DTINON,DTSTAT(R2) ;;;RING OUR DOORBELL (FROM THE INSIDE)
   1125	003754	112737 	000240 	177776 		MOVB	#PR5,@#PS	;;;BRING DOWN TO PRI 5
   1126	003762	110037 	000061'			MOVB	R0,DEFLAG	;;;DID NOT INTERRUPT-- SAVE DTE # NOT AT PRI 6
   1127	003766	024646 				CMP	-(SP),-(SP)	;;;FAKE TRAP ON STACK
   1128	003770	152737 	000340 	177776 		BISB	#PR7,@#PS	;;;RESTORE PRI 7
   1129	003776				50$:
   1130	003776	012762 	002010 	000034 		MOV	#DTINOF!DTCL11,DTSTAT(R2) ;;;CLEAR RINGING DOORBELL
   1131	004004				60$:
   1132	004004	042737 	030000 	177776 		BIC	#PS.PUS,@#PS	;;; AND PREVIOUS MODE KERNAL
   1133	004012	022626 				CMP	(SP)+,(SP)+	;;;REMOVE TRAP FROM STACK
   1134	004014					MTPI	-(R1)		;;;RESTORE PC FOR DTE VECTOR
	004014	012641 				MOV	(SP)+,-(R1)
   1135	004016					MTPI	2(R1)		;;; AND PS
	004016	012661 	000002 			MOV	(SP)+,2(R1)
   1136	004022	062702 	000040 			ADD	#DTEXPZ,R2	;;;BUMP TO NEXT DTE-20 EXT PAGE ADDR
   1137	004026	005200 				INC	R0		;;; AND COUNT UP
   1138	004030	020027 	000004 			CMP	R0,#4		;;;DONE WITH DTE'S?
   1139	004034	002726 				BLT	10$		;;;NOPE-- BACK FOR ANOTHER
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 17-1
RESTORE -- CHECK ALL THE DTE-20'S

   1140					;
   1141	004036	010337 	000000G			MOV	R3,.PRDTE	;;;SAVE THE ADDRESS OF THE PRIV DTE
   1142	004042	001402 				BEQ	95$		;;;NOT THERE-- LEAVE STATUS ZERO, TOO
   1143	004044	062703 	000034 			ADD	#DTSTAT,R3	;;;BUMP TO STATUS
   1144	004050				95$:
   1145	004050	010337 	000000G			MOV	R3,.PRSTA	;;;SAVE THAT ADDR, TOO
   1146					;
   1147	004054					MTPI	-(R4)		;;;RESTORE PC OF TIMEOUT TRAP
	004054	012644 				MOV	(SP)+,-(R4)
   1148	004056					MTPI	2(R4)		;;; AND PS
	004056	012664 	000002 			MOV	(SP)+,2(R4)
   1149	004062	013700 	000000G			MOV	.BTPRM,R0	;;;GET BOOT PARAMETER WORD AND
   1150	004066	042700 	177771 			BIC	#^C<BP.LD1!BP.LD0>,R0 ;;;ISOLATE THE LOAD SWITCHES
   1151	004072	022700 	000004 			CMP	#BP.LD1,R0	;;;IF SWITCHES = 10
   1152	004076	001004 				BNE	SYSTRT		;;;THEN
   1153	004100	005037 	000000G			CLR	.NOERR		;;;ALLOW ERRORS
   1154	004104					CALL	..DTP2		;;;START SECONDARY PROTOCOL AND
	004104	004737 	000000G			JSR	PC,..DTP2
   1155					;	BR	SYSTRT		;;;START SYSTEM GOING
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 18
RESTORE -- RESTART SYSTEM AND TYPE HERALD

   1157						.SBTTL	RESTORE -- RESTART SYSTEM AND TYPE HERALD
   1158					;
   1159					; FORCE POWER-RECOVERY AST BY SETTING EV.PF AND
   1160					;  FAKING AN ENABLE TASK SWITCHING REQUEST (FROM PR3 TO PR0)
   1161					;
   1162	004110				SYSTRT:
   1163	004110	005037 	000000G			CLR	.DATE3		;;;INDICATE THAT THE DATE IS NOW INVALID
   1164	004114	005037 	000000G			CLR	.CPUSN		;;; [TCO 4.2333] INVALIDATE SERIAL NUMBER
   1165	004120	005037 	000000G			CLR	.HRDWR		;;; [TCO 4.2233] AND HARDWARE OPTIONS
   1166	004124	012737 	000000G	000000G		MOV	#EV.PF,.SERFG	;;;SET POWER-RECOVERY SIGNIFICANT EVENT
   1167	004132					CALL	..ENB0		;ENABLE TASK SWITCHING
	004132	004737 	000000G			JSR	PC,..ENB0
   1168					;
   1169					; SEE IF WRITE ERROR OCCURED DURING SAVE (WEFLAG NON-ZERO)
   1170					;
   1171	004136	105737 	000060'			TSTB	WEFLAG		;WRITE SUCCESFUL?
   1172	004142	001404 				BEQ	DTEMSG		;YES-- ALL OK
   1173	004144					ERROR	<WRITE ERROR>
	000465	   011 	   127 	   122 		.ASCIZ	""<11>"WRITE ERROR"<5>""
	000470	   111 	   124 	   105
	000473	   040 	   105 	   122
	000476	   122 	   117 	   122
	000501	   005 	   000
	004144	012746 	000465'			MOV	#$$$,-(SP)
	004150	004737 	005740'			JSR	PC,TYPMSG
   1174					;
   1175					; SEE IF DTE-20 PRIORITY CHECK FAILED
   1176					;
   1177	004154				DTEMSG:
   1178	004154	005737 	000000G			TST	.PRDTE		;DID WE FIND A DTE-20
   1179	004160	001007 				BNE	DTPMSG		;YES-- SEE IF OK
   1180	004162	005037 	000000G			CLR	.PRSTA		;IF HE CONTINUES . . .
   1181	004166					TYPE	<"<11>"NO DTE-20"<1>">
	000503	   011 	   116 	   117 		.ASCIZ	""<11>"NO DTE-20"<1>""
	000506	   040 	   104 	   124
	000511	   105 	   055 	   062
	000514	   060 	   001 	   000
	004166	012746 	000503'			MOV	#$$$,-(SP)
	004172	004737 	005740'			JSR	PC,TYPMSG
   1182	004176	000407 				BR	DTPMS1		;GO FLOP
   1183					;
   1184	004200				DTPMSG:
   1185	004200	113700 	000061'			MOVB	DEFLAG,R0	;WE FAIL THE CHECK?
   1186	004204	002414 				BLT	SYSMSG		;NO-- ALL OK
   1187	004206					TYPE	<"<11>"DTE-20 #"<7>" NOT AT PRIORITY LEVEL 6"<1>">
	000517	   011 	   104 	   124 		.ASCIZ	""<11>"DTE-20 #"<7>" NOT AT PRIORITY LEVEL 6"<1>""
	000522	   105 	   055 	   062
	000525	   060 	   040 	   043
	000530	   007 	   040 	   116
	000533	   117 	   124 	   040
	000536	   101 	   124 	   040
	000541	   120 	   122 	   111
	000544	   117 	   122 	   111
	000547	   124 	   131 	   040
	000552	   114 	   105 	   126
	000555	   105 	   114 	   040
	000560	   066 	   001 	   000
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 18-1
RESTORE -- RESTART SYSTEM AND TYPE HERALD

	004206	012746 	000517'			MOV	#$$$,-(SP)
	004212	004737 	005740'			JSR	PC,TYPMSG
   1188	004216				DTPMS1:
   1189	004216					.INH			;;;BACK UP TO NOTHING-NESS
	004216	013746 	177776 			MOV	PS,-(SP)
	004222	112737 	000340 	177776 		MOVB	#PR7,@#PS	;;
   1190	004230	000777 				BR	.		;;;WAIT FOR SOMEONE TO PICK UP THE PIECES
   1191	004232					.ENB			;;;THE PIECES HAVE BEEN PICKED UP
	004232	012637 	177776 			MOV	(SP)+,@#PS	;;
   1192					;
   1193					; TYPE SYSTEM MESSAGE
   1194					;
   1195	004236				SYSMSG:
   1196	004236	012700 	000000G			MOV	#.VERNO,R0	; +++003 POINT TO VERSION # STRING
   1197	004242					TYPE	<"<1><1>"RSX-20F "<4>" "<6><1><1>"> ; +++003
	000563	   001 	   001 	   122 		.ASCIZ	""<1><1>"RSX-20F "<4>" "<6><1><1>""
	000566	   123 	   130 	   055
	000571	   062 	   060 	   106
	000574	   040 	   004 	   040
	000577	   006 	   001 	   001
	000602	   000
	004242	012746 	000563'			MOV	#$$$,-(SP)
	004246	004737 	005740'			JSR	PC,TYPMSG
   1198					;	BR	MNTSY		;UPWARD
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 19
RESTORE -- TYPE SY0: REDIRECT MESSAGE AND MOUNT SY0:

   1200						.SBTTL	RESTORE -- TYPE SY0: REDIRECT MESSAGE AND MOUNT SY0:
   1201					;
   1202					; TYPE REDIRECTED MESSAGE, MOUNT SY IF SO
   1203	004252				MNTSY:				; +++001
   1204	004252	013705 	000040'			MOV	PUDADR,R5	;GET THE PUD ENTRY FOR THE SY DEVICE
   1205	004256	001503 				BEQ	REDHOM		; +++006 GIVE UP IF NONE
   1206	004260	005037 	000062'			CLR	ALTDXF		; +++006 RESET THE FLOPPY FLAG
   1207	004264					TYPE	<[SY0: REDIRECTED TO "<3>"]"<1>">
	000603	   133 	   123 	   131 		.ASCIZ	"[SY0: REDIRECTED TO "<3>"]"<1>""
	000606	   060 	   072 	   040
	000611	   122 	   105 	   104
	000614	   111 	   122 	   105
	000617	   103 	   124 	   105
	000622	   104 	   040 	   124
	000625	   117 	   040 	   003
	000630	   135 	   001 	   000
	004264	012746 	000603'			MOV	#$$$,-(SP)
	004270	004737 	005740'			JSR	PC,TYPMSG
   1208	004274				MNTSY1:				; +++006
   1209	004274					ALUN$S	#DSKLUN,U.DN(R5),U.UN(R5) ;ASSIGN THE DEVICE
	004274	016546 	000000G			MOV	U.UN(R5),-(SP)
	004300	016546 	000000G			MOV	U.DN(R5),-(SP)
	004304	012746 	000002 			MOV	#DSKLUN,-(SP)
	004310	012746 				MOV	(PC)+,-(SP)
	004312	   007 	   004 			.BYTE	7.,4
	004314	104375 				EMT	375
   1210	004316	103422 				BCS	MNTSY2		; +++001 OOPS -- SEE IF OTHER FLOPPY MOUNT NEEDED
   1211	004320	005765 	000000G			TST	U.VA(R5)	;VOLUME ALREADY MOUNTED?????
   1212	004324	001060 				BNE	REDHOM		;YES-- SKIP THIS
   1213	004326					CALL	FNDACP		;NO-- FIND ACP FOR DEVICE
	004326	004737 	006556'			JSR	PC,FNDACP
   1214	004332	010265 	000000G			MOV	R2,U.ACP(R5)	;AND SET IT FOR MOUNT
   1215	004336	012702 	001110'			MOV	#MNTBLK,R2	;GOT IT-- POINT TO MOUNT
   1216	004342					PUSH	R5		;  +++006 SAVE R5
	004342	010546 				MOV	R5,-(SP)
   1217	004344					CALL	FILMNT		;MOUNT DEVICE
	004344	004737 	006576'			JSR	PC,FILMNT
   1218	004350					POP	R5		; +++006 RESTORE R5
	004350	012605 				MOV	(SP)+,R5
   1219	004352	103014 				BCC	SYMNTD		;MOUNTED
   1220	004354					WARN	<MOUNT "<10>" ERROR "<7>">
	000633	   012 	   115 	   117 		.ASCIZ	""<12>"MOUNT "<10>" ERROR "<7>""<1>""
	000636	   125 	   116 	   124
	000641	   040 	   010 	   040
	000644	   105 	   122 	   122
	000647	   117 	   122 	   040
	000652	   007 	   001 	   000
	004354	012746 	000633'			MOV	#$$$,-(SP)
	004360	004737 	005740'			JSR	PC,TYPMSG
   1221	004364				MNTSY2:
   1222	004364	026527 	000000G	054104 		CMP	U.DN(R5),#"DX	; +++006 MOUNT DX: FAIL??
   1223	004372	001035 				BNE	REDHOM		; +++006 NO -- GO ON
   1224	004374	005737 	000062'			TST	ALTDXF		; +++006 YES -- WAS IT THE BOOT DEVICE??
   1225	004400	001405 				BEQ	SYMNT1		; +++006 YES -- TRY TO MOUNT THE OTHER (AND HOPE...)
   1226	004402	000431 				BR	REDHOM		; +++006 NO -- TRY TO READ HOME BLOCKS
   1227						;
   1228	004404				SYMNTD:
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 19-1
RESTORE -- TYPE SY0: REDIRECT MESSAGE AND MOUNT SY0:

   1229	004404					TYPE	<["<10>" MOUNTED]"<1>">
	000655	   133 	   010 	   040 		.ASCIZ	"["<10>" MOUNTED]"<1>""
	000660	   115 	   117 	   125
	000663	   116 	   124 	   105
	000666	   104 	   135 	   001
	000671	   000
	004404	012746 	000655'			MOV	#$$$,-(SP)
	004410	004737 	005740'			JSR	PC,TYPMSG
   1230	004414				SYMNT1:				; +++006 HERE TO MOUNT "OTHER" FLOPPY
   1231	004414	016500 	000000G			MOV	U.DN(R5),R0	; +++006 DEVICE NAME TO R0
   1232	004420	016501 	000000G			MOV	U.UN(R5),R1	; +++006 DEVICE NUMBER TO R1
   1233	004424	022700 	054104 			CMP	#"DX,R0		; +++006 IS IT A DX??
   1234	004430	001016 				BNE	REDHOM		; +++006 NO -- SEE IF IT HAS HOME BLOCKS
   1235	004432	005101 				COM	R1		; +++006 NO -- FIND THE "OTHER" FLOPPY DEVICE NUMBER
   1236	004434	042701 	177776 			BIC	#^C1,R1		; +++006 EITHER "0" OR "1"
   1237	004440	005237 	000062'			INC	ALTDXF		; +++006 MARK THAT WE LOOKING FOR THE "OTHER" ONE
   1238	004444					CALL	FINDEV		; +++006 FIND ITS "PUD" ENTRY
	004444	004737 	006520'			JSR	PC,FINDEV
   1239	004450	010537 	000040'			MOV	R5,PUDADR	; +++006 SET UP "PUDADR"
   1240	004454	103307 				BCC	MNTSY1		; +++006 ALL OK -- TRY TO MOUNT IT
   1241	004456					WARN	<CANNOT FIND SECOND DX:>
	000672	   012 	   103 	   101 		.ASCIZ	""<12>"CANNOT FIND SECOND DX:"<1>""
	000675	   116 	   116 	   117
	000700	   124 	   040 	   106
	000703	   111 	   116 	   104
	000706	   040 	   123 	   105
	000711	   103 	   117 	   116
	000714	   104 	   040 	   104
	000717	   130 	   072 	   001
	000722	   000
	004456	012746 	000672'			MOV	#$$$,-(SP)
	004462	004737 	005740'			JSR	PC,TYPMSG
   1242					;	BR	REDHOM		;GO READ THE HOM BLOCKS
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 20
RESTORE -- READ HOM BLOCKS ON BOOT DB

   1244						.SBTTL	RESTORE -- READ HOM BLOCKS ON BOOT DB
   1245					;
   1246					; READ HOM BLOCKS FROM DB0 TO SEE IF WE HAVE A FILE SYSTEM ON IT
   1247					;
   1248	004466				REDHOM:
   1249	004466	105737 	000053'			TSTB	RHFLAG		;SHOULD WE READ THE HOM BLOCKS?
   1250	004472	001542 				BEQ	RQSKLR		; +++001 NO-- JUST CHECK KLINIK LINE
   1251	004474	105737 	000054'			TSTB	RNFLAG		;RP NOT READY?
   1252	004500	001113 				BNE	RNRERR		;YES-- COMPLAIN
   1253	004502	105737 	000055'			TSTB	RPFLAG		;RP IN PROGRAMMABLE (A/B) MODE?
   1254	004506	001404 				BEQ	REDHM1		;YES-- GO WORK ON IT
   1255	004510					WARN	<"<10>" NOT IN PROGRAMMABLE (A/B) MODE>
	000723	   012 	   010 	   040 		.ASCIZ	""<12>""<10>" NOT IN PROGRAMMABLE (A/B) MODE"<1>""
	000726	   116 	   117 	   124
	000731	   040 	   111 	   116
	000734	   040 	   120 	   122
	000737	   117 	   107 	   122
	000742	   101 	   115 	   115
	000745	   101 	   102 	   114
	000750	   105 	   040 	   050
	000753	   101 	   057 	   102
	000756	   051 	   040 	   115
	000761	   117 	   104 	   105
	000764	   001 	   000
	004510	012746 	000723'			MOV	#$$$,-(SP)
	004514	004737 	005740'			JSR	PC,TYPMSG
   1256	004520				REDHM1:
   1257	004520	005003 				CLR	R3		;CLEAR COUNT OF # TIMES WE SAW 'HOM'
   1258	004522	012705 	000001 			MOV	#1,R5		;START WITH HOM BLOCK AT LBN 1
   1259	004526				20$:
   1260	004526	012700 	001000 			MOV	#IO.RLB,R0	;DO A READ LOGICAL BLOCK FUNCTION
   1261	004532	012701 	000064'			MOV	#HOMBUF,R1	; TO THE HOM BLOCK BUFFER
   1262	004536	012702 	001000 			MOV	#512.,R2	;ONE BLOCK'S WORTH
   1263	004542	005004 				CLR	R4		;CLEAR LOW-ORDER LBN
   1264	004544					CALL	FILQIO		;DO IT TO THE DB0
	004544	004737 	006612'			JSR	PC,FILQIO
   1265	004550	103462 				BCS	RHMERR		;ERROR-- GO REPORT IT
   1266					;
   1267	004552	022711 	105755 			CMP	#SXBTHM,(R1)	;IS THIS A SIXBIT/HOM/ BLOCK?
   1268	004556	001013 				BNE	30$		;NO-- LOOK NO FARTHER
   1269	004560	005703 				TST	R3		;YES-- ALREADY SEEN A GOOD HOM BLOCK?
   1270	004562	001010 				BNE	29$		;YES-- DON'T USE THIS ONE
   1271					;
   1272	004564	012701 	000370'			MOV	#HOMBUF+<HOMFE0*4>,R1 ;NO-- ADDRESS OUR WORDS IN HOM BLOCK
   1273	004570	012702 	000000G			MOV	#.RPADR,R2	; AND WHERE TO STORE THEM
   1274	004574	012122 				MOV	(R1)+,(R2)+	;(LH HOMFE0) (.RPADR+0) HIGH-ORDER DISK ADDRESS
   1275	004576	012122 				MOV	(R1)+,(R2)+	;(RH HOMFE0) (.RPADR+2) LOW-ORDER DISK ADDRESS
   1276	004600	012122 				MOV	(R1)+,(R2)+	;(LH HOMFE1) (.RPSIZ+0) HIGH-ORDER SIZE
   1277	004602	012122 				MOV	(R1)+,(R2)+	;(RH HOMFE1) (.RPSIZ+2) LOW-ORDER SIZE
   1278	004604				29$:
   1279	004604	005203 				INC	R3		;SAY WE SAW ANOTHER GOOD HOM BLOCK
   1280	004606				30$:
   1281	004606	005305 				DEC	R5		;WERE WE LOOKING AT
   1282	004610	003003 				BGT	40$		; BLOCK #1?
   1283	004612	012705 	000012 			MOV	#10.,R5		;YES-- ALSO TRY BLOCK 10.
   1284	004616	000743 				BR	20$		;BACK TO LOOK AT IT
   1285					;
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 20-1
RESTORE -- READ HOM BLOCKS ON BOOT DB

   1286	004620				40$:
   1287	004620	005303 				DEC	R3		;HOW MANY 'HOM' BLOCKS DID WE SEE?
   1288	004622	002447 				BLT	ALLRXF		;0-- DISK IS ALL OURS
   1289	004624	001412 				BEQ	HBCERR		;1-- CONSISTENCY ERROR
   1290	004626	012705 	000004 			MOV	#4,R5		;2-- TOPS FILE SYSTEM
   1291	004632	012701 	000370'			MOV	#HOMBUF+<HOMFE0*4>,R1 ;POINT TO SECOND HOM BLOCK AREA
   1292	004636	012702 	000000G			MOV	#.RPADR,R2	; AND TO WHAT WE GOT FROM FIRST BLOCK
   1293	004642				50$:
   1294	004642	022122 				CMP	(R1)+,(R2)+	;CHECK FOR CONSISTENCY
   1295	004644	001002 				BNE	HBCERR		;OOPS-- HOM BLOCKS DON'T AGREE
   1296	004646	077503 				SOB	R5,50$		;LOOP FOR ALL FOUR WORDS
   1297	004650	000404 				BR	SETRXF		;CHECKS OUT-- JUST CHECK THE FLAG
   1298					;
   1299	004652				HBCERR:
   1300	004652					WARN	<TOPS HOM BLOCK CONSISTENCY ERROR ON "<10>">
	000766	   012 	   124 	   117 		.ASCIZ	""<12>"TOPS HOM BLOCK CONSISTENCY ERROR ON "<10>""<1>""
	000771	   120 	   123 	   040
	000774	   110 	   117 	   115
	000777	   040 	   102 	   114
	001002	   117 	   103 	   113
	001005	   040 	   103 	   117
	001010	   116 	   123 	   111
	001013	   123 	   124 	   105
	001016	   116 	   103 	   131
	001021	   040 	   105 	   122
	001024	   122 	   117 	   122
	001027	   040 	   117 	   116
	001032	   040 	   010 	   001
	001035	   000
	004652	012746 	000766'			MOV	#$$$,-(SP)
	004656	004737 	005740'			JSR	PC,TYPMSG
   1301					;	BR	SETRXF		;USE GOOD (OR FIRST) HOM BLOCK
   1302					;
   1303	004662				SETRXF:
   1304	004662	005737 	000000G			TST	.RPADR+0	;IS BIT 2 OF HOMFE0 (BIT 15 OF .RPADR+0) SET?
   1305	004666	100442 				BMI	SOMRXF		;YES-- JUST CLEAR THE FLAG
   1306	004670					WARN	<NO RSX-20F FILE SYSTEM ON "<10>">
	001036	   012 	   116 	   117 		.ASCIZ	""<12>"NO RSX-20F FILE SYSTEM ON "<10>""<1>""
	001041	   040 	   122 	   123
	001044	   130 	   055 	   062
	001047	   060 	   106 	   040
	001052	   106 	   111 	   114
	001055	   105 	   040 	   123
	001060	   131 	   123 	   124
	001063	   105 	   115 	   040
	001066	   117 	   116 	   040
	001071	   010 	   001 	   000
	004670	012746 	001036'			MOV	#$$$,-(SP)
	004674	004737 	005740'			JSR	PC,TYPMSG
   1307	004700				NOTRXF:
   1308	004700	012703 	000000G			MOV	#.RPADR,R3	;POINT TO AREA
   1309	004704	005023 				CLR	(R3)+		;CLEAR
   1310	004706	005023 				CLR	(R3)+		; ALL
   1311	004710	005023 				CLR	(R3)+		; FOUR
   1312	004712	005023 				CLR	(R3)+		; WORDS
   1313	004714	000431 				BR	RQSKLR		; +++001 ALL DONE
   1314					;
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 20-2
RESTORE -- READ HOM BLOCKS ON BOOT DB

   1315	004716				RHMERR:
   1316	004716					WARN	<TOPS HOM BLOCK READ ERROR "<7>" ON "<10>">
	001074	   012 	   124 	   117 		.ASCIZ	""<12>"TOPS HOM BLOCK READ ERROR "<7>" ON "<10>""<1>""
	001077	   120 	   123 	   040
	001102	   110 	   117 	   115
	001105	   040 	   102 	   114
	001110	   117 	   103 	   113
	001113	   040 	   122 	   105
	001116	   101 	   104 	   040
	001121	   105 	   122 	   122
	001124	   117 	   122 	   040
	001127	   007 	   040 	   117
	001132	   116 	   040 	   010
	001135	   001 	   000
	004716	012746 	001074'			MOV	#$$$,-(SP)
	004722	004737 	005740'			JSR	PC,TYPMSG
   1317	004726	000411 				BR	ALLRX1		;ASSUME ALL OF DISK
   1318					;
   1319	004730				RNRERR:
   1320	004730					WARN	<"<10>" NOT READY>
	001137	   012 	   010 	   040 		.ASCIZ	""<12>""<10>" NOT READY"<1>""
	001142	   116 	   117 	   124
	001145	   040 	   122 	   105
	001150	   101 	   104 	   131
	001153	   001 	   000
	004730	012746 	001137'			MOV	#$$$,-(SP)
	004734	004737 	005740'			JSR	PC,TYPMSG
   1321	004740	000417 				BR	RQSKLR		; +++001 LEAVE ADDR/SIZE ALONE
   1322					;
   1323	004742				ALLRXF:
   1324	004742					WARN	<NO TOPS FILE SYSTEM ON "<10>">
	001155	   012 	   116 	   117 		.ASCIZ	""<12>"NO TOPS FILE SYSTEM ON "<10>""<1>""
	001160	   040 	   124 	   117
	001163	   120 	   123 	   040
	001166	   106 	   111 	   114
	001171	   105 	   040 	   123
	001174	   131 	   123 	   124
	001177	   105 	   115 	   040
	001202	   117 	   116 	   040
	001205	   010 	   001 	   000
	004742	012746 	001155'			MOV	#$$$,-(SP)
	004746	004737 	005740'			JSR	PC,TYPMSG
   1325	004752				ALLRX1:
   1326	004752	012703 	000000G			MOV	#.RPADR,R3	;ADDRESS WORDS TO SET
   1327	004756	005023 				CLR	(R3)+		;HIGH ADDRESS:0
   1328	004760	012723 	000001 			MOV	#1,(R3)+	;LOW ADDRESS: BLOCK 1
   1329	004764	012723 	000177 			MOV	#177,(R3)+	;HIGH SIZE: MAX TO 24 BITS
   1330	004770	012723 	177777 			MOV	#-1,(R3)+	; LOW SIZE: MAX ALSO
   1331	004774				SOMRXF:
   1332	004774	105037 	000001G			CLRB	.RPADR+1	;CLEAR HIGH BYTE OF HIGH ADDRESS
   1333					;	BR	RQSKLR		; +++001 GO CHECK KLINIK LINE
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 21
RESTORE -- CKECK STATE OF KLINIK LINE

   1335						.SBTTL	RESTORE -- CKECK STATE OF KLINIK LINE
   1336					;
   1337					;	CHECK STATE OF KLINIK LINE
   1338					;
   1339	005000				RQSKLR:
   1340	005000					CLEF$S	#E.FTMO		; +++001 RESET TIMEOUT FLAG
	005000	012746 	000002 			MOV	#E.FTMO,-(SP)
	005004	012746 				MOV	(PC)+,-(SP)
	005006	   037 	   002 			.BYTE	31.,2
	005010	104375 				EMT	375
   1341	005012	013705 	000000G			MOV	KLNPTR,R5	; +++001 KLINIK LINE BLOCK POINTER TO R5
   1342	005016	016504 	000000G			MOV	TTYEXP(R5),R4	; +++001 I/O PAGE ADDRESS TO R4
   1343	005022	012703 	000055 			MOV	#^D45,R3	; +++001 SET UP?? COUNTER
   1344	005026	013700 	000000G			MOV	.BTPRM,R0	; +++001 BOOT PARAMETERS TO R0
   1345	005032	042700 	177771 			BIC	#^C<BP.LD1!BP.LD0>,R0 ; +++001 JUST WHAT WE WANT
   1346	005036				10$:
   1347	005036	032714 	000000G			BIT	#DL.CAR,(R4)	; +++001 IS CARRIER UP
   1348	005042	001006 				BNE	20$		; +++001 YES -- GO ON
   1349	005044	032765 	000000C	000000G		BIT	#<TT.CRW!TT.RIP>,STSW1(R5) ; +++001 NO -- IN CARRIER WAIT??
   1350	005052	001577 				BEQ	RQSTSK		; +++001 NO -- OH WELL....
   1351	005054	005203 				INC	R3		; +++001 YES -- TAKE THIS TICK BACK
   1352	005056	000413 				BR	30$		; +++001 WAIT A BIT MORE
   1353						;
   1354	005060				20$:
   1355	005060	022700 	000004 			CMP	#BP.LD1,R0	; +++001 CAN PROTOCOLS RUN??
   1356	005064	001034 				BNE	35$		; +++001 NO -- SO DON'T EVEN BOTHER
   1357	005066	032737 	000000C	000002G		BIT	#<EF.PR1!EF.PR2>,.COMEF+2
   1358	005074	001561 				BEQ	PRNRUN		; +++001 PROTOCOL STOPPED -- JUST GO AWAY
   1359	005076	032737 	000000G	000002G		BIT	#EF.RKP,.COMEF+2 ; +++001 DID WE GET KLINIK PARAMETERS??
   1360	005104	001024 				BNE	35$		; +++001 YES -- GO ON
   1361	005106				30$:
   1362	005106					MRKT$S	#E.FTMO,#60.	; +++001 WAIT A BIT
	005106	005046 				CLR	-(SP)
	005110	005046 				CLR	-(SP)
	005112	012746 	000074 			MOV	#60.,-(SP)
	005116	012746 	000002 			MOV	#E.FTMO,-(SP)
	005122	012746 				MOV	(PC)+,-(SP)
	005124	   027 	   005 			.BYTE	23.,5
	005126	104375 				EMT	375
   1363	005130					WTSE$S	#E.FTMO		; +++001 WAIT FOR IT
	005130	012746 	000002 			MOV	#E.FTMO,-(SP)
	005134	012746 				MOV	(PC)+,-(SP)
	005136	   051 	   002 			.BYTE	41.,2
	005140	104375 				EMT	375
   1364	005142					CLEF$S	#E.FTMO		; +++001 CLEAR THE FLAG
	005142	012746 	000002 			MOV	#E.FTMO,-(SP)
	005146	012746 				MOV	(PC)+,-(SP)
	005150	   037 	   002 			.BYTE	31.,2
	005152	104375 				EMT	375
   1365	005154	077350 				SOB	R3,10$		; +++001 LOOP TILL DONE
   1366	005156				35$:
   1367	005156					.INH6			; +++001 DISALLOW INTERRRUPTS
	005156	013746 	177776 			MOV	@#PS,-(SP)
	005162	112737 	000300 	177776 		MOVB	#300,@#PS
   1368	005170	032737 	000000G	000002G		BIT	#EF.RKP,.COMEF+2 ;;; +++001 DID WE GET KLINIK PARAMETERS??
   1369	005176	001413 				BEQ	50$		;;; +++001 NO -- DO DEFAULT
   1370	005200	105737 	000000G			TSTB	.KLNMD+0	;;; +++001 YES -- DO WE HAVE PARAMETERS??
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 21-1
RESTORE -- CKECK STATE OF KLINIK LINE

   1371	005204	001410 				BEQ	50$		;;; +++001 NO -- DO DEFAULT
   1372	005206				40$:
   1373	005206	113737 	000000G	000000G		MOVB	.KLNMD+0,.KLNSW+0 ;;; +++001 SET THE KLINIK MODE
   1374	005214	003410 				BLE	60$		;;; +++001 EXIT IF USER
   1375	005216	113737 	000001G	000000G		MOVB	.KLNMD+1,.FEMOD	;;; +++001 SET THE CONSOLE MODE
   1376	005224	000404 				BR	60$		;;; +++001 GO TO COMMON EXIT
   1377						;
   1378	005226				50$:
   1379	005226	012737 	003401 	000000G		MOV	#3401,.KLNMD	;;; +++001 SET DEFAULT KLINIK PARAMETERS
   1380	005234	000764 				BR	40$		;;; +++001 SET OTHER PARAMETERS AND EXIT
   1381						;
   1382	005236				60$:
   1383	005236	042765 	000000G	000000G		BIC	#TT.OUT,STSW1(R5)
   1384	005244	105737 	000000G			TSTB	.KLNMD+0	;;; +++001 WHICH MODE??
   1385	005250	002404 				BLT	70$		;;; +++001 GO DO USER STUFF
   1386	005252	052765 	000000G	000000G		BIS	#TT.CTY,STSW1(R5) ;;; +++001 REMOTE -- DECLARE CTY
   1387	005260	000403 				BR	80$		;;; +++001 AND GO ON
   1388						;
   1389	005262				70$:
   1390	005262	042765 	000000G	000000G		BIC	#TT.CTY,STSW1(R5) ;;; +++001 CLEAR CTY BIT
   1391	005270				80$:
   1392	005270					.ENB6			;;; +++001 ALLOW INTERRUPTS
	005270	012637 	177776 			MOV	(SP)+,@#PS
   1393	005274	105737 	000000G			TSTB	.KLNMD+0	; +++001 CHECK MODE
   1394	005300	002411 				BLT	KLAUSR		; +++001 USER -- GO ON
   1395	005302					WARN	<KLINIK LINE ACTIVE IN REMOTE MODE>
	001210	   012 	   113 	   114 		.ASCIZ	""<12>"KLINIK LINE ACTIVE IN REMOTE MODE"<1>""
	001213	   111 	   116 	   111
	001216	   113 	   040 	   114
	001221	   111 	   116 	   105
	001224	   040 	   101 	   103
	001227	   124 	   111 	   126
	001232	   105 	   040 	   111
	001235	   116 	   040 	   122
	001240	   105 	   115 	   117
	001243	   124 	   105 	   040
	001246	   115 	   117 	   104
	001251	   105 	   001 	   000
	005302	012746 	001210'			MOV	#$$$,-(SP)
	005306	004737 	005740'			JSR	PC,TYPMSG
   1396	005312					WARN	<KLINIK LINE CONNECTED TO SYSTEM CONSOLE>
	001254	   012 	   113 	   114 		.ASCIZ	""<12>"KLINIK LINE CONNECTED TO SYSTEM CONSOLE"<1>""
	001257	   111 	   116 	   111
	001262	   113 	   040 	   114
	001265	   111 	   116 	   105
	001270	   040 	   103 	   117
	001273	   116 	   116 	   105
	001276	   103 	   124 	   105
	001301	   104 	   040 	   124
	001304	   117 	   040 	   123
	001307	   131 	   123 	   124
	001312	   105 	   115 	   040
	001315	   103 	   117 	   116
	001320	   123 	   117 	   114
	001323	   105 	   001 	   000
	005312	012746 	001254'			MOV	#$$$,-(SP)
	005316	004737 	005740'			JSR	PC,TYPMSG
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 21-2
RESTORE -- CKECK STATE OF KLINIK LINE

   1397	005322	000404 				BR	KLAREM		; +++001 EXIT THIS ROUTINE
   1398						;
   1399	005324				KLAUSR:
   1400	005324					WARN	<KLINIK LINE ACTIVE IN USER MODE>
	001326	   012 	   113 	   114 		.ASCIZ	""<12>"KLINIK LINE ACTIVE IN USER MODE"<1>""
	001331	   111 	   116 	   111
	001334	   113 	   040 	   114
	001337	   111 	   116 	   105
	001342	   040 	   101 	   103
	001345	   124 	   111 	   126
	001350	   105 	   040 	   111
	001353	   116 	   040 	   125
	001356	   123 	   105 	   122
	001361	   040 	   115 	   117
	001364	   104 	   105 	   001
	001367	   000
	005324	012746 	001326'			MOV	#$$$,-(SP)
	005330	004737 	005740'			JSR	PC,TYPMSG
   1401	005334				KLAREM:
   1402	005334	032737 	000000G	000002G		BIT	#EF.PR1,.COMEF+2 ; +++004 AN WE LOG THIS??
   1403	005342	001443 				BEQ	RQSTSK		; +++004 NO -- GO ON
   1404	005344	012700 	001070'			MOV	#LOGBUF,R0	; +++004 YES -- BUFFER POINTER TO R0
   1405	005350	113701 	000000G			MOVB	.KLNMD+0,R1	; +++004 KLINIK MODE TO R1
   1406	005354	002406 				BLT	10$		; +++004 USER -- GO ON
   1407	005356	113701 	000001G			MOVB	.KLNMD+1,R1	; +++004 REMOTE -- GET CONSOLE MODE
   1408	005362	006201 				ASR	R1		; +++004 COMPUTE THE CODE
   1409	005364	005201 				INC	R1		; +++004
   1410	005366	006201 				ASR	R1		; +++004
   1411	005370	005201 				INC	R1		; +++004
   1412	005372				10$:
   1413	005372	110160 	000005 			MOVB	R1,5(R0)	; +++004 SET THE MODE
   1414	005376	112760 	000000G	000004 		MOVB	#K.LRBA,4(R0)	; +++004 SET THE LOG CODE
   1415	005404	012701 	100000G			MOV	#BC.HDS+100000,R1 ; +++004 FUNCTION CODE TO R1
   1416	005410	012702 	000004 			MOV	#E.FLOG,R2	; +++004 EVENT FLAG TO R2
   1417	005414	012703 	000000G			MOV	#D.CKLN,R3	; +++004 DEVICE CODE TO R3
   1418	005420					CALL	..STIN		; +++004 LOG IT
	005420	004737 	000000G			JSR	PC,..STIN
   1419	005424					WTSE$S	#E.FLOG		; +++004 WAIT FOR IT
	005424	012746 	000004 			MOV	#E.FLOG,-(SP)
	005430	012746 				MOV	(PC)+,-(SP)
	005432	   051 	   002 			.BYTE	41.,2
	005434	104375 				EMT	375
   1420	005436	000405 				BR	RQSTSK		; +++001 EXIT THIS ROUTINE
   1421						;
   1422	005440				PRNRUN:
   1423	005440					ERROR	<PROTOCOLS NOT RUNNING>
	001370	   011 	   120 	   122 		.ASCIZ	""<11>"PROTOCOLS NOT RUNNING"<5>""
	001373	   117 	   124 	   117
	001376	   103 	   117 	   114
	001401	   123 	   040 	   116
	001404	   117 	   124 	   040
	001407	   122 	   125 	   116
	001412	   116 	   111 	   116
	001415	   107 	   005 	   000
	005440	012746 	001370'			MOV	#$$$,-(SP)
	005444	004737 	005740'			JSR	PC,TYPMSG
   1424	005450	000452 				BR	EXIT		; +++001 GO AWAY
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 21-3
RESTORE -- CKECK STATE OF KLINIK LINE

   1425						;
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 22
RESTORE -- REQUEST KL INITIALIZATION TASK AND/OR EXIT

   1427						.SBTTL	RESTORE -- REQUEST KL INITIALIZATION TASK AND/OR EXIT
   1428					;
   1429					; REQUEST KL SYSTEM INITIALIZATION TASK IF LOAD FLAGS FROM BOOT = 00 OR 11
   1430					;
   1431	005452				RQSTSK:
   1432	005452	012701 	001120'			MOV	#KLINIT,R1	;ADDRESS OF .RAD50/...KLI/
   1433	005456	013700 	000000G			MOV	.BTPRM,R0	;GET LOAD FLAGS
   1434	005462	012702 	000000C			MOV	#KL.DEF!KL.LRM!KL.LCA!KL.CFM!KL.LVB,R2 ;DEFAULT TO DEFAULT
   1435	005466	032700 	000001 			BIT	#BP.SWR,R0	;FROM SWR BUTTON?
   1436	005472	001002 				BNE	10$		;YES-- OK
   1437	005474	052702 	000000G			BIS	#KL.VBN,R2	;NO-- VBOOT DOESN'T PROMPT
   1438	005500				10$:
   1439	005500	042700 	177771 			BIC	#^C<BP.LD1!BP.LD0>,R0 ;LOAD FLAGS= 00?
   1440	005504	001404 				BEQ	50$		;YES-- REQUEST SYSTEM INITIALIZATION
   1441	005506	022700 	000006 			CMP	#<BP.LD1!BP.LD0>,R0 ;LOAD FLAGS= 11?
   1442	005512	001024 				BNE	EXIT00		;NO-- JUST EXIT
   1443	005514	005002 				CLR	R2		;SET KLI TO ASK DIALOG
   1444	005516				50$:
   1445	005516	010237 	000000G			MOV	R2,.KLIWD	;SET FLAGS TO ...KLI
   1446	005522					RQST$S	R1		;REQUEST TASK
	005522	005046 				CLR	-(SP)
	005524	005046 				CLR	-(SP)
	005526	005046 				CLR	-(SP)
	005530	005046 				CLR	-(SP)
	005532	016146 	000002 			MOV	2(R1),-(SP)
	005536	011146 				MOV	(R1),-(SP)
	005540	012746 				MOV	(PC)+,-(SP)
	005542	   013 	   007 			.BYTE	11.,7
	005544	104375 				EMT	375
   1447	005546	103006 				BCC	EXIT00		;SUCCESS-- JUST LEAVE
   1448	005550	013700 	000000G			MOV	$DSW,R0		;GET THE ERROR CODE
   1449	005554					WARN	<KLI TASK REQUEST ERROR "<7>">
	001420	   012 	   113 	   114 		.ASCIZ	""<12>"KLI TASK REQUEST ERROR "<7>""<1>""
	001423	   111 	   040 	   124
	001426	   101 	   123 	   113
	001431	   040 	   122 	   105
	001434	   121 	   125 	   105
	001437	   123 	   124 	   040
	001442	   105 	   122 	   122
	001445	   117 	   122 	   040
	001450	   007 	   001 	   000
	005554	012746 	001420'			MOV	#$$$,-(SP)
	005560	004737 	005740'			JSR	PC,TYPMSG
   1450	005564				EXIT00:
   1451	005564	105737 	000050'			TSTB	EXFLAG		;SHOULD WE EXIT (/EX)
   1452	005570	001002 				BNE	EXIT		;YES-- DO SO
   1453	005572	000137 	001170'			JMP	SAVE		;NO-- GO BACK TO SAVE
   1454					;
   1455					; ALL DONE-- DO A TASK EXIT, SYSTEM BACK TO STATE BEFORE SAVE
   1456					;
   1457	005576				EXIT:
   1458	005576					EXIT$S			;TASK EXIT
	005576	012746 				MOV	(PC)+,-(SP)
	005600	   063 	   001 			.BYTE	51.,1
	005602	104375 				EMT	375
   1459	005604	000774 				BR	EXIT		;JUST IN CASE . . .
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 23
COMMAND PARSER ROUTINES

   1461						.SBTTL	COMMAND PARSER ROUTINES
   1462					;
   1463					; GENERAL NOTES:
   1464					;
   1465					; R4 IS ALWAYS USED AS A POINTER TO THE COMMAND STRING.  ON CALL,
   1466					; IT POINTS TO THE NEXT CHARACTER TO BE PROCESSED.  ON RETURN, R4
   1467					; ALWAYS POINTS TO THE CHARACTER AFTER THE LAST ONE PROCESSED, I.E.
   1468					; THE NEXT ONE TO BE PROCESSED.
   1469					;
   1470					; NOTE THAT END-OF-LINE IS A ZERO BYTE
   1471					;
   1472					;
   1473					; GETNB -- GET NEXT NON-BLANK CHARACTER
   1474					;
   1475					; RETURNS WITH R4 POINTING TO THE NEXT NON-BLANK CHARACTER
   1476					;	R0 --	NON-BLANK CHARACTER
   1477					;	CC-Z SET IF END-OF-LINE
   1478					;
   1479	005606				GETNB:
   1480	005606	112400 				MOVB	(R4)+,R0	;GET A CHARACTER
   1481	005610	122700 	000040 			CMPB	#' ,R0		;THIS BLANK?
   1482	005614	001774 				BEQ	GETNB		;YES-- LOOK SOME MORE
   1483	005616	122700 	000011 			CMPB	#'	,R0	;OR A TAB?
   1484	005622	001771 				BEQ	GETNB		;YES-- LOOK SOME MORE
   1485	005624				10$:
   1486	005624	105744 				TSTB	-(R4)		;NON-BLANK-- BACK OVER IT (MAY BE EOL)
   1487	005626					RETURN			; FROM GETNB
	005626	000207 				RTS	PC
   1488					;
   1489					; GETNAM -- GET TWO-CHARACTER ALPHABETIC NAME
   1490					;
   1491					; RETURNS AFTER TWO CHARCTERS OR NON-ALPHABETIC
   1492					;	R0 --	(LOW) FIRST CHARACTER (HIGH) SECOND CHARACTER
   1493					;	CC-C SET IF MORE THAN TWO CHARACTERS
   1494					;
   1495	005630				GETNAM:
   1496	005630	005000 				CLR	R0		;CLEAR ANSWER
   1497	005632				10$:
   1498	005632	122714 	000101 			CMPB	#'A,(R4)	;BELOW A?
   1499	005636	101015 				BHI	50$		;YES-- RETURN CC-C CLEAR
   1500	005640	121427 	000132 			CMPB	(R4),#'Z	;OR ABOVE Z?
   1501	005644	101012 				BHI	50$		;YES-- RETURN CC-C CLEAR
   1502	005646	005700 				TST	R0		;GOT A BYTE YET?
   1503	005650	001002 				BNE	20$		;YES-- STORE SECOND BYTE
   1504	005652	112400 				MOVB	(R4)+,R0	;NO-- GET LOW BYTE
   1505	005654	000766 				BR	10$		;LOOP FOR NEXT CHARACTER
   1506					;
   1507	005656				20$:
   1508	005656	000300 				SWAB	R0		;GET HIGH BYTE
   1509	005660	001003 				BNE	40$		;ALREADY THERE-- ERROR
   1510	005662	152400 				BISB	(R4)+,R0	;OK-- SET SECOND CHARACTER
   1511	005664	000300 				SWAB	R0		;RESTORE R0 TO PROPER ORIENTATION
   1512	005666	000761 				BR	10$		;LOOP FOR ANOTHER (?)
   1513					;
   1514	005670				40$:
   1515	005670	000261 				SEC			;ERROR
   1516	005672				50$:
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 23-1
COMMAND PARSER ROUTINES

   1517	005672					RETURN			; FROM GETNAM
	005672	000207 				RTS	PC
   1518					;
   1519					; GETNUM -- GET OCTAL NUMBER
   1520					;
   1521					; RETURNS WITH NON-DIGIT OR IF MORE THAN A BYTE'S WORTH
   1522					;	R0 --	(LOW) NUMBER
   1523					;	CC-C SET IF LARGER THAN ONE BYTE
   1524					;
   1525	005674				GETNUM:
   1526	005674	005000 				CLR	R0		;CLEAR RESULT
   1527	005676				10$:
   1528	005676	112401 				MOVB	(R4)+,R1	;GET A DIGIT
   1529	005700	162701 	000060 			SUB	#'0,R1		;TRIM DOWN TO DIGIT
   1530	005704	103413 				BLO	40$		;NOT A DIGIT-- GIVE UP
   1531	005706	022701 	000007 			CMP	#7,R1		;TOO HIGH?
   1532	005712	103410 				BLO	40$		;YES-- GIVE UP WITH CC-C CLEAR
   1533		000003 			.REPT 3
   1534						ASLB	R0		;SHIFT OLD NUMBER A BIT
   1535						BCS	50$		;CARRY OUT-- NUMBER TOO BIG-- CC-C SET
   1536					.ENDR
	005714	106300 				ASLB	R0		;SHIFT OLD NUMBER A BIT
	005716	103407 				BCS	50$		;CARRY OUT-- NUMBER TOO BIG-- CC-C SET
	005720	106300 				ASLB	R0		;SHIFT OLD NUMBER A BIT
	005722	103405 				BCS	50$		;CARRY OUT-- NUMBER TOO BIG-- CC-C SET
	005724	106300 				ASLB	R0		;SHIFT OLD NUMBER A BIT
	005726	103403 				BCS	50$		;CARRY OUT-- NUMBER TOO BIG-- CC-C SET
   1537	005730	060100 				ADD	R1,R0		;ACCUMULATE THIS DIGIT
   1538	005732	000761 				BR	10$		;FETCH ANOTHER DIGIT
   1539					;
   1540	005734				40$:
   1541	005734	105744 				TSTB	-(R4)		;BACK OVER BAD CHARACTER
   1542	005736				50$:
   1543	005736					RETURN			;FROM GETNUM
	005736	000207 				RTS	PC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 24
TYPEOUT ROUTINES

   1545						.SBTTL	TYPEOUT ROUTINES
   1546					;
   1547					; TYPMSG -- TYPE A RANDOM ASCIZ STRING
   1548					;
   1549					; CALL:
   1550					;	PUSH	#<ADDRESS OF ASCIZ STRING>
   1551					;	CALL	TYPMSG
   1552					;
   1553					; SPECIAL CHARACTER CODES IN TEXT:
   1554					;	0 --	END OF TEXT
   1555					;	1 --	TYPE <CR><LF>
   1556					;	2 --	TYPE TWO CHARACTERS FROM R0 (SAVED ON STACK)
   1557					;	3 --	TYPE DEVICE NAME AND UNIT FROM PUD ENTRY (R5)
   1558					;	4 --	TYPE ASCIZ STRING BY R0
   1559					;	5 --	TYPE <CR><LF> AND RETURN TO SAVE
   1560					;	6 --	TYPE SYSTEM DATE
   1561					;	7 --	DECIMAL NUMBER IN R0 (SAVED ON STACK)
   1562					;	10 --	DEVICE NAME AND UNIT FROM PUD ENTRY IN PUDADR
   1563					;	11 --	FATAL ERROR PREFIX
   1564					;	12 --	DIAGNOSTIC ERROR PREFIX
   1565					;
   1566	005740				TYPMSG:
   1567	005740					PUSH	<R3,R2,R1,R0> ;SAVE USED REGISTERS
	005740	010346 				MOV	R3,-(SP)
	005742	010246 				MOV	R2,-(SP)
	005744	010146 				MOV	R1,-(SP)
	005746	010046 				MOV	R0,-(SP)
   1568	005750	016600 	000012 			MOV	12(SP),R0	;GET ADDRESS OF STRING
   1569	005754	012702 	000064'			MOV	#TYPBUF,R2	;POINT TO OUTPUT BUFFER
   1570					;
   1571					; ENTER HERE AT TYPMS1:
   1572					;	R0 --	POINTER TO STRING TO BE OUTPUT (AND FOLLOWING CODE)
   1573					;	R2 --	CURRENT POINTER TO OUTPUT BUFFER FOR LOADING CHARACTERS
   1574					;
   1575	005760				TYPMS1:
   1576	005760	112012 				MOVB	(R0)+,(R2)	;GET A CHARACTER FROM STRING
   1577	005762	122227 	000013 			CMPB	(R2)+,#TYPMAX	;SPECIAL CODE?
   1578	005766	103374 				BHIS	TYPMS1		;NO-- JUST GET NEXT CHARACTER
   1579	005770	114203 				MOVB	-(R2),R3	;YES-- GET THE CODE
   1580	005772	006303 				ASL	R3		;MAKE IT WORDS
   1581	005774	011601 				MOV	(SP),R1		;GET R0 FROM STACK BACK TO R1
   1582	005776					CALL	@TYPTAB(R3)	;CALL ROUTINE TO PROCESS
	005776	004773 	006004'			JSR	PC,@TYPTAB(R3)
   1583	006002	000766 				BR	TYPMS1		;BACK FOR MORE
   1584					;
   1585					; DISPATCH TABLE FOR SPECIAL CODES
   1586					;
   1587	006004				TYPTAB:
   1588	006004	006032'	006124'	006130'		.WORD	TYPDON,TYPCR,TYPTXT,TYPDEV,TYPSTR,TYPSAV,TYPDAT,TYPDEC,TYPSDV,TYPERR,TYPWRN
	006012	006146'	006214'	006116'
	006020	006224'	006342'	006142'
	006026	006202'	006210'
   1589		000013 			TYPMAX=<.-TYPTAB>/2
   1590					;
   1591					; 0 -- END OF MESSAGE
   1592					;
   1593	006032				TYPDON:
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 24-1
TYPEOUT ROUTINES

   1594	006032	005726 				TST	(SP)+		;POP THE RETURN ADDRESS OFF TO NOWHERE
   1595	006034	162702 	000064'			SUB	#TYPBUF,R2	;END OF STRING-- FIND LENGTH
   1596	006040					QIOW$S	#IO.WLB,#CTYLUN,#E.FQIO,,,,<#TYPBUF,R2,#0> ;TYPE STRING ON CTY
	006040	005046 				CLR	-(SP)
	006042	010246 				MOV	R2,-(SP)
	006044	012746 	000064'			MOV	#TYPBUF,-(SP)
	006050	005046 				CLR	-(SP)
	006052	005046 				CLR	-(SP)
	006054	005046 				CLR	-(SP)
	006056	112716 	000001 			MOVB	#E.FQIO,(SP)
	006062	012746 	000001 			MOV	#CTYLUN,-(SP)
	006066	012746 	000400 			MOV	#IO.WLB,-(SP)
	006072	012746 				MOV	(PC)+,-(SP)
	006074	   003 	   011 			.BYTE	3,$$$T1
	006076	104375 				EMT	375
   1597	006100	103636 				BCS	EXIT		;GIVE UP IF FAILURE
   1598	006102					POP	<R0,R1,R2,R3> ;RESTORE REGISTERS
	006102	012600 				MOV	(SP)+,R0
	006104	012601 				MOV	(SP)+,R1
	006106	012602 				MOV	(SP)+,R2
	006110	012603 				MOV	(SP)+,R3
   1599	006112					POP	(SP)		;RESTORE PC OVER ADDRESS OF STRING
	006112	012616 				MOV	(SP)+,(SP)
   1600	006114					RETURN			;FROM TYPMSG
	006114	000207 				RTS	PC
   1601					;
   1602					; 5 -- TYPE <CR><LF> AND RETURN TO SAVE
   1603					;
   1604	006116				TYPSAV:
   1605	006116	012766 	001170'	000012 		MOV	#SAVE,12(SP)	;SET RETURN PC TO GO BACK TO SAVE
   1606					;	BR	TYPCR		;FINISH OFF WITH <CR><LF>
   1607					;
   1608					; 1 -- TYPE CRLF
   1609					;
   1610	006124				TYPCR:
   1611	006124	012701 				MOV	(PC)+,R1	;GET <CR> AND <LF>
   1612	006126	   015 	   012 			.BYTE	15,12		; . .
   1613					;	BR	TYPTXT		;TYPE WHAT'S IN R1
   1614					;
   1615					; 2 -- TYPE TEXT IN R0 (SAVED ON STACK)
   1616					;
   1617	006130				TYPTXT:
   1618	006130	110122 				MOVB	R1,(R2)+	;STORE LOW BYTE FIRST
   1619	006132	000301 				SWAB	R1		;GET HIGH BYTE
   1620	006134	001401 				BEQ	90$		;NULL-- IGNORE IT
   1621	006136	110122 				MOVB	R1,(R2)+	;STORE SECOND CHARACTER
   1622	006140				90$:
   1623	006140					RETURN			; FROM TYPTXT
	006140	000207 				RTS	PC
   1624					;
   1625					; 10 -- DEVICE NAME AND UNIT FROM PUDADR
   1626					;
   1627	006142				TYPSDV:
   1628	006142	013705 	000040'			MOV	PUDADR,R5	;GET THE PUD ADDRESS
   1629					;	BR	TYPDEV		;AND TYPE IT
   1630					;
   1631					; 3 -- DEVICE AND UNIT # FROM PUD (R5)
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 24-2
TYPEOUT ROUTINES

   1632					;
   1633	006146				TYPDEV:
   1634	006146	016501 	000000G			MOV	U.DN(R5),R1	;GET THE NAME
   1635	006152					CALL	TYPTXT		;TYPE THE NAME
	006152	004737 	006130'			JSR	PC,TYPTXT
   1636	006156	012737 	000010 	000016'		MOV	#8.,RADIX	;SET TO OCTAL
   1637	006164	116501 	000000G			MOVB	U.UN(R5),R1	;GET THE UNIT
   1638	006170					CALL	TYPNUM		;TYPE THE NUMBER
	006170	004737 	006442'			JSR	PC,TYPNUM
   1639	006174	112722 	000072 			MOVB	#':,(R2)+	;MAKE IT A DEVICE
   1640	006200					RETURN			;BACK FOR MORE
	006200	000207 				RTS	PC
   1641					;
   1642					; 11 -- FATAL ERROR PREFIX
   1643					;
   1644	006202				TYPERR:
   1645	006202	012701 	001453'			MOV	#ERRMSG,R1	;GET ERROR STRING
   1646	006206	000402 				BR	TYPSTR		;PUT THE STRING
   1647					;
   1648	001453					.PSECT	TEXT
   1649	001453	   123 	   101 	   126 	ERRMSG:	.ASCIZ	\SAV -- *FATAL* -- \
	001456	   040 	   055 	   055
	001461	   040 	   052 	   106
	001464	   101 	   124 	   101
	001467	   114 	   052 	   040
	001472	   055 	   055 	   040
	001475	   000
   1650	006210					.PSECT
   1651					;
   1652					; 12 -- WARNING ERROR PREFIX
   1653					;
   1654	006210				TYPWRN:
   1655	006210	012701 	001476'			MOV	#WRNMSG,R1	;GET WARNING PREFIX
   1656					;	BR	TYPSTR		; . .
   1657					;
   1658	001476					.PSECT	TEXT
   1659	001476	   123 	   101 	   126 	WRNMSG:	.ASCIZ	\SAV -- *DIAG* -- \
	001501	   040 	   055 	   055
	001504	   040 	   052 	   104
	001507	   111 	   101 	   107
	001512	   052 	   040 	   055
	001515	   055 	   040 	   000
   1660	006214					.PSECT
   1661					;
   1662					; 4 -- STRING FROM R1
   1663					;
   1664	006214				TYPSTR:
   1665	006214	112122 				MOVB	(R1)+,(R2)+	;MOVE A CHARACTER
   1666	006216	001376 				BNE	TYPSTR		;LOOP TILL END OF COMMAND
   1667	006220	105742 				TSTB	-(R2)		;BACK OVER NULL BYTE
   1668	006222					RETURN			;BACK FOR MORE
	006222	000207 				RTS	PC
   1669					;
   1670					; 6 -- TYPE SYSTEM DATE
   1671					;
   1672	006224				TYPDAT:
   1673	006224	012737 	000012 	000016'		MOV	#10.,RADIX	;ALL UNDER DECIMAL RADIX
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 24-3
TYPEOUT ROUTINES

   1674	006232	113701 	000026'			MOVB	GTIMBF+G.TIHR,R1 ;GET THE HOUR
   1675	006236					CALL	TYPNUM		;TYPE HOURS
	006236	004737 	006442'			JSR	PC,TYPNUM
   1676	006242	112722 	000072 			MOVB	#':,(R2)+	;SEPERATE . . .
   1677	006246	113701 	000030'			MOVB	GTIMBF+G.TIMI,R1 ;MINUTES
   1678	006252	020127 	000011 			CMP	R1,#9.		;MORE THAN ONE DIGIT?
   1679	006256	003002 				BGT	10$		;YES-- WE WILL HAVE TWO
   1680	006260	112722 	000060 			MOVB	#'0,(R2)+	;NO-- MAKE IT TWO
   1681	006264				10$:
   1682	006264					CALL	TYPNUM		;MINUTES . . . .  . .  . . . . . ...
	006264	004737 	006442'			JSR	PC,TYPNUM
   1683	006270	112722 	000040 			MOVB	#' ,(R2)+	;SPACE-ED OUT DATE
   1684	006274	113701 	000024'			MOVB	GTIMBF+G.TIDA,R1 ;GET DAY OF MONTH
   1685	006300					CALL	TYPNUM		;TYPE IT IN DECIMAL
	006300	004737 	006442'			JSR	PC,TYPNUM
   1686	006304	112722 	000055 			MOVB	#'-,(R2)+	;SEPARATE
   1687	006310	113701 	000022'			MOVB	GTIMBF+G.TIMO,R1 ;GET THE MONTH
   1688	006314	006301 				ASL	R1		; *2
   1689	006316	006301 				ASL	R1		; *4 BYTES FOR EACH NAME
   1690	006320	062701 	006356'			ADD	#MONTAB-4,R1	;POINT TO ASCIZ MONTHS
   1691	006324					CALL	TYPSTR		;TYPE THE STRING
	006324	004737 	006214'			JSR	PC,TYPSTR
   1692	006330	112722 	000055 			MOVB	#'-,(R2)+	;SEPARATE
   1693	006334	013701 	000020'			MOV	GTIMBF+G.TIYR,R1 ;GET THE YEAR
   1694	006340	000440 				BR	TYPNUM		;TYPE IT AND RETURN
   1695					;
   1696					; 7 -- DECIMAL NUMBER IN R0 (SAVED ON STACK)
   1697					;
   1698	006342				TYPDEC:
   1699	006342	012737 	000012 	000016'		MOV	#10.,RADIX	;SET RADIX TO 10
   1700	006350					CALL	TYPNUM		;TYEP THE NUMBER
	006350	004737 	006442'			JSR	PC,TYPNUM
   1701	006354	112722 	000056 			MOVB	#'.,(R2)+	;STORE A . TO INDICATE DECIMAL
   1702	006360					RETURN			;BACK FOR ANOTHER CHAR OF STRING
	006360	000207 				RTS	PC
   1703					;
   1704					; TABLE OF MONTHS
   1705					;
   1706	006362				MONTAB:
   1707					.IRP ARG,<JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC>
   1708						.ASCIZ	/ARG/
   1709						.EVEN
   1710					.ENDM
	006362	   112 	   101 	   116 		.ASCIZ	/JAN/
	006365	   000
	006366	   106 	   105 	   102 		.ASCIZ	/FEB/
	006371	   000
	006372	   115 	   101 	   122 		.ASCIZ	/MAR/
	006375	   000
	006376	   101 	   120 	   122 		.ASCIZ	/APR/
	006401	   000
	006402	   115 	   101 	   131 		.ASCIZ	/MAY/
	006405	   000
	006406	   112 	   125 	   116 		.ASCIZ	/JUN/
	006411	   000
	006412	   112 	   125 	   114 		.ASCIZ	/JUL/
	006415	   000
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 24-4
TYPEOUT ROUTINES

	006416	   101 	   125 	   107 		.ASCIZ	/AUG/
	006421	   000
	006422	   123 	   105 	   120 		.ASCIZ	/SEP/
	006425	   000
	006426	   117 	   103 	   124 		.ASCIZ	/OCT/
	006431	   000
	006432	   116 	   117 	   126 		.ASCIZ	/NOV/
	006435	   000
	006436	   104 	   105 	   103 		.ASCIZ	/DEC/
	006441	   000
   1711					;
   1712					; TYPNUM -- TYPE A NUMBER
   1713					;	R1 --	NUMBER TO BE TYPED
   1714					;	RADIX -- OUTPUT RADIX
   1715					;
   1716					; USES R1,R2,R3
   1717					;
   1718	006442				TYPNUM:
   1719	006442	005701 				TST	R1		;NEGATIVE #?
   1720	006444	002003 				BGE	10$		;NO-- OK
   1721	006446	005401 				NEG	R1		;YES-- MAKE IT POSITIVE
   1722	006450	112722 	000055 			MOVB	#'-,(R2)+	; AND STORE -VE IN STRING
   1723	006454				10$:
   1724	006454	005003 				CLR	R3		;CLEAR REMAINDER
   1725	006456				15$:
   1726	006456	020137 	000016'			CMP	R1,RADIX	;CAN WE DIVIDE?
   1727	006462	002404 				BLT	20$		;NO-- DIVIDE DONE
   1728	006464	163701 	000016'			SUB	RADIX,R1	;YES-- FORM REMAINDER
   1729	006470	005203 				INC	R3		; AND QUOTIENT
   1730	006472	000771 				BR	15$		;LOOP TO DIVIDE R1 BY RADIX
   1731					;
   1732	006474				20$:
   1733	006474					PUSH	R1		;SAVE REMAINDER AS A DIGIT
	006474	010146 				MOV	R1,-(SP)
   1734	006476	010301 				MOV	R3,R1		;GO BACK AND DIVIDE AGAIN
   1735	006500	001402 				BEQ	30$		; UNLESS ALL DONE
   1736	006502					CALL	10$		;EXTRACT ANOTHER DIGIT ONTO STACK
	006502	004737 	006454'			JSR	PC,10$
   1737	006506				30$:
   1738	006506					POP	R1		;DONE-- GET A DIGIT FROM STACK
	006506	012601 				MOV	(SP)+,R1
   1739	006510	062701 	000060 			ADD	#'0,R1		;MAKE IT ASCII
   1740	006514	110122 				MOVB	R1,(R2)+	;STORE IT IN OUTPUT STRING
   1741	006516					RETURN			;FOR ANOTHER DIGIT OR THE END
	006516	000207 				RTS	PC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 25
FILE I/O ROUTINES

   1743						.SBTTL	FILE I/O ROUTINES
   1744					;
   1745					; FINDEV -- FIND PUD ENTRY FOR DEVICE
   1746					; CALL:
   1747					;	R0 --	DEVICE NAME AS TWO ASCII BYTES
   1748					;	R1 --	UNIT NUMBER AS BINARY BYTE
   1749					; RETURN:
   1750					;	R0-R4	UNCHANGED
   1751					;	R5 --	PUD ENTRY ADDRESS (POSSIBLY REDIRECTED)
   1752					;
   1753	006520				FINDEV:
   1754	006520	012705 	000000G			MOV	#.PUDBA,R5	;POINT TO START OF PUD
   1755	006524				10$:
   1756	006524	026500 	000000G			CMP	U.DN(R5),R0	;NAME MATCH?
   1757	006530	001003 				BNE	20$		;NO-- GO ON
   1758	006532	126501 	000000G			CMPB	U.UN(R5),R1	;UNIT MATCH?
   1759	006536	001406 				BEQ	30$		;YES-- THIS IS IT
   1760	006540				20$:
   1761	006540	062705 	000000G			ADD	#U.SZ,R5	;NO-- BUMP TO NEXT PUD ENTRY
   1762	006544	020527 	000000G			CMP	R5,#.PUDEA	;END YET?
   1763	006550	103765 				BLO	10$		;NO-- LOOP TILL END
   1764	006552	000261 				SEC			;YES-- DEVICE NOT IN SYSTEM
   1765	006554				30$:
   1766	006554					RETURN			;RETURN FROM FINDEV
	006554	000207 				RTS	PC
   1767					;
   1768					; FNDACP -- FIND ACP FOR DEVICE, PUD ADDR IN R5
   1769					;	RETURNS R2= STD ADDR FOR ACP, OR ZERO IF NOT FOUND
   1770					;
   1771	006556				FNDACP:
   1772	006556	012701 	000070'			MOV	#TYPBUF+4,R1	;NO-- GET A SCRACTH AREA
   1773	006562	012741 				MOV	(PC)+,-(R1)	;SET TO
   1774	006564	003310 				 .RAD50	/ACP/		; THE ACP
   1775	006566	016541 	000000G			MOV	U.DACP(R5),-(R1) ; OF THE DEVICE
   1776	006572	000137 	000000G			JMP	..FSTD		;FIND ADR OF THE STD FOR THE ACP
   1777					;
   1778					; FILMNT -- MOUNT/DISMOUNT DEVICE QUEUE I/O REQUEST
   1779					;	R2 -- ADDRESS OF FUNCTION CONTROL BLOCK
   1780					;
   1781	006576				FILMNT:
   1782	006576	012700 	014010 			MOV	#IO.APV,R0	;PRIVILIGED ACP CONTROL (MOUNT/DISMOUNT)
   1783	006602	005001 				CLR	R1		;NO FILE-ID BLOCK
   1784	006604	005003 				CLR	R3		;NO EXTEND
   1785	006606	005004 				CLR	R4		; . .
   1786	006610	005005 				CLR	R5		;NO ACCESS CONTROL
   1787					;	BR	FILQIO		;DO REQUEST AND RETURN
   1788					;
   1789					; FILQIO -- ROUTINE TO DO QIO REQUEST FOR FILE OPERATIONS
   1790					;	R0 --	I/O FUNCTION CODE (IO.XXX)
   1791					;	R1 --	(PARAMETER #1) ADDRESS OF FILE-ID BLOCK
   1792					;	R2 --	(PARAMETER #2) ADDRESS OF ATTRIBUTE CONTROL BLOCK
   1793					;	R3 --	(PARAMETER #3) EXTEND CONTROL BITS
   1794					;	R4 --	(PARAMETER #4) LOW-ORDER EXTEND INCREMENT
   1795					;	R5 --	(PARAMETER #5) ACCESS CONTROL BITS
   1796					;
   1797					; RETURNS CC-C CLEAR, QEFLAG UNCHANGED IF SUCCESS
   1798					;	  CC-C SET,   QEFLAG NON-ZERO IF ERROR
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 25-1
FILE I/O ROUTINES

   1799					;	R0 --	ERROR CODE FROM I/O STATUS OR DIRECTIVE STATUS
   1800					;
   1801	006612				FILQIO:
   1802	006612					QIOW$S	R0,#DSKLUN,#E.FQIO,,#QIOSTS,,<R1,R2,R3,R4,R5>
	006612	010546 				MOV	R5,-(SP)
	006614	010446 				MOV	R4,-(SP)
	006616	010346 				MOV	R3,-(SP)
	006620	010246 				MOV	R2,-(SP)
	006622	010146 				MOV	R1,-(SP)
	006624	005046 				CLR	-(SP)
	006626	012746 	001064'			MOV	#QIOSTS,-(SP)
	006632	005046 				CLR	-(SP)
	006634	112716 	000001 			MOVB	#E.FQIO,(SP)
	006640	012746 	000002 			MOV	#DSKLUN,-(SP)
	006644	010046 				MOV	R0,-(SP)
	006646	012746 				MOV	(PC)+,-(SP)
	006650	   003 	   013 			.BYTE	3,$$$T1
	006652	104375 				EMT	375
   1803	006654	113700 	000056'			MOVB	QEFLAG,R0	;DID A PREVIOUS Q I/O FAIL?
   1804	006660	001010 				BNE	20$		;YES-- JUST RETURN THAT
   1805	006662	113700 	000000G			MOVB	$DSW,R0		;NO-- GET DIRECTIVE STATUS
   1806	006666	103403 				BCS	10$		;ERROR-- JUST RETURN THIS
   1807	006670	113700 	001064'			MOVB	QIOSTS+0,R0	;ERROR OCCUR ON QUEUE I/O?
   1808	006674	002003 				BGE	30$		;N0-- JUST GO ON
   1809	006676				10$:
   1810	006676	110037 	000056'			MOVB	R0,QEFLAG	;YES-- SAVE THAT AS ERROR
   1811	006702				20$:
   1812	006702	000261 				SEC			; AND SAY ERROR
   1813	006704				30$:
   1814	006704					RETURN			;FROM FILQIO
	006704	000207 				RTS	PC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 26
DRIVER TABLES

   1816						.SBTTL	DRIVER TABLES
   1817					;
   1818					; DRIVER TABLE DRVTAB:
   1819					;	THIS TABLE CONTAINS ALL THE DEVICE-DEPENDENT DATA AND
   1820					;	DISPATCHES FOR THE DEVICES THAT "SAVE" UNDERSTANDS.
   1821					;
   1822					.MACRO DRIVER	NAME,DV,BTPRM
   1823					$$$ADR=.
   1824					DRVNAM=.-$$$ADR
   1825						 .ASCII	/NAME/		;DEVICE NAME IN ASCII
   1826						 .EVEN
   1827					DRVSET=.-$$$ADR
   1828						 .WORD	DV'SET		;DISK ADDRESS SETUP ROUTINE
   1829					.IF DF FTABS
   1830					DRVABS=.-$$$ADR
   1831						 .WORD	DV'ABS		;ABSOLUTE (/AB) SAVE SETUP ROUTINE
   1832					.ENDC ; .IF DF FTABS
   1833					DRVBOT=.-$$$ADR
   1834						 .WORD	DV'BOOT		;ADDRESS OF BOOTSTRAP CODE
   1835					DRVWRT=.-$$$ADR
   1836						 .WORD	DV'WRT		;DEVICE WRITE ROUTINE
   1837					DRVMSZ=.-$$$ADR
   1838						 .WORD	DV'BMSZ		;ADDRESS WHERE MEMORY SIZE GOES IN BOOT
   1839					DRVAD1=.-$$$ADR
   1840						 .WORD	DV'BAD1		;ADDRESS FOR FIRST PART DISK ADDRESS
   1841					DRVAD2=.-$$$ADR
   1842						 .WORD	DV'BAD2		;ADDRESS FOR SECOND PART . .
   1843					.IF DF M$$MGE
   1844					DRVUP0=.-$$$ADR
   1845						 .WORD	DV'BUP0		;ADDRESS FOR CURRENT CONTENTS OF UPAR0
   1846					.ENDC
   1847					DRVBTP=.-$$$ADR
   1848						 .WORD	BTPRM		;BOOTSTRAP PARAMETER BITS FOR DEVICE
   1849					DRVSIZ=.-$$$ADR
   1850					.ENDM DRIVER
   1851					;
   1852	006706				DRVTAB:
   1853	006706					DRIVER	DX,RX,0
	006706	   104 	   130 			 .ASCII	/DX/		;DEVICE DX IN ASCII
	006710	006766'				 .WORD	RXSET		;DISK ADDRESS SETUP ROUTINE
	006712	006776'				 .WORD	RXBOOT		;ADDRESS OF BOOTSTRAP CODE
	006714	007246'				 .WORD	RXWRT		;DEVICE WRITE ROUTINE
	006716	007230'				 .WORD	RXBMSZ		;ADDRESS WHERE MEMORY SIZE GOES IN BOOT
	006720	007034'				 .WORD	RXBAD1		;ADDRESS FOR FIRST PART DISK ADDRESS
	006722	007034'				 .WORD	RXBAD2		;ADDRESS FOR SECOND PART . .
	006724	000000 				 .WORD	0		;BOOTSTRAP PARAMETER BITS FOR DEVICE
   1854	006726					DRIVER	DB,RP,BP.RP4
	006726	   104 	   102 			 .ASCII	/DB/		;DEVICE DB IN ASCII
	006730	007460'				 .WORD	RPSET		;DISK ADDRESS SETUP ROUTINE
	006732	007530'				 .WORD	RPBOOT		;ADDRESS OF BOOTSTRAP CODE
	006734	007664'				 .WORD	RPWRT		;DEVICE WRITE ROUTINE
	006736	007632'				 .WORD	RPBMSZ		;ADDRESS WHERE MEMORY SIZE GOES IN BOOT
	006740	007546'				 .WORD	RPBAD1		;ADDRESS FOR FIRST PART DISK ADDRESS
	006742	007554'				 .WORD	RPBAD2		;ADDRESS FOR SECOND PART . .
	006744	000200 				 .WORD	BP.RP4		;BOOTSTRAP PARAMETER BITS FOR DEVICE
   1855	006746					DRIVER	DT,TC,0
	006746	   104 	   124 			 .ASCII	/DT/		;DEVICE DT IN ASCII
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 26-1
DRIVER TABLES

	006750	010022'				 .WORD	TCSET		;DISK ADDRESS SETUP ROUTINE
	006752	010026'				 .WORD	TCBOOT		;ADDRESS OF BOOTSTRAP CODE
	006754	010234'				 .WORD	TCWRT		;DEVICE WRITE ROUTINE
	006756	010176'				 .WORD	TCBMSZ		;ADDRESS WHERE MEMORY SIZE GOES IN BOOT
	006760	010032'				 .WORD	TCBAD1		;ADDRESS FOR FIRST PART DISK ADDRESS
	006762	010032'				 .WORD	TCBAD2		;ADDRESS FOR SECOND PART . .
	006764	000000 				 .WORD	0		;BOOTSTRAP PARAMETER BITS FOR DEVICE
   1856		000060 			DRVTBZ=.-DRVTAB
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 27
RX-11 FLOPPY DISK ROUTINES

   1858						.SBTTL	RX-11 FLOPPY DISK ROUTINES
   1859					;
   1860					; RXSET -- SET RX-11 ADDRESS
   1861					;
   1862	006766				RXSET:
   1863	006766	006301 				ASL	R1		;SECTOR IS BLOCK
   1864	006770	006301 				ASL	R1		; TIMES 4
   1865					.IF DF FTABS
   1866						BR	RXSETX		;RETURN FROM RXSET
   1867					;
   1868					; RXABS -- RX-11 ABSOLUTE ADDRESS SET-UP
   1869					;
   1870					RXABS:
   1871						MOV	#<58.*26.>,R1	;SET TO END OF DISK
   1872					.ENDC ; .IF DF FTABS
   1873	006772				RXSETX:
   1874	006772	010100 				MOV	R1,R0		;COPY IT AGAIN FOR BOTH PARTS
   1875	006774					RETURN			;RETURN FROM RXSET/RXABS
	006774	000207 				RTS	PC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 28
RX-11 BOOTSTRAP

   1877						.SBTTL	RX-11 BOOTSTRAP
   1878					;
   1879					; RX-11 BOOTSTRAP ROUTINE
   1880					;
   1881					; THIS BOOT IS READ IN FROM SECTOR ZERO (TRACK 1 SECTOR 1)
   1882					;  BY THE BM873-YF ROM.
   1883					;
   1884					; THE FOLLOWING STUFF IS RETURNED IN THE REGISTERS BY THE ROM:
   1885					;
   1886					;	R0 --	READ FUNCTION WITH UNIT # SET OR JUST UNIT #
   1887					;	R1 --	ADDRESS OF RXCS
   1888					;	R5 --	BOOTSTRAP PARAMETER (COPY OF SWITCH REGISTER)
   1889					;
   1890	006776				RXBOOT:
   1891	006776	000240 				NOP			;;;THIS IS A BOOTSTRAP
   1892	007000	106200 				ASRB	R0		;;;GET UNIT BIT INTO CC-C IF NO READ FUNC SPECIFIED
   1893	007002	001401 				BEQ	10$		;;;NO READ FUNC-- GO ON
   1894	007004	106300 				ASLB	R0		;;;READ FUNC ALREADY-- SET IT BACK WITH UNIT #
   1895	007006				10$:
   1896	007006	103002 				BCC	20$		;;;UNIT 0 OR READ FUNC ALREADY?
   1897	007010	012700 	000020 			MOV	#RXUNIT,R0	;;;NO-- SELECT UNIT 1
   1898	007014				20$:
   1899	007014	052700 	000007 			BIS	#RXREAD+RXGO,R0	;;;SET READ FUNCTION
   1900	007020	012706 	002000 			MOV	#2000,SP	;;;SETUP TEMPORARY STACK ABOVE FIRST BLOCK
   1901	007024	005004 				CLR	R4		;;;SET ADDRESS TO START READ AT LOC 0
   1902					;
   1903					; SETUP INITIAL RETURN ADDRESS TO DO A CALL ON
   1904					;  RXBBLK TO READ THE FIRST 256. WORDS
   1905					;
   1906	007026					PUSH	#RXBBLX-RXBOOT	;;;SAME AS CALL RXBBLK/BR RXBBLX
	007026	012746 	000200 			MOV	#RXBBLX-RXBOOT,-(SP)
   1907	007032	012702 				MOV	(PC)+,R2	;;;SETUP INITIAL LOGICAL SECTOR #
   1908	007034				RXBAD1:
   1909	007034	000000 			RXBAD2:	 .WORD	0		;;;SET BY SAVE TO POINT TO FILE
   1910					;	BR	RXBBLK		;;;FALL INTO READ BLOCK ROUTINE
   1911					;
   1912					; RXBBLK -- ROUTINE TO READ ONE BLOCK (256. WORDS) TO MEMORY
   1913					;
   1914					;	R0 --	READ FUNCTION WITH UNIT #
   1915					;	R1 --	ADDRESS OF RXCS
   1916					;	R2 --	CURRENT LOGICAL SECTOR # (UPDATED)
   1917					;	R3 --	SCRATCH
   1918					;	R4 --	CURRENT MEMORY ADDRESS (UPDATED)
   1919					;
   1920	007036				RXBBLK:
   1921	007036					CALL	(PC)		;;;DO 4 CALLS
	007036	004717 				JSR	PC,(PC)
   1922	007040					CALL	(PC)		;;; TO READ SECTOR ROUTINE
	007040	004717 				JSR	PC,(PC)
   1923					;
   1924					; READ A SECTOR
   1925					;
   1926	007042					PUSH	R2		;;;SAVE CURRENT SECTOR
	007042	010246 				MOV	R2,-(SP)
   1927	007044	010011 				MOV	R0,(R1)		;;;EXECUTE A READ SECTOR FUNCTION
   1928					;
   1929					; COMPUTE CURRENT PHYSICAL SECTOR # AND TRACK #
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 28-1
RX-11 BOOTSTRAP

   1930					;
   1931	007046	005003 				CLR	R3		;;;RESET TRACK #
   1932	007050					PUSH	#26.		;;;SET UP DIVISOR ON TOP OF STACK
	007050	012746 	000032 			MOV	#26.,-(SP)
   1933	007054				20$:
   1934	007054	005203 				INC	R3		;;;ONE MORE TRACK
   1935	007056	161602 				SUB	(SP),R2		;;;DIVIDE SECTOR BY 26.
   1936	007060	002375 				BGE	20$		;;; TO FIND LOGICAL SECTOR # WITHIN TRACK
   1937	007062	061602 				ADD	(SP),R2		;;;MAKE SECTOR IN RANGE 0. TO 26.
   1938	007064	005303 				DEC	R3		;;; TRACK IN RANGE 0. TO 76.
   1939	007066	022702 	000014 			CMP	#12.,R2		;;;SECTOR GREATER THAN 12.?
   1940	007072	006102 				ROL	R2		;;;IF SO, CC-C SET, INTERLEAVE FACTOR OF 2.
   1941	007074	006303 				ASL	R3		;;;GET 2*TRACK
   1942	007076	060302 				ADD	R3,R2		;;;SKEW BY 2*TRACK
   1943	007100	060302 				ADD	R3,R2		;;; 4*TRACK
   1944	007102	060302 				ADD	R3,R2		;;; 6*TRACK
   1945	007104				30$:
   1946	007104	161602 				SUB	(SP),R2		;;;GET SECTOR IN RANGE -26. TO -1. AGAIN
   1947	007106	002376 				BGE	30$		;;; . .
   1948	007110				31$:
   1949	007110	062602 				ADD	(SP)+,R2	;;;MAKE LOGICAL SECTOR IN RANGE 0. TO 25.
   1950					;
   1951	007112	006203 				ASR	R3		;;;RESTORE TRACK #
   1952	007114	122223 				CMPB	(R2)+,(R3)+	;;;PHYSICAL SECTOR 1. TO 26., TRACK 1. TO 77.
   1953					;
   1954					; SET SECTOR AND TRACK IN RX-11 TO START READ
   1955					;
   1956	007116				40$:
   1957	007116	105711 				TSTB	(R1)		;;;READY FOR SECTOR #?
   1958	007120	100376 				BPL	40$		;;;NO-- WAIT UNTIL IT IS
   1959	007122	110261 	000002 			MOVB	R2,RXDB-RXCS(R1) ;;;YES-- SET SECTOR #
   1960	007126				50$:
   1961	007126	105711 				TSTB	(R1)		;;;READY FOR TRACK?
   1962	007130	100376 				BPL	50$		;;;NO-- WAIT FOR READY
   1963	007132	110361 	000002 			MOVB	R3,RXDB-RXCS(R1) ;;;YES-- SET TRACK #
   1964					;
   1965					; WAIT FOR FUNCTION TO COMPLETE
   1966					;
   1967	007136				60$:
   1968	007136	032711 	100040 			BIT	#RXERR!RXDONE,(R1) ;;;WAIT FOR EROR OR DONE
   1969	007142	001775 				BEQ	60$		;;; . .
   1970	007144	100714 				BMI	RXBOOT		;;;ERROR-- RETRY WHOLE SHIBANG
   1971					;
   1972					; EMPTY SECTOR BUFFER TO MEMORY
   1973					;
   1974	007146	012711 	000003 			MOV	#RXEMPT!RXGO,(R1) ;;;DO AN EMPTY SECTOR BUFFER FUNCTION
   1975	007152				70$:
   1976	007152	132711 	000240 			BITB	#RXTREQ!RXDONE,(R1) ;;;READY WITH A BYTE?
   1977	007156	001775 				BEQ	70$		;;;NO-- WAIT UNTIL IT IS
   1978	007160	100003 				BPL	80$		;;;DONE-- OFF TO NEXT SECTOR
   1979	007162	116124 	000002 			MOVB	RXDB-RXCS(R1),(R4)+ ;;;STORE A BYTE TO MEMORY
   1980	007166	000771 				BR	70$		;;;LOOP TO EMPTY WHOLE BUFFER
   1981					;
   1982					; BUMP SECTOR TO NEXT SECTOR AND RETURN
   1983					;
   1984	007170				80$:
   1985	007170					POP	R2		;;;RESTORE LOGICAL SECTOR #
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 28-2
RX-11 BOOTSTRAP

	007170	012602 				MOV	(SP)+,R2
   1986	007172	005202 				INC	R2		;;;SET TO NEXT SECTOR
   1987	007174					RETURN			;;;RETURN TO READ ANOTHER SECTOR OR DONE
	007174	000207 				RTS	PC
   1988					;
   1989					.IF G <<.-RXBOOT>-128.>
   1990						.ERROR	<.-RXBOOT> ; RX BOOT TOO BIG FOR FIRST SECTOR
   1991					.ENDC
   1992					;
   1993					; HERE AFTER FIRST BLOCK READ. SETUP KT-11 (IF ANY)
   1994					;
   1995	007176				RXBBLX:
   1996	007176	012737 	000340 	177776 		MOV	#PR7,@#PS	;;;INSURE KERNAL MODE
   1997					.IF DF M$$MGE
   1998						MOV	#77406,R3	;;;SET TO MAP LARST PAGE
   1999						MOV	R3,KPDR0	;;;KERNAL PAGE 0
   2000						MOV	R3,KPDR1	;;; AND 1 (FOR READING)
   2001						MOV	R3,KPDR7	;;; AND EXTERNAL PAGE
   2002						MOV	R3,UPDR0	;;;USER PAGE 0
   2003						MOV	R3,UPDR7	;;; AND USER EXTERNAL PAGE FOR SAVE
   2004						CLR	KPAR0		;;;MAP KP 0 TO ABSOLUTE ZERO
   2005						MOV	(PC)+@(PC)+	;;;USER PAGE TO WHEREEVER SAVE WAS
   2006					RXBUP0:	 .WORD	0,UPAR0		;;;SET BY SAVE
   2007						MOV	#7600,R3	;;;SET TO MAP EXTERNAL PAGE
   2008						MOV	R3,KPAR7	;;; FOR KERNAL
   2009						MOV	R3,UPAR7	;;; AND USER
   2010						MOV	#1,SSR0		;;;ENABLE SEGMENTAION
   2011					.IFTF
   2012					;
   2013					; SETUP STACK AT TOP OF BOOT BLOCK, SAVE BOOT  PARAMETER IN LOC 776
   2014					;
   2015	007204	012706 	001000 			MOV	#1000,SP	;;;SETUP KERNAL STACK
   2016	007210					PUSH	R5		;;;SAVE BOOT PARAMETER AT BOTTOM OF STACK
	007210	010546 				MOV	R5,-(SP)
   2017					;
   2018	007212	005005 				CLR	R5		;;;CLEAR BLOCK POINTER
   2019	007214	000402 				BR	RXBNX1		;;;FINISH THIS BLOCK AND GET NEXT ONE
   2020					;
   2021					; READ NEXT BLOCK (256. WORDS, 4 SECTORS)
   2022					;
   2023	007216				RXBNXT:
   2024					.IFT
   2025						MOV	R5,KPAR1	;;;SET BLOCK TO MAP TO 20000
   2026						MOV	#20000,R4	;;;START AT BEGINNING OF THIS BLOCK
   2027					.ENDC
   2028	007216					CALL	RXBBLK-RXBOOT	;;;READ A BLOCK
	007216	004737 	000040 			JSR	PC,RXBBLK-RXBOOT
   2029	007222				RXBNX1:
   2030	007222	062705 	000010 			ADD	#256.*2/100,R5	;;;BUMP POINTER BY # 32. WORD BLOCKS IN 4 SECTORS
   2031	007226	022705 				CMP	(PC)+,R5	;;;REACHED MEMORY SIZE YET?
   2032	007230	000000 			RXBMSZ:	 .WORD	0		;;;FILLED BY SAVE TO SIZE OF MEMORY IN 32. WORD BLOCKS
   2033	007232	101371 				BHI	RXBNXT		;;;NO-- READ NEXT BLOCK
   2034					;
   2035					; BOOTSTRAP COMPLETE-- RETURN TO SAVE IN USER MODE
   2036					;
   2037					.IF DF M$$MGE
   2038						PUSH	#PS.USR!PS.REG!PR7 ;;;SET TO USER MODE
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 28-3
RX-11 BOOTSTRAP

   2039					.IFF
   2040	007234					PUSH	#PS.REG!PR7	;;;SET TO REGISTER SET 1
	007234	012746 	004340 			MOV	#PS.REG!PR7,-(SP)
   2041					.ENDC
   2042	007240					PUSH	#RESTORE	;;;USER PC, RESTORE SYSTEM
	007240	012746 	002762'			MOV	#RESTORE,-(SP)
   2043	007244	000002 				RTI			;;;RETURN TO SAVE
   2044					.IF G <<.-RXBOOT>-<128.*4>>
   2045						.ERROR	<.-RXBOOT> ; RX BOOT TOO BIG FOR FIRST BLOCK
   2046					.ENDC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 29
RX-11 WRITE ROUTINE

   2048						.SBTTL	RX-11 WRITE ROUTINE
   2049					;
   2050					; RXWRT -- WRITE MEMORY TO THE RX-11
   2051					;
   2052					; INPUTS:
   2053					;	DSKADR+0 --	LOGICAL SECTOR TO START WRITE (0.-76.*26.)
   2054					;	DEVUNT --	(BYTE) UNIT # TO WRITE ON
   2055					;	MEMSIZ --	NUMBER OF 32. WORD BLOCKS TO WRITE, STARTING AT
   2056					;			ABSOLUTE ZERO
   2057					;
   2058	007246				RXWRT:
   2059					;
   2060					; SETUP REGISTERS:
   2061					;	R0 --	WRITE FUNCTION WITH PROPER UNIT #
   2062					;	R1 --	ADDRESS OF RXCS
   2063					;	R2 --	LOGICAL SECTOR # TO START WRITE
   2064					;
   2065	007246	113700 	000044'			MOVB	DEVUNT,R0	;;;GET SPECIFIED UNIT #
   2066	007252	001402 				BEQ	10$		;;;ZERO-- OK
   2067	007254	012700 	000020 			MOV	#RXUNIT,R0	;;;NOT ZERO-- ASSUME UNIT 1
   2068	007260				10$:
   2069	007260	052700 	000005 			BIS	#RXWRIT!RXGO,R0	;;;MAKE IT A WRITE FUNCTION
   2070	007264	012701 	177170 			MOV	#RXCS,R1	;;;ADDRESS CONTROL/STATUS REGISTER
   2071	007270	013702 	000004'			MOV	DSKADR+0,R2	;;;GET START SECTOR #
   2072					;
   2073					; SET UP MAP TO ABSOLUTE ZERO
   2074					;
   2075					.IF DF M$$MGE
   2076						MOV	#77406,UPDR1	;;;MAP AS MUCH AS POSSIBLE
   2077					.IFF
   2078	007274	005004 				CLR	R4		;;;CLEAR POINTER TO MEMORY
   2079					.IFTF
   2080	007276	005005 				CLR	R5		;;;CLEAR COUNTER OF 32. WORD BLOCKS WRITTEN
   2081					;
   2082					; WRITE NEXT BLOCK (256. WORDS, 4 SECTORS) TO FLOPPY
   2083					;
   2084	007300				RXWNXT:
   2085					.IFT
   2086						MOV	R5,UPAR1	;;;SET MAP TO CURRENT 32. WORD BLOCK
   2087						MOV	#20000,R4	;;;MAP IT TO 20000
   2088					.ENDC
   2089	007300					CALL	RXWBLK		;;;WRITE A BLOCK (256. WORDS)
	007300	004737 	007320'			JSR	PC,RXWBLK
   2090	007304	062705 	000010 			ADD	#256.*2/100,R5	;;;BUMP TO NEXT 32. WORD BLOCK
   2091	007310	023705 	000014'			CMP	MEMSIZ,R5	;;;FINISHED WITH ALL OF CORE?
   2092	007314	101371 				BHI	RXWNXT		;;;NOT YET-- WRITE NEXT BLOCK
   2093					;
   2094	007316					RETURN			;;;YES-- RETURN FROM RXWRT
	007316	000207 				RTS	PC
   2095					;
   2096					; RXWBLK -- ROUTINE TO WRITE ONE BLOCK (256. WORDS) TO MEMORY
   2097					;
   2098					;	R0 --	WRITE FUNCTION WITH UNIT #
   2099					;	R1 --	ADDRESS OF RXCS
   2100					;	R2 --	CURRENT LOGICAL SECTOR # (UPDATED)
   2101					;	R3 --	SCRATCH
   2102					;	R4 --	CURRENT MEMORY ADDRESS (UPDATED)
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 29-1
RX-11 WRITE ROUTINE

   2103					;
   2104	007320				RXWBLK:
   2105	007320					CALL	(PC)		;;;DO 4 CALLS
	007320	004717 				JSR	PC,(PC)
   2106	007322					CALL	(PC)		;;; TO WRITE SECTOR ROUTINE
	007322	004717 				JSR	PC,(PC)
   2107					;
   2108					; FILL SECTOR BUFFER BEFORE WRITE
   2109					;
   2110	007324	012711 	000001 			MOV	#RXFILL!RXGO,(R1) ;;;DO A FILL FUNCTION
   2111	007330				10$:
   2112	007330	132711 	000240 			BITB	#RXTREQ!RXDONE,(R1) ;;;READY FOR A BYTE YET?
   2113	007334	001775 				BEQ	10$		;;;NO-- WAIT UNTIL IT IS
   2114	007336	100003 				BPL	15$		;;;DONE-- GO WRITE
   2115	007340	112461 	000002 			MOVB	(R4)+,RXDB-RXCS(R1) ;;;STORE A BYTE FROM MEMORY IN SECTOR BUFFER
   2116	007344	000771 				BR	10$		;;;LOOP TO FILL BUFFER
   2117					;
   2118					; WRITE A SECTOR
   2119					;
   2120	007346				15$:
   2121	007346					PUSH	R2		;;;SAVE CURRENT SECTOR
	007346	010246 				MOV	R2,-(SP)
   2122	007350	010011 				MOV	R0,(R1)		;;;EXECUTE A WRITE SECTOR FUNCTION
   2123					;
   2124					; COMPUTE CURRENT PHYSICAL SECTOR # AND TRACK #
   2125					;
   2126	007352	005003 				CLR	R3		;;;RESET TRACK #
   2127	007354					PUSH	#26.		;;;SET DIVISOR ON TOP OF STACK
	007354	012746 	000032 			MOV	#26.,-(SP)
   2128	007360				20$:
   2129	007360	005203 				INC	R3		;;;ONE MORE TRACK
   2130	007362	161602 				SUB	(SP),R2		;;;DIVIDE SECTOR BY 26.
   2131	007364	002375 				BGE	20$		;;; TO FIND LOGICAL SECTOR # WITHIN TRACK
   2132	007366	061602 				ADD	(SP),R2		;;;MAKE SECTOR IN RANGE 0. TO 25.
   2133	007370	005303 				DEC	R3		;;; TRACK IN RANGE 0. TO 76.
   2134	007372	022702 	000014 			CMP	#12.,R2		;;;SECTOR GREATER THAN 12.?
   2135	007376	006102 				ROL	R2		;;;IF SO, CC-C SET, INTERLEAVE FACTOR OF 2.
   2136	007400	006303 				ASL	R3		;;;GET 2*TRACK
   2137	007402	060302 				ADD	R3,R2		;;;SKEW BY 2*TRACK
   2138	007404	060302 				ADD	R3,R2		;;; 4*TRACK
   2139	007406	060302 				ADD	R3,R2		;;; 6*TRACK
   2140	007410				30$:
   2141	007410	161602 				SUB	(SP),R2		;;;GET SECTOR IN RANGE -26. TO -1. AGAIN
   2142	007412	002376 				BGE	30$		;;; . .
   2143	007414				31$:
   2144	007414	062602 				ADD	(SP)+,R2	;;;MAKE LOGICAL SECTOR IN RANGE 0. TO 25.
   2145					;
   2146	007416	006203 				ASR	R3		;;;RESTORE TRACK #
   2147	007420	122223 				CMPB	(R2)+,(R3)+	;;;PHYSICAL SECTOR 1. TO 26., TRACK 1. TO 77.
   2148					;
   2149					; SET SECTOR AND TRACK IN RX-11 TO START WRITE
   2150					;
   2151	007422				40$:
   2152	007422	105711 				TSTB	(R1)		;;;READY FOR SECTOR #?
   2153	007424	100376 				BPL	40$		;;;NO-- WAIT UNTIL IT IS
   2154	007426	110261 	000002 			MOVB	R2,RXDB-RXCS(R1) ;;;YES-- SET SECTOR #
   2155	007432				50$:
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 29-2
RX-11 WRITE ROUTINE

   2156	007432	105711 				TSTB	(R1)		;;;READY FOR TRACK?
   2157	007434	100376 				BPL	50$		;;;NO-- WAIT FOR READY
   2158	007436	110361 	000002 			MOVB	R3,RXDB-RXCS(R1) ;;;YES-- SET TRACK #
   2159					;
   2160					; WAIT FOR FUNCTION TO COMPLETE
   2161					;
   2162	007442				60$:
   2163	007442	032711 	100040 			BIT	#RXERR!RXDONE,(R1) ;;;WAIT FOR EROR OR DONE
   2164	007446	001775 				BEQ	60$		;;; . .
   2165	007450	100560 				BMI	WRTERR		;;;GIVE UP IF ERROR AND COMPLAIN (AFTER RESTORE)
   2166					;
   2167					; BUMP SECTOR TO NEXT SECTOR AND RETURN
   2168					;
   2169	007452					POP	R2		;;;RESTORE LOGICAL SECTOR #
	007452	012602 				MOV	(SP)+,R2
   2170	007454	005202 				INC	R2		;;;SET TO NEXT SECTOR
   2171	007456					RETURN			;;;RETURN TO WRITE ANOTHER SECTOR OR DONE
	007456	000207 				RTS	PC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 30
RP04/RP06 DISK ROUTINES

   2173						.SBTTL	RP04/RP06 DISK ROUTINES
   2174					;
   2175					; RPSET -- SET RP DISK ADDRESS
   2176					;
   2177	007460				RPSET:
   2178	007460	012702 	000020 			MOV	#16.,R2		;SET LOOP COUNT
   2179	007464				20$:
   2180	007464	006301 				ASL	R1		;MULTIPY ADDRESS
   2181	007466	006100 				ROL	R0		; BY TWO AND MOVE TRACK & SECTOR TO R0
   2182	007470	020027 	000574 			CMP	R0,#19.*20.	;LESS THAN A CYLINDER OF BLOCKS LEFT?
   2183	007474	103403 				BLO	30$		;YES-- WE ARE DOWN TO LAST CYLINDER
   2184	007476	162700 	000574 			SUB	#19.*20.,R0	;NO-- TRIM OFF ANOTHER CYLINDER
   2185	007502	005201 				INC	R1		;COUNT ANOTHER CYLINDER (OR 2**N CYLINDERS)
   2186	007504				30$:
   2187	007504	077211 				SOB	R2,20$		;LOOP FOR ALL SIXTEEN BITS OF ADDRESS
   2188					;
   2189	007506					PUSH	R1		;SAVE CYLINDER #
	007506	010146 				MOV	R1,-(SP)
   2190	007510	012701 	000024 			MOV	#20.,R1		;SET TO DIVIDE TRACK/SECTOR IN R0 BY
   2191	007514					CALL	$DIV		; NUMBER OF SECTORS PER TRACK
	007514	004737 	000000G			JSR	PC,$DIV
   2192	007520	000300 				SWAB	R0		;MOVE TRACK TO HIGH BYTE
   2193	007522	050001 				BIS	R0,R1		; SECTOR TO LOW BYTE (REMAINDER)
   2194	007524					POP	R0		;RESTORE CYLINDER #
	007524	012600 				MOV	(SP)+,R0
   2195	007526					RETURN			;RETURN FROM RPSET
	007526	000207 				RTS	PC
   2196					;
   2197					; RPABS -- SET RP DISK ABSOLUTE ADDRESS
   2198					;
   2199					.IF DF FTABS
   2200					RPABS:
   2201						MOV	#409.,R0	;SET MAINTAINENCE CYLINDER **** WON'T WORK FOR RP06 ****
   2202						MOV	#<13.*BIT8>!<8.*BIT0>,R1 ; AT TRACK 13, SECTOR 8 (VERY END)
   2203						RETURN			;RETURN FROM RPABS
   2204					.ENDC ; .IF DF FTABS
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 31
RP04/RP06 BOOTSTRAP

   2206						.SBTTL	RP04/RP06 BOOTSTRAP
   2207					;
   2208					;
   2209					; RP DISK BOOTSTRAP
   2210					;
   2211					; THIS BOOT IS READ IN FROM BLOCK 0 OF THE RP BY THE BM873-YF ROM.
   2212					;
   2213					; THE ROM RETURNS THE FOLLOWING VALUES IN THE REGISTERS:
   2214					;	R1 --	ADDRESS OF RPCS1
   2215					;	R5 --	BOOTSTRAP PARAMETER (NORMALLY SWITCH REGISTER)
   2216					;
   2217	007530				RPBOOT:
   2218	007530	000240 				NOP			;;;THIS IS A BOOTSTRAP
   2219					;
   2220					; RESET THE RP AND SET UP INITIAL TRACK AND SECTOR ADDRESS
   2221					;
   2222	007532	012711 	000021 			MOV	#RPPRST!RPGO,(R1) ;;;DO READ-IN PRESET
   2223	007536	005004 				CLR	R4		;;;CLEAR COUNTER OF 32. WORD BLOCKS READ
   2224	007540	005061 	000004 			CLR	RPBA-RPCS1(R1)	;;;SET BUS ADDR TO ZERO
   2225		007546'			RPBAD1=	.+2
   2226	007544	012761 	000000 	000034 		MOV	#0,RPDC-RPCS1(R1) ;;;SETUP CYLINDER #
   2227		007554'			RPBAD2=	.+2
   2228	007552	012761 	000000 	000006 		MOV	#0,RPDA-RPCS1(R1) ;;; AND TRACK AND SECTOR
   2229	007560	052761 	004000 	000032 		BIS	#RPECCI,RPOF-RPCS1(R1) ;;;SET ECC INHIBIT
   2230	007566	112711 	000070 			MOVB	#RPREAD,(R1)	;;;SET READ FUNCTION, NO GO
   2231					;
   2232					; READ 1K FROM THE RP TO MEMORY
   2233					;
   2234	007572				RPBNXT:
   2235	007572	012761 	176000 	000002 		MOV	#<-1024.>,RPWC-RPCS1(R1) ;;;SET 1K WORD COUNT
   2236	007600	105211 				INCB	(R1)		;;;DO NEXT READ
   2237	007602				10$:
   2238	007602	105711 				TSTB	(R1)		;;;TRANSFER COMPLETE?
   2239	007604	100376 				BPL	10$		;;;NO-- WAIT FOR DONE
   2240					;
   2241					; CHECK TO MAKE SURE NO ERRORS
   2242					;
   2243	007606	032711 	060000 			BIT	#RPTRE!RPMCPE,(R1) ;;;CONTROLLER ERROR?
   2244	007612	001346 				BNE	RPBOOT		;;;YES-- RETRY
   2245	007614	032761 	140000 	000012 		BIT	#RPATA!RPERR,RPDS-RPCS1(R1) ;;;ATTENTION OR DRIVE ERROR?
   2246	007622	001342 				BNE	RPBOOT		;;;YES-- RETRY
   2247					;
   2248					; SEE IF DONE WITH ALL OF MEMORY
   2249					;
   2250	007624	062704 	000040 			ADD	#1024.*2/100,R4	;;;BUMP # 32. WORD BLOCKS WE'VE READ
   2251	007630	022704 				CMP	(PC)+,R4	;;;FINISHED WITH ALL OF MEMORY YET?
   2252	007632	000000 			RPBMSZ:	 .WORD	0		;;;SET UP BY SAVE TO # 32. WORD BLOCKS OF MEMORY
   2253	007634	101356 				BHI	RPBNXT		;;;NO-- READ SOME MORE
   2254					;
   2255					; BOOTSTRAP COMPLETE-- SETUP KT-11 REGISTERS, IF ANY
   2256					;
   2257	007636	012737 	000340 	177776 		MOV	#PR7,@#PS	;;;INSURE KERNAL MODE
   2258					.IF DF M$$MGE
   2259						MOV	#77406,R2	;;;SET TO MAP MAX PAGE SIZE
   2260						MOV	R2,KPDR0	;;; FOR KERNAL PAGE 0
   2261						MOV	R2,KPDR7	;;; AND KP 7
   2262						MOV	R2,UPDR0	;;; AND USER PAGE 7
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 31-1
RP04/RP06 BOOTSTRAP

   2263						MOV	R2,UPDR7	;;; EXTERNAL PAGE FOR USER, TOO
   2264						CLR	KPAR0		;;;MAP KERNAL PAGE 0 TO ABSOLUTE 0
   2265						MOV	(PC)+,@(PC)+	;;;SET UP USER PAGE 0
   2266					RPBUP0:	 .WORD	0,UPAR0		;;;SPACE FOR ADDR OF PAGE
   2267						MOV	#7600,R2	;;;POINT TO EXTERNAL PAGE
   2268						MOV	R2,KPAR7	;;; FOR EXEC
   2269						MOV	R2,UPAR7	;;; AND USER
   2270						MOV	#1,SSR0		;;;ENABLE SEGMENTATION
   2271					.ENDC
   2272					;
   2273					; SETUP TEMPORARY KERNAL STACK AT TOP OF BOOT BLOCK, AND SAVE
   2274					;  BOOTSTRAP PARAMETER AT LOCATION 776
   2275					;
   2276	007644	012706 	001000 			MOV	#1000,SP	;;;START STACK AT TOP OF OUR BLOCK
   2277	007650					PUSH	R5		;;;SAVE BOOT PARAMETER AT BOTTOM OF STACK
	007650	010546 				MOV	R5,-(SP)
   2278					;
   2279					; RETURN TO SAVE TASK IN USER MODE AT SYSTEM RESTORE ENTRY POINT
   2280					;
   2281					.IF DF M$$MGE
   2282						PUSH	#PS.USR!PS.REG!PR7 ;;;USER MODE, PRIORITY 7
   2283					.IFF
   2284	007652					PUSH	#PS.REG!PR7	;;;SET REGISTER SET 1, PRI 7
	007652	012746 	004340 			MOV	#PS.REG!PR7,-(SP)
   2285					.ENDC
   2286	007656					PUSH	#RESTORE	;;; AND RETURN PC IN USER SPACE
	007656	012746 	002762'			MOV	#RESTORE,-(SP)
   2287	007662	000002 				RTI			;;;BACK TO SAVE.
   2288					.IF G <<.-RPBOOT>-<256.*2>>
   2289						.ERROR	<.-RPBOOT> ;  RP BOOT TOO BIG FOR FIRST BLOCK
   2290					.ENDC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 32
RP04/RP06 WRITE ROUTINE

   2292						.SBTTL	RP04/RP06 WRITE ROUTINE
   2293					;
   2294					; RPWRT -- WRITE MEMORY TO THE RP DISK
   2295					;
   2296					; INPUTS:
   2297					;	DSKADR+0 --	CYLINDER ADDRESS TO START TRANSFER
   2298					;	DSKADR+2 --	(BYTE) SECTOR TO START
   2299					;	DSKADR+3 --	(BYTE) TRACK TO START
   2300					;	DEVUNT --	(BYTE) UNIT # TO WRITE ON
   2301					;	MEMSIZ --	# OF 32. WORD BLOCKS OF MEMORY TO WRITE
   2302					;
   2303	007664				RPWRT:
   2304	007664	012701 	176700 			MOV	#RPCS1,R1	;;;GET ADDRESS OF RPCS1
   2305	007670	005004 				CLR	R4		;;;CLEAR POINTER TO # 32. WORD BLOCKS WRITTEN
   2306	007672	113761 	000044'	000010 		MOVB	DEVUNT,RPCS2+0-RPCS1(R1);;;SET UNIT #
   2307					;
   2308					; INITIALIZE DRIVE
   2309					;
   2310	007700	032711 	004000 			BIT	#RPDVA,(R1)	;;;IS DRIVE AVAILABLE?
   2311	007704	001442 				BEQ	WRTERR		;;;NO-- GIVE ERROR
   2312	007706	012711 	000021 			MOV	#RPPRST!RPGO,(R1) ;;;DO A READ-IN PRESET
   2313	007712	005061 	000004 			CLR	RPBA-RPCS1(R1)	;;;CLEAR BUS ADDRESS TO START WRITE AT ZERO
   2314	007716	013761 	000004'	000034 		MOV	DSKADR+0,RPDC-RPCS1(R1) ;;;SETUP DESIRED CYLINDER
   2315	007724	013761 	000006'	000006 		MOV	DSKADR+2,RPDA-RPCS1(R1) ;;; AND TRACK AND SECTOR
   2316	007732	052761 	004000 	000032 		BIS	#RPECCI,RPOF-RPCS1(R1) ;;;SET ECC INHIBIT
   2317	007740	112711 	000060 			MOVB	#RPWRIT,(R1)	;;;SET WRITE FUNCTION, NO GO
   2318					;
   2319					; WRITE ONE BLOCK OF MEMORY TO THE RP04
   2320					;
   2321	007744				RPWNXT:
   2322	007744	012761 	177400 	000002 		MOV	#<-256.>,RPWC-RPCS1(R1) ;;;SET -VE WORD COUNT
   2323	007752	105211 				INCB	(R1)		;;;WRITE NEXT BLOCK
   2324	007754				10$:
   2325	007754	105711 				TSTB	(R1)		;;;DONE SET?
   2326	007756	100376 				BPL	10$		;;;NO-- WAIT FOR TRANSFER TO COMPLETE
   2327					;
   2328					; CHECK FOR ERRORS DURING TRANSFER
   2329					;
   2330	007760	032711 	060000 			BIT	#RPTRE!RPMCPE,(R1) ;;;CONTROLLER ERROR?
   2331	007764	001012 				BNE	WRTERR		;;;YES-- GIVE UP
   2332	007766	032761 	140000 	000012 		BIT	#RPATA!RPERR,RPDS-RPCS1(R1) ;;;DRIVE ERROR?
   2333	007774	001006 				BNE	WRTERR		;;;YES-- GIVE UP ALSO
   2334					;
   2335					; SEE IF DONE WITH ALL OF MEMORY
   2336					;
   2337	007776	062704 	000010 			ADD	#256.*2/100,R4	;;;ADD A BLOCK'S WORTH OF 32. WORD BLOCKS
   2338	010002	023704 	000014'			CMP	MEMSIZ,R4	;;;DONE WITH ALL OF MEMORY?
   2339	010006	101356 				BHI	RPWNXT		;;;NO-- WRITE NEXT BLOCK
   2340	010010					RETURN			;;;YES-- RETURN FROM RPWRT
	010010	000207 				RTS	PC
   2341					;
   2342					;
   2343					; HERE ON WRITE ERRORS ON EITHER THE RP04 OR THE RX-11
   2344					; JUST RETURN TO RESTORE WITH WEFLAG= 1 TO INDICATE ERROR
   2345					;
   2346	010012				WRTERR:
   2347	010012	105237 	000060'			INCB	WEFLAG		;;;NOTE ERROR IN FLAG
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 32-1
RP04/RP06 WRITE ROUTINE

   2348	010016	000137 	002762'			JMP	RESTORE		;;;RESTORE SYSTEM, THEN GIVE ERROR
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 33
TC-11 DECTAPE ROUTINES

   2350						.SBTTL	TC-11 DECTAPE ROUTINES
   2351					;
   2352					; TCABS -- SET TC-11 ABSOLUTE BLOCK #
   2353					;
   2354					.IF DF FTABS
   2355					TCABS:
   2356						MOV	#^D<578-<28*4>-1>,R1 ;SET TO END OF TAPE
   2357					;	BR	TCSET		;ONWARD!
   2358					.ENDC ; .IF DF FTABS
   2359					;
   2360					; TCSET -- SET TC-11 BLOCK #
   2361					;
   2362	010022				TCSET:
   2363	010022	010100 				MOV	R1,R0		;JUST COPY LOW BLOCK #
   2364	010024					RETURN			; . .
	010024	000207 				RTS	PC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 34
TC-11 BOOTSTRAP

   2366						.SBTTL	TC-11 BOOTSTRAP
   2367					;
   2368					; HERE TO BOOT FROM TC-11
   2369					;
   2370					; REGISTERS LEFT BY BM-873 ROM:
   2371					;	R1 --	ADDRESS OF TCCM
   2372					;	R5 --	BOOT PARAMETER WORD
   2373					;
   2374	010026				TCBOOT:
   2375	010026	000240 				NOP			;;;THIS IS A BOOTSTRAP
   2376					;
   2377					; SELECT UNIT AND SET UP REGISTERS:
   2378					;	R1 --	ADDRESS OF TCCM
   2379					;	R2 --	BLOCK #
   2380					;	R4 --	COUNT OF 32. WORD BLOCKS READ
   2381					;
   2382		010032'			TCBAD1=.+2
   2383		010032'			TCBAD2=.+2
   2384	010030	012702 	000000 			MOV	#0,R2		;;;GET BLOCK #
   2385	010034	010203 				MOV	R2,R3		;;;COPY THE BLOCK #
   2386	010036	162703 	000003 			SUB	#3,R3		;;;BACK TO THREE BLOCK BEFORE IT
   2387	010042	005004 				CLR	R4		;;;RESET # BLOCKS READ
   2388	010044	005061 	000004 			CLR	TCBA-TCCM(R1)	;;;RESET BUS ADDRESS REGISTER
   2389					;
   2390					; SEARCH FOR CURRENT BLOCK ON TAPE
   2391					;
   2392	010050	112711 	000002 			MOVB	#TCRNUM,(R1)	;;;SET READ BLOCK # FUNCTION
   2393	010054				5$:
   2394	010054	052711 	004000 			BIS	#TCREV,(R1)	;;;SET REVERSE MODE
   2395	010060	105211 				INCB	(R1)		;;;START READ BLOCK FUNCTION
   2396	010062				10$:
   2397	010062	105711 				TSTB	(R1)		;;;READY?
   2398	010064	100376 				BPL	10$		;;;NO-- WAIT
   2399	010066	005711 				TST	(R1)		;;;ERROR?
   2400	010070	100007 				BPL	40$		;;;NO-- CHECK OUT BLOCK #
   2401	010072				20$:
   2402	010072	005761 	177776 			TST	TCST-TCCM(R1)	;;;ERROR-- IS IT END-ZONE?
   2403	010076	100353 				BPL	TCBOOT		;;;NO-- RETRY
   2404	010100	032711 	004000 			BIT	#TCREV,(R1)	;;;GOING REVERSE?
   2405	010104	001763 				BEQ	5$		;;;NO-- GO THAT WAY
   2406	010106	000403 				BR	50$		;;;YES-- GO FORWARD
   2407					;
   2408	010110				40$:
   2409	010110	026103 	000006 			CMP	TCDT-TCCM(R1),R3 ;;;PAST BLOCK YET (CURRENT BLOCK LOW)?
   2410	010114	003357 				BGT	5$		;;;NO-- KEEP SEARCHING IN REVERSE
   2411	010116				50$:
   2412	010116	042711 	004000 			BIC	#TCREV,(R1)	;;;GO FORWARD
   2413	010122	105211 				INCB	(R1)		;;;START READ BLOCK # FUNCTION
   2414	010124				60$:
   2415	010124	105711 				TSTB	(R1)		;;;READY?
   2416	010126	100376 				BPL	60$		;;;NO-- WAIT
   2417	010130	005711 				TST	(R1)		;;;ERROR?
   2418	010132	100757 				BMI	20$		;;;YES-- CHECK IT OUT
   2419	010134	026102 	000006 			CMP	TCDT-TCCM(R1),R2 ;;;AT PROPER BLOCK?
   2420	010140	002766 				BLT	50$		;;;NOT YET-- KEEP GOING
   2421	010142	003344 				BGT	5$		;;;OOPS, PAST IT-- GO BACK AGAIN
   2422					;
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 34-1
TC-11 BOOTSTRAP

   2423					; BLOCK FOUND-- START TRANSFER
   2424					;
   2425	010144	112711 	000004 			MOVB	#TCREAD,(R1)	;;;SET READ FUNCTION, NO GO
   2426					;
   2427					; START NEXT 1.K TRANSFER
   2428					;
   2429	010150				TCBNXT:
   2430	010150	012761 	176000 	000002 		MOV	#<-1024.>,TCWC-TCCM(R1) ;;;SET WORD COUNT
   2431	010156	105211 				INCB	(R1)		;;;SET GO
   2432	010160				10$:
   2433	010160	105711 				TSTB	(R1)		;;;READY?
   2434	010162	100376 				BPL	10$		;;;NO-- WAIT FOR TRANSFER TO COMPLETE
   2435	010164	005711 				TST	(R1)		;;;ERRORS?
   2436	010166	100717 				BMI	TCBOOT		;;;YES-- TRY IT ALL AGAIN
   2437					;
   2438					; SEE IF ALL DONE
   2439					;
   2440	010170	062704 	000040 			ADD	#1024.*2/100,R4	;;;BUMP COUNT OF 32. WORD BLOCKS READ
   2441	010174	022704 				CMP	(PC)+,R4	;;;DONE YET?
   2442	010176	000000 			TCBMSZ:	 .WORD	0		;;;SPACE FOR SIZE
   2443	010200	101363 				BHI	TCBNXT		;;;NO-- GET NEXT BLOCK
   2444	010202	112711 	000011 			MOVB	#TCSTOP+TCGO,(R1) ;;;STOP TAPE
   2445					;
   2446					; BOOTSTRAP COMPLETE-- SETUP KT-11 REGISTERS, IF ANY
   2447					;
   2448	010206	012737 	000340 	177776 		MOV	#PR7,@#PS	;;;INSURE KERNAL MODE
   2449					.IF DF M$$MGE
   2450						MOV	#77406,R2	;;;SET TO MAP MAX PAGE SIZE
   2451						MOV	R2,KPDR0	;;; FOR KERNAL PAGE 0
   2452						MOV	R2,KPDR7	;;; AND KP 7
   2453						MOV	R2,UPDR0	;;; AND USER PAGE 7
   2454						MOV	R2,UPDR7	;;; EXTERNAL PAGE FOR USER, TOO
   2455						CLR	KPAR0		;;;MAP KERNAL PAGE 0 TO ABSOLUTE 0
   2456						MOV	(PC)+,@(PC)+	;;;SET UP USER PAGE 0
   2457					TCBUP0:	 .WORD	0,UPAR0		;;;SPACE FOR ADDR OF PAGE
   2458						MOV	#7600,R2	;;;POINT TO EXTERNAL PAGE
   2459						MOV	R2,KPAR7	;;; FOR EXEC
   2460						MOV	R2,UPAR7	;;; AND USER
   2461						MOV	#1,SSR0		;;;ENABLE SEGMENTATION
   2462					.ENDC
   2463					;
   2464					; SETUP TEMPORARY KERNAL STACK AT TOP OF BOOT BLOCK, AND SAVE
   2465					;  BOOTSTRAP PARAMETER AT LOCATION 776
   2466					;
   2467	010214	012706 	001000 			MOV	#1000,SP	;;;START STACK AT TOP OF OUR BLOCK
   2468	010220					PUSH	R5		;;;SAVE BOOT PARAMETER AT BOTTOM OF STACK
	010220	010546 				MOV	R5,-(SP)
   2469					;
   2470					; RETURN TO SAVE TASK IN USER MODE AT SYSTEM RESTORE ENTRY POINT
   2471					;
   2472					.IF DF M$$MGE
   2473						PUSH	#PS.USR!PS.REG!PR7 ;;;USER MODE, PRIORITY 7
   2474					.IFF
   2475	010222					PUSH	#PS.REG!PR7	;;;SET REGISTER SET 1, PRI 7
	010222	012746 	004340 			MOV	#PS.REG!PR7,-(SP)
   2476					.ENDC
   2477	010226					PUSH	#RESTORE	;;; AND RETURN PC IN USER SPACE
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 34-2
TC-11 BOOTSTRAP

	010226	012746 	002762'			MOV	#RESTORE,-(SP)
   2478	010232	000002 				RTI			;;;BACK TO SAVE.
   2479					.IF G <<.-TCBOOT>-<256.*2>>
   2480						.ERROR	<.-TCBOOT> ;  TC BOOT TOO BIG FOR FIRST BLOCK
   2481					.ENDC
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 35
TC-11 WRITE ROUTINE

   2483						.SBTTL	TC-11 WRITE ROUTINE
   2484					;
   2485					; TCWRT -- TC-11 DECTAPE WRITE ROUTINE
   2486					;
   2487					; INPUTS:
   2488					;	DSKADR+0 --	BLOCK # TO START TRANSFER AT
   2489					;	DEVUNT --	UNIT # TO SCRIBBLE ON
   2490					;	MEMSIZ --	# OF 32. WORD BLOCKS TO WRITE
   2491					;
   2492					; REGISTERS:
   2493					;	R1 --	ADDRESS OF TCCM
   2494					;	R2 --	BLOCK #
   2495					;	R4 --	COUNT OF 32. WORD BLOCKS WRITTEN
   2496					;
   2497	010234				TCWRT:
   2498	010234	012701 	177342 			MOV	#TCCM,R1	;;;ADDRESS COMMAND REGISTER
   2499	010240	013702 	000004'			MOV	DSKADR+0,R2	;;;GET BLOCK #
   2500	010244	010203 				MOV	R2,R3		;;;COPY THE BLOCK #
   2501	010246	162703 	000003 			SUB	#3,R3		;;;BACK TO THREE BLOCK BEFORE IT
   2502	010252	113761 	000044'	000001 		MOVB	DEVUNT,1(R1)	;;;SELECT PROPER UNIT
   2503	010260	005004 				CLR	R4		;;;RESET # BLOCKS READ
   2504	010262	005061 	000004 			CLR	TCBA-TCCM(R1)	;;;RESET BUS ADDRESS REGISTER
   2505					;
   2506					; SEARCH FOR CURRENT BLOCK ON TAPE
   2507					;
   2508	010266	112711 	000002 			MOVB	#TCRNUM,(R1)	;;;SET READ BLOCK # FUNCTION
   2509	010272				5$:
   2510	010272	052711 	004000 			BIS	#TCREV,(R1)	;;;SET REVERSE MODE
   2511	010276	105211 				INCB	(R1)		;;;START READ BLOCK FUNCTION
   2512	010300				10$:
   2513	010300	105711 				TSTB	(R1)		;;;READY?
   2514	010302	100376 				BPL	10$		;;;NO-- WAIT
   2515	010304	005711 				TST	(R1)		;;;ERROR?
   2516	010306	100007 				BPL	40$		;;;NO-- CHECK OUT BLOCK #
   2517	010310				20$:
   2518	010310	005761 	177776 			TST	TCST-TCCM(R1)	;;;ERROR-- IS IT END-ZONE?
   2519	010314	100244 				BPL	TCBOOT		;;;NO-- RETRY
   2520	010316	032711 	004000 			BIT	#TCREV,(R1)	;;;GOING REVERSE?
   2521	010322	001763 				BEQ	5$		;;;NO-- GO THAT WAY
   2522	010324	000403 				BR	50$		;;;YES-- GO FORWARD
   2523					;
   2524	010326				40$:
   2525	010326	026103 	000006 			CMP	TCDT-TCCM(R1),R3 ;;;PAST BLOCK YET (CURRENT BLOCK LOW)?
   2526	010332	003357 				BGT	5$		;;;NO-- KEEP SEARCHING IN REVERSE
   2527	010334				50$:
   2528	010334	042711 	004000 			BIC	#TCREV,(R1)	;;;GO FORWARD
   2529	010340	105211 				INCB	(R1)		;;;START READ BLOCK # FUNCTION
   2530	010342				60$:
   2531	010342	105711 				TSTB	(R1)		;;;READY?
   2532	010344	100376 				BPL	60$		;;;NO-- WAIT
   2533	010346	005711 				TST	(R1)		;;;ERROR?
   2534	010350	100757 				BMI	20$		;;;YES-- CHECK IT OUT
   2535	010352	026102 	000006 			CMP	TCDT-TCCM(R1),R2 ;;;AT PROPER BLOCK?
   2536	010356	002766 				BLT	50$		;;;NOT YET-- KEEP GOING
   2537	010360	003344 				BGT	5$		;;;OOPS, PAST IT-- GO BACK AGAIN
   2538					;
   2539					; BLOCK FOUND-- START TRANSFER
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 35-1
TC-11 WRITE ROUTINE

   2540					;
   2541	010362	112711 	000014 			MOVB	#TCWRIT,(R1)	;;;SET WRITE FUNCTION, NO GO
   2542					;
   2543					; START NEXT 1.K TRANSFER
   2544					;
   2545	010366				TCWNXT:
   2546	010366	012761 	177400 	000002 		MOV	#<-256.>,TCWC-TCCM(R1) ;;;SET WORD COUNT
   2547	010374	105211 				INCB	(R1)		;;;SET GO
   2548	010376				10$:
   2549	010376	105711 				TSTB	(R1)		;;;READY?
   2550	010400	100376 				BPL	10$		;;;NO-- WAIT FOR TRANSFER TO COMPLETE
   2551	010402	005711 				TST	(R1)		;;;ERRORS?
   2552	010404	100410 				BMI	TCWERR		;;;YES-- GIVE UP
   2553					;
   2554					; SEE IF ALL DONE
   2555					;
   2556	010406	062704 	000010 			ADD	#256.*2/100,R4	;;;BUMP COUNT OF 32. WORD BLOCKS TRANSFERED
   2557	010412	023704 	000014'			CMP	MEMSIZ,R4	;;;DONE YET?
   2558	010416	101363 				BHI	TCWNXT		;;;NO-- GET NEXT BLOCK
   2559	010420	112711 	000011 			MOVB	#TCSTOP+TCGO,(R1) ;;;STOP TAPE
   2560	010424					RETURN			;;;FROM TCWRT
	010424	000207 				RTS	PC
   2561					;
   2562					; HERE ON ERROR ON TC-11
   2563					;
   2564	010426				TCWERR:
   2565	010426	000137 	010012'			JMP	WRTERR		;;;GIVE UP
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 36
END STATEMENT

   2567						.SBTTL	END STATEMENT
   2568		001170'				.END	SAVE
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 36-1
SYMBOL TABLE

ACFLAG  000057R  	DEXWD2= 174404   	DS06  = 001000   	FILDM2  002442R  	IE.EBX= 177776
AC.ENA= 000200   	DEXWD3= 174402   	DTCL11= 002000   	FILDM3  002464R  	IE.EOF= 177766
ALLRXF  004742R  	DFUNC = 000200   	DTECHK  003644R  	FILDM4  002502R  	IE.EOT= 177702
ALLRX1  004752R  	DF.DMG= 000004   	DTECMD= 000451   	FILFND  002060R  	IE.EOV= 177765
ALTDXF  000062R  	DF.DMN= 000007   	DTEFLG= 000444   	FILMNT  006576R  	IE.EXP= 177676
ATCBLK  001102R  	DF.DOR= 000001   	DTEF11= 000450   	FILOK   002312R  	IE.FEX= 177717
BC.HDS= ****** GX	DF.EHG= 000010   	DTEMSG  004154R  	FILQIO  006612R  	IE.FHE= 177705
BITTBL= ****** GX	DF.EHM= 000011   	DTEMTD= 000455   	FILSET  002322R  	IE.FOP= 177713
BIT0  = 000001   	DF.EMG= 000005   	DTEMTI= 000456   	FINDEV  006520R  	IE.HFU= 177744
BIT1  = 000002   	DF.EMN= 000006   	DTEXPA= 174400   	FNDACP  006556R  	IE.HWR= 177772
BIT10 = 002000   	DF.KLR= 000012   	DTEXPZ= 000040   	FORPRO= 000020   	IE.IDU= 177644
BIT11 = 004000   	DF.KLW= 000013   	DTINOF= 000010   	GETNAM  005630R  	IE.IEF= 177637
BIT12 = 010000   	DF.KLX= 000014   	DTINON= 000040   	GETNB   005606R  	IE.IFC= 177776
BIT13 = 020000   	DF.OFF= 000002   	DTPMSG  004200R  	GETNUM  005674R  	IE.IFU= 177747
BIT14 = 040000   	DF.ON = 000003   	DTPMS1  004216R  	GTIMBF  000020R  	IE.ILL= 177726
BIT15 = 100000   	DF.PDP= 000016   	DTRSMD= 000010   	G.TICP= 000016   	IE.ILU= 177640
BIT2  = 000004   	DF.PEX= 000015   	DTSTAT= 000034   	G.TICT= 000014   	IE.INS= 177776
BIT3  = 000010   	DHEXPA= 160020   	DTVECA= 000774   	G.TIDA= 000004   	IE.IPR= 177641
BIT4  = 000020   	DHEXPZ= 000020   	DT11DB= 004000   	G.TIHR= 000006   	IE.ISQ= 177703
BIT5  = 000040   	DHSTAB  001124R  	DUPE  = 000020   	G.TIMI= 000010   	IE.ITI= 177643
BIT6  = 000100   	DHTBL = ****** GX	DURE  = 000004   	G.TIMO= 000002   	IE.ITS= 177770
BIT7  = 000200   	DIAG1 = 174430   	DV.LOG= ****** GX	G.TISC= 000012   	IE.LCK= 177745
BIT8  = 000400   	DIAG2 = 174432   	DXWRD1= 002000   	G.TIYR= 000000   	IE.LNL= 177646
BIT9  = 001000   	DIAG3 = 174436   	D.CCTY= ****** GX	HBCERR  004652R  	IE.MBK= 177721
BPARER= 000020   	DIKL10= 000010   	D.CKLN= ****** GX	HIBYTE= 177400   	IE.MOD= 177753
BP.CLN= 074000   	DLTBL = ****** GX	D1011 = 000040   	HOMBUF  000064R  	IE.NBF= 177731
BP.CSP= 000170   	DLYCNT= 174400   	EBSEL = 000100   	HOMFE0= 000061   	IE.NBK= 177727
BP.ERR= 100000   	DL.CAR= ****** GX	EBUSPC= 000020   	HOMFE1= 000062   	IE.NFI= 177704
BP.LD0= 000002   	DMFLAG  000052R  	EBUSPS= 000004   	HOMNAM= 000000   	IE.NLN= 177733
BP.LD1= 000004   	DMOERR  002454R  	EDONES= 040000   	IE.ABO= 177761   	IE.NNC= 177674
BP.RP4= 000200   	DMTBLK  001116R  	EF.PR1= ****** GX	IE.ACT= 177771   	IE.NOD= 177751
BP.SWR= 000001   	DNSERR  001642R  	EF.PR2= ****** GX	IE.ADP= 177636   	IE.NSF= 177746
BP.UNT= 003400   	DON10C= 040000   	EF.QIO= 000001   	IE.ALN= 177736   	IE.OFL= 177677
CDD   = 000020   	DON10S= 100000   	EF.RKP= ****** GX	IE.AST= 177660   	IE.ONP= 177773
CHNPNT= 000001   	DON11C= 000100   	EF.TMO= 000002   	IE.BAD= 177777   	IE.OVR= 177756
CMDCLN= 000024   	DON11S= 000200   	EPTR  = 000000   	IE.BBE= 177710   	IE.PRI= 177760
CMDCLR  000040R  	DPS4  = 040000   	ERRMSG  001453R     002	IE.BDI= 177714   	IE.RAC= 177724
CMDONE  001574R  	DRESET= 000100   	ERR10C= 010000   	IE.BDR= 177716   	IE.RAT= 177723
CNUPE = 000002   	DRVADR  000002R  	ERR10S= 020000   	IE.BDV= 177711   	IE.RBG= 177730
CS.EXP= 177670   	DRVAD1= 000012   	ERR11C= 000001   	IE.BHD= 177700   	IE.RCN= 177722
CTYBFL= 000120   	DRVAD2= 000014   	ERR11S= 000002   	IE.BLK= 177754   	IE.RER= 177740
CTYBUF  000230R  	DRVBOT= 000004   	EV.PF = ****** GX	IE.BNM= 177712   	IE.RNM= 177715
CTYLUN= 000001   	DRVBTP= 000016   	EXFLAG  000050R  	IE.BTF= 177675   	IE.RSU= 177757
CTYPTR= ****** GX	DRVMSZ= 000010   	EXIT    005576R  	IE.BTP= 177725   	IE.SDP= 177635
CYCLS = 000002   	DRVNAM= 000000   	EXITA   001526R  	IE.BVR= 177701   	IE.SNC= 177735
DATE  = 000004   	DRVSET= 000002   	EXIT00  005564R  	IE.BYT= 177755   	IE.SPC= 177772
DCOMST= 000001   	DRVSIZ= 000020   	EX.AC1= 000001   	IE.CKP= 177766   	IE.SQC= 177734
DEFLAG  000061R  	DRVTAB  006706R  	EX.ENA= 000200   	IE.CKS= 177742   	IE.SRE= 177762
DEP   = 010000   	DRVTBZ= 000060   	EX.FCO= 000004   	IE.CLO= 177732   	IE.STK= 177706
DEVCHK  001656R  	DRVWRT= 000006   	E.FLOG= 000004   	IE.CON= 177752   	IE.ULN= 177773
DEVMNT  002002R  	DR.DTE= 000011   	E.FQIO= 000001   	IE.DAA= 177770   	IE.UPN= 177777
DEVNAM  000042R  	DSEND = 000004   	E.FTMO= 000002   	IE.DAO= 177763   	IE.VER= 177774
DEVOK   001734R  	DSKADR  000004R  	FIDBLK  001076R  	IE.DFU= 177750   	IE.WAC= 177743
DEVUNT  000044R  	DSKLUN= 000002   	FILCHK  002252R  	IE.DNA= 177771   	IE.WAT= 177741
DEX   = 000400   	DSKSIZ  000010R  	FILDMO  002332R  	IE.DNR= 177775   	IE.WER= 177737
DEXDON= 000004   	DS04  = 004000   	FILDMX  002512R  	IE.DUN= 177767   	IE.WLK= 177764
DEXWD1= 174406   	DS05  = 002000   	FILDM1  002350R  	IE.DUP= 177707   	IE.2DV= 177720
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 36-2
SYMBOL TABLE

IFLOP = 100000   	IO.REL= 013400   	KL.CFM= ****** GX	PULSE = 000020   	RPWRIT= 000060
INTROF= 000010   	IO.RHD= 001010   	KL.DEF= ****** GX	QEFLAG  000056R  	RPWRT   007664R
INTRON= 000040   	IO.RLB= 001000   	KL.LCA= ****** GX	QIOSTS  001064R  	RP4CHK  003422R
INTSON= 000001   	IO.RLV= 001100   	KL.LRM= ****** GX	QSIZE = 000023   	RP6CHK  003466R
INT10S= 000400   	IO.RNA= 005400   	KL.LVB= ****** GX	Q.DA  = ****** GX	RQSKLR  005000R
INT11C= 002000   	IO.RNC= 001004   	KL.VBN= ****** GX	Q.SZ  = ****** GX	RQSTSK  005452R
INT11S= 004000   	IO.RNE= 001020   	K.LRBA= ****** GX	RADIX   000016R  	RXBAD1  007034R
IO.ACE= 007400   	IO.RTC= 003400   	LKS   = 177546   	RAMIS0= 010000   	RXBAD2  007034R
IO.ACR= 006400   	IO.RTI= 016400   	LOAD11= 000004   	REDHM1  004520R  	RXBBLK  007036R
IO.ACW= 007000   	IO.RTK= 000060   	LOGBUF  001070R  	REDHOM  004466R  	RXBBLX  007176R
IO.ADS= 014000   	IO.RVB= 010400   	LOWCOR  000064R  	REDSY   003240R  	RXBMSZ  007230R
IO.APC= 014000   	IO.RWD= 002400   	MEMSIZ  000014R  	RESTOR  002762RG 	RXBNXT  007216R
IO.APV= 014010   	IO.RWU= 002540   	MNTBLK  001110R  	RFMAD0= 100000   	RXBNX1  007222R
IO.ATT= 001400   	IO.R1C= 002400   	MNTSY   004252R  	RFMAD1= 040000   	RXBOOT  006776R
IO.CCI= 014000   	IO.SAO= 004000   	MNTSY1  004274R  	RFMAD2= 020000   	RXCS  = 177170
IO.CCT= 002460   	IO.SCS= 013000   	MNTSY2  004364R  	RFMAD3= 010000   	RXDB  = 177172
IO.CLN= 003400   	IO.SDI= 013000   	MODTBL  001532R  	RHFLAG  000053R  	RXDONE= 000040
IO.CON= 015400   	IO.SDO= 012400   	MODTLN= 000006   	RHMERR  004716R  	RXEMPT= 000002
IO.CRC= 001020   	IO.SEC= 002520   	MOFLAG  000051R  	RM    = 000010   	RXERR = 100000
IO.CRE= 012000   	IO.SEM= 002440   	MONTAB  006362R  	RNFLAG  000054R  	RXFILL= 000000
IO.CTI= 015400   	IO.SHT= 002410   	MOUNTD  002050R  	RNRERR  004730R  	RXFUNC= 000016
IO.CTL= 016400   	IO.SLO= 005400   	MPE11 = 001000   	RPATA = 100000   	RXGO  = 000001
IO.DAC= 010000   	IO.SMO= 002560   	NOTRXF  004700R  	RPBA  = 176704   	RXINIT= 040000
IO.DCI= 014400   	IO.SNM= 002450   	NULSTP= 000040   	RPBAD1= 007546R  	RXREAD= 000006
IO.DCT= 002470   	IO.SPB= 002420   	NUPE  = 000002   	RPBAD2= 007554R  	RXRERR= 000016
IO.DEL= 012400   	IO.SPF= 002440   	PERCLR= 001000   	RPBMSZ  007632R  	RXSET   006766R
IO.DET= 002000   	IO.SSO= 004400   	PHYS  = 100000   	RPBNXT  007572R  	RXSETX  006772R
IO.DIS= 016000   	IO.SST= 002430   	PIDENT= 000000   	RPBOOT  007530R  	RXTREQ= 000200
IO.DTI= 016000   	IO.STC= 002500   	PRI7  = 000340   	RPCS1 = 176700   	RXUNIT= 000020
IO.ENA= 006000   	IO.STP= 016400   	PRNRUN  005440R  	RPCS2 = 176710   	RXWBLK  007320R
IO.EOF= 003000   	IO.SYN= 003040   	PROPNT= 000021   	RPDA  = 176706   	RXWNXT  007300R
IO.ESA= 002500   	IO.TRM= 002410   	PRTOFF= 004000   	RPDC  = 176734   	RXWRIT= 000004
IO.EXT= 011400   	IO.UNL= 000042   	PR0   = 000000   	RPDPR = 000400   	RXWRT   007246R
IO.FDX= 003020   	IO.WAT= 013400   	PR1   = 000040   	RPDS  = 176712   	R$$11M= 000001
IO.FNA= 004400   	IO.WLB= 000400   	PR2   = 000100   	RPDT  = 176726   	R$$20F= 000001
IO.HDX= 003010   	IO.WLS= 000410   	PR3   = 000140   	RPDT04= 000020   	SAVE    001170RG
IO.HIS= 015000   	IO.WLV= 000500   	PR4   = 000200   	RPDT06= 000022   	SAVLMT  001164RG
IO.INL= 002400   	IO.WVB= 011000   	PR5   = 000240   	RPDVA = 004000   	SCD   = 000040
IO.ITI= 017000   	IO.XMT= 014400   	PR6   = 000300   	RPECCI= 004000   	SETCTY  003014R
IO.KIL= 000012   	IO.XNA= 014410   	PR7   = 000340   	RPERR = 040000   	SETDH   003202R
IO.LED= 012000   	IQ.Q  = 000002   	PS    = 177776   	RPFLAG  000055R  	SETDL   003144R
IO.LOV= 001010   	IQ.X  = 000001   	PSWW1 = 000005   	RPFM22= 010000   	SETFIL  002060R
IO.LTK= 000050   	IS.BV = 000005   	PSWW10= 000014   	RPFUNC= 000076   	SETRXF  004662R
IO.MCS= 013400   	IS.CLR= 000000   	PSWW11= 000015   	RPGO  = 000001   	SF.FX = ****** GX
IO.MDA= 016000   	IS.CR = 006401   	PSWW12= 000016   	RPMCPE= 020000   	SOMRXF  004774R
IO.MDI= 014400   	IS.ESC= 015401   	PSWW13= 000017   	RPMOL = 010000   	SPSAVE  000000RG
IO.MDO= 015400   	IS.PND= 000000   	PSWW2 = 000006   	RPNOOP= 000000   	STAT  = 174434
IO.MLO= 006000   	IS.RDD= 000002   	PSWW3 = 000007   	RPOF  = 176732   	STATUS= 000022
IO.MOD= 003000   	IS.SET= 000002   	PSWW4 = 000010   	RPPGM = 001000   	STSW0 = ****** GX
IO.MSO= 005000   	IS.SUC= 000001   	PSWW5 = 000011   	RPPRST= 000020   	STSW1 = ****** GX
IO.RAL= 001010   	KBS0  = ****** GX	PSWW6 = 000012   	RPRDY = 000200   	SWR   = 177570
IO.RAT= 013000   	KBS1  = ****** GX	PSWW7 = 000013   	RPREAD= 000070   	SWSLLT= 100000
IO.RBC= 003000   	KLAREM  005334R  	PS.PUS= 030000   	RPSET   007460R  	SXBTHM= 105755
IO.RCI= 015000   	KLAUSR  005324R  	PS.REG= 004000   	RPTRE = 040000   	SYMNTD  004404R
IO.RCV= 015000   	KLINIT  001120R  	PS.USR= 140000   	RPUNIT= 000007   	SYMNT1  004414R
IO.RDB= 001200   	KLNPTR= ****** GX	PUDADR  000040R  	RPWC  = 176702   	SYNERR  001562R
IO.RDN= 000022   	KLPWRF= 000010   	PUDIDX  000045R  	RPWNXT  007744R  	SYSAVE  002524R
SAVE -- MCR FUNCTION 'SAV' FOR 	MACRO M1110  26-JUL-79 10:06  PAGE 36-3
SYMBOL TABLE

SYSAV1  002556R  	TO10AD= 174420   	UNASG1= 000032   	.CLRMR= 006000   	.LDRM3= 062000
SYSMSG  004236R  	TO10BC= 174414   	UNASG2= 000033   	.CLRUN= 010000   	.LDSEL= 044000
SYSTRT  004110R  	TO10BM= 000001   	UNASG3= 000034   	.COMEF= ****** GX	.MEMRS= 076000
S.DI  = ****** GX	TO10DB= 000400   	UNASG4= 000035   	.CONBT= 012000   	.NOERR= ****** GX
S.FW  = ****** GX	TO10DN= 100000   	UNASG5= 000036   	.CPUSN= ****** GX	.PCAB1= 150000
TCBA  = 177346   	TO10DT= 174424   	UNASG6= 000037   	.CSHRG= 164000   	.PCAB2= 151000
TCBAD1= 010032R  	TO10ER= 020000   	U.ACP = ****** GX	.DATE3= ****** GX	.PCAB3= 152000
TCBAD2= 010032R  	TO11  = 000100   	U.DACP= ****** GX	.DQPBA= ****** GX	.PCAB4= 153000
TCBMSZ  010176R  	TO11AD= 174422   	U.DN  = ****** GX	.DRLTC= 015000   	.PRDTE= ****** GX
TCBNXT  010150R  	TO11BC= 174416   	U.LBH = ****** GX	.DSACF= 066000   	.PRSTA= ****** GX
TCBOOT  010026R  	TO11BM= 020000   	U.LBN = ****** GX	.DSIOJ= 065000   	.PUDBA= ****** GX
TCCM  = 177342   	TO11DB= 004000   	U.RP  = ****** GX	.EIOJA= 067000   	.PUDEA= ****** GX
TCDT  = 177350   	TO11DN= 000200   	U.SZ  = ****** GX	.FEMOD= ****** GX	.RCRM1= 147000
TCENDZ= 100000   	TO11DT= 174426   	U.UN  = ****** GX	.GFNR = 102000   	.RCRM2= 146000
TCERR = 100000   	TO11ER= 000002   	U.VA  = ****** GX	.HRDWR= ****** GX	.RCRM3= 145000
TCFUNC= 000016   	TTYEND= ****** GX	WBFLAG  000046R  	.INICL= 070000   	.RCRM4= 144000
TCGO  = 000001   	TTYEXP= ****** GX	WEFLAG  000060R  	.IRLTC= 014000   	.RCSPF= 141000
TCRDY = 000200   	TT.CRW= ****** GX	WEP   = 000010   	.KLIWD= ****** GX	.RDJ14= 134000
TCREAD= 000004   	TT.CTY= ****** GX	WRNMSG  001476R     002	.KLNMD= ****** GX	.RDJ71= 135000
TCREV = 004000   	TT.OUT= ****** GX	WRTERR  010012R  	.KLNSW= ****** GX	.RDMAB= 133000
TCRNUM= 000002   	TT.RIP= ****** GX	WSFLAG  000047R  	.LCRDL= 052000   	.RPADR= ****** GX
TCSATM= 000000   	TYPBUF  000064R  	WTSAVE  002716R  	.LCRDR= 051000   	.SECLK= 003000
TCSET   010022R  	TYPCR   006124R  	ZSTOP = 040000   	.LCRM1= 057000   	.SERFG= ****** GX
TCST  = 177340   	TYPDAT  006224R  	$BTMSK= ****** GX	.LCRM2= 056000   	.SETMR= 007000
TCSTOP= 000010   	TYPDEC  006342R  	$DIV  = ****** GX	.LCRM3= 055000   	.SETRN= 011000
TCUNIT= 003400   	TYPDEV  006146R  	$DSW  = ****** GX	.LCRM4= 054000   	.SSCLK= 002000
TCWC  = 177344   	TYPDON  006032R  	$UNIT = ****** GX	.LCRM5= 053000   	.STDTA= ****** GX
TCWERR  010426R  	TYPERR  006202R  	$$    = 000037   	.LDAR = 077000   	.STDTZ= ****** GX
TCWNXT  010366R  	TYPMAX= 000013   	$$MSG = 000000   	.LDBRL= 043000   	.STPCL= 000000
TCWRIT= 000014   	TYPMSG  005740R  	$$$   = 001420R     002	.LDBRR= 042000   	.STRCL= 001000
TCWRT   010234R  	TYPMS1  005760R  	$$$ADR= 006746R  	.LDCK1= 046000   	.VERNO= ****** GX
TENAD1= 174410   	TYPNUM  006442R  	$$$ARG= 000005   	.LDCK2= 047000   	.WRMBX= 071000
TENAD2= 174412   	TYPSAV  006116R  	$$$OST= 000020   	.LDDIS= 045000   	..DTP2= ****** GX
TOBM  = 000004   	TYPSDV  006142R  	$$$T1 = 000013   	.LDRJD= 064000   	..ENB0= ****** GX
TOD   = 000003   	TYPSTR  006214R  	$$$T2 = 000001   	.LDRJV= 063000   	..FSTD= ****** GX
TOIP  = 000002   	TYPTAB  006004R  	.BRCLK= 005000   	.LDRM1= 060000   	..STIN= ****** GX
TOIT  = 000001   	TYPTXT  006130R  	.BTPRM= ****** GX	.LDRM2= 061000   	...GBL= 000000
TO10  = 000200   	TYPWRN  006210R  	.CECLK= 004000

. ABS.	000000	   000
      	010432	   001
TEXT  	001520	   002
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  9632 WORDS  ( 38 PAGES)
DYNAMIC MEMORY:  11116 WORDS  ( 42 PAGES)
ELAPSED TIME:  00:05:48
[52,10]SAVE,[52,20]SAVE/-SP/CR=[52,30]RSXDC,SAVE
SAVE       CREATED BY  MACRO  ON 26-JUL-79 AT 10:09	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

ACFLAG	  000057 R	#6-362      9-652     *9-675     
AC.ENA	= 000200	#4-238      9-627     
ALLRXF	  004742 R	 20-1288   #20-1323   
ALLRX1	  004752 R	 20-1317   #20-1325   
ALTDXF	  000062 R	#6-366     *13-915    *19-1206    19-1224   *19-1237   
ATCBLK	  001102 R	#7-397      9-623     
BC.HDS	= ******  GX	 21-1415   
BITTBL	= ******  GX	 14-945    
BIT0  	= 000001	#4-153      4-192      4-213      4-231      5-256      5-271      5-276      5-306      7-426     
                         7-428      7-429      7-430      7-431      7-432      7-433      7-434      7-435      7-436     
BIT1  	= 000002	#4-153      4-195      4-208      5-250      5-251      5-252      5-253      5-254      5-255     
                         5-266      5-267      5-268      5-269      5-270      5-276      5-300      5-301      5-302     
                         5-303      5-304      5-305      7-426      7-427      7-428      7-429      7-430      7-431     
                         7-432      7-433      7-434      7-435      7-436     
BIT10 	= 002000	#4-153      4-204      5-298      5-319      7-423      7-424      7-425      7-426      7-427     
                         7-428      7-429      7-430      7-431      7-432      7-433      7-434      7-435      7-436     
                         7-437      7-438     
BIT11 	= 004000	#4-153      4-203      4-219      5-264      5-288      5-297      5-318     
BIT12 	= 010000	#4-153      4-203      4-218      5-280      5-287     
BIT13 	= 020000	#4-153      4-203      4-218      5-263     
BIT14 	= 040000	#4-153      4-203      4-217      5-246      5-262      5-279     
BIT15 	= 100000	#4-153      4-202      4-217      5-245      5-278      5-294      5-296     
BIT2  	= 000004	#4-153      4-198      4-207      4-232      5-250      5-266      5-276      5-300      7-426     
                         7-427      7-428      7-429     
BIT3  	= 000010	#4-153      4-206      5-250      5-266      5-300      5-321      5-322     
BIT4  	= 000020	#4-153      4-206      5-249      5-266      15-989    
BIT5  	= 000040	#4-153      4-206      5-248      5-266      5-320     
BIT6  	= 000100	#4-153      4-206      7-423      7-424      7-425      7-426      7-427      7-428      7-429     
                         7-430      7-431      7-432      7-433      7-434      7-435      7-436      7-437      7-438     
BIT7  	= 000200	#4-153      4-205      4-233      4-238      5-247      5-265      5-299     
BIT8  	= 000400	#4-153      4-204      5-282      5-298     
BIT9  	= 001000	#4-153      4-204      5-281      5-298     
BPARER	= 000020	#4-153     
BP.CLN	= 074000	#4-203      14-939    
BP.CSP	= 000170	#4-206      14-925    
BP.ERR	= 100000	#4-202     
BP.LD0	= 000002	#4-208      11-793     17-1150    21-1345    22-1439    22-1441   
BP.LD1	= 000004	#4-207      17-1150    17-1151    21-1345    21-1355    22-1439    22-1441   
BP.RP4	= 000200	#4-205      26-1854   
BP.SWR	= 000001	#4-213      22-1435   
BP.UNT	= 003400	#4-204      14-934    
CDD   	= 000020	#4-153     
CHNPNT	= 000001	#4-153     
CMDCLN	= 000024	#6-367      8-452     
CMDCLR	  000040 R	#6-344      6-367      8-451     
CMDONE	  001574 R	 8-496     #9-548     
CNUPE 	= 000002	#4-153     
CS.EXP	= 177670	#4-153     
CTYBFL	= 000120	#6-379      8-466     
CTYBUF	  000230 R	#6-378      6-379      8-466     *8-474      8-475     
CTYLUN	= 000001	#4-186      8-463      8-466      24-1596   
CTYPTR	= ******  GX	 14-949    *14-951    
SAVE       CREATED BY  MACRO  ON 26-JUL-79 AT 10:09	PAGE 2

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

CYCLS 	= 000002	#4-153     
DATE  	= 000004	#4-153     
DCOMST	= 000001	#4-153     
DEFLAG	  000061 R	#6-365     *17-1102   *17-1126    18-1185   
DEP   	= 010000	#4-153     
DEVCHK	  001656 R	 9-559     #9-563     
DEVMNT	  002002 R	#9-590     
DEVNAM	  000042 R	#6-346     *8-483      9-550      9-561     *9-565      9-569      9-576      15-996    
DEVOK 	  001734 R	 9-570     #9-575     
DEVUNT	  000044 R	#6-347     *8-487      9-549     *9-566      11-790     29-2065    32-2306    35-2502   
DEX   	= 000400	#4-153     
DEXDON	= 000004	#4-153     
DEXWD1	= 174406	#4-153     
DEXWD2	= 174404	#4-153     
DEXWD3	= 174402	#4-153     
DFUNC 	= 000200	#4-153     
DF.DMG	= 000004	#4-153     
DF.DMN	= 000007	#4-153     
DF.DOR	= 000001	#4-153     
DF.EHG	= 000010	#4-153     
DF.EHM	= 000011	#4-153     
DF.EMG	= 000005	#4-153     
DF.EMN	= 000006	#4-153     
DF.KLR	= 000012	#4-153     
DF.KLW	= 000013	#4-153     
DF.KLX	= 000014	#4-153     
DF.OFF	= 000002	#4-153     
DF.ON 	= 000003	#4-153     
DF.PDP	= 000016	#4-153     
DF.PEX	= 000015	#4-153     
DHEXPA	= 160020	#5-326      14-968    
DHEXPZ	= 000020	#5-327      14-977    
DHSTAB	  001124 R	#7-422      14-930    
DHTBL 	= ******  GX	 14-936     14-969    
DIAG1 	= 174430	#4-153     
DIAG2 	= 174432	#4-153     
DIAG3 	= 174436	#4-153     
DIKL10	= 000010	#4-153     
DLTBL 	= ******  GX	 14-927    *14-959    *14-960    *14-961    *14-962    *14-963    
DLYCNT	= 174400	#4-153     
DL.CAR	= ******  GX	 21-1347   
DMFLAG	  000052 R	#6-357     *8-459      8-530      10-718    
DMOERR	  002454 R	 10-729    #10-741    
DMTBLK	  001116 R	#7-410      10-720    
DNSERR	  001642 R	 9-557     #9-560     
DON10C	= 040000	#4-153     
DON10S	= 100000	#4-153     
DON11C	= 000100	#4-153     
DON11S	= 000200	#4-153     
DPS4  	= 040000	#4-153     
DRESET	= 000100	#4-153     
DRVADR	  000002 R	#6-338     *9-580      9-686      11-780     11-828     12-875    
SAVE       CREATED BY  MACRO  ON 26-JUL-79 AT 10:09	PAGE 3

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

DRVAD1	= 000012	 11-782    #26-1853   #26-1854   #26-1855   
DRVAD2	= 000014	 11-783    #26-1853   #26-1854   #26-1855   
DRVBOT	= 000004	 11-829    #26-1853   #26-1854   #26-1855   
DRVBTP	= 000016	 11-792    #26-1853   #26-1854   #26-1855   
DRVMSZ	= 000010	 11-781    #26-1853   #26-1854   #26-1855   
DRVNAM	= 000000	 9-569     #26-1853   #26-1854   #26-1855   
DRVSET	= 000002	 9-687      9-687     #26-1853   #26-1854   #26-1855   
DRVSIZ	= 000020	 9-571     #26-1853   #26-1854   #26-1855   
DRVTAB	  006706 R	 9-567      9-572     #26-1852    26-1856   
DRVTBZ	= 000060	 9-572     #26-1856   
DRVWRT	= 000006	 12-876     12-876    #26-1853   #26-1854   #26-1855   
DR.DTE	= 000011	#4-153     
DSEND 	= 000004	#4-153     
DSKADR	  000004 R	#6-339      7-399      9-679      9-680     *9-709     *9-710      11-782     11-783    *12-871    
                        *12-872     29-2071    32-2314    32-2315    35-2499   
DSKLUN	= 000002	#4-187      9-556      10-727     19-1209    25-1802   
DSKSIZ	  000010 R	#6-340      9-648      9-650     
DS04  	= 004000	#4-153     
DS05  	= 002000	#4-153     
DS06  	= 001000	#4-153     
DTCL11	= 002000	#5-319      17-1130   
DTECHK	  003644 R	 15-1007   #17-1097   
DTECMD	= 000451	#4-153     
DTEFLG	= 000444	#4-153     
DTEF11	= 000450	#4-153     
DTEMSG	  004154 R	 18-1172   #18-1177   
DTEMTD	= 000455	#4-153     
DTEMTI	= 000456	#4-153     
DTEXPA	= 174400	#5-314      17-1100   
DTEXPZ	= 000040	#5-315      17-1136   
DTINOF	= 000010	#5-321      17-1130   
DTINON	= 000040	#5-320      17-1124   
DTPMSG	  004200 R	 18-1179   #18-1184   
DTPMS1	  004216 R	 18-1182   #18-1188   
DTRSMD	= 000010	#5-322      17-1117   
DTSTAT	= 000034	#5-317      17-1117   *17-1124   *17-1130    17-1143   
DTVECA	= 000774	#5-313      17-1099   
DT11DB	= 004000	#5-318      17-1124   
DUPE  	= 000020	#4-153     
DURE  	= 000004	#4-153     
DV.LOG	= ******  GX	 6-386     
DXWRD1	= 002000	#4-153     
D.CCTY	= ******  GX	*14-952    
D.CKLN	= ******  GX	 21-1417   
D1011 	= 000040	#4-153     
EBSEL 	= 000100	#4-153     
EBUSPC	= 000020	#4-153     
EBUSPS	= 000004	#4-153     
EDONES	= 040000	#4-153     
EF.PR1	= ******  GX	 11-764     21-1357    21-1402   
EF.PR2	= ******  GX	 11-764     21-1357   
EF.QIO	= 000001	#4-192     
SAVE       CREATED BY  MACRO  ON 26-JUL-79 AT 10:09	PAGE 4

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

EF.RKP	= ******  GX	 21-1359    21-1368   
EF.TMO	= 000002	#4-195     
EPTR  	= 000000	#4-153     
ERRMSG	  001453 R	 24-1645   #24-1649   
ERR10C	= 010000	#4-153     
ERR10S	= 020000	#4-153     
ERR11C	= 000001	#4-153     
ERR11S	= 000002	#4-153     
EV.PF 	= ******  GX	 18-1166   
EXFLAG	  000050 R	#6-355     *8-457      8-530      22-1451   
EXIT  	  005576 R	 8-521      21-1424    22-1452   #22-1457    22-1459    24-1597   
EXITA 	  001526 R	 8-464      8-467      8-469      8-471     #8-520     
EXIT00	  005564 R	 22-1442    22-1447   #22-1450   
EX.AC1	= 000001	#4-231      9-659     
EX.ENA	= 000200	#4-233      9-659     
EX.FCO	= 000004	#4-232      9-659     
E.FLOG	= 000004	#4-197     #4-198      21-1416    21-1419   
E.FQIO	= 000001	#4-191      8-466      24-1596    25-1802   
E.FTMO	= 000002	#4-194      21-1340    21-1362    21-1363    21-1364   
FIDBLK	  001076 R	#7-393      9-618     
FILCHK	  002252 R	 9-672     #9-674     
FILDMO	  002332 R	#10-717    
FILDMX	  002512 R	 10-724     10-726    #10-749    
FILDM1	  002350 R	#10-722     10-752    
FILDM2	  002442 R	 10-732     10-734    #10-736    
FILDM3	  002464 R	 10-740    #10-743    
FILDM4	  002502 R	 10-745    #10-747    
FILFND	  002060 R	#9-617      9-677     
FILMNT	  006576 R	 9-600      9-600      10-738     10-738     19-1217    19-1217   #25-1781   
FILOK 	  002312 R	 9-681      9-683     #9-685     
FILQIO	  006612 R	 9-628      9-628      9-662      9-662      9-671      9-671      20-1264    20-1264   #25-1801   
FILSET	  002322 R	#9-708     
FINDEV	  006520 R	 9-558      9-558      15-997     15-997     15-1006    15-1006    16-1063    16-1063    19-1238   
                         19-1238   #25-1753   
FNDACP	  006556 R	 9-596      9-596      19-1213    19-1213   #25-1771   
FORPRO	= 000020	#4-153     
FTABS 	= ******	 6-352      8-531      9-609      9-688      26-1853    26-1854    26-1855    27-1865    30-2199   
                         33-2354   
GETNAM	  005630 R	 8-481      8-481      8-506      8-506     #23-1495   
GETNB 	  005606 R	 8-479      8-479      8-495      8-495     #23-1479    23-1482    23-1484   
GETNUM	  005674 R	 8-485      8-485     #23-1525   
GTIMBF	  000020 R	#6-343      11-760     24-1674    24-1677    24-1684    24-1687    24-1693   
G.TICP	= 000016	#11-760    
G.TICT	= 000014	#11-760    
G.TIDA	= 000004	#11-760     24-1684   
G.TIHR	= 000006	#11-760     24-1674   
G.TIMI	= 000010	#11-760     24-1677   
G.TIMO	= 000002	#11-760     24-1687   
G.TISC	= 000012	#11-760    
G.TIYR	= 000000	#11-760     24-1693   
HBCERR	  004652 R	 20-1289    20-1295   #20-1299   
HIBYTE	= 177400	#4-153     
SAVE       CREATED BY  MACRO  ON 26-JUL-79 AT 10:09	PAGE 5

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

HOMBUF	  000064 R	#6-376      20-1261    20-1272    20-1291   
HOMFE0	= 000061	#4-225      20-1272    20-1291   
HOMFE1	= 000062	#4-226     
HOMNAM	= 000000	#4-223     
IFLOP 	= 100000	#4-153     
INTROF	= 000010	#4-153     
INTRON	= 000040	#4-153     
INTSON	= 000001	#4-153     
INT10S	= 000400	#4-153     
INT11C	= 002000	#4-153     
INT11S	= 004000	#4-153     
IO.ACE	= 007400	 9-622     
IO.APV	= 014010	 25-1782   
IO.DAC	= 010000	 9-667     
IO.EXT	= 011400	 9-657     
IO.RLB	= 001000	 8-466      20-1260   
IO.WLB	= 000400	 24-1596   
KBS0  	= ******  GX	 14-959    
KBS1  	= ******  GX	 14-960    
KLAREM	  005334 R	 21-1397   #21-1401   
KLAUSR	  005324 R	 21-1394   #21-1399   
KLINIT	  001120 R	#7-415      22-1432   
KLNPTR	= ******  GX	 21-1341   
KLPWRF	= 000010	#4-153     
KL.CFM	= ******  GX	 22-1434   
KL.DEF	= ******  GX	 22-1434   
KL.LCA	= ******  GX	 22-1434   
KL.LRM	= ******  GX	 22-1434   
KL.LVB	= ******  GX	 22-1434   
KL.VBN	= ******  GX	 22-1437   
K.LRBA	= ******  GX	 21-1414   
LKS   	= 177546	#5-331      11-776    
LOAD11	= 000004	#4-153     
LOGBUF	  001070 R	#6-384      21-1404   
LOWCOR	  000064 R	#6-372      6-382      11-830    
MEMSIZ	  000014 R	#6-341     *9-644      11-781    *12-873     29-2091    32-2338    35-2557   
MNTBLK	  001110 R	#7-404      9-599      19-1215   
MNTSY 	  004252 R	#19-1203   
MNTSY1	  004274 R	#19-1208    19-1240   
MNTSY2	  004364 R	 19-1210   #19-1221   
MODTBL	  001532 R	 8-508     #8-525      8-536     
MODTLN	= 000006	 8-509     #8-536     
MOFLAG	  000051 R	#6-356      8-530      9-591     
MONTAB	  006362 R	 24-1690   #24-1706   
MOUNTD	  002050 R	 9-594     #9-603     
MPE11 	= 001000	#4-153     
M$$MGE	= ******	 11-784     11-798     13-893     26-1853    26-1854    26-1855    28-1997    28-2037    29-2075   
                         31-2258    31-2281    34-2449    34-2472   
NOTRXF	  004700 R	#20-1307   
NULSTP	= 000040	#4-153     
NUPE  	= 000002	#4-153     
PERCLR	= 001000	#4-153     
SAVE       CREATED BY  MACRO  ON 26-JUL-79 AT 10:09	PAGE 6

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

PHYS  	= 100000	#4-153     
PIDENT	= 000000	#4-153     
PRI7  	= 000340	#4-153     
PRNRUN	  005440 R	 21-1358   #21-1422   
PROPNT	= 000021	#4-153     
PRTOFF	= 004000	#4-153     
PR0   	= 000000	#4-153     
PR1   	= 000040	#4-153     
PR2   	= 000100	#4-153     
PR3   	= 000140	#4-153     
PR4   	= 000200	#4-153     
PR5   	= 000240	#4-153      17-1125   
PR6   	= 000300	#4-153     
PR7   	= 000340	#4-153      11-772     17-1128    18-1189    28-1996    28-2040    31-2257    31-2284    34-2448   
                         34-2475   
PS    	= 177776	#4-153      11-772     11-772     11-797     16-1054    16-1059    17-1104    17-1109    17-1114   
                         17-1125    17-1128    17-1132    18-1189    18-1189    18-1191    21-1367    21-1367    21-1392   
                         28-1996    31-2257    34-2448   
PSWW1 	= 000005	#4-153     
PSWW10	= 000014	#4-153     
PSWW11	= 000015	#4-153     
PSWW12	= 000016	#4-153     
PSWW13	= 000017	#4-153     
PSWW2 	= 000006	#4-153     
PSWW3 	= 000007	#4-153     
PSWW4 	= 000010	#4-153     
PSWW5 	= 000011	#4-153     
PSWW6 	= 000012	#4-153     
PSWW7 	= 000013	#4-153     
PS.PUS	= 030000	#4-218      11-797     16-1054    17-1104    17-1132   
PS.REG	= 004000	#4-219      28-2040    31-2284    34-2475   
PS.USR	= 140000	#4-217     
PUDADR	  000040 R	#6-345     *9-581      15-999    *15-1003   *15-1010    19-1204   *19-1239    24-1628   
PUDIDX	  000045 R	#6-348     *9-586      10-733     15-1027   
PULSE 	= 000020	#4-153     
QEFLAG	  000056 R	#6-361     *9-652      25-1803   *25-1810   
QIOSTS	  001064 R	#6-383      8-466      8-468      8-470      8-473      25-1802    25-1807   
QSIZE 	= 000023	#4-153     
Q.DA  	= ******  GX	*14-952    
Q.SZ  	= ******  GX	*14-952    
RADIX 	  000016 R	#6-342     *24-1636   *24-1673   *24-1699    24-1726    24-1728   
RAMIS0	= 010000	#4-153     
REDHM1	  004520 R	 20-1254   #20-1256   
REDHOM	  004466 R	 19-1205    19-1212    19-1223    19-1226    19-1234   #20-1248   
REDSY 	  003240 R	#15-986    
RESTOR	  002762 RG	 12-870    #13-887     28-2042    31-2286    32-2348    34-2477   
RFMAD0	= 100000	#4-153     
RFMAD1	= 040000	#4-153     
RFMAD2	= 020000	#4-153     
RFMAD3	= 010000	#4-153     
RHFLAG	  000053 R	#6-358     *8-458      8-530     *9-578      16-1040    20-1249   
RHMERR	  004716 R	 20-1265   #20-1315   
SAVE       CREATED BY  MACRO  ON 26-JUL-79 AT 10:09	PAGE 7

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

RM    	= 000010	#4-153     
RNFLAG	  000054 R	#6-359     *16-1045    20-1251   
RNRERR	  004730 R	 20-1252   #20-1319   
RPATA 	= 100000	#5-278      31-2245    32-2332   
RPBA  	= 176704	#5-273     *31-2224   *32-2313   
RPBAD1	= 007546 R	 26-1854   #31-2225   
RPBAD2	= 007554 R	 26-1854   #31-2227   
RPBMSZ	  007632 R	 26-1854   #31-2252   
RPBNXT	  007572 R	#31-2234    31-2253   
RPBOOT	  007530 R	 26-1854   #31-2217    31-2244    31-2246    31-2288   
RPCS1 	= 176700	#5-261      16-1072   *16-1074   *31-2224   *31-2226   *31-2228   *31-2229   *31-2235    31-2245   
                         32-2304   *32-2306   *32-2313   *32-2314   *32-2315   *32-2316   *32-2322    32-2332   
RPCS2 	= 176710	#5-275     *16-1042   *16-1067   *32-2306   
RPDA  	= 176706	#5-274     *31-2228   *32-2315   
RPDC  	= 176734	#5-289     *31-2226   *32-2314   
RPDPR 	= 000400	#5-282      16-1068   
RPDS  	= 176712	#5-277      16-1043    16-1047    16-1068    31-2245    32-2332   
RPDT  	= 176726	#5-283      16-1077   
RPDT04	= 000020	#5-284     
RPDT06	= 000022	#5-285      16-1077   
RPDVA 	= 004000	#5-264      16-1072    32-2310   
RPECCI	= 004000	#5-288      31-2229    32-2316   
RPERR 	= 040000	#5-279      31-2245    32-2332   
RPFLAG	  000055 R	#6-360     *16-1049    20-1253   
RPFM22	= 010000	#5-287     
RPFUNC	= 000076	#5-266     
RPGO  	= 000001	#5-271      16-1074    31-2222    32-2312   
RPMCPE	= 020000	#5-263      31-2243    32-2330   
RPMOL 	= 010000	#5-280      16-1043   
RPNOOP	= 000000	#5-267      16-1074   
RPOF  	= 176732	#5-286     *31-2229   *32-2316   
RPPGM 	= 001000	#5-281      16-1047    16-1068   
RPPRST	= 000020	#5-268      31-2222    32-2312   
RPRDY 	= 000200	#5-265     
RPREAD	= 000070	#5-270      31-2230   
RPSET 	  007460 R	 26-1854   #30-2177   
RPTRE 	= 040000	#5-262      31-2243    32-2330   
RPUNIT	= 000007	#5-276     
RPWC  	= 176702	#5-272     *31-2235   *32-2322   
RPWNXT	  007744 R	#32-2321    32-2339   
RPWRIT	= 000060	#5-269      32-2317   
RPWRT 	  007664 R	 26-1854   #32-2303   
RP4CHK	  003422 R	#16-1039   
RP6CHK	  003466 R	 16-1041    16-1048   #16-1053   
RQSKLR	  005000 R	 20-1250    20-1313    20-1321   #21-1339   
RQSTSK	  005452 R	 21-1350    21-1403    21-1420   #22-1431   
RXBAD1	  007034 R	 26-1853   #28-1908   
RXBAD2	  007034 R	 26-1853   #28-1909   
RXBBLK	  007036 R	#28-1920    28-2028    28-2028   
RXBBLX	  007176 R	 28-1906   #28-1995   
RXBMSZ	  007230 R	 26-1853   #28-2032   
RXBNXT	  007216 R	#28-2023    28-2033   
SAVE       CREATED BY  MACRO  ON 26-JUL-79 AT 10:09	PAGE 8

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

RXBNX1	  007222 R	 28-2019   #28-2029   
RXBOOT	  006776 R	 26-1853   #28-1890    28-1906    28-1970    28-1989    28-2028    28-2028    28-2044   
RXCS  	= 177170	#5-244     *28-1959   *28-1963    28-1979    29-2070   *29-2115   *29-2154   *29-2158   
RXDB  	= 177172	#5-257     *28-1959   *28-1963    28-1979   *29-2115   *29-2154   *29-2158   
RXDONE	= 000040	#5-248      28-1968    28-1976    29-2112    29-2163   
RXEMPT	= 000002	#5-252      28-1974   
RXERR 	= 100000	#5-245      28-1968    29-2163   
RXFILL	= 000000	#5-251      29-2110   
RXFUNC	= 000016	#5-250     
RXGO  	= 000001	#5-256      28-1899    28-1974    29-2069    29-2110   
RXINIT	= 040000	#5-246     
RXREAD	= 000006	#5-254      28-1899   
RXRERR	= 000016	#5-255     
RXSET 	  006766 R	 26-1853   #27-1862   
RXSETX	  006772 R	#27-1873   
RXTREQ	= 000200	#5-247      28-1976    29-2112   
RXUNIT	= 000020	#5-249      28-1897    29-2067   
RXWBLK	  007320 R	 29-2089    29-2089   #29-2104   
RXWNXT	  007300 R	#29-2084    29-2092   
RXWRIT	= 000004	#5-253      29-2069   
RXWRT 	  007246 R	 26-1853   #29-2058   
R$$11M	= 000001	#1-27      
R$$20F	= 000001	#1-26      
SAVE  	  001170 RG	#8-447      8-480      22-1453    24-1605    36-2568   
SAVLMT	  001164 RG	#7-440      9-634     
SCD   	= 000040	#4-153     
SETCTY	  003014 R	#14-923    
SETDH 	  003202 R	#14-967    
SETDL 	  003144 R	 14-926    #14-958    
SETFIL	  002060 R	 9-592      9-601     #9-608     
SETRXF	  004662 R	 20-1297   #20-1303   
SF.FX 	= ******  GX	 15-1025   
SOMRXF	  004774 R	 20-1305   #20-1331   
SPSAVE	  000000 RG	#6-337     *11-859     13-888    
STAT  	= 174434	#4-153     
STATUS	= 000022	#4-153     
STSW0 	= ******  GX	*14-954    
STSW1 	= ******  GX	*14-950    *14-953     21-1349   *21-1383   *21-1386   *21-1390   
SWR   	= 177570	#4-153     
SWSLLT	= 100000	#4-153     
SXBTHM	= 105755	#4-224      20-1267   
SYMNTD	  004404 R	 19-1219   #19-1228   
SYMNT1	  004414 R	 19-1225   #19-1230   
SYNERR	  001562 R	 8-482      8-486      8-498      8-507     #8-540     
SYSAVE	  002524 R	 10-719    #11-759    
SYSAV1	  002556 R	 11-765    #11-770    
SYSMSG	  004236 R	 18-1186   #18-1195   
SYSTRT	  004110 R	 17-1152   #18-1162   
S.DI  	= ******  GX	 10-733     15-1027   *15-1029   
S.FW  	= ******  GX	 15-1025   
TCBA  	= 177346	#5-308     *34-2388   *35-2504   
TCBAD1	= 010032 R	 26-1855   #34-2382   
SAVE       CREATED BY  MACRO  ON 26-JUL-79 AT 10:09	PAGE 9

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

TCBAD2	= 010032 R	 26-1855   #34-2383   
TCBMSZ	  010176 R	 26-1855   #34-2442   
TCBNXT	  010150 R	#34-2429    34-2443   
TCBOOT	  010026 R	 26-1855   #34-2374    34-2403    34-2436    34-2479    35-2519   
TCCM  	= 177342	#5-295     *34-2388    34-2402    34-2409    34-2419   *34-2430    35-2498   *35-2504    35-2518   
                         35-2525    35-2535   *35-2546   
TCDT  	= 177350	#5-309      34-2409    34-2419    35-2525    35-2535   
TCENDZ	= 100000	#5-294     
TCERR 	= 100000	#5-296     
TCFUNC	= 000016	#5-300     
TCGO  	= 000001	#5-306      34-2444    35-2559   
TCRDY 	= 000200	#5-299     
TCREAD	= 000004	#5-303      34-2425   
TCREV 	= 004000	#5-297      34-2394    34-2404    34-2412    35-2510    35-2520    35-2528   
TCRNUM	= 000002	#5-302      34-2392    35-2508   
TCSATM	= 000000	#5-301     
TCSET 	  010022 R	 26-1855   #33-2362   
TCST  	= 177340	#5-293      34-2402    35-2518   
TCSTOP	= 000010	#5-304      34-2444    35-2559   
TCUNIT	= 003400	#5-298     
TCWC  	= 177344	#5-307     *34-2430   *35-2546   
TCWERR	  010426 R	 35-2552   #35-2564   
TCWNXT	  010366 R	#35-2545    35-2558   
TCWRIT	= 000014	#5-305      35-2541   
TCWRT 	  010234 R	 26-1855   #35-2497   
TENAD1	= 174410	#4-153     
TENAD2	= 174412	#4-153     
TOBM  	= 000004	#4-153     
TOD   	= 000003	#4-153     
TOIP  	= 000002	#4-153     
TOIT  	= 000001	#4-153     
TO10  	= 000200	#4-153     
TO10AD	= 174420	#4-153     
TO10BC	= 174414	#4-153     
TO10BM	= 000001	#4-153     
TO10DB	= 000400	#4-153     
TO10DN	= 100000	#4-153     
TO10DT	= 174424	#4-153     
TO10ER	= 020000	#4-153     
TO11  	= 000100	#4-153     
TO11AD	= 174422	#4-153     
TO11BC	= 174416	#4-153     
TO11BM	= 020000	#4-153     
TO11DB	= 004000	#4-153     
TO11DN	= 000200	#4-153     
TO11DT	= 174426	#4-153     
TO11ER	= 000002	#4-153     
TTYEND	= ******  GX	 14-978    
TTYEXP	= ******  GX	*14-959    *14-960    *14-961    *14-962    *14-963     14-969     21-1342   
TT.CRW	= ******  GX	 21-1349   
TT.CTY	= ******  GX	 14-950     14-953     21-1386    21-1390   
TT.OUT	= ******  GX	 21-1383   
SAVE       CREATED BY  MACRO  ON 26-JUL-79 AT 10:09	PAGE 10

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

TT.RIP	= ******  GX	 21-1349   
TYPBUF	  000064 R	#6-377      24-1569    24-1595    24-1596    25-1772   
TYPCR 	  006124 R	 24-1588   #24-1610   
TYPDAT	  006224 R	 24-1588   #24-1672   
TYPDEC	  006342 R	 24-1588   #24-1698   
TYPDEV	  006146 R	 24-1588   #24-1633   
TYPDON	  006032 R	 24-1588   #24-1593   
TYPERR	  006202 R	 24-1588   #24-1644   
TYPMAX	= 000013	 24-1577   #24-1589   
TYPMSG	  005740 R	 8-465      8-465      8-472      8-472      8-519      8-519      8-542      8-542      9-562     
                         9-562      9-574      9-574      9-602      9-602      9-604      9-604      9-673      9-673     
                         9-684      9-684      10-735     10-735     10-742     10-742     10-746     10-746     10-748    
                         10-748     11-766     11-766     18-1173    18-1173    18-1181    18-1181    18-1187    18-1187   
                         18-1197    18-1197    19-1207    19-1207    19-1220    19-1220    19-1229    19-1229    19-1241   
                         19-1241    20-1255    20-1255    20-1300    20-1300    20-1306    20-1306    20-1316    20-1316   
                         20-1320    20-1320    20-1324    20-1324    21-1395    21-1395    21-1396    21-1396    21-1400   
                         21-1400    21-1423    21-1423    22-1449    22-1449   #24-1566   
TYPMS1	  005760 R	#24-1575    24-1578    24-1583   
TYPNUM	  006442 R	 24-1638    24-1638    24-1675    24-1675    24-1682    24-1682    24-1685    24-1685    24-1694   
                         24-1700    24-1700   #24-1718   
TYPSAV	  006116 R	 24-1588   #24-1604   
TYPSDV	  006142 R	 24-1588   #24-1627   
TYPSTR	  006214 R	 24-1588    24-1646   #24-1664    24-1666    24-1691    24-1691   
TYPTAB	  006004 R	 24-1582    24-1582   #24-1587    24-1589   
TYPTXT	  006130 R	 24-1588   #24-1617    24-1635    24-1635   
TYPWRN	  006210 R	 24-1588   #24-1654   
UNASG1	= 000032	#4-153     
UNASG2	= 000033	#4-153     
UNASG3	= 000034	#4-153     
UNASG4	= 000035	#4-153     
UNASG5	= 000036	#4-153     
UNASG6	= 000037	#4-153     
U.ACP 	= ******  GX	*9-597      10-731    *19-1214   
U.DACP	= ******  GX	 25-1775   
U.DN  	= ******  GX	 9-565      10-727     19-1209    19-1222    19-1231    24-1634    25-1756   
U.LBH 	= ******  GX	*16-1066   *16-1080   
U.LBN 	= ******  GX	*16-1065   *16-1079   
U.RP  	= ******  GX	 9-564      10-723    *15-1008   
U.SZ  	= ******  GX	 9-584      10-750     15-1017    25-1761   
U.UN  	= ******  GX	 9-566      10-727    *15-1000    16-1042    19-1209    19-1232    24-1637    25-1758   
U.VA  	= ******  GX	 9-593      10-725     10-744     19-1211   
WBFLAG	  000046 R	#6-349      8-530     *12-869    
WEFLAG	  000060 R	#6-363      18-1171   *32-2347   
WEP   	= 000010	#4-153     
WRNMSG	  001476 R	 24-1655   #24-1659   
WRTERR	  010012 R	 29-2165    32-2311    32-2331    32-2333   #32-2346    35-2565   
WSFLAG	  000047 R	#6-351     *8-456      8-530     *12-867    
WTSAVE	  002716 R	#12-866     12-877    
ZSTOP 	= 040000	#4-153     
$BTMSK	= ******  GX	*14-945    
$DIV  	= ******  GX	 9-585      9-585      15-1018    15-1018    30-2191    30-2191   
$DSW  	= ******  GX	 10-728     22-1448    25-1805   
SAVE       CREATED BY  MACRO  ON 26-JUL-79 AT 10:09	PAGE 11

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

$UNIT 	= ******  GX	*14-947    
$$    	= 000037	#8-465      8-465     #8-472      8-472     #8-479      8-479     #8-481      8-481     #8-485     
                         8-485     #8-495      8-495     #8-506      8-506     #8-519      8-519     #8-542      8-542     
                        #9-558      9-558     #9-562      9-562     #9-574      9-574     #9-585      9-585     #9-596     
                         9-596     #9-600      9-600     #9-602      9-602     #9-604      9-604     #9-628      9-628     
                        #9-662      9-662     #9-671      9-671     #9-673      9-673     #9-684      9-684     #9-687     
                         9-687     #10-735     10-735    #10-738     10-738    #10-742     10-742    #10-746     10-746    
                        #10-748     10-748    #11-766     11-766    #12-876     12-876    #15-997     15-997    #15-1006   
                         15-1006   #15-1018    15-1018   #16-1063    16-1063   #17-1154    17-1154   #18-1167    18-1167   
                        #18-1173    18-1173   #18-1181    18-1181   #18-1187    18-1187   #18-1197    18-1197   #19-1207   
                         19-1207   #19-1213    19-1213   #19-1217    19-1217   #19-1220    19-1220   #19-1229    19-1229   
                        #19-1238    19-1238   #19-1241    19-1241   #20-1255    20-1255   #20-1264    20-1264   #20-1300   
                         20-1300   #20-1306    20-1306   #20-1316    20-1316   #20-1320    20-1320   #20-1324    20-1324   
                        #21-1395    21-1395   #21-1396    21-1396   #21-1400    21-1400   #21-1418    21-1418   #21-1423   
                         21-1423   #22-1449    22-1449   #24-1582    24-1582   #24-1635    24-1635   #24-1638    24-1638   
                        #24-1675    24-1675   #24-1682    24-1682   #24-1685    24-1685   #24-1691    24-1691   #24-1700   
                         24-1700   #24-1736    24-1736   #28-1921    28-1921   #28-1922    28-1922   #28-2028    28-2028   
                        #29-2089    29-2089   #29-2105    29-2105   #29-2106    29-2106   #30-2191    30-2191   
$$$   	= 001420 R	#8-465      8-465     #8-472      8-472     #8-519      8-519     #8-542      8-542     #9-562     
                         9-562     #9-574      9-574     #9-602      9-602     #9-604      9-604     #9-673      9-673     
                        #9-684      9-684     #10-735     10-735    #10-742     10-742    #10-746     10-746    #10-748    
                         10-748    #11-766     11-766    #18-1173    18-1173   #18-1181    18-1181   #18-1187    18-1187   
                        #18-1197    18-1197   #19-1207    19-1207   #19-1220    19-1220   #19-1229    19-1229   #19-1241   
                         19-1241   #20-1255    20-1255   #20-1300    20-1300   #20-1306    20-1306   #20-1316    20-1316   
                        #20-1320    20-1320   #20-1324    20-1324   #21-1395    21-1395   #21-1396    21-1396   #21-1400   
                         21-1400   #21-1423    21-1423   #22-1449    22-1449   
$$$ADR	= 006746 R	#26-1853    26-1853    26-1853    26-1853    26-1853    26-1853    26-1853    26-1853    26-1853   
                         26-1853   #26-1854    26-1854    26-1854    26-1854    26-1854    26-1854    26-1854    26-1854   
                         26-1854    26-1854   #26-1855    26-1855    26-1855    26-1855    26-1855    26-1855    26-1855   
                         26-1855    26-1855    26-1855   
$$$ARG	= 000005	#8-463      8-463     #8-463      8-463     #8-463      8-463     #8-463      8-463      8-463     
                         8-463      8-463      8-463      8-463      8-463      8-463      8-463      8-463     #8-466     
                         8-466      8-466      8-466      8-466      8-466      8-466      8-466      8-466      8-466     
                         8-466      8-466     #9-556      9-556     #9-556      9-556     #9-556      9-556     #9-556     
                         9-556      9-556      9-556      9-556      9-556      9-556      9-556      9-556      9-556     
                         9-556     #10-727     10-727    #10-727     10-727    #10-727     10-727    #10-727     10-727    
                         10-727     10-727     10-727     10-727     10-727     10-727     10-727     10-727     10-727    
                        #19-1209    19-1209   #19-1209    19-1209   #19-1209    19-1209   #19-1209    19-1209    19-1209   
                         19-1209    19-1209    19-1209    19-1209    19-1209    19-1209    19-1209    19-1209   #21-1362   
                         21-1362    21-1362    21-1362    21-1362    21-1362    21-1362    21-1362    21-1362    21-1362   
                         21-1362   #24-1596    24-1596    24-1596    24-1596    24-1596    24-1596    24-1596    24-1596   
                         24-1596    24-1596    24-1596    24-1596   #25-1802    25-1802    25-1802    25-1802    25-1802   
                         25-1802    25-1802    25-1802    25-1802    25-1802    25-1802    25-1802   
$$$GLB	= ******	 11-760     11-760     11-760     11-760     11-760     11-760     11-760     11-760    
$$$OST	= 000020	#11-760     11-760     11-760    #11-760     11-760     11-760    #11-760     11-760     11-760    
                        #11-760     11-760     11-760    #11-760     11-760     11-760    #11-760     11-760     11-760    
                        #11-760     11-760     11-760    #11-760     11-760     11-760    #11-760    
$$$T1 	= 000013	#8-466      8-466     #24-1596    24-1596   #25-1802    25-1802   
$$$T2 	= 000001	#22-1446    22-1446   
.BRCLK	= 005000	#4-153     
.BTPRM	= ******  GX	*13-916     17-1149    21-1344    22-1433   
.CECLK	= 004000	#4-153     
SAVE       CREATED BY  MACRO  ON 26-JUL-79 AT 10:09	PAGE 12

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

.CLRMR	= 006000	#4-153     
.CLRUN	= 010000	#4-153     
.COMEF	= ******  GX	 11-764     21-1357    21-1359    21-1368    21-1402   
.CONBT	= 012000	#4-153     
.CPUSN	= ******  GX	*18-1164   
.CSHRG	= 164000	#4-153     
.DATE3	= ******  GX	*18-1163   
.DQPBA	= ******  GX	*14-952    
.DRLTC	= 015000	#4-153     
.DSACF	= 066000	#4-153     
.DSIOJ	= 065000	#4-153     
.EIOJA	= 067000	#4-153     
.FEMOD	= ******  GX	*21-1375   
.GFNR 	= 102000	#4-153     
.HRDWR	= ******  GX	*18-1165   
.INICL	= 070000	#4-153     
.IRLTC	= 014000	#4-153     
.KLIWD	= ******  GX	*22-1445   
.KLNMD	= ******  GX	 21-1370    21-1373    21-1375   *21-1379    21-1384    21-1393    21-1405    21-1407   
.KLNSW	= ******  GX	*21-1373   
.LCRDL	= 052000	#4-153     
.LCRDR	= 051000	#4-153     
.LCRM1	= 057000	#4-153     
.LCRM2	= 056000	#4-153     
.LCRM3	= 055000	#4-153     
.LCRM4	= 054000	#4-153     
.LCRM5	= 053000	#4-153     
.LDAR 	= 077000	#4-153     
.LDBRL	= 043000	#4-153     
.LDBRR	= 042000	#4-153     
.LDCK1	= 046000	#4-153     
.LDCK2	= 047000	#4-153     
.LDDIS	= 045000	#4-153     
.LDRJD	= 064000	#4-153     
.LDRJV	= 063000	#4-153     
.LDRM1	= 060000	#4-153     
.LDRM2	= 061000	#4-153     
.LDRM3	= 062000	#4-153     
.LDSEL	= 044000	#4-153     
.MEMRS	= 076000	#4-153     
.NOERR	= ******  GX	*11-771    *17-1153   
.PCAB1	= 150000	#4-153     
.PCAB2	= 151000	#4-153     
.PCAB3	= 152000	#4-153     
.PCAB4	= 153000	#4-153     
.PRDTE	= ******  GX	*17-1141    18-1178   
.PRSTA	= ******  GX	*17-1145   *18-1180   
.PUDBA	= ******  GX	 9-583      10-721     15-1016    25-1754   
.PUDEA	= ******  GX	 10-751     25-1762   
.RCRM1	= 147000	#4-153     
.RCRM2	= 146000	#4-153     
.RCRM3	= 145000	#4-153     
SAVE       CREATED BY  MACRO  ON 26-JUL-79 AT 10:09	PAGE 13

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

.RCRM4	= 144000	#4-153     
.RCSPF	= 141000	#4-153     
.RDJ14	= 134000	#4-153     
.RDJ71	= 135000	#4-153     
.RDMAB	= 133000	#4-153     
.RPADR	= ******  GX	 20-1273    20-1292    20-1304    20-1308    20-1326   *20-1332   
.SECLK	= 003000	#4-153     
.SERFG	= ******  GX	*18-1166   
.SETMR	= 007000	#4-153     
.SETRN	= 011000	#4-153     
.SSCLK	= 002000	#4-153     
.STDTA	= ******  GX	 15-1020   
.STDTZ	= ******  GX	 15-1022   
.STPCL	= 000000	#4-153     
.STRCL	= 001000	#4-153     
.VERNO	= ******  GX	 18-1196   
.WRMBX	= 071000	#4-153     
..DTP2	= ******  GX	 17-1154    17-1154   
..ENB0	= ******  GX	 18-1167    18-1167   
..FSTD	= ******  GX	 25-1776   
..STIN	= ******  GX	 21-1418    21-1418   
SAVE       CREATED BY  MACRO  ON 26-JUL-79 AT 10:09	PAGE 14

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

ALUN$S		#4-151     #8-463     #9-556     #10-727    #19-1209   
CALL  		#1-23      #4-152      8-465      8-472      8-479      8-481      8-485      8-495      8-506      8-519     
                 8-542      9-558      9-562      9-574      9-585      9-596      9-600      9-602      9-604      9-628     
                 9-662      9-671      9-673      9-684      9-687      10-735     10-738     10-742     10-746     10-748    
                 11-766     12-876     15-997     15-1006    15-1018    16-1063    17-1154    18-1167    18-1173    18-1181   
                 18-1187    18-1197    19-1207    19-1213    19-1217    19-1220    19-1229    19-1238    19-1241    20-1255   
                 20-1264    20-1300    20-1306    20-1316    20-1320    20-1324    21-1395    21-1396    21-1400    21-1418   
                 21-1423    22-1449    24-1582    24-1635    24-1638    24-1675    24-1682    24-1685    24-1691    24-1700   
                 24-1736    28-1921    28-1922    28-2028    29-2089    29-2105    29-2106    30-2191   
CLEF$S		#4-151      21-1340    21-1364   
DIR$  		#8-463      8-463     #8-466      8-466     #9-556      9-556     #10-727     10-727    #11-760     11-760    
                #19-1209    19-1209   #21-1340    21-1340   #21-1362    21-1362   #21-1363    21-1363   #21-1364    21-1364   
                #21-1419    21-1419   #22-1446    22-1446   #22-1458    22-1458   #24-1596    24-1596   #25-1802    25-1802   
DRIVER		#26-1822   #26-1853   #26-1854   #26-1855   
ERROR 		#4-171     #8-519     #8-542     #9-562     #9-574     #9-602     #9-673     #9-684     #10-735    #10-742    
                #10-746    #11-766    #18-1173   #21-1423   
ERR$  		#8-463     #8-466     #9-556     #10-727    #11-760    #19-1209   #21-1340   #21-1362   #21-1363   #21-1364   
                #21-1419   #22-1446   #22-1458   #24-1596   #25-1802   
EXIT$S		#4-151     #22-1458   
GTIM$S		#4-151     #11-760    
MFPI  		#4-152      16-1056    16-1057    17-1106    17-1107    17-1111    17-1112   
MFPS  		#4-152     
MOV$  		#8-463     #8-463     #8-463     #8-463     #8-463     #8-466     #8-466     #8-466     #8-466     #8-466     
                #8-466     #8-466     #8-466     #9-556     #9-556     #9-556     #9-556     #9-556     #10-727    #10-727    
                #10-727    #10-727    #10-727    #11-760    #11-760    #19-1209   #19-1209   #19-1209   #19-1209   #19-1209   
                #21-1340   #21-1340   #21-1362   #21-1362   #21-1362   #21-1362   #21-1362   #21-1363   #21-1363   #21-1364   
                #21-1364   #21-1419   #21-1419   #22-1446   #22-1446   #24-1596   #24-1596   #24-1596   #24-1596   #24-1596   
                #24-1596   #24-1596   #24-1596   #24-1596   #25-1802   #25-1802   #25-1802   #25-1802   #25-1802   #25-1802   
                #25-1802   #25-1802   #25-1802   #25-1802   #25-1802   
MRKT$S		#4-151      21-1362   
MTPI  		#4-152      16-1089    16-1090    17-1134    17-1135    17-1147    17-1148   
MTPS  		#4-152     #16-1058   #16-1059   #17-1108   #17-1109   #17-1113   #17-1114   
MVB$  		#8-466     #8-466     #22-1446   #22-1446   #24-1596   #24-1596   #25-1802   #25-1802   
NBL$  		#8-463     #8-463     #9-556     #9-556     #10-727    #10-727    #19-1209   #19-1209   
OFF$  		#11-760     11-760     11-760     11-760     11-760     11-760     11-760     11-760     11-760    
POP   		#4-152     #10-739    #13-892    #19-1218   #24-1598   #24-1599   #24-1738   #28-1985   #29-2169   #30-2194   
PUSH  		#4-152     #8-465     #8-472     #8-519     #8-542     #9-562     #9-574     #9-602     #9-604     #9-673     
                #9-684     #10-735    #10-737    #10-742    #10-746    #10-748    #11-766    #11-838    #18-1173   #18-1181   
                #18-1187   #18-1197   #19-1207   #19-1216   #19-1220   #19-1229   #19-1241   #20-1255   #20-1300   #20-1306   
                #20-1316   #20-1320   #20-1324   #21-1395   #21-1396   #21-1400   #21-1423   #22-1449   #24-1567   #24-1733   
                #28-1906   #28-1926   #28-1932   #28-2016   #28-2040   #28-2042   #29-2121   #29-2127   #30-2189   #31-2277   
                #31-2284   #31-2286   #34-2468   #34-2475   #34-2477   
QDPB$S		#8-466     #8-466     #24-1596   #24-1596   #25-1802   #25-1802   
QIOSY$		#4-151      4-154     
QIOW$S		#4-151      8-466      24-1596    25-1802   
RETURN		#1-23      #4-152      23-1487    23-1517    23-1543    24-1600    24-1623    24-1640    24-1668    24-1702   
                 24-1741    25-1766    25-1814    27-1875    28-1987    29-2094    29-2171    30-2195    32-2340    33-2364   
                 35-2560   
RFA$  		#22-1446    22-1446    22-1446   
RQST$S		#4-151      22-1446   
RVP$  		#8-463     #8-463     #8-466     #8-466     #9-556     #9-556     #10-727    #10-727    #19-1209   #19-1209   
                #21-1362   #21-1362   #24-1596   #24-1596   #25-1802   #25-1802   
SAVE       CREATED BY  MACRO  ON 26-JUL-79 AT 10:09	PAGE 15

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

SPD   		#7-419     #7-423     #7-424     #7-425     #7-426     #7-427     #7-428     #7-429     #7-430     #7-431     
                #7-432     #7-433     #7-434     #7-435     #7-436     #7-437     #7-438     
TYPE  		#4-158      8-465      8-472      8-519      8-542      9-562      9-574      9-602      9-604      9-673     
                 9-684      10-735     10-742     10-746     10-748     11-766     18-1173    18-1181    18-1187    18-1197   
                 19-1207    19-1220    19-1229    19-1241    20-1255    20-1300    20-1306    20-1316    20-1320    20-1324   
                 21-1395    21-1396    21-1400    21-1423    22-1449   
WARN  		#4-175     #9-604     #19-1220   #19-1241   #20-1255   #20-1300   #20-1306   #20-1316   #20-1320   #20-1324   
                #21-1395   #21-1396   #21-1400   #22-1449   
WTSE$S		#4-151     #21-1363   #21-1419   
$DEF  		#4-151      4-153     
.ENB  		#4-152     #18-1191   
.ENB6 		#4-152     #21-1392   
.INH  		#4-152     #11-772    #18-1189   
.INH6 		#4-152      21-1367