MCRSTATUS       - SET COMPLETION STATUS                          22-AUG-1978 01:54:20   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (1)      42  SET COMPLETION STATUS

MCRSTATUS       - SET COMPLETION STATUS                          22-AUG-1978 01:54:20   VAX-11 MACRO X0.3-11               Page   1

01                                                                                                                               (1)



                                     0000     1 	.TITLE	MCRSTATUS - SET COMPLETION STATUS

                                     0000     2 	.IDENT	/01/

                                     0000     3  

                                     0000     4 ;

                                     0000     5 ; COPYRIGHT (C) 1977

                                     0000     6 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

                                     0000     7 ;

                                     0000     8 ; THIS SOFTWARE IS FURNISHED UNDER  A LICENSE FOR USE ONLY  ON  A

                                     0000     9 ; SINGLE COMPUTER SYSTEM AND MAY BE  COPIED ONLY WITH  THE INCLU-

                                     0000    10 ; SION OF  THE  ABOVE  COPYRIGHT NOTICE.  THIS SOFTWARE,  OR  ANY

                                     0000    11 ; OTHER COPIES THEREOF, MAY NOT BE  PROVIDED  OR  OTHERWISE  MADE

                                     0000    12 ; AVAILABLE TO ANY OTHER PERSON EXCEPT  FOR  USE  ON  SUCH SYSTEM

                                     0000    13 ; AND TO  ONE WHO AGREES  TO  THESE LICENSE  TERMS.  TITLE TO AND

                                     0000    14 ; OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC.

                                     0000    15 ;

                                     0000    16 ; THE INFORMATION IN THIS SOFTWARE  IS  SUBJECT TO CHANGE WITHOUT

                                     0000    17 ; NOTICE AND SHOULD NOT BE CONSTRUED  AS  A COMMITMENT BY DIGITAL

                                     0000    18 ; EQUIPMENT CORPORATION.

                                     0000    19 ;

                                     0000    20 ; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS

                                     0000    21 ; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

                                     0000    22 ;

                                     0000    23 ; D. N. CUTLER 18-MAY-77

                                     0000    24 ;

                                     0000    25 ; SET COMPLETION STATUS

                                     0000    26 ;

                                     0000    27 ; MACRO LIBRARY CALLS

                                     0000    28 ;

                                     0000    29  

                                     0000    30 	DEFCMDBLK			;DEFINE COMMAND BLOCK OFFSETS

                                     0000    31 	DEFCMDWRK			;DEFINE WORK AREA OFFSETS

                                     0000    32 	$PSLDEF				;DEFINE PROCESSOR STATUS REGISTER FIELDS

                                     0000    33  

                                     0000    34 ;

                                     0000    35 ; LOCAL DATA

                                     0000    36 ;

                                     0000    37  

                                 00000000    38 	.PSECT	MCR$ZCODE,BYTE,RD,NOWRT

                                     0000    39 EXIT:					;EXIT COMMAND TEXT

                  00 54 49 58 45 05  0000    40 	.ASCII	<5>/EXIT/<0>		;

MCRSTATUS       - SET COMPLETION STATUS                          22-AUG-1978 01:54:20   VAX-11 MACRO X0.3-11               Page   2

01              SET COMPLETION STATUS                                                                                            (1)



                                     0006    42 	.SBTTL	SET COMPLETION STATUS

                                     0006    43 ;+

                                     0006    44 ; MCR$SET_STATUS - SET COMPLETION STATUS

                                     0006    45 ;

                                     0006    46 ; THIS ROUTINE IS CALLED TO SET THE COMPLETION STATUS OF A COMMAND. IT IS

                                     0006    47 ; CALLED FROM A POINT AT WHICH INDIRECT FILES AND ALL OTHER CONTEXT CAN BE

                                     0006    48 ; DESTROYED IF APPROPRIATE.

                                     0006    49 ;

                                     0006    50 ; INPUTS:

                                     0006    51 ;

                                     0006    52 ;	R0 = COMPLETION STATUS VALUE.

                                     0006    53 ;

                                     0006    54 ;	IT IS ASSUMED THAT "ON ERROR" CONDITIONS HAVE BEEN ESTABLISHED.

                                     0006    55 ;

                                     0006    56 ; OUTPUTS:

                                     0006    57 ;

                                     0006    58 ;	THE THREE COMPONENTS OF THE COMPLETION STATUS ARE CONVERTED TO ASCII

                                     0006    59 ;	AND EQUATED TO THEIR RESPECTIVE SYMBOL NAMES.

                                     0006    60 ;-

                                     0006    61  

                                     0006    62 MCR$SET_STATUS::			;SET COMPLETION STATUS

            05            50     E9  0006    63 	BLBC	R0,5$			;BR IF ERROR STATUS OF SOME KIND

         C9 AD            03     E0  0009    64 	BBS	#CMD_V_NOSTAT,WRK_B_CMDFLG(FP),40$ ; BR IF NO STATUS COMMAND

                          76         000D       

                                     000E    65 5$:	DISABLE				;DISABLE CONTROL Y/C AST'S

                          8E     7C  0011    66 	CLRQ	(SP)+			;REMOVE RETURN INFORMATION FROM STACK

                          50     DD  0013    67 	PUSHL	R0			;SAVE COMPLETION STATUS VALUE

                          0C     18  0015    68 	BGEQ	10$			;IF GEQ NOT COMMAND INTERPRETER STATUS

            50            50     CE  0017    69 	MNEGL	R0,R0			;NEGATE COMPLETION STATUS

            50       E000 8F     A8  001A    70 	BISW	#^X0E000,R0		;ADD CLI SUBSYSTEM SPECIFY DIVIDED BY 4

            50            04     C5  001F    71 	MULL3	#4,R0,(SP)		;CONVERT TO SCALED ERROR NUMBER

                          6E         0022       

            03            00     EF  0023    72 10$:	EXTZV	#0,#3,(SP),R0		;EXTRACT SEVERITY LEVEL

            50            6E         0026       

            50            30     C0  0028    73 	ADDL	#^A/0/,R0		;CONVERT SEVERITY LEVEL TO ASCII

            51         40 AB     D0  002B    74 	MOVL	PRC_L_SEVERITY(R11),R1	;GET ADDRESS OF SEVERITY LEVEL VALUE

            61            50     90  002F    75 	MOVB	R0,(R1)			;SET SEVERITY LEVEL VALUE

            71            01     90  0032    76 	MOVB	#1,-(R1)		;SET LENGTH OF SEVERITY LEVEL VALUE

            52         44 AB     D0  0035    77 	MOVL	PRC_L_STATUS(R11),R2	;GET ADDRESS OF STATUS VALUE VALUE

            50            6E     D0  0039    78 	MOVL	(SP),R0			;GET STATUS VALUE

         FF A2            0A     90  003C    79 	MOVB	#10,-1(R2)		;SET LENGTH OF STRING

            82       5825 8F     B0  0040    80 	MOVW	#^A/%X/,(R2)+		;SET RADIX CONTROL CHARACTERS

                          FFB8'  30  0045    81 	BSBW	MCR$CNVHXL		;CONVERT TO HEX LONGWORD

                          04     BA  0048    82 	POPR	#^M<R2>			;RETRIEVE FINAL STATUS

         54 AB            0B     E0  004A    83 	BBS	#PRC_V_YLEVEL,PRC_W_FLAGS(R11),40$ ;IF SET, CONTROL Y/C LEVEL

                          35         004E       

       0094 CB            52     D0  004F    84 	MOVL	R2,PRC_L_LSTSTATUS(R11)	;SAVE LAST STATUS VALUE FOR PROCESS

            2D            52     E8  0054    85 	BLBS	R2,40$			;IF LBS SUCCESSFUL COMPLETION

            03            00     EF  0057    86 	EXTZV	#0,#3,R2,R0		;EXTRACT SEVERITY LEVEL

            50            52         005A       

         56 AB            50     91  005C    87 	CMPB	R0,PRC_W_ONLEVEL(R11)	;FATAL ERROR?

                          22     19  0060    88 	BLSS	40$			;IF LSS NO

                                     0062    89 	FLUSH				;FLUSH COMMAND BUFFER

            50         58 AB     D0  0065    90 	MOVL	PRC_L_ONERROR(R11),R0	;GET ADDRESS OF ON COMMAND TEXT

                          04     12  0069    91 	BNEQ	30$			;IF NEQ COMMAND SPECIFIED

            50         92 AF     9E  006B    92 	MOVAB	EXIT,R0			;GET ADDRESS OF EXIT COMMAND TEXT

            51            80     9A  006F    93 30$:	MOVZBL	(R0)+,R1		;GET LENGTH OF ON COMMAND TEXT

MCRSTATUS       - SET COMPLETION STATUS                          22-AUG-1978 01:54:20   VAX-11 MACRO X0.3-11               Page   3

01              SET COMPLETION STATUS                                                                                            (1)



            60            51     28  0072    94 	MOVC	R1,(R0),WRK_AB_BUFFER+CMDBUFSIZ+4(FP) ;MOVE COMMAND TO INPUT BUFFER

                     FF44 CD         0075       

                                 9E  0078    95 	MOVAB	WRK_AB_BUFFER+CMDBUFSIZ+3(FP),- ;SET INPUT BUFFER POINTER

         FC AD       FF43 CD         0079    96 		WRK_L_CHARPTR(FP)	;

                                     007E    97 	ONRESET				;RESET ON ERROR PARAMETERS

                          FF7C'  31  0081    98 	BRW	MCR$CMDSTART		;EXECUTE ON COMMAND

                                 05  0084    99 40$:	RSB				;

                                     0085   100  

                                     0085   101 	.END

MCRSTATUS       - SET COMPLETION STATUS                          22-AUG-1978 01:54:20   VAX-11 MACRO X0.3-11               Page   4

SYMBOL TABLE                                                                                                                     (1)



BIT...         = 00000000            MCR_V_OPNINP   = 00000006            PRC_Q_LABEL      00000030            

CMDBUFSIZ      = 000001FC            MCR_V_RAD50    = 00000000            PRC_Q_LOCAL      00000038            

CMD_AB_PAROUT    00000005            MCR_V_STRSUB   = 0000000C            PRC_V_CNTRLY   = 00000001            

CMD_B_DEFIMG     00000002            MSGBUFSIZ      = 00000084            PRC_V_DBGQUAL  = 00000009            

CMD_B_FLAGS      00000004            PRC_B_DEFRADIX   00000092            PRC_V_DBGTRUE  = 0000000A            

CMD_B_PARMCNT    00000001            PRC_B_EXMDEPMOD  00000091            PRC_V_DISABL   = 00000002            

CMD_B_QUABLK     00000003            PRC_B_EXMDEPWID  00000090            PRC_V_EXIT     = 00000003            

CMD_B_VERBTYP    00000000            PRC_K_DEC      = 00000001            PRC_V_GOEOF    = 00000000            

CMD_M_ABREV    = 00000020            PRC_K_HEX      = 00000000            PRC_V_GOTO     = 00000004            

CMD_M_DEFQUAL  = 00000010            PRC_K_LENGTH     000000A0            PRC_V_HANGUP   = 0000000C            

CMD_M_DEVNAM   = 00000080            PRC_K_OCT      = 00000002            PRC_V_IND      = 00000005            

CMD_M_IMMED    = 00000002            PRC_L_CLIWRK0    0000005C            PRC_V_MODE     = 00000006            

CMD_M_NOEQL    = 00000040            PRC_L_CLIWRK1    00000060            PRC_V_NOCTLY   = 0000000E            

CMD_M_NOSTAT   = 00000008            PRC_L_CLIWRK2    00000064            PRC_V_PAUSE    = 0000000D            

CMD_M_OPTION   = 00000001            PRC_L_CLIWRK3    00000068            PRC_V_USRDET   = 00000008            

CMD_M_PAROUT   = 00000004            PRC_L_CLIWRK4    0000006C            PRC_V_VERIFY   = 00000007            

CMD_S_MAXPARM  = 00000004            PRC_L_ERRRAB     00000010            PRC_V_YLEVEL   = 0000000B            

CMD_S_MINPARM  = 00000004            PRC_L_EXMDEPADR  0000008C            PRC_W_CLIFLAG    00000052            

CMD_V_ABREV    = 00000005            PRC_L_EXTARG     00000078            PRC_W_ERRIFI     00000052            

CMD_V_DEFQUAL  = 00000004            PRC_L_EXTBLK     00000070            PRC_W_FLAGS      00000054            

CMD_V_DEVNAM   = 00000007            PRC_L_EXTCOD     00000080            PRC_W_INPCHAN    00000050            

CMD_V_IMMED    = 00000001            PRC_L_EXTHND     00000074            PRC_W_ONLEVEL    00000056            

CMD_V_MAXPARM  = 00000004            PRC_L_EXTPRM     0000007C            PSL$C_EXEC     = 00000001            

CMD_V_MINPARM  = 00000000            PRC_L_INDEPTH    00000048            PSL$C_KERNEL   = 00000000            

CMD_V_NOEQL    = 00000006            PRC_L_INDFAB     0000001C            PSL$C_SUPER    = 00000002            

CMD_V_NOSTAT   = 00000003            PRC_L_INDINPRAB  00000014            PSL$C_USER     = 00000003            

CMD_V_OPTION   = 00000000            PRC_L_INDOUTRAB  00000018            PSL$M_CM       = 80000000            

CMD_V_PAROUT   = 00000002            PRC_L_INPRAB     00000008            PSL$M_CURMOD   = 03000000            

EXIT             00000000 R     03   PRC_L_LSTSTATUS  00000094            PSL$M_DV       = 00000080            

GBL...         = 00000000            PRC_L_ONCTLY     0000009C            PSL$M_FPD      = 08000000            

INPBUFSIZ      = 00000084            PRC_L_ONERROR    00000058            PSL$M_FU       = 00000040            

MCR$CMDSTART     ********   X   03   PRC_L_OUTRAB     0000000C            PSL$M_IPL      = 001F0000            

MCR$CNVHXL       ********   X   03   PRC_L_PROCUIC    00000098            PSL$M_IS       = 04000000            

MCR$DISABLE      ********   X   03   PRC_L_SAVAP      00000000            PSL$M_IV       = 00000020            

MCR$FLUSH        ********   X   03   PRC_L_SAVFP      00000004            PSL$M_PRVMOD   = 00C00000            

MCR$ONRESET      ********   X   03   PRC_L_SEVERITY   00000040            PSL$M_SAFBITS  = 000037FF            

MCR$SET_STATUS   00000006 RG    03   PRC_L_STACKLM    00000088            PSL$M_TBIT     = 00000010            

MCR_M_ALPHAN   = 00000002            PRC_L_STACKPT    00000084            PSL$M_TP       = 40000000            

MCR_M_DEFALT   = 00000008            PRC_L_STATUS     00000044            PSL$S_CURMOD   = 00000002            

MCR_M_DELINP   = 00000080            PRC_L_SYMBOL     0000004C            PSL$S_IPL      = 00000005            

MCR_M_DOLLARS  = 00000100            PRC_M_CNTRLY   = 00000002            PSL$S_PRVMOD   = 00000002            

MCR_M_ESCAPE   = 00000004            PRC_M_DBGQUAL  = 00000200            PSL$V_CM       = 0000001F            

MCR_M_ESCTRM   = 00000200            PRC_M_DBGTRUE  = 00000400            PSL$V_CURMOD   = 00000018            

MCR_M_GLOBAL   = 00000400            PRC_M_DISABL   = 00000004            PSL$V_DV       = 00000007            

MCR_M_LOWER    = 00000800            PRC_M_EXIT     = 00000008            PSL$V_FPD      = 0000001B            

MCR_M_OPNINP   = 00000040            PRC_M_GOEOF    = 00000001            PSL$V_FU       = 00000006            

MCR_M_RAD50    = 00000001            PRC_M_GOTO     = 00000010            PSL$V_IPL      = 00000010            

MCR_M_STRSUB   = 00001000            PRC_M_HANGUP   = 00001000            PSL$V_IS       = 0000001A            

MCR_V_ALPHAN   = 00000001            PRC_M_IND      = 00000020            PSL$V_IV       = 00000005            

MCR_V_DEFALT   = 00000003            PRC_M_MODE     = 00000040            PSL$V_PRVMOD   = 00000016            

MCR_V_DELINP   = 00000007            PRC_M_NOCTLY   = 00004000            PSL$V_TBIT     = 00000004            

MCR_V_DOLLARS  = 00000008            PRC_M_PAUSE    = 00002000            PSL$V_TP       = 0000001E            

MCR_V_ESCAPE   = 00000002            PRC_M_USRDET   = 00000100            RSLBUFSIZ      = 00000180            

MCR_V_ESCTRM   = 00000009            PRC_M_VERIFY   = 00000080            WRK_AB_BUFFER    FFFFFD44            

MCR_V_FORCMD   = 0000000E            PRC_M_YLEVEL   = 00000800            WRK_AG_RESULT    FFFFFBC0            

MCR_V_GLOBAL   = 0000000A            PRC_Q_ALLOCREG   00000020            WRK_B_CMDFLG     FFFFFFC9            

MCR_V_LOWER    = 0000000B            PRC_Q_GLOBAL     00000028            WRK_B_CURADX     FFFFFFCA            

MCRSTATUS       - SET COMPLETION STATUS                          22-AUG-1978 01:54:20   VAX-11 MACRO X0.3-11               Page   5

SYMBOL TABLE                                                                                                                     (1)



WRK_B_PARMCNT    FFFFFFCB            

WRK_B_VERBTYP    FFFFFFC8            

WRK_K_LENGTH     FFFFFBC0            

WRK_L_CHARPTR    FFFFFFFC            

WRK_L_IMAGE      FFFFFFEC            

WRK_L_MAXPARM    FFFFFFCC            

WRK_L_MINPARM    FFFFFFD0            

WRK_L_PAROUT     FFFFFFF0            

WRK_L_PROMPT     FFFFFFF4            

WRK_L_QUABLK     FFFFFFE8            

WRK_L_RSLNXT     FFFFFD40            

WRK_L_SAVAP      FFFFFFD8            

WRK_L_SAVFP      FFFFFFDC            

WRK_L_SAVSP      FFFFFFD4            

WRK_M_ALL      = 00000001            

WRK_M_ASK      = 00000100            

WRK_M_COMMAND  = 00000002            

WRK_M_CONTINU  = 00000400            

WRK_M_EQUAL    = 00000008            

WRK_M_IMCHNG   = 00000004            

WRK_M_QUAL     = 00000010            

WRK_M_QUOTE    = 00000020            

WRK_M_STAR     = 00000040            

WRK_M_TRAILSPC = 00000200            

WRK_M_VERB     = 00000080            

WRK_Q_IOSB       FFFFFFE0            

WRK_V_ALL      = 00000000            

WRK_V_ASK      = 00000008            

WRK_V_COMMAND  = 00000001            

WRK_V_CONTINU  = 0000000A            

WRK_V_EQUAL    = 00000003            

WRK_V_IMCHNG   = 00000002            

WRK_V_QUAL     = 00000004            

WRK_V_QUOTE    = 00000005            

WRK_V_STAR     = 00000006            

WRK_V_TRAILSPC = 00000009            

WRK_V_VERB     = 00000007            

WRK_W_FLAGS      FFFFFFFA            

WRK_W_LOCFLG     FFFFFFF8            





PROGRAM SECTION SYNOPSIS



.  ABS  .        00000000      00     NOPIC   USR   CON   ABS   LCL NOSHR NOEXE NORD  NOWRT BYTE  

. BLANK .        00000000      01     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  

$ABS$            FFFFFFFC      02     NOPIC   USR   CON   ABS   LCL NOSHR   EXE   RD    WRT BYTE  

MCR$ZCODE        00000085      03     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD  NOWRT BYTE  





THERE WERE NO ERRORS OR WARNINGS.

20148. BYTES LEFT IN FREE MEMORY POOL.

258. BYTES OF RECLAIMED MEMORY.

OBJ$:MCRSTATUS,LIS$:MCRSTATUS/-SP=EXECML$/ML,LIB$:MCR/ML,SRC$:MCRSTATUS

25 MLB DIR RDS - 314 GETS TO DEFINE 17 MACROS. 25 INTER. FILE WRITES. 

