<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>堆栈指针</title>
	<atom:link href="https://www.aitaocui.cn/tag/213982/feed" rel="self" type="application/rss+xml" />
	<link>https://www.aitaocui.cn</link>
	<description>翡翠玉石爱好者聚集地</description>
	<lastBuildDate>Thu, 24 Nov 2022 22:13:00 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.1</generator>

<image>
	<url>https://www.aitaocui.cn/wp-content/uploads/2022/11/taocui.png</url>
	<title>堆栈指针</title>
	<link>https://www.aitaocui.cn</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>堆栈指针(电子产品术语)</title>
		<link>https://www.aitaocui.cn/article/325561.html</link>
					<comments>https://www.aitaocui.cn/article/325561.html#respond</comments>
		
		<dc:creator><![CDATA[九公子]]></dc:creator>
		<pubDate>Thu, 24 Nov 2022 22:13:00 +0000</pubDate>
				<category><![CDATA[百科]]></category>
		<category><![CDATA[堆栈指针]]></category>
		<guid isPermaLink="false">https://www.aitaocui.cn/?p=325561</guid>

					<description><![CDATA[堆栈指针总是指向栈顶位置。一般堆栈的栈底不能动，所以数据入栈前要先修改堆栈指针，使它指向新的空余空间然后再把数据存进去，出栈的时候相反。 基本原则 堆栈指针sp在片内RAM128B...]]></description>
										<content:encoded><![CDATA[</p>
<article>
<p>堆栈指针总是指向栈顶位置。一般堆栈的栈底不能动，所以数据入栈前要先修改堆栈指针，使它指向新的空余空间然后再把数据存进去，出栈的时候相反。</p>
</article>
<article>
<h1>基本原则</h1>
<p>堆栈指针sp在片内RAM128B中开辟栈区，并随时跟踪栈顶地址。它是按&quot;先进后出&quot;的原则存取数据。开机复位后，单片机栈底地址为07H。</p>
<h1>基本内容</h1>
<p>在51系列单片机里，堆栈指针sp在片内RAM128B中开辟栈区，并随时跟踪栈顶地址。它是按&quot;先进后出&quot;的原则存取数据。开机复位后，单片机栈底地址为07H。</p>
<p>主要用来保存临时数据，局部变量和中断/调用子程序程序的返回地址。</p>
<p>堆栈指针总是指向栈顶元素。在51系列单片机中，堆栈是向上生长的，所以数据入栈的时候，堆栈指针先加1，再压栈。</p>
<p>出栈的时候先弹出数据，堆栈指针再减1。</p>
<p>但在AVR单片机中，堆栈是向下生长的，数据入栈时指针将减1，数据出栈时指针将加1。</p>
</article>
<div class="mt-3 mb-3" style="max-width: 770px;height: auto;">
                                    </div>
<div class="mt-3 mb-3" style="max-width: 770px;height: auto;">
                                    </div>
<div class="mt-3 mb-3" style="max-width: 770px;height: auto;">
                                    </div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.aitaocui.cn/article/325561.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
