SYSCHGMOD       - SYSTEM SERVICES TO CHANGE MODE                 21-AUG-1978 23:36:23   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (1)    4700  CHANGE MODE TO EXECUTIVE AND KERNEL

SYSCHGMOD       - SYSTEM SERVICES TO CHANGE MODE                 21-AUG-1978 23:36:23   VAX-11 MACRO X0.3-11               Page   1

01                                                                                                                               (1)



                                     0000   100 	.TITLE	SYSCHGMOD - SYSTEM SERVICES TO CHANGE MODE

                                     0000   200 	.IDENT	/01/

                                     0000   300  

                                     0000   400 ;

                                     0000   500 ; COPYRIGHT (C) 1977

                                     0000   600 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

                                     0000   700 ;

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

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

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

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

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

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

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

                                     0000  1500 ;

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

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

                                     0000  1800 ; EQUIPMENT CORPORATION.

                                     0000  1900 ;

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

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

                                     0000  2200 ;

                                     0000  2300 ; D. N. CUTLER 30-SEP-76

                                     0000  2400 ;

                                     0000  2500 ; SYSTEM SERVICES TO CHANGE MODE

                                     0000  2600 ;

                                     0000  2700 ;	CHANGE MODE TO EXECUTIVE

                                     0000  2800 ;	CHANGE MODE TO KERNEL

                                     0000  2900 ;

                                     0000  3000 ; MACRO LIBRARY CALLS

                                     0000  3100 ;

                                     0000  3200  

                                     0000  3300 	$PCBDEF				;DEFINE PCB OFFSETS

                                     0000  3400 	$PRVDEF				;DEFINE PRIVILEGE BITS

                                     0000  3500 	$PSLDEF				;DEFINE PROCESSOR STATUS FIELDS

                                     0000  3600 	$SSDEF				;DEFINE SYSTEM STATUS VALUES

                                     0000  3700  

                                     0000  3800 ;

                                     0000  3900 ; LOCAL SYMBOLS

                                     0000  4000 ;

                                     0000  4100 ; ARGUMENT LIST OFFSET DEFINITIONS

                                     0000  4200 ;

                                     0000  4300  

                           00000004  0000  4400 ROUTIN=4				;ADDRESS OF ROUTINE TO BE EXECUTED

                           00000008  0000  4500 ARGLST=8				;ADDRESS OF ARGUMENT LIST

SYSCHGMOD       - SYSTEM SERVICES TO CHANGE MODE                 21-AUG-1978 23:36:23   VAX-11 MACRO X0.3-11               Page   2

01              CHANGE MODE TO EXECUTIVE AND KERNEL                                                                              (1)



                                     0000  4700 	.SBTTL	CHANGE MODE TO EXECUTIVE AND KERNEL

                                     0000  4800 ;+

                                     0000  4900 ; EXE$CMEXEC - CHANGE MODE TO EXECUTIVE

                                     0000  5000 ; EXE$CMKRNL - CHANGE MODE TO KERNEL

                                     0000  5100 ;

                                     0000  5200 ; THESE SERVICES PROVIDE THE CAPABILITY TO CHANGE THE CURRENT PROCESSOR

                                     0000  5300 ; ACCESS MODE AND CALL A SPECIFIED ROUTINE WITH A SPECIFIED ARGUMENT LIST.

                                     0000  5400 ;

                                     0000  5500 ; INPUTS:

                                     0000  5600 ;

                                     0000  5700 ;	ROUTIN(AP) = ADDRESS OF ROUTINE TO BE EXECUTED AT SPECIFIED MODE.

                                     0000  5800 ;	ARGLST(AP) = ADDRESS OF ARGUMENT LIST TO BE PASSED TO ROUTINE.

                                     0000  5900 ;

                                     0000  6000 ;	IF ENTRY AT EXE$CMKRNL, THEN

                                     0000  6100 ;

                                     0000  6200 ;	R4 = CURRENT PROCESS PCB ADDRESS.

                                     0000  6300 ;

                                     0000  6400 ; OUTPUTS:

                                     0000  6500 ;

                                     0000  6600 ;	R0 LOW BIT CLEAR INDICATES FAILURE TO PERFORM SPECIFIED ROUTINE.

                                     0000  6700 ;

                                     0000  6800 ;		R0 = SS$_NOPRIV - PROCESS DOES NOT HAVE PRIVILEGE TO CHANGE

                                     0000  6900 ;			TO THE SPECIFIED ACCESS MODE.

                                     0000  7000 ;

                                     0000  7100 ;		R0 = FINAL VALUE RETURNED BY EXECUTED ROUTINE.

                                     0000  7200 ;

                                     0000  7300 ;	R0 LOW BIT SET INDICATES SUCCESSFUL COMPLETION.

                                     0000  7400 ;

                                     0000  7500 ;		R0 = FINAL VALUE RETURNED BY EXECUTED ROUTINE.

                                     0000  7600 ;-

                                     0000  7700  

                               0010' 0000  7800 	.ENTRY	EXE$CMEXEC,^M<R4>

            51            01     9A  0002  7900 	MOVZBL	#PRV$V_CMEXEC,R1	;SAVE PRIVILEGE BIT

            54   00000000'EF     D0  0005  8000 	MOVL	SCH$GL_CURPCB,R4	;GET CURRENT PCB ADDRESS

                          05     11  000C  8100 	BRB	CHGMOD			;CONTINUE IN COMMON CODE

                               0010' 000E  8200 	.ENTRY	EXE$CMKRNL,^M<R4>

            51            00     9A  0010  8300 	MOVZBL	#PRV$V_CMKRNL,R1	;GET PRIVILEGE BIT NUMBER

                          50     DC  0013  8400 CHGMOD:	MOVPSL	R0			;GET PSL

            50            17     E1  0015  8500 	BBC	#PSL$V_PRVMOD+1,R0,10$	;BRANCH IF CALLER IN EXEC OR KERNEL

                          08         0018       

            50            24     3C  0019  8600 	MOVZWL	#SS$_NOPRIV,R0		;ASSUME PROCESS CANNOT CHANGE MODE

                                     001C  8700 	IFNPRIV	R1,20$			;PROCESS HAVE PRIVILEGE TO CHANGE MODE?

         04 BC         08 BC     FA  0021  8800 10$:	CALLG	@ARGLST(AP),@ROUTIN(AP)	;CALL SPECIFIED ROUTINE

                                 04  0026  8900 20$:	RET				;

                                     0027  9000  

                                     0027  9100 	.END

SYSCHGMOD       - SYSTEM SERVICES TO CHANGE MODE                 21-AUG-1978 23:36:23   VAX-11 MACRO X0.3-11               Page   3

SYMBOL TABLE                                                                                                                     (1)



ARGLST         = 00000008            PCB$W_BIOLM      00000040            PSL$M_TP       = 40000000            

BIT...         = 00000000            PCB$W_BYTCNT     00000042            PSL$S_CURMOD   = 00000002            

CHGMOD           00000013 R     01   PCB$W_BYTLM      00000068            PSL$S_IPL      = 00000005            

EXE$CMEXEC       00000000 RG    01   PCB$W_DIOCNT     00000044            PSL$S_PRVMOD   = 00000002            

EXE$CMKRNL       0000000E RG    01   PCB$W_DIOLM      00000046            PSL$V_CM       = 0000001F            

GBL...         = 00000000            PCB$W_FILCNT     00000048            PSL$V_CURMOD   = 00000018            

PCB$B_ASTACT     0000000C            PCB$W_GPGCNT     00000038            PSL$V_DV       = 00000007            

PCB$B_ASTEN      0000000D            PCB$W_GRP        00000022            PSL$V_FPD      = 0000001B            

PCB$B_PRI        0000000B            PCB$W_MEM        00000020            PSL$V_FU       = 00000006            

PCB$B_PRIB       00000033            PCB$W_MTXCNT     0000000E            PSL$V_IPL      = 00000010            

PCB$B_TYPE       0000000A            PCB$W_PPGCNT     0000003A            PSL$V_IS       = 0000001A            

PCB$B_WEFC       00000032            PCB$W_PRCCNT     0000006A            PSL$V_IV       = 00000005            

PCB$C_LENGTH     0000007C            PCB$W_SIZE       00000008            PSL$V_PRVMOD   = 00000016            

PCB$K_LENGTH     0000007C            PCB$W_STATE      00000030            PSL$V_TBIT     = 00000004            

PCB$L_ASTQBL     00000014            PCB$W_TMBU       00000036            PSL$V_TP       = 0000001E            

PCB$L_ASTQFL     00000010            PCB$W_TQCNT      0000004A            ROUTIN         = 00000004            

PCB$L_EFC2P      00000058            PRV$V_ALLSPOOL = 00000004            SCH$GL_CURPCB    ********   X   01   

PCB$L_EFC3P      0000005C            PRV$V_BUGCHK   = 00000017            SS$_ABORT      = 0000002C            

PCB$L_EFCS       00000050            PRV$V_CMEXEC   = 00000001            SS$_ACCONFLICT = 00000800            

PCB$L_EFCU       00000054            PRV$V_CMKRNL   = 00000000            SS$_ACCVIO     = 0000000C            

PCB$L_EFWM       0000004C            PRV$V_DETACH   = 00000005            SS$_ARITH      = 00000404            

PCB$L_OWNER      0000001C            PRV$V_DEVCHAR  = 00000011            SS$_ASTFLT     = 0000040C            

PCB$L_PHD        00000064            PRV$V_DIAGNOSE = 00000006            SS$_BADATTRIB  = 00000034            

PCB$L_PHYPCB     00000018            PRV$V_EXQUOTA  = 00000013            SS$_BADCHKSUM  = 00000808            

PCB$L_PID        00000060            PRV$V_GROUP    = 00000008            SS$_BADESCAPE  = 0000003C            

PCB$L_PQB        0000004C            PRV$V_GRPNAM   = 00000003            SS$_BADFILEHDR = 00000810            

PCB$L_SQBL       00000004            PRV$V_LOG_IO   = 00000007            SS$_BADFILENAME= 00000818            

PCB$L_SQFL       00000000            PRV$V_NETMBX   = 00000014            SS$_BADFILEVER = 00000820            

PCB$L_STS        00000028            PRV$V_NOACNT   = 00000009            SS$_BADIMGHDR  = 00000044            

PCB$L_UIC        00000020            PRV$V_OPER     = 00000012            SS$_BADIRECTORY= 00000828            

PCB$L_WSSWP      00000024            PRV$V_PHY_IO   = 00000016            SS$_BADPARAM   = 00000014            

PCB$L_WTIME      0000002C            PRV$V_PRMCEB   = 0000000A            SS$_BADSTACK   = 000002B4            

PCB$T_LNAME      0000006C            PRV$V_PRMGBL   = 00000018            SS$_BEGOFFILE  = 00000938            

PCB$V_ASTPEN   = 00000011            PRV$V_PRMMBX   = 0000000B            SS$_BLOCKCNTERR= 00000940            

PCB$V_BATCH    = 0000000E            PRV$V_PSWAPM   = 0000000C            SS$_BREAK      = 00000414            

PCB$V_DELPEN   = 00000001            PRV$V_SETPRI   = 0000000D            SS$_BUFFEROVF  = 00000601            

PCB$V_FORCPEN  = 00000002            PRV$V_SETPRV   = 0000000E            SS$_BUGCHECK   = 000002A4            

PCB$V_HIBER    = 00000013            PRV$V_SYSGBL   = 00000019            SS$_CANCEL     = 00000830            

PCB$V_INQUAN   = 00000003            PRV$V_SYSNAM   = 00000002            SS$_CHANINTLK  = 0000004C            

PCB$V_LOGIN    = 00000014            PRV$V_TMPMBX   = 0000000F            SS$_CLIFRCEXT  = 00000980            

PCB$V_NOACNT   = 0000000F            PRV$V_VOLPRO   = 00000015            SS$_CMODSUPR   = 0000041C            

PCB$V_PHDRES   = 00000012            PRV$V_WORLD    = 00000010            SS$_CMODUSER   = 00000424            

PCB$V_PSWAPM   = 00000004            PSL$C_EXEC     = 00000001            SS$_COMPAT     = 0000042C            

PCB$V_RES      = 00000000            PSL$C_KERNEL   = 00000000            SS$_CONTINUE   = 00000001            

PCB$V_RESPEN   = 00000005            PSL$C_SUPER    = 00000002            SS$_CONTROLC   = 00000651            

PCB$V_SSFEXC   = 00000006            PSL$C_USER     = 00000003            SS$_CONTROLO   = 00000609            

PCB$V_SSFEXCE  = 00000007            PSL$M_CM       = 80000000            SS$_CONTROLY   = 00000611            

PCB$V_SSFEXCS  = 00000008            PSL$M_CURMOD   = 03000000            SS$_CREATED    = 00000619            

PCB$V_SSFEXCU  = 00000009            PSL$M_DV       = 00000080            SS$_CTRLERR    = 00000054            

PCB$V_SSRWAIT  = 0000000A            PSL$M_FPD      = 08000000            SS$_DATACHECK  = 0000005C            

PCB$V_SUSPEN   = 0000000B            PSL$M_FU       = 00000040            SS$_DATAOVERUN = 00000838            

PCB$V_SWPVBN   = 00000010            PSL$M_IPL      = 001F0000            SS$_DEBUG      = 0000046C            

PCB$V_WAKEPEN  = 0000000C            PSL$M_IS       = 04000000            SS$_DEVACTIVE  = 000002C4            

PCB$V_WALL     = 0000000D            PSL$M_IV       = 00000020            SS$_DEVALLOC   = 00000840            

PCB$W_APTCNT     00000034            PSL$M_PRVMOD   = 00C00000            SS$_DEVALRALLOC= 00000641            

PCB$W_ASTCNT     0000003C            PSL$M_SAFBITS  = 000037FF            SS$_DEVASSIGN  = 00000848            

PCB$W_BIOCNT     0000003E            PSL$M_TBIT     = 00000010            SS$_DEVFOREIGN = 00000064            

SYSCHGMOD       - SYSTEM SERVICES TO CHANGE MODE                 21-AUG-1978 23:36:23   VAX-11 MACRO X0.3-11               Page   4

SYMBOL TABLE                                                                                                                     (1)



SS$_DEVICEFULL = 00000850            SS$_IVLOGTAB   = 0000015C            SS$_SECTBLFUL  = 0000021C            

SS$_DEVMOUNT   = 0000006C            SS$_IVPROTECT  = 000002F4            SS$_SSFAIL     = 0000045C            

SS$_DEVNOTALLOC= 00000858            SS$_IVQUOTAL   = 00000164            SS$_SUPERSEDE  = 00000631            

SS$_DEVNOTMBX  = 00000074            SS$_IVSECFLG   = 0000016C            SS$_TAPEPOSLOST= 00000224            

SS$_DEVNOTMOUNT= 0000007C            SS$_IVSECIDCTL = 000002E4            SS$_TBIT       = 00000464            

SS$_DEVOFFLINE = 00000084            SS$_IVSSRQ     = 00000174            SS$_TIMEOUT    = 0000022C            

SS$_DIRFULL    = 00000860            SS$_IVSTSFLG   = 0000017C            SS$_TOOMANYVER = 00000990            

SS$_DRVERR     = 0000008C            SS$_IVTIME     = 00000184            SS$_TOOMUCHDATA= 0000029C            

SS$_DUPFILENAME= 00000868            SS$_LENVIO     = 0000018C            SS$_UNASEFC    = 00000234            

SS$_DUPLNAM    = 00000094            SS$_LKWSETFUL  = 00000194            SS$_UNSAFE     = 0000023C            

SS$_ENDOFFILE  = 00000870            SS$_MBFULL     = 000008D8            SS$_UNWIND     = 00000920            

SS$_ENDOFTAPE  = 00000878            SS$_MBTOOSML   = 0000019C            SS$_UNWINDING  = 00000928            

SS$_ENDOFUSRLBL= 00000970            SS$_MCHECK     = 000002BC            SS$_VASFULL    = 00000244            

SS$_EXQUOTA    = 0000001C            SS$_MEDOFL     = 000001A4            SS$_VECINUSE   = 0000024C            

SS$_EXTIDXFILE = 00000880            SS$_MSGNOTFND  = 00000621            SS$_VOLINV     = 00000254            

SS$_FCPREADERR = 00000888            SS$_MUSTCLOSEFL= 00000948            SS$_WAITUSRLBL = 00000950            

SS$_FCPREPSTN  = 00000988            SS$_NODATA     = 000001AC            SS$_WASCLR     = 00000001            

SS$_FCPREWNDERR= 00000890            SS$_NOHANDLER  = 000008F8            SS$_WASECC     = 00000639            

SS$_FCPSPACERR = 00000898            SS$_NOHOMEBLK  = 000008E0            SS$_WASSET     = 00000009            

SS$_FCPWRITERR = 000008A0            SS$_NOIOCHAN   = 000001B4            SS$_WRITLCK    = 0000025C            

SS$_FILACCERR  = 0000009C            SS$_NOLINKS    = 0000027C            

SS$_FILALRACC  = 000000A4            SS$_NOLOGNAM   = 000001BC            

SS$_FILELOCKED = 000008A8            SS$_NOMBX      = 00000274            

SS$_FILENUMCHK = 000008B0            SS$_NOMOREFILES= 00000930            

SS$_FILESEQCHK = 000008B8            SS$_NONEXDRV   = 000001C4            

SS$_FILESTRUCT = 000008C0            SS$_NONEXPR    = 000008E8            

SS$_FILNOTACC  = 000000AC            SS$_NONLOCAL   = 000008F0            

SS$_FILNOTCNTG = 000002AC            SS$_NOPRIV     = 00000024            

SS$_FILNOTEXP  = 000000B4            SS$_NORMAL     = 00000001            

SS$_FORMAT     = 000000BC            SS$_NOSIGNAL   = 00000900            

SS$_GPTFULL    = 000000C4            SS$_NOSOLICIT  = 00000284            

SS$_GSDFULL    = 000000CC            SS$_NOSUCHDEV  = 00000908            

SS$_GSDNOTXXX  = 000000D4            SS$_NOSUCHFILE = 00000910            

SS$_HANGUP     = 000002CC            SS$_NOSUCHNODE = 0000028C            

SS$_HEADERFULL = 000008C8            SS$_NOSUCHSEC  = 00000978            

SS$_IDXFILEFULL= 000008D0            SS$_NOTAPEOP   = 00000264            

SS$_ILLBLKNUM  = 000000DC            SS$_NOTFILEDEV = 000001CC            

SS$_ILLCNTRFUNC= 000000E4            SS$_NOTINTBLSZ = 000001D4            

SS$_ILLEFC     = 000000EC            SS$_NOTLABELMT = 000001DC            

SS$_ILLIOFUNC  = 000000F4            SS$_NOTNETDEV  = 000002EC            

SS$_ILLLBLAST  = 00000968            SS$_NOTRAN     = 00000629            

SS$_ILLPAGCNT  = 000000FC            SS$_NOTSQDEV   = 000001E4            

SS$_ILLSEQOP   = 000002DC            SS$_OPCCUS     = 00000434            

SS$_ILLSER     = 00000104            SS$_OPCDEC     = 0000043C            

SS$_ILLUSRLBLRD= 00000958            SS$_OPINCOMPL  = 000002D4            

SS$_ILLUSRLBLWT= 00000960            SS$_PAGOWNVIO  = 000001EC            

SS$_INCVOLLABEL= 0000010C            SS$_PAGRDERR   = 00000444            

SS$_INSFARG    = 00000114            SS$_PARITY     = 000001F4            

SS$_INSFMEM    = 00000124            SS$_PARTESCAPE = 000001FC            

SS$_INSFRAME   = 0000012C            SS$_PFMBSY     = 00000204            

SS$_INSFWSL    = 0000011C            SS$_PSTFULL    = 0000020C            

SS$_IVADDR     = 00000134            SS$_RADRMOD    = 0000044C            

SS$_IVCHAN     = 0000013C            SS$_REJECT     = 00000294            

SS$_IVCHNLSEC  = 0000026C            SS$_REMOTE     = 00000649            

SS$_IVDEVNAM   = 00000144            SS$_RESIGNAL   = 00000918            

SS$_IVGSDNAM   = 0000014C            SS$_RESULTOVF  = 00000214            

SS$_IVLOGNAM   = 00000154            SS$_ROPRAND    = 00000454            

SYSCHGMOD       - SYSTEM SERVICES TO CHANGE MODE                 21-AUG-1978 23:36:23   VAX-11 MACRO X0.3-11               Page   5

PROGRAM SECTION SYNOPSIS                                                                                                         (1)







PROGRAM SECTION SYNOPSIS



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

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

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





THERE WERE NO ERRORS OR WARNINGS.

16344. BYTES LEFT IN FREE MEMORY POOL.

3468. BYTES OF RECLAIMED MEMORY.

OBJ$:SYSCHGMOD,LIS$:SYSCHGMOD/-SP=LIB$:LIB/ML,SRC$:SYSCHGMOD

3 MLB DIR RDS - 500 GETS TO DEFINE 14 MACROS. 39 INTER. FILE WRITES. 

