SYSADJSTK       - SYSTEM SERVICE ADJUST OUTER MODE STACK POINTE  21-AUG-1978 20:17:50   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (1)      43  ADJUST OUTER MODE STACK POINTER

SYSADJSTK       - SYSTEM SERVICE ADJUST OUTER MODE STACK POINTE  21-AUG-1978 20:17:50   VAX-11 MACRO X0.3-11               Page   1

01                                                                                                                               (1)



                                     0000     1 	.TITLE	SYSADJSTK - SYSTEM SERVICE ADJUST OUTER MODE STACK POINTER

                                     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 9-JAN-77

                                     0000    24 ;

                                     0000    25 ; SYSTEM SERVICE ADJUST OUTER MODE STACK POINTER

                                     0000    26 ;

                                     0000    27 ; MACRO LIBRARY CALLS

                                     0000    28 ;

                                     0000    29  

                                     0000    30 	$PSLDEF				;DEFINE PROCESSOR STATUS FIELDS

                                     0000    31 	$SSDEF				;DEFINE SYSTEM STATUS VALUES

                                     0000    32  

                                     0000    33 ;

                                     0000    34 ; LOCAL SYMBOLS

                                     0000    35 ;

                                     0000    36 ; ARGUMENT LIST OFFSET DEFINITIONS

                                     0000    37 ;

                                     0000    38  

                           00000004  0000    39 ACMODE=4				;ACCESS MODE TO ADJUST STACK POINTER FOR

                           00000008  0000    40 ADJUST=8				;16-BIT SIGNED ADJUSTMENT VALUE

                           0000000C  0000    41 NEWADR=12				;ADDRESS OF LONGWORD TO STORE UPDATED VALUE

SYSADJSTK       - SYSTEM SERVICE ADJUST OUTER MODE STACK POINTE  21-AUG-1978 20:17:50   VAX-11 MACRO X0.3-11               Page   2

01              ADJUST OUTER MODE STACK POINTER                                                                                  (1)



                                     0000    43 	.SBTTL	ADJUST OUTER MODE STACK POINTER

                                     0000    44 ;+

                                     0000    45 ; EXE$ADJSTK - ADJUST OUTER MODE STACK POINTER

                                     0000    46 ;

                                     0000    47 ; THIS SERVICE PROVIDES THE CAPABILITY TO ADJUST THE STACK POINTER FOR

                                     0000    48 ; A MODE THAT IS LESS PRIVILEGED THAN THE CALLING ACCESS MODE. IT CAN BE

                                     0000    49 ; USED TO LOAD AN INITIAL VALUE INTO THE SPECIFIED MODE'S STACK POINTER OR

                                     0000    50 ; TO ADJUST ITS CURRENT VALUE.

                                     0000    51 ;

                                     0000    52 ; INPUTS:

                                     0000    53 ;

                                     0000    54 ;		ACMODE(AP) = ACCESS MODE TO ADJUST STACK POINTER FOR.

                                     0000    55 ;		ADJUST(AP) = 16-BIT SIGNED ADJUSTMENT VALUE.

                                     0000    56 ;		NEWADR(AP) = ADDRESS OF LONGWORD TO STORE UPDATED VALUE.

                                     0000    57 ;			IF THE INITIAL CONTENTS OF @NEWADR(AP) ARE NONZERO,

                                     0000    58 ;			THEN THE VALUE IS TAKEN AS THE CURRENT TOP OF STACK.

                                     0000    59 ;			ELSE THE CURRENT STACK POINTER FOR THE SPECIFIED MODE

                                     0000    60 ;			IS USED.

                                     0000    61 ;

                                     0000    62 ; OUTPUTS:

                                     0000    63 ;

                                     0000    64 ;	R0 LOW BIT CLEAR INDICATES FAILURE TO ADJUST STACK POINTER.

                                     0000    65 ;

                                     0000    66 ;		R0 = SS$_ACCVIO - LONGWORD TO STORE UPDATED STACK POINTER

                                     0000    67 ;			OR PART OF NEW STACK SEGMENT CANNOT BE WRITTEN BY

                                     0000    68 ;			CALLING ACCESS MODE.

                                     0000    69 ;

                                     0000    70 ;		R0 = SS$_NOPRIV - SPECIFED ACCESS MODE IS EQUAL OR MORE

                                     0000    71 ;			PRIVILEGED THAN CALLING ACCESS MODE.

                                     0000    72 ;

                                     0000    73 ;	R0 LOW BIT SET INDICATES SUCCESSFUL COMPLETION.

                                     0000    74 ;

                                     0000    75 ;		R0 = SS$_NORMAL - NORMAL COMPLETION.

                                     0000    76 ;-

                                     0000    77  

                                 00000000    78 	.PSECT	Y$EXEPAGED

                               007C' 0000    79 	.ENTRY	EXE$ADJSTK,^M<R2,R3,R4,R5,R6>

            55         0C AC     D0  0002    80 	MOVL	NEWADR(AP),R5		;GET ADDRESS TO STORE NEW STACK VALUE

            54   00000000'EF     D0  0006    81 	MOVL	SCH$GL_CURPCB,R4	;GET CURRENT PROCESS PCB ADDRESS

            02            00     EF  000D    82 	EXTZV	#0,#2,ACMODE(AP),R3	;GET ACCESS MODE TO MODIFY STACK POINTER FOR

            53         04 AC         0010       

                          52     DC  0013    83 	MOVPSL	R2			;READ CURRENT PSL

            02            16     ED  0015    84 	CMPZV	#PSL$V_PRVMOD,#PSL$S_PRVMOD,R2,R3 ;PREVIOUS MODE MORE PRIVILEGED?

            53            52         0018       

                          3F     18  001A    85 	BGEQ	50$			;IF GEQ NO

                                     001C    86 	IFNOWRT	#4,(R5),40$		;CAN NEW STACK VALUE BE WRITTEN?

            56            65     D0  0022    87 	MOVL	(R5),R6			;GET SPECIFIED STACK VALUE

                          03     12  0025    88 	BNEQ	10$			;IF NEQ VALUE SPECIFIED

            56            53     DB  0027    89 	MFPR	R3,R6			;

            50         08 AC     32  002A    90 10$:	CVTWL	ADJUST(AP),R0		;GET ADJUSTMENT VALUE

            56            50     C0  002E    91 	ADDL	R0,R6			;CALCULATE NEW TOP OF STACK

            50            50     CE  0031    92 	MNEGL	R0,R0			;ALLOCATION OF STACK SPACE?

                          17     15  0034    93 	BLEQ	30$			;IF LEQ NO

            51            56     D0  0036    94 	MOVL	R6,R1			;COPY NEW STACK VALUE

            52       FE00 8F     32  0039    95 	CVTWL	#-^X200,R2		;SET ADDITION CONSTANT

                                     003E    96 20$:	IFNOWRT	R0,(R1),40$,R3		;CAN ALLOCATED STACK SEGMENT BE WRITTEN?

            51            52     C2  0044    97 	SUBL	R2,R1			;UPDATE ADDRESS IN STACK

SYSADJSTK       - SYSTEM SERVICE ADJUST OUTER MODE STACK POINTE  21-AUG-1978 20:17:50   VAX-11 MACRO X0.3-11               Page   3

01              ADJUST OUTER MODE STACK POINTER                                                                                  (1)



            50            6042   3E  0047    98 	MOVAW	(R0)[R2],R0		;UPDATE REMAINING LENGTH

                          F1     18  004B    99 	BGEQ	20$			;IF GEQ MORE TO CHECK

            53            56     DA  004D   100 30$:	MTPR	R6,R3			;

            65            56     D0  0050   101 	MOVL	R6,(R5)			;STORE NEW STACK VALUE

            50            01     3C  0053   102 	MOVZWL	#SS$_NORMAL,R0		;SET NORMAL COMPLETION

                                 04  0056   103 	RET				;

            50            0C     3C  0057   104 40$:	MOVZWL	#SS$_ACCVIO,R0		;SET ACCESS VIOLATION

                                 04  005A   105 	RET				;

            50            24     3C  005B   106 50$:	MOVZWL	#SS$_NOPRIV,R0		;SET NO PRIVILEGE

                                 04  005E   107 	RET				;

                                     005F   108  

                                     005F   109 	.END

SYSADJSTK       - SYSTEM SERVICE ADJUST OUTER MODE STACK POINTE  21-AUG-1978 20:17:50   VAX-11 MACRO X0.3-11               Page   4

SYMBOL TABLE                                                                                                                     (1)



ACMODE         = 00000004            SS$_BUFFEROVF  = 00000601            SS$_GSDFULL    = 000000CC            

ADJUST         = 00000008            SS$_BUGCHECK   = 000002A4            SS$_HANGUP     = 000002CC            

BIT...         = 00000000            SS$_CANCEL     = 00000830            SS$_HEADERFULL = 000008C8            

EXE$ADJSTK       00000000 RG    03   SS$_CHANINTLK  = 0000004C            SS$_IDXFILEFULL= 000008D0            

GBL...         = 00000000            SS$_CLIFRCEXT  = 00000980            SS$_ILLBLKNUM  = 000000DC            

NEWADR         = 0000000C            SS$_CMODSUPR   = 0000041C            SS$_ILLCNTRFUNC= 000000E4            

PSL$C_EXEC     = 00000001            SS$_CMODUSER   = 00000424            SS$_ILLEFC     = 000000EC            

PSL$C_KERNEL   = 00000000            SS$_COMPAT     = 0000042C            SS$_ILLIOFUNC  = 000000F4            

PSL$C_SUPER    = 00000002            SS$_CONTINUE   = 00000001            SS$_ILLLBLAST  = 00000968            

PSL$C_USER     = 00000003            SS$_CONTROLC   = 00000651            SS$_ILLPAGCNT  = 000000FC            

PSL$M_CM       = 80000000            SS$_CONTROLO   = 00000609            SS$_ILLSEQOP   = 000002DC            

PSL$M_CURMOD   = 03000000            SS$_CONTROLY   = 00000611            SS$_ILLSER     = 00000104            

PSL$M_DV       = 00000080            SS$_CREATED    = 00000619            SS$_ILLUSRLBLRD= 00000958            

PSL$M_FPD      = 08000000            SS$_CTRLERR    = 00000054            SS$_ILLUSRLBLWT= 00000960            

PSL$M_FU       = 00000040            SS$_DATACHECK  = 0000005C            SS$_INCVOLLABEL= 0000010C            

PSL$M_IPL      = 001F0000            SS$_DATAOVERUN = 00000838            SS$_INSFARG    = 00000114            

PSL$M_IS       = 04000000            SS$_DEBUG      = 0000046C            SS$_INSFMEM    = 00000124            

PSL$M_IV       = 00000020            SS$_DECOVF     = 000004A4            SS$_INSFRAME   = 0000012C            

PSL$M_PRVMOD   = 00C00000            SS$_DEVACTIVE  = 000002C4            SS$_INSFWSL    = 0000011C            

PSL$M_SAFBITS  = 000037FF            SS$_DEVALLOC   = 00000840            SS$_INTDIV     = 00000484            

PSL$M_TBIT     = 00000010            SS$_DEVALRALLOC= 00000641            SS$_INTOVF     = 0000047C            

PSL$M_TP       = 40000000            SS$_DEVASSIGN  = 00000848            SS$_IVADDR     = 00000134            

PSL$S_CURMOD   = 00000002            SS$_DEVFOREIGN = 00000064            SS$_IVCHAN     = 0000013C            

PSL$S_IPL      = 00000005            SS$_DEVICEFULL = 00000850            SS$_IVCHNLSEC  = 0000026C            

PSL$S_PRVMOD   = 00000002            SS$_DEVMOUNT   = 0000006C            SS$_IVDEVNAM   = 00000144            

PSL$V_CM       = 0000001F            SS$_DEVNOTALLOC= 00000858            SS$_IVGSDNAM   = 0000014C            

PSL$V_CURMOD   = 00000018            SS$_DEVNOTMBX  = 00000074            SS$_IVLOGNAM   = 00000154            

PSL$V_DV       = 00000007            SS$_DEVNOTMOUNT= 0000007C            SS$_IVLOGTAB   = 0000015C            

PSL$V_FPD      = 0000001B            SS$_DEVOFFLINE = 00000084            SS$_IVPROTECT  = 000002F4            

PSL$V_FU       = 00000006            SS$_DIRFULL    = 00000860            SS$_IVQUOTAL   = 00000164            

PSL$V_IPL      = 00000010            SS$_DRVERR     = 0000008C            SS$_IVSECFLG   = 0000016C            

PSL$V_IS       = 0000001A            SS$_DUPFILENAME= 00000868            SS$_IVSECIDCTL = 000002E4            

PSL$V_IV       = 00000005            SS$_DUPLNAM    = 00000094            SS$_IVSSRQ     = 00000174            

PSL$V_PRVMOD   = 00000016            SS$_ENDOFFILE  = 00000870            SS$_IVSTSFLG   = 0000017C            

PSL$V_TBIT     = 00000004            SS$_ENDOFTAPE  = 00000878            SS$_IVTIME     = 00000184            

PSL$V_TP       = 0000001E            SS$_ENDOFUSRLBL= 00000970            SS$_LCKPAGFUL  = 000000D4            

SCH$GL_CURPCB    ********   X   03   SS$_EXQUOTA    = 0000001C            SS$_LENVIO     = 0000018C            

SS$_ABORT      = 0000002C            SS$_EXTIDXFILE = 00000880            SS$_LKWSETFUL  = 00000194            

SS$_ACCONFLICT = 00000800            SS$_FCPREADERR = 00000888            SS$_MBFULL     = 000008D8            

SS$_ACCVIO     = 0000000C            SS$_FCPREPSTN  = 00000988            SS$_MBTOOSML   = 0000019C            

SS$_ACPVAFUL   = 000002FC            SS$_FCPREWNDERR= 00000890            SS$_MCHECK     = 000002BC            

SS$_ARTRES     = 00000474            SS$_FCPSPACERR = 00000898            SS$_MEDOFL     = 000001A4            

SS$_ASTFLT     = 0000040C            SS$_FCPWRITERR = 000008A0            SS$_MSGNOTFND  = 00000621            

SS$_BADATTRIB  = 00000034            SS$_FILACCERR  = 0000009C            SS$_MTLBLLONG  = 00000304            

SS$_BADCHKSUM  = 00000808            SS$_FILALRACC  = 000000A4            SS$_MUSTCLOSEFL= 00000948            

SS$_BADESCAPE  = 0000003C            SS$_FILELOCKED = 000008A8            SS$_NOAQB      = 00000314            

SS$_BADFILEHDR = 00000810            SS$_FILENUMCHK = 000008B0            SS$_NODATA     = 000001AC            

SS$_BADFILENAME= 00000818            SS$_FILESEQCHK = 000008B8            SS$_NOHANDLER  = 000008F8            

SS$_BADFILEVER = 00000820            SS$_FILESTRUCT = 000008C0            SS$_NOHOMEBLK  = 000008E0            

SS$_BADIMGHDR  = 00000044            SS$_FILNOTACC  = 000000AC            SS$_NOIOCHAN   = 000001B4            

SS$_BADIRECTORY= 00000828            SS$_FILNOTCNTG = 000002AC            SS$_NOLINKS    = 0000027C            

SS$_BADPARAM   = 00000014            SS$_FILNOTEXP  = 000000B4            SS$_NOLOGNAM   = 000001BC            

SS$_BADSTACK   = 000002B4            SS$_FLTDIV     = 00000494            SS$_NOMBX      = 00000274            

SS$_BEGOFFILE  = 00000938            SS$_FLTOVF     = 0000048C            SS$_NOMOREFILES= 00000930            

SS$_BLOCKCNTERR= 00000940            SS$_FLTUND     = 0000049C            SS$_NONEXDRV   = 000001C4            

SS$_BREAK      = 00000414            SS$_FORMAT     = 000000BC            SS$_NONEXPR    = 000008E8            

SS$_BUFBYTALI  = 0000030C            SS$_GPTFULL    = 000000C4            SS$_NONLOCAL   = 000008F0            

SYSADJSTK       - SYSTEM SERVICE ADJUST OUTER MODE STACK POINTE  21-AUG-1978 20:17:50   VAX-11 MACRO X0.3-11               Page   5

SYMBOL TABLE                                                                                                                     (1)



SS$_NOPRIV     = 00000024            

SS$_NORMAL     = 00000001            

SS$_NOSIGNAL   = 00000900            

SS$_NOSOLICIT  = 00000284            

SS$_NOSUCHDEV  = 00000908            

SS$_NOSUCHFILE = 00000910            

SS$_NOSUCHNODE = 0000028C            

SS$_NOSUCHSEC  = 00000978            

SS$_NOTAPEOP   = 00000264            

SS$_NOTFILEDEV = 000001CC            

SS$_NOTINTBLSZ = 000001D4            

SS$_NOTLABELMT = 000001DC            

SS$_NOTMODIFIED= 00000659            

SS$_NOTNETDEV  = 000002EC            

SS$_NOTRAN     = 00000629            

SS$_NOTSQDEV   = 000001E4            

SS$_OPCCUS     = 00000434            

SS$_OPCDEC     = 0000043C            

SS$_OPINCOMPL  = 000002D4            

SS$_PAGOWNVIO  = 000001EC            

SS$_PAGRDERR   = 00000444            

SS$_PARITY     = 000001F4            

SS$_PARTESCAPE = 000001FC            

SS$_PFMBSY     = 00000204            

SS$_PLHLDR     = 00000404            

SS$_PSTFULL    = 0000020C            

SS$_RADRMOD    = 0000044C            

SS$_REJECT     = 00000294            

SS$_REMOTE     = 00000649            

SS$_RESIGNAL   = 00000918            

SS$_RESULTOVF  = 00000214            

SS$_ROPRAND    = 00000454            

SS$_SECTBLFUL  = 0000021C            

SS$_SSFAIL     = 0000045C            

SS$_SUBRNG     = 000004AC            

SS$_SUPERSEDE  = 00000631            

SS$_TAPEPOSLOST= 00000224            

SS$_TBIT       = 00000464            

SS$_TIMEOUT    = 0000022C            

SS$_TOOMANYVER = 00000990            

SS$_TOOMUCHDATA= 0000029C            

SS$_UNASEFC    = 00000234            

SS$_UNSAFE     = 0000023C            

SS$_UNWIND     = 00000920            

SS$_UNWINDING  = 00000928            

SS$_VASFULL    = 00000244            

SS$_VECINUSE   = 0000024C            

SS$_VOLINV     = 00000254            

SS$_WAITUSRLBL = 00000950            

SS$_WASCLR     = 00000001            

SS$_WASECC     = 00000639            

SS$_WASSET     = 00000009            

SS$_WRITLCK    = 0000025C            

SS$_WRONGACP   = 0000031C            





PROGRAM SECTION SYNOPSIS

SYSADJSTK       - SYSTEM SERVICE ADJUST OUTER MODE STACK POINTE  21-AUG-1978 20:17:50   VAX-11 MACRO X0.3-11               Page   6

PROGRAM SECTION SYNOPSIS                                                                                                         (1)





.  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$            00000000      02     NOPIC   USR   CON   ABS   LCL NOSHR   EXE   RD    WRT BYTE  

Y$EXEPAGED       0000005F      03     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  





THERE WERE NO ERRORS OR WARNINGS.

18122. BYTES LEFT IN FREE MEMORY POOL.

3728. BYTES OF RECLAIMED MEMORY.

OBJ$:SYSADJSTK,LIS$:SYSADJSTK/-SP=EXECML$/ML,SRC$:SYSADJSTK

3 MLB DIR RDS - 357 GETS TO DEFINE 11 MACROS. 27 INTER. FILE WRITES. 

