<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Assembly on 0xGently</title><link>https://0xgently.github.io/en/tags/assembly/</link><description>Recent content in Assembly on 0xGently</description><generator>Hugo</generator><language>en</language><copyright>Content is licensed under CC BY 4.0. © 0xGently</copyright><lastBuildDate>Thu, 21 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://0xgently.github.io/en/tags/assembly/index.xml" rel="self" type="application/rss+xml"/><item><title>What are Prologue and Epilogue in Assembly?</title><link>https://0xgently.github.io/en/posts/assembly/</link><pubDate>Thu, 21 May 2026 00:00:00 +0000</pubDate><guid>https://0xgently.github.io/en/posts/assembly/</guid><description>&lt;p&gt;When writing programs in high-level languages, there are many operations handled automatically in the background that we must manage manually in low-level languages (especially Assembly). Among the most critical of these are the &lt;strong&gt;prologue&lt;/strong&gt; and &lt;strong&gt;epilogue&lt;/strong&gt; sequences.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Diagram of Prologue Operation on the Stack" loading="lazy" src="https://0xgently.github.io/assets/img/assembly-image.webp"&gt;&lt;/p&gt;
&lt;p&gt;Before diving into this topic, let&amp;rsquo;s touch upon a few fundamental concepts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Register:&lt;/strong&gt; The fastest data storage area within the CPU; data to be processed is held here.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Stack:&lt;/strong&gt; A memory area operating on a LIFO (Last In, First Out) basis, holding temporary data during function calls.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Stack Frame:&lt;/strong&gt; A block of memory allocated on the stack each time a function is called, containing arguments and local variables.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ESP/RSP:&lt;/strong&gt; The stack pointer; it points to the top of the stack. It is called ESP in x86 and RSP in x64 architecture.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;EBP/RBP:&lt;/strong&gt; The base pointer; it holds the base address of the stack frame and serves as a reference point for accessing variables.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Calling Convention:&lt;/strong&gt; A set of rules determining how arguments are passed to functions and how return values are retrieved.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Push:&lt;/strong&gt; Pushes a value onto the stack, moving the stack pointer down.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pop:&lt;/strong&gt; Pops the value from the top of the stack, moving the stack pointer up.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All these concepts form the foundation for understanding prologue and epilogue operations. Essentially, these two sequences consist entirely of setting up and tearing down the stack frame.&lt;/p&gt;</description></item></channel></rss>