<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.vmssoftware.com/index.php?action=history&amp;feed=atom&amp;title=%24ADJSTK</id>
	<title>$ADJSTK - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.vmssoftware.com/index.php?action=history&amp;feed=atom&amp;title=%24ADJSTK"/>
	<link rel="alternate" type="text/html" href="https://wiki.vmssoftware.com/index.php?title=$ADJSTK&amp;action=history"/>
	<updated>2026-04-30T10:05:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>https://wiki.vmssoftware.com/index.php?title=$ADJSTK&amp;diff=838&amp;oldid=prev</id>
		<title>Darya.zelenina: Created page with &quot;&#039;&#039;&#039;$ADJSTK&#039;&#039;&#039;, or &#039;&#039;&#039;Adjust Outer Mode Stack Pointer&#039;&#039;&#039;, is a system service that modifies the stack pointer for a less privileged access mode. The operatin...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.vmssoftware.com/index.php?title=$ADJSTK&amp;diff=838&amp;oldid=prev"/>
		<updated>2019-06-08T14:22:47Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;$ADJSTK&amp;#039;&amp;#039;&amp;#039;, or &amp;#039;&amp;#039;&amp;#039;Adjust Outer Mode Stack Pointer&amp;#039;&amp;#039;&amp;#039;, is a &lt;a href=&quot;/System_Service&quot; title=&quot;System Service&quot;&gt;system service&lt;/a&gt; that modifies the stack pointer for a less privileged access mode. The operatin...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;$ADJSTK&amp;#039;&amp;#039;&amp;#039;, or &amp;#039;&amp;#039;&amp;#039;Adjust Outer Mode Stack Pointer&amp;#039;&amp;#039;&amp;#039;, is a [[System Service|system service]] that modifies the stack pointer for a less privileged access mode. The operating system uses this service to modify a stack pointer for a less privileged access mode after placing arguments on the stack.&lt;br /&gt;
&lt;br /&gt;
=Syntax=&lt;br /&gt;
&lt;br /&gt;
 SYS$ADJSTK [acmode] ,[adjust] ,newadr&lt;br /&gt;
&lt;br /&gt;
C Prototype:&lt;br /&gt;
 int sys$adjstk (unsigned int acmode, short int adjust, void *(*(newadr)));&lt;br /&gt;
&lt;br /&gt;
=Arguments=&lt;br /&gt;
==acmode==&lt;br /&gt;
{{SyservArgument|access_mode|longword (unsigned)|read only|by value}}&lt;br /&gt;
&lt;br /&gt;
Access mode for which the stack pointer is to be adjusted. The acmode argument is this longword value. If not specified, the default value 0 (kernel access mode) is used.&lt;br /&gt;
&lt;br /&gt;
==adjust==&lt;br /&gt;
{{SyservArgument|word_signed|word (signed)|read only|by value}}&lt;br /&gt;
&lt;br /&gt;
Signed adjustment value used to modify the value specified by the newadr argument. The adjust argument is a signed longword, which is the adjustment value. Only the low-order word of this argument is used. The value specified by the low-order word is added to or subtracted from (depending on the sign) the value specified by the newadr argument. The result is loaded into the stack pointer for the specified access mode. If the adjust argument is not specified or is specified as 0, the stack pointer is loaded with the value specified by the newadr argument.&lt;br /&gt;
&lt;br /&gt;
==newadr==&lt;br /&gt;
{{SyservArgument|address|longword (unsigned)|modify|by reference}}&lt;br /&gt;
&lt;br /&gt;
Value that adjust is to adjust. The newadr argument is the address of this longword value.&lt;br /&gt;
&lt;br /&gt;
The value specified by this argument is both read and written by $ADJSTK. The $ADJSTK service reads the value specified and adjusts it by the value of the adjust argument (if specified). After this adjustment is made, $ADJSTK writes the adjusted value back into the longword specified by newadr and then loads the stack pointer with the adjusted value. If the value specified by newadr is 0, the current value of the stack pointer is adjusted by the value specified by adjust. This new value is then written back into newadr, and the stack pointer is modified. &lt;br /&gt;
&lt;br /&gt;
Combinations of zero and nonzero values for the adjust and newadr arguments provide the following results:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;col&amp;quot; | adjust value&lt;br /&gt;
! colspan=&amp;quot;col&amp;quot; | newadr value&lt;br /&gt;
! colspan=&amp;quot;col&amp;quot; | stack pointer&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 0&lt;br /&gt;
| Not changed&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| An address&lt;br /&gt;
| Loaded with the address specified&lt;br /&gt;
|-&lt;br /&gt;
| A value&lt;br /&gt;
| 0&lt;br /&gt;
| Adjusted by the specified value&lt;br /&gt;
|-&lt;br /&gt;
| A value&lt;br /&gt;
| An address&lt;br /&gt;
| Loaded with the specified address, adjusted by the specified value&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In all cases, the updated stack pointer value is written into the value specified by the newadr argument.&lt;br /&gt;
&lt;br /&gt;
=Privileges Required=&lt;br /&gt;
&lt;br /&gt;
No privileges.&lt;br /&gt;
&lt;br /&gt;
=Condition Values Returned=&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;col&amp;quot; | Value&lt;br /&gt;
! colspan=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| SS$_NORMAL &lt;br /&gt;
| The service completed successfully.&lt;br /&gt;
|-&lt;br /&gt;
| SS$_ACCVIO &lt;br /&gt;
| The value specified by newadr or a portion of the new stack segment cannot be written by the caller.&lt;br /&gt;
|-&lt;br /&gt;
| SS$_NOPRIV &lt;br /&gt;
| The specified access mode is equal to or more privileged than the calling access mode.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
* [[$ADJWSL]]&lt;br /&gt;
* [[$CRETVA]]&lt;br /&gt;
* [[$CRMPSC]]&lt;br /&gt;
* [[$DELTVA]]&lt;br /&gt;
* [[$DGBLSC]]&lt;br /&gt;
* [[$EXPREG]]&lt;br /&gt;
* [[$LCKPAG]]&lt;br /&gt;
* [[$LKWSET]]&lt;br /&gt;
* [[$MGBLSC]]&lt;br /&gt;
* [[$PURGWS]]&lt;br /&gt;
* [[$SETPRT]]&lt;br /&gt;
* [[$SETSTK]]&lt;br /&gt;
* [[$SETSWM]]&lt;br /&gt;
* [[$ULKPAG]]&lt;br /&gt;
* [[$ULWSET]]&lt;br /&gt;
* [[$UPDSEC]]&lt;br /&gt;
* [[$UPDSECW]]&lt;br /&gt;
&lt;br /&gt;
[[Category:System Services]]&lt;/div&gt;</summary>
		<author><name>Darya.zelenina</name></author>
	</entry>
</feed>